/** * @license * Lo-Dash 3.0.0-pre (Custom Build) lodash.com/license | Underscore.js 1.6.0 underscorejs.org/LICENSE * Build: `lodash underscore -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"){t=1;break n}if(t>>0:0,u=Array(e);++tu(r,i)&&o.push(i)}return o}function m(n,r){var t=-1,e=n?n.length:0;if(typeof e=="number"&&-1o?0:o>>>0);return m(n,function(n){var o=u?r:null!=n&&n[r];i[++e]=o?o.apply(n,t):xr}),i}function O(n,r){var t=[];return m(n,function(n,e,u){t.push(r(n,e,u))}),t}function k(n,r,t,e){var u=r⩔return W(n,r,e,u&&t,!u&&t)}function S(n,r){var t={};if(typeof r=="function")return x(n,function(n,e,u){r(n,e,u)&&(t[e]=n)}),t;for(var e=-1,u=r.length;++eo(f,c)&&(t&&f.push(c),i.push(a))}return i}function q(n,r){var t,e=["_"];try{var u=Function(e,"return "+n+(t?"\n/*\n//# sourceURL="+t+"\n*/":"")).apply(xr,r);u.source=n}catch(o){throw o.source=n,o }return u}function B(n,r){return function(t,e,u){var o=r?r():{};if(e=_r(e,u,3),St(t)){u=-1;for(var i=t.length;++ur?0:r)}function P(r,t,e){var u=r?r.length:0;if(typeof e=="number")e=0>e?bt(u+e,0):e||0;else if(e)return e=H(r,t),u&&r[e]===t?e:-1;return n(r,t,e)}function V(n,r,t){return G(n,null==r||t?1:0>r?0:r)}function G(n,r,t){var e=-1,u=n?n.length:0;for(r=null==r?0:+r||0,0>r?r=bt(u+r,0):r>u&&(r=u),t=typeof t=="undefined"?u:+t||0,0>t?t=bt(u+t,0):t>u&&(t=u),u=r>t?0:t-r,t=Array(u);++e>>1,t(n[e])u&&(u=i)}else r=_r(r,t,3),m(n,function(n,t,o){t=r(n,t,o),(t>e||-1/0===t&&t===u)&&(e=t,u=n)});return u}function tr(n,r){return nr(n,Ar(r))}function er(n,r,t,e){return r=_r(r,e,4),(St(n)?p:I)(n,r,t,3>arguments.length)}function ur(n,r,t,e){var u=3>arguments.length;return r=_r(r,e,4),b(n,function(n,e,o){t=u?(u=false,n):r(t,n,e,o)}),t}function or(n){var r=-1,t=n&&n.length,e=Array(0>t?0:t>>>0);return m(n,function(n){var t=F(++r);e[r]=e[t],e[t]=n}),e}function ir(n,r,t){return(typeof r!="function"||typeof t!="undefined")&&(r=_r(r,t,3)),(St(n)?s:M)(n,r) }function fr(n,r,t){function e(){var t=r-(It()-c);0>=t||t>r?(f&&clearTimeout(f),t=s,f=p=s=xr,t&&(g=It(),a=n.apply(l,i),p||f||(i=l=null))):p=setTimeout(e,t)}function u(){p&&clearTimeout(p),f=p=s=xr,(v||h!==r)&&(g=It(),a=n.apply(l,i),p||f||(i=l=null))}function o(){if(i=arguments,c=It(),l=this,s=v&&(p||!y),false===h)var t=y&&!p;else{f||y||(g=c);var o=h-(c-g),m=0>=o||o>h;m?(f&&(f=clearTimeout(f)),g=c,a=n.apply(l,i)):f||(f=setTimeout(u,o))}return m&&p?p=clearTimeout(p):p||r===h||(p=setTimeout(e,r)),t&&(m=true,a=n.apply(l,i)),!m||p||f||(i=l=null),a }var i,f,a,c,l,p,s,g=0,h=false,v=true;if(!gr(n))throw new TypeError(Sr);if(r=0>r?0:r,true===t)var y=true,v=false;else hr(t)&&(y=t.leading,h="maxWait"in t&&bt(+t.maxWait||0,r),v="trailing"in t?t.trailing:v);return o.cancel=function(){p&&clearTimeout(p),f&&clearTimeout(f),f=p=s=xr},o}function ar(n){if(!gr(n))throw new TypeError(Sr);return function(){return!n.apply(this,arguments)}}function cr(n){if(null==n)return n;var r=arguments,t=0,e=r.length,u=typeof r[2];for("number"!=u&&"string"!=u||!r[3]||r[3][r[2]]!==r[1]||(e=2);++t"'`]/g,Nr=/^\[object .+?Constructor\]$/,qr=/($^)/,Br=/[.*+?^${}()|[\]\/\\]/g,Rr=/['\n\r\u2028\u2029\\]/g,$r="[object Arguments]",Ur="[object Boolean]",Wr="[object Date]",Dr="[object Number]",zr="[object Object]",Cr="[object RegExp]",Lr="[object String]",Pr={}; Pr[$r]=Pr["[object Array]"]=Pr["[object Float32Array]"]=Pr["[object Float64Array]"]=Pr["[object Int8Array]"]=Pr["[object Int16Array]"]=Pr["[object Int32Array]"]=Pr["[object Uint8Array]"]=Pr["[object Uint8ClampedArray]"]=Pr["[object Uint16Array]"]=Pr["[object Uint32Array]"]=true,Pr["[object ArrayBuffer]"]=Pr[Ur]=Pr[Wr]=Pr["[object Error]"]=Pr["[object Function]"]=Pr["[object Map]"]=Pr[Dr]=Pr[zr]=Pr[Cr]=Pr["[object Set]"]=Pr[Lr]=Pr["[object WeakMap]"]=false;var Vr={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Gr={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Hr={"function":true,object:true},Jr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Kr=Hr[typeof window]&&window||this,Qr=Hr[typeof exports]&&exports&&!exports.nodeType&&exports,Xr=Hr[typeof module]&&module&&!module.nodeType&&module,Yr=Qr&&Xr&&typeof global=="object"&&global; !Yr||Yr.global!==Yr&&Yr.window!==Yr&&Yr.self!==Yr||(Kr=Yr);var Zr=Xr&&Xr.exports===Qr&&Qr,nt=Array.prototype,rt=Object.prototype,tt=Function.prototype.toString,et=Math.pow(2,53)-1,ut=Kr._,ot=rt.toString,it=RegExp("^"+(null==ot?"":(ot+"").replace(Br,"\\$&")).replace(/toString|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=Math.ceil,at=Math.floor,ct=rt.hasOwnProperty,lt=nt.push,pt=rt.propertyIsEnumerable,st=nt.splice,gt=z(gt=Object.create)&>,ht=z(ht=Array.isArray)&&ht,vt=Kr.isFinite,yt=Kr.isNaN,mt=z(mt=Object.keys)&&mt,bt=Math.max,_t=Math.min,dt=z(dt=Date.now)&&dt,jt=Math.random,wt={}; !function(){var n={0:1,length:1};wt.spliceObjects=(st.call(n,0,1),!n[0])}(0,0),o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""},gt||(h=function(){function n(){}return function(r){if(hr(r)){n.prototype=r;var t=new n;n.prototype=null}return t||Kr.Object()}}());var At=V,xt=L,Tt=B(function(n,r,t){ct.call(n,t)?n[t]++:n[t]=1}),Et=B(function(n,r,t){ct.call(n,t)?n[t].push(r):n[t]=[r]}),Ot=B(function(n,r,t){n[t]=r}),kt=B(function(n,r,t){n[t?0:1].push(r) },function(){return[[],[]]});sr(arguments)||(sr=function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&ct.call(n,"callee")&&!pt.call(n,"callee")||false});var St=ht||function(n){return n&&typeof n=="object"&&typeof n.length=="number"&&"[object Array]"==ot.call(n)||false};gr(/x/)&&(gr=function(n){return typeof n=="function"&&"[object Function]"==ot.call(n)});var Ft=mt?function(n){return hr(n)?mt(n):[]}:C,It=dt||function(){return(new Date).getTime()};i.prototype=o.prototype,o.after=function(n,r){if(!gr(r))throw new TypeError(Sr); return n=vt(n=+n)?n:0,function(){return 1>--n?r.apply(this,arguments):void 0}},o.bind=function(n,r){return 3>arguments.length?W(n,Tr,r):k(n,Tr|Or,G(arguments,2),r)},o.bindAll=function(n){for(var r=n,t=1r?0:r)},o.intersection=function(){for(var n=[],r=-1,t=arguments.length;++ri(a,e)){for(r=t;--r;)if(0>i(n[r],e))continue n;a.push(e)}return a},o.invert=function(n){for(var r=-1,t=Ft(n),e=t.length,u={};++ro?0:o>>>0);for(t=_r(t,e,3),m(n,function(n,r,e){i[++u]={a:t(n,r,e),b:u,c:n}}),o=i.length,i.sort(r);o--;)i[o]=i[o].c;return i},o.take=xt,o.tap=function(n,r){return r(n),n},o.throttle=function(n,r,t){var e=true,u=true;if(!gr(n))throw new TypeError(Sr);return false===t?e=false:hr(t)&&(e="leading"in t?t.leading:e,u="trailing"in t?t.trailing:u),fr(n,r,{leading:e,maxWait:r,trailing:u}) },o.times=function(n,r,t){n=0>n?0:n>>>0,r=g(r,t,1),t=-1;for(var e=Array(n);++tr?0:r))},o.lastIndexOf=function(n,r,t){var e=n?n.length:0;for(typeof t=="number"&&(e=(0>t?bt(e+t,0):_t(t||0,e-1))+1);e--;)if(n[e]===r)return e;return-1},o.max=rr,o.min=function(n,r,t){var e=1/0,u=e,o=typeof r;if("number"!=o&&"string"!=o||!t||t[r]!==n||(r=null),null==r&&St(n))for(t=-1,o=n.length;++tn.indexOf(";")?n:n.replace(Ir,u)) },o.uniqueId=function(n){var r=++Fr+"";return n?n+r:r},o.all=Q,o.any=ir,o.detect=Y,o.foldl=er,o.foldr=ur,o.head=L,o.include=K,o.inject=er,o.sample=function(n,r,t){var e=n?n.length:0;return typeof e=="number"&&-1r?0:+r||0,n.length),n)},wr(cr({},o)),o.VERSION="3.0.0-pre",o.prototype.chain=function(){return this.__chain__=true,this},o.prototype.value=function(){return this.__wrapped__},f("pop push reverse shift sort splice unshift".split(" "),function(n){var r=nt[n]; o.prototype[n]=function(){var n=this.__wrapped__;return r.apply(n,arguments),wt.spliceObjects||0!==n.length||delete n[0],this}}),f(["concat","join","slice"],function(n){var r=nt[n];o.prototype[n]=function(){var n=r.apply(this.__wrapped__,arguments);return this.__chain__&&(n=new i(n),n.__chain__=true),n}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(Kr._=o, define("underscore",function(){return o})):Qr&&Xr?Zr?(Xr.exports=o)._=o:Qr._=o:Kr._=o}).call(this);