/** * @license * Lo-Dash 1.2.0 (Custom Build) lodash.com/license * Build: `lodash underscore exports="amd,commonjs,global,node" -o ./dist/lodash.underscore.js` * Underscore.js 1.4.4 underscorejs.org/LICENSE */ ;(function(n){function r(n){return n instanceof r?n:new i(n)}function t(n,r){var t=n.b,e=r.b;if(n=n.a,r=r.a,n!==r){if(n>r||typeof n=="undefined")return 1;if(ne&&(e=t,u=n)});else for(;++ou&&(u=t);return u}function N(n,r){var t=-1,e=n?n.length:0; if(typeof e=="number")for(var u=Array(e);++targuments.length;r=P(r,e,4);var o=-1,i=n.length;if(typeof i=="number")for(u&&(t=n[++o]);++oarguments.length;if(typeof u!="number")var i=Fr(n),u=i.length;return r=P(r,e,4),O(n,function(e,a,f){a=i?i[--u]:--u,t=o?(o=!1,n[a]):r(t,n[a],a,f)}),t}function q(n,r,t){var e; r=P(r,t),t=-1;var u=n?n.length:0;if(typeof u=="number")for(;++tT(e,o)&&u.push(o)}return u}function D(n,r,t){if(n){var e=0,u=n.length;if(typeof r!="number"&&null!=r){var o=-1;for(r=P(r,t);++ot?Er(0,u+t):t||0)-1;else if(t)return e=I(n,r),n[e]===r?e:-1;for(;++e>>1,t(n[e])T(a,f))&&(t&&a.push(f),i.push(e))}return i}function C(n,r){return qr.fastBind||jr&&2"']/g,Z=/['\n\r\t\u2028\u2029\\]/g,nr="[object Arguments]",rr="[object Array]",tr="[object Boolean]",er="[object Date]",ur="[object Number]",or="[object Object]",ir="[object RegExp]",ar="[object String]",fr={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},lr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},cr=[],H={},pr=n._,sr=RegExp("^"+(H.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),vr=Math.ceil,gr=n.clearTimeout,hr=cr.concat,yr=Math.floor,mr=H.hasOwnProperty,_r=cr.push,br=n.setTimeout,dr=H.toString,jr=sr.test(jr=dr.bind)&&jr,wr=sr.test(wr=Array.isArray)&&wr,Ar=n.isFinite,xr=n.isNaN,Or=sr.test(Or=Object.keys)&&Or,Er=Math.max,Sr=Math.min,Nr=Math.random,Br=cr.slice,H=sr.test(n.attachEvent),kr=jr&&!/\n|true/.test(jr+H),qr={}; (function(){var n={0:1,length:1};qr.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),qr.fastBind=jr&&!kr,qr.spliceObjects=(cr.splice.call(n,0,1),!n[0])})(1),r.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},i.prototype=r.prototype,l(arguments)||(l=function(n){return n?mr.call(n,"callee"):!1});var H=function(n){var r,t=[];if(!n||!fr[typeof n])return t;for(r in n)mr.call(n,r)&&t.push(r);return t},Fr=Or?function(n){return m(n)?Or(n):[] }:H,Rr={"&":"&","<":"<",">":">",'"':""","'":"'"},Dr=v(Rr),Mr=function(n,r){var t;if(!n||!fr[typeof n])return n;for(t in n)if(r(n[t],t,n)===K)break;return n},Tr=function(n,r){var t;if(!n||!fr[typeof n])return n;for(t in n)if(mr.call(n,t)&&r(n[t],t,n)===K)break;return n},$r=wr||function(n){return dr.call(n)==rr};y(/x/)&&(y=function(n){return"[object Function]"==dr.call(n)}),r.after=function(n,r){return 1>n?r():function(){return 1>--n?r.apply(this,arguments):void 0}},r.bind=C,r.bindAll=function(n){for(var r=1T(o,i)){for(var a=t;--a;)if(0>T(r[a],i))continue n;o.push(i)}}return o},r.invert=v,r.invoke=function(n,r){var t=Br.call(arguments,2),e=-1,u=typeof r=="function",o=n?n.length:0,i=Array(typeof o=="number"?o:0);return O(n,function(n){i[++e]=(u?r:n[r]).apply(n,t)}),i},r.keys=Fr,r.map=E,r.max=S,r.memoize=function(n,r){var t={};return function(){var e=L+(r?r.apply(this,arguments):arguments[0]); return mr.call(t,e)?t[e]:t[e]=n.apply(this,arguments)}},r.min=function(n,r,t){var e=1/0,u=e,o=-1,i=n?n.length:0;if(r||typeof i!="number")r=P(r,t),O(n,function(n,t,o){t=r(n,t,o),tT(r,e)&&(t[e]=n)}),t},r.once=function(n){var r,t;return function(){return r?t:(r=!0,t=n.apply(this,arguments),n=null,t)}},r.pairs=function(n){for(var r=-1,t=Fr(n),e=t.length,u=Array(e);++rt?Er(0,e+t):Sr(t,e-1))+1);e--;)if(n[e]===r)return e; return-1},r.mixin=V,r.noConflict=function(){return n._=pr,this},r.random=function(n,r){return null==n&&null==r&&(r=1),n=+n||0,null==r&&(r=n,n=0),n+yr(Nr()*((+r||0)-n+1))},r.reduce=B,r.reduceRight=k,r.result=function(n,r){var t=n?n[r]:null;return y(t)?n[r]():t},r.size=function(n){var r=n?n.length:0;return typeof r=="number"?r:Fr(n).length},r.some=q,r.sortedIndex=I,r.template=function(n,t,e){n||(n=""),e=p({},e,r.templateSettings);var o=0,i="__p+='",a=e.variable;n.replace(RegExp((e.escape||X).source+"|"+(e.interpolate||X).source+"|"+(e.evaluate||X).source+"|$","g"),function(r,t,e,a,f){return i+=n.slice(o,f).replace(Z,u),t&&(i+="'+_['escape']("+t+")+'"),a&&(i+="';"+a+";__p+='"),e&&(i+="'+((__t=("+e+"))==null?'':__t)+'"),o=f+r.length,r }),i+="';\n",a||(a="obj",i="with("+a+"||{}){"+i+"}"),i="function("+a+"){var __t,__p='',__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}"+i+"return __p}";try{var f=Function("_","return "+i)(r)}catch(l){throw l.source=i,l}return t?f(t):(f.source=i,f)},r.unescape=function(n){return null==n?"":(n+"").replace(Q,f)},r.uniqueId=function(n){var r=++J+"";return n?n+r:r},r.all=w,r.any=q,r.detect=x,r.foldl=B,r.foldr=k,r.include=j,r.inject=B,r.first=D,r.last=function(n,r,t){if(n){var e=0,u=n.length; if(typeof r!="number"&&null!=r){var o=u;for(r=P(r,t);o--&&r(n[o],o,n);)e++}else if(e=r,null==e||t)return n[u-1];return Br.call(n,Er(0,u-e))}},r.take=D,r.head=D,r.chain=function(n){return n=new i(n),n.__chain__=!0,n},r.VERSION="1.2.0",V(r),r.prototype.chain=function(){return this.__chain__=!0,this},r.prototype.value=function(){return this.__wrapped__},O("pop push reverse shift sort splice unshift".split(" "),function(n){var t=cr[n];r.prototype[n]=function(){var n=this.__wrapped__;return t.apply(n,arguments),!qr.spliceObjects&&0===n.length&&delete n[0],this }}),O(["concat","join","slice"],function(n){var t=cr[n];r.prototype[n]=function(){var n=t.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=!0),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(n._=r,define(function(){return r})):W&&!W.nodeType?G?(G.exports=r)._=r:W._=r:n._=r})(this);