{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass SyncReader extends reader_1.default {\n  constructor() {\n    super(...arguments);\n    this._scandir = fsScandir.scandirSync;\n    this._storage = [];\n    this._queue = new Set();\n  }\n  read() {\n    this._pushToQueue(this._root, this._settings.basePath);\n    this._handleQueue();\n    return this._storage;\n  }\n  _pushToQueue(directory, base) {\n    this._queue.add({\n      directory,\n      base\n    });\n  }\n  _handleQueue() {\n    for (const item of this._queue.values()) {\n      this._handleDirectory(item.directory, item.base);\n    }\n  }\n  _handleDirectory(directory, base) {\n    try {\n      const entries = this._scandir(directory, this._settings.fsScandirSettings);\n      for (const entry of entries) {\n        this._handleEntry(entry, base);\n      }\n    } catch (error) {\n      this._handleError(error);\n    }\n  }\n  _handleError(error) {\n    if (!common.isFatalError(this._settings, error)) {\n      return;\n    }\n    throw error;\n  }\n  _handleEntry(entry, base) {\n    const fullpath = entry.path;\n    if (base !== undefined) {\n      entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n    }\n    if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n      this._pushToStorage(entry);\n    }\n    if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n      this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n    }\n  }\n  _pushToStorage(entry) {\n    this._storage.push(entry);\n  }\n}\nexports.default = SyncReader;","map":{"version":3,"names":["Object","defineProperty","exports","value","fsScandir","require","common","reader_1","SyncReader","default","constructor","arguments","_scandir","scandirSync","_storage","_queue","Set","read","_pushToQueue","_root","_settings","basePath","_handleQueue","directory","base","add","item","values","_handleDirectory","entries","fsScandirSettings","entry","_handleEntry","error","_handleError","isFatalError","fullpath","path","undefined","joinPathSegments","name","pathSegmentSeparator","isAppliedFilter","entryFilter","_pushToStorage","dirent","isDirectory","deepFilter","push"],"sources":["C:/Users/user/Desktop/000newport/node_modules/@nodelib/fs.walk/out/readers/sync.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst fsScandir = require(\"@nodelib/fs.scandir\");\nconst common = require(\"./common\");\nconst reader_1 = require(\"./reader\");\nclass SyncReader extends reader_1.default {\n    constructor() {\n        super(...arguments);\n        this._scandir = fsScandir.scandirSync;\n        this._storage = [];\n        this._queue = new Set();\n    }\n    read() {\n        this._pushToQueue(this._root, this._settings.basePath);\n        this._handleQueue();\n        return this._storage;\n    }\n    _pushToQueue(directory, base) {\n        this._queue.add({ directory, base });\n    }\n    _handleQueue() {\n        for (const item of this._queue.values()) {\n            this._handleDirectory(item.directory, item.base);\n        }\n    }\n    _handleDirectory(directory, base) {\n        try {\n            const entries = this._scandir(directory, this._settings.fsScandirSettings);\n            for (const entry of entries) {\n                this._handleEntry(entry, base);\n            }\n        }\n        catch (error) {\n            this._handleError(error);\n        }\n    }\n    _handleError(error) {\n        if (!common.isFatalError(this._settings, error)) {\n            return;\n        }\n        throw error;\n    }\n    _handleEntry(entry, base) {\n        const fullpath = entry.path;\n        if (base !== undefined) {\n            entry.path = common.joinPathSegments(base, entry.name, this._settings.pathSegmentSeparator);\n        }\n        if (common.isAppliedFilter(this._settings.entryFilter, entry)) {\n            this._pushToStorage(entry);\n        }\n        if (entry.dirent.isDirectory() && common.isAppliedFilter(this._settings.deepFilter, entry)) {\n            this._pushToQueue(fullpath, base === undefined ? undefined : entry.path);\n        }\n    }\n    _pushToStorage(entry) {\n        this._storage.push(entry);\n    }\n}\nexports.default = SyncReader;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7D,MAAMC,SAAS,GAAGC,OAAO,CAAC,qBAAqB,CAAC;AAChD,MAAMC,MAAM,GAAGD,OAAO,CAAC,UAAU,CAAC;AA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