import {G as Z, r as o, I as f, J as t, aB as A, P as l, K as B, M as ae, ao as _, Q as s, aC as ne, aD as oe, N as c, ap as M, W as Ge, H as D, av as y, au as V, T as Te, R as we, A as be, B as te, C as Ie, E as Re, $ as Le, V as ke, O as W, aY as Ne, bm as Se} from "./common.modules-f9fa5dc7.js";
import {r as Ae, G as $e, R as We, W as Be, a as Me} from "./audio-eb7fb307.js";
import {bP as se, _ as q, bY as z, fp as ie, y as Pe, fq as xe, A as De, fr as Ve, fs as Ee, G as He, eX as Oe, eT as je, eQ as Fe} from "./page-activity-ActivityDetail-0d51a056.js";
import {B as ze, T as Ze, W as qe} from "./WinningTips-87cba752.js";
import {E as Ue} from "./page-activity-Bonus-f5229d51.js";
import {N as Ke} from "./page-home-other-6e2f6e99.js";
import {M as Qe} from "./MyGameRecord-6d217c5c.js";
import {D as Ye} from "./page-activity-Championship-a046222e.js";
import {C as Je} from "./page-saasLottery-D5-6db471d0.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-eb46cb93.js";
import "./en-0806f032.js";
import "./MayrecordList-b2bcbe43.js";
const le = r => (ne("data-v-3e4c6499"),
r = r(),
oe(),
r)
  , Xe = {
    class: "TimeLeft__C"
}
  , et = le( () => t("svg", {
    xmlns: "http://www.w3.org/2000/svg",
    width: "36",
    height: "36",
    viewBox: "0 0 36 36",
    fill: "none"
}, [t("path", {
    d: "M23.67 3H12.33C6.66 3 5.25 4.515 5.25 10.56V27.45C5.25 31.44 7.44 32.385 10.095 29.535L10.11 29.52C11.34 28.215 13.215 28.32 14.28 29.745L15.795 31.77C17.01 33.375 18.975 33.375 20.19 31.77L21.705 29.745C22.785 28.305 24.66 28.2 25.89 29.52C28.56 32.37 30.735 31.425 30.735 27.435V10.56C30.75 4.515 29.34 3 23.67 3ZM11.67 18C10.845 18 10.17 17.325 10.17 16.5C10.17 15.675 10.845 15 11.67 15C12.495 15 13.17 15.675 13.17 16.5C13.17 17.325 12.495 18 11.67 18ZM11.67 12C10.845 12 10.17 11.325 10.17 10.5C10.17 9.675 10.845 9 11.67 9C12.495 9 13.17 9.675 13.17 10.5C13.17 11.325 12.495 12 11.67 12ZM24.345 17.625H16.095C15.48 17.625 14.97 17.115 14.97 16.5C14.97 15.885 15.48 15.375 16.095 15.375H24.345C24.96 15.375 25.47 15.885 25.47 16.5C25.47 17.115 24.96 17.625 24.345 17.625ZM24.345 11.625H16.095C15.48 11.625 14.97 11.115 14.97 10.5C14.97 9.885 15.48 9.375 16.095 9.375H24.345C24.96 9.375 25.47 9.885 25.47 10.5C25.47 11.115 24.96 11.625 24.345 11.625Z",
    fill: "currentColor"
})], -1))
  , tt = {
    class: "TimeLeft__C-name"
}
  , at = {
    class: "TimeLeft__C-num"
}
  , nt = {
    class: "TimeLeft__C-id"
}
  , ot = {
    class: "TimeLeft__C-text"
}
  , st = {
    class: "TimeLeft__C-time"
}
  , it = le( () => t("div", null, ":", -1))
  , lt = Z({
    __name: "TimeLeft",
    props: {
        currentInfo: {
            type: Object,
            default: () => ({
                gameNo: "loading",
                currentTime: "",
                beginTime: "",
                passTime: 180,
                time1: 0,
                time2: 0,
                time3: 0,
                time4: 0
            })
        },
        winNum: {
            type: Array,
            default: [0, 0, 0, 0, 0]
        },
        gameName: {
            type: String,
            default: ""
        },
        currentGame: {
            type: Object,
            default: () => ({})
        }
    },
    setup(r) {
        const L = r
          , G = o(!1)
          , k = se()
          , T = () => {
            G.value = !0,
            k.getWinGoRule(L.currentGame.typeID)
        }
        ;
        return (C, w) => (c(),
        f(B, null, [t("div", Xe, [t("div", {
            class: "TimeLeft__C-rule",
            onClick: T
        }, [et, A(l(C.$t("winTrxIndicate")), 1)]), t("div", tt, l(L.gameName.replace("<br />", " ")), 1), t("div", at, [(c(!0),
        f(B, null, ae(r.winNum, (p, $) => (c(),
        f("div", {
            key: $,
            class: M(["n" + p])
        }, null, 2))), 128))]), t("div", nt, l(L.currentInfo.gameNo), 1), t("div", ot, l(C.$t("timeLeftToBuy")), 1), t("div", st, [t("div", null, l(r.currentInfo.time1), 1), t("div", null, l(r.currentInfo.time2), 1), it, t("div", null, l(r.currentInfo.time3), 1), t("div", null, l(r.currentInfo.time4), 1)])]), _(" 规则弹层 begin"), s(Ae, {
            howPlayShow: G.value,
            gamePresentation: r.currentGame.gamePresentation,
            onClose: w[0] || (w[0] = p => G.value = !1)
        }, null, 8, ["howPlayShow", "gamePresentation"])], 64))
    }
});
const rt = q(lt, [["__scopeId", "data-v-3e4c6499"], ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/TimeLeft.vue"]])
  , E = r => (ne("data-v-481307ec"),
r = r(),
oe(),
r)
  , ct = {
    class: "GameRecord__C"
}
  , ut = {
    class: "GameRecord__C-head"
}
  , mt = {
    class: "GameRecord__C-body"
}
  , dt = {
    key: 0
}
  , vt = {
    key: 1
}
  , _t = {
    class: "GameRecord__C-origin"
}
  , pt = E( () => t("div", {
    class: "GameRecord__C-origin-I red"
}, null, -1))
  , ft = E( () => t("div", {
    class: "GameRecord__C-origin-I violet"
}, null, -1))
  , gt = {
    key: 1,
    class: "GameRecord__C-origin-I green"
}
  , yt = {
    key: 2,
    class: "GameRecord__C-origin-I red"
}
  , Ct = E( () => t("div", {
    class: "GameRecord__C-origin-I green"
}, null, -1))
  , ht = E( () => t("div", {
    class: "GameRecord__C-origin-I violet"
}, null, -1))
  , Gt = {
    key: 1,
    class: "GameRecord__C-body-empty"
}
  , Tt = {
    key: 0,
    class: "GameRecord__C-foot"
}
  , wt = {
    class: "GameRecord__C-foot-page"
}
  , bt = Z({
    __name: "GameRecord",
    props: {
        typeid: {
            type: Number,
            required: !0
        }
    },
    emits: ["changefive"],
    setup(r, {expose: L, emit: G}) {
        const k = r
          , T = o([])
          , C = o(4)
          , w = o(10)
          , p = o(1)
          , $ = () => {
            p.value--,
            b()
        }
          , N = () => {
            p.value++,
            b()
        }
          , b = async (i=!1) => {
            if (k.typeid == null)
                return;
            i && (p.value = 1);
            const [m,v] = await z(ie({
                pageSize: w.value,
                pageNo: p.value,
                typeId: k.typeid
            }));
            T.value = v.list || [],
            C.value = v.totalPage,
            i && G("changefive", v.list.slice(0, 5).map(h => h.number))
        }
          , S = i => parseInt(i, 10) % 2 !== 0
          , I = i => {
            let m = "";
            switch (S(i) ? m = "greenColor" : m = "defaultColor",
            i) {
            case "0":
                m = "mixedColor0";
                break;
            case "5":
                m = "mixedColor5";
                break
            }
            return m
        }
        ;
        return L({
            getData: b
        }),
        Ge( () => {
            b()
        }
        ),
        (i, m) => {
            const v = D("van-col")
              , h = D("van-row")
              , a = D("van-icon");
            return c(),
            f("div", ct, [t("div", ut, [s(h, null, {
                default: y( () => [s(v, {
                    span: "9"
                }, {
                    default: y( () => [A(l(i.$t("betSerial")), 1)]),
                    _: 1
                }), s(v, {
                    span: "5"
                }, {
                    default: y( () => [A(l(i.$t("num")), 1)]),
                    _: 1
                }), s(v, {
                    span: "5"
                }, {
                    default: y( () => [A(l(i.$t("bigOrSmall")), 1)]),
                    _: 1
                }), s(v, {
                    span: "5"
                }, {
                    default: y( () => [A(l(i.$t("color")), 1)]),
                    _: 1
                })]),
                _: 1
            })]), t("div", mt, [T.value.length ? (c(!0),
            f(B, {
                key: 0
            }, ae(T.value, (u, P) => (c(),
            V(h, {
                key: P
            }, {
                default: y( () => [s(v, {
                    span: "9"
                }, {
                    default: y( () => [A(l(u.issueNumber), 1)]),
                    _: 2
                }, 1024), s(v, {
                    span: "5",
                    class: "numcenter"
                }, {
                    default: y( () => [t("div", {
                        class: M(["GameRecord__C-body-num", I(u.number)])
                    }, l(u.number), 3)]),
                    _: 2
                }, 1024), s(v, {
                    span: "5"
                }, {
                    default: y( () => [Number(u.number) > 4 ? (c(),
                    f("span", dt, l(i.$t("big")), 1)) : (c(),
                    f("span", vt, l(i.$t("small")), 1))]),
                    _: 2
                }, 1024), s(v, {
                    span: "5"
                }, {
                    default: y( () => [t("div", _t, [u.number == "0" ? (c(),
                    f(B, {
                        key: 0
                    }, [pt, ft], 64)) : _("v-if", !0), u.number == "1" || u.number == "3" || u.number == "7" || u.number == "9" ? (c(),
                    f("div", gt)) : _("v-if", !0), u.number == "2" || u.number == "4" || u.number == "6" || u.number == "8" ? (c(),
                    f("div", yt)) : _("v-if", !0), u.number == "5" ? (c(),
                    f(B, {
                        key: 3
                    }, [Ct, ht], 64)) : _("v-if", !0)])]),
                    _: 2
                }, 1024)]),
                _: 2
            }, 1024))), 128)) : (c(),
            f("div", Gt, [s(Ue)]))]), T.value.length ? (c(),
            f("div", Tt, [t("div", {
                class: M(["GameRecord__C-foot-previous", {
                    disabled: p.value <= 1
                }]),
                onClick: $
            }, [s(a, {
                name: "arrow-left",
                class: "GameRecord__C-icon",
                size: "20"
            })], 2), t("div", wt, l(p.value) + "/" + l(C.value), 1), t("div", {
                class: M(["GameRecord__C-foot-next", {
                    disabled: p.value >= C.value
                }]),
                onClick: N
            }, [s(a, {
                name: "arrow",
                class: "GameRecord__C-icon",
                size: "20"
            })], 2)])) : _("v-if", !0)])
        }
    }
});
const It = q(bt, [["__scopeId", "data-v-481307ec"], ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/components/Home/AllLotteryGames/WinGo/GameRecord.vue"]])
  , Rt = {
    class: "WinGo__C"
}
  , Lt = {
    class: "WinGo__C-head-more"
}
  , kt = Z({
    __name: "index",
    setup(r) {
        const G = Te().query.typeId
          , k = () => {
            b.go(-1),
            sessionStorage.setItem("clickedGameType", "lottery")
        }
          , T = {
            GameRecord: It,
            Trend: Ze,
            FollowBet: Ue,
            MyGameRecord: Qe
        }
          , C = o()
          , w = o()
          , p = o()
          , $ = o(!1)
          , N = o("GameRecord")
          , b = we()
          , S = se();
        let I = be([]);
        const i = o(0)
          , m = o(localStorage.getItem("volumeShow") || "1")
          , v = o(!1)
          , h = o(null)
          , a = o({
            gameNo: "loading",
            currentTime: "",
            beginTime: "",
            passTime: 180,
            time1: 0,
            time2: 0,
            time3: 0,
            time4: 0
        })
          , u = o(5)
          , P = o("")
          , re = o(!1)
          , R = o()
          , x = te( () => S.wingo[i.value] || {})
          , H = o([0, 0, 0, 0, 0])
          , ce = Pe()
          , ue = te( () => ce.getIsShowLotteryDragon);
        Ie( () => {
            K()
        }
        ),
        Re( () => {
            clearInterval(h.value),
            X.value.forEach(e => {
                clearInterval(e)
            }
            ),
            ee.value && clearTimeout(ee.value)
        }
        ),
        Le( () => He().visibility, e => {
            e === 0 ? clearInterval(h.value) : K(i.value)
        }
        );
        const me = () => {
            m.value == "1" ? m.value = "2" : m.value = "1",
            localStorage.setItem("volumeShow", m.value)
        }
          , U = e => {
            b.push({
                name: e
            })
        }
          , K = async (e=null) => {
            await S.getWinGoData(),
            I = S.getWingo;
            const n = I.findIndex(d => d.typeID == G);
            R.value == null && !G ? O(0) : O(e ?? n)
        }
          , O = e => {
            S.getWinGoData(),
            i.value = e,
            R.value = I[e].typeID,
            Q(R.value),
            ke( () => {
                C.value.getData(R.value)
            }
            )
        }
          , Q = async e => {
            N.value == "MyGameRecord" && de(e);
            const [n,d] = await z(xe({
                typeId: e
            }));
            a.value.gameNo = d.issueNumber,
            a.value.currentTime = d.serviceTime.replace(/-/g, "/"),
            a.value.beginTime = d.startTime.replace(/-/g, "/"),
            ve()
        }
          , de = async e => {
            const n = await De(Ve({
                typeId: e
            }));
            n && (H.value = n.data.number.split(","))
        }
          , ve = () => {
            const e = new Date(a.value.currentTime).getTime()
              , n = new Date(a.value.beginTime).getTime();
            let d = (e - n) / 1e3
              , g = I[i.value];
            if (d > g.intervalM * 60 && (d = g.intervalM * 60),
            a.value.passTime = g.intervalM * 60 - d,
            a.value.passTime < 0) {
                P.value = "An error occurred, please contact customer service。The game time is " + g.intervalM + " minutes,start time is " + a.value.beginTime + ",current time is" + a.value.currentTime + "!",
                v.value = !0;
                return
            }
            _e()
        }
          , _e = () => {
            clearInterval(h.value),
            Y(!1),
            h.value = setInterval(function() {
                Y()
            }, 1e3)
        }
          , Y = (e=!0) => {
            if (a.value.passTime <= u.value && (re.value = !1),
            m.value == "1" && (a.value.passTime <= u.value && a.value.passTime > 1 ? J(1) : a.value.passTime == 1 && J(2)),
            a.value.passTime > 0) {
                let n = a.value.passTime;
                a.value.time2 = Math.floor(n / 60),
                a.value.time3 = Math.floor(n % 60 / 10),
                a.value.time4 = Math.floor(n % 10),
                a.value.passTime--
            } else
                clearInterval(h.value),
                e && pe()
        }
          , J = (e=1) => {
            const n = document.getElementById(`voice${e}`);
            n && n.play()
        }
          , pe = () => {
            Q(R.value || 0),
            p.value.getWinsUserAmount(!1),
            C.value.getData(!0)
        }
          , j = o({})
          , X = o([])
          , fe = e => {
            if (p.value.getWinsUserAmount(!1),
            C.value.getData(),
            j.value[e])
                return;
            j.value[e] = !0;
            const {time1: n, time2: d, time3: g, time4: F} = a.value
              , he = (n * 10 * 60 + d * 60 + g * 10 + F) * 1e3 + Math.floor(Math.random() * 2e3) + 1e3;
            X.value[x.value.intervalM] = setTimeout( () => {
                Ce(e)
            }
            , he)
        }
          , ge = e => {
            $.value = e
        }
          , ye = e => {
            H.value = e
        }
          , ee = o(null)
          , Ce = async e => {
            const [n,d] = await z(Ee({
                issueNumber: [e]
            }));
            if (d) {
                const g = d.filter(F => F.state != 2);
                if (!g.length)
                    return;
                w.value.showMark(g),
                delete j.value[e]
            }
        }
        ;
        return (e, n) => {
            const d = D("NavBar");
            return c(),
            f("div", Rt, [s(d, {
                "left-arrow": "",
                onClickLeft: k,
                class: "main",
                headLogo: !0
            }, {
                right: y( () => [t("div", Lt, [t("div", {
                    onClick: n[0] || (n[0] = g => U("CustomerService"))
                }), t("div", {
                    class: M({
                        disableVoice: m.value == "2"
                    }),
                    onClick: me
                }, null, 2)])]),
                _: 1
            }), _(" 钱包余额 "), s(Be, {
                ref_key: "WallteRef",
                ref: p
            }, null, 512), s(Ke, {
                key: "wingo",
                class: "lottery-notice"
            }), _(" 游戏类型 "), s($e, {
                gameList: W(I),
                currentGameIndex: i.value,
                onChangeGame: O
            }, null, 8, ["gameList", "currentGameIndex"]), _(" 游戏开始时间倒计时 "), s(rt, {
                currentInfo: a.value,
                winNum: H.value,
                gameName: x.value.typeName,
                currentGame: x.value
            }, null, 8, ["currentInfo", "winNum", "gameName", "currentGame"]), _(" 投注表 "), s(ze, {
                currentInfo: a.value,
                currentGame: x.value,
                VoiceType: m.value,
                typeid: R.value,
                onBetting: fe,
                onChangeBettingP: ge,
                "betting-api-fun": W(Oe)
            }, null, 8, ["currentInfo", "currentGame", "VoiceType", "typeid", "betting-api-fun"]), _(" 记录导航 "), s(We, {
                record: N.value,
                onChangeC: n[1] || (n[1] = g => N.value = g)
            }, null, 8, ["record"]), _(" 动态展示对应的组件 "), (c(),
            V(Se, null, [(c(),
            V(Ne(T[N.value]), {
                class: "game-record",
                ref_key: "RecordComponent",
                ref: C,
                typeid: R.value,
                ApiFun: W(je),
                listApi: W(ie),
                EmerdApi: W(Fe),
                goPathName: "AllLotteryGames-BettingRecordWin",
                onChangefive: ye
            }, null, 40, ["typeid", "ApiFun", "listApi", "EmerdApi"]))], 1024)), _(" 弹窗组件 "), s(Ye, {
                show: v.value,
                onConfirm: n[2] || (n[2] = g => U("/login"))
            }, {
                content: y( () => [t("div", null, l(P.value), 1)]),
                _: 1
            }, 8, ["show"]), _(" 中奖提示组件 "), s(qe, {
                ref_key: "WinningTipsRef",
                ref: w
            }, null, 512), ue.value ? (c(),
            V(Je, {
                key: 0
            })) : _("v-if", !0), s(Me)])
        }
    }
});
const Ot = q(kt, [["__scopeId", "data-v-5d71c3fd"], ["__file", "/usr/local/jenkins-prod/workspace/AR079-Pages-india-tashanwin/src/views/home/AllLotteryGames/WinGo/index.vue"]]);
export {Ot as default};
