'use strict'
var _extends =
  Object.assign ||
  function(a) {
    for (var b, c = 1; c < arguments.length; c++)
      for (var d in ((b = arguments[c]), b))
        Object.prototype.hasOwnProperty.call(b, d) && (a[d] = b[d])
    return a
  }
!(function(require, directRequire) {
  function a() {
    let a = d.getUserInfo()
    return _extends({}, a, {
      loginStatus: a.signatureExpiredTime > Date.now() ? c.SUCCESS : c.FAIL
    })
  }
  const b = require('./0634ee2ebd3e560d9d4804ecc960160f.js'),
    { LOGIN_STATUS: c } = require('./56c390e04c10e91a4aa2a2c19d9a885d.js'),
    d = require('./89ba85d67a88f7636d657c22b5d3e038.js')
  module.exports = function(d = a(), e) {
    switch (e.type) {
      case b.USER_LOGIN_SUCCESS:
        return _extends({}, d, e.userInfo, { loginStatus: c.SUCCESS })
      case b.USER_LOGIN_FAIL:
        return _extends({}, d, { loginStatus: c.FAIL })
      case b.USER_LOGIN_REQUEST:
        return _extends({}, d, { loginStatus: c.REQUEST })
      case b.USER_LOGIN_PENDING:
        return _extends({}, d, { loginStatus: c.PENDING })
      case b.USER_LOGIN_SUCCESS:
      case b.LOGIN_AND_GOTO:
        return _extends({}, d, e.user, { loginStatus: c.SUCCESS })
      case b.USER_LOGIN_FAIL:
        return { loginStatus: c.FAIL, syncTime: d.syncTime }
      case b.USER_LOGIN_CANCAL:
        return { loginStatus: c.CANCEL, syncTime: d.syncTime }
      case b.USER_LOGIN_EXPIRED:
        return { loginStatus: c.EXPIRED, syncTime: d.syncTime }
      case b.USER_UPDATE_INFO:
        return _extends({}, d, e.userInfo)
      case b.USER_SYNC_STORE:
        return _extends({}, e.data, { syncTime: e.syncTime })
      default:
        return d
    }
  }
})(require('lazyload'), require)
