mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
42 lines
18 KiB
JavaScript
42 lines
18 KiB
JavaScript
/*!
|
|
Lo-Dash 0.10.0 lodash.com/license
|
|
Underscore.js 1.4.2 underscorejs.org/LICENSE
|
|
*/
|
|
;(function(e,t){function s(t,r){var i,s=e.onerror,o=e._,u=et.createElement("script"),a=et.scripts[0];e.onerror=function(e){return i=e,n},u.text="var _=function("+t+"){"+r+"\n}",a.parentNode.insertBefore(u,a).parentNode.removeChild(u),u=e._,e._=o,e.onerror=s;if(i)throw new SyntaxError(i);return u}function o(e){if(e&&"object"==typeof e&&e.__wrapped__)return e;if(!(this instanceof o))return new o(e);this.__wrapped__=e}function u(e,t,n){t||(t=0);var r=e.length,i=r-t>=(n||st);if(i)for(var s={},n=t-1;++
|
|
n<r;){var o=e[n]+"";(Nt.call(s,o)?s[o]:s[o]=[]).push(e[n])}return function(n){if(i){var r=n+"";return Nt.call(s,r)&&-1<W(s[r],n)}return-1<W(e,n,t)}}function a(e){return e.charCodeAt(0)}function f(e,t){var n=e.b,r=t.b,e=e.a,t=t.a;if(e!==t){if(e>t||"undefined"==typeof e)return 1;if(e<t||"undefined"==typeof t)return-1}return n<r?-1:1}function l(e,t,n){function i(){var r=arguments,a=o?this:t;return s||(e=t[u]),n.length&&(r=r.length?n.concat(g(r)):n),this instanceof i?(r=e.apply(this,r),k(r)?r:this):e
|
|
.apply(a,r)}var s=C(e),o=!n,u=t;return o&&(n=t),s||(t=e),e&&e.prototype&&(m.prototype=e.prototype,i.prototype=new m,m.prototype=r),i}function c(e,t){return e?"function"!=typeof e?function(t){return t[e]}:"undefined"!=typeof t?function(n,r,i){return e.call(t,n,r,i)}:e:K}function h(){for(var e={b:"",c:"",e:Xt,f:en,g:"",h:Jt,i:Qt,j:wt,k:"",l:n},t,r=0;t=arguments[r];r++)for(var i in t)e[i]=t[i];t=e.a,e.d=/^[^,]+/.exec(t)[0],r="var i,l="+e.d+",t="+e.d+";if(!"+e.d+")return t;"+e.k+";",e.b?(r+="var m=l.length;i=-1;if(typeof m=='number'){"
|
|
,e.i&&(r+="if(k(l)){l=l.split('')}"),r+="while(++i<m){"+e.b+"}}else {"):e.h&&(r+="var m=l.length;i=-1;if(m&&j(l)){while(++i<m){i+='';"+e.g+"}}else {"),e.e||(r+="var u=typeof l=='function'&&s.call(l,'prototype');");if(e.f&&e.l)r+="var q=-1,r=p[typeof l]?n(l):[],m=r.length;while(++q<m){i=r[q];",e.e||(r+="if(!(u&&i=='prototype')){"),r+=e.g+"",e.e||(r+="}");else{r+="for(i in l){";if(!e.e||e.l)r+="if(",e.e||(r+="!(u&&i=='prototype')"),!e.e&&e.l&&(r+="&&"),e.l&&(r+="h.call(l,i)"),r+="){";r+=e.g+";";if(!
|
|
e.e||e.l)r+="}"}r+="}";if(e.e){r+="var f=l.constructor;";for(i=0;7>i;i++)r+="i='"+e.j[i]+"';if(","constructor"==e.j[i]&&(r+="!(f&&f.prototype===l)&&"),r+="h.call(l,i)){"+e.g+"}"}if(e.b||e.h)r+="}";return r+=e.c+";return t",s("e,h,j,k,p,n,s","return function("+t+"){"+r+"}")(c,Nt,b,A,rn,Dt,kt)}function p(e){return"\\"+sn[e]}function d(e){return pn[e]}function v(e){return"function"!=typeof e.toString&&"string"==typeof (e+"")}function m(){}function g(e,t,n){t||(t=0),"undefined"==typeof n&&(n=e?e.length
|
|
:0);for(var r=-1,n=n-t||0,i=Array(0>n?0:n);++r<n;)i[r]=e[t+r];return i}function y(e){return dn[e]}function b(e){return Lt.call(e)==jt}function w(e){var t=i;if(!e||"object"!=typeof e||b(e))return t;var n=e.constructor;return!C(n)&&(!Gt||!v(e))||n instanceof n?Vt?(cn(e,function(e,n,r){return t=!Nt.call(r,n),i}),t===i):(cn(e,function(e,n){t=n}),t===i||Nt.call(e,t)):t}function E(e){var t=[];return hn(e,function(e,n){t.push(n)}),t}function S(e,t,n,s,o){if(e==r)return e;n&&(t=i);if(n=k(e)){var u=Lt.call
|
|
(e);if(!tn[u]||Gt&&v(e))return e;var a=mn(e)}if(!n||!t)return n?a?g(e):ln({},e):e;n=nn[u];switch(u){case It:case qt:return new n(+e);case Rt:case Wt:return new n(e);case zt:return n(e.source,ht.exec(e))}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u];var f=a?n(e.length):{};return s.push(e),o.push(f),(a?bn:hn)(e,function(e,n){f[n]=S(e,t,r,s,o)}),a&&(Nt.call(e,"index")&&(f.index=e.index),Nt.call(e,"input")&&(f.input=e.input)),f}function x(e){var t=[];return cn(e,function(e,n){C(e)&&t
|
|
.push(n)}),t.sort()}function T(e){var t={};return hn(e,function(e,n){t[e]=n}),t}function N(e,t,s,o){if(e===t)return 0!==e||1/e==1/t;if(e==r||t==r)return e===t;var u=Lt.call(e),a=Lt.call(t);u==jt&&(u=Ut),a==jt&&(a=Ut);if(u!=a)return i;switch(u){case It:case qt:return+e==+t;case Rt:return e!=+e?t!=+t:0==e?1/e==1/t:e==+t;case zt:case Wt:return e==t+""}a=u==Ft;if(!a){if(e.__wrapped__||t.__wrapped__)return N(e.__wrapped__||e,t.__wrapped__||t);if(u!=Ut||Gt&&(v(e)||v(t)))return i;var u=e.constructor,f=t
|
|
.constructor;if(u!=f&&(!C(u)||!(u instanceof u&&C(f)&&f instanceof f)))return i}s||(s=[]),o||(o=[]);for(u=s.length;u--;)if(s[u]==e)return o[u]==t;var l=n,c=0;s.push(e),o.push(t);if(a){c=e.length;if(l=c==t.length)for(;c--&&(l=N(e[c],t[c],s,o)););return l}return cn(e,function(e,n,r){if(Nt.call(r,n))return c++,l=Nt.call(t,n)&&N(e,t[n],s,o)}),l&&cn(t,function(e,t,n){if(Nt.call(n,t))return l=-1<--c}),l}function C(e){return"function"==typeof e}function k(e){return e?rn[typeof e]:i}function L(e){return"number"==typeof
|
|
e||Lt.call(e)==Rt}function A(e){return"string"==typeof e||Lt.call(e)==Wt}function O(e,t,n){var i=arguments,s=0,o=2,u=i[3],a=i[4];n!==it&&(u=[],a=[],"number"!=typeof n&&(o=i.length));for(;++s<o;)hn(i[s],function(t,n){var i,s,o;if(t&&((s=mn(t))||gn(t))){for(var f=u.length;f--;)if(i=u[f]==t)break;i?e[n]=a[f]:(u.push(t),a.push(o=(o=e[n],s)?mn(o)?o:[]:gn(o)?o:{}),e[n]=O(o,t,it,u,a))}else t!=r&&(e[n]=t)});return e}function M(e){var t=[];return hn(e,function(e){t.push(e)}),t}function _(e,t,n){var r=-1,s=
|
|
e?e.length:0,o=i,n=(0>n?Pt(0,s+n):n)||0;return"number"==typeof s?o=-1<(A(e)?e.indexOf(t,n):W(e,t,n)):bn(e,function(e){if(++r>=n)return!(o=e===t)}),o}function D(e,t,r){var i=n,t=c(t,r);if(mn(e))for(var r=-1,s=e.length;++r<s&&(i=!!t(e[r],r,e)););else bn(e,function(e,n,r){return i=!!t(e,n,r)});return i}function P(e,t,n){var r=[],t=c(t,n);if(mn(e))for(var n=-1,i=e.length;++n<i;){var s=e[n];t(s,n,e)&&r.push(s)}else bn(e,function(e,n,i){t(e,n,i)&&r.push(e)});return r}function H(e,t,n){var r,t=c(t,n);return bn
|
|
(e,function(e,n,s){if(t(e,n,s))return r=e,i}),r}function B(e,t,n){var r=-1,i=e?e.length:0,s=Array("number"==typeof i?i:0),t=c(t,n);if(mn(e))for(;++r<i;)s[r]=t(e[r],r,e);else bn(e,function(e,n,i){s[++r]=t(e,n,i)});return s}function j(e,t,n){var r=-Infinity,i=-1,s=e?e.length:0,o=r;if(t||!mn(e))t=!t&&A(e)?a:c(t,n),bn(e,function(e,n,i){n=t(e,n,i),n>r&&(r=n,o=e)});else for(;++i<s;)e[i]>o&&(o=e[i]);return o}function F(e,t){return B(e,t+"")}function I(e,t,n,r){var s=3>arguments.length;return t||(t=K),bn
|
|
(e,function(e,o,u){n=s?(s=i,e):t.call(r,n,e,o,u)}),n}function q(e,t,n,r){var s=e,o=e?e.length:0,u=3>arguments.length;if("number"!=typeof o)var a=yn(e),o=a.length;else Qt&&A(e)&&(s=e.split(""));return t||(t=K),bn(e,function(e,f,l){f=a?a[--o]:--o,n=u?(u=i,s[f]):t.call(r,n,s[f],f,l)}),n}function R(e,t,n){var r,t=c(t,n);if(mn(e))for(var n=-1,i=e.length;++n<i&&!(r=t(e[n],n,e)););else bn(e,function(e,n,i){return!(r=t(e,n,i))});return!!r}function U(e,t,n){if(e){var i=e.length;return t==r||n?e[0]:g(e,0,Ht
|
|
(Pt(0,t),i))}}function z(e,t){for(var n=-1,r=e?e.length:0,i=[];++n<r;){var s=e[n];mn(s)?Ct.apply(i,t?s:z(s)):i.push(s)}return i}function W(e,t,n){var r=-1,i=e?e.length:0;if("number"==typeof n)r=(0>n?Pt(0,i+n):n||0)-1;else if(n)return r=V(e,t),e[r]===t?r:-1;for(;++r<i;)if(e[r]===t)return r;return-1}function X(e,t,n){return g(e,t==r||n?1:Pt(0,t))}function V(e,t,n,r){for(var i=0,s=e?e.length:i,n=n?c(n,r):K,t=n(t);i<s;)r=i+s>>>1,n(e[r])<t?i=r+1:s=r;return i}function $(e,t,n,r){var s=-1,o=e?e.length:0
|
|
,u=[],a=u;"function"==typeof t&&(r=n,n=t,t=i);var f=!t&&74<o;if(f)var l={};n&&(a=[],n=c(n,r));for(;++s<o;){var r=e[s],h=n?n(r,s,e):r;f&&(a=Nt.call(l,h+"")?l[h]:l[h]=[]);if(t?!s||a[a.length-1]!==h:0>W(a,h))(n||f)&&a.push(h),u.push(r)}return u}function J(e,t){return Zt||At&&2<arguments.length?At.call.apply(At,arguments):l(e,t,g(arguments,2))}function K(e){return e}function Q(e){bn(x(e),function(t){var n=o[t]=e[t];o.prototype[t]=function(){var e=[this.__wrapped__];return Ct.apply(e,arguments),e=n.apply
|
|
(o,e),new o(e)}})}function G(){return this.__wrapped__}var n=!0,r=null,i=!1,Y="object"==typeof exports&&exports,Z="object"==typeof global&&global;Z.global===Z&&(e=Z);var et=e.document,tt=[],nt=new function(){},rt=0,it=nt,st=30,ot=e._,ut=/[-?+=!~*%&^<>|{(\/]|\[\D|\b(?:delete|in|instanceof|new|typeof|void)\b/,at=/&(?:amp|lt|gt|quot|#x27);/g,ft=/\b__p\+='';/g,lt=/\b(__p\+=)''\+/g,ct=/(__e\(.*?\)|\b__t\))\+'';/g,ht=/\w*$/,pt=/(?:__e|__t=)\(\s*(?![\d\s"']|this\.)/g,dt=RegExp("^"+(nt.valueOf+"").replace
|
|
(/[.*+?^=!:${}()|[\]\/\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),vt=/\$\{((?:(?=\\?)\\?[\s\S])*?)}/g,mt=/<%=([\s\S]+?)%>/g,gt=/($^)/,yt=/[&<>"']/g,bt=/['\n\r\t\u2028\u2029\\]/g,wt="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),Et=Math.ceil,St=tt.concat,xt=Math.floor,Tt=dt.test(Tt=Object.getPrototypeOf)&&Tt,Nt=nt.hasOwnProperty,Ct=tt.push,kt=nt.propertyIsEnumerable,Lt=nt.toString,At=dt.test(At=g.bind)&&At,Ot=dt.test(Ot=Array.
|
|
isArray)&&Ot,Mt=e.isFinite,_t=e.isNaN,Dt=dt.test(Dt=Object.keys)&&Dt,Pt=Math.max,Ht=Math.min,Bt=Math.random,jt="[object Arguments]",Ft="[object Array]",It="[object Boolean]",qt="[object Date]",Rt="[object Number]",Ut="[object Object]",zt="[object RegExp]",Wt="[object String]",Xt,Vt,$t=($t={0:1,length:1},tt.splice.call($t,0,1),$t[0]),Jt=n;(function(){function e(){this.x=1}var t=[];e.prototype={valueOf:1,y:1};for(var n in new e)t.push(n);for(n in arguments)Jt=!n;Xt=!/valueOf/.test(t),Vt="x"!=t[0]})
|
|
(1);var Kt=!b(arguments),Qt="xx"!="x"[0]+Object("x")[0];try{var Gt=("[object Object]",Lt.call(et||0)==Ut)}catch(Yt){}var Zt=At&&/\n|Opera/.test(At+Lt.call(e.opera)),en=Dt&&/^.+$|true/.test(Dt+!!e.attachEvent),tn={"[object Function]":i};tn[jt]=tn[Ft]=tn[It]=tn[qt]=tn[Rt]=tn[Ut]=tn[zt]=tn[Wt]=n;var nn={};nn[Ft]=Array,nn[It]=Boolean,nn[qt]=Date,nn[Ut]=Object,nn[Rt]=Number,nn[zt]=RegExp,nn[Wt]=String;var rn={"boolean":i,"function":n,object:n,number:i,string:i,"undefined":i},sn={"\\":"\\","'":"'","\n"
|
|
:"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};o.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:mt,variable:""};try{(/1/.test(function(){1})||s)()}catch(on){s=Function}var un={a:"o,v,g",k:"for(var a=1,b=typeof g=='number'?2:arguments.length;a<b;a++){if((l=arguments[a])){",g:"t[i]=l[i]",c:"}}"},an={a:"d,c,w",k:"c=c&&typeof w=='undefined'?c:e(c,w)",b:"if(c(l[i],i,d)===false)return t",g:"if(c(l[i],i,d)===false)return t"},fn={b:r},ln=h(un);Kt&&(b=function(
|
|
e){return e?Nt.call(e,"callee"):i});var cn=h(an,fn,{l:i}),hn=h(an,fn),pn={"&":"&","<":"<",">":">",'"':""","'":"'"},dn=T(pn),vn=h(un,{g:"if(t[i]==null)"+un.g}),mn=Ot||function(e){return Lt.call(e)==Ft};C(/x/)&&(C=function(e){return"[object Function]"==Lt.call(e)});var gn=Tt?function(e){if(!e||"object"!=typeof e)return i;var t=e.valueOf,n="function"==typeof t&&(n=Tt(t))&&Tt(n);return n?e==n||Tt(e)==n&&!b(e):w(e)}:w,yn=Dt?function(e){return"function"==typeof e&&kt.call(e,"prototype"
|
|
)?E(e):k(e)?Dt(e):[]}:E,bn=h(an);o.VERSION="0.10.0",o.assign=ln,o.after=function(e,t){return 1>e?t():function(){if(1>--e)return t.apply(this,arguments)}},o.bind=J,o.bindAll=function(e){for(var t=arguments,n=1<t.length?0:(t=x(e),-1),r=t.length;++n<r;){var i=t[n];e[i]=J(e[i],e)}return e},o.bindKey=function(e,t){return l(e,t,g(arguments,2))},o.chain=function(e){return new o(e)},o.clone=S,o.compact=function(e){for(var t=-1,n=e?e.length:0,r=[];++t<n;){var i=e[t];i&&r.push(i)}return r},o.compose=function(
|
|
){var e=arguments;return function(){for(var t=arguments,n=e.length;n--;)t=[e[n].apply(this,t)];return t[0]}},o.contains=_,o.countBy=function(e,t,n){var r={},t=c(t,n);return bn(e,function(e,n,i){n=t(e,n,i),Nt.call(r,n)?r[n]++:r[n]=1}),r},o.debounce=function(e,t,n){function i(){a=r,n||(o=e.apply(u,s))}var s,o,u,a;return function(){var r=n&&!a;return s=arguments,u=this,clearTimeout(a),a=setTimeout(i,t),r&&(o=e.apply(u,s)),o}},o.defaults=vn,o.defer=function(e){var n=g(arguments,1);return setTimeout(function(
|
|
){e.apply(t,n)},1)},o.delay=function(e,n){var r=g(arguments,2);return setTimeout(function(){e.apply(t,r)},n)},o.difference=function(e){for(var t=-1,n=e?e.length:0,r=St.apply(tt,arguments),r=u(r,n),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},o.escape=function(e){return e==r?"":(e+"").replace(yt,d)},o.every=D,o.filter=P,o.find=H,o.first=U,o.flatten=z,o.forEach=bn,o.forIn=cn,o.forOwn=hn,o.functions=x,o.groupBy=function(e,t,n){var r={},t=c(t,n);return bn(e,function(e,n,i){n=t(e,n,i),(Nt.call(r,
|
|
n)?r[n]:r[n]=[]).push(e)}),r},o.has=function(e,t){return e?Nt.call(e,t):i},o.identity=K,o.indexOf=W,o.initial=function(e,t,n){if(!e)return[];var i=e.length;return g(e,0,Ht(Pt(0,i-(t==r||n?1:t||0)),i))},o.intersection=function(e){var t=arguments,n=t.length,r={},i=[];return bn(e,function(e){if(0>W(i,e)){for(var s=n;--s;)if(!(r[s]||(r[s]=u(t[s])))(e))return;i.push(e)}}),i},o.invert=T,o.invoke=function(e,t){var n=g(arguments,2),r="function"==typeof t,i=[];return bn(e,function(e){i.push((r?t:e[t]).apply
|
|
(e,n))}),i},o.isArguments=b,o.isArray=mn,o.isBoolean=function(e){return e===n||e===i||Lt.call(e)==It},o.isDate=function(e){return Lt.call(e)==qt},o.isElement=function(e){return e?1===e.nodeType:i},o.isEmpty=function(e){var t=n;if(!e)return t;var r=Lt.call(e),s=e.length;return r==Ft||r==Wt||r==jt||Kt&&b(e)||r==Ut&&"number"==typeof s&&C(e.splice)?!s:(hn(e,function(){return t=i}),t)},o.isEqual=N,o.isFinite=function(e){return Mt(e)&&!_t(parseFloat(e))},o.isFunction=C,o.isNaN=function(e){return L(e)&&
|
|
e!=+e},o.isNull=function(e){return e===r},o.isNumber=L,o.isObject=k,o.isPlainObject=gn,o.isRegExp=function(e){return Lt.call(e)==zt},o.isString=A,o.isUndefined=function(e){return"undefined"==typeof e},o.keys=yn,o.last=function(e,t,n){if(e){var i=e.length;return t==r||n?e[i-1]:g(e,Pt(0,i-t))}},o.lastIndexOf=function(e,t,n){var r=e?e.length:0;for("number"==typeof n&&(r=(0>n?Pt(0,r+n):Ht(n,r-1))+1);r--;)if(e[r]===t)return r;return-1},o.map=B,o.max=j,o.memoize=function(e,t){var n={};return function()
|
|
{var r=t?t.apply(this,arguments):arguments[0];return Nt.call(n,r)?n[r]:n[r]=e.apply(this,arguments)}},o.merge=O,o.min=function(e,t,n){var r=Infinity,i=-1,s=e?e.length:0,o=r;if(t||!mn(e))t=!t&&A(e)?a:c(t,n),bn(e,function(e,n,i){n=t(e,n,i),n<r&&(r=n,o=e)});else for(;++i<s;)e[i]<o&&(o=e[i]);return o},o.mixin=Q,o.noConflict=function(){return e._=ot,this},o.object=function(e,t){for(var n=-1,r=e?e.length:0,i={};++n<r;){var s=e[n];t?i[s]=t[n]:i[s[0]]=s[1]}return i},o.omit=function(e,t,n){var r="function"==typeof
|
|
t,i={};if(r)t=c(t,n);else var s=St.apply(tt,arguments);return cn(e,function(e,n,o){if(r?!t(e,n,o):0>W(s,n,1))i[n]=e}),i},o.once=function(e){var t,s=i;return function(){return s?t:(s=n,t=e.apply(this,arguments),e=r,t)}},o.pairs=function(e){var t=[];return hn(e,function(e,n){t.push([n,e])}),t},o.partial=function(e){return l(e,g(arguments,1))},o.pick=function(e,t,n){var r={};if("function"!=typeof t)for(var i=0,s=St.apply(tt,arguments),o=s.length;++i<o;){var u=s[i];u in e&&(r[u]=e[u])}else t=c(t,n),cn
|
|
(e,function(e,n,i){t(e,n,i)&&(r[n]=e)});return r},o.pluck=F,o.random=function(e,t){return e==r&&t==r&&(t=1),e=+e||0,t==r&&(t=e,e=0),e+xt(Bt()*((+t||0)-e+1))},o.range=function(e,t,n){e=+e||0,n=+n||1,t==r&&(t=e,e=0);for(var i=-1,t=Pt(0,Et((t-e)/n)),s=Array(t);++i<t;)s[i]=e,e+=n;return s},o.reduce=I,o.reduceRight=q,o.reject=function(e,t,n){return t=c(t,n),P(e,function(e,n,r){return!t(e,n,r)})},o.rest=X,o.result=function(e,t){var n=e?e[t]:r;return C(n)?e[t]():n},o.shuffle=function(e){var t=-1,n=Array
|
|
(e?e.length:0);return bn(e,function(e){var r=xt(Bt()*(++t+1));n[t]=n[r],n[r]=e}),n},o.size=function(e){var t=e?e.length:0;return"number"==typeof t?t:yn(e).length},o.some=R,o.sortBy=function(e,t,n){var r=[],t=c(t,n);bn(e,function(e,n,i){r.push({a:t(e,n,i),b:n,c:e})}),e=r.length;for(r.sort(f);e--;)r[e]=r[e].c;return r},o.sortedIndex=V,o.tap=function(e,t){return t(e),e},o.template=function(e,t,n){e||(e=""),n||(n={});var r,i,u=o.templateSettings,a=0,f=n.interpolate||u.interpolate||gt,l="__p+='",c=n.variable||
|
|
u.variable,h=c;e.replace(RegExp((n.escape||u.escape||gt).source+"|"+f.source+"|"+(f===mt?vt:gt).source+"|"+(n.evaluate||u.evaluate||gt).source+"|$","g"),function(t,n,i,s,o,u){i||(i=s),l+=e.slice(a,u).replace(bt,p),l+=n?"'+__e("+n+")+'":o?"';"+o+";__p+='":i?"'+((__t=("+i+"))==null?'':__t)+'":"",r||(r=o||ut.test(n||i)),a=u+t.length}),l+="';\n",h||(c="obj",r?l="with("+c+"){"+l+"}":(n=RegExp("(\\(\\s*)"+c+"\\."+c+"\\b","g"),l=l.replace(pt,"$&"+c+".").replace(n,"$1__d"))),l=(r?l.replace(ft,""):l).replace
|
|
(lt,"$1").replace(ct,"$1;"),l="function("+c+"){"+(h?"":c+"||("+c+"={});")+"var __t,__p='',__e=_.escape"+(r?",__j=Array.prototype.join;function print(){__p+=__j.call(arguments,'')}":(h?"":",__d="+c+"."+c+"||"+c)+";")+l+"return __p}";try{i=s("_","return "+l)(o)}catch(d){throw d.source=l,d}return t?i(t):(i.source=l,i)},o.throttle=function(e,t){function n(){a=new Date,u=r,s=e.apply(o,i)}var i,s,o,u,a=0;return function(){var r=new Date,f=t-(r-a);return i=arguments,o=this,0>=f?(clearTimeout(u),a=r,s=e.
|
|
apply(o,i)):u||(u=setTimeout(n,f)),s}},o.times=function(e,t,n){for(var e=+e||0,r=-1,i=Array(e);++r<e;)i[r]=t.call(n,r);return i},o.toArray=function(e){return"number"==typeof (e?e.length:0)?Qt&&A(e)?e.split(""):g(e):M(e)},o.unescape=function(e){return e==r?"":(e+"").replace(at,y)},o.union=function(){return $(St.apply(tt,arguments))},o.uniq=$,o.uniqueId=function(e){return(e==r?"":e+"")+ ++rt},o.values=M,o.where=function(e,t){var n=yn(t);return P(e,function(e){for(var r=n.length;r--;){var i=e[n[r]]===
|
|
t[n[r]];if(!i)break}return!!i})},o.without=function(e){for(var t=-1,n=e?e.length:0,r=u(arguments,1,20),i=[];++t<n;){var s=e[t];r(s)||i.push(s)}return i},o.wrap=function(e,t){return function(){var n=[e];return Ct.apply(n,arguments),t.apply(this,n)}},o.zip=function(e){for(var t=-1,n=e?j(F(arguments,"length")):0,r=Array(n);++t<n;)r[t]=F(arguments,t);return r},o.all=D,o.any=R,o.collect=B,o.detect=H,o.drop=X,o.each=bn,o.extend=ln,o.foldl=I,o.foldr=q,o.head=U,o.include=_,o.inject=I,o.methods=x,o.select=
|
|
P,o.tail=X,o.take=U,o.unique=$,Q(o),o.prototype.chain=function(){return this},o.prototype.toString=function(){return""+this.__wrapped__},o.prototype.value=G,o.prototype.valueOf=G,bn(["first","last"],function(e){var t=o[e];t&&(o.prototype[e]=function(e,n){var i=t(this.__wrapped__,e,n);return e==r||n?i:new o(i)})}),bn(P(x(o),function(e){return/^(?:contains|every|find|has|is[A-Z].+|reduce.*|some)$/.test(e)}),function(e){var t=o[e];o.prototype[e]=function(){var e=[this.__wrapped__];return Ct.apply(e,
|
|
arguments),t.apply(o,e)}}),bn("pop push reverse shift sort splice unshift".split(" "),function(e){var t=tt[e];o.prototype[e]=function(){var e=this.__wrapped__;return t.apply(e,arguments),$t&&e.length===0&&delete e[0],this}}),bn(["concat","join","slice"],function(e){var t=tt[e];o.prototype[e]=function(){var e=t.apply(this.__wrapped__,arguments);return new o(e)}}),typeof define=="function"&&typeof define.amd=="object"&&define.amd?(e._=o,define(function(){return o})):Y?"object"==typeof module&&module&&
|
|
module.exports==Y?(module.exports=o)._=o:Y._=o:e._=o})(this); |