2015-01-09 04:04:52 +08:00
/ * *
* @ license
* Lo - Dash 2.4 . 1 ( Custom Build ) lodash . com / license | Underscore . js 1.5 . 2 underscorejs . org / LICENSE
2015-01-16 01:33:18 +08:00
* Build : ` lodash compat exports="node" include="bindAll,each,first,forEach,forIn,forOwn,include,invoke,isArray,isEqual,isFunction,isObject,isString,keys,map,merge,result,values" --minify --output ./lib/lodash.js `
2015-01-09 04:04:52 +08:00
* /
2015-01-16 01:33:18 +08:00
; ( function ( ) { function n ( n , t , r ) { r = ( r || 0 ) - 1 ; for ( var e = n ? n . length : 0 ; ++ r < e ; ) if ( n [ r ] === t ) return r ; return - 1 } function t ( n ) { return typeof n . toString != "function" && typeof ( n + "" ) == "string" } function r ( n ) { n . length = 0 , L . length < N && L . push ( n ) } function e ( n , t , r ) { t || ( t = 0 ) , typeof r == "undefined" && ( r = n ? n . length : 0 ) ; var e = - 1 ; r = r - t || 0 ; for ( var o = Array ( 0 > r ? 0 : r ) ; ++ e < r ; ) o [ e ] = n [ t + e ] ; return o } function o ( ) { } function u ( n ) { function t ( ) { if ( o ) { var n = e ( o ) ; pt . apply ( n , arguments ) } if ( this instanceof t ) { var a = f ( r . prototype ) , n = r . apply ( a , n || arguments ) ;
return j ( n ) ? n : a } return r . apply ( u , n || arguments ) } var r = n [ 0 ] , o = n [ 2 ] , u = n [ 4 ] ; return wt ( t , n ) , t } function f ( n ) { return j ( n ) ? ht ( n ) : { } } function a ( n , t , r ) { if ( typeof n != "function" ) return P ; if ( typeof t == "undefined" || ! ( "prototype" in n ) ) return n ; var e = n . _ _bindData _ _ ; if ( typeof e == "undefined" && ( _t . funcNames && ( e = ! n . name ) , e = e || ! _t . funcDecomp , ! e ) ) { var o = ct . call ( n ) ; _t . funcNames || ( e = ! R . test ( o ) ) , e || ( e = T . test ( o ) , wt ( n , e ) ) } if ( false === e || true !== e && 1 & e [ 1 ] ) return n ; switch ( r ) { case 1 : return function ( r ) { return n . call ( t , r ) } ; case 2 : return function ( r , e ) { return n . call ( t , r , e )
} ; case 3 : return function ( r , e , o ) { return n . call ( t , r , e , o ) } ; case 4 : return function ( r , e , o , u ) { return n . call ( t , r , e , o , u ) } } return S ( n , t ) } function i ( n ) { function t ( ) { var n = s ? c : this ; if ( u ) { var h = e ( u ) ; pt . apply ( h , arguments ) } return ( a || g ) && ( h || ( h = e ( arguments ) ) , a && pt . apply ( h , a ) , g && h . length < l ) ? ( o |= 16 , i ( [ r , y ? o : - 4 & o , h , null , c , l ] ) ) : ( h || ( h = arguments ) , p && ( r = n [ v ] ) , this instanceof t ? ( n = f ( r . prototype ) , h = r . apply ( n , h ) , j ( h ) ? h : n ) : r . apply ( n , h ) ) } var r = n [ 0 ] , o = n [ 1 ] , u = n [ 2 ] , a = n [ 3 ] , c = n [ 4 ] , l = n [ 5 ] , s = 1 & o , p = 2 & o , g = 4 & o , y = 8 & o , v = r ; return wt ( t , n ) , t
} function c ( n , t , r , e ) { e = ( e || 0 ) - 1 ; for ( var o = n ? n . length : 0 , u = [ ] ; ++ e < o ; ) { var f = n [ e ] ; if ( f && typeof f == "object" && typeof f . length == "number" && ( Et ( f ) || b ( f ) ) ) { t || ( f = c ( f , t , r ) ) ; var a = - 1 , i = f . length , l = u . length ; for ( u . length += i ; ++ a < i ; ) u [ l ++ ] = f [ a ] } else r || u . push ( f ) } return u } function l ( n , e , o , u , f , a ) { if ( o ) { var i = o ( n , e ) ; if ( typeof i != "undefined" ) return ! ! i } if ( n === e ) return 0 !== n || 1 / n == 1 / e ; if ( n === n && ! ( n && X [ typeof n ] || e && X [ typeof e ] ) ) return false ; if ( null == n || null == e ) return n === e ; var c = at . call ( n ) , s = at . call ( e ) ; if ( c == $ && ( c = V ) , s == $ && ( s = V ) , c != s ) return false ;
switch ( c ) { case z : case G : return + n == + e ; case M : return n != + n ? e != + e : 0 == n ? 1 / n == 1 / e : n == + e ; case W : case H : return n == e + "" } if ( s = c == q , ! s ) { var p = st . call ( n , "__wrapped__" ) , g = st . call ( e , "__wrapped__" ) ; if ( p || g ) return l ( p ? n . _ _wrapped _ _ : n , g ? e . _ _wrapped _ _ : e , o , u , f , a ) ; if ( c != V || ! _t . nodeClass && ( t ( n ) || t ( e ) ) ) return false ; if ( c = ! _t . argsObject && b ( n ) ? Object : n . constructor , p = ! _t . argsObject && b ( e ) ? Object : e . constructor , c != p && ! ( d ( c ) && c instanceof c && d ( p ) && p instanceof p ) && "constructor" in n && "constructor" in e ) return false } for ( c = ! f , f || ( f = L . pop ( ) || [ ] ) , a || ( a = L . pop ( ) || [ ] ) , p = f . length ; p -- ; ) if ( f [ p ] == n ) return a [ p ] == e ;
var y = 0 , i = true ; if ( f . push ( n ) , a . push ( e ) , s ) { if ( p = n . length , y = e . length , ( i = y == p ) || u ) for ( ; y -- ; ) if ( s = p , g = e [ y ] , u ) for ( ; s -- && ! ( i = l ( n [ s ] , g , o , u , f , a ) ) ; ) ; else if ( ! ( i = l ( n [ y ] , g , o , u , f , a ) ) ) break } else Ct ( e , function ( t , r , e ) { return st . call ( e , r ) ? ( y ++ , i = st . call ( n , r ) && l ( n [ r ] , t , o , u , f , a ) ) : void 0 } ) , i && ! u && Ct ( n , function ( n , t , r ) { return st . call ( r , t ) ? i = - 1 < -- y : void 0 } ) ; return f . pop ( ) , a . pop ( ) , c && ( r ( f ) , r ( a ) ) , i } function s ( n , t , r , e , o ) { ( Et ( t ) ? w : St ) ( t , function ( t , u ) { var f , a , i = t , c = n [ u ] ; if ( t && ( ( a = Et ( t ) ) || Pt ( t ) ) ) { for ( i = e . length ; i -- ; ) if ( f = e [ i ] == t ) { c = o [ i ] ;
break } if ( ! f ) { var l ; r && ( i = r ( c , t ) , l = typeof i != "undefined" ) && ( c = i ) , l || ( c = a ? Et ( c ) ? c : [ ] : Pt ( c ) ? c : { } ) , e . push ( t ) , o . push ( c ) , l || s ( c , t , r , e , o ) } } else r && ( i = r ( c , t ) , typeof i == "undefined" && ( i = t ) ) , typeof i != "undefined" && ( c = i ) ; n [ u ] = c } ) } function p ( n , t , r , o , f , a ) { var c = 1 & t , l = 4 & t , s = 16 & t , g = 32 & t ; if ( ! ( 2 & t || d ( n ) ) ) throw new TypeError ; s && ! r . length && ( t &= - 17 , s = r = false ) , g && ! o . length && ( t &= - 33 , g = o = false ) ; var y = n && n . _ _bindData _ _ ; return y && true !== y ? ( y = e ( y ) , y [ 2 ] && ( y [ 2 ] = e ( y [ 2 ] ) ) , y [ 3 ] && ( y [ 3 ] = e ( y [ 3 ] ) ) , ! c || 1 & y [ 1 ] || ( y [ 4 ] = f ) , ! c && 1 & y [ 1 ] && ( t |= 8 ) , ! l || 4 & y [ 1 ] || ( y [ 5 ] = a ) , s && pt . apply ( y [ 2 ] || ( y [ 2 ] = [ ] ) , r ) , g && yt . apply ( y [ 3 ] || ( y [ 3 ] = [ ] ) , o ) , y [ 1 ] |= t , p . apply ( null , y ) ) : ( 1 == t || 17 === t ? u : i ) ( [ n , t , r , o , f , a ] )
} function g ( ) { U . h = K , U . b = U . c = U . g = U . i = "" , U . e = "t" , U . j = true ; for ( var n , t = 0 ; n = arguments [ t ] ; t ++ ) for ( var r in n ) U [ r ] = n [ r ] ; t = U . a , U . d = /^[^,]+/ . exec ( t ) [ 0 ] , n = Function , t = "return function(" + t + "){" , r = U ; var e = "var n,t=" + r . d + ",E=" + r . e + ";if(!t)return E;" + r . i + ";" ; r . b ? ( e += "var u=t.length;n=-1;if(" + r . b + "){" , _t . unindexedChars && ( e += "if(s(t)){t=t.split('')}" ) , e += "while(++n<u){" + r . g + ";}}else{" ) : _t . nonEnumArgs && ( e += "var u=t.length;n=-1;if(u&&p(t)){while(++n<u){n+='';" + r . g + ";}}else{" ) , _t . enumPrototypes && ( e += "var G=typeof t=='function';" ) , _t . enumErrorProps && ( e += "var F=t===k||t instanceof Error;" ) ;
var o = [ ] ; if ( _t . enumPrototypes && o . push ( '!(G&&n=="prototype")' ) , _t . enumErrorProps && o . push ( '!(F&&(n=="message"||n=="name"))' ) , r . j && r . f ) e += "var C=-1,D=B[typeof t]&&v(t),u=D?D.length:0;while(++C<u){n=D[C];" , o . length && ( e += "if(" + o . join ( "&&" ) + "){" ) , e += r . g + ";" , o . length && ( e += "}" ) , e += "}" ; else if ( e += "for(n in t){" , r . j && o . push ( "m.call(t, n)" ) , o . length && ( e += "if(" + o . join ( "&&" ) + "){" ) , e += r . g + ";" , o . length && ( e += "}" ) , e += "}" , _t . nonEnumShadows ) { for ( e += "if(t!==A){var i=t.constructor,r=t===(i&&i.prototype),f=t===J?I:t===k?j:L.call(t),x=y[f];" , k = 0 ; 7 > k ; k ++ ) e += "n='" + r . h [ k ] + "';if((!(r&&x[n])&&m.call(t,n))" , r . j || ( e += "||(!x[n]&&t[n]!==A[n])" ) , e += "){" + r . g + "}" ;
e += "}" } return ( r . b || _t . nonEnumArgs ) && ( e += "}" ) , e += r . c + ";return E" , n ( "d,j,k,m,o,p,q,s,v,A,B,y,I,J,L" , t + e + "}" ) ( a , J , ot , st , B , b , Et , O , U . f , ut , X , Ot , H , ft , at ) } function y ( ) { var t = ( t = o . indexOf ) === A ? n : t ; return t } function v ( n ) { return typeof n == "function" && it . test ( n ) } function h ( n ) { var r , e ; return ! n || at . call ( n ) != V || ( r = n . constructor , d ( r ) && ! ( r instanceof r ) ) || ! _t . argsClass && b ( n ) || ! _t . nodeClass && t ( n ) ? false : _t . ownLast ? ( Ct ( n , function ( n , t , r ) { return e = st . call ( r , t ) , false } ) , false !== e ) : ( Ct ( n , function ( n , t ) { e = t } ) , typeof e == "undefined" || st . call ( n , e ) )
} function b ( n ) { return n && typeof n == "object" && typeof n . length == "number" && at . call ( n ) == $ || false } function m ( n ) { var t = [ ] ; return Ct ( n , function ( n , r ) { d ( n ) && t . push ( r ) } ) , t . sort ( ) } function d ( n ) { return typeof n == "function" } function j ( n ) { return ! ( ! n || ! X [ typeof n ] ) } function O ( n ) { return typeof n == "string" || n && typeof n == "object" && at . call ( n ) == H || false } function _ ( n , t , r ) { var e = - 1 , o = y ( ) , u = n ? n . length : 0 , f = false ; return r = ( 0 > r ? dt ( 0 , u + r ) : r ) || 0 , Et ( n ) ? f = - 1 < o ( n , t , r ) : typeof u == "number" ? f = - 1 < ( O ( n ) ? n . indexOf ( t , r ) : o ( n , t , r ) ) : kt ( n , function ( n ) { return ++ e < r ? void 0 : ! ( f = n === t )
} ) , f } function w ( n , t , r ) { if ( t && typeof r == "undefined" && Et ( n ) ) { r = - 1 ; for ( var e = n . length ; ++ r < e && false !== t ( n [ r ] , r , n ) ; ) ; } else kt ( n , t , r ) ; return n } function E ( n , t , r ) { var e = - 1 , u = n ? n . length : 0 , f = Array ( typeof u == "number" ? u : 0 ) ; if ( t = o . createCallback ( t , r , 3 ) , Et ( n ) ) for ( ; ++ e < u ; ) f [ e ] = t ( n [ e ] , e , n ) ; else kt ( n , function ( n , r , o ) { f [ ++ e ] = t ( n , r , o ) } ) ; return f } function x ( n , t , r ) { var u = 0 , f = n ? n . length : 0 ; if ( typeof t != "number" && null != t ) { var a = - 1 ; for ( t = o . createCallback ( t , r , 3 ) ; ++ a < f && t ( n [ a ] , a , n ) ; ) u ++ } else if ( u = t , null == u || r ) return n ? n [ 0 ] : I ; return e ( n , 0 , jt ( dt ( 0 , u ) , f ) )
} function A ( t , r , e ) { if ( typeof e == "number" ) { var o = t ? t . length : 0 ; e = 0 > e ? dt ( 0 , o + e ) : e || 0 } else if ( e ) return e = C ( t , r ) , t [ e ] === r ? e : - 1 ; return n ( t , r , e ) } function C ( n , t , r , e ) { var u = 0 , f = n ? n . length : u ; for ( r = r ? o . createCallback ( r , e , 1 ) : P , t = r ( t ) ; u < f ; ) e = u + f >>> 1 , r ( n [ e ] ) < t ? u = e + 1 : f = e ; return u } function S ( n , t ) { return 2 < arguments . length ? p ( n , 17 , e ( arguments , 2 ) , null , t ) : p ( n , 1 , null , null , t ) } function P ( n ) { return n } function D ( ) { } function F ( n ) { return function ( t ) { return t [ n ] } } var I , L = [ ] , B = { } , N = 40 , R = /^\s*function[ \n\r\t]+\w/ , T = /\bthis\b/ , K = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf" . split ( " " ) , $ = "[object Arguments]" , q = "[object Array]" , z = "[object Boolean]" , G = "[object Date]" , J = "[object Error]" , M = "[object Number]" , V = "[object Object]" , W = "[object RegExp]" , H = "[object String]" , Q = { configurable : false , enumerable : false , value : null , writable : false } , U = { a : "" , b : null , c : "" , d : "" , e : "" , v : null , g : "" , h : null , support : null , i : "" , j : false } , X = { "boolean" : false , "function" : true , object : true , number : false , string : false , undefined : false } , Y = X [ typeof window ] && window || this , Z = X [ typeof exports ] && exports && ! exports . nodeType && exports , nt = X [ typeof module ] && module && ! module . nodeType && module , tt = nt && nt . exports === Z && Z , rt = X [ typeof global ] && global ;
! rt || rt . global !== rt && rt . window !== rt || ( Y = rt ) ; var et = [ ] , ot = Error . prototype , ut = Object . prototype , ft = String . prototype , at = ut . toString , it = RegExp ( "^" + ( at + "" ) . replace ( /[.*+?^${}()|[\]\\]/g , "\\$&" ) . replace ( /toString| for [^\]]+/g , ".*?" ) + "$" ) , ct = Function . prototype . toString , lt = v ( lt = Object . getPrototypeOf ) && lt , st = ut . hasOwnProperty , pt = et . push , gt = ut . propertyIsEnumerable , yt = et . unshift , vt = function ( ) { try { var n = { } , t = v ( t = Object . defineProperty ) && t , r = t ( n , n , n ) && t } catch ( e ) { } return r } ( ) , ht = v ( ht = Object . create ) && ht , bt = v ( bt = Array . isArray ) && bt , mt = v ( mt = Object . keys ) && mt , dt = Math . max , jt = Math . min , Ot = { } ;
Ot [ q ] = Ot [ G ] = Ot [ M ] = { constructor : true , toLocaleString : true , toString : true , valueOf : true } , Ot [ z ] = Ot [ H ] = { constructor : true , toString : true , valueOf : true } , Ot [ J ] = Ot [ "[object Function]" ] = Ot [ W ] = { constructor : true , toString : true } , Ot [ V ] = { constructor : true } , function ( ) { for ( var n = K . length ; n -- ; ) { var t , r = K [ n ] ; for ( t in Ot ) st . call ( Ot , t ) && ! st . call ( Ot [ t ] , r ) && ( Ot [ t ] [ r ] = false ) } } ( ) ; var _t = o . support = { } ; ! function ( ) { function n ( ) { this . x = 1 } var t = { 0 : 1 , length : 1 } , r = [ ] ; n . prototype = { valueOf : 1 , y : 1 } ; for ( var e in new n ) r . push ( e ) ; for ( e in arguments ) ; _t . argsClass = at . call ( arguments ) == $ , _t . argsObject = arguments . constructor == Object && ! ( arguments instanceof Array ) , _t . enumErrorProps = gt . call ( ot , "message" ) || gt . call ( ot , "name" ) , _t . enumPrototypes = gt . call ( n , "prototype" ) , _t . funcDecomp = ! v ( Y . k ) && T . test ( function ( ) { return this
} ) , _t . funcNames = typeof Function . name == "string" , _t . nonEnumArgs = 0 != e , _t . nonEnumShadows = ! /valueOf/ . test ( r ) , _t . ownLast = "x" != r [ 0 ] , _t . spliceObjects = ( et . splice . call ( t , 0 , 1 ) , ! t [ 0 ] ) , _t . unindexedChars = "xx" != "x" [ 0 ] + Object ( "x" ) [ 0 ] ; try { _t . nodeClass = ! ( at . call ( document ) == V && ! ( { toString : 0 } + "" ) ) } catch ( o ) { _t . nodeClass = true } } ( 1 ) , ht || ( f = function ( ) { function n ( ) { } return function ( t ) { if ( j ( t ) ) { n . prototype = t ; var r = new n ; n . prototype = null } return r || Y . Object ( ) } } ( ) ) ; var wt = vt ? function ( n , t ) { Q . value = t , vt ( n , "__bindData__" , Q ) } : D ; _t . argsClass || ( b = function ( n ) { return n && typeof n == "object" && typeof n . length == "number" && st . call ( n , "callee" ) && ! gt . call ( n , "callee" ) || false
} ) ; var Et = bt || function ( n ) { return n && typeof n == "object" && typeof n . length == "number" && at . call ( n ) == q || false } , xt = g ( { a : "z" , e : "[]" , i : "if(!(B[typeof z]))return E" , g : "E.push(n)" } ) , At = mt ? function ( n ) { return j ( n ) ? _t . enumPrototypes && typeof n == "function" || _t . nonEnumArgs && n . length && b ( n ) ? xt ( n ) : mt ( n ) : [ ] } : xt , rt = { a : "g,e,K" , i : "e=e&&typeof K=='undefined'?e:d(e,K,3)" , b : "typeof u=='number'" , v : At , g : "if(e(t[n],n,g)===false)return E" } , bt = { i : "if(!B[typeof t])return E;" + rt . i , b : false } , kt = g ( rt ) , Ct = g ( rt , bt , { j : false } ) , St = g ( rt , bt ) ; d ( /x/ ) && ( d = function ( n ) { return typeof n == "function" && "[object Function]" == at . call ( n )
} ) ; var Pt = lt ? function ( n ) { if ( ! n || at . call ( n ) != V || ! _t . argsClass && b ( n ) ) return false ; var t = n . valueOf , r = v ( t ) && ( r = lt ( t ) ) && lt ( r ) ; return r ? n == r || lt ( n ) == r : h ( n ) } : h ; o . bind = S , o . bindAll = function ( n ) { for ( var t = 1 < arguments . length ? c ( arguments , true , false , 1 ) : m ( n ) , r = - 1 , e = t . length ; ++ r < e ; ) { var o = t [ r ] ; n [ o ] = p ( n [ o ] , 1 , null , null , n ) } return n } , o . createCallback = function ( n , t , r ) { var e = typeof n ; if ( null == n || "function" == e ) return a ( n , t , r ) ; if ( "object" != e ) return F ( n ) ; var o = At ( n ) , u = o [ 0 ] , f = n [ u ] ; return 1 != o . length || f !== f || j ( f ) ? function ( t ) { for ( var r = o . length , e = false ; r -- && ( e = l ( t [ o [ r ] ] , n [ o [ r ] ] , null , true ) ) ; ) ; return e
} : function ( n ) { return n = n [ u ] , f === n && ( 0 !== f || 1 / f == 1 / n ) } } , o . forEach = w , o . forIn = Ct , o . forOwn = St , o . functions = m , o . invoke = function ( n , t ) { var r = e ( arguments , 2 ) , o = - 1 , u = typeof t == "function" , f = n ? n . length : 0 , a = Array ( typeof f == "number" ? f : 0 ) ; return w ( n , function ( n ) { a [ ++ o ] = ( u ? t : n [ t ] ) . apply ( n , r ) } ) , a } , o . keys = At , o . map = E , o . merge = function ( n ) { var t = arguments , o = 2 ; if ( ! j ( n ) ) return n ; if ( "number" != typeof t [ 2 ] && ( o = t . length ) , 3 < o && "function" == typeof t [ o - 2 ] ) var u = a ( t [ -- o - 1 ] , t [ o -- ] , 2 ) ; else 2 < o && "function" == typeof t [ o - 1 ] && ( u = t [ -- o ] ) ;
for ( var t = e ( arguments , 1 , o ) , f = - 1 , i = L . pop ( ) || [ ] , c = L . pop ( ) || [ ] ; ++ f < o ; ) s ( n , t [ f ] , u , i , c ) ; return r ( i ) , r ( c ) , n } , o . property = F , o . values = function ( n ) { for ( var t = - 1 , r = At ( n ) , e = r . length , o = Array ( e ) ; ++ t < e ; ) o [ t ] = n [ r [ t ] ] ; return o } , o . collect = E , o . each = w , o . methods = m , o . contains = _ , o . identity = P , o . indexOf = A , o . isArguments = b , o . isArray = Et , o . isEqual = function ( n , t , r , e ) { return l ( n , t , typeof r == "function" && a ( r , e , 2 ) ) } , o . isFunction = d , o . isObject = j , o . isPlainObject = Pt , o . isString = O , o . noop = D , o . result = function ( n , t ) { if ( n ) { var r = n [ t ] ; return d ( r ) ? n [ t ] ( ) : r
} } , o . sortedIndex = C , o . include = _ , o . first = x , o . take = x , o . head = x , o . VERSION = "2.4.1" , Z && nt && tt && ( ( nt . exports = o ) . _ = o ) } ) . call ( this ) ;