import {
    G as se,
    R as Ke,
    aT as Pe,
    B as p,
    H as ee,
    N as u,
    I as d,
    J as e,
    P as l,
    O as t,
    aB as te,
    K as A,
    M as q,
    ap as R,
    ao as X,
    Q as w,
    av as G,
    Z as ce,
    aC as Ce,
    aD as be,
    z as Ve,
    r as h,
    ax as Se,
    ay as Xe,
    aF as Qe,
    A as Ye,
    $ as et,
    C as he,
    w as Me,
    V as tt,
    a6 as st,
    au as de,
    bn as ot,
    aY as nt,
    bm as lt,
    aE as _e,
    n as ye,
    T as at
} from "./common.modules-5cfe2cf4.js";
import {
    m as ge,
    u as we,
    k as it,
    j as Ae,
    A as ut,
    F as rt,
    G as ct,
    H as dt,
    e as vt,
    J as pt,
    x as mt,
    K as _t,
    M as yt,
    g as ft,
    L as gt,
    W as Ct,
    p as bt,
    C as ht
} from "./page-saasLottery-D5-2f97b5a2.js";
import {
    _ as oe,
    c as De,
    y as wt
} from "./page-activity-ActivityDetail-a58ec568.js";
import "./page-activity-Bonus-3c16c86d.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-2ac88fb8.js";
import "./en-cfd26acf.js";
const $e = v => (Ce("data-v-c91450ee"), v = v(), be(), v),
    $t = {
        class: "tf_C"
    },
    kt = {
        class: "tf_C-l1"
    },
    Tt = {
        class: "tf_C-l1-l"
    },
    It = {
        class: "tf_C-l1-no"
    },
    Lt = $e(() => e("svg", {
        xmlns: "http://www.w3.org/2000/svg",
        width: "36",
        height: "36",
        viewBox: "0 0 36 36",
        fill: "none"
    }, [e("path", {
        d: "M9.67074 29.1107L9.66322 29.1182L9.65598 29.126C9.02654 29.8017 8.45747 30.2157 7.98006 30.4218C7.50853 30.6254 7.16285 30.6135 6.91422 30.5064C6.6612 30.3975 6.39655 30.1416 6.18925 29.6333C5.98114 29.123 5.85 28.3992 5.85 27.45V10.56C5.85 7.52835 6.21824 5.86758 7.1019 4.92303C7.97224 3.99272 9.4962 3.6 12.33 3.6H23.67C26.5041 3.6 28.0275 3.99282 28.8959 4.92264C29.7774 5.86659 30.1425 7.52679 30.135 10.5585V10.56V27.435C30.135 28.3846 30.0047 29.1087 29.7975 29.6192C29.5911 30.1278 29.3276 30.383 29.076 30.4916C28.8287 30.5983 28.4837 30.6106 28.011 30.4067C27.5326 30.2004 26.9615 29.7861 26.3282 29.1102C25.6005 28.3296 24.6554 27.9468 23.7086 27.9984C22.7618 28.0499 21.8639 28.5332 21.225 29.385L21.2246 29.3856L19.7116 31.4079C19.7113 31.4083 19.711 31.4087 19.7107 31.4091C19.1996 32.0836 18.5725 32.3738 17.9925 32.3738C17.4125 32.3738 16.7854 32.0836 16.2743 31.4091C16.274 31.4087 16.2737 31.4083 16.2734 31.4079L14.7606 29.3858C14.7605 29.3857 14.7605 29.3856 14.7604 29.3856C13.4723 27.6623 11.1634 27.5349 9.67973 29.1017L9.67074 29.1107ZM9.57 16.5C9.57 17.6564 10.5136 18.6 11.67 18.6C12.8264 18.6 13.77 17.6564 13.77 16.5C13.77 15.3436 12.8264 14.4 11.67 14.4C10.5136 14.4 9.57 15.3436 9.57 16.5ZM9.57 10.5C9.57 11.6564 10.5136 12.6 11.67 12.6C12.8264 12.6 13.77 11.6564 13.77 10.5C13.77 9.34363 12.8264 8.4 11.67 8.4C10.5136 8.4 9.57 9.34363 9.57 10.5ZM16.095 18.225H24.345C25.2914 18.225 26.07 17.4464 26.07 16.5C26.07 15.5536 25.2914 14.775 24.345 14.775H16.095C15.1486 14.775 14.37 15.5536 14.37 16.5C14.37 17.4464 15.1486 18.225 16.095 18.225ZM16.095 12.225H24.345C25.2914 12.225 26.07 11.4464 26.07 10.5C26.07 9.55363 25.2914 8.775 24.345 8.775H16.095C15.1486 8.775 14.37 9.55363 14.37 10.5C14.37 11.4464 15.1486 12.225 16.095 12.225Z",
        stroke: "currentColor",
        "stroke-width": "1.2"
    })], -1)),
    Bt = $e(() => e("svg", {
        xmlns: "http://www.w3.org/2000/svg",
        width: "36",
        height: "36",
        viewBox: "0 0 36 36",
        fill: "none"
    }, [e("path", {
        d: "M22.3206 29.4914C20.713 30.1573 18.99 30.5 17.25 30.5C13.7359 30.5 10.3657 29.104 7.88084 26.6192C5.39598 24.1343 4 20.7641 4 17.25C4 13.7359 5.39598 10.3657 7.88083 7.88083C10.3657 5.39598 13.7359 4 17.25 4C18.99 4 20.713 4.34272 22.3206 5.0086C23.9281 5.67447 25.3888 6.65046 26.6192 7.88083C27.8495 9.11121 28.8255 10.5719 29.4914 12.1794C30.1573 13.787 30.5 15.51 30.5 17.25C30.5 18.99 30.1573 20.713 29.4914 22.3206C28.8255 23.9281 27.8495 25.3888 26.6192 26.6192C25.3888 27.8495 23.9281 28.8255 22.3206 29.4914ZM31.95 31.9985C31.9436 31.9985 31.9355 31.9971 31.9282 31.9941C31.9242 31.9925 31.922 31.9911 31.9214 31.9906L29.1369 29.2062C29.1268 29.1953 29.1211 29.1809 29.1211 29.166C29.1211 29.152 29.1261 29.1385 29.1351 29.1279C29.1381 29.1254 29.1407 29.124 29.1432 29.123C29.1472 29.1213 29.1535 29.1197 29.1619 29.1197C29.1774 29.1197 29.1952 29.1249 29.2127 29.1404L31.9929 31.9206C31.9948 31.9226 31.9963 31.9243 31.9975 31.926C31.9989 31.928 31.9998 31.9299 32.0005 31.9317C32.0022 31.9357 32.0037 31.942 32.0037 31.9504C32.0037 31.9608 32.0014 31.9723 31.9952 31.984C31.9756 31.9955 31.9587 31.9985 31.95 31.9985Z",
        stroke: "currentColor",
        "stroke-width": "2"
    })], -1)),
    Rt = {
        class: "tf_C-l2"
    },
    xt = {
        class: "tf_C-time"
    },
    St = $e(() => e("div", {
        notime: ""
    }, ":", -1)),
    Mt = {
        class: "tf_C-l3"
    },
    Dt = {
        key: 0,
        class: "flex-center",
        style: {
            height: "100%"
        }
    },
    Pt = ["innerHTML"],
    Vt = se({
        __name: "timeleft",
        setup(v) {
            const $ = Ke(),
                k = Pe("trxWinHook"),
                {
                    resultAll: y,
                    countdownTime: _,
                    issue: N,
                    onSwitchIntroduce: H,
                    introduceLoading: W,
                    introduceDialog: P,
                    getIntroduce: F,
                    introduceHtml: S,
                    result: s
                } = k,
                c = p(() => {
                    if (!y.value) return [0, 0, 0, 0, 0];
                    let b = y.value.substring(y.value.length - 5).toUpperCase();
                    return /\d/.test(b) ? [...b] : [...y.value.substring(y.value.length - 5, y.value.length - 10).toUpperCase()]
                }),
                T = () => {
                    let b = "https://tronscan.org";
                    $.push({
                        name: "AllLotteryGames-WinTrxIframe",
                        query: {
                            url: b
                        }
                    })
                };
            return (b, M) => {
                const I = ee("van-loading"),
                    O = ee("van-popup");
                return u(), d("div", $t, [e("div", kt, [e("div", Tt, [e("div", It, l(b.$t("gameRecordNum")), 1), e("div", {
                    class: "tf_C-l1-tip",
                    onClick: M[0] || (M[0] = (...r) => t(H) && t(H)(...r))
                }, [Lt, te(l(b.$t("lotteryManual")), 1)])]), e("div", {
                    class: "tf_C-l1-r",
                    onClick: T
                }, [Bt, te(l(b.$t("winTrxPub")), 1)])]), e("div", Rt, [e("div", null, l(t(N)), 1), e("div", xt, [e("span", null, l(b.$t("winTrxTime")), 1), e("div", null, l(t(_)[0]), 1), e("div", null, l(t(_)[1]), 1), St, e("div", null, l(t(_)[3]), 1), e("div", null, l(t(_)[4]), 1)])]), e("div", Mt, [(u(!0), d(A, null, q(c.value, (r, m) => (u(), d(A, {
                    key: m
                }, [t(s) == r ? (u(), d("p", {
                    key: 0,
                    class: R(["num" + r, t(s) == r && "prize" + r])
                }, null, 2)) : (u(), d("div", {
                    key: 1,
                    class: R(["num" + r, t(s) == r && "prize" + r])
                }, null, 2))], 64))), 128))]), X(" 玩法说明"), w(O, {
                    onOpen: t(F),
                    show: t(P),
                    "onUpdate:show": M[1] || (M[1] = r => ce(P) ? P.value = r : null),
                    "close-on-click-overlay": !1,
                    round: "",
                    teleport: "body"
                }, {
                    default: G(() => {
                        var r;
                        return [w(t(ge), {
                            title: (r = t(S)) == null ? void 0 : r.title,
                            onClose: t(H)
                        }, {
                            default: G(() => {
                                var m;
                                return [t(W) ? (u(), d("div", Dt, [w(I, {
                                    type: "spinner",
                                    color: "#FD565C"
                                })])) : (u(), d("div", {
                                    key: 1,
                                    innerHTML: (m = t(S)) == null ? void 0 : m.content
                                }, null, 8, Pt))]
                            }),
                            _: 1
                        }, 8, ["title", "onClose"])]
                    }),
                    _: 1
                }, 8, ["onOpen", "show"])])
            }
        }
    });
const At = oe(Vt, [
        ["__scopeId", "data-v-c91450ee"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/saasLottery/game/TrxWinGo/components/trx2/timeleft.vue"]
    ]),
    Nt = v => (Ce("data-v-767e7453"), v = v(), be(), v),
    Ht = {
        class: "bet_body"
    },
    Gt = {
        class: "bet_body-mark"
    },
    Wt = {
        class: "color"
    },
    Et = {
        class: "betNum"
    },
    Ot = ["onClick"],
    jt = {
        key: 0,
        class: "ramd"
    },
    Ut = ["onClick"],
    Zt = {
        class: "size"
    },
    zt = {
        class: "bet-body"
    },
    Ft = {
        class: "head"
    },
    qt = {
        class: "title"
    },
    Jt = {
        class: "selectName"
    },
    Kt = {
        class: "l1"
    },
    Xt = {
        class: "title"
    },
    Qt = {
        class: "amount"
    },
    Yt = ["onClick"],
    es = {
        class: "l1"
    },
    ts = {
        class: "title"
    },
    ss = {
        class: "m"
    },
    os = {
        class: "l1"
    },
    ns = Nt(() => e("div", {
        class: "title"
    }, null, -1)),
    ls = {
        class: "multiples"
    },
    as = ["onClick"],
    is = {
        class: "l2"
    },
    us = {
        class: "bet-foot"
    },
    rs = {
        key: 0,
        class: "flex-center",
        style: {
            height: "100%"
        }
    },
    cs = {
        key: 1,
        class: "limit-table"
    },
    ds = se({
        __name: "bet",
        props: {
            currentGame: {
                type: String,
                default: ""
            }
        },
        setup(v) {
            const $ = Pe("trxWinHook"),
                {
                    onRandom: k,
                    bigSmalls: y,
                    onBet: _,
                    colors: N,
                    numbers: H,
                    randomNum: W,
                    countdownTime: P,
                    countdown: F,
                    betMultiples: S,
                    betDialog: s,
                    betMultiple: c,
                    playBet: T,
                    agreePreSale: b,
                    betScopes: M,
                    amount: I,
                    onClearBet: O,
                    onBetting: r,
                    loading: m,
                    betLimit: x,
                    getBetLimit: U,
                    betLimitLoading: L
                } = $,
                {
                    t: B
                } = Ve(),
                {
                    balance: ne
                } = we(),
                J = Ae(),
                j = h(!1),
                Q = h(!1),
                le = f => {
                    f === 1 ? c.value > 1 && c.value-- : c.value++
                },
                ae = () => {
                    c.value > 999999999 && (c.value = 999999999)
                },
                ie = () => {
                    if (c.value * I.value > ne.value) return J.error(B("common.code_142"));
                    r()
                };
            return (f, i) => {
                const ve = ee("van-checkbox"),
                    Z = ee("van-popup"),
                    pe = ee("van-loading");
                return u(), d(A, null, [e("div", Ht, [Se(e("div", Gt, [e("div", null, l(t(P)[3] || "0"), 1), e("div", null, l(t(P)[4] || "0"), 1)], 512), [
                    [Xe, t(F).total <= 10 * 1e3]
                ]), e("div", Wt, [e("div", {
                    class: "green",
                    onClick: i[0] || (i[0] = n => t(_)(t(N)[0]))
                }, l(f.$t("betGreen")), 1), e("div", {
                    class: "violet",
                    onClick: i[1] || (i[1] = n => t(_)(t(N)[1]))
                }, l(f.$t("betViolet")), 1), e("div", {
                    class: "red",
                    onClick: i[2] || (i[2] = n => t(_)(t(N)[2]))
                }, l(f.$t("betRed")), 1)]), e("div", Et, [(u(!0), d(A, null, q(t(H), (n, D) => (u(), d("div", {
                    key: D,
                    class: R([t(W) == n.playBet ? "active" : "", "b" + D]),
                    onClick: Y => t(_)(n)
                }, null, 10, Ot))), 128))]), t(S) ? (u(), d("div", jt, [e("div", {
                    onClick: i[3] || (i[3] = (...n) => t(k) && t(k)(...n)),
                    class: R([t(S).length <= 4 && "f1", "l"])
                }, l(f.$t("randomBet")), 3), (u(!0), d(A, null, q(t(S), (n, D) => (u(), d("div", {
                    key: D,
                    class: R([n === t(c) && "active", "r"]),
                    onClick: Y => c.value = n
                }, " x" + l(n), 11, Ut))), 128))])) : X("v-if", !0), e("div", Zt, [e("div", {
                    onClick: i[4] || (i[4] = n => t(_)(t(y)[0])),
                    class: "big"
                }, l(f.$t("big")), 1), e("div", {
                    onClick: i[5] || (i[5] = n => t(_)(t(y)[1])),
                    class: "small"
                }, l(f.$t("small")), 1)])]), X(" 投注内容 begin "), w(Z, {
                    show: t(s),
                    "onUpdate:show": i[12] || (i[12] = n => ce(s) ? s.value = n : null),
                    position: "bottom",
                    round: !0,
                    teleport: "body"
                }, {
                    default: G(() => [e("div", {
                        class: R(["bet", "bet-" + t(T)])
                    }, [e("div", zt, [e("div", Ft, [e("div", qt, l(v.currentGame), 1), e("div", Jt, l(t(B)("selectMay")) + " " + l(isNaN(Number(t(T))) ? t(B)("bet" + t(T).charAt(0).toUpperCase() + t(T).slice(1)) : t(T)), 1)]), e("div", Kt, [e("div", Xt, l(f.$t("amount")), 1), e("div", Qt, [(u(!0), d(A, null, q(t(M), (n, D) => (u(), d("div", {
                        key: D,
                        class: R({
                            active: n == t(I)
                        }),
                        onClick: Y => I.value = n
                    }, l(t(it)(n)), 11, Yt))), 128))])]), e("div", es, [e("div", ts, l(f.$t("quantity")), 1), e("div", ss, [e("div", {
                        onClick: i[6] || (i[6] = n => le(1))
                    }, "-"), Se(e("input", {
                        "onUpdate:modelValue": i[7] || (i[7] = n => ce(c) ? c.value = n : null),
                        type: "number",
                        onInput: ae
                    }, null, 544), [
                        [Qe, t(c)]
                    ]), e("div", {
                        onClick: i[8] || (i[8] = n => le(2))
                    }, "+")])]), e("div", os, [ns, e("div", ls, [(u(!0), d(A, null, q(t(S), (n, D) => (u(), d("div", {
                        key: D,
                        class: R({
                            active: n === t(c)
                        }),
                        onClick: Y => c.value = n
                    }, " X" + l(n), 11, as))), 128))])]), e("div", is, [w(ve, {
                        modelValue: t(b),
                        "onUpdate:modelValue": i[10] || (i[10] = n => ce(b) ? b.value = n : null),
                        "checked-color": "var(--norm_red-color)"
                    }, {
                        default: G(() => [te(l(f.$t("agree")) + " ", 1), e("span", {
                            onClick: i[9] || (i[9] = n => j.value = !0)
                        }, l(f.$t("presaleRules")), 1)]),
                        _: 1
                    }, 8, ["modelValue"]), X(` <div>
            <span @click="betLimitDialog = true">{{ $t("common.limit") }}</span>
          </div> `)])]), e("div", us, [e("div", {
                        class: "bet-foot-c",
                        onClick: i[11] || (i[11] = (...n) => t(O) && t(O)(...n))
                    }, l(t(B)("cancel")), 1), e("div", {
                        class: R(["bet-foot-s", {
                            disabled: t(m)
                        }]),
                        onClick: ie
                    }, [te(l(t(B)("totalAmount")) + " ", 1), e("span", null, l(t(De)(t(c) * t(I) || 0)), 1)], 2)])], 2)]),
                    _: 1
                }, 8, ["show"]), X(" 预售规则弹层 begin"), w(Z, {
                    show: j.value,
                    "onUpdate:show": i[14] || (i[14] = n => j.value = n),
                    "close-on-click-overlay": !1,
                    round: "",
                    teleport: "body"
                }, {
                    default: G(() => [w(t(ge), {
                        title: t(B)("presaleRules"),
                        onClose: i[13] || (i[13] = n => j.value = !1)
                    }, {
                        default: G(() => [te(l(f.$t("betPopTXT")), 1)]),
                        _: 1
                    }, 8, ["title"])]),
                    _: 1
                }, 8, ["show"]), w(Z, {
                    show: Q.value,
                    "onUpdate:show": i[16] || (i[16] = n => Q.value = n),
                    onOpen: t(U),
                    "close-on-click-overlay": !1,
                    round: "",
                    teleport: "body"
                }, {
                    default: G(() => [w(t(ge), {
                        title: f.$t("common.limit"),
                        onClose: i[15] || (i[15] = n => Q.value = !1)
                    }, {
                        default: G(() => [t(L) ? (u(), d("div", rs, [w(pe, {
                            type: "spinner",
                            color: "#FD565C"
                        })])) : (u(), d("table", cs, [e("thead", null, [e("tr", null, [e("th", null, l(f.$t("common.play")), 1), e("th", null, l(f.$t("common.choice")), 1), e("th", null, l(f.$t("common.limit")), 1)])]), e("tbody", null, [(u(!0), d(A, null, q(t(x), (n, D) => (u(), d("tr", {
                            key: D
                        }, [e("td", null, l(n.playType), 1), e("td", null, l(n.betContent), 1), e("td", null, l(t(De)(n.maxPayoutAmount)), 1)]))), 128))])]))]),
                        _: 1
                    }, 8, ["title"])]),
                    _: 1
                }, 8, ["show", "onOpen"])], 64)
            }
        }
    });
const vs = oe(ds, [
        ["__scopeId", "data-v-767e7453"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/saasLottery/game/TrxWinGo/components/trx2/bet.vue"]
    ]),
    fe = Ae();

function ps() {
    const {
        gameCode: v,
        lotteryCode: $,
        gameInfo: k,
        visibility: y,
        visibilitychange: _,
        synchronizer: N
    } = ut(), {
        trigger: H,
        updateBalance: W,
        onBetTrigger: P,
        getGameInfo: F
    } = we(), {
        t: S
    } = Ve(), s = Ye({
        issue: "",
        issueData: null,
        countdown: 0,
        interval: 0,
        sound: !1,
        soundBg: !1,
        soundEffects: !1,
        agreePreSale: !0,
        introduceDialog: !1,
        introduceHtml: void 0,
        historyIssues: [],
        result: "",
        resultAll: "",
        historyIssuesTotalPage: 0,
        betDialog: !1,
        playBet: 0,
        amount: 0,
        betLimit: []
    }), c = new Map, T = h(0), b = h(!1), M = h(!1), I = h(!1), O = h(0), r = h(), m = h(-1), x = h(null), U = h(!1), L = h(!1), B = h(localStorage.getItem("volumeShow") || "1"), ne = Array.from({
        length: 10
    }, (o, a) => a), J = p(() => s.issue), j = p(() => ({
        interval: s.interval || 0,
        ...rt(s.countdown * 1e3)
    })), Q = p(() => {
        const o = `${j.value.minutes}`.padStart(2, "0"),
            a = `${j.value.seconds}`.padStart(2, "0");
        return [...o.split(""), ":", ...a.split("")]
    }), le = p(() => j.value.seconds > 10), ae = p(() => {
        var o;
        return ((o = k.value) == null ? void 0 : o.betScopes) || []
    }), ie = p(() => {
        var o;
        return ((o = k.value) == null ? void 0 : o.betMultiples) || []
    }), f = p(() => s.introduceHtml || {}), i = p(() => s.resultAll), ve = p(() => s.result), Z = p(() => {
        var o;
        return ((o = k.value) == null ? void 0 : o.rates) || []
    }), pe = p(() => {
        const o = Z.value.filter(({
            playType: C
        }) => C === "Color");
        if (!o.length) return o;
        const a = o.reduce((C, E) => {
                const {
                    playType: V,
                    playBet: z,
                    playRate: K
                } = E;
                return C[V] || (C[V] = {}), C[V][z] ? C[V][z].playRates.push(K) : C[V][z] = { ...E,
                    playRates: [K]
                }, C
            }, {}),
            g = Object.values(a).flatMap(C => Object.values(C).map(E => {
                const V = Math.min(...E.playRates),
                    z = Math.max(...E.playRates);
                return { ...E,
                    playRateStr: V === z ? `x${V}` : `x${V}/x${z}`
                }
            }));
        return [g.find(C => C.playBet == "green"), g.find(C => C.playBet == "violet"), g.find(C => C.playBet == "red")]
    }), n = p(() => {
        const o = Z.value.find(({
            playBet: g
        }) => g === "small");
        return [Z.value.find(({
            playBet: g
        }) => g === "big"), o]
    }), D = p(() => {
        const o = Z.value.find(({
            playType: a
        }) => a === "Num");
        return o ? ne.map(a => ({
            playType: "Num",
            playBet: a,
            playRate: o.playRate
        })) : ne.map(a => ({
            playType: "Num",
            playBet: a,
            playRate: 0
        }))
    }), Y = p(() => s.historyIssuesTotalPage), ke = p(() => s.historyIssues), Te = p(() => s.betDialog), Ne = p(() => s.playBet), Ie = p({
        get() {
            return s.agreePreSale
        },
        set(o) {
            s.agreePreSale = o
        }
    }), He = p({
        get() {
            return s.amount
        },
        set(o) {
            s.amount = o
        }
    }), Ge = p({
        get() {
            return s.introduceDialog
        },
        set(o) {
            s.introduceDialog = o
        }
    }), We = p(() => s.betLimit || []), ue = async () => {
        const o = await dt({
                gameCode: v.value,
                lotteryCode: $.value
            }),
            a = o.intervalMinute * 60,
            g = o.current;
        console.log("getLotteryIssue-data", o), s.issueData = o, s.interval = a, await Le(g)
    }, Le = async (o, a) => {
        s.issue = o.issueNumber;
        const g = Me(o.endTime).valueOf() - Me(N.getCurrentTime()).valueOf();
        s.countdown = Math.floor(g / 1e3), s.countdown > 0 && (Ue(), console.log("resume"))
    }, re = async () => {
        var o;
        try {
            const {
                result: a,
                data: g
            } = await vt({
                gameCode: v.value,
                lotteryCode: $.value
            });
            if (!a) return;
            s.historyIssues = g.list || [], console.log("state.historyIssues", 666666, s.historyIssues), (o = g.list) != null && o.length && (s.result = g.list[0].number || "", s.resultAll = g.list[0].blockId || ""), s.historyIssuesTotalPage = g.totalPage || 0
        } catch (a) {
            console.log(a)
        } finally {}
    }, Be = o => {
        var a;
        M.value || b.value || ((a = s.issueData) == null ? void 0 : a.gameCode) === v.value && (s.playBet = o.playBet, s.playType = o.playType, s.playRate = o.playRate, s.betDialog = !0, s.amount = ae.value[0] || 1, T.value || (T.value = ie.value[0] || 1))
    }, Re = (o = !1) => {
        s.betDialog = !1, s.playBet = null, s.playType = "", s.playRate = 0, T.value = 0, s.amount = 0, o && c.clear()
    }, Ee = async () => {
        if (!I.value) {
            if (!Ie.value) return fe.error(S("common.agreePreSale"));
            if (!J.value) return fe.error(S("common.noIssueNumber"));
            if (s.playType) {
                I.value = !0;
                try {
                    const {
                        result: o
                    } = await pt({
                        gameCode: v.value,
                        issueNumber: J.value,
                        amount: s.amount,
                        betMultiple: T.value,
                        betContent: `${s.playType}_${mt(s.playBet)}`
                    });
                    if (!o) return;
                    c.set(J.value, 1), Re(), fe.success(S("common.betSuccessful")), s.betV++, W(), P()
                } catch (o) {
                    console.log(o)
                } finally {
                    I.value = !1
                }
            }
        }
    }, Oe = async () => {
        if (!L.value) try {
            L.value = !0;
            const {
                result: o,
                data: a
            } = await _t(v.value);
            if (!o) return;
            s.betLimit = a
        } catch {} finally {
            L.value = !1
        }
    }, je = async () => {
        try {
            const o = [...c.keys()].reverse();
            if (!o.length) return;
            const a = o[0];
            if (ke.value.findIndex(K => K.issueNumber === a) > 0) return c.clear();
            const {
                result: C,
                data: E
            } = await ft({
                issueNumber: a
            });
            if (!C) return;
            if (E.status === null) {
                c.delete(a);
                return
            }
            if (P(), c.delete(a), !r.value) return;
            const V = E.status === !0;
            console.log("state.historyIssues", s.historyIssues), console.log("list", o[0]);
            const z = s.historyIssues.find(K => K.issueNumber === a);
            r.value.open({
                isWin: V,
                amount: E.winAmount || 0,
                issueNumber: a,
                result: z
            }), c.clear(), V && W()
        } catch {}
    }, {
        pause: me,
        start: Ue
    } = ct(async () => {
        var o;
        if (s.countdown <= 11 && Te && (s.betDialog = !1), B.value == "1" && (s.countdown <= 11 && s.countdown > 1 ? xe(1) : s.countdown == 1 && xe(2)), s.countdown < 1) {
            me();
            const a = ((o = s.issueData) == null ? void 0 : o.next) || null;
            a ? (Le(a, s.interval), s.issueData.next = null) : await ue(), O.value++, setTimeout(async () => {
                await re(), je()
            }, 500);
            return
        }
        s.countdown -= 1
    }, 1e3, {
        immediate: !1
    }), Ze = async () => {
        try {
            U.value = !0;
            const {
                result: o,
                data: a
            } = await yt(v.value);
            if (!o) return;
            s.introduceHtml = a
        } catch {} finally {
            U.value = !1
        }
    }, xe = (o = 1) => {
        const a = document.getElementById(`voice${o}`);
        a && a.play()
    }, ze = () => {
        B.value == "1" ? B.value = "2" : B.value = "1", localStorage.setItem("volumeShow", B.value)
    }, Fe = () => {
        s.introduceDialog = !s.introduceDialog, s.introduceDialog && (U.value = !0)
    }, qe = () => {
        M.value || s.countdown < 10 || (M.value = !0, x.value || (x.value = setInterval(function() {
            m.value = Math.floor(Math.random() * 11)
        }, 60)), setTimeout(() => {
            m.value > 9 && (m.value = 9), clearInterval(x.value), M.value = !1, x.value = null, !(s.countdown < 10) && Be(D.value.find(o => o.playBet === m.value))
        }, 3e3))
    }, Je = async () => {
        await Promise.all([F(), ue(), re()])
    };
    return et(() => y.value, o => {
        o === 0 ? me() : (me(), setTimeout(() => {
            ue(), re()
        }, 500))
    }), he(() => {
        document.addEventListener("visibilitychange", _)
    }), {
        issue: J,
        countdown: j,
        countdownTime: Q,
        canBet: le,
        betScopes: ae,
        betMultiples: ie,
        getIssue: ue,
        getHistoryIssues: re,
        resultAll: i,
        result: ve,
        colors: pe,
        onBet: Be,
        numbers: D,
        bigSmalls: n,
        historyIssuesTotalPage: Y,
        historyIssues: ke,
        gameCode: v,
        trigger: H,
        betDialog: Te,
        betMultiple: T,
        playBet: Ne,
        agreePreSale: Ie,
        amount: He,
        onClearBet: Re,
        onBetting: Ee,
        getBetLimit: Oe,
        loading: I,
        betLimit: We,
        update: O,
        winner: r,
        onRandom: qe,
        randomNum: m,
        onSwitchIntroduce: Fe,
        introduceDialog: Ge,
        introduceHtml: f,
        getIntroduce: Ze,
        setVoice: ze,
        VoiceType: B,
        getlotteryissue: Je
    }
}
const ms = "/assets/mp3/di1-0f3d86cb.mp3",
    _s = "/assets/mp3/di2-ad9aa8fb.mp3",
    ys = ["muted"],
    fs = e("source", {
        src: ms,
        type: "audio/mpeg"
    }, null, -1),
    gs = [fs],
    Cs = ["muted"],
    bs = e("source", {
        src: _s,
        type: "audio/mpeg"
    }, null, -1),
    hs = [bs],
    ws = se({
        __name: "audio",
        setup(v) {
            const $ = h(!1),
                k = () => {
                    $.value = !0, tt(() => {
                        const y = document.getElementById("voice1"),
                            _ = document.getElementById("voice2");
                        y.play(), _.play(), y.pause(), _.pause(), $.value = !1, document.removeEventListener("touchstart", k)
                    })
                };
            return he(() => {
                document.addEventListener("touchstart", k)
            }), (y, _) => (u(), d(A, null, [e("audio", {
                id: "voice1",
                muted: $.value
            }, gs, 8, ys), e("audio", {
                id: "voice2",
                muted: $.value
            }, hs, 8, Cs)], 64))
        }
    }),
    $s = oe(ws, [
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/saasLottery/game/TrxWinGo/components/trx2/audio.vue"]
    ]),
    ks = v => (Ce("data-v-6045fcb5"), v = v(), be(), v),
    Ts = {
        id: "trxwingo"
    },
    Is = {
        class: "nav"
    },
    Ls = ks(() => e("p", {
        style: {
            height: "200px"
        }
    }, null, -1)),
    Bs = {
        class: "winner_box"
    },
    Rs = {
        class: "winner_result"
    },
    xs = se({
        __name: "index",
        setup(v) {
            const $ = _e(() => ye(() =>
                    import ("./record-f56eec5d.js"), ["assets/js/record-f56eec5d.js", "assets/js/common.modules-5cfe2cf4.js", "assets/css/common-05d2aa17.css", "assets/js/page-saasLottery-D5-2f97b5a2.js", "assets/js/page-activity-ActivityDetail-a58ec568.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2ac88fb8.js", "assets/js/en-cfd26acf.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css", "assets/js/page-activity-Bonus-3c16c86d.js", "assets/css/page-activity-Bonus-608b6579.css", "assets/css/page-saasLottery-D5-023805f7.css", "assets/css/record-dec58033.css"])),
                k = _e(() => ye(() =>
                    import ("./trend-73b6d9e3.js"), ["assets/js/trend-73b6d9e3.js", "assets/js/common.modules-5cfe2cf4.js", "assets/css/common-05d2aa17.css", "assets/js/page-saasLottery-D5-2f97b5a2.js", "assets/js/page-activity-ActivityDetail-a58ec568.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2ac88fb8.js", "assets/js/en-cfd26acf.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css", "assets/js/page-activity-Bonus-3c16c86d.js", "assets/css/page-activity-Bonus-608b6579.css", "assets/css/page-saasLottery-D5-023805f7.css", "assets/css/trend-8541676d.css"])),
                y = _e(() => ye(() =>
                    import ("./myRecord-4bf55562.js"), ["assets/js/myRecord-4bf55562.js", "assets/js/common.modules-5cfe2cf4.js", "assets/css/common-05d2aa17.css", "assets/js/page-saasLottery-D5-2f97b5a2.js", "assets/js/page-activity-ActivityDetail-a58ec568.js", "assets/js/page-turntable-assets-d6267459.js", "assets/js/native/index-2ac88fb8.js", "assets/js/en-cfd26acf.js", "assets/css/page-activity-ActivityDetail-a597c4a3.css", "assets/js/page-activity-Bonus-3c16c86d.js", "assets/css/page-activity-Bonus-608b6579.css", "assets/css/page-saasLottery-D5-023805f7.css", "assets/css/myRecord-bb265ddc.css"])),
                {
                    getWebData: _,
                    currentGame: N,
                    onLotteryJump: H
                } = we(),
                W = ps(),
                {
                    getIssue: P,
                    onClearBet: F,
                    getHistoryIssues: S,
                    winner: s,
                    setVoice: c,
                    VoiceType: T,
                    getlotteryissue: b
                } = W;
            st("trxWinHook", W);
            const M = p(() => {
                    switch (r.value) {
                        case "Record":
                            return $;
                        case "Trend":
                            return k;
                        case "MyRecord":
                            return y;
                        default:
                            return null
                    }
                }),
                I = h(!1),
                O = async m => {
                    if (!I.value) try {
                        I.value = !0, F(!0), H(m), await b()
                    } catch {} finally {
                        I.value = !1
                    }
                },
                r = h("Record");
            return he(async () => {
                _(), P(), S()
            }), (m, x) => {
                var U;
                return u(), d(A, null, [e("div", Ts, [w(t(gt), {
                    onChangeSelectGame: O,
                    onSetVoice: t(c),
                    VoiceType: t(T)
                }, null, 8, ["onSetVoice", "VoiceType"]), w(At), w(vs, {
                    currentGame: (U = t(N)) == null ? void 0 : U.gameName
                }, null, 8, ["currentGame"]), e("div", Is, [e("div", {
                    class: R({
                        active: r.value == "Record"
                    }),
                    onClick: x[0] || (x[0] = L => r.value = "Record")
                }, l(m.$t("gameRecords")), 3), e("div", {
                    class: R({
                        active: r.value == "Trend"
                    }),
                    onClick: x[1] || (x[1] = L => r.value = "Trend")
                }, l(m.$t("chartTrends")), 3), e("div", {
                    class: R({
                        active: r.value == "MyRecord"
                    }),
                    onClick: x[2] || (x[2] = L => r.value = "MyRecord")
                }, l(m.$t("myRecord")), 3)]), (u(), de(lt, null, [(u(), de(ot, null, {
                    default: G(() => [(u(), de(nt(M.value)))]),
                    fallback: G(() => [Ls]),
                    _: 1
                }))], 1024))]), w(t(Ct), {
                    ref_key: "winner",
                    ref: s
                }, {
                    default: G(({
                        data: L
                    }) => [e("div", Bs, [e("span", null, l(m.$t("winTips3")), 1), e("div", Rs, [e("div", {
                        class: R(`color_${L.color.replace(/,/g,"_")}`)
                    }, [(u(!0), d(A, null, q(L.color.split(","), B => (u(), d("span", null, l(m.$t(B)), 1))), 256))], 2), e("div", {
                        class: R(`color_${L.color}`)
                    }, l(L.number), 3), e("div", {
                        class: R(`color_${L.color}`)
                    }, l(L.number > 4 ? m.$t("big") : m.$t("small")), 3)])])]),
                    _: 1
                }, 512), w($s)], 64)
            }
        }
    });
const Ss = oe(xs, [
        ["__scopeId", "data-v-6045fcb5"],
        ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/saasLottery/game/TrxWinGo/views/trx2/index.vue"]
    ]),
    Ms = se({
        __name: "index",
        setup(v) {
            const $ = at(),
                {
                    useProvide: k,
                    setLotteryCode: y
                } = bt(),
                _ = $.query.gameCode;
            k(), y(_);
            const N = wt(),
                H = p(() => N.getIsShowLotteryDragon);
            return (W, P) => (u(), d(A, null, [w(Ss), H.value ? (u(), de(ht, {
                key: 0
            })) : X("v-if", !0)], 64))
        }
    });
const Ws = oe(Ms, [
    ["__file", "/usr/local/jenkins-prod/workspace/AR048-Pages-india-91club/src/views/saasLottery/TrxWinGo/index.vue"]
]);
export {
    Ws as
    default
};