mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Disable use of basicIndexOf optimization if _.indexOf is customized.
Former-commit-id: 5b2273b36934581e34c6f6042de95bf556c61ca2
This commit is contained in:
34
build.js
34
build.js
@@ -88,14 +88,14 @@
|
||||
'cloneDeep': ['clone'],
|
||||
'compact': [],
|
||||
'compose': [],
|
||||
'contains': ['basicEach', 'basicIndexOf', 'isString'],
|
||||
'contains': ['basicEach', 'getIndexOf', 'isString'],
|
||||
'countBy': ['createCallback', 'forEach'],
|
||||
'createCallback': ['identity', 'isEqual', 'keys'],
|
||||
'debounce': ['isObject'],
|
||||
'defaults': ['createIterator', 'isArguments', 'keys'],
|
||||
'defer': ['bind'],
|
||||
'delay': [],
|
||||
'difference': ['basicIndexOf', 'createCache'],
|
||||
'difference': ['createCache'],
|
||||
'escape': ['escapeHtmlChar'],
|
||||
'every': ['basicEach', 'createCallback', 'isArray'],
|
||||
'filter': ['basicEach', 'createCallback', 'isArray'],
|
||||
@@ -113,7 +113,7 @@
|
||||
'identity': [],
|
||||
'indexOf': ['basicIndexOf', 'sortedIndex'],
|
||||
'initial': ['slice'],
|
||||
'intersection': ['basicIndexOf', 'createCache'],
|
||||
'intersection': ['createCache'],
|
||||
'invert': ['keys'],
|
||||
'invoke': ['forEach'],
|
||||
'isArguments': [],
|
||||
@@ -143,7 +143,7 @@
|
||||
'min': ['basicEach', 'charAtCallback', 'createCallback', 'isArray', 'isString'],
|
||||
'mixin': ['forEach', 'functions'],
|
||||
'noConflict': [],
|
||||
'omit': ['basicIndexOf', 'forIn'],
|
||||
'omit': ['forIn', 'getIndexOf'],
|
||||
'once': [],
|
||||
'pairs': ['keys'],
|
||||
'parseInt': ['isString'],
|
||||
@@ -172,7 +172,7 @@
|
||||
'transform': ['createCallback', 'createObject', 'forOwn', 'isArray'],
|
||||
'unescape': ['unescapeHtmlChar'],
|
||||
'union': ['isArray', 'uniq'],
|
||||
'uniq': ['basicIndexOf', 'createCache', 'overloadWrapper'],
|
||||
'uniq': ['createCache', 'getIndexOf', 'overloadWrapper'],
|
||||
'uniqueId': [],
|
||||
'unzip': ['max', 'pluck'],
|
||||
'value': ['basicEach', 'forOwn', 'isArray', 'lodashWrapper'],
|
||||
@@ -189,11 +189,12 @@
|
||||
'charAtCallback': [],
|
||||
'compareAscending': [],
|
||||
'createBound': ['createObject', 'isFunction', 'isObject'],
|
||||
'createCache': ['basicIndexOf'],
|
||||
'createCache': ['basicIndexOf', 'getIndexOf'],
|
||||
'createIterator': ['iteratorTemplate'],
|
||||
'createObject': [ 'isObject', 'noop'],
|
||||
'escapeHtmlChar': [],
|
||||
'escapeStringChar': [],
|
||||
'getIndexOf': ['basicIndexOf', 'indexOf'],
|
||||
'iteratorTemplate': [],
|
||||
'isNode': [],
|
||||
'lodashWrapper': [],
|
||||
@@ -2277,10 +2278,11 @@
|
||||
if (!useLodashMethod('contains')) {
|
||||
source = replaceFunction(source, 'contains', [
|
||||
'function contains(collection, target) {',
|
||||
' var length = collection ? collection.length : 0,',
|
||||
' var indexOf = getIndexOf(),',
|
||||
' length = collection ? collection.length : 0,',
|
||||
' result = false;',
|
||||
" if (length && typeof length == 'number') {",
|
||||
' result = basicIndexOf(collection, target) > -1;',
|
||||
' result = indexOf(collection, target) > -1;',
|
||||
' } else {',
|
||||
' basicEach(collection, function(value) {',
|
||||
' return !(result = value === target);',
|
||||
@@ -2347,13 +2349,14 @@
|
||||
source = replaceFunction(source, 'difference', [
|
||||
'function difference(array) {',
|
||||
' var index = -1,',
|
||||
' indexOf = getIndexOf(),',
|
||||
' length = array.length,',
|
||||
' flattened = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),',
|
||||
' result = [];',
|
||||
'',
|
||||
' while (++index < length) {',
|
||||
' var value = array[index];',
|
||||
' if (basicIndexOf(flattened, value) < 0) {',
|
||||
' if (indexOf(flattened, value) < 0) {',
|
||||
' result.push(value);',
|
||||
' }',
|
||||
' }',
|
||||
@@ -2388,16 +2391,17 @@
|
||||
' var args = arguments,',
|
||||
' argsLength = args.length,',
|
||||
' index = -1,',
|
||||
' indexOf = getIndexOf(),',
|
||||
' length = array ? array.length : 0,',
|
||||
' result = [];',
|
||||
'',
|
||||
' outer:',
|
||||
' while (++index < length) {',
|
||||
' var value = array[index];',
|
||||
' if (basicIndexOf(result, value) < 0) {',
|
||||
' if (indexOf(result, value) < 0) {',
|
||||
' var argsIndex = argsLength;',
|
||||
' while (--argsIndex) {',
|
||||
' if (basicIndexOf(args[argsIndex], value) < 0) {',
|
||||
' if (indexOf(args[argsIndex], value) < 0) {',
|
||||
' continue outer;',
|
||||
' }',
|
||||
' }',
|
||||
@@ -2547,11 +2551,12 @@
|
||||
if (!useLodashMethod('omit')) {
|
||||
source = replaceFunction(source, 'omit', [
|
||||
'function omit(object) {',
|
||||
' var props = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),',
|
||||
' var indexOf = getIndexOf(),',
|
||||
' props = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),',
|
||||
' result = {};',
|
||||
'',
|
||||
' forIn(object, function(value, key) {',
|
||||
' if (basicIndexOf(props, key) < 0) {',
|
||||
' if (indexOf(props, key) < 0) {',
|
||||
' result[key] = value;',
|
||||
' }',
|
||||
' });',
|
||||
@@ -2716,6 +2721,7 @@
|
||||
source = replaceFunction(source, 'uniq', [
|
||||
'function uniq(array, isSorted, callback, thisArg) {',
|
||||
' var index = -1,',
|
||||
' indexOf = getIndexOf(),',
|
||||
' length = array ? array.length : 0,',
|
||||
' result = [],',
|
||||
' seen = result;',
|
||||
@@ -2735,7 +2741,7 @@
|
||||
'',
|
||||
' if (isSorted',
|
||||
' ? !index || seen[seen.length - 1] !== computed',
|
||||
' : basicIndexOf(seen, computed) < 0',
|
||||
' : indexOf(seen, computed) < 0',
|
||||
' ) {',
|
||||
' if (callback) {',
|
||||
' seen.push(computed);',
|
||||
|
||||
29
dist/lodash.compat.js
vendored
29
dist/lodash.compat.js
vendored
@@ -776,8 +776,9 @@
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
isLarge = length >= largeArraySize && lodash.indexOf != indexOf,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
@@ -792,7 +793,7 @@
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
@@ -938,6 +939,19 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
* the `basicIndexOf` function.
|
||||
*
|
||||
* @private
|
||||
* @returns {Function} Returns the "indexOf" function.
|
||||
*/
|
||||
function getIndexOf(array, value, fromIndex) {
|
||||
var result = (result = lodash.indexOf) == indexOf ? basicIndexOf : result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a DOM node in IE < 9.
|
||||
*
|
||||
@@ -2281,7 +2295,8 @@
|
||||
* // => { 'name': 'moe' }
|
||||
*/
|
||||
function omit(object, callback, thisArg) {
|
||||
var isFunc = typeof callback == 'function',
|
||||
var indexOf = getIndexOf(),
|
||||
isFunc = typeof callback == 'function',
|
||||
result = {};
|
||||
|
||||
if (isFunc) {
|
||||
@@ -2292,7 +2307,7 @@
|
||||
forIn(object, function(value, key, object) {
|
||||
if (isFunc
|
||||
? !callback(value, key, object)
|
||||
: basicIndexOf(props, key) < 0
|
||||
: indexOf(props, key) < 0
|
||||
) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -2518,6 +2533,7 @@
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = collection ? collection.length : 0,
|
||||
result = false;
|
||||
|
||||
@@ -2525,7 +2541,7 @@
|
||||
if (length && typeof length == 'number') {
|
||||
result = (isString(collection)
|
||||
? collection.indexOf(target, fromIndex)
|
||||
: basicIndexOf(collection, target, fromIndex)
|
||||
: indexOf(collection, target, fromIndex)
|
||||
) > -1;
|
||||
} else {
|
||||
basicEach(collection, function(value) {
|
||||
@@ -4221,6 +4237,7 @@
|
||||
*/
|
||||
var uniq = overloadWrapper(function(array, isSorted, callback) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize,
|
||||
result = [],
|
||||
@@ -4232,7 +4249,7 @@
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : basicIndexOf(seen, computed) < 0)
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
|
||||
86
dist/lodash.compat.min.js
vendored
86
dist/lodash.compat.min.js
vendored
@@ -4,46 +4,46 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(e){function a(n){return n&&typeof n=="object"&&!Or(n)&&rr.call(n,"__wrapped__")?n:new W(n)}function T(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function L(n){return n.charCodeAt(0)}function G(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function H(n,t,r,e){function u(){var e=arguments,l=o?this:t;return a||(n=t[i]),r.length&&(e=e.length?(e=dr.call(e),c?e.concat(r):r.concat(e)):r),this instanceof u?(l=M(n.prototype),e=n.apply(l,e),ct(e)?e:l):n.apply(l,e)
|
||||
}var a=it(n),o=!r,i=t;if(o){var c=e;r=t}else if(!a){if(!e)throw new Ht;t=n}return u}function J(n){function t(t){return-1<T(n,t)}function r(t){n.push(t)}function e(n){var t=typeof n;if("boolean"==t||null==n)return s[n];var r=s[t]||(t="object",p),e="number"==t?n:c+n;return"object"==t?r[e]?-1<T(r[e],n):!1:!!r[e]}function u(n){var t=typeof n;if("boolean"==t||null==n)s[n]=!0;else{var r=s[t]||(t="object",p),e="number"==t?n:c+n;"object"==t?a=(r[e]||(r[e]=[])).push(n)==i:r[e]=!0}}n||(n=[]);var a,o=-1,i=n.length,f=i>=l,p={},s={"false":!1,"function":!1,"null":!1,number:{},object:p,string:{},"true":!1,undefined:!1};
|
||||
if(f){for(;++o<i;)u(n[o]);a&&(f=s=p=null)}return f?{contains:e,push:u}:{contains:t,push:r}}function K(){for(var n,t={g:x,b:"",c:"",e:"r",f:"",h:"",i:!0,j:!!Ar},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];r=t.a,t.d=/^[^,]+/.exec(r)[0],n=qt,r="return function("+r+"){",e="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(e+="var s=r.length;m=-1;if("+t.b+"){",wr.unindexedChars&&(e+="if(q(r)){r=r.split('')}"),e+="while(++m<s){"+t.f+";}}else{"):wr.nonEnumArgs&&(e+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),wr.enumPrototypes&&(e+="var E=typeof r=='function';"),wr.enumErrorProps&&(e+="var D=r===j||r instanceof Error;");
|
||||
var u=[];if(wr.enumPrototypes&&u.push('!(E&&m=="prototype")'),wr.enumErrorProps&&u.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)e+="var A=-1,B=z[typeof r]?t(r):[],s=B.length;while(++A<s){m=B[A];",u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}";else if(e+="for(m in r){",t.i&&u.push("l.call(r, m)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}",wr.nonEnumShadows){for(e+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)e+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(e+="||(!v[m]&&r[m]!==y[m])"),e+="){"+t.f+"}";
|
||||
e+="}"}return(t.b||wr.nonEnumArgs)&&(e+="}"),e+=t.c+";return C",n("i,j,l,n,o,q,t,u,y,z,w,G,H,J",r+e+"}")(I,Kt,rr,rt,Or,ft,Ar,a,Mt,q,jr,F,Ut,ir)}function M(n){return ct(n)?lr(n):{}}function U(n){return Br[n]}function V(n){return"\\"+D[n]}function Q(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function W(n){this.__wrapped__=n}function X(){}function Y(n){return function(t,e,u,o){return typeof e!="boolean"&&null!=e&&(o=u,u=o&&o[e]===t?r:e,e=!1),null!=u&&(u=a.createCallback(u,o)),n(t,e,u,o)
|
||||
}}function Z(n){var t,e;return!n||ir.call(n)!=P||(t=n.constructor,it(t)&&!(t instanceof t))||!wr.argsClass&&rt(n)||!wr.nodeClass&&Q(n)?!1:wr.ownLast?(Fr(n,function(n,t,r){return e=rr.call(r,t),!1}),!1!==e):(Fr(n,function(n,t){e=t}),e===r||rr.call(n,e))}function nt(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=zt(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function tt(n){return Nr[n]}function rt(n){return ir.call(n)==E}function et(n,t,e,u,o,i){var c=n;if(typeof t!="boolean"&&null!=t&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:a.createCallback(e,u,1),c=e(c),typeof c!="undefined")return c;
|
||||
c=n}if(u=ct(c)){var l=ir.call(c);if(!$[l]||!wr.nodeClass&&Q(c))return c;var f=Or(c)}if(!u||!t)return u?f?nt(c):Pr({},c):c;switch(u=Cr[l],l){case S:case A:return new u(+c);case N:case F:return new u(c);case z:return u(c.source,h.exec(c))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return c=f?u(c.length):{},f&&(rr.call(n,"index")&&(c.index=n.index),rr.call(n,"input")&&(c.input=n.input)),o.push(n),i.push(c),(f?Ir:$r)(n,function(n,u){c[u]=et(n,t,e,r,o,i)}),c}function ut(n){var t=[];
|
||||
return Fr(n,function(n,r){it(n)&&t.push(r)}),t.sort()}function at(n){for(var t=-1,r=Ar(n),e=r.length,u={};++t<e;){var a=r[t];u[n[a]]=a}return u}function ot(n,t,r,e,u,o){var c=r===i;if(typeof r=="function"&&!c){r=a.createCallback(r,e,2);var l=r(n,t);if(typeof l!="undefined")return!!l}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,p=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=ir.call(n),f=ir.call(t),p==E&&(p=P),f==E&&(f=P),p!=f)return!1;
|
||||
switch(p){case S:case A:return+n==+t;case N:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case F:return n==Gt(t)}if(f=p==O,!f){if(rr.call(n,"__wrapped__")||rr.call(t,"__wrapped__"))return ot(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(p!=P||!wr.nodeClass&&(Q(n)||Q(t)))return!1;var p=!wr.argsObject&&rt(n)?Tt:n.constructor,s=!wr.argsObject&&rt(t)?Tt:t.constructor;if(p!=s&&(!it(p)||!(p instanceof p&&it(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;
|
||||
var g=0,l=!0;if(u.push(n),o.push(t),f){if(p=n.length,g=t.length,l=g==n.length,!l&&!c)return l;for(;g--;)if(f=p,s=t[g],c)for(;f--&&!(l=ot(n[f],s,r,e,u,o)););else if(!(l=ot(n[g],s,r,e,u,o)))break;return l}return Fr(t,function(t,a,i){return rr.call(i,a)?(g++,l=rr.call(n,a)&&ot(n[a],t,r,e,u,o)):void 0}),l&&!c&&Fr(n,function(n,t,r){return rr.call(r,t)?l=-1<--g:void 0}),l}function it(n){return typeof n=="function"}function ct(n){return!(!n||!q[typeof n])}function lt(n){return typeof n=="number"||ir.call(n)==N
|
||||
}function ft(n){return typeof n=="string"||ir.call(n)==F}function pt(n,t,r){var e=arguments,u=0,o=2;if(!ct(n))return n;if(r===i)var c=e[3],l=e[4],f=e[5];else l=[],f=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?c=a.createCallback(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(c=e[--o]);for(;++u<o;)(Or(e[u])?mt:$r)(e[u],function(t,r){var e,u,a=t,o=n[r];if(t&&((u=Or(t))||qr(t))){for(a=l.length;a--;)if(e=l[a]==t){o=f[a];break}if(!e){var p;c&&(a=c(o,t),p=typeof a!="undefined")&&(o=a),p||(o=u?Or(o)?o:[]:qr(o)?o:{}),l.push(t),f.push(o),p||(o=pt(o,t,i,c,l,f))
|
||||
}}else c&&(a=c(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[r]=o});return n}function st(n){for(var t=-1,r=Ar(n),e=r.length,u=zt(e);++t<e;)u[t]=n[r[t]];return u}function gt(n,t,r){var e=-1,u=n?n.length:0,a=!1;return r=(0>r?vr(0,u+r):r)||0,u&&typeof u=="number"?a=-1<(ft(n)?n.indexOf(t,r):T(n,t,r)):Ir(n,function(n){return++e<r?void 0:!(a=n===t)}),a}function vt(n,t,r){var e=!0;if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Ir(n,function(n,r,u){return e=!!t(n,r,u)
|
||||
});return e}function ht(n,t,r){var e=[];if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Ir(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function yt(n,t,r){if(t=a.createCallback(t,r),!Or(n)){var e;return Ir(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}r=-1;for(var u=n.length;++r<u;){var o=n[r];if(t(o,r,n))return o}}function mt(n,t,r){if(t&&typeof r=="undefined"&&Or(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else Ir(n,t,r);
|
||||
return n}function dt(n,t,r){var e=-1,u=n?n.length:0,o=zt(typeof u=="number"?u:0);if(t=a.createCallback(t,r),Or(n))for(;++e<u;)o[e]=t(n[e],e,n);else Ir(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function bt(n,t,r){var e=-1/0,u=e;if(!t&&Or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&ft(n)?L:a.createCallback(t,r),Ir(n,function(n,r,a){r=t(n,r,a),r>e&&(e=r,u=n)});return u}function _t(n,t,r,e){var u=3>arguments.length;if(t=a.createCallback(t,e,4),Or(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)
|
||||
}else Ir(n,function(n,e,a){r=u?(u=!1,n):t(r,n,e,a)});return r}function Ct(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var c=Ar(n),o=c.length;else wr.unindexedChars&&ft(n)&&(u=n.split(""));return t=a.createCallback(t,e,4),mt(n,function(n,e,a){e=c?c[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function jt(n,t,r){var e;if(t=a.createCallback(t,r),Or(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Ir(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function wt(n){for(var t=-1,r=n?n.length:0,e=Yt.apply(Jt,dr.call(arguments,1)),e=J(e).contains,u=[];++t<r;){var a=n[t];
|
||||
e(a)||u.push(a)}return u}function kt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return nt(n,0,hr(vr(0,e),u))}}function xt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:vr(0,t);return nt(n,e)}function Et(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a.createCallback(r,e,1):Bt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;
|
||||
return u}function Ot(n){for(var t=-1,r=n?bt(Dr(n,"length")):0,e=zt(0>r?0:r);++t<r;)e[t]=Dr(n,t);return e}function St(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var a=n[r];t?u[a]=t[r]:u[a[0]]=a[1]}return u}function At(n,t){return wr.fastBind||cr&&2<arguments.length?cr.call.apply(cr,arguments):H(n,t,dr.call(arguments,2))}function It(n){var t=dr.call(arguments,1);return or(function(){n.apply(r,t)},1)}function Bt(n){return n}function Nt(n){mt(ut(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];
|
||||
return er.apply(t,arguments),t=r.apply(a,t),n&&typeof n=="object"&&n==t?this:new W(t)}})}function Pt(){return this.__wrapped__}e=e?R.defaults(n.Object(),e,R.pick(n,w)):n;var zt=e.Array,Ft=e.Boolean,$t=e.Date,qt=e.Function,Dt=e.Math,Rt=e.Number,Tt=e.Object,Lt=e.RegExp,Gt=e.String,Ht=e.TypeError,Jt=zt.prototype,Kt=e.Error.prototype,Mt=Tt.prototype,Ut=Gt.prototype,Vt=e._,Qt=Lt("^"+Gt(Mt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Wt=Dt.ceil,Xt=e.clearTimeout,Yt=Jt.concat,Zt=Dt.floor,nr=qt.prototype.toString,tr=Qt.test(tr=Tt.getPrototypeOf)&&tr,rr=Mt.hasOwnProperty,er=Jt.push,ur=Mt.propertyIsEnumerable,ar=e.setImmediate,or=e.setTimeout,ir=Mt.toString,cr=Qt.test(cr=ir.bind)&&cr,lr=Qt.test(lr=Tt.create)&&lr,fr=Qt.test(fr=zt.isArray)&&fr,pr=e.isFinite,sr=e.isNaN,gr=Qt.test(gr=Tt.keys)&&gr,vr=Dt.max,hr=Dt.min,yr=e.parseInt,mr=Dt.random,dr=Jt.slice,br=Qt.test(e.attachEvent),_r=cr&&!/\n|true/.test(cr+br),Cr={};
|
||||
Cr[O]=zt,Cr[S]=Ft,Cr[A]=$t,Cr[B]=qt,Cr[P]=Tt,Cr[N]=Rt,Cr[z]=Lt,Cr[F]=Gt;var jr={};jr[O]=jr[A]=jr[N]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},jr[S]=jr[F]={constructor:!0,toString:!0,valueOf:!0},jr[I]=jr[B]=jr[z]={constructor:!0,toString:!0},jr[P]={constructor:!0},function(){for(var n=x.length;n--;){var t,r=x[n];for(t in jr)rr.call(jr,t)&&!rr.call(jr[t],r)&&(jr[t][r]=!1)}}();var wr=a.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};
|
||||
for(var e in new n)r.push(e);for(e in arguments);wr.argsObject=arguments.constructor==Tt&&!(arguments instanceof zt),wr.argsClass=rt(arguments),wr.enumErrorProps=ur.call(Kt,"message")||ur.call(Kt,"name"),wr.enumPrototypes=ur.call(n,"prototype"),wr.fastBind=cr&&!_r,wr.ownLast="x"!=r[0],wr.nonEnumArgs=0!=e,wr.nonEnumShadows=!/valueOf/.test(r),wr.spliceObjects=(Jt.splice.call(t,0,1),!t[0]),wr.unindexedChars="xx"!="x"[0]+Tt("x")[0];try{wr.nodeClass=!(ir.call(document)==P&&!({toString:0}+""))}catch(u){wr.nodeClass=!0
|
||||
}}(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var kr={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},xr={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},Er={h:"if(!z[typeof r])return C;"+xr.h,b:!1};lr||(M=function(n){if(ct(n)){X.prototype=n;
|
||||
var t=new X;X.prototype=null}return t||{}}),W.prototype=a.prototype,wr.argsClass||(rt=function(n){return n?rr.call(n,"callee"):!1});var Or=fr||function(n){return n?typeof n=="object"&&ir.call(n)==O:!1},Sr=K({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),Ar=gr?function(n){return ct(n)?wr.enumPrototypes&&typeof n=="function"||wr.nonEnumArgs&&n.length&&rt(n)?Sr(n):gr(n):[]}:Sr,Ir=K(xr),Br={"&":"&","<":"<",">":">",'"':""","'":"'"},Nr=at(Br),Pr=K(kr,{h:kr.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),zr=K(kr),Fr=K(xr,Er,{i:!1}),$r=K(xr,Er);
|
||||
it(/x/)&&(it=function(n){return typeof n=="function"&&ir.call(n)==B});var qr=tr?function(n){if(!n||ir.call(n)!=P||!wr.argsClass&&rt(n))return!1;var t=n.valueOf,r=typeof t=="function"&&(r=tr(t))&&tr(r);return r?n==r||tr(n)==r:Z(n)}:Z,Dr=dt,Rr=Y(function Gr(n,t,r){for(var e=-1,u=n?n.length:0,a=[];++e<u;){var o=n[e];r&&(o=r(o,e,n)),Or(o)?er.apply(a,t?o:Gr(o)):a.push(o)}return a}),Tr=Y(function(n,t,r){for(var e=-1,u=n?n.length:0,a=!t&&u>=l,o=[],i=a?J():r?[]:o;++e<u;){var c=n[e],f=r?r(c,e,n):c;(t?e&&i[i.length-1]===f:a?i.contains(f):0<=T(i,f))||((r||a)&&i.push(f),o.push(c))
|
||||
}return o});_r&&u&&typeof ar=="function"&&(It=At(ar,e));var Lr=8==yr(d+"08")?yr:function(n,t){return yr(ft(n)?n.replace(b,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Pr,a.at=function(n){var t=-1,r=Yt.apply(Jt,dr.call(arguments,1)),e=r.length,u=zt(e);for(wr.unindexedChars&&ft(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=At,a.bindAll=function(n){for(var t=1<arguments.length?Yt.apply(Jt,dr.call(arguments,1)):ut(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=At(n[u],n)}return n},a.bindKey=function(n,t){return H(n,t,dr.call(arguments,2),i)},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},a.countBy=function(n,t,r){var e={};return t=a.createCallback(t,r),mt(n,function(n,r,u){r=Gt(t(n,r,u)),rr.call(e,r)?e[r]++:e[r]=1}),e},a.createCallback=function(n,t,r){if(null==n)return Bt;
|
||||
var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Ar(n);return function(t){for(var r=u.length,e=!1;r--&&(e=ot(t[u[r]],n[u[r]],i)););return e}}return typeof t=="undefined"||m&&!m.test(nr.call(n))?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,a){return n.call(t,r,e,u,a)}:function(r,e,u){return n.call(t,r,e,u)}},a.debounce=function(n,t,r){function e(){var t=l&&(!f||1<i);i=c=0,t&&(a=n.apply(o,u))}var u,a,o,i=0,c=null,l=!0;
|
||||
if(!0===r)var f=!0,l=!1;else ct(r)&&(f=r.leading,l="trailing"in r?r.trailing:l);return function(){return u=arguments,o=this,Xt(c),f&&2>++i&&(a=n.apply(o,u)),c=or(e,t),a}},a.defaults=zr,a.defer=It,a.delay=function(n,t){var e=dr.call(arguments,2);return or(function(){n.apply(r,e)},t)},a.difference=wt,a.filter=ht,a.flatten=Rr,a.forEach=mt,a.forIn=Fr,a.forOwn=$r,a.functions=ut,a.groupBy=function(n,t,r){var e={};return t=a.createCallback(t,r),mt(n,function(n,r,u){r=Gt(t(n,r,u)),(rr.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return nt(n,0,hr(vr(0,u-e),u))},a.intersection=function(n){var t=arguments,r=t.length,e=J(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var c=n[a];if(!e.contains(c)){var l=r;for(e.push(c);--l;)if(!(u[l]||(u[l]=J(t[l]).contains))(c))continue n;i.push(c)}}return i},a.invert=at,a.invoke=function(n,t){var r=dr.call(arguments,2),e=-1,u=typeof t=="function",a=n?n.length:0,o=zt(typeof a=="number"?a:0);
|
||||
return mt(n,function(n){o[++e]=(u?t:n[t]).apply(n,r)}),o},a.keys=Ar,a.map=dt,a.max=bt,a.memoize=function(n,t){function r(){var e=r.cache,u=c+(t?t.apply(this,arguments):arguments[0]);return rr.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}return r.cache={},r},a.merge=pt,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Or(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&ft(n)?L:a.createCallback(t,r),Ir(n,function(n,r,a){r=t(n,r,a),r<e&&(e=r,u=n)});return u},a.omit=function(n,t,r){var e=typeof t=="function",u={};
|
||||
if(e)t=a.createCallback(t,r);else var o=Yt.apply(Jt,dr.call(arguments,1));return Fr(n,function(n,r,a){(e?!t(n,r,a):0>T(o,r))&&(u[r]=n)}),u},a.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},a.pairs=function(n){for(var t=-1,r=Ar(n),e=r.length,u=zt(e);++t<e;){var a=r[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return H(n,dr.call(arguments,1))},a.partialRight=function(n){return H(n,dr.call(arguments,1),null,i)},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,o=Yt.apply(Jt,dr.call(arguments,1)),i=ct(n)?o.length:0;++u<i;){var c=o[u];
|
||||
c in n&&(e[c]=n[c])}else t=a.createCallback(t,r),Fr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Dr,a.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=vr(0,Wt((t-n)/r));for(var u=zt(t);++e<t;)u[e]=n,n+=r;return u},a.reject=function(n,t,r){return t=a.createCallback(t,r),ht(n,function(n,r,e){return!t(n,r,e)})},a.rest=xt,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=zt(typeof r=="number"?r:0);return mt(n,function(n){var r=Zt(mr()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=zt(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,r),mt(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(G);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,r){function e(){l=null,f&&(i=new $t,a=n.apply(o,u))}var u,a,o,i=0,c=!0,l=null,f=!0;return!1===r?c=!1:ct(r)&&(c="leading"in r?r.leading:c,f="trailing"in r?r.trailing:f),function(){var r=new $t;!l&&!c&&(i=r);var f=t-(r-i);return u=arguments,o=this,0<f?l||(l=or(e,f)):(Xt(l),l=null,i=r,a=n.apply(o,u)),a}},a.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=zt(n);for(t=a.createCallback(t,r,1);++e<n;)u[e]=t(e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?wr.unindexedChars&&ft(n)?n.split(""):nt(n):st(n)},a.transform=function(n,t,r,e){var u=Or(n);return t=a.createCallback(t,e,4),null==r&&(u?r=[]:(e=n&&n.constructor,r=M(e&&e.prototype))),(u?Ir:$r)(n,function(n,e,u){return t(r,n,e,u)}),r},a.union=function(n){return Or(n)||(arguments[0]=n?dr.call(n):Jt),Tr(Yt.apply(Jt,arguments))},a.uniq=Tr,a.unzip=Ot,a.values=st,a.where=ht,a.without=function(n){return wt(n,dr.call(arguments,1))
|
||||
},a.wrap=function(n,t){return function(){var r=[n];return er.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){return n?Ot(arguments):[]},a.zipObject=St,a.collect=dt,a.drop=xt,a.each=mt,a.extend=Pr,a.methods=ut,a.object=St,a.select=ht,a.tail=xt,a.unique=Tr,Nt(a),a.chain=a,a.prototype.chain=function(){return this},a.clone=et,a.cloneDeep=function(n,t,r){return et(n,!0,t,r)},a.contains=gt,a.escape=function(n){return null==n?"":Gt(n).replace(C,U)},a.every=vt,a.find=yt,a.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;
|
||||
for(t=a.createCallback(t,r);++e<u;)if(t(n[e],e,n))return e;return-1},a.findKey=function(n,t,r){var e;return t=a.createCallback(t,r),$r(n,function(n,r,u){return t(n,r,u)?(e=r,!1):void 0}),e},a.has=function(n,t){return n?rr.call(n,t):!1},a.identity=Bt,a.indexOf=function(n,t,r){if(typeof r=="number"){var e=n?n.length:0;r=0>r?vr(0,e+r):r||0}else if(r)return r=Et(n,t),n[r]===t?r:-1;return n?T(n,t,r):-1},a.isArguments=rt,a.isArray=Or,a.isBoolean=function(n){return!0===n||!1===n||ir.call(n)==S},a.isDate=function(n){return n?typeof n=="object"&&ir.call(n)==A:!1
|
||||
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var r=ir.call(n),e=n.length;return r==O||r==F||(wr.argsClass?r==E:rt(n))||r==P&&typeof e=="number"&&it(n.splice)?!e:($r(n,function(){return t=!1}),t)},a.isEqual=ot,a.isFinite=function(n){return pr(n)&&!sr(parseFloat(n))},a.isFunction=it,a.isNaN=function(n){return lt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=lt,a.isObject=ct,a.isPlainObject=qr,a.isRegExp=function(n){return!(!n||!q[typeof n])&&ir.call(n)==z
|
||||
},a.isString=ft,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?vr(0,e+r):hr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=Nt,a.noConflict=function(){return e._=Vt,this},a.parseInt=Lr,a.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=mr();return n%1||t%1?n+hr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+Zt(r*(t-n+1))},a.reduce=_t,a.reduceRight=Ct,a.result=function(n,t){var e=n?n[t]:r;
|
||||
return it(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ar(n).length},a.some=jt,a.sortedIndex=Et,a.template=function(n,t,e){var u=a.templateSettings;n||(n=""),e=zr({},e,u);var o,i=zr({},e.imports,u.imports),u=Ar(i),i=st(i),c=0,l=e.interpolate||_,g="__p+='",l=Lt((e.escape||_).source+"|"+l.source+"|"+(l===y?v:_).source+"|"+(e.evaluate||_).source+"|$","g");n.replace(l,function(t,r,e,u,a,i){return e||(e=u),g+=n.slice(c,i).replace(j,V),r&&(g+="'+__e("+r+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),e&&(g+="'+((__t=("+e+"))==null?'':__t)+'"),c=i+t.length,t
|
||||
}),g+="';\n",l=e=e.variable,l||(e="obj",g="with("+e+"){"+g+"}"),g=(o?g.replace(f,""):g).replace(p,"$1").replace(s,"$1;"),g="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var h=qt(u,"return "+g).apply(r,i)}catch(m){throw m.source=g,m}return t?h(t):(h.source=g,h)},a.unescape=function(n){return null==n?"":Gt(n).replace(g,tt)},a.uniqueId=function(n){var t=++o;return Gt(null==n?"":n)+t
|
||||
},a.all=vt,a.any=jt,a.detect=yt,a.foldl=_t,a.foldr=Ct,a.include=gt,a.inject=_t,$r(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return er.apply(t,arguments),n.apply(a,t)})}),a.first=kt,a.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return nt(n,vr(0,u-e))}},a.take=kt,a.head=kt,$r(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return null==t||r&&typeof t!="function"?e:new W(e)})}),a.VERSION="1.2.1",a.prototype.toString=function(){return Gt(this.__wrapped__)},a.prototype.value=Pt,a.prototype.valueOf=Pt,Ir(["join","pop","shift"],function(n){var t=Jt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Ir(["push","reverse","sort","unshift"],function(n){var t=Jt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ir(["concat","slice","splice"],function(n){var t=Jt[n];a.prototype[n]=function(){return new W(t.apply(this.__wrapped__,arguments))
|
||||
}}),wr.spliceObjects||Ir(["pop","shift","splice"],function(n){var t=Jt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new W(e):e}}),a}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},c=+new Date+"",l=75,f=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,g=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=(m=/\bthis\b/)&&m.test(t)&&m,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",b=RegExp("^["+d+"]*0+(?=.$)"),_=/($^)/,C=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),E="[object Arguments]",O="[object Array]",S="[object Boolean]",A="[object Date]",I="[object Error]",B="[object Function]",N="[object Number]",P="[object Object]",z="[object RegExp]",F="[object String]",$={};
|
||||
$[B]=!1,$[E]=$[O]=$[S]=$[A]=$[N]=$[P]=$[z]=$[F]=!0;var q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},D={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},R=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=R, define(function(){return R})):e&&!e.nodeType?u?(u.exports=R)._=R:e._=R:n._=R}(this);
|
||||
;!function(n){function t(e){function a(n){return n&&typeof n=="object"&&!Ar(n)&&ur.call(n,"__wrapped__")?n:new X(n)}function T(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function L(n){return n.charCodeAt(0)}function G(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function H(n,t,r,e){function u(){var e=arguments,l=o?this:t;return a||(n=t[i]),r.length&&(e=e.length?(e=_r.call(e),c?e.concat(r):r.concat(e)):r),this instanceof u?(l=M(n.prototype),e=n.apply(l,e),lt(e)?e:l):n.apply(l,e)
|
||||
}var a=ct(n),o=!r,i=t;if(o){var c=e;r=t}else if(!a){if(!e)throw new Kt;t=n}return u}function J(n){function t(t){return-1<f(n,t)}function r(t){n.push(t)}function e(n){var t=typeof n;if("boolean"==t||null==n)return v[n];var r=v[t]||(t="object",g),e="number"==t?n:c+n;return"object"==t?r[e]?-1<T(r[e],n):!1:!!r[e]}function u(n){var t=typeof n;if("boolean"==t||null==n)v[n]=!0;else{var r=v[t]||(t="object",g),e="number"==t?n:c+n;"object"==t?o=(r[e]||(r[e]=[])).push(n)==p:r[e]=!0}}n||(n=[]);var o,i=-1,f=Q(),p=n.length,s=p>=l&&a.indexOf!=f,g={},v={"false":!1,"function":!1,"null":!1,number:{},object:g,string:{},"true":!1,undefined:!1};
|
||||
if(s){for(;++i<p;)u(n[i]);o&&(s=v=g=null)}return s?{contains:e,push:u}:{contains:t,push:r}}function K(){for(var n,t={g:x,b:"",c:"",e:"r",f:"",h:"",i:!0,j:!!Br},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];r=t.a,t.d=/^[^,]+/.exec(r)[0],n=Rt,r="return function("+r+"){",e="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(e+="var s=r.length;m=-1;if("+t.b+"){",xr.unindexedChars&&(e+="if(q(r)){r=r.split('')}"),e+="while(++m<s){"+t.f+";}}else{"):xr.nonEnumArgs&&(e+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),xr.enumPrototypes&&(e+="var E=typeof r=='function';"),xr.enumErrorProps&&(e+="var D=r===j||r instanceof Error;");
|
||||
var u=[];if(xr.enumPrototypes&&u.push('!(E&&m=="prototype")'),xr.enumErrorProps&&u.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)e+="var A=-1,B=z[typeof r]?t(r):[],s=B.length;while(++A<s){m=B[A];",u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}";else if(e+="for(m in r){",t.i&&u.push("l.call(r, m)"),u.length&&(e+="if("+u.join("&&")+"){"),e+=t.f+";",u.length&&(e+="}"),e+="}",xr.nonEnumShadows){for(e+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)e+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(e+="||(!v[m]&&r[m]!==y[m])"),e+="){"+t.f+"}";
|
||||
e+="}"}return(t.b||xr.nonEnumArgs)&&(e+="}"),e+=t.c+";return C",n("i,j,l,n,o,q,t,u,y,z,w,G,H,J",r+e+"}")(I,Ut,ur,et,Ar,pt,Br,a,Vt,q,kr,F,Qt,lr)}function M(n){return lt(n)?pr(n):{}}function U(n){return Pr[n]}function V(n){return"\\"+D[n]}function Q(){var n=(n=a.indexOf)==Ot?T:n;return n}function W(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function X(n){this.__wrapped__=n}function Y(){}function Z(n){return function(t,e,u,o){return typeof e!="boolean"&&null!=e&&(o=u,u=o&&o[e]===t?r:e,e=!1),null!=u&&(u=a.createCallback(u,o)),n(t,e,u,o)
|
||||
}}function nt(n){var t,e;return!n||lr.call(n)!=P||(t=n.constructor,ct(t)&&!(t instanceof t))||!xr.argsClass&&et(n)||!xr.nodeClass&&W(n)?!1:xr.ownLast?(qr(n,function(n,t,r){return e=ur.call(r,t),!1}),!1!==e):(qr(n,function(n,t){e=t}),e===r||ur.call(n,e))}function tt(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=$t(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function rt(n){return zr[n]}function et(n){return lr.call(n)==O}function ut(n,t,e,u,o,i){var c=n;if(typeof t!="boolean"&&null!=t&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:a.createCallback(e,u,1),c=e(c),typeof c!="undefined")return c;
|
||||
c=n}if(u=lt(c)){var l=lr.call(c);if(!$[l]||!xr.nodeClass&&W(c))return c;var f=Ar(c)}if(!u||!t)return u?f?tt(c):Fr({},c):c;switch(u=wr[l],l){case S:case A:return new u(+c);case N:case F:return new u(c);case z:return u(c.source,h.exec(c))}for(o||(o=[]),i||(i=[]),l=o.length;l--;)if(o[l]==n)return i[l];return c=f?u(c.length):{},f&&(ur.call(n,"index")&&(c.index=n.index),ur.call(n,"input")&&(c.input=n.input)),o.push(n),i.push(c),(f?Nr:Dr)(n,function(n,u){c[u]=ut(n,t,e,r,o,i)}),c}function at(n){var t=[];
|
||||
return qr(n,function(n,r){ct(n)&&t.push(r)}),t.sort()}function ot(n){for(var t=-1,r=Br(n),e=r.length,u={};++t<e;){var a=r[t];u[n[a]]=a}return u}function it(n,t,r,e,u,o){var c=r===i;if(typeof r=="function"&&!c){r=a.createCallback(r,e,2);var l=r(n,t);if(typeof l!="undefined")return!!l}if(n===t)return 0!==n||1/n==1/t;var f=typeof n,p=typeof t;if(n===n&&(!n||"function"!=f&&"object"!=f)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=lr.call(n),f=lr.call(t),p==O&&(p=P),f==O&&(f=P),p!=f)return!1;
|
||||
switch(p){case S:case A:return+n==+t;case N:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case z:case F:return n==Jt(t)}if(f=p==E,!f){if(ur.call(n,"__wrapped__")||ur.call(t,"__wrapped__"))return it(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(p!=P||!xr.nodeClass&&(W(n)||W(t)))return!1;var p=!xr.argsObject&&et(n)?Gt:n.constructor,s=!xr.argsObject&&et(t)?Gt:t.constructor;if(p!=s&&(!ct(p)||!(p instanceof p&&ct(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;
|
||||
var g=0,l=!0;if(u.push(n),o.push(t),f){if(p=n.length,g=t.length,l=g==n.length,!l&&!c)return l;for(;g--;)if(f=p,s=t[g],c)for(;f--&&!(l=it(n[f],s,r,e,u,o)););else if(!(l=it(n[g],s,r,e,u,o)))break;return l}return qr(t,function(t,a,i){return ur.call(i,a)?(g++,l=ur.call(n,a)&&it(n[a],t,r,e,u,o)):void 0}),l&&!c&&qr(n,function(n,t,r){return ur.call(r,t)?l=-1<--g:void 0}),l}function ct(n){return typeof n=="function"}function lt(n){return!(!n||!q[typeof n])}function ft(n){return typeof n=="number"||lr.call(n)==N
|
||||
}function pt(n){return typeof n=="string"||lr.call(n)==F}function st(n,t,r){var e=arguments,u=0,o=2;if(!lt(n))return n;if(r===i)var c=e[3],l=e[4],f=e[5];else l=[],f=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?c=a.createCallback(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(c=e[--o]);for(;++u<o;)(Ar(e[u])?dt:Dr)(e[u],function(t,r){var e,u,a=t,o=n[r];if(t&&((u=Ar(t))||Rr(t))){for(a=l.length;a--;)if(e=l[a]==t){o=f[a];break}if(!e){var p;c&&(a=c(o,t),p=typeof a!="undefined")&&(o=a),p||(o=u?Ar(o)?o:[]:Rr(o)?o:{}),l.push(t),f.push(o),p||(o=st(o,t,i,c,l,f))
|
||||
}}else c&&(a=c(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[r]=o});return n}function gt(n){for(var t=-1,r=Br(n),e=r.length,u=$t(e);++t<e;)u[t]=n[r[t]];return u}function vt(n,t,r){var e=-1,u=Q(),a=n?n.length:0,o=!1;return r=(0>r?yr(0,a+r):r)||0,a&&typeof a=="number"?o=-1<(pt(n)?n.indexOf(t,r):u(n,t,r)):Nr(n,function(n){return++e<r?void 0:!(o=n===t)}),o}function ht(n,t,r){var e=!0;if(t=a.createCallback(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Nr(n,function(n,r,u){return e=!!t(n,r,u)
|
||||
});return e}function yt(n,t,r){var e=[];if(t=a.createCallback(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Nr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function mt(n,t,r){if(t=a.createCallback(t,r),!Ar(n)){var e;return Nr(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}r=-1;for(var u=n.length;++r<u;){var o=n[r];if(t(o,r,n))return o}}function dt(n,t,r){if(t&&typeof r=="undefined"&&Ar(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else Nr(n,t,r);
|
||||
return n}function bt(n,t,r){var e=-1,u=n?n.length:0,o=$t(typeof u=="number"?u:0);if(t=a.createCallback(t,r),Ar(n))for(;++e<u;)o[e]=t(n[e],e,n);else Nr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function _t(n,t,r){var e=-1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&pt(n)?L:a.createCallback(t,r),Nr(n,function(n,r,a){r=t(n,r,a),r>e&&(e=r,u=n)});return u}function Ct(n,t,r,e){var u=3>arguments.length;if(t=a.createCallback(t,e,4),Ar(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)
|
||||
}else Nr(n,function(n,e,a){r=u?(u=!1,n):t(r,n,e,a)});return r}function jt(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var c=Br(n),o=c.length;else xr.unindexedChars&&pt(n)&&(u=n.split(""));return t=a.createCallback(t,e,4),dt(n,function(n,e,a){e=c?c[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function wt(n,t,r){var e;if(t=a.createCallback(t,r),Ar(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Nr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function kt(n){for(var t=-1,r=n?n.length:0,e=nr.apply(Mt,_r.call(arguments,1)),e=J(e).contains,u=[];++t<r;){var a=n[t];
|
||||
e(a)||u.push(a)}return u}function xt(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];return tt(n,0,mr(yr(0,e),u))}}function Ot(n,t,r){if(typeof r=="number"){var e=n?n.length:0;r=0>r?yr(0,e+r):r||0}else if(r)return r=St(n,t),n[r]===t?r:-1;return n?T(n,t,r):-1}function Et(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,r);++u<o&&t(n[u],u,n);)e++
|
||||
}else e=null==t||r?1:yr(0,t);return tt(n,e)}function St(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?a.createCallback(r,e,1):Pt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function At(n){for(var t=-1,r=n?_t(Tr(n,"length")):0,e=$t(0>r?0:r);++t<r;)e[t]=Tr(n,t);return e}function It(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var a=n[r];t?u[a]=t[r]:u[a[0]]=a[1]}return u}function Bt(n,t){return xr.fastBind||fr&&2<arguments.length?fr.call.apply(fr,arguments):H(n,t,_r.call(arguments,2))}function Nt(n){var t=_r.call(arguments,1);
|
||||
return cr(function(){n.apply(r,t)},1)}function Pt(n){return n}function zt(n){dt(at(n),function(t){var r=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return ar.apply(t,arguments),t=r.apply(a,t),n&&typeof n=="object"&&n==t?this:new X(t)}})}function Ft(){return this.__wrapped__}e=e?R.defaults(n.Object(),e,R.pick(n,w)):n;var $t=e.Array,qt=e.Boolean,Dt=e.Date,Rt=e.Function,Tt=e.Math,Lt=e.Number,Gt=e.Object,Ht=e.RegExp,Jt=e.String,Kt=e.TypeError,Mt=$t.prototype,Ut=e.Error.prototype,Vt=Gt.prototype,Qt=Jt.prototype,Wt=e._,Xt=Ht("^"+Jt(Vt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Yt=Tt.ceil,Zt=e.clearTimeout,nr=Mt.concat,tr=Tt.floor,rr=Rt.prototype.toString,er=Xt.test(er=Gt.getPrototypeOf)&&er,ur=Vt.hasOwnProperty,ar=Mt.push,or=Vt.propertyIsEnumerable,ir=e.setImmediate,cr=e.setTimeout,lr=Vt.toString,fr=Xt.test(fr=lr.bind)&&fr,pr=Xt.test(pr=Gt.create)&&pr,sr=Xt.test(sr=$t.isArray)&&sr,gr=e.isFinite,vr=e.isNaN,hr=Xt.test(hr=Gt.keys)&&hr,yr=Tt.max,mr=Tt.min,dr=e.parseInt,br=Tt.random,_r=Mt.slice,Cr=Xt.test(e.attachEvent),jr=fr&&!/\n|true/.test(fr+Cr),wr={};
|
||||
wr[E]=$t,wr[S]=qt,wr[A]=Dt,wr[B]=Rt,wr[P]=Gt,wr[N]=Lt,wr[z]=Ht,wr[F]=Jt;var kr={};kr[E]=kr[A]=kr[N]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},kr[S]=kr[F]={constructor:!0,toString:!0,valueOf:!0},kr[I]=kr[B]=kr[z]={constructor:!0,toString:!0},kr[P]={constructor:!0},function(){for(var n=x.length;n--;){var t,r=x[n];for(t in kr)ur.call(kr,t)&&!ur.call(kr[t],r)&&(kr[t][r]=!1)}}();var xr=a.support={};!function(){var n=function(){this.x=1},t={0:1,length:1},r=[];n.prototype={valueOf:1,y:1};
|
||||
for(var e in new n)r.push(e);for(e in arguments);xr.argsObject=arguments.constructor==Gt&&!(arguments instanceof $t),xr.argsClass=et(arguments),xr.enumErrorProps=or.call(Ut,"message")||or.call(Ut,"name"),xr.enumPrototypes=or.call(n,"prototype"),xr.fastBind=fr&&!jr,xr.ownLast="x"!=r[0],xr.nonEnumArgs=0!=e,xr.nonEnumShadows=!/valueOf/.test(r),xr.spliceObjects=(Mt.splice.call(t,0,1),!t[0]),xr.unindexedChars="xx"!="x"[0]+Gt("x")[0];try{xr.nodeClass=!(lr.call(document)==P&&!({toString:0}+""))}catch(u){xr.nodeClass=!0
|
||||
}}(1),a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};var Or={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},Er={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},Sr={h:"if(!z[typeof r])return C;"+Er.h,b:!1};pr||(M=function(n){if(lt(n)){Y.prototype=n;
|
||||
var t=new Y;Y.prototype=null}return t||{}}),X.prototype=a.prototype,xr.argsClass||(et=function(n){return n?ur.call(n,"callee"):!1});var Ar=sr||function(n){return n?typeof n=="object"&&lr.call(n)==E:!1},Ir=K({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),Br=hr?function(n){return lt(n)?xr.enumPrototypes&&typeof n=="function"||xr.nonEnumArgs&&n.length&&et(n)?Ir(n):hr(n):[]}:Ir,Nr=K(Er),Pr={"&":"&","<":"<",">":">",'"':""","'":"'"},zr=ot(Pr),Fr=K(Or,{h:Or.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),$r=K(Or),qr=K(Er,Sr,{i:!1}),Dr=K(Er,Sr);
|
||||
ct(/x/)&&(ct=function(n){return typeof n=="function"&&lr.call(n)==B});var Rr=er?function(n){if(!n||lr.call(n)!=P||!xr.argsClass&&et(n))return!1;var t=n.valueOf,r=typeof t=="function"&&(r=er(t))&&er(r);return r?n==r||er(n)==r:nt(n)}:nt,Tr=bt,Lr=Z(function Jr(n,t,r){for(var e=-1,u=n?n.length:0,a=[];++e<u;){var o=n[e];r&&(o=r(o,e,n)),Ar(o)?ar.apply(a,t?o:Jr(o)):a.push(o)}return a}),Gr=Z(function(n,t,r){for(var e=-1,u=Q(),a=n?n.length:0,o=!t&&a>=l,i=[],c=o?J():r?[]:i;++e<a;){var f=n[e],p=r?r(f,e,n):f;
|
||||
(t?e&&c[c.length-1]===p:o?c.contains(p):0<=u(c,p))||((r||o)&&c.push(p),i.push(f))}return i});jr&&u&&typeof ir=="function"&&(Nt=Bt(ir,e));var Hr=8==dr(d+"08")?dr:function(n,t){return dr(pt(n)?n.replace(b,""):n,t||0)};return a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Fr,a.at=function(n){var t=-1,r=nr.apply(Mt,_r.call(arguments,1)),e=r.length,u=$t(e);for(xr.unindexedChars&&pt(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},a.bind=Bt,a.bindAll=function(n){for(var t=1<arguments.length?nr.apply(Mt,_r.call(arguments,1)):at(n),r=-1,e=t.length;++r<e;){var u=t[r];
|
||||
n[u]=Bt(n[u],n)}return n},a.bindKey=function(n,t){return H(n,t,_r.call(arguments,2),i)},a.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},a.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},a.countBy=function(n,t,r){var e={};return t=a.createCallback(t,r),dt(n,function(n,r,u){r=Jt(t(n,r,u)),ur.call(e,r)?e[r]++:e[r]=1}),e},a.createCallback=function(n,t,r){if(null==n)return Pt;
|
||||
var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Br(n);return function(t){for(var r=u.length,e=!1;r--&&(e=it(t[u[r]],n[u[r]],i)););return e}}return typeof t=="undefined"||m&&!m.test(rr.call(n))?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,a){return n.call(t,r,e,u,a)}:function(r,e,u){return n.call(t,r,e,u)}},a.debounce=function(n,t,r){function e(){var t=l&&(!f||1<i);i=c=0,t&&(a=n.apply(o,u))}var u,a,o,i=0,c=null,l=!0;
|
||||
if(!0===r)var f=!0,l=!1;else lt(r)&&(f=r.leading,l="trailing"in r?r.trailing:l);return function(){return u=arguments,o=this,Zt(c),f&&2>++i&&(a=n.apply(o,u)),c=cr(e,t),a}},a.defaults=$r,a.defer=Nt,a.delay=function(n,t){var e=_r.call(arguments,2);return cr(function(){n.apply(r,e)},t)},a.difference=kt,a.filter=yt,a.flatten=Lr,a.forEach=dt,a.forIn=qr,a.forOwn=Dr,a.functions=at,a.groupBy=function(n,t,r){var e={};return t=a.createCallback(t,r),dt(n,function(n,r,u){r=Jt(t(n,r,u)),(ur.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
}),e},a.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return tt(n,0,mr(yr(0,u-e),u))},a.intersection=function(n){var t=arguments,r=t.length,e=J(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var c=n[a];if(!e.contains(c)){var l=r;for(e.push(c);--l;)if(!(u[l]||(u[l]=J(t[l]).contains))(c))continue n;i.push(c)}}return i},a.invert=ot,a.invoke=function(n,t){var r=_r.call(arguments,2),e=-1,u=typeof t=="function",a=n?n.length:0,o=$t(typeof a=="number"?a:0);
|
||||
return dt(n,function(n){o[++e]=(u?t:n[t]).apply(n,r)}),o},a.keys=Br,a.map=bt,a.max=_t,a.memoize=function(n,t){function r(){var e=r.cache,u=c+(t?t.apply(this,arguments):arguments[0]);return ur.call(e,u)?e[u]:e[u]=n.apply(this,arguments)}return r.cache={},r},a.merge=st,a.min=function(n,t,r){var e=1/0,u=e;if(!t&&Ar(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&pt(n)?L:a.createCallback(t,r),Nr(n,function(n,r,a){r=t(n,r,a),r<e&&(e=r,u=n)});return u},a.omit=function(n,t,r){var e=Q(),u=typeof t=="function",o={};
|
||||
if(u)t=a.createCallback(t,r);else var i=nr.apply(Mt,_r.call(arguments,1));return qr(n,function(n,r,a){(u?!t(n,r,a):0>e(i,r))&&(o[r]=n)}),o},a.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},a.pairs=function(n){for(var t=-1,r=Br(n),e=r.length,u=$t(e);++t<e;){var a=r[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return H(n,_r.call(arguments,1))},a.partialRight=function(n){return H(n,_r.call(arguments,1),null,i)},a.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=-1,o=nr.apply(Mt,_r.call(arguments,1)),i=lt(n)?o.length:0;++u<i;){var c=o[u];
|
||||
c in n&&(e[c]=n[c])}else t=a.createCallback(t,r),qr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},a.pluck=Tr,a.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=yr(0,Yt((t-n)/r));for(var u=$t(t);++e<t;)u[e]=n,n+=r;return u},a.reject=function(n,t,r){return t=a.createCallback(t,r),yt(n,function(n,r,e){return!t(n,r,e)})},a.rest=Et,a.shuffle=function(n){var t=-1,r=n?n.length:0,e=$t(typeof r=="number"?r:0);return dt(n,function(n){var r=tr(br()*(++t+1));e[t]=e[r],e[r]=n}),e},a.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=$t(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,r),dt(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(G);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,r){function e(){l=null,f&&(i=new Dt,a=n.apply(o,u))}var u,a,o,i=0,c=!0,l=null,f=!0;return!1===r?c=!1:lt(r)&&(c="leading"in r?r.leading:c,f="trailing"in r?r.trailing:f),function(){var r=new Dt;!l&&!c&&(i=r);var f=t-(r-i);return u=arguments,o=this,0<f?l||(l=cr(e,f)):(Zt(l),l=null,i=r,a=n.apply(o,u)),a}},a.times=function(n,t,r){n=-1<(n=+n)?n:0;
|
||||
var e=-1,u=$t(n);for(t=a.createCallback(t,r,1);++e<n;)u[e]=t(e);return u},a.toArray=function(n){return n&&typeof n.length=="number"?xr.unindexedChars&&pt(n)?n.split(""):tt(n):gt(n)},a.transform=function(n,t,r,e){var u=Ar(n);return t=a.createCallback(t,e,4),null==r&&(u?r=[]:(e=n&&n.constructor,r=M(e&&e.prototype))),(u?Nr:Dr)(n,function(n,e,u){return t(r,n,e,u)}),r},a.union=function(n){return Ar(n)||(arguments[0]=n?_r.call(n):Mt),Gr(nr.apply(Mt,arguments))},a.uniq=Gr,a.unzip=At,a.values=gt,a.where=yt,a.without=function(n){return kt(n,_r.call(arguments,1))
|
||||
},a.wrap=function(n,t){return function(){var r=[n];return ar.apply(r,arguments),t.apply(this,r)}},a.zip=function(n){return n?At(arguments):[]},a.zipObject=It,a.collect=bt,a.drop=Et,a.each=dt,a.extend=Fr,a.methods=at,a.object=It,a.select=yt,a.tail=Et,a.unique=Gr,zt(a),a.chain=a,a.prototype.chain=function(){return this},a.clone=ut,a.cloneDeep=function(n,t,r){return ut(n,!0,t,r)},a.contains=vt,a.escape=function(n){return null==n?"":Jt(n).replace(C,U)},a.every=ht,a.find=mt,a.findIndex=function(n,t,r){var e=-1,u=n?n.length:0;
|
||||
for(t=a.createCallback(t,r);++e<u;)if(t(n[e],e,n))return e;return-1},a.findKey=function(n,t,r){var e;return t=a.createCallback(t,r),Dr(n,function(n,r,u){return t(n,r,u)?(e=r,!1):void 0}),e},a.has=function(n,t){return n?ur.call(n,t):!1},a.identity=Pt,a.indexOf=Ot,a.isArguments=et,a.isArray=Ar,a.isBoolean=function(n){return!0===n||!1===n||lr.call(n)==S},a.isDate=function(n){return n?typeof n=="object"&&lr.call(n)==A:!1},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;
|
||||
if(!n)return t;var r=lr.call(n),e=n.length;return r==E||r==F||(xr.argsClass?r==O:et(n))||r==P&&typeof e=="number"&&ct(n.splice)?!e:(Dr(n,function(){return t=!1}),t)},a.isEqual=it,a.isFinite=function(n){return gr(n)&&!vr(parseFloat(n))},a.isFunction=ct,a.isNaN=function(n){return ft(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=ft,a.isObject=lt,a.isPlainObject=Rr,a.isRegExp=function(n){return!(!n||!q[typeof n])&&lr.call(n)==z},a.isString=pt,a.isUndefined=function(n){return typeof n=="undefined"
|
||||
},a.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?yr(0,e+r):mr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},a.mixin=zt,a.noConflict=function(){return e._=Wt,this},a.parseInt=Hr,a.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=br();return n%1||t%1?n+mr(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+tr(r*(t-n+1))},a.reduce=Ct,a.reduceRight=jt,a.result=function(n,t){var e=n?n[t]:r;return ct(e)?n[t]():e},a.runInContext=t,a.size=function(n){var t=n?n.length:0;
|
||||
return typeof t=="number"?t:Br(n).length},a.some=wt,a.sortedIndex=St,a.template=function(n,t,e){var u=a.templateSettings;n||(n=""),e=$r({},e,u);var o,i=$r({},e.imports,u.imports),u=Br(i),i=gt(i),c=0,l=e.interpolate||_,g="__p+='",l=Ht((e.escape||_).source+"|"+l.source+"|"+(l===y?v:_).source+"|"+(e.evaluate||_).source+"|$","g");n.replace(l,function(t,r,e,u,a,i){return e||(e=u),g+=n.slice(c,i).replace(j,V),r&&(g+="'+__e("+r+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),e&&(g+="'+((__t=("+e+"))==null?'':__t)+'"),c=i+t.length,t
|
||||
}),g+="';\n",l=e=e.variable,l||(e="obj",g="with("+e+"){"+g+"}"),g=(o?g.replace(f,""):g).replace(p,"$1").replace(s,"$1;"),g="function("+e+"){"+(l?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var h=Rt(u,"return "+g).apply(r,i)}catch(m){throw m.source=g,m}return t?h(t):(h.source=g,h)},a.unescape=function(n){return null==n?"":Jt(n).replace(g,rt)},a.uniqueId=function(n){var t=++o;return Jt(null==n?"":n)+t
|
||||
},a.all=ht,a.any=wt,a.detect=mt,a.foldl=Ct,a.foldr=jt,a.include=vt,a.inject=Ct,Dr(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return ar.apply(t,arguments),n.apply(a,t)})}),a.first=xt,a.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return tt(n,yr(0,u-e))}},a.take=xt,a.head=xt,Dr(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return null==t||r&&typeof t!="function"?e:new X(e)})}),a.VERSION="1.2.1",a.prototype.toString=function(){return Jt(this.__wrapped__)},a.prototype.value=Ft,a.prototype.valueOf=Ft,Nr(["join","pop","shift"],function(n){var t=Mt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Nr(["push","reverse","sort","unshift"],function(n){var t=Mt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Nr(["concat","slice","splice"],function(n){var t=Mt[n];a.prototype[n]=function(){return new X(t.apply(this.__wrapped__,arguments))
|
||||
}}),xr.spliceObjects||Nr(["pop","shift","splice"],function(n){var t=Mt[n],r="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new X(e):e}}),a}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},c=+new Date+"",l=75,f=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,g=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/\w*$/,y=/<%=([\s\S]+?)%>/g,m=(m=/\bthis\b/)&&m.test(t)&&m,d=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",b=RegExp("^["+d+"]*0+(?=.$)"),_=/($^)/,C=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Error Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),x="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),O="[object Arguments]",E="[object Array]",S="[object Boolean]",A="[object Date]",I="[object Error]",B="[object Function]",N="[object Number]",P="[object Object]",z="[object RegExp]",F="[object String]",$={};
|
||||
$[B]=!1,$[O]=$[E]=$[S]=$[A]=$[N]=$[P]=$[z]=$[F]=!0;var q={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},D={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},R=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=R, define(function(){return R})):e&&!e.nodeType?u?(u.exports=R)._=R:e._=R:n._=R}(this);
|
||||
29
dist/lodash.js
vendored
29
dist/lodash.js
vendored
@@ -506,8 +506,9 @@
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
isLarge = length >= largeArraySize && lodash.indexOf != indexOf,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
@@ -522,7 +523,7 @@
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
@@ -605,6 +606,19 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
* the `basicIndexOf` function.
|
||||
*
|
||||
* @private
|
||||
* @returns {Function} Returns the "indexOf" function.
|
||||
*/
|
||||
function getIndexOf(array, value, fromIndex) {
|
||||
var result = (result = lodash.indexOf) == indexOf ? basicIndexOf : result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
@@ -1948,7 +1962,8 @@
|
||||
* // => { 'name': 'moe' }
|
||||
*/
|
||||
function omit(object, callback, thisArg) {
|
||||
var isFunc = typeof callback == 'function',
|
||||
var indexOf = getIndexOf(),
|
||||
isFunc = typeof callback == 'function',
|
||||
result = {};
|
||||
|
||||
if (isFunc) {
|
||||
@@ -1959,7 +1974,7 @@
|
||||
forIn(object, function(value, key, object) {
|
||||
if (isFunc
|
||||
? !callback(value, key, object)
|
||||
: basicIndexOf(props, key) < 0
|
||||
: indexOf(props, key) < 0
|
||||
) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -2182,6 +2197,7 @@
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = collection ? collection.length : 0,
|
||||
result = false;
|
||||
|
||||
@@ -2189,7 +2205,7 @@
|
||||
if (length && typeof length == 'number') {
|
||||
result = (isString(collection)
|
||||
? collection.indexOf(target, fromIndex)
|
||||
: basicIndexOf(collection, target, fromIndex)
|
||||
: indexOf(collection, target, fromIndex)
|
||||
) > -1;
|
||||
} else {
|
||||
forOwn(collection, function(value) {
|
||||
@@ -3895,6 +3911,7 @@
|
||||
*/
|
||||
var uniq = overloadWrapper(function(array, isSorted, callback) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize,
|
||||
result = [],
|
||||
@@ -3906,7 +3923,7 @@
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : basicIndexOf(seen, computed) < 0)
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
|
||||
75
dist/lodash.min.js
vendored
75
dist/lodash.min.js
vendored
@@ -4,42 +4,41 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(o){function f(n){if(!n||oe.call(n)!=B)return a;var t=n.valueOf,e=typeof t=="function"&&(e=te(t))&&te(e);return e?n==e||te(n)==e:tt(n)}function P(n,t,e){if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(var r=-1,u=q[typeof n]?ke(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function K(n,t,e){var r;if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function M(n,t,e){var r,u=n,a=u;
|
||||
if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&q[typeof u])for(var c=-1,l=q[typeof u]?ke(u):[],p=l.length;++c<p;)r=l[c],"undefined"==typeof a[r]&&(a[r]=u[r]);return a}function U(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=G.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);for(;++i<f;)if((u=o[i])&&q[typeof u])for(var l=-1,p=q[typeof u]?ke(u):[],s=p.length;++l<s;)r=p[l],a[r]=c?c(a[r],u[r]):u[r];
|
||||
return a}function V(n){var t,e=[];if(!n||!q[typeof n])return e;for(t in n)ee.call(n,t)&&e.push(t);return e}function G(n){return n&&typeof n=="object"&&!_e(n)&&ee.call(n,"__wrapped__")?n:new Z(n)}function H(n,t,e){e=(e||0)-1;for(var r=n.length;++e<r;)if(n[e]===t)return e;return-1}function J(n){return n.charCodeAt(0)}function L(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function Q(n,t,e,r){function u(){var r=arguments,c=o?this:t;
|
||||
return a||(n=t[i]),e.length&&(r=r.length?(r=be.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(c=ct(n.prototype)?fe(n.prototype):{},r=n.apply(c,r),ct(r)?r:c):n.apply(c,r)}var a=ft(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Gt;t=n}return u}function W(n){function t(t){return-1<H(n,t)}function e(t){n.push(t)}function o(n){var t=typeof n;if("boolean"==t||n==u)return y[n];var e=y[t]||(t="object",g),r="number"==t?n:p+n;return"object"==t?e[r]?-1<H(e[r],n):a:!!e[r]}function i(n){var t=typeof n;
|
||||
if("boolean"==t||n==u)y[n]=r;else{var e=y[t]||(t="object",g),a="number"==t?n:p+n;"object"==t?f=(e[a]||(e[a]=[])).push(n)==l:e[a]=r}}n||(n=[]);var f,c=-1,l=n.length,v=l>=s,g={},y={"false":a,"function":a,"null":a,number:{},object:g,string:{},"true":a,undefined:a};if(v){for(;++c<l;)i(n[c]);f&&(v=y=g=u)}return v?{contains:o,push:i}:{contains:t,push:e}}function X(n){return je[n]}function Y(n){return"\\"+D[n]}function Z(n){this.__wrapped__=n}function nt(n){return function(t,r,o,i){return typeof r!="boolean"&&r!=u&&(i=o,o=i&&i[r]===t?e:r,r=a),o!=u&&(o=G.createCallback(o,i)),n(t,r,o,i)
|
||||
}}function tt(n){var t,r;return n&&oe.call(n)==B&&(t=n.constructor,!ft(t)||t instanceof t)?(K(n,function(n,t){r=t}),r===e||ee.call(n,r)):a}function et(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Tt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function rt(n){return we[n]}function ut(n,t,r,o,i,f){var c=n;if(typeof t!="boolean"&&t!=u&&(o=r,r=t,t=a),typeof r=="function"){if(r=typeof o=="undefined"?r:G.createCallback(r,o,1),c=r(c),typeof c!="undefined")return c;c=n}if(o=ct(c)){var l=oe.call(c);
|
||||
if(!T[l])return c;var p=_e(c)}if(!o||!t)return o?p?et(c):U({},c):c;switch(o=me[l],l){case I:case N:return new o(+c);case $:case R:return new o(c);case F:return o(c.source,m.exec(c))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c=p?o(c.length):{},p&&(ee.call(n,"index")&&(c.index=n.index),ee.call(n,"input")&&(c.input=n.input)),i.push(n),f.push(c),(p?mt:P)(n,function(n,u){c[u]=ut(n,t,r,e,i,f)}),c}function at(n){var t=[];return K(n,function(n,e){ft(n)&&t.push(e)}),t.sort()}function ot(n){for(var t=-1,e=ke(n),r=e.length,u={};++t<r;){var a=e[t];
|
||||
u[n[a]]=a}return u}function it(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=G.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=oe.call(n),s=oe.call(t),v==E&&(v=B),s==E&&(s=B),v!=s)return a;switch(v){case I:case N:return+n==+t;case $:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case F:case R:return n==Vt(t)
|
||||
}if(s=v==S,!s){if(ee.call(n,"__wrapped__")||ee.call(t,"__wrapped__"))return it(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=B)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!ft(v)||!(v instanceof v&&ft(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=it(n[s],g,e,o,i,f)););else if(!(p=it(n[y],g,e,o,i,f)))break;
|
||||
return p}return K(t,function(t,r,u){return ee.call(u,r)?(y++,p=ee.call(n,r)&&it(n[r],t,e,o,i,f)):void 0}),p&&!c&&K(n,function(n,t,e){return ee.call(e,t)?p=-1<--y:void 0}),p}function ft(n){return typeof n=="function"}function ct(n){return!(!n||!q[typeof n])}function lt(n){return typeof n=="number"||oe.call(n)==$}function pt(n){return typeof n=="string"||oe.call(n)==R}function st(n,t,e){var r=arguments,u=0,a=2;if(!ct(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=G.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
|
||||
for(;++u<a;)(_e(r[u])?mt:P)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=_e(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?_e(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=st(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function vt(n){for(var t=-1,e=ke(n),r=e.length,u=Tt(r);++t<r;)u[t]=n[e[t]];return u}function gt(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ve(0,u+e):e)||0,u&&typeof u=="number"?o=-1<(pt(n)?n.indexOf(t,e):H(n,t,e)):P(n,function(n){return++r<e?void 0:!(o=n===t)
|
||||
}),o}function yt(n,t,e){var u=r;t=G.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else P(n,function(n,e,r){return u=!!t(n,e,r)});return u}function ht(n,t,e){var r=[];t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else P(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function bt(n,t,e){t=G.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return P(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0
|
||||
}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function mt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:G.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else P(n,t);return n}function dt(n,t,e){var r=-1,u=n?n.length:0;if(t=G.createCallback(t,e),typeof u=="number")for(var a=Tt(u);++r<u;)a[r]=t(n[r],r,n);else a=[],P(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function _t(n,t,e){var r=-1/0,u=r;if(!t&&_e(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
|
||||
}}else t=!t&&pt(n)?J:G.createCallback(t,e),mt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function kt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Tt(r);++e<r;)u[e]=n[e][t];return u||dt(n,t)}function jt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=G.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else P(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function wt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;
|
||||
if(typeof u!="number")var i=ke(n),u=i.length;return t=G.createCallback(t,r,4),mt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function Ct(n,t,e){var r;t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else P(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function xt(n){for(var t=-1,e=n?n.length:0,r=Yt.apply(Ht,be.call(arguments,1)),r=W(r).contains,u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u}function Ot(n,t,e){if(n){var r=0,a=n.length;
|
||||
if(typeof t!="number"&&t!=u){var o=-1;for(t=G.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return et(n,0,ge(ve(0,r),a))}}function Et(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=G.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ve(0,t);return et(n,r)}function St(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?G.createCallback(e,r,1):Bt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function It(n){for(var t=-1,e=n?_t(kt(n,"length")):0,r=Tt(0>e?0:e);++t<e;)r[t]=kt(n,t);
|
||||
return r}function Nt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function At(n,t){return de.fastBind||ie&&2<arguments.length?ie.call.apply(ie,arguments):Q(n,t,be.call(arguments,2))}function $t(n){var t=be.call(arguments,1);return ae(function(){n.apply(e,t)},1)}function Bt(n){return n}function Ft(n){mt(at(n),function(t){var e=G[t]=n[t];G.prototype[t]=function(){var n=this.__wrapped__,t=[n];return re.apply(t,arguments),t=e.apply(G,t),n&&typeof n=="object"&&n==t?this:new Z(t)
|
||||
}})}function Rt(){return this.__wrapped__}o=o?z.defaults(n.Object(),o,z.pick(n,O)):n;var Tt=o.Array,qt=o.Boolean,Dt=o.Date,zt=o.Function,Pt=o.Math,Kt=o.Number,Mt=o.Object,Ut=o.RegExp,Vt=o.String,Gt=o.TypeError,Ht=Tt.prototype,Jt=Mt.prototype,Lt=o._,Qt=Ut("^"+Vt(Jt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Wt=Pt.ceil,Xt=o.clearTimeout,Yt=Ht.concat,Zt=Pt.floor,ne=zt.prototype.toString,te=Qt.test(te=Mt.getPrototypeOf)&&te,ee=Jt.hasOwnProperty,re=Ht.push,ue=o.setImmediate,ae=o.setTimeout,oe=Jt.toString,ie=Qt.test(ie=oe.bind)&&ie,fe=Qt.test(fe=Mt.create)&&fe,ce=Qt.test(ce=Tt.isArray)&&ce,le=o.isFinite,pe=o.isNaN,se=Qt.test(se=Mt.keys)&&se,ve=Pt.max,ge=Pt.min,ye=o.parseInt,he=Pt.random,be=Ht.slice,Pt=Qt.test(o.attachEvent),Pt=ie&&!/\n|true/.test(ie+Pt),me={};
|
||||
me[S]=Tt,me[I]=qt,me[N]=Dt,me[A]=zt,me[B]=Mt,me[$]=Kt,me[F]=Ut,me[R]=Vt;var de=G.support={};de.fastBind=ie&&!Pt,G.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:G}},Z.prototype=G.prototype;var _e=ce,ke=se?function(n){return ct(n)?se(n):[]}:V,je={"&":"&","<":"<",">":">",'"':""","'":"'"},we=ot(je),qt=nt(function xe(n,t,e){for(var r=-1,u=n?n.length:0,a=[];++r<u;){var o=n[r];e&&(o=e(o,r,n)),_e(o)?re.apply(a,t?o:xe(o)):a.push(o)
|
||||
}return a}),Ce=nt(function(n,t,e){for(var r=-1,u=n?n.length:0,a=!t&&u>=s,o=[],i=a?W():e?[]:o;++r<u;){var f=n[r],c=e?e(f,r,n):f;(t?r&&i[i.length-1]===c:a?i.contains(c):0<=H(i,c))||((e||a)&&i.push(c),o.push(f))}return o});return Pt&&i&&typeof ue=="function"&&($t=At(ue,o)),ue=8==ye(k+"08")?ye:function(n,t){return ye(pt(n)?n.replace(j,""):n,t||0)},G.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},G.assign=U,G.at=function(n){for(var t=-1,e=Yt.apply(Ht,be.call(arguments,1)),r=e.length,u=Tt(r);++t<r;)u[t]=n[e[t]];
|
||||
return u},G.bind=At,G.bindAll=function(n){for(var t=1<arguments.length?Yt.apply(Ht,be.call(arguments,1)):at(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=At(n[u],n)}return n},G.bindKey=function(n,t){return Q(n,t,be.call(arguments,2),l)},G.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},G.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},G.countBy=function(n,t,e){var r={};return t=G.createCallback(t,e),mt(n,function(n,e,u){e=Vt(t(n,e,u)),ee.call(r,e)?r[e]++:r[e]=1
|
||||
}),r},G.createCallback=function(n,t,e){if(n==u)return Bt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=ke(n);return function(t){for(var e=o.length,r=a;e--&&(r=it(t[o[e]],n[o[e]],l)););return r}}return typeof t=="undefined"||_&&!_.test(ne.call(n))?n:1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}},G.debounce=function(n,t,e){function o(){var t=s&&(!v||1<l);
|
||||
l=p=0,t&&(f=n.apply(c,i))}var i,f,c,l=0,p=u,s=r;if(e===r)var v=r,s=a;else ct(e)&&(v=e.leading,s="trailing"in e?e.trailing:s);return function(){return i=arguments,c=this,Xt(p),v&&2>++l&&(f=n.apply(c,i)),p=ae(o,t),f}},G.defaults=M,G.defer=$t,G.delay=function(n,t){var r=be.call(arguments,2);return ae(function(){n.apply(e,r)},t)},G.difference=xt,G.filter=ht,G.flatten=qt,G.forEach=mt,G.forIn=K,G.forOwn=P,G.functions=at,G.groupBy=function(n,t,e){var r={};return t=G.createCallback(t,e),mt(n,function(n,e,u){e=Vt(t(n,e,u)),(ee.call(r,e)?r[e]:r[e]=[]).push(n)
|
||||
}),r},G.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return et(n,0,ge(ve(0,a-r),a))},G.intersection=function(n){var t=arguments,e=t.length,r=W(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var f=n[a];if(!r.contains(f)){var c=e;for(r.push(f);--c;)if(!(u[c]||(u[c]=W(t[c]).contains))(f))continue n;i.push(f)}}return i},G.invert=ot,G.invoke=function(n,t){var e=be.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Tt(typeof a=="number"?a:0);
|
||||
return mt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},G.keys=ke,G.map=dt,G.max=_t,G.memoize=function(n,t){function e(){var r=e.cache,u=p+(t?t.apply(this,arguments):arguments[0]);return ee.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}return e.cache={},e},G.merge=st,G.min=function(n,t,e){var r=1/0,u=r;if(!t&&_e(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&pt(n)?J:G.createCallback(t,e),mt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},G.omit=function(n,t,e){var r=typeof t=="function",u={};
|
||||
if(r)t=G.createCallback(t,e);else var a=Yt.apply(Ht,be.call(arguments,1));return K(n,function(n,e,o){(r?!t(n,e,o):0>H(a,e))&&(u[e]=n)}),u},G.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)}},G.pairs=function(n){for(var t=-1,e=ke(n),r=e.length,u=Tt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},G.partial=function(n){return Q(n,be.call(arguments,1))},G.partialRight=function(n){return Q(n,be.call(arguments,1),u,l)},G.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=Yt.apply(Ht,be.call(arguments,1)),o=ct(n)?a.length:0;++u<o;){var i=a[u];
|
||||
i in n&&(r[i]=n[i])}else t=G.createCallback(t,e),K(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},G.pluck=kt,G.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);var r=-1;t=ve(0,Wt((t-n)/e));for(var a=Tt(t);++r<t;)a[r]=n,n+=e;return a},G.reject=function(n,t,e){return t=G.createCallback(t,e),ht(n,function(n,e,r){return!t(n,e,r)})},G.rest=Et,G.shuffle=function(n){var t=-1,e=n?n.length:0,r=Tt(typeof e=="number"?e:0);return mt(n,function(n){var e=Zt(he()*(++t+1));r[t]=r[e],r[e]=n}),r},G.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Tt(typeof u=="number"?u:0);
|
||||
for(t=G.createCallback(t,e),mt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(L);u--;)a[u]=a[u].c;return a},G.tap=function(n,t){return t(n),n},G.throttle=function(n,t,e){function o(){s=u,v&&(l=new Dt,f=n.apply(c,i))}var i,f,c,l=0,p=r,s=u,v=r;return e===a?p=a:ct(e)&&(p="leading"in e?e.leading:p,v="trailing"in e?e.trailing:v),function(){var e=new Dt;!s&&!p&&(l=e);var r=t-(e-l);return i=arguments,c=this,0<r?s||(s=ae(o,r)):(Xt(s),s=u,l=e,f=n.apply(c,i)),f}},G.times=function(n,t,e){n=-1<(n=+n)?n:0;
|
||||
var r=-1,u=Tt(n);for(t=G.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},G.toArray=function(n){return n&&typeof n.length=="number"?et(n):vt(n)},G.transform=function(n,t,e,r){var a=_e(n);return t=G.createCallback(t,r,4),e==u&&(a?e=[]:(r=n&&n.constructor,e=ct(r&&r.prototype)?fe(r&&r.prototype):{})),(a?mt:P)(n,function(n,r,u){return t(e,n,r,u)}),e},G.union=function(n){return _e(n)||(arguments[0]=n?be.call(n):Ht),Ce(Yt.apply(Ht,arguments))},G.uniq=Ce,G.unzip=It,G.values=vt,G.where=ht,G.without=function(n){return xt(n,be.call(arguments,1))
|
||||
},G.wrap=function(n,t){return function(){var e=[n];return re.apply(e,arguments),t.apply(this,e)}},G.zip=function(n){return n?It(arguments):[]},G.zipObject=Nt,G.collect=dt,G.drop=Et,G.each=mt,G.extend=U,G.methods=at,G.object=Nt,G.select=ht,G.tail=Et,G.unique=Ce,Ft(G),G.chain=G,G.prototype.chain=function(){return this},G.clone=ut,G.cloneDeep=function(n,t,e){return ut(n,r,t,e)},G.contains=gt,G.escape=function(n){return n==u?"":Vt(n).replace(C,X)},G.every=yt,G.find=bt,G.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=G.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},G.findKey=function(n,t,e){var r;return t=G.createCallback(t,e),P(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},G.has=function(n,t){return n?ee.call(n,t):a},G.identity=Bt,G.indexOf=function(n,t,e){if(typeof e=="number"){var r=n?n.length:0;e=0>e?ve(0,r+e):e||0}else if(e)return e=St(n,t),n[e]===t?e:-1;return n?H(n,t,e):-1},G.isArguments=function(n){return oe.call(n)==E},G.isArray=_e,G.isBoolean=function(n){return n===r||n===a||oe.call(n)==I
|
||||
},G.isDate=function(n){return n?typeof n=="object"&&oe.call(n)==N:a},G.isElement=function(n){return n?1===n.nodeType:a},G.isEmpty=function(n){var t=r;if(!n)return t;var e=oe.call(n),u=n.length;return e==S||e==R||e==E||e==B&&typeof u=="number"&&ft(n.splice)?!u:(P(n,function(){return t=a}),t)},G.isEqual=it,G.isFinite=function(n){return le(n)&&!pe(parseFloat(n))},G.isFunction=ft,G.isNaN=function(n){return lt(n)&&n!=+n},G.isNull=function(n){return n===u},G.isNumber=lt,G.isObject=ct,G.isPlainObject=f,G.isRegExp=function(n){return n?typeof n=="object"&&oe.call(n)==F:a
|
||||
},G.isString=pt,G.isUndefined=function(n){return typeof n=="undefined"},G.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ve(0,r+e):ge(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},G.mixin=Ft,G.noConflict=function(){return o._=Lt,this},G.parseInt=ue,G.random=function(n,t){n==u&&t==u&&(t=1),n=+n||0,t==u?(t=n,n=0):t=+t||0;var e=he();return n%1||t%1?n+ge(e*(t-n+parseFloat("1e-"+((e+"").length-1))),t):n+Zt(e*(t-n+1))},G.reduce=jt,G.reduceRight=wt,G.result=function(n,t){var r=n?n[t]:e;
|
||||
return ft(r)?n[t]():r},G.runInContext=t,G.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ke(n).length},G.some=Ct,G.sortedIndex=St,G.template=function(n,t,u){var a=G.templateSettings;n||(n=""),u=M({},u,a);var o,i=M({},u.imports,a.imports),a=ke(i),i=vt(i),f=0,c=u.interpolate||w,l="__p+='",c=Ut((u.escape||w).source+"|"+c.source+"|"+(c===d?b:w).source+"|"+(u.evaluate||w).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(x,Y),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=zt(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},G.unescape=function(n){return n==u?"":Vt(n).replace(h,rt)},G.uniqueId=function(n){var t=++c;return Vt(n==u?"":n)+t
|
||||
},G.all=yt,G.any=Ct,G.detect=bt,G.foldl=jt,G.foldr=wt,G.include=gt,G.inject=jt,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(){var t=[this.__wrapped__];return re.apply(t,arguments),n.apply(G,t)})}),G.first=Ot,G.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return et(n,ve(0,a-r))}},G.take=Ot,G.head=Ot,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return t==u||e&&typeof t!="function"?r:new Z(r)})}),G.VERSION="1.2.1",G.prototype.toString=function(){return Vt(this.__wrapped__)},G.prototype.value=Rt,G.prototype.valueOf=Rt,mt(["join","pop","shift"],function(n){var t=Ht[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),mt(["push","reverse","sort","unshift"],function(n){var t=Ht[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),mt(["concat","slice","splice"],function(n){var t=Ht[n];G.prototype[n]=function(){return new Z(t.apply(this.__wrapped__,arguments))
|
||||
}}),G}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=75,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,d=/<%=([\s\S]+?)%>/g,_=(_=/\bthis\b/)&&_.test(t)&&_,k=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=RegExp("^["+k+"]*0+(?=.$)"),w=/($^)/,C=/[&<>"']/g,x=/['\n\r\t\u2028\u2029\\]/g,O="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),E="[object Arguments]",S="[object Array]",I="[object Boolean]",N="[object Date]",A="[object Function]",$="[object Number]",B="[object Object]",F="[object RegExp]",R="[object String]",T={};
|
||||
;!function(n){function t(o){function f(n){if(!n||fe.call(n)!=B)return a;var t=n.valueOf,e=typeof t=="function"&&(e=re(t))&&re(e);return e?n==e||re(n)==e:et(n)}function P(n,t,e){if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(var r=-1,u=q[typeof n]?xe(n):[],o=u.length;++r<o&&(e=u[r],!(t(n[e],e,n)===a)););return n}function K(n,t,e){var r;if(!n||!q[typeof n])return n;t=t&&typeof e=="undefined"?t:G.createCallback(t,e);for(r in n)if(t(n[r],r,n)===a)break;return n}function M(n,t,e){var r,u=n,a=u;
|
||||
if(!u)return a;for(var o=arguments,i=0,f=typeof e=="number"?2:o.length;++i<f;)if((u=o[i])&&q[typeof u])for(var c=-1,l=q[typeof u]?xe(u):[],p=l.length;++c<p;)r=l[c],"undefined"==typeof a[r]&&(a[r]=u[r]);return a}function U(n,t,e){var r,u=n,a=u;if(!u)return a;var o=arguments,i=0,f=typeof e=="number"?2:o.length;if(3<f&&"function"==typeof o[f-2])var c=G.createCallback(o[--f-1],o[f--],2);else 2<f&&"function"==typeof o[f-1]&&(c=o[--f]);for(;++i<f;)if((u=o[i])&&q[typeof u])for(var l=-1,p=q[typeof u]?xe(u):[],s=p.length;++l<s;)r=p[l],a[r]=c?c(a[r],u[r]):u[r];
|
||||
return a}function V(n){var t,e=[];if(!n||!q[typeof n])return e;for(t in n)ue.call(n,t)&&e.push(t);return e}function G(n){return n&&typeof n=="object"&&!Ce(n)&&ue.call(n,"__wrapped__")?n:new nt(n)}function H(n,t,e){e=(e||0)-1;for(var r=n.length;++e<r;)if(n[e]===t)return e;return-1}function J(n){return n.charCodeAt(0)}function L(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function Q(n,t,e,r){function u(){var r=arguments,c=o?this:t;
|
||||
return a||(n=t[i]),e.length&&(r=r.length?(r=de.call(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(c=lt(n.prototype)?le(n.prototype):{},r=n.apply(c,r),lt(r)?r:c):n.apply(c,r)}var a=ct(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Jt;t=n}return u}function W(n){function t(t){return-1<l(n,t)}function e(t){n.push(t)}function o(n){var t=typeof n;if("boolean"==t||n==u)return h[n];var e=h[t]||(t="object",y),r="number"==t?n:p+n;return"object"==t?e[r]?-1<H(e[r],n):a:!!e[r]}function i(n){var t=typeof n;
|
||||
if("boolean"==t||n==u)h[n]=r;else{var e=h[t]||(t="object",y),a="number"==t?n:p+n;"object"==t?f=(e[a]||(e[a]=[])).push(n)==v:e[a]=r}}n||(n=[]);var f,c=-1,l=Z(),v=n.length,g=v>=s&&G.indexOf!=l,y={},h={"false":a,"function":a,"null":a,number:{},object:y,string:{},"true":a,undefined:a};if(g){for(;++c<v;)i(n[c]);f&&(g=h=y=u)}return g?{contains:o,push:i}:{contains:t,push:e}}function X(n){return Oe[n]}function Y(n){return"\\"+D[n]}function Z(){var n=(n=G.indexOf)==St?H:n;return n}function nt(n){this.__wrapped__=n
|
||||
}function tt(n){return function(t,r,o,i){return typeof r!="boolean"&&r!=u&&(i=o,o=i&&i[r]===t?e:r,r=a),o!=u&&(o=G.createCallback(o,i)),n(t,r,o,i)}}function et(n){var t,r;return n&&fe.call(n)==B&&(t=n.constructor,!ct(t)||t instanceof t)?(K(n,function(n,t){r=t}),r===e||ue.call(n,r)):a}function rt(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=Dt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function ut(n){return Ee[n]}function at(n,t,r,o,i,f){var c=n;if(typeof t!="boolean"&&t!=u&&(o=r,r=t,t=a),typeof r=="function"){if(r=typeof o=="undefined"?r:G.createCallback(r,o,1),c=r(c),typeof c!="undefined")return c;
|
||||
c=n}if(o=lt(c)){var l=fe.call(c);if(!T[l])return c;var p=Ce(c)}if(!o||!t)return o?p?rt(c):U({},c):c;switch(o=je[l],l){case I:case N:return new o(+c);case $:case R:return new o(c);case F:return o(c.source,m.exec(c))}for(i||(i=[]),f||(f=[]),l=i.length;l--;)if(i[l]==n)return f[l];return c=p?o(c.length):{},p&&(ue.call(n,"index")&&(c.index=n.index),ue.call(n,"input")&&(c.input=n.input)),i.push(n),f.push(c),(p?dt:P)(n,function(n,u){c[u]=at(n,t,r,e,i,f)}),c}function ot(n){var t=[];return K(n,function(n,e){ct(n)&&t.push(e)
|
||||
}),t.sort()}function it(n){for(var t=-1,e=xe(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function ft(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=G.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=fe.call(n),s=fe.call(t),v==E&&(v=B),s==E&&(s=B),v!=s)return a;switch(v){case I:case N:return+n==+t;
|
||||
case $:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case F:case R:return n==Ht(t)}if(s=v==S,!s){if(ue.call(n,"__wrapped__")||ue.call(t,"__wrapped__"))return ft(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=B)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!ct(v)||!(v instanceof v&&ct(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var y=0,p=r;if(i.push(n),f.push(t),s){if(v=n.length,y=t.length,p=y==n.length,!p&&!c)return p;for(;y--;)if(s=v,g=t[y],c)for(;s--&&!(p=ft(n[s],g,e,o,i,f)););else if(!(p=ft(n[y],g,e,o,i,f)))break;
|
||||
return p}return K(t,function(t,r,u){return ue.call(u,r)?(y++,p=ue.call(n,r)&&ft(n[r],t,e,o,i,f)):void 0}),p&&!c&&K(n,function(n,t,e){return ue.call(e,t)?p=-1<--y:void 0}),p}function ct(n){return typeof n=="function"}function lt(n){return!(!n||!q[typeof n])}function pt(n){return typeof n=="number"||fe.call(n)==$}function st(n){return typeof n=="string"||fe.call(n)==R}function vt(n,t,e){var r=arguments,u=0,a=2;if(!lt(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=G.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
|
||||
for(;++u<a;)(Ce(r[u])?dt:P)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=Ce(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s;o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),s||(p=u?Ce(p)?p:[]:f(p)?p:{}),i.push(t),c.push(p),s||(p=vt(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function gt(n){for(var t=-1,e=xe(n),r=e.length,u=Dt(r);++t<r;)u[t]=n[e[t]];return u}function yt(n,t,e){var r=-1,u=Z(),o=n?n.length:0,i=a;
|
||||
return e=(0>e?ye(0,o+e):e)||0,o&&typeof o=="number"?i=-1<(st(n)?n.indexOf(t,e):u(n,t,e)):P(n,function(n){return++r<e?void 0:!(i=n===t)}),i}function ht(n,t,e){var u=r;t=G.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else P(n,function(n,e,r){return u=!!t(n,e,r)});return u}function bt(n,t,e){var r=[];t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else P(n,function(n,e,u){t(n,e,u)&&r.push(n)
|
||||
});return r}function mt(n,t,e){t=G.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return P(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function dt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:G.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else P(n,t);return n}function _t(n,t,e){var r=-1,u=n?n.length:0;if(t=G.createCallback(t,e),typeof u=="number")for(var a=Dt(u);++r<u;)a[r]=t(n[r],r,n);
|
||||
else a=[],P(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function kt(n,t,e){var r=-1/0,u=r;if(!t&&Ce(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)}}else t=!t&&st(n)?J:G.createCallback(t,e),dt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function jt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=Dt(r);++e<r;)u[e]=n[e][t];return u||_t(n,t)}function wt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=G.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);
|
||||
else P(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function Ct(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=xe(n),u=i.length;return t=G.createCallback(t,r,4),dt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function xt(n,t,e){var r;t=G.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else P(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function Ot(n){for(var t=-1,e=n?n.length:0,r=ne.apply(Lt,de.call(arguments,1)),r=W(r).contains,u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u}function Et(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=-1;for(t=G.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return rt(n,0,he(ye(0,r),a))}}function St(n,t,e){if(typeof e=="number"){var r=n?n.length:0;e=0>e?ye(0,r+e):e||0}else if(e)return e=Nt(n,t),n[e]===t?e:-1;return n?H(n,t,e):-1}function It(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=G.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ye(0,t);
|
||||
return rt(n,r)}function Nt(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?G.createCallback(e,r,1):Rt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function At(n){for(var t=-1,e=n?kt(jt(n,"length")):0,r=Dt(0>e?0:e);++t<e;)r[t]=jt(n,t);return r}function $t(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 Bt(n,t){return we.fastBind||ce&&2<arguments.length?ce.call.apply(ce,arguments):Q(n,t,de.call(arguments,2))}function Ft(n){var t=de.call(arguments,1);
|
||||
return ie(function(){n.apply(e,t)},1)}function Rt(n){return n}function Tt(n){dt(ot(n),function(t){var e=G[t]=n[t];G.prototype[t]=function(){var n=this.__wrapped__,t=[n];return ae.apply(t,arguments),t=e.apply(G,t),n&&typeof n=="object"&&n==t?this:new nt(t)}})}function qt(){return this.__wrapped__}o=o?z.defaults(n.Object(),o,z.pick(n,O)):n;var Dt=o.Array,zt=o.Boolean,Pt=o.Date,Kt=o.Function,Mt=o.Math,Ut=o.Number,Vt=o.Object,Gt=o.RegExp,Ht=o.String,Jt=o.TypeError,Lt=Dt.prototype,Qt=Vt.prototype,Wt=o._,Xt=Gt("^"+Ht(Qt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Yt=Mt.ceil,Zt=o.clearTimeout,ne=Lt.concat,te=Mt.floor,ee=Kt.prototype.toString,re=Xt.test(re=Vt.getPrototypeOf)&&re,ue=Qt.hasOwnProperty,ae=Lt.push,oe=o.setImmediate,ie=o.setTimeout,fe=Qt.toString,ce=Xt.test(ce=fe.bind)&&ce,le=Xt.test(le=Vt.create)&&le,pe=Xt.test(pe=Dt.isArray)&&pe,se=o.isFinite,ve=o.isNaN,ge=Xt.test(ge=Vt.keys)&&ge,ye=Mt.max,he=Mt.min,be=o.parseInt,me=Mt.random,de=Lt.slice,_e=Xt.test(o.attachEvent),ke=ce&&!/\n|true/.test(ce+_e),je={};
|
||||
je[S]=Dt,je[I]=zt,je[N]=Pt,je[A]=Kt,je[B]=Vt,je[$]=Ut,je[F]=Gt,je[R]=Ht;var we=G.support={};we.fastBind=ce&&!ke,G.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:G}},nt.prototype=G.prototype;var Ce=pe,xe=ge?function(n){return lt(n)?ge(n):[]}:V,Oe={"&":"&","<":"<",">":">",'"':""","'":"'"},Ee=it(Oe),Se=tt(function Ae(n,t,e){for(var r=-1,u=n?n.length:0,a=[];++r<u;){var o=n[r];e&&(o=e(o,r,n)),Ce(o)?ae.apply(a,t?o:Ae(o)):a.push(o)
|
||||
}return a}),Ie=tt(function(n,t,e){for(var r=-1,u=Z(),a=n?n.length:0,o=!t&&a>=s,i=[],f=o?W():e?[]:i;++r<a;){var c=n[r],l=e?e(c,r,n):c;(t?r&&f[f.length-1]===l:o?f.contains(l):0<=u(f,l))||((e||o)&&f.push(l),i.push(c))}return i});ke&&i&&typeof oe=="function"&&(Ft=Bt(oe,o));var Ne=8==be(k+"08")?be:function(n,t){return be(st(n)?n.replace(j,""):n,t||0)};return G.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},G.assign=U,G.at=function(n){for(var t=-1,e=ne.apply(Lt,de.call(arguments,1)),r=e.length,u=Dt(r);++t<r;)u[t]=n[e[t]];
|
||||
return u},G.bind=Bt,G.bindAll=function(n){for(var t=1<arguments.length?ne.apply(Lt,de.call(arguments,1)):ot(n),e=-1,r=t.length;++e<r;){var u=t[e];n[u]=Bt(n[u],n)}return n},G.bindKey=function(n,t){return Q(n,t,de.call(arguments,2),l)},G.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},G.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},G.countBy=function(n,t,e){var r={};return t=G.createCallback(t,e),dt(n,function(n,e,u){e=Ht(t(n,e,u)),ue.call(r,e)?r[e]++:r[e]=1
|
||||
}),r},G.createCallback=function(n,t,e){if(n==u)return Rt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=xe(n);return function(t){for(var e=o.length,r=a;e--&&(r=ft(t[o[e]],n[o[e]],l)););return r}}return typeof t=="undefined"||_&&!_.test(ee.call(n))?n:1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}},G.debounce=function(n,t,e){function o(){var t=s&&(!v||1<l);
|
||||
l=p=0,t&&(f=n.apply(c,i))}var i,f,c,l=0,p=u,s=r;if(e===r)var v=r,s=a;else lt(e)&&(v=e.leading,s="trailing"in e?e.trailing:s);return function(){return i=arguments,c=this,Zt(p),v&&2>++l&&(f=n.apply(c,i)),p=ie(o,t),f}},G.defaults=M,G.defer=Ft,G.delay=function(n,t){var r=de.call(arguments,2);return ie(function(){n.apply(e,r)},t)},G.difference=Ot,G.filter=bt,G.flatten=Se,G.forEach=dt,G.forIn=K,G.forOwn=P,G.functions=ot,G.groupBy=function(n,t,e){var r={};return t=G.createCallback(t,e),dt(n,function(n,e,u){e=Ht(t(n,e,u)),(ue.call(r,e)?r[e]:r[e]=[]).push(n)
|
||||
}),r},G.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return rt(n,0,he(ye(0,a-r),a))},G.intersection=function(n){var t=arguments,e=t.length,r=W(),u={},a=-1,o=n?n.length:0,i=[];n:for(;++a<o;){var f=n[a];if(!r.contains(f)){var c=e;for(r.push(f);--c;)if(!(u[c]||(u[c]=W(t[c]).contains))(f))continue n;i.push(f)}}return i},G.invert=it,G.invoke=function(n,t){var e=de.call(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Dt(typeof a=="number"?a:0);
|
||||
return dt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},G.keys=xe,G.map=_t,G.max=kt,G.memoize=function(n,t){function e(){var r=e.cache,u=p+(t?t.apply(this,arguments):arguments[0]);return ue.call(r,u)?r[u]:r[u]=n.apply(this,arguments)}return e.cache={},e},G.merge=vt,G.min=function(n,t,e){var r=1/0,u=r;if(!t&&Ce(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&st(n)?J:G.createCallback(t,e),dt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},G.omit=function(n,t,e){var r=Z(),u=typeof t=="function",a={};
|
||||
if(u)t=G.createCallback(t,e);else var o=ne.apply(Lt,de.call(arguments,1));return K(n,function(n,e,i){(u?!t(n,e,i):0>r(o,e))&&(a[e]=n)}),a},G.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)}},G.pairs=function(n){for(var t=-1,e=xe(n),r=e.length,u=Dt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},G.partial=function(n){return Q(n,de.call(arguments,1))},G.partialRight=function(n){return Q(n,de.call(arguments,1),u,l)},G.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=-1,a=ne.apply(Lt,de.call(arguments,1)),o=lt(n)?a.length:0;++u<o;){var i=a[u];
|
||||
i in n&&(r[i]=n[i])}else t=G.createCallback(t,e),K(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},G.pluck=jt,G.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);var r=-1;t=ye(0,Yt((t-n)/e));for(var a=Dt(t);++r<t;)a[r]=n,n+=e;return a},G.reject=function(n,t,e){return t=G.createCallback(t,e),bt(n,function(n,e,r){return!t(n,e,r)})},G.rest=It,G.shuffle=function(n){var t=-1,e=n?n.length:0,r=Dt(typeof e=="number"?e:0);return dt(n,function(n){var e=te(me()*(++t+1));r[t]=r[e],r[e]=n}),r},G.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=Dt(typeof u=="number"?u:0);
|
||||
for(t=G.createCallback(t,e),dt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(L);u--;)a[u]=a[u].c;return a},G.tap=function(n,t){return t(n),n},G.throttle=function(n,t,e){function o(){s=u,v&&(l=new Pt,f=n.apply(c,i))}var i,f,c,l=0,p=r,s=u,v=r;return e===a?p=a:lt(e)&&(p="leading"in e?e.leading:p,v="trailing"in e?e.trailing:v),function(){var e=new Pt;!s&&!p&&(l=e);var r=t-(e-l);return i=arguments,c=this,0<r?s||(s=ie(o,r)):(Zt(s),s=u,l=e,f=n.apply(c,i)),f}},G.times=function(n,t,e){n=-1<(n=+n)?n:0;
|
||||
var r=-1,u=Dt(n);for(t=G.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},G.toArray=function(n){return n&&typeof n.length=="number"?rt(n):gt(n)},G.transform=function(n,t,e,r){var a=Ce(n);return t=G.createCallback(t,r,4),e==u&&(a?e=[]:(r=n&&n.constructor,e=lt(r&&r.prototype)?le(r&&r.prototype):{})),(a?dt:P)(n,function(n,r,u){return t(e,n,r,u)}),e},G.union=function(n){return Ce(n)||(arguments[0]=n?de.call(n):Lt),Ie(ne.apply(Lt,arguments))},G.uniq=Ie,G.unzip=At,G.values=gt,G.where=bt,G.without=function(n){return Ot(n,de.call(arguments,1))
|
||||
},G.wrap=function(n,t){return function(){var e=[n];return ae.apply(e,arguments),t.apply(this,e)}},G.zip=function(n){return n?At(arguments):[]},G.zipObject=$t,G.collect=_t,G.drop=It,G.each=dt,G.extend=U,G.methods=ot,G.object=$t,G.select=bt,G.tail=It,G.unique=Ie,Tt(G),G.chain=G,G.prototype.chain=function(){return this},G.clone=at,G.cloneDeep=function(n,t,e){return at(n,r,t,e)},G.contains=yt,G.escape=function(n){return n==u?"":Ht(n).replace(C,X)},G.every=ht,G.find=mt,G.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;
|
||||
for(t=G.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},G.findKey=function(n,t,e){var r;return t=G.createCallback(t,e),P(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0}),r},G.has=function(n,t){return n?ue.call(n,t):a},G.identity=Rt,G.indexOf=St,G.isArguments=function(n){return fe.call(n)==E},G.isArray=Ce,G.isBoolean=function(n){return n===r||n===a||fe.call(n)==I},G.isDate=function(n){return n?typeof n=="object"&&fe.call(n)==N:a},G.isElement=function(n){return n?1===n.nodeType:a},G.isEmpty=function(n){var t=r;
|
||||
if(!n)return t;var e=fe.call(n),u=n.length;return e==S||e==R||e==E||e==B&&typeof u=="number"&&ct(n.splice)?!u:(P(n,function(){return t=a}),t)},G.isEqual=ft,G.isFinite=function(n){return se(n)&&!ve(parseFloat(n))},G.isFunction=ct,G.isNaN=function(n){return pt(n)&&n!=+n},G.isNull=function(n){return n===u},G.isNumber=pt,G.isObject=lt,G.isPlainObject=f,G.isRegExp=function(n){return n?typeof n=="object"&&fe.call(n)==F:a},G.isString=st,G.isUndefined=function(n){return typeof n=="undefined"},G.lastIndexOf=function(n,t,e){var r=n?n.length:0;
|
||||
for(typeof e=="number"&&(r=(0>e?ye(0,r+e):he(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},G.mixin=Tt,G.noConflict=function(){return o._=Wt,this},G.parseInt=Ne,G.random=function(n,t){n==u&&t==u&&(t=1),n=+n||0,t==u?(t=n,n=0):t=+t||0;var e=me();return n%1||t%1?n+he(e*(t-n+parseFloat("1e-"+((e+"").length-1))),t):n+te(e*(t-n+1))},G.reduce=wt,G.reduceRight=Ct,G.result=function(n,t){var r=n?n[t]:e;return ct(r)?n[t]():r},G.runInContext=t,G.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:xe(n).length
|
||||
},G.some=xt,G.sortedIndex=Nt,G.template=function(n,t,u){var a=G.templateSettings;n||(n=""),u=M({},u,a);var o,i=M({},u.imports,a.imports),a=xe(i),i=gt(i),f=0,c=u.interpolate||w,l="__p+='",c=Gt((u.escape||w).source+"|"+c.source+"|"+(c===d?b:w).source+"|"+(u.evaluate||w).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(x,Y),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(v,""):l).replace(g,"$1").replace(y,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";
|
||||
try{var p=Kt(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},G.unescape=function(n){return n==u?"":Ht(n).replace(h,ut)},G.uniqueId=function(n){var t=++c;return Ht(n==u?"":n)+t},G.all=ht,G.any=xt,G.detect=mt,G.foldl=wt,G.foldr=Ct,G.include=yt,G.inject=wt,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(){var t=[this.__wrapped__];return ae.apply(t,arguments),n.apply(G,t)})}),G.first=Et,G.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;
|
||||
for(t=G.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return rt(n,ye(0,a-r))}},G.take=Et,G.head=Et,P(G,function(n,t){G.prototype[t]||(G.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return t==u||e&&typeof t!="function"?r:new nt(r)})}),G.VERSION="1.2.1",G.prototype.toString=function(){return Ht(this.__wrapped__)},G.prototype.value=qt,G.prototype.valueOf=qt,dt(["join","pop","shift"],function(n){var t=Lt[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),dt(["push","reverse","sort","unshift"],function(n){var t=Lt[n];G.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),dt(["concat","slice","splice"],function(n){var t=Lt[n];G.prototype[n]=function(){return new nt(t.apply(this.__wrapped__,arguments))}}),G}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=75,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,d=/<%=([\s\S]+?)%>/g,_=(_=/\bthis\b/)&&_.test(t)&&_,k=" \t\x0B\f\xa0\ufeff\n\r\u2028\u2029\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000",j=RegExp("^["+k+"]*0+(?=.$)"),w=/($^)/,C=/[&<>"']/g,x=/['\n\r\t\u2028\u2029\\]/g,O="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),E="[object Arguments]",S="[object Array]",I="[object Boolean]",N="[object Date]",A="[object Function]",$="[object Number]",B="[object Object]",F="[object RegExp]",R="[object String]",T={};
|
||||
T[A]=a,T[E]=T[S]=T[I]=T[N]=T[$]=T[B]=T[F]=T[R]=r;var q={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},D={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},z=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=z, define(function(){return z})):o&&!o.nodeType?i?(i.exports=z)._=z:o._=z:n._=z}(this);
|
||||
39
dist/lodash.underscore.js
vendored
39
dist/lodash.underscore.js
vendored
@@ -430,8 +430,9 @@
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
isLarge = length >= largeArraySize && lodash.indexOf != indexOf,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
@@ -446,7 +447,7 @@
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
@@ -540,6 +541,19 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
* the `basicIndexOf` function.
|
||||
*
|
||||
* @private
|
||||
* @returns {Function} Returns the "indexOf" function.
|
||||
*/
|
||||
function getIndexOf(array, value, fromIndex) {
|
||||
var result = (result = lodash.indexOf) == indexOf ? basicIndexOf : result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* A fast path for creating `lodash` wrapper objects.
|
||||
*
|
||||
@@ -1432,11 +1446,12 @@
|
||||
* // => { 'name': 'moe' }
|
||||
*/
|
||||
function omit(object) {
|
||||
var props = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),
|
||||
var indexOf = getIndexOf(),
|
||||
props = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),
|
||||
result = {};
|
||||
|
||||
forIn(object, function(value, key) {
|
||||
if (basicIndexOf(props, key) < 0) {
|
||||
if (indexOf(props, key) < 0) {
|
||||
result[key] = value;
|
||||
}
|
||||
});
|
||||
@@ -1565,10 +1580,11 @@
|
||||
* // => true
|
||||
*/
|
||||
function contains(collection, target) {
|
||||
var length = collection ? collection.length : 0,
|
||||
var indexOf = getIndexOf(),
|
||||
length = collection ? collection.length : 0,
|
||||
result = false;
|
||||
if (length && typeof length == 'number') {
|
||||
result = basicIndexOf(collection, target) > -1;
|
||||
result = indexOf(collection, target) > -1;
|
||||
} else {
|
||||
forOwn(collection, function(value) {
|
||||
return (result = value === target) && indicatorObject;
|
||||
@@ -2596,13 +2612,14 @@
|
||||
*/
|
||||
function difference(array) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array.length,
|
||||
flattened = concat.apply(arrayProto, nativeSlice.call(arguments, 1)),
|
||||
result = [];
|
||||
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (basicIndexOf(flattened, value) < 0) {
|
||||
if (indexOf(flattened, value) < 0) {
|
||||
result.push(value);
|
||||
}
|
||||
}
|
||||
@@ -2873,16 +2890,17 @@
|
||||
var args = arguments,
|
||||
argsLength = args.length,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [];
|
||||
|
||||
outer:
|
||||
while (++index < length) {
|
||||
var value = array[index];
|
||||
if (basicIndexOf(result, value) < 0) {
|
||||
if (indexOf(result, value) < 0) {
|
||||
var argsIndex = argsLength;
|
||||
while (--argsIndex) {
|
||||
if (basicIndexOf(args[argsIndex], value) < 0) {
|
||||
if (indexOf(args[argsIndex], value) < 0) {
|
||||
continue outer;
|
||||
}
|
||||
}
|
||||
@@ -3258,6 +3276,7 @@
|
||||
*/
|
||||
function uniq(array, isSorted, callback, thisArg) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
result = [],
|
||||
seen = result;
|
||||
@@ -3277,7 +3296,7 @@
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: basicIndexOf(seen, computed) < 0
|
||||
: indexOf(seen, computed) < 0
|
||||
) {
|
||||
if (callback) {
|
||||
seen.push(computed);
|
||||
|
||||
57
dist/lodash.underscore.min.js
vendored
57
dist/lodash.underscore.min.js
vendored
@@ -4,31 +4,32 @@
|
||||
* Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;!function(n){function t(n,t){var r;if(n&&ht[typeof n])for(r in n)if(xt.call(n,r)&&t(n[r],r,n)===tt)break}function r(n,t){var r;if(n&&ht[typeof n])for(r in n)if(t(n[r],r,n)===tt)break}function e(n){var t,r=[];if(!n||!ht[typeof n])return r;for(t in n)xt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new p(n)}function o(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function i(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function a(n,t,r){function e(){var c=arguments,l=o?this:t;return u||(n=t[i]),r.length&&(c=c.length?(c=$t.call(c),a?c.concat(r):r.concat(c)):r),this instanceof e?(l=f(n.prototype),c=n.apply(l,c),w(c)?c:l):n.apply(l,c)}var u=j(n),o=!r,i=t;if(o){var a=void 0;r=t}else if(!u)throw new TypeError;return e}function f(n){return w(n)?kt(n):{}}function c(n){return Ut[n]}function l(n){return"\\"+yt[n]}function p(n){this.__wrapped__=n}function s(){}function v(n){return Vt[n]
|
||||
}function g(n){return St.call(n)==at}function h(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]=e[u]}return n}function y(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==L&&(n[u]=e[u])}return n}function m(n){var t=[];return r(n,function(n,r){j(n)&&t.push(r)}),t.sort()}function _(n){for(var t=-1,r=Pt(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function b(n){if(!n)return K;if(Ct(n)||x(n))return!n.length;
|
||||
for(var t in n)if(xt.call(n,t))return Q;return K}function d(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return Q;if(n==L||t==L)return n===t;if(a=St.call(n),i=St.call(t),a!=i)return Q;switch(a){case ct:case lt:return+n==+t;case pt:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case vt:case gt:return n==t+""}if(i=a==ft,!i){if(n instanceof u||t instanceof u)return d(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=st)return Q;
|
||||
var a=n.constructor,f=t.constructor;if(a!=f&&(!j(a)||!(a instanceof a&&j(f)&&f instanceof f)))return Q}for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=K,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=d(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return xt.call(u,r)?(l++,!(c=xt.call(n,r)&&d(n[r],t,e,o))&&tt):void 0}),c&&r(n,function(n,t,r){return xt.call(r,t)?!(c=-1<--l)&&tt:void 0}),c}function j(n){return typeof n=="function"}function w(n){return!(!n||!ht[typeof n])
|
||||
}function A(n){return typeof n=="number"||St.call(n)==pt}function x(n){return typeof n=="string"||St.call(n)==gt}function O(n){for(var t=-1,r=Pt(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function E(n,r){var e=n?n.length:0,u=Q;return e&&typeof e=="number"?u=-1<o(n,r):t(n,function(n){return(u=n===r)&&tt}),u}function S(n,r,e){var u=K;r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&(u=!!r(n[e],e,n)););else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&tt});return u}function N(n,r,e){var u=[];
|
||||
r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o;){var i=n[e];r(i,e,n)&&u.push(i)}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)});return u}function k(n,r,e){r=G(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,tt):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function B(n,r,e){var u=-1,o=n?n.length:0;if(r=r&&typeof e=="undefined"?r:G(r,e),typeof o=="number")for(;++u<o&&r(n[u],u,n)!==tt;);else t(n,r)}function F(n,r,e){var u=-1,o=n?n.length:0;
|
||||
if(r=G(r,e),typeof o=="number")for(var i=Array(o);++u<o;)i[u]=r(n[u],u,n);else i=[],t(n,function(n,t,e){i[++u]=r(n,t,e)});return i}function q(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=G(t,r),B(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r>u&&(u=r);return u}function R(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||F(n,t)}function D(n,r,e,u){if(!n)return e;var o=3>arguments.length;r=G(r,u,4);var i=-1,a=n.length;
|
||||
if(typeof a=="number")for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n);else t(n,function(n,t,u){e=o?(o=Q,n):r(e,n,t,u)});return e}function M(n,t,r,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Pt(n),u=i.length;return t=G(t,e,4),B(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=Q,n[a]):t(r,n[a],a,f)}),r}function T(n,r,e){var u;r=G(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&!(u=r(n[e],e,n)););else t(n,function(n,t,e){return(u=r(n,t,e))&&tt});return!!u}function $(n,t,r){return r&&b(t)?L:(r?k:N)(n,t)
|
||||
}function I(n){for(var t=-1,r=n.length,e=wt.apply(mt,$t.call(arguments,1)),u=[];++t<r;){var i=n[t];0>o(e,i)&&u.push(i)}return u}function z(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&t!=L){var o=-1;for(t=G(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==L||r)return n[0];return $t.call(n,0,Mt(Dt(0,e),u))}}function C(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Ct(o)?Ot.apply(u,t?o:C(o)):u.push(o)}return u}function P(n,t,r){if(typeof t!="number"&&t!=L){var e=0,u=-1,o=n?n.length:0;
|
||||
for(t=G(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==L||r?1:Dt(0,t);return $t.call(n,e)}function U(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?G(r,e,1):H,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function V(n,t,r,e){var u=-1,i=n?n.length:0,a=[],f=a;for(typeof t!="boolean"&&t!=L&&(e=r,r=t,t=Q),r!=L&&(f=[],r=G(r,e));++u<i;){e=n[u];var c=r?r(e,u,n):e;(t?!u||f[f.length-1]!==c:0>o(f,c))&&(r&&f.push(c),a.push(e))}return a}function W(n,t){return zt.fastBind||Nt&&2<arguments.length?Nt.call.apply(Nt,arguments):a(n,t,$t.call(arguments,2))
|
||||
}function G(n,t,r){if(n==L)return H;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Pt(n);return function(t){for(var r=u.length,e=Q;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t=="undefined"?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}}function H(n){return n}function J(n){B(m(n),function(t){var r=u[t]=n[t];u.prototype[t]=function(){var n=[this.__wrapped__];
|
||||
return Ot.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new p(n),n.__chain__=K),n}})}var K=!0,L=null,Q=!1,X=typeof exports=="object"&&exports,Y=typeof module=="object"&&module&&module.exports==X&&module,Z=typeof global=="object"&&global;(Z.global===Z||Z.window===Z)&&(n=Z);var nt=0,tt={},rt=+new Date+"",et=/&(?:amp|lt|gt|quot|#39);/g,ut=/($^)/,ot=/[&<>"']/g,it=/['\n\r\t\u2028\u2029\\]/g,at="[object Arguments]",ft="[object Array]",ct="[object Boolean]",lt="[object Date]",pt="[object Number]",st="[object Object]",vt="[object RegExp]",gt="[object String]",ht={"boolean":Q,"function":K,object:K,number:Q,string:Q,undefined:Q},yt={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},mt=Array.prototype,Z=Object.prototype,_t=n._,bt=RegExp("^"+(Z.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),dt=Math.ceil,jt=n.clearTimeout,wt=mt.concat,At=Math.floor,xt=Z.hasOwnProperty,Ot=mt.push,Et=n.setTimeout,St=Z.toString,Nt=bt.test(Nt=St.bind)&&Nt,kt=bt.test(kt=Object.create)&&kt,Bt=bt.test(Bt=Array.isArray)&&Bt,Ft=n.isFinite,qt=n.isNaN,Rt=bt.test(Rt=Object.keys)&&Rt,Dt=Math.max,Mt=Math.min,Tt=Math.random,$t=mt.slice,Z=bt.test(n.attachEvent),It=Nt&&!/\n|true/.test(Nt+Z),zt={};
|
||||
!function(){var n={0:1,length:1};zt.fastBind=Nt&&!It,zt.spliceObjects=(mt.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},kt||(f=function(n){if(w(n)){s.prototype=n;var t=new s;s.prototype=L}return t||{}}),p.prototype=u.prototype,g(arguments)||(g=function(n){return n?xt.call(n,"callee"):Q});var Ct=Bt||function(n){return n?typeof n=="object"&&St.call(n)==ft:Q},Pt=Rt?function(n){return w(n)?Rt(n):[]}:e,Ut={"&":"&","<":"<",">":">",'"':""","'":"'"},Vt=_(Ut);
|
||||
j(/x/)&&(j=function(n){return typeof n=="function"&&"[object Function]"==St.call(n)}),u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},u.bind=W,u.bindAll=function(n){for(var t=1<arguments.length?wt.apply(mt,$t.call(arguments,1)):m(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=W(n[u],n)}return n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},u.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},u.countBy=function(n,t,r){var e={};return t=G(t,r),B(n,function(n,r,u){r=t(n,r,u)+"",xt.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=L,r||(o=n.apply(i,u))}var u,o,i,a=L;return function(){var f=r&&!a;return u=arguments,i=this,jt(a),a=Et(e,t),f&&(o=n.apply(i,u)),o}},u.defaults=y,u.defer=function(n){var t=$t.call(arguments,1);return Et(function(){n.apply(void 0,t)},1)},u.delay=function(n,t){var r=$t.call(arguments,2);return Et(function(){n.apply(void 0,r)},t)},u.difference=I,u.filter=N,u.flatten=C,u.forEach=B,u.functions=m,u.groupBy=function(n,t,r){var e={};
|
||||
return t=G(t,r),B(n,function(n,r,u){r=t(n,r,u)+"",(xt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},u.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=L){var o=u;for(t=G(t,r);o--&&t(n[o],o,n);)e++}else e=t==L||r?1:t||e;return $t.call(n,0,Mt(Dt(0,u-e),u))},u.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,i=[];n:for(;++e<u;){var a=n[e];if(0>o(i,a)){for(var f=r;--f;)if(0>o(t[f],a))continue n;i.push(a)}}return i},u.invert=_,u.invoke=function(n,t){var r=$t.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
return B(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},u.keys=Pt,u.map=F,u.max=q,u.memoize=function(n,t){var r={};return function(){var e=rt+(t?t.apply(this,arguments):arguments[0]);return xt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},u.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=G(t,r),B(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},u.omit=function(n){var t=wt.apply(mt,$t.call(arguments,1)),e={};return r(n,function(n,r){0>o(t,r)&&(e[r]=n)
|
||||
}),e},u.once=function(n){var t,r;return function(){return t?r:(t=K,r=n.apply(this,arguments),n=L,r)}},u.pairs=function(n){for(var t=-1,r=Pt(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){return a(n,$t.call(arguments,1))},u.pick=function(n){for(var t=-1,r=wt.apply(mt,$t.call(arguments,1)),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},u.pluck=R,u.range=function(n,t,r){n=+n||0,r=+r||1,t==L&&(t=n,n=0);var e=-1;t=Dt(0,dt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},u.reject=function(n,t,r){return t=G(t,r),N(n,function(n,r,e){return!t(n,r,e)})},u.rest=P,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return B(n,function(n){var r=At(Tt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=Array(typeof u=="number"?u:0);for(t=G(t,r),B(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(i);u--;)o[u]=o[u].c;return o},u.tap=function(n,t){return t(n),n},u.throttle=function(n,t){function r(){i=new Date,a=L,u=n.apply(o,e)
|
||||
}var e,u,o,i=0,a=L;return function(){var f=new Date,c=t-(f-i);return e=arguments,o=this,0<c?a||(a=Et(r,c)):(jt(a),a=L,i=f,u=n.apply(o,e)),u}},u.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},u.toArray=function(n){return Ct(n)?$t.call(n):n&&typeof n.length=="number"?F(n):O(n)},u.union=function(n){return Ct(n)||(arguments[0]=n?$t.call(n):mt),V(wt.apply(mt,arguments))},u.uniq=V,u.values=O,u.where=$,u.without=function(n){return I(n,$t.call(arguments,1))},u.wrap=function(n,t){return function(){var r=[n];
|
||||
return Ot.apply(r,arguments),t.apply(this,r)}},u.zip=function(n){for(var t=-1,r=n?q(R(arguments,"length")):0,e=Array(0>r?0:r);++t<r;)e[t]=R(arguments,t);return e},u.collect=F,u.drop=P,u.each=B,u.extend=h,u.methods=m,u.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},u.select=N,u.tail=P,u.unique=V,u.chain=function(n){return n=new p(n),n.__chain__=K,n},u.clone=function(n){return w(n)?Ct(n)?$t.call(n):h({},n):n},u.contains=E,u.escape=function(n){return n==L?"":(n+"").replace(ot,c)
|
||||
},u.every=S,u.find=k,u.findWhere=function(n,t){return $(n,t,K)},u.has=function(n,t){return n?xt.call(n,t):Q},u.identity=H,u.indexOf=function(n,t,r){if(typeof r=="number"){var e=n?n.length:0;r=0>r?Dt(0,e+r):r||0}else if(r)return r=U(n,t),n[r]===t?r:-1;return n?o(n,t,r):-1},u.isArguments=g,u.isArray=Ct,u.isBoolean=function(n){return n===K||n===Q||St.call(n)==ct},u.isDate=function(n){return n?typeof n=="object"&&St.call(n)==lt:Q},u.isElement=function(n){return n?1===n.nodeType:Q},u.isEmpty=b,u.isEqual=d,u.isFinite=function(n){return Ft(n)&&!qt(parseFloat(n))
|
||||
},u.isFunction=j,u.isNaN=function(n){return A(n)&&n!=+n},u.isNull=function(n){return n===L},u.isNumber=A,u.isObject=w,u.isRegExp=function(n){return!(!n||!ht[typeof n])&&St.call(n)==vt},u.isString=x,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Dt(0,e+r):Mt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=J,u.noConflict=function(){return n._=_t,this},u.random=function(n,t){n==L&&t==L&&(t=1),n=+n||0,t==L?(t=n,n=0):t=+t||0;
|
||||
var r=Tt();return n%1||t%1?n+Mt(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+At(r*(t-n+1))},u.reduce=D,u.reduceRight=M,u.result=function(n,t){var r=n?n[t]:L;return j(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Pt(n).length},u.some=T,u.sortedIndex=U,u.template=function(n,t,r){n||(n=""),r=y({},r,u.templateSettings);var e=0,o="__p+='",i=r.variable;n.replace(RegExp((r.escape||ut).source+"|"+(r.interpolate||ut).source+"|"+(r.evaluate||ut).source+"|$","g"),function(t,r,u,i,a){return o+=n.slice(e,a).replace(it,l),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),u&&(o+="'+((__t=("+u+"))==null?'':__t)+'"),e=a+t.length,t
|
||||
}),o+="';\n",i||(i="obj",o="with("+i+"||{}){"+o+"}"),o="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";try{var a=Function("_","return "+o)(u)}catch(f){throw f.source=o,f}return t?a(t):(a.source=o,a)},u.unescape=function(n){return n==L?"":(n+"").replace(et,v)},u.uniqueId=function(n){var t=++nt+"";return n?n+t:t},u.all=S,u.any=T,u.detect=k,u.foldl=D,u.foldr=M,u.include=E,u.inject=D,u.first=z,u.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&t!=L){var o=u;for(t=G(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==L||r)return n[u-1];return $t.call(n,Dt(0,u-e))}},u.take=z,u.head=z,u.VERSION="1.2.1",J(u),u.prototype.chain=function(){return this.__chain__=K,this},u.prototype.value=function(){return this.__wrapped__},B("pop push reverse shift sort splice unshift".split(" "),function(n){var t=mt[n];u.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!zt.spliceObjects&&0===n.length&&delete n[0],this}}),B(["concat","join","slice"],function(n){var t=mt[n];
|
||||
u.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new p(n),n.__chain__=K),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=u, define(function(){return u})):X&&!X.nodeType?Y?(Y.exports=u)._=u:X._=u:n._=u}(this);
|
||||
;!function(n){function t(n){return n instanceof t?n:new l(n)}function r(n,t,r){r=(r||0)-1;for(var e=n.length;++r<e;)if(n[r]===t)return r;return-1}function e(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 u(n,t,r,e){function u(){var e=arguments,c=a?this:t;return i||(n=t[f]),r.length&&(e=e.length?(e=Rt.call(e),l?e.concat(r):r.concat(e)):r),this instanceof u?(c=o(n.prototype),e=n.apply(c,e),d(e)?e:c):n.apply(c,e)
|
||||
}var i=b(n),a=!r,f=t;if(a){var l=e;r=t}else if(!i){if(!e)throw new TypeError;t=n}return u}function o(n){return d(n)?Ot(n):{}}function i(n){return It[n]}function a(n){return"\\"+st[n]}function f(){var n=(n=t.indexOf)==z?r:n;return n}function l(n){this.__wrapped__=n}function c(){}function p(n){return zt[n]}function s(n){return At.call(n)==et}function v(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 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)null==n[u]&&(n[u]=e[u])}return n}function h(n){var t=[];return Ct(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function y(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 m(n){if(!n)return!0;if(Tt(n)||w(n))return!n.length;for(var t in n)if(dt.call(n,t))return!1;return!0}function _(n,r,e,u){if(n===r)return 0!==n||1/n==1/r;var o=typeof n,i=typeof r;if(n===n&&(!n||"function"!=o&&"object"!=o)&&(!r||"function"!=i&&"object"!=i))return!1;if(null==n||null==r)return n===r;
|
||||
if(i=At.call(n),o=At.call(r),i!=o)return!1;switch(i){case ot:case it:return+n==+r;case at:return n!=+n?r!=+r:0==n?1/n==1/r:n==+r;case lt:case ct:return n==r+""}if(o=i==ut,!o){if(n instanceof t||r instanceof t)return _(n.__wrapped__||n,r.__wrapped__||r,e,u);if(i!=ft)return!1;var i=n.constructor,a=r.constructor;if(i!=a&&(!b(i)||!(i instanceof i&&b(a)&&a instanceof a)))return!1}for(e||(e=[]),u||(u=[]),i=e.length;i--;)if(e[i]==n)return u[i]==r;var f=!0,l=0;if(e.push(n),u.push(r),o){if(l=r.length,f=l==n.length)for(;l--&&(f=_(n[l],r[l],e,u)););return f
|
||||
}return Ct(r,function(t,r,o){return dt.call(o,r)?(l++,!(f=dt.call(n,r)&&_(n[r],t,e,u))&&X):void 0}),f&&Ct(n,function(n,t,r){return dt.call(r,t)?!(f=-1<--l)&&X:void 0}),f}function b(n){return typeof n=="function"}function d(n){return!(!n||!pt[typeof n])}function j(n){return typeof n=="number"||At.call(n)==at}function w(n){return typeof n=="string"||At.call(n)==ct}function A(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function x(n,t){var r=f(),e=n?n.length:0,u=!1;return e&&typeof e=="number"?u=-1<r(n,t):Pt(n,function(n){return(u=n===t)&&X
|
||||
}),u}function O(n,t,r){var e=!0;t=W(t,r),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&(e=!!t(n[r],r,n)););else Pt(n,function(n,r,u){return!(e=!!t(n,r,u))&&X});return e}function E(n,t,r){var e=[];t=W(t,r),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}else Pt(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function S(n,t,r){t=W(t,r),r=-1;var e=n?n.length:0;if(typeof e!="number"){var u;return Pt(n,function(n,r,e){return t(n,r,e)?(u=n,X):void 0
|
||||
}),u}for(;++r<e;){var o=n[r];if(t(o,r,n))return o}}function N(n,t,r){var e=-1,u=n?n.length:0;if(t=t&&typeof r=="undefined"?t:W(t,r),typeof u=="number")for(;++e<u&&t(n[e],e,n)!==X;);else Pt(n,t)}function B(n,t,r){var e=-1,u=n?n.length:0;if(t=W(t,r),typeof u=="number")for(var o=Array(u);++e<u;)o[e]=t(n[e],e,n);else o=[],Pt(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function F(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=W(t,r),N(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 k(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||B(n,t)}function q(n,t,r,e){if(!n)return r;var u=3>arguments.length;t=W(t,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n);else Pt(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)});return r}function R(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=W(t,e,4),N(n,function(e,a,f){a=i?i[--u]:--u,r=o?(o=!1,n[a]):t(r,n[a],a,f)
|
||||
}),r}function D(n,t,r){var e;t=W(t,r),r=-1;var u=n?n.length:0;if(typeof u=="number")for(;++r<u&&!(e=t(n[r],r,n)););else Pt(n,function(n,r,u){return(e=t(n,r,u))&&X});return!!e}function M(n,t,r){return r&&m(t)?null:(r?S:E)(n,t)}function T(n){for(var t=-1,r=f(),e=n.length,u=_t.apply(vt,Rt.call(arguments,1)),o=[];++t<e;){var i=n[t];0>r(u,i)&&o.push(i)}return o}function $(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=W(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[0];
|
||||
return Rt.call(n,0,kt(Ft(0,e),u))}}function I(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Tt(o)?jt.apply(u,t?o:I(o)):u.push(o)}return u}function z(n,t,e){if(typeof e=="number"){var u=n?n.length:0;e=0>e?Ft(0,u+e):e||0}else if(e)return e=P(n,t),n[e]===t?e:-1;return n?r(n,t,e):-1}function C(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=W(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:Ft(0,t);return Rt.call(n,e)}function P(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?W(r,e,1):G,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;
|
||||
return u}function U(n,t,r,e){var u=-1,o=f(),i=n?n.length:0,a=[],l=a;for(typeof t!="boolean"&&null!=t&&(e=r,r=t,t=!1),null!=r&&(l=[],r=W(r,e));++u<i;){e=n[u];var c=r?r(e,u,n):e;(t?!u||l[l.length-1]!==c:0>o(l,c))&&(r&&l.push(c),a.push(e))}return a}function V(n,t){return Mt.fastBind||xt&&2<arguments.length?xt.call.apply(xt,arguments):u(n,t,Rt.call(arguments,2))}function W(n,t,r){if(null==n)return G;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=!1;r--&&(e=t[u[r]]===n[u[r]]););return e
|
||||
}}return typeof t=="undefined"?n:1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}}function G(n){return n}function H(n){N(h(n),function(r){var e=t[r]=n[r];t.prototype[r]=function(){var n=[this.__wrapped__];return jt.apply(n,arguments),n=e.apply(t,n),this.__chain__&&(n=new l(n),n.__chain__=!0),n}})}var J=typeof exports=="object"&&exports,K=typeof module=="object"&&module&&module.exports==J&&module,L=typeof global=="object"&&global;
|
||||
(L.global===L||L.window===L)&&(n=L);var Q=0,X={},Y=+new Date+"",Z=/&(?:amp|lt|gt|quot|#39);/g,nt=/($^)/,tt=/[&<>"']/g,rt=/['\n\r\t\u2028\u2029\\]/g,et="[object Arguments]",ut="[object Array]",ot="[object Boolean]",it="[object Date]",at="[object Number]",ft="[object Object]",lt="[object RegExp]",ct="[object String]",pt={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},st={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},vt=Array.prototype,L=Object.prototype,gt=n._,ht=RegExp("^"+(L.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),yt=Math.ceil,mt=n.clearTimeout,_t=vt.concat,bt=Math.floor,dt=L.hasOwnProperty,jt=vt.push,wt=n.setTimeout,At=L.toString,xt=ht.test(xt=At.bind)&&xt,Ot=ht.test(Ot=Object.create)&&Ot,Et=ht.test(Et=Array.isArray)&&Et,St=n.isFinite,Nt=n.isNaN,Bt=ht.test(Bt=Object.keys)&&Bt,Ft=Math.max,kt=Math.min,qt=Math.random,Rt=vt.slice,L=ht.test(n.attachEvent),Dt=xt&&!/\n|true/.test(xt+L),Mt={};
|
||||
!function(){var n={0:1,length:1};Mt.fastBind=xt&&!Dt,Mt.spliceObjects=(vt.splice.call(n,0,1),!n[0])}(1),t.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Ot||(o=function(n){if(d(n)){c.prototype=n;var t=new c;c.prototype=null}return t||{}}),l.prototype=t.prototype,s(arguments)||(s=function(n){return n?dt.call(n,"callee"):!1});var Tt=Et||function(n){return n?typeof n=="object"&&At.call(n)==ut:!1},Et=function(n){var t,r=[];if(!n||!pt[typeof n])return r;
|
||||
for(t in n)dt.call(n,t)&&r.push(t);return r},$t=Bt?function(n){return d(n)?Bt(n):[]}:Et,It={"&":"&","<":"<",">":">",'"':""","'":"'"},zt=y(It),Ct=function(n,t){var r;if(!n||!pt[typeof n])return n;for(r in n)if(t(n[r],r,n)===X)break;return n},Pt=function(n,t){var r;if(!n||!pt[typeof n])return n;for(r in n)if(dt.call(n,r)&&t(n[r],r,n)===X)break;return n};b(/x/)&&(b=function(n){return typeof n=="function"&&"[object Function]"==At.call(n)}),t.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},t.bind=V,t.bindAll=function(n){for(var t=1<arguments.length?_t.apply(vt,Rt.call(arguments,1)):h(n),r=-1,e=t.length;++r<e;){var u=t[r];n[u]=V(n[u],n)}return n},t.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},t.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},t.countBy=function(n,t,r){var e={};return t=W(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",dt.call(e,r)?e[r]++:e[r]=1}),e
|
||||
},t.debounce=function(n,t,r){function e(){a=null,r||(o=n.apply(i,u))}var u,o,i,a=null;return function(){var f=r&&!a;return u=arguments,i=this,mt(a),a=wt(e,t),f&&(o=n.apply(i,u)),o}},t.defaults=g,t.defer=function(n){var t=Rt.call(arguments,1);return wt(function(){n.apply(void 0,t)},1)},t.delay=function(n,t){var r=Rt.call(arguments,2);return wt(function(){n.apply(void 0,r)},t)},t.difference=T,t.filter=E,t.flatten=I,t.forEach=N,t.functions=h,t.groupBy=function(n,t,r){var e={};return t=W(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",(dt.call(e,r)?e[r]:e[r]=[]).push(n)
|
||||
}),e},t.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=W(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return Rt.call(n,0,kt(Ft(0,u-e),u))},t.intersection=function(n){var t=arguments,r=t.length,e=-1,u=f(),o=n?n.length:0,i=[];n:for(;++e<o;){var a=n[e];if(0>u(i,a)){for(var l=r;--l;)if(0>u(t[l],a))continue n;i.push(a)}}return i},t.invert=y,t.invoke=function(n,t){var r=Rt.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
|
||||
return N(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},t.keys=$t,t.map=B,t.max=F,t.memoize=function(n,t){var r={};return function(){var e=Y+(t?t.apply(this,arguments):arguments[0]);return dt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},t.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=W(t,r),N(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},t.omit=function(n){var t=f(),r=_t.apply(vt,Rt.call(arguments,1)),e={};return Ct(n,function(n,u){0>t(r,u)&&(e[u]=n)
|
||||
}),e},t.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},t.pairs=function(n){for(var t=-1,r=$t(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},t.partial=function(n){return u(n,Rt.call(arguments,1))},t.pick=function(n){for(var t=-1,r=_t.apply(vt,Rt.call(arguments,1)),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},t.pluck=k,t.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=Ft(0,yt((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;
|
||||
return u},t.reject=function(n,t,r){return t=W(t,r),E(n,function(n,r,e){return!t(n,r,e)})},t.rest=C,t.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return N(n,function(n){var r=bt(qt()*(++t+1));e[t]=e[r],e[r]=n}),e},t.sortBy=function(n,t,r){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(t=W(t,r),N(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(e);o--;)i[o]=i[o].c;return i},t.tap=function(n,t){return t(n),n},t.throttle=function(n,t){function r(){i=new Date,a=null,u=n.apply(o,e)
|
||||
}var e,u,o,i=0,a=null;return function(){var f=new Date,l=t-(f-i);return e=arguments,o=this,0<l?a||(a=wt(r,l)):(mt(a),a=null,i=f,u=n.apply(o,e)),u}},t.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},t.toArray=function(n){return Tt(n)?Rt.call(n):n&&typeof n.length=="number"?B(n):A(n)},t.union=function(n){return Tt(n)||(arguments[0]=n?Rt.call(n):vt),U(_t.apply(vt,arguments))},t.uniq=U,t.values=A,t.where=M,t.without=function(n){return T(n,Rt.call(arguments,1))},t.wrap=function(n,t){return function(){var r=[n];
|
||||
return jt.apply(r,arguments),t.apply(this,r)}},t.zip=function(n){for(var t=-1,r=n?F(k(arguments,"length")):0,e=Array(0>r?0:r);++t<r;)e[t]=k(arguments,t);return e},t.collect=B,t.drop=C,t.each=N,t.extend=v,t.methods=h,t.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},t.select=E,t.tail=C,t.unique=U,t.chain=function(n){return n=new l(n),n.__chain__=!0,n},t.clone=function(n){return d(n)?Tt(n)?Rt.call(n):v({},n):n},t.contains=x,t.escape=function(n){return null==n?"":(n+"").replace(tt,i)
|
||||
},t.every=O,t.find=S,t.findWhere=function(n,t){return M(n,t,!0)},t.has=function(n,t){return n?dt.call(n,t):!1},t.identity=G,t.indexOf=z,t.isArguments=s,t.isArray=Tt,t.isBoolean=function(n){return!0===n||!1===n||At.call(n)==ot},t.isDate=function(n){return n?typeof n=="object"&&At.call(n)==it:!1},t.isElement=function(n){return n?1===n.nodeType:!1},t.isEmpty=m,t.isEqual=_,t.isFinite=function(n){return St(n)&&!Nt(parseFloat(n))},t.isFunction=b,t.isNaN=function(n){return j(n)&&n!=+n},t.isNull=function(n){return null===n
|
||||
},t.isNumber=j,t.isObject=d,t.isRegExp=function(n){return!(!n||!pt[typeof n])&&At.call(n)==lt},t.isString=w,t.isUndefined=function(n){return typeof n=="undefined"},t.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Ft(0,e+r):kt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},t.mixin=H,t.noConflict=function(){return n._=gt,this},t.random=function(n,t){null==n&&null==t&&(t=1),n=+n||0,null==t?(t=n,n=0):t=+t||0;var r=qt();return n%1||t%1?n+kt(r*(t-n+parseFloat("1e-"+((r+"").length-1))),t):n+bt(r*(t-n+1))
|
||||
},t.reduce=q,t.reduceRight=R,t.result=function(n,t){var r=n?n[t]:null;return b(r)?n[t]():r},t.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:$t(n).length},t.some=D,t.sortedIndex=P,t.template=function(n,r,e){n||(n=""),e=g({},e,t.templateSettings);var u=0,o="__p+='",i=e.variable;n.replace(RegExp((e.escape||nt).source+"|"+(e.interpolate||nt).source+"|"+(e.evaluate||nt).source+"|$","g"),function(t,r,e,i,f){return o+=n.slice(u,f).replace(rt,a),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),e&&(o+="'+((__t=("+e+"))==null?'':__t)+'"),u=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)(t)}catch(l){throw l.source=o,l}return r?f(r):(f.source=o,f)},t.unescape=function(n){return null==n?"":(n+"").replace(Z,p)},t.uniqueId=function(n){var t=++Q+"";return n?n+t:t},t.all=O,t.any=D,t.detect=S,t.foldl=q,t.foldr=R,t.include=x,t.inject=q,t.first=$,t.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=W(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return Rt.call(n,Ft(0,u-e))}},t.take=$,t.head=$,t.VERSION="1.2.1",H(t),t.prototype.chain=function(){return this.__chain__=!0,this},t.prototype.value=function(){return this.__wrapped__},N("pop push reverse shift sort splice unshift".split(" "),function(n){var r=vt[n];t.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),!Mt.spliceObjects&&0===n.length&&delete n[0],this
|
||||
}}),N(["concat","join","slice"],function(n){var r=vt[n];t.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new l(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=t, define(function(){return t})):J&&!J.nodeType?K?(K.exports=t)._=t:J._=t:n._=t}(this);
|
||||
210
doc/README.md
210
doc/README.md
@@ -217,7 +217,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3507 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3523 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||
|
||||
@@ -241,7 +241,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3537 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3553 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -266,7 +266,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findindexarray--callbackidentity-thisarg"></a>`_.findIndex(array [, callback=identity, thisArg])`
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3573 "View in source") [Ⓣ][1]
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3589 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the index of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -294,7 +294,7 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3643 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3659 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element of the `array`. If a number `n` is passed, the first `n` elements of the `array` are returned. If a `callback` function is passed, elements at the beginning of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -354,7 +354,7 @@ _.first(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray--isshallowfalse-callbackidentity-thisarg"></a>`_.flatten(array [, isShallow=false, callback=identity, thisArg])`
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3705 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3721 "View in source") [Ⓣ][1]
|
||||
|
||||
Flattens a nested array *(the nesting can be to any depth)*. If `isShallow` is truthy, `array` will only be flattened a single level. If `callback` is passed, each element of `array` is passed through a `callback` before flattening. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -397,7 +397,7 @@ _.flatten(stooges, 'quotes');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3749 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3765 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
||||
|
||||
@@ -429,7 +429,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--callbackn1-thisarg"></a>`_.initial(array [, callback|n=1, thisArg])`
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3816 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3832 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element of `array`. If a number `n` is passed, the last `n` elements are excluded from the result. If a `callback` function is passed, elements at the end of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -486,7 +486,7 @@ _.initial(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3850 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3866 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -510,7 +510,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--callbackn-thisarg"></a>`_.last(array [, callback|n, thisArg])`
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3934 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3950 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element of the `array`. If a number `n` is passed, the last `n` elements of the `array` are returned. If a `callback` function is passed, elements at the end of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments;(value, index, array).
|
||||
|
||||
@@ -567,7 +567,7 @@ _.last(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3975 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3991 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -596,7 +596,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4016 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4032 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -634,7 +634,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4095 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4111 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.initial`, this method gets all but the first value of `array`. If a number `n` is passed, the first `n` values are excluded from the result. If a `callback` function is passed, elements at the beginning of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -694,7 +694,7 @@ _.rest(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity-thisarg"></a>`_.sortedIndex(array, value [, callback=identity, thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4159 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4175 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -743,7 +743,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4191 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4207 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -767,7 +767,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#L4241 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4257 "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 the `callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -814,7 +814,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unziparray"></a>`_.unzip(array)`
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4279 "View in source") [Ⓣ][1]
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4296 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.zip`, this method splits groups of elements into arrays composed of elements from each group at their corresponding indexes.
|
||||
|
||||
@@ -838,7 +838,7 @@ _.unzip([['moe', 30, true], ['larry', 40, false]]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4305 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4322 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -863,7 +863,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4325 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4342 "View in source") [Ⓣ][1]
|
||||
|
||||
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||
|
||||
@@ -887,7 +887,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys [, values=[]])`
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4347 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4364 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
@@ -978,7 +978,7 @@ _.isArray(squares.value());
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5424 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5441 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -1008,7 +1008,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5441 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5458 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -1029,7 +1029,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5458 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5475 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1060,7 +1060,7 @@ _([1, 2, 3]).valueOf();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_atcollection--index1-index2-"></a>`_.at(collection [, index1, index2, ...])`
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2496 "View in source") [Ⓣ][1]
|
||||
<a href="#_atcollection--index1-index2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2511 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements from the specified indexes, or keys, of the `collection`. Indexes may be specified as individual arguments or as arrays of indexes.
|
||||
|
||||
@@ -1088,7 +1088,7 @@ _.at(['moe', 'larry', 'curly'], 0, 2);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_containscollection-target--fromindex0"></a>`_.contains(collection, target [, fromIndex=0])`
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2538 "View in source") [Ⓣ][1]
|
||||
<a href="#_containscollection-target--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2553 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `target` element is present in a `collection` using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -1126,7 +1126,7 @@ _.contains('curly', 'ur');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_countbycollection--callbackidentity-thisarg"></a>`_.countBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2592 "View in source") [Ⓣ][1]
|
||||
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2608 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the given `callback`. The corresponding value of each key is the number of times the key was returned by the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1162,7 +1162,7 @@ _.countBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2644 "View in source") [Ⓣ][1]
|
||||
<a href="#_everycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2660 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **all** elements of a `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1208,7 +1208,7 @@ _.every(stooges, { 'age': 50 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2705 "View in source") [Ⓣ][1]
|
||||
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2721 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1254,7 +1254,7 @@ _.filter(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2772 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2788 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning the first that the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1303,7 +1303,7 @@ _.find(food, 'organic');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2819 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2835 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -1335,7 +1335,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection--callbackidentity-thisarg"></a>`_.groupBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2869 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2885 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1372,7 +1372,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2902 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2918 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function, it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1401,7 +1401,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2954 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2970 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of values by running each element in the `collection` through the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1446,7 +1446,7 @@ _.map(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection--callbackidentity-thisarg"></a>`_.max(collection [, callback=identity, thisArg])`
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3011 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3027 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1488,7 +1488,7 @@ _.max(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection--callbackidentity-thisarg"></a>`_.min(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3080 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3096 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1530,7 +1530,7 @@ _.min(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3130 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3146 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1560,7 +1560,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducecollection--callbackidentity-accumulator-thisarg"></a>`_.reduce(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3162 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3178 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a `collection` to a value which is the accumulated result of running each element in the `collection` through the `callback`, where each successive `callback` execution consumes the return value of the previous execution. If `accumulator` is not passed, the first element of the `collection` will be used as the initial `accumulator` value. The `callback` is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
|
||||
|
||||
@@ -1598,7 +1598,7 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducerightcollection--callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3205 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3221 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
|
||||
|
||||
@@ -1629,7 +1629,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3265 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3281 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -1672,7 +1672,7 @@ _.reject(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3286 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3302 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1696,7 +1696,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3319 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3335 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||
|
||||
@@ -1726,7 +1726,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3366 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3382 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1772,7 +1772,7 @@ _.some(food, { 'type': 'meat' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection--callbackidentity-thisarg"></a>`_.sortBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3422 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3438 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in the `collection` through the `callback`. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1809,7 +1809,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3457 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3473 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -1833,7 +1833,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3489 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3505 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements that have the given `properties`. When checking `properties`, this method performs a deep comparison between values to determine if they are equivalent to each other.
|
||||
|
||||
@@ -1870,7 +1870,7 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4387 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4404 "View in source") [Ⓣ][1]
|
||||
|
||||
If `n` is greater than `0`, a function is created that is restricted to executing `func`, with the `this` binding and arguments of the created function, only after it is called `n` times. If `n` is less than `1`, `func` is executed immediately, without a `this` binding or additional arguments, and its result is returned.
|
||||
|
||||
@@ -1898,7 +1898,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4420 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4437 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
||||
|
||||
@@ -1929,7 +1929,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4451 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4468 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods on `object` to `object`, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided, all the function properties of `object` will be bound.
|
||||
|
||||
@@ -1960,7 +1960,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4497 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4514 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -2001,7 +2001,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4520 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4537 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -2028,7 +2028,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount3"></a>`_.createCallback([func=identity, thisArg, argCount=3])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4579 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4596 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name, the created callback will return the property value for a given element. If `func` is an object, the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -2082,7 +2082,7 @@ _.toLookup(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-options"></a>`_.debounce(func, wait, options)`
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4655 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4672 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -2115,7 +2115,7 @@ jQuery('#postbox').on('click', _.debounce(sendMail, 200, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4708 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4725 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2140,7 +2140,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4734 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4751 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2167,7 +2167,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4758 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4775 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
|
||||
|
||||
@@ -2193,7 +2193,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4788 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4805 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2219,7 +2219,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4823 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4840 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2246,7 +2246,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4854 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4871 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2283,7 +2283,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait-options"></a>`_.throttle(func, wait, options)`
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4887 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4904 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2315,7 +2315,7 @@ jQuery('.interactive').on('click', _.throttle(renewToken, 300000, {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4952 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4969 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2351,7 +2351,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject--source1-source2--callback-thisarg"></a>`_.assign(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1252 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1266 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a `callback` function is passed, it will be executed to produce the assigned values. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2389,7 +2389,7 @@ defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue--deepfalse-callback-thisarg"></a>`_.clone(value [, deep=false, callback, thisArg])`
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1307 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1321 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2436,7 +2436,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1432 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1446 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2482,7 +2482,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1456 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1470 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
||||
|
||||
@@ -2508,7 +2508,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeyobject--callbackidentity-thisarg"></a>`_.findKey(object [, callback=identity, thisArg])`
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1478 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1492 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the key of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -2536,7 +2536,7 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1519 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1533 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2572,7 +2572,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject--callbackidentity-thisarg"></a>`_.forOwn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1544 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1558 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over an object's own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2600,7 +2600,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1561 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1575 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -2627,7 +2627,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1586 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1600 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -2652,7 +2652,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject"></a>`_.invert(object)`
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1603 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1617 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given `object`.
|
||||
|
||||
@@ -2676,7 +2676,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1115 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1129 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -2703,7 +2703,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1141 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1155 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -2730,7 +2730,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1629 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1643 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -2754,7 +2754,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1646 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1660 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -2778,7 +2778,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1663 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1677 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -2802,7 +2802,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1688 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1702 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||
|
||||
@@ -2832,7 +2832,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b--callback-thisarg"></a>`_.isEqual(a, b [, callback, thisArg])`
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1747 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1761 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If `callback` is passed, it will be executed to compare values. If `callback` returns `undefined`, comparisons will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -2877,7 +2877,7 @@ _.isEqual(words, otherWords, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1928 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfinitevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1942 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is, or can be coerced to, a finite number.
|
||||
|
||||
@@ -2915,7 +2915,7 @@ _.isFinite(Infinity);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1945 "View in source") [Ⓣ][1]
|
||||
<a href="#_isfunctionvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1959 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a function.
|
||||
|
||||
@@ -2939,7 +2939,7 @@ _.isFunction(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnanvalue"></a>`_.isNaN(value)`
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2008 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2022 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `NaN`.
|
||||
|
||||
@@ -2974,7 +2974,7 @@ _.isNaN(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnullvalue"></a>`_.isNull(value)`
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2030 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnullvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2044 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `null`.
|
||||
|
||||
@@ -3001,7 +3001,7 @@ _.isNull(undefined);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2047 "View in source") [Ⓣ][1]
|
||||
<a href="#_isnumbervalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2061 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a number.
|
||||
|
||||
@@ -3025,7 +3025,7 @@ _.isNumber(8.4 * 5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isobjectvalue"></a>`_.isObject(value)`
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1975 "View in source") [Ⓣ][1]
|
||||
<a href="#_isobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1989 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
|
||||
|
||||
@@ -3055,7 +3055,7 @@ _.isObject(1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2075 "View in source") [Ⓣ][1]
|
||||
<a href="#_isplainobjectvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2089 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if a given `value` is an object created by the `Object` constructor.
|
||||
|
||||
@@ -3090,7 +3090,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2100 "View in source") [Ⓣ][1]
|
||||
<a href="#_isregexpvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2114 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a regular expression.
|
||||
|
||||
@@ -3114,7 +3114,7 @@ _.isRegExp(/moe/);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isstringvalue"></a>`_.isString(value)`
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2117 "View in source") [Ⓣ][1]
|
||||
<a href="#_isstringvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2131 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a string.
|
||||
|
||||
@@ -3138,7 +3138,7 @@ _.isString('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2134 "View in source") [Ⓣ][1]
|
||||
<a href="#_isundefinedvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2148 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is `undefined`.
|
||||
|
||||
@@ -3162,7 +3162,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1174 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1188 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -3186,7 +3186,7 @@ _.keys({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mergeobject--source1-source2--callback-thisarg"></a>`_.merge(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2193 "View in source") [Ⓣ][1]
|
||||
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2207 "View in source") [Ⓣ][1]
|
||||
|
||||
Recursively merges own enumerable properties of the source object(s), that don't resolve to `undefined`, into the destination object. Subsequent sources will overwrite property assignments of previous sources. If a `callback` function is passed, it will be executed to produce the merged values of the destination and source properties. If `callback` returns `undefined`, merging will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -3242,7 +3242,7 @@ _.merge(food, otherFood, function(a, b) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_omitobject-callback-prop1-prop2--thisarg"></a>`_.omit(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2302 "View in source") [Ⓣ][1]
|
||||
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2316 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` excluding the specified properties. Property names may be specified as individual arguments or as arrays of property names. If a `callback` function is passed, it will be executed for each property in the `object`, omitting the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3273,7 +3273,7 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pairsobject"></a>`_.pairs(object)`
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2336 "View in source") [Ⓣ][1]
|
||||
<a href="#_pairsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2351 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
|
||||
|
||||
@@ -3297,7 +3297,7 @@ _.pairs({ 'moe': 30, 'larry': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2374 "View in source") [Ⓣ][1]
|
||||
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2389 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a shallow clone of `object` composed of the specified properties. Property names may be specified as individual arguments or as arrays of property names. If `callback` is passed, it will be executed for each property in the `object`, picking the properties `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*.
|
||||
|
||||
@@ -3328,7 +3328,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_transformcollection--callbackidentity-accumulator-thisarg"></a>`_.transform(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_transformcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2428 "View in source") [Ⓣ][1]
|
||||
<a href="#_transformcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2443 "View in source") [Ⓣ][1]
|
||||
|
||||
Transforms an `object` to an new `accumulator` object which is the result of running each of its elements through the `callback`, with each `callback` execution potentially mutating the `accumulator` object. The `callback`is bound to `thisArg` and invoked with four arguments; *(accumulator, value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -3365,7 +3365,7 @@ var mapped = _.transform({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key)
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_valuesobject"></a>`_.values(object)`
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2461 "View in source") [Ⓣ][1]
|
||||
<a href="#_valuesobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2476 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property values of `object`.
|
||||
|
||||
@@ -3396,7 +3396,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4976 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4993 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3420,7 +3420,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4994 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5011 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3445,7 +3445,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5020 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5037 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3475,7 +3475,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5049 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5066 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3495,7 +3495,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue--radix"></a>`_.parseInt(value [, radix])`
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5073 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue--radix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5090 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`. If `radix` is `undefined` or `0`, a `radix` of `10` is used unless the `value` is a hexadecimal, in which case a `radix` of `16` is used.
|
||||
|
||||
@@ -3522,7 +3522,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5096 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5113 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3550,7 +3550,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5140 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5157 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey, then `undefined` is returned.
|
||||
|
||||
@@ -3603,7 +3603,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5224 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5241 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3685,7 +3685,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5349 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5366 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -3717,7 +3717,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5376 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5393 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3741,7 +3741,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5396 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5413 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3794,7 +3794,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5638 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5655 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
29
lodash.js
29
lodash.js
@@ -793,8 +793,9 @@
|
||||
|
||||
var bailout,
|
||||
index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array.length,
|
||||
isLarge = length >= largeArraySize,
|
||||
isLarge = length >= largeArraySize && lodash.indexOf != indexOf,
|
||||
objCache = {};
|
||||
|
||||
var caches = {
|
||||
@@ -809,7 +810,7 @@
|
||||
};
|
||||
|
||||
function basicContains(value) {
|
||||
return basicIndexOf(array, value) > -1;
|
||||
return indexOf(array, value) > -1;
|
||||
}
|
||||
|
||||
function basicPush(value) {
|
||||
@@ -957,6 +958,19 @@
|
||||
return '\\' + stringEscapes[match];
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized, this method returns the custom method, otherwise it returns
|
||||
* the `basicIndexOf` function.
|
||||
*
|
||||
* @private
|
||||
* @returns {Function} Returns the "indexOf" function.
|
||||
*/
|
||||
function getIndexOf(array, value, fromIndex) {
|
||||
var result = (result = lodash.indexOf) == indexOf ? basicIndexOf : result;
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if `value` is a DOM node in IE < 9.
|
||||
*
|
||||
@@ -2300,7 +2314,8 @@
|
||||
* // => { 'name': 'moe' }
|
||||
*/
|
||||
function omit(object, callback, thisArg) {
|
||||
var isFunc = typeof callback == 'function',
|
||||
var indexOf = getIndexOf(),
|
||||
isFunc = typeof callback == 'function',
|
||||
result = {};
|
||||
|
||||
if (isFunc) {
|
||||
@@ -2311,7 +2326,7 @@
|
||||
forIn(object, function(value, key, object) {
|
||||
if (isFunc
|
||||
? !callback(value, key, object)
|
||||
: basicIndexOf(props, key) < 0
|
||||
: indexOf(props, key) < 0
|
||||
) {
|
||||
result[key] = value;
|
||||
}
|
||||
@@ -2537,6 +2552,7 @@
|
||||
*/
|
||||
function contains(collection, target, fromIndex) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = collection ? collection.length : 0,
|
||||
result = false;
|
||||
|
||||
@@ -2544,7 +2560,7 @@
|
||||
if (length && typeof length == 'number') {
|
||||
result = (isString(collection)
|
||||
? collection.indexOf(target, fromIndex)
|
||||
: basicIndexOf(collection, target, fromIndex)
|
||||
: indexOf(collection, target, fromIndex)
|
||||
) > -1;
|
||||
} else {
|
||||
basicEach(collection, function(value) {
|
||||
@@ -4240,6 +4256,7 @@
|
||||
*/
|
||||
var uniq = overloadWrapper(function(array, isSorted, callback) {
|
||||
var index = -1,
|
||||
indexOf = getIndexOf(),
|
||||
length = array ? array.length : 0,
|
||||
isLarge = !isSorted && length >= largeArraySize,
|
||||
result = [],
|
||||
@@ -4251,7 +4268,7 @@
|
||||
|
||||
if (isSorted
|
||||
? !index || seen[seen.length - 1] !== computed
|
||||
: (isLarge ? !seen.contains(computed) : basicIndexOf(seen, computed) < 0)
|
||||
: (isLarge ? !seen.contains(computed) : indexOf(seen, computed) < 0)
|
||||
) {
|
||||
if (callback || isLarge) {
|
||||
seen.push(computed);
|
||||
|
||||
74
test/test.js
74
test/test.js
@@ -72,6 +72,9 @@
|
||||
undefined
|
||||
];
|
||||
|
||||
/** Used as the size when optimizations are enabled for large arrays */
|
||||
var largeArraySize = 75;
|
||||
|
||||
/** Used to set property descriptors */
|
||||
var setDescriptor = (function() {
|
||||
try {
|
||||
@@ -1241,7 +1244,7 @@
|
||||
stringObject = Object(stringLiteral),
|
||||
expected = [stringLiteral, stringObject];
|
||||
|
||||
var array = _.times(100, function(count) {
|
||||
var array = _.times(largeArraySize, function(count) {
|
||||
return count % 2 ? stringObject : stringLiteral;
|
||||
});
|
||||
|
||||
@@ -1354,6 +1357,68 @@
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('custom `_.indexOf` methods');
|
||||
|
||||
(function() {
|
||||
function custom(array, value, fromIndex) {
|
||||
var index = (fromIndex || 0) - 1,
|
||||
length = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
var other = array[index];
|
||||
if (other === value ||
|
||||
(_.isObject(value) && other instanceof Foo) ||
|
||||
(other === 'x' && /[13]/.test(value))) {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
function Foo() {}
|
||||
|
||||
var array = [1, new Foo, 3, new Foo],
|
||||
indexOf = _.indexOf;
|
||||
|
||||
test('_.contains should work with a custom `_.indexOf` method', function() {
|
||||
_.indexOf = custom;
|
||||
ok(_.contains(array, new Foo));
|
||||
_.indexOf = indexOf;
|
||||
});
|
||||
|
||||
test('_.difference should work with a custom `_.indexOf` method', function() {
|
||||
_.indexOf = custom;
|
||||
deepEqual(_.difference(array, [new Foo]), [1, 3]);
|
||||
_.indexOf = indexOf;
|
||||
});
|
||||
|
||||
test('_.intersection should work with a custom `_.indexOf` method', function() {
|
||||
_.indexOf = custom;
|
||||
deepEqual(_.intersection(array, [new Foo]), [array[1]]);
|
||||
_.indexOf = indexOf;
|
||||
});
|
||||
|
||||
test('_.omit should work with a custom `_.indexOf` method', function() {
|
||||
_.indexOf = custom;
|
||||
deepEqual(_.omit(array, ['x']), { '0': 1, '2': 3 });
|
||||
_.indexOf = indexOf;
|
||||
});
|
||||
|
||||
test('_.uniq should work with a custom `_.indexOf` method', function() {
|
||||
_.indexOf = custom;
|
||||
deepEqual(_.uniq(array), array.slice(0, 3));
|
||||
|
||||
var largeArray = _.times(largeArraySize, function() {
|
||||
return new Foo;
|
||||
});
|
||||
|
||||
deepEqual(_.uniq(largeArray), [largeArray[0]]);
|
||||
_.indexOf = indexOf;
|
||||
});
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
QUnit.module('lodash.initial');
|
||||
|
||||
(function() {
|
||||
@@ -3203,13 +3268,14 @@
|
||||
|
||||
test('should distinguish between numbers and numeric strings', function() {
|
||||
var array = [],
|
||||
expected = ['2', 2, Object('2'), Object(2)];
|
||||
expected = ['2', 2, Object('2'), Object(2)],
|
||||
count = Math.ceil(largeArraySize / expected.length);
|
||||
|
||||
_.times(50, function() {
|
||||
_.times(count, function() {
|
||||
array.push.apply(array, expected);
|
||||
});
|
||||
|
||||
deepEqual(_.uniq(expected), expected);
|
||||
deepEqual(_.uniq(array), expected);
|
||||
});
|
||||
|
||||
_.each({
|
||||
|
||||
Reference in New Issue
Block a user