'use strict'
!(function(require, directRequire) {
  const a = require('./Simulator.js'),
    b = require('./dca9191eced65b3831d60c02d8d487c2.js'),
    c = require('./cef09d3782d104f6af75b4b32af353e6.js'),
    d = require('./a8c87029da0fa06e986298d447ab0fe2.js'),
    e = require('./ba23d8b47b1f4ea08b9fd49939b9443f.js'),
    f = require('redux'),
    g = require('./d3976cc01aeebc5b09e11c4135b6bd8d.js'),
    { connect: h } = require('react-redux')
  module.exports = h(
    a => {
      let b = a.window.simulator || {},
        c = a.window.debug || {},
        d = a.window.editor || {},
        e = a.toolbar.deviceInfo,
        f = a.simulator.pickerInfo || {},
        g = a.simulator.groupInfo || {},
        h = a.simulator.cardInfo,
        i = a.simulator.location || {},
        j = a.simulator.appConfig || {},
        k = j.tabBar || {},
        l = ((j.global || {}).window || {}).enableFullScreen,
        m = ((j.global || {}).window || {}).navigationStyle || 'default',
        n = (a.project.current || {}).libVersion || '1.7.0',
        o = a.toolbar.deviceScale,
        p = (e.screenWidth + 100) * o,
        q = a.window.simulator.width
      'popup' === b.position && (o = 1)
      let r = (a.webdebugger && a.webdebugger.cardInfo) || {}
      return (
        global.onlySimulator && (p = e.screenWidth * o),
        {
          enableFullScreen: l,
          navigationStyle: m,
          shellMinWidth: p,
          libVersion: n,
          vibrate: a.simulator.vibrate,
          deviceScale: o,
          show: b.show,
          workbenchShow: c.show || d.show,
          position: b.position,
          isPopup: 'popup' === b.position,
          appLaunched: a.simulator.appLaunched,
          screenWidth: e.screenWidth,
          screenHeight: e.screenHeight,
          tabbarHeight: e.tabbarHeight,
          statusbarHeight: e.statusbarHeight,
          navigationbarHeight: e.navigationbarHeight,
          currentWebviewID: a.simulator.currentWebviewID,
          webviewInfos: a.simulator.webviewInfos,
          anyHtmlWebviewInfo: a.simulator.anyHtmlWebviewInfo,
          standbyWebview: a.simulator.standbyWebview,
          backgroundShow: a.simulator.backgroundShow,
          project: a.project.current,
          switch: {
            selectorPickerShow: f.show && 'selector' == f.mode,
            datePickerShow: f.show && 'date' == f.mode,
            timePickerShow: f.show && 'time' == f.mode,
            multiPickerShow: f.show && 'multi' == f.mode,
            paymentShow: a.simulator.payment.show,
            confirmShow: a.simulator.confirm.show,
            authorizeShow: a.simulator.authorize.show
          },
          window: {
            locationShow: i.show,
            groupShow: g.show,
            settingShow: a.simulator.setting.show,
            addPhoneContactShow: a.simulator.addPhoneContact.show,
            chooseAddressShow: a.simulator.chooseAddress.show,
            chooseInvoiceTitleShow: a.simulator.chooseInvoiceTitle.show,
            addCardShow: 'addcard' == h.show,
            viewCardShow: 'viewcard' == h.show,
            h5AddCardShow: 'addcard' == r.show,
            h5ViewCardShow: 'viewcard' == r.show,
            h5ChooseCardShow: 'choosecard' == r.show
          },
          tabbarPosition: k.position,
          tabbarShow: a.simulator.tabbar.show
        }
      )
    },
    a => {
      return {
        assdkActions: g.bindActionCreators(b, a),
        jssdkActions: g.bindActionCreators(c, a),
        simulatorActions: g.bindActionCreators(e, a),
        windowActions: g.bindActionCreators(d, a)
      }
    }
  )(a)
})(require('lazyload'), require)
