{"ast":null,"code":"'use strict';\n\nvar _asyncToGenerator = require(\"D:\\\\Development\\\\Work\\\\CENOS\\\\cenos-ui\\\\node_modules\\\\@angular-devkit\\\\build-angular\\\\node_modules\\\\@babel\\\\runtime\\\\helpers\\\\asyncToGenerator.js\").default;\n\nconst fs = require('fs');\n\nconst path = require('path');\n\nconst {\n  promisify\n} = require('util');\n\nconst semver = require('semver');\n\nconst useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0'); // https://github.com/nodejs/node/issues/8987\n// https://github.com/libuv/libuv/pull/1088\n\nconst checkPath = pth => {\n  if (process.platform === 'win32') {\n    const pathHasInvalidWinCharacters = /[<>:\"|?*]/.test(pth.replace(path.parse(pth).root, ''));\n\n    if (pathHasInvalidWinCharacters) {\n      const error = new Error(`Path contains invalid characters: ${pth}`);\n      error.code = 'EINVAL';\n      throw error;\n    }\n  }\n};\n\nconst processOptions = options => {\n  // https://github.com/sindresorhus/make-dir/issues/18\n  const defaults = {\n    mode: 0o777,\n    fs\n  };\n  return { ...defaults,\n    ...options\n  };\n};\n\nconst permissionError = pth => {\n  // This replicates the exception of `fs.mkdir` with native the\n  // `recusive` option when run on an invalid drive under Windows.\n  const error = new Error(`operation not permitted, mkdir '${pth}'`);\n  error.code = 'EPERM';\n  error.errno = -4048;\n  error.path = pth;\n  error.syscall = 'mkdir';\n  return error;\n};\n\nconst makeDir = /*#__PURE__*/function () {\n  var _ref = _asyncToGenerator(function* (input, options) {\n    checkPath(input);\n    options = processOptions(options);\n    const mkdir = promisify(options.fs.mkdir);\n    const stat = promisify(options.fs.stat);\n\n    if (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) {\n      const pth = path.resolve(input);\n      yield mkdir(pth, {\n        mode: options.mode,\n        recursive: true\n      });\n      return pth;\n    }\n\n    const make = /*#__PURE__*/function () {\n      var _ref2 = _asyncToGenerator(function* (pth) {\n        try {\n          yield mkdir(pth, options.mode);\n          return pth;\n        } catch (error) {\n          if (error.code === 'EPERM') {\n            throw error;\n          }\n\n          if (error.code === 'ENOENT') {\n            if (path.dirname(pth) === pth) {\n              throw permissionError(pth);\n            }\n\n            if (error.message.includes('null bytes')) {\n              throw error;\n            }\n\n            yield make(path.dirname(pth));\n            return make(pth);\n          }\n\n          try {\n            const stats = yield stat(pth);\n\n            if (!stats.isDirectory()) {\n              throw new Error('The path is not a directory');\n            }\n          } catch (_) {\n            throw error;\n          }\n\n          return pth;\n        }\n      });\n\n      return function make(_x3) {\n        return _ref2.apply(this, arguments);\n      };\n    }();\n\n    return make(path.resolve(input));\n  });\n\n  return function makeDir(_x, _x2) {\n    return _ref.apply(this, arguments);\n  };\n}();\n\nmodule.exports = makeDir;\n\nmodule.exports.sync = (input, options) => {\n  checkPath(input);\n  options = processOptions(options);\n\n  if (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {\n    const pth = path.resolve(input);\n    fs.mkdirSync(pth, {\n      mode: options.mode,\n      recursive: true\n    });\n    return pth;\n  }\n\n  const make = pth => {\n    try {\n      options.fs.mkdirSync(pth, options.mode);\n    } catch (error) {\n      if (error.code === 'EPERM') {\n        throw error;\n      }\n\n      if (error.code === 'ENOENT') {\n        if (path.dirname(pth) === pth) {\n          throw permissionError(pth);\n        }\n\n        if (error.message.includes('null bytes')) {\n          throw error;\n        }\n\n        make(path.dirname(pth));\n        return make(pth);\n      }\n\n      try {\n        if (!options.fs.statSync(pth).isDirectory()) {\n          throw new Error('The path is not a directory');\n        }\n      } catch (_) {\n        throw error;\n      }\n    }\n\n    return pth;\n  };\n\n  return make(path.resolve(input));\n};","map":{"version":3,"sources":["D:/Development/Work/CENOS/cenos-ui/node_modules/make-dir/index.js"],"names":["fs","require","path","promisify","semver","useNativeRecursiveOption","satisfies","process","version","checkPath","pth","platform","pathHasInvalidWinCharacters","test","replace","parse","root","error","Error","code","processOptions","options","defaults","mode","permissionError","errno","syscall","makeDir","input","mkdir","stat","resolve","recursive","make","dirname","message","includes","stats","isDirectory","_","module","exports","sync","mkdirSync","statS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MAAAA,OAAO,CAACrB,EAAR,CAAW2C,SAAX,CAAqBjC,GAArB,EAA0BW,OAAO,CAACE,IAAlC;AACA,KAFD,CAEE,OAAON,KAAP,EAAc;AACf,UAAIA,KAAK,CAACE,IAAN,KAAe,OAAnB,EAA4B;AAC3B,cAAMF,KAAN;AACA;;AAED,UAAIA,KAAK,CAACE,IAAN,KAAe,QAAnB,EAA6B;AAC5B,YAAIjB,IAAI,CAACgC,OAAL,CAAaxB,GAAb,MAAsBA,GAA1B,EAA+B;AAC9B,gBAAMc,eAAe,CAACd,GAAD,CAArB;AACA;;AAED,YAAIO,KAAK,CAACkB,OAAN,CAAcC,QAAd,CAAuB,YAAvB,CAAJ,EAA0C;AACzC,gBAAMnB,KAAN;AACA;;AAEDgB,QAAAA,IAAI,CAAC/B,IAAI,CAACgC,OAAL,CAAaxB,GAAb,CAAD,CAAJ;AACA,eAAOuB,IAAI,CAACvB,GAAD,CAAX;AACA;;AAED,UAAI;AACH,YAAI,CAACW,OAAO,CAACrB,EAAR,CAAW4C,QAAX,CAAoBlC,GAApB,EAAyB4B,WAAzB,EAAL,EAA6C;AAC5C,gBAAM,IAAIpB,KAAJ,CAAU,6BAAV,CAAN;AACA;AACD,OAJD,CAIE,OAAOqB,CAAP,EAAU;AACX,cAAMtB,KAAN;AACA;AACD;;AAED,WAAOP,GAAP;AACA,GA/BD;;AAiCA,SAAOuB,IAAI,CAAC/B,IAAI,CAAC6B,OAAL,CAAaH,KAAb,CAAD,CAAX;AACA,CAjDD","sourcesContent":["'use strict';\nconst fs = require('fs');\nconst path = require('path');\nconst {promisify} = require('util');\nconst semver = require('semver');\n\nconst useNativeRecursiveOption = semver.satisfies(process.version, '>=10.12.0');\n\n// https://github.com/nodejs/node/issues/8987\n// https://github.com/libuv/libuv/pull/1088\nconst checkPath = pth => {\n\tif (process.platform === 'win32') {\n\t\tconst pathHasInvalidWinCharacters = /[<>:\"|?*]/.test(pth.replace(path.parse(pth).root, ''));\n\n\t\tif (pathHasInvalidWinCharacters) {\n\t\t\tconst error = new Error(`Path contains invalid characters: ${pth}`);\n\t\t\terror.code = 'EINVAL';\n\t\t\tthrow error;\n\t\t}\n\t}\n};\n\nconst processOptions = options => {\n\t// https://github.com/sindresorhus/make-dir/issues/18\n\tconst defaults = {\n\t\tmode: 0o777,\n\t\tfs\n\t};\n\n\treturn {\n\t\t...defaults,\n\t\t...options\n\t};\n};\n\nconst permissionError = pth => {\n\t// This replicates the exception of `fs.mkdir` with native the\n\t// `recusive` option when run on an invalid drive under Windows.\n\tconst error = new Error(`operation not permitted, mkdir '${pth}'`);\n\terror.code = 'EPERM';\n\terror.errno = -4048;\n\terror.path = pth;\n\terror.syscall = 'mkdir';\n\treturn error;\n};\n\nconst makeDir = async (input, options) => {\n\tcheckPath(input);\n\toptions = processOptions(options);\n\n\tconst mkdir = promisify(options.fs.mkdir);\n\tconst stat = promisify(options.fs.stat);\n\n\tif (useNativeRecursiveOption && options.fs.mkdir === fs.mkdir) {\n\t\tconst pth = path.resolve(input);\n\n\t\tawait mkdir(pth, {\n\t\t\tmode: options.mode,\n\t\t\trecursive: true\n\t\t});\n\n\t\treturn pth;\n\t}\n\n\tconst make = async pth => {\n\t\ttry {\n\t\t\tawait mkdir(pth, options.mode);\n\n\t\t\treturn pth;\n\t\t} catch (error) {\n\t\t\tif (error.code === 'EPERM') {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tif (error.code === 'ENOENT') {\n\t\t\t\tif (path.dirname(pth) === pth) {\n\t\t\t\t\tthrow permissionError(pth);\n\t\t\t\t}\n\n\t\t\t\tif (error.message.includes('null bytes')) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tawait make(path.dirname(pth));\n\n\t\t\t\treturn make(pth);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tconst stats = await stat(pth);\n\t\t\t\tif (!stats.isDirectory()) {\n\t\t\t\t\tthrow new Error('The path is not a directory');\n\t\t\t\t}\n\t\t\t} catch (_) {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\treturn pth;\n\t\t}\n\t};\n\n\treturn make(path.resolve(input));\n};\n\nmodule.exports = makeDir;\n\nmodule.exports.sync = (input, options) => {\n\tcheckPath(input);\n\toptions = processOptions(options);\n\n\tif (useNativeRecursiveOption && options.fs.mkdirSync === fs.mkdirSync) {\n\t\tconst pth = path.resolve(input);\n\n\t\tfs.mkdirSync(pth, {\n\t\t\tmode: options.mode,\n\t\t\trecursive: true\n\t\t});\n\n\t\treturn pth;\n\t}\n\n\tconst make = pth => {\n\t\ttry {\n\t\t\toptions.fs.mkdirSync(pth, options.mode);\n\t\t} catch (error) {\n\t\t\tif (error.code === 'EPERM') {\n\t\t\t\tthrow error;\n\t\t\t}\n\n\t\t\tif (error.code === 'ENOENT') {\n\t\t\t\tif (path.dirname(pth) === pth) {\n\t\t\t\t\tthrow permissionError(pth);\n\t\t\t\t}\n\n\t\t\t\tif (error.message.includes('null bytes')) {\n\t\t\t\t\tthrow error;\n\t\t\t\t}\n\n\t\t\t\tmake(path.dirname(pth));\n\t\t\t\treturn make(pth);\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\tif (!options.fs.statSync(pth).isDirectory()) {\n\t\t\t\t\tthrow new Error('The path is not a directory');\n\t\t\t\t}\n\t\t\t} catch (_) {\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t}\n\n\t\treturn pth;\n\t};\n\n\treturn make(path.resolve(input));\n};\n"]},"metadata":{},"sourceType":"script"}