mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Rename _.object to _.zipObject and make _.object an alias of _.zipObject.
Former-commit-id: 7ae3c9d8be32b1430945ffeafc20c740f1d7f409
This commit is contained in:
13
build.js
13
build.js
@@ -48,6 +48,7 @@
|
||||
'include': 'contains',
|
||||
'inject': 'reduce',
|
||||
'methods': 'functions',
|
||||
'object': 'zipObject',
|
||||
'select': 'filter',
|
||||
'tail': 'rest',
|
||||
'take': 'first',
|
||||
@@ -69,7 +70,8 @@
|
||||
'reduceRight': ['foldr'],
|
||||
'rest': ['drop', 'tail'],
|
||||
'some': ['any'],
|
||||
'uniq': ['unique']
|
||||
'uniq': ['unique'],
|
||||
'zipObject': ['object']
|
||||
};
|
||||
|
||||
/** Used to track function dependencies */
|
||||
@@ -1593,7 +1595,8 @@
|
||||
var exposeAssign = !isUnderscore,
|
||||
exposeForIn = !isUnderscore,
|
||||
exposeForOwn = !isUnderscore,
|
||||
exposeIsPlainObject = !isUnderscore;
|
||||
exposeIsPlainObject = !isUnderscore,
|
||||
exposeZipObject = !isUnderscore;
|
||||
|
||||
// flags to specify export options
|
||||
var isAMD = exportsOptions.indexOf('amd') > -1,
|
||||
@@ -1632,6 +1635,7 @@
|
||||
exposeForIn = methods.indexOf('forIn') > -1;
|
||||
exposeForOwn = methods.indexOf('forOwn') > -1;
|
||||
exposeIsPlainObject = methods.indexOf('isPlainObject') > -1;
|
||||
exposeZipObject = methods.indexOf('zipObject') > -1;
|
||||
|
||||
methods = _.without.apply(_, [plusMethods].concat(minusMethods));
|
||||
useUnderscoreClone = methods.indexOf('clone') < 0;
|
||||
@@ -2299,7 +2303,7 @@
|
||||
});
|
||||
}
|
||||
if (isUnderscore) {
|
||||
// remove `_.assign`, `_.forIn`, `_.forOwn`, and `_.isPlainObject` assignments
|
||||
// remove `_.assign`, `_.forIn`, `_.forOwn`, `_.isPlainObject`, and `_.zipObject` assignments
|
||||
(function() {
|
||||
var snippet = getMethodAssignments(source),
|
||||
modified = snippet;
|
||||
@@ -2316,6 +2320,9 @@
|
||||
if (!exposeIsPlainObject) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.isPlainObject *=.+\n/m, '');
|
||||
}
|
||||
if (!exposeZipObject) {
|
||||
modified = modified.replace(/^(?: *\/\/.*\s*)* *lodash\.zipObject *=.+\n/m, '');
|
||||
}
|
||||
source = source.replace(snippet, function() {
|
||||
return modified;
|
||||
});
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
'without',
|
||||
'wrap',
|
||||
'zip',
|
||||
'zipObject',
|
||||
|
||||
// properties used by the `backbone` and `underscore` builds
|
||||
'__chain__',
|
||||
|
||||
78
dist/lodash.compat.js
vendored
78
dist/lodash.compat.js
vendored
@@ -698,12 +698,12 @@
|
||||
};
|
||||
}
|
||||
if (argCount === 4) {
|
||||
return function(accumulator, value, index, object) {
|
||||
return func.call(thisArg, accumulator, value, index, object);
|
||||
return function(accumulator, value, index, collection) {
|
||||
return func.call(thisArg, accumulator, value, index, collection);
|
||||
};
|
||||
}
|
||||
return function(value, index, object) {
|
||||
return func.call(thisArg, value, index, object);
|
||||
return function(value, index, collection) {
|
||||
return func.call(thisArg, value, index, collection);
|
||||
};
|
||||
}
|
||||
return func;
|
||||
@@ -3660,39 +3660,6 @@
|
||||
return -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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.object(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function object(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of numbers (positive and/or negative) progressing from
|
||||
* `start` up to but not including `end`.
|
||||
@@ -4044,6 +4011,40 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias object
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.zipObject(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function zipObject(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -5003,7 +5004,6 @@
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
@@ -5027,6 +5027,7 @@
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
// add aliases
|
||||
lodash.collect = map;
|
||||
@@ -5034,6 +5035,7 @@
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.object = zipObject;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
70
dist/lodash.compat.min.js
vendored
70
dist/lodash.compat.min.js
vendored
@@ -4,40 +4,40 @@
|
||||
* Build: `lodash -o ./dist/lodash.compat.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(e){function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function B(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||a);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Ht.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Ht.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function R(n){return n.charCodeAt(0)}function T(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function D(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=U(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(L.prototype=n.prototype,c=new L,L.prototype=null,a=n.apply(c,a),nt(a)?a:c):n.apply(c,a)}var o=Z(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function P(n,t,r){if(null==n)return xt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Er(n);return function(t){for(var r=u.length,e=!1;r--&&(e=Y(t[u[r]],n[u[r]],f)););return e
|
||||
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function z(){for(var n,t={e:kt,f:Et,g:pr,i:vr,j:yr,k:b,b:"l(n)",c:"",h:"",l:"",m:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=Ft,e="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b?(e+="var o=n.length;j=-1;if("+t.b+"){",t.j&&(e+="if(m(n)){n=n.split('')}"),e+="while(++j<o){"+t.h+"}}else{"):t.i&&(e+="var o=n.length;j=-1;if(o&&k(n)){while(++j<o){j+='';"+t.h+"}}else{"),t.f&&(e+="var v=typeof n=='function';"),t.g&&t.m?(e+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];",t.f&&(e+="if(!(v&&j=='prototype')){"),e+=t.h+"",t.f&&(e+="}")):(e+="for(j in n){",(t.f||t.m)&&(e+="if(",t.f&&(e+="!(v&&j=='prototype')"),t.f&&t.m&&(e+="&&"),t.m&&(e+="i.call(n,j)"),e+="){"),e+=t.h+";",(t.f||t.m)&&(e+="}")),e+="}",t.e){e+="var g=n.constructor;";
|
||||
for(var u=0;7>u;u++)e+="j='"+t.k[u]+"';if(","constructor"==t.k[u]&&(e+="!(g&&g.prototype===n)&&"),e+="i.call(n,j)){"+t.h+"}"}return(t.b||t.i)&&(e+="}"),e+=t.c+";return u",r("f,i,k,l,m,r,p","return function("+n+"){"+e+"}")(P,Ht,G,kr,rt,$,rr)}function C(n){return"\\"+F[n]}function M(n){return Ir[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(){}function U(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=Nt(0>r?0:r);++e<r;)u[e]=n[t+e];
|
||||
return u}function V(n){return Nr[n]}function G(n){return Xt.call(n)==j}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var r=n.constructor;return!Z(r)&&(!mr||!K(n))||r instanceof r?It?(Or(n,function(n,r,e){return t=!Ht.call(e,r),!1}),!1===t):(Or(n,function(n,r){t=r}),!1===t||Ht.call(n,t)):t}function J(n){var t=[];return Sr(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,o,i){var f=n;if(typeof t=="function"&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:P(e,u,1),f=e(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=nt(f)){var a=Xt.call(f);if(!A[a]||mr&&K(f))return f;var c=kr(f)}if(!u||!t)return u?c?U(f):Ar({},f):f;switch(u=_r[a],a){case x:case O:return new u(+f);case k:case N:return new u(f);case I:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),a=o.length;a--;)if(o[a]==n)return i[a];return f=c?u(f.length):{},c&&(Ht.call(n,"index")&&(f.index=n.index),Ht.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(c?ct:Sr)(n,function(n,u){f[u]=Q(n,t,e,r,o,i)}),f}function W(n){var t=[];return Or(n,function(n,r){Z(n)&&t.push(r)
|
||||
}),t.sort()}function X(n){for(var t=-1,r=Er(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function Y(n,t,r,e,u,o){var i=r===f;if(r&&!i){r=typeof e=="undefined"?r:P(r,e,2);var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var c=typeof n,l=typeof t;if(n===n&&(!n||"function"!=c&&"object"!=c)&&(!t||"function"!=l&&"object"!=l))return!1;if(null==n||null==t)return n===t;if(l=Xt.call(n),c=Xt.call(t),l==j&&(l=E),c==j&&(c=E),l!=c)return!1;switch(l){case x:case O:return+n==+t;
|
||||
case k:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case N:return n==t+""}if(c=l==w,!c){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(l!=E||mr&&(K(n)||K(t)))return!1;var l=!gr&&G(n)?Rt:n.constructor,p=!gr&&G(t)?Rt:t.constructor;if(l!=p&&(!Z(l)||!(l instanceof l&&Z(p)&&p instanceof p)))return!1}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var s=0,a=!0;if(u.push(n),o.push(t),c){if(l=n.length,s=t.length,a=s==n.length,!a&&!i)return a;for(;s--;)if(c=l,p=t[s],i)for(;c--&&!(a=Y(n[c],p,r,e,u,o)););else if(!(a=Y(n[s],p,r,e,u,o)))break;
|
||||
return a}return Or(t,function(t,i,f){return Ht.call(f,i)?(s++,a=Ht.call(n,i)&&Y(n[i],t,r,e,u,o)):void 0}),a&&!i&&Or(n,function(n,t,r){return Ht.call(r,t)?a=-1<--s:void 0}),a}function Z(n){return typeof n=="function"}function nt(n){return n?$[typeof n]:!1}function tt(n){return typeof n=="number"||Xt.call(n)==k}function rt(n){return typeof n=="string"||Xt.call(n)==N}function et(n,t,r){var e=arguments,u=0,o=2;if(!nt(n))return n;if(r===f)var i=e[3],a=e[4],c=e[5];else a=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=P(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
||||
for(;++u<o;)(kr(e[u])?ct:Sr)(e[u],function(t,r){var e,u,o=t,l=n[r];if(t&&((u=kr(t))||Fr(t))){for(o=a.length;o--;)if(e=a[o]==t){l=c[o];break}e||(l=u?kr(l)?l:[]:Fr(l)?l:{},i&&(o=i(l,t),typeof o!="undefined"&&(l=o)),a.push(t),c.push(l),i||(l=et(l,t,f,i,a,c)))}else i&&(o=i(l,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(l=o);n[r]=l});return n}function ut(n){for(var t=-1,r=Er(n),e=r.length,u=Nt(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?er(0,u+r):r)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):xr(n,function(n){return++e<r?void 0:!(o=n===t)
|
||||
}),o}function it(n,t,r){var e=!0;if(t=P(t,r),kr(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else xr(n,function(n,r,u){return e=!!t(n,r,u)});return e}function ft(n,t,r){var e=[];if(t=P(t,r),kr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else xr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=P(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&kr(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else xr(n,t,r);
|
||||
return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=Nt(typeof u=="number"?u:0);if(t=P(t,r),kr(n))for(;++e<u;)o[e]=t(n[e],e,n);else xr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;if(!t&&kr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?R:P(t,r),xr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=P(t,e,4),kr(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else xr(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)
|
||||
});return r}function vt(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=Er(n),o=f.length;else yr&&rt(n)&&(u=n.split(""));return t=P(t,e,4),ct(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function gt(n,t,r){var e;if(t=P(t,r),kr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else xr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=P(t,r);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n[0];return U(n,0,ur(er(0,e),u))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];kr(o)?Jt.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?er(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=P(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:er(0,t);return U(n,e)
|
||||
}function _t(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?P(r,e,1):xt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=!1);var a=!t&&75<=o;if(a)var c={};for(r&&(f=[],r=P(r,e));++u<o;){e=n[u];var l=r?r(e,u,n):e;if(a)var p=l+"",p=Ht.call(c,p)?!(f=c[p]):f=c[p]=[];(t?!u||f[f.length-1]!==l:p||0>mt(f,l))&&((r||a)&&f.push(l),i.push(e))}return i}function jt(n,t){return lr||Yt&&2<arguments.length?Yt.call.apply(Yt,arguments):D(n,t,U(arguments,2))
|
||||
}function wt(n){var t=U(arguments,1);return Wt(function(){n.apply(r,t)},1)}function xt(n){return n}function Ot(n){ct(W(n),function(t){var r=o[t]=n[t];o.prototype[t]=function(){var n=[this.__wrapped__];return Jt.apply(n,arguments),new o(r.apply(o,n))}})}function St(){return this.__wrapped__}e=e?q.defaults(n.Object(),e,q.pick(n,_)):n;var kt,Et,It,Nt=e.Array,At=e.Boolean,$t=e.Date,Ft=e.Function,qt=e.Math,Bt=e.Number,Rt=e.Object,Tt=e.RegExp,Dt=e.String,Pt=Nt(),zt=Rt(),Ct=e._,Mt=Tt("^"+(zt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Kt=qt.ceil,Lt=e.clearTimeout,Ut=Pt.concat,Vt=qt.floor,Gt=Mt.test(Gt=Rt.getPrototypeOf)&&Gt,Ht=zt.hasOwnProperty,Jt=Pt.push,Qt=e.setImmediate,Wt=e.setTimeout,Xt=zt.toString,Yt=Mt.test(Yt=U.bind)&&Yt,Zt=Mt.test(Zt=Nt.isArray)&&Zt,nr=e.isFinite,tr=e.isNaN,rr=Mt.test(rr=Rt.keys)&&rr,er=qt.max,ur=qt.min,or=e.parseInt,ir=qt.random,fr=Mt.test(e.attachEvent),ar=!/\n{2,}/.test(Ft()),cr=Yt&&!/\n|true/.test(Yt+fr),lr=Yt&&!cr,pr=rr&&(fr||cr||!ar),sr=(sr={0:1,length:1},Pt.splice.call(sr,0,1),sr[0]),vr=!0;
|
||||
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)vr=!r;kt=!/valueOf/.test(t),Et=n.propertyIsEnumerable("prototype"),It="x"!=t[0]})(1);var gr=arguments.constructor==Rt,hr=!G(arguments),yr="xx"!="x"[0]+Rt("x")[0];try{var mr=Xt.call(document)==E&&!({toString:0}+"")}catch(dr){}var _r={};_r[w]=Nt,_r[x]=At,_r[O]=$t,_r[E]=Rt,_r[k]=Bt,_r[I]=Tt,_r[N]=Dt,o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:o}};
|
||||
var br={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},jr={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},wr={l:"if(!r[typeof n])return u;"+jr.l,b:!1},xr=z(jr);hr&&(G=function(n){return n?Ht.call(n,"callee"):!1});var Or=z(jr,wr,{m:!1}),Sr=z(jr,wr),kr=Zt||function(n){return gr&&n instanceof Nt||Xt.call(n)==w},Er=rr?function(n){return nt(n)?Et&&typeof n=="function"||vr&&n.length&&G(n)?J(n):rr(n):[]
|
||||
}:J,Ir={"&":"&","<":"<",">":">",'"':""","'":"'"},Nr=X(Ir),Ar=z(br,{l:br.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),$r=z(br);Z(/x/)&&(Z=function(n){return n instanceof Ft||Xt.call(n)==S});var Fr=Gt?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=Gt(t))&&Gt(r);return r?n==r||Gt(n)==r&&!G(n):H(n)}:H,qr=8==or("08")?or:function(n,t){return or(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)
|
||||
},Br=lt,Rr=ft;return cr&&u&&typeof Qt=="function"&&(wt=jt(Qt,e)),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.assign=Ar,o.at=function(n){var t=-1,r=Ut.apply(Pt,U(arguments,1)),e=r.length,u=Nt(e);for(yr&&rt(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},o.bind=jt,o.bindAll=function(n){for(var t=Ut.apply(Pt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=jt(n[u],n)}return n},o.bindKey=function(n,t){return D(n,t,U(arguments,2))
|
||||
},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},o.countBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Ht.call(e,r)?e[r]++:e[r]=1}),e},o.debounce=function(n,t,r){function e(){f=null,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;return u=arguments,i=this,Lt(f),f=Wt(e,t),a&&(o=n.apply(i,u)),o
|
||||
}},o.defaults=$r,o.defer=wt,o.delay=function(n,t){var e=U(arguments,2);return Wt(function(){n.apply(r,e)},t)},o.difference=function(n){for(var t=-1,r=n?n.length:0,e=Ut.apply(Pt,arguments),e=B(e,r),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.filter=ft,o.flatten=yt,o.forEach=ct,o.forIn=Or,o.forOwn=Sr,o.functions=W,o.groupBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Ht.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=P(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return U(n,0,ur(er(0,u-e),u))},o.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Ht.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=B(t[p],0,100)))(c))continue n;f.push(c)}}return f},o.invert=X,o.invoke=function(n,t){var r=U(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Nt(typeof o=="number"?o:0);
|
||||
return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=Er,o.map=lt,o.max=pt,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Ht.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.merge=et,o.min=function(n,t,r){var e=1/0,u=e;if(!t&&kr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?R:P(t,r),xr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},o.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];
|
||||
t?u[o]=t[r]:u[o[0]]=o[1]}return u},o.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=P(t,r);else var o=Ut.apply(Pt,arguments);return Or(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)}),u},o.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=Er(n),e=r.length,u=Nt(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){return D(n,U(arguments,1))},o.partialRight=function(n){return D(n,U(arguments,1),null,f)
|
||||
},o.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Ut.apply(Pt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=P(t,r),Or(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},o.pluck=Br,o.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=er(0,Kt((t-n)/r));for(var u=Nt(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=P(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},o.rest=dt,o.shuffle=function(n){var t=-1,r=n?n.length:0,e=Nt(typeof r=="number"?r:0);
|
||||
return ct(n,function(n){var r=Vt(ir()*(++t+1));e[t]=e[r],e[r]=n}),e},o.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=Nt(typeof u=="number"?u:0);for(t=P(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(T);u--;)o[u]=o[u].c;return o},o.tap=function(n,t){return t(n),n},o.throttle=function(n,t){function r(){f=new $t,i=null,u=n.apply(o,e)}var e,u,o,i,f=0;return function(){var a=new $t,c=t-(a-f);return e=arguments,o=this,0<c?i||(i=Wt(r,c)):(Lt(i),i=null,f=a,u=n.apply(o,e)),u}
|
||||
},o.times=function(n,t,r){n=+n||0;for(var e=-1,u=Nt(n);++e<n;)u[e]=t.call(r,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?yr&&rt(n)?n.split(""):U(n):ut(n)},o.union=function(){return bt(Ut.apply(Pt,arguments))},o.uniq=bt,o.values=ut,o.where=Rr,o.without=function(n){for(var t=-1,r=n?n.length:0,e=B(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.wrap=function(n,t){return function(){var r=[n];return Jt.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?pt(Br(arguments,"length")):0,e=Nt(r);++t<r;)e[t]=Br(arguments,t);
|
||||
return e},o.collect=lt,o.drop=dt,o.each=ct,o.extend=Ar,o.methods=W,o.select=ft,o.tail=dt,o.unique=bt,Ot(o),o.clone=Q,o.cloneDeep=function(n,t,r){return Q(n,!0,t,r)},o.contains=ot,o.escape=function(n){return null==n?"":(n+"").replace(m,M)},o.every=it,o.find=at,o.has=function(n,t){return n?Ht.call(n,t):!1},o.identity=xt,o.indexOf=mt,o.isArguments=G,o.isArray=kr,o.isBoolean=function(n){return!0===n||!1===n||Xt.call(n)==x},o.isDate=function(n){return n instanceof $t||Xt.call(n)==O},o.isElement=function(n){return n?1===n.nodeType:!1
|
||||
},o.isEmpty=function(n){var t=!0;if(!n)return t;var r=Xt.call(n),e=n.length;return r==w||r==N||r==j||hr&&G(n)||r==E&&typeof e=="number"&&Z(n.splice)?!e:(Sr(n,function(){return t=!1}),t)},o.isEqual=Y,o.isFinite=function(n){return nr(n)&&!tr(parseFloat(n))},o.isFunction=Z,o.isNaN=function(n){return tt(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=tt,o.isObject=nt,o.isPlainObject=Fr,o.isRegExp=function(n){return n instanceof Tt||Xt.call(n)==I},o.isString=rt,o.isUndefined=function(n){return typeof n=="undefined"
|
||||
},o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?er(0,e+r):ur(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=Ot,o.noConflict=function(){return e._=Ct,this},o.parseInt=qr,o.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Vt(ir()*((+t||0)-n+1))},o.reduce=st,o.reduceRight=vt,o.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},o.runInContext=t,o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Er(n).length
|
||||
},o.some=gt,o.sortedIndex=_t,o.template=function(n,t,e){var u=o.templateSettings;n||(n=""),e=$r({},e,u);var i,f=$r({},e.imports,u.imports),u=Er(f),f=ut(f),a=0,c=e.interpolate||y,v="__p+='",c=Tt((e.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(e.evaluate||y).source+"|$","g");n.replace(c,function(t,r,e,u,o,f){return e||(e=u),v+=n.slice(a,f).replace(d,C),r&&(v+="'+__e("+r+")+'"),o&&(i=!0,v+="';"+o+";__p+='"),e&&(v+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),v+="';\n",c=e=e.variable,c||(e="obj",v="with("+e+"){"+v+"}"),v=(i?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";
|
||||
try{var m=Ft(u,"return "+v).apply(r,f)}catch(_){throw _.source=v,_}return t?m(t):(m.source=v,m)},o.unescape=function(n){return null==n?"":(n+"").replace(c,V)},o.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},o.all=it,o.any=gt,o.detect=at,o.foldl=st,o.foldr=vt,o.include=ot,o.inject=st,Sr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(){var t=[this.__wrapped__];return Jt.apply(t,arguments),n.apply(o,t)})}),o.first=ht,o.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;
|
||||
for(t=P(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,null==e||r)return n[u-1];return U(n,er(0,u-e))}},o.take=ht,o.head=ht,Sr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return null==t||r&&typeof t!="function"?e:new o(e)})}),o.VERSION="1.0.1",o.prototype.toString=function(){return this.__wrapped__+""},o.prototype.value=St,o.prototype.valueOf=St,xr(["join","pop","shift"],function(n){var t=Pt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)
|
||||
}}),xr(["push","reverse","sort","unshift"],function(n){var t=Pt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),xr(["concat","slice","splice"],function(n){var t=Pt[n];o.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments))}}),sr&&xr(["pop","shift","splice"],function(n){var t=Pt[n],r="splice"==n;o.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new o(e):e}}),o}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,o=typeof global=="object"&&global;
|
||||
;(function(n){function t(e){function o(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof o?(this.__wrapped__=n,void 0):new o(n)}function B(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||a);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";(Jt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Jt.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function R(n){return n.charCodeAt(0)}function T(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;
|
||||
if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function D(n,t,r,e){function u(){var a=arguments,c=i?this:t;return o||(n=t[f]),r.length&&(a=a.length?(a=U(a),e?a.concat(r):r.concat(a)):r),this instanceof u?(L.prototype=n.prototype,c=new L,L.prototype=null,a=n.apply(c,a),nt(a)?a:c):n.apply(c,a)}var o=Z(n),i=!r,f=t;return i&&(r=t),o||(t=n),u}function P(n,t,r){if(null==n)return Ot;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=Ir(n);return function(t){for(var r=u.length,e=!1;r--&&(e=Y(t[u[r]],n[u[r]],f)););return e
|
||||
}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function z(){for(var n,t={e:Et,f:It,g:sr,i:gr,j:mr,k:b,b:"l(n)",c:"",h:"",l:"",m:!0},r=0;n=arguments[r];r++)for(var e in n)t[e]=n[e];if(n=t.a,t.d=/^[^,]+/.exec(n)[0],r=qt,e="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b?(e+="var o=n.length;j=-1;if("+t.b+"){",t.j&&(e+="if(m(n)){n=n.split('')}"),e+="while(++j<o){"+t.h+"}}else{"):t.i&&(e+="var o=n.length;j=-1;if(o&&k(n)){while(++j<o){j+='';"+t.h+"}}else{"),t.f&&(e+="var v=typeof n=='function';"),t.g&&t.m?(e+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];",t.f&&(e+="if(!(v&&j=='prototype')){"),e+=t.h+"",t.f&&(e+="}")):(e+="for(j in n){",(t.f||t.m)&&(e+="if(",t.f&&(e+="!(v&&j=='prototype')"),t.f&&t.m&&(e+="&&"),t.m&&(e+="i.call(n,j)"),e+="){"),e+=t.h+";",(t.f||t.m)&&(e+="}")),e+="}",t.e){e+="var g=n.constructor;";
|
||||
for(var u=0;7>u;u++)e+="j='"+t.k[u]+"';if(","constructor"==t.k[u]&&(e+="!(g&&g.prototype===n)&&"),e+="i.call(n,j)){"+t.h+"}"}return(t.b||t.i)&&(e+="}"),e+=t.c+";return u",r("f,i,k,l,m,r,p","return function("+n+"){"+e+"}")(P,Jt,G,Er,rt,$,er)}function C(n){return"\\"+F[n]}function M(n){return Nr[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function L(){}function U(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=At(0>r?0:r);++e<r;)u[e]=n[t+e];
|
||||
return u}function V(n){return Ar[n]}function G(n){return Yt.call(n)==j}function H(n){var t=!1;if(!n||typeof n!="object"||G(n))return t;var r=n.constructor;return!Z(r)&&(!dr||!K(n))||r instanceof r?Nt?(Sr(n,function(n,r,e){return t=!Jt.call(e,r),!1}),!1===t):(Sr(n,function(n,r){t=r}),!1===t||Jt.call(n,t)):t}function J(n){var t=[];return kr(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,o,i){var f=n;if(typeof t=="function"&&(u=e,e=t,t=!1),typeof e=="function"){if(e=typeof u=="undefined"?e:P(e,u,1),f=e(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=nt(f)){var a=Yt.call(f);if(!A[a]||dr&&K(f))return f;var c=Er(f)}if(!u||!t)return u?c?U(f):$r({},f):f;switch(u=br[a],a){case x:case O:return new u(+f);case k:case N:return new u(f);case I:return u(f.source,v.exec(f))}for(o||(o=[]),i||(i=[]),a=o.length;a--;)if(o[a]==n)return i[a];return f=c?u(f.length):{},c&&(Jt.call(n,"index")&&(f.index=n.index),Jt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(c?ct:kr)(n,function(n,u){f[u]=Q(n,t,e,r,o,i)}),f}function W(n){var t=[];return Sr(n,function(n,r){Z(n)&&t.push(r)
|
||||
}),t.sort()}function X(n){for(var t=-1,r=Ir(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function Y(n,t,r,e,u,o){var i=r===f;if(r&&!i){r=typeof e=="undefined"?r:P(r,e,2);var a=r(n,t);if(typeof a!="undefined")return!!a}if(n===t)return 0!==n||1/n==1/t;var c=typeof n,l=typeof t;if(n===n&&(!n||"function"!=c&&"object"!=c)&&(!t||"function"!=l&&"object"!=l))return!1;if(null==n||null==t)return n===t;if(l=Yt.call(n),c=Yt.call(t),l==j&&(l=E),c==j&&(c=E),l!=c)return!1;switch(l){case x:case O:return+n==+t;
|
||||
case k:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case N:return n==t+""}if(c=l==w,!c){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,e,u,o);if(l!=E||dr&&(K(n)||K(t)))return!1;var l=!hr&&G(n)?Tt:n.constructor,p=!hr&&G(t)?Tt:t.constructor;if(l!=p&&(!Z(l)||!(l instanceof l&&Z(p)&&p instanceof p)))return!1}for(u||(u=[]),o||(o=[]),l=u.length;l--;)if(u[l]==n)return o[l]==t;var s=0,a=!0;if(u.push(n),o.push(t),c){if(l=n.length,s=t.length,a=s==n.length,!a&&!i)return a;for(;s--;)if(c=l,p=t[s],i)for(;c--&&!(a=Y(n[c],p,r,e,u,o)););else if(!(a=Y(n[s],p,r,e,u,o)))break;
|
||||
return a}return Sr(t,function(t,i,f){return Jt.call(f,i)?(s++,a=Jt.call(n,i)&&Y(n[i],t,r,e,u,o)):void 0}),a&&!i&&Sr(n,function(n,t,r){return Jt.call(r,t)?a=-1<--s:void 0}),a}function Z(n){return typeof n=="function"}function nt(n){return n?$[typeof n]:!1}function tt(n){return typeof n=="number"||Yt.call(n)==k}function rt(n){return typeof n=="string"||Yt.call(n)==N}function et(n,t,r){var e=arguments,u=0,o=2;if(!nt(n))return n;if(r===f)var i=e[3],a=e[4],c=e[5];else a=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=P(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);
|
||||
for(;++u<o;)(Er(e[u])?ct:kr)(e[u],function(t,r){var e,u,o=t,l=n[r];if(t&&((u=Er(t))||qr(t))){for(o=a.length;o--;)if(e=a[o]==t){l=c[o];break}e||(l=u?Er(l)?l:[]:qr(l)?l:{},i&&(o=i(l,t),typeof o!="undefined"&&(l=o)),a.push(t),c.push(l),i||(l=et(l,t,f,i,a,c)))}else i&&(o=i(l,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(l=o);n[r]=l});return n}function ut(n){for(var t=-1,r=Ir(n),e=r.length,u=At(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,o=!1;return r=(0>r?ur(0,u+r):r)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):Or(n,function(n){return++e<r?void 0:!(o=n===t)
|
||||
}),o}function it(n,t,r){var e=!0;if(t=P(t,r),Er(n)){r=-1;for(var u=n.length;++r<u&&(e=!!t(n[r],r,n)););}else Or(n,function(n,r,u){return e=!!t(n,r,u)});return e}function ft(n,t,r){var e=[];if(t=P(t,r),Er(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else Or(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=P(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,!1):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&Er(n)){r=-1;for(var e=n.length;++r<e&&!1!==t(n[r],r,n););}else Or(n,t,r);
|
||||
return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);if(t=P(t,r),Er(n))for(;++e<u;)o[e]=t(n[e],e,n);else Or(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;if(!t&&Er(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?R:P(t,r),Or(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=P(t,e,4),Er(n)){var o=-1,i=n.length;for(u&&(r=n[++o]);++o<i;)r=t(r,n[o],o,n)}else Or(n,function(n,e,o){r=u?(u=!1,n):t(r,n,e,o)
|
||||
});return r}function vt(n,t,r,e){var u=n,o=n?n.length:0,i=3>arguments.length;if(typeof o!="number")var f=Ir(n),o=f.length;else mr&&rt(n)&&(u=n.split(""));return t=P(t,e,4),ct(n,function(n,e,a){e=f?f[--o]:--o,r=i?(i=!1,u[e]):t(r,u[e],e,a)}),r}function gt(n,t,r){var e;if(t=P(t,r),Er(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else Or(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=P(t,r);++o<u&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n[0];return U(n,0,or(ur(0,e),u))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];Er(o)?Qt.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?ur(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&null!=t){var e=0,u=-1,o=n?n.length:0;for(t=P(t,r);++u<o&&t(n[u],u,n);)e++}else e=null==t||r?1:ur(0,t);return U(n,e)
|
||||
}function _t(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?P(r,e,1):Ot,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,o=n?n.length:0,i=[],f=i;typeof t=="function"&&(e=r,r=t,t=!1);var a=!t&&75<=o;if(a)var c={};for(r&&(f=[],r=P(r,e));++u<o;){e=n[u];var l=r?r(e,u,n):e;if(a)var p=l+"",p=Jt.call(c,p)?!(f=c[p]):f=c[p]=[];(t?!u||f[f.length-1]!==l:p||0>mt(f,l))&&((r||a)&&f.push(l),i.push(e))}return i}function jt(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]
|
||||
}return u}function wt(n,t){return pr||Zt&&2<arguments.length?Zt.call.apply(Zt,arguments):D(n,t,U(arguments,2))}function xt(n){var t=U(arguments,1);return Xt(function(){n.apply(r,t)},1)}function Ot(n){return n}function St(n){ct(W(n),function(t){var r=o[t]=n[t];o.prototype[t]=function(){var n=[this.__wrapped__];return Qt.apply(n,arguments),new o(r.apply(o,n))}})}function kt(){return this.__wrapped__}e=e?q.defaults(n.Object(),e,q.pick(n,_)):n;var Et,It,Nt,At=e.Array,$t=e.Boolean,Ft=e.Date,qt=e.Function,Bt=e.Math,Rt=e.Number,Tt=e.Object,Dt=e.RegExp,Pt=e.String,zt=At(),Ct=Tt(),Mt=e._,Kt=Dt("^"+(Ct.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Lt=Bt.ceil,Ut=e.clearTimeout,Vt=zt.concat,Gt=Bt.floor,Ht=Kt.test(Ht=Tt.getPrototypeOf)&&Ht,Jt=Ct.hasOwnProperty,Qt=zt.push,Wt=e.setImmediate,Xt=e.setTimeout,Yt=Ct.toString,Zt=Kt.test(Zt=U.bind)&&Zt,nr=Kt.test(nr=At.isArray)&&nr,tr=e.isFinite,rr=e.isNaN,er=Kt.test(er=Tt.keys)&&er,ur=Bt.max,or=Bt.min,ir=e.parseInt,fr=Bt.random,ar=Kt.test(e.attachEvent),cr=!/\n{2,}/.test(qt()),lr=Zt&&!/\n|true/.test(Zt+ar),pr=Zt&&!lr,sr=er&&(ar||lr||!cr),vr=(vr={0:1,length:1},zt.splice.call(vr,0,1),vr[0]),gr=!0;
|
||||
(function(){function n(){this.x=1}var t=[];n.prototype={valueOf:1,y:1};for(var r in new n)t.push(r);for(r in arguments)gr=!r;Et=!/valueOf/.test(t),It=n.propertyIsEnumerable("prototype"),Nt="x"!=t[0]})(1);var hr=arguments.constructor==Tt,yr=!G(arguments),mr="xx"!="x"[0]+Tt("x")[0];try{var dr=Yt.call(document)==E&&!({toString:0}+"")}catch(_r){}var br={};br[w]=At,br[x]=$t,br[O]=Ft,br[E]=Tt,br[k]=Rt,br[I]=Dt,br[N]=Pt,o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:o}};
|
||||
var jr={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},wr={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},xr={l:"if(!r[typeof n])return u;"+wr.l,b:!1},Or=z(wr);yr&&(G=function(n){return n?Jt.call(n,"callee"):!1});var Sr=z(wr,xr,{m:!1}),kr=z(wr,xr),Er=nr||function(n){return hr&&n instanceof At||Yt.call(n)==w},Ir=er?function(n){return nt(n)?It&&typeof n=="function"||gr&&n.length&&G(n)?J(n):er(n):[]
|
||||
}:J,Nr={"&":"&","<":"<",">":">",'"':""","'":"'"},Ar=X(Nr),$r=z(jr,{l:jr.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),Fr=z(jr);Z(/x/)&&(Z=function(n){return n instanceof qt||Yt.call(n)==S});var qr=Ht?function(n){if(!n||typeof n!="object")return!1;var t=n.valueOf,r=typeof t=="function"&&(r=Ht(t))&&Ht(r);return r?n==r||Ht(n)==r&&!G(n):H(n)}:H,Br=8==ir("08")?ir:function(n,t){return ir(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)
|
||||
},Rr=lt,Tr=ft;return lr&&u&&typeof Wt=="function"&&(xt=wt(Wt,e)),o.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},o.assign=$r,o.at=function(n){var t=-1,r=Vt.apply(zt,U(arguments,1)),e=r.length,u=At(e);for(mr&&rt(n)&&(n=n.split(""));++t<e;)u[t]=n[r[t]];return u},o.bind=wt,o.bindAll=function(n){for(var t=Vt.apply(zt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=wt(n[u],n)}return n},o.bindKey=function(n,t){return D(n,t,U(arguments,2))
|
||||
},o.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},o.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];return t[0]}},o.countBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Jt.call(e,r)?e[r]++:e[r]=1}),e},o.debounce=function(n,t,r){function e(){f=null,r||(o=n.apply(i,u))}var u,o,i,f;return function(){var a=r&&!f;return u=arguments,i=this,Ut(f),f=Xt(e,t),a&&(o=n.apply(i,u)),o
|
||||
}},o.defaults=Fr,o.defer=xt,o.delay=function(n,t){var e=U(arguments,2);return Xt(function(){n.apply(r,e)},t)},o.difference=function(n){for(var t=-1,r=n?n.length:0,e=Vt.apply(zt,arguments),e=B(e,r),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.filter=ft,o.flatten=yt,o.forEach=ct,o.forIn=Sr,o.forOwn=kr,o.functions=W,o.groupBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Jt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},o.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;
|
||||
if(typeof t!="number"&&null!=t){var o=u;for(t=P(t,r);o--&&t(n[o],o,n);)e++}else e=null==t||r?1:t||e;return U(n,0,or(ur(0,u-e),u))},o.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Jt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=B(t[p],0,100)))(c))continue n;f.push(c)}}return f},o.invert=X,o.invoke=function(n,t){var r=U(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=At(typeof o=="number"?o:0);
|
||||
return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},o.keys=Ir,o.map=lt,o.max=pt,o.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";return Jt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},o.merge=et,o.min=function(n,t,r){var e=1/0,u=e;if(!t&&Er(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?R:P(t,r),Or(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},o.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=P(t,r);
|
||||
else var o=Vt.apply(zt,arguments);return Sr(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)}),u},o.once=function(n){var t,r;return function(){return t?r:(t=!0,r=n.apply(this,arguments),n=null,r)}},o.pairs=function(n){for(var t=-1,r=Ir(n),e=r.length,u=At(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},o.partial=function(n){return D(n,U(arguments,1))},o.partialRight=function(n){return D(n,U(arguments,1),null,f)},o.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Vt.apply(zt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];
|
||||
f in n&&(e[f]=n[f])}else t=P(t,r),Sr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},o.pluck=Rr,o.range=function(n,t,r){n=+n||0,r=+r||1,null==t&&(t=n,n=0);var e=-1;t=ur(0,Lt((t-n)/r));for(var u=At(t);++e<t;)u[e]=n,n+=r;return u},o.reject=function(n,t,r){return t=P(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},o.rest=dt,o.shuffle=function(n){var t=-1,r=n?n.length:0,e=At(typeof r=="number"?r:0);return ct(n,function(n){var r=Gt(fr()*(++t+1));e[t]=e[r],e[r]=n}),e},o.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);
|
||||
for(t=P(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(T);u--;)o[u]=o[u].c;return o},o.tap=function(n,t){return t(n),n},o.throttle=function(n,t){function r(){f=new Ft,i=null,u=n.apply(o,e)}var e,u,o,i,f=0;return function(){var a=new Ft,c=t-(a-f);return e=arguments,o=this,0<c?i||(i=Xt(r,c)):(Ut(i),i=null,f=a,u=n.apply(o,e)),u}},o.times=function(n,t,r){n=+n||0;for(var e=-1,u=At(n);++e<n;)u[e]=t.call(r,e);return u},o.toArray=function(n){return n&&typeof n.length=="number"?mr&&rt(n)?n.split(""):U(n):ut(n)
|
||||
},o.union=function(){return bt(Vt.apply(zt,arguments))},o.uniq=bt,o.values=ut,o.where=Tr,o.without=function(n){for(var t=-1,r=n?n.length:0,e=B(arguments,1),u=[];++t<r;){var o=n[t];e(o)||u.push(o)}return u},o.wrap=function(n,t){return function(){var r=[n];return Qt.apply(r,arguments),t.apply(this,r)}},o.zip=function(n){for(var t=-1,r=n?pt(Rr(arguments,"length")):0,e=At(r);++t<r;)e[t]=Rr(arguments,t);return e},o.zipObject=jt,o.collect=lt,o.drop=dt,o.each=ct,o.extend=$r,o.methods=W,o.object=jt,o.select=ft,o.tail=dt,o.unique=bt,St(o),o.clone=Q,o.cloneDeep=function(n,t,r){return Q(n,!0,t,r)
|
||||
},o.contains=ot,o.escape=function(n){return null==n?"":(n+"").replace(m,M)},o.every=it,o.find=at,o.has=function(n,t){return n?Jt.call(n,t):!1},o.identity=Ot,o.indexOf=mt,o.isArguments=G,o.isArray=Er,o.isBoolean=function(n){return!0===n||!1===n||Yt.call(n)==x},o.isDate=function(n){return n instanceof Ft||Yt.call(n)==O},o.isElement=function(n){return n?1===n.nodeType:!1},o.isEmpty=function(n){var t=!0;if(!n)return t;var r=Yt.call(n),e=n.length;return r==w||r==N||r==j||yr&&G(n)||r==E&&typeof e=="number"&&Z(n.splice)?!e:(kr(n,function(){return t=!1
|
||||
}),t)},o.isEqual=Y,o.isFinite=function(n){return tr(n)&&!rr(parseFloat(n))},o.isFunction=Z,o.isNaN=function(n){return tt(n)&&n!=+n},o.isNull=function(n){return null===n},o.isNumber=tt,o.isObject=nt,o.isPlainObject=qr,o.isRegExp=function(n){return n instanceof Dt||Yt.call(n)==I},o.isString=rt,o.isUndefined=function(n){return typeof n=="undefined"},o.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?ur(0,e+r):or(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},o.mixin=St,o.noConflict=function(){return e._=Mt,this
|
||||
},o.parseInt=Br,o.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Gt(fr()*((+t||0)-n+1))},o.reduce=st,o.reduceRight=vt,o.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},o.runInContext=t,o.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:Ir(n).length},o.some=gt,o.sortedIndex=_t,o.template=function(n,t,e){var u=o.templateSettings;n||(n=""),e=Fr({},e,u);var i,f=Fr({},e.imports,u.imports),u=Ir(f),f=ut(f),a=0,c=e.interpolate||y,v="__p+='",c=Dt((e.escape||y).source+"|"+c.source+"|"+(c===h?g:y).source+"|"+(e.evaluate||y).source+"|$","g");
|
||||
n.replace(c,function(t,r,e,u,o,f){return e||(e=u),v+=n.slice(a,f).replace(d,C),r&&(v+="'+__e("+r+")+'"),o&&(i=!0,v+="';"+o+";__p+='"),e&&(v+="'+((__t=("+e+"))==null?'':__t)+'"),a=f+t.length,t}),v+="';\n",c=e=e.variable,c||(e="obj",v="with("+e+"){"+v+"}"),v=(i?v.replace(l,""):v).replace(p,"$1").replace(s,"$1;"),v="function("+e+"){"+(c?"":e+"||("+e+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+v+"return __p}";try{var m=qt(u,"return "+v).apply(r,f)
|
||||
}catch(_){throw _.source=v,_}return t?m(t):(m.source=v,m)},o.unescape=function(n){return null==n?"":(n+"").replace(c,V)},o.uniqueId=function(n){var t=++i;return(null==n?"":n+"")+t},o.all=it,o.any=gt,o.detect=at,o.foldl=st,o.foldr=vt,o.include=ot,o.inject=st,kr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(){var t=[this.__wrapped__];return Qt.apply(t,arguments),n.apply(o,t)})}),o.first=ht,o.last=function(n,t,r){if(n){var e=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=P(t,r);o--&&t(n[o],o,n);)e++
|
||||
}else if(e=t,null==e||r)return n[u-1];return U(n,ur(0,u-e))}},o.take=ht,o.head=ht,kr(o,function(n,t){o.prototype[t]||(o.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);return null==t||r&&typeof t!="function"?e:new o(e)})}),o.VERSION="1.0.1",o.prototype.toString=function(){return this.__wrapped__+""},o.prototype.value=kt,o.prototype.valueOf=kt,Or(["join","pop","shift"],function(n){var t=zt[n];o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),Or(["push","reverse","sort","unshift"],function(n){var t=zt[n];
|
||||
o.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),Or(["concat","slice","splice"],function(n){var t=zt[n];o.prototype[n]=function(){return new o(t.apply(this.__wrapped__,arguments))}}),vr&&Or(["pop","shift","splice"],function(n){var t=zt[n],r="splice"==n;o.prototype[n]=function(){var n=this.__wrapped__,e=t.apply(n,arguments);return 0===n.length&&delete n[0],r?new o(e):e}}),o}var r,e=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==e&&module,o=typeof global=="object"&&global;
|
||||
o.global===o&&(n=o);var i=0,f={},a=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,_="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),b="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),j="[object Arguments]",w="[object Array]",x="[object Boolean]",O="[object Date]",S="[object Function]",k="[object Number]",E="[object Object]",I="[object RegExp]",N="[object String]",A={};
|
||||
A[S]=!1,A[j]=A[w]=A[x]=A[O]=A[k]=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})):e&&!e.nodeType?u?(u.exports=q)._=q:e._=q:n._=q})(this);
|
||||
78
dist/lodash.js
vendored
78
dist/lodash.js
vendored
@@ -580,12 +580,12 @@
|
||||
};
|
||||
}
|
||||
if (argCount === 4) {
|
||||
return function(accumulator, value, index, object) {
|
||||
return func.call(thisArg, accumulator, value, index, object);
|
||||
return function(accumulator, value, index, collection) {
|
||||
return func.call(thisArg, accumulator, value, index, collection);
|
||||
};
|
||||
}
|
||||
return function(value, index, object) {
|
||||
return func.call(thisArg, value, index, object);
|
||||
return function(value, index, collection) {
|
||||
return func.call(thisArg, value, index, collection);
|
||||
};
|
||||
}
|
||||
return func;
|
||||
@@ -3504,39 +3504,6 @@
|
||||
return -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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.object(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function object(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of numbers (positive and/or negative) progressing from
|
||||
* `start` up to but not including `end`.
|
||||
@@ -3888,6 +3855,40 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias object
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.zipObject(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function zipObject(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -4847,7 +4848,6 @@
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
@@ -4871,6 +4871,7 @@
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
// add aliases
|
||||
lodash.collect = map;
|
||||
@@ -4878,6 +4879,7 @@
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.object = zipObject;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
66
dist/lodash.min.js
vendored
66
dist/lodash.min.js
vendored
@@ -4,38 +4,38 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(i){function a(n){if(!n||typeof n!="object")return o;var t=n.valueOf,r=typeof t=="function"&&(r=Ut(t))&&Ut(r);if(r)n=n==r||Ut(n)==r&&!J(n);else{var e=o;!n||typeof n!="object"||J(n)?n=e:(t=n.constructor,!Z(t)||t instanceof t?(ar(n,function(n,t){e=t}),n=e===o||Vt.call(n,e)):n=e)}return n}function R(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof R?(this.__wrapped__=n,void 0):new R(n)}function T(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||p);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";
|
||||
(Vt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Vt.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function C(n,t,r,e){function o(){var c=arguments,l=f?this:t;return i||(n=t[a]),r.length&&(c=c.length?(c=G(c),e?c.concat(r):r.concat(c)):r),this instanceof o?(V.prototype=n.prototype,l=new V,V.prototype=u,c=n.apply(l,c),nt(c)?c:l):n.apply(l,c)
|
||||
}var i=Z(n),f=!r,a=t;return f&&(r=t),i||(t=n),o}function P(n,t,r){if(n==u)return xt;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var i=pr(n);return function(t){for(var r=i.length,e=o;r--&&(e=Y(t[i[r]],n[i[r]],l)););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function M(){for(var n,t={g:or,b:"l(n)",c:"",h:"",l:"",m:e},r=0;n=arguments[r];r++)for(var u in n)t[u]=n[u];
|
||||
return n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b&&(r+="var o=n.length;j=-1;if("+t.b+"){while(++j<o){"+t.h+"}}else{"),t.g&&t.m?r+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];"+t.h+"}":(r+="for(j in n){",t.m&&(r+="if(",t.m&&(r+="i.call(n,j)"),r+="){"),r+=t.h+";",t.m&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",It("f,i,k,l,m,r,p","return function("+n+"){"+r+"}")(P,Vt,J,lr,rt,F,Zt)}function K(n){return"\\"+q[n]}function U(n){return sr[n]
|
||||
}function V(){}function G(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=St(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function H(n){return vr[n]}function J(n){return Lt.call(n)==x}function L(n){var t=[];return cr(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,i,f){var a=n;if(typeof t=="function"&&(u=e,e=t,t=o),typeof e=="function"){if(e=typeof u=="undefined"?e:P(e,u,1),a=e(a),typeof a!="undefined")return a;a=n}if(u=nt(a)){var c=Lt.call(a);if(!$[c])return a;var l=lr(a)
|
||||
}if(!u||!t)return u?l?G(a):gr({},a):a;switch(u=ir[c],c){case N:case S:return new u(+a);case A:case k:return new u(a);case I:return u(a.source,y.exec(a))}for(i||(i=[]),f||(f=[]),c=i.length;c--;)if(i[c]==n)return f[c];return a=l?u(a.length):{},l&&(Vt.call(n,"index")&&(a.index=n.index),Vt.call(n,"input")&&(a.input=n.input)),i.push(n),f.push(a),(l?ct:cr)(n,function(n,u){a[u]=Q(n,t,e,r,i,f)}),a}function W(n){var t=[];return ar(n,function(n,r){Z(n)&&t.push(r)}),t.sort()}function X(n){for(var t=-1,r=pr(n),e=r.length,u={};++t<e;){var o=r[t];
|
||||
u[n[o]]=o}return u}function Y(n,t,r,i,f,a){var c=r===l;if(r&&!c){r=typeof i=="undefined"?r:P(r,i,2);var p=r(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return o;if(n==u||t==u)return n===t;if(v=Lt.call(n),s=Lt.call(t),v==x&&(v=E),s==x&&(s=E),v!=s)return o;switch(v){case N:case S:return+n==+t;case A:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case k:return n==t+""}if(s=v==O,!s){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,i,f,a);
|
||||
if(v!=E)return o;var v=n.constructor,g=t.constructor;if(v!=g&&(!Z(v)||!(v instanceof v&&Z(g)&&g instanceof g)))return o}for(f||(f=[]),a||(a=[]),v=f.length;v--;)if(f[v]==n)return a[v]==t;var h=0,p=e;if(f.push(n),a.push(t),s){if(v=n.length,h=t.length,p=h==n.length,!p&&!c)return p;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(p=Y(n[s],g,r,i,f,a)););else if(!(p=Y(n[h],g,r,i,f,a)))break;return p}return ar(t,function(t,e,u){return Vt.call(u,e)?(h++,p=Vt.call(n,e)&&Y(n[e],t,r,i,f,a)):void 0}),p&&!c&&ar(n,function(n,t,r){return Vt.call(r,t)?p=-1<--h:void 0
|
||||
}),p}function Z(n){return typeof n=="function"}function nt(n){return n?F[typeof n]:o}function tt(n){return typeof n=="number"||Lt.call(n)==A}function rt(n){return typeof n=="string"||Lt.call(n)==k}function et(n,t,r){var e=arguments,u=0,o=2;if(!nt(n))return n;if(r===l)var i=e[3],f=e[4],c=e[5];else f=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=P(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;)(lr(e[u])?ct:cr)(e[u],function(t,r){var e,u,o=t,p=n[r];
|
||||
if(t&&((u=lr(t))||a(t))){for(o=f.length;o--;)if(e=f[o]==t){p=c[o];break}e||(p=u?lr(p)?p:[]:a(p)?p:{},i&&(o=i(p,t),typeof o!="undefined"&&(p=o)),f.push(t),c.push(p),i||(p=et(p,t,l,i,f,c)))}else i&&(o=i(p,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(p=o);n[r]=p});return n}function ut(n){for(var t=-1,r=pr(n),e=r.length,u=St(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,i=o;return r=(0>r?nr(0,u+r):r)||0,typeof u=="number"?i=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):fr(n,function(n){return++e<r?void 0:!(i=n===t)
|
||||
}),i}function it(n,t,r){var u=e;if(t=P(t,r),lr(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else fr(n,function(n,r,e){return u=!!t(n,r,e)});return u}function ft(n,t,r){var e=[];if(t=P(t,r),lr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else fr(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=P(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,o):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&lr(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==o;);}else fr(n,t,r);
|
||||
return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=St(typeof u=="number"?u:0);if(t=P(t,r),lr(n))for(;++e<u;)o[e]=t(n[e],e,n);else fr(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;if(!t&&lr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),fr(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=P(t,e,4),lr(n)){var i=-1,f=n.length;for(u&&(r=n[++i]);++i<f;)r=t(r,n[i],i,n)}else fr(n,function(n,e,i){r=u?(u=o,n):t(r,n,e,i)
|
||||
});return r}function vt(n,t,r,e){var u=n?n.length:0,i=3>arguments.length;if(typeof u!="number")var f=pr(n),u=f.length;return t=P(t,e,4),ct(n,function(e,a,c){a=f?f[--u]:--u,r=i?(i=o,n[a]):t(r,n[a],a,c)}),r}function gt(n,t,r){var e;if(t=P(t,r),lr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else fr(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=-1;for(t=P(t,r);++i<o&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[0];
|
||||
return G(n,0,tr(nr(0,e),o))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];lr(o)?Gt.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?nr(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&t!=u){var e=0,o=-1,i=n?n.length:0;for(t=P(t,r);++o<i&&t(n[o],o,n);)e++}else e=t==u||r?1:nr(0,t);return G(n,e)}function _t(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?P(r,e,1):xt,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,i=n?n.length:0,f=[],a=f;typeof t=="function"&&(e=r,r=t,t=o);var c=!t&&75<=i;if(c)var l={};for(r&&(a=[],r=P(r,e));++u<i;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Vt.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>mt(a,p))&&((r||c)&&a.push(p),f.push(e))}return f}function jt(n,t){return ur||Qt&&2<arguments.length?Qt.call.apply(Qt,arguments):C(n,t,G(arguments,2))}function wt(n){var t=G(arguments,1);
|
||||
return Jt(function(){n.apply(r,t)},1)}function xt(n){return n}function Ot(n){ct(W(n),function(t){var r=R[t]=n[t];R.prototype[t]=function(){var n=[this.__wrapped__];return Gt.apply(n,arguments),new R(r.apply(R,n))}})}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,kt=i.Math,$t=i.Number,Ft=i.Object,qt=i.RegExp,Bt=i.String,Rt=St(),Tt=Ft(),Dt=i._,zt=qt("^"+(Tt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ct=kt.ceil,Pt=i.clearTimeout,Mt=Rt.concat,Kt=kt.floor,Ut=zt.test(Ut=Ft.getPrototypeOf)&&Ut,Vt=Tt.hasOwnProperty,Gt=Rt.push,Ht=i.setImmediate,Jt=i.setTimeout,Lt=Tt.toString,Qt=zt.test(Qt=G.bind)&&Qt,Wt=zt.test(Wt=St.isArray)&&Wt,Xt=i.isFinite,Yt=i.isNaN,Zt=zt.test(Zt=Ft.keys)&&Zt,nr=kt.max,tr=kt.min,rr=i.parseInt,er=kt.random,Tt=zt.test(i.attachEvent),zt=!/\n{2,}/.test(It()),kt=Qt&&!/\n|true/.test(Qt+Tt),ur=Qt&&!kt,or=Zt&&(Tt||kt||!zt),ir={};
|
||||
ir[O]=St,ir[N]=At,ir[S]=Et,ir[E]=Ft,ir[A]=$t,ir[I]=qt,ir[k]=Bt,R.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:R}};var At={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},$t={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},Ft={l:"if(!r[typeof n])return u;"+$t.l,b:o},fr=M($t),ar=M($t,Ft,{m:o}),cr=M($t,Ft),lr=Wt||function(n){return n instanceof St||Lt.call(n)==O
|
||||
},pr=Zt?function(n){return nt(n)?Zt(n):[]}:L,sr={"&":"&","<":"<",">":">",'"':""","'":"'"},vr=X(sr),gr=M(At,{l:At.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),hr=M(At),Wt=8==rr("08")?rr:function(n,t){return rr(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)};return kt&&f&&typeof Ht=="function"&&(wt=jt(Ht,i)),R.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},R.assign=gr,R.at=function(n){for(var t=-1,r=Mt.apply(Rt,G(arguments,1)),e=r.length,u=St(e);++t<e;)u[t]=n[r[t]];return u},R.bind=jt,R.bindAll=function(n){for(var t=Mt.apply(Rt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=jt(n[u],n)}return n},R.bindKey=function(n,t){return C(n,t,G(arguments,2))},R.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},R.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},R.countBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Vt.call(e,r)?e[r]++:e[r]=1}),e},R.debounce=function(n,t,r){function e(){a=u,r||(i=n.apply(f,o))}var o,i,f,a;return function(){var u=r&&!a;return o=arguments,f=this,Pt(a),a=Jt(e,t),u&&(i=n.apply(f,o)),i}},R.defaults=hr,R.defer=wt,R.delay=function(n,t){var e=G(arguments,2);return Jt(function(){n.apply(r,e)},t)},R.difference=function(n){for(var t=-1,r=n?n.length:0,e=Mt.apply(Rt,arguments),e=T(e,r),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},R.filter=ft,R.flatten=yt,R.forEach=ct,R.forIn=ar,R.forOwn=cr,R.functions=W,R.groupBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Vt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},R.initial=function(n,t,r){if(!n)return[];var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else e=t==u||r?1:t||e;return G(n,0,tr(nr(0,o-e),o))},R.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;
|
||||
n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Vt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=T(t[p],0,100)))(c))continue n;f.push(c)}}return f},R.invert=X,R.invoke=function(n,t){var r=G(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=St(typeof o=="number"?o:0);return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},R.keys=pr,R.map=lt,R.max=pt,R.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";
|
||||
return Vt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},R.merge=et,R.min=function(n,t,r){var e=1/0,u=e;if(!t&&lr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),fr(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},R.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},R.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=P(t,r);else var o=Mt.apply(Rt,arguments);return ar(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)
|
||||
}),u},R.once=function(n){var t,r;return function(){return t?r:(t=e,r=n.apply(this,arguments),n=u,r)}},R.pairs=function(n){for(var t=-1,r=pr(n),e=r.length,u=St(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},R.partial=function(n){return C(n,G(arguments,1))},R.partialRight=function(n){return C(n,G(arguments,1),u,l)},R.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Mt.apply(Rt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=P(t,r),ar(n,function(n,r,u){t(n,r,u)&&(e[r]=n)
|
||||
});return e},R.pluck=lt,R.range=function(n,t,r){n=+n||0,r=+r||1,t==u&&(t=n,n=0);var e=-1;t=nr(0,Ct((t-n)/r));for(var o=St(t);++e<t;)o[e]=n,n+=r;return o},R.reject=function(n,t,r){return t=P(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},R.rest=dt,R.shuffle=function(n){var t=-1,r=n?n.length:0,e=St(typeof r=="number"?r:0);return ct(n,function(n){var r=Kt(er()*(++t+1));e[t]=e[r],e[r]=n}),e},R.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=St(typeof u=="number"?u:0);for(t=P(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),u=o.length,o.sort(z);u--;)o[u]=o[u].c;return o},R.tap=function(n,t){return t(n),n},R.throttle=function(n,t){function r(){a=new Et,f=u,o=n.apply(i,e)}var e,o,i,f,a=0;return function(){var c=new Et,l=t-(c-a);return e=arguments,i=this,0<l?f||(f=Jt(r,l)):(Pt(f),f=u,a=c,o=n.apply(i,e)),o}},R.times=function(n,t,r){n=+n||0;for(var e=-1,u=St(n);++e<n;)u[e]=t.call(r,e);return u},R.toArray=function(n){return n&&typeof n.length=="number"?G(n):ut(n)},R.union=function(){return bt(Mt.apply(Rt,arguments))},R.uniq=bt,R.values=ut,R.where=ft,R.without=function(n){for(var t=-1,r=n?n.length:0,e=T(arguments,1),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},R.wrap=function(n,t){return function(){var r=[n];return Gt.apply(r,arguments),t.apply(this,r)}},R.zip=function(n){for(var t=-1,r=n?pt(lt(arguments,"length")):0,e=St(r);++t<r;)e[t]=lt(arguments,t);return e},R.collect=lt,R.drop=dt,R.each=ct,R.extend=gr,R.methods=W,R.select=ft,R.tail=dt,R.unique=bt,Ot(R),R.clone=Q,R.cloneDeep=function(n,t,r){return Q(n,e,t,r)},R.contains=ot,R.escape=function(n){return n==u?"":(n+"").replace(b,U)},R.every=it,R.find=at,R.has=function(n,t){return n?Vt.call(n,t):o
|
||||
},R.identity=xt,R.indexOf=mt,R.isArguments=J,R.isArray=lr,R.isBoolean=function(n){return n===e||n===o||Lt.call(n)==N},R.isDate=function(n){return n instanceof Et||Lt.call(n)==S},R.isElement=function(n){return n?1===n.nodeType:o},R.isEmpty=function(n){var t=e;if(!n)return t;var r=Lt.call(n),u=n.length;return r==O||r==k||r==x||r==E&&typeof u=="number"&&Z(n.splice)?!u:(cr(n,function(){return t=o}),t)},R.isEqual=Y,R.isFinite=function(n){return Xt(n)&&!Yt(parseFloat(n))},R.isFunction=Z,R.isNaN=function(n){return tt(n)&&n!=+n
|
||||
},R.isNull=function(n){return n===u},R.isNumber=tt,R.isObject=nt,R.isPlainObject=a,R.isRegExp=function(n){return n instanceof qt||Lt.call(n)==I},R.isString=rt,R.isUndefined=function(n){return typeof n=="undefined"},R.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?nr(0,e+r):tr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},R.mixin=Ot,R.noConflict=function(){return i._=Dt,this},R.parseInt=Wt,R.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Kt(er()*((+t||0)-n+1))
|
||||
},R.reduce=st,R.reduceRight=vt,R.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},R.runInContext=t,R.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:pr(n).length},R.some=gt,R.sortedIndex=_t,R.template=function(n,t,u){var o=R.templateSettings;n||(n=""),u=hr({},u,o);var i,f=hr({},u.imports,o.imports),o=pr(f),f=ut(f),a=0,c=u.interpolate||_,l="__p+='",c=qt((u.escape||_).source+"|"+c.source+"|"+(c===d?m:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,r,u,o,f,c){return u||(u=o),l+=n.slice(a,c).replace(j,K),r&&(l+="'+__e("+r+")+'"),f&&(i=e,l+="';"+f+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(i?l.replace(v,""):l).replace(g,"$1").replace(h,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=It(o,"return "+l).apply(r,f)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},R.unescape=function(n){return n==u?"":(n+"").replace(s,H)},R.uniqueId=function(n){var t=++c;return(n==u?"":n+"")+t
|
||||
},R.all=it,R.any=gt,R.detect=at,R.foldl=st,R.foldr=vt,R.include=ot,R.inject=st,cr(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(){var t=[this.__wrapped__];return Gt.apply(t,arguments),n.apply(R,t)})}),R.first=ht,R.last=function(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[o-1];return G(n,nr(0,o-e))}},R.take=ht,R.head=ht,cr(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return t==u||r&&typeof t!="function"?e:new R(e)})}),R.VERSION="1.0.1",R.prototype.toString=function(){return this.__wrapped__+""},R.prototype.value=Nt,R.prototype.valueOf=Nt,fr(["join","pop","shift"],function(n){var t=Rt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),fr(["push","reverse","sort","unshift"],function(n){var t=Rt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),fr(["concat","slice","splice"],function(n){var t=Rt[n];R.prototype[n]=function(){return new R(t.apply(this.__wrapped__,arguments))
|
||||
;(function(n){function t(i){function a(n){if(!n||typeof n!="object")return o;var t=n.valueOf,r=typeof t=="function"&&(r=Vt(t))&&Vt(r);if(r)n=n==r||Vt(n)==r&&!J(n);else{var e=o;!n||typeof n!="object"||J(n)?n=e:(t=n.constructor,!Z(t)||t instanceof t?(cr(n,function(n,t){e=t}),n=e===o||Gt.call(n,e)):n=e)}return n}function R(n){return n&&typeof n=="object"&&n.__wrapped__?n:this instanceof R?(this.__wrapped__=n,void 0):new R(n)}function T(n,t,r){t||(t=0);var e=n.length,u=e-t>=(r||p);if(u){var o={};for(r=t-1;++r<e;){var i=n[r]+"";
|
||||
(Gt.call(o,i)?o[i]:o[i]=[]).push(n[r])}}return function(r){if(u){var e=r+"";return Gt.call(o,e)&&-1<mt(o[e],r)}return-1<mt(n,r,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function C(n,t,r,e){function o(){var c=arguments,l=f?this:t;return i||(n=t[a]),r.length&&(c=c.length?(c=G(c),e?c.concat(r):r.concat(c)):r),this instanceof o?(V.prototype=n.prototype,l=new V,V.prototype=u,c=n.apply(l,c),nt(c)?c:l):n.apply(l,c)
|
||||
}var i=Z(n),f=!r,a=t;return f&&(r=t),i||(t=n),o}function P(n,t,r){if(n==u)return Ot;var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var i=sr(n);return function(t){for(var r=i.length,e=o;r--&&(e=Y(t[i[r]],n[i[r]],l)););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function M(){for(var n,t={g:ir,b:"l(n)",c:"",h:"",l:"",m:e},r=0;n=arguments[r];r++)for(var u in n)t[u]=n[u];
|
||||
return n=t.a,t.d=/^[^,]+/.exec(n)[0],r="var j,n="+t.d+",u=n;if(!n)return u;"+t.l+";",t.b&&(r+="var o=n.length;j=-1;if("+t.b+"){while(++j<o){"+t.h+"}}else{"),t.g&&t.m?r+="var s=-1,t=r[typeof n]?p(n):[],o=t.length;while(++s<o){j=t[s];"+t.h+"}":(r+="for(j in n){",t.m&&(r+="if(",t.m&&(r+="i.call(n,j)"),r+="){"),r+=t.h+";",t.m&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",kt("f,i,k,l,m,r,p","return function("+n+"){"+r+"}")(P,Gt,J,pr,rt,F,nr)}function K(n){return"\\"+q[n]}function U(n){return vr[n]
|
||||
}function V(){}function G(n,t,r){t||(t=0),typeof r=="undefined"&&(r=n?n.length:0);var e=-1;r=r-t||0;for(var u=At(0>r?0:r);++e<r;)u[e]=n[t+e];return u}function H(n){return gr[n]}function J(n){return Qt.call(n)==x}function L(n){var t=[];return lr(n,function(n,r){t.push(r)}),t}function Q(n,t,e,u,i,f){var a=n;if(typeof t=="function"&&(u=e,e=t,t=o),typeof e=="function"){if(e=typeof u=="undefined"?e:P(e,u,1),a=e(a),typeof a!="undefined")return a;a=n}if(u=nt(a)){var c=Qt.call(a);if(!$[c])return a;var l=pr(a)
|
||||
}if(!u||!t)return u?l?G(a):hr({},a):a;switch(u=fr[c],c){case N:case S:return new u(+a);case A:case k:return new u(a);case I:return u(a.source,y.exec(a))}for(i||(i=[]),f||(f=[]),c=i.length;c--;)if(i[c]==n)return f[c];return a=l?u(a.length):{},l&&(Gt.call(n,"index")&&(a.index=n.index),Gt.call(n,"input")&&(a.input=n.input)),i.push(n),f.push(a),(l?ct:lr)(n,function(n,u){a[u]=Q(n,t,e,r,i,f)}),a}function W(n){var t=[];return cr(n,function(n,r){Z(n)&&t.push(r)}),t.sort()}function X(n){for(var t=-1,r=sr(n),e=r.length,u={};++t<e;){var o=r[t];
|
||||
u[n[o]]=o}return u}function Y(n,t,r,i,f,a){var c=r===l;if(r&&!c){r=typeof i=="undefined"?r:P(r,i,2);var p=r(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return o;if(n==u||t==u)return n===t;if(v=Qt.call(n),s=Qt.call(t),v==x&&(v=E),s==x&&(s=E),v!=s)return o;switch(v){case N:case S:return+n==+t;case A:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case I:case k:return n==t+""}if(s=v==O,!s){if(n.__wrapped__||t.__wrapped__)return Y(n.__wrapped__||n,t.__wrapped__||t,r,i,f,a);
|
||||
if(v!=E)return o;var v=n.constructor,g=t.constructor;if(v!=g&&(!Z(v)||!(v instanceof v&&Z(g)&&g instanceof g)))return o}for(f||(f=[]),a||(a=[]),v=f.length;v--;)if(f[v]==n)return a[v]==t;var h=0,p=e;if(f.push(n),a.push(t),s){if(v=n.length,h=t.length,p=h==n.length,!p&&!c)return p;for(;h--;)if(s=v,g=t[h],c)for(;s--&&!(p=Y(n[s],g,r,i,f,a)););else if(!(p=Y(n[h],g,r,i,f,a)))break;return p}return cr(t,function(t,e,u){return Gt.call(u,e)?(h++,p=Gt.call(n,e)&&Y(n[e],t,r,i,f,a)):void 0}),p&&!c&&cr(n,function(n,t,r){return Gt.call(r,t)?p=-1<--h:void 0
|
||||
}),p}function Z(n){return typeof n=="function"}function nt(n){return n?F[typeof n]:o}function tt(n){return typeof n=="number"||Qt.call(n)==A}function rt(n){return typeof n=="string"||Qt.call(n)==k}function et(n,t,r){var e=arguments,u=0,o=2;if(!nt(n))return n;if(r===l)var i=e[3],f=e[4],c=e[5];else f=[],c=[],typeof r!="number"&&(o=e.length),3<o&&"function"==typeof e[o-2]?i=P(e[--o-1],e[o--],2):2<o&&"function"==typeof e[o-1]&&(i=e[--o]);for(;++u<o;)(pr(e[u])?ct:lr)(e[u],function(t,r){var e,u,o=t,p=n[r];
|
||||
if(t&&((u=pr(t))||a(t))){for(o=f.length;o--;)if(e=f[o]==t){p=c[o];break}e||(p=u?pr(p)?p:[]:a(p)?p:{},i&&(o=i(p,t),typeof o!="undefined"&&(p=o)),f.push(t),c.push(p),i||(p=et(p,t,l,i,f,c)))}else i&&(o=i(p,t),typeof o=="undefined"&&(o=t)),typeof o!="undefined"&&(p=o);n[r]=p});return n}function ut(n){for(var t=-1,r=sr(n),e=r.length,u=At(e);++t<e;)u[t]=n[r[t]];return u}function ot(n,t,r){var e=-1,u=n?n.length:0,i=o;return r=(0>r?tr(0,u+r):r)||0,typeof u=="number"?i=-1<(rt(n)?n.indexOf(t,r):mt(n,t,r)):ar(n,function(n){return++e<r?void 0:!(i=n===t)
|
||||
}),i}function it(n,t,r){var u=e;if(t=P(t,r),pr(n)){r=-1;for(var o=n.length;++r<o&&(u=!!t(n[r],r,n)););}else ar(n,function(n,r,e){return u=!!t(n,r,e)});return u}function ft(n,t,r){var e=[];if(t=P(t,r),pr(n)){r=-1;for(var u=n.length;++r<u;){var o=n[r];t(o,r,n)&&e.push(o)}}else ar(n,function(n,r,u){t(n,r,u)&&e.push(n)});return e}function at(n,t,r){var e;return t=P(t,r),ct(n,function(n,r,u){return t(n,r,u)?(e=n,o):void 0}),e}function ct(n,t,r){if(t&&typeof r=="undefined"&&pr(n)){r=-1;for(var e=n.length;++r<e&&t(n[r],r,n)!==o;);}else ar(n,t,r);
|
||||
return n}function lt(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);if(t=P(t,r),pr(n))for(;++e<u;)o[e]=t(n[e],e,n);else ar(n,function(n,r,u){o[++e]=t(n,r,u)});return o}function pt(n,t,r){var e=-1/0,u=e;if(!t&&pr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i>u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),ar(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});return u}function st(n,t,r,e){var u=3>arguments.length;if(t=P(t,e,4),pr(n)){var i=-1,f=n.length;for(u&&(r=n[++i]);++i<f;)r=t(r,n[i],i,n)}else ar(n,function(n,e,i){r=u?(u=o,n):t(r,n,e,i)
|
||||
});return r}function vt(n,t,r,e){var u=n?n.length:0,i=3>arguments.length;if(typeof u!="number")var f=sr(n),u=f.length;return t=P(t,e,4),ct(n,function(e,a,c){a=f?f[--u]:--u,r=i?(i=o,n[a]):t(r,n[a],a,c)}),r}function gt(n,t,r){var e;if(t=P(t,r),pr(n)){r=-1;for(var u=n.length;++r<u&&!(e=t(n[r],r,n)););}else ar(n,function(n,r,u){return!(e=t(n,r,u))});return!!e}function ht(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=-1;for(t=P(t,r);++i<o&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[0];
|
||||
return G(n,0,rr(tr(0,e),o))}}function yt(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];pr(o)?Ht.apply(u,t?o:yt(o)):u.push(o)}return u}function mt(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?tr(0,u+r):r||0)-1;else if(r)return e=_t(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function dt(n,t,r){if(typeof t!="number"&&t!=u){var e=0,o=-1,i=n?n.length:0;for(t=P(t,r);++o<i&&t(n[o],o,n);)e++}else e=t==u||r?1:tr(0,t);return G(n,e)}function _t(n,t,r,e){var u=0,o=n?n.length:u;
|
||||
for(r=r?P(r,e,1):Ot,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function bt(n,t,r,e){var u=-1,i=n?n.length:0,f=[],a=f;typeof t=="function"&&(e=r,r=t,t=o);var c=!t&&75<=i;if(c)var l={};for(r&&(a=[],r=P(r,e));++u<i;){e=n[u];var p=r?r(e,u,n):e;if(c)var s=p+"",s=Gt.call(l,s)?!(a=l[s]):a=l[s]=[];(t?!u||a[a.length-1]!==p:s||0>mt(a,p))&&((r||c)&&a.push(p),f.push(e))}return f}function jt(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u}function wt(n,t){return or||Wt&&2<arguments.length?Wt.call.apply(Wt,arguments):C(n,t,G(arguments,2))
|
||||
}function xt(n){var t=G(arguments,1);return Lt(function(){n.apply(r,t)},1)}function Ot(n){return n}function Nt(n){ct(W(n),function(t){var r=R[t]=n[t];R.prototype[t]=function(){var n=[this.__wrapped__];return Ht.apply(n,arguments),new R(r.apply(R,n))}})}function St(){return this.__wrapped__}i=i?B.defaults(n.Object(),i,B.pick(n,w)):n;var At=i.Array,Et=i.Boolean,It=i.Date,kt=i.Function,$t=i.Math,Ft=i.Number,qt=i.Object,Bt=i.RegExp,Rt=i.String,Tt=At(),Dt=qt(),zt=i._,Ct=Bt("^"+(Dt.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Pt=$t.ceil,Mt=i.clearTimeout,Kt=Tt.concat,Ut=$t.floor,Vt=Ct.test(Vt=qt.getPrototypeOf)&&Vt,Gt=Dt.hasOwnProperty,Ht=Tt.push,Jt=i.setImmediate,Lt=i.setTimeout,Qt=Dt.toString,Wt=Ct.test(Wt=G.bind)&&Wt,Xt=Ct.test(Xt=At.isArray)&&Xt,Yt=i.isFinite,Zt=i.isNaN,nr=Ct.test(nr=qt.keys)&&nr,tr=$t.max,rr=$t.min,er=i.parseInt,ur=$t.random,Dt=Ct.test(i.attachEvent),Ct=!/\n{2,}/.test(kt()),$t=Wt&&!/\n|true/.test(Wt+Dt),or=Wt&&!$t,ir=nr&&(Dt||$t||!Ct),fr={};
|
||||
fr[O]=At,fr[N]=Et,fr[S]=It,fr[E]=qt,fr[A]=Ft,fr[I]=Bt,fr[k]=Rt,R.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:d,variable:"",imports:{_:R}};var Et={a:"q,w,h",l:"var a=arguments,b=0,c=typeof h=='number'?2:a.length;while(++b<c){n=a[b];if(n&&r[typeof n]){",h:"if(typeof u[j]=='undefined')u[j]=n[j]",c:"}}"},Ft={a:"e,d,x",l:"d=d&&typeof x=='undefined'?d:f(d,x)",b:"typeof o=='number'",h:"if(d(n[j],j,e)===false)return u"},qt={l:"if(!r[typeof n])return u;"+Ft.l,b:o},ar=M(Ft),cr=M(Ft,qt,{m:o}),lr=M(Ft,qt),pr=Xt||function(n){return n instanceof At||Qt.call(n)==O
|
||||
},sr=nr?function(n){return nt(n)?nr(n):[]}:L,vr={"&":"&","<":"<",">":">",'"':""","'":"'"},gr=X(vr),hr=M(Et,{l:Et.l.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=f(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),h:"u[j]=d?d(u[j],n[j]):n[j]"}),yr=M(Et),Xt=8==er("08")?er:function(n,t){return er(rt(n)?n.replace(/^0+(?=.$)/,""):n,t||0)};return $t&&f&&typeof Jt=="function"&&(xt=wt(Jt,i)),R.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0
|
||||
}},R.assign=hr,R.at=function(n){for(var t=-1,r=Kt.apply(Tt,G(arguments,1)),e=r.length,u=At(e);++t<e;)u[t]=n[r[t]];return u},R.bind=wt,R.bindAll=function(n){for(var t=Kt.apply(Tt,arguments),r=1<t.length?0:(t=W(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=wt(n[u],n)}return n},R.bindKey=function(n,t){return C(n,t,G(arguments,2))},R.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},R.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},R.countBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",Gt.call(e,r)?e[r]++:e[r]=1}),e},R.debounce=function(n,t,r){function e(){a=u,r||(i=n.apply(f,o))}var o,i,f,a;return function(){var u=r&&!a;return o=arguments,f=this,Mt(a),a=Lt(e,t),u&&(i=n.apply(f,o)),i}},R.defaults=yr,R.defer=xt,R.delay=function(n,t){var e=G(arguments,2);return Lt(function(){n.apply(r,e)},t)},R.difference=function(n){for(var t=-1,r=n?n.length:0,e=Kt.apply(Tt,arguments),e=T(e,r),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},R.filter=ft,R.flatten=yt,R.forEach=ct,R.forIn=cr,R.forOwn=lr,R.functions=W,R.groupBy=function(n,t,r){var e={};return t=P(t,r),ct(n,function(n,r,u){r=t(n,r,u)+"",(Gt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},R.initial=function(n,t,r){if(!n)return[];var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else e=t==u||r?1:t||e;return G(n,0,rr(tr(0,o-e),o))},R.intersection=function(n){var t=arguments,r=t.length,e={0:{}},u=-1,o=n?n.length:0,i=100<=o,f=[],a=f;
|
||||
n:for(;++u<o;){var c=n[u];if(i)var l=c+"",l=Gt.call(e[0],l)?!(a=e[0][l]):a=e[0][l]=[];if(l||0>mt(a,c)){i&&a.push(c);for(var p=r;--p;)if(!(e[p]||(e[p]=T(t[p],0,100)))(c))continue n;f.push(c)}}return f},R.invert=X,R.invoke=function(n,t){var r=G(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=At(typeof o=="number"?o:0);return ct(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},R.keys=sr,R.map=lt,R.max=pt,R.memoize=function(n,t){var r={};return function(){var e=(t?t.apply(this,arguments):arguments[0])+"";
|
||||
return Gt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},R.merge=et,R.min=function(n,t,r){var e=1/0,u=e;if(!t&&pr(n)){r=-1;for(var o=n.length;++r<o;){var i=n[r];i<u&&(u=i)}}else t=!t&&rt(n)?D:P(t,r),ar(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});return u},R.omit=function(n,t,r){var e=typeof t=="function",u={};if(e)t=P(t,r);else var o=Kt.apply(Tt,arguments);return cr(n,function(n,r,i){(e?!t(n,r,i):0>mt(o,r,1))&&(u[r]=n)}),u},R.once=function(n){var t,r;return function(){return t?r:(t=e,r=n.apply(this,arguments),n=u,r)
|
||||
}},R.pairs=function(n){for(var t=-1,r=sr(n),e=r.length,u=At(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},R.partial=function(n){return C(n,G(arguments,1))},R.partialRight=function(n){return C(n,G(arguments,1),u,l)},R.pick=function(n,t,r){var e={};if(typeof t!="function")for(var u=0,o=Kt.apply(Tt,arguments),i=nt(n)?o.length:0;++u<i;){var f=o[u];f in n&&(e[f]=n[f])}else t=P(t,r),cr(n,function(n,r,u){t(n,r,u)&&(e[r]=n)});return e},R.pluck=lt,R.range=function(n,t,r){n=+n||0,r=+r||1,t==u&&(t=n,n=0);var e=-1;
|
||||
t=tr(0,Pt((t-n)/r));for(var o=At(t);++e<t;)o[e]=n,n+=r;return o},R.reject=function(n,t,r){return t=P(t,r),ft(n,function(n,r,e){return!t(n,r,e)})},R.rest=dt,R.shuffle=function(n){var t=-1,r=n?n.length:0,e=At(typeof r=="number"?r:0);return ct(n,function(n){var r=Ut(ur()*(++t+1));e[t]=e[r],e[r]=n}),e},R.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,o=At(typeof u=="number"?u:0);for(t=P(t,r),ct(n,function(n,r,u){o[++e]={a:t(n,r,u),b:e,c:n}}),u=o.length,o.sort(z);u--;)o[u]=o[u].c;return o},R.tap=function(n,t){return t(n),n
|
||||
},R.throttle=function(n,t){function r(){a=new It,f=u,o=n.apply(i,e)}var e,o,i,f,a=0;return function(){var c=new It,l=t-(c-a);return e=arguments,i=this,0<l?f||(f=Lt(r,l)):(Mt(f),f=u,a=c,o=n.apply(i,e)),o}},R.times=function(n,t,r){n=+n||0;for(var e=-1,u=At(n);++e<n;)u[e]=t.call(r,e);return u},R.toArray=function(n){return n&&typeof n.length=="number"?G(n):ut(n)},R.union=function(){return bt(Kt.apply(Tt,arguments))},R.uniq=bt,R.values=ut,R.where=ft,R.without=function(n){for(var t=-1,r=n?n.length:0,e=T(arguments,1),u=[];++t<r;){var o=n[t];
|
||||
e(o)||u.push(o)}return u},R.wrap=function(n,t){return function(){var r=[n];return Ht.apply(r,arguments),t.apply(this,r)}},R.zip=function(n){for(var t=-1,r=n?pt(lt(arguments,"length")):0,e=At(r);++t<r;)e[t]=lt(arguments,t);return e},R.zipObject=jt,R.collect=lt,R.drop=dt,R.each=ct,R.extend=hr,R.methods=W,R.object=jt,R.select=ft,R.tail=dt,R.unique=bt,Nt(R),R.clone=Q,R.cloneDeep=function(n,t,r){return Q(n,e,t,r)},R.contains=ot,R.escape=function(n){return n==u?"":(n+"").replace(b,U)},R.every=it,R.find=at,R.has=function(n,t){return n?Gt.call(n,t):o
|
||||
},R.identity=Ot,R.indexOf=mt,R.isArguments=J,R.isArray=pr,R.isBoolean=function(n){return n===e||n===o||Qt.call(n)==N},R.isDate=function(n){return n instanceof It||Qt.call(n)==S},R.isElement=function(n){return n?1===n.nodeType:o},R.isEmpty=function(n){var t=e;if(!n)return t;var r=Qt.call(n),u=n.length;return r==O||r==k||r==x||r==E&&typeof u=="number"&&Z(n.splice)?!u:(lr(n,function(){return t=o}),t)},R.isEqual=Y,R.isFinite=function(n){return Yt(n)&&!Zt(parseFloat(n))},R.isFunction=Z,R.isNaN=function(n){return tt(n)&&n!=+n
|
||||
},R.isNull=function(n){return n===u},R.isNumber=tt,R.isObject=nt,R.isPlainObject=a,R.isRegExp=function(n){return n instanceof Bt||Qt.call(n)==I},R.isString=rt,R.isUndefined=function(n){return typeof n=="undefined"},R.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?tr(0,e+r):rr(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},R.mixin=Nt,R.noConflict=function(){return i._=zt,this},R.parseInt=Xt,R.random=function(n,t){return n==u&&t==u&&(t=1),n=+n||0,t==u&&(t=n,n=0),n+Ut(ur()*((+t||0)-n+1))
|
||||
},R.reduce=st,R.reduceRight=vt,R.result=function(n,t){var e=n?n[t]:r;return Z(e)?n[t]():e},R.runInContext=t,R.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:sr(n).length},R.some=gt,R.sortedIndex=_t,R.template=function(n,t,u){var o=R.templateSettings;n||(n=""),u=yr({},u,o);var i,f=yr({},u.imports,o.imports),o=sr(f),f=ut(f),a=0,c=u.interpolate||_,l="__p+='",c=Bt((u.escape||_).source+"|"+c.source+"|"+(c===d?m:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,r,u,o,f,c){return u||(u=o),l+=n.slice(a,c).replace(j,K),r&&(l+="'+__e("+r+")+'"),f&&(i=e,l+="';"+f+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),a=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(i?l.replace(v,""):l).replace(g,"$1").replace(h,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(i?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=kt(o,"return "+l).apply(r,f)}catch(s){throw s.source=l,s}return t?p(t):(p.source=l,p)},R.unescape=function(n){return n==u?"":(n+"").replace(s,H)},R.uniqueId=function(n){var t=++c;return(n==u?"":n+"")+t
|
||||
},R.all=it,R.any=gt,R.detect=at,R.foldl=st,R.foldr=vt,R.include=ot,R.inject=st,lr(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(){var t=[this.__wrapped__];return Ht.apply(t,arguments),n.apply(R,t)})}),R.first=ht,R.last=function(n,t,r){if(n){var e=0,o=n.length;if(typeof t!="number"&&t!=u){var i=o;for(t=P(t,r);i--&&t(n[i],i,n);)e++}else if(e=t,e==u||r)return n[o-1];return G(n,tr(0,o-e))}},R.take=ht,R.head=ht,lr(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(t,r){var e=n(this.__wrapped__,t,r);
|
||||
return t==u||r&&typeof t!="function"?e:new R(e)})}),R.VERSION="1.0.1",R.prototype.toString=function(){return this.__wrapped__+""},R.prototype.value=St,R.prototype.valueOf=St,ar(["join","pop","shift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ar(["push","reverse","sort","unshift"],function(n){var t=Tt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ar(["concat","slice","splice"],function(n){var t=Tt[n];R.prototype[n]=function(){return new R(t.apply(this.__wrapped__,arguments))
|
||||
}}),R}var r,e=!0,u=null,o=!1,i=typeof exports=="object"&&exports,f=typeof module=="object"&&module&&module.exports==i&&module,a=typeof global=="object"&&global;a.global===a&&(n=a);var c=0,l={},p=30,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\b__p\+='';/g,g=/\b(__p\+=)''\+/g,h=/(__e\(.*?\)|\b__t\))\+'';/g,y=/\w*$/,m=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,d=/<%=([\s\S]+?)%>/g,_=/($^)/,b=/[&<>"']/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(" "),x="[object Arguments]",O="[object Array]",N="[object Boolean]",S="[object Date]",A="[object Number]",E="[object Object]",I="[object RegExp]",k="[object String]",$={"[object Function]":o};
|
||||
$[x]=$[O]=$[N]=$[S]=$[A]=$[E]=$[I]=$[k]=e;var F={"boolean":o,"function":e,object:e,number:o,string:o,undefined:o},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);
|
||||
77
dist/lodash.underscore.js
vendored
77
dist/lodash.underscore.js
vendored
@@ -395,12 +395,12 @@
|
||||
};
|
||||
}
|
||||
if (argCount === 4) {
|
||||
return function(accumulator, value, index, object) {
|
||||
return func.call(thisArg, accumulator, value, index, object);
|
||||
return function(accumulator, value, index, collection) {
|
||||
return func.call(thisArg, accumulator, value, index, collection);
|
||||
};
|
||||
}
|
||||
return function(value, index, object) {
|
||||
return func.call(thisArg, value, index, object);
|
||||
return function(value, index, collection) {
|
||||
return func.call(thisArg, value, index, collection);
|
||||
};
|
||||
}
|
||||
return func;
|
||||
@@ -2895,39 +2895,6 @@
|
||||
return -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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.object(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function object(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of numbers (positive and/or negative) progressing from
|
||||
* `start` up to but not including `end`.
|
||||
@@ -3266,6 +3233,40 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias object
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.zipObject(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function zipObject(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -4153,7 +4154,6 @@
|
||||
lodash.max = max;
|
||||
lodash.memoize = memoize;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
@@ -4183,6 +4183,7 @@
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.object = zipObject;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
10
dist/lodash.underscore.min.js
vendored
10
dist/lodash.underscore.min.js
vendored
@@ -21,11 +21,11 @@ e.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpo
|
||||
}},e.bind=U,e.bindAll=function(n){for(var r=mr.apply(vr,arguments),t=1<r.length?0:(r=y(n),-1),e=r.length;++t<e;){var u=r[t];n[u]=U(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=i(r,t),k(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,_r(a),a=wr(e,r),f&&(o=n.apply(i,u)),o}},e.defaults=g,e.defer=function(n){var r=l(arguments,1);return wr(function(){n.apply(void 0,r)},1)},e.delay=function(n,r){var t=l(arguments,2);return wr(function(){n.apply(void 0,t)},r)},e.difference=function(n){for(var r=-1,t=n.length,e=mr.apply(vr,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=i(r,t),k(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=i(r,t);o--&&r(n[o],o,n);)e++}else e=r==H||t?1:r||e;return l(n,0,Fr(kr(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=_,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=$r,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 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&&Mr(n)){e=-1;for(var a=n.length;++e<a;){var f=n[e];f<o&&(o=f)}}else r=i(r,e),t(n,function(n,t,e){t=r(n,t,e),t<u&&(u=t,o=n)});return o},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.omit=function(n){var t=mr.apply(vr,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=G,t=n.apply(this,arguments),n=H,t)}},e.pairs=function(n){for(var r=-1,t=$r(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=mr.apply(vr,arguments),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},e.pluck=zr,e.range=function(n,r,t){n=+n||0,t=+t||1,r==H&&(r=n,n=0);
|
||||
var e=-1;r=kr(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=i(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=dr(Rr()*(++r+1));e[r]=e[t],e[t]=n}),e},e.sortBy=function(n,r,t){var e=-1,o=n?n.length:0,a=Array(typeof o=="number"?o:0);for(r=i(r,t),k(n,function(n,t,u){a[++e]={a:r(n,t,u),b:e,c:n}}),o=a.length,a.sort(u);o--;)a[o]=a[o].c;return a
|
||||
},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)):(_r(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"?l(n):x(n)},e.union=function(){return P(mr.apply(vr,arguments))},e.uniq=P,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 jr.apply(t,arguments),r.apply(this,t)}},e.zip=function(n){for(var r=-1,t=n?R(zr(arguments,"length")):0,e=Array(t);++r<t;)e[r]=zr(arguments,r);return e},e.collect=F,e.drop=z,e.each=k,e.extend=h,e.methods=y,e.select=S,e.tail=z,e.unique=P,e.clone=function(n){return j(n)?Mr(n)?l(n):h({},n):n},e.contains=E,e.escape=function(n){return n==H?"":(n+"").replace(rr,f)},e.every=O,e.find=N,e.findWhere=function(n,r){return M(n,r,G)
|
||||
return k(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},e.keys=$r,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 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&&Mr(n)){e=-1;for(var a=n.length;++e<a;){var f=n[e];f<o&&(o=f)}}else r=i(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=mr.apply(vr,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=G,t=n.apply(this,arguments),n=H,t)}},e.pairs=function(n){for(var r=-1,t=$r(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=mr.apply(vr,arguments),e=t.length,u={};++r<e;){var o=t[r];o in n&&(u[o]=n[o])}return u},e.pluck=zr,e.range=function(n,r,t){n=+n||0,t=+t||1,r==H&&(r=n,n=0);var e=-1;r=kr(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=i(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=dr(Rr()*(++r+1));e[r]=e[t],e[t]=n}),e},e.sortBy=function(n,r,t){var e=-1,o=n?n.length:0,a=Array(typeof o=="number"?o:0);for(r=i(r,t),k(n,function(n,t,u){a[++e]={a:r(n,t,u),b:e,c:n}}),o=a.length,a.sort(u);o--;)a[o]=a[o].c;return a},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)):(_r(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"?l(n):x(n)},e.union=function(){return P(mr.apply(vr,arguments))},e.uniq=P,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 jr.apply(t,arguments),r.apply(this,t)}},e.zip=function(n){for(var r=-1,t=n?R(zr(arguments,"length")):0,e=Array(t);++r<t;)e[r]=zr(arguments,r);return e},e.collect=F,e.drop=z,e.each=k,e.extend=h,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=P,e.clone=function(n){return j(n)?Mr(n)?l(n):h({},n):n},e.contains=E,e.escape=function(n){return n==H?"":(n+"").replace(rr,f)},e.every=O,e.find=N,e.findWhere=function(n,r){return M(n,r,G)
|
||||
},e.has=function(n,r){return n?br.call(n,r):J},e.identity=V,e.indexOf=T,e.isArguments=s,e.isArray=Mr,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=d,e.isFinite=function(n){return Or(n)&&!Sr(parseFloat(n))},e.isFunction=b,e.isNaN=function(n){return w(n)&&n!=+n},e.isNull=function(n){return n===H},e.isNumber=w,e.isObject=j,e.isRegExp=function(n){return n instanceof RegExp||Ar.call(n)==cr
|
||||
},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?kr(0,e+t):Fr(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(Rr()*((+r||0)-n+1))},e.reduce=q,e.reduceRight=B,e.result=function(n,r){var t=n?n[r]:H;return b(t)?n[r]():t},e.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:$r(n).length
|
||||
},e.some=D,e.sortedIndex=C,e.template=function(n,r,t){n||(n=""),t=g({},t,e.templateSettings);var u=0,o="__p+='",i=t.variable;n.replace(RegExp((t.escape||nr).source+"|"+(t.interpolate||nr).source+"|"+(t.evaluate||nr).source+"|$","g"),function(r,t,e,i,f){return o+=n.slice(u,f).replace(tr,a),t&&(o+="'+_['escape']("+t+")+'"),i&&(o+="';"+i+";__p+='"),e&&(o+="'+((__t=("+e+"))==null?'':__t)+'"),u=f+r.length,r}),o+="';\n",i||(i="obj",o="with("+i+"||{}){"+o+"}"),o="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";
|
||||
|
||||
126
doc/README.md
126
doc/README.md
@@ -17,7 +17,7 @@
|
||||
* [`_.intersection`](#_intersectionarray1-array2-)
|
||||
* [`_.last`](#_lastarray--callbackn-thisarg)
|
||||
* [`_.lastIndexOf`](#_lastindexofarray-value--fromindexarraylength-1)
|
||||
* [`_.object`](#_objectkeys--values)
|
||||
* [`_.object`](#_zipobjectkeys--values)
|
||||
* [`_.range`](#_rangestart0-end--step1)
|
||||
* [`_.rest`](#_restarray--callbackn1-thisarg)
|
||||
* [`_.sortedIndex`](#_sortedindexarray-value--callbackidentity-thisarg)
|
||||
@@ -28,6 +28,7 @@
|
||||
* [`_.unique`](#_uniqarray--issortedfalse-callbackidentity-thisarg)
|
||||
* [`_.without`](#_withoutarray--value1-value2-)
|
||||
* [`_.zip`](#_ziparray1-array2-)
|
||||
* [`_.zipObject`](#_zipobjectkeys--values)
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
@@ -532,35 +533,10 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_objectkeys--values"></a>`_.object(keys [, values=[]])`
|
||||
<a href="#_objectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3687 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
#### Arguments
|
||||
1. `keys` *(Array)*: The array of keys.
|
||||
2. `[values=[]]` *(Array)*: The array of values.
|
||||
|
||||
#### Returns
|
||||
*(Object)*: Returns an object composed of the given keys and corresponding values.
|
||||
|
||||
#### Example
|
||||
```js
|
||||
_.object(['moe', 'larry'], [30, 40]);
|
||||
// => { 'moe': 30, 'larry': 40 }
|
||||
```
|
||||
|
||||
* * *
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3731 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3698 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -598,7 +574,7 @@ _.range(0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_restarray--callbackn1-thisarg"></a>`_.rest(array [, callback|n=1, thisArg])`
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3810 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3777 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.initial`, this method gets all but the first value of `array`. If a number `n` is passed, the first `n` values are excluded from the result. If a `callback` function is passed, elements at the beginning of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -658,7 +634,7 @@ _.rest(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortedindexarray-value--callbackidentity-thisarg"></a>`_.sortedIndex(array, value [, callback=identity, thisArg])`
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3874 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3841 "View in source") [Ⓣ][1]
|
||||
|
||||
Uses a binary search to determine the smallest index at which the `value` should be inserted into `array` in order to maintain the sort order of the sorted `array`. If `callback` is passed, it will be executed for `value` and each element in `array` to compute their sort ranking. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -707,7 +683,7 @@ _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unionarray1-array2-"></a>`_.union([array1, array2, ...])`
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3906 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3873 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -731,7 +707,7 @@ _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqarray--issortedfalse-callbackidentity-thisarg"></a>`_.uniq(array [, isSorted=false, callback=identity, thisArg])`
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3953 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3920 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a duplicate-value-free version of the `array` using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `isSorted` will run a faster algorithm. If `callback` is passed, each element of `array` is passed through a callback` before uniqueness is computed. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -778,7 +754,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4012 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3979 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -803,7 +779,7 @@ _.without([1, 2, 1, 0, 3, 1, 4], 0, 1);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_ziparray1-array2-"></a>`_.zip([array1, array2, ...])`
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4043 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4010 "View in source") [Ⓣ][1]
|
||||
|
||||
Groups the elements of each array at their corresponding indexes. Useful for separate data sources that are coordinated through matching array indexes. For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix in a similar fashion.
|
||||
|
||||
@@ -824,6 +800,34 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys [, values=[]])`
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4039 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed from arrays of `keys` and `values`. Pass either a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or two arrays, one of `keys` and one of corresponding `values`.
|
||||
|
||||
#### Aliases
|
||||
*object*
|
||||
|
||||
#### Arguments
|
||||
1. `keys` *(Array)*: The array of keys.
|
||||
2. `[values=[]]` *(Array)*: The array of values.
|
||||
|
||||
#### Returns
|
||||
*(Object)*: Returns an object composed of the given keys and corresponding values.
|
||||
|
||||
#### Example
|
||||
```js
|
||||
_.zipObject(['moe', 'larry'], [30, 40]);
|
||||
// => { 'moe': 30, 'larry': 40 }
|
||||
```
|
||||
|
||||
* * *
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
<!-- /div -->
|
||||
|
||||
|
||||
@@ -865,7 +869,7 @@ The wrapper functions `first` and `last` return wrapped values when `n` is passe
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_tapvalue-interceptor"></a>`_.tap(value, interceptor)`
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4941 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4942 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes `interceptor` with the `value` as the first argument, and then returns `value`. The purpose of this method is to "tap into" a method chain, in order to perform operations on intermediate results within the chain.
|
||||
|
||||
@@ -895,7 +899,7 @@ _([1, 2, 3, 4])
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypetostring"></a>`_.prototype.toString()`
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4958 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4959 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -916,7 +920,7 @@ _([1, 2, 3]).toString();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_prototypevalueof"></a>`_.prototype.valueOf()`
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4975 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4976 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1756,7 +1760,7 @@ _.where(stooges, { 'age': 40 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_aftern-func"></a>`_.after(n, func)`
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4076 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4077 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -1784,7 +1788,7 @@ _.forEach(notes, function(note) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindfunc--thisarg-arg1-arg2-"></a>`_.bind(func [, thisArg, arg1, arg2, ...])`
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4109 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4110 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with the `this` binding of `thisArg` and prepends any additional `bind` arguments to those passed to the bound function.
|
||||
|
||||
@@ -1815,7 +1819,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindallobject--methodname1-methodname2-"></a>`_.bindAll(object [, methodName1, methodName2, ...])`
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4140 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4141 "View in source") [Ⓣ][1]
|
||||
|
||||
Binds methods on `object` to `object`, overwriting the existing method. Method names may be specified as individual arguments or as arrays of method names. If no method names are provided, all the function properties of `object` will be bound.
|
||||
|
||||
@@ -1846,7 +1850,7 @@ jQuery('#docs').on('click', view.onClick);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_bindkeyobject-key--arg1-arg2-"></a>`_.bindKey(object, key [, arg1, arg2, ...])`
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4186 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4187 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes the method at `object[key]` and prepends any additional `bindKey` arguments to those passed to the bound function. This method differs from `_.bind` by allowing bound functions to reference methods that will be redefined or don't yet exist. See http://michaux.ca/articles/lazy-function-definition-pattern.
|
||||
|
||||
@@ -1887,7 +1891,7 @@ func();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_composefunc1-func2-"></a>`_.compose([func1, func2, ...])`
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4209 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4210 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is the composition of the passed functions, where each function consumes the return value of the function that follows. For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. Each function is executed with the `this` binding of the composed function.
|
||||
|
||||
@@ -1914,7 +1918,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4242 "View in source") [Ⓣ][1]
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4243 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass `true` for `immediate` to cause debounce to invoke `func` on the leading, instead of the trailing, edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
@@ -1940,7 +1944,7 @@ jQuery(window).on('resize', lazyLayout);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_deferfunc--arg1-arg2-"></a>`_.defer(func [, arg1, arg2, ...])`
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4306 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4307 "View in source") [Ⓣ][1]
|
||||
|
||||
Defers executing the `func` function until the current call stack has cleared. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -1965,7 +1969,7 @@ _.defer(function() { alert('deferred'); });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_delayfunc-wait--arg1-arg2-"></a>`_.delay(func, wait [, arg1, arg2, ...])`
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4286 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4287 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -1992,7 +1996,7 @@ _.delay(log, 1000, 'logged later');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_memoizefunc--resolver"></a>`_.memoize(func [, resolver])`
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4334 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4335 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that memoizes the result of `func`. If `resolver` is passed, it will be used to determine the cache key for storing the result based on the arguments passed to the memoized function. By default, the first argument passed to the memoized function is used as the cache key. The `func` is executed with the `this` binding of the memoized function.
|
||||
|
||||
@@ -2018,7 +2022,7 @@ var fibonacci = _.memoize(function(n) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_oncefunc"></a>`_.once(func)`
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4361 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4362 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that is restricted to execute `func` once. Repeat calls to the function will return the value of the first call. The `func` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -2044,7 +2048,7 @@ initialize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialfunc--arg1-arg2-"></a>`_.partial(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4396 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4397 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when called, invokes `func` with any additional `partial` arguments prepended to those passed to the new function. This method is similar to `_.bind`, except it does **not** alter the `this` binding.
|
||||
|
||||
@@ -2071,7 +2075,7 @@ hi('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_partialrightfunc--arg1-arg2-"></a>`_.partialRight(func [, arg1, arg2, ...])`
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4427 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4428 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2108,7 +2112,7 @@ options.imports
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_throttlefunc-wait"></a>`_.throttle(func, wait)`
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4449 "View in source") [Ⓣ][1]
|
||||
<a href="#_throttlefunc-wait">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4450 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that, when executed, will only call the `func` function at most once per every `wait` milliseconds. If the throttled function is invoked more than once during the `wait` timeout, `func` will also be called on the trailing edge of the timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
@@ -2133,7 +2137,7 @@ jQuery(window).on('scroll', throttled);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wrapvalue-wrapper"></a>`_.wrap(value, wrapper)`
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4502 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4503 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a function that passes `value` to the `wrapper` function as its first argument. Additional arguments passed to the function are appended to those passed to the `wrapper` function. The `wrapper` is executed with the `this` binding of the created function.
|
||||
|
||||
@@ -3175,7 +3179,7 @@ _.values({ 'one': 1, 'two': 2, 'three': 3 });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_escapestring"></a>`_.escape(string)`
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4526 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4527 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3199,7 +3203,7 @@ _.escape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_identityvalue"></a>`_.identity(value)`
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4544 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4545 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3224,7 +3228,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4570 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4571 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3254,7 +3258,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4594 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4595 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3274,7 +3278,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4617 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4618 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a random number between `min` and `max` *(inclusive)*. If only one argument is passed, a number between `0` and the given number will be returned.
|
||||
|
||||
@@ -3302,7 +3306,7 @@ _.random(5);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_resultobject-property"></a>`_.result(object, property)`
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4655 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4656 "View in source") [Ⓣ][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.
|
||||
|
||||
@@ -3355,7 +3359,7 @@ Create a new `lodash` function using the given `context` object.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_templatetext-data-options"></a>`_.template(text, data, options)`
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4742 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4743 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3439,7 +3443,7 @@ fs.writeFileSync(path.join(cwd, 'jst.js'), '\
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_timesn-callback--thisarg"></a>`_.times(n, callback [, thisArg])`
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4867 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4868 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `callback` function `n` times, returning an array of the results of each `callback` execution. The `callback` is bound to `thisArg` and invoked with one argument; *(index)*.
|
||||
|
||||
@@ -3471,7 +3475,7 @@ _.times(3, function(n) { this.cast(n); }, mage);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unescapestring"></a>`_.unescape(string)`
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4893 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4894 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3495,7 +3499,7 @@ _.unescape('Moe, Larry & Curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_uniqueidprefix"></a>`_.uniqueId([prefix])`
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4913 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4914 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3548,7 +3552,7 @@ A reference to the `lodash` function.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_version"></a>`_.VERSION`
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5145 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5147 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
78
lodash.js
78
lodash.js
@@ -705,12 +705,12 @@
|
||||
};
|
||||
}
|
||||
if (argCount === 4) {
|
||||
return function(accumulator, value, index, object) {
|
||||
return func.call(thisArg, accumulator, value, index, object);
|
||||
return function(accumulator, value, index, collection) {
|
||||
return func.call(thisArg, accumulator, value, index, collection);
|
||||
};
|
||||
}
|
||||
return function(value, index, object) {
|
||||
return func.call(thisArg, value, index, object);
|
||||
return function(value, index, collection) {
|
||||
return func.call(thisArg, value, index, collection);
|
||||
};
|
||||
}
|
||||
return func;
|
||||
@@ -3667,39 +3667,6 @@
|
||||
return -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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.object(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function object(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an array of numbers (positive and/or negative) progressing from
|
||||
* `start` up to but not including `end`.
|
||||
@@ -4051,6 +4018,40 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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`.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @alias object
|
||||
* @category Arrays
|
||||
* @param {Array} keys The array of keys.
|
||||
* @param {Array} [values=[]] The array of values.
|
||||
* @returns {Object} Returns an object composed of the given keys and
|
||||
* corresponding values.
|
||||
* @example
|
||||
*
|
||||
* _.zipObject(['moe', 'larry'], [30, 40]);
|
||||
* // => { 'moe': 30, 'larry': 40 }
|
||||
*/
|
||||
function zipObject(keys, values) {
|
||||
var index = -1,
|
||||
length = keys ? keys.length : 0,
|
||||
result = {};
|
||||
|
||||
while (++index < length) {
|
||||
var key = keys[index];
|
||||
if (values) {
|
||||
result[key] = values[index];
|
||||
} else {
|
||||
result[key[0]] = key[1];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
@@ -5010,7 +5011,6 @@
|
||||
lodash.memoize = memoize;
|
||||
lodash.merge = merge;
|
||||
lodash.min = min;
|
||||
lodash.object = object;
|
||||
lodash.omit = omit;
|
||||
lodash.once = once;
|
||||
lodash.pairs = pairs;
|
||||
@@ -5034,6 +5034,7 @@
|
||||
lodash.without = without;
|
||||
lodash.wrap = wrap;
|
||||
lodash.zip = zip;
|
||||
lodash.zipObject = zipObject;
|
||||
|
||||
// add aliases
|
||||
lodash.collect = map;
|
||||
@@ -5041,6 +5042,7 @@
|
||||
lodash.each = forEach;
|
||||
lodash.extend = assign;
|
||||
lodash.methods = functions;
|
||||
lodash.object = zipObject;
|
||||
lodash.select = filter;
|
||||
lodash.tail = rest;
|
||||
lodash.unique = uniq;
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
'include': 'contains',
|
||||
'inject': 'reduce',
|
||||
'methods': 'functions',
|
||||
'object': 'zipObject',
|
||||
'select': 'filter',
|
||||
'tail': 'rest',
|
||||
'take': 'first',
|
||||
@@ -81,7 +82,8 @@
|
||||
'reduceRight': ['foldr'],
|
||||
'rest': ['drop', 'tail'],
|
||||
'some': ['any'],
|
||||
'uniq': ['unique']
|
||||
'uniq': ['unique'],
|
||||
'zipObject': ['object']
|
||||
};
|
||||
|
||||
/** List of all Lo-Dash methods */
|
||||
@@ -113,7 +115,8 @@
|
||||
'uniq',
|
||||
'unique',
|
||||
'without',
|
||||
'zip'
|
||||
'zip',
|
||||
'zipObject'
|
||||
];
|
||||
|
||||
/** List of "Chaining" category methods */
|
||||
@@ -935,7 +938,8 @@
|
||||
'merge',
|
||||
'parseInt',
|
||||
'partialRight',
|
||||
'runInContext'
|
||||
'runInContext',
|
||||
'zipObject'
|
||||
], function(methodName) {
|
||||
equal(lodash[methodName], undefined, '_.' + methodName + ' should not exist: ' + basename);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user