import {
  G as se,
  R as Ke,
  a8 as Ve,
  B as p,
  H as ee,
  N as r,
  I as d,
  J as e,
  P as l,
  O as t,
  aB as te,
  K as P,
  M as q,
  ap as x,
  ao as X,
  Q as w,
  av as A,
  Z as ce,
  aC as Ce,
  aD as be,
  z as Ne,
  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,
  a7 as st,
  au as de,
  bm as ot,
  aT as nt,
  bl as lt,
  aE as _e,
  n as ye,
  T as at,
} from "./common.modules-cecf9b0d.js";
import {
  m as ge,
  u as we,
  k as it,
  j as Pe,
  A as rt,
  F as ut,
  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-c991f6a0.js";
import {
  _ as oe,
  c as De,
  y as wt,
} from "./page-activity-ActivityDetail-6713f46c.js";
import "./page-home-other-6d9782ba.js";
import "./page-home-Casino-ff36f722.js";
import "./page-home-AllGames-ebd16353.js";
import "./page-activity-Bonus-c94a181e.js";
import "./page-turntable-assets-d6267459.js";
import "./native/index-9bac92b2.js";
import "./en-5d34117c.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" },
  Lt = { class: "tf_C-l1-no" },
  It = $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
    )
  ),
  xt = { class: "tf_C-l2" },
  Rt = { class: "tf_C-time" },
  St = $e(() => e("div", { notime: "" }, ":", -1)),
  Mt = { class: "tf_C-l3" },
  Dt = { key: 0, class: "flex-center", style: { height: "100%" } },
  Vt = ["innerHTML"],
  Nt = se({
    __name: "timeleft",
    setup(v) {
      const $ = Ke(),
        k = Ve("trxWinHook"),
        {
          resultAll: y,
          countdownTime: _,
          issue: H,
          onSwitchIntroduce: G,
          introduceLoading: W,
          introduceDialog: V,
          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 L = ee("van-loading"),
          O = ee("van-popup");
        return (
          r(),
          d("div", $t, [
            e("div", kt, [
              e("div", Tt, [
                e("div", Lt, l(b.$t("gameRecordNum")), 1),
                e(
                  "div",
                  {
                    class: "tf_C-l1-tip",
                    onClick: M[0] || (M[0] = (...u) => t(G) && t(G)(...u)),
                  },
                  [It, te(l(b.$t("lotteryManual")), 1)]
                ),
              ]),
              e("div", { class: "tf_C-l1-r", onClick: T }, [
                Bt,
                te(l(b.$t("winTrxPub")), 1),
              ]),
            ]),
            e("div", xt, [
              e("div", null, l(t(H)), 1),
              e("div", Rt, [
                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, [
              (r(!0),
              d(
                P,
                null,
                q(
                  c.value,
                  (u, m) => (
                    r(),
                    d(
                      P,
                      { key: m },
                      [
                        t(s) == u
                          ? (r(),
                            d(
                              "p",
                              {
                                key: 0,
                                class: x(["num" + u, t(s) == u && "prize" + u]),
                              },
                              null,
                              2
                            ))
                          : (r(),
                            d(
                              "div",
                              {
                                key: 1,
                                class: x(["num" + u, t(s) == u && "prize" + u]),
                              },
                              null,
                              2
                            )),
                      ],
                      64
                    )
                  )
                ),
                128
              )),
            ]),
            X(" 玩法说明"),
            w(
              O,
              {
                onOpen: t(F),
                show: t(V),
                "onUpdate:show":
                  M[1] || (M[1] = (u) => (ce(V) ? (V.value = u) : null)),
                "close-on-click-overlay": !1,
                round: "",
                teleport: "body",
              },
              {
                default: A(() => {
                  var u;
                  return [
                    w(
                      t(ge),
                      {
                        title: (u = t(S)) == null ? void 0 : u.title,
                        onClose: t(G),
                      },
                      {
                        default: A(() => {
                          var m;
                          return [
                            t(W)
                              ? (r(),
                                d("div", Dt, [
                                  w(L, { type: "spinner", color: "#FD565C" }),
                                ]))
                              : (r(),
                                d(
                                  "div",
                                  {
                                    key: 1,
                                    innerHTML:
                                      (m = t(S)) == null ? void 0 : m.content,
                                  },
                                  null,
                                  8,
                                  Vt
                                )),
                          ];
                        }),
                        _: 1,
                      },
                      8,
                      ["title", "onClose"]
                    ),
                  ];
                }),
                _: 1,
              },
              8,
              ["onOpen", "show"]
            ),
          ])
        );
      };
    },
  });
const Pt = oe(Nt, [
    ["__scopeId", "data-v-c91450ee"],
    [
      "__file",
      "/usr/local/jenkins-prod/workspace/ar051-india-tiranga/src/saasLottery/game/TrxWinGo/components/trx2/timeleft.vue",
    ],
  ]),
  Ht = (v) => (Ce("data-v-767e7453"), (v = v()), be(), v),
  Gt = { class: "bet_body" },
  At = { 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 = Ht(() => e("div", { class: "title" }, null, -1)),
  ls = { class: "multiples" },
  as = ["onClick"],
  is = { class: "l2" },
  rs = { class: "bet-foot" },
  us = { 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 $ = Ve("trxWinHook"),
        {
          onRandom: k,
          bigSmalls: y,
          onBet: _,
          colors: H,
          numbers: G,
          randomNum: W,
          countdownTime: V,
          countdown: F,
          betMultiples: S,
          betDialog: s,
          betMultiple: c,
          playBet: T,
          agreePreSale: b,
          betScopes: M,
          amount: L,
          onClearBet: O,
          onBetting: u,
          loading: m,
          betLimit: R,
          getBetLimit: U,
          betLimitLoading: I,
        } = $,
        { t: B } = Ne(),
        { balance: ne } = we(),
        J = Pe(),
        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 * L.value > ne.value)
            return J.error(B("common.code_142"));
          u();
        };
      return (f, i) => {
        const ve = ee("van-checkbox"),
          Z = ee("van-popup"),
          pe = ee("van-loading");
        return (
          r(),
          d(
            P,
            null,
            [
              e("div", Gt, [
                Se(
                  e(
                    "div",
                    At,
                    [
                      e("div", null, l(t(V)[3] || "0"), 1),
                      e("div", null, l(t(V)[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(H)[0])),
                    },
                    l(f.$t("betGreen")),
                    1
                  ),
                  e(
                    "div",
                    {
                      class: "violet",
                      onClick: i[1] || (i[1] = (n) => t(_)(t(H)[1])),
                    },
                    l(f.$t("betViolet")),
                    1
                  ),
                  e(
                    "div",
                    {
                      class: "red",
                      onClick: i[2] || (i[2] = (n) => t(_)(t(H)[2])),
                    },
                    l(f.$t("betRed")),
                    1
                  ),
                ]),
                e("div", Et, [
                  (r(!0),
                  d(
                    P,
                    null,
                    q(
                      t(G),
                      (n, D) => (
                        r(),
                        d(
                          "div",
                          {
                            key: D,
                            class: x([
                              t(W) == n.playBet ? "active" : "",
                              "b" + D,
                            ]),
                            onClick: (Y) => t(_)(n),
                          },
                          null,
                          10,
                          Ot
                        )
                      )
                    ),
                    128
                  )),
                ]),
                t(S)
                  ? (r(),
                    d("div", jt, [
                      e(
                        "div",
                        {
                          onClick:
                            i[3] || (i[3] = (...n) => t(k) && t(k)(...n)),
                          class: x([t(S).length <= 4 && "f1", "l"]),
                        },
                        l(f.$t("randomBet")),
                        3
                      ),
                      (r(!0),
                      d(
                        P,
                        null,
                        q(
                          t(S),
                          (n, D) => (
                            r(),
                            d(
                              "div",
                              {
                                key: D,
                                class: x([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: A(() => [
                    e(
                      "div",
                      { class: x(["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, [
                              (r(!0),
                              d(
                                P,
                                null,
                                q(
                                  t(M),
                                  (n, D) => (
                                    r(),
                                    d(
                                      "div",
                                      {
                                        key: D,
                                        class: x({ active: n == t(L) }),
                                        onClick: (Y) => (L.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, [
                              (r(!0),
                              d(
                                P,
                                null,
                                q(
                                  t(S),
                                  (n, D) => (
                                    r(),
                                    d(
                                      "div",
                                      {
                                        key: D,
                                        class: x({ 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: A(() => [
                                  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", rs, [
                          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: x(["bet-foot-s", { disabled: t(m) }]),
                              onClick: ie,
                            },
                            [
                              te(l(t(B)("totalAmount")) + " ", 1),
                              e("span", null, l(t(De)(t(c) * t(L) || 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: A(() => [
                    w(
                      t(ge),
                      {
                        title: t(B)("presaleRules"),
                        onClose: i[13] || (i[13] = (n) => (j.value = !1)),
                      },
                      { default: A(() => [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: A(() => [
                    w(
                      t(ge),
                      {
                        title: f.$t("common.limit"),
                        onClose: i[15] || (i[15] = (n) => (Q.value = !1)),
                      },
                      {
                        default: A(() => [
                          t(I)
                            ? (r(),
                              d("div", us, [
                                w(pe, { type: "spinner", color: "#FD565C" }),
                              ]))
                            : (r(),
                              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, [
                                  (r(!0),
                                  d(
                                    P,
                                    null,
                                    q(
                                      t(R),
                                      (n, D) => (
                                        r(),
                                        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/ar051-india-tiranga/src/saasLottery/game/TrxWinGo/components/trx2/bet.vue",
    ],
  ]),
  fe = Pe();
function ps() {
  const {
      gameCode: v,
      lotteryCode: $,
      gameInfo: k,
      visibility: y,
      visibilitychange: _,
      synchronizer: H,
    } = rt(),
    { trigger: G, updateBalance: W, onBetTrigger: V, getGameInfo: F } = we(),
    { t: S } = Ne(),
    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),
    L = h(!1),
    O = h(0),
    u = h(),
    m = h(-1),
    R = h(null),
    U = h(!1),
    I = 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, ...ut(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: N, playBet: z, playRate: K } = E;
          return (
            C[N] || (C[N] = {}),
            C[N][z]
              ? C[N][z].playRates.push(K)
              : (C[N][z] = { ...E, playRates: [K] }),
            C
          );
        }, {}),
        g = Object.values(a).flatMap((C) =>
          Object.values(C).map((E) => {
            const N = Math.min(...E.playRates),
              z = Math.max(...E.playRates);
            return { ...E, playRateStr: N === z ? `x${N}` : `x${N}/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),
    He = p(() => s.playBet),
    Le = p({
      get() {
        return s.agreePreSale;
      },
      set(o) {
        s.agreePreSale = o;
      },
    }),
    Ge = p({
      get() {
        return s.amount;
      },
      set(o) {
        s.amount = o;
      },
    }),
    Ae = p({
      get() {
        return s.introduceDialog;
      },
      set(o) {
        s.introduceDialog = o;
      },
    }),
    We = p(() => s.betLimit || []),
    re = async () => {
      const o = await dt({ gameCode: v.value, lotteryCode: $.value }),
        a = o.intervalMinute * 60,
        g = o.current;
      (s.issueData = o), (s.interval = a), await Ie(g);
    },
    Ie = async (o, a) => {
      s.issue = o.issueNumber;
      const g = Me(o.endTime).valueOf() - Me(H.getCurrentTime()).valueOf();
      (s.countdown = Math.floor(g / 1e3)), s.countdown > 0 && Ue();
    },
    ue = async () => {
      var o;
      try {
        const { result: a, data: g } = await vt({
          gameCode: v.value,
          lotteryCode: $.value,
        });
        if (!a) return;
        (s.historyIssues = g.list || []),
          (o = g.list) != null &&
            o.length &&
            ((s.result = g.list[0].number || ""),
            (s.resultAll = g.list[0].blockId || "")),
          (s.historyIssuesTotalPage = g.totalPage || 0);
      } catch {
      } 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)));
    },
    xe = (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 (!L.value) {
        if (!Le.value) return fe.error(S("common.agreePreSale"));
        if (!J.value) return fe.error(S("common.noIssueNumber"));
        if (s.playType) {
          L.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),
              xe(),
              fe.success(S("common.betSuccessful")),
              s.betV++,
              W(),
              V();
          } catch {
          } finally {
            L.value = !1;
          }
        }
      }
    },
    Oe = async () => {
      if (!I.value)
        try {
          I.value = !0;
          const { result: o, data: a } = await _t(v.value);
          if (!o) return;
          s.betLimit = a;
        } catch {
        } finally {
          I.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 ((V(), c.delete(a), !u.value)) return;
        const N = E.status === !0,
          z = s.historyIssues.find((K) => K.issueNumber === a);
        u.value.open({
          isWin: N,
          amount: E.winAmount || 0,
          issueNumber: a,
          result: z,
        }),
          c.clear(),
          N && 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
              ? Re(1)
              : s.countdown == 1 && Re(2)),
          s.countdown < 1)
        ) {
          me();
          const a = ((o = s.issueData) == null ? void 0 : o.next) || null;
          a ? (Ie(a, s.interval), (s.issueData.next = null)) : await re(),
            O.value++,
            setTimeout(async () => {
              await ue(), 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;
      }
    },
    Re = (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),
        R.value ||
          (R.value = setInterval(function () {
            m.value = Math.floor(Math.random() * 11);
          }, 60)),
        setTimeout(() => {
          m.value > 9 && (m.value = 9),
            clearInterval(R.value),
            (M.value = !1),
            (R.value = null),
            !(s.countdown < 10) &&
              Be(D.value.find((o) => o.playBet === m.value));
        }, 3e3));
    },
    Je = async () => {
      await Promise.all([F(), re(), ue()]);
    };
  return (
    et(
      () => y.value,
      (o) => {
        o === 0
          ? me()
          : (me(),
            setTimeout(() => {
              re(), ue();
            }, 500));
      }
    ),
    he(() => {
      document.addEventListener("visibilitychange", _);
    }),
    {
      issue: J,
      countdown: j,
      countdownTime: Q,
      canBet: le,
      betScopes: ae,
      betMultiples: ie,
      getIssue: re,
      getHistoryIssues: ue,
      resultAll: i,
      result: ve,
      colors: pe,
      onBet: Be,
      numbers: D,
      bigSmalls: n,
      historyIssuesTotalPage: Y,
      historyIssues: ke,
      gameCode: v,
      trigger: G,
      betDialog: Te,
      betMultiple: T,
      playBet: He,
      agreePreSale: Le,
      amount: Ge,
      onClearBet: xe,
      onBetting: Ee,
      getBetLimit: Oe,
      loading: L,
      betLimit: We,
      update: O,
      winner: u,
      onRandom: qe,
      randomNum: m,
      onSwitchIntroduce: Fe,
      introduceDialog: Ae,
      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, _) => (
          r(),
          d(
            P,
            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/ar051-india-tiranga/src/saasLottery/game/TrxWinGo/components/trx2/audio.vue",
    ],
  ]),
  ks = (v) => (Ce("data-v-6045fcb5"), (v = v()), be(), v),
  Ts = { id: "trxwingo" },
  Ls = { class: "nav" },
  Is = ks(() => e("p", { style: { height: "200px" } }, null, -1)),
  Bs = { class: "winner_box" },
  xs = { class: "winner_result" },
  Rs = se({
    __name: "index",
    setup(v) {
      const $ = _e(() =>
          ye(
            () => import("./record-a9c1c373.js"),
            [
              "assets/js/record-a9c1c373.js",
              "assets/js/common.modules-cecf9b0d.js",
              "assets/css/common-e210f711.css",
              "assets/js/page-saasLottery-D5-c991f6a0.js",
              "assets/js/page-activity-ActivityDetail-6713f46c.js",
              "assets/js/page-turntable-assets-d6267459.js",
              "assets/js/native/index-9bac92b2.js",
              "assets/js/en-5d34117c.js",
              "assets/css/page-activity-ActivityDetail-a597c4a3.css",
              "assets/js/page-home-other-6d9782ba.js",
              "assets/js/page-home-Casino-ff36f722.js",
              "assets/css/page-home-Casino-0640108f.css",
              "assets/js/page-home-AllGames-ebd16353.js",
              "assets/css/page-home-AllGames-6031b577.css",
              "assets/css/page-home-other-e61ff531.css",
              "assets/js/page-activity-Bonus-c94a181e.js",
              "assets/css/page-activity-Bonus-608b6579.css",
              "assets/css/page-saasLottery-D5-02b7ea84.css",
              "assets/css/record-dec58033.css",
            ]
          )
        ),
        k = _e(() =>
          ye(
            () => import("./trend-e76128ae.js"),
            [
              "assets/js/trend-e76128ae.js",
              "assets/js/common.modules-cecf9b0d.js",
              "assets/css/common-e210f711.css",
              "assets/js/page-saasLottery-D5-c991f6a0.js",
              "assets/js/page-activity-ActivityDetail-6713f46c.js",
              "assets/js/page-turntable-assets-d6267459.js",
              "assets/js/native/index-9bac92b2.js",
              "assets/js/en-5d34117c.js",
              "assets/css/page-activity-ActivityDetail-a597c4a3.css",
              "assets/js/page-home-other-6d9782ba.js",
              "assets/js/page-home-Casino-ff36f722.js",
              "assets/css/page-home-Casino-0640108f.css",
              "assets/js/page-home-AllGames-ebd16353.js",
              "assets/css/page-home-AllGames-6031b577.css",
              "assets/css/page-home-other-e61ff531.css",
              "assets/js/page-activity-Bonus-c94a181e.js",
              "assets/css/page-activity-Bonus-608b6579.css",
              "assets/css/page-saasLottery-D5-02b7ea84.css",
              "assets/css/trend-8541676d.css",
            ]
          )
        ),
        y = _e(() =>
          ye(
            () => import("./myRecord-25a73ef2.js"),
            [
              "assets/js/myRecord-25a73ef2.js",
              "assets/js/common.modules-cecf9b0d.js",
              "assets/css/common-e210f711.css",
              "assets/js/page-saasLottery-D5-c991f6a0.js",
              "assets/js/page-activity-ActivityDetail-6713f46c.js",
              "assets/js/page-turntable-assets-d6267459.js",
              "assets/js/native/index-9bac92b2.js",
              "assets/js/en-5d34117c.js",
              "assets/css/page-activity-ActivityDetail-a597c4a3.css",
              "assets/js/page-home-other-6d9782ba.js",
              "assets/js/page-home-Casino-ff36f722.js",
              "assets/css/page-home-Casino-0640108f.css",
              "assets/js/page-home-AllGames-ebd16353.js",
              "assets/css/page-home-AllGames-6031b577.css",
              "assets/css/page-home-other-e61ff531.css",
              "assets/js/page-activity-Bonus-c94a181e.js",
              "assets/css/page-activity-Bonus-608b6579.css",
              "assets/css/page-saasLottery-D5-02b7ea84.css",
              "assets/css/myRecord-bb265ddc.css",
            ]
          )
        ),
        { getWebData: _, currentGame: H, onLotteryJump: G } = we(),
        W = ps(),
        {
          getIssue: V,
          onClearBet: F,
          getHistoryIssues: S,
          winner: s,
          setVoice: c,
          VoiceType: T,
          getlotteryissue: b,
        } = W;
      st("trxWinHook", W);
      const M = p(() => {
          switch (u.value) {
            case "Record":
              return $;
            case "Trend":
              return k;
            case "MyRecord":
              return y;
            default:
              return null;
          }
        }),
        L = h(!1),
        O = async (m) => {
          if (!L.value)
            try {
              (L.value = !0), F(!0), G(m), await b();
            } catch {
            } finally {
              L.value = !1;
            }
        },
        u = h("Record");
      return (
        he(async () => {
          _(), V(), S();
        }),
        (m, R) => {
          var U;
          return (
            r(),
            d(
              P,
              null,
              [
                e("div", Ts, [
                  w(
                    t(gt),
                    {
                      onChangeSelectGame: O,
                      onSetVoice: t(c),
                      VoiceType: t(T),
                    },
                    null,
                    8,
                    ["onSetVoice", "VoiceType"]
                  ),
                  w(Pt),
                  w(
                    vs,
                    { currentGame: (U = t(H)) == null ? void 0 : U.gameName },
                    null,
                    8,
                    ["currentGame"]
                  ),
                  e("div", Ls, [
                    e(
                      "div",
                      {
                        class: x({ active: u.value == "Record" }),
                        onClick: R[0] || (R[0] = (I) => (u.value = "Record")),
                      },
                      l(m.$t("gameRecords")),
                      3
                    ),
                    e(
                      "div",
                      {
                        class: x({ active: u.value == "Trend" }),
                        onClick: R[1] || (R[1] = (I) => (u.value = "Trend")),
                      },
                      l(m.$t("chartTrends")),
                      3
                    ),
                    e(
                      "div",
                      {
                        class: x({ active: u.value == "MyRecord" }),
                        onClick: R[2] || (R[2] = (I) => (u.value = "MyRecord")),
                      },
                      l(m.$t("myRecord")),
                      3
                    ),
                  ]),
                  (r(),
                  de(
                    lt,
                    null,
                    [
                      (r(),
                      de(ot, null, {
                        default: A(() => [(r(), de(nt(M.value)))]),
                        fallback: A(() => [Is]),
                        _: 1,
                      })),
                    ],
                    1024
                  )),
                ]),
                w(
                  t(Ct),
                  { ref_key: "winner", ref: s },
                  {
                    default: A(({ data: I }) => [
                      e("div", Bs, [
                        e("span", null, l(m.$t("winTips3")), 1),
                        e("div", xs, [
                          e(
                            "div",
                            { class: x(`color_${I.color.replace(/,/g, "_")}`) },
                            [
                              (r(!0),
                              d(
                                P,
                                null,
                                q(
                                  I.color.split(","),
                                  (B) => (r(), d("span", null, l(m.$t(B)), 1))
                                ),
                                256
                              )),
                            ],
                            2
                          ),
                          e(
                            "div",
                            { class: x(`color_${I.color}`) },
                            l(I.number),
                            3
                          ),
                          e(
                            "div",
                            { class: x(`color_${I.color}`) },
                            l(I.number > 4 ? m.$t("big") : m.$t("small")),
                            3
                          ),
                        ]),
                      ]),
                    ]),
                    _: 1,
                  },
                  512
                ),
                w($s),
              ],
              64
            )
          );
        }
      );
    },
  });
const Ss = oe(Rs, [
    ["__scopeId", "data-v-6045fcb5"],
    [
      "__file",
      "/usr/local/jenkins-prod/workspace/ar051-india-tiranga/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 H = wt(),
        G = p(() => H.getIsShowLotteryDragon);
      return (W, V) => (
        r(),
        d(
          P,
          null,
          [w(Ss), G.value ? (r(), de(ht, { key: 0 })) : X("v-if", !0)],
          64
        )
      );
    },
  });
const js = oe(Ms, [
  [
    "__file",
    "/usr/local/jenkins-prod/workspace/ar051-india-tiranga/src/views/saasLottery/TrxWinGo/index.vue",
  ],
]);
export { js as default };
