{"version":3,"sources":["jsdelivr-header.js","/npm/md-links-karina-macedo@0.2.0/index.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OCHE,aACA,gBACA,8BACA,WACA,YACA,mBACK,uBAEA,MAAM,QAAU,CAAC,EAAM,IAAW,IAAI,SAAQ,CAAC,EAAS,KAC7D,GAAK,aAAa,GAEX,CACL,MAAM,EAAgB,gBAAgB,GAA8C,EAAtC,8BAA8B,GACtE,EAAe,WAAW,GAChC,GAA4B,IAAxB,EAAa,OACf,EAAO,uCACF,CACL,MAAM,EAAa,YAAY,GACL,IAAtB,EAAW,OACb,EAAO,gCAEP,EADS,IAAqB,IAAX,EACX,eAAe,GAEf,EAEZ,CACF,MAhBE,EAAO,mCAAmC,IAgB5C","file":"/npm/md-links-karina-macedo@0.2.0/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/md-links-karina-macedo@0.2.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","/* eslint-disable prefer-promise-reject-errors */\r\n/* eslint-disable no-unused-vars */\r\nimport {\r\n  getPathExist,\r\n  getPathAbsolute,\r\n  convertRelativeToAbsolutePath,\r\n  getArrayMD,\r\n  obtainLinks,\r\n  getHTTPRequest,\r\n} from './md-links.js';\r\n\r\nexport const mdLinks = (path, option) => new Promise((resolve, reject) => {\r\n  if (!getPathExist(path)) {\r\n    reject(`ERROR: Could not find this path ${path}`);\r\n  } else {\r\n    const absolutePath = !getPathAbsolute(path) ? convertRelativeToAbsolutePath(path) : path;\r\n    const arrayFilesMD = getArrayMD(absolutePath);\r\n    if (arrayFilesMD.length === 0) {\r\n      reject('Not MD files found on this path');\r\n    } else {\r\n      const arrayLinks = obtainLinks(arrayFilesMD);\r\n      if (arrayLinks.length === 0) {\r\n        reject('Not links found on this path');\r\n      } else if (option && option === true) {\r\n        resolve(getHTTPRequest(arrayLinks));\r\n      } else {\r\n        resolve(arrayLinks);\r\n      }\r\n    }\r\n  }\r\n});\r\n"]}