'use strict'
!(function(require, directRequire) {
  function a(a) {
    return a.slice(g, h).readInt32BE()
  }
  function b(a) {
    return a.slice(i, j).readInt32BE()
  }
  function c(c) {
    let d = a(c),
      e = b(c),
      f = c.slice(k, k + d),
      g = [],
      h = k
    for (let a = 0; a < e; a++) {
      let a = {},
        b = c.slice(h, h + 4).readInt32BE()
      ;(h += 4),
        (a.fileName = c.slice(h, h + b).toString()),
        (h += b),
        (a.offset = c.slice(h, h + 4).readInt32BE()),
        (h += 4),
        (a.length = c.slice(h, h + 4).readInt32BE()),
        (h += 4),
        g.push(a)
    }
    return g
  }
  const d = require('fs'),
    e = require('mkdir-p'),
    f = require('path'),
    g = 5,
    h = 9,
    i = 14,
    j = 18,
    k = 18
  module.exports = function(a, b = void 0) {
    let g,
      h = c(a)
    return (
      b || (g = new Map()),
      h.forEach(c => {
        let h = c.fileName,
          i = c.offset,
          j = c.length,
          k = a.slice(i, i + j)
        if (b) {
          let a = f.join(b, h),
            c = f.dirname(h)
          e.sync(f.join(b, c)), d.writeFileSync(a, k)
        } else g.set(h, k)
      }),
      b ? void 0 : g
    )
  }
})(require('lazyload'), require)
