Essentially gobble-buble but takes out the middleman. eslint-disable-next-line no-unused-vars
513192
function transpile(src, options) {
	return buble.transform(src, {
		target: { ie: 9 },
		transforms: { modules: false }
	});
}
686113
function tslintHelper(glob, emitError) {
    return gulp.src(glob)
        .pipe(tslint({
            formatter: 'verbose'
        }))
        .pipe(tslint.report({
            emitError: emitError
        }));
}
182524
function debounce(delay, fn) {
	let timer;
	return function() {
		let args = arguments;
		if(timer) {
			clearTimeout(timer);
			timer = null;
		}
		timer = setTimeout(_ => {
			fn.apply(null, args);
			timer = null;
		}, delay);
	};
}
466585
function ponglog_DivHTML( divId, resourceURL, paramObj ) {
	log( "ponglog",  "divId="+divId  );
  var height = $( '#'+divId ).parent().height() -90;
  var width  = $( '#'+divId ).parent().width()  -30;
	$( "#"+divId ).html( '<div id="PongLog" class="ponglog" style="height:'+height+'px;">' );
  
	window.onerror = function ( msg, url, num ) {
	  var logBroker = getEventBroker('log');
	  logBroker.cleanupQueue( 1000 );
	  logBroker.queueEvent( { text: '['+func+'] JS: ' + msg + ' / '+url+ ' / '+num , channel:'log', severity:'ERROR' } );

		//ponglog_debug_out( "JS: " + msg + " / "+url+" / "+num );
	}
	
//	loggerModule = true;
  var logBroker = getEventBroker( 'log' )
  console.log( 'got logBroker' )
  console.log( 'got logBroker '+logBroker.evtQueue.length )
  logBroker.subscribe( 
      { 
        channel:  'log', 
        callback: ponglog_out
      } 
  );  
  console.log( 'logBroker.subscribe(log...) done' )
	log( "ponglog", "divId="+divId+" end.");
}
573636
function compose(middlewares, options = {}) {
  const { beforeRunMiddleware } = options;// before invoking the middleware, check whether can be run

  // all middleware should be function
  if (!Array.isArray(middlewares)) middlewares = [middlewares];
  for (const mw of middlewares) {
    if (typeof mw !== 'function') throw new TypeError('middleware should be a function');
  }

  return function ComposedMiddleware(req, resp, next) {
    let doRunMiddleware;

    let lastIndex = -1;// last run middleware index
    const runMiddleware = (index) => {
      if (lastIndex >= index) {
        return Promise.reject(new Error('next() called multiple times'));
      }
      lastIndex = index;

      const middleware = middlewares[index];
      if (middleware && beforeRunMiddleware) {
        return Promise.resolve(beforeRunMiddleware(middleware, req, resp)).then((canRun) => {
          if (!canRun) return runMiddleware(index + 1);
          else return doRunMiddleware(index);
        });
      }

      return doRunMiddleware(index);
    };

    doRunMiddleware = (index) => {
      let middleware = middlewares[index];
      const nextIndex = index + 1;

      let runNextMiddleware = noop;
      if (!middleware) {
        if (next) middleware = next;
      } else if (middlewares[nextIndex] || next) {
        runNextMiddleware = () => runMiddleware(nextIndex);
      }

      try {
        let result;
        if (middleware) result = middleware.call(this, req, resp, runNextMiddleware);
        return Promise.resolve(result);
      } catch (e) {
        return Promise.reject(e);
      }
    };

    return runMiddleware(0);
  };
}
988158
function( func, wait, options ){
    var leading = true,
        trailing = true;

    if( options === false ){
      leading = false;
    } else if( typeof options === typeof {} ){
      leading = 'leading' in options ? options.leading : leading;
      trailing = 'trailing' in options ? options.trailing : trailing;
    }
    options = options || {};
    options.leading = leading;
    options.maxWait = wait;
    options.trailing = trailing;

    return debounce( func, wait, options );
  }
1198613
function getSource(fn, altSource) {
    var result = altSource;
    if (isStringable(fn)) {
      result = String(fn);
    } else if (support.decompilation) {
      // escape the `{` for Firefox 1
      result = (/^[^{]+\{([\s\S]*)}\s*$/.exec(fn) || 0)[1];
    }
    return (result || '').replace(/^\s+|\s+$/g, '');
  }
733475
function safesocket (expected, fn) {
	return function () {
		var _args = [];
		for (var idx in arguments) {
			_args.push(arguments[idx]);
		}

		var args = _args.filter(notFunction).slice(0, expected);
		for (var i = args.length; i < expected; i++) {
			args.push(undefined);
		}

		var arg = _args.pop();
		args.push((arg instanceof Function) ? arg : noop);

		fn.apply(this, args);
	};
}
1319169
function lint(files) {
  return gulp.src(files)
    .pipe($.plumber())
    .pipe($.eslint())
    .pipe($.eslint.format())
    .pipe($.eslint.failOnError())
    .pipe($.jscs())
    .pipe($.jscs.reporter())
    .pipe($.jscs.reporter('fail'))
    .on('error', onError);
}
418752
function reduce(parent$, fn, startValue) {
  let aggregate = startValue;
  let newStream = stream();
  function reduceValue(value) {
    aggregate = fn(aggregate, parent$.value);
    newStream(aggregate);
  }
  if (parent$.value !== undefined) {
    reduceValue(parent$.value);
  }
  parent$.listeners.push(reduceValue);
  return newStream;
}
1351340
function _genericLint( src ) {
  // Pass all command line flags to EsLint.
  const options = minimist( process.argv.slice( 2 ) );

  return gulp.src( src, { base: './' } )
    .pipe( gulpEslint( options ) )
    .pipe( gulpEslint.format() )
    .pipe( ( () => {
      if ( options.travis ) {
        return gulpEslint.failAfterError();
      }

      return gulpUtil.noop();
    } )( ) )
    .pipe( gulp.dest( './' ) )
    .on( 'error', handleErrors );
}
101999
function(value)
	{
		var callback = function(m) {
			return new YamlUnescaper().unescapeCharacter(m);
		};

		// evaluate the string
		return value.replace(new RegExp(YamlUnescaper.REGEX_ESCAPED_CHARACTER, 'g'), callback);
	}
102943
function parseSource( errBuf ) {
	var parsers = {
			monolith: function(){
				return require( './monolith-parser.js' );
			},
			category: function(){
				return require( './category-parser.js' );
			},
			language: function(){
				return require( './language-parser.js' );
			}
		},
		args = argv.parseArgs(),
		file = path.resolve( path.extname( args.file ) ? args.file : args.file + '.json' ),
		source;

	if ( fs.existsSync( file ) ) {
		try {
			source = JSON.parse( fs.readFileSync( file, 'utf8' ) );
		} catch (e) {
			errBuf.push( 'Error (source): wrong format for "' + file + '"' );
			return false;
		} // try..catch

		if ( commons.validateMeta( source.meta || source, errBuf ) ) {
			return parsers[ (source.meta || source).format ]().parse( source, errBuf );
		} // if
	} else {
		errBuf.push( 'Error (source): unable to open "' + file + '"' );
		return false;
	} // if..else
}
8990
function untgz(istream, dst){
    // decompress
    const tarStream = istream.pipe(_zlib.createGunzip());

    // unpack
    return _untar(tarStream, dst);
}
760675
function osmDateParser (value, options) {
  var m, v, g

  m = value.match(/^(.*)\.\.(.*)$/)
  if (m) {
    let s = osmDateParser(m[1])
    let e = osmDateParser(m[2])
    if (s === null || e === null) {
      return null
    }
    if (s[0] > e[1]) {
      return null
    }
    return [ s[0], e[1] ]
  }

  m = value.match(/^(\d*) BCE?$/i)
  if (m) {
    [ v, g ] = parseDate(value)
    return [ v, v ]
  }

  m = value.match(/^before (.*)$/i)
  if (m) {
    [ v, g ] = parseDate(m[1])
    return [ null, v - 1 ]
  }

  m = value.match(/^after (.*)$/i)
  if (m) {
    [ v, g ] = parseDate(m[1])
    return [ v + g, null ]
  }

  m = value.match(/^early (.*)$/i)
  if (m) {
    [ v, g ] = parseDate(m[1])
    return [ v, Math.round(v + g * 0.33) ]
  }

  m = value.match(/^mid (.*)$/i)
  if (m) {
    [ v, g ] = parseDate(m[1])
    return [ Math.round(v + g * 0.33), Math.round(v + g * 0.67 - 1) ]
  }

  m = value.match(/^late (.*)$/i)
  if (m) {
    [ v, g ] = parseDate(m[1])
    return [ Math.round(v + g * 0.67 - 1), v + g - 1 ]
  }

  m = parseDate(value)
  if (m) {
    [ v, g ] = m
    return [ v, v + g - 1 ]
  }

  return null
}
125401
function tail (argv, callback) {
  if (!argv[2]) {
    console.error('url is required')
    console.error('Usage : tail <url>')
    process.exit(-1)
  }
  var uri = argv[2]
  var wss = 'wss://' + uri.split('/')[2] + '/'

  var s = new ws(wss, {
    origin: 'http://websocket.org'
  })

  s.on('open', function open () {
    s.send('sub ' + uri)
  })

  s.on('close', function close () {
    console.log('disconnected')
  })

  s.on('message', function message (data, flags) {
    var a = data.split(' ')
    if (a.length && a[0] === 'pub') {
      util.get(a[1], function (err, res) {
        if (err) {
          console.error('Error : ' + err)
        } else {
          console.log(res)
        }
      })
    }
  })
}
1086236
function debounce(func) {
  var timeout = void 0;
  return function () {
    for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }

    var context = this;

    var lastCall = function lastCall() {
      timeout = null;
      func.apply(context, args);
    };

    clearTimeout(timeout);
    timeout = setTimeout(lastCall, 100);
  };
}