Files
lodash/lodash.min.js
John-David Dalton 09d5222b1f Allow _.sortedIndex to accept a string value.
Former-commit-id: 7ac17a6bb620ad16ecce17718a8110d422d49118
2012-09-26 22:30:15 -07:00

41 lines
18 KiB
JavaScript

/*!
Lo-Dash 0.7.0 lodash.com/license
Underscore.js 1.3.3 github.com/documentcloud/underscore/blob/master/LICENSE
*/
;
(function(s,v){var j=!0,m=null,o=!1;function c(a){return new t(a)}function t(a){if(a&&a.__wrapped__)return a;this.__wrapped__=a}function N(a,b){return function(d,l,c){return a.call(b,d,l,c)}}function X(a,b,d){b||(b=0);var l=a.length,c=l-b>=(d||Za),e=c?{}:a;if(c)for(var i=b-1;++i<l;)d=a[i]+"",(q.call(e,d)?e[d]:e[d]=[]).push(a[i]);return function(a){if(c){var d=a+"";return q.call(e,d)&&-1<C(e[d],a)}return-1<C(e,a,b)}}function $a(a,b){var d=a.b,l=b.b,a=a.a,b=b.a;if(a!==b){if(a>b||a===v)return 1;if(a<b||b===v)return-1}return d<
l?-1:1}function Y(a,b,d){function l(){var h=arguments,p=e?this:b;c||(a=b[i]);d.length&&(h=h.length?d.concat(n.call(h)):d);return this instanceof l?(Z.prototype=a.prototype,p=new Z,(h=a.apply(p,h))&&z[typeof h]?h:p):a.apply(p,h)}var c=x(a),e=!d,i=a;e&&(d=b);return l}function g(){for(var a,b,d,l=-1,c=arguments.length,e={e:"",f:"",j:"",q:"",c:{d:""},m:{d:""}};++l<c;)for(b in a=arguments[l],a)d=(d=a[b])==m?"":d,/d|i/.test(b)?("string"==typeof d&&(d={b:d,l:d}),e.c[b]=d.b||"",e.m[b]=d.l||""):e[b]=d;a=e.a;
b=/^[^,]+/.exec(a)[0];d=e.s;e.g=b;e.h=$;e.k=D;e.n=va;e.p=wa;e.r=e.r!==o;e.s=d==m?ab:d;e.o==m&&(e.o=xa);e.f||(e.f="if(!"+b+")return u");if("e"!=b||!e.c.i)e.c=m;b="";e.s&&(b+="'use strict';");b+="var j,B,k="+e.g+",u";e.j&&(b+="="+e.j);b+=";"+e.f+";"+e.q+";";e.c&&(b+="var l=k.length;j=-1;",e.m&&(b+="if(l===+l){"),e.o&&(b+="if(z.call(k)==x){k=k.split('')}"),b+=e.c.d+";while(++j<l){B=k[j];"+e.c.i+"}",e.m&&(b+="}"));if(e.m){e.c?b+="else{":e.n&&(b+="var l=k.length;j=-1;if(l&&P(k)){while(++j<l){B=k[j+=''];"+
e.m.i+"}}else{");e.h||(b+="var v=typeof k=='function'&&r.call(k,'prototype');");if(e.k&&e.r)b+="var o=-1,p=Z[typeof k]?m(k):[],l=p.length;"+e.m.d+";while(++o<l){j=p[o];",e.h||(b+="if(!(v&&j=='prototype')){"),b+="B=k[j];"+e.m.i+"",e.h||(b+="}");else{b+=e.m.d+";for(j in k){";if(!e.h||e.r)b+="if(",e.h||(b+="!(v&&j=='prototype')"),!e.h&&e.r&&(b+="&&"),e.r&&(b+="h.call(k,j)"),b+="){";b+="B=k[j];"+e.m.i+";";if(!e.h||e.r)b+="}"}b+="}";if(e.h){b+="var g=k.constructor;";for(d=0;7>d;d++)b+="j='"+e.p[d]+"';if(",
"constructor"==e.p[d]&&(b+="!(g&&g.prototype===k)&&"),b+="h.call(k,j)){B=k[j];"+e.m.i+"}"}if(e.c||e.n)b+="}"}b+=e.e+";return u";return Function("E,F,G,c,J,f,K,h,i,N,P,R,T,U,X,Y,Z,m,r,dd,w,x,z,A","var H=function("+a+"){"+b+"};return H")(u,A,aa,N,$a,ba,O,q,ca,C,y,da,x,ea,Z,H,z,E,ya,za,n,B,k)}function bb(a){return"\\"+cb[a]}function db(a){return eb[a]}function Z(){}function za(a){return function(b){return b[a]}}function fb(a){return gb[a]}function y(a){return k.call(a)==fa}function x(a){return"function"==
typeof a}function Aa(a){var b=o;if(!(a&&"object"==typeof a)||y(a))return b;var d=a.constructor;if((!Ba||!("function"!=typeof a.toString&&"string"==typeof(a+"")))&&(!x(d)||d instanceof d)){if(Ca)return O(a,function(a,d,e){b=!q.call(e,d);return o}),b===o;O(a,function(a,d){b=d});return b===o||q.call(a,b)}return b}function ga(a,b,d,l,c){if(a==m)return a;d&&(b=o);if(d=z[typeof a]){var e=k.call(a);if(!w[e]||P&&y(a))return a;var i=e==Q,d=i||(e==H?ea(a):d)}if(!d||!b)return d?i?n.call(a):Da({},a):a;d=a.constructor;
switch(e){case J:return new d(a==j);case K:return new d(+a);case F:case B:return new d(a);case L:return d(a.source,hb.exec(a))}l||(l=[]);c||(c=[]);for(e=l.length;e--;)if(l[e]==a)return c[e];var h=i?d(e=a.length):{};l.push(a);c.push(h);if(i)for(i=-1;++i<e;)h[i]=ga(a[i],b,m,l,c);else Ea(a,function(a,d){h[d]=ga(a,b,m,l,c)});return h}function R(a,b,d,c){if(a==m||b==m)return a===b;if(a===b)return 0!==a||1/a==1/b;if(z[typeof a]||z[typeof b])a=a.__wrapped__||a,b=b.__wrapped__||b;var f=k.call(a);if(f!=k.call(b))return o;
switch(f){case J:case K:return+a==+b;case F:return a!=+a?b!=+b:0==a?1/a==1/b:a==+b;case L:case B:return a==b+""}var e=u[f];if(P&&!e&&(e=y(a))&&!y(b)||!e&&(f!=H||Ba&&("function"!=typeof a.toString&&"string"==typeof(a+"")||"function"!=typeof b.toString&&"string"==typeof(b+""))))return o;d||(d=[]);c||(c=[]);for(f=d.length;f--;)if(d[f]==a)return c[f]==b;var f=-1,i=j,h=0;d.push(a);c.push(b);if(e){h=a.length;if(i=h==b.length)for(;h--&&(i=R(a[h],b[h],d,c)););return i}e=a.constructor;i=b.constructor;if(e!=
i&&(!x(e)||!(e instanceof e&&x(i)&&i instanceof i)))return o;for(var p in a)if(q.call(a,p)&&(h++,!q.call(b,p)||!R(a[p],b[p],d,c)))return o;for(p in b)if(q.call(b,p)&&!h--)return o;if($)for(;7>++f;)if(p=wa[f],q.call(a,p)&&(!q.call(b,p)||!R(a[p],b[p],d,c)))return o;return j}function Fa(a,b,d,c){if(!a)return d;var f=a,e=a.length,i=3>arguments.length;if(e!==+e)var h=ha(a),e=h.length;else xa&&k.call(a)==B&&(f=a.split(""));I(a,function(a,g,k){g=h?h[--e]:--e;d=i?(i=o,f[g]):b.call(c,d,f[g],g,k)});return d}
function ia(a,b,d){if(a)return b==m||d?a[0]:n.call(a,0,b)}function Ga(a,b){var d=[];if(!a)return d;for(var c,f=-1,e=a.length;++f<e;)c=a[f],da(c)?ja.apply(d,b?c:Ga(c)):d.push(c);return d}function C(a,b,d){if(!a)return-1;var c=-1,f=a.length;if(d)if("number"==typeof d)c=(0>d?ka(0,f+d):d)-1;else return c=Ha(a,b),a[c]===b?c:-1;for(;++c<f;)if(a[c]===b)return c;return-1}function Ia(a,b,d){var c=-Infinity,f=c;if(!a)return f;var e=-1,i=a.length;if(!b){for(;++e<i;)a[e]>f&&(f=a[e]);return f}for(d!==v&&(b=N(b,
d));++e<i;)d=b(a[e],e,a),d>c&&(c=d,f=a[e]);return f}function la(a,b,d){return!a?[]:n.call(a,b==m||d?1:b)}function Ha(a,b,d,c){if(!a)return 0;var f=0,e=a.length;if(d){"function"!=typeof d?d=za(b):c!==v&&(d=aa(d,c));for(b=d(b);f<e;)c=f+e>>>1,d(a[c])<b?f=c+1:e=c}else for(;f<e;)c=f+e>>>1,a[c]<b?f=c+1:e=c;return f}function Ja(a,b,d,c){var f=[];if(!a)return f;var e=-1,i=a.length,h=[];"function"==typeof b&&(c=d,d=b,b=o);for(d?c!==v&&(d=N(d,c)):d=ca;++e<i;)if(c=d(a[e],e,a),b?!e||h[h.length-1]!==c:0>C(h,c))h.push(c),
f.push(a[e]);return f}function aa(a,b){return Ka||G&&2<arguments.length?G.call.apply(G,arguments):Y(a,b,n.call(arguments,2))}function ca(a){return a}function La(a){I(ma(a),function(b){var d=c[b]=a[b];t.prototype[b]=function(){var a=[this.__wrapped__];arguments.length&&ja.apply(a,arguments);a=d.apply(c,a);this.__chain__&&(a=new t(a),a.__chain__=j);return a}})}var na="object"==typeof exports&&exports&&("object"==typeof global&&global&&global==global.global&&(s=global),exports),A=Array.prototype,M=Object.prototype,
ib=0,Za=30,jb=s._,kb=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,lb=/&(?:amp|lt|gt|quot|#x27);/g,mb=/\b__p\+='';/g,nb=/\b(__p\+=)''\+/g,ob=/(__e\(.*?\)|\b__t\))\+'';/g,hb=/\w*$/,pb=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,oa=RegExp("^"+(M.valueOf+"").replace(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),pa=/($^)/,qb=/[&<>"']/g,rb=/['\n\r\t\u2028\u2029\\]/g,wa="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),
ba=A.concat,q=M.hasOwnProperty,ja=A.push,ya=M.propertyIsEnumerable,n=A.slice,k=M.toString,G=oa.test(G=n.bind)&&G,Ma=Math.floor,qa=oa.test(qa=Array.isArray)&&qa,sb=s.isFinite,E=oa.test(E=Object.keys)&&E,ka=Math.max,tb=Math.min,Na=Math.random,fa="[object Arguments]",Q="[object Array]",J="[object Boolean]",K="[object Date]",F="[object Number]",H="[object Object]",L="[object RegExp]",B="[object String]",ub=s.clearTimeout,S=s.setTimeout,$,Oa,Ca,va=j;(function(){function a(){this.x=1}var b={"0":1,length:1},
d=[];a.prototype={valueOf:1,y:1};for(var c in new a)d.push(c);for(c in arguments)va=!c;$=4>(d+"").length;Ca="x"!=d[0];Oa=(d.splice.call(b,0,1),b[0])})(1);var P=!y(arguments),vb="x"!=n.call("x")[0],xa="xx"!="x"[0]+Object("x")[0];try{var Ba=("[object Object]",k.call(s.document||0)==H)}catch(Kb){}var Ka=G&&/\n|Opera/.test(G+k.call(s.opera)),D=E&&/^.+$|true/.test(E+!!s.attachEvent),ab=!Ka,u={};u[J]=u[K]=u["[object Function]"]=u[F]=u[H]=u[L]=o;u[fa]=u[Q]=u[B]=j;var w={};w[fa]=w["[object Function]"]=o;w[Q]=
w[J]=w[K]=w[F]=w[H]=w[L]=w[B]=j;var eb={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"},gb={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#x27;":"'"},z={"boolean":o,"function":j,object:j,number:o,string:o,undefined:o,unknown:j},cb={"\\":"\\","'":"'","\n":"n","\r":"r","\t":"t","\u2028":"u2028","\u2029":"u2029"};c.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,variable:""};var r={a:"e,d,y",j:"e",q:"if(!d)d=i;else if(y!==A)d=c(d,y)",
i:"if(d(B,j,e)===false)return u"},ra={j:"{}",q:"if(typeof d!='function'){d=dd(B,d)}else if(y!==A)d=c(d,y)",i:"var q=d(B,j,e);(h.call(u,q)?u[q]++:u[q]=1)"},sa={j:"true",i:"if(!d(B,j,e))return!u"},T={r:o,s:o,a:"n",j:"n",q:"for(var a=1,b=arguments.length;a<b;a++){if(k=arguments[a]){",i:"u[j]=B",e:"}}"},U={j:"[]",i:"d(B,j,e)&&u.push(B)"},V={q:"if(y!==A)d=c(d,y)"},Pa={i:{l:r.i}},W={j:"",f:"if(!e)return[]",d:{b:"u=Array(l)",l:"u="+(D?"Array(l)":"[]")},i:{b:"u[j]=d(B,j,e)",l:"u"+(D?"[o]=":".push")+"(d(B,j,e))"}},
Qa={r:o,a:"n,d,y",j:"{}",q:"var S=typeof d=='function';if(!S){var t=f.apply(F,arguments)}else if(y!==A)d=c(d,y)",i:"if(S?!d(B,j,n):N(t,j)<0)u[j]=B"};P&&(y=function(a){return!(!a||!q.call(a,"callee"))});var da=qa||function(a){return k.call(a)==Q};x(/x/)&&(x=function(a){return"[object Function]"==k.call(a)});var ea=z.__proto__!=M?Aa:function(a){if(!a)return o;var b=a.valueOf,d="function"==typeof b&&(d=b.__proto__)&&d.__proto__;return d?a==d||a.__proto__==d&&!y(a):Aa(a)},Ra=g({a:"n",j:"[]",i:"u.push(j)"}),
wb=g(T,{i:"if(u[j]==null)"+T.i}),Da=g(T),O=g(r,V,Pa,{r:o}),Ea=g(r,V,Pa),ma=g({r:o,a:"n",j:"[]",i:"if(T(B))u.push(j)",e:"u.sort()"}),xb=g({a:"n",j:"{}",i:"u[B]=j"}),yb=g({a:"B",j:"true",q:"var I=z.call(B),l=B.length;if(E[I]"+(P?"||P(B)":"")+"||(I==Y&&l===+l&&T(B.splice)))return!l",i:{l:"return false"}}),ha=!E?Ra:function(a){var b=typeof a;return"function"==b&&ya.call(a,"prototype")?Ra(a):a&&z[b]?E(a):[]},zb=g(T,{a:"n,ff,O",q:"var b,Q,gg,hh,D=arguments,a=0;if(O==X){b=2;gg=D[3];hh=D[4]}else{b=D.length;gg=[];hh=[]}while(++a<b){if(k=D[a]){",
i:"if((ff=B)&&((Q=R(ff))||U(ff))){var L=false,ii=gg.length;while(ii--)if(L=gg[ii]==ff)break;if(L){u[j]=hh[ii]}else{gg.push(ff);hh.push(B=(B=u[j])&&Q?(R(B)?B:[]):(U(B)?B:{}));u[j]=H(B,ff,X,gg,hh)}}else if(ff!=null)u[j]=ff"}),Ab=g(Qa),Bb=g({a:"n",j:"[]",i:"u"+(D?"[o]=":".push")+"([j,B])"}),Cb=g(Qa,{q:"if(typeof d!='function'){var q,t=f.apply(F,arguments),l=t.length;for(j=1;j<l;j++){q=t[j];if(q in n)u[q]=n[q]}}else{if(y!==A)d=c(d,y)",i:"if(d(B,j,n))u[j]=B",e:"}"}),Sa=g({a:"n",j:"[]",i:"u.push(B)"}),
Ta=g({a:"e,jj",j:"false",o:o,d:{b:"if(z.call(e)==x)return e.indexOf(jj)>-1"},i:"if(B===jj)return true"}),Db=g(r,ra),Ua=g(r,sa),Va=g(r,U),Wa=g(r,V,{j:"",i:"if(d(B,j,e))return B"}),I=g(r,V),Eb=g(r,ra,{i:"var q=d(B,j,e);(h.call(u,q)?u[q]:u[q]=[]).push(B)"}),Fb=g(W,{a:"e,V",q:"var D=w.call(arguments,2),S=typeof V=='function'",i:{b:"u[j]=(S?V:B[V]).apply(B,D)",l:"u"+(D?"[o]=":".push")+"((S?V:B[V]).apply(B,D))"}}),Xa=g(r,W),ta=g(W,{a:"e,cc",i:{b:"u[j]=B[cc]",l:"u"+(D?"[o]=":".push")+"(B[cc])"}}),ua=g({a:"e,d,C,y",
j:"C",q:"var W=arguments.length<3;if(y!==A)d=c(d,y)",d:{b:"if(W)u=k[++j]"},i:{b:"u=d(u,B,j,e)",l:"u=W?(W=false,B):d(u,B,j,e)"}}),Gb=g(r,U,{i:"!"+U.i}),Ya=g(r,sa,{j:"false",i:sa.i.replace("!","")}),Hb=g(r,ra,W,{i:{b:"u[j]={a:d(B,j,e),b:j,c:B}",l:"u"+(D?"[o]=":".push")+"({a:d(B,j,e),b:j,c:B})"},e:"u.sort(J);l=u.length;while(l--)u[l]=u[l].c"}),Ib=g(U,{a:"e,bb",q:"var t=[];K(bb,function(B,q){t.push(q)});var ee=t.length",i:"for(var q,aa=true,s=0;s<ee;s++){q=t[s];if(!(aa=B[q]===bb[q]))break}aa&&u.push(B)"}),
Jb=g({r:o,s:o,a:"n",j:"n",q:"var M=arguments,l=M.length;if(l>1){for(var j=1;j<l;j++)u[M[j]]=G(u[M[j]],u);return u}",i:"if(T(u[j]))u[j]=G(u[j],u)"});c.VERSION="0.7.0";c.after=function(a,b){return 1>a?b():function(){if(1>--a)return b.apply(this,arguments)}};c.bind=aa;c.bindAll=Jb;c.chain=function(a){a=new t(a);a.__chain__=j;return a};c.clone=ga;c.compact=function(a){var b=[];if(!a)return b;for(var d=-1,c=a.length;++d<c;)a[d]&&b.push(a[d]);return b};c.compose=function(){var a=arguments;return function(){for(var b=
arguments,d=a.length;d--;)b=[a[d].apply(this,b)];return b[0]}};c.contains=Ta;c.countBy=Db;c.debounce=function(a,b,d){function c(){h=m;d||(e=a.apply(i,f))}var f,e,i,h;return function(){var g=d&&!h;f=arguments;i=this;ub(h);h=S(c,b);g&&(e=a.apply(i,f));return e}};c.defaults=wb;c.defer=function(a){var b=n.call(arguments,1);return S(function(){return a.apply(v,b)},1)};c.delay=function(a,b){var d=n.call(arguments,2);return S(function(){return a.apply(v,d)},b)};c.difference=function(a){var b=[];if(!a)return b;
for(var d=-1,c=a.length,f=ba.apply(A,arguments),f=X(f,c);++d<c;)f(a[d])||b.push(a[d]);return b};c.escape=function(a){return a==m?"":(a+"").replace(qb,db)};c.every=Ua;c.extend=Da;c.filter=Va;c.find=Wa;c.first=ia;c.flatten=Ga;c.forEach=I;c.forIn=O;c.forOwn=Ea;c.functions=ma;c.groupBy=Eb;c.has=function(a,b){return a?q.call(a,b):o};c.identity=ca;c.indexOf=C;c.initial=function(a,b,d){return!a?[]:n.call(a,0,-(b==m||d?1:b))};c.intersection=function(a){var b=[];if(!a)return b;var d,c=arguments.length,f=[],
e=-1,i=a.length;a:for(;++e<i;)if(d=a[e],0>C(b,d)){for(var h=1;h<c;h++)if(!(f[h]||(f[h]=X(arguments[h])))(d))continue a;b.push(d)}return b};c.invert=xb;c.invoke=Fb;c.isArguments=y;c.isArray=da;c.isBoolean=function(a){return a===j||a===o||k.call(a)==J};c.isDate=function(a){return k.call(a)==K};c.isElement=function(a){return a?1===a.nodeType:o};c.isEmpty=yb;c.isEqual=R;c.isFinite=function(a){return sb(a)&&k.call(a)==F};c.isFunction=x;c.isNaN=function(a){return k.call(a)==F&&a!=+a};c.isNull=function(a){return a===
m};c.isNumber=function(a){return k.call(a)==F};c.isObject=function(a){return a?z[typeof a]:o};c.isPlainObject=ea;c.isRegExp=function(a){return k.call(a)==L};c.isString=function(a){return k.call(a)==B};c.isUndefined=function(a){return a===v};c.keys=ha;c.last=function(a,b,d){if(a){var c=a.length;return b==m||d?a[c-1]:n.call(a,-b||c)}};c.lastIndexOf=function(a,b,d){if(!a)return-1;var c=a.length;for(d&&"number"==typeof d&&(c=(0>d?ka(0,c+d):tb(d,c-1))+1);c--;)if(a[c]===b)return c;return-1};c.lateBind=
function(a,b){return Y(b,a,n.call(arguments,2))};c.map=Xa;c.max=Ia;c.memoize=function(a,b){var d={};return function(){var c=b?b.apply(this,arguments):arguments[0];return q.call(d,c)?d[c]:d[c]=a.apply(this,arguments)}};c.merge=zb;c.min=function(a,b,d){var c=Infinity,f=c;if(!a)return f;var e=-1,i=a.length;if(!b){for(;++e<i;)a[e]<f&&(f=a[e]);return f}for(d!==v&&(b=N(b,d));++e<i;)d=b(a[e],e,a),d<c&&(c=d,f=a[e]);return f};c.mixin=La;c.noConflict=function(){s._=jb;return this};c.object=function(a,b){if(!a)return{};
for(var d=-1,c=a.length,f={};++d<c;)b?f[a[d]]=b[d]:f[a[d][0]]=a[d][1];return f};c.omit=Ab;c.once=function(a){var b,d=o;return function(){if(d)return b;d=j;b=a.apply(this,arguments);a=m;return b}};c.pairs=Bb;c.partial=function(a){return Y(a,n.call(arguments,1))};c.pick=Cb;c.pluck=ta;c.random=function(a,b){a==m&&b==m&&(b=1);a=+a||0;b==m&&(b=a,a=0);return a+Ma(Na()*((+b||0)-a+1))};c.range=function(a,b,d){a=+a||0;d=+d||1;b==m&&(b=a,a=0);for(var c=-1,b=ka(0,Math.ceil((b-a)/d)),f=Array(b);++c<b;)f[c]=a,
a+=d;return f};c.reduce=ua;c.reduceRight=Fa;c.reject=Gb;c.rest=la;c.result=function(a,b){if(!a)return m;var d=a[b];return x(d)?a[b]():d};c.shuffle=function(a){if(!a)return[];for(var b,d=-1,c=a.length,f=Array(c);++d<c;)b=Ma(Na()*(d+1)),f[d]=f[b],f[b]=a[d];return f};c.size=function(a){if(!a)return 0;var b=a.length;return b===+b?b:ha(a).length};c.some=Ya;c.sortBy=Hb;c.sortedIndex=Ha;c.tap=function(a,b){b(a);return a};c.template=function(a,b,d){d||(d={});var a=a+"",l,f,e=0,i=c.templateSettings,h="__p += '",
g=d.variable||i.variable,k=g;a.replace(RegExp((d.escape||i.escape||pa).source+"|"+(d.interpolate||i.interpolate||pa).source+"|"+(d.evaluate||i.evaluate||pa).source+"|$","g"),function(b,c,d,f,i){h+=a.slice(e,i).replace(rb,bb);h+=c?"'+__e("+c+")+'":f?"';"+f+";__p+='":d?"'+((__t=("+d+"))==null?'':__t)+'":"";l||(l=f||kb.test(c||d));e=i+b.length});h+="';";k||(g="obj",l?h="with("+g+"){"+h+"}":(d=RegExp("(\\(\\s*)"+g+"\\."+g+"\\b","g"),h=h.replace(pb,"$&"+g+".").replace(d,"$1__d")));h=(l?h.replace(mb,""):
h).replace(nb,"$1").replace(ob,"$1;");h="function("+g+"){"+(k?"":g+"||("+g+"={});")+"var __t,__p='',__e=_.escape"+(l?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(k?"":",__d="+g+"."+g+"||"+g)+";")+h+"return __p}";try{f=Function("_","return "+h)(c)}catch(n){throw n.source=h,n;}if(b)return f(b);f.source=h;return f};c.throttle=function(a,b){function c(){h=new Date;i=m;f=a.apply(e,g)}var g,f,e,i,h=0;return function(){var k=new Date,n=b-(k-h);g=arguments;e=this;0>=n?(h=k,f=
a.apply(e,g)):i||(i=S(c,n));return f}};c.times=function(a,b,c){var a=+a||0,g=-1,f=Array(a);if(c!==v)for(;++g<a;)f[g]=b.call(c,g);else for(;++g<a;)f[g]=b(g);return f};c.toArray=function(a){if(!a)return[];var b=a.length;return b===+b?(vb?k.call(a)==B:"string"==typeof a)?a.split(""):n.call(a):Sa(a)};c.unescape=function(a){return a==m?"":(a+"").replace(lb,fb)};c.union=function(){for(var a=-1,b=ba.apply(A,arguments),c=b.length,g=[];++a<c;)0>C(g,b[a])&&g.push(b[a]);return g};c.uniq=Ja;c.uniqueId=function(a){var b=
ib++;return a?a+b:b};c.values=Sa;c.where=Ib;c.without=function(a){var b=[];if(!a)return b;for(var c=-1,g=a.length,f=X(arguments,1,20);++c<g;)f(a[c])||b.push(a[c]);return b};c.wrap=function(a,b){return function(){var c=[a];arguments.length&&ja.apply(c,arguments);return b.apply(this,c)}};c.zip=function(a){if(!a)return[];for(var b=-1,c=Ia(ta(arguments,"length")),g=Array(c);++b<c;)g[b]=ta(arguments,b);return g};c.all=Ua;c.any=Ya;c.collect=Xa;c.detect=Wa;c.drop=la;c.each=I;c.foldl=ua;c.foldr=Fa;c.head=
ia;c.include=Ta;c.inject=ua;c.methods=ma;c.select=Va;c.tail=la;c.take=ia;c.unique=Ja;t.prototype=c.prototype;La(c);t.prototype.chain=function(){this.__chain__=j;return this};t.prototype.value=function(){return this.__wrapped__};I("pop push reverse shift sort splice unshift".split(" "),function(a){var b=A[a];t.prototype[a]=function(){var a=this.__wrapped__;b.apply(a,arguments);Oa&&a.length===0&&delete a[0];if(this.__chain__){a=new t(a);a.__chain__=j}return a}});I(["concat","join","slice"],function(a){var b=
A[a];t.prototype[a]=function(){var a=b.apply(this.__wrapped__,arguments);this.__chain__&&(a=new t(a),a.__chain__=j);return a}});typeof define=="function"&&typeof define.amd=="object"&&define.amd?(s._=c,define(function(){return c})):na?"object"==typeof module&&module&&module.exports==na?(module.exports=c)._=c:na._=c:s._=c})(this);