1- ! function ( e ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = e ( ) ; else if ( "function" == typeof define && define . amd ) define ( [ ] , e ) ; else { var f ; "undefined" != typeof window ?f = window :"undefined" != typeof global ?f = global :"undefined" != typeof self && ( f = self ) , f . debug = e ( ) } } ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; throw new Error ( "Cannot find module '" + o + "'" ) } var f = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( f . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , f , f . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( _dereq_ , module , exports ) {
2-
3- /**
4- * This is the web browser implementation of `debug()`.
5- *
6- * Expose `debug()` as the module.
7- */
8-
9- exports = module . exports = _dereq_ ( './debug' ) ;
10- exports . log = log ;
11- exports . formatArgs = formatArgs ;
12- exports . save = save ;
13- exports . load = load ;
14- exports . useColors = useColors ;
15-
16- /**
17- * Colors.
18- */
19-
20- exports . colors = [
21- 'lightseagreen' ,
22- 'forestgreen' ,
23- 'goldenrod' ,
24- 'dodgerblue' ,
25- 'darkorchid' ,
26- 'crimson'
27- ] ;
28-
29- /**
30- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
31- * and the Firebug extension (any Firefox version) are known
32- * to support "%c" CSS customizations.
33- *
34- * TODO: add a `localStorage` variable to explicitly enable/disable colors
35- */
36-
37- function useColors ( ) {
38- // is webkit? http://stackoverflow.com/a/16459606/376773
39- return ( 'WebkitAppearance' in document . documentElement . style ) ||
40- // is firebug? http://stackoverflow.com/a/398120/376773
41- ( window . console && ( console . firebug || ( console . exception && console . table ) ) ) ||
42- // is firefox >= v31?
43- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
44- ( navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ;
45- }
46-
47- /**
48- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
49- */
50-
51- exports . formatters . j = function ( v ) {
52- return JSON . stringify ( v ) ;
53- } ;
54-
55-
56- /**
57- * Colorize log arguments if enabled.
58- *
59- * @api public
60- */
61-
62- function formatArgs ( ) {
63- var args = arguments ;
64- var useColors = this . useColors ;
65-
66- args [ 0 ] = ( useColors ? '%c' : '' )
67- + this . namespace
68- + ( useColors ? ' %c' : ' ' )
69- + args [ 0 ]
70- + ( useColors ? '%c ' : ' ' )
71- + '+' + exports . humanize ( this . diff ) ;
72-
73- if ( ! useColors ) return args ;
74-
75- var c = 'color: ' + this . color ;
76- args = [ args [ 0 ] , c , 'color: inherit' ] . concat ( Array . prototype . slice . call ( args , 1 ) ) ;
77-
78- // the final "%c" is somewhat tricky, because there could be other
79- // arguments passed either before or after the %c, so we need to
80- // figure out the correct index to insert the CSS into
81- var index = 0 ;
82- var lastC = 0 ;
83- args [ 0 ] . replace ( / % [ a - z % ] / g, function ( match ) {
84- if ( '%%' === match ) return ;
85- index ++ ;
86- if ( '%c' === match ) {
87- // we only are interested in the *last* %c
88- // (the user may have provided their own)
89- lastC = index ;
90- }
91- } ) ;
92-
93- args . splice ( lastC , 0 , c ) ;
94- return args ;
95- }
96-
97- /**
98- * Invokes `console.log()` when available.
99- * No-op when `console.log` is not a "function".
100- *
101- * @api public
102- */
103-
104- function log ( ) {
105- // This hackery is required for IE8,
106- // where the `console.log` function doesn't have 'apply'
107- return 'object' == typeof console
108- && 'function' == typeof console . log
109- && Function . prototype . apply . call ( console . log , console , arguments ) ;
110- }
111-
112- /**
113- * Save `namespaces`.
114- *
115- * @param {String } namespaces
116- * @api private
117- */
118-
119- function save ( namespaces ) {
120- try {
121- if ( null == namespaces ) {
122- localStorage . removeItem ( 'debug' ) ;
123- } else {
124- localStorage . debug = namespaces ;
125- }
126- } catch ( e ) { }
127- }
128-
129- /**
130- * Load `namespaces`.
131- *
132- * @return {String } returns the previously persisted debug modes
133- * @api private
134- */
135-
136- function load ( ) {
137- var r ;
138- try {
139- r = localStorage . debug ;
140- } catch ( e ) { }
141- return r ;
142- }
143-
144- /**
145- * Enable namespaces listed in `localStorage.debug` initially.
146- */
147-
148- exports . enable ( load ( ) ) ;
149-
150- } , { "./debug" :2 } ] , 2 :[ function ( _dereq_ , module , exports ) {
1+ ! function ( e ) { if ( "object" == typeof exports && "undefined" != typeof module ) module . exports = e ( ) ; else if ( "function" == typeof define && define . amd ) define ( [ ] , e ) ; else { var f ; "undefined" != typeof window ?f = window :"undefined" != typeof global ?f = global :"undefined" != typeof self && ( f = self ) , f . debug = e ( ) } } ( function ( ) { var define , module , exports ; return ( function e ( t , n , r ) { function s ( o , u ) { if ( ! n [ o ] ) { if ( ! t [ o ] ) { var a = typeof require == "function" && require ; if ( ! u && a ) return a ( o , ! 0 ) ; if ( i ) return i ( o , ! 0 ) ; var f = new Error ( "Cannot find module '" + o + "'" ) ; throw f . code = "MODULE_NOT_FOUND" , f } var l = n [ o ] = { exports :{ } } ; t [ o ] [ 0 ] . call ( l . exports , function ( e ) { var n = t [ o ] [ 1 ] [ e ] ; return s ( n ?n :e ) } , l , l . exports , e , t , n , r ) } return n [ o ] . exports } var i = typeof require == "function" && require ; for ( var o = 0 ; o < r . length ; o ++ ) s ( r [ o ] ) ; return s } ) ( { 1 :[ function ( require , module , exports ) {
1512
1523/**
1534 * This is the common logic for both the Node.js and web browser
@@ -161,7 +12,7 @@ exports.coerce = coerce;
16112exports . disable = disable ;
16213exports . enable = enable ;
16314exports . enabled = enabled ;
164- exports . humanize = _dereq_ ( 'ms' ) ;
15+ exports . humanize = require ( 'ms' ) ;
16516
16617/**
16718 * The currently active debug mode names, and names to skip.
@@ -346,7 +197,7 @@ function coerce(val) {
346197 return val ;
347198}
348199
349- } , { "ms" :3 } ] , 3 :[ function ( _dereq_ , module , exports ) {
200+ } , { "ms" :2 } ] , 2 :[ function ( require , module , exports ) {
350201/**
351202 * Helpers.
352203 */
@@ -459,6 +310,154 @@ function plural(ms, n, name) {
459310 return Math . ceil ( ms / n ) + ' ' + name + 's' ;
460311}
461312
462- } , { } ] } , { } , [ 1 ] )
463- ( 1 )
313+ } , { } ] , 3 :[ function ( require , module , exports ) {
314+
315+ /**
316+ * This is the web browser implementation of `debug()`.
317+ *
318+ * Expose `debug()` as the module.
319+ */
320+
321+ exports = module . exports = require ( './debug' ) ;
322+ exports . log = log ;
323+ exports . formatArgs = formatArgs ;
324+ exports . save = save ;
325+ exports . load = load ;
326+ exports . useColors = useColors ;
327+
328+ /**
329+ * Colors.
330+ */
331+
332+ exports . colors = [
333+ 'lightseagreen' ,
334+ 'forestgreen' ,
335+ 'goldenrod' ,
336+ 'dodgerblue' ,
337+ 'darkorchid' ,
338+ 'crimson'
339+ ] ;
340+
341+ /**
342+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
343+ * and the Firebug extension (any Firefox version) are known
344+ * to support "%c" CSS customizations.
345+ *
346+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
347+ */
348+
349+ function useColors ( ) {
350+ // is webkit? http://stackoverflow.com/a/16459606/376773
351+ return ( 'WebkitAppearance' in document . documentElement . style ) ||
352+ // is firebug? http://stackoverflow.com/a/398120/376773
353+ ( window . console && ( console . firebug || ( console . exception && console . table ) ) ) ||
354+ // is firefox >= v31?
355+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
356+ ( navigator . userAgent . toLowerCase ( ) . match ( / f i r e f o x \/ ( \d + ) / ) && parseInt ( RegExp . $1 , 10 ) >= 31 ) ;
357+ }
358+
359+ /**
360+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
361+ */
362+
363+ exports . formatters . j = function ( v ) {
364+ return JSON . stringify ( v ) ;
365+ } ;
366+
367+
368+ /**
369+ * Colorize log arguments if enabled.
370+ *
371+ * @api public
372+ */
373+
374+ function formatArgs ( ) {
375+ var args = arguments ;
376+ var useColors = this . useColors ;
377+
378+ args [ 0 ] = ( useColors ? '%c' : '' )
379+ + this . namespace
380+ + ( useColors ? ' %c' : ' ' )
381+ + args [ 0 ]
382+ + ( useColors ? '%c ' : ' ' )
383+ + '+' + exports . humanize ( this . diff ) ;
384+
385+ if ( ! useColors ) return args ;
386+
387+ var c = 'color: ' + this . color ;
388+ args = [ args [ 0 ] , c , 'color: inherit' ] . concat ( Array . prototype . slice . call ( args , 1 ) ) ;
389+
390+ // the final "%c" is somewhat tricky, because there could be other
391+ // arguments passed either before or after the %c, so we need to
392+ // figure out the correct index to insert the CSS into
393+ var index = 0 ;
394+ var lastC = 0 ;
395+ args [ 0 ] . replace ( / % [ a - z % ] / g, function ( match ) {
396+ if ( '%%' === match ) return ;
397+ index ++ ;
398+ if ( '%c' === match ) {
399+ // we only are interested in the *last* %c
400+ // (the user may have provided their own)
401+ lastC = index ;
402+ }
403+ } ) ;
404+
405+ args . splice ( lastC , 0 , c ) ;
406+ return args ;
407+ }
408+
409+ /**
410+ * Invokes `console.log()` when available.
411+ * No-op when `console.log` is not a "function".
412+ *
413+ * @api public
414+ */
415+
416+ function log ( ) {
417+ // This hackery is required for IE8,
418+ // where the `console.log` function doesn't have 'apply'
419+ return 'object' == typeof console
420+ && 'function' == typeof console . log
421+ && Function . prototype . apply . call ( console . log , console , arguments ) ;
422+ }
423+
424+ /**
425+ * Save `namespaces`.
426+ *
427+ * @param {String } namespaces
428+ * @api private
429+ */
430+
431+ function save ( namespaces ) {
432+ try {
433+ if ( null == namespaces ) {
434+ localStorage . removeItem ( 'debug' ) ;
435+ } else {
436+ localStorage . debug = namespaces ;
437+ }
438+ } catch ( e ) { }
439+ }
440+
441+ /**
442+ * Load `namespaces`.
443+ *
444+ * @return {String } returns the previously persisted debug modes
445+ * @api private
446+ */
447+
448+ function load ( ) {
449+ var r ;
450+ try {
451+ r = localStorage . debug ;
452+ } catch ( e ) { }
453+ return r ;
454+ }
455+
456+ /**
457+ * Enable namespaces listed in `localStorage.debug` initially.
458+ */
459+
460+ exports . enable ( load ( ) ) ;
461+
462+ } , { "./debug" :1 } ] } , { } , [ 3 ] ) ( 3 )
464463} ) ;
0 commit comments