@opexa/portal-components 0.0.25 β 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/index.d.ts +1 -0
- package/dist/client/hooks/useGlobalStore.d.ts +5 -4
- package/dist/client/hooks/useGlobalStore.js +1 -1
- package/dist/client/hooks/useGlobalStore.mjs +20 -9
- package/dist/client/hooks/useProfileCompletionQuery.d.ts +3 -0
- package/dist/client/hooks/useProfileCompletionQuery.js +1 -0
- package/dist/client/hooks/useProfileCompletionQuery.mjs +38 -0
- package/dist/client-hooks.js +1 -1
- package/dist/client-hooks.mjs +34 -32
- package/dist/components/Account/Account.d.ts +8 -0
- package/dist/components/Account/Account.js +1 -1
- package/dist/components/Account/Account.mjs +346 -201
- package/dist/components/Account/account.recipe.js +1 -1
- package/dist/components/Account/account.recipe.mjs +4 -4
- package/dist/components/AccountInfo/AccountInfo.d.ts +4 -0
- package/dist/components/AccountInfo/AccountInfo.js +1 -0
- package/dist/components/AccountInfo/AccountInfo.mjs +148 -0
- package/dist/components/AccountInfo/index.d.ts +1 -0
- package/dist/components/AccountPaymentMethods/AccountPaymentMethods.d.ts +1 -0
- package/dist/components/AccountPaymentMethods/AccountPaymentMethods.js +1 -0
- package/dist/components/AccountPaymentMethods/AccountPaymentMethods.mjs +6 -0
- package/dist/components/AccountPaymentMethods/index.d.ts +1 -0
- package/dist/components/AccountSecurity/AccountSecurity.d.ts +4 -0
- package/dist/components/AccountSecurity/AccountSecurity.js +1 -0
- package/dist/components/AccountSecurity/AccountSecurity.mjs +159 -0
- package/dist/components/AccountSecurity/index.d.ts +1 -0
- package/dist/components/AccountVerification/AccountVerification.d.ts +1 -0
- package/dist/components/AccountVerification/AccountVerification.js +1 -0
- package/dist/components/AccountVerification/AccountVerification.mjs +6 -0
- package/dist/components/AccountVerification/index.d.ts +1 -0
- package/dist/components/JackpotCounter/JackpotCounterItem.js +1 -1
- package/dist/components/JackpotCounter/JackpotCounterItem.mjs +36 -36
- package/dist/components/Jackpots/JackpotGameProviders.d.ts +5 -1
- package/dist/components/Jackpots/JackpotGameProviders.js +1 -1
- package/dist/components/Jackpots/JackpotGameProviders.mjs +33 -31
- package/dist/components/Jackpots/JackpotItemDesktop.d.ts +9 -0
- package/dist/components/Jackpots/JackpotItemDesktop.js +1 -0
- package/dist/components/Jackpots/{JackpotItem.mjs β JackpotItemDesktop.mjs} +121 -173
- package/dist/components/Jackpots/JackpotItemMobile.d.ts +3 -1
- package/dist/components/Jackpots/JackpotItemMobile.js +1 -1
- package/dist/components/Jackpots/JackpotItemMobile.mjs +133 -180
- package/dist/components/Jackpots/Jackpots.d.ts +2 -0
- package/dist/components/Jackpots/Jackpots.js +1 -1
- package/dist/components/Jackpots/Jackpots.mjs +15 -13
- package/dist/components/Jackpots/useJackpotItemData.d.ts +21 -0
- package/dist/components/Jackpots/useJackpotItemData.js +1 -0
- package/dist/components/Jackpots/useJackpotItemData.mjs +100 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components.js +1 -1
- package/dist/components.mjs +74 -66
- package/dist/icons/CheckVerified02Icon.d.ts +2 -0
- package/dist/icons/CheckVerified02Icon.js +1 -0
- package/dist/icons/CheckVerified02Icon.mjs +22 -0
- package/dist/icons/CreditCard02Icon.d.ts +2 -0
- package/dist/icons/CreditCard02Icon.js +1 -0
- package/dist/icons/CreditCard02Icon.mjs +22 -0
- package/dist/icons/FileCheck02Icon.d.ts +2 -0
- package/dist/icons/FileCheck02Icon.js +1 -0
- package/dist/icons/FileCheck02Icon.mjs +22 -0
- package/dist/icons/Lock01Icon.d.ts +2 -0
- package/dist/icons/Lock01Icon.js +1 -0
- package/dist/icons/Lock01Icon.mjs +22 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons.js +1 -1
- package/dist/icons.mjs +92 -84
- package/dist/server/utils/index.d.ts +1 -0
- package/dist/server/utils/prefetchProfileCompletionQuery.d.ts +1 -0
- package/dist/server/utils/prefetchProfileCompletionQuery.js +1 -0
- package/dist/server/utils/prefetchProfileCompletionQuery.mjs +26 -0
- package/dist/server-utils.js +1 -1
- package/dist/server-utils.mjs +28 -26
- package/dist/theme.css +49 -0
- package/dist/ui/Checkbox/checkbox.recipe.js +1 -1
- package/dist/ui/Checkbox/checkbox.recipe.mjs +3 -3
- package/dist/ui/Clipboard/clipboard.recipe.js +1 -1
- package/dist/ui/Clipboard/clipboard.recipe.mjs +8 -8
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/ui/Field/field.recipe.mjs +4 -2
- package/dist/ui/IconButton/iconButton.recipe.d.ts +1 -0
- package/dist/ui/IconButton/iconButton.recipe.js +1 -1
- package/dist/ui/IconButton/iconButton.recipe.mjs +1 -0
- package/dist/ui/NumberInput/numberInput.recipe.js +1 -1
- package/dist/ui/NumberInput/numberInput.recipe.mjs +3 -3
- package/dist/ui/PasswordInput/passwordInput.recipe.js +1 -1
- package/dist/ui/PasswordInput/passwordInput.recipe.mjs +3 -3
- package/dist/ui/PinInput/pinInput.recipe.js +1 -1
- package/dist/ui/PinInput/pinInput.recipe.mjs +1 -1
- package/dist/ui/Select/select.recipe.js +1 -1
- package/dist/ui/Select/select.recipe.mjs +3 -3
- package/dist/utils/queryKeys.d.ts +1 -0
- package/dist/utils/queryKeys.js +1 -1
- package/dist/utils/queryKeys.mjs +71 -68
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +20 -19
- package/package.json +2 -2
- package/dist/components/Jackpots/JackpotItem.d.ts +0 -7
- package/dist/components/Jackpots/JackpotItem.js +0 -1
|
@@ -1,86 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import { Progress as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
9
|
-
import "
|
|
10
|
-
import "../../
|
|
2
|
+
import { jsxs as r, jsx as e, Fragment as N } from "react/jsx-runtime";
|
|
3
|
+
import { Progress as h } from "@ark-ui/react";
|
|
4
|
+
import b from "next/image";
|
|
5
|
+
import { twMerge as t } from "tailwind-merge";
|
|
6
|
+
import { ArrowNarrowUpRightIcon as J } from "../../icons/ArrowNarrowUpRightIcon.mjs";
|
|
7
|
+
import { ChevronLeftIcon as f } from "../../icons/ChevronLeftIcon.mjs";
|
|
8
|
+
import { ChevronRightIcon as x } from "../../icons/ChevronRightIcon.mjs";
|
|
9
|
+
import { StarIcon as g } from "../../icons/StarIcon.mjs";
|
|
10
|
+
import { Trophy01Icon as p } from "../../icons/Trophy01Icon.mjs";
|
|
11
|
+
import D from "../../images/close-chest.png.mjs";
|
|
12
|
+
import A from "../../images/first-place.png.mjs";
|
|
13
|
+
import L from "../../images/leaderboard.png.mjs";
|
|
14
|
+
import R from "../../images/open-chest.png.mjs";
|
|
11
15
|
import "../../utils/capitalize.mjs";
|
|
12
|
-
import { formatNumber as
|
|
16
|
+
import { formatNumber as d } from "../../utils/formatNumber.mjs";
|
|
17
|
+
import "../../constants/index.mjs";
|
|
13
18
|
import "../../utils/getLocaleInfo.mjs";
|
|
14
19
|
import "../../utils/getQueryClient.mjs";
|
|
15
20
|
import "../../utils/isMobile.mjs";
|
|
16
21
|
import "../../utils/parseDecimal.mjs";
|
|
17
|
-
import "
|
|
18
|
-
import "
|
|
19
|
-
import "
|
|
20
|
-
import "
|
|
21
|
-
import "
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
function we({ jackpot: t }) {
|
|
39
|
-
var g;
|
|
40
|
-
const n = ((g = T({
|
|
41
|
-
first: 30,
|
|
42
|
-
filter: {
|
|
43
|
-
jackpot: {
|
|
44
|
-
equal: t.id
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
sort: {
|
|
48
|
-
cursor: "AMOUNT",
|
|
49
|
-
order: "DESC"
|
|
50
|
-
}
|
|
51
|
-
}).data) == null ? void 0 : g.pages[0].edges.map((s) => s.node)) ?? [], u = n[0] ?? [];
|
|
52
|
-
v(() => Object.entries(
|
|
53
|
-
(t == null ? void 0 : t.jackpotTurnoverContributionPercentagePerGameProvider) ?? {}
|
|
54
|
-
).filter(([l, J]) => Number(J) > 0).map(([l]) => l), [t]);
|
|
55
|
-
const d = D(), i = t.drawing, z = i ? t.maximumJackpotPoolLimit : t.pool, p = A(
|
|
56
|
-
({ index: s }) => /* @__PURE__ */ e(
|
|
57
|
-
i ? h : b,
|
|
58
|
-
{
|
|
59
|
-
className: a(
|
|
60
|
-
"scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4",
|
|
61
|
-
i ? o["animate-wave-color-error"] : o["animate-wave-color-success"]
|
|
62
|
-
),
|
|
63
|
-
style: {
|
|
64
|
-
animationDelay: i ? `${(40 - s - 1) * 0.1}s` : `${s * 0.1}s`
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
),
|
|
68
|
-
[i]
|
|
69
|
-
), I = v(
|
|
70
|
-
() => Array.from({ length: 40 }, (s, l) => /* @__PURE__ */ e(p, { isFirst: l === 0, index: l }, l)),
|
|
71
|
-
[p]
|
|
72
|
-
);
|
|
22
|
+
import { maskName as v } from "../JackpotCounter/JackpotCounterItem.mjs";
|
|
23
|
+
import i from "../JackpotCounter/JackpotCounterItem.module.css.mjs";
|
|
24
|
+
import { JackpotGameProviders as T } from "./JackpotGameProviders.mjs";
|
|
25
|
+
import { JackpotRules as S } from "./JackpotRules.mjs";
|
|
26
|
+
import { useJackpotItemData as q } from "./useJackpotItemData.mjs";
|
|
27
|
+
function se({
|
|
28
|
+
jackpot: l,
|
|
29
|
+
gameProviders: y
|
|
30
|
+
}) {
|
|
31
|
+
const {
|
|
32
|
+
jackpotPayouts: n,
|
|
33
|
+
topJackpotPayout: u,
|
|
34
|
+
filteredGameProviders: w,
|
|
35
|
+
localeInfo: s,
|
|
36
|
+
isPayingOut: c,
|
|
37
|
+
jackpotAmount: P,
|
|
38
|
+
arrowImages: z,
|
|
39
|
+
calculatePercentage: I,
|
|
40
|
+
getAccumulatingJackpotDescription: C,
|
|
41
|
+
starTierStyles: m
|
|
42
|
+
} = q({ jackpot: l, gameProviders: y });
|
|
73
43
|
return /* @__PURE__ */ r(
|
|
74
44
|
"div",
|
|
75
45
|
{
|
|
76
|
-
className:
|
|
46
|
+
className: t(
|
|
77
47
|
"bg-bg-tertiary border-border-primary rounded-2xl border"
|
|
78
48
|
),
|
|
79
49
|
children: [
|
|
80
50
|
/* @__PURE__ */ r(
|
|
81
51
|
"div",
|
|
82
52
|
{
|
|
83
|
-
className:
|
|
53
|
+
className: t(
|
|
84
54
|
"relative flex shrink-0 p-3 text-center lg:gap-4 lg:p-5"
|
|
85
55
|
),
|
|
86
56
|
children: [
|
|
@@ -88,26 +58,26 @@ function we({ jackpot: t }) {
|
|
|
88
58
|
/* @__PURE__ */ e("div", { className: "flex h-full flex-col justify-between", children: /* @__PURE__ */ e("div", { className: "flex w-full justify-between", children: /* @__PURE__ */ r("div", { className: "flex w-full flex-col", children: [
|
|
89
59
|
/* @__PURE__ */ r("div", { className: "relative flex w-full justify-between", children: [
|
|
90
60
|
/* @__PURE__ */ r("div", { children: [
|
|
91
|
-
|
|
61
|
+
c ? /* @__PURE__ */ r("div", { className: "border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [
|
|
92
62
|
/* @__PURE__ */ e("span", { className: "full bg-utility-success-500 size-1.5 animate-pulse rounded" }),
|
|
93
63
|
"Paying Out"
|
|
94
64
|
] }) : /* @__PURE__ */ r("div", { className: "border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium", children: [
|
|
95
|
-
/* @__PURE__ */ e(
|
|
65
|
+
/* @__PURE__ */ e(J, { className: "text-utility-blue-500 size-3.5" }),
|
|
96
66
|
"Accumulating"
|
|
97
67
|
] }),
|
|
98
|
-
/* @__PURE__ */ e("div", { className: "text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl", children:
|
|
99
|
-
/* @__PURE__ */ e("div", { className: "bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl", children:
|
|
100
|
-
currency:
|
|
68
|
+
/* @__PURE__ */ e("div", { className: "text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl", children: l.name }),
|
|
69
|
+
/* @__PURE__ */ e("div", { className: "bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl", children: d(P, {
|
|
70
|
+
currency: s.currency.code,
|
|
101
71
|
minDecimalPlaces: 2,
|
|
102
72
|
maxDecimalPlaces: 2
|
|
103
73
|
}) })
|
|
104
74
|
] }),
|
|
105
75
|
/* @__PURE__ */ e("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: /* @__PURE__ */ e(
|
|
106
|
-
|
|
76
|
+
b,
|
|
107
77
|
{
|
|
108
78
|
width: 150,
|
|
109
79
|
height: 150,
|
|
110
|
-
src:
|
|
80
|
+
src: c ? R : D,
|
|
111
81
|
alt: "closeChest",
|
|
112
82
|
quality: 100,
|
|
113
83
|
className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2"
|
|
@@ -118,30 +88,30 @@ function we({ jackpot: t }) {
|
|
|
118
88
|
/* @__PURE__ */ e("div", { className: "border-yellow-400 relative h-18 w-18 rounded-full border", children: /* @__PURE__ */ e("div", { className: "bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold", children: "1st" }) }),
|
|
119
89
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1 text-left", children: [
|
|
120
90
|
/* @__PURE__ */ r("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [
|
|
121
|
-
/* @__PURE__ */ e(
|
|
91
|
+
/* @__PURE__ */ e(p, { className: "text-utility-brand-600 size-3.5" }),
|
|
122
92
|
"Top Payout"
|
|
123
93
|
] }),
|
|
124
|
-
/* @__PURE__ */ e("div", { className: "font-semibold", children:
|
|
125
|
-
/* @__PURE__ */ e("div", { className: "text-brand-400 text-2xl", children:
|
|
126
|
-
currency:
|
|
94
|
+
/* @__PURE__ */ e("div", { className: "font-semibold", children: v(u.member.name) }),
|
|
95
|
+
/* @__PURE__ */ e("div", { className: "text-brand-400 text-2xl", children: d(u.amount, {
|
|
96
|
+
currency: s.currency.code,
|
|
127
97
|
minDecimalPlaces: 2,
|
|
128
98
|
maxDecimalPlaces: 2
|
|
129
99
|
}) })
|
|
130
100
|
] })
|
|
131
101
|
] }) }) : /* @__PURE__ */ r("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [
|
|
132
102
|
/* @__PURE__ */ e(
|
|
133
|
-
|
|
103
|
+
b,
|
|
134
104
|
{
|
|
135
105
|
width: 66,
|
|
136
106
|
height: 87,
|
|
137
|
-
src:
|
|
107
|
+
src: A,
|
|
138
108
|
alt: "closeChest",
|
|
139
109
|
className: "size-full h-auto w-[66px] mix-blend-luminosity"
|
|
140
110
|
}
|
|
141
111
|
),
|
|
142
112
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1 text-left", children: [
|
|
143
113
|
/* @__PURE__ */ r("div", { className: "border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium", children: [
|
|
144
|
-
/* @__PURE__ */ e(
|
|
114
|
+
/* @__PURE__ */ e(p, { className: "text-utility-brand-600 size-3.5" }),
|
|
145
115
|
"Top Payout"
|
|
146
116
|
] }),
|
|
147
117
|
/* @__PURE__ */ e("div", { className: "font-semibold", children: "No winners yet" }),
|
|
@@ -151,108 +121,108 @@ function we({ jackpot: t }) {
|
|
|
151
121
|
] }) }) }),
|
|
152
122
|
/* @__PURE__ */ r("div", { className: "mt-3 lg:mt-4", children: [
|
|
153
123
|
/* @__PURE__ */ r("div", { className: "mb-1 flex justify-between", children: [
|
|
154
|
-
/* @__PURE__ */ e("div", { className: "text-text-primary-900 text-xs font-semibold", children:
|
|
155
|
-
currency:
|
|
124
|
+
/* @__PURE__ */ e("div", { className: "text-text-primary-900 text-xs font-semibold", children: d(0, {
|
|
125
|
+
currency: s.currency.code,
|
|
156
126
|
compact: !0
|
|
157
127
|
}) }),
|
|
158
128
|
/* @__PURE__ */ r("div", { className: "relative flex items-center justify-end gap-1.5", children: [
|
|
159
|
-
|
|
129
|
+
c ? /* @__PURE__ */ r("div", { className: "flex w-6 items-center", children: [
|
|
160
130
|
/* @__PURE__ */ e(
|
|
161
131
|
"div",
|
|
162
132
|
{
|
|
163
|
-
className:
|
|
133
|
+
className: t(
|
|
164
134
|
"absolute left-0",
|
|
165
|
-
|
|
135
|
+
i["animate-arrow-red-flash-1"]
|
|
166
136
|
),
|
|
167
|
-
children: /* @__PURE__ */ e(
|
|
137
|
+
children: /* @__PURE__ */ e(f, { className: "size-4.5" })
|
|
168
138
|
}
|
|
169
139
|
),
|
|
170
140
|
/* @__PURE__ */ e(
|
|
171
141
|
"div",
|
|
172
142
|
{
|
|
173
|
-
className:
|
|
143
|
+
className: t(
|
|
174
144
|
"absolute left-1.5",
|
|
175
|
-
|
|
145
|
+
i["animate-arrow-red-flash-2"]
|
|
176
146
|
),
|
|
177
|
-
children: /* @__PURE__ */ e(
|
|
147
|
+
children: /* @__PURE__ */ e(f, { className: "size-4.5" })
|
|
178
148
|
}
|
|
179
149
|
),
|
|
180
150
|
/* @__PURE__ */ e(
|
|
181
151
|
"div",
|
|
182
152
|
{
|
|
183
|
-
className:
|
|
153
|
+
className: t(
|
|
184
154
|
"absolute left-3",
|
|
185
|
-
|
|
155
|
+
i["animate-arrow-red-flash-3"]
|
|
186
156
|
),
|
|
187
|
-
children: /* @__PURE__ */ e(
|
|
157
|
+
children: /* @__PURE__ */ e(f, { className: "size-4.5" })
|
|
188
158
|
}
|
|
189
159
|
)
|
|
190
160
|
] }) : /* @__PURE__ */ r("div", { className: "flex w-6 items-center", children: [
|
|
191
161
|
/* @__PURE__ */ e(
|
|
192
162
|
"div",
|
|
193
163
|
{
|
|
194
|
-
className:
|
|
164
|
+
className: t(
|
|
195
165
|
"absolute left-0",
|
|
196
|
-
|
|
166
|
+
i["animate-arrow-green-flash-1"]
|
|
197
167
|
),
|
|
198
|
-
children: /* @__PURE__ */ e(
|
|
168
|
+
children: /* @__PURE__ */ e(x, { className: "size-4.5" })
|
|
199
169
|
}
|
|
200
170
|
),
|
|
201
171
|
/* @__PURE__ */ e(
|
|
202
172
|
"div",
|
|
203
173
|
{
|
|
204
|
-
className:
|
|
174
|
+
className: t(
|
|
205
175
|
"absolute left-1.5",
|
|
206
|
-
|
|
176
|
+
i["animate-arrow-green-flash-2"]
|
|
207
177
|
),
|
|
208
|
-
children: /* @__PURE__ */ e(
|
|
178
|
+
children: /* @__PURE__ */ e(x, { className: "size-4.5" })
|
|
209
179
|
}
|
|
210
180
|
),
|
|
211
181
|
/* @__PURE__ */ e(
|
|
212
182
|
"div",
|
|
213
183
|
{
|
|
214
|
-
className:
|
|
184
|
+
className: t(
|
|
215
185
|
"absolute left-3",
|
|
216
|
-
|
|
186
|
+
i["animate-arrow-green-flash-3"]
|
|
217
187
|
),
|
|
218
|
-
children: /* @__PURE__ */ e(
|
|
188
|
+
children: /* @__PURE__ */ e(x, { className: "size-4.5" })
|
|
219
189
|
}
|
|
220
190
|
)
|
|
221
191
|
] }),
|
|
222
|
-
/* @__PURE__ */ e("div", { className: "text-text-primary-900 text-xs font-semibold", children:
|
|
223
|
-
currency:
|
|
192
|
+
/* @__PURE__ */ e("div", { className: "text-text-primary-900 text-xs font-semibold", children: d(l == null ? void 0 : l.maximumJackpotPoolLimit, {
|
|
193
|
+
currency: s.currency.code,
|
|
224
194
|
compact: !0
|
|
225
195
|
}) })
|
|
226
196
|
] })
|
|
227
197
|
] }),
|
|
228
198
|
/* @__PURE__ */ e(
|
|
229
|
-
|
|
199
|
+
h.Root,
|
|
230
200
|
{
|
|
231
201
|
className: "bg-bg-primary h-2 w-full rounded-full lg:h-4",
|
|
232
202
|
max: 100,
|
|
233
|
-
value:
|
|
234
|
-
Number(
|
|
235
|
-
Number(
|
|
203
|
+
value: I(
|
|
204
|
+
Number(l.pool),
|
|
205
|
+
Number(l.maximumJackpotPoolLimit)
|
|
236
206
|
),
|
|
237
|
-
children: /* @__PURE__ */ e(
|
|
207
|
+
children: /* @__PURE__ */ e(h.Track, { className: "bg-bg-primary h-full overflow-hidden rounded-full", children: /* @__PURE__ */ e(h.Range, { className: "bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5", children: /* @__PURE__ */ e(
|
|
238
208
|
"div",
|
|
239
209
|
{
|
|
240
210
|
className: "pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5",
|
|
241
211
|
"aria-hidden": "true",
|
|
242
|
-
children:
|
|
212
|
+
children: z
|
|
243
213
|
}
|
|
244
214
|
) }) })
|
|
245
215
|
}
|
|
246
216
|
),
|
|
247
|
-
/* @__PURE__ */ e("div", { className: "mt-1 block text-start text-2xs lg:hidden", children:
|
|
248
|
-
|
|
217
|
+
/* @__PURE__ */ e("div", { className: "mt-1 block text-start text-2xs lg:hidden", children: c ? `The pot has hit ${d(
|
|
218
|
+
l == null ? void 0 : l.maximumJackpotPoolLimit,
|
|
249
219
|
{
|
|
250
|
-
currency:
|
|
220
|
+
currency: s.currency.code,
|
|
251
221
|
compact: !0
|
|
252
222
|
}
|
|
253
|
-
)} Play now for your chance to win big! π₯` :
|
|
254
|
-
Number(
|
|
255
|
-
Number(
|
|
223
|
+
)} Play now for your chance to win big! π₯` : C(
|
|
224
|
+
Number(l == null ? void 0 : l.pool) ?? 0,
|
|
225
|
+
Number(l == null ? void 0 : l.maximumJackpotPoolLimit) ?? 0
|
|
256
226
|
) })
|
|
257
227
|
] })
|
|
258
228
|
] }),
|
|
@@ -260,11 +230,11 @@ function we({ jackpot: t }) {
|
|
|
260
230
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
261
231
|
/* @__PURE__ */ r("div", { className: "flex gap-2", children: [
|
|
262
232
|
/* @__PURE__ */ e(
|
|
263
|
-
|
|
233
|
+
b,
|
|
264
234
|
{
|
|
265
235
|
width: 24,
|
|
266
236
|
height: 24,
|
|
267
|
-
src:
|
|
237
|
+
src: L,
|
|
268
238
|
quality: 100,
|
|
269
239
|
alt: "leaderboardIcon",
|
|
270
240
|
className: "size-full h-auto w-6"
|
|
@@ -272,14 +242,14 @@ function we({ jackpot: t }) {
|
|
|
272
242
|
),
|
|
273
243
|
/* @__PURE__ */ e("div", { className: "text-text-primary-900 text-lg font-semibold", children: n.length ? "Leaderboard" : "Starting soon!" })
|
|
274
244
|
] }),
|
|
275
|
-
/* @__PURE__ */ e(
|
|
245
|
+
/* @__PURE__ */ e(S, { jackpotRules: l.description })
|
|
276
246
|
] }),
|
|
277
247
|
/* @__PURE__ */ e(
|
|
278
248
|
"div",
|
|
279
249
|
{
|
|
280
|
-
className:
|
|
250
|
+
className: t(
|
|
281
251
|
"max-h-[272px] overflow-y-scroll",
|
|
282
|
-
|
|
252
|
+
i.scrollArea
|
|
283
253
|
),
|
|
284
254
|
children: /* @__PURE__ */ e("div", { className: "border-gray-200 overflow-hidden rounded-xl", children: /* @__PURE__ */ r("table", { className: "w-full", children: [
|
|
285
255
|
/* @__PURE__ */ e("thead", { children: /* @__PURE__ */ r("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 text-xs font-medium", children: [
|
|
@@ -288,87 +258,87 @@ function we({ jackpot: t }) {
|
|
|
288
258
|
/* @__PURE__ */ e("th", { children: "Multiplier" }),
|
|
289
259
|
/* @__PURE__ */ e("th", { children: "Prize" })
|
|
290
260
|
] }) }),
|
|
291
|
-
/* @__PURE__ */ e("tbody", { children: n.length ? /* @__PURE__ */ e(N, { children: n.map((
|
|
261
|
+
/* @__PURE__ */ e("tbody", { children: n.length ? /* @__PURE__ */ e(N, { children: n.map((o, a) => /* @__PURE__ */ r(
|
|
292
262
|
"tr",
|
|
293
263
|
{
|
|
294
264
|
className: "bg-bg-primary text-text-secondary-700 text-sm",
|
|
295
265
|
children: [
|
|
296
|
-
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children:
|
|
266
|
+
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: a + 1 < 6 ? /* @__PURE__ */ r("div", { className: "relative", children: [
|
|
297
267
|
/* @__PURE__ */ e(
|
|
298
|
-
|
|
268
|
+
g,
|
|
299
269
|
{
|
|
300
|
-
className:
|
|
270
|
+
className: t(
|
|
301
271
|
"mx-auto size-6.5",
|
|
302
|
-
|
|
272
|
+
m[a].starColor
|
|
303
273
|
)
|
|
304
274
|
}
|
|
305
275
|
),
|
|
306
276
|
/* @__PURE__ */ e(
|
|
307
277
|
"span",
|
|
308
278
|
{
|
|
309
|
-
className:
|
|
279
|
+
className: t(
|
|
310
280
|
"absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",
|
|
311
|
-
|
|
281
|
+
m[a].numberColor
|
|
312
282
|
),
|
|
313
|
-
children:
|
|
283
|
+
children: a + 1
|
|
314
284
|
}
|
|
315
285
|
)
|
|
316
|
-
] }) :
|
|
317
|
-
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children:
|
|
286
|
+
] }) : a + 1 }),
|
|
287
|
+
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: v(o.member.name) }),
|
|
318
288
|
/* @__PURE__ */ r("td", { className: "border-border-secondary h-12 border-t-2", children: [
|
|
319
|
-
|
|
289
|
+
o.multiplier,
|
|
320
290
|
"x"
|
|
321
291
|
] }),
|
|
322
|
-
/* @__PURE__ */ e("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children:
|
|
323
|
-
currency:
|
|
292
|
+
/* @__PURE__ */ e("td", { className: "border-border-secondary text-brand-400 h-12 border-t-2", children: d(o.amount, {
|
|
293
|
+
currency: s.currency.code,
|
|
324
294
|
minDecimalPlaces: 2,
|
|
325
295
|
maxDecimalPlaces: 2
|
|
326
296
|
}) })
|
|
327
297
|
]
|
|
328
298
|
},
|
|
329
|
-
|
|
330
|
-
)) }) : /* @__PURE__ */ e(N, { children: Array.from({ length: 10 }).map((
|
|
299
|
+
a
|
|
300
|
+
)) }) : /* @__PURE__ */ e(N, { children: Array.from({ length: 10 }).map((o, a) => /* @__PURE__ */ r(
|
|
331
301
|
"tr",
|
|
332
302
|
{
|
|
333
303
|
className: "bg-bg-primary text-text-secondary-700 text-sm",
|
|
334
304
|
children: [
|
|
335
|
-
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children:
|
|
305
|
+
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 w-[52px] border-t-2", children: a + 1 < 6 ? /* @__PURE__ */ r("div", { className: "relative", children: [
|
|
336
306
|
/* @__PURE__ */ e(
|
|
337
|
-
|
|
307
|
+
g,
|
|
338
308
|
{
|
|
339
|
-
className:
|
|
309
|
+
className: t(
|
|
340
310
|
"mx-auto size-6.5",
|
|
341
|
-
|
|
311
|
+
m[a].starColor
|
|
342
312
|
)
|
|
343
313
|
}
|
|
344
314
|
),
|
|
345
315
|
/* @__PURE__ */ e(
|
|
346
316
|
"span",
|
|
347
317
|
{
|
|
348
|
-
className:
|
|
318
|
+
className: t(
|
|
349
319
|
"absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",
|
|
350
|
-
|
|
320
|
+
m[a].numberColor
|
|
351
321
|
),
|
|
352
|
-
children:
|
|
322
|
+
children: a + 1
|
|
353
323
|
}
|
|
354
324
|
)
|
|
355
|
-
] }) :
|
|
325
|
+
] }) : a + 1 }),
|
|
356
326
|
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }),
|
|
357
327
|
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: "-" }),
|
|
358
328
|
/* @__PURE__ */ e("td", { className: "border-border-secondary h-12 border-t-2", children: "-" })
|
|
359
329
|
]
|
|
360
330
|
},
|
|
361
|
-
|
|
331
|
+
a
|
|
362
332
|
)) }) })
|
|
363
333
|
] }) })
|
|
364
334
|
}
|
|
365
335
|
)
|
|
366
336
|
] }),
|
|
367
|
-
|
|
337
|
+
c && /* @__PURE__ */ e(
|
|
368
338
|
"div",
|
|
369
339
|
{
|
|
370
|
-
className:
|
|
371
|
-
|
|
340
|
+
className: t(
|
|
341
|
+
i["light-rays"],
|
|
372
342
|
"absolute right-0 top-0 rounded-2xl"
|
|
373
343
|
)
|
|
374
344
|
}
|
|
@@ -376,33 +346,11 @@ function we({ jackpot: t }) {
|
|
|
376
346
|
]
|
|
377
347
|
}
|
|
378
348
|
),
|
|
379
|
-
/* @__PURE__ */ e(
|
|
349
|
+
!!w.length && /* @__PURE__ */ e(T, { gameProviders: y })
|
|
380
350
|
]
|
|
381
351
|
}
|
|
382
352
|
);
|
|
383
353
|
}
|
|
384
|
-
const _ = (t, m) => m === 0 ? 0 : t / m * 100, $ = (t, m) => (m === 0 ? 0 : t / m * 100) <= 90 ? "The jackpot is heating up! Keep playing to stay in the action and watch it grow!" : "π₯ Itβs about to pop! Stay in the game for your shot at the prize!", x = [
|
|
385
|
-
{
|
|
386
|
-
starColor: "text-yellow-400",
|
|
387
|
-
numberColor: "text-bg-primary"
|
|
388
|
-
},
|
|
389
|
-
{
|
|
390
|
-
starColor: "text-utility-gray-700",
|
|
391
|
-
numberColor: "text-bg-primary"
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
starColor: "text-yellow-700",
|
|
395
|
-
numberColor: "text-bg-primary"
|
|
396
|
-
},
|
|
397
|
-
{
|
|
398
|
-
starColor: "text-bg-quaternary",
|
|
399
|
-
numberColor: "text-text-primary-900"
|
|
400
|
-
},
|
|
401
|
-
{
|
|
402
|
-
starColor: "text-bg-quaternary",
|
|
403
|
-
numberColor: "text-text-primary-900"
|
|
404
|
-
}
|
|
405
|
-
];
|
|
406
354
|
export {
|
|
407
|
-
|
|
355
|
+
se as JackpotItemDesktop
|
|
408
356
|
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { Jackpot } from '@opexa/portal-sdk-core';
|
|
2
|
+
import { GameProviderData } from '../../types';
|
|
2
3
|
export interface JackpotItemMobileProps {
|
|
3
4
|
jackpot: Jackpot;
|
|
4
5
|
/** @default "/jackpots" */
|
|
5
6
|
viewAllUrl?: string;
|
|
7
|
+
gameProviders: GameProviderData[];
|
|
6
8
|
}
|
|
7
|
-
export declare function JackpotItemMobile({ jackpot }: JackpotItemMobileProps): import("react").JSX.Element;
|
|
9
|
+
export declare function JackpotItemMobile({ jackpot, gameProviders, }: JackpotItemMobileProps): import("react").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),f=require("@ark-ui/react"),j=require("next/image"),g=require("react"),s=require("tailwind-merge");require("@opexa/portal-sdk-core");require("@tanstack/react-query");require("tiny-invariant");require("../../constants/index.js");require("../../utils/capitalize.js");const c=require("../../utils/formatNumber.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");require("../../client/services/getSession.js");require("lodash-es");require("@opexa/portal-sdk-core/object-id");require("../../client/hooks/useGlobalStore.js");require("../../client/hooks/useInfiniteQueryHelper.js");const M=require("../../client/hooks/useLocaleInfo.js");require("usehooks-ts");const z=require("../../client/hooks/useJackpotPayoutsQuery.js"),J=require("../../icons/ArrowNarrowUpRightIcon.js"),x=require("../../icons/ChevronLeftIcon.js"),h=require("../../icons/ChevronRightIcon.js"),v=require("../../icons/StarIcon.js"),w=require("../../icons/Trophy01Icon.js"),D=require("../../icons/ArrowNarrowDownIcon.js"),R=require("../../icons/ArrowNarrowUpIcon.js"),A=require("../../images/close-chest.png.js"),L=require("../../images/first-place.png.js"),S=require("../../images/open-chest.png.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const q=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const C=require("../JackpotCounter/JackpotCounterItem.js"),i=require("../JackpotCounter/JackpotCounterItem.module.css.js"),T=require("./JackpotGameProviders.js"),k=require("./JackpotRules.js");function U({jackpot:r}){var p;const d=((p=z.useJackpotPayoutsQuery({first:30,filter:{jackpot:{equal:r.id}},sort:{cursor:"AMOUNT",order:"DESC"}}).data)==null?void 0:p.pages[0].edges.map(a=>a.node))??[],u=d[0]??[],n=M.useLocaleInfo(),l=r.drawing,I=l?r.maximumJackpotPoolLimit:r.pool,y=g.useCallback(({index:a})=>{const t=l?x.ChevronLeftIcon:h.ChevronRightIcon;return e.jsx(t,{className:s.twMerge("scale-400 lg:scale-250 text-brand-300 min-w-2.5 lg:min-w-4",l?i.default["animate-wave-color-error"]:i.default["animate-wave-color-success"]),style:{animationDelay:l?`${(40-a-1)*.1}s`:`${a*.1}s`}})},[l]),P=g.useMemo(()=>Array.from({length:40},(a,t)=>e.jsx(y,{isFirst:t===0,index:t},t)),[y]),[m,N]=g.useState(!1);return e.jsxs("div",{className:"bg-bg-primary border-border-primary rounded-2xl border",children:[e.jsxs("div",{className:s.twMerge("bg-bg-tertiary relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5"),children:[e.jsxs("div",{className:"z-1 relative flex flex-1 flex-col",children:[e.jsx("div",{className:"flex h-full flex-col justify-between",children:e.jsx("div",{className:"flex w-full justify-between",children:e.jsx("div",{className:"flex w-full flex-col",children:e.jsxs("div",{className:"relative flex w-full justify-between",children:[e.jsxs("div",{children:[l?e.jsxs("div",{className:"border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx("span",{className:"full bg-utility-success-500 size-1.5 animate-pulse rounded"}),"Paying Out"]}):e.jsxs("div",{className:"border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx(J.ArrowNarrowUpRightIcon,{className:"text-utility-blue-500 size-3.5"}),"Accumulating"]}),e.jsx("div",{className:"text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl",children:r.name}),e.jsx("div",{className:"bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl",children:c.formatNumber(I,{currency:n.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]}),e.jsx("div",{className:"z-1 bottom-[-60] right-0 block lg:absolute",children:e.jsx(j,{width:100,height:100,src:l?S:A,alt:"closeChest",quality:100,className:"size-full h-auto w-[100px]"})})]})})})}),e.jsxs("div",{className:"mt-3 lg:mt-4",children:[e.jsxs("div",{className:"mb-1 flex justify-between",children:[e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:c.formatNumber(0,{currency:n.currency.code,compact:!0})}),e.jsxs("div",{className:"relative flex items-center justify-end gap-1.5",children:[l?e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",i.default["animate-arrow-red-flash-1"]),children:e.jsx(x.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",i.default["animate-arrow-red-flash-2"]),children:e.jsx(x.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",i.default["animate-arrow-red-flash-3"]),children:e.jsx(x.ChevronLeftIcon,{className:"size-4.5"})})]}):e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",i.default["animate-arrow-green-flash-1"]),children:e.jsx(h.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",i.default["animate-arrow-green-flash-2"]),children:e.jsx(h.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",i.default["animate-arrow-green-flash-3"]),children:e.jsx(h.ChevronRightIcon,{className:"size-4.5"})})]}),e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:c.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:n.currency.code,compact:!0})})]})]}),e.jsx(f.Progress.Root,{className:"bg-bg-primary h-2 w-full rounded-full lg:h-4",max:100,value:O(Number(r.pool),Number(r.maximumJackpotPoolLimit)),children:e.jsx(f.Progress.Track,{className:"bg-bg-primary h-full overflow-hidden rounded-full",children:e.jsx(f.Progress.Range,{className:"bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5",children:e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5","aria-hidden":"true",children:P})})})}),e.jsx("div",{className:"mt-1 block text-start text-2xs lg:hidden",children:l?`The pot has hit ${c.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:n.currency.code,compact:!0})} Play now for your chance to win big! π₯`:Q(Number(r==null?void 0:r.pool)??0,Number(r==null?void 0:r.maximumJackpotPoolLimit)??0)})]}),u.amount?e.jsx("div",{children:e.jsxs("div",{className:"bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4",children:[e.jsx("div",{className:"border-yellow-400 relative h-18 w-18 rounded-full border",children:e.jsx("div",{className:"bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold",children:"1st"})}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.jsxs("div",{className:"border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium",children:[e.jsx(w.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:C.maskName(u.member.name)}),e.jsx("div",{className:"text-brand-400 text-2xl",children:c.formatNumber(u.amount,{currency:n.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]})]})}):e.jsxs("div",{className:"bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4",children:[e.jsx(j,{width:66,height:87,src:L,alt:"closeChest",className:"size-full h-auto w-[66px] mix-blend-luminosity"}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.jsxs("div",{className:"border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium",children:[e.jsx(w.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:"No winners yet"}),e.jsx("div",{className:"text-text-secondary-700 text-xs",children:"You could be the first to win the tournament!"})]})]}),e.jsx(q.Button,{variant:"outline",className:s.twMerge("mt-5.5 px-3.5 py-2.5 text-sm",m?"hidden":"flex"),onClick:()=>N(!m),children:e.jsxs("div",{className:"flex gap-1.5",children:["See Details",e.jsx(D.ArrowNarrowDownIcon,{className:"size-5"})]})})]}),l&&e.jsx("div",{className:s.twMerge(i.default["light-rays"],"absolute right-0 top-0 rounded-2xl [--light-rays-top:15%] lg:[--light-rays-top:150px]")})]}),m&&e.jsxs("div",{children:[e.jsxs("div",{className:"z-1 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between p-3",children:[e.jsx("div",{className:"flex gap-2",children:e.jsx("div",{className:"text-text-primary-900 text-lg font-semibold",children:d.length?"Leaderboard":"Starting soon!"})}),e.jsx(k.JackpotRules,{jackpotRules:r.description})]}),e.jsx("div",{children:e.jsx("div",{className:"border-gray-200 overflow-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-bg-secondary text-text-tertiary-600 h-8 text-center text-xs font-medium",children:[e.jsx("th",{className:"w-[52px]",children:"#"}),e.jsx("th",{children:"Player"}),e.jsx("th",{children:"Multiplier"}),e.jsx("th",{children:"Prize"})]})}),e.jsx("tbody",{children:d.length?e.jsx(e.Fragment,{children:d.map((a,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2 text-center",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(v.StarIcon,{className:s.twMerge("mx-auto size-6.5",b[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",b[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2 text-center",children:C.maskName(a.member.name)}),e.jsxs("td",{className:"border-border-secondary h-12 border-t-2 text-center",children:[a.multiplier,"x"]}),e.jsx("td",{className:"border-border-secondary text-brand-400 h-12 border-t-2 text-center",children:c.formatNumber(u.amount,{currency:n.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]},t))}):e.jsx(e.Fragment,{children:Array.from({length:10}).map((a,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(v.StarIcon,{className:s.twMerge("mx-auto size-6.5",b[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",b[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"})]},t))})})]})})})]}),e.jsx(T.JackpotGameProviders,{}),e.jsx("div",{className:"m-3",children:e.jsx(q.Button,{variant:"outline",className:s.twMerge("px-3.5 py-2.5 text-sm",m?"flex":"hidden"),onClick:()=>N(!m),children:e.jsxs("div",{className:"flex gap-1.5",children:["Hide",e.jsx(R.ArrowNarrowUpIcon,{className:"size-5"})]})})})]})]})}const O=(r,o)=>o===0?0:r/o*100,Q=(r,o)=>(o===0?0:r/o*100)<=90?"The jackpot is heating up! Keep playing to stay in the action and watch it grow!":"π₯ Itβs about to pop! Stay in the game for your shot at the prize!",b=[{starColor:"text-yellow-400",numberColor:"text-bg-primary"},{starColor:"text-utility-gray-700",numberColor:"text-bg-primary"},{starColor:"text-yellow-700",numberColor:"text-bg-primary"},{starColor:"text-bg-quaternary",numberColor:"text-text-primary-900"},{starColor:"text-bg-quaternary",numberColor:"text-text-primary-900"}];exports.JackpotItemMobile=U;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("@ark-ui/react"),N=require("next/image"),C=require("react"),s=require("tailwind-merge"),M=require("../../icons/ArrowNarrowUpRightIcon.js"),h=require("../../icons/ChevronLeftIcon.js"),b=require("../../icons/ChevronRightIcon.js"),y=require("../../icons/StarIcon.js"),j=require("../../icons/Trophy01Icon.js"),J=require("../../icons/ArrowNarrowDownIcon.js"),D=require("../../icons/ArrowNarrowUpIcon.js"),R=require("../../images/close-chest.png.js"),A=require("../../images/first-place.png.js"),L=require("../../images/open-chest.png.js");require("../../ui/AlertDialog/AlertDialog.js");require("../../ui/Avatar/Avatar.js");require("../../ui/Badge/Badge.js");const v=require("../../ui/Button/Button.js");require("../../ui/Checkbox/Checkbox.js");require("../../ui/Clipboard/Clipboard.js");require("../../ui/Collapsible/Collapsible.js");require("../../ui/Combobox/Combobox.js");require("../../ui/DatePicker/DatePicker.js");require("../../ui/Dialog/Dialog.js");require("../../ui/Drawer/Drawer.js");require("../../ui/Field/Field.js");require("../../utils/capitalize.js");const a=require("../../utils/formatNumber.js");require("../../constants/index.js");require("../../utils/getLocaleInfo.js");require("../../utils/getQueryClient.js");require("../../utils/isMobile.js");require("../../utils/parseDecimal.js");require("../../ui/IconButton/iconButton.recipe.js");require("../../ui/NumberInput/NumberInput.js");require("../../ui/PasswordInput/PasswordInput.js");require("../../ui/PinInput/PinInput.js");require("../../ui/Popover/Popover.js");require("../../ui/Progress/Progress.js");require("../../ui/SegmentGroup/SegmentGroup.js");require("../../ui/Select/Select.js");require("../../ui/Table/Table.js");require("../../ui/Tabs/Tabs.js");const p=require("../JackpotCounter/JackpotCounterItem.js"),l=require("../JackpotCounter/JackpotCounterItem.module.css.js"),S=require("./JackpotGameProviders.js"),T=require("./JackpotRules.js"),B=require("./useJackpotItemData.js");function U({jackpot:r,gameProviders:f}){const{jackpotPayouts:m,topJackpotPayout:x,filteredGameProviders:w,localeInfo:i,isPayingOut:c,jackpotAmount:q,arrowImages:I,calculatePercentage:P,getAccumulatingJackpotDescription:z,starTierStyles:d}=B.useJackpotItemData({jackpot:r,gameProviders:f}),[n,g]=C.useState(!1);return e.jsxs("div",{className:"bg-bg-primary border-border-primary rounded-2xl border",children:[e.jsxs("div",{className:s.twMerge("bg-bg-tertiary relative flex shrink-0 rounded-2xl p-3 text-center lg:gap-4 lg:p-5"),children:[e.jsxs("div",{className:"z-1 relative flex flex-1 flex-col",children:[e.jsx("div",{className:"flex h-full flex-col justify-between",children:e.jsx("div",{className:"flex w-full justify-between",children:e.jsx("div",{className:"flex w-full flex-col",children:e.jsxs("div",{className:"relative flex w-full justify-between",children:[e.jsxs("div",{children:[c?e.jsxs("div",{className:"border-utility-success-200 bg-utility-success-50 text-utility-success-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx("span",{className:"full bg-utility-success-500 size-1.5 animate-pulse rounded"}),"Paying Out"]}):e.jsxs("div",{className:"border-utility-blue-200 bg-utility-blue-50 text-utility-blue-700 flex w-fit items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium",children:[e.jsx(M.ArrowNarrowUpRightIcon,{className:"text-utility-blue-500 size-3.5"}),"Accumulating"]}),e.jsx("div",{className:"text-text-primary-900 mt-1 text-left text-lg font-medium lg:mt-5 lg:text-2xl",children:r.name}),e.jsx("div",{className:"bg-bg-primary text-brand-400 mt-1.5 w-fit rounded-md px-2 py-1 text-2xl font-bold lg:mt-2 lg:text-4xl",children:a.formatNumber(q,{currency:i.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]}),e.jsx("div",{className:"z-1 bottom-[-60] right-0 block lg:absolute",children:e.jsx(N,{width:100,height:100,src:c?L:R,alt:"closeChest",quality:100,className:"size-full h-auto w-[100px]"})})]})})})}),e.jsxs("div",{className:"mt-3 lg:mt-4",children:[e.jsxs("div",{className:"mb-1 flex justify-between",children:[e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:a.formatNumber(0,{currency:i.currency.code,compact:!0})}),e.jsxs("div",{className:"relative flex items-center justify-end gap-1.5",children:[c?e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",l.default["animate-arrow-red-flash-1"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",l.default["animate-arrow-red-flash-2"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",l.default["animate-arrow-red-flash-3"]),children:e.jsx(h.ChevronLeftIcon,{className:"size-4.5"})})]}):e.jsxs("div",{className:"flex w-6 items-center",children:[e.jsx("div",{className:s.twMerge("absolute left-0",l.default["animate-arrow-green-flash-1"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-1.5",l.default["animate-arrow-green-flash-2"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})}),e.jsx("div",{className:s.twMerge("absolute left-3",l.default["animate-arrow-green-flash-3"]),children:e.jsx(b.ChevronRightIcon,{className:"size-4.5"})})]}),e.jsx("div",{className:"text-text-primary-900 text-xs font-semibold",children:a.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:i.currency.code,compact:!0})})]})]}),e.jsx(u.Progress.Root,{className:"bg-bg-primary h-2 w-full rounded-full lg:h-4",max:100,value:P(Number(r.pool),Number(r.maximumJackpotPoolLimit)),children:e.jsx(u.Progress.Track,{className:"bg-bg-primary h-full overflow-hidden rounded-full",children:e.jsx(u.Progress.Range,{className:"bg-brand-500 relative h-full overflow-hidden rounded-full pl-1.5",children:e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-start pl-1.5","aria-hidden":"true",children:I})})})}),e.jsx("div",{className:"mt-1 block text-start text-2xs lg:hidden",children:c?`The pot has hit ${a.formatNumber(r==null?void 0:r.maximumJackpotPoolLimit,{currency:i.currency.code,compact:!0})} Play now for your chance to win big! π₯`:z(Number(r==null?void 0:r.pool)??0,Number(r==null?void 0:r.maximumJackpotPoolLimit)??0)})]}),x.amount?e.jsx("div",{children:e.jsxs("div",{className:"bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4",children:[e.jsx("div",{className:"border-yellow-400 relative h-18 w-18 rounded-full border",children:e.jsx("div",{className:"bg-yellow-400 text-brand-950 border-bg-primary absolute bottom-0 right-0 flex h-6 w-6 items-center justify-center rounded-full border-[1.5px] text-xs font-bold",children:"1st"})}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.jsxs("div",{className:"border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium",children:[e.jsx(j.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:p.maskName(x.member.name)}),e.jsx("div",{className:"text-brand-400 text-2xl",children:a.formatNumber(x.amount,{currency:i.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]})]})}):e.jsxs("div",{className:"bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4",children:[e.jsx(N,{width:66,height:87,src:A,alt:"closeChest",className:"size-full h-auto w-[66px] mix-blend-luminosity"}),e.jsxs("div",{className:"flex flex-col gap-1 text-left",children:[e.jsxs("div",{className:"border-utility-brand-200 bg-utility-brand-50 text-utility-brand-700 flex h-fit w-fit items-center gap-1 rounded-sm border px-2 py-0.5 text-xs font-medium",children:[e.jsx(j.Trophy01Icon,{className:"text-utility-brand-600 size-3.5"}),"Top Payout"]}),e.jsx("div",{className:"font-semibold",children:"No winners yet"}),e.jsx("div",{className:"text-text-secondary-700 text-xs",children:"You could be the first to win the tournament!"})]})]}),e.jsx(v.Button,{variant:"outline",className:s.twMerge("mt-5.5 px-3.5 py-2.5 text-sm",n?"hidden":"flex"),onClick:()=>g(!n),children:e.jsxs("div",{className:"flex gap-1.5",children:["See Details",e.jsx(J.ArrowNarrowDownIcon,{className:"size-5"})]})})]}),c&&e.jsx("div",{className:s.twMerge(l.default["light-rays"],"absolute right-0 top-0 rounded-2xl [--light-rays-top:15%] lg:[--light-rays-top:150px]")})]}),n&&e.jsxs("div",{children:[e.jsxs("div",{className:"z-1 flex-1",children:[e.jsxs("div",{className:"flex items-center justify-between p-3",children:[e.jsx("div",{className:"flex gap-2",children:e.jsx("div",{className:"text-text-primary-900 text-lg font-semibold",children:m.length?"Leaderboard":"Starting soon!"})}),e.jsx(T.JackpotRules,{jackpotRules:r.description})]}),e.jsx("div",{children:e.jsx("div",{className:"border-gray-200 overflow-hidden",children:e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-bg-secondary text-text-tertiary-600 h-8 text-center text-xs font-medium",children:[e.jsx("th",{className:"w-[52px]",children:"#"}),e.jsx("th",{children:"Player"}),e.jsx("th",{children:"Multiplier"}),e.jsx("th",{children:"Prize"})]})}),e.jsx("tbody",{children:m.length?e.jsx(e.Fragment,{children:m.map((o,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-center text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(y.StarIcon,{className:s.twMerge("mx-auto size-6.5",d[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",d[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:p.maskName(o.member.name)}),e.jsxs("td",{className:"border-border-secondary h-12 border-t-2",children:[o.multiplier,"x"]}),e.jsx("td",{className:"border-border-secondary text-brand-400 h-12 border-t-2",children:a.formatNumber(o.amount,{currency:i.currency.code,minDecimalPlaces:2,maxDecimalPlaces:2})})]},t))}):e.jsx(e.Fragment,{children:Array.from({length:10}).map((o,t)=>e.jsxs("tr",{className:"bg-bg-primary text-text-secondary-700 text-center text-sm",children:[e.jsx("td",{className:"border-border-secondary h-12 w-[52px] border-t-2",children:t+1<6?e.jsxs("div",{className:"relative",children:[e.jsx(y.StarIcon,{className:s.twMerge("mx-auto size-6.5",d[t].starColor)}),e.jsx("span",{className:s.twMerge("absolute inset-0 mt-0.5 flex items-center justify-center text-2xs font-bold",d[t].numberColor),children:t+1})]}):t+1}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"}),e.jsx("td",{className:"border-border-secondary h-12 border-t-2",children:"-"})]},t))})})]})})})]}),!!w.length&&e.jsx(S.JackpotGameProviders,{gameProviders:f}),e.jsx("div",{className:"m-3",children:e.jsx(v.Button,{variant:"outline",className:s.twMerge("px-3.5 py-2.5 text-sm",n?"flex":"hidden"),onClick:()=>g(!n),children:e.jsxs("div",{className:"flex gap-1.5",children:["Hide",e.jsx(D.ArrowNarrowUpIcon,{className:"size-5"})]})})})]})]})}exports.JackpotItemMobile=U;
|