'use strict'
!(function(require, directRequire) {
  function a() {
    B = ''
  }
  function b(b, c) {
    let e = d.extname(c)
    '.wxss' === e || '.wxml' === e ? a() : 'app.json' == c && a()
  }
  async function c(c) {
    if (A) {
      let b = A.setting && A.setting.newFeature,
        d = c.setting && c.setting.newFeature
      b != d && a()
    }
    A = c
    let d = await h(c)
    ;(z && z.srcPath == d.srcPath) ||
      (a(), z && z.unWatch(b), (z = d), z.watch(b))
  }
  const d = require('path'),
    e = require('./d28a711224425b00101635efe1034c99.js'),
    f = require('./3e4c71c2a2cc438e1b3afc3fb10bd4b6.js'),
    g = require('./709f7f8328edb932b1169de8b7e694dd.js'),
    h = require('./162bf2ee28b76d3b3d95b685cede4146.js'),
    i = require('./0a856a8f0b27fbeca81fbaabad89dd1e.js'),
    j = require('./949d8235c744ced2a80121e4dba34c28.js'),
    k = require('./6238a86bb7a55c11aa0f9eb335d0f34c.js'),
    l = require('./2dfc6a3df6d6fc51266b293c8420e88b.js'),
    m = require('./bc78839ccca8df9e5ceeb7fae11b7be2.js'),
    n = require('./56c390e04c10e91a4aa2a2c19d9a885d.js'),
    o = require('./6242f55dbdfe53c2f07b7a51568311f2.js').errorPrefix,
    p = require('./6b5b303ea4d41abf4ecefba647ca75dc.js'),
    {
      jsDebug: q,
      htmlBegin: r,
      htmlEnd: s,
      htmlReady: t,
      errorTpl: u,
      devVendorList: v,
      vendorList: w,
      plugincodePlaceholder: x
    } = require('./59a36d89a8b99d7d2d809add2cecd72e.js'),
    y = global.appConfig.isDev && !nw.App.manifest.forceVendor ? v : w
  var z,
    A,
    B = '',
    C = {}
  e.on('VENDOR_CONFIG_CHANGE', a),
    e.on('VENDOR_VERSION_CHANGE', a),
    (module.exports = async function(b, e = {}) {
      await c(b)
      const h = m.getState(),
        o = h.toolbar.deviceInfo
      if (((C.width != o.width || C.pixelRatio != o.dpr) && a(), (C = o), !B))
        try {
          var p = [r],
            v = { pixelRatio: o.dpr, width: o.screenWidth }
          p.push(
            `<script> window.__deviceInfo__ = ${JSON.stringify(v)} </script>`
          ),
            p.push(`<script>${q}</script>`)
          let a = []
          for (let b = 0, c = y.length; b < c; b++) {
            let c = y[b],
              e = d.extname(c)
            '.js' === e
              ? a.push(`<script src='./__dev__/${c}'></script>`)
              : '.css' === e &&
                p.push(
                  `<link rel="stylesheet" type="text/css" href='./__dev__/${c}' />`
                )
          }
          let c = await f(b, { app: !0 })
          p.push(`<script>${c.code}</script>`)
          let e = await g(b, { app: !0 })
          if (e) {
            var w = e
            p.push(`<script>eval('${w}')</script>`)
          }
          let h = await i(b, { app: !0 })
          p.push(`<script>eval('${h}')</script>`),
            p.push(x),
            p.push(s),
            p.push(a.join('\n')),
            p.push(t),
            (B = p.join('\n'))
        } catch (a) {
          let c
          if (
            (a.code === j.TRANS_WXML_JS_ERR
              ? (c = await k.parseWxmlErr(b, a.msgForConsole))
              : a.code === j.TRANS_WXSS_JS_ERR &&
                (c = await k.parseWxssErr(b, a)),
            c)
          ) {
            const b = u.replace(
              '{{error}}',
              (c.file ? `in File: ${c.file}` : '') +
                (c.msg
                  ? `<pre style="white-space:pre-wrap; font-family: monospace;">${c.msg
                      .replace(/</g, '&lt;')
                      .replace(/>/g, '&gt;')}</pre>`
                  : '') +
                (a.message ? `<p>${a.message}</p>` : '')
            )
            throw new Error(b)
          } else l.display({ command: n.DISPLAY_ERROR, data: { error: a } })
        }
      return B
    })
})(require('lazyload'), require)
