'use strict'
!(function(require, directRequire) {
  const a = require('fs'),
    b = require('path'),
    c = require('source-map')
  module.exports = (c, d) => {
    let e
    try {
      d || (d = a.readFileSync(c))
      const f = /\/\/[#|@] sourceMappingURL=[\s]*(\S*)[\s]*$/.exec(d),
        g = b.dirname(c),
        h = b.basename(c)
      if (f && f[1]) {
        if (/\.js\.map$/.test(f[1]))
          (e = a.readFileSync(b.join(g, f[1]))), (e = JSON.parse(e))
        else {
          const a = f[1].split('base64,')[1]
          ;(e = Buffer.from(a, 'base64').toString()), (e = JSON.parse(e))
        }
        return e
      }
      const i = b.join(g, `${h}.map`)
      a.existsSync(i) && ((e = a.readFileSync(i)), (e = JSON.parse(e)))
    } catch (a) {
      e = void 0
    }
    return e
  }
})(require('lazyload'), require)
