Simplify the lodash wrapper.

Former-commit-id: 389c9ca8aa8414b04f7f99caf955862a1925d42e
This commit is contained in:
John-David Dalton
2013-03-04 22:03:34 -08:00
parent 35bd7c55d0
commit b92105e888
9 changed files with 326 additions and 385 deletions

View File

@@ -1144,6 +1144,25 @@
return source;
}
/**
* Removes all `lodashWrapper` references from `source`.
*
* @private
* @param {String} source The source to process.
* @returns {String} Returns the modified source.
*/
function removeLodashWrapper(source) {
source = removeFunction(source, 'lodashWrapper');
// remove `lodashWrapper.prototype` assignment
source = source.replace(/(?:\s*\/\/.*)*\n *lodashWrapper\.prototype *=.+/, '');
// replace `new lodashWrapper` with `new lodash`
source = source.replace(/\bnew lodashWrapper\b/g, 'new lodash');
return source;
}
/**
* Removes all `noArgsClass` references from `source`.
*
@@ -2017,13 +2036,9 @@
// replace `lodash`
source = replaceFunction(source, 'lodash', [
'function lodash(value) {',
' if (!(this instanceof lodash)) {',
' return new lodash(value);',
' }',
' if (value instanceof lodash) {',
' return value;',
' }',
' this.__wrapped__ = value;',
' return (value instanceof lodash)',
' ? value',
' : new lodashWrapper(value)',
'}'
].join('\n'));
@@ -2286,7 +2301,7 @@
if (isLegacy) {
source = removeSetImmediate(source);
_.each(['isBindFast', 'isIeOpera', 'isV8', 'nativeBind', 'nativeIsArray', 'nativeCreate', 'nativeKeys', 'reNative'], function(varName) {
_.each(['isBindFast', 'isIeOpera', 'isV8', 'nativeBind', 'nativeIsArray', 'nativeKeys', 'reNative'], function(varName) {
source = removeVar(source, varName);
});
@@ -2295,11 +2310,6 @@
return match.replace(/(?:\s*\/\/.*)*\s*return isBindFast[^:]+:\s*/, 'return ');
});
// remove native `Object.create` branch in `createObject`
source = source.replace(matchFunction(source, 'createObject'), function(match) {
return match.replace(/nativeCreate * \|\|\s*/, '');
});
// remove native `Array.isArray` branch in `_.isArray`
source = source.replace(matchFunction(source, 'isArray'), function(match) {
return match.replace(/nativeIsArray * \|\|\s*/, '');
@@ -2534,6 +2544,7 @@
}
if (isRemoved(source, 'value')) {
source = removeHasObjectSpliceBug(source);
source = removeLodashWrapper(source);
// simplify the `lodash` function
source = replaceFunction(source, 'lodash', [

66
dist/lodash.compat.js vendored
View File

@@ -175,7 +175,6 @@
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = context.isFinite,
nativeIsNaN = context.isNaN,
@@ -320,15 +319,10 @@
* @returns {Object} Returns a `lodash` instance.
*/
function lodash(value) {
// allow invoking `lodash` without the `new` operator
if (!(this instanceof lodash)) {
return new lodash(value);
}
// exit early if already wrapped, even if wrapped by a different `lodash` constructor
if (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__')) {
return value;
}
this.__wrapped__ = value;
// don't wrap if already wrapped, even if wrapped by a different `lodash` constructor
return (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__'))
? value
: new lodashWrapper(value);
}
/**
@@ -637,7 +631,9 @@
}
if (this instanceof bound) {
// ensure `new bound` is an instance of `func`
thisBinding = createObject(func.prototype);
noop.prototype = func.prototype;
thisBinding = new noop;
noop.prototype = null;
// mimic the constructor's `return` behavior
// http://es5.github.com/#x13.2.2
@@ -702,33 +698,6 @@
);
}
/**
* Creates a new object that inherits from the given `prototype` object.
*
* @private
* @param {Object} prototype The prototype object.
* @returns {Object} Returns the new object.
*/
var createObject = nativeCreate || function(prototype) {
noop.prototype = prototype;
var result = new noop;
noop.prototype = null;
return result;
};
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function createWrapper(value) {
var result = createObject(lodash.prototype);
result.__wrapped__ = value;
return result;
}
/**
* A function compiled to iterate `arguments` objects, arrays, objects, and
* strings consistenly across environments, executing the `callback` for each
@@ -781,6 +750,19 @@
return typeof value.toString != 'function' && typeof (value + '') == 'string';
}
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function lodashWrapper(value) {
this.__wrapped__ = value;
}
// ensure `new lodashWrapper` is an instance of `lodash`
lodashWrapper.prototype = lodash.prototype;
/**
* A no-operation function.
*
@@ -4639,7 +4621,7 @@
var result = func.apply(lodash, args);
return (value && typeof value == 'object' && value == result)
? this
: createWrapper(result);
: new lodashWrapper(result);
};
});
}
@@ -5195,7 +5177,7 @@
var result = func(this.__wrapped__, callback, thisArg);
return callback == null || (thisArg && typeof callback != 'function')
? result
: createWrapper(result);
: new lodashWrapper(result);
};
}
});
@@ -5237,7 +5219,7 @@
each(['concat', 'slice', 'splice'], function(methodName) {
var func = arrayRef[methodName];
lodash.prototype[methodName] = function() {
return createWrapper(func.apply(this.__wrapped__, arguments));
return new lodashWrapper(func.apply(this.__wrapped__, arguments));
};
});
@@ -5255,7 +5237,7 @@
if (value.length === 0) {
delete value[0];
}
return isSplice ? createWrapper(result) : result;
return isSplice ? new lodashWrapper(result) : result;
};
});
}

View File

@@ -4,42 +4,42 @@
* Build: `lodash -o ./dist/lodash.compat.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function t(r){function a(n){return this instanceof a?n&&typeof n=="object"&&Jt.call(n,"__wrapped__")?n:(this.__wrapped__=n,void 0):new a(n)}function q(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Jt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Jt.call(a,r)&&-1<mt(a[r],e)}return-1<mt(n,e,t)}}function B(n){return n.charCodeAt(0)}function R(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 T(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=U(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(c=Ce(n.prototype),f=n.apply(c,f),nt(f)?f:c):n.apply(c,f)}var a=Z(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function D(){for(var n,t={e:St,f:Et,g:ve,i:he,j:de,k:_,b:"k(m)",c:"",h:"",l:"",m:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Ft,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.l+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",t.j&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.h+"}}else{"):t.i&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.h+"}}else{"),t.f&&(r+="var v=typeof m=='function';"),t.g&&t.m?(r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];",t.f&&(r+="if(!(v&&i=='prototype')){"),r+=t.h+"",t.f&&(r+="}")):(r+="for(i in m){",(t.f||t.m)&&(r+="if(",t.f&&(r+="!(v&&i=='prototype')"),t.f&&t.m&&(r+="&&"),t.m&&(r+="h.call(m,i)"),r+="){"),r+=t.h+";",(t.f||t.m)&&(r+="}")),r+="}",t.e){r+="var f=m.constructor;";
for(var u=0;7>u;u++)r+="i='"+t.k[u]+"';if(","constructor"==t.k[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.h+"}"}return(t.b||t.i)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Jt,G,Ie,et,a,A,ue)}function P(n){var t=Ce(a.prototype);return t.__wrapped__=n,t}function z(n){return"\\"+$[n]}function M(n){return Ae[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(){}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);
var r=-1;e=e-t||0;for(var u=Nt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function V(n){return $e[n]}function G(n){return Yt.call(n)==k}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var e=n.constructor;return!Z(e)&&(!be||!K(n))||e instanceof e?It?(Se(n,function(n,e,r){return t=!Jt.call(r,e),!1}),!1===t):(Se(n,function(n,e){t=e}),!1===t||Jt.call(n,t)):t}function J(n){var t=[];return Ee(n,function(n,e){t.push(e)}),t}function Q(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
f=n}if(u=nt(f)){var c=Yt.call(f);if(!N[c]||be&&K(f))return f;var l=Ie(f)}if(!u||!t)return u?l?U(f):Fe({},f):f;switch(u=ke[c],c){case w:case x:return new u(+f);case O:case I:return new u(f);case E:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Jt.call(n,"index")&&(f.index=n.index),Jt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:Ee)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return Se(n,function(n,e){Z(n)&&t.push(e)
}),t.sort()}function X(n){for(var t=-1,e=Ne(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Yt.call(n),l=Yt.call(t),p==k&&(p=S),l==k&&(l=S),p!=l)return!1;switch(p){case w:case x:return+n==+t;
case O:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case E:case I:return n==t+""}if(l=p==j,!l){if(Jt.call(n,"__wrapped__")||Jt.call(t,"__wrapped__"))return Y(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=S||be&&(K(n)||K(t)))return!1;var p=!ye&&G(n)?Rt:n.constructor,s=!ye&&G(t)?Rt:t.constructor;if(p!=s&&(!Z(p)||!(p instanceof p&&Z(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Y(n[l],s,e,r,u,o)););else if(!(c=Y(n[v],s,e,r,u,o)))break;return c}return Se(t,function(t,a,i){return Jt.call(i,a)?(v++,c=Jt.call(n,a)&&Y(n[a],t,e,r,u,o)):void 0}),c&&!f&&Se(n,function(n,t,e){return Jt.call(e,t)?c=-1<--v:void 0}),c}function Z(n){return typeof n=="function"}function nt(n){return n?A[typeof n]:!1}function tt(n){return typeof n=="number"||Yt.call(n)==O}function et(n){return typeof n=="string"||Yt.call(n)==I}function rt(n,t,e){var r=arguments,u=0,o=2;
if(!nt(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(Ie(r[u])?ct:Ee)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=Ie(t))||Be(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?Ie(o)?o:[]:Be(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=rt(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
n[e]=o});return n}function ut(n){for(var t=-1,e=Ne(n),r=e.length,u=Nt(r);++t<r;)u[t]=n[e[t]];return u}function at(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ae(0,u+e):e)||0,typeof u=="number"?a=-1<(et(n)?n.indexOf(t,e):mt(n,t,e)):Oe(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function ot(n,t,e){var r=!0;if(t=a.createCallback(t,e),Ie(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else Oe(n,function(n,e,u){return r=!!t(n,e,u)});return r}function it(n,t,e){var r=[];if(t=a.createCallback(t,e),Ie(n)){e=-1;
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else Oe(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ft(n,t,e){var r;return t=a.createCallback(t,e),ct(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function ct(n,t,e){if(t&&typeof e=="undefined"&&Ie(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else Oe(n,t,e);return n}function lt(n,t,e){var r=-1,u=n?n.length:0,o=Nt(typeof u=="number"?u:0);if(t=a.createCallback(t,e),Ie(n))for(;++r<u;)o[r]=t(n[r],r,n);else Oe(n,function(n,e,u){o[++r]=t(n,e,u)
});return o}function pt(n,t,e){var r=-1/0,u=r;if(!t&&Ie(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&et(n)?B:a.createCallback(t,e),Oe(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function st(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),Ie(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else Oe(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function vt(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=Ne(n),o=f.length;
else de&&et(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),ct(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function gt(n,t,e){var r;if(t=a.createCallback(t,e),Ie(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else Oe(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function ht(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return U(n,0,oe(ae(0,r),u))
}}function yt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),Ie(r)?Qt.apply(i,t?r:yt(r)):i.push(r);return i}function mt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ae(0,u+e):e||0)-1;else if(e)return r=bt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++
}else r=null==t||e?1:ae(0,t);return U(n,r)}function bt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):xt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function _t(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Jt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>mt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i
}function kt(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 jt(n,t){return se||Zt&&2<arguments.length?Zt.call.apply(Zt,arguments):T(n,t,U(arguments,2))}function wt(n){var t=U(arguments,1);return Xt(function(){n.apply(e,t)},1)}function xt(n){return n}function Ct(n){ct(W(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Qt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:P(t)}})}function Ot(){return this.__wrapped__
}r=r?F.defaults(n.Object(),r,F.pick(n,b)):n;var St,Et,It,Nt=r.Array,At=r.Boolean,$t=r.Date,Ft=r.Function,qt=r.Math,Bt=r.Number,Rt=r.Object,Tt=r.RegExp,Dt=r.String,Pt=Nt(),zt=Rt(),Mt=r._,Kt=Tt("^"+(zt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Lt=qt.ceil,Ut=r.clearTimeout,Vt=Pt.concat,Gt=qt.floor,Ht=Kt.test(Ht=Rt.getPrototypeOf)&&Ht,Jt=zt.hasOwnProperty,Qt=Pt.push,Wt=r.setImmediate,Xt=r.setTimeout,Yt=zt.toString,Zt=Kt.test(Zt=U.bind)&&Zt,ne=Kt.test(ne=Rt.create)&&ne,te=Kt.test(te=Nt.isArray)&&te,ee=r.isFinite,re=r.isNaN,ue=Kt.test(ue=Rt.keys)&&ue,ae=qt.max,oe=qt.min,ie=r.parseInt,fe=qt.random,ce=Kt.test(r.attachEvent),le=!/\n{2,}/.test(Ft()),pe=Zt&&!/\n|true/.test(Zt+ce),se=Zt&&!pe,ve=ue&&(ce||pe||!le),ge=(ge={0:1,length:1},Pt.splice.call(ge,0,1),ge[0]),he=!0;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var e in new n)t.push(e);for(e in arguments)he=!e;St=!/valueOf/.test(t),Et=n.propertyIsEnumerable("prototype"),It="x"!=t[0]})(1);var ye=arguments.constructor==Rt,me=!G(arguments),de="xx"!="x"[0]+Rt("x")[0];try{var be=Yt.call(document)==S&&!({toString:0}+"")}catch(_e){}var ke={};ke[j]=Nt,ke[w]=At,ke[x]=$t,ke[S]=Rt,ke[O]=Bt,ke[E]=Tt,ke[I]=Dt,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:a}};
var je={a:"q,w,g",l:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",h:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},we={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",h:"if(d(m[i],i,e)===false)return u"},xe={l:"if(!r[typeof m])return u;"+we.l,b:!1},Ce=ne||function(n){return L.prototype=n,n=new L,L.prototype=null,n},Oe=D(we);me&&(G=function(n){return n?Jt.call(n,"callee"):!1});var Se=D(we,xe,{m:!1}),Ee=D(we,xe),Ie=te||function(n){return ye&&n instanceof Nt||Yt.call(n)==j
},Ne=ue?function(n){return nt(n)?Et&&typeof n=="function"||he&&n.length&&G(n)?J(n):ue(n):[]}:J,Ae={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},$e=X(Ae),Fe=D(je,{l:je.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[i]=d?d(u[i],m[i]):m[i]"}),qe=D(je);Z(/x/)&&(Z=function(n){return n instanceof Ft||Yt.call(n)==C});var Be=Ht?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Ht(t))&&Ht(e);
return e?n==e||Ht(n)==e&&!G(n):H(n)}:H,Re=8==ie("08")?ie:function(n,t){return ie(et(n)?n.replace(/^0+(?=.$)/,""):n,t||0)},Te=lt,De=it;return pe&&u&&typeof Wt=="function"&&(wt=jt(Wt,r)),a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=Fe,a.at=function(n){var t=-1,e=Vt.apply(Pt,U(arguments,1)),r=e.length,u=Nt(r);for(de&&et(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=jt,a.bindAll=function(n){for(var t=Vt.apply(Pt,arguments),e=1<t.length?0:(t=W(n),-1),r=t.length;++e<r;){var u=t[e];
n[u]=jt(n[u],n)}return n},a.bindKey=function(n,t){return T(n,t,U(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",Jt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return xt;var r=typeof n;
if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=Ne(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Y(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Ut(i),i=Xt(r,t),f&&(a=n.apply(o,u)),a
}},a.defaults=qe,a.defer=wt,a.delay=function(n,t){var r=U(arguments,2);return Xt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Vt.apply(Pt,arguments),r=q(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=it,a.flatten=yt,a.forEach=ct,a.forIn=Se,a.forOwn=Ee,a.functions=W,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=t(n,e,u)+"",(Jt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];
var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return U(n,0,oe(ae(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Jt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>mt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=q(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=X,a.invoke=function(n,t){var e=U(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Nt(typeof a=="number"?a:0);
return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=Ne,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Jt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&Ie(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?B:a.createCallback(t,e),Oe(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};
if(r)t=a.createCallback(t,e);else var o=Vt.apply(Pt,arguments);return Se(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=Ne(n),r=e.length,u=Nt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return T(n,U(arguments,1))},a.partialRight=function(n){return T(n,U(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Vt.apply(Pt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];
f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),Se(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=Te,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ae(0,Lt((t-n)/e));for(var u=Nt(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Nt(typeof e=="number"?e:0);return ct(n,function(n){var e=Gt(fe()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Nt(typeof u=="number"?u:0);
for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(R);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new $t,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new $t,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Xt(e,c)):(Ut(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=+n||0;for(var r=-1,u=Nt(n);++r<n;)u[r]=t.call(e,r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?de&&et(n)?n.split(""):U(n):ut(n)
},a.union=function(){return _t(Vt.apply(Pt,arguments))},a.uniq=_t,a.values=ut,a.where=De,a.without=function(n){for(var t=-1,e=n?n.length:0,r=q(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Qt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(Te(arguments,"length")):0,r=Nt(e);++t<e;)r[t]=Te(arguments,t);return r},a.zipObject=kt,a.collect=lt,a.drop=dt,a.each=ct,a.extend=Fe,a.methods=W,a.object=kt,a.select=it,a.tail=dt,a.unique=_t,Ct(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)
},a.contains=at,a.escape=function(n){return null==n?"":(n+"").replace(m,M)},a.every=ot,a.find=ft,a.has=function(n,t){return n?Jt.call(n,t):!1},a.identity=xt,a.indexOf=mt,a.isArguments=G,a.isArray=Ie,a.isBoolean=function(n){return!0===n||!1===n||Yt.call(n)==w},a.isDate=function(n){return n instanceof $t||Yt.call(n)==x},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Yt.call(n),r=n.length;return e==j||e==I||e==k||me&&G(n)||e==S&&typeof r=="number"&&Z(n.splice)?!r:(Ee(n,function(){return t=!1
}),t)},a.isEqual=Y,a.isFinite=function(n){return ee(n)&&!re(parseFloat(n))},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=Be,a.isRegExp=function(n){return n instanceof Tt||Yt.call(n)==E},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ae(0,r+e):oe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=Ct,a.noConflict=function(){return r._=Mt,this
},a.parseInt=Re,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Gt(fe()*((+t||0)-n+1))},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ne(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=qe({},r,u);var o,i=qe({},r.imports,u.imports),u=Ne(i),i=ut(i),f=0,c=r.interpolate||y,v="__p+='",c=Tt((r.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(r.evaluate||y).source+"|$","g");
n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(d,z),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=Ft(u,"return "+v).apply(e,i)
}catch(b){throw b.source=v,b}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,V)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t},a.all=ot,a.any=gt,a.detect=ft,a.foldl=st,a.foldr=vt,a.include=at,a.inject=st,Ee(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Qt.apply(t,arguments),n.apply(a,t)})}),a.first=ht,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++
}else if(r=t,null==r||e)return n[u-1];return U(n,ae(0,u-r))}},a.take=ht,a.head=ht,Ee(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:P(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=Ot,a.prototype.valueOf=Ot,Oe(["join","pop","shift"],function(n){var t=Pt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Oe(["push","reverse","sort","unshift"],function(n){var t=Pt[n];
a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Oe(["concat","slice","splice"],function(n){var t=Pt[n];a.prototype[n]=function(){return P(t.apply(this.__wrapped__,arguments))}}),ge&&Oe(["pop","shift","splice"],function(n){var t=Pt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?P(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;
a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,b="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),k="[object Arguments]",j="[object Array]",w="[object Boolean]",x="[object Date]",C="[object Function]",O="[object Number]",S="[object Object]",E="[object RegExp]",I="[object String]",N={};
N[C]=!1,N[k]=N[j]=N[w]=N[x]=N[O]=N[S]=N[E]=N[I]=!0;var A={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},$={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},F=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=F,define(function(){return F})):r&&!r.nodeType?u?(u.exports=F)._=F:r._=F:n._=F})(this);
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&Qt.call(n,"__wrapped__")?n:new L(n)}function B(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||c);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Qt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Qt.call(a,r)&&-1<bt(a[r],e)}return-1<bt(n,e,t)}}function R(n){return n.charCodeAt(0)}function T(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 D(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=V(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(U.prototype=n.prototype,c=new U,U.prototype=null,f=n.apply(c,f),tt(f)?f:c):n.apply(c,f)}var a=nt(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function P(){for(var n,t={e:Et,f:It,g:ve,i:he,j:be,k:k,b:"k(m)",c:"",h:"",l:"",m:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],e=qt,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.l+";",t.b?(r+="var n=m.length;i=-1;if("+t.b+"){",t.j&&(r+="if(l(m)){m=m.split('')}"),r+="while(++i<n){"+t.h+"}}else{"):t.i&&(r+="var n=m.length;i=-1;if(n&&j(m)){while(++i<n){i+='';"+t.h+"}}else{"),t.f&&(r+="var v=typeof m=='function';"),t.g&&t.m?(r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];",t.f&&(r+="if(!(v&&i=='prototype')){"),r+=t.h+"",t.f&&(r+="}")):(r+="for(i in m){",(t.f||t.m)&&(r+="if(",t.f&&(r+="!(v&&i=='prototype')"),t.f&&t.m&&(r+="&&"),t.m&&(r+="h.call(m,i)"),r+="){"),r+=t.h+";",(t.f||t.m)&&(r+="}")),r+="}",t.e){r+="var f=m.constructor;";
for(var u=0;7>u;u++)r+="i='"+t.k[u]+"';if(","constructor"==t.k[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.h+"}"}return(t.b||t.i)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Qt,H,Ee,rt,a,$,ue)}function z(n){return"\\"+F[n]}function M(n){return Ne[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(n){this.__wrapped__=n}function U(){}function V(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;
for(var u=At(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function G(n){return Ae[n]}function H(n){return Zt.call(n)==w}function J(n){var t=!1;if(!n||typeof n!="object"||H(n))return t;var e=n.constructor;return!nt(e)&&(!de||!K(n))||e instanceof e?Nt?(Oe(n,function(n,e,r){return t=!Qt.call(r,e),!1}),!1===t):(Oe(n,function(n,e){t=e}),!1===t||Qt.call(n,t)):t}function Q(n){var t=[];return Se(n,function(n,e){t.push(e)}),t}function W(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
f=n}if(u=tt(f)){var c=Zt.call(f);if(!A[c]||de&&K(f))return f;var l=Ee(f)}if(!u||!t)return u?l?V(f):$e({},f):f;switch(u=ke[c],c){case x:case C:return new u(+f);case S:case N:return new u(f);case I:return u(f.source,g.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Qt.call(n,"index")&&(f.index=n.index),Qt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?lt:Se)(n,function(n,u){f[u]=W(n,t,r,e,o,i)}),f}function X(n){var t=[];return Oe(n,function(n,e){nt(n)&&t.push(e)
}),t.sort()}function Y(n){for(var t=-1,e=Ie(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Z(n,t,e,r,u,o){var i=e===f;if(e&&!i){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Zt.call(n),l=Zt.call(t),p==w&&(p=E),l==w&&(l=E),p!=l)return!1;switch(p){case x:case C:return+n==+t;
case S:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case N:return n==t+""}if(l=p==j,!l){if(Qt.call(n,"__wrapped__")||Qt.call(t,"__wrapped__"))return Z(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=E||de&&(K(n)||K(t)))return!1;var p=!ye&&H(n)?Tt:n.constructor,s=!ye&&H(t)?Tt:t.constructor;if(p!=s&&(!nt(p)||!(p instanceof p&&nt(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!i)return c;
for(;v--;)if(l=p,s=t[v],i)for(;l--&&!(c=Z(n[l],s,e,r,u,o)););else if(!(c=Z(n[v],s,e,r,u,o)))break;return c}return Oe(t,function(t,a,i){return Qt.call(i,a)?(v++,c=Qt.call(n,a)&&Z(n[a],t,e,r,u,o)):void 0}),c&&!i&&Oe(n,function(n,t,e){return Qt.call(e,t)?c=-1<--v:void 0}),c}function nt(n){return typeof n=="function"}function tt(n){return n?$[typeof n]:!1}function et(n){return typeof n=="number"||Zt.call(n)==S}function rt(n){return typeof n=="string"||Zt.call(n)==N}function ut(n,t,e){var r=arguments,u=0,o=2;
if(!tt(n))return n;if(e===f)var i=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?i=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(i=r[--o]);for(;++u<o;)(Ee(r[u])?lt:Se)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=Ee(t))||qe(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?Ee(o)?o:[]:qe(o)?o:{},i&&(a=i(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),i||(o=ut(o,t,f,i,c,l)))}else i&&(a=i(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
n[e]=o});return n}function at(n){for(var t=-1,e=Ie(n),r=e.length,u=At(r);++t<r;)u[t]=n[e[t]];return u}function ot(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ae(0,u+e):e)||0,typeof u=="number"?a=-1<(rt(n)?n.indexOf(t,e):bt(n,t,e)):Ce(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function it(n,t,e){var r=!0;if(t=a.createCallback(t,e),Ee(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else Ce(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ft(n,t,e){var r=[];if(t=a.createCallback(t,e),Ee(n)){e=-1;
for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else Ce(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ct(n,t,e){var r;return t=a.createCallback(t,e),lt(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function lt(n,t,e){if(t&&typeof e=="undefined"&&Ee(n)){e=-1;for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else Ce(n,t,e);return n}function pt(n,t,e){var r=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);if(t=a.createCallback(t,e),Ee(n))for(;++r<u;)o[r]=t(n[r],r,n);else Ce(n,function(n,e,u){o[++r]=t(n,e,u)
});return o}function st(n,t,e){var r=-1/0,u=r;if(!t&&Ee(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&rt(n)?R:a.createCallback(t,e),Ce(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function vt(n,t,e,r){var u=3>arguments.length;if(t=a.createCallback(t,r,4),Ee(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else Ce(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function gt(n,t,e,r){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=Ie(n),o=f.length;
else be&&rt(n)&&(u=n.split(""));return t=a.createCallback(t,r,4),lt(n,function(n,r,a){r=f?f[--o]:--o,e=i?(i=!1,u[r]):t(e,u[r],r,a)}),e}function ht(n,t,e){var r;if(t=a.createCallback(t,e),Ee(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else Ce(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function yt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return V(n,0,oe(ae(0,r),u))
}}function mt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),Ee(r)?Wt.apply(i,t?r:mt(r)):i.push(r);return i}function bt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ae(0,u+e):e||0)-1;else if(e)return r=_t(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++
}else r=null==t||e?1:ae(0,t);return V(n,r)}function _t(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):Ct,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function kt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Qt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>bt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i
}function wt(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 jt(n,t){return se||ne&&2<arguments.length?ne.call.apply(ne,arguments):D(n,t,V(arguments,2))}function xt(n){var t=V(arguments,1);return Yt(function(){n.apply(e,t)},1)}function Ct(n){return n}function Ot(n){lt(X(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Wt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new L(t)}})}function St(){return this.__wrapped__
}r=r?q.defaults(n.Object(),r,q.pick(n,_)):n;var Et,It,Nt,At=r.Array,$t=r.Boolean,Ft=r.Date,qt=r.Function,Bt=r.Math,Rt=r.Number,Tt=r.Object,Dt=r.RegExp,Pt=r.String,zt=At(),Mt=Tt(),Kt=r._,Lt=Dt("^"+(Mt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ut=Bt.ceil,Vt=r.clearTimeout,Gt=zt.concat,Ht=Bt.floor,Jt=Lt.test(Jt=Tt.getPrototypeOf)&&Jt,Qt=Mt.hasOwnProperty,Wt=zt.push,Xt=r.setImmediate,Yt=r.setTimeout,Zt=Mt.toString,ne=Lt.test(ne=V.bind)&&ne,te=Lt.test(te=At.isArray)&&te,ee=r.isFinite,re=r.isNaN,ue=Lt.test(ue=Tt.keys)&&ue,ae=Bt.max,oe=Bt.min,ie=r.parseInt,fe=Bt.random,ce=Lt.test(r.attachEvent),le=!/\n{2,}/.test(qt()),pe=ne&&!/\n|true/.test(ne+ce),se=ne&&!pe,ve=ue&&(ce||pe||!le),ge=(ge={0:1,length:1},zt.splice.call(ge,0,1),ge[0]),he=!0;
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var e in new n)t.push(e);for(e in arguments)he=!e;Et=!/valueOf/.test(t),It=n.propertyIsEnumerable("prototype"),Nt="x"!=t[0]})(1);var ye=arguments.constructor==Tt,me=!H(arguments),be="xx"!="x"[0]+Tt("x")[0];try{var de=Zt.call(document)==E&&!({toString:0}+"")}catch(_e){}var ke={};ke[j]=At,ke[x]=$t,ke[C]=Ft,ke[E]=Tt,ke[S]=Rt,ke[I]=Dt,ke[N]=Pt,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:y,variable:"",imports:{_:a}};
var we={a:"q,w,g",l:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",h:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},je={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",h:"if(d(m[i],i,e)===false)return u"},xe={l:"if(!r[typeof m])return u;"+je.l,b:!1},Ce=P(je);L.prototype=o.prototype,me&&(H=function(n){return n?Qt.call(n,"callee"):!1});var Oe=P(je,xe,{m:!1}),Se=P(je,xe),Ee=te||function(n){return ye&&n instanceof At||Zt.call(n)==j
},Ie=ue?function(n){return tt(n)?It&&typeof n=="function"||he&&n.length&&H(n)?Q(n):ue(n):[]}:Q,Ne={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ae=Y(Ne),$e=P(we,{l:we.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[i]=d?d(u[i],m[i]):m[i]"}),Fe=P(we);nt(/x/)&&(nt=function(n){return n instanceof qt||Zt.call(n)==O});var qe=Jt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Jt(t))&&Jt(e);
return e?n==e||Jt(n)==e&&!H(n):J(n)}:J,Be=8==ie("08")?ie:function(n,t){return ie(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)},Re=pt,Te=ft;return pe&&u&&typeof Xt=="function"&&(xt=jt(Xt,r)),a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=$e,a.at=function(n){var t=-1,e=Gt.apply(zt,V(arguments,1)),r=e.length,u=At(r);for(be&&rt(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=jt,a.bindAll=function(n){for(var t=Gt.apply(zt,arguments),e=1<t.length?0:(t=X(n),-1),r=t.length;++e<r;){var u=t[e];
n[u]=jt(n[u],n)}return n},a.bindKey=function(n,t){return D(n,t,V(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),lt(n,function(n,e,u){e=t(n,e,u)+"",Qt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return Ct;var r=typeof n;
if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=Ie(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Z(t[u[e]],n[u[e]],f)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Vt(i),i=Yt(r,t),f&&(a=n.apply(o,u)),a
}},a.defaults=Fe,a.defer=xt,a.delay=function(n,t){var r=V(arguments,2);return Yt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Gt.apply(zt,arguments),r=B(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ft,a.flatten=mt,a.forEach=lt,a.forIn=Oe,a.forOwn=Se,a.functions=X,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),lt(n,function(n,e,u){e=t(n,e,u)+"",(Qt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];
var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return V(n,0,oe(ae(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Qt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>bt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=B(t[p],0,100)))(c))continue n;i.push(c)}}return i},a.invert=Y,a.invoke=function(n,t){var e=V(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=At(typeof a=="number"?a:0);
return lt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=Ie,a.map=pt,a.max=st,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Qt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=ut,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&Ee(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&rt(n)?R:a.createCallback(t,e),Ce(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};
if(r)t=a.createCallback(t,e);else var o=Gt.apply(zt,arguments);return Oe(n,function(n,e,a){(r?!t(n,e,a):0>bt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=Ie(n),r=e.length,u=At(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return D(n,V(arguments,1))},a.partialRight=function(n){return D(n,V(arguments,1),null,f)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Gt.apply(zt,arguments),i=tt(n)?o.length:0;++u<i;){var f=o[u];
f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),Oe(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=Re,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ae(0,Ut((t-n)/e));for(var u=At(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ft(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=At(typeof e=="number"?e:0);return lt(n,function(n){var e=Ht(fe()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);
for(t=a.createCallback(t,e),lt(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(T);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Ft,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Ft,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Yt(e,c)):(Vt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=+n||0;for(var r=-1,u=At(n);++r<n;)u[r]=t.call(e,r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?be&&rt(n)?n.split(""):V(n):at(n)
},a.union=function(){return kt(Gt.apply(zt,arguments))},a.uniq=kt,a.values=at,a.where=Te,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Wt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?st(Re(arguments,"length")):0,r=At(e);++t<e;)r[t]=Re(arguments,t);return r},a.zipObject=wt,a.collect=pt,a.drop=dt,a.each=lt,a.extend=$e,a.methods=X,a.object=wt,a.select=ft,a.tail=dt,a.unique=kt,Ot(a),a.clone=W,a.cloneDeep=function(n,t,e){return W(n,!0,t,e)
},a.contains=ot,a.escape=function(n){return null==n?"":(n+"").replace(b,M)},a.every=it,a.find=ct,a.has=function(n,t){return n?Qt.call(n,t):!1},a.identity=Ct,a.indexOf=bt,a.isArguments=H,a.isArray=Ee,a.isBoolean=function(n){return!0===n||!1===n||Zt.call(n)==x},a.isDate=function(n){return n instanceof Ft||Zt.call(n)==C},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Zt.call(n),r=n.length;return e==j||e==N||e==w||me&&H(n)||e==E&&typeof r=="number"&&nt(n.splice)?!r:(Se(n,function(){return t=!1
}),t)},a.isEqual=Z,a.isFinite=function(n){return ee(n)&&!re(parseFloat(n))},a.isFunction=nt,a.isNaN=function(n){return et(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=et,a.isObject=tt,a.isPlainObject=qe,a.isRegExp=function(n){return n instanceof Dt||Zt.call(n)==I},a.isString=rt,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ae(0,r+e):oe(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=Ot,a.noConflict=function(){return r._=Kt,this
},a.parseInt=Be,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ht(fe()*((+t||0)-n+1))},a.reduce=vt,a.reduceRight=gt,a.result=function(n,t){var r=n?n[t]:e;return nt(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ie(n).length},a.some=ht,a.sortedIndex=_t,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=Fe({},r,u);var o,i=Fe({},r.imports,u.imports),u=Ie(i),i=at(i),f=0,c=r.interpolate||m,l="__p+='",c=Dt((r.escape||m).source+"|"+c.source+"|"+(c===y?h:m).source+"|"+(r.evaluate||m).source+"|$","g");
n.replace(c,function(t,e,r,u,a,i){return r||(r=u),l+=n.slice(f,i).replace(d,z),e&&(l+="'+__e("+e+")+'"),a&&(o=!0,l+="';"+a+";__p+='"),r&&(l+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),l+="';\n",c=r=r.variable,c||(r="obj",l="with("+r+"){"+l+"}"),l=(o?l.replace(p,""):l).replace(s,"$1").replace(v,"$1;"),l="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var g=qt(u,"return "+l).apply(e,i)
}catch(b){throw b.source=l,b}return t?g(t):(g.source=l,g)},a.unescape=function(n){return null==n?"":(n+"").replace(l,G)},a.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},a.all=it,a.any=ht,a.detect=ct,a.foldl=vt,a.foldr=gt,a.include=ot,a.inject=vt,Se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Wt.apply(t,arguments),n.apply(a,t)})}),a.first=yt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++
}else if(r=t,null==r||e)return n[u-1];return V(n,ae(0,u-r))}},a.take=yt,a.head=yt,Se(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:new L(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=St,a.prototype.valueOf=St,Ce(["join","pop","shift"],function(n){var t=zt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Ce(["push","reverse","sort","unshift"],function(n){var t=zt[n];
a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Ce(["concat","slice","splice"],function(n){var t=zt[n];a.prototype[n]=function(){return new L(t.apply(this.__wrapped__,arguments))}}),ge&&Ce(["pop","shift","splice"],function(n){var t=zt[n],e="splice"==n;a.prototype[n]=function(){var n=this.__wrapped__,r=t.apply(n,arguments);return 0===n.length&&delete n[0],e?new L(r):r}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;
a.global===a&&(n=a);var i=0,f={},c=30,l=/&(?:amp|lt|gt|quot|#39);/g,p=/\b__p\+='';/g,s=/\b(__p\+=)''\+/g,v=/(__e\(.*?\)|\b__t\))\+'';/g,g=/\w*$/,h=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,y=/<%=([\s\S]+?)%>/g,m=/($^)/,b=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,_="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),k="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),w="[object Arguments]",j="[object Array]",x="[object Boolean]",C="[object Date]",O="[object Function]",S="[object Number]",E="[object Object]",I="[object RegExp]",N="[object String]",A={};
A[O]=!1,A[w]=A[j]=A[x]=A[C]=A[S]=A[E]=A[I]=A[N]=!0;var $={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},F={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},q=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=q,define(function(){return q})):r&&!r.nodeType?u?(u.exports=q)._=q:r._=q:n._=q})(this);

64
dist/lodash.js vendored
View File

@@ -169,7 +169,6 @@
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = context.isFinite,
nativeIsNaN = context.isNaN,
@@ -242,15 +241,10 @@
* @returns {Object} Returns a `lodash` instance.
*/
function lodash(value) {
// allow invoking `lodash` without the `new` operator
if (!(this instanceof lodash)) {
return new lodash(value);
}
// exit early if already wrapped, even if wrapped by a different `lodash` constructor
if (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__')) {
return value;
}
this.__wrapped__ = value;
// don't wrap if already wrapped, even if wrapped by a different `lodash` constructor
return (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__'))
? value
: new lodashWrapper(value);
}
/**
@@ -519,7 +513,9 @@
}
if (this instanceof bound) {
// ensure `new bound` is an instance of `func`
thisBinding = createObject(func.prototype);
noop.prototype = func.prototype;
thisBinding = new noop;
noop.prototype = null;
// mimic the constructor's `return` behavior
// http://es5.github.com/#x13.2.2
@@ -579,33 +575,6 @@
);
}
/**
* Creates a new object that inherits from the given `prototype` object.
*
* @private
* @param {Object} prototype The prototype object.
* @returns {Object} Returns the new object.
*/
var createObject = nativeCreate || function(prototype) {
noop.prototype = prototype;
var result = new noop;
noop.prototype = null;
return result;
};
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function createWrapper(value) {
var result = createObject(lodash.prototype);
result.__wrapped__ = value;
return result;
}
/**
* A function compiled to iterate `arguments` objects, arrays, objects, and
* strings consistenly across environments, executing the `callback` for each
@@ -658,6 +627,19 @@
return typeof value.toString != 'function' && typeof (value + '') == 'string';
}
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function lodashWrapper(value) {
this.__wrapped__ = value;
}
// ensure `new lodashWrapper` is an instance of `lodash`
lodashWrapper.prototype = lodash.prototype;
/**
* A no-operation function.
*
@@ -4483,7 +4465,7 @@
var result = func.apply(lodash, args);
return (value && typeof value == 'object' && value == result)
? this
: createWrapper(result);
: new lodashWrapper(result);
};
});
}
@@ -5039,7 +5021,7 @@
var result = func(this.__wrapped__, callback, thisArg);
return callback == null || (thisArg && typeof callback != 'function')
? result
: createWrapper(result);
: new lodashWrapper(result);
};
}
});
@@ -5081,7 +5063,7 @@
each(['concat', 'slice', 'splice'], function(methodName) {
var func = arrayRef[methodName];
lodash.prototype[methodName] = function() {
return createWrapper(func.apply(this.__wrapped__, arguments));
return new lodashWrapper(func.apply(this.__wrapped__, arguments));
};
});

71
dist/lodash.min.js vendored
View File

@@ -4,38 +4,39 @@
* Build: `lodash modern -o ./dist/lodash.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function t(r){function a(n){return this instanceof a?n&&typeof n=="object"&&Mt.call(n,"__wrapped__")?n:(this.__wrapped__=n,void 0):new a(n)}function $(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||f);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Mt.call(a,o)?a[o]:a[o]=[]).push(n[e])}}return function(e){if(u){var r=e+"";return Mt.call(a,r)&&-1<vt(a[r],e)}return-1<vt(n,e,t)}}function F(n){return n.charCodeAt(0)}function q(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function B(n,t,e,r){function u(){var f=arguments,c=o?this:t;return a||(n=t[i]),e.length&&(f=f.length?(f=M(f),r?f.concat(e):e.concat(f)):e),this instanceof u?(c=pe(n.prototype),f=n.apply(c,f),W(f)?f:c):n.apply(c,f)}var a=Q(n),o=!e,i=t;return o&&(e=t),a||(t=n),u}function R(){for(var n,t={g:oe,b:"k(m)",c:"",h:"",l:"",m:!0},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Ot,r="var i,m="+t.d+",u=m;if(!m)return u;"+t.l+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.h+"}}else{"),t.g&&t.m?r+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];"+t.h+"}":(r+="for(i in m){",t.m&&(r+="if(",t.m&&(r+="h.call(m,i)"),r+="){"),r+=t.h+";",t.m&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,r,p","return function("+n+"){"+r+"}")(Mt,U,he,Y,a,A,Xt)
}function T(n){var t=pe(a.prototype);return t.__wrapped__=n,t}function D(n){return"\\"+E[n]}function z(n){return me[n]}function P(){}function M(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=wt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function K(n){return be[n]}function U(n){return Gt.call(n)==_}function V(n){var t=[];return ge(n,function(n,e){t.push(e)}),t}function G(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
f=n}if(u=W(f)){var c=Gt.call(f);if(!S[c])return f;var l=he(f)}if(!u||!t)return u?l?M(f):de({},f):f;switch(u=ie[c],c){case j:case w:return new u(+f);case C:case N:return new u(f);case O:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Mt.call(n,"index")&&(f.index=n.index),Mt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?at:ge)(n,function(n,u){f[u]=G(n,t,r,e,o,i)}),f}function H(n){var t=[];return ve(n,function(n,e){Q(n)&&t.push(e)
}),t.sort()}function J(n){for(var t=-1,e=ye(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function L(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Gt.call(n),l=Gt.call(t),p==_&&(p=x),l==_&&(l=x),p!=l)return!1;switch(p){case j:case w:return+n==+t;
case C:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case O:case N:return n==t+""}if(l=p==k,!l){if(Mt.call(n,"__wrapped__")||Mt.call(t,"__wrapped__"))return L(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=x)return!1;var p=n.constructor,s=t.constructor;if(p!=s&&(!Q(p)||!(p instanceof p&&Q(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=L(n[l],s,e,r,u,o)););else if(!(c=L(n[v],s,e,r,u,o)))break;
return c}return ve(t,function(t,a,i){return Mt.call(i,a)?(v++,c=Mt.call(n,a)&&L(n[a],t,e,r,u,o)):void 0}),c&&!f&&ve(n,function(n,t,e){return Mt.call(e,t)?c=-1<--v:void 0}),c}function Q(n){return typeof n=="function"}function W(n){return n?A[typeof n]:!1}function X(n){return typeof n=="number"||Gt.call(n)==C}function Y(n){return typeof n=="string"||Gt.call(n)==N}function Z(n,t,e){var r=arguments,u=0,o=2;if(!W(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);
for(;++u<o;)(he(r[u])?at:ge)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=he(t))||ke(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}r||(o=u?he(o)?o:[]:ke(o)?o:{},f&&(a=f(o,t),typeof a!="undefined"&&(o=a)),c.push(t),l.push(o),f||(o=Z(o,t,i,f,c,l)))}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);n[e]=o});return n}function nt(n){for(var t=-1,e=ye(n),r=e.length,u=wt(r);++t<r;)u[t]=n[e[t]];return u}function tt(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?Yt(0,u+e):e)||0,typeof u=="number"?a=-1<(Y(n)?n.indexOf(t,e):vt(n,t,e)):se(n,function(n){return++r<e?void 0:!(a=n===t)
}),a}function et(n,t,e){var r=!0;if(t=a.createCallback(t,e),he(n)){e=-1;for(var u=n.length;++e<u&&(r=!!t(n[e],e,n)););}else se(n,function(n,e,u){return r=!!t(n,e,u)});return r}function rt(n,t,e){var r=[];if(t=a.createCallback(t,e),he(n)){e=-1;for(var u=n.length;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}}else se(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ut(n,t,e){var r;return t=a.createCallback(t,e),at(n,function(n,e,u){return t(n,e,u)?(r=n,!1):void 0}),r}function at(n,t,e){if(t&&typeof e=="undefined"&&he(n)){e=-1;
for(var r=n.length;++e<r&&!1!==t(n[e],e,n););}else se(n,t,e);return n}function ot(n,t,e){var r=-1,u=n?n.length:0,o=wt(typeof u=="number"?u:0);if(t=a.createCallback(t,e),he(n))for(;++r<u;)o[r]=t(n[r],r,n);else se(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function it(n,t,e){var r=-1/0,u=r;if(!t&&he(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Y(n)?F:a.createCallback(t,e),se(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ft(n,t,e,r){var u=3>arguments.length;
if(t=a.createCallback(t,r,4),he(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else se(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function ct(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ye(n),u=i.length;return t=a.createCallback(t,r,4),at(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function lt(n,t,e){var r;if(t=a.createCallback(t,e),he(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else se(n,function(n,e,u){return!(r=t(n,e,u))
});return!!r}function pt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return M(n,0,Zt(Yt(0,r),u))}}function st(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),he(r)?Kt.apply(i,t?r:st(r)):i.push(r);return i}function vt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?Yt(0,u+e):e||0)-1;
else if(e)return r=ht(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function gt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:Yt(0,t);return M(n,r)}function ht(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):_t,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function yt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],f=i;typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var c=!t&&75<=o;
if(c)var l={};for(null!=e&&(f=[],e=a.createCallback(e,r));++u<o;){r=n[u];var p=e?e(r,u,n):r;if(c)var s=p+"",s=Mt.call(l,s)?!(f=l[s]):f=l[s]=[];(t?!u||f[f.length-1]!==p:s||0>vt(f,p))&&((e||c)&&f.push(p),i.push(r))}return i}function mt(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 ae||Ht&&2<arguments.length?Ht.call.apply(Ht,arguments):B(n,t,M(arguments,2))}function dt(n){var t=M(arguments,1);return Vt(function(){n.apply(e,t)},1)}function _t(n){return n
}function kt(n){at(H(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Kt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:T(t)}})}function jt(){return this.__wrapped__}r=r?I.defaults(n.Object(),r,I.pick(n,d)):n;var wt=r.Array,Ct=r.Boolean,xt=r.Date,Ot=r.Function,Nt=r.Math,St=r.Number,At=r.Object,Et=r.RegExp,It=r.String,$t=wt(),Ft=At(),qt=r._,Bt=Et("^"+(Ft.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Rt=Nt.ceil,Tt=r.clearTimeout,Dt=$t.concat,zt=Nt.floor,Pt=Bt.test(Pt=At.getPrototypeOf)&&Pt,Mt=Ft.hasOwnProperty,Kt=$t.push,Ut=r.setImmediate,Vt=r.setTimeout,Gt=Ft.toString,Ht=Bt.test(Ht=M.bind)&&Ht,Jt=Bt.test(Jt=At.create)&&Jt,Lt=Bt.test(Lt=wt.isArray)&&Lt,Qt=r.isFinite,Wt=r.isNaN,Xt=Bt.test(Xt=At.keys)&&Xt,Yt=Nt.max,Zt=Nt.min,ne=r.parseInt,te=Nt.random,ee=Bt.test(r.attachEvent),re=!/\n{2,}/.test(Ot()),ue=Ht&&!/\n|true/.test(Ht+ee),ae=Ht&&!ue,oe=Xt&&(ee||ue||!re),ie={};
ie[k]=wt,ie[j]=Ct,ie[w]=xt,ie[x]=At,ie[C]=St,ie[O]=Et,ie[N]=It,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:a}};var fe={a:"q,w,g",l:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",h:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},ce={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",h:"if(d(m[i],i,e)===false)return u"},le={l:"if(!r[typeof m])return u;"+ce.l,b:!1},pe=Jt||function(n){return P.prototype=n,n=new P,P.prototype=null,n
},se=R(ce),ve=R(ce,le,{m:!1}),ge=R(ce,le),he=Lt||function(n){return n instanceof wt||Gt.call(n)==k},ye=Xt?function(n){return W(n)?Xt(n):[]}:V,me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},be=J(me),de=R(fe,{l:fe.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[i]=d?d(u[i],m[i]):m[i]"}),_e=R(fe),ke=function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Pt(t))&&Pt(e);
if(e)n=n==e||Pt(n)==e&&!U(n);else{var r=!1;!n||typeof n!="object"||U(n)?n=r:(t=n.constructor,!Q(t)||t instanceof t?(ve(n,function(n,t){r=t}),n=!1===r||Mt.call(n,r)):n=r)}return n},je=8==ne("08")?ne:function(n,t){return ne(Y(n)?n.replace(/^0+(?=.$)/,""):n,t||0)};return ue&&u&&typeof Ut=="function"&&(dt=bt(Ut,r)),a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=de,a.at=function(n){for(var t=-1,e=Dt.apply($t,M(arguments,1)),r=e.length,u=wt(r);++t<r;)u[t]=n[e[t]];
return u},a.bind=bt,a.bindAll=function(n){for(var t=Dt.apply($t,arguments),e=1<t.length?0:(t=H(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=bt(n[u],n)}return n},a.bindKey=function(n,t){return B(n,t,M(arguments,2))},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),at(n,function(n,e,u){e=t(n,e,u)+"",Mt.call(r,e)?r[e]++:r[e]=1
}),r},a.createCallback=function(n,t,e){if(null==n)return _t;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ye(n);return function(t){for(var e=u.length,r=!1;e--&&(r=L(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))
}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Tt(i),i=Vt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=_e,a.defer=dt,a.delay=function(n,t){var r=M(arguments,2);return Vt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Dt.apply($t,arguments),r=$(r,e),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=rt,a.flatten=st,a.forEach=at,a.forIn=ve,a.forOwn=ge,a.functions=H,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),at(n,function(n,e,u){e=t(n,e,u)+"",(Mt.call(r,e)?r[e]:r[e]=[]).push(n)
}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return M(n,0,Zt(Yt(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Mt.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>vt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=$(t[p],0,100)))(c))continue n;i.push(c)
}}return i},a.invert=J,a.invoke=function(n,t){var e=M(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=wt(typeof a=="number"?a:0);return at(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ye,a.map=ot,a.max=it,a.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";return Mt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=Z,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&he(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&Y(n)?F:a.createCallback(t,e),se(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)
});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Dt.apply($t,arguments);return ve(n,function(n,e,a){(r?!t(n,e,a):0>vt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ye(n),r=e.length,u=wt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return B(n,M(arguments,1))},a.partialRight=function(n){return B(n,M(arguments,1),null,i)
},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Dt.apply($t,arguments),i=W(n)?o.length:0;++u<i;){var f=o[u];f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),ve(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=ot,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=Yt(0,Rt((t-n)/e));for(var u=wt(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),rt(n,function(n,e,r){return!t(n,e,r)})},a.rest=gt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=wt(typeof e=="number"?e:0);
return at(n,function(n){var e=zt(te()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=wt(typeof u=="number"?u:0);for(t=a.createCallback(t,e),at(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(q);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new xt,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new xt,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Vt(e,c)):(Tt(o),o=null,i=f,u=n.apply(a,r)),u
}},a.times=function(n,t,e){n=+n||0;for(var r=-1,u=wt(n);++r<n;)u[r]=t.call(e,r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?M(n):nt(n)},a.union=function(){return yt(Dt.apply($t,arguments))},a.uniq=yt,a.values=nt,a.where=rt,a.without=function(n){for(var t=-1,e=n?n.length:0,r=$(arguments,1),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Kt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?it(ot(arguments,"length")):0,r=wt(e);++t<e;)r[t]=ot(arguments,t);
return r},a.zipObject=mt,a.collect=ot,a.drop=gt,a.each=at,a.extend=de,a.methods=H,a.object=mt,a.select=rt,a.tail=gt,a.unique=yt,kt(a),a.clone=G,a.cloneDeep=function(n,t,e){return G(n,!0,t,e)},a.contains=tt,a.escape=function(n){return null==n?"":(n+"").replace(m,z)},a.every=et,a.find=ut,a.has=function(n,t){return n?Mt.call(n,t):!1},a.identity=_t,a.indexOf=vt,a.isArguments=U,a.isArray=he,a.isBoolean=function(n){return!0===n||!1===n||Gt.call(n)==j},a.isDate=function(n){return n instanceof xt||Gt.call(n)==w
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Gt.call(n),r=n.length;return e==k||e==N||e==_||e==x&&typeof r=="number"&&Q(n.splice)?!r:(ge(n,function(){return t=!1}),t)},a.isEqual=L,a.isFinite=function(n){return Qt(n)&&!Wt(parseFloat(n))},a.isFunction=Q,a.isNaN=function(n){return X(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=X,a.isObject=W,a.isPlainObject=ke,a.isRegExp=function(n){return n instanceof Et||Gt.call(n)==O},a.isString=Y,a.isUndefined=function(n){return typeof n=="undefined"
},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?Yt(0,r+e):Zt(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=kt,a.noConflict=function(){return r._=qt,this},a.parseInt=je,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+zt(te()*((+t||0)-n+1))},a.reduce=ft,a.reduceRight=ct,a.result=function(n,t){var r=n?n[t]:e;return Q(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ye(n).length
},a.some=lt,a.sortedIndex=ht,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=_e({},r,u);var o,i=_e({},r.imports,u.imports),u=ye(i),i=nt(i),f=0,c=r.interpolate||y,v="__p+='",c=Et((r.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(r.evaluate||y).source+"|$","g");n.replace(c,function(t,e,r,u,a,i){return r||(r=u),v+=n.slice(f,i).replace(b,D),e&&(v+="'+__e("+e+")+'"),a&&(o=!0,v+="';"+a+";__p+='"),r&&(v+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t}),v+="';\n",c=r=r.variable,c||(r="obj",v="with("+r+"){"+v+"}"),v=(o?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+r+"){"+(c?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";
try{var m=Ot(u,"return "+v).apply(e,i)}catch(d){throw d.source=v,d}return t?m(t):(m.source=v,m)},a.unescape=function(n){return null==n?"":(n+"").replace(c,K)},a.uniqueId=function(n){var t=++o;return(null==n?"":n+"")+t},a.all=et,a.any=lt,a.detect=ut,a.foldl=ft,a.foldr=ct,a.include=tt,a.inject=ft,ge(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Kt.apply(t,arguments),n.apply(a,t)})}),a.first=pt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return M(n,Yt(0,u-r))}},a.take=pt,a.head=pt,ge(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);return null==t||e&&typeof t!="function"?r:T(r)})}),a.VERSION="1.0.1",a.prototype.toString=function(){return this.__wrapped__+""},a.prototype.value=jt,a.prototype.valueOf=jt,se(["join","pop","shift"],function(n){var t=$t[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
}}),se(["push","reverse","sort","unshift"],function(n){var t=$t[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),se(["concat","slice","splice"],function(n){var t=$t[n];a.prototype[n]=function(){return T(t.apply(this.__wrapped__,arguments))}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var o=0,i={},f=30,c=/&(?:amp|lt|gt|quot|#39);/g,l=/\b__p\+='';/g,p=/\b(__p\+=)''\+/g,s=/(__e\(.*?\)|\b__t\))\+'';/g,v=/\w*$/,g=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,h=/<%=([\s\S]+?)%>/g,y=/($^)/,m=/[&<>"']/g,b=/['\n\r\t\u2028\u2029\\]/g,d="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),_="[object Arguments]",k="[object Array]",j="[object Boolean]",w="[object Date]",C="[object Number]",x="[object Object]",O="[object RegExp]",N="[object String]",S={"[object Function]":!1};
S[_]=S[k]=S[j]=S[w]=S[C]=S[x]=S[O]=S[N]=!0;var A={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},E={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},I=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=I,define(function(){return I})):r&&!r.nodeType?u?(u.exports=I)._=I:r._=I:n._=I})(this);
;(function(n){function t(i){function c(n){if(!n||typeof n!="object")return a;var t=n.valueOf,e=typeof t=="function"&&(e=Gt(t))&&Gt(e);if(e)n=n==e||Gt(n)==e&&!L(n);else{var r=a;!n||typeof n!="object"||L(n)?n=r:(t=n.constructor,!nt(t)||t instanceof t?(le(n,function(n,t){r=t}),n=r===a||Ht.call(n,r)):n=r)}return n}function R(n){return n&&typeof n=="object"&&Ht.call(n,"__wrapped__")?n:new V(n)}function T(n,t,e){t||(t=0);var r=n.length,u=r-t>=(e||s);if(u){var a={};for(e=t-1;++e<r;){var o=n[e]+"";(Ht.call(a,o)?a[o]:a[o]=[]).push(n[e])
}}return function(e){if(u){var r=e+"";return Ht.call(a,r)&&-1<bt(a[r],e)}return-1<bt(n,e,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function P(n,t,e,r){function a(){var c=arguments,l=i?this:t;return o||(n=t[f]),e.length&&(c=c.length?(c=H(c),r?c.concat(e):e.concat(c)):e),this instanceof a?(G.prototype=n.prototype,l=new G,G.prototype=u,c=n.apply(l,c),tt(c)?c:l):n.apply(l,c)
}var o=nt(n),i=!e,f=t;return i&&(e=t),o||(t=n),a}function M(){for(var n,t={g:ie,b:"k(m)",c:"",h:"",l:"",m:r},e=0;n=arguments[e];e++)for(var u in n)t[u]=n[u];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e="var i,m="+t.d+",u=m;if(!m)return u;"+t.l+";",t.b&&(e+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.h+"}}else{"),t.g&&t.m?e+="var s=-1,t=r[typeof m]?p(m):[],n=t.length;while(++s<n){i=t[s];"+t.h+"}":(e+="for(i in m){",t.m&&(e+="if(",t.m&&(e+="h.call(m,i)"),e+="){"),e+=t.h+";",t.m&&(e+="}"),e+="}"),t.b&&(e+="}"),e+=t.c+";return u",It("h,j,k,l,o,r,p","return function("+n+"){"+e+"}")(Ht,L,se,rt,R,F,te)
}function K(n){return"\\"+q[n]}function U(n){return ge[n]}function V(n){this.__wrapped__=n}function G(){}function H(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=St(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function J(n){return he[n]}function L(n){return Wt.call(n)==C}function Q(n){var t=[];return pe(n,function(n,e){t.push(e)}),t}function W(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=a),typeof r=="function"){if(r=typeof u=="undefined"?r:R.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
f=n}if(u=tt(f)){var c=Wt.call(f);if(!$[c])return f;var l=se(f)}if(!u||!t)return u?l?H(f):ye({},f):f;switch(u=fe[c],c){case O:case N:return new u(+f);case S:case I:return new u(f);case E:return u(f.source,m.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Ht.call(n,"index")&&(f.index=n.index),Ht.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?lt:pe)(n,function(n,u){f[u]=W(n,t,r,e,o,i)}),f}function X(n){var t=[];return le(n,function(n,e){nt(n)&&t.push(e)
}),t.sort()}function Y(n){for(var t=-1,e=ve(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Z(n,t,e,o,i,f){var c=e===p;if(e&&!c){e=typeof o=="undefined"?e:R.createCallback(e,o,2);var l=e(n,t);if(typeof l!="undefined")return!!l}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=Wt.call(n),s=Wt.call(t),v==C&&(v=A),s==C&&(s=A),v!=s)return a;switch(v){case O:case N:return+n==+t;
case S:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case E:case I:return n==t+""}if(s=v==x,!s){if(Ht.call(n,"__wrapped__")||Ht.call(t,"__wrapped__"))return Z(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=A)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!nt(v)||!(v instanceof v&&nt(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var h=0,l=r;if(i.push(n),f.push(t),s){if(v=n.length,h=t.length,l=h==n.length,!l&&!c)return l;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(l=Z(n[s],g,e,o,i,f)););else if(!(l=Z(n[h],g,e,o,i,f)))break;
return l}return le(t,function(t,r,u){return Ht.call(u,r)?(h++,l=Ht.call(n,r)&&Z(n[r],t,e,o,i,f)):void 0}),l&&!c&&le(n,function(n,t,e){return Ht.call(e,t)?l=-1<--h:void 0}),l}function nt(n){return typeof n=="function"}function tt(n){return n?F[typeof n]:a}function et(n){return typeof n=="number"||Wt.call(n)==S}function rt(n){return typeof n=="string"||Wt.call(n)==I}function ut(n,t,e){var r=arguments,u=0,a=2;if(!tt(n))return n;if(e===p)var o=r[3],i=r[4],f=r[5];else i=[],f=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=R.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
for(;++u<a;)(se(r[u])?lt:pe)(r[u],function(t,e){var r,u,a=t,l=n[e];if(t&&((u=se(t))||c(t))){for(a=i.length;a--;)if(r=i[a]==t){l=f[a];break}r||(l=u?se(l)?l:[]:c(l)?l:{},o&&(a=o(l,t),typeof a!="undefined"&&(l=a)),i.push(t),f.push(l),o||(l=ut(l,t,p,o,i,f)))}else o&&(a=o(l,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(l=a);n[e]=l});return n}function at(n){for(var t=-1,e=ve(n),r=e.length,u=St(r);++t<r;)u[t]=n[e[t]];return u}function ot(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ee(0,u+e):e)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,e):bt(n,t,e)):ce(n,function(n){return++r<e?void 0:!(o=n===t)
}),o}function it(n,t,e){var u=r;if(t=R.createCallback(t,e),se(n)){e=-1;for(var a=n.length;++e<a&&(u=!!t(n[e],e,n)););}else ce(n,function(n,e,r){return u=!!t(n,e,r)});return u}function ft(n,t,e){var r=[];if(t=R.createCallback(t,e),se(n)){e=-1;for(var u=n.length;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}}else ce(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ct(n,t,e){var r;return t=R.createCallback(t,e),lt(n,function(n,e,u){return t(n,e,u)?(r=n,a):void 0}),r}function lt(n,t,e){if(t&&typeof e=="undefined"&&se(n)){e=-1;
for(var r=n.length;++e<r&&t(n[e],e,n)!==a;);}else ce(n,t,e);return n}function pt(n,t,e){var r=-1,u=n?n.length:0,a=St(typeof u=="number"?u:0);if(t=R.createCallback(t,e),se(n))for(;++r<u;)a[r]=t(n[r],r,n);else ce(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function st(n,t,e){var r=-1/0,u=r;if(!t&&se(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)}}else t=!t&&rt(n)?D:R.createCallback(t,e),ce(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function vt(n,t,e,r){var u=3>arguments.length;
if(t=R.createCallback(t,r,4),se(n)){var o=-1,i=n.length;for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n)}else ce(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function gt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ve(n),u=i.length;return t=R.createCallback(t,r,4),lt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function ht(n,t,e){var r;if(t=R.createCallback(t,e),se(n)){e=-1;for(var u=n.length;++e<u&&!(r=t(n[e],e,n)););}else ce(n,function(n,e,u){return!(r=t(n,e,u))
});return!!r}function yt(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=-1;for(t=R.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return H(n,0,re(ee(0,r),a))}}function mt(n,t,e,r){var o=-1,i=n?n.length:0,f=[];for(typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a),e!=u&&(e=R.createCallback(e,r));++o<i;)r=n[o],e&&(r=e(r,o,n)),se(r)?Jt.apply(f,t?r:mt(r)):f.push(r);return f}function bt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ee(0,u+e):e||0)-1;
else if(e)return r=_t(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function dt(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=R.createCallback(t,e);++a<o&&t(n[a],a,n);)r++}else r=t==u||e?1:ee(0,t);return H(n,r)}function _t(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?R.createCallback(e,r,1):xt,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function kt(n,t,e,r){var o=-1,i=n?n.length:0,f=[],c=f;typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a);var l=!t&&75<=i;if(l)var p={};
for(e!=u&&(c=[],e=R.createCallback(e,r));++o<i;){r=n[o];var s=e?e(r,o,n):r;if(l)var v=s+"",v=Ht.call(p,v)?!(c=p[v]):c=p[v]=[];(t?!o||c[c.length-1]!==s:v||0>bt(c,s))&&((e||l)&&c.push(s),f.push(r))}return f}function jt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function wt(n,t){return oe||Xt&&2<arguments.length?Xt.call.apply(Xt,arguments):P(n,t,H(arguments,2))}function Ct(n){var t=H(arguments,1);return Qt(function(){n.apply(e,t)},1)}function xt(n){return n
}function Ot(n){lt(X(n),function(t){var e=R[t]=n[t];R.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Jt.apply(t,arguments),t=e.apply(R,t),n&&typeof n=="object"&&n==t?this:new V(t)}})}function Nt(){return this.__wrapped__}i=i?B.defaults(n.Object(),i,B.pick(n,w)):n;var St=i.Array,At=i.Boolean,Et=i.Date,It=i.Function,$t=i.Math,Ft=i.Number,qt=i.Object,Bt=i.RegExp,Rt=i.String,Tt=St(),Dt=qt(),zt=i._,Pt=Bt("^"+(Dt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Mt=$t.ceil,Kt=i.clearTimeout,Ut=Tt.concat,Vt=$t.floor,Gt=Pt.test(Gt=qt.getPrototypeOf)&&Gt,Ht=Dt.hasOwnProperty,Jt=Tt.push,Lt=i.setImmediate,Qt=i.setTimeout,Wt=Dt.toString,Xt=Pt.test(Xt=H.bind)&&Xt,Yt=Pt.test(Yt=St.isArray)&&Yt,Zt=i.isFinite,ne=i.isNaN,te=Pt.test(te=qt.keys)&&te,ee=$t.max,re=$t.min,ue=i.parseInt,ae=$t.random,Dt=Pt.test(i.attachEvent),Pt=!/\n{2,}/.test(It()),$t=Xt&&!/\n|true/.test(Xt+Dt),oe=Xt&&!$t,ie=te&&(Dt||$t||!Pt),fe={};
fe[x]=St,fe[O]=At,fe[N]=Et,fe[A]=qt,fe[S]=Ft,fe[E]=Bt,fe[I]=Rt,R.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:R}};var At={a:"q,w,g",l:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",h:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},Ft={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:o['createCallback'](d,x)",b:"typeof n=='number'",h:"if(d(m[i],i,e)===false)return u"},qt={l:"if(!r[typeof m])return u;"+Ft.l,b:a},ce=M(Ft);
V.prototype=o.prototype;var le=M(Ft,qt,{m:a}),pe=M(Ft,qt),se=Yt||function(n){return n instanceof St||Wt.call(n)==x},ve=te?function(n){return tt(n)?te(n):[]}:Q,ge={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},he=Y(ge),ye=M(At,{l:At.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=o.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[i]=d?d(u[i],m[i]):m[i]"}),me=M(At),Yt=8==ue("08")?ue:function(n,t){return ue(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)
};return $t&&f&&typeof Lt=="function"&&(Ct=wt(Lt,i)),R.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},R.assign=ye,R.at=function(n){for(var t=-1,e=Ut.apply(Tt,H(arguments,1)),r=e.length,u=St(r);++t<r;)u[t]=n[e[t]];return u},R.bind=wt,R.bindAll=function(n){for(var t=Ut.apply(Tt,arguments),e=1<t.length?0:(t=X(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=wt(n[u],n)}return n},R.bindKey=function(n,t){return P(n,t,H(arguments,2))},R.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];
u&&r.push(u)}return r},R.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},R.countBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=t(n,e,u)+"",Ht.call(r,e)?r[e]++:r[e]=1}),r},R.createCallback=function(n,t,e){if(n==u)return xt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=ve(n);return function(t){for(var e=o.length,r=a;e--&&(r=Z(t[o[e]],n[o[e]],p)););return r
}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},R.debounce=function(n,t,e){function r(){f=u,e||(o=n.apply(i,a))}var a,o,i,f;return function(){var u=e&&!f;return a=arguments,i=this,Kt(f),f=Qt(r,t),u&&(o=n.apply(i,a)),o}},R.defaults=me,R.defer=Ct,R.delay=function(n,t){var r=H(arguments,2);return Qt(function(){n.apply(e,r)},t)},R.difference=function(n){for(var t=-1,e=n?n.length:0,r=Ut.apply(Tt,arguments),r=T(r,e),u=[];++t<e;){var a=n[t];
r(a)||u.push(a)}return u},R.filter=ft,R.flatten=mt,R.forEach=lt,R.forIn=le,R.forOwn=pe,R.functions=X,R.groupBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=t(n,e,u)+"",(Ht.call(r,e)?r[e]:r[e]=[]).push(n)}),r},R.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return H(n,0,re(ee(0,a-r),a))},R.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;
n:for(;++u<a;){var c=n[u];if(o)var l=c+"",l=Ht.call(r[0],l)?!(f=r[0][l]):f=r[0][l]=[];if(l||0>bt(f,c)){o&&f.push(c);for(var p=e;--p;)if(!(r[p]||(r[p]=T(t[p],0,100)))(c))continue n;i.push(c)}}return i},R.invert=Y,R.invoke=function(n,t){var e=H(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=St(typeof a=="number"?a:0);return lt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},R.keys=ve,R.map=pt,R.max=st,R.memoize=function(n,t){var e={};return function(){var r=(t?t.apply(this,arguments):arguments[0])+"";
return Ht.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},R.merge=ut,R.min=function(n,t,e){var r=1/0,u=r;if(!t&&se(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&rt(n)?D:R.createCallback(t,e),ce(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},R.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=R.createCallback(t,e);else var a=Ut.apply(Tt,arguments);return le(n,function(n,e,o){(r?!t(n,e,o):0>bt(a,e,1))&&(u[e]=n)}),u},R.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)
}},R.pairs=function(n){for(var t=-1,e=ve(n),r=e.length,u=St(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},R.partial=function(n){return P(n,H(arguments,1))},R.partialRight=function(n){return P(n,H(arguments,1),u,p)},R.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,a=Ut.apply(Tt,arguments),o=tt(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=R.createCallback(t,e),le(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},R.pluck=pt,R.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);
var r=-1;t=ee(0,Mt((t-n)/e));for(var a=St(t);++r<t;)a[r]=n,n+=e;return a},R.reject=function(n,t,e){return t=R.createCallback(t,e),ft(n,function(n,e,r){return!t(n,e,r)})},R.rest=dt,R.shuffle=function(n){var t=-1,e=n?n.length:0,r=St(typeof e=="number"?e:0);return lt(n,function(n){var e=Vt(ae()*(++t+1));r[t]=r[e],r[e]=n}),r},R.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=St(typeof u=="number"?u:0);for(t=R.createCallback(t,e),lt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(z);u--;)a[u]=a[u].c;
return a},R.tap=function(n,t){return t(n),n},R.throttle=function(n,t){function e(){f=new Et,i=u,a=n.apply(o,r)}var r,a,o,i,f=0;return function(){var c=new Et,l=t-(c-f);return r=arguments,o=this,0<l?i||(i=Qt(e,l)):(Kt(i),i=u,f=c,a=n.apply(o,r)),a}},R.times=function(n,t,e){n=+n||0;for(var r=-1,u=St(n);++r<n;)u[r]=t.call(e,r);return u},R.toArray=function(n){return n&&typeof n.length=="number"?H(n):at(n)},R.union=function(){return kt(Ut.apply(Tt,arguments))},R.uniq=kt,R.values=at,R.where=ft,R.without=function(n){for(var t=-1,e=n?n.length:0,r=T(arguments,1),u=[];++t<e;){var a=n[t];
r(a)||u.push(a)}return u},R.wrap=function(n,t){return function(){var e=[n];return Jt.apply(e,arguments),t.apply(this,e)}},R.zip=function(n){for(var t=-1,e=n?st(pt(arguments,"length")):0,r=St(e);++t<e;)r[t]=pt(arguments,t);return r},R.zipObject=jt,R.collect=pt,R.drop=dt,R.each=lt,R.extend=ye,R.methods=X,R.object=jt,R.select=ft,R.tail=dt,R.unique=kt,Ot(R),R.clone=W,R.cloneDeep=function(n,t,e){return W(n,r,t,e)},R.contains=ot,R.escape=function(n){return n==u?"":(n+"").replace(k,U)},R.every=it,R.find=ct,R.has=function(n,t){return n?Ht.call(n,t):a
},R.identity=xt,R.indexOf=bt,R.isArguments=L,R.isArray=se,R.isBoolean=function(n){return n===r||n===a||Wt.call(n)==O},R.isDate=function(n){return n instanceof Et||Wt.call(n)==N},R.isElement=function(n){return n?1===n.nodeType:a},R.isEmpty=function(n){var t=r;if(!n)return t;var e=Wt.call(n),u=n.length;return e==x||e==I||e==C||e==A&&typeof u=="number"&&nt(n.splice)?!u:(pe(n,function(){return t=a}),t)},R.isEqual=Z,R.isFinite=function(n){return Zt(n)&&!ne(parseFloat(n))},R.isFunction=nt,R.isNaN=function(n){return et(n)&&n!=+n
},R.isNull=function(n){return n===u},R.isNumber=et,R.isObject=tt,R.isPlainObject=c,R.isRegExp=function(n){return n instanceof Bt||Wt.call(n)==E},R.isString=rt,R.isUndefined=function(n){return typeof n=="undefined"},R.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ee(0,r+e):re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},R.mixin=Ot,R.noConflict=function(){return i._=zt,this},R.parseInt=Yt,R.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Vt(ae()*((+t||0)-n+1))
},R.reduce=vt,R.reduceRight=gt,R.result=function(n,t){var r=n?n[t]:e;return nt(r)?n[t]():r},R.runInContext=t,R.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ve(n).length},R.some=ht,R.sortedIndex=_t,R.template=function(n,t,u){var a=R.templateSettings;n||(n=""),u=me({},u,a);var o,i=me({},u.imports,a.imports),a=ve(i),i=at(i),f=0,c=u.interpolate||_,l="__p+='",c=Bt((u.escape||_).source+"|"+c.source+"|"+(c===d?b:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(j,K),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(g,""):l).replace(h,"$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=It(a,"return "+l).apply(e,i)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},R.unescape=function(n){return n==u?"":(n+"").replace(v,J)},R.uniqueId=function(n){var t=++l;return(n==u?"":n+"")+t
},R.all=it,R.any=ht,R.detect=ct,R.foldl=vt,R.foldr=gt,R.include=ot,R.inject=vt,pe(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(){var t=[this.__wrapped__];return Jt.apply(t,arguments),n.apply(R,t)})}),R.first=yt,R.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return H(n,ee(0,a-r))}},R.take=yt,R.head=yt,pe(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
return t==u||e&&typeof t!="function"?r:new V(r)})}),R.VERSION="1.0.1",R.prototype.toString=function(){return this.__wrapped__+""},R.prototype.value=Nt,R.prototype.valueOf=Nt,ce(["join","pop","shift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ce(["push","reverse","sort","unshift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ce(["concat","slice","splice"],function(n){var t=Tt[n];R.prototype[n]=function(){return new V(t.apply(this.__wrapped__,arguments))
}}),R}var e,r=!0,u=null,a=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,c=typeof global=="object"&&global;c.global===c&&(n=c);var l=0,p={},s=30,v=/&(?:amp|lt|gt|quot|#39);/g,g=/\b__p\+='';/g,h=/\b(__p\+=)''\+/g,y=/(__e\(.*?\)|\b__t\))\+'';/g,m=/\w*$/,b=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/<%=([\s\S]+?)%>/g,_=/($^)/,k=/[&<>"']/g,j=/['\n\r\t\u2028\u2029\\]/g,w="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),C="[object Arguments]",x="[object Array]",O="[object Boolean]",N="[object Date]",S="[object Number]",A="[object Object]",E="[object RegExp]",I="[object String]",$={"[object Function]":a};
$[C]=$[x]=$[O]=$[N]=$[S]=$[A]=$[E]=$[I]=r;var F={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},q={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},B=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=B,define(function(){return B})):i&&!i.nodeType?f?(f.exports=B)._=B:i._=B:n._=B})(this);

View File

@@ -122,7 +122,6 @@
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = window.isFinite,
nativeIsNaN = window.isNaN,
@@ -196,13 +195,9 @@
* @returns {Object} Returns a `lodash` instance.
*/
function lodash(value) {
if (!(this instanceof lodash)) {
return new lodash(value);
}
if (value instanceof lodash) {
return value;
}
this.__wrapped__ = value;
return (value instanceof lodash)
? value
: new lodashWrapper(value)
}
/**
@@ -333,7 +328,9 @@
}
if (this instanceof bound) {
// ensure `new bound` is an instance of `func`
thisBinding = createObject(func.prototype);
noop.prototype = func.prototype;
thisBinding = new noop;
noop.prototype = null;
// mimic the constructor's `return` behavior
// http://es5.github.com/#x13.2.2
@@ -345,33 +342,6 @@
return bound;
}
/**
* Creates a new object that inherits from the given `prototype` object.
*
* @private
* @param {Object} prototype The prototype object.
* @returns {Object} Returns the new object.
*/
var createObject = nativeCreate || function(prototype) {
noop.prototype = prototype;
var result = new noop;
noop.prototype = null;
return result;
};
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function createWrapper(value) {
var result = createObject(lodash.prototype);
result.__wrapped__ = value;
return result;
}
/**
* A function compiled to iterate `arguments` objects, arrays, objects, and
* strings consistenly across environments, executing the `callback` for each
@@ -441,6 +411,19 @@
return typeof value.toString != 'function' && typeof (value + '') == 'string';
}
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function lodashWrapper(value) {
this.__wrapped__ = value;
}
// ensure `new lodashWrapper` is an instance of `lodash`
lodashWrapper.prototype = lodash.prototype;
/**
* A no-operation function.
*

View File

@@ -4,31 +4,31 @@
* Build: `lodash underscore -o ./dist/lodash.underscore.js`
* Underscore.js 1.4.4 underscorejs.org/LICENSE
*/
;(function(n){function r(n,r){var t;if(n&&pr[typeof n])for(t in r||(r=V),n)if(r(n[t],t,n)===Y)break}function t(n,r,t){if(n){r=r&&typeof t=="undefined"?r:U(r,t);var e=n.length;if(t=-1,typeof e=="number")for(;++t<e&&r(n[t],t,n)!==Y;);else for(t in n)if(br.call(n,t)&&r(n[t],t,n)===Y)break}}function e(n){return this instanceof e?n instanceof e?n:(this.__wrapped__=n,void 0):new e(n)}function u(n,r){var t=n.b,e=r.b;if(n=n.a,r=r.a,n!==r){if(n>r||typeof n=="undefined")return 1;if(n<r||typeof r=="undefined")return-1
}return t<e?-1:1}function o(n,r,t){function e(){var a=arguments,f=o?this:r;return u||(n=r[i]),t.length&&(a=a.length?(a=c(a),t.concat(a)):t),this instanceof e?(f=$r(n.prototype),a=n.apply(f,a),b(a)?a:f):n.apply(f,a)}var u=d(n),o=!t,i=r;return o&&(t=r),u||(r=n),e}function i(n){return"\\"+sr[n]}function a(n){return zr[n]}function f(){}function c(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function l(n){return Cr[n]}function p(n){return Ar.call(n)==er
}function s(n){var r,t=[],e=function(n,r){t.push(r)};if(n&&pr[typeof n])for(r in e||(e=V),n)if(br.call(n,r)&&e(n[r],r,n)===Y)break;return t}function v(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]==H&&(n[u]=e[u])}return n}function g(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function y(n){for(var r=-1,t=Tr(n),e=t.length,u={};++r<e;){var o=t[r];
u[n[o]]=o}return u}function m(n){if(!n)return G;if(Ir(n)||w(n))return!n.length;for(var r in n)if(br.call(n,r))return J;return G}function _(n,t,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return J;if(n==H||t==H)return n===t;if(a=Ar.call(n),i=Ar.call(t),a!=i)return J;switch(a){case or:case ir:return+n==+t;case ar:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case cr:case lr:return n==t+""}if(i=a==ur,!i){if(n instanceof e||t instanceof e)return _(n.__wrapped__||n,t.__wrapped__||t,u,o);
if(a!=fr)return J;var a=n.constructor,f=t.constructor;if(a!=f&&(!d(a)||!(a instanceof a&&d(f)&&f instanceof f)))return J}for(u||(u=[]),o||(o=[]),a=u.length;a--;)if(u[a]==n)return o[a]==t;var c=G,l=0;if(u.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=_(n[l],t[l],u,o)););return c}return r(t,function(r,t,e){return br.call(e,t)?(l++,!(c=br.call(n,t)&&_(n[t],r,u,o))&&Y):void 0}),c&&r(n,function(n,r,t){return br.call(t,r)?!(c=-1<--l)&&Y:void 0}),c}function d(n){return typeof n=="function"
}function b(n){return n?pr[typeof n]:J}function j(n){return typeof n=="number"||Ar.call(n)==ar}function w(n){return typeof n=="string"||Ar.call(n)==lr}function A(n){for(var r=-1,t=Tr(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function x(n,r){var e=J;return typeof(n?n.length:0)=="number"?e=-1<I(n,r):t(n,function(n){return(e=n===r)&&Y}),e}function E(n,r,e){var u=G;if(r=U(r,e),Ir(n)){e=-1;for(var o=n.length;++e<o&&(u=!!r(n[e],e,n)););}else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&Y});return u
}function O(n,r,e){var u=[];if(r=U(r,e),Ir(n)){e=-1;for(var o=n.length;++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 S(n,r,t){var e;return r=U(r,t),N(n,function(n,t,u){return r(n,t,u)?(e=n,Y):void 0}),e}function N(n,r,e){if(r&&typeof e=="undefined"&&Ir(n)){e=-1;for(var u=n.length;++e<u&&r(n[e],e,n)!==Y;);}else t(n,r,e)}function k(n,r,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);if(r=U(r,e),Ir(n))for(;++u<o;)i[u]=r(n[u],u,n);
else t(n,function(n,t,e){i[++u]=r(n,t,e)});return i}function F(n,r,e){var u=-1/0,o=u;if(!r&&Ir(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else r=U(r,e),t(n,function(n,t,e){t=r(n,t,e),t>u&&(u=t,o=n)});return o}function R(n,r,e,u){var o=3>arguments.length;if(r=U(r,u,4),Ir(n)){var i=-1,a=n.length;for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n)}else t(n,function(n,t,u){e=o?(o=J,n):r(e,n,t,u)});return e}function q(n,r,t,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Tr(n),u=i.length;
return r=U(r,e,4),N(n,function(e,a,f){a=i?i[--u]:--u,t=o?(o=J,n[a]):r(t,n[a],a,f)}),t}function B(n,r,e){var u;if(r=U(r,e),Ir(n)){e=-1;for(var o=n.length;++e<o&&!(u=r(n[e],e,n)););}else t(n,function(n,t,e){return(u=r(n,t,e))&&Y});return!!u}function D(n,r,t){return t&&m(r)?H:(t?S:O)(n,r)}function M(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&r!=H){var o=-1;for(r=U(r,t);++o<u&&r(n[o],o,n);)e++}else if(e=r,e==H||t)return n[0];return c(n,0,Rr(Fr(0,e),u))}}function $(n,r){for(var t=-1,e=n?n.length:0,u=[];++t<e;){var o=n[t];
Ir(o)?jr.apply(u,r?o:$(o)):u.push(o)}return u}function I(n,r,t){var e=-1,u=n?n.length:0;if(typeof t=="number")e=(0>t?Fr(0,u+t):t||0)-1;else if(t)return e=z(n,r),n[e]===r?e:-1;for(;++e<u;)if(n[e]===r)return e;return-1}function T(n,r,t){if(typeof r!="number"&&r!=H){var e=0,u=-1,o=n?n.length:0;for(r=U(r,t);++u<o&&r(n[u],u,n);)e++}else e=r==H||t?1:Fr(0,r);return c(n,e)}function z(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?U(t,e,1):V,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function C(n,r,t,e){var u=-1,o=n?n.length:0,i=[],a=i;
for(typeof r!="boolean"&&r!=H&&(e=t,t=r,r=J),t!=H&&(a=[],t=U(t,e));++u<o;){e=n[u];var f=t?t(e,u,n):e;(r?!u||a[a.length-1]!==f:0>I(a,f))&&(t&&a.push(f),i.push(e))}return i}function P(n,r){return Br||xr&&2<arguments.length?xr.call.apply(xr,arguments):o(n,r,c(arguments,2))}function U(n,r,t){if(n==H)return V;var e=typeof n;if("function"!=e){if("object"!=e)return function(r){return r[n]};var u=Tr(n);return function(r){for(var t=u.length,e=J;t--&&(e=r[u[t]]===n[u[t]]););return e}}return typeof r!="undefined"?1===t?function(t){return n.call(r,t)
}:2===t?function(t,e){return n.call(r,t,e)}:4===t?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function V(n){return n}function W(n){N(g(n),function(r){var t=e[r]=n[r];e.prototype[r]=function(){var n=[this.__wrapped__];if(jr.apply(n,arguments),n=t.apply(e,n),this.__chain__){var r=$r(e.prototype);r.__wrapped__=n,n=r,n.__chain__=G}return n}})}var G=!0,H=null,J=!1,K=typeof exports=="object"&&exports,L=typeof module=="object"&&module&&module.exports==K&&module,Q=typeof global=="object"&&global;
Q.global===Q&&(n=Q);var X=0,Y={},Z=/&(?:amp|lt|gt|quot|#39);/g,nr=/($^)/,rr=/[&<>"']/g,tr=/['\n\r\t\u2028\u2029\\]/g,er="[object Arguments]",ur="[object Array]",or="[object Boolean]",ir="[object Date]",ar="[object Number]",fr="[object Object]",cr="[object RegExp]",lr="[object String]",pr={"boolean":J,"function":G,object:G,number:J,string:J,undefined:J},sr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},vr=[],Q={},hr=n._,gr=RegExp("^"+(Q.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),yr=Math.ceil,mr=n.clearTimeout,_r=vr.concat,dr=Math.floor,br=Q.hasOwnProperty,jr=vr.push,wr=n.setTimeout,Ar=Q.toString,xr=gr.test(xr=c.bind)&&xr,Er=gr.test(Er=Object.create)&&Er,Or=gr.test(Or=Array.isArray)&&Or,Sr=n.isFinite,Nr=n.isNaN,kr=gr.test(kr=Object.keys)&&kr,Fr=Math.max,Rr=Math.min,qr=Math.random,Q=gr.test(n.attachEvent),Q=xr&&!/\n|true/.test(xr+Q),Br=xr&&!Q,Dr=(Dr={0:1,length:1},vr.splice.call(Dr,0,1),Dr[0]),Mr=arguments.constructor==Object;
e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var $r=Er||function(n){return f.prototype=n,n=new f,f.prototype=H,n};p(arguments)||(p=function(n){return n?br.call(n,"callee"):J});var Ir=Or||function(n){return Mr&&n instanceof Array||Ar.call(n)==ur},Tr=kr?function(n){return b(n)?kr(n):[]}:s,zr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Cr=y(zr);d(/x/)&&(d=function(n){return n instanceof Function||"[object Function]"==Ar.call(n)
});var Pr=k;e.after=function(n,r){return 1>n?r():function(){return 1>--n?r.apply(this,arguments):void 0}},e.bind=P,e.bindAll=function(n){for(var r=_r.apply(vr,arguments),t=1<r.length?0:(r=g(n),-1),e=r.length;++t<e;){var u=r[t];n[u]=P(n[u],n)}return n},e.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},e.compose=function(){var n=arguments;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},e.countBy=function(n,r,t){var e={};
return r=U(r,t),N(n,function(n,t,u){t=r(n,t,u)+"",br.call(e,t)?e[t]++:e[t]=1}),e},e.debounce=function(n,r,t){function e(){a=H,t||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=t&&!a;return u=arguments,i=this,mr(a),a=wr(e,r),f&&(o=n.apply(i,u)),o}},e.defaults=h,e.defer=function(n){var r=c(arguments,1);return wr(function(){n.apply(void 0,r)},1)},e.delay=function(n,r){var t=c(arguments,2);return wr(function(){n.apply(void 0,t)},r)},e.difference=function(n){for(var r=-1,t=n.length,e=_r.apply(vr,arguments),u=[];++r<t;){var o=n[r];
0>I(e,o,t)&&u.push(o)}return u},e.filter=O,e.flatten=$,e.forEach=N,e.functions=g,e.groupBy=function(n,r,t){var e={};return r=U(r,t),N(n,function(n,t,u){t=r(n,t,u)+"",(br.call(e,t)?e[t]:e[t]=[]).push(n)}),e},e.initial=function(n,r,t){if(!n)return[];var e=0,u=n.length;if(typeof r!="number"&&r!=H){var o=u;for(r=U(r,t);o--&&r(n[o],o,n);)e++}else e=r==H||t?1:r||e;return c(n,0,Rr(Fr(0,u-e),u))},e.intersection=function(n){var r=arguments,t=r.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];if(0>I(o,i)){for(var a=t;--a;)if(0>I(r[a],i))continue n;
o.push(i)}}return o},e.invert=y,e.invoke=function(n,r){var t=c(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return N(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},e.keys=Tr,e.map=k,e.max=F,e.memoize=function(n,r){var t={};return function(){var e=(r?r.apply(this,arguments):arguments[0])+"";return br.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},e.min=function(n,r,e){var u=1/0,o=u;if(!r&&Ir(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else r=U(r,e),t(n,function(n,t,e){t=r(n,t,e),t<u&&(u=t,o=n)
});return o},e.omit=function(n){var t=_r.apply(vr,arguments),e={};return r(n,function(n,r){0>I(t,r,1)&&(e[r]=n)}),e},e.once=function(n){var r,t;return function(){return r?t:(r=G,t=n.apply(this,arguments),n=H,t)}},e.pairs=function(n){for(var r=-1,t=Tr(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},e.partial=function(n){return o(n,c(arguments,1))},e.pick=function(n){for(var r=0,t=_r.apply(vr,arguments),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},e.pluck=Pr,e.range=function(n,r,t){n=+n||0,t=+t||1,r==H&&(r=n,n=0);
var e=-1;r=Fr(0,yr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;return u},e.reject=function(n,r,t){return r=U(r,t),O(n,function(n,t,e){return!r(n,t,e)})},e.rest=T,e.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return N(n,function(n){var t=dr(qr()*(++r+1));e[r]=e[t],e[t]=n}),e},e.sortBy=function(n,r,t){var e=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(r=U(r,t),N(n,function(n,t,u){i[++e]={a:r(n,t,u),b:e,c:n}}),o=i.length,i.sort(u);o--;)i[o]=i[o].c;return i
},e.tap=function(n,r){return r(n),n},e.throttle=function(n,r){function t(){a=new Date,i=H,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=r-(f-a);return e=arguments,o=this,0<c?i||(i=wr(t,c)):(mr(i),i=H,a=f,u=n.apply(o,e)),u}},e.times=function(n,r,t){n=+n||0;for(var e=-1,u=Array(n);++e<n;)u[e]=r.call(t,e);return u},e.toArray=function(n){return n&&typeof n.length=="number"?c(n):A(n)},e.union=function(){return C(_r.apply(vr,arguments))},e.uniq=C,e.values=A,e.where=D,e.without=function(n){for(var r=-1,t=n.length,e=[];++r<t;){var u=n[r];
0>I(arguments,u,1)&&e.push(u)}return e},e.wrap=function(n,r){return function(){var t=[n];return jr.apply(t,arguments),r.apply(this,t)}},e.zip=function(n){for(var r=-1,t=n?F(Pr(arguments,"length")):0,e=Array(t);++r<t;)e[r]=Pr(arguments,r);return e},e.collect=k,e.drop=T,e.each=N,e.extend=v,e.methods=g,e.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var o=n[t];r?u[o]=r[t]:u[o[0]]=o[1]}return u},e.select=O,e.tail=T,e.unique=C,e.clone=function(n){return b(n)?Ir(n)?c(n):v({},n):n},e.contains=x,e.escape=function(n){return n==H?"":(n+"").replace(rr,a)
},e.every=E,e.find=S,e.findWhere=function(n,r){return D(n,r,G)},e.has=function(n,r){return n?br.call(n,r):J},e.identity=V,e.indexOf=I,e.isArguments=p,e.isArray=Ir,e.isBoolean=function(n){return n===G||n===J||Ar.call(n)==or},e.isDate=function(n){return n instanceof Date||Ar.call(n)==ir},e.isElement=function(n){return n?1===n.nodeType:J},e.isEmpty=m,e.isEqual=_,e.isFinite=function(n){return Sr(n)&&!Nr(parseFloat(n))},e.isFunction=d,e.isNaN=function(n){return j(n)&&n!=+n},e.isNull=function(n){return n===H
},e.isNumber=j,e.isObject=b,e.isRegExp=function(n){return n instanceof RegExp||Ar.call(n)==cr},e.isString=w,e.isUndefined=function(n){return typeof n=="undefined"},e.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Fr(0,e+t):Rr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},e.mixin=W,e.noConflict=function(){return n._=hr,this},e.random=function(n,r){return n==H&&r==H&&(r=1),n=+n||0,r==H&&(r=n,n=0),n+dr(qr()*((+r||0)-n+1))},e.reduce=R,e.reduceRight=q,e.result=function(n,r){var t=n?n[r]:H;
return d(t)?n[r]():t},e.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Tr(n).length},e.some=B,e.sortedIndex=z,e.template=function(n,r,t){n||(n=""),t=h({},t,e.templateSettings);var u=0,o="__p+='",a=t.variable;n.replace(RegExp((t.escape||nr).source+"|"+(t.interpolate||nr).source+"|"+(t.evaluate||nr).source+"|$","g"),function(r,t,e,a,f){return o+=n.slice(u,f).replace(tr,i),t&&(o+="'+_['escape']("+t+")+'"),a&&(o+="';"+a+";__p+='"),e&&(o+="'+((__t=("+e+"))==null?'':__t)+'"),u=f+r.length,r
}),o+="';\n",a||(a="obj",o="with("+a+"||{}){"+o+"}"),o="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";try{var f=Function("_","return "+o)(e)}catch(c){throw c.source=o,c}return r?f(r):(f.source=o,f)},e.unescape=function(n){return n==H?"":(n+"").replace(Z,l)},e.uniqueId=function(n){var r=++X+"";return n?n+r:r},e.all=E,e.any=B,e.detect=S,e.foldl=R,e.foldr=q,e.include=x,e.inject=R,e.first=M,e.last=function(n,r,t){if(n){var e=0,u=n.length;
if(typeof r!="number"&&r!=H){var o=u;for(r=U(r,t);o--&&r(n[o],o,n);)e++}else if(e=r,e==H||t)return n[u-1];return c(n,Fr(0,u-e))}},e.take=M,e.head=M,e.chain=function(n){return n=new e(n),n.__chain__=G,n},e.VERSION="1.0.1",W(e),e.prototype.chain=function(){return this.__chain__=G,this},e.prototype.value=function(){return this.__wrapped__},t("pop push reverse shift sort splice unshift".split(" "),function(n){var r=vr[n];e.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Dr&&0===n.length&&delete n[0],this
}}),t(["concat","join","slice"],function(n){var r=vr[n];e.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new e(n),n.__chain__=G),n}}),K&&!K.nodeType?L?(L.exports=e)._=e:K._=e:n._=e})(this);
;(function(n){function r(n,r){var t;if(n&&sr[typeof n])for(t in r||(r=V),n)if(r(n[t],t,n)===Z)break}function t(n,r,t){if(n){r=r&&typeof t=="undefined"?r:U(r,t);var e=n.length;if(t=-1,typeof e=="number")for(;++t<e&&r(n[t],t,n)!==Z;);else for(t in n)if(jr.call(n,t)&&r(n[t],t,n)===Z)break}}function e(n){return n instanceof e?n:new f(n)}function u(n,r){var t=n.b,e=r.b;if(n=n.a,r=r.a,n!==r){if(n>r||typeof n=="undefined")return 1;if(n<r||typeof r=="undefined")return-1}return t<e?-1:1}function o(n,r,t){function e(){var a=arguments,f=o?this:r;
return u||(n=r[i]),t.length&&(a=a.length?(a=l(a),t.concat(a)):t),this instanceof e?(c.prototype=n.prototype,f=new c,c.prototype=J,a=n.apply(f,a),j(a)?a:f):n.apply(f,a)}var u=b(n),o=!t,i=r;return o&&(t=r),u||(r=n),e}function i(n){return"\\"+vr[n]}function a(n){return Tr[n]}function f(n){this.__wrapped__=n}function c(){}function l(n,r,t){r||(r=0),typeof t=="undefined"&&(t=n?n.length:0);var e=-1;t=t-r||0;for(var u=Array(0>t?0:t);++e<t;)u[e]=n[r+e];return u}function p(n){return zr[n]}function s(n){return xr.call(n)==ur
}function v(n){var r,t=[],e=function(n,r){t.push(r)};if(n&&sr[typeof n])for(r in e||(e=V),n)if(jr.call(n,r)&&e(n[r],r,n)===Z)break;return t}function g(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]=e[u]}return n}function h(n){if(!n)return n;for(var r=1,t=arguments.length;r<t;r++){var e=arguments[r];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function y(n){var t=[];return r(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function m(n){for(var r=-1,t=Ir(n),e=t.length,u={};++r<e;){var o=t[r];
u[n[o]]=o}return u}function _(n){if(!n)return H;if($r(n)||A(n))return!n.length;for(var r in n)if(jr.call(n,r))return K;return H}function d(n,t,u,o){if(n===t)return 0!==n||1/n==1/t;var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return K;if(n==J||t==J)return n===t;if(a=xr.call(n),i=xr.call(t),a!=i)return K;switch(a){case ir:case ar:return+n==+t;case fr:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case lr:case pr:return n==t+""}if(i=a==or,!i){if(n instanceof e||t instanceof e)return d(n.__wrapped__||n,t.__wrapped__||t,u,o);
if(a!=cr)return K;var a=n.constructor,f=t.constructor;if(a!=f&&(!b(a)||!(a instanceof a&&b(f)&&f instanceof f)))return K}for(u||(u=[]),o||(o=[]),a=u.length;a--;)if(u[a]==n)return o[a]==t;var c=H,l=0;if(u.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=d(n[l],t[l],u,o)););return c}return r(t,function(r,t,e){return jr.call(e,t)?(l++,!(c=jr.call(n,t)&&d(n[t],r,u,o))&&Z):void 0}),c&&r(n,function(n,r,t){return jr.call(t,r)?!(c=-1<--l)&&Z:void 0}),c}function b(n){return typeof n=="function"
}function j(n){return n?sr[typeof n]:K}function w(n){return typeof n=="number"||xr.call(n)==fr}function A(n){return typeof n=="string"||xr.call(n)==pr}function x(n){for(var r=-1,t=Ir(n),e=t.length,u=Array(e);++r<e;)u[r]=n[t[r]];return u}function E(n,r){var e=K;return typeof(n?n.length:0)=="number"?e=-1<T(n,r):t(n,function(n){return(e=n===r)&&Z}),e}function O(n,r,e){var u=H;if(r=U(r,e),$r(n)){e=-1;for(var o=n.length;++e<o&&(u=!!r(n[e],e,n)););}else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&Z});return u
}function S(n,r,e){var u=[];if(r=U(r,e),$r(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];r(i,e,n)&&u.push(i)}}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)});return u}function N(n,r,t){var e;return r=U(r,t),k(n,function(n,t,u){return r(n,t,u)?(e=n,Z):void 0}),e}function k(n,r,e){if(r&&typeof e=="undefined"&&$r(n)){e=-1;for(var u=n.length;++e<u&&r(n[e],e,n)!==Z;);}else t(n,r,e)}function F(n,r,e){var u=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);if(r=U(r,e),$r(n))for(;++u<o;)i[u]=r(n[u],u,n);
else t(n,function(n,t,e){i[++u]=r(n,t,e)});return i}function R(n,r,e){var u=-1/0,o=u;if(!r&&$r(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a>o&&(o=a)}}else r=U(r,e),t(n,function(n,t,e){t=r(n,t,e),t>u&&(u=t,o=n)});return o}function q(n,r,e,u){var o=3>arguments.length;if(r=U(r,u,4),$r(n)){var i=-1,a=n.length;for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n)}else t(n,function(n,t,u){e=o?(o=K,n):r(e,n,t,u)});return e}function B(n,r,t,e){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=Ir(n),u=i.length;
return r=U(r,e,4),k(n,function(e,a,f){a=i?i[--u]:--u,t=o?(o=K,n[a]):r(t,n[a],a,f)}),t}function D(n,r,e){var u;if(r=U(r,e),$r(n)){e=-1;for(var o=n.length;++e<o&&!(u=r(n[e],e,n)););}else t(n,function(n,t,e){return(u=r(n,t,e))&&Z});return!!u}function M(n,r,t){return t&&_(r)?J:(t?N:S)(n,r)}function $(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&r!=J){var o=-1;for(r=U(r,t);++o<u&&r(n[o],o,n);)e++}else if(e=r,e==J||t)return n[0];return l(n,0,Rr(Fr(0,e),u))}}function I(n,r){for(var t=-1,e=n?n.length:0,u=[];++t<e;){var o=n[t];
$r(o)?wr.apply(u,r?o:I(o)):u.push(o)}return u}function T(n,r,t){var e=-1,u=n?n.length:0;if(typeof t=="number")e=(0>t?Fr(0,u+t):t||0)-1;else if(t)return e=W(n,r),n[e]===r?e:-1;for(;++e<u;)if(n[e]===r)return e;return-1}function z(n,r,t){if(typeof r!="number"&&r!=J){var e=0,u=-1,o=n?n.length:0;for(r=U(r,t);++u<o&&r(n[u],u,n);)e++}else e=r==J||t?1:Fr(0,r);return l(n,e)}function W(n,r,t,e){var u=0,o=n?n.length:u;for(t=t?U(t,e,1):V,r=t(r);u<o;)e=u+o>>>1,t(n[e])<r?u=e+1:o=e;return u}function C(n,r,t,e){var u=-1,o=n?n.length:0,i=[],a=i;
for(typeof r!="boolean"&&r!=J&&(e=t,t=r,r=K),t!=J&&(a=[],t=U(t,e));++u<o;){e=n[u];var f=t?t(e,u,n):e;(r?!u||a[a.length-1]!==f:0>T(a,f))&&(t&&a.push(f),i.push(e))}return i}function P(n,r){return Br||Er&&2<arguments.length?Er.call.apply(Er,arguments):o(n,r,l(arguments,2))}function U(n,r,t){if(n==J)return V;var e=typeof n;if("function"!=e){if("object"!=e)return function(r){return r[n]};var u=Ir(n);return function(r){for(var t=u.length,e=K;t--&&(e=r[u[t]]===n[u[t]]););return e}}return typeof r!="undefined"?1===t?function(t){return n.call(r,t)
}:2===t?function(t,e){return n.call(r,t,e)}:4===t?function(t,e,u,o){return n.call(r,t,e,u,o)}:function(t,e,u){return n.call(r,t,e,u)}:n}function V(n){return n}function G(n){k(y(n),function(r){var t=e[r]=n[r];e.prototype[r]=function(){var n=[this.__wrapped__];return wr.apply(n,arguments),n=t.apply(e,n),this.__chain__&&(n=createWrapper(n),n.__chain__=H),n}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof module=="object"&&module&&module.exports==L&&module,X=typeof global=="object"&&global;
X.global===X&&(n=X);var Y=0,Z={},nr=/&(?:amp|lt|gt|quot|#39);/g,rr=/($^)/,tr=/[&<>"']/g,er=/['\n\r\t\u2028\u2029\\]/g,ur="[object Arguments]",or="[object Array]",ir="[object Boolean]",ar="[object Date]",fr="[object Number]",cr="[object Object]",lr="[object RegExp]",pr="[object String]",sr={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},vr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},gr=[],X={},hr=n._,yr=RegExp("^"+(X.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),mr=Math.ceil,_r=n.clearTimeout,dr=gr.concat,br=Math.floor,jr=X.hasOwnProperty,wr=gr.push,Ar=n.setTimeout,xr=X.toString,Er=yr.test(Er=l.bind)&&Er,Or=yr.test(Or=Array.isArray)&&Or,Sr=n.isFinite,Nr=n.isNaN,kr=yr.test(kr=Object.keys)&&kr,Fr=Math.max,Rr=Math.min,qr=Math.random,X=yr.test(n.attachEvent),X=Er&&!/\n|true/.test(Er+X),Br=Er&&!X,Dr=(Dr={0:1,length:1},gr.splice.call(Dr,0,1),Dr[0]),Mr=arguments.constructor==Object;
e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},f.prototype=e.prototype,s(arguments)||(s=function(n){return n?jr.call(n,"callee"):K});var $r=Or||function(n){return Mr&&n instanceof Array||xr.call(n)==or},Ir=kr?function(n){return j(n)?kr(n):[]}:v,Tr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zr=m(Tr);b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==xr.call(n)});var Wr=F;e.after=function(n,r){return 1>n?r():function(){return 1>--n?r.apply(this,arguments):void 0
}},e.bind=P,e.bindAll=function(n){for(var r=dr.apply(gr,arguments),t=1<r.length?0:(r=y(n),-1),e=r.length;++t<e;){var u=r[t];n[u]=P(n[u],n)}return n},e.compact=function(n){for(var r=-1,t=n?n.length:0,e=[];++r<t;){var u=n[r];u&&e.push(u)}return e},e.compose=function(){var n=arguments;return function(){for(var r=arguments,t=n.length;t--;)r=[n[t].apply(this,r)];return r[0]}},e.countBy=function(n,r,t){var e={};return r=U(r,t),k(n,function(n,t,u){t=r(n,t,u)+"",jr.call(e,t)?e[t]++:e[t]=1}),e},e.debounce=function(n,r,t){function e(){a=J,t||(o=n.apply(i,u))
}var u,o,i,a;return function(){var f=t&&!a;return u=arguments,i=this,_r(a),a=Ar(e,r),f&&(o=n.apply(i,u)),o}},e.defaults=h,e.defer=function(n){var r=l(arguments,1);return Ar(function(){n.apply(void 0,r)},1)},e.delay=function(n,r){var t=l(arguments,2);return Ar(function(){n.apply(void 0,t)},r)},e.difference=function(n){for(var r=-1,t=n.length,e=dr.apply(gr,arguments),u=[];++r<t;){var o=n[r];0>T(e,o,t)&&u.push(o)}return u},e.filter=S,e.flatten=I,e.forEach=k,e.functions=y,e.groupBy=function(n,r,t){var e={};
return r=U(r,t),k(n,function(n,t,u){t=r(n,t,u)+"",(jr.call(e,t)?e[t]:e[t]=[]).push(n)}),e},e.initial=function(n,r,t){if(!n)return[];var e=0,u=n.length;if(typeof r!="number"&&r!=J){var o=u;for(r=U(r,t);o--&&r(n[o],o,n);)e++}else e=r==J||t?1:r||e;return l(n,0,Rr(Fr(0,u-e),u))},e.intersection=function(n){var r=arguments,t=r.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];if(0>T(o,i)){for(var a=t;--a;)if(0>T(r[a],i))continue n;o.push(i)}}return o},e.invert=m,e.invoke=function(n,r){var t=l(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);
return k(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},e.keys=Ir,e.map=F,e.max=R,e.memoize=function(n,r){var t={};return function(){var e=(r?r.apply(this,arguments):arguments[0])+"";return jr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},e.min=function(n,r,e){var u=1/0,o=u;if(!r&&$r(n)){e=-1;for(var i=n.length;++e<i;){var a=n[e];a<o&&(o=a)}}else r=U(r,e),t(n,function(n,t,e){t=r(n,t,e),t<u&&(u=t,o=n)});return o},e.omit=function(n){var t=dr.apply(gr,arguments),e={};return r(n,function(n,r){0>T(t,r,1)&&(e[r]=n)
}),e},e.once=function(n){var r,t;return function(){return r?t:(r=H,t=n.apply(this,arguments),n=J,t)}},e.pairs=function(n){for(var r=-1,t=Ir(n),e=t.length,u=Array(e);++r<e;){var o=t[r];u[r]=[o,n[o]]}return u},e.partial=function(n){return o(n,l(arguments,1))},e.pick=function(n){for(var r=0,t=dr.apply(gr,arguments),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},e.pluck=Wr,e.range=function(n,r,t){n=+n||0,t=+t||1,r==J&&(r=n,n=0);var e=-1;r=Fr(0,mr((r-n)/t));for(var u=Array(r);++e<r;)u[e]=n,n+=t;
return u},e.reject=function(n,r,t){return r=U(r,t),S(n,function(n,t,e){return!r(n,t,e)})},e.rest=z,e.shuffle=function(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return k(n,function(n){var t=br(qr()*(++r+1));e[r]=e[t],e[t]=n}),e},e.sortBy=function(n,r,t){var e=-1,o=n?n.length:0,i=Array(typeof o=="number"?o:0);for(r=U(r,t),k(n,function(n,t,u){i[++e]={a:r(n,t,u),b:e,c:n}}),o=i.length,i.sort(u);o--;)i[o]=i[o].c;return i},e.tap=function(n,r){return r(n),n},e.throttle=function(n,r){function t(){a=new Date,i=J,u=n.apply(o,e)
}var e,u,o,i,a=0;return function(){var f=new Date,c=r-(f-a);return e=arguments,o=this,0<c?i||(i=Ar(t,c)):(_r(i),i=J,a=f,u=n.apply(o,e)),u}},e.times=function(n,r,t){n=+n||0;for(var e=-1,u=Array(n);++e<n;)u[e]=r.call(t,e);return u},e.toArray=function(n){return n&&typeof n.length=="number"?l(n):x(n)},e.union=function(){return C(dr.apply(gr,arguments))},e.uniq=C,e.values=x,e.where=M,e.without=function(n){for(var r=-1,t=n.length,e=[];++r<t;){var u=n[r];0>T(arguments,u,1)&&e.push(u)}return e},e.wrap=function(n,r){return function(){var t=[n];
return wr.apply(t,arguments),r.apply(this,t)}},e.zip=function(n){for(var r=-1,t=n?R(Wr(arguments,"length")):0,e=Array(t);++r<t;)e[r]=Wr(arguments,r);return e},e.collect=F,e.drop=z,e.each=k,e.extend=g,e.methods=y,e.object=function(n,r){for(var t=-1,e=n?n.length:0,u={};++t<e;){var o=n[t];r?u[o]=r[t]:u[o[0]]=o[1]}return u},e.select=S,e.tail=z,e.unique=C,e.clone=function(n){return j(n)?$r(n)?l(n):g({},n):n},e.contains=E,e.escape=function(n){return n==J?"":(n+"").replace(tr,a)},e.every=O,e.find=N,e.findWhere=function(n,r){return M(n,r,H)
},e.has=function(n,r){return n?jr.call(n,r):K},e.identity=V,e.indexOf=T,e.isArguments=s,e.isArray=$r,e.isBoolean=function(n){return n===H||n===K||xr.call(n)==ir},e.isDate=function(n){return n instanceof Date||xr.call(n)==ar},e.isElement=function(n){return n?1===n.nodeType:K},e.isEmpty=_,e.isEqual=d,e.isFinite=function(n){return Sr(n)&&!Nr(parseFloat(n))},e.isFunction=b,e.isNaN=function(n){return w(n)&&n!=+n},e.isNull=function(n){return n===J},e.isNumber=w,e.isObject=j,e.isRegExp=function(n){return n instanceof RegExp||xr.call(n)==lr
},e.isString=A,e.isUndefined=function(n){return typeof n=="undefined"},e.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?Fr(0,e+t):Rr(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},e.mixin=G,e.noConflict=function(){return n._=hr,this},e.random=function(n,r){return n==J&&r==J&&(r=1),n=+n||0,r==J&&(r=n,n=0),n+br(qr()*((+r||0)-n+1))},e.reduce=q,e.reduceRight=B,e.result=function(n,r){var t=n?n[r]:J;return b(t)?n[r]():t},e.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Ir(n).length
},e.some=D,e.sortedIndex=W,e.template=function(n,r,t){n||(n=""),t=h({},t,e.templateSettings);var u=0,o="__p+='",a=t.variable;n.replace(RegExp((t.escape||rr).source+"|"+(t.interpolate||rr).source+"|"+(t.evaluate||rr).source+"|$","g"),function(r,t,e,a,f){return o+=n.slice(u,f).replace(er,i),t&&(o+="'+_['escape']("+t+")+'"),a&&(o+="';"+a+";__p+='"),e&&(o+="'+((__t=("+e+"))==null?'':__t)+'"),u=f+r.length,r}),o+="';\n",a||(a="obj",o="with("+a+"||{}){"+o+"}"),o="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";
try{var f=Function("_","return "+o)(e)}catch(c){throw c.source=o,c}return r?f(r):(f.source=o,f)},e.unescape=function(n){return n==J?"":(n+"").replace(nr,p)},e.uniqueId=function(n){var r=++Y+"";return n?n+r:r},e.all=O,e.any=D,e.detect=N,e.foldl=q,e.foldr=B,e.include=E,e.inject=q,e.first=$,e.last=function(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&r!=J){var o=u;for(r=U(r,t);o--&&r(n[o],o,n);)e++}else if(e=r,e==J||t)return n[u-1];return l(n,Fr(0,u-e))}},e.take=$,e.head=$,e.chain=function(n){return n=new e(n),n.__chain__=H,n
},e.VERSION="1.0.1",G(e),e.prototype.chain=function(){return this.__chain__=H,this},e.prototype.value=function(){return this.__wrapped__},t("pop push reverse shift sort splice unshift".split(" "),function(n){var r=gr[n];e.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Dr&&0===n.length&&delete n[0],this}}),t(["concat","join","slice"],function(n){var r=gr[n];e.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new e(n),n.__chain__=H),n
}}),L&&!L.nodeType?Q?(Q.exports=e)._=e:L._=e:n._=e})(this);

View File

@@ -201,7 +201,7 @@
<!-- div -->
### <a id="_compactarray"></a>`_.compact(array)`
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3205 "View in source") [&#x24C9;][1]
<a href="#_compactarray">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3187 "View in source") [&#x24C9;][1]
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
@@ -225,7 +225,7 @@ _.compact([0, 1, false, 2, '', 3]);
<!-- div -->
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3235 "View in source") [&#x24C9;][1]
<a href="#_differencearray--array1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3217 "View in source") [&#x24C9;][1]
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
@@ -250,7 +250,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
<!-- div -->
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
<a href="#_firstarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3308 "View in source") [&#x24C9;][1]
<a href="#_firstarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3290 "View in source") [&#x24C9;][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)*.
@@ -310,7 +310,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3370 "View in source") [&#x24C9;][1]
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3352 "View in source") [&#x24C9;][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)*.
@@ -353,7 +353,7 @@ _.flatten(stooges, 'quotes');
<!-- div -->
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3423 "View in source") [&#x24C9;][1]
<a href="#_indexofarray-value--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3405 "View in source") [&#x24C9;][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.
@@ -385,7 +385,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3497 "View in source") [&#x24C9;][1]
<a href="#_initialarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3479 "View in source") [&#x24C9;][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)*.
@@ -442,7 +442,7 @@ _.initial(food, { 'type': 'vegetable' });
<!-- div -->
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3531 "View in source") [&#x24C9;][1]
<a href="#_intersectionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3513 "View in source") [&#x24C9;][1]
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -466,7 +466,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3623 "View in source") [&#x24C9;][1]
<a href="#_lastarray--callbackn-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3605 "View in source") [&#x24C9;][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).
@@ -523,7 +523,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3664 "View in source") [&#x24C9;][1]
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3646 "View in source") [&#x24C9;][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.
@@ -552,7 +552,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3705 "View in source") [&#x24C9;][1]
<a href="#_rangestart0-end--step1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3687 "View in source") [&#x24C9;][1]
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
@@ -590,7 +590,7 @@ _.range(0);
<!-- div -->
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
<a href="#_restarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3784 "View in source") [&#x24C9;][1]
<a href="#_restarray--callbackn1-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3766 "View in source") [&#x24C9;][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)*.
@@ -650,7 +650,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3848 "View in source") [&#x24C9;][1]
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3830 "View in source") [&#x24C9;][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)*.
@@ -699,7 +699,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
<!-- div -->
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3880 "View in source") [&#x24C9;][1]
<a href="#_unionarray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3862 "View in source") [&#x24C9;][1]
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
@@ -723,7 +723,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3927 "View in source") [&#x24C9;][1]
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3909 "View in source") [&#x24C9;][1]
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
@@ -770,7 +770,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
<!-- div -->
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3986 "View in source") [&#x24C9;][1]
<a href="#_withoutarray--value1-value2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3968 "View in source") [&#x24C9;][1]
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
@@ -795,7 +795,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4017 "View in source") [&#x24C9;][1]
<a href="#_ziparray1-array2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3999 "View in source") [&#x24C9;][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.
@@ -819,7 +819,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
<!-- div -->
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys [, values=[]])`
<a href="#_zipobjectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4046 "View in source") [&#x24C9;][1]
<a href="#_zipobjectkeys--values">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4028 "View in source") [&#x24C9;][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`.
@@ -854,7 +854,7 @@ _.zipObject(['moe', 'larry'], [30, 40]);
<!-- div -->
### <a id="_value"></a>`_(value)`
<a href="#_value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L321 "View in source") [&#x24C9;][1]
<a href="#_value">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L320 "View in source") [&#x24C9;][1]
Creates a `lodash` object, that wraps the given `value`, to enable method chaining.
@@ -885,7 +885,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
<!-- div -->
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5014 "View in source") [&#x24C9;][1]
<a href="#_tapvalue-interceptor">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4996 "View in source") [&#x24C9;][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.
@@ -915,7 +915,7 @@ _([1, 2, 3, 4])
<!-- div -->
### <a id="_prototypetostring"></a>`_.prototype.toString()`
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5031 "View in source") [&#x24C9;][1]
<a href="#_prototypetostring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5013 "View in source") [&#x24C9;][1]
Produces the `toString` result of the wrapped value.
@@ -936,7 +936,7 @@ _([1, 2, 3]).toString();
<!-- div -->
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5048 "View in source") [&#x24C9;][1]
<a href="#_prototypevalueof">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5030 "View in source") [&#x24C9;][1]
Extracts the wrapped value.
@@ -967,7 +967,7 @@ _([1, 2, 3]).valueOf();
<!-- div -->
### <a id="_atcollection--index1-index2-"></a>`_.at(collection [, index1, index2, ...])`
<a href="#_atcollection--index1-index2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2206 "View in source") [&#x24C9;][1]
<a href="#_atcollection--index1-index2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2188 "View in source") [&#x24C9;][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.
@@ -995,7 +995,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2248 "View in source") [&#x24C9;][1]
<a href="#_containscollection-target--fromindex0">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2230 "View in source") [&#x24C9;][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.
@@ -1033,7 +1033,7 @@ _.contains('curly', 'ur');
<!-- div -->
### <a id="_countbycollection--callbackidentity-thisarg"></a>`_.countBy(collection [, callback=identity, thisArg])`
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2302 "View in source") [&#x24C9;][1]
<a href="#_countbycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2284 "View in source") [&#x24C9;][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)*.
@@ -1069,7 +1069,7 @@ _.countBy(['one', 'two', 'three'], 'length');
<!-- div -->
### <a id="_everycollection--callbackidentity-thisarg"></a>`_.every(collection [, callback=identity, thisArg])`
<a href="#_everycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2354 "View in source") [&#x24C9;][1]
<a href="#_everycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2336 "View in source") [&#x24C9;][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)*.
@@ -1115,7 +1115,7 @@ _.every(stooges, { 'age': 50 });
<!-- div -->
### <a id="_filtercollection--callbackidentity-thisarg"></a>`_.filter(collection [, callback=identity, thisArg])`
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2415 "View in source") [&#x24C9;][1]
<a href="#_filtercollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2397 "View in source") [&#x24C9;][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)*.
@@ -1161,7 +1161,7 @@ _.filter(food, { 'type': 'fruit' });
<!-- div -->
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
<a href="#_findcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2482 "View in source") [&#x24C9;][1]
<a href="#_findcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2464 "View in source") [&#x24C9;][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)*.
@@ -1209,7 +1209,7 @@ var healthy = _.find(food, 'organic');
<!-- div -->
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2517 "View in source") [&#x24C9;][1]
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2499 "View in source") [&#x24C9;][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`.
@@ -1241,7 +1241,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2567 "View in source") [&#x24C9;][1]
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2549 "View in source") [&#x24C9;][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)*.
@@ -1278,7 +1278,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2600 "View in source") [&#x24C9;][1]
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2582 "View in source") [&#x24C9;][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`.
@@ -1307,7 +1307,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2652 "View in source") [&#x24C9;][1]
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2634 "View in source") [&#x24C9;][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)*.
@@ -1352,7 +1352,7 @@ _.map(stooges, 'name');
<!-- div -->
### <a id="_maxcollection--callbackidentity-thisarg"></a>`_.max(collection [, callback=identity, thisArg])`
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2709 "View in source") [&#x24C9;][1]
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2691 "View in source") [&#x24C9;][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)*.
@@ -1394,7 +1394,7 @@ _.max(stooges, 'age');
<!-- div -->
### <a id="_mincollection--callbackidentity-thisarg"></a>`_.min(collection [, callback=identity, thisArg])`
<a href="#_mincollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2778 "View in source") [&#x24C9;][1]
<a href="#_mincollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2760 "View in source") [&#x24C9;][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)*.
@@ -1436,7 +1436,7 @@ _.min(stooges, 'age');
<!-- div -->
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2828 "View in source") [&#x24C9;][1]
<a href="#_pluckcollection-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2810 "View in source") [&#x24C9;][1]
Retrieves the value of a specified property from all elements in the `collection`.
@@ -1466,7 +1466,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2860 "View in source") [&#x24C9;][1]
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2842 "View in source") [&#x24C9;][1]
Reduces a `collection` to a value that is the accumulated result of running each element in the `collection` through the `callback`, where each successive `callback` execution consumes the return value of the previous execution. If `accumulator` is not passed, the first element of the `collection` will be used as the initial `accumulator` value. The `callback` is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
@@ -1504,7 +1504,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2903 "View in source") [&#x24C9;][1]
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2885 "View in source") [&#x24C9;][1]
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
@@ -1535,7 +1535,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2963 "View in source") [&#x24C9;][1]
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2945 "View in source") [&#x24C9;][1]
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
@@ -1578,7 +1578,7 @@ _.reject(food, { 'type': 'fruit' });
<!-- div -->
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2984 "View in source") [&#x24C9;][1]
<a href="#_shufflecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2966 "View in source") [&#x24C9;][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.
@@ -1602,7 +1602,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
<!-- div -->
### <a id="_sizecollection"></a>`_.size(collection)`
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3017 "View in source") [&#x24C9;][1]
<a href="#_sizecollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2999 "View in source") [&#x24C9;][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.
@@ -1632,7 +1632,7 @@ _.size('curly');
<!-- div -->
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3064 "View in source") [&#x24C9;][1]
<a href="#_somecollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3046 "View in source") [&#x24C9;][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)*.
@@ -1678,7 +1678,7 @@ _.some(food, { 'type': 'meat' });
<!-- div -->
### <a id="_sortbycollection--callbackidentity-thisarg"></a>`_.sortBy(collection [, callback=identity, thisArg])`
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3120 "View in source") [&#x24C9;][1]
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3102 "View in source") [&#x24C9;][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)*.
@@ -1715,7 +1715,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
<!-- div -->
### <a id="_toarraycollection"></a>`_.toArray(collection)`
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3155 "View in source") [&#x24C9;][1]
<a href="#_toarraycollection">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3137 "View in source") [&#x24C9;][1]
Converts the `collection` to an array.
@@ -1739,7 +1739,7 @@ Converts the `collection` to an array.
<!-- div -->
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3187 "View in source") [&#x24C9;][1]
<a href="#_wherecollection-properties">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3169 "View in source") [&#x24C9;][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.
@@ -1776,7 +1776,7 @@ _.where(stooges, { 'age': 40 });
<!-- div -->
### <a id="_aftern-func"></a>`_.after(n, func)`
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4084 "View in source") [&#x24C9;][1]
<a href="#_aftern-func">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4066 "View in source") [&#x24C9;][1]
Creates a function that is restricted to executing `func` only after it is called `n` times. The `func` is executed with the `this` binding of the created function.
@@ -1804,7 +1804,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4117 "View in source") [&#x24C9;][1]
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4099 "View in source") [&#x24C9;][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.
@@ -1835,7 +1835,7 @@ func();
<!-- div -->
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4148 "View in source") [&#x24C9;][1]
<a href="#_bindallobject--methodname1-methodname2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4130 "View in source") [&#x24C9;][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.
@@ -1866,7 +1866,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4194 "View in source") [&#x24C9;][1]
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4176 "View in source") [&#x24C9;][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.
@@ -1907,7 +1907,7 @@ func();
<!-- div -->
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4217 "View in source") [&#x24C9;][1]
<a href="#_composefunc1-func2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4199 "View in source") [&#x24C9;][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.
@@ -1934,7 +1934,7 @@ welcome('moe');
<!-- div -->
### <a id="_createcallbackfuncidentity-thisarg-argcount3"></a>`_.createCallback([func=identity, thisArg, argCount=3])`
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4244 "View in source") [&#x24C9;][1]
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4226 "View in source") [&#x24C9;][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`.
@@ -1954,7 +1954,7 @@ Produces a callback bound to an optional `thisArg`. If `func` is a property name
<!-- div -->
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4310 "View in source") [&#x24C9;][1]
<a href="#_debouncefunc-wait-immediate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4292 "View in source") [&#x24C9;][1]
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
@@ -1980,7 +1980,7 @@ jQuery(window).on('resize', lazyLayout);
<!-- div -->
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4374 "View in source") [&#x24C9;][1]
<a href="#_deferfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4356 "View in source") [&#x24C9;][1]
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
@@ -2005,7 +2005,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4354 "View in source") [&#x24C9;][1]
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4336 "View in source") [&#x24C9;][1]
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
@@ -2032,7 +2032,7 @@ _.delay(log, 1000, 'logged later');
<!-- div -->
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4402 "View in source") [&#x24C9;][1]
<a href="#_memoizefunc--resolver">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4384 "View in source") [&#x24C9;][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.
@@ -2058,7 +2058,7 @@ var fibonacci = _.memoize(function(n) {
<!-- div -->
### <a id="_oncefunc"></a>`_.once(func)`
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4429 "View in source") [&#x24C9;][1]
<a href="#_oncefunc">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4411 "View in source") [&#x24C9;][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.
@@ -2084,7 +2084,7 @@ initialize();
<!-- div -->
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4464 "View in source") [&#x24C9;][1]
<a href="#_partialfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4446 "View in source") [&#x24C9;][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.
@@ -2111,7 +2111,7 @@ hi('moe');
<!-- div -->
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
<a href="#_partialrightfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4495 "View in source") [&#x24C9;][1]
<a href="#_partialrightfunc--arg1-arg2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4477 "View in source") [&#x24C9;][1]
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
@@ -2148,7 +2148,7 @@ options.imports
<!-- div -->
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4517 "View in source") [&#x24C9;][1]
<a href="#_throttlefunc-wait">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4499 "View in source") [&#x24C9;][1]
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
@@ -2173,7 +2173,7 @@ jQuery(window).on('scroll', throttled);
<!-- div -->
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4570 "View in source") [&#x24C9;][1]
<a href="#_wrapvalue-wrapper">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4552 "View in source") [&#x24C9;][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.
@@ -2209,7 +2209,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1077 "View in source") [&#x24C9;][1]
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1059 "View in source") [&#x24C9;][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)*.
@@ -2247,7 +2247,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1132 "View in source") [&#x24C9;][1]
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1114 "View in source") [&#x24C9;][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)*.
@@ -2294,7 +2294,7 @@ clone.childNodes.length;
<!-- div -->
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
<a href="#_clonedeepvalue--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1257 "View in source") [&#x24C9;][1]
<a href="#_clonedeepvalue--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1239 "View in source") [&#x24C9;][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)*.
@@ -2340,7 +2340,7 @@ clone.node == view.node;
<!-- div -->
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
<a href="#_defaultsobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1281 "View in source") [&#x24C9;][1]
<a href="#_defaultsobject--source1-source2-">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1263 "View in source") [&#x24C9;][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.
@@ -2366,7 +2366,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
<!-- div -->
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
<a href="#_forinobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L897 "View in source") [&#x24C9;][1]
<a href="#_forinobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L879 "View in source") [&#x24C9;][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`.
@@ -2402,7 +2402,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L922 "View in source") [&#x24C9;][1]
<a href="#_forownobject--callbackidentity-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L904 "View in source") [&#x24C9;][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`.
@@ -2430,7 +2430,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
<!-- div -->
### <a id="_functionsobject"></a>`_.functions(object)`
<a href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1298 "View in source") [&#x24C9;][1]
<a href="#_functionsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1280 "View in source") [&#x24C9;][1]
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
@@ -2457,7 +2457,7 @@ _.functions(_);
<!-- div -->
### <a id="_hasobject-property"></a>`_.has(object, property)`
<a href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1323 "View in source") [&#x24C9;][1]
<a href="#_hasobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1305 "View in source") [&#x24C9;][1]
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
@@ -2482,7 +2482,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
<!-- div -->
### <a id="_invertobject"></a>`_.invert(object)`
<a href="#_invertobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1340 "View in source") [&#x24C9;][1]
<a href="#_invertobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1322 "View in source") [&#x24C9;][1]
Creates an object composed of the inverted keys and values of the given `object`.
@@ -2506,7 +2506,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
<!-- div -->
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
<a href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L858 "View in source") [&#x24C9;][1]
<a href="#_isargumentsvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L840 "View in source") [&#x24C9;][1]
Checks if `value` is an `arguments` object.
@@ -2533,7 +2533,7 @@ _.isArguments([1, 2, 3]);
<!-- div -->
### <a id="_isarrayvalue"></a>`_.isArray(value)`
<a href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L940 "View in source") [&#x24C9;][1]
<a href="#_isarrayvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L922 "View in source") [&#x24C9;][1]
Checks if `value` is an array.
@@ -2560,7 +2560,7 @@ _.isArray([1, 2, 3]);
<!-- div -->
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
<a href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1366 "View in source") [&#x24C9;][1]
<a href="#_isbooleanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1348 "View in source") [&#x24C9;][1]
Checks if `value` is a boolean value.
@@ -2584,7 +2584,7 @@ _.isBoolean(null);
<!-- div -->
### <a id="_isdatevalue"></a>`_.isDate(value)`
<a href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1383 "View in source") [&#x24C9;][1]
<a href="#_isdatevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1365 "View in source") [&#x24C9;][1]
Checks if `value` is a date.
@@ -2608,7 +2608,7 @@ _.isDate(new Date);
<!-- div -->
### <a id="_iselementvalue"></a>`_.isElement(value)`
<a href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1400 "View in source") [&#x24C9;][1]
<a href="#_iselementvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1382 "View in source") [&#x24C9;][1]
Checks if `value` is a DOM element.
@@ -2632,7 +2632,7 @@ _.isElement(document.body);
<!-- div -->
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
<a href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1425 "View in source") [&#x24C9;][1]
<a href="#_isemptyvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1407 "View in source") [&#x24C9;][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".
@@ -2662,7 +2662,7 @@ _.isEmpty('');
<!-- div -->
### <a id="_isequala-b--callback-thisarg"></a>`_.isEqual(a, b [, callback, thisArg])`
<a href="#_isequala-b--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1484 "View in source") [&#x24C9;][1]
<a href="#_isequala-b--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1466 "View in source") [&#x24C9;][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)*.
@@ -2707,7 +2707,7 @@ _.isEqual(words, otherWords, function(a, b) {
<!-- div -->
### <a id="_isfinitevalue"></a>`_.isFinite(value)`
<a href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1668 "View in source") [&#x24C9;][1]
<a href="#_isfinitevalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1650 "View in source") [&#x24C9;][1]
Checks if `value` is, or can be coerced to, a finite number.
@@ -2745,7 +2745,7 @@ _.isFinite(Infinity);
<!-- div -->
### <a id="_isfunctionvalue"></a>`_.isFunction(value)`
<a href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1685 "View in source") [&#x24C9;][1]
<a href="#_isfunctionvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1667 "View in source") [&#x24C9;][1]
Checks if `value` is a function.
@@ -2769,7 +2769,7 @@ _.isFunction(_);
<!-- div -->
### <a id="_isnanvalue"></a>`_.isNaN(value)`
<a href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1748 "View in source") [&#x24C9;][1]
<a href="#_isnanvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1730 "View in source") [&#x24C9;][1]
Checks if `value` is `NaN`.
@@ -2804,7 +2804,7 @@ _.isNaN(undefined);
<!-- div -->
### <a id="_isnullvalue"></a>`_.isNull(value)`
<a href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1770 "View in source") [&#x24C9;][1]
<a href="#_isnullvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1752 "View in source") [&#x24C9;][1]
Checks if `value` is `null`.
@@ -2831,7 +2831,7 @@ _.isNull(undefined);
<!-- div -->
### <a id="_isnumbervalue"></a>`_.isNumber(value)`
<a href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1787 "View in source") [&#x24C9;][1]
<a href="#_isnumbervalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1769 "View in source") [&#x24C9;][1]
Checks if `value` is a number.
@@ -2855,7 +2855,7 @@ _.isNumber(8.4 * 5);
<!-- div -->
### <a id="_isobjectvalue"></a>`_.isObject(value)`
<a href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1715 "View in source") [&#x24C9;][1]
<a href="#_isobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1697 "View in source") [&#x24C9;][1]
Checks if `value` is the language type of Object. *(e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)*
@@ -2885,7 +2885,7 @@ _.isObject(1);
<!-- div -->
### <a id="_isplainobjectvalue"></a>`_.isPlainObject(value)`
<a href="#_isplainobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1815 "View in source") [&#x24C9;][1]
<a href="#_isplainobjectvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1797 "View in source") [&#x24C9;][1]
Checks if a given `value` is an object created by the `Object` constructor.
@@ -2920,7 +2920,7 @@ _.isPlainObject({ 'name': 'moe', 'age': 40 });
<!-- div -->
### <a id="_isregexpvalue"></a>`_.isRegExp(value)`
<a href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1840 "View in source") [&#x24C9;][1]
<a href="#_isregexpvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1822 "View in source") [&#x24C9;][1]
Checks if `value` is a regular expression.
@@ -2944,7 +2944,7 @@ _.isRegExp(/moe/);
<!-- div -->
### <a id="_isstringvalue"></a>`_.isString(value)`
<a href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1857 "View in source") [&#x24C9;][1]
<a href="#_isstringvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1839 "View in source") [&#x24C9;][1]
Checks if `value` is a string.
@@ -2968,7 +2968,7 @@ _.isString('moe');
<!-- div -->
### <a id="_isundefinedvalue"></a>`_.isUndefined(value)`
<a href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1874 "View in source") [&#x24C9;][1]
<a href="#_isundefinedvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1856 "View in source") [&#x24C9;][1]
Checks if `value` is `undefined`.
@@ -2992,7 +2992,7 @@ _.isUndefined(void 0);
<!-- div -->
### <a id="_keysobject"></a>`_.keys(object)`
<a href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L959 "View in source") [&#x24C9;][1]
<a href="#_keysobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L941 "View in source") [&#x24C9;][1]
Creates an array composed of the own enumerable property names of `object`.
@@ -3016,7 +3016,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1934 "View in source") [&#x24C9;][1]
<a href="#_mergeobject--source1-source2--callback-thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1916 "View in source") [&#x24C9;][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)*.
@@ -3072,7 +3072,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2041 "View in source") [&#x24C9;][1]
<a href="#_omitobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2023 "View in source") [&#x24C9;][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)*.
@@ -3103,7 +3103,7 @@ _.omit({ 'name': 'moe', 'age': 40 }, function(value) {
<!-- div -->
### <a id="_pairsobject"></a>`_.pairs(object)`
<a href="#_pairsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2075 "View in source") [&#x24C9;][1]
<a href="#_pairsobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2057 "View in source") [&#x24C9;][1]
Creates a two dimensional array of the given object's key-value pairs, i.e. `[[key1, value1], [key2, value2]]`.
@@ -3127,7 +3127,7 @@ _.pairs({ 'moe': 30, 'larry': 40 });
<!-- div -->
### <a id="_parseintvalue"></a>`_.parseInt(value)`
<a href="#_parseintvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2104 "View in source") [&#x24C9;][1]
<a href="#_parseintvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2086 "View in source") [&#x24C9;][1]
Converts the given `value` into an integer of the specified `radix`.
@@ -3153,7 +3153,7 @@ _.parseInt('08');
<!-- div -->
### <a id="_pickobject-callback-prop1-prop2--thisarg"></a>`_.pick(object, callback|[prop1, prop2, ..., thisArg])`
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2134 "View in source") [&#x24C9;][1]
<a href="#_pickobject-callback-prop1-prop2--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2116 "View in source") [&#x24C9;][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)*.
@@ -3184,7 +3184,7 @@ _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) {
<!-- div -->
### <a id="_valuesobject"></a>`_.values(object)`
<a href="#_valuesobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2171 "View in source") [&#x24C9;][1]
<a href="#_valuesobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2153 "View in source") [&#x24C9;][1]
Creates an array composed of the own enumerable property values of `object`.
@@ -3215,7 +3215,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
<!-- div -->
### <a id="_escapestring"></a>`_.escape(string)`
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4594 "View in source") [&#x24C9;][1]
<a href="#_escapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4576 "View in source") [&#x24C9;][1]
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
@@ -3239,7 +3239,7 @@ _.escape('Moe, Larry & Curly');
<!-- div -->
### <a id="_identityvalue"></a>`_.identity(value)`
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4612 "View in source") [&#x24C9;][1]
<a href="#_identityvalue">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4594 "View in source") [&#x24C9;][1]
This function returns the first argument passed to it.
@@ -3264,7 +3264,7 @@ moe === _.identity(moe);
<!-- div -->
### <a id="_mixinobject"></a>`_.mixin(object)`
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4638 "View in source") [&#x24C9;][1]
<a href="#_mixinobject">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4620 "View in source") [&#x24C9;][1]
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
@@ -3294,7 +3294,7 @@ _('moe').capitalize();
<!-- div -->
### <a id="_noconflict"></a>`_.noConflict()`
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4667 "View in source") [&#x24C9;][1]
<a href="#_noconflict">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4649 "View in source") [&#x24C9;][1]
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
@@ -3314,7 +3314,7 @@ var lodash = _.noConflict();
<!-- div -->
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4690 "View in source") [&#x24C9;][1]
<a href="#_randommin0-max1">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4672 "View in source") [&#x24C9;][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.
@@ -3342,7 +3342,7 @@ _.random(5);
<!-- div -->
### <a id="_resultobject-property"></a>`_.result(object, property)`
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4728 "View in source") [&#x24C9;][1]
<a href="#_resultobject-property">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4710 "View in source") [&#x24C9;][1]
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked and its result returned, else the property value is returned. If `object` is falsey, then `null` is returned.
@@ -3395,7 +3395,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4815 "View in source") [&#x24C9;][1]
<a href="#_templatetext-data-options">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4797 "View in source") [&#x24C9;][1]
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
@@ -3479,7 +3479,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> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4940 "View in source") [&#x24C9;][1]
<a href="#_timesn-callback--thisarg">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4922 "View in source") [&#x24C9;][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)*.
@@ -3511,7 +3511,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
<!-- div -->
### <a id="_unescapestring"></a>`_.unescape(string)`
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4966 "View in source") [&#x24C9;][1]
<a href="#_unescapestring">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4948 "View in source") [&#x24C9;][1]
The opposite of `_.escape`, this method converts the HTML entities `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to their corresponding characters.
@@ -3535,7 +3535,7 @@ _.unescape('Moe, Larry &amp; Curly');
<!-- div -->
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4986 "View in source") [&#x24C9;][1]
<a href="#_uniqueidprefix">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4968 "View in source") [&#x24C9;][1]
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
@@ -3569,7 +3569,7 @@ _.uniqueId();
<!-- div -->
### <a id="_templatesettingsimports_"></a>`_.templateSettings.imports._`
<a href="#_templatesettingsimports_">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L390 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsimports_">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L384 "View in source") [&#x24C9;][1]
A reference to the `lodash` function.
@@ -3588,7 +3588,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_version"></a>`_.VERSION`
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5220 "View in source") [&#x24C9;][1]
<a href="#_version">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5202 "View in source") [&#x24C9;][1]
*(String)*: The semantic version number.
@@ -3600,7 +3600,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettings"></a>`_.templateSettings`
<a href="#_templatesettings">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L342 "View in source") [&#x24C9;][1]
<a href="#_templatesettings">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L336 "View in source") [&#x24C9;][1]
*(Object)*: By default, the template delimiters used by Lo-Dash are similar to those in embedded Ruby *(ERB)*. Change the following template settings to use alternative delimiters.
@@ -3612,7 +3612,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettingsescape"></a>`_.templateSettings.escape`
<a href="#_templatesettingsescape">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L350 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsescape">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L344 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect `data` property values to be HTML-escaped.
@@ -3624,7 +3624,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettingsevaluate"></a>`_.templateSettings.evaluate`
<a href="#_templatesettingsevaluate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L358 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsevaluate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L352 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect code to be evaluated.
@@ -3636,7 +3636,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettingsinterpolate"></a>`_.templateSettings.interpolate`
<a href="#_templatesettingsinterpolate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L366 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsinterpolate">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L360 "View in source") [&#x24C9;][1]
*(RegExp)*: Used to detect `data` property values to inject.
@@ -3648,7 +3648,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettingsvariable"></a>`_.templateSettings.variable`
<a href="#_templatesettingsvariable">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L374 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsvariable">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L368 "View in source") [&#x24C9;][1]
*(String)*: Used to reference the data object in the template text.
@@ -3660,7 +3660,7 @@ A reference to the `lodash` function.
<!-- div -->
### <a id="_templatesettingsimports"></a>`_.templateSettings.imports`
<a href="#_templatesettingsimports">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L382 "View in source") [&#x24C9;][1]
<a href="#_templatesettingsimports">#</a> [&#x24C8;](https://github.com/bestiejs/lodash/blob/master/lodash.js#L376 "View in source") [&#x24C9;][1]
*(Object)*: Used to import variables into the compiled template.

View File

@@ -174,7 +174,6 @@
/* Native method shortcuts for methods with the same name as other `lodash` methods */
var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind,
nativeCreate = reNative.test(nativeCreate = Object.create) && nativeCreate,
nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray,
nativeIsFinite = context.isFinite,
nativeIsNaN = context.isNaN,
@@ -319,15 +318,10 @@
* @returns {Object} Returns a `lodash` instance.
*/
function lodash(value) {
// allow invoking `lodash` without the `new` operator
if (!(this instanceof lodash)) {
return new lodash(value);
}
// exit early if already wrapped, even if wrapped by a different `lodash` constructor
if (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__')) {
return value;
}
this.__wrapped__ = value;
// don't wrap if already wrapped, even if wrapped by a different `lodash` constructor
return (value && typeof value == 'object' && hasOwnProperty.call(value, '__wrapped__'))
? value
: new lodashWrapper(value);
}
/**
@@ -645,7 +639,9 @@
}
if (this instanceof bound) {
// ensure `new bound` is an instance of `func`
thisBinding = createObject(func.prototype);
noop.prototype = func.prototype;
thisBinding = new noop;
noop.prototype = null;
// mimic the constructor's `return` behavior
// http://es5.github.com/#x13.2.2
@@ -710,33 +706,6 @@
);
}
/**
* Creates a new object that inherits from the given `prototype` object.
*
* @private
* @param {Object} prototype The prototype object.
* @returns {Object} Returns the new object.
*/
var createObject = nativeCreate || function(prototype) {
noop.prototype = prototype;
var result = new noop;
noop.prototype = null;
return result;
};
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function createWrapper(value) {
var result = createObject(lodash.prototype);
result.__wrapped__ = value;
return result;
}
/**
* A function compiled to iterate `arguments` objects, arrays, objects, and
* strings consistenly across environments, executing the `callback` for each
@@ -789,6 +758,19 @@
return typeof value.toString != 'function' && typeof (value + '') == 'string';
}
/**
* A fast path for creating `lodash` wrapper objects.
*
* @private
* @param {Mixed} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns a `lodash` instance.
*/
function lodashWrapper(value) {
this.__wrapped__ = value;
}
// ensure `new lodashWrapper` is an instance of `lodash`
lodashWrapper.prototype = lodash.prototype;
/**
* A no-operation function.
*
@@ -4647,7 +4629,7 @@
var result = func.apply(lodash, args);
return (value && typeof value == 'object' && value == result)
? this
: createWrapper(result);
: new lodashWrapper(result);
};
});
}
@@ -5203,7 +5185,7 @@
var result = func(this.__wrapped__, callback, thisArg);
return callback == null || (thisArg && typeof callback != 'function')
? result
: createWrapper(result);
: new lodashWrapper(result);
};
}
});
@@ -5245,7 +5227,7 @@
each(['concat', 'slice', 'splice'], function(methodName) {
var func = arrayRef[methodName];
lodash.prototype[methodName] = function() {
return createWrapper(func.apply(this.__wrapped__, arguments));
return new lodashWrapper(func.apply(this.__wrapped__, arguments));
};
});
@@ -5263,7 +5245,7 @@
if (value.length === 0) {
delete value[0];
}
return isSplice ? createWrapper(result) : result;
return isSplice ? new lodashWrapper(result) : result;
};
});
}