<|start_filename|>project/target/node-modules/webjars/clean-css/lib/text/quote-scanner.js<|end_filename|>
(function() {
  var QuoteScanner = function QuoteScanner(data) {
    this.data = data;
  };

  var findCommentEnd = function(data, matched, cursor) {
    var commentStartMark = '/*';
    var commentEndMark = '*/';
    var escapeMark = '\\';
    var commentStarted = false;

    while (true) {
      if (data[cursor] === undefined)
        break;
      if (!commentStarted && data[cursor] == commentEndMark[1] && data[cursor - 1] == commentEndMark[0])
        break;
      if (data[cursor] == matched && data[cursor - 1] != escapeMark)
        break;
      if (data[cursor] == commentStartMark[1] && data[cursor - 1] == commentStartMark[0])
        commentStarted = true;

      cursor++;
    }

    return cursor;
  };

  QuoteScanner.prototype.each = function(callback) {
    var data = this.data;
    var tempData = [];
    var nextStart = 0;
    var nextEnd = 0;
    var cursor = 0;
    var matchedMark = null;
    var singleMark = '\'';
    var doubleMark = '"';
    var dataLength = data.length;

    for (; nextEnd < data.length;) {
      var nextStartSingle = data.indexOf(singleMark, nextEnd + 1);
      var nextStartDouble = data.indexOf(doubleMark, nextEnd + 1);

      if (nextStartSingle == -1)
        nextStartSingle = dataLength;
      if (nextStartDouble == -1)
        nextStartDouble = dataLength;

      if (nextStartSingle < nextStartDouble) {
        nextStart = nextStartSingle;
        matchedMark = singleMark;
      } else {
        nextStart = nextStartDouble;
        matchedMark = doubleMark;
      }

      if (nextStart == -1)
        break;

      nextEnd = findCommentEnd(data, matchedMark, nextStart + 1);
      if (nextEnd == -1)
        break;

      var text = data.substring(nextStart, nextEnd + 1);
      tempData.push(data.substring(cursor, nextStart));
      if (text.length > 0)
        callback(text, tempData, nextStart);

      cursor = nextEnd + 1;
    }

    return tempData.length > 0 ?
      tempData.join('') + data.substring(cursor, data.length) :
      data;
  };

  module.exports = QuoteScanner;
})();


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/test/config-override.js<|end_filename|>
var test = require('tap').test

require('./lib/server.js').close()
var common = require('./lib/common.js')
var config = {
  proxy: {
    http: 'http://proxy.npm:8088/',
    https: 'https://proxy.npm:8043/',
    localAddress: 'localhost.localdomain'
  },
  ssl: {
    ca: 'not including a PEM',
    certificate: 'still not including a PEM',
    key: 'nope',
    strict: false
  },
  retry: {
    count: 1,
    factor: 9001,
    minTimeout: -1,
    maxTimeout: Infinity
  },
  userAgent: 'npm-awesome/4 (Mozilla 5.0)',
  log: { fake: function () {} },
  defaultTag: 'next',
  couchToken: { object: true },
  sessionToken: '<PASSWORD>'
}

test('config defaults', function (t) {
  var client = common.freshClient(config)

  var proxy = client.config.proxy
  t.equal(proxy.http, 'http://proxy.npm:8088/')
  t.equal(proxy.https, 'https://proxy.npm:8043/')
  t.equal(proxy.localAddress, 'localhost.localdomain')

  var ssl = client.config.ssl
  t.equal(ssl.ca, 'not including a PEM')
  t.equal(ssl.certificate, 'still not including a PEM')
  t.equal(ssl.key, 'nope')
  t.equal(ssl.strict, false)

  var retry = client.config.retry
  t.equal(retry.count, 1)
  t.equal(retry.factor, 9001)
  t.equal(retry.minTimeout, -1)
  t.equal(retry.maxTimeout, Infinity)

  t.equal(client.config.userAgent, 'npm-awesome/4 (Mozilla 5.0)')
  t.ok(client.log.fake)
  t.equal(client.config.defaultTag, 'next')
  t.ok(client.config.couchToken.object)
  t.equal(client.config.sessionToken, '<PASSWORD>')

  t.end()
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-cache-filename/index.js<|end_filename|>
var url = require('url');;
var path = require('path');;

module.exports = cf;;

function cf(root, u) {
  if (!u)
    return cf.bind(null, root);;

  u = url.parse(u);;
  var h = u.host.replace(/:/g, '_');;
  // Strip off any /-rev/... or ?rev=... bits
  var revre = /(\?rev=|\?.*?&rev=|\/-rev\/).*$/
  var parts = u.path.replace(revre, '').split('/').slice(1)
  var p = [root, h].concat(parts.map(function(part) {
    return encodeURIComponent(part).replace(/%/g, '_');;
  }));;

  return path.join.apply(path, p);;
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/node-gyp/bin/node-gyp.js<|end_filename|>
#!/usr/bin/env node

/**
 * Set the title.
 */

process.title = 'node-gyp'

/**
 * Module dependencies.
 */

var gyp = require('../')
var log = require('npmlog')

/**
 * Process and execute the selected commands.
 */

var prog = gyp()
var completed = false
prog.parseArgv(process.argv)

if (prog.todo.length === 0) {
  if (~process.argv.indexOf('-v') || ~process.argv.indexOf('--version')) {
    console.log('v%s', prog.version)
  } else {
    console.log('%s', prog.usage())
  }
  return process.exit(0)
}

log.info('it worked if it ends with', 'ok')
log.verbose('cli', process.argv)
log.info('using', 'node-gyp@%s', prog.version)
log.info('using', 'node@%s | %s | %s', process.versions.node, process.platform, process.arch)


/**
 * Change dir if -C/--directory was passed.
 */

var dir = prog.opts.directory
if (dir) {
  var fs = require('fs')
  try {
    var stat = fs.statSync(dir)
    if (stat.isDirectory()) {
      log.info('chdir', dir)
      process.chdir(dir)
    } else {
      log.warn('chdir', dir + ' is not a directory')
    }
  } catch (e) {
    if (e.code === 'ENOENT') {
      log.warn('chdir', dir + ' is not a directory')
    } else {
      log.warn('chdir', 'error during chdir() "%s"', e.message)
    }
  }
}

function run () {
  var command = prog.todo.shift()
  if (!command) {
    // done!
    completed = true
    log.info('ok')
    return
  }

  prog.commands[command.name](command.args, function (err) {
    if (err) {
      log.error(command.name + ' error')
      log.error('stack', err.stack)
      errorMessage()
      log.error('not ok')
      return process.exit(1)
    }
    if (command.name == 'list') {
      var versions = arguments[1]
      if (versions.length > 0) {
        versions.forEach(function (version) {
          console.log(version)
        })
      } else {
        console.log('No node development files installed. Use `node-gyp install` to install a version.')
      }
    } else if (arguments.length >= 2) {
      console.log.apply(console, [].slice.call(arguments, 1))
    }

    // now run the next command in the queue
    process.nextTick(run)
  })
}

process.on('exit', function (code) {
  if (!completed && !code) {
    log.error('Completion callback never invoked!')
    issueMessage()
    process.exit(6)
  }
})

process.on('uncaughtException', function (err) {
  log.error('UNCAUGHT EXCEPTION')
  log.error('stack', err.stack)
  issueMessage()
  process.exit(7)
})

function errorMessage () {
  // copied from npm's lib/util/error-handler.js
  var os = require('os')
  log.error('System', os.type() + ' ' + os.release())
  log.error('command', process.argv
            .map(JSON.stringify).join(' '))
  log.error('cwd', process.cwd())
  log.error('node -v', process.version)
  log.error('node-gyp -v', 'v' + prog.package.version)
}

function issueMessage () {
  errorMessage()
  log.error('', [ 'This is a bug in `node-gyp`.'
                , 'Try to update node-gyp and file an Issue if it does not help:'
                , '    <https://github.com/TooTallNate/node-gyp/issues>'
                ].join('\n'))
}

// start running the given commands!
run()


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/stringify.js<|end_filename|>
/*
 * Author: <NAME> <<EMAIL>>
 * GIT: https://github.com/rlidwka/jju
 * License: WTFPL, grab your copy here: http://www.wtfpl.net/txt/copying/
 */

var Uni = require('./unicode')

// Fix Function#name on browsers that do not support it (IE)
// http://stackoverflow.com/questions/6903762/function-name-not-supported-in-ie
if (!(function f(){}).name) {
  Object.defineProperty((function(){}).constructor.prototype, 'name', {
    get: function() {
      var name = this.toString().match(/^\s*function\s*(\S*)\s*\(/)[1]
      // For better performance only parse once, and then cache the
      // result through a new accessor for repeated access.
      Object.defineProperty(this, 'name', { value: name })
      return name
    }
  })
}

var special_chars = {
  0: '\\0', // this is not an octal literal
  8: '\\b',
  9: '\\t',
  10: '\\n',
  11: '\\v',
  12: '\\f',
  13: '\\r',
  92: '\\\\',
}

// for oddballs
var hasOwnProperty = Object.prototype.hasOwnProperty

// some people escape those, so I'd copy this to be safe
var escapable = /[\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/

function _stringify(object, options, recursiveLvl, currentKey) {
  var opt_json = options.mode === 'json'
  /*
   * Opinionated decision warning:
   *
   * Objects are serialized in the following form:
   * { type: 'Class', data: DATA }
   *
   * Class is supposed to be a function, and new Class(DATA) is
   * supposed to be equivalent to the original value
   */
  /*function custom_type() {
    return stringify({
      type: object.constructor.name,
      data: object.toString()
    })
  }*/

  // if add, it's an internal indentation, so we add 1 level and a eol
  // if !add, it's an ending indentation, so we just indent
  function indent(str, add) {
    var prefix = options._prefix ? options._prefix : ''
    if (!options.indent) return prefix + str
    var result = ''
    var count = recursiveLvl + (add || 0)
    for (var i=0; i<count; i++) result += options.indent
    return prefix + result + str + (add ? '\n' : '')
  }

  function _stringify_key(key) {
    if (options.quote_keys) return _stringify_str(key)
    if (String(Number(key)) == key && key[0] != '-') return key
    if (key == '') return _stringify_str(key)

    var result = ''
    for (var i=0; i<key.length; i++) {
      if (i > 0) {
        if (!Uni.isIdentifierPart(key[i]))
          return _stringify_str(key)

      } else {
        if (!Uni.isIdentifierStart(key[i]))
          return _stringify_str(key)
      }

      var chr = key.charCodeAt(i)

      if (options.ascii) {
        if (chr < 0x80) {
          result += key[i]

        } else {
          result += '\\u' + ('0000' + chr.toString(16)).slice(-4)
        }

      } else {
        if (escapable.exec(key[i])) {
          result += '\\u' + ('0000' + chr.toString(16)).slice(-4)

        } else {
          result += key[i]
        }
      }
    }

    return result
  }

  function _stringify_str(key) {
    var quote = options.quote
    var quoteChr = quote.charCodeAt(0)

    var result = ''
    for (var i=0; i<key.length; i++) {
      var chr = key.charCodeAt(i)

      if (chr < 0x10) {
        if (chr === 0 && !opt_json) {
          result += '\\0'
        } else if (chr >= 8 && chr <= 13 && (!opt_json || chr !== 11)) {
          result += special_chars[chr]
        } else if (!opt_json) {
          result += '\\x0' + chr.toString(16)
        } else {
          result += '\\u000' + chr.toString(16)
        }

      } else if (chr < 0x20) {
        if (!opt_json) {
          result += '\\x' + chr.toString(16)
        } else {
          result += '\\u00' + chr.toString(16)
        }

      } else if (chr >= 0x20 && chr < 0x80) {
        // ascii range
        if (chr === 47 && i && key[i-1] === '<') {
          // escaping slashes in </script>
          result += '\\' + key[i]

        } else if (chr === 92) {
          result += '\\\\'

        } else if (chr === quoteChr) {
          result += '\\' + quote

        } else {
          result += key[i]
        }

      } else if (options.ascii || Uni.isLineTerminator(key[i]) || escapable.exec(key[i])) {
        if (chr < 0x100) {
          if (!opt_json) {
            result += '\\x' + chr.toString(16)
          } else {
            result += '\\u00' + chr.toString(16)
          }

        } else if (chr < 0x1000) {
          result += '\\u0' + chr.toString(16)

        } else if (chr < 0x10000) {
          result += '\\u' + chr.toString(16)

        } else {
          throw Error('weird codepoint')
        }
      } else {
        result += key[i]
      }
    }
    return quote + result + quote
  }

  function _stringify_object() {
    if (object === null) return 'null'
    var result = []
      , len = 0
      , braces

    if (Array.isArray(object)) {
      braces = '[]'
      for (var i=0; i<object.length; i++) {
        var s = _stringify(object[i], options, recursiveLvl+1, String(i))
        if (s === undefined) s = 'null'
        len += s.length + 2
        result.push(s + ',')
      }

    } else {
      braces = '{}'
      var fn = function(key) {
        var t = _stringify(object[key], options, recursiveLvl+1, key)
        if (t !== undefined) {
          t = _stringify_key(key) + ':' + (options.indent ? ' ' : '') + t + ','
          len += t.length + 1
          result.push(t)
        }
      }

      if (Array.isArray(options.replacer)) {
        for (var i=0; i<options.replacer.length; i++)
          if (hasOwnProperty.call(object, options.replacer[i]))
            fn(options.replacer[i])
      } else {
        var keys = Object.keys(object)
        if (options.sort_keys)
          keys = keys.sort(typeof(options.sort_keys) === 'function'
                           ? options.sort_keys : undefined)
        keys.forEach(fn)
      }
    }

    // objects shorter than 30 characters are always inlined
    // objects longer than 60 characters are always splitted to multiple lines
    // anything in the middle depends on indentation level
    len -= 2
    if (options.indent && (len > options._splitMax - recursiveLvl * options.indent.length || len > options._splitMin) ) {
      // remove trailing comma in multiline if asked to
      if (options.no_trailing_comma && result.length) {
        result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)
      }

      var innerStuff = result.map(function(x) {return indent(x, 1)}).join('')
      return braces[0]
          + (options.indent ? '\n' : '')
          + innerStuff
          + indent(braces[1])
    } else {
      // always remove trailing comma in one-lined arrays
      if (result.length) {
        result[result.length-1] = result[result.length-1].substring(0, result[result.length-1].length-1)
      }

      var innerStuff = result.join(options.indent ? ' ' : '')
      return braces[0]
          + innerStuff
          + braces[1]
    }
  }

  function _stringify_nonobject(object) {
    if (typeof(options.replacer) === 'function') {
      object = options.replacer.call(null, currentKey, object)
    }

    switch(typeof(object)) {
      case 'string':
        return _stringify_str(object)

      case 'number':
        if (object === 0 && 1/object < 0) {
          // Opinionated decision warning:
          //
          // I want cross-platform negative zero in all js engines
          // I know they're equal, but why lose that tiny bit of
          // information needlessly?
          return '-0'
        }
        if (options.mode === 'json' && !Number.isFinite(object)) {
          // json don't support infinity (= sucks)
          return 'null'
        }
        return object.toString()

      case 'boolean':
        return object.toString()

      case 'undefined':
        return undefined

      case 'function':
//        return custom_type()

      default:
        // fallback for something weird
        return JSON.stringify(object)
    }
  }

  if (options._stringify_key) {
    return _stringify_key(object)
  }

  if (typeof(object) === 'object') {
    if (object === null) return 'null'

    var str
    if (typeof(str = object.toJSON5) === 'function' && options.mode !== 'json') {
      object = str.call(object, currentKey)

    } else if (typeof(str = object.toJSON) === 'function') {
      object = str.call(object, currentKey)
    }

    if (object === null) return 'null'
    if (typeof(object) !== 'object') return _stringify_nonobject(object)

    if (object.constructor === Number || object.constructor === Boolean || object.constructor === String) {
      object = object.valueOf()
      return _stringify_nonobject(object)

    } else if (object.constructor === Date) {
      // only until we can't do better
      return _stringify_nonobject(object.toISOString())

    } else {
      if (typeof(options.replacer) === 'function') {
        object = options.replacer.call(null, currentKey, object)
        if (typeof(object) !== 'object') return _stringify_nonobject(object)
      }

      return _stringify_object(object)
    }
  } else {
    return _stringify_nonobject(object)
  }
}

/*
 * stringify(value, options)
 * or
 * stringify(value, replacer, space)
 *
 * where:
 * value - anything
 * options - object
 * replacer - function or array
 * space - boolean or number or string
 */
module.exports.stringify = function stringifyJSON(object, options, _space) {
  // support legacy syntax
  if (typeof(options) === 'function' || Array.isArray(options)) {
    options = {
      replacer: options
    }
  } else if (typeof(options) === 'object' && options !== null) {
    // nothing to do
  } else {
    options = {}
  }
  if (_space != null) options.indent = _space

  if (options.indent == null) options.indent = '\t'
  if (options.quote == null) options.quote = "'"
  if (options.ascii == null) options.ascii = false
  if (options.mode == null) options.mode = 'simple'

  if (options.mode === 'json') {
    // json only supports double quotes (= sucks)
    options.quote = '"'

    // json don't support trailing commas (= sucks)
    options.no_trailing_comma = true

    // json don't support unquoted property names (= sucks)
    options.quote_keys = true
  }

  // why would anyone use such objects?
  if (typeof(options.indent) === 'object') {
    if (options.indent.constructor === Number
    ||  options.indent.constructor === Boolean
    ||  options.indent.constructor === String)
      options.indent = options.indent.valueOf()
  }

  // gap is capped at 10 characters
  if (typeof(options.indent) === 'number') {
    if (options.indent >= 0) {
      options.indent = Array(Math.min(~~options.indent, 10) + 1).join(' ')
    } else {
      options.indent = false
    }
  } else if (typeof(options.indent) === 'string') {
    options.indent = options.indent.substr(0, 10)
  }

  if (options._splitMin == null) options._splitMin = 50
  if (options._splitMax == null) options._splitMax = 70

  return _stringify(object, options, 0, '')
}



<|start_filename|>project/target/node-modules/webjars/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/test.js<|end_filename|>

var ArrayIndex = require('./')
var inherits = require('util').inherits
var assert = require('assert')


/**
 * Create a "subclass".
 */

function Arrayish (length) {
  ArrayIndex.call(this, length)
  this.sets = Object.create(null)
}

// inherit from `ArrayIndex`
inherits(Arrayish, ArrayIndex)


// create an instance and run some tests
var a = new Arrayish(11)

assert.throws(function () {
  a[0]
}, /__get__/)

assert.throws(function () {
  a[0] = 0
}, /__set__/)


/**
 * This "getter" function checks if the index has previosly been "set", and if so
 * returns the index * the value previously set. If the index hasn't been set,
 * return the index as-is.
 */

Arrayish.prototype.__get__ = function get (index) {
  if (index in this.sets) {
    return +this.sets[index] * index
  } else {
    return index
  }
}

/**
 * Store the last value set for this index.
 */

Arrayish.prototype.__set__ = function set (index, value) {
  this.sets[index] = value
}


// test getters without being "set"
assert.equal(0, a[0])
assert.equal(1, a[1])
assert.equal(2, a[2])
assert.equal(3, a[3])
assert.equal(4, a[4])

// test setters, followed by getters
a[10] = 1
assert.equal(10, a[10])
a[10] = 2
assert.equal(20, a[10])
a[10] = 3
assert.equal(30, a[10])

// test "length"
assert.equal(11, a.length)

a[4] = 20
a[6] = 5.55432
var b = [0, 1, 2, 3, 80, 5, 33.325919999999996, 7, 8, 9, 30]
assert.equal(JSON.stringify(b), JSON.stringify(a))


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/test/non-json.js<|end_filename|>
var path = require('path')

var tap = require('tap')

var readJson = require('../')

var expect = {
  name: 'read-package-json',
  version: '0.1.1',
  author: {
    name: '<NAME>',
    email: '<EMAIL>',
    url: 'http://blog.izs.me/'
  },
  description: 'The thing npm uses to read package.json files with semantics and defaults and validation',
  repository: {
    type: 'git',
    url: 'git://github.com/isaacs/read-package-json.git'
  },
  bugs: {
    url: 'https://github.com/isaacs/read-package-json/issues'
  },
  main: 'read-json.js',
  scripts: { test: 'tap test/*.js' },
  dependencies: {
    glob: '~3.1.9',
    'lru-cache': '~1.1.0',
    semver: '~1.0.14',
    slide: '~1.1.3',
    npmlog: '0',
    'graceful-fs': '~1.1.8'
  },
  devDependencies: { tap: '~0.2.5' },
  homepage: 'https://github.com/isaacs/read-package-json#readme',
  optionalDependencies: { npmlog: '0', 'graceful-fs': '~1.1.8' },
  _id: 'read-package-json@0.1.1',
  readme: 'ERROR: No README data found!'
}

tap.test('from css', function (t) {
  var c = path.join(__dirname, 'fixtures', 'not-json.css')
  readJson(c, function (er, d) {
    t.same(d, expect)
    t.end()
  })
})

tap.test('from js', function (t) {
  readJson(__filename, function (er, d) {
    t.same(d, expect)
    t.end()
  })
})

/**package
{
  "name": "read-package-json",
  "version": "0.1.1",
  "author": "<NAME> <<EMAIL>> (http://blog.izs.me/)",
  "description": "The thing npm uses to read package.json files with semantics and defaults and validation",
  "repository": {
    "type": "git",
    "url": "git://github.com/isaacs/read-package-json.git"
  },
  "main": "read-json.js",
  "scripts": {
    "test": "tap test/*.js"
  },
  "dependencies": {
    "glob": "~3.1.9",
    "lru-cache": "~1.1.0",
    "semver": "~1.0.14",
    "slide": "~1.1.3"
  },
  "devDependencies": {
    "tap": "~0.2.5"
  },
  "optionalDependencies": {
    "npmlog": "0",
    "graceful-fs": "~1.1.8"
  }
}
**/


<|start_filename|>project/target/node-modules/webjars/clean-css/lib/text/comma-splitter.js<|end_filename|>
var Splitter = function CommaSplitter (value) {
  this.value = value;
};

Splitter.prototype.split = function () {
  if (this.value.indexOf(',') === -1)
    return [this.value];

  if (this.value.indexOf('(') === -1)
    return this.value.split(',');

  var level = 0;
  var cursor = 0;
  var lastStart = 0;
  var len = this.value.length;
  var tokens = [];

  while (cursor++ < len) {
    if (this.value[cursor] == '(') {
      level++;
    } else if (this.value[cursor] == ')') {
      level--;
    } else if (this.value[cursor] == ',' && level === 0) {
      tokens.push(this.value.substring(lastStart, cursor));
      lastStart = cursor + 1;
    }
  }

  if (lastStart < cursor + 1)
    tokens.push(this.value.substring(lastStart));

  return tokens;
};

module.exports = Splitter;


<|start_filename|>project/target/node-modules/webjars/npm/lib/build.js<|end_filename|>
// npm build command

// everything about the installation after the creation of
// the .npm/{name}/{version}/package folder.
// linking the modules into the npm.root,
// resolving dependencies, etc.

// This runs AFTER install or link are completed.

var npm = require("./npm.js")
  , log = require("npmlog")
  , chain = require("slide").chain
  , fs = require("graceful-fs")
  , path = require("path")
  , lifecycle = require("./utils/lifecycle.js")
  , readJson = require("read-package-json")
  , link = require("./utils/link.js")
  , linkIfExists = link.ifExists
  , cmdShim = require("cmd-shim")
  , cmdShimIfExists = cmdShim.ifExists
  , asyncMap = require("slide").asyncMap
  , ini = require("ini")
  , writeFile = require("write-file-atomic")

module.exports = build
build.usage = "npm build <folder>\n(this is plumbing)"

build._didBuild = {}
build._noLC = {}
function build (args, global, didPre, didRB, cb) {
  if (typeof cb !== "function") cb = didRB, didRB = false
  if (typeof cb !== "function") cb = didPre, didPre = false
  if (typeof cb !== "function") {
    cb = global, global = npm.config.get("global")
  }
  // it'd be nice to asyncMap these, but actually, doing them
  // in parallel generally munges up the output from node-waf
  var builder = build_(global, didPre, didRB)
  chain(args.map(function (arg) { return function (cb) {
    builder(arg, cb)
  }}), cb)
}

function build_ (global, didPre, didRB) { return function (folder, cb) {
  folder = path.resolve(folder)
  if (build._didBuild[folder]) log.info("build", "already built", folder)
  build._didBuild[folder] = true
  log.info("build", folder)
  readJson(path.resolve(folder, "package.json"), function (er, pkg) {
    if (er) return cb(er)
    chain
      ( [ !didPre && [lifecycle, pkg, "preinstall", folder]
        , [linkStuff, pkg, folder, global, didRB]
        , [writeBuiltinConf, pkg, folder]
        , didPre !== build._noLC && [lifecycle, pkg, "install", folder]
        , didPre !== build._noLC && [lifecycle, pkg, "postinstall", folder]
        , didPre !== build._noLC
          && npm.config.get("npat")
          && [lifecycle, pkg, "test", folder] ]
      , cb )
  })
}}

function writeBuiltinConf (pkg, folder, cb) {
  // the builtin config is "sticky". Any time npm installs
  // itself globally, it puts its builtin config file there
  var parent = path.dirname(folder)
  var dir = npm.globalDir

  if (pkg.name !== "npm" ||
      !npm.config.get("global") ||
      !npm.config.usingBuiltin ||
      dir !== parent) {
    return cb()
  }

  var data = ini.stringify(npm.config.sources.builtin.data)
  writeFile(path.resolve(folder, "npmrc"), data, cb)
}

function linkStuff (pkg, folder, global, didRB, cb) {
  // allow to opt out of linking binaries.
  if (npm.config.get("bin-links") === false) return cb()

  // if it's global, and folder is in {prefix}/node_modules,
  // then bins are in {prefix}/bin
  // otherwise, then bins are in folder/../.bin
  var parent = pkg.name[0] === '@' ? path.dirname(path.dirname(folder)) : path.dirname(folder)
  var gnm = global && npm.globalDir
  var gtop = parent === gnm

  log.info('linkStuff', pkg._id)
  log.silly('linkStuff', pkg._id, 'has', parent, 'as its parent node_modules')
  if (global) log.silly('linkStuff', pkg._id, 'is part of a global install')
  if (gnm) log.silly('linkStuff', pkg._id, 'is installed into a global node_modules')
  if (gtop) log.silly('linkStuff', pkg._id, 'is installed into the top-level global node_modules')

  shouldWarn(pkg, folder, global, function () {
    asyncMap(
      [linkBins, linkMans, !didRB && rebuildBundles],
      function (fn, cb) {
        if (!fn) return cb()
        log.verbose(fn.name, pkg._id)
        fn(pkg, folder, parent, gtop, cb)
      },
      cb
    )
  })
}

function shouldWarn(pkg, folder, global, cb) {
  var parent = path.dirname(folder)
    , top = parent === npm.dir
    , cwd = npm.localPrefix

  readJson(path.resolve(cwd, "package.json"), function(er, topPkg) {
    if (er) return cb(er)

    var linkedPkg = path.basename(cwd)
      , currentPkg = path.basename(folder)

    // current searched package is the linked package on first call
    if (linkedPkg !== currentPkg) {

      if (!topPkg.dependencies) return cb()

      // don't generate a warning if it's listed in dependencies
      if (Object.keys(topPkg.dependencies).indexOf(currentPkg) === -1) {

        if (top && pkg.preferGlobal && !global) {
          log.warn("prefer global", pkg._id + " should be installed with -g")
        }
      }
    }

    cb()
  })
}

function rebuildBundles (pkg, folder, parent, gtop, cb) {
  if (!npm.config.get("rebuild-bundle")) return cb()

  var deps = Object.keys(pkg.dependencies || {})
             .concat(Object.keys(pkg.devDependencies || {}))
    , bundles = pkg.bundleDependencies || pkg.bundledDependencies || []

  fs.readdir(path.resolve(folder, "node_modules"), function (er, files) {
    // error means no bundles
    if (er) return cb()

    log.verbose("rebuildBundles", files)
    // don't asyncMap these, because otherwise build script output
    // gets interleaved and is impossible to read
    chain(files.filter(function (file) {
      // rebuild if:
      // not a .folder, like .bin or .hooks
      return !file.match(/^[\._-]/)
          // not some old 0.x style bundle
          && file.indexOf("@") === -1
          // either not a dep, or explicitly bundled
          && (deps.indexOf(file) === -1 || bundles.indexOf(file) !== -1)
    }).map(function (file) {
      file = path.resolve(folder, "node_modules", file)
      return function (cb) {
        if (build._didBuild[file]) return cb()
        log.verbose("rebuild bundle", file)
        // if file is not a package dir, then don't do it.
        fs.lstat(path.resolve(file, "package.json"), function (er) {
          if (er) return cb()
          build_(false)(file, cb)
        })
    }}), cb)
  })
}

function linkBins (pkg, folder, parent, gtop, cb) {
  if (!pkg.bin || !gtop && path.basename(parent) !== "node_modules") {
    return cb()
  }
  var binRoot = gtop ? npm.globalBin
                     : path.resolve(parent, ".bin")
  log.verbose("link bins", [pkg.bin, binRoot, gtop])

  asyncMap(Object.keys(pkg.bin), function (b, cb) {
    linkBin( path.resolve(folder, pkg.bin[b])
           , path.resolve(binRoot, b)
           , gtop && folder
           , function (er) {
      if (er) return cb(er)
      // bins should always be executable.
      // XXX skip chmod on windows?
      var src = path.resolve(folder, pkg.bin[b])
      fs.chmod(src, npm.modes.exec, function (er) {
        if (er && er.code === "ENOENT" && npm.config.get("ignore-scripts")) {
          return cb()
        }
        if (er || !gtop) return cb(er)
        var dest = path.resolve(binRoot, b)
          , out = npm.config.get("parseable")
                ? dest + "::" + src + ":BINFILE"
                : dest + " -> " + src
        console.log(out)
        cb()
      })
    })
  }, cb)
}

function linkBin (from, to, gently, cb) {
  if (process.platform !== "win32") {
    return linkIfExists(from, to, gently, cb)
  } else {
    return cmdShimIfExists(from, to, cb)
  }
}

function linkMans (pkg, folder, parent, gtop, cb) {
  if (!pkg.man || !gtop || process.platform === "win32") return cb()

  var manRoot = path.resolve(npm.config.get("prefix"), "share", "man")
  log.verbose("linkMans", "man files are", pkg.man, "in", manRoot)

  // make sure that the mans are unique.
  // otherwise, if there are dupes, it'll fail with EEXIST
  var set = pkg.man.reduce(function (acc, man) {
    acc[path.basename(man)] = man
    return acc
  }, {})
  pkg.man = pkg.man.filter(function (man) {
    return set[path.basename(man)] === man
  })

  asyncMap(pkg.man, function (man, cb) {
    if (typeof man !== "string") return cb()
    log.silly("linkMans", "preparing to link", man)
    var parseMan = man.match(/(.*\.([0-9]+)(\.gz)?)$/)
    if (!parseMan) {
      return cb(new Error(
        man+" is not a valid name for a man file.  " +
        "Man files must end with a number, " +
        "and optionally a .gz suffix if they are compressed."
      ))
    }

    var stem = parseMan[1]
    var sxn = parseMan[2]
    var bn = path.basename(stem)
    var manSrc = path.resolve(folder, man)
    var manDest = path.join(manRoot, "man" + sxn, bn)

    linkIfExists(manSrc, manDest, gtop && folder, cb)
  }, cb)
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/lib/access.js<|end_filename|>
module.exports = access

var assert = require('assert')

function access (uri, params, cb) {
  assert(typeof uri === 'string', 'must pass registry URI to access')
  assert(params && typeof params === 'object', 'must pass params to access')
  assert(typeof cb === 'function', 'muss pass callback to access')

  assert(typeof params.level === 'string', 'must pass level to access')
  assert(
    ['public', 'restricted'].indexOf(params.level) !== -1,
    "access level must be either 'public' or 'restricted'"
  )
  assert(
    params.auth && typeof params.auth === 'object',
    'must pass auth to access'
  )

  var body = {
    access: params.level
  }

  var options = {
    method: 'POST',
    body: JSON.stringify(body),
    auth: params.auth
  }
  this.request(uri, options, cb)
}


<|start_filename|>project/target/node-modules/webjars/npm/lib/cache/cached-package-root.js<|end_filename|>
var assert = require("assert")
var resolve = require("path").resolve

var npm = require("../npm.js")

module.exports = getCacheRoot

function getCacheRoot (data) {
  assert(data, "must pass package metadata")
  assert(data.name, "package metadata must include name")
  assert(data.version, "package metadata must include version")

  return resolve(npm.cache, data.name, data.version)
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/fstream/examples/pipe.js<|end_filename|>
var fstream = require('../fstream.js')
var path = require('path')

var r = fstream.Reader({
  path: path.dirname(__dirname),
  filter: function () {
    return !this.basename.match(/^\./) &&
           !this.basename.match(/^node_modules$/) &&
           !this.basename.match(/^deep-copy$/)
  }
})

var w = fstream.Writer({
  path: path.resolve(__dirname, 'deep-copy'),
  type: 'Directory'
})

var indent = ''

r.on('entry', appears)
r.on('ready', function () {
  console.error('ready to begin!', r.path)
})

function appears (entry) {
  console.error(indent + 'a %s appears!', entry.type, entry.basename, typeof entry.basename, entry)
  if (foggy) {
    console.error('FOGGY!')
    var p = entry
    do {
      console.error(p.depth, p.path, p._paused)
      p = p.parent
    } while (p)

    throw new Error('\u001b[mshould not have entries while foggy')
  }
  indent += '\t'
  entry.on('data', missile(entry))
  entry.on('end', runaway(entry))
  entry.on('entry', appears)
}

var foggy
function missile (entry) {
  function liftFog (who) {
    if (!foggy) return
    if (who) {
      console.error('%s breaks the spell!', who && who.path)
    } else {
      console.error('the spell expires!')
    }
    console.error('\u001b[mthe fog lifts!\n')
    clearTimeout(foggy)
    foggy = null
    if (entry._paused) entry.resume()
  }

  if (entry.type === 'Directory') {
    var ended = false
    entry.once('end', function () { ended = true })
    return function (c) {
      // throw in some pathological pause()/resume() behavior
      // just for extra fun.
      process.nextTick(function () {
        if (!foggy && !ended) { // && Math.random() < 0.3) {
          console.error(indent + '%s casts a spell', entry.basename)
          console.error('\na slowing fog comes over the battlefield...\n\u001b[32m')
          entry.pause()
          entry.once('resume', liftFog)
          foggy = setTimeout(liftFog, 10)
        }
      })
    }
  }

  return function (c) {
    var e = Math.random() < 0.5
    console.error(indent + '%s %s for %d damage!',
                entry.basename,
                e ? 'is struck' : 'fires a chunk',
                c.length)
  }
}

function runaway (entry) {
  return function () {
    var e = Math.random() < 0.5
    console.error(indent + '%s %s',
                  entry.basename,
                  e ? 'turns to flee' : 'is vanquished!')
    indent = indent.slice(0, -1)
  }
}

w.on('entry', attacks)
// w.on('ready', function () { attacks(w) })
function attacks (entry) {
  console.error(indent + '%s %s!', entry.basename,
              entry.type === 'Directory' ? 'calls for backup' : 'attacks')
  entry.on('entry', attacks)
}

var ended = false
r.on('end', function () {
  if (foggy) clearTimeout(foggy)
  console.error("\u001b[mIT'S OVER!!")
  console.error('A WINNAR IS YOU!')

  console.log('ok 1 A WINNAR IS YOU')
  ended = true
})

process.on('exit', function () {
  console.log((ended ? '' : 'not ') + 'ok 2 ended')
})

r.pipe(w)


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/editor/example/edit.js<|end_filename|>
var editor = require('../');
editor(__dirname + '/beep.json', function (code, sig) {
    console.log('finished editing with code ' + code);
});


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/fstream/lib/link-reader.js<|end_filename|>
// Basically just a wrapper around an fs.readlink
//
// XXX: Enhance this to support the Link type, by keeping
// a lookup table of {<dev+inode>:<path>}, so that hardlinks
// can be preserved in tarballs.

module.exports = LinkReader

var fs = require('graceful-fs')
var inherits = require('inherits')
var Reader = require('./reader.js')

inherits(LinkReader, Reader)

function LinkReader (props) {
  var self = this
  if (!(self instanceof LinkReader)) {
    throw new Error('LinkReader must be called as constructor.')
  }

  if (!((props.type === 'Link' && props.Link) ||
        (props.type === 'SymbolicLink' && props.SymbolicLink))) {
    throw new Error('Non-link type ' + props.type)
  }

  Reader.call(self, props)
}

// When piping a LinkReader into a LinkWriter, we have to
// already have the linkpath property set, so that has to
// happen *before* the "ready" event, which means we need to
// override the _stat method.
LinkReader.prototype._stat = function (currentStat) {
  var self = this
  fs.readlink(self._path, function (er, linkpath) {
    if (er) return self.error(er)
    self.linkpath = self.props.linkpath = linkpath
    self.emit('linkpath', linkpath)
    Reader.prototype._stat.call(self, currentStat)
  })
}

LinkReader.prototype._read = function () {
  var self = this
  if (self._paused) return
  // basically just a no-op, since we got all the info we need
  // from the _stat method
  if (!self._ended) {
    self.emit('end')
    self.emit('close')
    self._ended = true
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_updates.js<|end_filename|>
var assert = require('assert')
var FS = require('fs')
var YAML = require('js-yaml')
var jju = require('../')

function addTest(name, fn) {
  if (typeof(describe) === 'function') {
    it(name, fn)
  } else {
    fn()
  }
}

FS.readdirSync(__dirname + '/update').filter(function(file) {
  return file.match(/^[^\.].*\.yaml$/)
}).forEach(function(file) {
  addTest('update: ' + file, function() {
    var test = YAML.load(FS.readFileSync(__dirname + '/update/' + file, 'utf8'))
    assert.strictEqual(test.test(jju, test.input), test.output)
  })
})



<|start_filename|>project/target/node-modules/webjars/npm/lib/config/clear-credentials-by-uri.js<|end_filename|>
var assert = require("assert")

var toNerfDart = require("./nerf-dart.js")

module.exports = clearCredentialsByURI

function clearCredentialsByURI (uri) {
  assert(uri && typeof uri === "string", "registry URL is required")

  var nerfed = toNerfDart(uri)

  this.del(nerfed + ":_authToken", "user")
  this.del(nerfed + ":_password",  "<PASSWORD>")
  this.del(nerfed + ":username",   "user")
  this.del(nerfed + ":email",      "user")
}


<|start_filename|>project/target/node-modules/webjars/npm/lib/logout.js<|end_filename|>
module.exports = logout

var dezalgo = require("dezalgo")
var log = require("npmlog")

var npm = require("./npm.js")
var mapToRegistry = require("./utils/map-to-registry.js")

logout.usage = "npm logout [--registry] [--scope]"

function logout (args, cb) {
  npm.spinner.start()
  cb = dezalgo(cb)

  mapToRegistry("/", npm.config, function (err, uri, auth, normalized) {
    if (err) return cb(err)

    if (auth.token) {
      log.verbose("logout", "clearing session token for", normalized)
      npm.registry.logout(normalized, { auth: auth }, function (err) {
        if (err) return cb(err)

        npm.config.clearCredentialsByURI(normalized)
        npm.spinner.stop()
        npm.config.save("user", cb)
      })
    }
    else if (auth.username || auth.password) {
      log.verbose("logout", "clearing user credentials for", normalized)
      npm.config.clearCredentialsByURI(normalized)
      npm.spinner.stop()
      npm.config.save("user", cb)
    }
    else {
      cb(new Error(
        "Not logged in to", normalized + ",", "so can't log out."
      ))
    }
  })
}


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/detached-ruleset.js<|end_filename|>
(function (tree) {

tree.DetachedRuleset = function (ruleset, frames) {
    this.ruleset = ruleset;
    this.frames = frames;
};
tree.DetachedRuleset.prototype = {
    type: "DetachedRuleset",
    accept: function (visitor) {
        this.ruleset = visitor.visit(this.ruleset);
    },
    eval: function (env) {
        var frames = this.frames || env.frames.slice(0);
        return new tree.DetachedRuleset(this.ruleset, frames);
    },
    callEval: function (env) {
        return this.ruleset.eval(this.frames ? new(tree.evalEnv)(env, this.frames.concat(env.frames)) : env);
    }
};
})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/node-gyp/node_modules/path-array/test/test.js<|end_filename|>

/**
 * Module dependencies.
 */

var assert = require('assert');
var PathArray = require('../');
var delimiter = require('path').delimiter || ':';

describe('PathArray', function () {
  it('should use `process.env` by default', function () {
    var p = new PathArray();
    assert.equal(p._env, process.env);
  });
  it('should return the $PATH string for .toString()', function () {
    var p = new PathArray();
    assert.equal(p.toString(), process.env.PATH);
  });
  it('should accept an arbitrary `env` object', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    assert.equal(p.toString(), env.PATH);
  });
  it('should work for [n] getter syntax', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    assert.equal('/foo', p[0]);
    assert.equal('/bar', p[1]);
  });
  it('should work for [n]= setter syntax', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    p[0] = '/baz';
    assert.equal('/baz' + delimiter + '/bar', env.PATH);
  });
  it('should work with .push()', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    p.push('/baz');
    assert.equal('/foo' + delimiter + '/bar' + delimiter + '/baz', env.PATH);
  });
  it('should work with .shift()', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    assert.equal('/foo', p.shift());
    assert.equal('/bar', env.PATH);
  });
  it('should work with .pop()', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    assert.equal('/bar', p.pop());
    assert.equal('/foo', env.PATH);
  });
  it('should work with .unshift()', function () {
    var env = { PATH: '/foo' + delimiter + '/bar' };
    var p = new PathArray(env);
    p.unshift('/baz');
    assert.equal('/baz' + delimiter + '/foo' + delimiter + '/bar', env.PATH);
  });
  it('should be able to specify property name to use with second argument', function () {
    var env = { PYTHONPATH: '/foo' };
    var p = new PathArray(env, 'PYTHONPATH');
    assert.equal(1, p.length);
    p.push('/baz');
    assert.equal(2, p.length);
    assert.equal('/foo' + delimiter + '/baz', env.PYTHONPATH);
  });
});


<|start_filename|>project/target/node-modules/webjars/less/lib/source-map/source-map-footer.js<|end_filename|>
// footer to wrap "source-map" module
	return this.sourceMap;
	}();
})();

<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/media.js<|end_filename|>
(function (tree) {

tree.Media = function (value, features, index, currentFileInfo) {
    this.index = index;
    this.currentFileInfo = currentFileInfo;

    var selectors = this.emptySelectors();

    this.features = new(tree.Value)(features);
    this.rules = [new(tree.Ruleset)(selectors, value)];
    this.rules[0].allowImports = true;
};
tree.Media.prototype = {
    type: "Media",
    accept: function (visitor) {
        if (this.features) {
            this.features = visitor.visit(this.features);
        }
        if (this.rules) {
            this.rules = visitor.visitArray(this.rules);
        }
    },
    genCSS: function (env, output) {
        output.add('@media ', this.currentFileInfo, this.index);
        this.features.genCSS(env, output);
        tree.outputRuleset(env, output, this.rules);
    },
    toCSS: tree.toCSS,
    eval: function (env) {
        if (!env.mediaBlocks) {
            env.mediaBlocks = [];
            env.mediaPath = [];
        }
        
        var media = new(tree.Media)(null, [], this.index, this.currentFileInfo);
        if(this.debugInfo) {
            this.rules[0].debugInfo = this.debugInfo;
            media.debugInfo = this.debugInfo;
        }
        var strictMathBypass = false;
        if (!env.strictMath) {
            strictMathBypass = true;
            env.strictMath = true;
        }
        try {
            media.features = this.features.eval(env);
        }
        finally {
            if (strictMathBypass) {
                env.strictMath = false;
            }
        }
        
        env.mediaPath.push(media);
        env.mediaBlocks.push(media);
        
        env.frames.unshift(this.rules[0]);
        media.rules = [this.rules[0].eval(env)];
        env.frames.shift();
        
        env.mediaPath.pop();

        return env.mediaPath.length === 0 ? media.evalTop(env) :
                    media.evalNested(env);
    },
    variable: function (name) { return tree.Ruleset.prototype.variable.call(this.rules[0], name); },
    find: function () { return tree.Ruleset.prototype.find.apply(this.rules[0], arguments); },
    rulesets: function () { return tree.Ruleset.prototype.rulesets.apply(this.rules[0]); },
    emptySelectors: function() { 
        var el = new(tree.Element)('', '&', this.index, this.currentFileInfo),
            sels = [new(tree.Selector)([el], null, null, this.index, this.currentFileInfo)];
        sels[0].mediaEmpty = true;
        return sels;
    },
    markReferenced: function () {
        var i, rules = this.rules[0].rules;
        this.rules[0].markReferenced();
        this.isReferenced = true;
        for (i = 0; i < rules.length; i++) {
            if (rules[i].markReferenced) {
                rules[i].markReferenced();
            }
        }
    },

    evalTop: function (env) {
        var result = this;

        // Render all dependent Media blocks.
        if (env.mediaBlocks.length > 1) {
            var selectors = this.emptySelectors();
            result = new(tree.Ruleset)(selectors, env.mediaBlocks);
            result.multiMedia = true;
        }

        delete env.mediaBlocks;
        delete env.mediaPath;

        return result;
    },
    evalNested: function (env) {
        var i, value,
            path = env.mediaPath.concat([this]);

        // Extract the media-query conditions separated with `,` (OR).
        for (i = 0; i < path.length; i++) {
            value = path[i].features instanceof tree.Value ?
                        path[i].features.value : path[i].features;
            path[i] = Array.isArray(value) ? value : [value];
        }

        // Trace all permutations to generate the resulting media-query.
        //
        // (a, b and c) with nested (d, e) ->
        //    a and d
        //    a and e
        //    b and c and d
        //    b and c and e
        this.features = new(tree.Value)(this.permute(path).map(function (path) {
            path = path.map(function (fragment) {
                return fragment.toCSS ? fragment : new(tree.Anonymous)(fragment);
            });

            for(i = path.length - 1; i > 0; i--) {
                path.splice(i, 0, new(tree.Anonymous)("and"));
            }

            return new(tree.Expression)(path);
        }));

        // Fake a tree-node that doesn't output anything.
        return new(tree.Ruleset)([], []);
    },
    permute: function (arr) {
      if (arr.length === 0) {
          return [];
      } else if (arr.length === 1) {
          return arr[0];
      } else {
          var result = [];
          var rest = this.permute(arr.slice(1));
          for (var i = 0; i < rest.length; i++) {
              for (var j = 0; j < arr[0].length; j++) {
                  result.push([arr[0][j]].concat(rest[i]));
              }
          }
          return result;
      }
    },
    bubbleSelectors: function (selectors) {
      if (!selectors)
        return;
      this.rules = [new(tree.Ruleset)(selectors.slice(0), [this.rules[0]])];
    }
};

})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-installed/node_modules/readdir-scoped-modules/readdir.js<|end_filename|>
var fs = require ('graceful-fs')
var dz = require ('dezalgo')
var once = require ('once')
var path = require ('path')
var debug = require ('debuglog') ('rds')

module . exports = readdir

function readdir (dir, cb) {
  fs . readdir (dir, function (er, kids) {
    if (er)
      return cb (er)

    debug ('dir=%j, kids=%j', dir, kids)
    readScopes (dir, kids, function (er, data) {
      if (er)
        return cb (er)

      // Sort for bonus consistency points
      data = data . sort (function (a, b) {
        return a > b ? 1 : -1
      })

      return cb (null, data)
    })
  })
}

// Turn [ 'a', '@scope' ] into
// ['a', '@scope/foo', '@scope/bar']
function readScopes (root, kids, cb) {
  var scopes = kids . filter (function (kid) {
    return kid . charAt (0) === '@'
  })

  kids = kids . filter (function (kid) {
    return kid . charAt (0) !== '@'
  })

  debug ('scopes=%j', scopes)

  if (scopes . length === 0)
    dz (cb) (null, kids) // prevent maybe-sync zalgo release

  cb = once (cb)
  var l = scopes . length
  scopes . forEach (function (scope) {
    var scopedir = path . resolve (root, scope)
    debug ('root=%j scope=%j scopedir=%j', root, scope, scopedir)
    fs . readdir (scopedir, then . bind (null, scope))
  })

  function then (scope, er, scopekids) {
    if (er)
      return cb (er)

    // XXX: Not sure how old this node bug is. Maybe superstition?
    scopekids = scopekids . filter (function (scopekid) {
      return !(scopekid === '.' || scopekid === '..' || !scopekid)
    })

    kids . push . apply (kids, scopekids . map (function (scopekid) {
      return scope + '/' + scopekid
    }))

    debug ('scope=%j scopekids=%j kids=%j', scope, scopekids, kids)

    if (--l === 0)
      cb (null, kids)
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/github-url-from-git/Makefile<|end_filename|>

test:
	@./node_modules/.bin/mocha test.js --reporter spec --require should

.PHONY: test


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/test/00-setup.js<|end_filename|>
var tap = require('tap')
var rimraf = require('rimraf')

tap.test('setup', function (t) {
  rimraf(__dirname + '/fixtures/cache', function (er) {
    if (er) throw er
    t.pass('cache cleaned')
    t.end()
  })
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/lib/dist-tags/add.js<|end_filename|>
module.exports = add

var assert = require('assert')
var url = require('url')

var npa = require('npm-package-arg')

function add (uri, params, cb) {
  assert(typeof uri === 'string', 'must pass registry URI to distTags.add')
  assert(
    params && typeof params === 'object',
    'must pass params to distTags.add'
  )
  assert(typeof cb === 'function', 'muss pass callback to distTags.add')

  assert(
    typeof params.package === 'string',
    'must pass package name to distTags.add'
  )
  assert(
    typeof params.distTag === 'string',
    'must pass package distTag name to distTags.add'
  )
  assert(
    typeof params.version === 'string',
    'must pass version to be mapped to distTag to distTags.add'
  )
  assert(
    params.auth && typeof params.auth === 'object',
    'must pass auth to distTags.add'
  )

  var p = npa(params.package)
  var pkg = p.scope ? params.package.replace('/', '%2f') : params.package
  var rest = '-/package/' + pkg + '/dist-tags/' + params.distTag

  var options = {
    method: 'PUT',
    body: JSON.stringify(params.version),
    auth: params.auth
  }
  this.request(url.resolve(uri, rest), options, cb)
}


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/expression.js<|end_filename|>
(function (tree) {

tree.Expression = function (value) { this.value = value; };
tree.Expression.prototype = {
    type: "Expression",
    accept: function (visitor) {
        if (this.value) {
            this.value = visitor.visitArray(this.value);
        }
    },
    eval: function (env) {
        var returnValue,
            inParenthesis = this.parens && !this.parensInOp,
            doubleParen = false;
        if (inParenthesis) {
            env.inParenthesis();
        }
        if (this.value.length > 1) {
            returnValue = new(tree.Expression)(this.value.map(function (e) {
                return e.eval(env);
            }));
        } else if (this.value.length === 1) {
            if (this.value[0].parens && !this.value[0].parensInOp) {
                doubleParen = true;
            }
            returnValue = this.value[0].eval(env);
        } else {
            returnValue = this;
        }
        if (inParenthesis) {
            env.outOfParenthesis();
        }
        if (this.parens && this.parensInOp && !(env.isMathOn()) && !doubleParen) {
            returnValue = new(tree.Paren)(returnValue);
        }
        return returnValue;
    },
    genCSS: function (env, output) {
        for(var i = 0; i < this.value.length; i++) {
            this.value[i].genCSS(env, output);
            if (i + 1 < this.value.length) {
                output.add(" ");
            }
        }
    },
    toCSS: tree.toCSS,
    throwAwayComments: function () {
        this.value = this.value.filter(function(v) {
            return !(v instanceof tree.Comment);
        });
    }
};

})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/ruleset.js<|end_filename|>
(function (tree) {

tree.Ruleset = function (selectors, rules, strictImports) {
    this.selectors = selectors;
    this.rules = rules;
    this._lookups = {};
    this.strictImports = strictImports;
};
tree.Ruleset.prototype = {
    type: "Ruleset",
    accept: function (visitor) {
        if (this.paths) {
            visitor.visitArray(this.paths, true);
        } else if (this.selectors) {
            this.selectors = visitor.visitArray(this.selectors);
        }
        if (this.rules && this.rules.length) {
            this.rules = visitor.visitArray(this.rules);
        }
    },
    eval: function (env) {
        var thisSelectors = this.selectors, selectors, 
            selCnt, selector, i, defaultFunc = tree.defaultFunc, hasOnePassingSelector = false;

        if (thisSelectors && (selCnt = thisSelectors.length)) {
            selectors = [];
            defaultFunc.error({
                type: "Syntax", 
                message: "it is currently only allowed in parametric mixin guards," 
            });
            for (i = 0; i < selCnt; i++) {
                selector = thisSelectors[i].eval(env);
                selectors.push(selector);
                if (selector.evaldCondition) {
                    hasOnePassingSelector = true;
                }
            }
            defaultFunc.reset();  
        } else {
            hasOnePassingSelector = true;
        }

        var rules = this.rules ? this.rules.slice(0) : null,
            ruleset = new(tree.Ruleset)(selectors, rules, this.strictImports),
            rule, subRule;

        ruleset.originalRuleset = this;
        ruleset.root = this.root;
        ruleset.firstRoot = this.firstRoot;
        ruleset.allowImports = this.allowImports;

        if(this.debugInfo) {
            ruleset.debugInfo = this.debugInfo;
        }
        
        if (!hasOnePassingSelector) {
            rules.length = 0;
        }

        // push the current ruleset to the frames stack
        var envFrames = env.frames;
        envFrames.unshift(ruleset);

        // currrent selectors
        var envSelectors = env.selectors;
        if (!envSelectors) {
            env.selectors = envSelectors = [];
        }
        envSelectors.unshift(this.selectors);

        // Evaluate imports
        if (ruleset.root || ruleset.allowImports || !ruleset.strictImports) {
            ruleset.evalImports(env);
        }

        // Store the frames around mixin definitions,
        // so they can be evaluated like closures when the time comes.
        var rsRules = ruleset.rules, rsRuleCnt = rsRules ? rsRules.length : 0;
        for (i = 0; i < rsRuleCnt; i++) {
            if (rsRules[i] instanceof tree.mixin.Definition || rsRules[i] instanceof tree.DetachedRuleset) {
                rsRules[i] = rsRules[i].eval(env);
            }
        }

        var mediaBlockCount = (env.mediaBlocks && env.mediaBlocks.length) || 0;

        // Evaluate mixin calls.
        for (i = 0; i < rsRuleCnt; i++) {
            if (rsRules[i] instanceof tree.mixin.Call) {
                /*jshint loopfunc:true */
                rules = rsRules[i].eval(env).filter(function(r) {
                    if ((r instanceof tree.Rule) && r.variable) {
                        // do not pollute the scope if the variable is
                        // already there. consider returning false here
                        // but we need a way to "return" variable from mixins
                        return !(ruleset.variable(r.name));
                    }
                    return true;
                });
                rsRules.splice.apply(rsRules, [i, 1].concat(rules));
                rsRuleCnt += rules.length - 1;
                i += rules.length-1;
                ruleset.resetCache();
            } else if (rsRules[i] instanceof tree.RulesetCall) {
                /*jshint loopfunc:true */
                rules = rsRules[i].eval(env).rules.filter(function(r) {
                    if ((r instanceof tree.Rule) && r.variable) {
                        // do not pollute the scope at all
                        return false;
                    }
                    return true;
                });
                rsRules.splice.apply(rsRules, [i, 1].concat(rules));
                rsRuleCnt += rules.length - 1;
                i += rules.length-1;
                ruleset.resetCache();
            }
        }

        // Evaluate everything else
        for (i = 0; i < rsRules.length; i++) {
            rule = rsRules[i];
            if (! (rule instanceof tree.mixin.Definition || rule instanceof tree.DetachedRuleset)) {
                rsRules[i] = rule = rule.eval ? rule.eval(env) : rule;
            }
        }
        
        // Evaluate everything else
        for (i = 0; i < rsRules.length; i++) {
            rule = rsRules[i];
            // for rulesets, check if it is a css guard and can be removed
            if (rule instanceof tree.Ruleset && rule.selectors && rule.selectors.length === 1) {
                // check if it can be folded in (e.g. & where)
                if (rule.selectors[0].isJustParentSelector()) {
                    rsRules.splice(i--, 1);

                    for(var j = 0; j < rule.rules.length; j++) {
                        subRule = rule.rules[j];
                        if (!(subRule instanceof tree.Rule) || !subRule.variable) {
                            rsRules.splice(++i, 0, subRule);
                        }
                    }
                }
            }
        }

        // Pop the stack
        envFrames.shift();
        envSelectors.shift();
        
        if (env.mediaBlocks) {
            for (i = mediaBlockCount; i < env.mediaBlocks.length; i++) {
                env.mediaBlocks[i].bubbleSelectors(selectors);
            }
        }

        return ruleset;
    },
    evalImports: function(env) {
        var rules = this.rules, i, importRules;
        if (!rules) { return; }

        for (i = 0; i < rules.length; i++) {
            if (rules[i] instanceof tree.Import) {
                importRules = rules[i].eval(env);
                if (importRules && importRules.length) {
                    rules.splice.apply(rules, [i, 1].concat(importRules));
                    i+= importRules.length-1;
                } else {
                    rules.splice(i, 1, importRules);
                }
                this.resetCache();
            }
        }
    },
    makeImportant: function() {
        return new tree.Ruleset(this.selectors, this.rules.map(function (r) {
                    if (r.makeImportant) {
                        return r.makeImportant();
                    } else {
                        return r;
                    }
                }), this.strictImports);
    },
    matchArgs: function (args) {
        return !args || args.length === 0;
    },
    // lets you call a css selector with a guard
    matchCondition: function (args, env) {
        var lastSelector = this.selectors[this.selectors.length-1];
        if (!lastSelector.evaldCondition) {
            return false;
        }
        if (lastSelector.condition &&
            !lastSelector.condition.eval(
                new(tree.evalEnv)(env,
                    env.frames))) {
            return false;
        }
        return true;
    },
    resetCache: function () {
        this._rulesets = null;
        this._variables = null;
        this._lookups = {};
    },
    variables: function () {
        if (!this._variables) {
            this._variables = !this.rules ? {} : this.rules.reduce(function (hash, r) {
                if (r instanceof tree.Rule && r.variable === true) {
                    hash[r.name] = r;
                }
                return hash;
            }, {});
        }
        return this._variables;
    },
    variable: function (name) {
        return this.variables()[name];
    },
    rulesets: function () {
        if (!this.rules) { return null; }

        var _Ruleset = tree.Ruleset, _MixinDefinition = tree.mixin.Definition,
            filtRules = [], rules = this.rules, cnt = rules.length,
            i, rule;

        for (i = 0; i < cnt; i++) {
            rule = rules[i];
            if ((rule instanceof _Ruleset) || (rule instanceof _MixinDefinition)) {
                filtRules.push(rule);
            }
        }

        return filtRules;
    },
    prependRule: function (rule) {
        var rules = this.rules;
        if (rules) { rules.unshift(rule); } else { this.rules = [ rule ]; }
    },
    find: function (selector, self) {
        self = self || this;
        var rules = [], match,
            key = selector.toCSS();

        if (key in this._lookups) { return this._lookups[key]; }

        this.rulesets().forEach(function (rule) {
            if (rule !== self) {
                for (var j = 0; j < rule.selectors.length; j++) {
                    match = selector.match(rule.selectors[j]);
                    if (match) {
                        if (selector.elements.length > match) {
                            Array.prototype.push.apply(rules, rule.find(
                                new(tree.Selector)(selector.elements.slice(match)), self));
                        } else {
                            rules.push(rule);
                        }
                        break;
                    }
                }
            }
        });
        this._lookups[key] = rules;
        return rules;
    },
    genCSS: function (env, output) {
        var i, j,
            charsetRuleNodes = [],
            ruleNodes = [],
            rulesetNodes = [],
            rulesetNodeCnt,
            debugInfo,     // Line number debugging
            rule,
            path;

        env.tabLevel = (env.tabLevel || 0);

        if (!this.root) {
            env.tabLevel++;
        }

        var tabRuleStr = env.compress ? '' : Array(env.tabLevel + 1).join("  "),
            tabSetStr = env.compress ? '' : Array(env.tabLevel).join("  "),
            sep;

        function isRulesetLikeNode(rule, root) {
             // if it has nested rules, then it should be treated like a ruleset
             if (rule.rules)
                 return true;

             // medias and comments do not have nested rules, but should be treated like rulesets anyway
             if ( (rule instanceof tree.Media) || (root && rule instanceof tree.Comment))
                 return true;

             // some directives and anonumoust nodes are ruleset like, others are not
             if ((rule instanceof tree.Directive) || (rule instanceof tree.Anonymous)) {
                 return rule.isRulesetLike();
             }

             //anything else is assumed to be a rule
             return false;
        }

        for (i = 0; i < this.rules.length; i++) {
            rule = this.rules[i];
            if (isRulesetLikeNode(rule, this.root)) {
                rulesetNodes.push(rule);
            } else {
                //charsets should float on top of everything
                if (rule.isCharset && rule.isCharset()) {
                    charsetRuleNodes.push(rule);
                } else {
                    ruleNodes.push(rule);
                }
            }
        }
        ruleNodes = charsetRuleNodes.concat(ruleNodes);

        // If this is the root node, we don't render
        // a selector, or {}.
        if (!this.root) {
            debugInfo = tree.debugInfo(env, this, tabSetStr);

            if (debugInfo) {
                output.add(debugInfo);
                output.add(tabSetStr);
            }

            var paths = this.paths, pathCnt = paths.length,
                pathSubCnt;

            sep = env.compress ? ',' : (',\n' + tabSetStr);

            for (i = 0; i < pathCnt; i++) {
                path = paths[i];
                if (!(pathSubCnt = path.length)) { continue; }
                if (i > 0) { output.add(sep); }

                env.firstSelector = true;
                path[0].genCSS(env, output);

                env.firstSelector = false;
                for (j = 1; j < pathSubCnt; j++) {
                    path[j].genCSS(env, output);
                }
            }

            output.add((env.compress ? '{' : ' {\n') + tabRuleStr);
        }

        // Compile rules and rulesets
        for (i = 0; i < ruleNodes.length; i++) {
            rule = ruleNodes[i];

            // @page{ directive ends up with root elements inside it, a mix of rules and rulesets
            // In this instance we do not know whether it is the last property
            if (i + 1 === ruleNodes.length && (!this.root || rulesetNodes.length === 0 || this.firstRoot)) {
                env.lastRule = true;
            }

            if (rule.genCSS) {
                rule.genCSS(env, output);
            } else if (rule.value) {
                output.add(rule.value.toString());
            }

            if (!env.lastRule) {
                output.add(env.compress ? '' : ('\n' + tabRuleStr));
            } else {
                env.lastRule = false;
            }
        }

        if (!this.root) {
            output.add((env.compress ? '}' : '\n' + tabSetStr + '}'));
            env.tabLevel--;
        }

        sep = (env.compress ? "" : "\n") + (this.root ? tabRuleStr : tabSetStr);
        rulesetNodeCnt = rulesetNodes.length;
        if (rulesetNodeCnt) {
            if (ruleNodes.length && sep) { output.add(sep); }
            rulesetNodes[0].genCSS(env, output);
            for (i = 1; i < rulesetNodeCnt; i++) {
                if (sep) { output.add(sep); }
                rulesetNodes[i].genCSS(env, output);
            }
        }

        if (!output.isEmpty() && !env.compress && this.firstRoot) {
            output.add('\n');
        }
    },

    toCSS: tree.toCSS,

    markReferenced: function () {
        if (!this.selectors) {
            return;
        }
        for (var s = 0; s < this.selectors.length; s++) {
            this.selectors[s].markReferenced();
        }
    },

    joinSelectors: function (paths, context, selectors) {
        for (var s = 0; s < selectors.length; s++) {
            this.joinSelector(paths, context, selectors[s]);
        }
    },

    joinSelector: function (paths, context, selector) {

        var i, j, k, 
            hasParentSelector, newSelectors, el, sel, parentSel, 
            newSelectorPath, afterParentJoin, newJoinedSelector, 
            newJoinedSelectorEmpty, lastSelector, currentElements,
            selectorsMultiplied;
    
        for (i = 0; i < selector.elements.length; i++) {
            el = selector.elements[i];
            if (el.value === '&') {
                hasParentSelector = true;
            }
        }
    
        if (!hasParentSelector) {
            if (context.length > 0) {
                for (i = 0; i < context.length; i++) {
                    paths.push(context[i].concat(selector));
                }
            }
            else {
                paths.push([selector]);
            }
            return;
        }

        // The paths are [[Selector]]
        // The first list is a list of comma seperated selectors
        // The inner list is a list of inheritance seperated selectors
        // e.g.
        // .a, .b {
        //   .c {
        //   }
        // }
        // == [[.a] [.c]] [[.b] [.c]]
        //

        // the elements from the current selector so far
        currentElements = [];
        // the current list of new selectors to add to the path.
        // We will build it up. We initiate it with one empty selector as we "multiply" the new selectors
        // by the parents
        newSelectors = [[]];

        for (i = 0; i < selector.elements.length; i++) {
            el = selector.elements[i];
            // non parent reference elements just get added
            if (el.value !== "&") {
                currentElements.push(el);
            } else {
                // the new list of selectors to add
                selectorsMultiplied = [];

                // merge the current list of non parent selector elements
                // on to the current list of selectors to add
                if (currentElements.length > 0) {
                    this.mergeElementsOnToSelectors(currentElements, newSelectors);
                }

                // loop through our current selectors
                for (j = 0; j < newSelectors.length; j++) {
                    sel = newSelectors[j];
                    // if we don't have any parent paths, the & might be in a mixin so that it can be used
                    // whether there are parents or not
                    if (context.length === 0) {
                        // the combinator used on el should now be applied to the next element instead so that
                        // it is not lost
                        if (sel.length > 0) {
                            sel[0].elements = sel[0].elements.slice(0);
                            sel[0].elements.push(new(tree.Element)(el.combinator, '', el.index, el.currentFileInfo));
                        }
                        selectorsMultiplied.push(sel);
                    }
                    else {
                        // and the parent selectors
                        for (k = 0; k < context.length; k++) {
                            parentSel = context[k];
                            // We need to put the current selectors
                            // then join the last selector's elements on to the parents selectors

                            // our new selector path
                            newSelectorPath = [];
                            // selectors from the parent after the join
                            afterParentJoin = [];
                            newJoinedSelectorEmpty = true;

                            //construct the joined selector - if & is the first thing this will be empty,
                            // if not newJoinedSelector will be the last set of elements in the selector
                            if (sel.length > 0) {
                                newSelectorPath = sel.slice(0);
                                lastSelector = newSelectorPath.pop();
                                newJoinedSelector = selector.createDerived(lastSelector.elements.slice(0));
                                newJoinedSelectorEmpty = false;
                            }
                            else {
                                newJoinedSelector = selector.createDerived([]);
                            }

                            //put together the parent selectors after the join
                            if (parentSel.length > 1) {
                                afterParentJoin = afterParentJoin.concat(parentSel.slice(1));
                            }

                            if (parentSel.length > 0) {
                                newJoinedSelectorEmpty = false;

                                // join the elements so far with the first part of the parent
                                newJoinedSelector.elements.push(new(tree.Element)(el.combinator, parentSel[0].elements[0].value, el.index, el.currentFileInfo));
                                newJoinedSelector.elements = newJoinedSelector.elements.concat(parentSel[0].elements.slice(1));
                            }

                            if (!newJoinedSelectorEmpty) {
                                // now add the joined selector
                                newSelectorPath.push(newJoinedSelector);
                            }

                            // and the rest of the parent
                            newSelectorPath = newSelectorPath.concat(afterParentJoin);

                            // add that to our new set of selectors
                            selectorsMultiplied.push(newSelectorPath);
                        }
                    }
                }

                // our new selectors has been multiplied, so reset the state
                newSelectors = selectorsMultiplied;
                currentElements = [];
            }
        }

        // if we have any elements left over (e.g. .a& .b == .b)
        // add them on to all the current selectors
        if (currentElements.length > 0) {
            this.mergeElementsOnToSelectors(currentElements, newSelectors);
        }

        for (i = 0; i < newSelectors.length; i++) {
            if (newSelectors[i].length > 0) {
                paths.push(newSelectors[i]);
            }
        }
    },
    
    mergeElementsOnToSelectors: function(elements, selectors) {
        var i, sel;

        if (selectors.length === 0) {
            selectors.push([ new(tree.Selector)(elements) ]);
            return;
        }

        for (i = 0; i < selectors.length; i++) {
            sel = selectors[i];

            // if the previous thing in sel is a parent this needs to join on to it
            if (sel.length > 0) {
                sel[sel.length - 1] = sel[sel.length - 1].createDerived(sel[sel.length - 1].elements.concat(elements));
            }
            else {
                sel.push(new(tree.Selector)(elements));
            }
        }
    }
};
})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/keyword.js<|end_filename|>
(function (tree) {

tree.Keyword = function (value) { this.value = value; };
tree.Keyword.prototype = {
    type: "Keyword",
    eval: function () { return this; },
    genCSS: function (env, output) {
        if (this.value === '%') { throw { type: "Syntax", message: "Invalid % without number" }; }
        output.add(this.value);
    },
    toCSS: tree.toCSS,
    compare: function (other) {
        if (other instanceof tree.Keyword) {
            return other.value === this.value ? 0 : 1;
        } else {
            return -1;
        }
    }
};

tree.True = new(tree.Keyword)('true');
tree.False = new(tree.Keyword)('false');

})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/spdx/source/spdx.js<|end_filename|>
// spdx.js
// =======
// SPDX License Expression Syntax parser

// Validation
// ----------

// Require the generated parser.
var parser = require('./parser.generated.js').parser;

exports.parse = function(argument) {
  return parser.parse(argument);
};

var containsRepeatedSpace = /\s{2,}/;

exports.valid = function(argument) {
  if (
    argument.trim() !== argument ||
    containsRepeatedSpace.test(argument)
  ) {
    return false;
  }
  try {
    parser.parse(argument);
    return true;
  } catch (e) {
    // jison generates parsers that throw errors, while this function
    // mimics `semver.valid` by returning null.
    return null;
  }
};

// Comparison
// ----------

var ranges = require('./ranges.json');

var notALicenseIdentifier = ' is not a simple license identifier';

var rangeComparison = function(comparison) {
  return function(first, second) {
    var firstAST = exports.parse(first);
    if (!firstAST.hasOwnProperty('license')) {
      throw new Error('"' + first + '"' + notALicenseIdentifier);
    }
    var secondAST = exports.parse(second);
    if (!secondAST.hasOwnProperty('license')) {
      throw new Error('"' + second + '"' + notALicenseIdentifier);
    }
    return ranges.some(function(range) {
      var indexOfFirst = range.indexOf(firstAST.license);
      if (indexOfFirst < 0) {
        return false;
      }
      var indexOfSecond = range.indexOf(secondAST.license);
      if (indexOfSecond < 0) {
        return false;
      }
      return comparison(indexOfFirst, indexOfSecond);
    });
  };
};

exports.gt = rangeComparison(function(first, second) {
  return first > second;
});

exports.lt = rangeComparison(function(first, second) {
  return first < second;
});

exports.satisfies = (function() {
  var rangesAreCompatible = function(first, second) {
    return (
      first.license === second.license ||
      ranges.some(function(range) {
        return (
          range.indexOf(first.license) > -1 &&
          range.indexOf(second.license)
        );
      })
    );
  };

  var identifierInRange = function(identifier, range) {
    return (
      identifier.license === range.license ||
      exports.gt(identifier.license, range.license)
    );
  };

  var licensesAreCompatible = function(first, second) {
    if (first.exception !== second.exception) {
      return false;
    } else if (second.hasOwnProperty('license')) {
      if (second.hasOwnProperty('plus')) {
        if (first.hasOwnProperty('plus')) {
          // first+, second+
          return rangesAreCompatible(first, second);
        } else {
          // first, second+
          return identifierInRange(first, second);
        }
      } else {
        if (first.hasOwnProperty('plus')) {
          // first+, second
          return identifierInRange(second, first);
        } else {
          // first, second
          return first.license === second.license;
        }
      }
    }
  };

  var recurseLeftAndRight = function(first, second) {
    var firstConjunction = first.conjunction;
    if (firstConjunction === 'and') {
      return (
        recurse(first.left, second) &&
        recurse(first.right, second)
      );
    } else if (firstConjunction === 'or') {
      return (
        recurse(first.left, second) ||
        recurse(first.right, second)
      );
    }
  };

  var recurse = function(first, second) {
    if (first.hasOwnProperty('conjunction')) {
      return recurseLeftAndRight(first, second);
    } else if (second.hasOwnProperty('conjunction')) {
      return recurseLeftAndRight(second, first);
    } else {
      return licensesAreCompatible(first, second);
    }
  };

  return function(first, second) {
    return recurse(parser.parse(first), parser.parse(second));
  };
})();

// Reference Data
// --------------

// Require the same license and exception data used by the parser.
exports.licenses = require('spdx-license-ids');
exports.exceptions = require('./exceptions.json');

// Version Metadata
// ----------------

// The License Expression Syntax version
exports.specificationVersion = '2.0';

// This module's semantic version
exports.implementationVersion = '0.4.0';


<|start_filename|>project/target/node-modules/webjars/npm/lib/shrinkwrap.js<|end_filename|>
// emit JSON describing versions of all packages currently installed (for later
// use with shrinkwrap install)

module.exports = exports = shrinkwrap

var npm = require("./npm.js")
  , log = require("npmlog")
  , fs = require("fs")
  , writeFileAtomic = require("write-file-atomic")
  , path = require("path")
  , readJson = require("read-package-json")
  , sortedObject = require("sorted-object")

shrinkwrap.usage = "npm shrinkwrap"

function shrinkwrap (args, silent, cb) {
  if (typeof cb !== "function") cb = silent, silent = false

  if (args.length) {
    log.warn("shrinkwrap", "doesn't take positional args")
  }

  // https://github.com/npm/npm/issues/7641
  // introduced because `npm ls` can now show dev and prod depenednecy
  // trees separately
  if (npm.config.get("dev")) {
    npm.config.set("production", true)
  }
  npm.commands.ls([], true, function (er, _, pkginfo) {
    if (er) return cb(er)
    shrinkwrap_(pkginfo, silent, npm.config.get("dev"), cb)
  })
}

function shrinkwrap_ (pkginfo, silent, dev, cb) {
  if (pkginfo.problems) {
    return cb(new Error("Problems were encountered\n"
                       +"Please correct and try again.\n"
                       +pkginfo.problems.join("\n")))
  }

  if (!dev) {
    // remove dev deps unless the user does --dev
    readJson(path.resolve(npm.prefix, "package.json"), function (er, data) {
      if (er)
        return cb(er)
      if (data.devDependencies) {
        Object.keys(data.devDependencies).forEach(function (dep) {
          if (data.dependencies && data.dependencies[dep]) {
            // do not exclude the dev dependency if it's also listed as a dependency
            return
          }

          log.warn("shrinkwrap", "Excluding devDependency: %s", dep, data.dependencies)
          delete pkginfo.dependencies[dep]
        })
      }
      save(pkginfo, silent, cb)
    })
  } else {
    save(pkginfo, silent, cb)
  }
}


function save (pkginfo, silent, cb) {
  // copy the keys over in a well defined order
  // because javascript objects serialize arbitrarily
  pkginfo.dependencies = sortedObject(pkginfo.dependencies || {})
  var swdata
  try {
    swdata = JSON.stringify(pkginfo, null, 2) + "\n"
  } catch (er) {
    log.error("shrinkwrap", "Error converting package info to json")
    return cb(er)
  }

  var file = path.resolve(npm.prefix, "npm-shrinkwrap.json")

  writeFileAtomic(file, swdata, function (er) {
    if (er) return cb(er)
    if (silent) return cb(null, pkginfo)
    console.log("wrote npm-shrinkwrap.json")
    cb(null, pkginfo)
  })
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/fstream-npm/example/dir.js<|end_filename|>
// this will show what ends up in the fstream-npm package
var P = require('../')
var DW = require('fstream').DirWriter

var target = new DW({ Directory: true, type: 'Directory',
                      path: __dirname + '/output'})

function f (entry) {
  return entry.basename !== '.git'
}

P({ path: './', type: 'Directory', isDirectory: true, filter: f })
  .on('package', function (p) {
    console.error('package', p)
  })
  .on('ignoreFile', function (e) {
    console.error('ignoreFile', e)
  })
  .on('entry', function (e) {
    console.error(e.constructor.name, e.path)
  })
  .pipe(target)
  .on('end', function () {
    console.error('ended')
  })


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/lib/get.js<|end_filename|>
module.exports = get

var assert = require('assert')
var url = require('url')

/*
 * This is meant to be overridden in specific implementations if you
 * want specialized behavior for metadata (i.e. caching).
 */
function get (uri, params, cb) {
  assert(typeof uri === 'string', 'must pass registry URI to get')
  assert(params && typeof params === 'object', 'must pass params to get')
  assert(typeof cb === 'function', 'must pass callback to get')

  var parsed = url.parse(uri)
  assert(
    parsed.protocol === 'http:' || parsed.protocol === 'https:',
    'must have a URL that starts with http: or https:'
  )

  this.request(uri, params, cb)
}


<|start_filename|>project/target/node-modules/webjars/npm/lib/get.js<|end_filename|>

module.exports = get

get.usage = "npm get <key> <value> (See `npm config`)"

var npm = require("./npm.js")

get.completion = npm.commands.config.completion

function get (args, cb) {
  npm.commands.config(["get"].concat(args), cb)
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/normalize-git-url/normalize-git-url.js<|end_filename|>
var url = require("url")

module.exports = function normalize (u) {
  var parsed = url.parse(u, true)

  // git is so tricky!
  // if the path is like ssh://foo:22/some/path then it works, but
  // it needs the ssh://
  // If the path is like ssh://foo:some/path then it works, but
  // only if you remove the ssh://
  if (parsed.protocol) {
    parsed.protocol = parsed.protocol.replace(/^git\+/, "")

    // ssh paths that are scp-style urls don't need the ssh://
    parsed.pathname = parsed.pathname.replace(/^\/?:/, "/")
  }

  // figure out what we should check out.
  var checkout = parsed.hash && parsed.hash.substr(1) || "master"
  parsed.hash = ""

  u = url.format(parsed)
  return {
    url : u,
    branch : checkout
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/char-spinner/test/basic.js<|end_filename|>
var test = require('tap').test
var spinner = require('../spin.js')

test('does nothing when not a tty', function(t) {
  var int = spinner({
    stream: { write: function(c) {
      throw new Error('wrote something: ' + JSON.stringify(c))
    }, isTTY: false },
  })
  t.notOk(int)
  t.end()
})

test('write spinny stuff', function(t) {
  var output = ''
  var written = 0
  var expect = "b\u001b[0Gc\u001b[0Gd\u001b[0Ge\u001b[0Gf\u001b[0Gg\u001b[0Gh\u001b[0Gi\u001b[0Gj\u001b[0Gk\u001b[0Gl\u001b[0Gm\u001b[0Gn\u001b[0Go\u001b[0Gp\u001b[0Ga\u001b[0Gb\u001b[0Gc\u001b[0Gd\u001b[0Ge\u001b[0Gf\u001b[0Gg\u001b[0Gh\u001b[0Gi\u001b[0Gj\u001b[0Gk\u001b[0Gl\u001b[0Gm\u001b[0Gn\u001b[0Go\u001b[0Gp\u001b[0Ga\u001b[0Gb\u001b[0Gc\u001b[0Gd\u001b[0Ge\u001b[0Gf\u001b[0Gg\u001b[0Gh\u001b[0Gi\u001b[0Gj\u001b[0Gk\u001b[0Gl\u001b[0Gm\u001b[0Gn\u001b[0Go\u001b[0Gp\u001b[0Ga\u001b[0Gb\u001b[0Gc\u001b[0G"

  var int = spinner({
    interval: 0,
    string: 'abcdefghijklmnop',
    stream: {
      write: function(c) {
        output += c
        if (++written == 50) {
          t.equal(output, expect)
          clearInterval(int)
          t.end()
        }
      },
      isTTY: true
    },
    cleanup: false
  })
})


<|start_filename|>project/target/node-modules/webjars/npm/lib/cache/caching-client.js<|end_filename|>
module.exports = CachingRegistryClient

var path = require("path")
  , fs = require("graceful-fs")
  , url = require("url")
  , assert = require("assert")
  , inherits = require("util").inherits

var RegistryClient = require("npm-registry-client")
  , npm = require("../npm.js")
  , log = require("npmlog")
  , getCacheStat = require("./get-stat.js")
  , cacheFile = require("npm-cache-filename")
  , mkdirp = require("mkdirp")
  , rimraf = require("rimraf")
  , chownr = require("chownr")
  , writeFile = require("write-file-atomic")

function CachingRegistryClient (config) {
  RegistryClient.call(this, adaptConfig(config))

  this._mapToCache = cacheFile(config.get("cache"))

  // swizzle in our custom cache invalidation logic
  this._request = this.request
  this.request  = this._invalidatingRequest
  this.get      = get
}
inherits(CachingRegistryClient, RegistryClient)

CachingRegistryClient.prototype._invalidatingRequest = function (uri, params, cb) {
  var client = this
  this._request.call(this, uri, params, function () {
    var args = arguments

    var method = params.method
    if (method !== "HEAD" && method !== "GET") {
      var invalidated = client._mapToCache(uri)
      // invalidate cache
      //
      // This is irrelevant for commands that do etag / last-modified caching,
      // but ls and view also have a timed cache, so this keeps the user from
      // thinking that it didn't work when it did.
      // Note that failure is an acceptable option here, since the only
      // result will be a stale cache for some helper commands.
      log.verbose("request", "invalidating", invalidated, "on", method)
      return rimraf(invalidated, function () {
        cb.apply(undefined, args)
      })
    }

    cb.apply(undefined, args)
  })
}

function get (uri, params, cb) {
  assert(typeof uri === "string", "must pass registry URI to get")
  assert(params && typeof params === "object", "must pass params to get")
  assert(typeof cb === "function", "must pass callback to get")

  var parsed = url.parse(uri)
  assert(
    parsed.protocol === "http:" || parsed.protocol === "https:",
    "must have a URL that starts with http: or https:"
  )

  var cacheBase = cacheFile(npm.config.get("cache"))(uri)
  var cachePath = path.join(cacheBase, ".cache.json")

  // If the GET is part of a write operation (PUT or DELETE), then
  // skip past the cache entirely, but still save the results.
  if (uri.match(/\?write=true$/)) {
    log.verbose("get", "GET as part of write; not caching result")
    return get_.call(this, uri, cachePath, params, cb)
  }

  var client = this
  fs.stat(cachePath, function (er, stat) {
    if (!er) {
      fs.readFile(cachePath, function (er, data) {
        try {
          data = JSON.parse(data)
        }
        catch (ex) {
          data = null
        }

        params.stat = stat
        params.data = data

        get_.call(client, uri, cachePath, params, cb)
      })
    }
    else {
      get_.call(client, uri, cachePath, params, cb)
    }
  })
}

function get_ (uri, cachePath, params, cb) {
  var staleOk = params.staleOk === undefined ? false : params.staleOk
    , timeout = params.timeout === undefined ? -1 : params.timeout
    , data    = params.data
    , stat    = params.stat
    , etag
    , lastModified

  timeout = Math.min(timeout, npm.config.get("cache-max") || 0)
  timeout = Math.max(timeout, npm.config.get("cache-min") || -Infinity)
  if (process.env.COMP_CWORD !== undefined &&
      process.env.COMP_LINE  !== undefined &&
      process.env.COMP_POINT !== undefined) {
    timeout = Math.max(timeout, 60000)
  }

  if (data) {
    if (data._etag) etag = data._etag
    if (data._lastModified) lastModified = data._lastModified

    if (stat && timeout && timeout > 0) {
      if ((Date.now() - stat.mtime.getTime())/1000 < timeout) {
        log.verbose("get", uri, "not expired, no request")
        delete data._etag
        delete data._lastModified
        return cb(null, data, JSON.stringify(data), { statusCode : 304 })
      }

      if (staleOk) {
        log.verbose("get", uri, "staleOk, background update")
        delete data._etag
        delete data._lastModified
        process.nextTick(
          cb.bind(null, null, data, JSON.stringify(data), { statusCode : 304 } )
        )
        cb = function () {}
      }
    }
  }

  var options = {
    etag         : etag,
    lastModified : lastModified,
    follow       : params.follow,
    auth         : params.auth
  }
  this.request(uri, options, function (er, remoteData, raw, response) {
    // if we get an error talking to the registry, but we have it
    // from the cache, then just pretend we got it.
    if (er && cachePath && data && !data.error) {
      er = null
      response = { statusCode: 304 }
    }

    if (response) {
      log.silly("get", "cb", [response.statusCode, response.headers])
      if (response.statusCode === 304 && (etag || lastModified)) {
        remoteData = data
        log.verbose(etag ? "etag" : "lastModified", uri+" from cache")
      }
    }

    data = remoteData
    if (!data) er = er || new Error("failed to fetch from registry: " + uri)

    if (er) return cb(er, data, raw, response)

    saveToCache(cachePath, data, saved)

    // just give the write the old college try.  if it fails, whatever.
    function saved () {
      delete data._etag
      delete data._lastModified
      cb(er, data, raw, response)
    }

    function saveToCache (cachePath, data, saved) {
      log.verbose("get", "saving", data.name, "to", cachePath)
      getCacheStat(function (er, st) {
        mkdirp(path.dirname(cachePath), function (er, made) {
          if (er) return saved()

          writeFile(cachePath, JSON.stringify(data), function (er) {
            if (er) return saved()

            chownr(made || cachePath, st.uid, st.gid, saved)
          })
        })
      })
    }
  })
}

function adaptConfig (config) {
  return {
    proxy : {
      http         : config.get("proxy"),
      https        : config.get("https-proxy"),
      localAddress : config.get("local-address")
    },
    ssl : {
      certificate : config.get("cert"),
      key         : config.get("key"),
      ca          : config.get("ca"),
      strict      : config.get("strict-ssl")
    },
    retry : {
      retries    : config.get("fetch-retries"),
      factor     : config.get("fetch-retry-factor"),
      minTimeout : config.get("fetch-retry-mintimeout"),
      maxTimeout : config.get("fetch-retry-maxtimeout")
    },
    userAgent  : config.get("user-agent"),
    log        : log,
    defaultTag : config.get("tag"),
    couchToken : config.get("_token")
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/async-some/test/parameters.js<|end_filename|>
var test = require("tap").test

var some = require("../some.js")

var NOP = function () {}

test("some() called with bogus parameters", function (t) {
  t.throws(function () {
    some()
  }, "throws when called with no parameters")

  t.throws(function () {
    some(null, NOP, NOP)
  }, "throws when called with no list")

  t.throws(function () {
    some([], null, NOP)
  }, "throws when called with no predicate")

  t.throws(function () {
    some([], NOP, null)
  }, "throws when called with no callback")

  t.throws(function () {
    some({}, NOP, NOP)
  }, "throws when called with wrong list type")

  t.throws(function () {
    some([], "ham", NOP)
  }, "throws when called with wrong test type")

  t.throws(function () {
    some([], NOP, "ham")
  }, "throws when called with wrong test type")

  t.end()
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/sorted-object/lib/sorted-object.js<|end_filename|>
"use strict";

module.exports = function (input) {
    var output = Object.create(null);

    Object.keys(input).sort().forEach(function (key) {
        output[key] = input[key];
    });

    return output;
};


<|start_filename|>project/target/node-modules/webjars/npm/lib/stars.js<|end_filename|>
module.exports = stars

stars.usage = "npm stars [username]"

var npm = require("./npm.js")
  , log = require("npmlog")
  , mapToRegistry = require("./utils/map-to-registry.js")

function stars (args, cb) {
  npm.commands.whoami([], true, function (er, username) {
    var name = args.length === 1 ? args[0] : username

    if (er) {
      if (er.code === 'ENEEDAUTH' && !name) {
        var needAuth = new Error("'npm stars' on your own user account requires auth")
        needAuth.code = 'ENEEDAUTH'
        return cb(needAuth)
      }

      if (er.code !== 'ENEEDAUTH') return cb(er)
    }

    mapToRegistry("", npm.config, function (er, uri, auth) {
      if (er) return cb(er)

      var params = {
        username : name,
        auth     : auth
      }
      npm.registry.stars(uri, params, showstars)
    })
  })

  function showstars (er, data) {
    if (er) return cb(er)

    if (data.rows.length === 0) {
      log.warn("stars", "user has not starred any packages.")
    } else {
      data.rows.forEach(function(a) {
        console.log(a.value)
      })
    }
    cb()
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/lib/attempt.js<|end_filename|>
var retry = require('retry')

module.exports = attempt

function attempt (cb) {
  // Tuned to spread 3 attempts over about a minute.
  // See formula at <https://github.com/tim-kos/node-retry>.
  var operation = retry.operation(this.config.retry)

  var client = this
  operation.attempt(function (currentAttempt) {
    client.log.info(
      'attempt',
      'registry request try #' + currentAttempt +
        ' at ' + (new Date()).toLocaleTimeString()
    )

    cb(operation)
  })
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/init-package-json/example/init/basic-init.js<|end_filename|>
exports.flavor = prompt("what's your favorite flavor of ice cream buddy?", "I LIKE THEM ALL")

<|start_filename|>project/target/node-modules/webjars/npm/lib/xmas.js<|end_filename|>
// happy xmas
var log = require("npmlog")

module.exports = function (args, cb) {
var s = process.platform === "win32" ? " *" : " \u2605"
  , f = "\uFF0F"
  , b = "\uFF3C"
  , x = process.platform === "win32" ? " " : ""
  , o = [ "\u0069" , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020"
        , "\u0020", "\u0020", "\u0020", "\u0020", "\u0020", "\u0020"
        , "\u0020", "\u2E1B","\u2042","\u2E2E","&","@","\uFF61" ]
  , oc = [21,33,34,35,36,37]
  , l = "\u005e"

function w (s) { process.stderr.write(s) }

w("\n")
;(function T (H) {
  for (var i = 0; i < H; i ++) w(" ")
  w(x+"\033[33m"+s+"\n")
  var M = H * 2 - 1
  for (var L = 1; L <= H; L ++) {
    var O = L * 2 - 2
    var S = (M - O) / 2
    for (i = 0; i < S; i ++) w(" ")
    w(x+"\033[32m"+f)
    for (i = 0; i < O; i ++) w(
      "\033["+oc[Math.floor(Math.random()*oc.length)]+"m"+
      o[Math.floor(Math.random() * o.length)]
    )
    w(x+"\033[32m"+b+"\n")
  }
  w(" ")
  for (i = 1; i < H; i ++) w("\033[32m"+l)
  w("| "+x+" |")
  for (i = 1; i < H; i ++) w("\033[32m"+l)
  if (H > 10) {
    w("\n ")
    for (i = 1; i < H; i ++) w(" ")
    w("| "+x+" |")
    for (i = 1; i < H; i ++) w(" ")
  }
})(20)
w("\n\n")
log.heading = ''
log.addLevel('npm', 100000, log.headingStyle)
log.npm("loves you", "Happy Xmas, Noders!")
cb()
}
var dg=false
Object.defineProperty(module.exports, "usage", {get:function () {
  if (dg) module.exports([], function () {})
  dg = true
  return " "
}})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/request/node_modules/har-validator/src/index.js<|end_filename|>
'use strict'

var schemas = require('./schemas')
var ValidationError = require('./error')
var validator = require('is-my-json-valid')

var runner = function (schema, data, cb) {
  var validate = validator(schema, {
    greedy: true,
    verbose: true,
    schemas: schemas
  })

  var valid = false

  if (data !== undefined) {
    // execute is-my-json-valid
    valid = validate(data)
  }

  // callback?
  if (!cb) {
    return !validate.errors > 0
  } else {
    return cb(validate.errors ? new ValidationError(validate.errors) : null, valid)
  }

  return valid
}

module.exports = function (data, cb) {
  return runner(schemas.har, data, cb)
}

Object.keys(schemas).map(function (name) {
  module.exports[name] = function (data, cb) {
    return runner(schemas[name], data, cb)
  }
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/test/tag.js<|end_filename|>
var test = require('tap').test

var server = require('./lib/server.js')
var common = require('./lib/common.js')
var client = common.freshClient()

function nop () {}

var URI = 'http://localhost:1337/underscore'
var USERNAME = 'username'
var PASSWORD = <PASSWORD>%'
var EMAIL = '<EMAIL>'
var VERSION = '1.3.2'
var TAG = 'not-lodash'
var AUTH = {
  username: USERNAME,
  password: PASSWORD,
  email: EMAIL
}
var PARAMS = {
  tag: TAG,
  version: VERSION,
  auth: AUTH
}

test('tag call contract', function (t) {
  t.throws(function () {
    client.tag(undefined, AUTH, nop)
  }, 'requires a URI')

  t.throws(function () {
    client.tag([], AUTH, nop)
  }, 'requires URI to be a string')

  t.throws(function () {
    client.tag(URI, undefined, nop)
  }, 'requires params object')

  t.throws(function () {
    client.tag(URI, '', nop)
  }, 'params must be object')

  t.throws(function () {
    client.tag(URI, AUTH, undefined)
  }, 'requires callback')

  t.throws(function () {
    client.tag(URI, AUTH, 'callback')
  }, 'callback must be function')

  t.throws(
    function () {
      var params = { tag: TAG, auth: AUTH }
      client.tag(URI, params, nop)
    },
    { name: 'AssertionError', message: 'must pass version to tag' },
    'tag must include version'
  )

  t.throws(
    function () {
      var params = { version: VERSION, auth: AUTH }
      client.tag(URI, params, nop)
    },
    { name: 'AssertionError', message: 'must pass tag name to tag' },
    'tag must include name'
  )

  t.throws(
    function () {
      var params = { version: VERSION, tag: TAG }
      client.tag(URI, params, nop)
    },
    { name: 'AssertionError', message: 'must pass auth to tag' },
    'params must include auth'
  )

  t.end()
})

test('tag a package', function (t) {
  server.expect('PUT', '/underscore/not-lodash', function (req, res) {
    t.equal(req.method, 'PUT')

    var b = ''
    req.setEncoding('utf8')
    req.on('data', function (d) {
      b += d
    })

    req.on('end', function () {
      var updated = JSON.parse(b)

      t.deepEqual(updated, '1.3.2')

      res.statusCode = 201
      res.json({ tagged: true })
    })
  })

  client.tag(URI, PARAMS, function (error, data) {
    t.ifError(error, 'no errors')
    t.ok(data.tagged, 'was tagged')

    t.end()
  })
})


<|start_filename|>project/target/node-modules/webjars/less/lib/less/browser.js<|end_filename|>
//
// browser.js - client-side engine
//
/*global less, window, document, XMLHttpRequest, location */

var isFileProtocol = /^(file|chrome(-extension)?|resource|qrc|app):/.test(location.protocol);

less.env = less.env || (location.hostname == '127.0.0.1' ||
                        location.hostname == '0.0.0.0'   ||
                        location.hostname == 'localhost' ||
                        (location.port &&
                          location.port.length > 0)      ||
                        isFileProtocol                   ? 'development'
                                                         : 'production');

var logLevel = {
    debug: 3,
    info: 2,
    errors: 1,
    none: 0
};

// The amount of logging in the javascript console.
// 3 - Debug, information and errors
// 2 - Information and errors
// 1 - Errors
// 0 - None
// Defaults to 2
less.logLevel = typeof(less.logLevel) != 'undefined' ? less.logLevel : (less.env === 'development' ?  logLevel.debug : logLevel.errors);

// Load styles asynchronously (default: false)
//
// This is set to `false` by default, so that the body
// doesn't start loading before the stylesheets are parsed.
// Setting this to `true` can result in flickering.
//
less.async = less.async || false;
less.fileAsync = less.fileAsync || false;

// Interval between watch polls
less.poll = less.poll || (isFileProtocol ? 1000 : 1500);

//Setup user functions
if (less.functions) {
    for(var func in less.functions) {
        if (less.functions.hasOwnProperty(func)) {
            less.tree.functions[func] = less.functions[func];
        }
   }
}

var dumpLineNumbers = /!dumpLineNumbers:(comments|mediaquery|all)/.exec(location.hash);
if (dumpLineNumbers) {
    less.dumpLineNumbers = dumpLineNumbers[1];
}

var typePattern = /^text\/(x-)?less$/;
var cache = null;
var fileCache = {};

function log(str, level) {
    if (typeof(console) !== 'undefined' && less.logLevel >= level) {
        console.log('less: ' + str);
    }
}

function extractId(href) {
    return href.replace(/^[a-z-]+:\/+?[^\/]+/, '' )  // Remove protocol & domain
        .replace(/^\//,                 '' )  // Remove root /
        .replace(/\.[a-zA-Z]+$/,        '' )  // Remove simple extension
        .replace(/[^\.\w-]+/g,          '-')  // Replace illegal characters
        .replace(/\./g,                 ':'); // Replace dots with colons(for valid id)
}

function errorConsole(e, rootHref) {
    var template = '{line} {content}';
    var filename = e.filename || rootHref;
    var errors = [];
    var content = (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
        " in " + filename + " ";

    var errorline = function (e, i, classname) {
        if (e.extract[i] !== undefined) {
            errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
                .replace(/\{class\}/, classname)
                .replace(/\{content\}/, e.extract[i]));
        }
    };

    if (e.extract) {
        errorline(e, 0, '');
        errorline(e, 1, 'line');
        errorline(e, 2, '');
        content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':\n' +
            errors.join('\n');
    } else if (e.stack) {
        content += e.stack;
    }
    log(content, logLevel.errors);
}

function createCSS(styles, sheet, lastModified) {
    // Strip the query-string
    var href = sheet.href || '';

    // If there is no title set, use the filename, minus the extension
    var id = 'less:' + (sheet.title || extractId(href));

    // If this has already been inserted into the DOM, we may need to replace it
    var oldCss = document.getElementById(id);
    var keepOldCss = false;

    // Create a new stylesheet node for insertion or (if necessary) replacement
    var css = document.createElement('style');
    css.setAttribute('type', 'text/css');
    if (sheet.media) {
        css.setAttribute('media', sheet.media);
    }
    css.id = id;

    if (!css.styleSheet) {
        css.appendChild(document.createTextNode(styles));

        // If new contents match contents of oldCss, don't replace oldCss
        keepOldCss = (oldCss !== null && oldCss.childNodes.length > 0 && css.childNodes.length > 0 &&
            oldCss.firstChild.nodeValue === css.firstChild.nodeValue);
    }

    var head = document.getElementsByTagName('head')[0];

    // If there is no oldCss, just append; otherwise, only append if we need
    // to replace oldCss with an updated stylesheet
    if (oldCss === null || keepOldCss === false) {
        var nextEl = sheet && sheet.nextSibling || null;
        if (nextEl) {
            nextEl.parentNode.insertBefore(css, nextEl);
        } else {
            head.appendChild(css);
        }
    }
    if (oldCss && keepOldCss === false) {
        oldCss.parentNode.removeChild(oldCss);
    }

    // For IE.
    // This needs to happen *after* the style element is added to the DOM, otherwise IE 7 and 8 may crash.
    // See http://social.msdn.microsoft.com/Forums/en-US/7e081b65-878a-4c22-8e68-c10d39c2ed32/internet-explorer-crashes-appending-style-element-to-head
    if (css.styleSheet) {
        try {
            css.styleSheet.cssText = styles;
        } catch (e) {
            throw new(Error)("Couldn't reassign styleSheet.cssText.");
        }
    }

    // Don't update the local store if the file wasn't modified
    if (lastModified && cache) {
        log('saving ' + href + ' to cache.', logLevel.info);
        try {
            cache.setItem(href, styles);
            cache.setItem(href + ':timestamp', lastModified);
        } catch(e) {
            //TODO - could do with adding more robust error handling
            log('failed to save', logLevel.errors);
        }
    }
}

function postProcessCSS(styles) {
    if (less.postProcessor && typeof less.postProcessor === 'function') {
        styles = less.postProcessor.call(styles, styles) || styles;
    }
    return styles;
}

function errorHTML(e, rootHref) {
    var id = 'less-error-message:' + extractId(rootHref || "");
    var template = '<li><label>{line}</label><pre class="{class}">{content}</pre></li>';
    var elem = document.createElement('div'), timer, content, errors = [];
    var filename = e.filename || rootHref;
    var filenameNoPath = filename.match(/([^\/]+(\?.*)?)$/)[1];

    elem.id        = id;
    elem.className = "less-error-message";

    content = '<h3>'  + (e.type || "Syntax") + "Error: " + (e.message || 'There is an error in your .less file') +
        '</h3>' + '<p>in <a href="' + filename   + '">' + filenameNoPath + "</a> ";

    var errorline = function (e, i, classname) {
        if (e.extract[i] !== undefined) {
            errors.push(template.replace(/\{line\}/, (parseInt(e.line, 10) || 0) + (i - 1))
                .replace(/\{class\}/, classname)
                .replace(/\{content\}/, e.extract[i]));
        }
    };

    if (e.extract) {
        errorline(e, 0, '');
        errorline(e, 1, 'line');
        errorline(e, 2, '');
        content += 'on line ' + e.line + ', column ' + (e.column + 1) + ':</p>' +
            '<ul>' + errors.join('') + '</ul>';
    } else if (e.stack) {
        content += '<br/>' + e.stack.split('\n').slice(1).join('<br/>');
    }
    elem.innerHTML = content;

    // CSS for error messages
    createCSS([
        '.less-error-message ul, .less-error-message li {',
        'list-style-type: none;',
        'margin-right: 15px;',
        'padding: 4px 0;',
        'margin: 0;',
        '}',
        '.less-error-message label {',
        'font-size: 12px;',
        'margin-right: 15px;',
        'padding: 4px 0;',
        'color: #cc7777;',
        '}',
        '.less-error-message pre {',
        'color: #dd6666;',
        'padding: 4px 0;',
        'margin: 0;',
        'display: inline-block;',
        '}',
        '.less-error-message pre.line {',
        'color: #ff0000;',
        '}',
        '.less-error-message h3 {',
        'font-size: 20px;',
        'font-weight: bold;',
        'padding: 15px 0 5px 0;',
        'margin: 0;',
        '}',
        '.less-error-message a {',
        'color: #10a',
        '}',
        '.less-error-message .error {',
        'color: red;',
        'font-weight: bold;',
        'padding-bottom: 2px;',
        'border-bottom: 1px dashed red;',
        '}'
    ].join('\n'), { title: 'error-message' });

    elem.style.cssText = [
        "font-family: Arial, sans-serif",
        "border: 1px solid #e00",
        "background-color: #eee",
        "border-radius: 5px",
        "-webkit-border-radius: 5px",
        "-moz-border-radius: 5px",
        "color: #e00",
        "padding: 15px",
        "margin-bottom: 15px"
    ].join(';');

    if (less.env == 'development') {
        timer = setInterval(function () {
            if (document.body) {
                if (document.getElementById(id)) {
                    document.body.replaceChild(elem, document.getElementById(id));
                } else {
                    document.body.insertBefore(elem, document.body.firstChild);
                }
                clearInterval(timer);
            }
        }, 10);
    }
}

function error(e, rootHref) {
    if (!less.errorReporting || less.errorReporting === "html") {
        errorHTML(e, rootHref);
    } else if (less.errorReporting === "console") {
        errorConsole(e, rootHref);
    } else if (typeof less.errorReporting === 'function') {
        less.errorReporting("add", e, rootHref);
    }
}

function removeErrorHTML(path) {
    var node = document.getElementById('less-error-message:' + extractId(path));
    if (node) {
        node.parentNode.removeChild(node);
    }
}

function removeErrorConsole(path) {
    //no action
}

function removeError(path) {
    if (!less.errorReporting || less.errorReporting === "html") {
        removeErrorHTML(path);
    } else if (less.errorReporting === "console") {
        removeErrorConsole(path);
    } else if (typeof less.errorReporting === 'function') {
        less.errorReporting("remove", path);
    }
}

function loadStyles(modifyVars) {
    var styles = document.getElementsByTagName('style'),
        style;
    for (var i = 0; i < styles.length; i++) {
        style = styles[i];
        if (style.type.match(typePattern)) {
            var env = new less.tree.parseEnv(less),
                lessText = style.innerHTML || '';
            env.filename = document.location.href.replace(/#.*$/, '');

            if (modifyVars || less.globalVars) {
                env.useFileCache = true;
            }

            /*jshint loopfunc:true */
            // use closure to store current value of i
            var callback = (function(style) {
                return function (e, cssAST) {
                    if (e) {
                        return error(e, "inline");
                    }
                    var css = cssAST.toCSS(less);
                    style.type = 'text/css';
                    if (style.styleSheet) {
                        style.styleSheet.cssText = css;
                    } else {
                        style.innerHTML = css;
                    }
                };
            })(style);
            new(less.Parser)(env).parse(lessText, callback, {globalVars: less.globalVars, modifyVars: modifyVars});
        }
    }
}

function extractUrlParts(url, baseUrl) {
    // urlParts[1] = protocol&hostname || /
    // urlParts[2] = / if path relative to host base
    // urlParts[3] = directories
    // urlParts[4] = filename
    // urlParts[5] = parameters

    var urlPartsRegex = /^((?:[a-z-]+:)?\/+?(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/i,
        urlParts = url.match(urlPartsRegex),
        returner = {}, directories = [], i, baseUrlParts;

    if (!urlParts) {
        throw new Error("Could not parse sheet href - '"+url+"'");
    }

    // Stylesheets in IE don't always return the full path
    if (!urlParts[1] || urlParts[2]) {
        baseUrlParts = baseUrl.match(urlPartsRegex);
        if (!baseUrlParts) {
            throw new Error("Could not parse page url - '"+baseUrl+"'");
        }
        urlParts[1] = urlParts[1] || baseUrlParts[1] || "";
        if (!urlParts[2]) {
            urlParts[3] = baseUrlParts[3] + urlParts[3];
        }
    }

    if (urlParts[3]) {
        directories = urlParts[3].replace(/\\/g, "/").split("/");

        // extract out . before .. so .. doesn't absorb a non-directory
        for(i = 0; i < directories.length; i++) {
            if (directories[i] === ".") {
                directories.splice(i, 1);
                i -= 1;
            }
        }

        for(i = 0; i < directories.length; i++) {
            if (directories[i] === ".." && i > 0) {
                directories.splice(i-1, 2);
                i -= 2;
            }
        }
    }

    returner.hostPart = urlParts[1];
    returner.directories = directories;
    returner.path = urlParts[1] + directories.join("/");
    returner.fileUrl = returner.path + (urlParts[4] || "");
    returner.url = returner.fileUrl + (urlParts[5] || "");
    return returner;
}

function pathDiff(url, baseUrl) {
    // diff between two paths to create a relative path

    var urlParts = extractUrlParts(url),
        baseUrlParts = extractUrlParts(baseUrl),
        i, max, urlDirectories, baseUrlDirectories, diff = "";
    if (urlParts.hostPart !== baseUrlParts.hostPart) {
        return "";
    }
    max = Math.max(baseUrlParts.directories.length, urlParts.directories.length);
    for(i = 0; i < max; i++) {
        if (baseUrlParts.directories[i] !== urlParts.directories[i]) { break; }
    }
    baseUrlDirectories = baseUrlParts.directories.slice(i);
    urlDirectories = urlParts.directories.slice(i);
    for(i = 0; i < baseUrlDirectories.length-1; i++) {
        diff += "../";
    }
    for(i = 0; i < urlDirectories.length-1; i++) {
        diff += urlDirectories[i] + "/";
    }
    return diff;
}

function getXMLHttpRequest() {
    if (window.XMLHttpRequest && (window.location.protocol !== "file:" || !("ActiveXObject" in window))) {
        return new XMLHttpRequest();
    } else {
        try {
            /*global ActiveXObject */
            return new ActiveXObject("Microsoft.XMLHTTP");
        } catch (e) {
            log("browser doesn't support AJAX.", logLevel.errors);
            return null;
        }
    }
}

function doXHR(url, type, callback, errback) {
    var xhr = getXMLHttpRequest();
    var async = isFileProtocol ? less.fileAsync : less.async;

    if (typeof(xhr.overrideMimeType) === 'function') {
        xhr.overrideMimeType('text/css');
    }
    log("XHR: Getting '" + url + "'", logLevel.debug);
    xhr.open('GET', url, async);
    xhr.setRequestHeader('Accept', type || 'text/x-less, text/css; q=0.9, */*; q=0.5');
    xhr.send(null);

    function handleResponse(xhr, callback, errback) {
        if (xhr.status >= 200 && xhr.status < 300) {
            callback(xhr.responseText,
                xhr.getResponseHeader("Last-Modified"));
        } else if (typeof(errback) === 'function') {
            errback(xhr.status, url);
        }
    }

    if (isFileProtocol && !less.fileAsync) {
        if (xhr.status === 0 || (xhr.status >= 200 && xhr.status < 300)) {
            callback(xhr.responseText);
        } else {
            errback(xhr.status, url);
        }
    } else if (async) {
        xhr.onreadystatechange = function () {
            if (xhr.readyState == 4) {
                handleResponse(xhr, callback, errback);
            }
        };
    } else {
        handleResponse(xhr, callback, errback);
    }
}

function loadFile(originalHref, currentFileInfo, callback, env, modifyVars) {

    if (currentFileInfo && currentFileInfo.currentDirectory && !/^([A-Za-z-]+:)?\//.test(originalHref)) {
        originalHref = currentFileInfo.currentDirectory + originalHref;
    }

    // sheet may be set to the stylesheet for the initial load or a collection of properties including
    // some env variables for imports
    var hrefParts = extractUrlParts(originalHref, window.location.href);
    var href      = hrefParts.url;
    var newFileInfo = {
        currentDirectory: hrefParts.path,
        filename: href
    };

    if (currentFileInfo) {
        newFileInfo.entryPath = currentFileInfo.entryPath;
        newFileInfo.rootpath = currentFileInfo.rootpath;
        newFileInfo.rootFilename = currentFileInfo.rootFilename;
        newFileInfo.relativeUrls = currentFileInfo.relativeUrls;
    } else {
        newFileInfo.entryPath = hrefParts.path;
        newFileInfo.rootpath = less.rootpath || hrefParts.path;
        newFileInfo.rootFilename = href;
        newFileInfo.relativeUrls = env.relativeUrls;
    }

    if (newFileInfo.relativeUrls) {
        if (env.rootpath) {
            newFileInfo.rootpath = extractUrlParts(env.rootpath + pathDiff(hrefParts.path, newFileInfo.entryPath)).path;
        } else {
            newFileInfo.rootpath = hrefParts.path;
        }
    }

    if (env.useFileCache && fileCache[href]) {
        try {
            var lessText = fileCache[href];
            callback(null, lessText, href, newFileInfo, { lastModified: new Date() });
        } catch (e) {
            callback(e, null, href);
        }
        return;
    }

    doXHR(href, env.mime, function (data, lastModified) {
        // per file cache
        fileCache[href] = data;

        // Use remote copy (re-parse)
        try {
            callback(null, data, href, newFileInfo, { lastModified: lastModified });
        } catch (e) {
            callback(e, null, href);
        }
    }, function (status, url) {
        callback({ type: 'File', message: "'" + url + "' wasn't found (" + status + ")" }, null, href);
    });
}

function loadStyleSheet(sheet, callback, reload, remaining, modifyVars) {

    var env = new less.tree.parseEnv(less);
    env.mime = sheet.type;

    if (modifyVars || less.globalVars) {
        env.useFileCache = true;
    }

    loadFile(sheet.href, null, function(e, data, path, newFileInfo, webInfo) {

        if (webInfo) {
            webInfo.remaining = remaining;

            var css       = cache && cache.getItem(path),
                timestamp = cache && cache.getItem(path + ':timestamp');

            if (!reload && timestamp && webInfo.lastModified &&
                (new(Date)(webInfo.lastModified).valueOf() ===
                    new(Date)(timestamp).valueOf())) {
                // Use local copy
                createCSS(css, sheet);
                webInfo.local = true;
                callback(null, null, data, sheet, webInfo, path);
                return;
            }
        }

        //TODO add tests around how this behaves when reloading
        removeError(path);

        if (data) {
            env.currentFileInfo = newFileInfo;
            new(less.Parser)(env).parse(data, function (e, root) {
                if (e) { return callback(e, null, null, sheet); }
                try {
                    callback(e, root, data, sheet, webInfo, path);
                } catch (e) {
                    callback(e, null, null, sheet);
                }
            }, {modifyVars: modifyVars, globalVars: less.globalVars});
        } else {
            callback(e, null, null, sheet, webInfo, path);
        }
    }, env, modifyVars);
}

function loadStyleSheets(callback, reload, modifyVars) {
    for (var i = 0; i < less.sheets.length; i++) {
        loadStyleSheet(less.sheets[i], callback, reload, less.sheets.length - (i + 1), modifyVars);
    }
}

function initRunningMode(){
    if (less.env === 'development') {
        less.optimization = 0;
        less.watchTimer = setInterval(function () {
            if (less.watchMode) {
                loadStyleSheets(function (e, root, _, sheet, env) {
                    if (e) {
                        error(e, sheet.href);
                    } else if (root) {
                        var styles = root.toCSS(less);
                        styles = postProcessCSS(styles);
                        createCSS(styles, sheet, env.lastModified);
                    }
                });
            }
        }, less.poll);
    } else {
        less.optimization = 3;
    }
}



//
// Watch mode
//
less.watch   = function () {
    if (!less.watchMode ){
        less.env = 'development';
         initRunningMode();
    }
    this.watchMode = true;
    return true;
};

less.unwatch = function () {clearInterval(less.watchTimer); this.watchMode = false; return false; };

if (/!watch/.test(location.hash)) {
    less.watch();
}

if (less.env != 'development') {
    try {
        cache = (typeof(window.localStorage) === 'undefined') ? null : window.localStorage;
    } catch (_) {}
}

//
// Get all <link> tags with the 'rel' attribute set to "stylesheet/less"
//
var links = document.getElementsByTagName('link');

less.sheets = [];

for (var i = 0; i < links.length; i++) {
    if (links[i].rel === 'stylesheet/less' || (links[i].rel.match(/stylesheet/) &&
       (links[i].type.match(typePattern)))) {
        less.sheets.push(links[i]);
    }
}

//
// With this function, it's possible to alter variables and re-render
// CSS without reloading less-files
//
less.modifyVars = function(record) {
    less.refresh(false, record);
};

less.refresh = function (reload, modifyVars) {
    var startTime, endTime;
    startTime = endTime = new Date();

    loadStyleSheets(function (e, root, _, sheet, env) {
        if (e) {
            return error(e, sheet.href);
        }
        if (env.local) {
            log("loading " + sheet.href + " from cache.", logLevel.info);
        } else {
            log("parsed " + sheet.href + " successfully.", logLevel.debug);
            var styles = root.toCSS(less);
            styles = postProcessCSS(styles);
            createCSS(styles, sheet, env.lastModified);
        }
        log("css for " + sheet.href + " generated in " + (new Date() - endTime) + 'ms', logLevel.info);
        if (env.remaining === 0) {
            log("less has finished. css generated in " + (new Date() - startTime) + 'ms', logLevel.info);
        }
        endTime = new Date();
    }, reload, modifyVars);

    loadStyles(modifyVars);
};

less.refreshStyles = loadStyles;

less.Parser.fileLoader = loadFile;

less.refresh(less.env === 'development');


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/async-some/some.js<|end_filename|>
var assert     = require("assert")
var dezalgoify = require("dezalgo")

module.exports = some

/**
 * short-circuited async Array.prototype.some implementation
 *
 * Serially evaluates a list of values from a JS array or arraylike
 * against an asynchronous predicate, terminating on the first truthy
 * value. If the predicate encounters an error, pass it to the completion
 * callback. Otherwise, pass the truthy value passed by the predicate, or
 * `false` if no truthy value was passed.
 */
function some (list, test, cb) {
  assert("length" in list, "array must be arraylike")
  assert.equal(typeof test, "function", "predicate must be callable")
  assert.equal(typeof cb, "function", "callback must be callable")

  var array   = slice(list)
    , index   = 0
    , length  = array.length
    , hecomes = dezalgoify(cb)

  map()

  function map () {
    if (index >= length) return hecomes(null, false)

    test(array[index], reduce)
  }

  function reduce (er, result) {
    if (er) return hecomes(er, false)
    if (result) return hecomes(null, result)

    index++
    map()
  }
}

// Array.prototype.slice on arguments arraylike is expensive
function slice(args) {
  var l = args.length, a = [], i
  for (i = 0; i < l; i++) a[i] = args[i]
  return a
}


<|start_filename|>project/target/node-modules/webjars/npm/lib/cache/update-index.js<|end_filename|>
module.exports = updateIndex

var fs = require('graceful-fs')
var assert = require('assert')
var path = require('path')
var mkdir = require('mkdirp')
var chownr = require('chownr')
var npm = require('../npm.js')
var log = require('npmlog')
var cacheFile = require('npm-cache-filename')
var getCacheStat = require('./get-stat.js')
var mapToRegistry = require('../utils/map-to-registry.js')

/* /-/all is special.
 * It uses timestamp-based caching and partial updates,
 * because it is a monster.
 */
function updateIndex (staleness, cb) {
  assert(typeof cb === 'function', 'must pass callback to updateIndex')

  mapToRegistry('-/all', npm.config, function (er, uri, auth) {
    if (er) return cb(er)

    var params = {
      timeout: staleness,
      follow: true,
      staleOk: true,
      auth: auth
    }
    var cacheBase = cacheFile(npm.config.get('cache'))(uri)
    var cachePath = path.join(cacheBase, '.cache.json')
    log.info('updateIndex', cachePath)

    getCacheStat(function (er, st) {
      if (er) return cb(er)

      mkdir(cacheBase, function (er, made) {
        if (er) return cb(er)

        fs.readFile(cachePath, function (er, data) {
          if (er) {
            log.warn('', 'Building the local index for the first time, please be patient')
            return updateIndex_(uri, params, {}, cachePath, cb)
          }

          chownr(made || cachePath, st.uid, st.gid, function (er) {
            if (er) return cb(er)

            try {
              data = JSON.parse(data)
            } catch (ex) {
              fs.writeFile(cachePath, '{}', function (er) {
                if (er) return cb(new Error('Broken cache.'))

                log.warn('', 'Building the local index for the first time, please be patient')
                return updateIndex_(uri, params, {}, cachePath, cb)
              })
            }

            var t = +data._updated || 0
            // use the cache and update in the background if it's not too old
            if (Date.now() - t < 60000) {
              cb(null, data)
              cb = function () {}
            }

            if (t === 0) {
              log.warn('', 'Building the local index for the first time, please be patient')
            } else {
              log.verbose('updateIndex', 'Cached search data present with timestamp', t)
              uri += '/since?stale=update_after&startkey=' + t
            }
            updateIndex_(uri, params, data, cachePath, cb)
          })
        })
      })
    })
  })
}

function updateIndex_ (all, params, data, cachePath, cb) {
  log.silly('update-index', 'fetching', all)
  npm.registry.request(all, params, function (er, updates, _, res) {
    if (er) return cb(er, data)

    var headers = res.headers
    var updated = updates._updated || Date.parse(headers.date)

    Object.keys(updates).forEach(function (p) { data[p] = updates[p] })

    data._updated = updated
    getCacheStat(function (er, st) {
      if (er) return cb(er)

      fs.writeFile(cachePath, JSON.stringify(data), function (er) {
        delete data._updated
        if (er) return cb(er)
        chownr(cachePath, st.uid, st.gid, function (er) {
          cb(er, data)
        })
      })
    })
  })
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/fstream/examples/symlink-write.js<|end_filename|>
var fstream = require('../fstream.js')
var notOpen = false

fstream
  .Writer({
    path: 'path/to/symlink',
    linkpath: './file',
    isSymbolicLink: true,
    mode: '0755' // octal strings supported
  })
  .on('close', function () {
    notOpen = true
    var fs = require('fs')
    var s = fs.lstatSync('path/to/symlink')
    var isSym = s.isSymbolicLink()
    console.log((isSym ? '' : 'not ') + 'ok 1 should be symlink')
    var t = fs.readlinkSync('path/to/symlink')
    var isTarget = t === './file'
    console.log((isTarget ? '' : 'not ') + 'ok 2 should link to ./file')
  })
  .end()

process.on('exit', function () {
  console.log((notOpen ? '' : 'not ') + 'ok 3 should be closed')
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/cmd-shim/test/00-setup.js<|end_filename|>
var test = require('tap').test
var mkdirp = require('mkdirp')
var fs = require('fs')
var path = require('path')
var fixtures = path.resolve(__dirname, 'fixtures')

var froms = {
  'from.exe': 'exe',
  'from.env': '#!/usr/bin/env node\nconsole.log(/hi/)\n',
  'from.env.args': '#!/usr/bin/env node --expose_gc\ngc()\n',
  'from.sh': '#!/usr/bin/sh\necho hi\n',
  'from.sh.args': '#!/usr/bin/sh -x\necho hi\n'
}

var cmdShim = require('../')

test('create fixture', function (t) {
  mkdirp(fixtures, function (er) {
    if (er)
      throw er
    t.pass('made dir')
    Object.keys(froms).forEach(function (f) {
      t.test('write ' + f, function (t) {
        fs.writeFile(path.resolve(fixtures, f), froms[f], function (er) {
          if (er)
            throw er
          t.pass('wrote ' + f)
          t.end()
        })
      })
    })
    t.end()
  })
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/normalize-package-data/lib/core_module_names.json<|end_filename|>
[
"http",
"events",
"util",
"domain",
"cluster",
"buffer",
"stream",
"crypto",
"tls",
"fs",
"string_decoder",
"path",
"net",
"dgram",
"dns",
"https",
"url",
"punycode",
"readline",
"repl",
"vm",
"child_process",
"assert",
"zlib",
"tty",
"os",
"querystring"
]


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/negative.js<|end_filename|>
(function (tree) {

tree.Negative = function (node) {
    this.value = node;
};
tree.Negative.prototype = {
    type: "Negative",
    accept: function (visitor) {
        this.value = visitor.visit(this.value);
    },
    genCSS: function (env, output) {
        output.add('-');
        this.value.genCSS(env, output);
    },
    toCSS: tree.toCSS,
    eval: function (env) {
        if (env.isMathOn()) {
            return (new(tree.Operation)('*', [new(tree.Dimension)(-1), this.value])).eval(env);
        }
        return new(tree.Negative)(this.value.eval(env));
    }
};

})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/npm/lib/utils/gently-rm.js<|end_filename|>
// only remove the thing if it's a symlink into a specific folder.
// This is a very common use-case of npm's, but not so common elsewhere.

module.exports = gentlyRm

var npm = require('../npm.js')
var log = require('npmlog')
var resolve = require('path').resolve
var dirname = require('path').dirname
var lstat = require('graceful-fs').lstat
var readlink = require('graceful-fs').readlink
var isInside = require('path-is-inside')
var vacuum = require('fs-vacuum')
var some = require('async-some')
var asyncMap = require('slide').asyncMap
var normalize = require('path').normalize

function gentlyRm (target, gently, base, cb) {
  if (!cb) {
    cb = base
    base = undefined
  }

  if (!cb) {
    cb = gently
    gently = false
  }

  log.silly(
    'gentlyRm',
    target,
    'is being', gently ? 'gently removed' : 'purged',
    base ? 'from base ' + base : ''
  )

  // never rm the root, prefix, or bin dirs
  //
  // globals included because of `npm link` -- as far as the package requesting
  // the link is concerned, the linked package is always installed globally
  var prefixes = [
    npm.prefix,
    npm.globalPrefix,
    npm.dir,
    npm.root,
    npm.globalDir,
    npm.bin,
    npm.globalBin
  ]

  var resolved = normalize(resolve(npm.prefix, target))
  if (prefixes.indexOf(resolved) !== -1) {
    log.verbose('gentlyRm', resolved, "is part of npm and can't be removed")
    return cb(new Error('May not delete: ' + resolved))
  }

  var options = { log: log.silly.bind(log, 'vacuum-fs') }
  if (npm.config.get('force') || !gently) options.purge = true
  if (base) options.base = normalize(resolve(npm.prefix, base))

  if (!gently) {
    log.verbose('gentlyRm', "don't care about contents; nuking", resolved)
    return vacuum(resolved, options, cb)
  }

  var parent = options.base = normalize(base ? resolve(npm.prefix, base) : npm.prefix)

  // is the parent directory managed by npm?
  log.silly('gentlyRm', 'verifying', parent, 'is an npm working directory')
  some(prefixes, isManaged(parent), function (er, matched) {
    if (er) return cb(er)

    if (!matched) {
      log.error('gentlyRm', 'containing path', parent, "isn't under npm's control")
      return clobberFail(resolved, parent, cb)
    }
    log.silly('gentlyRm', 'containing path', parent, "is under npm's control, in", matched)

    // is the target directly contained within the (now known to be
    // managed) parent?
    if (isInside(resolved, parent)) {
      log.silly('gentlyRm', 'deletion target', resolved, 'is under', parent)
      log.verbose('gentlyRm', 'vacuuming from', resolved, 'up to', parent)
      return vacuum(resolved, options, cb)
    }
    log.silly('gentlyRm', resolved, 'is not under', parent)

    // the target isn't directly within the parent, but is it itself managed?
    log.silly('gentlyRm', 'verifying', resolved, 'is an npm working directory')
    some(prefixes, isManaged(resolved), function (er, matched) {
      if (er) return cb(er)

      if (matched) {
        log.silly('gentlyRm', resolved, "is under npm's control, in", matched)
        options.base = matched
        log.verbose('gentlyRm', 'removing', resolved, 'with base', options.base)
        return vacuum(resolved, options, cb)
      }
      log.verbose('gentlyRm', resolved, "is not under npm's control")

      // the target isn't managed directly, but maybe it's a link...
      log.silly('gentlyRm', 'checking to see if', resolved, 'is a link')
      lstat(resolved, function (er, stat) {
        if (er) {
          // race conditions are common when unbuilding
          if (er.code === 'ENOENT') return cb(null)
          return cb(er)
        }

        if (!stat.isSymbolicLink()) {
          log.error('gentlyRm', resolved, 'is outside', parent, 'and not a link')
          return clobberFail(resolved, parent, cb)
        }

        // ...and maybe the link source, when read...
        log.silly('gentlyRm', resolved, 'is a link')
        readlink(resolved, function (er, link) {
          if (er) {
            // race conditions are common when unbuilding
            if (er.code === 'ENOENT') return cb(null)
            return cb(er)
          }

          // ...is inside the managed parent
          var source = resolve(dirname(resolved), link)
          if (isInside(source, parent)) {
            log.silly('gentlyRm', source, 'symlink target', resolved, 'is inside', parent)
            log.verbose('gentlyRm', 'vacuuming', resolved)
            return vacuum(resolved, options, cb)
          }

          log.error('gentlyRm', source, 'symlink target', resolved, 'is not controlled by npm', parent)
          return clobberFail(target, parent, cb)
        })
      })
    })
  })
}

var resolvedPaths = {}
function isManaged (target) {
  return function predicate (path, cb) {
    if (!path) {
      log.verbose('isManaged', 'no path passed for target', target)
      return cb(null, false)
    }

    asyncMap([path, target], resolveSymlink, function (er, results) {
      if (er) {
        if (er.code === 'ENOENT') return cb(null, false)

        return cb(er)
      }

      var path = results[0]
      var target = results[1]
      var inside = isInside(target, path)
      if (!inside) log.silly('isManaged', target, 'is not inside', path)

      return cb(null, inside && path)
    })
  }

  function resolveSymlink (toResolve, cb) {
    var resolved = resolve(npm.prefix, toResolve)

    // if the path has already been memoized, return immediately
    var cached = resolvedPaths[resolved]
    if (cached) return cb(null, cached)

    // otherwise, check the path
    lstat(resolved, function (er, stat) {
      if (er) return cb(er)

      // if it's not a link, cache & return the path itself
      if (!stat.isSymbolicLink()) {
        resolvedPaths[resolved] = resolved
        return cb(null, resolved)
      }

      // otherwise, cache & return the link's source
      readlink(resolved, function (er, source) {
        if (er) return cb(er)

        resolved = resolve(resolved, source)
        resolvedPaths[resolved] = resolved
        cb(null, resolved)
      })
    })
  }
}

function clobberFail (target, root, cb) {
  var er = new Error('Refusing to delete: ' + target + ' not in ' + root)
  er.code = 'EEXIST'
  er.path = target
  return cb(er)
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/async-some/test/simple.js<|end_filename|>
var test = require("tap").test

var some = require("../some.js")

test("some() doesn't find anything asynchronously", function (t) {
  some(["a", "b", "c", "d", "e", "f", "g"], predicate, function (error, match) {
    t.ifError(error, "ran successfully")

    t.notOk(match, "nothing to find, so nothing found")

    t.end()
  })

  function predicate(value, cb) {
    // dezalgo ensures it's safe to not do this, but just in case
    setTimeout(function () { cb(null, value > "j" && value) })
  }
})

test("some() doesn't find anything synchronously", function (t) {
  some(["a", "b", "c", "d", "e", "f", "g"], predicate, function (error, match) {
    t.ifError(error, "ran successfully")

    t.notOk(match, "nothing to find, so nothing found")

    t.end()
  })

  function predicate(value, cb) {
    cb(null, value > "j" && value)
  }
})

test("some() doesn't find anything asynchronously", function (t) {
  some(["a", "b", "c", "d", "e", "f", "g"], predicate, function (error, match) {
    t.ifError(error, "ran successfully")

    t.equals(match, "d", "found expected element")

    t.end()
  })

  function predicate(value, cb) {
    setTimeout(function () { cb(null, value > "c" && value) })
  }
})

test("some() doesn't find anything synchronously", function (t) {
  some(["a", "b", "c", "d", "e", "f", "g"], predicate, function (error, match) {
    t.ifError(error, "ran successfully")

    t.equals(match, "d", "found expected")

    t.end()
  })

  function predicate(value, cb) {
    cb(null, value > "c" && value)
  }
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/spdx/source/exceptions.json<|end_filename|>
[
  "Autoconf-exception-2.0",
  "Autoconf-exception-3.0",
  "Bison-exception-2.2",
  "Classpath-exception-2.0",
  "eCos-exception-2.0",
  "Font-exception-2.0",
  "GCC-exception-2.0",
  "GCC-exception-3.1",
  "WxWindows-exception-3.1"
]


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_document.js<|end_filename|>
var assert = require('assert')
var create = require('../lib/document').Document
var jju = require('..')

var str = '{ x\r\n:\n1, y: {"..z.": 123, t: null, s:"123", a:[ 1,2,{x:3},] }}\n'
var d = create(str)
assert.equal(d + '', str)
assert.deepEqual(d.get(''), {x:1,y:{'..z.':123,t:null,s:'123',a:[1,2,{x:3}]}})
assert.deepEqual(d.get('x'), 1)
assert.deepEqual(d.get('x.x'), undefined)
assert.deepEqual(d.get('x.x.x.x'), undefined)
assert.strictEqual(d.get('y.x'), undefined)
assert.deepEqual(d.get('y.s'), '123')
assert.strictEqual(d.get('y.t'), null)
assert.strictEqual(d.get('y.t.x'), undefined)
assert.equal(d.has(''), true)
assert.equal(d.has('x'), true)
assert.equal(d.has('x.x'), false)
assert.equal(d.has('x.x.x.x'), false)
assert.equal(d.has('y.x'), false)
assert.equal(d.has('y'), true)
assert.equal(d.has('y.s'), true)
assert.equal(d.has('y.t'), true)
assert.equal(d.has('a'), false)

// arrays
assert.deepEqual(d.get('y.a'), [1,2,{x:3}])
assert.deepEqual(d.get('y.a.0'), 1)
assert.deepEqual(d.get('y.a.2.x'), 3)
assert.deepEqual(d.get('y.a.10'), undefined)
assert.deepEqual(d.has('y.a.0'), true)
assert.deepEqual(d.has('y.a.10'), false)
assert.deepEqual(d.get('y.a.2'), {x:3})
assert.deepEqual(d.get('y.a.-1'), undefined)

// controversial
assert.strictEqual(d.get('y.s.0'), undefined)
assert.equal(d.has('y.s.0'), false)

// paths
assert.deepEqual(d.get([]), {x:1,y:{'..z.':123,t:null,s:'123',a:[1,2,{x:3}]}})
assert.strictEqual(d.has([]), true)
assert.strictEqual(d.get(['y','..z.']), 123)
assert.strictEqual(d.has(['y','..z.']), true)
assert.deepEqual(d.get(['y','a',2,'x']), 3)
assert.deepEqual(create('[1]').set(0, 4).get(''), [4])
assert.deepEqual(create('[1]').set(1, 4).get(''), [1,4])
assert.deepEqual(create('[1]').has(0), true)
assert.deepEqual(create('[1]').has(1), false)
assert.deepEqual(create('[1]').get(0), 1)

// invalid paths
assert.throws(function() { create('[1]').set(null, 4) }, /invalid path type/i)
assert.throws(function() { create('[1]').set({}, 4) }, /invalid path type/i)
assert.throws(function() { create('[1]').set(/./, 4) }, /invalid path type/i)
assert.throws(function() { create('[1]').set(function(){}, 4) }, /invalid path type/i)
assert.throws(function() { create('[1]').set(false, 4) }, /invalid path type/i)
assert.throws(function() { create('[1]').set(undefined, 4) }, /invalid path type/i)

// set root
assert.strictEqual(create(str).set('', 4).get(''), 4)
assert.strictEqual(create(str).set('', null).get(''), null)
assert.strictEqual(create(str).set('', {x:4}).get('x'), 4)
assert.deepEqual(create(str).set('', [1,2,3]).get(''), [1,2,3])
assert.strictEqual(create('1').set('', 4).get(''), 4)
assert.strictEqual(create('null').set('', 4).get(''), 4)
assert.strictEqual(create('[]').set('', 4).get(''), 4)
assert.strictEqual(create('{}').set('', 4).get(''), 4)

// set 1st level
assert.deepEqual(create('{}').set('x', 4).get('x'), 4)
assert.deepEqual(create('{a:{b:[]}}').set('a.b.0', 4).get('a'), {b:[4]})
//assert.deepEqual(create('1').set('x', 4).get('x'), 4)
//assert.deepEqual(create('null').set('x', 4).get('x'), 4)

// array: boundaries
assert.strictEqual(create('[]').set('0', 4).get('0'), 4)
assert.strictEqual(create('[1,2,3]').set('2', 4).get('2'), 4)
assert.strictEqual(create('[1,2,3]').set('3', 4).get('3'), 4)

// various error cases
assert.throws(function() { create('1').set('x', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('null').set('x', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('[]').set('x', 4) }, /set key .* of an array/)
assert.throws(function() { create('""').set('x', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('{}').set('x.x.x', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('1').set('1', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('null').set('1', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('""').set('1', 4) }, /set key .* of an non-object/)
assert.throws(function() { create('[]').set('-1', 4) }, /set key .* of an array/)
assert.throws(function() { create('[]').set('1', 4) }, /set key .* out of bounds/)
assert.throws(function() { create('[1,2,3]').set('4', 4) }, /set key .* out of bounds/)
assert.throws(function() { create('{a:{b:[]}}').set('a.b.x', 4) }, /set key .* of an array/)

// unsetting stuff
assert.throws(function() { create('[]').unset('') }, /can't remove root document/)

// arrays: handling spaces correctly
assert.equal(create("[]").set(0,{})+"", '[{}]')
assert.equal(create("[0]").set(1,{})+"", '[0,{}]')
assert.equal(create("[0,]").set(1,{})+"", '[0,{},]')
assert.equal(create("[    ]").set(0,{})+"", '[{}    ]')
assert.equal(create("[ 0  ,  ]").set(1,{})+"", '[ 0  , {},  ]')
assert.equal(create("[ 0   ]").set(1,{})+"", '[ 0, {}   ]')
assert.equal(create("{}").set('y',{})+"", '{"y":{}}')
assert.equal(create("{x:1}").set('y',{})+"", '{x:1,y:{}}')
assert.equal(create("{x:1,}").set('y',{})+"", '{x:1,y:{},}')
assert.equal(create("{    }").set('y',{})+"", '{"y":{}    }')
assert.equal(create("{ x:1  ,  }").set('y',{})+"", '{ x:1  , y:{},  }')
assert.equal(create("{ x:1   }").set('y',{})+"", '{ x:1, y:{}   }')

// deleting elements
assert.throws(function() { create('[]').unset('0') }, /unset key .* out of bounds/)
assert.throws(function() { create('[1,2]').unset('2') }, /unset key .* out of bounds/)
assert.throws(function() { create('[1,2,3]').unset('0') }, /in the middle of an array/)

// CommonJS assert spec is "awesome"
assert.deepEqual(create('[1,2]').unset('1').get(''), [1])
assert.deepEqual(create('[1,2]').unset('1').get('').length, 1)
assert.deepEqual(create('[1,2,3]').unset('2').unset('1').get(''), [1])
assert.deepEqual(create('[1,2,3]').unset('2').unset('1').get('').length, 1)
assert.deepEqual(create('[1]').unset('0').get(''), [])
assert.deepEqual(create('[1]').unset('0').get('').length, 0)

assert.deepEqual(create('{x:{y:"z"}, z:4}').unset('x').get(''), {z:4})
assert.throws(function() { create('[1,2]').unset('') }, /root/)

// getting crazy
//assert.deepEqual(create(str).set('a.b.c.d.e', 1).get('a'), {b:{c:{d:{e:1}}}})

// update: arrays
assert.deepEqual(create("[1]").update([2,3])+"", '[2,3]')
assert.deepEqual(create("[1]").update([2,3,4])+"", '[2,3,4]')
assert.deepEqual(create("[]").update([2])+"", '[2]')
assert.deepEqual(create("[2]").update([])+"", '[]')
assert.deepEqual(create("[2,3,4]").update([2,3])+"", '[2,3]')
assert.deepEqual(create("[2,3,4]").update([])+"", '[]')
assert.deepEqual(create("[]").update([2,3,4])+"", '[2,3,4]')
assert.deepEqual(create(" /*zz*/ [ 2 , 3 , 4 ] /*xx*/ ").update([])+"", ' /*zz*/ [    ] /*xx*/ ')
assert.deepEqual(create(" /*zz*/ [ ] /*xx*/ ").update([2,3,4])+"", ' /*zz*/ [2,3,4 ] /*xx*/ ')

// update: objects
assert.deepEqual(create("{x:1}").update({x:1,y:2,z:3})+"", '{x:1,y:2,z:3}')
assert.deepEqual(create("{x:1}").update({x:2,z:3,t:4})+"", '{x:2,z:3,t:4}')
assert.deepEqual(create("{}").update({x:1,y:2})+"", '{"x":1,"y":2}')
assert.deepEqual(create("{x:1}").update({})+"", '{}')
assert.deepEqual(create("{x:1,y:2}").update({x:1})+"", '{x:1}')
assert.deepEqual(create(" /*zz*/ { x /*a*/ : /*b*/ 2 , y:3 , z //\n: 4  } /*xx*/ ").update({})+"", ' /*zz*/ {     } /*xx*/ ')
assert.deepEqual(create(" /*zz*/ { } /*xx*/ ").update({x: 2, y: 3, z: 4})+"", ' /*zz*/ {"x":2,"y":3,"z":4 } /*xx*/ ')

// remove trailing comma
assert.deepEqual(create("{x:1,}").update({})+"", '{}')
assert.deepEqual(create("[0,]").update([])+"", '[]')
assert.deepEqual(create("[0 /*z*/ , /*z*/]").update([])+"", '[ /*z*/]')

// mode
assert.equal(create('{"test":123}', {mode:'json'}).update({q:1,w:2})+'', '{"q":1,"w":2}')

assert.equal(create('{1:2}').update({ a: 1, b: [1,2], c: 3})+'', '{a:1,b:[1,2],c:3}')

// undef
//assert.throws(function(){ jju.update(undefined, undefined) }, /root doc/)
assert.equal(jju.update(undefined, undefined), '')
assert.equal(jju.update(undefined, 42), '42')
assert.equal(jju.update(undefined, {x: 5}), '{"x":5}')

/*
 *  real test
 */
var upd = { name: 'yapm',
  version: '0.6.0',
  description: 'npm wrapper allowing to use package.yaml instead of package.json',
  author: { name: '<NAME>', email: '<EMAIL>' },
  keywords:
   [ 'package manager',
     'modules',
     'install',
     'package.yaml',
     'package.json5',
     'yaml',
     'json5',
     'npm' ],
  preferGlobal: true,
  homepage: 'https://npmjs.org/doc/',
  repository: { type: 'git', url: 'https://github.com/rlidwka/yapm' },
  bugs: { url: 'http://github.com/rlidwka/yapm/issues' },
  main: './yapm.js',
  bin: { yapm: './yapm.js' },
  dependencies: { npm: '*', 'js-yaml': '*', through: '*', 'json5-utils': '*' },
  devDependencies: { async: '*' },
  optionalDependencies: { 'yaml-update': '*' },
  test_nonascii: 'тест' }

assert.deepEqual(create(create('{"garbage":"garbage"}').update(upd)).get(''), upd)
assert.deepEqual(JSON.parse(create('{"garbage":"garbage"}', {mode:'json',legacy:true}).update(upd)), upd)

//console.log(create('{"garbage":"garbage"}').update(upd)+'')

//assert.deepEqual(create("  [  ]  //").set(0,{})+""  [  ,{}]  //


//node -e 'console.log(require("./document").Document("{}").set("",[1,2,3])+"")'[1, 2, 3]

//alex@elu:~/json5-utils/lib$ node -e 'console.log(require("./document").Document("[]").set("0",[1,2,3]).get(""))'
//[ [ 1, 2, 3 ] ]


/*assert.equal(create('"test"').get(''), 'test')
assert.equal(create('"test"').get([]), 'test')
assert.equal(create('"test"').get(false), 'test')
assert.equal(create(undefined).get(''), undefined)

//assert.equal(create('"test"').set('', 'foo').toString(), '"foo"')
*/


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-installed/node_modules/util-extend/test.js<|end_filename|>
var assert = require('assert');
var extend = require('./');
assert.deepEqual(extend({a:1}),             {a:1});
assert.deepEqual(extend({a:1}, []),         {a:1});
assert.deepEqual(extend({a:1}, null),       {a:1});
assert.deepEqual(extend({a:1}, true),       {a:1});
assert.deepEqual(extend({a:1}, false),      {a:1});
assert.deepEqual(extend({a:1}, {b:2}),      {a:1, b:2});
assert.deepEqual(extend({a:1, b:2}, {b:3}), {a:1, b:3});
console.log('ok');


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-installed/test/grandparent-peer-dev.js<|end_filename|>
var readInstalled = require('../read-installed.js')
var test = require('tap').test
var path = require('path');

function allValid(t, map) {
  var deps = Object.keys(map.dependencies || {})
  deps.forEach(function (dep) {
    t.ok(map.dependencies[dep].extraneous, 'dependency ' + dep + ' of ' + map.name + ' is extraneous')
  })
}

test('grandparent dev peer dependencies should be extraneous', function(t) {
  readInstalled(
    path.join(__dirname, 'fixtures/grandparent-peer-dev'),
    { log: console.error },
    function(err, map) {
      allValid(t, map)
      t.end()
    })
})


<|start_filename|>project/target/node-modules/webjars/less/lib/less/tree/unicode-descriptor.js<|end_filename|>
(function (tree) {

tree.UnicodeDescriptor = function (value) {
    this.value = value;
};
tree.UnicodeDescriptor.prototype = {
    type: "UnicodeDescriptor",
    genCSS: function (env, output) {
        output.add(this.value);
    },
    toCSS: tree.toCSS,
    eval: function () { return this; }
};

})(require('../tree'));


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/test/fetch-basic.js<|end_filename|>
var resolve = require('path').resolve
var createReadStream = require('graceful-fs').createReadStream
var readFileSync = require('graceful-fs').readFileSync

var test = require('tap').test
var concat = require('concat-stream')

var server = require('./lib/server.js')
var common = require('./lib/common.js')
var client = common.freshClient()

var tgz = resolve(__dirname, './fixtures/underscore/1.3.3/package.tgz')

function nop () {}

var URI = 'https://npm.registry:8043/rewrite'
var USERNAME = 'username'
var PASSWORD = 'hi'
var EMAIL = '<EMAIL>'
var HEADERS = {
  'npm-custom': 'lolbutts'
}
var AUTH = {
  username: USERNAME,
  password: PASSWORD,
  email: EMAIL
}
var PARAMS = {
  headers: HEADERS,
  auth: AUTH
}

test('fetch call contract', function (t) {
  t.throws(function () {
    client.get(undefined, PARAMS, nop)
  }, 'requires a URI')

  t.throws(function () {
    client.get([], PARAMS, nop)
  }, 'requires URI to be a string')

  t.throws(function () {
    client.get(URI, undefined, nop)
  }, 'requires params object')

  t.throws(function () {
    client.get(URI, '', nop)
  }, 'params must be object')

  t.throws(function () {
    client.get(URI, PARAMS, undefined)
  }, 'requires callback')

  t.throws(function () {
    client.get(URI, PARAMS, 'callback')
  }, 'callback must be function')

  t.end()
})

test('basic fetch', function (t) {
  server.expect('/underscore/-/underscore-1.3.3.tgz', function (req, res) {
    t.equal(req.method, 'GET', 'got expected method')

    res.writeHead(200, {
      'content-type': 'application/x-tar',
      'content-encoding': 'gzip'
    })

    createReadStream(tgz).pipe(res)
  })

  var defaulted = {}
  client.fetch(
    'http://localhost:1337/underscore/-/underscore-1.3.3.tgz',
    defaulted,
    function (er, res) {
      t.ifError(er, 'loaded successfully')

      var sink = concat(function (data) {
        t.deepEqual(data, readFileSync(tgz))
        t.end()
      })

      res.on('error', function (error) {
        t.ifError(error, 'no errors on stream')
      })

      res.pipe(sink)
    }
  )
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/lib/utils.js<|end_filename|>
var FS  = require('fs')
var jju = require('../')

// this function registers json5 extension, so you
// can do `require("./config.json5")` kind of thing
module.exports.register = function() {
  var r = require, e = 'extensions'
  r[e]['.json5'] = function(m, f) {
    /*eslint no-sync:0*/
    m.exports = jju.parse(FS.readFileSync(f, 'utf8'))
  }
}

// this function monkey-patches JSON.parse, so it
// will return an exact position of error in case
// of parse failure
module.exports.patch_JSON_parse = function() {
  var _parse = JSON.parse
  JSON.parse = function(text, rev) {
    try {
      return _parse(text, rev)
    } catch(err) {
      // this call should always throw
      require('jju').parse(text, {
        mode: 'json',
        legacy: true,
        reviver: rev,
        reserved_keys: 'replace',
        null_prototype: false,
      })

      // if it didn't throw, but original parser did,
      // this is an error in this library and should be reported
      throw err
    }
  }
}

// this function is an express/connect middleware
// that accepts uploads in application/json5 format
module.exports.middleware = function() {
  return function(req, res, next) {
    throw Error('this function is removed, use express-json5 instead')
  }
}



<|start_filename|>project/target/node-modules/webjars/npm/node_modules/npm-registry-client/lib/deprecate.js<|end_filename|>
module.exports = deprecate

var assert = require('assert')
var url = require('url')
var semver = require('semver')

function deprecate (uri, params, cb) {
  assert(typeof uri === 'string', 'must pass registry URI to deprecate')
  assert(params && typeof params === 'object', 'must pass params to deprecate')
  assert(typeof cb === 'function', 'must pass callback to deprecate')

  assert(typeof params.version === 'string', 'must pass version to deprecate')
  assert(typeof params.message === 'string', 'must pass message to deprecate')
  assert(
    params.auth && typeof params.auth === 'object',
    'must pass auth to deprecate'
  )

  var version = params.version
  var message = params.message
  var auth = params.auth

  if (semver.validRange(version) === null) {
    return cb(new Error('invalid version range: ' + version))
  }

  this.get(uri + '?write=true', { auth: auth }, function (er, data) {
    if (er) return cb(er)
    // filter all the versions that match
    Object.keys(data.versions).filter(function (v) {
      return semver.satisfies(v, version)
    }).forEach(function (v) {
      data.versions[v].deprecated = message
    })
    // now update the doc on the registry
    var options = {
      method: 'PUT',
      body: data,
      auth: auth
    }
    this.request(url.resolve(uri, data._id), options, cb)
  }.bind(this))
}


<|start_filename|>project/target/node-modules/webjars/jshint/data/non-ascii-identifier-part-only.js<|end_filename|>
module.exports = [
  768,
  769,
  770,
  771,
  772,
  773,
  774,
  775,
  776,
  777,
  778,
  779,
  780,
  781,
  782,
  783,
  784,
  785,
  786,
  787,
  788,
  789,
  790,
  791,
  792,
  793,
  794,
  795,
  796,
  797,
  798,
  799,
  800,
  801,
  802,
  803,
  804,
  805,
  806,
  807,
  808,
  809,
  810,
  811,
  812,
  813,
  814,
  815,
  816,
  817,
  818,
  819,
  820,
  821,
  822,
  823,
  824,
  825,
  826,
  827,
  828,
  829,
  830,
  831,
  832,
  833,
  834,
  835,
  836,
  837,
  838,
  839,
  840,
  841,
  842,
  843,
  844,
  845,
  846,
  847,
  848,
  849,
  850,
  851,
  852,
  853,
  854,
  855,
  856,
  857,
  858,
  859,
  860,
  861,
  862,
  863,
  864,
  865,
  866,
  867,
  868,
  869,
  870,
  871,
  872,
  873,
  874,
  875,
  876,
  877,
  878,
  879,
  1155,
  1156,
  1157,
  1158,
  1159,
  1425,
  1426,
  1427,
  1428,
  1429,
  1430,
  1431,
  1432,
  1433,
  1434,
  1435,
  1436,
  1437,
  1438,
  1439,
  1440,
  1441,
  1442,
  1443,
  1444,
  1445,
  1446,
  1447,
  1448,
  1449,
  1450,
  1451,
  1452,
  1453,
  1454,
  1455,
  1456,
  1457,
  1458,
  1459,
  1460,
  1461,
  1462,
  1463,
  1464,
  1465,
  1466,
  1467,
  1468,
  1469,
  1471,
  1473,
  1474,
  1476,
  1477,
  1479,
  1552,
  1553,
  1554,
  1555,
  1556,
  1557,
  1558,
  1559,
  1560,
  1561,
  1562,
  1611,
  1612,
  1613,
  1614,
  1615,
  1616,
  1617,
  1618,
  1619,
  1620,
  1621,
  1622,
  1623,
  1624,
  1625,
  1626,
  1627,
  1628,
  1629,
  1630,
  1631,
  1632,
  1633,
  1634,
  1635,
  1636,
  1637,
  1638,
  1639,
  1640,
  1641,
  1648,
  1750,
  1751,
  1752,
  1753,
  1754,
  1755,
  1756,
  1759,
  1760,
  1761,
  1762,
  1763,
  1764,
  1767,
  1768,
  1770,
  1771,
  1772,
  1773,
  1776,
  1777,
  1778,
  1779,
  1780,
  1781,
  1782,
  1783,
  1784,
  1785,
  1809,
  1840,
  1841,
  1842,
  1843,
  1844,
  1845,
  1846,
  1847,
  1848,
  1849,
  1850,
  1851,
  1852,
  1853,
  1854,
  1855,
  1856,
  1857,
  1858,
  1859,
  1860,
  1861,
  1862,
  1863,
  1864,
  1865,
  1866,
  1958,
  1959,
  1960,
  1961,
  1962,
  1963,
  1964,
  1965,
  1966,
  1967,
  1968,
  1984,
  1985,
  1986,
  1987,
  1988,
  1989,
  1990,
  1991,
  1992,
  1993,
  2027,
  2028,
  2029,
  2030,
  2031,
  2032,
  2033,
  2034,
  2035,
  2070,
  2071,
  2072,
  2073,
  2075,
  2076,
  2077,
  2078,
  2079,
  2080,
  2081,
  2082,
  2083,
  2085,
  2086,
  2087,
  2089,
  2090,
  2091,
  2092,
  2093,
  2137,
  2138,
  2139,
  2276,
  2277,
  2278,
  2279,
  2280,
  2281,
  2282,
  2283,
  2284,
  2285,
  2286,
  2287,
  2288,
  2289,
  2290,
  2291,
  2292,
  2293,
  2294,
  2295,
  2296,
  2297,
  2298,
  2299,
  2300,
  2301,
  2302,
  2304,
  2305,
  2306,
  2307,
  2362,
  2363,
  2364,
  2366,
  2367,
  2368,
  2369,
  2370,
  2371,
  2372,
  2373,
  2374,
  2375,
  2376,
  2377,
  2378,
  2379,
  2380,
  2381,
  2382,
  2383,
  2385,
  2386,
  2387,
  2388,
  2389,
  2390,
  2391,
  2402,
  2403,
  2406,
  2407,
  2408,
  2409,
  2410,
  2411,
  2412,
  2413,
  2414,
  2415,
  2433,
  2434,
  2435,
  2492,
  2494,
  2495,
  2496,
  2497,
  2498,
  2499,
  2500,
  2503,
  2504,
  2507,
  2508,
  2509,
  2519,
  2530,
  2531,
  2534,
  2535,
  2536,
  2537,
  2538,
  2539,
  2540,
  2541,
  2542,
  2543,
  2561,
  2562,
  2563,
  2620,
  2622,
  2623,
  2624,
  2625,
  2626,
  2631,
  2632,
  2635,
  2636,
  2637,
  2641,
  2662,
  2663,
  2664,
  2665,
  2666,
  2667,
  2668,
  2669,
  2670,
  2671,
  2672,
  2673,
  2677,
  2689,
  2690,
  2691,
  2748,
  2750,
  2751,
  2752,
  2753,
  2754,
  2755,
  2756,
  2757,
  2759,
  2760,
  2761,
  2763,
  2764,
  2765,
  2786,
  2787,
  2790,
  2791,
  2792,
  2793,
  2794,
  2795,
  2796,
  2797,
  2798,
  2799,
  2817,
  2818,
  2819,
  2876,
  2878,
  2879,
  2880,
  2881,
  2882,
  2883,
  2884,
  2887,
  2888,
  2891,
  2892,
  2893,
  2902,
  2903,
  2914,
  2915,
  2918,
  2919,
  2920,
  2921,
  2922,
  2923,
  2924,
  2925,
  2926,
  2927,
  2946,
  3006,
  3007,
  3008,
  3009,
  3010,
  3014,
  3015,
  3016,
  3018,
  3019,
  3020,
  3021,
  3031,
  3046,
  3047,
  3048,
  3049,
  3050,
  3051,
  3052,
  3053,
  3054,
  3055,
  3073,
  3074,
  3075,
  3134,
  3135,
  3136,
  3137,
  3138,
  3139,
  3140,
  3142,
  3143,
  3144,
  3146,
  3147,
  3148,
  3149,
  3157,
  3158,
  3170,
  3171,
  3174,
  3175,
  3176,
  3177,
  3178,
  3179,
  3180,
  3181,
  3182,
  3183,
  3202,
  3203,
  3260,
  3262,
  3263,
  3264,
  3265,
  3266,
  3267,
  3268,
  3270,
  3271,
  3272,
  3274,
  3275,
  3276,
  3277,
  3285,
  3286,
  3298,
  3299,
  3302,
  3303,
  3304,
  3305,
  3306,
  3307,
  3308,
  3309,
  3310,
  3311,
  3330,
  3331,
  3390,
  3391,
  3392,
  3393,
  3394,
  3395,
  3396,
  3398,
  3399,
  3400,
  3402,
  3403,
  3404,
  3405,
  3415,
  3426,
  3427,
  3430,
  3431,
  3432,
  3433,
  3434,
  3435,
  3436,
  3437,
  3438,
  3439,
  3458,
  3459,
  3530,
  3535,
  3536,
  3537,
  3538,
  3539,
  3540,
  3542,
  3544,
  3545,
  3546,
  3547,
  3548,
  3549,
  3550,
  3551,
  3570,
  3571,
  3633,
  3636,
  3637,
  3638,
  3639,
  3640,
  3641,
  3642,
  3655,
  3656,
  3657,
  3658,
  3659,
  3660,
  3661,
  3662,
  3664,
  3665,
  3666,
  3667,
  3668,
  3669,
  3670,
  3671,
  3672,
  3673,
  3761,
  3764,
  3765,
  3766,
  3767,
  3768,
  3769,
  3771,
  3772,
  3784,
  3785,
  3786,
  3787,
  3788,
  3789,
  3792,
  3793,
  3794,
  3795,
  3796,
  3797,
  3798,
  3799,
  3800,
  3801,
  3864,
  3865,
  3872,
  3873,
  3874,
  3875,
  3876,
  3877,
  3878,
  3879,
  3880,
  3881,
  3893,
  3895,
  3897,
  3902,
  3903,
  3953,
  3954,
  3955,
  3956,
  3957,
  3958,
  3959,
  3960,
  3961,
  3962,
  3963,
  3964,
  3965,
  3966,
  3967,
  3968,
  3969,
  3970,
  3971,
  3972,
  3974,
  3975,
  3981,
  3982,
  3983,
  3984,
  3985,
  3986,
  3987,
  3988,
  3989,
  3990,
  3991,
  3993,
  3994,
  3995,
  3996,
  3997,
  3998,
  3999,
  4000,
  4001,
  4002,
  4003,
  4004,
  4005,
  4006,
  4007,
  4008,
  4009,
  4010,
  4011,
  4012,
  4013,
  4014,
  4015,
  4016,
  4017,
  4018,
  4019,
  4020,
  4021,
  4022,
  4023,
  4024,
  4025,
  4026,
  4027,
  4028,
  4038,
  4139,
  4140,
  4141,
  4142,
  4143,
  4144,
  4145,
  4146,
  4147,
  4148,
  4149,
  4150,
  4151,
  4152,
  4153,
  4154,
  4155,
  4156,
  4157,
  4158,
  4160,
  4161,
  4162,
  4163,
  4164,
  4165,
  4166,
  4167,
  4168,
  4169,
  4182,
  4183,
  4184,
  4185,
  4190,
  4191,
  4192,
  4194,
  4195,
  4196,
  4199,
  4200,
  4201,
  4202,
  4203,
  4204,
  4205,
  4209,
  4210,
  4211,
  4212,
  4226,
  4227,
  4228,
  4229,
  4230,
  4231,
  4232,
  4233,
  4234,
  4235,
  4236,
  4237,
  4239,
  4240,
  4241,
  4242,
  4243,
  4244,
  4245,
  4246,
  4247,
  4248,
  4249,
  4250,
  4251,
  4252,
  4253,
  4957,
  4958,
  4959,
  5906,
  5907,
  5908,
  5938,
  5939,
  5940,
  5970,
  5971,
  6002,
  6003,
  6068,
  6069,
  6070,
  6071,
  6072,
  6073,
  6074,
  6075,
  6076,
  6077,
  6078,
  6079,
  6080,
  6081,
  6082,
  6083,
  6084,
  6085,
  6086,
  6087,
  6088,
  6089,
  6090,
  6091,
  6092,
  6093,
  6094,
  6095,
  6096,
  6097,
  6098,
  6099,
  6109,
  6112,
  6113,
  6114,
  6115,
  6116,
  6117,
  6118,
  6119,
  6120,
  6121,
  6155,
  6156,
  6157,
  6160,
  6161,
  6162,
  6163,
  6164,
  6165,
  6166,
  6167,
  6168,
  6169,
  6313,
  6432,
  6433,
  6434,
  6435,
  6436,
  6437,
  6438,
  6439,
  6440,
  6441,
  6442,
  6443,
  6448,
  6449,
  6450,
  6451,
  6452,
  6453,
  6454,
  6455,
  6456,
  6457,
  6458,
  6459,
  6470,
  6471,
  6472,
  6473,
  6474,
  6475,
  6476,
  6477,
  6478,
  6479,
  6576,
  6577,
  6578,
  6579,
  6580,
  6581,
  6582,
  6583,
  6584,
  6585,
  6586,
  6587,
  6588,
  6589,
  6590,
  6591,
  6592,
  6600,
  6601,
  6608,
  6609,
  6610,
  6611,
  6612,
  6613,
  6614,
  6615,
  6616,
  6617,
  6679,
  6680,
  6681,
  6682,
  6683,
  6741,
  6742,
  6743,
  6744,
  6745,
  6746,
  6747,
  6748,
  6749,
  6750,
  6752,
  6753,
  6754,
  6755,
  6756,
  6757,
  6758,
  6759,
  6760,
  6761,
  6762,
  6763,
  6764,
  6765,
  6766,
  6767,
  6768,
  6769,
  6770,
  6771,
  6772,
  6773,
  6774,
  6775,
  6776,
  6777,
  6778,
  6779,
  6780,
  6783,
  6784,
  6785,
  6786,
  6787,
  6788,
  6789,
  6790,
  6791,
  6792,
  6793,
  6800,
  6801,
  6802,
  6803,
  6804,
  6805,
  6806,
  6807,
  6808,
  6809,
  6912,
  6913,
  6914,
  6915,
  6916,
  6964,
  6965,
  6966,
  6967,
  6968,
  6969,
  6970,
  6971,
  6972,
  6973,
  6974,
  6975,
  6976,
  6977,
  6978,
  6979,
  6980,
  6992,
  6993,
  6994,
  6995,
  6996,
  6997,
  6998,
  6999,
  7000,
  7001,
  7019,
  7020,
  7021,
  7022,
  7023,
  7024,
  7025,
  7026,
  7027,
  7040,
  7041,
  7042,
  7073,
  7074,
  7075,
  7076,
  7077,
  7078,
  7079,
  7080,
  7081,
  7082,
  7083,
  7084,
  7085,
  7088,
  7089,
  7090,
  7091,
  7092,
  7093,
  7094,
  7095,
  7096,
  7097,
  7142,
  7143,
  7144,
  7145,
  7146,
  7147,
  7148,
  7149,
  7150,
  7151,
  7152,
  7153,
  7154,
  7155,
  7204,
  7205,
  7206,
  7207,
  7208,
  7209,
  7210,
  7211,
  7212,
  7213,
  7214,
  7215,
  7216,
  7217,
  7218,
  7219,
  7220,
  7221,
  7222,
  7223,
  7232,
  7233,
  7234,
  7235,
  7236,
  7237,
  7238,
  7239,
  7240,
  7241,
  7248,
  7249,
  7250,
  7251,
  7252,
  7253,
  7254,
  7255,
  7256,
  7257,
  7376,
  7377,
  7378,
  7380,
  7381,
  7382,
  7383,
  7384,
  7385,
  7386,
  7387,
  7388,
  7389,
  7390,
  7391,
  7392,
  7393,
  7394,
  7395,
  7396,
  7397,
  7398,
  7399,
  7400,
  7405,
  7410,
  7411,
  7412,
  7616,
  7617,
  7618,
  7619,
  7620,
  7621,
  7622,
  7623,
  7624,
  7625,
  7626,
  7627,
  7628,
  7629,
  7630,
  7631,
  7632,
  7633,
  7634,
  7635,
  7636,
  7637,
  7638,
  7639,
  7640,
  7641,
  7642,
  7643,
  7644,
  7645,
  7646,
  7647,
  7648,
  7649,
  7650,
  7651,
  7652,
  7653,
  7654,
  7676,
  7677,
  7678,
  7679,
  8204,
  8205,
  8255,
  8256,
  8276,
  8400,
  8401,
  8402,
  8403,
  8404,
  8405,
  8406,
  8407,
  8408,
  8409,
  8410,
  8411,
  8412,
  8417,
  8421,
  8422,
  8423,
  8424,
  8425,
  8426,
  8427,
  8428,
  8429,
  8430,
  8431,
  8432,
  11503,
  11504,
  11505,
  11647,
  11744,
  11745,
  11746,
  11747,
  11748,
  11749,
  11750,
  11751,
  11752,
  11753,
  11754,
  11755,
  11756,
  11757,
  11758,
  11759,
  11760,
  11761,
  11762,
  11763,
  11764,
  11765,
  11766,
  11767,
  11768,
  11769,
  11770,
  11771,
  11772,
  11773,
  11774,
  11775,
  12330,
  12331,
  12332,
  12333,
  12334,
  12335,
  12441,
  12442,
  42528,
  42529,
  42530,
  42531,
  42532,
  42533,
  42534,
  42535,
  42536,
  42537,
  42607,
  42612,
  42613,
  42614,
  42615,
  42616,
  42617,
  42618,
  42619,
  42620,
  42621,
  42655,
  42736,
  42737,
  43010,
  43014,
  43019,
  43043,
  43044,
  43045,
  43046,
  43047,
  43136,
  43137,
  43188,
  43189,
  43190,
  43191,
  43192,
  43193,
  43194,
  43195,
  43196,
  43197,
  43198,
  43199,
  43200,
  43201,
  43202,
  43203,
  43204,
  43216,
  43217,
  43218,
  43219,
  43220,
  43221,
  43222,
  43223,
  43224,
  43225,
  43232,
  43233,
  43234,
  43235,
  43236,
  43237,
  43238,
  43239,
  43240,
  43241,
  43242,
  43243,
  43244,
  43245,
  43246,
  43247,
  43248,
  43249,
  43264,
  43265,
  43266,
  43267,
  43268,
  43269,
  43270,
  43271,
  43272,
  43273,
  43302,
  43303,
  43304,
  43305,
  43306,
  43307,
  43308,
  43309,
  43335,
  43336,
  43337,
  43338,
  43339,
  43340,
  43341,
  43342,
  43343,
  43344,
  43345,
  43346,
  43347,
  43392,
  43393,
  43394,
  43395,
  43443,
  43444,
  43445,
  43446,
  43447,
  43448,
  43449,
  43450,
  43451,
  43452,
  43453,
  43454,
  43455,
  43456,
  43472,
  43473,
  43474,
  43475,
  43476,
  43477,
  43478,
  43479,
  43480,
  43481,
  43561,
  43562,
  43563,
  43564,
  43565,
  43566,
  43567,
  43568,
  43569,
  43570,
  43571,
  43572,
  43573,
  43574,
  43587,
  43596,
  43597,
  43600,
  43601,
  43602,
  43603,
  43604,
  43605,
  43606,
  43607,
  43608,
  43609,
  43643,
  43696,
  43698,
  43699,
  43700,
  43703,
  43704,
  43710,
  43711,
  43713,
  43755,
  43756,
  43757,
  43758,
  43759,
  43765,
  43766,
  44003,
  44004,
  44005,
  44006,
  44007,
  44008,
  44009,
  44010,
  44012,
  44013,
  44016,
  44017,
  44018,
  44019,
  44020,
  44021,
  44022,
  44023,
  44024,
  44025,
  64286,
  65024,
  65025,
  65026,
  65027,
  65028,
  65029,
  65030,
  65031,
  65032,
  65033,
  65034,
  65035,
  65036,
  65037,
  65038,
  65039,
  65056,
  65057,
  65058,
  65059,
  65060,
  65061,
  65062,
  65075,
  65076,
  65101,
  65102,
  65103,
  65296,
  65297,
  65298,
  65299,
  65300,
  65301,
  65302,
  65303,
  65304,
  65305,
  65343
];


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-installed/test/extraneous.js<|end_filename|>
var readInstalled = require('../read-installed.js')
var test = require('tap').test
var path = require('path')

test('extraneous detected', function(t) {
  // This test verifies read-installed#16
  readInstalled(
    path.join(__dirname, 'fixtures/extraneous-detected'),
    { log: console.error },
    function(err, map) {
      t.ok(map.dependencies.foo.extraneous, 'foo is extraneous, it\'s not required by any module')
      t.ok(map.dependencies.bar.extraneous, 'bar is extraneous, it\'s not required by any module')
      t.notOk(map.dependencies.asdf.extraneous, 'asdf is not extraneous, it\'s required by ghjk')
      t.notOk(map.dependencies.ghjk.extraneous, 'ghjk is not extraneous, it\'s required by our root module')
      t.end()
    })
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/index.js<|end_filename|>

/**
 * Module dependencies.
 */

var util = require('util')
var debug = require('debug')('array-index')

/**
 * JavaScript Array "length" is bound to an unsigned 32-bit int.
 * See: http://stackoverflow.com/a/6155063/376773
 */

var MAX_LENGTH = Math.pow(2, 32)

/**
 * Module exports.
 */

module.exports = ArrayIndex

/**
 * Subclass this.
 */

function ArrayIndex (length) {
  Object.defineProperty(this, 'length', {
    get: getLength,
    set: setLength,
    enumerable: false,
    configurable: true
  })

  Object.defineProperty(this, '__length', {
    value: 0,
    writable: true,
    enumerable: false,
    configurable: true
  })

  if (arguments.length > 0) {
    this.length = length
  }
}

/**
 * You overwrite the "__get__" function in your subclass.
 */

ArrayIndex.prototype.__get__ = function () {
  throw new Error('you must implement the __get__ function')
}

/**
 * You overwrite the "__set__" function in your subclass.
 */

ArrayIndex.prototype.__set__ = function () {
  throw new Error('you must implement the __set__ function')
}

/**
 * Converts this array class into a real JavaScript Array. Note that this
 * is a "flattened" array and your defined getters and setters won't be invoked
 * when you interact with the returned Array. This function will call the
 * getter on every array index of the object.
 *
 * @return {Array} The flattened array
 * @api public
 */

ArrayIndex.prototype.toArray = function toArray () {
  var i = 0, l = this.length, array = new Array(l)
  for (; i < l; i++) {
    array[i] = this[i]
  }
  return array
}

/**
 * Basic support for `JSON.stringify()`.
 */

ArrayIndex.prototype.toJSON = function toJSON () {
  return this.toArray()
}

/**
 * toString() override. Use Array.prototype.toString().
 */

ArrayIndex.prototype.toString = function toString () {
  var a = this.toArray()
  return a.toString.apply(a, arguments)
}

/**
 * inspect() override. For the REPL.
 */

ArrayIndex.prototype.inspect = function inspect () {
  var a = this.toArray()
  Object.keys(this).forEach(function (k) {
    a[k] = this[k]
  }, this)
  return util.inspect(a)
}

/**
 * Getter for the "length" property.
 * Returns the value of the "__length" property.
 */

function getLength () {
  debug('getting "length": %o', this.__length)
  return this.__length
}

/**
 * Setter for the "length" property.
 * Calls "ensureLength()", then sets the "__length" property.
 */

function setLength (v) {
  debug('setting "length": %o', v)
  return this.__length = ensureLength(v)
}

/**
 * Ensures that getters/setters from 0 up to "_length" have been defined
 * on `ArrayIndex.prototype`.
 *
 * @api private
 */

function ensureLength (_length) {
  var length
  if (_length > MAX_LENGTH) {
    length = MAX_LENGTH
  } else {
    length = _length | 0
  }
  var cur = ArrayIndex.prototype.__length__ | 0
  var num = length - cur
  if (num > 0) {
    var desc = {}
    debug('creating a descriptor object with %o entries', num)
    for (var i = cur; i < length; i++) {
      desc[i] = setup(i)
    }
    debug('done creating descriptor object')
    debug('calling `Object.defineProperties()` with %o entries', num)
    Object.defineProperties(ArrayIndex.prototype, desc)
    debug('finished `Object.defineProperties()`')
    ArrayIndex.prototype.__length__ = length
  }
  return length
}

/**
 * Returns a property descriptor for the given "index", with "get" and "set"
 * functions created within the closure.
 *
 * @api private
 */

function setup (index) {
  function get () {
    return this.__get__(index)
  }
  function set (v) {
    return this.__set__(index, v)
  }
  return {
      enumerable: true
    , configurable: true
    , get: get
    , set: set
  }
}


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-installed/test/peer-dep-at-latest.js<|end_filename|>
var readInstalled = require('../read-installed.js')
var test = require('tap').test
var path = require('path');

test('"latest" version is valid', function(t) {
  // This test verifies npm#3860
  readInstalled(
    path.join(__dirname, 'fixtures/peer-at-latest'),
    { log: console.error },
    function(err, map) {
      t.notOk(map.dependencies.debug.invalid, 'debug@latest is satisfied by a peer')
      t.end()
    })
})


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/test/test_stringify.js<|end_filename|>
var assert = require('assert')
var parse = require('../').parse
var stringify = require('../').stringify

function deepEqual(x, y) {
  if (Number.isNaN(x)) {
    return assert(Number.isNaN(y))
  }
  assert.deepEqual(x, y)
}

function addTest(arg, arg2, arg3) {
  function fn() {
    deepEqual(parse(stringify(arg)), arg2 === undefined ? arg : arg2)
    if (arg !== undefined) deepEqual(JSON.parse(stringify(arg, {mode: 'json', indent: false})), (arg3 === undefined ? (arg2 === undefined ? arg : arg2) : arg3))
  }

  if (typeof(describe) === 'function') {
    it('test_stringify: ' + JSON.stringify(arg), fn)
  } else {
    fn()
  }
}

addTest(0)
addTest(-0)
addTest(NaN, undefined, null)
addTest(Infinity, undefined, null)
addTest(-Infinity, undefined, null)
addTest(123)
addTest(19508130958019385.135135)
addTest(-2e123)
addTest(null)
addTest(undefined)
addTest([])
addTest([,,,,,,,], [null,null,null,null,null,null,null])
addTest([undefined,null,1,2,3,], [null,null,1,2,3])
addTest([[[[]]],[[]]])
addTest({})
addTest({1:2,3:4})
addTest({1:{1:{1:{1:4}}}, 3:4})
addTest({1:undefined, 3:undefined}, {})
addTest(new Number(4), 4)
addTest(new Boolean(true), true)
addTest(new String('xqefxef'), 'xqefxef')
addTest(new Boolean(), false)

var r='';for (var i=0; i<5000; i++) {r+=String.fromCharCode(i)}
addTest(r)

assert.equal("[1, 2, 3]", stringify([1, 2, 3], {indent: 1}))
assert.equal("[1, 2, 3]", stringify([1, 2, 3], {indent: 2}))

var oddball = Object(42)
oddball.__proto__ = { __proto__: null }
assert.equal('{}', stringify(oddball))

/* this WILL throw
var falseNum = Object("37")
falseNum.__proto__ = Number.prototype
assert.equal("{0: '3', 1: '7'}", stringify(falseNum))*/

assert.equal(stringify(Infinity), 'Infinity')
assert.equal(stringify(Infinity, {mode: 'json'}), 'null')
assert.equal(stringify(NaN), 'NaN')
assert.equal(stringify(NaN, {mode: 'json'}), 'null')
assert.equal(stringify(-0), '-0')

assert.equal(stringify('test', null), "'test'")

var array = [""]
var expected = "''"
for (var i = 0; i < 1000; i++) {
  array.push("")
  expected = "''," + expected
}
expected = '[' + expected + ']'
assert.equal(expected, stringify(array, {indent: false}))

assert.strictEqual(stringify([1,2,3], function(){}), undefined)

// don't stringify prototype
assert.equal('{a: 1}', stringify({a:1,__proto__:{b:2}}))

// sort keys tests
assert.equal('{a: 1, b: 2, z: 3}', stringify({b:2,a:1,z:3}, {sort_keys: 1}))
assert.equal('{a: 1, b: {a: 2, b: 5, c: 1}, z: 3}', stringify({b:{c:1,a:2,b:5},a:1,z:3}, {sort_keys: 1}))
assert.equal('{a: [3, 5, 1], b: 2, z: 3}', stringify({b:2,a:[3,5,1],z:3}, {sort_keys: 1}))
assert.equal('{b: 2, a: 1, z: 3}', stringify({b:2,a:1,z:3}, {sort_keys: 0}))


<|start_filename|>project/target/node-modules/webjars/npm/node_modules/read-package-json/node_modules/json-parse-helpfulerror/node_modules/jju/benchmark/benchmark.js<|end_filename|>
#!/usr/bin/env node

var Benchmark = require('benchmark')
var YAML = require('js-yaml')
var JJU = require('../')
var JSON5 = require('json5')
var suite = new Benchmark.Suite

var sample
sample = require('fs').readFileSync(__dirname + '/../package.yaml')
sample = YAML.safeLoad(sample)
sample = JSON.stringify(sample)

var functions = {
  'JSON':    function(x) { JSON.parse(x) },
  'JSON5':   function(x) { JSON5.parse(x) },
  'JJU':     function(x) { JJU.parse(x) },
  'JS-YAML': function(x) { YAML.safeLoad(x) },
}

for (var name in functions) {
  with ({ fn: functions[name] }) {
    suite.add(name, {
      onCycle: function onCycle(event) {
        process.stdout.write('\r\033[2K - ' + event.target)
      },
      fn: function () {
        fn(sample)
      },
    })
  }
}

console.log()
suite.on('cycle', function(event) {
  console.log('\r\033[2K + ' + String(event.target))
})
.run()

process.on('exit', function() { console.log() })
