'use strict'
!(function(require, directRequire) {
  const a = require('source-map'),
    b = require('acorn')
  module.exports = function(c, d, e = 0, f = 'weapp:///') {
    let g
    try {
      const h = new a.SourceMapGenerator({ file: c }),
        i = b.tokenizer(d, { locations: !0 })
      for (;;) {
        const a = i.getToken()
        if ('eof' === a.type.label) break
        const b = {
          original: a.loc.start,
          generated: { line: a.loc.start.line + e, column: a.loc.start.column },
          source: f + c
        }
        'name' === a.type.label && (b.name = a.value), h.addMapping(b)
      }
      h.setSourceContent(f + c, d),
        (g =
          '//# sourceMappingURL=data:application/json;charset=utf-8;base64,' +
          new Buffer(h.toString()).toString('base64')),
        (g += '\n//# sourceURL=' + 'file:///' + c)
    } catch (a) {
      g = '// (source map generate failed)'
    }
    return g
  }
})(require('lazyload'), require)
