mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Update builds, vendors, and docs.
Former-commit-id: 67aec5a64de61ac2b8948b31315395a727c10071
This commit is contained in:
85
dist/lodash.compat.js
vendored
85
dist/lodash.compat.js
vendored
@@ -703,6 +703,7 @@
|
||||
* @param {Object} [options1, options2, ...] The compile options object(s).
|
||||
* arrays - A string of code to determine if the iterable is an array or array-like.
|
||||
* useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
|
||||
* useKeys - A boolean to specify using `_.keys` for own property iteration.
|
||||
* args - A string of comma separated arguments the iteration function will accept.
|
||||
* top - A string of code to execute before the iteration branches.
|
||||
* loop - A string of code to execute in the object loop.
|
||||
@@ -1262,7 +1263,9 @@
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
* return num % 2 == 0;
|
||||
* });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(object, callback, thisArg) {
|
||||
@@ -1537,11 +1540,8 @@
|
||||
function isEqual(a, b, callback, thisArg, stackA, stackB) {
|
||||
// used to indicate that when comparing objects, `a` has at least the properties of `b`
|
||||
var whereIndicator = callback === indicatorObject;
|
||||
if (callback && !whereIndicator) {
|
||||
callback = (typeof thisArg == 'undefined')
|
||||
? callback
|
||||
: lodash.createCallback(callback, thisArg, 2);
|
||||
|
||||
if (typeof callback == 'function' && !whereIndicator) {
|
||||
callback = lodash.createCallback(callback, thisArg, 2);
|
||||
var result = callback(a, b);
|
||||
if (typeof result != 'undefined') {
|
||||
return !!result;
|
||||
@@ -2492,7 +2492,9 @@
|
||||
* @returns {Mixed} Returns the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.find([1, 2, 3, 4], function(num) { return num % 2 == 0; });
|
||||
* _.find([1, 2, 3, 4], function(num) {
|
||||
* return num % 2 == 0;
|
||||
* });
|
||||
* // => 2
|
||||
*
|
||||
* var food = [
|
||||
@@ -4430,44 +4432,53 @@
|
||||
/**
|
||||
* 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.
|
||||
* an `options` object to indicate that `func` should be invoked on the leading
|
||||
* and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced
|
||||
* function will return the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to debounce.
|
||||
* @param {Number} wait The number of milliseconds to delay.
|
||||
* @param {Boolean} immediate A flag to indicate execution is on the leading
|
||||
* edge of the timeout.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=false] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new debounced function.
|
||||
* @example
|
||||
*
|
||||
* var lazyLayout = _.debounce(calculateLayout, 300);
|
||||
* jQuery(window).on('resize', lazyLayout);
|
||||
*/
|
||||
function debounce(func, wait, immediate) {
|
||||
function debounce(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId;
|
||||
timeoutId,
|
||||
trailing = true;
|
||||
|
||||
function delayed() {
|
||||
timeoutId = null;
|
||||
if (!immediate) {
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === true) {
|
||||
var leading = true;
|
||||
trailing = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var isImmediate = immediate && !timeoutId;
|
||||
var isLeading = leading && !timeoutId;
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(delayed, wait);
|
||||
|
||||
if (isImmediate) {
|
||||
if (isLeading) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
return result;
|
||||
@@ -4637,39 +4648,57 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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. Pass an `options` object to indicate
|
||||
* that `func` should be invoked on the leading and/or trailing edge of the
|
||||
* `wait` timeout. Subsequent calls to the throttled function will return
|
||||
* the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to throttle.
|
||||
* @param {Number} wait The number of milliseconds to throttle executions to.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=true] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new throttled function.
|
||||
* @example
|
||||
*
|
||||
* var throttled = _.throttle(updatePosition, 100);
|
||||
* jQuery(window).on('scroll', throttled);
|
||||
*/
|
||||
function throttle(func, wait) {
|
||||
function throttle(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId,
|
||||
lastCalled = 0;
|
||||
lastCalled = 0,
|
||||
leading = true,
|
||||
trailing = true;
|
||||
|
||||
function trailingCall() {
|
||||
lastCalled = new Date;
|
||||
timeoutId = null;
|
||||
result = func.apply(thisArg, args);
|
||||
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === false) {
|
||||
leading = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var now = new Date,
|
||||
remaining = wait - (now - lastCalled);
|
||||
|
||||
var now = new Date;
|
||||
if (!timeoutId && !leading) {
|
||||
lastCalled = now;
|
||||
}
|
||||
var remaining = wait - (now - lastCalled);
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
|
||||
26
dist/lodash.compat.min.js
vendored
26
dist/lodash.compat.min.js
vendored
@@ -9,7 +9,7 @@ return a||(n=t[i]),e.length&&(r=r.length?(r=G(r),f?r.concat(e):e.concat(r)):e),t
|
||||
else if(r+="for(i in m){",(fe.enumPrototypes||t.i)&&(r+="if(",fe.enumPrototypes&&(r+="!(v&&i=='prototype')"),fe.enumPrototypes&&t.i&&(r+="&&"),t.i&&(r+="h.call(m,i)"),r+="){"),r+=t.f+";",(fe.enumPrototypes||t.i)&&(r+="}"),r+="}",fe.nonEnumShadows){r+="var f=m.constructor;";for(var u=0;7>u;u++)r+="i='"+t.g[u]+"';if(","constructor"==t.g[u]&&(r+="!(f&&f.prototype===m)&&"),r+="h.call(m,i)){"+t.f+"}"}return(t.b||fe.nonEnumArgs)&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,p,r","return function("+n+"){"+r+"}")(Gt,J,ce,et,pe,a,N)
|
||||
}function z(n){return"\\"+$[n]}function L(n){return ve[n]}function K(n){return typeof n.toString!="function"&&typeof(n+"")=="string"}function M(n){this.__wrapped__=n}function U(){}function V(n){var t=!1;if(!n||Wt.call(n)!=S||!fe.argsClass&&J(n))return t;var e=n.constructor;return(Z(e)?e instanceof e:fe.nodeClass||!K(n))?fe.ownLast?(me(n,function(n,e,r){return t=Gt.call(r,e),!1}),!0===t):(me(n,function(n,e){t=e}),!1===t||Gt.call(n,t)):t}function G(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);
|
||||
var r=-1;e=e-t||0;for(var u=Et(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function H(n){return ge[n]}function J(n){return Wt.call(n)==C}function Q(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=nt(f)){var c=Wt.call(f);if(!P[c]||!fe.nodeClass&&K(f))return f;var l=ce(f)}if(!u||!t)return u?l?G(f):he({},f):f;switch(u=ie[c],c){case k:case x:return new u(+f);case E:case I:return new u(f);
|
||||
case A:return u(f.source,g.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Gt.call(n,"index")&&(f.index=n.index),Gt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:de)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return me(n,function(n,e){Z(n)&&t.push(e)}),t.sort()}function X(n){for(var t=-1,e=pe(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);
|
||||
case A:return u(f.source,g.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Gt.call(n,"index")&&(f.index=n.index),Gt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ct:de)(n,function(n,u){f[u]=Q(n,t,r,e,o,i)}),f}function W(n){var t=[];return me(n,function(n,e){Z(n)&&t.push(e)}),t.sort()}function X(n){for(var t=-1,e=pe(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Y(n,t,e,r,u,o){var f=e===i;if(typeof e=="function"&&!f){e=a.createCallback(e,r,2);
|
||||
var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Wt.call(n),l=Wt.call(t),p==C&&(p=S),l==C&&(l=S),p!=l)return!1;switch(p){case k:case x:return+n==+t;case E:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case A:case I:return n==Bt(t)}if(l=p==j,!l){if(Gt.call(n,"__wrapped__")||Gt.call(t,"__wrapped__"))return Y(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);
|
||||
if(p!=S||!fe.nodeClass&&(K(n)||K(t)))return!1;var p=!fe.argsObject&&J(n)?$t:n.constructor,s=!fe.argsObject&&J(t)?$t:t.constructor;if(p!=s&&(!Z(p)||!(p instanceof p&&Z(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Y(n[l],s,e,r,u,o)););else if(!(c=Y(n[v],s,e,r,u,o)))break;return c}return me(t,function(t,a,i){return Gt.call(i,a)?(v++,c=Gt.call(n,a)&&Y(n[a],t,e,r,u,o)):void 0
|
||||
}),c&&!f&&me(n,function(n,t,e){return Gt.call(e,t)?c=-1<--v:void 0}),c}function Z(n){return typeof n=="function"}function nt(n){return n?N[typeof n]:!1}function tt(n){return typeof n=="number"||Wt.call(n)==E}function et(n){return typeof n=="string"||Wt.call(n)==I}function rt(n,t,e){var r=arguments,u=0,o=2;if(!nt(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);
|
||||
@@ -27,18 +27,18 @@ try{fe.nodeClass=!(Wt.call(document)==S&&!({toString:0}+""))}catch(u){fe.nodeCla
|
||||
Z(/x/)&&(Z=function(n){return n instanceof It||Wt.call(n)==O});var be=Vt?function(n){if(!n||Wt.call(n)!=S||!fe.argsClass&&J(n))return!1;var t=n.valueOf,e=typeof t=="function"&&(e=Vt(t))&&Vt(e);return e?n==e||Vt(n)==e:V(n)}:V;return oe&&u&&typeof Jt=="function"&&(jt=Ct(Jt,r)),Jt=8==ue("08")?ue:function(n,t){return ue(et(n)?n.replace(y,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=he,a.at=function(n){var t=-1,e=Mt.apply(Rt,G(arguments,1)),r=e.length,u=Et(r);
|
||||
for(fe.unindexedChars&&et(n)&&(n=n.split(""));++t<r;)u[t]=n[e[t]];return u},a.bind=Ct,a.bindAll=function(n){for(var t=Mt.apply(Rt,arguments),e=1<t.length?0:(t=W(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=Ct(n[u],n)}return n},a.bindKey=function(n,t){return T(n,t,G(arguments,2),i)},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]
|
||||
}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=Bt(t(n,e,u)),Gt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return kt;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=pe(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Y(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)
|
||||
}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Kt(i),i=Qt(r,t),f&&(a=n.apply(o,u)),a}},a.defaults=ye,a.defer=jt,a.delay=function(n,t){var r=G(arguments,2);return Qt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Mt.apply(Rt,arguments),r=B(r,e,100),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=it,a.flatten=yt,a.forEach=ct,a.forIn=me,a.forOwn=de,a.functions=W,a.groupBy=function(n,t,e){var r={};
|
||||
return t=a.createCallback(t,e),ct(n,function(n,e,u){e=Bt(t(n,e,u)),(Gt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return G(n,0,re(ee(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],c=i;n:for(;++u<a;){var l=n[u];if(o)var p=f+l,p=r[0][p]?!(c=r[0][p]):c=r[0][p]=[];if(p||0>mt(c,l)){o&&c.push(l);
|
||||
for(var s=e;--s;)if(!(r[s]||(r[s]=B(t[s],0,100)))(l))continue n;i.push(l)}}return i},a.invert=X,a.invoke=function(n,t){var e=G(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Et(typeof a=="number"?a:0);return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=pe,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=f+(t?t.apply(this,arguments):arguments[0]);return Gt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;
|
||||
if(!t&&ce(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),se(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Mt.apply(Rt,arguments);return me(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=pe(n),r=e.length,u=Et(r);++t<r;){var a=e[t];
|
||||
u[t]=[a,n[a]]}return u},a.partial=function(n){return T(n,G(arguments,1))},a.partialRight=function(n){return T(n,G(arguments,1),null,i)},a.pick=function(n,t,e){var r={};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&&(r[f]=n[f])}else t=a.createCallback(t,e),me(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=lt,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ee(0,Lt((t-n)/e));for(var u=Et(t);++r<t;)u[r]=n,n+=e;
|
||||
return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Et(typeof e=="number"?e:0);return ct(n,function(n){var e=Ut(ae()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(R);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new At,o=null,u=n.apply(a,r)
|
||||
}var r,u,a,o,i=0;return function(){var f=new At,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Qt(e,c)):(Kt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Et(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?fe.unindexedChars&&et(n)?n.split(""):G(n):ut(n)},a.union=function(){return _t(Mt.apply(Rt,arguments))},a.uniq=_t,a.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?pt(lt(n,"length")):0,u=Et(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=Et(e)))[t]=o[a];
|
||||
return u},a.values=ut,a.where=it,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1,30),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Ht.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(lt(arguments,"length")):0,r=Et(e);++t<e;)r[t]=lt(arguments,t);return r},a.zipObject=wt,a.collect=lt,a.drop=dt,a.each=ct,a.extend=he,a.methods=W,a.object=wt,a.select=it,a.tail=dt,a.unique=_t,xt(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)
|
||||
},a.contains=at,a.escape=function(n){return null==n?"":Bt(n).replace(d,L)},a.every=ot,a.find=ft,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),de(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0}),r},a.has=function(n,t){return n?Gt.call(n,t):!1},a.identity=kt,a.indexOf=mt,a.isArguments=J,a.isArray=ce,a.isBoolean=function(n){return!0===n||!1===n||Wt.call(n)==k},a.isDate=function(n){return n instanceof At||Wt.call(n)==x
|
||||
},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Wt.call(n),r=n.length;return e==j||e==I||(fe.argsClass?e==C:J(n))||e==S&&typeof r=="number"&&Z(n.splice)?!r:(de(n,function(){return t=!1}),t)},a.isEqual=Y,a.isFinite=function(n){return Zt(n)&&!ne(parseFloat(n))},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=be,a.isRegExp=function(n){return n instanceof qt||Wt.call(n)==A
|
||||
},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ee(0,r+e):re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=xt,a.noConflict=function(){return r._=Dt,this},a.parseInt=Jt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ut(ae()*((+t||0)-n+1))},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;
|
||||
return typeof t=="number"?t:pe(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=ye({},r,u);var o,i=ye({},r.imports,u.imports),u=pe(i),i=ut(i),f=0,s=r.interpolate||m,g="__p+='",s=qt((r.escape||m).source+"|"+s.source+"|"+(s===h?v:m).source+"|"+(r.evaluate||m).source+"|$","g");n.replace(s,function(t,e,r,u,a,i){return r||(r=u),g+=n.slice(f,i).replace(b,z),e&&(g+="'+__e("+e+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),r&&(g+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t
|
||||
}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,f&&(a=n.apply(o,u))}var u,a,o,i,f=!0;if(!0===e)var c=!0,f=!1;else e&&(c=e.leading,f=e.trailing);return function(){var e=c&&!i;return u=arguments,o=this,Kt(i),i=Qt(r,t),e&&(a=n.apply(o,u)),a}},a.defaults=ye,a.defer=jt,a.delay=function(n,t){var r=G(arguments,2);return Qt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Mt.apply(Rt,arguments),r=B(r,e,100),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},a.filter=it,a.flatten=yt,a.forEach=ct,a.forIn=me,a.forOwn=de,a.functions=W,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ct(n,function(n,e,u){e=Bt(t(n,e,u)),(Gt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return G(n,0,re(ee(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],c=i;
|
||||
n:for(;++u<a;){var l=n[u];if(o)var p=f+l,p=r[0][p]?!(c=r[0][p]):c=r[0][p]=[];if(p||0>mt(c,l)){o&&c.push(l);for(var s=e;--s;)if(!(r[s]||(r[s]=B(t[s],0,100)))(l))continue n;i.push(l)}}return i},a.invert=X,a.invoke=function(n,t){var e=G(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=Et(typeof a=="number"?a:0);return ct(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=pe,a.map=lt,a.max=pt,a.memoize=function(n,t){var e={};return function(){var r=f+(t?t.apply(this,arguments):arguments[0]);
|
||||
return Gt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=rt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&ce(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&et(n)?F:a.createCallback(t,e),se(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=a.createCallback(t,e);else var o=Mt.apply(Rt,arguments);return me(n,function(n,e,a){(r?!t(n,e,a):0>mt(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)
|
||||
}},a.pairs=function(n){for(var t=-1,e=pe(n),r=e.length,u=Et(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return T(n,G(arguments,1))},a.partialRight=function(n){return T(n,G(arguments,1),null,i)},a.pick=function(n,t,e){var r={};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&&(r[f]=n[f])}else t=a.createCallback(t,e),me(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=lt,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);
|
||||
var r=-1;t=ee(0,Lt((t-n)/e));for(var u=Et(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),it(n,function(n,e,r){return!t(n,e,r)})},a.rest=dt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=Et(typeof e=="number"?e:0);return ct(n,function(n){var e=Ut(ae()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=Et(typeof u=="number"?u:0);for(t=a.createCallback(t,e),ct(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(R);u--;)o[u]=o[u].c;
|
||||
return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t,e){function r(){f=new At,i=null,l&&(a=n.apply(o,u))}var u,a,o,i,f=0,c=!0,l=!0;return!1===e?c=!1:e&&(c=e.leading,l=e.trailing),function(){var e=new At;!i&&!c&&(f=e);var l=t-(e-f);return u=arguments,o=this,0<l?i||(i=Qt(r,l)):(Kt(i),i=null,f=e,a=n.apply(o,u)),a}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=Et(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?fe.unindexedChars&&et(n)?n.split(""):G(n):ut(n)
|
||||
},a.union=function(){return _t(Mt.apply(Rt,arguments))},a.uniq=_t,a.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?pt(lt(n,"length")):0,u=Et(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=Et(e)))[t]=o[a];return u},a.values=ut,a.where=it,a.without=function(n){for(var t=-1,e=n?n.length:0,r=B(arguments,1,30),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Ht.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?pt(lt(arguments,"length")):0,r=Et(e);++t<e;)r[t]=lt(arguments,t);
|
||||
return r},a.zipObject=wt,a.collect=lt,a.drop=dt,a.each=ct,a.extend=he,a.methods=W,a.object=wt,a.select=it,a.tail=dt,a.unique=_t,xt(a),a.clone=Q,a.cloneDeep=function(n,t,e){return Q(n,!0,t,e)},a.contains=at,a.escape=function(n){return null==n?"":Bt(n).replace(d,L)},a.every=ot,a.find=ft,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),de(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0
|
||||
}),r},a.has=function(n,t){return n?Gt.call(n,t):!1},a.identity=kt,a.indexOf=mt,a.isArguments=J,a.isArray=ce,a.isBoolean=function(n){return!0===n||!1===n||Wt.call(n)==k},a.isDate=function(n){return n instanceof At||Wt.call(n)==x},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Wt.call(n),r=n.length;return e==j||e==I||(fe.argsClass?e==C:J(n))||e==S&&typeof r=="number"&&Z(n.splice)?!r:(de(n,function(){return t=!1}),t)},a.isEqual=Y,a.isFinite=function(n){return Zt(n)&&!ne(parseFloat(n))
|
||||
},a.isFunction=Z,a.isNaN=function(n){return tt(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=tt,a.isObject=nt,a.isPlainObject=be,a.isRegExp=function(n){return n instanceof qt||Wt.call(n)==A},a.isString=et,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ee(0,r+e):re(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=xt,a.noConflict=function(){return r._=Dt,this},a.parseInt=Jt,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Ut(ae()*((+t||0)-n+1))
|
||||
},a.reduce=st,a.reduceRight=vt,a.result=function(n,t){var r=n?n[t]:e;return Z(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:pe(n).length},a.some=gt,a.sortedIndex=bt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=ye({},r,u);var o,i=ye({},r.imports,u.imports),u=pe(i),i=ut(i),f=0,s=r.interpolate||m,g="__p+='",s=qt((r.escape||m).source+"|"+s.source+"|"+(s===h?v:m).source+"|"+(r.evaluate||m).source+"|$","g");n.replace(s,function(t,e,r,u,a,i){return r||(r=u),g+=n.slice(f,i).replace(b,z),e&&(g+="'+__e("+e+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),r&&(g+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t
|
||||
}),g+="';\n",s=r=r.variable,s||(r="obj",g="with("+r+"){"+g+"}"),g=(o?g.replace(c,""):g).replace(l,"$1").replace(p,"$1;"),g="function("+r+"){"+(s?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var y=It(u,"return "+g).apply(e,i)}catch(d){throw d.source=g,d}return t?y(t):(y.source=g,y)},a.unescape=function(n){return null==n?"":Bt(n).replace(s,H)},a.uniqueId=function(n){var t=++o;return Bt(null==n?"":n)+t
|
||||
},a.all=ot,a.any=gt,a.detect=ft,a.foldl=st,a.foldr=vt,a.include=at,a.inject=st,de(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Ht.apply(t,arguments),n.apply(a,t)})}),a.first=ht,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return G(n,ee(0,u-r))}},a.take=ht,a.head=ht,de(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return null==t||e&&typeof t!="function"?r:new M(r)})}),a.VERSION="1.1.1",a.prototype.toString=function(){return Bt(this.__wrapped__)},a.prototype.value=Ot,a.prototype.valueOf=Ot,se(["join","pop","shift"],function(n){var t=Rt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),se(["push","reverse","sort","unshift"],function(n){var t=Rt[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),se(["concat","slice","splice"],function(n){var t=Rt[n];a.prototype[n]=function(){return new M(t.apply(this.__wrapped__,arguments))
|
||||
|
||||
85
dist/lodash.js
vendored
85
dist/lodash.js
vendored
@@ -552,6 +552,7 @@
|
||||
* @param {Object} [options1, options2, ...] The compile options object(s).
|
||||
* arrays - A string of code to determine if the iterable is an array or array-like.
|
||||
* useHas - A boolean to specify using `hasOwnProperty` checks in the object loop.
|
||||
* useKeys - A boolean to specify using `_.keys` for own property iteration.
|
||||
* args - A string of comma separated arguments the iteration function will accept.
|
||||
* top - A string of code to execute before the iteration branches.
|
||||
* loop - A string of code to execute in the object loop.
|
||||
@@ -1060,7 +1061,9 @@
|
||||
* @returns {Mixed} Returns the key of the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
* _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
* return num % 2 == 0;
|
||||
* });
|
||||
* // => 'b'
|
||||
*/
|
||||
function findKey(object, callback, thisArg) {
|
||||
@@ -1334,11 +1337,8 @@
|
||||
function isEqual(a, b, callback, thisArg, stackA, stackB) {
|
||||
// used to indicate that when comparing objects, `a` has at least the properties of `b`
|
||||
var whereIndicator = callback === indicatorObject;
|
||||
if (callback && !whereIndicator) {
|
||||
callback = (typeof thisArg == 'undefined')
|
||||
? callback
|
||||
: lodash.createCallback(callback, thisArg, 2);
|
||||
|
||||
if (typeof callback == 'function' && !whereIndicator) {
|
||||
callback = lodash.createCallback(callback, thisArg, 2);
|
||||
var result = callback(a, b);
|
||||
if (typeof result != 'undefined') {
|
||||
return !!result;
|
||||
@@ -2280,7 +2280,9 @@
|
||||
* @returns {Mixed} Returns the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.find([1, 2, 3, 4], function(num) { return num % 2 == 0; });
|
||||
* _.find([1, 2, 3, 4], function(num) {
|
||||
* return num % 2 == 0;
|
||||
* });
|
||||
* // => 2
|
||||
*
|
||||
* var food = [
|
||||
@@ -4228,44 +4230,53 @@
|
||||
/**
|
||||
* 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.
|
||||
* an `options` object to indicate that `func` should be invoked on the leading
|
||||
* and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced
|
||||
* function will return the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to debounce.
|
||||
* @param {Number} wait The number of milliseconds to delay.
|
||||
* @param {Boolean} immediate A flag to indicate execution is on the leading
|
||||
* edge of the timeout.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=false] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new debounced function.
|
||||
* @example
|
||||
*
|
||||
* var lazyLayout = _.debounce(calculateLayout, 300);
|
||||
* jQuery(window).on('resize', lazyLayout);
|
||||
*/
|
||||
function debounce(func, wait, immediate) {
|
||||
function debounce(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId;
|
||||
timeoutId,
|
||||
trailing = true;
|
||||
|
||||
function delayed() {
|
||||
timeoutId = null;
|
||||
if (!immediate) {
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === true) {
|
||||
var leading = true;
|
||||
trailing = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var isImmediate = immediate && !timeoutId;
|
||||
var isLeading = leading && !timeoutId;
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(delayed, wait);
|
||||
|
||||
if (isImmediate) {
|
||||
if (isLeading) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
return result;
|
||||
@@ -4435,39 +4446,57 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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. Pass an `options` object to indicate
|
||||
* that `func` should be invoked on the leading and/or trailing edge of the
|
||||
* `wait` timeout. Subsequent calls to the throttled function will return
|
||||
* the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to throttle.
|
||||
* @param {Number} wait The number of milliseconds to throttle executions to.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=true] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new throttled function.
|
||||
* @example
|
||||
*
|
||||
* var throttled = _.throttle(updatePosition, 100);
|
||||
* jQuery(window).on('scroll', throttled);
|
||||
*/
|
||||
function throttle(func, wait) {
|
||||
function throttle(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId,
|
||||
lastCalled = 0;
|
||||
lastCalled = 0,
|
||||
leading = true,
|
||||
trailing = true;
|
||||
|
||||
function trailingCall() {
|
||||
lastCalled = new Date;
|
||||
timeoutId = null;
|
||||
result = func.apply(thisArg, args);
|
||||
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === false) {
|
||||
leading = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var now = new Date,
|
||||
remaining = wait - (now - lastCalled);
|
||||
|
||||
var now = new Date;
|
||||
if (!timeoutId && !leading) {
|
||||
lastCalled = now;
|
||||
}
|
||||
var remaining = wait - (now - lastCalled);
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
|
||||
75
dist/lodash.min.js
vendored
75
dist/lodash.min.js
vendored
@@ -4,40 +4,41 @@
|
||||
* Build: `lodash modern -o ./dist/lodash.js`
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(r){function a(n){return n&&typeof n=="object"&&!oe(n)&&Vt.call(n,"__wrapped__")?n:new P(n)}function q(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=f+n[e];(a[o]||(a[o]=[])).push(n[e])}}return function(e){if(u){var r=f+e;return a[r]&&-1<ht(a[r],e)}return-1<ht(n,e,t)}}function B(n){return n.charCodeAt(0)}function F(n,t){var e=n.b,r=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function R(n,t,e,r){function u(){var r=arguments,c=o?this:t;
|
||||
return a||(n=t[i]),e.length&&(r=r.length?(r=U(r),f?r.concat(e):e.concat(r)):e),this instanceof u?(K.prototype=n.prototype,c=new K,K.prototype=null,r=n.apply(c,r),X(r)?r:c):n.apply(c,r)}var a=W(n),o=!e,i=t;if(o){var f=r;e=t}else if(!a){if(!r)throw new Bt;t=n}return u}function T(){for(var n,t={b:"k(m)",c:"",e:"m",f:"",h:"",i:!0,j:!!ie},e=0;n=arguments[e];e++)for(var r in n)t[r]=n[r];return n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Et,r="var i,m="+t.d+",u="+t.e+";if(!m)return u;"+t.h+";",t.b&&(r+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.f+"}}else{"),t.i&&t.j?r+="var s=-1,t=r[typeof m]?o(m):[],n=t.length;while(++s<n){i=t[s];"+t.f+"}":(r+="for(i in m){",t.i&&(r+="if(",t.i&&(r+="h.call(m,i)"),r+="){"),r+=t.f+";",t.i&&(r+="}"),r+="}"),t.b&&(r+="}"),r+=t.c+";return u",e("h,j,k,l,o,p,r","return function("+n+"){"+r+"}")(Vt,G,oe,Z,ie,a,S)
|
||||
}function D(n){return"\\"+A[n]}function z(n){return fe[n]}function P(n){this.__wrapped__=n}function K(){}function M(n){var t=!1;if(!n||Lt.call(n)!=O)return t;var e=n.constructor;return(W(e)?e instanceof e:ae.nodeClass||!isNode(n))?(se(n,function(n,e){t=e}),!1===t||Vt.call(n,t)):t}function U(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=xt(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function V(n){return ce[n]}function G(n){return Lt.call(n)==k}function H(n,t,r,u,o,i){var f=n;
|
||||
if(typeof t=="function"&&(u=r,r=t,t=!1),typeof r=="function"){if(r=typeof u=="undefined"?r:a.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;f=n}if(u=X(f)){var c=Lt.call(f);if(!I[c])return f;var l=oe(f)}if(!u||!t)return u?l?U(f):le({},f):f;switch(u=ue[c],c){case j:case C:return new u(+f);case x:case E:return new u(f);case N:return u(f.source,g.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Vt.call(n,"index")&&(f.index=n.index),Vt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?ot:ve)(n,function(n,u){f[u]=H(n,t,r,e,o,i)
|
||||
}),f}function J(n){var t=[];return se(n,function(n,e){W(n)&&t.push(e)}),t.sort()}function L(n){for(var t=-1,e=ie(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Q(n,t,e,r,u,o){var f=e===i;if(e&&!f){e=typeof r=="undefined"?e:a.createCallback(e,r,2);var c=e(n,t);if(typeof c!="undefined")return!!c}if(n===t)return 0!==n||1/n==1/t;var l=typeof n,p=typeof t;if(n===n&&(!n||"function"!=l&&"object"!=l)&&(!t||"function"!=p&&"object"!=p))return!1;if(null==n||null==t)return n===t;if(p=Lt.call(n),l=Lt.call(t),p==k&&(p=O),l==k&&(l=O),p!=l)return!1;
|
||||
switch(p){case j:case C:return+n==+t;case x:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case N:case E:return n==qt(t)}if(l=p==w,!l){if(Vt.call(n,"__wrapped__")||Vt.call(t,"__wrapped__"))return Q(n.__wrapped__||n,t.__wrapped__||t,e,r,u,o);if(p!=O)return!1;var p=n.constructor,s=t.constructor;if(p!=s&&(!W(p)||!(p instanceof p&&W(s)&&s instanceof s)))return!1}for(u||(u=[]),o||(o=[]),p=u.length;p--;)if(u[p]==n)return o[p]==t;var v=0,c=!0;if(u.push(n),o.push(t),l){if(p=n.length,v=t.length,c=v==n.length,!c&&!f)return c;
|
||||
for(;v--;)if(l=p,s=t[v],f)for(;l--&&!(c=Q(n[l],s,e,r,u,o)););else if(!(c=Q(n[v],s,e,r,u,o)))break;return c}return se(t,function(t,a,i){return Vt.call(i,a)?(v++,c=Vt.call(n,a)&&Q(n[a],t,e,r,u,o)):void 0}),c&&!f&&se(n,function(n,t,e){return Vt.call(e,t)?c=-1<--v:void 0}),c}function W(n){return typeof n=="function"}function X(n){return n?S[typeof n]:!1}function Y(n){return typeof n=="number"||Lt.call(n)==x}function Z(n){return typeof n=="string"||Lt.call(n)==E}function nt(n,t,e){var r=arguments,u=0,o=2;
|
||||
if(!X(n))return n;if(e===i)var f=r[3],c=r[4],l=r[5];else c=[],l=[],typeof e!="number"&&(o=r.length),3<o&&"function"==typeof r[o-2]?f=a.createCallback(r[--o-1],r[o--],2):2<o&&"function"==typeof r[o-1]&&(f=r[--o]);for(;++u<o;)(oe(r[u])?ot:ve)(r[u],function(t,e){var r,u,a=t,o=n[e];if(t&&((u=oe(t))||ge(t))){for(a=c.length;a--;)if(r=c[a]==t){o=l[a];break}if(!r){var p,o=u?oe(o)?o:[]:ge(o)?o:{};f&&(a=f(o,t),p=typeof a!="undefined")&&(o=a),c.push(t),l.push(o),p||(o=nt(o,t,i,f,c,l))}}else f&&(a=f(o,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(o=a);
|
||||
n[e]=o});return n}function tt(n){for(var t=-1,e=ie(n),r=e.length,u=xt(r);++t<r;)u[t]=n[e[t]];return u}function et(n,t,e){var r=-1,u=n?n.length:0,a=!1;return e=(0>e?ne(0,u+e):e)||0,typeof u=="number"?a=-1<(Z(n)?n.indexOf(t,e):ht(n,t,e)):ve(n,function(n){return++r<e?void 0:!(a=n===t)}),a}function rt(n,t,e){var r=!0;t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&(r=!!t(n[e],e,n)););else ve(n,function(n,e,u){return r=!!t(n,e,u)});return r}function ut(n,t,e){var r=[];
|
||||
t=a.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var o=n[e];t(o,e,n)&&r.push(o)}else ve(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function at(n,t,e){t=a.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return ve(n,function(n,e,r){return t(n,e,r)?(u=n,!1):void 0}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function ot(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:a.createCallback(t,e),typeof u=="number")for(;++r<u&&!1!==t(n[r],r,n););else ve(n,t);
|
||||
return n}function it(n,t,e){var r=-1,u=n?n.length:0;if(t=a.createCallback(t,e),typeof u=="number")for(var o=xt(u);++r<u;)o[r]=t(n[r],r,n);else o=[],ve(n,function(n,e,u){o[++r]=t(n,e,u)});return o}function ft(n,t,e){var r=-1/0,u=r;if(!t&&oe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i>u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ot(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function ct(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=xt(r);++e<r;)u[e]=n[e][t];return u||it(n,t)
|
||||
}function lt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=a.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else ve(n,function(n,r,a){e=u?(u=!1,n):t(e,n,r,a)});return e}function pt(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;if(typeof u!="number")var i=ie(n),u=i.length;return t=a.createCallback(t,r,4),ot(n,function(r,a,f){a=i?i[--u]:--u,e=o?(o=!1,n[a]):t(e,n[a],a,f)}),e}function st(n,t,e){var r;t=a.createCallback(t,e),e=-1;var u=n?n.length:0;
|
||||
if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else ve(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function vt(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=-1;for(t=a.createCallback(t,e);++o<u&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[0];return U(n,0,te(ne(0,r),u))}}function gt(n,t,e,r){var u=-1,o=n?n.length:0,i=[];for(typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1),null!=e&&(e=a.createCallback(e,r));++u<o;)r=n[u],e&&(r=e(r,u,n)),oe(r)?Gt.apply(i,t?r:gt(r)):i.push(r);
|
||||
return i}function ht(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ne(0,u+e):e||0)-1;else if(e)return r=mt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function yt(n,t,e){if(typeof t!="number"&&null!=t){var r=0,u=-1,o=n?n.length:0;for(t=a.createCallback(t,e);++u<o&&t(n[u],u,n);)r++}else r=null==t||e?1:ne(0,t);return U(n,r)}function mt(n,t,e,r){var u=0,o=n?n.length:u;for(e=e?a.createCallback(e,r,1):wt,t=e(t);u<o;)r=u+o>>>1,e(n[r])<t?u=r+1:o=r;return u}function bt(n,t,e,r){var u=-1,o=n?n.length:0,i=[],c=i;
|
||||
typeof t!="boolean"&&null!=t&&(r=e,e=t,t=!1);var l=!t&&75<=o;if(l)var p={};for(null!=e&&(c=[],e=a.createCallback(e,r));++u<o;){r=n[u];var s=e?e(r,u,n):r;if(l)var v=f+s,v=p[v]?!(c=p[v]):c=p[v]=[];(t?!u||c[c.length-1]!==s:v||0>ht(c,s))&&((e||l)&&c.push(s),i.push(r))}return i}function dt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];t?u[a]=t[e]:u[a[0]]=a[1]}return u}function _t(n,t){return ae.fastBind||Qt&&2<arguments.length?Qt.call.apply(Qt,arguments):R(n,t,U(arguments,2))}function kt(n){var t=U(arguments,1);
|
||||
return Jt(function(){n.apply(e,t)},1)}function wt(n){return n}function jt(n){ot(J(n),function(t){var e=a[t]=n[t];a.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Gt.apply(t,arguments),t=e.apply(a,t),n&&typeof n=="object"&&n==t?this:new P(t)}})}function Ct(){return this.__wrapped__}r=r?$.defaults(n.Object(),r,$.pick(n,_)):n;var xt=r.Array,Ot=r.Boolean,Nt=r.Date,Et=r.Function,It=r.Math,St=r.Number,At=r.Object,$t=r.RegExp,qt=r.String,Bt=r.TypeError,Ft=xt(),Rt=At(),Tt=r._,Dt=$t("^"+qt(Rt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),zt=It.ceil,Pt=r.clearTimeout,Kt=Ft.concat,Mt=It.floor,Ut=Dt.test(Ut=At.getPrototypeOf)&&Ut,Vt=Rt.hasOwnProperty,Gt=Ft.push,Ht=r.setImmediate,Jt=r.setTimeout,Lt=Rt.toString,Qt=Dt.test(Qt=Lt.bind)&&Qt,Wt=Dt.test(Wt=xt.isArray)&&Wt,Xt=r.isFinite,Yt=r.isNaN,Zt=Dt.test(Zt=At.keys)&&Zt,ne=It.max,te=It.min,ee=r.parseInt,re=It.random,It=Dt.test(r.attachEvent),It=Qt&&!/\n|true/.test(Qt+It),ue={};
|
||||
ue[w]=xt,ue[j]=Ot,ue[C]=Nt,ue[O]=At,ue[x]=St,ue[N]=$t,ue[E]=qt;var ae=a.support={};ae.fastBind=Qt&&!It,a.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:h,variable:"",imports:{_:a}},Ot={a:"q,w,g",h:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",f:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},St={a:"e,d,x",h:"d=d&&typeof x=='undefined'?d:p.createCallback(d,x)",b:!1,f:"if(d(m[i],i,e)===false)return u"},At={h:"if(!r[typeof m])return u;"+St.h,b:!1},P.prototype=a.prototype;
|
||||
var oe=Wt||function(n){return n instanceof xt||Lt.call(n)==w},Wt=T({a:"q",e:"[]",h:"if(!(r[typeof q]))return u",f:"u.push(i)",b:!1}),ie=Zt?function(n){return X(n)?Zt(n):[]}:Wt,fe={"&":"&","<":"<",">":">",'"':""","'":"'"},ce=L(fe),le=T(Ot,{h:Ot.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=p.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),f:"u[i]=d?d(u[i],m[i]):m[i]"}),pe=T(Ot),se=T(St,At,{i:!1}),ve=T(St,At),ge=function(n){if(!n||Lt.call(n)!=O)return!1;
|
||||
var t=n.valueOf,e=typeof t=="function"&&(e=Ut(t))&&Ut(e);return e?n==e||Ut(n)==e:M(n)};return It&&u&&typeof Ht=="function"&&(kt=_t(Ht,r)),Ht=8==ee("08")?ee:function(n,t){return ee(Z(n)?n.replace(y,""):n,t||0)},a.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},a.assign=le,a.at=function(n){for(var t=-1,e=Kt.apply(Ft,U(arguments,1)),r=e.length,u=xt(r);++t<r;)u[t]=n[e[t]];return u},a.bind=_t,a.bindAll=function(n){for(var t=Kt.apply(Ft,arguments),e=1<t.length?0:(t=J(n),-1),r=t.length;++e<r;){var u=t[e];
|
||||
n[u]=_t(n[u],n)}return n},a.bindKey=function(n,t){return R(n,t,U(arguments,2),i)},a.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)}return r},a.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},a.countBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=qt(t(n,e,u)),Vt.call(r,e)?r[e]++:r[e]=1}),r},a.createCallback=function(n,t,e){if(null==n)return wt;var r=typeof n;
|
||||
if("function"!=r){if("object"!=r)return function(t){return t[n]};var u=ie(n);return function(t){for(var e=u.length,r=!1;e--&&(r=Q(t[u[e]],n[u[e]],i)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},a.debounce=function(n,t,e){function r(){i=null,e||(a=n.apply(o,u))}var u,a,o,i;return function(){var f=e&&!i;return u=arguments,o=this,Pt(i),i=Jt(r,t),f&&(a=n.apply(o,u)),a
|
||||
}},a.defaults=pe,a.defer=kt,a.delay=function(n,t){var r=U(arguments,2);return Jt(function(){n.apply(e,r)},t)},a.difference=function(n){for(var t=-1,e=n?n.length:0,r=Kt.apply(Ft,arguments),r=q(r,e,100),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.filter=ut,a.flatten=gt,a.forEach=ot,a.forIn=se,a.forOwn=ve,a.functions=J,a.groupBy=function(n,t,e){var r={};return t=a.createCallback(t,e),ot(n,function(n,e,u){e=qt(t(n,e,u)),(Vt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},a.initial=function(n,t,e){if(!n)return[];
|
||||
var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=null==t||e?1:t||r;return U(n,0,te(ne(0,u-r),u))},a.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],c=i;n:for(;++u<a;){var l=n[u];if(o)var p=f+l,p=r[0][p]?!(c=r[0][p]):c=r[0][p]=[];if(p||0>ht(c,l)){o&&c.push(l);for(var s=e;--s;)if(!(r[s]||(r[s]=q(t[s],0,100)))(l))continue n;i.push(l)}}return i},a.invert=L,a.invoke=function(n,t){var e=U(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=xt(typeof a=="number"?a:0);
|
||||
return ot(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},a.keys=ie,a.map=it,a.max=ft,a.memoize=function(n,t){var e={};return function(){var r=f+(t?t.apply(this,arguments):arguments[0]);return Vt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},a.merge=nt,a.min=function(n,t,e){var r=1/0,u=r;if(!t&&oe(n)){e=-1;for(var o=n.length;++e<o;){var i=n[e];i<u&&(u=i)}}else t=!t&&Z(n)?B:a.createCallback(t,e),ot(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},a.omit=function(n,t,e){var r=typeof t=="function",u={};
|
||||
if(r)t=a.createCallback(t,e);else var o=Kt.apply(Ft,arguments);return se(n,function(n,e,a){(r?!t(n,e,a):0>ht(o,e,1))&&(u[e]=n)}),u},a.once=function(n){var t,e;return function(){return t?e:(t=!0,e=n.apply(this,arguments),n=null,e)}},a.pairs=function(n){for(var t=-1,e=ie(n),r=e.length,u=xt(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},a.partial=function(n){return R(n,U(arguments,1))},a.partialRight=function(n){return R(n,U(arguments,1),null,i)},a.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,o=Kt.apply(Ft,arguments),i=X(n)?o.length:0;++u<i;){var f=o[u];
|
||||
f in n&&(r[f]=n[f])}else t=a.createCallback(t,e),se(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},a.pluck=ct,a.range=function(n,t,e){n=+n||0,e=+e||1,null==t&&(t=n,n=0);var r=-1;t=ne(0,zt((t-n)/e));for(var u=xt(t);++r<t;)u[r]=n,n+=e;return u},a.reject=function(n,t,e){return t=a.createCallback(t,e),ut(n,function(n,e,r){return!t(n,e,r)})},a.rest=yt,a.shuffle=function(n){var t=-1,e=n?n.length:0,r=xt(typeof e=="number"?e:0);return ot(n,function(n){var e=Mt(re()*(++t+1));r[t]=r[e],r[e]=n}),r},a.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,o=xt(typeof u=="number"?u:0);
|
||||
for(t=a.createCallback(t,e),ot(n,function(n,e,u){o[++r]={a:t(n,e,u),b:r,c:n}}),u=o.length,o.sort(F);u--;)o[u]=o[u].c;return o},a.tap=function(n,t){return t(n),n},a.throttle=function(n,t){function e(){i=new Nt,o=null,u=n.apply(a,r)}var r,u,a,o,i=0;return function(){var f=new Nt,c=t-(f-i);return r=arguments,a=this,0<c?o||(o=Jt(e,c)):(Pt(o),o=null,i=f,u=n.apply(a,r)),u}},a.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=xt(n);for(t=a.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},a.toArray=function(n){return n&&typeof n.length=="number"?U(n):tt(n)
|
||||
},a.union=function(){return bt(Kt.apply(Ft,arguments))},a.uniq=bt,a.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?ft(ct(n,"length")):0,u=xt(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=xt(e)))[t]=o[a];return u},a.values=tt,a.where=ut,a.without=function(n){for(var t=-1,e=n?n.length:0,r=q(arguments,1,30),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},a.wrap=function(n,t){return function(){var e=[n];return Gt.apply(e,arguments),t.apply(this,e)}},a.zip=function(n){for(var t=-1,e=n?ft(ct(arguments,"length")):0,r=xt(e);++t<e;)r[t]=ct(arguments,t);
|
||||
return r},a.zipObject=dt,a.collect=it,a.drop=yt,a.each=ot,a.extend=le,a.methods=J,a.object=dt,a.select=ut,a.tail=yt,a.unique=bt,jt(a),a.clone=H,a.cloneDeep=function(n,t,e){return H(n,!0,t,e)},a.contains=et,a.escape=function(n){return null==n?"":qt(n).replace(b,z)},a.every=rt,a.find=at,a.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=a.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},a.findKey=function(n,t,e){var r;return t=a.createCallback(t,e),ve(n,function(n,e,u){return t(n,e,u)?(r=e,!1):void 0
|
||||
}),r},a.has=function(n,t){return n?Vt.call(n,t):!1},a.identity=wt,a.indexOf=ht,a.isArguments=G,a.isArray=oe,a.isBoolean=function(n){return!0===n||!1===n||Lt.call(n)==j},a.isDate=function(n){return n instanceof Nt||Lt.call(n)==C},a.isElement=function(n){return n?1===n.nodeType:!1},a.isEmpty=function(n){var t=!0;if(!n)return t;var e=Lt.call(n),r=n.length;return e==w||e==E||e==k||e==O&&typeof r=="number"&&W(n.splice)?!r:(ve(n,function(){return t=!1}),t)},a.isEqual=Q,a.isFinite=function(n){return Xt(n)&&!Yt(parseFloat(n))
|
||||
},a.isFunction=W,a.isNaN=function(n){return Y(n)&&n!=+n},a.isNull=function(n){return null===n},a.isNumber=Y,a.isObject=X,a.isPlainObject=ge,a.isRegExp=function(n){return n instanceof $t||Lt.call(n)==N},a.isString=Z,a.isUndefined=function(n){return typeof n=="undefined"},a.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ne(0,r+e):te(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},a.mixin=jt,a.noConflict=function(){return r._=Tt,this},a.parseInt=Ht,a.random=function(n,t){return null==n&&null==t&&(t=1),n=+n||0,null==t&&(t=n,n=0),n+Mt(re()*((+t||0)-n+1))
|
||||
},a.reduce=lt,a.reduceRight=pt,a.result=function(n,t){var r=n?n[t]:e;return W(r)?n[t]():r},a.runInContext=t,a.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:ie(n).length},a.some=st,a.sortedIndex=mt,a.template=function(n,t,r){var u=a.templateSettings;n||(n=""),r=pe({},r,u);var o,i=pe({},r.imports,u.imports),u=ie(i),i=tt(i),f=0,s=r.interpolate||m,g="__p+='",s=$t((r.escape||m).source+"|"+s.source+"|"+(s===h?v:m).source+"|"+(r.evaluate||m).source+"|$","g");n.replace(s,function(t,e,r,u,a,i){return r||(r=u),g+=n.slice(f,i).replace(d,D),e&&(g+="'+__e("+e+")+'"),a&&(o=!0,g+="';"+a+";__p+='"),r&&(g+="'+((__t=("+r+"))==null?'':__t)+'"),f=i+t.length,t
|
||||
}),g+="';\n",s=r=r.variable,s||(r="obj",g="with("+r+"){"+g+"}"),g=(o?g.replace(c,""):g).replace(l,"$1").replace(p,"$1;"),g="function("+r+"){"+(s?"":r+"||("+r+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+g+"return __p}";try{var y=Et(u,"return "+g).apply(e,i)}catch(b){throw b.source=g,b}return t?y(t):(y.source=g,y)},a.unescape=function(n){return null==n?"":qt(n).replace(s,V)},a.uniqueId=function(n){var t=++o;return qt(null==n?"":n)+t
|
||||
},a.all=rt,a.any=st,a.detect=at,a.foldl=lt,a.foldr=pt,a.include=et,a.inject=lt,ve(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(){var t=[this.__wrapped__];return Gt.apply(t,arguments),n.apply(a,t)})}),a.first=vt,a.last=function(n,t,e){if(n){var r=0,u=n.length;if(typeof t!="number"&&null!=t){var o=u;for(t=a.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,null==r||e)return n[u-1];return U(n,ne(0,u-r))}},a.take=vt,a.head=vt,ve(a,function(n,t){a.prototype[t]||(a.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return null==t||e&&typeof t!="function"?r:new P(r)})}),a.VERSION="1.1.1",a.prototype.toString=function(){return qt(this.__wrapped__)},a.prototype.value=Ct,a.prototype.valueOf=Ct,ot(["join","pop","shift"],function(n){var t=Ft[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),ot(["push","reverse","sort","unshift"],function(n){var t=Ft[n];a.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),ot(["concat","slice","splice"],function(n){var t=Ft[n];a.prototype[n]=function(){return new P(t.apply(this.__wrapped__,arguments))
|
||||
}}),a}var e,r=typeof exports=="object"&&exports,u=typeof module=="object"&&module&&module.exports==r&&module,a=typeof global=="object"&&global;(a.global===a||a.window===a)&&(n=a);var o=0,i={},f=+new Date+"",c=/\b__p\+='';/g,l=/\b(__p\+=)''\+/g,p=/(__e\(.*?\)|\b__t\))\+'';/g,s=/&(?:amp|lt|gt|quot|#39);/g,v=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,g=/\w*$/,h=/<%=([\s\S]+?)%>/g,y=/^0+(?=.$)/,m=/($^)/,b=/[&<>"']/g,d=/['\n\r\t\u2028\u2029\\]/g,_="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),k="[object Arguments]",w="[object Array]",j="[object Boolean]",C="[object Date]",x="[object Number]",O="[object Object]",N="[object RegExp]",E="[object String]",I={"[object Function]":!1};
|
||||
I[k]=I[w]=I[j]=I[C]=I[x]=I[O]=I[N]=I[E]=!0;var S={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},A={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},$=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=$,define(function(){return $})):r&&!r.nodeType?u?(u.exports=$)._=$:r._=$:n._=$})(this);
|
||||
;(function(n){function t(o){function f(n){if(!n||Yt.call(n)!=I)return a;var t=n.valueOf,e=typeof t=="function"&&(e=Jt(t))&&Jt(e);return e?n==e||Jt(n)==e:H(n)}function R(n){return n&&typeof n=="object"&&!le(n)&&Lt.call(n,"__wrapped__")?n:new V(n)}function T(n,t,e){var r=n.length,u=r-t>=e;if(u){var a={};for(e=t-1;++e<r;){var o=p+n[e];(a[o]||(a[o]=[])).push(n[e])}}return function(e){if(u){var r=p+e;return a[r]&&-1<dt(a[r],e)}return-1<dt(n,e,t)}}function D(n){return n.charCodeAt(0)}function z(n,t){var e=n.b,r=t.b;
|
||||
if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return e<r?-1:1}function P(n,t,e,r){function a(){var r=arguments,l=i?this:t;return o||(n=t[f]),e.length&&(r=r.length?(r=J(r),c?r.concat(e):e.concat(r)):e),this instanceof a?(G.prototype=n.prototype,l=new G,G.prototype=u,r=n.apply(l,r),tt(r)?r:l):n.apply(l,r)}var o=nt(n),i=!e,f=t;if(i){var c=r;e=t}else if(!o){if(!r)throw new Dt;t=n}return a}function K(){for(var n,t={b:"k(m)",c:"",e:"m",f:"",h:"",i:r,j:!!pe},e=0;n=arguments[e];e++)for(var u in n)t[u]=n[u];
|
||||
return n=t.a,t.d=/^[^,]+/.exec(n)[0],e="var i,m="+t.d+",u="+t.e+";if(!m)return u;"+t.h+";",t.b&&(e+="var n=m.length;i=-1;if("+t.b+"){while(++i<n){"+t.f+"}}else{"),t.i&&t.j?e+="var s=-1,t=r[typeof m]?o(m):[],n=t.length;while(++s<n){i=t[s];"+t.f+"}":(e+="for(i in m){",t.i&&(e+="if(",t.i&&(e+="h.call(m,i)"),e+="){"),e+=t.f+";",t.i&&(e+="}"),e+="}"),t.b&&(e+="}"),e+=t.c+";return u",$t("h,j,k,l,o,p,r","return function("+n+"){"+e+"}")(Lt,Q,le,rt,pe,R,q)}function M(n){return"\\"+B[n]}function U(n){return se[n]
|
||||
}function V(n){this.__wrapped__=n}function G(){}function H(n){var t=a;if(!n||Yt.call(n)!=I)return t;var e=n.constructor;return(nt(e)?e instanceof e:ce.nodeClass||!isNode(n))?(ye(n,function(n,e){t=e}),t===a||Lt.call(n,t)):t}function J(n,t,e){t||(t=0),typeof e=="undefined"&&(e=n?n.length:0);var r=-1;e=e-t||0;for(var u=It(0>e?0:e);++r<e;)u[r]=n[t+r];return u}function L(n){return ve[n]}function Q(n){return Yt.call(n)==C}function W(n,t,r,u,o,i){var f=n;if(typeof t=="function"&&(u=r,r=t,t=a),typeof r=="function"){if(r=typeof u=="undefined"?r:R.createCallback(r,u,1),f=r(f),typeof f!="undefined")return f;
|
||||
f=n}if(u=tt(f)){var c=Yt.call(f);if(!$[c])return f;var l=le(f)}if(!u||!t)return u?l?J(f):ge({},f):f;switch(u=fe[c],c){case O:case N:return new u(+f);case E:case A:return new u(f);case S:return u(f.source,m.exec(f))}for(o||(o=[]),i||(i=[]),c=o.length;c--;)if(o[c]==n)return i[c];return f=l?u(f.length):{},l&&(Lt.call(n,"index")&&(f.index=n.index),Lt.call(n,"input")&&(f.input=n.input)),o.push(n),i.push(f),(l?lt:me)(n,function(n,u){f[u]=W(n,t,r,e,o,i)}),f}function X(n){var t=[];return ye(n,function(n,e){nt(n)&&t.push(e)
|
||||
}),t.sort()}function Y(n){for(var t=-1,e=pe(n),r=e.length,u={};++t<r;){var a=e[t];u[n[a]]=a}return u}function Z(n,t,e,o,i,f){var c=e===l;if(typeof e=="function"&&!c){e=R.createCallback(e,o,2);var p=e(n,t);if(typeof p!="undefined")return!!p}if(n===t)return 0!==n||1/n==1/t;var s=typeof n,v=typeof t;if(n===n&&(!n||"function"!=s&&"object"!=s)&&(!t||"function"!=v&&"object"!=v))return a;if(n==u||t==u)return n===t;if(v=Yt.call(n),s=Yt.call(t),v==C&&(v=I),s==C&&(s=I),v!=s)return a;switch(v){case O:case N:return+n==+t;
|
||||
case E:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case S:case A:return n==Tt(t)}if(s=v==x,!s){if(Lt.call(n,"__wrapped__")||Lt.call(t,"__wrapped__"))return Z(n.__wrapped__||n,t.__wrapped__||t,e,o,i,f);if(v!=I)return a;var v=n.constructor,g=t.constructor;if(v!=g&&(!nt(v)||!(v instanceof v&&nt(g)&&g instanceof g)))return a}for(i||(i=[]),f||(f=[]),v=i.length;v--;)if(i[v]==n)return f[v]==t;var h=0,p=r;if(i.push(n),f.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=Z(n[s],g,e,o,i,f)););else if(!(p=Z(n[h],g,e,o,i,f)))break;
|
||||
return p}return ye(t,function(t,r,u){return Lt.call(u,r)?(h++,p=Lt.call(n,r)&&Z(n[r],t,e,o,i,f)):void 0}),p&&!c&&ye(n,function(n,t,e){return Lt.call(e,t)?p=-1<--h:void 0}),p}function nt(n){return typeof n=="function"}function tt(n){return n?q[typeof n]:a}function et(n){return typeof n=="number"||Yt.call(n)==E}function rt(n){return typeof n=="string"||Yt.call(n)==A}function ut(n,t,e){var r=arguments,u=0,a=2;if(!tt(n))return n;if(e===l)var o=r[3],i=r[4],c=r[5];else i=[],c=[],typeof e!="number"&&(a=r.length),3<a&&"function"==typeof r[a-2]?o=R.createCallback(r[--a-1],r[a--],2):2<a&&"function"==typeof r[a-1]&&(o=r[--a]);
|
||||
for(;++u<a;)(le(r[u])?lt:me)(r[u],function(t,e){var r,u,a=t,p=n[e];if(t&&((u=le(t))||f(t))){for(a=i.length;a--;)if(r=i[a]==t){p=c[a];break}if(!r){var s,p=u?le(p)?p:[]:f(p)?p:{};o&&(a=o(p,t),s=typeof a!="undefined")&&(p=a),i.push(t),c.push(p),s||(p=ut(p,t,l,o,i,c))}}else o&&(a=o(p,t),typeof a=="undefined"&&(a=t)),typeof a!="undefined"&&(p=a);n[e]=p});return n}function at(n){for(var t=-1,e=pe(n),r=e.length,u=It(r);++t<r;)u[t]=n[e[t]];return u}function ot(n,t,e){var r=-1,u=n?n.length:0,o=a;return e=(0>e?ue(0,u+e):e)||0,typeof u=="number"?o=-1<(rt(n)?n.indexOf(t,e):dt(n,t,e)):me(n,function(n){return++r<e?void 0:!(o=n===t)
|
||||
}),o}function it(n,t,e){var u=r;t=R.createCallback(t,e),e=-1;var a=n?n.length:0;if(typeof a=="number")for(;++e<a&&(u=!!t(n[e],e,n)););else me(n,function(n,e,r){return u=!!t(n,e,r)});return u}function ft(n,t,e){var r=[];t=R.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u;){var a=n[e];t(a,e,n)&&r.push(a)}else me(n,function(n,e,u){t(n,e,u)&&r.push(n)});return r}function ct(n,t,e){t=R.createCallback(t,e),e=-1;var r=n?n.length:0;if(typeof r!="number"){var u;return me(n,function(n,e,r){return t(n,e,r)?(u=n,a):void 0
|
||||
}),u}for(;++e<r;){var o=n[e];if(t(o,e,n))return o}}function lt(n,t,e){var r=-1,u=n?n.length:0;if(t=t&&typeof e=="undefined"?t:R.createCallback(t,e),typeof u=="number")for(;++r<u&&t(n[r],r,n)!==a;);else me(n,t);return n}function pt(n,t,e){var r=-1,u=n?n.length:0;if(t=R.createCallback(t,e),typeof u=="number")for(var a=It(u);++r<u;)a[r]=t(n[r],r,n);else a=[],me(n,function(n,e,u){a[++r]=t(n,e,u)});return a}function st(n,t,e){var r=-1/0,u=r;if(!t&&le(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o>u&&(u=o)
|
||||
}}else t=!t&&rt(n)?D:R.createCallback(t,e),lt(n,function(n,e,a){e=t(n,e,a),e>r&&(r=e,u=n)});return u}function vt(n,t){var e=-1,r=n?n.length:0;if(typeof r=="number")for(var u=It(r);++e<r;)u[e]=n[e][t];return u||pt(n,t)}function gt(n,t,e,r){if(!n)return e;var u=3>arguments.length;t=R.createCallback(t,r,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(e=n[++o]);++o<i;)e=t(e,n[o],o,n);else me(n,function(n,r,o){e=u?(u=a,n):t(e,n,r,o)});return e}function ht(n,t,e,r){var u=n?n.length:0,o=3>arguments.length;
|
||||
if(typeof u!="number")var i=pe(n),u=i.length;return t=R.createCallback(t,r,4),lt(n,function(r,f,c){f=i?i[--u]:--u,e=o?(o=a,n[f]):t(e,n[f],f,c)}),e}function yt(n,t,e){var r;t=R.createCallback(t,e),e=-1;var u=n?n.length:0;if(typeof u=="number")for(;++e<u&&!(r=t(n[e],e,n)););else me(n,function(n,e,u){return!(r=t(n,e,u))});return!!r}function mt(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=-1;for(t=R.createCallback(t,e);++o<a&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[0];return J(n,0,ae(ue(0,r),a))
|
||||
}}function bt(n,t,e,r){var o=-1,i=n?n.length:0,f=[];for(typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a),e!=u&&(e=R.createCallback(e,r));++o<i;)r=n[o],e&&(r=e(r,o,n)),le(r)?Qt.apply(f,t?r:bt(r)):f.push(r);return f}function dt(n,t,e){var r=-1,u=n?n.length:0;if(typeof e=="number")r=(0>e?ue(0,u+e):e||0)-1;else if(e)return r=kt(n,t),n[r]===t?r:-1;for(;++r<u;)if(n[r]===t)return r;return-1}function _t(n,t,e){if(typeof t!="number"&&t!=u){var r=0,a=-1,o=n?n.length:0;for(t=R.createCallback(t,e);++a<o&&t(n[a],a,n);)r++
|
||||
}else r=t==u||e?1:ue(0,t);return J(n,r)}function kt(n,t,e,r){var u=0,a=n?n.length:u;for(e=e?R.createCallback(e,r,1):Ot,t=e(t);u<a;)r=u+a>>>1,e(n[r])<t?u=r+1:a=r;return u}function wt(n,t,e,r){var o=-1,i=n?n.length:0,f=[],c=f;typeof t!="boolean"&&t!=u&&(r=e,e=t,t=a);var l=!t&&75<=i;if(l)var s={};for(e!=u&&(c=[],e=R.createCallback(e,r));++o<i;){r=n[o];var v=e?e(r,o,n):r;if(l)var g=p+v,g=s[g]?!(c=s[g]):c=s[g]=[];(t?!o||c[c.length-1]!==v:g||0>dt(c,v))&&((e||l)&&c.push(v),f.push(r))}return f}function jt(n,t){for(var e=-1,r=n?n.length:0,u={};++e<r;){var a=n[e];
|
||||
t?u[a]=t[e]:u[a[0]]=a[1]}return u}function Ct(n,t){return ce.fastBind||Zt&&2<arguments.length?Zt.call.apply(Zt,arguments):P(n,t,J(arguments,2))}function xt(n){var t=J(arguments,1);return Xt(function(){n.apply(e,t)},1)}function Ot(n){return n}function Nt(n){lt(X(n),function(t){var e=R[t]=n[t];R.prototype[t]=function(){var n=this.__wrapped__,t=[n];return Qt.apply(t,arguments),t=e.apply(R,t),n&&typeof n=="object"&&n==t?this:new V(t)}})}function Et(){return this.__wrapped__}o=o?F.defaults(n.Object(),o,F.pick(n,j)):n;
|
||||
var It=o.Array,St=o.Boolean,At=o.Date,$t=o.Function,qt=o.Math,Bt=o.Number,Ft=o.Object,Rt=o.RegExp,Tt=o.String,Dt=o.TypeError,zt=It(),Pt=Ft(),Kt=o._,Mt=Rt("^"+Tt(Pt.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),Ut=qt.ceil,Vt=o.clearTimeout,Gt=zt.concat,Ht=qt.floor,Jt=Mt.test(Jt=Ft.getPrototypeOf)&&Jt,Lt=Pt.hasOwnProperty,Qt=zt.push,Wt=o.setImmediate,Xt=o.setTimeout,Yt=Pt.toString,Zt=Mt.test(Zt=Yt.bind)&&Zt,ne=Mt.test(ne=It.isArray)&&ne,te=o.isFinite,ee=o.isNaN,re=Mt.test(re=Ft.keys)&&re,ue=qt.max,ae=qt.min,oe=o.parseInt,ie=qt.random,qt=Mt.test(o.attachEvent),qt=Zt&&!/\n|true/.test(Zt+qt),fe={};
|
||||
fe[x]=It,fe[O]=St,fe[N]=At,fe[I]=Ft,fe[E]=Bt,fe[S]=Rt,fe[A]=Tt;var ce=R.support={};ce.fastBind=Zt&&!qt,R.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:b,variable:"",imports:{_:R}},St={a:"q,w,g",h:"var a=arguments,b=0,c=typeof g=='number'?2:a.length;while(++b<c){m=a[b];if(m&&r[typeof m]){",f:"if(typeof u[i]=='undefined')u[i]=m[i]",c:"}}"},Bt={a:"e,d,x",h:"d=d&&typeof x=='undefined'?d:p.createCallback(d,x)",b:a,f:"if(d(m[i],i,e)===false)return u"},Ft={h:"if(!r[typeof m])return u;"+Bt.h,b:a},V.prototype=R.prototype;
|
||||
var le=ne||function(n){return n instanceof It||Yt.call(n)==x},ne=K({a:"q",e:"[]",h:"if(!(r[typeof q]))return u",f:"u.push(i)",b:a}),pe=re?function(n){return tt(n)?re(n):[]}:ne,se={"&":"&","<":"<",">":">",'"':""","'":"'"},ve=Y(se),ge=K(St,{h:St.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=p.createCallback(a[--c-1],a[c--],2);}else if(c>2&&typeof a[c-1]=='function'){d=a[--c];}"),f:"u[i]=d?d(u[i],m[i]):m[i]"}),he=K(St),ye=K(Bt,Ft,{i:a}),me=K(Bt,Ft);return qt&&i&&typeof Wt=="function"&&(xt=Ct(Wt,o)),Wt=8==oe("08")?oe:function(n,t){return oe(rt(n)?n.replace(d,""):n,t||0)
|
||||
},R.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},R.assign=ge,R.at=function(n){for(var t=-1,e=Gt.apply(zt,J(arguments,1)),r=e.length,u=It(r);++t<r;)u[t]=n[e[t]];return u},R.bind=Ct,R.bindAll=function(n){for(var t=Gt.apply(zt,arguments),e=1<t.length?0:(t=X(n),-1),r=t.length;++e<r;){var u=t[e];n[u]=Ct(n[u],n)}return n},R.bindKey=function(n,t){return P(n,t,J(arguments,2),l)},R.compact=function(n){for(var t=-1,e=n?n.length:0,r=[];++t<e;){var u=n[t];u&&r.push(u)
|
||||
}return r},R.compose=function(){var n=arguments;return function(){for(var t=arguments,e=n.length;e--;)t=[n[e].apply(this,t)];return t[0]}},R.countBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=Tt(t(n,e,u)),Lt.call(r,e)?r[e]++:r[e]=1}),r},R.createCallback=function(n,t,e){if(n==u)return Ot;var r=typeof n;if("function"!=r){if("object"!=r)return function(t){return t[n]};var o=pe(n);return function(t){for(var e=o.length,r=a;e--&&(r=Z(t[o[e]],n[o[e]],l)););return r}}return typeof t!="undefined"?1===e?function(e){return n.call(t,e)
|
||||
}:2===e?function(e,r){return n.call(t,e,r)}:4===e?function(e,r,u,a){return n.call(t,e,r,u,a)}:function(e,r,u){return n.call(t,e,r,u)}:n},R.debounce=function(n,t,e){function o(){l=u,p&&(f=n.apply(c,i))}var i,f,c,l,p=r;if(e===r)var s=r,p=a;else e&&(s=e.leading,p=e.trailing);return function(){var e=s&&!l;return i=arguments,c=this,Vt(l),l=Xt(o,t),e&&(f=n.apply(c,i)),f}},R.defaults=he,R.defer=xt,R.delay=function(n,t){var r=J(arguments,2);return Xt(function(){n.apply(e,r)},t)},R.difference=function(n){for(var t=-1,e=n?n.length:0,r=Gt.apply(zt,arguments),r=T(r,e,100),u=[];++t<e;){var a=n[t];
|
||||
r(a)||u.push(a)}return u},R.filter=ft,R.flatten=bt,R.forEach=lt,R.forIn=ye,R.forOwn=me,R.functions=X,R.groupBy=function(n,t,e){var r={};return t=R.createCallback(t,e),lt(n,function(n,e,u){e=Tt(t(n,e,u)),(Lt.call(r,e)?r[e]:r[e]=[]).push(n)}),r},R.initial=function(n,t,e){if(!n)return[];var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else r=t==u||e?1:t||r;return J(n,0,ae(ue(0,a-r),a))},R.intersection=function(n){var t=arguments,e=t.length,r={0:{}},u=-1,a=n?n.length:0,o=100<=a,i=[],f=i;
|
||||
n:for(;++u<a;){var c=n[u];if(o)var l=p+c,l=r[0][l]?!(f=r[0][l]):f=r[0][l]=[];if(l||0>dt(f,c)){o&&f.push(c);for(var s=e;--s;)if(!(r[s]||(r[s]=T(t[s],0,100)))(c))continue n;i.push(c)}}return i},R.invert=Y,R.invoke=function(n,t){var e=J(arguments,2),r=-1,u=typeof t=="function",a=n?n.length:0,o=It(typeof a=="number"?a:0);return lt(n,function(n){o[++r]=(u?t:n[t]).apply(n,e)}),o},R.keys=pe,R.map=pt,R.max=st,R.memoize=function(n,t){var e={};return function(){var r=p+(t?t.apply(this,arguments):arguments[0]);
|
||||
return Lt.call(e,r)?e[r]:e[r]=n.apply(this,arguments)}},R.merge=ut,R.min=function(n,t,e){var r=1/0,u=r;if(!t&&le(n)){e=-1;for(var a=n.length;++e<a;){var o=n[e];o<u&&(u=o)}}else t=!t&&rt(n)?D:R.createCallback(t,e),lt(n,function(n,e,a){e=t(n,e,a),e<r&&(r=e,u=n)});return u},R.omit=function(n,t,e){var r=typeof t=="function",u={};if(r)t=R.createCallback(t,e);else var a=Gt.apply(zt,arguments);return ye(n,function(n,e,o){(r?!t(n,e,o):0>dt(a,e,1))&&(u[e]=n)}),u},R.once=function(n){var t,e;return function(){return t?e:(t=r,e=n.apply(this,arguments),n=u,e)
|
||||
}},R.pairs=function(n){for(var t=-1,e=pe(n),r=e.length,u=It(r);++t<r;){var a=e[t];u[t]=[a,n[a]]}return u},R.partial=function(n){return P(n,J(arguments,1))},R.partialRight=function(n){return P(n,J(arguments,1),u,l)},R.pick=function(n,t,e){var r={};if(typeof t!="function")for(var u=0,a=Gt.apply(zt,arguments),o=tt(n)?a.length:0;++u<o;){var i=a[u];i in n&&(r[i]=n[i])}else t=R.createCallback(t,e),ye(n,function(n,e,u){t(n,e,u)&&(r[e]=n)});return r},R.pluck=vt,R.range=function(n,t,e){n=+n||0,e=+e||1,t==u&&(t=n,n=0);
|
||||
var r=-1;t=ue(0,Ut((t-n)/e));for(var a=It(t);++r<t;)a[r]=n,n+=e;return a},R.reject=function(n,t,e){return t=R.createCallback(t,e),ft(n,function(n,e,r){return!t(n,e,r)})},R.rest=_t,R.shuffle=function(n){var t=-1,e=n?n.length:0,r=It(typeof e=="number"?e:0);return lt(n,function(n){var e=Ht(ie()*(++t+1));r[t]=r[e],r[e]=n}),r},R.sortBy=function(n,t,e){var r=-1,u=n?n.length:0,a=It(typeof u=="number"?u:0);for(t=R.createCallback(t,e),lt(n,function(n,e,u){a[++r]={a:t(n,e,u),b:r,c:n}}),u=a.length,a.sort(z);u--;)a[u]=a[u].c;
|
||||
return a},R.tap=function(n,t){return t(n),n},R.throttle=function(n,t,e){function o(){p=new At,l=u,v&&(f=n.apply(c,i))}var i,f,c,l,p=0,s=r,v=r;return e===a?s=a:e&&(s=e.leading,v=e.trailing),function(){var e=new At;!l&&!s&&(p=e);var r=t-(e-p);return i=arguments,c=this,0<r?l||(l=Xt(o,r)):(Vt(l),l=u,p=e,f=n.apply(c,i)),f}},R.times=function(n,t,e){n=-1<(n=+n)?n:0;var r=-1,u=It(n);for(t=R.createCallback(t,e,1);++r<n;)u[r]=t(r);return u},R.toArray=function(n){return n&&typeof n.length=="number"?J(n):at(n)
|
||||
},R.union=function(){return wt(Gt.apply(zt,arguments))},R.uniq=wt,R.unzip=function(n){for(var t=-1,e=n?n.length:0,r=e?st(vt(n,"length")):0,u=It(r);++t<e;)for(var a=-1,o=n[t];++a<r;)(u[a]||(u[a]=It(e)))[t]=o[a];return u},R.values=at,R.where=ft,R.without=function(n){for(var t=-1,e=n?n.length:0,r=T(arguments,1,30),u=[];++t<e;){var a=n[t];r(a)||u.push(a)}return u},R.wrap=function(n,t){return function(){var e=[n];return Qt.apply(e,arguments),t.apply(this,e)}},R.zip=function(n){for(var t=-1,e=n?st(vt(arguments,"length")):0,r=It(e);++t<e;)r[t]=vt(arguments,t);
|
||||
return r},R.zipObject=jt,R.collect=pt,R.drop=_t,R.each=lt,R.extend=ge,R.methods=X,R.object=jt,R.select=ft,R.tail=_t,R.unique=wt,Nt(R),R.clone=W,R.cloneDeep=function(n,t,e){return W(n,r,t,e)},R.contains=ot,R.escape=function(n){return n==u?"":Tt(n).replace(k,U)},R.every=it,R.find=ct,R.findIndex=function(n,t,e){var r=-1,u=n?n.length:0;for(t=R.createCallback(t,e);++r<u;)if(t(n[r],r,n))return r;return-1},R.findKey=function(n,t,e){var r;return t=R.createCallback(t,e),me(n,function(n,e,u){return t(n,e,u)?(r=e,a):void 0
|
||||
}),r},R.has=function(n,t){return n?Lt.call(n,t):a},R.identity=Ot,R.indexOf=dt,R.isArguments=Q,R.isArray=le,R.isBoolean=function(n){return n===r||n===a||Yt.call(n)==O},R.isDate=function(n){return n instanceof At||Yt.call(n)==N},R.isElement=function(n){return n?1===n.nodeType:a},R.isEmpty=function(n){var t=r;if(!n)return t;var e=Yt.call(n),u=n.length;return e==x||e==A||e==C||e==I&&typeof u=="number"&&nt(n.splice)?!u:(me(n,function(){return t=a}),t)},R.isEqual=Z,R.isFinite=function(n){return te(n)&&!ee(parseFloat(n))
|
||||
},R.isFunction=nt,R.isNaN=function(n){return et(n)&&n!=+n},R.isNull=function(n){return n===u},R.isNumber=et,R.isObject=tt,R.isPlainObject=f,R.isRegExp=function(n){return n instanceof Rt||Yt.call(n)==S},R.isString=rt,R.isUndefined=function(n){return typeof n=="undefined"},R.lastIndexOf=function(n,t,e){var r=n?n.length:0;for(typeof e=="number"&&(r=(0>e?ue(0,r+e):ae(e,r-1))+1);r--;)if(n[r]===t)return r;return-1},R.mixin=Nt,R.noConflict=function(){return o._=Kt,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+Ht(ie()*((+t||0)-n+1))
|
||||
},R.reduce=gt,R.reduceRight=ht,R.result=function(n,t){var r=n?n[t]:e;return nt(r)?n[t]():r},R.runInContext=t,R.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:pe(n).length},R.some=yt,R.sortedIndex=kt,R.template=function(n,t,u){var a=R.templateSettings;n||(n=""),u=he({},u,a);var o,i=he({},u.imports,a.imports),a=pe(i),i=at(i),f=0,c=u.interpolate||_,l="__p+='",c=Rt((u.escape||_).source+"|"+c.source+"|"+(c===b?y:_).source+"|"+(u.evaluate||_).source+"|$","g");n.replace(c,function(t,e,u,a,i,c){return u||(u=a),l+=n.slice(f,c).replace(w,M),e&&(l+="'+__e("+e+")+'"),i&&(o=r,l+="';"+i+";__p+='"),u&&(l+="'+((__t=("+u+"))==null?'':__t)+'"),f=c+t.length,t
|
||||
}),l+="';\n",c=u=u.variable,c||(u="obj",l="with("+u+"){"+l+"}"),l=(o?l.replace(s,""):l).replace(v,"$1").replace(g,"$1;"),l="function("+u+"){"+(c?"":u+"||("+u+"={});")+"var __t,__p='',__e=_.escape"+(o?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":";")+l+"return __p}";try{var p=$t(a,"return "+l).apply(e,i)}catch(h){throw h.source=l,h}return t?p(t):(p.source=l,p)},R.unescape=function(n){return n==u?"":Tt(n).replace(h,L)},R.uniqueId=function(n){var t=++c;return Tt(n==u?"":n)+t
|
||||
},R.all=it,R.any=yt,R.detect=ct,R.foldl=gt,R.foldr=ht,R.include=ot,R.inject=gt,me(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(){var t=[this.__wrapped__];return Qt.apply(t,arguments),n.apply(R,t)})}),R.first=mt,R.last=function(n,t,e){if(n){var r=0,a=n.length;if(typeof t!="number"&&t!=u){var o=a;for(t=R.createCallback(t,e);o--&&t(n[o],o,n);)r++}else if(r=t,r==u||e)return n[a-1];return J(n,ue(0,a-r))}},R.take=mt,R.head=mt,me(R,function(n,t){R.prototype[t]||(R.prototype[t]=function(t,e){var r=n(this.__wrapped__,t,e);
|
||||
return t==u||e&&typeof t!="function"?r:new V(r)})}),R.VERSION="1.1.1",R.prototype.toString=function(){return Tt(this.__wrapped__)},R.prototype.value=Et,R.prototype.valueOf=Et,lt(["join","pop","shift"],function(n){var t=zt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments)}}),lt(["push","reverse","sort","unshift"],function(n){var t=zt[n];R.prototype[n]=function(){return t.apply(this.__wrapped__,arguments),this}}),lt(["concat","slice","splice"],function(n){var t=zt[n];R.prototype[n]=function(){return new V(t.apply(this.__wrapped__,arguments))
|
||||
}}),R}var e,r=!0,u=null,a=!1,o=typeof exports=="object"&&exports,i=typeof module=="object"&&module&&module.exports==o&&module,f=typeof global=="object"&&global;(f.global===f||f.window===f)&&(n=f);var c=0,l={},p=+new Date+"",s=/\b__p\+='';/g,v=/\b(__p\+=)''\+/g,g=/(__e\(.*?\)|\b__t\))\+'';/g,h=/&(?:amp|lt|gt|quot|#39);/g,y=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,m=/\w*$/,b=/<%=([\s\S]+?)%>/g,d=/^0+(?=.$)/,_=/($^)/,k=/[&<>"']/g,w=/['\n\r\t\u2028\u2029\\]/g,j="Array Boolean Date Function Math Number Object RegExp String _ attachEvent clearTimeout isFinite isNaN parseInt setImmediate setTimeout".split(" "),C="[object Arguments]",x="[object Array]",O="[object Boolean]",N="[object Date]",E="[object Number]",I="[object Object]",S="[object RegExp]",A="[object String]",$={"[object Function]":a};
|
||||
$[C]=$[x]=$[O]=$[N]=$[E]=$[I]=$[S]=$[A]=r;var q={"boolean":a,"function":r,object:r,number:a,string:a,undefined:a},B={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},F=t();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=F,define(function(){return F})):o&&!o.nodeType?i?(i.exports=F)._=F:o._=F:n._=F})(this);
|
||||
73
dist/lodash.underscore.js
vendored
73
dist/lodash.underscore.js
vendored
@@ -1612,7 +1612,9 @@
|
||||
* @returns {Mixed} Returns the found element, else `undefined`.
|
||||
* @example
|
||||
*
|
||||
* _.find([1, 2, 3, 4], function(num) { return num % 2 == 0; });
|
||||
* _.find([1, 2, 3, 4], function(num) {
|
||||
* return num % 2 == 0;
|
||||
* });
|
||||
* // => 2
|
||||
*
|
||||
* var food = [
|
||||
@@ -3425,44 +3427,53 @@
|
||||
/**
|
||||
* 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.
|
||||
* an `options` object to indicate that `func` should be invoked on the leading
|
||||
* and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced
|
||||
* function will return the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to debounce.
|
||||
* @param {Number} wait The number of milliseconds to delay.
|
||||
* @param {Boolean} immediate A flag to indicate execution is on the leading
|
||||
* edge of the timeout.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=false] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new debounced function.
|
||||
* @example
|
||||
*
|
||||
* var lazyLayout = _.debounce(calculateLayout, 300);
|
||||
* jQuery(window).on('resize', lazyLayout);
|
||||
*/
|
||||
function debounce(func, wait, immediate) {
|
||||
function debounce(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId;
|
||||
timeoutId,
|
||||
trailing = true;
|
||||
|
||||
function delayed() {
|
||||
timeoutId = null;
|
||||
if (!immediate) {
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === true) {
|
||||
var leading = true;
|
||||
trailing = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var isImmediate = immediate && !timeoutId;
|
||||
var isLeading = leading && !timeoutId;
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(delayed, wait);
|
||||
|
||||
if (isImmediate) {
|
||||
if (isLeading) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
return result;
|
||||
@@ -3597,39 +3608,57 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* 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.
|
||||
* 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. Pass an `options` object to indicate
|
||||
* that `func` should be invoked on the leading and/or trailing edge of the
|
||||
* `wait` timeout. Subsequent calls to the throttled function will return
|
||||
* the result of the last `func` call.
|
||||
*
|
||||
* @static
|
||||
* @memberOf _
|
||||
* @category Functions
|
||||
* @param {Function} func The function to throttle.
|
||||
* @param {Number} wait The number of milliseconds to throttle executions to.
|
||||
* @param {Object} options The options object.
|
||||
* [leading=true] A boolean to specify execution on the leading edge of the timeout.
|
||||
* [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
* @returns {Function} Returns the new throttled function.
|
||||
* @example
|
||||
*
|
||||
* var throttled = _.throttle(updatePosition, 100);
|
||||
* jQuery(window).on('scroll', throttled);
|
||||
*/
|
||||
function throttle(func, wait) {
|
||||
function throttle(func, wait, options) {
|
||||
var args,
|
||||
result,
|
||||
thisArg,
|
||||
timeoutId,
|
||||
lastCalled = 0;
|
||||
lastCalled = 0,
|
||||
leading = true,
|
||||
trailing = true;
|
||||
|
||||
function trailingCall() {
|
||||
lastCalled = new Date;
|
||||
timeoutId = null;
|
||||
result = func.apply(thisArg, args);
|
||||
|
||||
if (trailing) {
|
||||
result = func.apply(thisArg, args);
|
||||
}
|
||||
}
|
||||
if (options === false) {
|
||||
leading = false;
|
||||
} else if (options) {
|
||||
leading = options.leading;
|
||||
trailing = options.trailing;
|
||||
}
|
||||
return function() {
|
||||
var now = new Date,
|
||||
remaining = wait - (now - lastCalled);
|
||||
|
||||
var now = new Date;
|
||||
if (!timeoutId && !leading) {
|
||||
lastCalled = now;
|
||||
}
|
||||
var remaining = wait - (now - lastCalled);
|
||||
args = arguments;
|
||||
thisArg = this;
|
||||
|
||||
|
||||
34
dist/lodash.underscore.min.js
vendored
34
dist/lodash.underscore.min.js
vendored
@@ -5,10 +5,10 @@
|
||||
* Underscore.js 1.4.4 underscorejs.org/LICENSE
|
||||
*/
|
||||
;(function(n){function t(n,t){var r;if(n&&vt[typeof n])for(r in n)if(wt.call(n,r)&&t(n[r],r,n)===Z)break}function r(n,t){var r;if(n&&vt[typeof n])for(r in n)if(t(n[r],r,n)===Z)break}function e(n){var t,r=[];if(!n||!vt[typeof n])return r;for(t in n)wt.call(n,t)&&r.push(t);return r}function u(n){return n instanceof u?n:new c(n)}function o(n,t){var r=n.b,e=t.b;if(n=n.a,t=t.a,n!==t){if(n>t||typeof n=="undefined")return 1;if(n<t||typeof t=="undefined")return-1}return r<e?-1:1}function i(n,t,r){function e(){var f=arguments,c=o?this:t;
|
||||
return u||(n=t[i]),r.length&&(f=f.length?(f=Ot.call(f),a?f.concat(r):r.concat(f)):r),this instanceof e?(l.prototype=n.prototype,c=new l,l.prototype=J,f=n.apply(c,f),d(f)?f:c):n.apply(c,f)}var u=b(n),o=!r,i=t;if(o){var a=void 0;r=t}else if(!u)throw new TypeError;return e}function a(n){return"\\"+gt[n]}function f(n){return zt[n]}function c(n){this.__wrapped__=n}function l(){}function p(n){return Ct[n]}function s(n){return Et.call(n)==ot}function v(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];
|
||||
if(e)for(var u in e)n[u]=e[u]}return n}function g(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function h(n){var t=[];return r(n,function(n,r){b(n)&&t.push(r)}),t.sort()}function y(n){for(var t=-1,r=It(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function m(n){if(!n)return H;if($t(n)||w(n))return!n.length;for(var t in n)if(wt.call(n,t))return K;return H}function _(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;
|
||||
var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return K;if(n==J||t==J)return n===t;if(a=Et.call(n),i=Et.call(t),a!=i)return K;switch(a){case at:case ft:return+n==+t;case ct:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case pt:case st:return n==t+""}if(i=a==it,!i){if(n instanceof u||t instanceof u)return _(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=lt)return K;var a=n.constructor,f=t.constructor;if(a!=f&&(!b(a)||!(a instanceof a&&b(f)&&f instanceof f)))return K
|
||||
}for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=H,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=_(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return wt.call(u,r)?(l++,!(c=wt.call(n,r)&&_(n[r],t,e,o))&&Z):void 0}),c&&r(n,function(n,t,r){return wt.call(r,t)?!(c=-1<--l)&&Z:void 0}),c}function b(n){return typeof n=="function"}function d(n){return n?vt[typeof n]:K}function j(n){return typeof n=="number"||Et.call(n)==ct}function w(n){return typeof n=="string"||Et.call(n)==st
|
||||
return u||(n=t[i]),r.length&&(f=f.length?(f=Ot.call(f),a?f.concat(r):r.concat(f)):r),this instanceof e?(l.prototype=n.prototype,c=new l,l.prototype=J,f=n.apply(c,f),b(f)?f:c):n.apply(c,f)}var u=d(n),o=!r,i=t;if(o){var a=void 0;r=t}else if(!u)throw new TypeError;return e}function a(n){return"\\"+gt[n]}function f(n){return zt[n]}function c(n){this.__wrapped__=n}function l(){}function p(n){return Ct[n]}function s(n){return Et.call(n)==ot}function v(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];
|
||||
if(e)for(var u in e)n[u]=e[u]}return n}function g(n){if(!n)return n;for(var t=1,r=arguments.length;t<r;t++){var e=arguments[t];if(e)for(var u in e)n[u]==J&&(n[u]=e[u])}return n}function h(n){var t=[];return r(n,function(n,r){d(n)&&t.push(r)}),t.sort()}function y(n){for(var t=-1,r=It(n),e=r.length,u={};++t<e;){var o=r[t];u[n[o]]=o}return u}function m(n){if(!n)return H;if($t(n)||w(n))return!n.length;for(var t in n)if(wt.call(n,t))return K;return H}function _(n,t,e,o){if(n===t)return 0!==n||1/n==1/t;
|
||||
var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"function"!=a&&"object"!=a))return K;if(n==J||t==J)return n===t;if(a=Et.call(n),i=Et.call(t),a!=i)return K;switch(a){case at:case ft:return+n==+t;case ct:return n!=+n?t!=+t:0==n?1/n==1/t:n==+t;case pt:case st:return n==t+""}if(i=a==it,!i){if(n instanceof u||t instanceof u)return _(n.__wrapped__||n,t.__wrapped__||t,e,o);if(a!=lt)return K;var a=n.constructor,f=t.constructor;if(a!=f&&(!d(a)||!(a instanceof a&&d(f)&&f instanceof f)))return K
|
||||
}for(e||(e=[]),o||(o=[]),a=e.length;a--;)if(e[a]==n)return o[a]==t;var c=H,l=0;if(e.push(n),o.push(t),i){if(l=t.length,c=l==n.length)for(;l--&&(c=_(n[l],t[l],e,o)););return c}return r(t,function(t,r,u){return wt.call(u,r)?(l++,!(c=wt.call(n,r)&&_(n[r],t,e,o))&&Z):void 0}),c&&r(n,function(n,t,r){return wt.call(r,t)?!(c=-1<--l)&&Z:void 0}),c}function d(n){return typeof n=="function"}function b(n){return n?vt[typeof n]:K}function j(n){return typeof n=="number"||Et.call(n)==ct}function w(n){return typeof n=="string"||Et.call(n)==st
|
||||
}function A(n){for(var t=-1,r=It(n),e=r.length,u=Array(e);++t<e;)u[t]=n[r[t]];return u}function x(n,r){var e=K;return typeof(n?n.length:0)=="number"?e=-1<I(n,r):t(n,function(n){return(e=n===r)&&Z}),e}function O(n,r,e){var u=H;r=V(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o&&(u=!!r(n[e],e,n)););else t(n,function(n,t,e){return!(u=!!r(n,t,e))&&Z});return u}function E(n,r,e){var u=[];r=V(r,e),e=-1;var o=n?n.length:0;if(typeof o=="number")for(;++e<o;){var i=n[e];r(i,e,n)&&u.push(i)}else t(n,function(n,t,e){r(n,t,e)&&u.push(n)
|
||||
});return u}function S(n,r,e){r=V(r,e),e=-1;var u=n?n.length:0;if(typeof u!="number"){var o;return t(n,function(n,t,e){return r(n,t,e)?(o=n,Z):void 0}),o}for(;++e<u;){var i=n[e];if(r(i,e,n))return i}}function N(n,r,e){var u=-1,o=n?n.length:0;if(r=r&&typeof e=="undefined"?r:V(r,e),typeof o=="number")for(;++u<o&&r(n[u],u,n)!==Z;);else t(n,r)}function k(n,r,e){var u=-1,o=n?n.length:0;if(r=V(r,e),typeof o=="number")for(var i=Array(o);++u<o;)i[u]=r(n[u],u,n);else i=[],t(n,function(n,t,e){i[++u]=r(n,t,e)
|
||||
});return i}function B(n,t,r){var e=-1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),N(n,function(n,r,o){r=t(n,r,o),r>e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r>u&&(u=r);return u}function F(n,t){var r=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++r<e;)u[r]=n[r][t];return u||k(n,t)}function R(n,r,e,u){if(!n)return e;var o=3>arguments.length;r=V(r,u,4);var i=-1,a=n.length;if(typeof a=="number")for(o&&(e=n[++i]);++i<a;)e=r(e,n[i],i,n);else t(n,function(n,t,u){e=o?(o=K,n):r(e,n,t,u)
|
||||
@@ -16,19 +16,19 @@ var i=typeof n,a=typeof t;if(n===n&&(!n||"function"!=i&&"object"!=i)&&(!t||"func
|
||||
for(t=V(t,r);++o<u&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[0];return Ot.call(n,0,qt(Rt(0,e),u))}}function $(n,t){for(var r=-1,e=n?n.length:0,u=[];++r<e;){var o=n[r];$t(o)?At.apply(u,t?o:$(o)):u.push(o)}return u}function I(n,t,r){var e=-1,u=n?n.length:0;if(typeof r=="number")e=(0>r?Rt(0,u+r):r||0)-1;else if(r)return e=C(n,t),n[e]===t?e:-1;for(;++e<u;)if(n[e]===t)return e;return-1}function z(n,t,r){if(typeof t!="number"&&t!=J){var e=0,u=-1,o=n?n.length:0;for(t=V(t,r);++u<o&&t(n[u],u,n);)e++}else e=t==J||r?1:Rt(0,t);
|
||||
return Ot.call(n,e)}function C(n,t,r,e){var u=0,o=n?n.length:u;for(r=r?V(r,e,1):W,t=r(t);u<o;)e=u+o>>>1,r(n[e])<t?u=e+1:o=e;return u}function P(n,t,r,e){var u=-1,o=n?n.length:0,i=[],a=i;for(typeof t!="boolean"&&t!=J&&(e=r,r=t,t=K),r!=J&&(a=[],r=V(r,e));++u<o;){e=n[u];var f=r?r(e,u,n):e;(t?!u||a[a.length-1]!==f:0>I(a,f))&&(r&&a.push(f),i.push(e))}return i}function U(n,t){return Tt.fastBind||St&&2<arguments.length?St.call.apply(St,arguments):i(n,t,Ot.call(arguments,2))}function V(n,t,r){if(n==J)return W;
|
||||
var e=typeof n;if("function"!=e){if("object"!=e)return function(t){return t[n]};var u=It(n);return function(t){for(var r=u.length,e=K;r--&&(e=t[u[r]]===n[u[r]]););return e}}return typeof t!="undefined"?1===r?function(r){return n.call(t,r)}:2===r?function(r,e){return n.call(t,r,e)}:4===r?function(r,e,u,o){return n.call(t,r,e,u,o)}:function(r,e,u){return n.call(t,r,e,u)}:n}function W(n){return n}function G(n){N(h(n),function(t){var r=u[t]=n[t];u.prototype[t]=function(){var n=[this.__wrapped__];return At.apply(n,arguments),n=r.apply(u,n),this.__chain__&&(n=new c(n),n.__chain__=H),n
|
||||
}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof module=="object"&&module&&module.exports==L&&module,X=typeof global=="object"&&global;(X.global===X||X.window===X)&&(n=X);var Y=0,Z={},nt=+new Date+"",tt=/&(?:amp|lt|gt|quot|#39);/g,rt=/($^)/,et=/[&<>"']/g,ut=/['\n\r\t\u2028\u2029\\]/g,ot="[object Arguments]",it="[object Array]",at="[object Boolean]",ft="[object Date]",ct="[object Number]",lt="[object Object]",pt="[object RegExp]",st="[object String]",vt={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},gt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ht=[],X={},yt=n._,mt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),_t=Math.ceil,bt=n.clearTimeout,dt=ht.concat,jt=Math.floor,wt=X.hasOwnProperty,At=ht.push,xt=n.setTimeout,Ot=ht.slice,Et=X.toString,St=mt.test(St=Et.bind)&&St,Nt=mt.test(Nt=Array.isArray)&&Nt,kt=n.isFinite,Bt=n.isNaN,Ft=mt.test(Ft=Object.keys)&&Ft,Rt=Math.max,qt=Math.min,Dt=Math.random,X=mt.test(n.attachEvent),Mt=St&&!/\n|true/.test(St+X),Tt={};
|
||||
(function(){var n={0:1,length:1};Tt.argsObject=arguments.constructor==Object,Tt.fastBind=St&&!Mt,Tt.spliceObjects=(ht.splice.call(n,0,1),!n[0])})(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},c.prototype=u.prototype,s(arguments)||(s=function(n){return n?wt.call(n,"callee"):K});var $t=Nt||function(n){return Tt.argsObject&&n instanceof Array||Et.call(n)==it},It=Ft?function(n){return d(n)?Ft(n):[]}:e,zt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ct=y(zt);
|
||||
b(/x/)&&(b=function(n){return n instanceof Function||"[object Function]"==Et.call(n)}),u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},u.bind=U,u.bindAll=function(n){for(var t=dt.apply(ht,arguments),r=1<t.length?0:(t=h(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=U(n[u],n)}return n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},u.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},u.countBy=function(n,t,r){var e={};return t=V(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",wt.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=J,r||(o=n.apply(i,u))}var u,o,i,a;return function(){var f=r&&!a;return u=arguments,i=this,bt(a),a=xt(e,t),f&&(o=n.apply(i,u)),o}},u.defaults=g,u.defer=function(n){var t=Ot.call(arguments,1);return xt(function(){n.apply(void 0,t)},1)},u.delay=function(n,t){var r=Ot.call(arguments,2);return xt(function(){n.apply(void 0,r)},t)},u.difference=function(n){for(var t=-1,r=n.length,e=dt.apply(ht,arguments),u=[];++t<r;){var o=n[t];
|
||||
0>I(e,o,r)&&u.push(o)}return u},u.filter=E,u.flatten=$,u.forEach=N,u.functions=h,u.groupBy=function(n,t,r){var e={};return t=V(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",(wt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},u.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else e=t==J||r?1:t||e;return Ot.call(n,0,qt(Rt(0,u-e),u))},u.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];
|
||||
if(0>I(o,i)){for(var a=r;--a;)if(0>I(t[a],i))continue n;o.push(i)}}return o},u.invert=y,u.invoke=function(n,t){var r=Ot.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return N(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},u.keys=It,u.map=k,u.max=B,u.memoize=function(n,t){var r={};return function(){var e=nt+(t?t.apply(this,arguments):arguments[0]);return wt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},u.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;
|
||||
if(t||typeof i!="number")t=V(t,r),N(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},u.omit=function(n){var t=dt.apply(ht,arguments),e={};return r(n,function(n,r){0>I(t,r,1)&&(e[r]=n)}),e},u.once=function(n){var t,r;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},u.pairs=function(n){for(var t=-1,r=It(n),e=r.length,u=Array(e);++t<e;){var o=r[t];u[t]=[o,n[o]]}return u},u.partial=function(n){return i(n,Ot.call(arguments,1))},u.pick=function(n){for(var t=0,r=dt.apply(ht,arguments),e=r.length,u={};++t<e;){var o=r[t];
|
||||
o in n&&(u[o]=n[o])}return u},u.pluck=F,u.range=function(n,t,r){n=+n||0,r=+r||1,t==J&&(t=n,n=0);var e=-1;t=Rt(0,_t((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=V(t,r),E(n,function(n,r,e){return!t(n,r,e)})},u.rest=z,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);return N(n,function(n){var r=jt(Dt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,i=Array(typeof u=="number"?u:0);for(t=V(t,r),N(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}
|
||||
}),u=i.length,i.sort(o);u--;)i[u]=i[u].c;return i},u.tap=function(n,t){return t(n),n},u.throttle=function(n,t){function r(){a=new Date,i=J,u=n.apply(o,e)}var e,u,o,i,a=0;return function(){var f=new Date,c=t-(f-a);return e=arguments,o=this,0<c?i||(i=xt(r,c)):(bt(i),i=J,a=f,u=n.apply(o,e)),u}},u.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},u.toArray=function(n){return $t(n)?Ot.call(n):n&&typeof n.length=="number"?k(n):A(n)},u.union=function(){return P(dt.apply(ht,arguments))
|
||||
},u.uniq=P,u.values=A,u.where=M,u.without=function(n){for(var t=-1,r=n.length,e=[];++t<r;){var u=n[t];0>I(arguments,u,1)&&e.push(u)}return e},u.wrap=function(n,t){return function(){var r=[n];return At.apply(r,arguments),t.apply(this,r)}},u.zip=function(n){for(var t=-1,r=n?B(F(arguments,"length")):0,e=Array(r);++t<r;)e[t]=F(arguments,t);return e},u.collect=k,u.drop=z,u.each=N,u.extend=v,u.methods=h,u.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u
|
||||
},u.select=E,u.tail=z,u.unique=P,u.clone=function(n){return d(n)?$t(n)?Ot.call(n):v({},n):n},u.contains=x,u.escape=function(n){return n==J?"":(n+"").replace(et,f)},u.every=O,u.find=S,u.findWhere=function(n,t){return M(n,t,H)},u.has=function(n,t){return n?wt.call(n,t):K},u.identity=W,u.indexOf=I,u.isArguments=s,u.isArray=$t,u.isBoolean=function(n){return n===H||n===K||Et.call(n)==at},u.isDate=function(n){return n instanceof Date||Et.call(n)==ft},u.isElement=function(n){return n?1===n.nodeType:K},u.isEmpty=m,u.isEqual=_,u.isFinite=function(n){return kt(n)&&!Bt(parseFloat(n))
|
||||
},u.isFunction=b,u.isNaN=function(n){return j(n)&&n!=+n},u.isNull=function(n){return n===J},u.isNumber=j,u.isObject=d,u.isRegExp=function(n){return n instanceof RegExp||Et.call(n)==pt},u.isString=w,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Rt(0,e+r):qt(r,e-1))+1);e--;)if(n[e]===t)return e;return-1},u.mixin=G,u.noConflict=function(){return n._=yt,this},u.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+jt(Dt()*((+t||0)-n+1))
|
||||
},u.reduce=R,u.reduceRight=q,u.result=function(n,t){var r=n?n[t]:J;return b(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:It(n).length},u.some=D,u.sortedIndex=C,u.template=function(n,t,r){n||(n=""),r=g({},r,u.templateSettings);var e=0,o="__p+='",i=r.variable;n.replace(RegExp((r.escape||rt).source+"|"+(r.interpolate||rt).source+"|"+(r.evaluate||rt).source+"|$","g"),function(t,r,u,i,f){return o+=n.slice(e,f).replace(ut,a),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),u&&(o+="'+((__t=("+u+"))==null?'':__t)+'"),e=f+t.length,t
|
||||
}})}var H=!0,J=null,K=!1,L=typeof exports=="object"&&exports,Q=typeof module=="object"&&module&&module.exports==L&&module,X=typeof global=="object"&&global;(X.global===X||X.window===X)&&(n=X);var Y=0,Z={},nt=+new Date+"",tt=/&(?:amp|lt|gt|quot|#39);/g,rt=/($^)/,et=/[&<>"']/g,ut=/['\n\r\t\u2028\u2029\\]/g,ot="[object Arguments]",it="[object Array]",at="[object Boolean]",ft="[object Date]",ct="[object Number]",lt="[object Object]",pt="[object RegExp]",st="[object String]",vt={"boolean":K,"function":H,object:H,number:K,string:K,undefined:K},gt={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},ht=[],X={},yt=n._,mt=RegExp("^"+(X.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),_t=Math.ceil,dt=n.clearTimeout,bt=ht.concat,jt=Math.floor,wt=X.hasOwnProperty,At=ht.push,xt=n.setTimeout,Ot=ht.slice,Et=X.toString,St=mt.test(St=Et.bind)&&St,Nt=mt.test(Nt=Array.isArray)&&Nt,kt=n.isFinite,Bt=n.isNaN,Ft=mt.test(Ft=Object.keys)&&Ft,Rt=Math.max,qt=Math.min,Dt=Math.random,X=mt.test(n.attachEvent),Mt=St&&!/\n|true/.test(St+X),Tt={};
|
||||
(function(){var n={0:1,length:1};Tt.argsObject=arguments.constructor==Object,Tt.fastBind=St&&!Mt,Tt.spliceObjects=(ht.splice.call(n,0,1),!n[0])})(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},c.prototype=u.prototype,s(arguments)||(s=function(n){return n?wt.call(n,"callee"):K});var $t=Nt||function(n){return Tt.argsObject&&n instanceof Array||Et.call(n)==it},It=Ft?function(n){return b(n)?Ft(n):[]}:e,zt={"&":"&","<":"<",">":">",'"':""","'":"'"},Ct=y(zt);
|
||||
d(/x/)&&(d=function(n){return n instanceof Function||"[object Function]"==Et.call(n)}),u.after=function(n,t){return 1>n?t():function(){return 1>--n?t.apply(this,arguments):void 0}},u.bind=U,u.bindAll=function(n){for(var t=bt.apply(ht,arguments),r=1<t.length?0:(t=h(n),-1),e=t.length;++r<e;){var u=t[r];n[u]=U(n[u],n)}return n},u.compact=function(n){for(var t=-1,r=n?n.length:0,e=[];++t<r;){var u=n[t];u&&e.push(u)}return e},u.compose=function(){var n=arguments;return function(){for(var t=arguments,r=n.length;r--;)t=[n[r].apply(this,t)];
|
||||
return t[0]}},u.countBy=function(n,t,r){var e={};return t=V(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",wt.call(e,r)?e[r]++:e[r]=1}),e},u.debounce=function(n,t,r){function e(){a=J,f&&(o=n.apply(i,u))}var u,o,i,a,f=H;if(r===H)var c=H,f=K;else r&&(c=r.leading,f=r.trailing);return function(){var r=c&&!a;return u=arguments,i=this,dt(a),a=xt(e,t),r&&(o=n.apply(i,u)),o}},u.defaults=g,u.defer=function(n){var t=Ot.call(arguments,1);return xt(function(){n.apply(void 0,t)},1)},u.delay=function(n,t){var r=Ot.call(arguments,2);
|
||||
return xt(function(){n.apply(void 0,r)},t)},u.difference=function(n){for(var t=-1,r=n.length,e=bt.apply(ht,arguments),u=[];++t<r;){var o=n[t];0>I(e,o,r)&&u.push(o)}return u},u.filter=E,u.flatten=$,u.forEach=N,u.functions=h,u.groupBy=function(n,t,r){var e={};return t=V(t,r),N(n,function(n,r,u){r=t(n,r,u)+"",(wt.call(e,r)?e[r]:e[r]=[]).push(n)}),e},u.initial=function(n,t,r){if(!n)return[];var e=0,u=n.length;if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else e=t==J||r?1:t||e;
|
||||
return Ot.call(n,0,qt(Rt(0,u-e),u))},u.intersection=function(n){var t=arguments,r=t.length,e=-1,u=n?n.length:0,o=[];n:for(;++e<u;){var i=n[e];if(0>I(o,i)){for(var a=r;--a;)if(0>I(t[a],i))continue n;o.push(i)}}return o},u.invert=y,u.invoke=function(n,t){var r=Ot.call(arguments,2),e=-1,u=typeof t=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return N(n,function(n){i[++e]=(u?t:n[t]).apply(n,r)}),i},u.keys=It,u.map=k,u.max=B,u.memoize=function(n,t){var r={};return function(){var e=nt+(t?t.apply(this,arguments):arguments[0]);
|
||||
return wt.call(r,e)?r[e]:r[e]=n.apply(this,arguments)}},u.min=function(n,t,r){var e=1/0,u=e,o=-1,i=n?n.length:0;if(t||typeof i!="number")t=V(t,r),N(n,function(n,r,o){r=t(n,r,o),r<e&&(e=r,u=n)});else for(;++o<i;)r=n[o],r<u&&(u=r);return u},u.omit=function(n){var t=bt.apply(ht,arguments),e={};return r(n,function(n,r){0>I(t,r,1)&&(e[r]=n)}),e},u.once=function(n){var t,r;return function(){return t?r:(t=H,r=n.apply(this,arguments),n=J,r)}},u.pairs=function(n){for(var t=-1,r=It(n),e=r.length,u=Array(e);++t<e;){var o=r[t];
|
||||
u[t]=[o,n[o]]}return u},u.partial=function(n){return i(n,Ot.call(arguments,1))},u.pick=function(n){for(var t=0,r=bt.apply(ht,arguments),e=r.length,u={};++t<e;){var o=r[t];o in n&&(u[o]=n[o])}return u},u.pluck=F,u.range=function(n,t,r){n=+n||0,r=+r||1,t==J&&(t=n,n=0);var e=-1;t=Rt(0,_t((t-n)/r));for(var u=Array(t);++e<t;)u[e]=n,n+=r;return u},u.reject=function(n,t,r){return t=V(t,r),E(n,function(n,r,e){return!t(n,r,e)})},u.rest=z,u.shuffle=function(n){var t=-1,r=n?n.length:0,e=Array(typeof r=="number"?r:0);
|
||||
return N(n,function(n){var r=jt(Dt()*(++t+1));e[t]=e[r],e[r]=n}),e},u.sortBy=function(n,t,r){var e=-1,u=n?n.length:0,i=Array(typeof u=="number"?u:0);for(t=V(t,r),N(n,function(n,r,u){i[++e]={a:t(n,r,u),b:e,c:n}}),u=i.length,i.sort(o);u--;)i[u]=i[u].c;return i},u.tap=function(n,t){return t(n),n},u.throttle=function(n,t,r){function e(){f=new Date,a=J,l&&(o=n.apply(i,u))}var u,o,i,a,f=0,c=H,l=H;return r===K?c=K:r&&(c=r.leading,l=r.trailing),function(){var r=new Date;!a&&!c&&(f=r);var l=t-(r-f);return u=arguments,i=this,0<l?a||(a=xt(e,l)):(dt(a),a=J,f=r,o=n.apply(i,u)),o
|
||||
}},u.times=function(n,t,r){for(var e=-1,u=Array(-1<n?n:0);++e<n;)u[e]=t.call(r,e);return u},u.toArray=function(n){return $t(n)?Ot.call(n):n&&typeof n.length=="number"?k(n):A(n)},u.union=function(){return P(bt.apply(ht,arguments))},u.uniq=P,u.values=A,u.where=M,u.without=function(n){for(var t=-1,r=n.length,e=[];++t<r;){var u=n[t];0>I(arguments,u,1)&&e.push(u)}return e},u.wrap=function(n,t){return function(){var r=[n];return At.apply(r,arguments),t.apply(this,r)}},u.zip=function(n){for(var t=-1,r=n?B(F(arguments,"length")):0,e=Array(r);++t<r;)e[t]=F(arguments,t);
|
||||
return e},u.collect=k,u.drop=z,u.each=N,u.extend=v,u.methods=h,u.object=function(n,t){for(var r=-1,e=n?n.length:0,u={};++r<e;){var o=n[r];t?u[o]=t[r]:u[o[0]]=o[1]}return u},u.select=E,u.tail=z,u.unique=P,u.clone=function(n){return b(n)?$t(n)?Ot.call(n):v({},n):n},u.contains=x,u.escape=function(n){return n==J?"":(n+"").replace(et,f)},u.every=O,u.find=S,u.findWhere=function(n,t){return M(n,t,H)},u.has=function(n,t){return n?wt.call(n,t):K},u.identity=W,u.indexOf=I,u.isArguments=s,u.isArray=$t,u.isBoolean=function(n){return n===H||n===K||Et.call(n)==at
|
||||
},u.isDate=function(n){return n instanceof Date||Et.call(n)==ft},u.isElement=function(n){return n?1===n.nodeType:K},u.isEmpty=m,u.isEqual=_,u.isFinite=function(n){return kt(n)&&!Bt(parseFloat(n))},u.isFunction=d,u.isNaN=function(n){return j(n)&&n!=+n},u.isNull=function(n){return n===J},u.isNumber=j,u.isObject=b,u.isRegExp=function(n){return n instanceof RegExp||Et.call(n)==pt},u.isString=w,u.isUndefined=function(n){return typeof n=="undefined"},u.lastIndexOf=function(n,t,r){var e=n?n.length:0;for(typeof r=="number"&&(e=(0>r?Rt(0,e+r):qt(r,e-1))+1);e--;)if(n[e]===t)return e;
|
||||
return-1},u.mixin=G,u.noConflict=function(){return n._=yt,this},u.random=function(n,t){return n==J&&t==J&&(t=1),n=+n||0,t==J&&(t=n,n=0),n+jt(Dt()*((+t||0)-n+1))},u.reduce=R,u.reduceRight=q,u.result=function(n,t){var r=n?n[t]:J;return d(r)?n[t]():r},u.size=function(n){var t=n?n.length:0;return typeof t=="number"?t:It(n).length},u.some=D,u.sortedIndex=C,u.template=function(n,t,r){n||(n=""),r=g({},r,u.templateSettings);var e=0,o="__p+='",i=r.variable;n.replace(RegExp((r.escape||rt).source+"|"+(r.interpolate||rt).source+"|"+(r.evaluate||rt).source+"|$","g"),function(t,r,u,i,f){return o+=n.slice(e,f).replace(ut,a),r&&(o+="'+_['escape']("+r+")+'"),i&&(o+="';"+i+";__p+='"),u&&(o+="'+((__t=("+u+"))==null?'':__t)+'"),e=f+t.length,t
|
||||
}),o+="';\n",i||(i="obj",o="with("+i+"||{}){"+o+"}"),o="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+o+"return __p}";try{var f=Function("_","return "+o)(u)}catch(c){throw c.source=o,c}return t?f(t):(f.source=o,f)},u.unescape=function(n){return n==J?"":(n+"").replace(tt,p)},u.uniqueId=function(n){var t=++Y+"";return n?n+t:t},u.all=O,u.any=D,u.detect=S,u.foldl=R,u.foldr=q,u.include=x,u.inject=R,u.first=T,u.last=function(n,t,r){if(n){var e=0,u=n.length;
|
||||
if(typeof t!="number"&&t!=J){var o=u;for(t=V(t,r);o--&&t(n[o],o,n);)e++}else if(e=t,e==J||r)return n[u-1];return Ot.call(n,Rt(0,u-e))}},u.take=T,u.head=T,u.chain=function(n){return n=new c(n),n.__chain__=H,n},u.VERSION="1.1.1",G(u),u.prototype.chain=function(){return this.__chain__=H,this},u.prototype.value=function(){return this.__wrapped__},N("pop push reverse shift sort splice unshift".split(" "),function(n){var t=ht[n];u.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!Tt.spliceObjects&&0===n.length&&delete n[0],this
|
||||
}}),N(["concat","join","slice"],function(n){var t=ht[n];u.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new c(n),n.__chain__=H),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=u,define(function(){return u})):L&&!L.nodeType?Q?(Q.exports=u)._=u:L._=u:n._=u})(this);
|
||||
191
doc/README.md
191
doc/README.md
@@ -95,14 +95,14 @@
|
||||
* [`_.bindKey`](#_bindkeyobject-key--arg1-arg2-)
|
||||
* [`_.compose`](#_composefunc1-func2-)
|
||||
* [`_.createCallback`](#_createcallbackfuncidentity-thisarg-argcount3)
|
||||
* [`_.debounce`](#_debouncefunc-wait-immediate)
|
||||
* [`_.debounce`](#_debouncefunc-wait-options)
|
||||
* [`_.defer`](#_deferfunc--arg1-arg2-)
|
||||
* [`_.delay`](#_delayfunc-wait--arg1-arg2-)
|
||||
* [`_.memoize`](#_memoizefunc--resolver)
|
||||
* [`_.once`](#_oncefunc)
|
||||
* [`_.partial`](#_partialfunc--arg1-arg2-)
|
||||
* [`_.partialRight`](#_partialrightfunc--arg1-arg2-)
|
||||
* [`_.throttle`](#_throttlefunc-wait)
|
||||
* [`_.throttle`](#_throttlefunc-wait-options)
|
||||
* [`_.wrap`](#_wrapvalue-wrapper)
|
||||
|
||||
<!-- /div -->
|
||||
@@ -214,7 +214,7 @@
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_compactarray"></a>`_.compact(array)`
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3257 "View in source") [Ⓣ][1]
|
||||
<a href="#_compactarray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3259 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all falsey values of `array` removed. The values `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey.
|
||||
|
||||
@@ -238,7 +238,7 @@ _.compact([0, 1, false, 2, '', 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_differencearray--array1-array2-"></a>`_.difference(array [, array1, array2, ...])`
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3287 "View in source") [Ⓣ][1]
|
||||
<a href="#_differencearray--array1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3289 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of `array` elements not present in the other arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -263,7 +263,7 @@ _.difference([1, 2, 3, 4, 5], [5, 2, 10]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findindexarray--callbackidentity-thisarg"></a>`_.findIndex(array [, callback=identity, thisArg])`
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3323 "View in source") [Ⓣ][1]
|
||||
<a href="#_findindexarray--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3325 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the index of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -291,7 +291,7 @@ _.findIndex(['apple', 'banana', 'beet'], function(food) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_firstarray--callbackn-thisarg"></a>`_.first(array [, callback|n, thisArg])`
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3393 "View in source") [Ⓣ][1]
|
||||
<a href="#_firstarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3395 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the first element of the `array`. If a number `n` is passed, the first `n` elements of the `array` are returned. If a `callback` function is passed, elements at the beginning of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -351,7 +351,7 @@ _.first(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_flattenarray--isshallowfalse-callbackidentity-thisarg"></a>`_.flatten(array [, isShallow=false, callback=identity, thisArg])`
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3455 "View in source") [Ⓣ][1]
|
||||
<a href="#_flattenarray--isshallowfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3457 "View in source") [Ⓣ][1]
|
||||
|
||||
Flattens a nested array *(the nesting can be to any depth)*. If `isShallow` is truthy, `array` will only be flattened a single level. If `callback` is passed, each element of `array` is passed through a callback` before flattening. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -394,7 +394,7 @@ _.flatten(stooges, 'quotes');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_indexofarray-value--fromindex0"></a>`_.indexOf(array, value [, fromIndex=0])`
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3508 "View in source") [Ⓣ][1]
|
||||
<a href="#_indexofarray-value--fromindex0">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3510 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the first occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` for `fromIndex` will run a faster binary search.
|
||||
|
||||
@@ -426,7 +426,7 @@ _.indexOf([1, 1, 2, 2, 3, 3], 2, true);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_initialarray--callbackn1-thisarg"></a>`_.initial(array [, callback|n=1, thisArg])`
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3582 "View in source") [Ⓣ][1]
|
||||
<a href="#_initialarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3584 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets all but the last element of `array`. If a number `n` is passed, the last `n` elements are excluded from the result. If a `callback` function is passed, elements at the end of the array are excluded from the result as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, array)*.
|
||||
|
||||
@@ -483,7 +483,7 @@ _.initial(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_intersectionarray1-array2-"></a>`_.intersection([array1, array2, ...])`
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3616 "View in source") [Ⓣ][1]
|
||||
<a href="#_intersectionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3618 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the intersection of all the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -507,7 +507,7 @@ _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastarray--callbackn-thisarg"></a>`_.last(array [, callback|n, thisArg])`
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3708 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastarray--callbackn-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3710 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the last element of the `array`. If a number `n` is passed, the last `n` elements of the `array` are returned. If a `callback` function is passed, elements at the end of the array are returned as long as the `callback` returns truthy. The `callback` is bound to `thisArg` and invoked with three arguments;(value, index, array).
|
||||
|
||||
@@ -564,7 +564,7 @@ _.last(food, { 'type': 'vegetable' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_lastindexofarray-value--fromindexarraylength-1"></a>`_.lastIndexOf(array, value [, fromIndex=array.length-1])`
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3749 "View in source") [Ⓣ][1]
|
||||
<a href="#_lastindexofarray-value--fromindexarraylength-1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3751 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the index at which the last occurrence of `value` is found using strict equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used as the offset from the end of the collection.
|
||||
|
||||
@@ -593,7 +593,7 @@ _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rangestart0-end--step1"></a>`_.range([start=0], end [, step=1])`
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3790 "View in source") [Ⓣ][1]
|
||||
<a href="#_rangestart0-end--step1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3792 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of numbers *(positive and/or negative)* progressing from `start` up to but not including `end`.
|
||||
|
||||
@@ -631,7 +631,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#L3869 "View in source") [Ⓣ][1]
|
||||
<a href="#_restarray--callbackn1-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3871 "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)*.
|
||||
|
||||
@@ -691,7 +691,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#L3933 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortedindexarray-value--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3935 "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)*.
|
||||
|
||||
@@ -740,7 +740,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#L3965 "View in source") [Ⓣ][1]
|
||||
<a href="#_unionarray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3967 "View in source") [Ⓣ][1]
|
||||
|
||||
Computes the union of the passed-in arrays using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -764,7 +764,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#L4012 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqarray--issortedfalse-callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4014 "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)*.
|
||||
|
||||
@@ -811,7 +811,7 @@ _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_unziparray"></a>`_.unzip(array)`
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4070 "View in source") [Ⓣ][1]
|
||||
<a href="#_unziparray">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4072 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.zip`, this method splits groups of elements into arrays composed of elements from each group at their corresponding indexes.
|
||||
|
||||
@@ -835,7 +835,7 @@ _.unzip([['moe', 30, true], ['larry', 40, false]]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_withoutarray--value1-value2-"></a>`_.without(array [, value1, value2, ...])`
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4102 "View in source") [Ⓣ][1]
|
||||
<a href="#_withoutarray--value1-value2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4104 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array with all occurrences of the passed values removed using strict equality for comparisons, i.e. `===`.
|
||||
|
||||
@@ -860,7 +860,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#L4133 "View in source") [Ⓣ][1]
|
||||
<a href="#_ziparray1-array2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4135 "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.
|
||||
|
||||
@@ -884,7 +884,7 @@ _.zip(['moe', 'larry'], [30, 40], [true, false]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_zipobjectkeys--values"></a>`_.zipObject(keys [, values=[]])`
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4162 "View in source") [Ⓣ][1]
|
||||
<a href="#_zipobjectkeys--values">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4164 "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`.
|
||||
|
||||
@@ -950,7 +950,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#L5187 "View in source") [Ⓣ][1]
|
||||
<a href="#_tapvalue-interceptor">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5216 "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.
|
||||
|
||||
@@ -980,7 +980,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#L5204 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypetostring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5233 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces the `toString` result of the wrapped value.
|
||||
|
||||
@@ -1001,7 +1001,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#L5221 "View in source") [Ⓣ][1]
|
||||
<a href="#_prototypevalueof">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5250 "View in source") [Ⓣ][1]
|
||||
|
||||
Extracts the wrapped value.
|
||||
|
||||
@@ -1226,7 +1226,7 @@ _.filter(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findcollection--callbackidentity-thisarg"></a>`_.find(collection [, callback=identity, thisArg])`
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2522 "View in source") [Ⓣ][1]
|
||||
<a href="#_findcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2524 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning the first that the `callback` returns truthy for. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1247,7 +1247,9 @@ If an object is passed for `callback`, the created "_.where" style callback will
|
||||
|
||||
#### Example
|
||||
```js
|
||||
_.find([1, 2, 3, 4], function(num) { return num % 2 == 0; });
|
||||
_.find([1, 2, 3, 4], function(num) {
|
||||
return num % 2 == 0;
|
||||
});
|
||||
// => 2
|
||||
|
||||
var food = [
|
||||
@@ -1273,7 +1275,7 @@ _.find(food, 'organic');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_foreachcollection--callbackidentity-thisarg"></a>`_.forEach(collection [, callback=identity, thisArg])`
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2569 "View in source") [Ⓣ][1]
|
||||
<a href="#_foreachcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2571 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over a `collection`, executing the `callback` for each element in the `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -1305,7 +1307,7 @@ _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_groupbycollection--callbackidentity-thisarg"></a>`_.groupBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2619 "View in source") [Ⓣ][1]
|
||||
<a href="#_groupbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2621 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of keys returned from running each element of the `collection` through the `callback`. The corresponding value of each key is an array of elements passed to `callback` that returned the key. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1342,7 +1344,7 @@ _.groupBy(['one', 'two', 'three'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invokecollection-methodname--arg1-arg2-"></a>`_.invoke(collection, methodName [, arg1, arg2, ...])`
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2652 "View in source") [Ⓣ][1]
|
||||
<a href="#_invokecollection-methodname--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2654 "View in source") [Ⓣ][1]
|
||||
|
||||
Invokes the method named by `methodName` on each element in the `collection`, returning an array of the results of each invoked method. Additional arguments will be passed to each invoked method. If `methodName` is a function, it will be invoked for, and `this` bound to, each element in the `collection`.
|
||||
|
||||
@@ -1371,7 +1373,7 @@ _.invoke([123, 456], String.prototype.split, '');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mapcollection--callbackidentity-thisarg"></a>`_.map(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2704 "View in source") [Ⓣ][1]
|
||||
<a href="#_mapcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2706 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of values by running each element in the `collection` through the `callback`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1416,7 +1418,7 @@ _.map(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_maxcollection--callbackidentity-thisarg"></a>`_.max(collection [, callback=identity, thisArg])`
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2761 "View in source") [Ⓣ][1]
|
||||
<a href="#_maxcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2763 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the maximum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1458,7 +1460,7 @@ _.max(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mincollection--callbackidentity-thisarg"></a>`_.min(collection [, callback=identity, thisArg])`
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2830 "View in source") [Ⓣ][1]
|
||||
<a href="#_mincollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2832 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the minimum value of an `array`. If `callback` is passed, it will be executed for each value in the `array` to generate the criterion by which the value is ranked. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index, collection)*.
|
||||
|
||||
@@ -1500,7 +1502,7 @@ _.min(stooges, 'age');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_pluckcollection-property"></a>`_.pluck(collection, property)`
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2880 "View in source") [Ⓣ][1]
|
||||
<a href="#_pluckcollection-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2882 "View in source") [Ⓣ][1]
|
||||
|
||||
Retrieves the value of a specified property from all elements in the `collection`.
|
||||
|
||||
@@ -1530,7 +1532,7 @@ _.pluck(stooges, 'name');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducecollection--callbackidentity-accumulator-thisarg"></a>`_.reduce(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2912 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducecollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2914 "View in source") [Ⓣ][1]
|
||||
|
||||
Reduces a `collection` to a value that is the accumulated result of running each element in the `collection` through the `callback`, where each successive `callback` execution consumes the return value of the previous execution. If `accumulator` is not passed, the first element of the `collection` will be used as the initial `accumulator` value. The `callback` is bound to `thisArg` and invoked with four arguments; *(accumulator, value, index|key, collection)*.
|
||||
|
||||
@@ -1568,7 +1570,7 @@ var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_reducerightcollection--callbackidentity-accumulator-thisarg"></a>`_.reduceRight(collection [, callback=identity, accumulator, thisArg])`
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2955 "View in source") [Ⓣ][1]
|
||||
<a href="#_reducerightcollection--callbackidentity-accumulator-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L2957 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.reduce`, except that it iterates over a `collection` from right to left.
|
||||
|
||||
@@ -1599,7 +1601,7 @@ var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_rejectcollection--callbackidentity-thisarg"></a>`_.reject(collection [, callback=identity, thisArg])`
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3015 "View in source") [Ⓣ][1]
|
||||
<a href="#_rejectcollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3017 "View in source") [Ⓣ][1]
|
||||
|
||||
The opposite of `_.filter`, this method returns the elements of a `collection` that `callback` does **not** return truthy for.
|
||||
|
||||
@@ -1642,7 +1644,7 @@ _.reject(food, { 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_shufflecollection"></a>`_.shuffle(collection)`
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3036 "View in source") [Ⓣ][1]
|
||||
<a href="#_shufflecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3038 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of shuffled `array` values, using a version of the Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle.
|
||||
|
||||
@@ -1666,7 +1668,7 @@ _.shuffle([1, 2, 3, 4, 5, 6]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sizecollection"></a>`_.size(collection)`
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3069 "View in source") [Ⓣ][1]
|
||||
<a href="#_sizecollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3071 "View in source") [Ⓣ][1]
|
||||
|
||||
Gets the size of the `collection` by returning `collection.length` for arrays and array-like objects or the number of own enumerable properties for objects.
|
||||
|
||||
@@ -1696,7 +1698,7 @@ _.size('curly');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_somecollection--callbackidentity-thisarg"></a>`_.some(collection [, callback=identity, thisArg])`
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3116 "View in source") [Ⓣ][1]
|
||||
<a href="#_somecollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3118 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the `callback` returns a truthy value for **any** element of a `collection`. The function returns as soon as it finds passing value, and does not iterate over the entire `collection`. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1742,7 +1744,7 @@ _.some(food, { 'type': 'meat' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_sortbycollection--callbackidentity-thisarg"></a>`_.sortBy(collection [, callback=identity, thisArg])`
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3172 "View in source") [Ⓣ][1]
|
||||
<a href="#_sortbycollection--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3174 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array of elements, sorted in ascending order by the results of running each element in the `collection` through the `callback`. This method performs a stable sort, that is, it will preserve the original sort order of equal elements. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, index|key, collection)*.
|
||||
|
||||
@@ -1779,7 +1781,7 @@ _.sortBy(['banana', 'strawberry', 'apple'], 'length');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_toarraycollection"></a>`_.toArray(collection)`
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3207 "View in source") [Ⓣ][1]
|
||||
<a href="#_toarraycollection">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3209 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the `collection` to an array.
|
||||
|
||||
@@ -1803,7 +1805,7 @@ Converts the `collection` to an array.
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_wherecollection-properties"></a>`_.where(collection, properties)`
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3239 "View in source") [Ⓣ][1]
|
||||
<a href="#_wherecollection-properties">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L3241 "View in source") [Ⓣ][1]
|
||||
|
||||
Examines each element in a `collection`, returning an array of all elements that have the given `properties`. When checking `properties`, this method performs a deep comparison between values to determine if they are equivalent to each other.
|
||||
|
||||
@@ -1840,7 +1842,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#L4202 "View in source") [Ⓣ][1]
|
||||
<a href="#_aftern-func">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4204 "View in source") [Ⓣ][1]
|
||||
|
||||
If `n` is greater than `0`, a function is created that is restricted to executing `func`, with the `this` binding and arguments of the created function, only after it is called `n` times. If `n` is less than `1`, `func` is executed immediately, without a `this` binding or additional arguments, and its result is returned.
|
||||
|
||||
@@ -1868,7 +1870,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#L4235 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindfunc--thisarg-arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4237 "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.
|
||||
|
||||
@@ -1899,7 +1901,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#L4266 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindallobject--methodname1-methodname2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4268 "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.
|
||||
|
||||
@@ -1930,7 +1932,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#L4312 "View in source") [Ⓣ][1]
|
||||
<a href="#_bindkeyobject-key--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4314 "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.
|
||||
|
||||
@@ -1971,7 +1973,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#L4335 "View in source") [Ⓣ][1]
|
||||
<a href="#_composefunc1-func2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4337 "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.
|
||||
|
||||
@@ -1998,7 +2000,7 @@ welcome('moe');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_createcallbackfuncidentity-thisarg-argcount3"></a>`_.createCallback([func=identity, thisArg, argCount=3])`
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4394 "View in source") [Ⓣ][1]
|
||||
<a href="#_createcallbackfuncidentity-thisarg-argcount3">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4396 "View in source") [Ⓣ][1]
|
||||
|
||||
Produces a callback bound to an optional `thisArg`. If `func` is a property name, the created callback will return the property value for a given element. If `func` is an object, the created callback will return `true` for elements that contain the equivalent object properties, otherwise it will return `false`.
|
||||
|
||||
@@ -2051,15 +2053,15 @@ _.toLookup(stooges, 'name');
|
||||
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_debouncefunc-wait-immediate"></a>`_.debounce(func, wait, immediate)`
|
||||
<a href="#_debouncefunc-wait-immediate">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4460 "View in source") [Ⓣ][1]
|
||||
### <a id="_debouncefunc-wait-options"></a>`_.debounce(func, wait, options)`
|
||||
<a href="#_debouncefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4463 "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.
|
||||
Creates a function that will delay the execution of `func` until after `wait` milliseconds have elapsed since the last time it was invoked. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the debounced function will return the result of the last `func` call.
|
||||
|
||||
#### Arguments
|
||||
1. `func` *(Function)*: The function to debounce.
|
||||
2. `wait` *(Number)*: The number of milliseconds to delay.
|
||||
3. `immediate` *(Boolean)*: A flag to indicate execution is on the leading edge of the timeout.
|
||||
3. `options` *(Object)*: The options object. [leading=false] A boolean to specify execution on the leading edge of the timeout. [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
|
||||
#### Returns
|
||||
*(Function)*: Returns the new debounced function.
|
||||
@@ -2078,7 +2080,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#L4502 "View in source") [Ⓣ][1]
|
||||
<a href="#_deferfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4513 "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.
|
||||
|
||||
@@ -2103,7 +2105,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#L4528 "View in source") [Ⓣ][1]
|
||||
<a href="#_delayfunc-wait--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4539 "View in source") [Ⓣ][1]
|
||||
|
||||
Executes the `func` function after `wait` milliseconds. Additional arguments will be passed to `func` when it is invoked.
|
||||
|
||||
@@ -2130,7 +2132,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#L4552 "View in source") [Ⓣ][1]
|
||||
<a href="#_memoizefunc--resolver">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4563 "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.
|
||||
|
||||
@@ -2156,7 +2158,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#L4579 "View in source") [Ⓣ][1]
|
||||
<a href="#_oncefunc">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4590 "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.
|
||||
|
||||
@@ -2182,7 +2184,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#L4614 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4625 "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.
|
||||
|
||||
@@ -2209,7 +2211,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#L4645 "View in source") [Ⓣ][1]
|
||||
<a href="#_partialrightfunc--arg1-arg2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4656 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.partial`, except that `partial` arguments are appended to those passed to the new function.
|
||||
|
||||
@@ -2245,14 +2247,15 @@ 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#L4667 "View in source") [Ⓣ][1]
|
||||
### <a id="_throttlefunc-wait-options"></a>`_.throttle(func, wait, options)`
|
||||
<a href="#_throttlefunc-wait-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4683 "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.
|
||||
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. Pass an `options` object to indicate that `func` should be invoked on the leading and/or trailing edge of the `wait` timeout. Subsequent calls to the throttled function will return the result of the last `func` call.
|
||||
|
||||
#### Arguments
|
||||
1. `func` *(Function)*: The function to throttle.
|
||||
2. `wait` *(Number)*: The number of milliseconds to throttle executions to.
|
||||
3. `options` *(Object)*: The options object. [leading=true] A boolean to specify execution on the leading edge of the timeout. [trailing=true] A boolean to specify execution on the trailing edge of the timeout.
|
||||
|
||||
#### Returns
|
||||
*(Function)*: Returns the new throttled function.
|
||||
@@ -2271,7 +2274,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#L4720 "View in source") [Ⓣ][1]
|
||||
<a href="#_wrapvalue-wrapper">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4749 "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.
|
||||
|
||||
@@ -2307,7 +2310,7 @@ hello();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_assignobject--source1-source2--callback-thisarg"></a>`_.assign(object [, source1, source2, ..., callback, thisArg])`
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1053 "View in source") [Ⓣ][1]
|
||||
<a href="#_assignobject--source1-source2--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1054 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object. Subsequent sources will overwrite property assignments of previous sources. If a `callback` function is passed, it will be executed to produce the assigned values. The `callback` is bound to `thisArg` and invoked with two arguments; *(objectValue, sourceValue)*.
|
||||
|
||||
@@ -2345,7 +2348,7 @@ defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonevalue--deepfalse-callback-thisarg"></a>`_.clone(value [, deep=false, callback, thisArg])`
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1108 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonevalue--deepfalse-callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1109 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a clone of `value`. If `deep` is `true`, nested objects will also be cloned, otherwise they will be assigned by reference. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2392,7 +2395,7 @@ clone.childNodes.length;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_clonedeepvalue--callback-thisarg"></a>`_.cloneDeep(value [, callback, thisArg])`
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1233 "View in source") [Ⓣ][1]
|
||||
<a href="#_clonedeepvalue--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1234 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a deep clone of `value`. If a `callback` function is passed, it will be executed to produce the cloned values. If `callback` returns `undefined`, cloning will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with one argument; *(value)*.
|
||||
|
||||
@@ -2438,7 +2441,7 @@ clone.node == view.node;
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_defaultsobject--source1-source2-"></a>`_.defaults(object [, source1, source2, ...])`
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1257 "View in source") [Ⓣ][1]
|
||||
<a href="#_defaultsobject--source1-source2-">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1258 "View in source") [Ⓣ][1]
|
||||
|
||||
Assigns own enumerable properties of source object(s) to the destination object for all destination properties that resolve to `undefined`. Once a property is set, additional defaults of the same property will be ignored.
|
||||
|
||||
@@ -2464,7 +2467,7 @@ _.defaults(food, { 'name': 'banana', 'type': 'fruit' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_findkeyobject--callbackidentity-thisarg"></a>`_.findKey(object [, callback=identity, thisArg])`
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1278 "View in source") [Ⓣ][1]
|
||||
<a href="#_findkeyobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1281 "View in source") [Ⓣ][1]
|
||||
|
||||
This method is similar to `_.find`, except that it returns the key of the element that passes the callback check, instead of the element itself.
|
||||
|
||||
@@ -2478,7 +2481,9 @@ This method is similar to `_.find`, except that it returns the key of the elemen
|
||||
|
||||
#### Example
|
||||
```js
|
||||
_.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; });
|
||||
_.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) {
|
||||
return num % 2 == 0;
|
||||
});
|
||||
// => 'b'
|
||||
```
|
||||
|
||||
@@ -2490,7 +2495,7 @@ _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 ==
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forinobject--callbackidentity-thisarg"></a>`_.forIn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1319 "View in source") [Ⓣ][1]
|
||||
<a href="#_forinobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1322 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over `object`'s own and inherited enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2526,7 +2531,7 @@ _.forIn(new Dog('Dagny'), function(value, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_forownobject--callbackidentity-thisarg"></a>`_.forOwn(object [, callback=identity, thisArg])`
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1344 "View in source") [Ⓣ][1]
|
||||
<a href="#_forownobject--callbackidentity-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1347 "View in source") [Ⓣ][1]
|
||||
|
||||
Iterates over an object's own enumerable properties, executing the `callback` for each property. The `callback` is bound to `thisArg` and invoked with three arguments; *(value, key, object)*. Callbacks may exit iteration early by explicitly returning `false`.
|
||||
|
||||
@@ -2554,7 +2559,7 @@ _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) {
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_functionsobject"></a>`_.functions(object)`
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1361 "View in source") [Ⓣ][1]
|
||||
<a href="#_functionsobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1364 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates a sorted array of all enumerable properties, own and inherited, of `object` that have function values.
|
||||
|
||||
@@ -2581,7 +2586,7 @@ _.functions(_);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_hasobject-property"></a>`_.has(object, property)`
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1386 "View in source") [Ⓣ][1]
|
||||
<a href="#_hasobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1389 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if the specified object `property` exists and is a direct property, instead of an inherited property.
|
||||
|
||||
@@ -2606,7 +2611,7 @@ _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_invertobject"></a>`_.invert(object)`
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1403 "View in source") [Ⓣ][1]
|
||||
<a href="#_invertobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1406 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an object composed of the inverted keys and values of the given `object`.
|
||||
|
||||
@@ -2630,7 +2635,7 @@ _.invert({ 'first': 'moe', 'second': 'larry' });
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isargumentsvalue"></a>`_.isArguments(value)`
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L913 "View in source") [Ⓣ][1]
|
||||
<a href="#_isargumentsvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L914 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an `arguments` object.
|
||||
|
||||
@@ -2657,7 +2662,7 @@ _.isArguments([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isarrayvalue"></a>`_.isArray(value)`
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L939 "View in source") [Ⓣ][1]
|
||||
<a href="#_isarrayvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L940 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is an array.
|
||||
|
||||
@@ -2684,7 +2689,7 @@ _.isArray([1, 2, 3]);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isbooleanvalue"></a>`_.isBoolean(value)`
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1429 "View in source") [Ⓣ][1]
|
||||
<a href="#_isbooleanvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1432 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a boolean value.
|
||||
|
||||
@@ -2708,7 +2713,7 @@ _.isBoolean(null);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isdatevalue"></a>`_.isDate(value)`
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1446 "View in source") [Ⓣ][1]
|
||||
<a href="#_isdatevalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1449 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a date.
|
||||
|
||||
@@ -2732,7 +2737,7 @@ _.isDate(new Date);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_iselementvalue"></a>`_.isElement(value)`
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1463 "View in source") [Ⓣ][1]
|
||||
<a href="#_iselementvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1466 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is a DOM element.
|
||||
|
||||
@@ -2756,7 +2761,7 @@ _.isElement(document.body);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isemptyvalue"></a>`_.isEmpty(value)`
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1488 "View in source") [Ⓣ][1]
|
||||
<a href="#_isemptyvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1491 "View in source") [Ⓣ][1]
|
||||
|
||||
Checks if `value` is empty. Arrays, strings, or `arguments` objects with a length of `0` and objects with no own enumerable properties are considered "empty".
|
||||
|
||||
@@ -2786,7 +2791,7 @@ _.isEmpty('');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_isequala-b--callback-thisarg"></a>`_.isEqual(a, b [, callback, thisArg])`
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1547 "View in source") [Ⓣ][1]
|
||||
<a href="#_isequala-b--callback-thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L1550 "View in source") [Ⓣ][1]
|
||||
|
||||
Performs a deep comparison between two values to determine if they are equivalent to each other. If `callback` is passed, it will be executed to compare values. If `callback` returns `undefined`, comparisons will be handled by the method instead. The `callback` is bound to `thisArg` and invoked with two arguments; *(a, b)*.
|
||||
|
||||
@@ -3116,7 +3121,7 @@ _.isUndefined(void 0);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_keysobject"></a>`_.keys(object)`
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L975 "View in source") [Ⓣ][1]
|
||||
<a href="#_keysobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L976 "View in source") [Ⓣ][1]
|
||||
|
||||
Creates an array composed of the own enumerable property names of `object`.
|
||||
|
||||
@@ -3313,7 +3318,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#L4744 "View in source") [Ⓣ][1]
|
||||
<a href="#_escapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4773 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding HTML entities.
|
||||
|
||||
@@ -3337,7 +3342,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#L4762 "View in source") [Ⓣ][1]
|
||||
<a href="#_identityvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4791 "View in source") [Ⓣ][1]
|
||||
|
||||
This function returns the first argument passed to it.
|
||||
|
||||
@@ -3362,7 +3367,7 @@ moe === _.identity(moe);
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_mixinobject"></a>`_.mixin(object)`
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4788 "View in source") [Ⓣ][1]
|
||||
<a href="#_mixinobject">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4817 "View in source") [Ⓣ][1]
|
||||
|
||||
Adds functions properties of `object` to the `lodash` function and chainable wrapper.
|
||||
|
||||
@@ -3392,7 +3397,7 @@ _('moe').capitalize();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_noconflict"></a>`_.noConflict()`
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4817 "View in source") [Ⓣ][1]
|
||||
<a href="#_noconflict">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4846 "View in source") [Ⓣ][1]
|
||||
|
||||
Reverts the '_' variable to its previous value and returns a reference to the `lodash` function.
|
||||
|
||||
@@ -3412,7 +3417,7 @@ var lodash = _.noConflict();
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_parseintvalue"></a>`_.parseInt(value)`
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4838 "View in source") [Ⓣ][1]
|
||||
<a href="#_parseintvalue">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4867 "View in source") [Ⓣ][1]
|
||||
|
||||
Converts the given `value` into an integer of the specified `radix`.
|
||||
|
||||
@@ -3438,7 +3443,7 @@ _.parseInt('08');
|
||||
<!-- div -->
|
||||
|
||||
### <a id="_randommin0-max1"></a>`_.random([min=0, max=1])`
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4861 "View in source") [Ⓣ][1]
|
||||
<a href="#_randommin0-max1">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4890 "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.
|
||||
|
||||
@@ -3466,7 +3471,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#L4900 "View in source") [Ⓣ][1]
|
||||
<a href="#_resultobject-property">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L4929 "View in source") [Ⓣ][1]
|
||||
|
||||
Resolves the value of `property` on `object`. If `property` is a function, it will be invoked with the `this` binding of `object` and its result returned, else the property value is returned. If `object` is falsey, then `undefined` is returned.
|
||||
|
||||
@@ -3519,7 +3524,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#L4987 "View in source") [Ⓣ][1]
|
||||
<a href="#_templatetext-data-options">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5016 "View in source") [Ⓣ][1]
|
||||
|
||||
A micro-templating method that handles arbitrary delimiters, preserves whitespace, and correctly escapes quotes within interpolated code.
|
||||
|
||||
@@ -3603,7 +3608,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#L5112 "View in source") [Ⓣ][1]
|
||||
<a href="#_timesn-callback--thisarg">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5141 "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)*.
|
||||
|
||||
@@ -3635,7 +3640,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#L5139 "View in source") [Ⓣ][1]
|
||||
<a href="#_unescapestring">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5168 "View in source") [Ⓣ][1]
|
||||
|
||||
The inverse of `_.escape`, this method converts the HTML entities `&`, `<`, `>`, `"`, and `'` in `string` to their corresponding characters.
|
||||
|
||||
@@ -3659,7 +3664,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#L5159 "View in source") [Ⓣ][1]
|
||||
<a href="#_uniqueidprefix">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5188 "View in source") [Ⓣ][1]
|
||||
|
||||
Generates a unique ID. If `prefix` is passed, the ID will be appended to it.
|
||||
|
||||
@@ -3712,7 +3717,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#L5396 "View in source") [Ⓣ][1]
|
||||
<a href="#_version">#</a> [Ⓢ](https://github.com/bestiejs/lodash/blob/master/lodash.js#L5425 "View in source") [Ⓣ][1]
|
||||
|
||||
*(String)*: The semantic version number.
|
||||
|
||||
|
||||
2
vendor/benchmark.js/README.md
vendored
2
vendor/benchmark.js/README.md
vendored
@@ -15,7 +15,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/best
|
||||
|
||||
## Support
|
||||
|
||||
Benchmark.js has been tested in at least Chrome 5~25, Firefox 1~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.1, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
Benchmark.js has been tested in at least Chrome 5~26, Firefox 1~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.3, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Installation and usage
|
||||
|
||||
|
||||
12
vendor/benchmark.js/benchmark.js
vendored
12
vendor/benchmark.js/benchmark.js
vendored
@@ -21,9 +21,9 @@
|
||||
/** Detect free variable `require` */
|
||||
var freeRequire = typeof require == 'function' && require;
|
||||
|
||||
/** Detect free variable `global` and use it as `window` */
|
||||
/** Detect free variable `global`, from Node.js or Browserified code, and use it as `window` */
|
||||
var freeGlobal = typeof global == 'object' && global;
|
||||
if (freeGlobal.global === freeGlobal) {
|
||||
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||
window = freeGlobal;
|
||||
}
|
||||
|
||||
@@ -738,13 +738,7 @@
|
||||
cycle(deferred);
|
||||
}
|
||||
else if (++deferred.cycles < clone.count) {
|
||||
// continue the test loop
|
||||
if (support.timeout) {
|
||||
// use setTimeout to avoid a call stack overflow if called recursively
|
||||
setTimeout(function() { clone.compiled.call(deferred, context, timer); }, 0);
|
||||
} else {
|
||||
clone.compiled.call(deferred, context, timer);
|
||||
}
|
||||
clone.compiled.call(deferred, context, timer);
|
||||
}
|
||||
else {
|
||||
timer.stop(deferred);
|
||||
|
||||
2
vendor/platform.js/README.md
vendored
2
vendor/platform.js/README.md
vendored
@@ -18,7 +18,7 @@ For a list of upcoming features, check out our [roadmap](https://github.com/best
|
||||
|
||||
## Support
|
||||
|
||||
Platform.js has been tested in at least Chrome 5~25, Firefox 1~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.1, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
Platform.js has been tested in at least Chrome 5~26, Firefox 1~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.3, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Installation and usage
|
||||
|
||||
|
||||
2
vendor/qunit-clib/README.md
vendored
2
vendor/qunit-clib/README.md
vendored
@@ -9,7 +9,7 @@ QUnit CLIB helps extend QUnit’s CLI support to many common CLI environments.
|
||||
|
||||
## Support
|
||||
|
||||
QUnit CLIB has been tested in at least Node.js 0.4.8-0.10.1, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
QUnit CLIB has been tested in at least Node.js 0.4.8-0.10.3, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Usage
|
||||
|
||||
|
||||
4
vendor/qunit-clib/qunit-clib.js
vendored
4
vendor/qunit-clib/qunit-clib.js
vendored
@@ -10,9 +10,9 @@
|
||||
/** Detect free variable `exports` */
|
||||
var freeExports = typeof exports == 'object' && exports;
|
||||
|
||||
/** Detect free variable `global` and use it as `window` */
|
||||
/** Detect free variable `global`, from Node.js or Browserified code, and use it as `window` */
|
||||
var freeGlobal = typeof global == 'object' && global;
|
||||
if (freeGlobal.global === freeGlobal) {
|
||||
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||
window = freeGlobal;
|
||||
}
|
||||
|
||||
|
||||
2
vendor/underscore/underscore-min.js
vendored
2
vendor/underscore/underscore-min.js
vendored
File diff suppressed because one or more lines are too long
14
vendor/underscore/underscore.js
vendored
14
vendor/underscore/underscore.js
vendored
@@ -506,16 +506,8 @@
|
||||
// `[['a',1],['b',2],['c',3]]` returns the array
|
||||
// [['a','b','c'],[1,2,3]].
|
||||
_.unzip = function(tuples) {
|
||||
var results = [];
|
||||
_.each(tuples, function (tuple, tupleIndex) {
|
||||
_.each(tuple, function (value, itemIndex) {
|
||||
if (results.length <= itemIndex) {
|
||||
results[itemIndex] = [];
|
||||
}
|
||||
results[itemIndex][tupleIndex] = value;
|
||||
});
|
||||
});
|
||||
return results;
|
||||
var maxLen = _.max(_.pluck(tuples, "length"))
|
||||
return _.times(maxLen, _.partial(_.pluck, tuples));
|
||||
};
|
||||
|
||||
// Converts lists into objects. Pass either a single array of `[key, value]`
|
||||
@@ -1043,7 +1035,7 @@
|
||||
|
||||
// Run a function **n** times.
|
||||
_.times = function(n, iterator, context) {
|
||||
var accum = Array(n);
|
||||
var accum = Array(Math.max(0, n));
|
||||
for (var i = 0; i < n; i++) accum[i] = iterator.call(context, i);
|
||||
return accum;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user