/** * @license * Lo-Dash 2.2.1 (Custom Build) lodash.com/license | Underscore.js 1.5.2 underscorejs.org/LICENSE * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` */ ;(function(){function n(n,r,t){t=(t||0)-1;for(var e=n?n.length:0;++te||typeof t=="undefined")return 1;if(tt?0:t);++eu(f,c))&&(t&&f.push(c),i.push(a))}return i}function g(n){return function(r,t,e){var u={};t=Q(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++eu&&(u=t);else r=null==r&&O(n)?charAtCallback:Q(r,t,3),F(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function M(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number")for(var u=Array(e);++targuments.length;r=a(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++oarguments.length;return r=a(r,e,4),q(n,function(n,e,o){t=u?(u=!1,n):r(t,n,e,o)}),t}function z(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return F(n,function(n){var t;t=++r,t=0+Or(Wr()*(t-0+1)),e[r]=e[t],e[t]=n}),e}function C(n,r,t){var e;r=Q(r,t,3),t=-1; var u=n?n.length:0;if(typeof u=="number")for(;++tt(u,i)&&o.push(i)}return o}function V(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=-1;for(r=Q(r,t,3);++ie?Mr(0,u+e):e||0}else if(e)return e=J(r,t),r[e]===t?e:-1;return n(r,t,e)}function H(n,r,t){if(typeof r!="number"&&null!=r){var u=0,o=-1,i=n?n.length:0;for(r=Q(r,t,3);++o>>1,t(n[e])/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Br||(f=function(){function n(){}return function(r){if(E(r)){n.prototype=r;var t=new n;n.prototype=null}return t||yr.Object()}}()),_(arguments)||(_=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Sr.call(n,"callee")&&!Rr.call(n,"callee")||!1});var Cr=Fr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Ar.call(n)==fr||!1 },Pr=function(n){var r,t=[];if(!n||!hr[typeof n])return t;for(r in n)Sr.call(n,r)&&t.push(r);return t},Ur=Ir?function(n){return E(n)?Ir(n):[]}:Pr,Vr={"&":"&","<":"<",">":">",'"':""","'":"'"},Gr=j(Vr),Hr=RegExp("("+Ur(Gr).join("|")+")","g"),Jr=RegExp("["+Ur(Vr).join("")+"]","g"),Kr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(r(n[t],t,n)===tr)break;return n},Lr=function(n,r){var t;if(!n||!hr[typeof n])return n;for(t in n)if(Sr.call(n,t)&&r(n[t],t,n)===tr)break; return n};A(/x/)&&(A=function(n){return typeof n=="function"&&"[object Function]"==Ar.call(n)});var Qr=g(function(n,r,t){Sr.call(n,t)?n[t]++:n[t]=1}),Xr=g(function(n,r,t){(Sr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=g(function(n,r,t){n[t]=r});u.after=function(n,r){if(!A(r))throw new TypeError;return function(){return 1>--n?r.apply(this,arguments):void 0}},u.bind=L,u.bindAll=function(n){for(var r=1u(i,f)){for(var a=t;--a;)if(0>u(r[a],f))continue n; i.push(f)}}return i},u.invert=j,u.invoke=function(n,r){var t=e(arguments,2),u=-1,o=typeof r=="function",i=n?n.length:0,f=Array(typeof i=="number"?i:0);return F(n,function(n){f[++u]=(o?r:n[r]).apply(n,t)}),f},u.keys=Ur,u.map=D,u.max=I,u.memoize=function(n,r){var t={};return function(){var e=r?r.apply(this,arguments):er+arguments[0];return Sr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},u.min=function(n,r,t){var e=1/0,u=e;typeof r!="function"&&t&&t[r]===n&&(r=null);var o=-1,i=n?n.length:0;if(null==r&&typeof i=="number")for(;++or(t,u)&&(e[u]=n)}),e},u.once=function(n){var r,t;if(!A(n))throw new TypeError;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},u.pairs=function(n){for(var r=-1,t=Ur(n),e=t.length,u=Array(e);++rr?0:r);++nt?Mr(0,e+t):$r(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=Z,u.noConflict=function(){return yr._=xr,this},u.noop=function(){},u.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r?(r=n,n=0):r=+r||0,n+Or(Wr()*(r-n+1))},u.reduce=$,u.reduceRight=W,u.result=function(n,r){if(n){var t=n[r];return A(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0; return typeof r=="number"?r:Ur(n).length},u.some=C,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=d({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||ur).source+"|"+(e.interpolate||ur).source+"|"+(e.evaluate||ur).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(or,t),e&&(a+="'+_.escape("+e+")+'"),o&&(a+="';"+o+";\n__p+='"),u&&(a+="'+((__t=("+u+"))==null?'':__t)+'"),f=i+r.length,r}),a+="';",i||(i="obj",a="with("+i+"||{}){"+a+"}"),a="function("+i+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+a+"return __p}"; try{var c=Function("_","return "+a)(o)}catch(l){throw l.source=a,l}return r?c(r):(c.source=a,c)},u.unescape=function(n){return null==n?"":(n+"").replace(Hr,m)},u.uniqueId=function(n){var r=++rr+"";return n?n+r:r},u.all=N,u.any=C,u.detect=B,u.findWhere=function(n,r){return P(n,r,!0)},u.foldl=$,u.foldr=W,u.include=k,u.inject=$,u.first=V,u.last=function(n,r,t){var u=0,o=n?n.length:0;if(typeof r!="number"&&null!=r){var i=o;for(r=Q(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:nr; return e(n,Mr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=S(n)),null==r||t?n?n[0+Or(Wr()*(n.length-1-0+1))]:nr:(n=z(n),n.length=$r(Mr(0,r),n.length),n)},u.take=V,u.head=V,Z(u),u.VERSION="2.2.1",u.prototype.chain=function(){return this.__chain__=!0,this},u.prototype.value=function(){return this.__wrapped__},F("pop push reverse shift sort splice unshift".split(" "),function(n){var r=wr[n];u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),zr.spliceObjects||0!==n.length||delete n[0],this }}),F(["concat","join","slice"],function(n){var r=wr[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(yr._=u, define(function(){return u})):mr&&_r?br?(_r.exports=u)._=u:mr._=u:yr._=u}).call(this);