/* eslint-enable
500945
function (method, path, propertyString, check, valueString, done) {
        this._log.info('Step: I poll with a %s request to %s until %s %s %s',
                       method, path, propertyString, check, valueString);
        var testConfig = this.testConfig || {};
        var pollConfig = testConfig.polling || {};
        var duration = pollConfig.durationMs || 5000;
        var interval = pollConfig.intervalMs || 1000;
        var maxRetries = Math.floor(duration / interval);
        var _this = this;
        async.retry(maxRetries, poll, done);
        function poll(callback) {
            var currentChecker = checkResult.bind(null, callback);
            setTimeout(makeRequest.bind(_this, method, path, currentChecker), interval);
        }
        function checkResult(callback) {
            try {
                _this._checkProperty(propertyString, check, valueString);
            } catch(err) {
                _this._log.trace({ err: err }, 'Condition not yet met, continue polling.');
                return callback(err);
            }
            return callback();
        }
    }
81545
function (req, res, lintErrors) {
  var html = template({
    lintErrors: lintErrors
  });
  res.end(html);
}
739257
function (inputVersion, outputVersion) {
        var converter;

        inputVersion = semver.clean(inputVersion);
        outputVersion = semver.clean(outputVersion);

        for (converter in this.converters) {
            // eslint-disable-next-line no-prototype-builtins
            converter = this.converters.hasOwnProperty(converter) && this.converters[converter];
            if (converter && semver.eq(converter.input, inputVersion) && semver.eq(converter.output, outputVersion)) {
                return generateConverter(converter);
            }
        }
    }
1161472
function helpConsole() {
    /* eslint-disable no-console */
    console.log('  Examples:');
    console.log('');
    console.log('    $ renovate --token abc123 singapore/lint-condo');
    console.log(
      '    $ renovate --labels=renovate,dependency --ignore-unstable=false --log-level debug singapore/lint-condo'
    );
    console.log('    $ renovate singapore/lint-condo singapore/package-test');
    /* eslint-enable no-console */
  }
877875
function lint(p) {
  return () => {
    gulp.src(p).pipe(g.eslint())
      .pipe(g.eslint.format())
      .pipe(g.eslint.failOnError());
  };
}
404824
function () {
  var args = Array.prototype.slice.call(arguments);
  console.error();
  console.error.apply(console, [" "].concat(args));
  console.error();
  process.exit(1); // eslint-disable-line no-process-exit
}
814295
function (type) {
    return function (opts) {
        var opt = opts || {};
        var userAttrs = getUserAttrs(opt);
        var w = {
            classes: opt.classes,
            type: type,
            formatValue: function (value) {
                return (value || value === 0) ? value : null;
            }
        };
        w.toHTML = function (name, field) {
            var f = field || {};
            var attrs = {
                type: type,
                name: name,
                id: f.id === false ? false : (f.id || true),
                classes: w.classes,
                value: w.formatValue(f.value)
            };
            return tag('input', [attrs, userAttrs, w.attrs || {}]);
        };
        return w;
    };
}
13451
function onEnter(
    event: *,
    change: Change,
    editor: *,
    opts: Options
): void | any {
    // Pressing Shift+Enter
    // should split block normally
    if (event.shiftKey) {
        return undefined;
    }

    const { value } = change;
    const currentItem = getCurrentItem(opts, value);

    // Not in a list
    if (!currentItem) {
        return undefined;
    }

    event.preventDefault();

    // If expanded, delete first.
    if (value.isExpanded) {
        change.delete();
    }

    if (currentItem.isEmpty) {
        // Block is empty, we exit the list
        if (getItemDepth(opts, value) > 1) {
            return decreaseItemDepth(opts, change);
        }
        // Exit list
        return unwrapList(opts, change);
    }
    // Split list item
    return splitListItem(opts, change);
}
1256627
function wrap1(val, opts, key) {
  switch(getType(val, opts, key)) {
  case 'B': return {'B': val};
  case 'BS': return {'BS': val};
  case 'N': return {'N': val.toString()};
  case 'NS': return {'NS': eachToString(val)};
  case 'S': return {'S': val.toString()};
  case 'SS': return {'SS': eachToString(val)};
  case 'BOOL': return {'BOOL': val ? true: false};
  case 'L': return {'L': val.map(function(obj){ return wrap1(obj, opts); })};
  case 'M': return {'M': wrap(val, opts)};
  case 'NULL': return {'NULL': true};
  default: return;
  }
}
248945
function (src, callback, context) {
    /*eslint max-statements: [2, 32]*/
    var setup;

    if (callback && typeof callback !== "function") {
      context = callback.context || context;
      setup = callback.setup;
      callback = callback.callback;
    }

    var script = document.createElement("script");
    var done = false;
    var err;
    var _cleanup; // _must_ be set below.

    /**
     * Final handler for error or completion.
     *
     * **Note**: Will only be called _once_.
     *
     * @returns {void}
     */
    var _finish = function () {
      // Only call once.
      if (done) { return; }
      done = true;

      // Internal cleanup.
      _cleanup();

      // Callback.
      if (callback) {
        callback.call(context, err);
      }
    };

    /**
     * Error handler
     *
     * @returns {void}
     */
    var _error = function () {
      err = new Error(src || "EMPTY");
      _finish();
    };

    if (script.readyState && !("async" in script)) {
      /*eslint-disable consistent-return*/

      // This section is only for IE<10. Some other old browsers may
      // satisfy the above condition and enter this branch, but we don't
      // support those browsers anyway.

      var id = scriptCounter++;
      var isReady = { loaded: true, complete: true };
      var inserted = false;

      // Clear out listeners, state.
      _cleanup = function () {
        script.onreadystatechange = script.onerror = null;
        pendingScripts[id] = void 0;
      };

      // Attach the handler before setting src, otherwise we might
      // miss events (consider that IE could fire them synchronously
      // upon setting src, for example).
      script.onreadystatechange = function () {
        var firstState = script.readyState;

        // Protect against any errors from state change randomness.
        if (err) { return; }

        if (!inserted && isReady[firstState]) {
          inserted = true;

          // Append to DOM.
          _addScript(script);
        }

        // --------------------------------------------------------------------
        //                       GLORIOUS IE8 HACKAGE!!!
        // --------------------------------------------------------------------
        //
        // Oh IE8, how you disappoint. IE8 won't call `script.onerror`, so
        // we have to resort to drastic measures.
        // See, e.g. http://www.quirksmode.org/dom/events/error.html#t02
        //
        // As with all things development, there's a Stack Overflow comment that
        // asserts the following combinations of state changes in IE8 indicate a
        // script load error. And crazily, it seems to work!
        //
        // http://stackoverflow.com/a/18840568/741892
        //
        // The `script.readyState` transitions we're interested are:
        //
        // * If state starts as `loaded`
        // * Call `script.children`, which _should_ change state to `complete`
        // * If state is now `loading`, then **we have a load error**
        //
        // For the reader's amusement, here is HeadJS's catalog of various
        // `readyState` transitions in normal operation for IE:
        // https://github.com/headjs/headjs/blob/master/src/2.0.0/load.js#L379-L419
        if (firstState === "loaded") {
          // The act of accessing the property should change the script's
          // `readyState`.
          //
          // And, oh yeah, this hack is so hacky-ish we need the following
          // eslint disable...
          /*eslint-disable no-unused-expressions*/
          script.children;
          /*eslint-enable no-unused-expressions*/

          if (script.readyState === "loading") {
            // State transitions indicate we've hit the load error.
            //
            // **Note**: We are not intending to _return_ a value, just have
            // a shorter short-circuit code path here.
            return _error();
          }
        }

        // It's possible for readyState to be "complete" immediately
        // after we insert (and execute) the script in the branch
        // above. So check readyState again here and react without
        // waiting for another onreadystatechange.
        if (script.readyState === "complete") {
          _finish();
        }
      };

      // Onerror handler _may_ work here.
      script.onerror = _error;

      // Since we're not appending the script to the DOM yet, the
      // reference to our script element might get garbage collected
      // when this function ends, without onreadystatechange ever being
      // fired. This has been witnessed to happen. Adding it to
      // `pendingScripts` ensures this can't happen.
      pendingScripts[id] = script;

      // call the setup callback to mutate the script tag
      if (setup) {
        setup.call(context, script);
      }

      // This triggers a request for the script, but its contents won't
      // be executed until we append it to the DOM.
      script.src = src;

      // In some cases, the readyState is already "loaded" immediately
      // after setting src. It's a lie! Don't append to the DOM until
      // the onreadystatechange event says so.

    } else {
      // This section is for modern browsers, including IE10+.

      // Clear out listeners.
      _cleanup = function () {
        script.onload = script.onerror = null;
      };

      script.onerror = _error;
      script.onload = _finish;
      script.async = true;
      script.charset = "utf-8";

      // call the setup callback to mutate the script tag
      if (setup) {
        setup.call(context, script);
      }

      script.src = src;

      // Append to DOM.
      _addScript(script);
    }
  }
19398
async function nResolve(id: string, options?: Options): Promise<string> { // eslint-disable-line no-use-before-define
	assert(typeof id === 'string' && id.length > 0, '<id> has to be a non-empty string');
	assert(typeof options === 'object' && !Array.isArray(options), '[options] has to be an object');

	const s = getSettings(options);
	assert(nonEmpty(s.base), 'options.base has to be a non-empty string');
	assert(nonEmpty(s.index), 'options.index has to be a non-empty string');
	assert(nonEmpty(s.resolveKey), 'options.resolveKey has to be a non-empty string');
	assert(plain(s.package), 'options.package has to be an object');
	assert(plain(s.modules), 'options.modules has to be an object');

	if (s.modules[id]) {
		return s.modules[id];
	}

	if (isBuiltin(id)) {
		return id;
	}

	const [name, ...rest] = id.split('/').filter(Boolean);
	const isRelative = name === '.' || name === '..';

	const modulePath = isRelative ?
		path.resolve(s.base, name) :
		await getModulePath(name, s);

	const relativeBase = s.filename ?
		path.dirname(s.filename) :
		s.base;

	const relativePath = rest.length ?
		path.resolve(relativeBase, ...rest) :
		await getMainPath(modulePath, s);

	const moduleRelativePath = path.extname(relativePath) === '' ?
		`${relativePath}.js` : relativePath;

	const moduleFilePath = path.resolve(modulePath, moduleRelativePath);

	if (!(await exists(moduleFilePath))) {
		const nameDesc = isRelative ? '' : ` in ${name}`;
		throw new Error(`Could not find ${moduleFilePath}${nameDesc} at ${modulePath}`);
	}

	const parsed = path.parse(moduleFilePath);
	const ext = parsed.ext === '.js' ? '' : parsed.ext;

	return path.format({
		dir: parsed.dir,
		base: `${parsed.name}${ext}`
	});
}
755092
function _on (event, method, context) {
  /* eslint-disable no-invalid-this */
  var bindings
  validateMethod(method, context)
  if (this.__events__.hasOwnProperty(event)) {
    bindings = this.__events__[event]
  } else {
    // Auto-initialize bindings list
    bindings = this.__events__[event] = []
  }
  // Add binding
  bindings.push({
    method: method,
    context: context || null
  })
  if (DEBUG) {
    count++
    console.info('_on()', event, method.name, context, this)
    console.info(COUNT_MSG, count)
  }
  return this
  /* eslint-enable no-invalid-this */
}
1101670
function compile (format) {
  if (typeof format !== 'string') {
    throw new TypeError('argument format must be a string')
  }

  var fmt = String(JSON.stringify(format))
  var js = '  "use strict"\n  return ' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function (_, name, arg) {
    var tokenArguments = 'req, res'
    var tokenFunction = 'tokens[' + String(JSON.stringify(name)) + ']'

    if (arg !== undefined) {
      tokenArguments += ', ' + String(JSON.stringify(arg))
    }

    return '" +\n    (' + tokenFunction + '(' + tokenArguments + ') || "-") + "'
  })

  // eslint-disable-next-line no-new-func
  return new Function('tokens, req, res', js)
}
161216
function lintDirectory () {
  var shouldFix = args.hasOwnProperty('fix');

  cli = new eslint.CLIEngine({ configFile: configFilePath, fix: shouldFix });

  report = cli.executeOnFiles(dir);

  if (shouldFix) {
    eslint.CLIEngine.outputFixes(report);
  }

  console.log(cli.getFormatter()(report.results)); // eslint-disable-line

  // End with exit code 1 if there are errors
  // Use process.exit instead of throwing to mimic the behaviour of eslints bin
  // We don't want a stacktrace, it would just be confusing
  if (report.errorCount) {
      process.exit(1); // eslint-disable-line
  }
}
71793
function showTypeWith(types) {
    var names = Z.chain (typeVarNames, types);
    return function(t) {
      var code = 'a'.charCodeAt (0);
      return when (t.type === FUNCTION)
                  (parenthesize (I))
                  ((show (t)).replace (/\bUnknown\b/g, function() {
                     // eslint-disable-next-line no-plusplus
                     do var name = String.fromCharCode (code++);
                     while (names.indexOf (name) >= 0);
                     return name;
                   }));
    };
  }
615578
function linterResults(_results, code) {
        /* eslint-enable no-unused-vars */
        var results = JSON.parse(_results);
        var res = [{
            filePath: resourcePath,
            messages: Object.assign([], results[resourcePath])
        }];

        if (res[0].messages.length > 0) {
            (function () {
                var warnings = 0;
                var errors = 0;
                var messages = res[0].messages;
                messages.forEach(function (linter) {
                    if (linter.severity === 'warning') {
                        warnings++;
                    } else if (linter.severity === 'error') {
                        errors++;
                    }
                });
                var msg = (0, _scsslintStylish2.default)(res);
                var emitter = void 0;
                if (errors > 0) {
                    emitter = webpack.emitError;
                } else {
                    emitter = webpack.emitWarning;
                }
                emitter(msg);
            })();
        }
    }
1084715
function lint() {
    return gulp.src(srcDir + '**/*.js')
        .pipe($$.excludeGitignore())
        .pipe($$.eslint())
        .pipe($$.eslint.format())
        .pipe($$.eslint.failAfterError());
}