/** * @license * Lo-Dash 2.4.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;++tf||typeof i=="undefined")return 1;if(it?0:t);++ee(r,i)&&o.push(i)}return o}function p(n,r,t,e){e=(e||0)-1;for(var u=n?n.length:0,o=[];++eu(f,l))&&(t&&f.push(l),i.push(a))}return i}function h(n){return function(r,t,e){var u={};t=X(t,e,3),e=-1;var o=r?r.length:0;if(typeof o=="number")for(;++eu&&(u=t); else r=X(r,t,3),$(n,function(n,t,o){t=r(n,t,o),t>e&&(e=t,u=n)});return u}function W(n,r,t,e){if(!n)return t;var u=3>arguments.length;r=X(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++oarguments.length;return r=X(r,e,4),D(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function C(n){var r=-1,t=n?n.length:0,e=Array(typeof t=="number"?t:0);return $(n,function(n){var t;t=++r,t=0+Fr(Vr()*(t-0+1)),e[r]=e[t],e[t]=n }),e}function P(n,r,t){var e;r=X(r,t,3),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++te?Pr(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=X(r,t,3);++o>>1,t(n[e])=y;m?(u&&(u=clearTimeout(u)),c=i,o=n.apply(f,e)):u||(u=setTimeout(v,y))}return m&&a?a=clearTimeout(a):a||r===p||(a=setTimeout(h,r)),t&&(m=true,o=n.apply(f,e)),!m||a||u||(e=f=null),o}}function X(n,r,t){var e=typeof n;if(null==n||"function"==e)return a(n,r,t);if("object"!=e)return nr(n);var u=Kr(n);return function(r){for(var t=u.length,e=false;t--&&(e=r[u[t]]===n[u[t]]););return e}}function Y(n){return n}function Z(n){$(T(n),function(r){var t=u[r]=n[r];u.prototype[r]=function(){var n=[this.__wrapped__]; return $r.apply(n,arguments),n=t.apply(u,n),this.__chain__?new o(n,true):n}})}function nr(n){return function(r){return r[n]}}var rr,tr=0,er={},ur=+new Date+"",or=/&(?:amp|lt|gt|quot|#x27);/g,ir=/[&<>"']/g,fr=/($^)/,ar=/['\n\r\t\u2028\u2029\\]/g,lr="[object Arguments]",cr="[object Array]",pr="[object Boolean]",sr="[object Date]",gr="[object Number]",hr="[object Object]",vr="[object RegExp]",yr="[object String]",mr={"&":"&","<":"<",">":">",'"':""","'":"'"},_r={"&":"&","<":"<",">":">",""":'"',"'":"'"},dr={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false},br={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"},wr=dr[typeof window]&&window||this,jr=dr[typeof exports]&&exports&&!exports.nodeType&&exports,xr=dr[typeof global]&&global; !xr||xr.global!==xr&&xr.window!==xr||(wr=xr);var Tr=dr[typeof module]&&module&&!module.nodeType&&module,Ar=Tr&&Tr.exports===jr&&jr,Er=[],Or=Object.prototype,Sr=wr._,kr=Or.toString,Nr=RegExp("^"+(kr+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),qr=Math.ceil,Fr=Math.floor,Br=Function.prototype.toString,Rr=Or.hasOwnProperty,$r=Er.push,Dr=Or.propertyIsEnumerable,Ir=_(Ir=Object.create)&&Ir,Mr=_(Mr=Array.isArray)&&Mr,Wr=wr.isFinite,zr=wr.isNaN,Cr=_(Cr=Object.keys)&&Cr,Pr=Math.max,Ur=Math.min,Vr=Math.random; o.prototype=u.prototype;var Gr={};!function(){var n={0:1,length:1};Gr.spliceObjects=(Er.splice.call(n,0,1),!n[0])}(1),u.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},Ir||(f=function(){function n(){}return function(r){if(O(r)){n.prototype=r;var t=new n;n.prototype=null}return t||wr.Object()}}()),b(arguments)||(b=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&Rr.call(n,"callee")&&!Dr.call(n,"callee")||false});var Hr=Mr||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&kr.call(n)==cr||false },Jr=function(n){var r=[];if(!n||!dr[typeof n])return r;for(var t in n)Rr.call(n,t)&&r.push(t);return r},Kr=Cr?function(n){return O(n)?Cr(n):[]}:Jr,Lr=function(n,r){if(!n||!dr[typeof n])return n;for(var t in n)if(r(n[t],t,n)===er)break;return n};E(/x/)&&(E=function(n){return typeof n=="function"&&"[object Function]"==kr.call(n)});var Qr=h(function(n,r,t){Rr.call(n,t)?n[t]++:n[t]=1}),Xr=h(function(n,r,t){(Rr.call(n,t)?n[t]:n[t]=[]).push(r)}),Yr=h(function(n,r,t){n[t]=r}),Zr=I,nt=_(nt=Date.now)&&nt||function(){return(new Date).getTime() };u.after=function(n,r){if(!E(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=1i(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},u.invert=function(n,r){for(var t=-1,e=Kr(n),u=e.length,o={};++tr?0:r);++nt?Pr(0,e+t):Ur(t,e-1))+1);e--;)if(n[e]===r)return e;return-1},u.mixin=Z,u.noConflict=function(){return wr._=Sr,this},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+Fr(Vr()*(r-n+1)) },u.reduce=W,u.reduceRight=z,u.result=function(n,r){if(n){var t=n[r];return E(t)?n[r]():t}},u.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Kr(n).length},u.some=P,u.sortedIndex=J,u.template=function(n,r,e){var o=u,i=o.templateSettings;n=(n||"")+"",e=j({},e,i);var f=0,a="__p+='",i=e.variable;n.replace(RegExp((e.escape||fr).source+"|"+(e.interpolate||fr).source+"|"+(e.evaluate||fr).source+"|$","g"),function(r,e,u,o,i){return a+=n.slice(f,i).replace(ar,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 l=Function("_","return "+a)(o)}catch(c){throw c.source=a,c}return r?l(r):(l.source=a,l)},u.unescape=function(n){return null==n?"":(n+="",0>n.indexOf(";")?n:n.replace(or,d))},u.uniqueId=function(n){var r=++tr+"";return n?n+r:r},u.all=F,u.any=P,u.detect=R,u.findWhere=function(n,r){return U(n,r,true)},u.foldl=W,u.foldr=z,u.include=q,u.inject=W,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=X(r,t,3);i--&&r(n[i],i,n);)u++}else if(u=r,null==u||t)return n?n[o-1]:rr;return e(n,Pr(0,o-u))},u.sample=function(n,r,t){return n&&typeof n.length!="number"&&(n=N(n)),null==r||t?n?n[0+Fr(Vr()*(n.length-1-0+1))]:rr:(n=C(n),n.length=Ur(Pr(0,r),n.length),n)},u.take=V,u.head=V,Z(w({},u)),u.VERSION="2.4.1",u.prototype.chain=function(){return this.__chain__=true,this},u.prototype.value=function(){return this.__wrapped__},$("pop push reverse shift sort splice unshift".split(" "),function(n){var r=Er[n]; u.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),Gr.spliceObjects||0!==n.length||delete n[0],this}}),$(["concat","join","slice"],function(n){var r=Er[n];u.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new o(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(wr._=u, define(function(){return u})):jr&&Tr?Ar?(Tr.exports=u)._=u:jr._=u:wr._=u}).call(this);