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AAK,EAAS,EAAK,KAAM,EAAU,EAAM,IAAK,GAE7C,EAAK,SAAW,EAAQ,KAAI,GAAK,QAAQ,EAAK,IAAK,KAAM,CAClE","file":"/npm/tiny-glob@0.1.0/src/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/tiny-glob@0.1.0/src/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","const fs = require('fs');\nconst globrex = require('globrex');\nconst globalyzer = require('globalyzer');\nconst { join, resolve, relative } = require('path');\nconst { promisify } = require('util');\n\nconst isHidden = /(^|\\/)\\.[^\\/\\.]/g;\nconst giveup = rgx => !rgx || rgx == '/^((?:[^\\\\/]*(?:\\\\/|$))*)$/';\nconst readdir = promisify(fs.readdir);\n\nconst CACHE = {};\n\nasync function walk(output, prefix, lexer, opts, dirname='', level=0) {\n  const rgx = lexer.segments[level];\n  const dir = join(opts.cwd, prefix, dirname);\n  const files = await readdir(dir);\n\n  let i=0, len=files.length, file;\n  let fullpath, relpath, stats, isMatch;\n\n  for (; i < len; i++) {\n    fullpath = join(dir, file=files[i]);\n    relpath = dirname ? join(dirname, file) : file;\n    if (!opts.dot && isHidden.test(relpath)) continue;\n    isMatch = lexer.regex.test(relpath);\n\n    if ((stats=CACHE[relpath]) === void 0) {\n      CACHE[relpath] = stats = fs.lstatSync(fullpath);\n    }\n\n    if (!stats.isDirectory()) {\n      isMatch && output.push(relative(opts.cwd, fullpath));\n      continue;\n    }\n\n    if (rgx && !rgx.test(file)) continue;\n    !opts.filesOnly && isMatch && output.push(join(prefix, relpath));\n\n    await walk(output, prefix, lexer, opts, relpath, giveup(rgx) ? null : level + 1);\n  }\n}\n\n/**\n * Find files using bash-like globbing.\n * All paths are normalized compared to node-glob.\n * @param {String} str Glob string\n * @param {String} [options.cwd='.'] Current working directory\n * @param {Boolean} [options.dot=false] Include dotfile matches\n * @param {Boolean} [options.absolute=false] Return absolute paths\n * @param {Boolean} [options.filesOnly=false] Do not include folders if true\n * @returns {Array} array containing matching files\n */\nmodule.exports = async function (str, opts={}) {\n  let glob = globalyzer(str);\n\n  if (!glob.isGlob) {\n    return fs.existsSync(str) ? [str] : [];\n  }\n\n  let matches = [];\n  opts.cwd = opts.cwd || '.';\n  const patterns = globrex(glob.glob, { globstar:true, extended:true });\n\n  await walk(matches, glob.base, patterns, opts, '.', 0);\n\n  return opts.absolute ? matches.map(x => resolve(opts.cwd, x)) : matches;\n};\n"]}