'use strict'
!(function(require, directRequire) {
  const a = require('path'),
    b = require('./bc78839ccca8df9e5ceeb7fae11b7be2.js'),
    c = require('./8a145c66a3f53e0aff94a871ac692d06.js'),
    {
      jsDebug: d,
      htmlBegin: e,
      htmlEnd: f,
      htmlReady: g,
      errorTpl: h,
      devVendorList: i,
      vendorList: j,
      plugincodePlaceholder: k
    } = require('./59a36d89a8b99d7d2d809add2cecd72e.js'),
    l = global.appConfig.isDev && !nw.App.manifest.forceVendor ? i : j
  module.exports = async function(f, h = {}) {
    const i = await c(f),
      j = b.getState(),
      k = j.toolbar.deviceInfo
    var m = []
    const n = i['/page-frame.html'] || ''
    if (n) m.push(n.toString())
    else {
      m.push(e)
      const a = i['/page-frame.js'],
        b = i['/app-wxss.js']
      m.push(`<script>${a.toString().replace(/\\n/g, '\\\\n')}</script>`),
        m.push(`<script>${b.toString()}</script>`)
    }
    var o = { pixelRatio: k.dpr, width: k.screenWidth }
    m.push(`<script> window.__deviceInfo__ = ${JSON.stringify(o)} </script>`),
      m.push(`<script>${d}</script>`)
    let p = []
    for (let b = 0, c = l.length; b < c; b++) {
      let c = l[b],
        d = a.extname(c)
      '.js' === d
        ? p.push(`<script src='./__dev__/${c}'></script>`)
        : '.css' === d &&
          p.push(
            `<link rel="stylesheet" type="text/css" href='./__dev__/${c}' />`
          )
    }
    return (m = p.concat(m)), m.push(g), m.join('\n')
  }
})(require('lazyload'), require)
