require('../../@babel/runtime/helpers/Arrayincludes'),
  (wx.webpackJsonp = wx.webpackJsonp || []).push([
    [4396],
    {
      7702: function (e, n, r) {
        var a = r(4160),
          t = r(5652),
          i = r(2555),
          o = r(4576),
          s = r(3523),
          c = r(469),
          u = r(29),
          l = (0, r(5517).A)(
            function e() {
              ;(0, u.A)(this, e), (this.messages = []), (this.actionList = [])
            },
            [
              {
                key: 'handleMessages',
                value: function () {
                  var e,
                    n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : [],
                    r = (0, c.A)(n)
                  try {
                    for (r.s(); !(e = r.n()).done; ) {
                      var a = e.value
                      if ('share' === a.type) this.messages.push(a)
                      else {
                        var t,
                          i = (0, c.A)(this.actionList)
                        try {
                          for (i.s(); !(t = i.n()).done; ) {
                            var o = t.value
                            o.type === a.type && o.handle(a.data)
                          }
                        } catch (e) {
                          i.e(e)
                        } finally {
                          i.f()
                        }
                      }
                    }
                  } catch (e) {
                    r.e(e)
                  } finally {
                    r.f()
                  }
                },
              },
              {
                key: 'getShareMessageData',
                value: function (e) {
                  for (var n = null, r = this.messages.length - 1; r >= 0; r--) {
                    var a = this.messages[r]
                    if (e === a.data.originUrl) {
                      n = a
                      break
                    }
                  }
                  return n ? n.data : null
                },
              },
              {
                key: 'addAction',
                value: function (e) {
                  this.actionList.push(e)
                },
              },
            ],
          ),
          d = r(3816),
          f = r(4911),
          m = r(7422),
          v = r(3150),
          h = r(104),
          p = r(9148),
          g = r(2658),
          w = r(6432),
          A = function (e) {
            if (e) {
              var n = ((0, w.Jt)('cdnGlobalConfig') || {}).shareConfigList,
                r = void 0 === n ? [] : n,
                a = r.findLastIndex(function (n) {
                  var r = n.channel,
                    a = n.path,
                    t = new RegExp(a, 'g')
                  return 'damai_wechat' === r && t.test(e)
                })
              return -1 !== a ? r[a] : void 0
            }
          },
          y = r(4269),
          b = r(758),
          U = r(2573),
          k = r.n(U),
          x = r(5765),
          J = r(6516),
          V = r(9294),
          L = r(9933),
          S = (function () {
            var e = (0, i.A)(
              (0, t.A)().m(function e() {
                var n, r, a, i, s, c, u, l, d
                return (0, t.A)().w(
                  function (e) {
                    for (;;)
                      switch ((e.p = e.n)) {
                        case 0:
                          return (e.p = 0), (e.n = 1), V.A.getEncryptUserInfo()
                        case 1:
                          if (((n = e.v), (r = (0, o.A)(n, 2)), (a = r[0]), (i = r[1]), !a)) {
                            e.n = 2
                            break
                          }
                          return k().showToast({ title: '获取用户信息异常，请稍后再试', icon: 'none' }), e.a(2, null)
                        case 2:
                          return (
                            (c = (s = i || {}).encryptUserNick),
                            (u = s.encryptUserId),
                            (l = s.headImgUrl),
                            (d = s.domainId),
                            e.a(2, {
                              nickName: k().arrayBufferToBase64((0, p.UG)(c)),
                              openId: u,
                              avatar: (0, L.zp)({ url: l }),
                              applicationId: d,
                            })
                          )
                        case 3:
                          return (e.p = 3), e.v, e.a(2, null)
                      }
                  },
                  e,
                  null,
                  [[0, 3]],
                )
              }),
            )
            return function () {
              return e.apply(this, arguments)
            }
          })(),
          W = r(7884),
          O = '',
          Z = [
            '/shows/orders.html',
            '/shows/ticket/list.html',
            '/shows/ticket/detail.html',
            '/shows/pages/my-comment.html',
            '/shows/pages/save-comment.html',
            '/movies/coupons/list.html',
            '/shows/mine/certificate.html',
            '/shows/mine/audience.html',
            '/shows/pages/address-list.html',
            '/shows/mine/feedback.html',
            '/shows/mine/follow.html',
            '/damai/activity/waitcomment/index.html',
            '/moviemine/pages/coupon-list/index.html',
            '/damai/mine/certificate/index.html',
            '/damai/activity/savecomment/index.html',
          ],
          R = ['/shows/pages/show-calendar.html'],
          I = function (e) {
            try {
              var n = new x.g(e),
                r = null == n ? void 0 : n.pathname,
                a = null == n ? void 0 : n.hostname,
                t = null == n ? void 0 : n.params,
                i = 'yes' === (null == t ? void 0 : t.has_login),
                o = Z.indexOf(r) > -1 || 'yes' === (null == t ? void 0 : t.free_login),
                s = R.indexOf(r) > -1,
                c = g.aS.some(function (n) {
                  return 'string' == typeof e && e.includes(n)
                }),
                u = /ai-alimebot\.lydaas\.com/.test(a)
              return {
                url: e,
                path: r,
                hostname: a,
                hasLogin: i,
                isXiaomi: u,
                needFreeLogin: o,
                isOuterDomain: c,
                shouldFreeLoginAfterLogin: s,
              }
            } catch (e) {
              return {}
            }
          },
          C = (function () {
            var e = (0, i.A)(
              (0, t.A)().m(function e() {
                var n, r, a
                return (0, t.A)().w(function (e) {
                  for (;;)
                    switch (e.n) {
                      case 0:
                        return (e.n = 1), d.A.isLogin()
                      case 1:
                        if ((n = e.v)) {
                          e.n = 3
                          break
                        }
                        return (e.n = 2), d.A.login()
                      case 2:
                        ;(r = e.v), (a = r.success), (n = a)
                      case 3:
                        return e.a(2, n)
                    }
                }, e)
              }),
            )
            return function () {
              return e.apply(this, arguments)
            }
          })(),
          G = (function () {
            var e = (0, i.A)(
              (0, t.A)().m(function e() {
                var n, r, a, i
                return (0, t.A)().w(function (e) {
                  for (;;)
                    switch (e.n) {
                      case 0:
                        if (!O) {
                          e.n = 1
                          break
                        }
                        return e.a(2, O)
                      case 1:
                        return (e.n = 2), W.X.getMxmAccessToken({ sid: d.A.getSid() })
                      case 2:
                        return (n = e.v), (r = (0, o.A)(n, 2)), (a = r[0]), (i = r[1]), !a && i && (O = i), e.a(2, O)
                    }
                }, e)
              }),
            )
            return function () {
              return e.apply(this, arguments)
            }
          })(),
          j = function (e) {
            var n = e.uri,
              r = e.params,
              a = new x.g(n),
              t = (null == a ? void 0 : a.params) || {},
              i = r ? Object.keys(r) : []
            if (i.length) {
              var o,
                s = (0, c.A)(i)
              try {
                for (s.s(); !(o = s.n()).done; ) {
                  var u = o.value
                  t[u] = null == r ? void 0 : r[u]
                }
              } catch (e) {
                s.e(e)
              } finally {
                s.f()
              }
            }
            return a.toString()
          },
          X = (function () {
            var e = (0, i.A)(
              (0, t.A)().m(function e(n) {
                var r, a
                return (0, t.A)().w(function (e) {
                  for (;;)
                    switch (e.n) {
                      case 0:
                        return (r = n), (e.n = 1), G()
                      case 1:
                        return (
                          (a = e.v)
                            ? (J.A.show('登录成功'), (r = j({ uri: n, params: { _user_access_token: a } })))
                            : J.A.show('登录失败，请稍后重试'),
                          e.a(2, r)
                        )
                    }
                }, e)
              }),
            )
            return function (n) {
              return e.apply(this, arguments)
            }
          })(),
          _ = function (e) {
            var n = (0, w.Jt)('utm_value'),
              r = (0, w.Jt)('sqm_value'),
              a = {}
            return n && (a.utm = n), r && (a.sqm = r), j({ uri: e, params: a })
          },
          F = (function () {
            var e = (0, i.A)(
              (0, t.A)().m(function e(n) {
                var r, a, i, o, c, u, l, f, m, v, h
                return (0, t.A)().w(function (e) {
                  for (;;)
                    switch (e.n) {
                      case 0:
                        if (
                          ((r = n),
                          (a = I(n)),
                          (i = a.url),
                          (o = a.hasLogin),
                          (c = a.isXiaomi),
                          (u = a.needFreeLogin),
                          (l = a.isOuterDomain),
                          (f = a.shouldFreeLoginAfterLogin),
                          !(l || c || u))
                        ) {
                          e.n = 9
                          break
                        }
                        if (o) {
                          e.n = 2
                          break
                        }
                        return (e.n = 1), C()
                      case 1:
                        if (e.v) {
                          e.n = 2
                          break
                        }
                        return (
                          J.A.show('请登录后再试~'),
                          (m = (0, U.getCurrentPages)()) && m.length >= 2 && k().navigateBack(),
                          e.a(2, '')
                        )
                      case 2:
                        if (((r = s.A.getWeappParamsUrl(r)), !l)) {
                          e.n = 4
                          break
                        }
                        return (e.n = 3), S()
                      case 3:
                        ;(v = e.v) && (r = j({ uri: i, params: v }))
                      case 4:
                        if (!c) {
                          e.n = 6
                          break
                        }
                        return (e.n = 5), X(r)
                      case 5:
                        r = e.v
                      case 6:
                        if (!u) {
                          e.n = 8
                          break
                        }
                        return (e.n = 7), d.A.getH5LoginUrl(r)
                      case 7:
                        r = e.v
                      case 8:
                        e.n = 15
                        break
                      case 9:
                        if (!f) {
                          e.n = 14
                          break
                        }
                        if (((r = s.A.getWeappParamsUrl(r)), (h = o))) {
                          e.n = 11
                          break
                        }
                        return (e.n = 10), d.A.isLogin()
                      case 10:
                        h = e.v
                      case 11:
                        if (!h) {
                          e.n = 13
                          break
                        }
                        return (e.n = 12), d.A.getH5LoginUrl(r)
                      case 12:
                        r = e.v
                      case 13:
                        e.n = 15
                        break
                      case 14:
                        r = s.A.getWeappParamsUrl(r)
                      case 15:
                        return e.a(2, r)
                    }
                }, e)
              }),
            )
            return function (n) {
              return e.apply(this, arguments)
            }
          })(),
          M = r(6070),
          T = function () {
            var e,
              n,
              r = new l(),
              a = (0, U.useRouter)(),
              c = (null == a ? void 0 : a.params) || {},
              u = (0, b.useState)({ showWebView: !1, src: '', originUrl: '' }),
              x = (0, o.A)(u, 2),
              J = x[0],
              V = x[1],
              L = (0, b.useRef)()
            ;(0, U.useLoad)(function () {
              m.A.sendPageEvent(''.concat(m.A.spmA, '.webview.0.0'), c), S()
              var e = (null == c ? void 0 : c.url) || (null == c ? void 0 : c.q)
              if (((n = 'true' === c.isRedirect), (e = decodeURIComponent(e)), (0, p.tp)(e)))
                k().switchTab({ url: '/pages/home/index' })
              else {
                k().onCopyUrl(function () {
                  var e = (0, w.Jt)('currentUrl') || '',
                    n = A(e),
                    r = n || {},
                    a = r.path,
                    t = r.url
                  if (n && t) {
                    var i = new RegExp(a, 'g'),
                      o = e.replace(i, t)
                    return {
                      query: 'action='.concat(
                        encodeURIComponent(JSON.stringify({ type: 'jump', payload: { jumpUrl: o } })),
                      ),
                    }
                  }
                  return { query: 'url='.concat(encodeURIComponent(e)) }
                })
                try {
                  var r = decodeURIComponent(c.action || '')
                  if (r) {
                    var a = (r = JSON.parse(r)),
                      t = a.type,
                      i = a.payload
                    switch (t) {
                      case 'jump':
                        var o = (i || {}).jumpUrl
                        o && f.A.navTo(o, {}, { redirect: !0 })
                    }
                  }
                } catch (e) {}
                W(e, n)
              }
            }),
              (0, U.useUnload)(function () {
                try {
                  k().offCopyUrl(function () {}), e || (d.A.miniLogin && d.A.miniLogin.webViewSync())
                } catch (e) {}
              })
            var S = function () {
              var e = 0
              r.addAction({
                type: 'login',
                handle: (function () {
                  var n = (0, i.A)(
                    (0, t.A)().m(function n(r) {
                      var a
                      return (0, t.A)().w(function (n) {
                        for (;;)
                          switch (n.n) {
                            case 0:
                              if (!((a = new Date().getTime()) - e < 300)) {
                                n.n = 1
                                break
                              }
                              return n.a(2)
                            case 1:
                              ;(e = a),
                                d.A.setWebviewLoginValid(!1),
                                r && r.callbackUrl && f.A.navTo('/pages/login/index', { returnUrl: r.callbackUrl })
                            case 2:
                              return n.a(2)
                          }
                      }, n)
                    }),
                  )
                  return function (e) {
                    return n.apply(this, arguments)
                  }
                })(),
              })
            }
            ;(0, U.useError)(function (e) {})
            var W = (function () {
              var e = (0, i.A)(
                (0, t.A)().m(function e(r, a) {
                  var i, o, c, u, l, d, f, m, h, p, A, y, b
                  return (0, t.A)().w(
                    function (e) {
                      for (;;)
                        switch ((e.p = e.n)) {
                          case 0:
                            if (r) {
                              e.n = 1
                              break
                            }
                            return e.a(2)
                          case 1:
                            if (
                              ((o = r),
                              'm' === (0, w.Jt)('currentEnv') &&
                                (null === (i = o) || void 0 === i ? void 0 : i.indexOf('wapa')) > -1 &&
                                ((0, v.Ay)({ code: 1e3, msg: 'miniapp_link_env_err', m1: 1, c1: o }),
                                (o = o
                                  .replace('market.wapa.damai.cn', 'm.damai.cn')
                                  .replace('m.wapa.taopiaopiao.com', 'm.taopiaopiao.com'))),
                              (c = !0),
                              (e.p = 2),
                              !(y = 'function' == typeof wx[(0, w.Jt)('decode')('Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=')]))
                            ) {
                              e.n = 4
                              break
                            }
                            return (e.n = 3), wx[(0, w.Jt)('decode')('Z2V0UmVuZGVyZXJVc2VyQWdlbnQ=')]()
                          case 3:
                            y = e.v
                          case 4:
                            if ((A = y)) {
                              e.n = 5
                              break
                            }
                            A = ''
                          case 5:
                            ;(u = A),
                              (![
                                (0, w.Jt)('decode')('aW9z'),
                                (0, w.Jt)('decode')('YW5kcm9pZA=='),
                                (0, w.Jt)('decode')('b2hvcw=='),
                              ].includes(
                                wx[(0, w.Jt)('decode')('Z2V0RGV2aWNlSW5mbw==')]()[(0, w.Jt)('decode')('cGxhdGZvcm0=')],
                              ) ||
                                ((0, w.Jt)((0, w.Jt)('decode')('ZW52VmVyc2lvbg==')) ===
                                  (0, w.Jt)('decode')('cmVsZWFzZQ==') &&
                                  !0 ===
                                    wx[(0, w.Jt)('decode')('Z2V0QXBwQmFzZUluZm8=')]()[
                                      (0, w.Jt)('decode')('ZW5hYmxlRGVidWc=')
                                    ]) ||
                                u.indexOf((0, w.Jt)('decode')('d2VjaGF0ZGV2dG9vbHM=')) > -1 ||
                                u.indexOf((0, w.Jt)('decode')('TWluaVByb2dyYW1FbnYvTWFj')) > -1 ||
                                u.indexOf((0, w.Jt)('decode')('TWluaVByb2dyYW1FbnYvV2luZG93cw==')) > -1) &&
                                (c = !1),
                              (e.n = 7)
                            break
                          case 6:
                            ;(e.p = 6),
                              (b = e.v),
                              'function' == typeof v.Ay &&
                                (0, v.Ay)({
                                  code: 1e3,
                                  msg: (0, w.Jt)('decode')('aW50ZXJjZXB0LXBj'),
                                  m1: 1,
                                  c1: JSON.stringify(b.message),
                                })
                          case 7:
                            if (!1 !== c) {
                              e.n = 8
                              break
                            }
                            return e.a(2, !1)
                          case 8:
                            if (
                              ((l = _(o)),
                              (n = a),
                              (d = {}),
                              (f = g.Xw.some(function (e) {
                                return (null == l ? void 0 : l.indexOf(e)) > -1
                              })) && (n = !0),
                              !n)
                            ) {
                              e.n = 11
                              break
                            }
                            if (((m = l), f)) {
                              e.n = 10
                              break
                            }
                            return (e.n = 9), F(l)
                          case 9:
                            m = e.v
                          case 10:
                            ;(d = { src: m, originUrl: l, showWebView: !0 }), (e.n = 13)
                            break
                          case 11:
                            return (h = s.A.getOriginUrl(l)), (e.n = 12), F(h)
                          case 12:
                            ;(p = e.v), (d = { src: p, originUrl: l, showWebView: !0 })
                          case 13:
                            V(d)
                          case 14:
                            return e.a(2)
                        }
                    },
                    e,
                    null,
                    [[2, 6]],
                  )
                }),
              )
              return function (n, r) {
                return e.apply(this, arguments)
              }
            })()
            ;(0, U.useDidShow)(function () {
              var e = k().getStorageSync('redirectUrl')
              e && (W(e, !0), k().removeStorageSync('redirectUrl'))
            })
            return (
              (0, U.useShareAppMessage)(function (e) {
                var n = e.webViewUrl
                n || (n = (0, w.Jt)('currentUrl')),
                  g.Xw.some(function (e) {
                    var r
                    return (null === (r = n || '') || void 0 === r ? void 0 : r.indexOf(e)) > -1
                  }) && (n = J.originUrl)
                var a = r.getShareMessageData(n)
                a || (a = { title: '好友推荐', shareUrl: s.A.getOriginUrl(n) }), a.shareUrl || (a.shareUrl = n)
                var t = s.A.getOriginUrl(a.shareUrl),
                  i = A(n)
                if (i) {
                  var o,
                    c = i.path,
                    u = i.title,
                    l = i.imageUrl,
                    d = i.url,
                    f = new RegExp(c, 'g')
                  return {
                    title: u || a.title || g.b8,
                    imageUrl: l || a.imageUrl,
                    path: d
                      ? null === (o = n) || void 0 === o
                        ? void 0
                        : o.replace(f, d)
                      : '/pages/home/index?type=share&url='.concat(encodeURIComponent(t)),
                  }
                }
                if (
                  g.aS.some(function (e) {
                    var r
                    return null === (r = n) || void 0 === r ? void 0 : r.includes(e)
                  }) &&
                  L.current
                ) {
                  var m = L.current || {},
                    v = m.title,
                    y = m.imgUrl,
                    b = m.linkUrl,
                    U = (0, p.x3)(decodeURIComponent(b))
                  return {
                    title: v || g.b8,
                    imageUrl: y || g.wB,
                    path: '/pages/home/index?type=share&url='.concat(encodeURIComponent(U)),
                  }
                }
                return h.A.createShareObject(a.title, a.imageUrl, t)
              }),
              (null == J ? void 0 : J.showWebView) &&
                (0, M.jsx)(y.SC, {
                  src: null == J ? void 0 : J.src,
                  onMessage: function (n) {
                    var a,
                      t = (null == n || null === (a = n.detail) || void 0 === a ? void 0 : a.data) || []
                    if (t.length > 0) {
                      try {
                        L.current = JSON.parse(t[t.length - 1] || '{}')
                      } catch (e) {}
                      r.handleMessages(n.detail.data)
                    }
                    ;(e = !0), d.A.miniLogin && d.A.miniLogin.webViewSync(n.detail.data[0])
                  },
                  onLoad: function (e) {
                    e.detail && e.detail.src && (0, w.hZ)('currentUrl', e.detail.src)
                  },
                })
            )
          }
        ;(T.enableShareAppMessage = !0),
          Page((0, a.eU)(T, 'pages/webview/index', { root: { cn: [] } }, { enableShareAppMessage: !0 } || {}))
      },
    },
    function (e) {
      e.O(0, [6907, 8096, 2076], function () {
        return (n = 7702), e((e.s = n))
        var n
      }),
        e.O()
    },
  ])
