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AIP,KAAK,KAAK,EAAU,GAAS,KAAI,SAAS,GAC/C,OAAO,OAAO,EAAU,EAAQ,IAClC,IALS,EAMX,EAEA,WAAW,KAAO,SAAS,EAAU,GACnC,OAAO,WAAW,IAAI,EAAU,OAAO,CACrC,KAAM,gBACL,GACL,EAEA,WAAW,IAAM,SAAS,EAAU,GAClC,OAAO,WAAW,IAAI,EAAU,OAAO,CACrC,KAAM,mBACL,GACL,EAEA,WAAW,KAAO,SAAS,EAAU,GACnC,OAAO,WAAW,IAAI,EAAU,OAAO,CACrC,KAAM,oBACL,GACL,EAEA,OAAO,QAAU","file":"/npm/resolve-dep@0.6.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/resolve-dep@0.6.0/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*!\n * resolve-dep\n * https://github.com/jonschlinkert/resolve-dep\n *\n * Copyright (c) 2014 Jon Schlinkert, Brian Woodward, contributors.\n * Licensed under the MIT license.\n */\n\n'use strict';\n\nvar cwd = require('cwd');\nvar glob = require('matched');\nvar resolve = require('resolve');\nvar arrayify = require('arrayify-compact');\nvar micromatch = require('micromatch');\nvar lookup = require('lookup-path');\nvar loadPkg = require('load-pkg');\nvar extend = require('extend-shallow');\n\n/**\n * Resolve both npm packages and local modules by:\n *\n *   1. Attempting to expand glob patterns to local modules, then\n *   1. Attempting to match glob patterns to deps in package.json\n *\n * **Examples:**\n *\n * ```js\n * // file path\n * resolve('foo/bar.js');\n * // glob patterns\n * resolve('foo/*.js');\n * // named npm module (installed in node_modules)\n * resolve('chai');\n * // combination\n * resolve(['chai', 'foo/*.js']);\n * ```\n * @param  {Array|String} `patterns` Glob patterns for files or npm modules.\n * @param  {Object} `options`\n * @return {Array}\n */\n\nvar resolveDep = function(patterns, options) {\n  if (options && options.strict) {\n    if (patterns[0] !== '.') {\n      return resolveDep.npm(patterns, options);\n    }\n    return resolveDep.local(patterns, options);\n  }\n  var locals = resolveDep.local(patterns, options);\n  var npm = resolveDep.npm(patterns, options);\n  return locals.concat(npm);\n};\n\n/**\n * Resolve npm packages in node_modules by matching glob patterns to deps in\n * package.json. NPM modules will only be resolved if they are defined in\n * one of the \"dependencies\" fields in package.json.\n *\n * ```js\n * // resolve npm modules only\n * resolve.npm(['chai', 'lodash']);\n * ```\n * @param  {Array|String} `patterns`\n * @param  {Object} `options`\n * @return {Array}\n */\n\nresolveDep.npm = function(patterns, options) {\n  options = options || {};\n  var defaults = ['dependencies', 'devDependencies', 'peerDependencies'];\n  var types = options.type || defaults;\n  patterns = arrayify(patterns);\n  types = arrayify(types);\n\n  // if `all` is specified, then use all the dependency collections\n  if (types[0] === 'all') {\n    types = defaults;\n  }\n\n  // find all the collections from the package.json\n  var configObj = options.config || loadPkg.sync();\n  var modules = arrayify(types.map(function(type) {\n    return configObj[type] ? Object.keys(configObj[type]) : null;\n  })).filter(Boolean);\n\n  if (!modules.length || !patterns.length) {\n    return [];\n  }\n\n  var deps = [];\n  var matches = micromatch(modules, patterns, options);\n  if (matches.length) {\n    matches.forEach(function(match) {\n      deps = deps.concat(resolve.sync(match, {\n        basedir: cwd()\n      }));\n    });\n  }\n\n  return deps.map(function(filepath) {\n    return lookup(filepath, options.cwd);\n  });\n};\n\n/**\n * Resolve local modules by expanding glob patterns to file paths.\n *\n * ```js\n * // resolve local modules only\n * resolve.local(['a/*.js', 'b/*.json']);\n * ```\n * @param  {Array|String} `patterns`\n * @param  {Object} `options`\n * @return {Array}\n */\n\nresolveDep.local = function(patterns, options) {\n  options = options || {};\n  options.cwd = options.srcBase = cwd(options.cwd || process.cwd());\n  patterns = arrayify(arrayify(patterns));\n  if (!patterns.length) {\n    return [];\n  }\n  // find local matches\n  return glob.sync(patterns, options).map(function(filepath) {\n    return lookup(filepath, options.cwd);\n  });\n};\n\nresolveDep.deps = function(patterns, options) {\n  return resolveDep.npm(patterns, extend({\n    type: 'dependencies'\n  }, options));\n};\n\nresolveDep.dev = function(patterns, options) {\n  return resolveDep.npm(patterns, extend({\n    type: 'devDependencies'\n  }, options));\n};\n\nresolveDep.peer = function(patterns, options) {\n  return resolveDep.npm(patterns, extend({\n    type: 'peerDependencies'\n  }, options));\n};\n\nmodule.exports = resolveDep;\n"]}