@opexa/portal-components 0.0.221 → 0.0.222
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/useCamera.d.ts +36 -0
- package/dist/client/hooks/useCamera.js +166 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.d.ts +2 -0
- package/dist/components/CashbackBonus/CashbackBonus.client.js +9 -0
- package/dist/components/CashbackBonus/CashbackBonus.d.ts +10 -0
- package/dist/components/CashbackBonus/CashbackBonus.js +5 -0
- package/dist/components/CashbackBonus/index.d.ts +1 -0
- package/dist/components/CashbackBonus/index.js +1 -0
- package/dist/components/DepositWithdrawal/Deposit/LibanganDeposit/LibanganDeposit.js +1 -0
- package/dist/components/DepositWithdrawal/DepositWithdrawal.lazy.d.ts +1 -0
- package/dist/components/DepositWithdrawal/PaymentMethods.js +8 -1
- package/dist/components/Empty.d.ts +1 -2
- package/dist/components/GamesSearch/GamesSearch.d.ts +6 -1
- package/dist/components/GamesSearch/GamesSearch.js +13 -8
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +2 -2
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +2 -2
- package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +2 -2
- package/dist/components/KYC/Header.js +4 -2
- package/dist/components/KYC/KYCReminder.lazy.js +1 -1
- package/dist/components/KYC/Step1.js +3 -2
- package/dist/components/KYC/Step2.js +3 -2
- package/dist/components/KYC/Step3.js +4 -2
- package/dist/components/KYC/Step4.js +3 -2
- package/dist/components/KYC/backup/KYCContext.d.ts +5 -1
- package/dist/components/KYC/loadModels.d.ts +1 -0
- package/dist/components/KYC/loadModels.js +9 -0
- package/dist/components/Messages/Message.js +2 -3
- package/dist/components/Messages/MessageContext.d.ts +5 -1
- package/dist/components/Messages/MessagePopup.js +2 -3
- package/dist/components/Promo/PromoContent.d.ts +2 -0
- package/dist/components/Promo/PromoContent.js +9 -0
- package/dist/components/Promos/PromoCarousel.d.ts +2 -0
- package/dist/components/Promos/PromoCarousel.js +41 -0
- package/dist/components/Promos/PromoGrid.d.ts +2 -0
- package/dist/components/Promos/PromoGrid.js +12 -0
- package/dist/components/Promos/PromoItem.d.ts +7 -0
- package/dist/components/Promos/PromoItem.js +10 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +1 -1
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +10 -5
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +4 -3
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +1 -1
- package/dist/components/Quests/WageringQuest/WageringQuest.js +3 -2
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +4 -3
- package/dist/components/SignUp/SignUpForm.js +6 -1
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +1 -1
- package/dist/components/TransactionRecords/DepositRecordsTable.js +1 -1
- package/dist/components/shared/IdDocumentField.d.ts +12 -3
- package/dist/components/shared/IdDocumentField.js +126 -13
- package/dist/components/shared/SelfieField.d.ts +12 -3
- package/dist/components/shared/SelfieField.js +118 -9
- package/dist/constants/BranchCode.d.ts +4 -0
- package/dist/constants/BranchCode.js +42 -0
- package/dist/constants/endpoints.d.ts +10 -0
- package/dist/constants/endpoints.js +41 -0
- package/dist/constants/gameProviders.d.ts +1 -2
- package/dist/constants/gameProviders.js +6 -0
- package/dist/constants/gameTypes.d.ts +1 -2
- package/dist/constants/headerKeys.d.ts +1 -0
- package/dist/constants/headerKeys.js +1 -0
- package/dist/constants/secretQuestions.d.ts +1 -1
- package/dist/icons/CameraOffIcon.d.ts +2 -0
- package/dist/icons/CameraOffIcon.js +4 -0
- package/dist/icons/RefreshCcw01Icon.d.ts +2 -0
- package/dist/icons/RefreshCcw01Icon.js +4 -0
- package/dist/icons/Spinner02Icon.d.ts +2 -0
- package/dist/icons/Spinner02Icon.js +4 -0
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/services/wallet.d.ts +2 -0
- package/dist/styles/theme.css +1 -1
- package/dist/ui/AlertDialog/AlertDialog.d.ts +88 -88
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +11 -11
- package/dist/ui/Avatar/avatar.recipe.d.ts +3 -3
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Carousel/Carousel.d.ts +45 -45
- package/dist/ui/Carousel/carousel.recipe.d.ts +5 -5
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
- package/dist/ui/Collapsible/Collapsible.d.ts +32 -32
- package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +88 -88
- package/dist/ui/Dialog/dialog.recipe.d.ts +11 -11
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +144 -144
- package/dist/ui/Menu/menu.recipe.d.ts +20 -20
- package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +8 -8
- package/dist/ui/Presence.d.ts +1 -1
- package/dist/ui/Presence.js +1 -1
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
- package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
- package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/utils/createErrorFromCode.d.ts +2 -0
- package/dist/utils/createErrorFromCode.js +11 -0
- package/package.json +1 -1
- package/dist/utils/constants.d.ts +0 -2
- package/dist/utils/constants.js +0 -2
- package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
- package/dist/utils/isBetween3amAnd3pm.js +0 -5
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type ComponentPropsWithRef } from 'react';
|
|
2
|
+
export interface CameraError {
|
|
3
|
+
name: 'CameraError' | 'PermissionDeniedError' | 'DeviceNotFoundError' | (string & {});
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export interface CameraData {
|
|
7
|
+
url: string;
|
|
8
|
+
file: File;
|
|
9
|
+
}
|
|
10
|
+
export interface CameraCropPoints {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
width: number;
|
|
14
|
+
height: number;
|
|
15
|
+
}
|
|
16
|
+
export type ScaleFactor = 1 | 1.15 | 1.25 | 1.5 | 1.75 | 2 | 2.15 | 2.25 | 2.5 | 2.75 | 3;
|
|
17
|
+
export interface CameraSnapOptions {
|
|
18
|
+
crop?: CameraCropPoints;
|
|
19
|
+
/** @default 2 */
|
|
20
|
+
scale?: ScaleFactor;
|
|
21
|
+
}
|
|
22
|
+
export interface UseCameraReturn {
|
|
23
|
+
open(): Promise<void>;
|
|
24
|
+
close(): Promise<void>;
|
|
25
|
+
snap(options?: CameraSnapOptions): Promise<void>;
|
|
26
|
+
reopen(): Promise<void>;
|
|
27
|
+
reset(): Promise<void>;
|
|
28
|
+
data: CameraData | null;
|
|
29
|
+
error: CameraError | null;
|
|
30
|
+
loading: boolean;
|
|
31
|
+
videoProps: ComponentPropsWithRef<'video'>;
|
|
32
|
+
}
|
|
33
|
+
export interface UseCameraOptions extends MediaStreamConstraints {
|
|
34
|
+
validate?: (data: CameraData) => CameraError | null | undefined;
|
|
35
|
+
}
|
|
36
|
+
export declare function useCamera(options?: UseCameraOptions): UseCameraReturn;
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { isBoolean } from 'lodash-es';
|
|
2
|
+
import { useCallback, useMemo, useRef, useState, } from 'react';
|
|
3
|
+
import invariant from 'tiny-invariant';
|
|
4
|
+
export function useCamera(options = {}) {
|
|
5
|
+
const { validate, ...constraints } = options;
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const stream = useRef(null);
|
|
8
|
+
const [data, setData] = useState(null);
|
|
9
|
+
const [error, setError] = useState(null);
|
|
10
|
+
const [loading, setLoading] = useState(false);
|
|
11
|
+
const open = useCallback(async () => {
|
|
12
|
+
setData(null);
|
|
13
|
+
setError(null);
|
|
14
|
+
setLoading(true);
|
|
15
|
+
await sleep();
|
|
16
|
+
const node = ref.current;
|
|
17
|
+
if (!node) {
|
|
18
|
+
setLoading(false);
|
|
19
|
+
setError({
|
|
20
|
+
name: 'CameraError',
|
|
21
|
+
message: 'Video element missing',
|
|
22
|
+
});
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
try {
|
|
26
|
+
const result = await navigator.mediaDevices.getUserMedia({
|
|
27
|
+
audio: false,
|
|
28
|
+
preferCurrentTab: true,
|
|
29
|
+
...constraints,
|
|
30
|
+
video: {
|
|
31
|
+
facingMode: 'user',
|
|
32
|
+
noiseSuppression: true,
|
|
33
|
+
frameRate: {
|
|
34
|
+
min: 15,
|
|
35
|
+
max: 60,
|
|
36
|
+
ideal: 30,
|
|
37
|
+
},
|
|
38
|
+
...(isBoolean(constraints.video) ? {} : constraints.video),
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
node.srcObject = result;
|
|
42
|
+
stream.current = result;
|
|
43
|
+
}
|
|
44
|
+
catch (e) {
|
|
45
|
+
if (e instanceof Error) {
|
|
46
|
+
switch (e.name) {
|
|
47
|
+
case 'NotAllowedError':
|
|
48
|
+
return setError({
|
|
49
|
+
name: 'PermissionDeniedError',
|
|
50
|
+
message: 'You need to allow camera access to use this feature.',
|
|
51
|
+
});
|
|
52
|
+
case 'NotFoundError':
|
|
53
|
+
return setError({
|
|
54
|
+
name: 'DeviceNotFoundError',
|
|
55
|
+
message: 'Sorry, but we could not find a camera on your device.',
|
|
56
|
+
});
|
|
57
|
+
default:
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
setError({
|
|
62
|
+
name: 'CameraError',
|
|
63
|
+
message: e instanceof Error
|
|
64
|
+
? e.message
|
|
65
|
+
: 'Failed to open camera. Please try again.',
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
finally {
|
|
69
|
+
setLoading(false);
|
|
70
|
+
}
|
|
71
|
+
}, [constraints, setData, setError]);
|
|
72
|
+
const close = useCallback(() => {
|
|
73
|
+
setData(null);
|
|
74
|
+
setError(null);
|
|
75
|
+
return new Promise((resolve) => {
|
|
76
|
+
stream.current?.getTracks().forEach((track) => track.stop());
|
|
77
|
+
ref.current?.pause();
|
|
78
|
+
resolve();
|
|
79
|
+
});
|
|
80
|
+
}, [setData, setError]);
|
|
81
|
+
const snap = useCallback(async (opts = {}) => {
|
|
82
|
+
setData(null);
|
|
83
|
+
setError(null);
|
|
84
|
+
const video = ref.current;
|
|
85
|
+
const canvas = document.createElement('canvas');
|
|
86
|
+
const context = canvas.getContext('2d');
|
|
87
|
+
invariant(video);
|
|
88
|
+
invariant(context);
|
|
89
|
+
video.currentTime = 1;
|
|
90
|
+
const videoRect = video.getBoundingClientRect();
|
|
91
|
+
const lowResolution = video.videoWidth < 640 || video.videoHeight < 480;
|
|
92
|
+
const scaleFactor = lowResolution ? (opts.scale ?? 2) : 1.25;
|
|
93
|
+
let x = 0;
|
|
94
|
+
let y = 0;
|
|
95
|
+
let w = video.videoWidth;
|
|
96
|
+
let h = video.videoHeight;
|
|
97
|
+
if (opts.crop) {
|
|
98
|
+
const scaleX = video.videoWidth / videoRect.width;
|
|
99
|
+
const scaleY = video.videoHeight / videoRect.height;
|
|
100
|
+
x = (opts.crop.x - videoRect.x) * scaleX;
|
|
101
|
+
y = (opts.crop.y - videoRect.y) * scaleY;
|
|
102
|
+
w = opts.crop.width * scaleX;
|
|
103
|
+
h = opts.crop.height * scaleY;
|
|
104
|
+
}
|
|
105
|
+
canvas.width = w * scaleFactor;
|
|
106
|
+
canvas.height = h * scaleFactor;
|
|
107
|
+
context.imageSmoothingEnabled = true;
|
|
108
|
+
context.imageSmoothingQuality = 'high';
|
|
109
|
+
context.drawImage(video, x, y, w, h, 0, 0, w * scaleFactor, h * scaleFactor);
|
|
110
|
+
canvas.toBlob((blob) => {
|
|
111
|
+
if (!blob) {
|
|
112
|
+
return setError({
|
|
113
|
+
name: 'CameraError',
|
|
114
|
+
message: "'canvas.toBlob' failed to create blob",
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
const url = canvas.toDataURL('image/jpeg', 1);
|
|
118
|
+
const file = new File([blob], `${crypto.randomUUID()}.jpeg`, {
|
|
119
|
+
type: 'image/jpeg',
|
|
120
|
+
endings: 'native',
|
|
121
|
+
lastModified: Date.now(),
|
|
122
|
+
});
|
|
123
|
+
const data = { url, file };
|
|
124
|
+
const error = validate?.(data);
|
|
125
|
+
if (error)
|
|
126
|
+
setError(error);
|
|
127
|
+
else
|
|
128
|
+
setData(data);
|
|
129
|
+
}, 'image/jpeg', 1);
|
|
130
|
+
}, [validate]);
|
|
131
|
+
const reset = useCallback(() => {
|
|
132
|
+
setData(null);
|
|
133
|
+
setError(null);
|
|
134
|
+
setLoading(false);
|
|
135
|
+
return Promise.resolve();
|
|
136
|
+
}, [setData, setError]);
|
|
137
|
+
const reopen = useCallback(async () => {
|
|
138
|
+
setLoading(true);
|
|
139
|
+
close();
|
|
140
|
+
await sleep();
|
|
141
|
+
await open();
|
|
142
|
+
}, [close, open]);
|
|
143
|
+
const videoProps = useMemo(() => ({
|
|
144
|
+
ref,
|
|
145
|
+
muted: true,
|
|
146
|
+
autoPlay: true,
|
|
147
|
+
playsInline: true,
|
|
148
|
+
style: {
|
|
149
|
+
width: '100%',
|
|
150
|
+
height: 'auto',
|
|
151
|
+
display: 'block',
|
|
152
|
+
},
|
|
153
|
+
}), []);
|
|
154
|
+
return {
|
|
155
|
+
snap,
|
|
156
|
+
open,
|
|
157
|
+
close,
|
|
158
|
+
reopen,
|
|
159
|
+
reset,
|
|
160
|
+
data,
|
|
161
|
+
error,
|
|
162
|
+
loading,
|
|
163
|
+
videoProps,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
const sleep = (ms = 250) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import Link from 'next/link';
|
|
5
|
+
import { ChevronLeftIcon, ChevronRightIcon, StopWatchIcon } from '../../icons/index.js';
|
|
6
|
+
import { Badge, Collapsible, Progress, Prose } from '../../ui/index.js';
|
|
7
|
+
export function CashbackBonus__client(props) {
|
|
8
|
+
return (_jsxs("div", { className: props.className, children: [_jsxs(Link, { href: props.viewAllUrl ?? '/rewards', className: "text-button-tertiary-fg flex items-center gap-lg text-lg font-semibold", children: [_jsx(ChevronLeftIcon, { className: "size-6" }), "Back to Rewards"] }), _jsx(Image, { src: "https://s3.ap-east-1.amazonaws.com/opexa-assets.opexasystem.com/assets/BSxIXEsa59_zzMAR27-ALLDAYREBATE06-STATIC-WEB-HB-1920x1080.png", alt: "", width: 1024, height: 600, className: "mt-3xl h-auto w-full rounded-xl" }), _jsxs(Badge.Root, { size: "lg", round: false, colorScheme: "brand", className: "mt-xl lg:mt-6", children: [_jsx(Badge.Icon, { children: _jsx(StopWatchIcon, {}) }), _jsx(Badge.Label, { children: "9d:10h:11m" })] }), _jsx("h1", { className: "text-text-primary-900 mt-xl text-2xl font-semibold lg:mt-6 lg:text-3xl", children: "50 PHP First Deposit Bonus" }), _jsx("p", { className: "text-text-primary-brand mt-xl text-base lg:mt-6 lg:text-lg", children: "Complete the wagering before time runs out to convert your bonus balance into real money!" }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Your bonus" }), _jsxs("p", { children: [_jsx("span", { className: "text-text-primary-900", children: "20.00" }), " / 50.00 PHP"] })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl flex items-center justify-between rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsx("p", { children: "Required Turnover" }), _jsx("p", { children: "5x" })] }), _jsxs("div", { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("p", { children: "Wagering" }), _jsx("p", { children: "400/1000" })] }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) })] }), _jsxs(Collapsible.Root, { className: "mt-xl lg:mt-6", children: [_jsxs(Collapsible.Trigger, { className: "text-button-tertiary-fg flex w-fit items-center justify-center gap-sm text-sm font-semibold lg:mx-auto", children: ["Game Provider Contribution", _jsx(Collapsible.Indicator, { asChild: true, children: _jsx(ChevronRightIcon, { className: "size-5" }) })] }), _jsxs(Collapsible.Content, { className: "border-border-primary bg-bg-tertiary text-text-secondary-700 mt-xl space-y-1.5 rounded-md border px-3.5 py-xl lg:mt-6", children: [_jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Playson" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "25%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Betsoft Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "13%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Microgaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "50%" })] }), _jsxs("div", { className: "flex items-center justify-between gap-md", children: [_jsx("p", { className: "w-[11.25rem] shrink-0", children: "Realtime Gaming" }), _jsx(Progress.Root, { defaultValue: 42, className: "mt-2 grow", children: _jsx(Progress.Track, { children: _jsx(Progress.Range, {}) }) }), _jsx("p", { children: "10%" })] })] })] }), _jsxs(Prose, { className: "mt-xl lg:mt-6", children: [_jsx("h3", { children: "How to get bonus" }), _jsxs("ol", { children: [_jsx("li", { children: "All OFWin members are eligible for this program." }), _jsx("li", { children: "50 PHP of game credit will be automatically credited to the new member account upon completion of first deposit Auctor vel in vitae placerat." }), _jsx("li", { children: "Member must reach a 5x turnover requirement before a withdrawal can be made. Attempting to make a withdrawal before this turnover requirement is completed could cause your bonus to be voided." }), _jsx("li", { children: "Players will have 10 days from the date the bonus is awarded to complete the rollover requirement." }), _jsx("li", { children: "Bets used to meet other bonus rollover requirements will not count toward this promotion." })] }), _jsx("h3", { children: "Terms and Conditions" }), _jsxs("ul", { children: [_jsx("li", { children: "Only one account per player is allowed. No same IP address/bank account name allowed. Players who have multiple or fraudulent accounts will not be qualified for the promotion." }), _jsx("li", { children: "Players that are found to have any duplicate accounts or those who participate in fraudulent activities may have their funds forfeited and their accounts closed." }), _jsx("li", { children: "OFWin reserves the right to amend or cancel this Referral Program at any time. OFWin General Terms and Conditions apply." })] })] })] }));
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface CashbackBonusProps {
|
|
2
|
+
id: string;
|
|
3
|
+
className?: string;
|
|
4
|
+
/**
|
|
5
|
+
* @description URL for the bonuses details page
|
|
6
|
+
* @default "/rewards"
|
|
7
|
+
*/
|
|
8
|
+
viewAllUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function CashbackBonus(props: CashbackBonusProps): Promise<import("react/jsx-runtime").JSX.Element>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CashbackBonus';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './CashbackBonus.js';
|
|
@@ -149,6 +149,7 @@ export function LibanganDeposit() {
|
|
|
149
149
|
createDepositMutation.mutate({
|
|
150
150
|
amount: data.amount.toString(),
|
|
151
151
|
promo: data.promo ?? undefined,
|
|
152
|
+
redirectionUrl: depositWithdrawalProps.redirectionUrl,
|
|
152
153
|
});
|
|
153
154
|
}), noValidate: true, children: [_jsx(Controller, { control: form.control, name: "amount", render: (o) => (_jsxs(Field.Root, { invalid: !!form.formState.errors.amount, children: [_jsxs(NumberInput.Root, { min: 0, step: 1, value: o.field.value, onValueChange: (details) => {
|
|
154
155
|
o.field.onChange(details.value);
|
|
@@ -5,5 +5,6 @@ export interface DepositWithdrawalProps {
|
|
|
5
5
|
privacyPolicyUrl?: string;
|
|
6
6
|
/** @default "/account/security" */
|
|
7
7
|
accountSecurityUrl?: string;
|
|
8
|
+
redirectionUrl?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare function DepositWithdrawal(props: DepositWithdrawalProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -49,6 +49,11 @@ const OPTIONS = [
|
|
|
49
49
|
label: 'Libangan',
|
|
50
50
|
image: libangan,
|
|
51
51
|
},
|
|
52
|
+
{
|
|
53
|
+
value: 'VENTAJA',
|
|
54
|
+
label: 'Libangan',
|
|
55
|
+
image: libangan,
|
|
56
|
+
},
|
|
52
57
|
{
|
|
53
58
|
value: 'PISO_PAY',
|
|
54
59
|
label: 'Piso Pay',
|
|
@@ -69,5 +74,7 @@ export function PaymentMethods(props) {
|
|
|
69
74
|
if (!lastValue)
|
|
70
75
|
return;
|
|
71
76
|
setValue(PaymentMethodDefinition.parse(lastValue));
|
|
72
|
-
}, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "border-border-secondary ui-checked:border-border-brand-solid flex cursor-pointer items-center justify-between rounded-xl border p-lg", children: [_jsx("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', option.value === 'LIBANGAN'
|
|
77
|
+
}, className: "grid grid-cols-2 gap-x-4 gap-y-3", children: options.map((option) => (_jsxs(Checkbox.Root, { value: option.value, className: "border-border-secondary ui-checked:border-border-brand-solid flex cursor-pointer items-center justify-between rounded-xl border p-lg", children: [_jsx("div", { className: twMerge('rounded-xs bg-white px-sm py-[0.688rem]', option.value === 'GCASH' && 'bg-[#017EFF]'), children: _jsx(Image, { src: option.image, alt: "", width: 200, height: 40, className: twMerge('w-auto', option.value === 'LIBANGAN' || option.value === 'VENTAJA'
|
|
78
|
+
? 'h-[2.5rem]'
|
|
79
|
+
: 'h-[1.063rem]'), draggable: false }) }), _jsx(Checkbox.Control, { className: "shrink-0", children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.HiddenInput, {})] }, option.value))) })] }));
|
|
73
80
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ComponentType } from 'react';
|
|
2
|
-
interface EmptyProps {
|
|
2
|
+
export interface EmptyProps {
|
|
3
3
|
icon: ComponentType<ComponentProps<'svg'>>;
|
|
4
4
|
title: string;
|
|
5
5
|
message: string;
|
|
@@ -7,4 +7,3 @@ interface EmptyProps {
|
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
9
|
export declare function Empty(props: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import type { GamesInput__Next } from '../../services/cmsPortal';
|
|
2
|
+
export interface ClassNameEntries {
|
|
3
|
+
root?: string;
|
|
4
|
+
thumbnailRoot?: string;
|
|
5
|
+
thumbnailTitle?: string;
|
|
6
|
+
}
|
|
2
7
|
interface GamesSearchProps {
|
|
3
8
|
first?: number;
|
|
4
9
|
filter?: GamesInput__Next['filter'];
|
|
5
10
|
sort?: GamesInput__Next['sort'];
|
|
6
|
-
className?: string;
|
|
11
|
+
className?: string | ClassNameEntries;
|
|
7
12
|
placeholder?: string;
|
|
8
13
|
}
|
|
9
14
|
export declare function GamesSearch(props: GamesSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { createListCollection } from '@ark-ui/react/collection';
|
|
4
|
+
import { isString } from 'lodash-es';
|
|
4
5
|
import Image from 'next/image';
|
|
5
6
|
import { useState } from 'react';
|
|
7
|
+
import { twMerge } from 'tailwind-merge';
|
|
6
8
|
import { useGamesQuery } from '../../client/hooks/useGamesQuery.js';
|
|
7
9
|
import { SearchLgIcon } from '../../icons/SearchLgIcon.js';
|
|
8
10
|
import { Button } from '../../ui/Button/index.js';
|
|
@@ -29,24 +31,27 @@ export function GamesSearch(props) {
|
|
|
29
31
|
itemToValue: (item) => item.id,
|
|
30
32
|
itemToString: (item) => item.name,
|
|
31
33
|
});
|
|
32
|
-
|
|
34
|
+
const classNames = isString(props.className)
|
|
35
|
+
? { root: props.className }
|
|
36
|
+
: (props.className ?? {});
|
|
37
|
+
return (_jsx("div", { className: classNames.root, children: _jsxs(Combobox.Root, { collection: collection, positioning: {
|
|
33
38
|
sameWidth: true,
|
|
34
39
|
placement: 'bottom',
|
|
35
40
|
}, inputValue: search, onInputValueChange: (details) => {
|
|
36
41
|
setSearch(details.inputValue);
|
|
37
|
-
}, selectionBehavior: "preserve", allowCustomValue: true, children: [_jsxs(Combobox.Control, { children: [_jsx(Combobox.Input, { placeholder: props.placeholder ?? 'Search' }), _jsx(Combobox.Context, { children: (api) => {
|
|
42
|
+
}, selectionBehavior: "preserve", allowCustomValue: true, children: [_jsxs(Combobox.Control, { className: "relative z-50", children: [_jsx(Combobox.Input, { placeholder: props.placeholder ?? 'Search' }), _jsx(Combobox.Context, { children: (api) => {
|
|
38
43
|
if (api.inputValue.length <= 0)
|
|
39
44
|
return null;
|
|
40
45
|
return (_jsx("span", { className: "text-text-secondary-700 px-3.5 font-semibold", tabIndex: 0, onClick: () => {
|
|
41
46
|
api.setInputValue('');
|
|
42
47
|
api.focus();
|
|
43
48
|
}, children: "Clear" }));
|
|
44
|
-
} })] }), _jsx(Portal, { children: _jsx(Combobox.Positioner, { children: search.trim().length > 0 && (_jsx(Combobox.Content, { className: "max-h-[33.25rem] overflow-y-auto p-0", children: search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && _jsx(Alert, { message: "No results found" }), games.length > 0 && (_jsxs("div", { className: "p-xl", children: [_jsx(Combobox.Context, { children: (api) => (_jsx("div", { className: "grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { game: game, onClick: () => {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
} })] }), _jsx(Portal, { children: _jsx(Combobox.Context, { children: (api) => (_jsxs(_Fragment, { children: [_jsx(Presence, { present: api.open, children: _jsx("div", { className: "fixed inset-0 z-40 bg-black/50 backdrop-blur-sm", onClick: () => api.setOpen(false) }) }), _jsx(Combobox.Positioner, { children: search.trim().length > 0 && (_jsx(Combobox.Content, { className: "z-50 max-h-[33.25rem] overflow-y-auto p-0", children: search.length >= 1 && search.length <= 2 ? (_jsx(Alert, { message: "Search requires at least 3 characters." })) : (_jsxs(_Fragment, { children: [games.length <= 0 && (_jsx(Alert, { message: "No results found" })), games.length > 0 && (_jsxs("div", { className: "p-xl", children: [_jsx(Combobox.Context, { children: (api) => (_jsx("div", { className: "grid grid-cols-3 gap-1.5 lg:grid-cols-9 lg:gap-3.5", children: games.map((game) => (_jsxs(GameLaunchTrigger, { game: game, onClick: () => {
|
|
50
|
+
api.setOpen(false);
|
|
51
|
+
}, className: twMerge('block w-full shadow-sm', classNames.thumbnailRoot), children: [_jsx(Image, { src: getGameImageUrl({
|
|
52
|
+
reference: game.reference,
|
|
53
|
+
provider: game.provider,
|
|
54
|
+
}), alt: "", width: 200, height: 200, loading: "lazy", unoptimized: true, className: "aspect-square w-full rounded-t-md object-cover" }), _jsx("span", { className: twMerge('bg-bg-tertiary text-text-primary-brand block w-full truncate rounded-b-md px-2 py-2.5 text-center text-xs font-semibold', classNames.thumbnailTitle), children: game.name })] }, game.id))) })) }), _jsx(Presence, { present: gamesQuery.hasNextPage, children: _jsx(Button, { variant: "outline", className: "mx-auto mt-4xl w-fit", onClick: () => gamesQuery.fetchNextPage(), children: "Load More" }) })] }))] })) })) })] })) }) })] }) }));
|
|
50
55
|
}
|
|
51
56
|
function Alert({ message }) {
|
|
52
57
|
return (_jsxs("div", { className: "py-lg", role: "alert", "aria-live": "polite", children: [_jsx("div", { className: "bg-bg-secondary shadow-xs border-border-primary mx-auto flex size-12 items-center justify-center rounded-lg border", children: _jsx(SearchLgIcon, { className: "text-text-secondary-700 size-6" }) }), _jsx("p", { className: "text-text-secondary-700 mt-4 text-center", children: message })] }));
|
|
@@ -57,13 +57,13 @@ export function JackpotsCarouselItem({ style, className, viewAllUrl, animate = t
|
|
|
57
57
|
currency: localeInfo.currency.code,
|
|
58
58
|
minDecimalPlaces: 2,
|
|
59
59
|
maxDecimalPlaces: 2,
|
|
60
|
-
}) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
60
|
+
}) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), latestJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [latestJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(latestJackpotPayout.member.name, {
|
|
61
61
|
totalCharsCount: 6,
|
|
62
62
|
}) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(latestJackpotPayout.amount, {
|
|
63
63
|
currency: localeInfo.currency.code,
|
|
64
64
|
minDecimalPlaces: 2,
|
|
65
65
|
maxDecimalPlaces: 2,
|
|
66
|
-
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "firstPlace", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
66
|
+
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "firstPlace", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] }))] }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
|
|
67
67
|
currency: localeInfo.currency.code,
|
|
68
68
|
compact: true,
|
|
69
69
|
}) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
@@ -28,13 +28,13 @@ export function JackpotsListItemDesktop({ animate = true, ...props }) {
|
|
|
28
28
|
currency: localeInfo.currency.code,
|
|
29
29
|
minDecimalPlaces: 2,
|
|
30
30
|
maxDecimalPlaces: 2,
|
|
31
|
-
}) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
31
|
+
}) })] }), _jsx("div", { className: "z-1 bottom-[-60] right-0 block lg:absolute", children: _jsx(Image, { width: 150, height: 150, src: isPayingOut ? openChest : closeChest, alt: "closeChest", quality: 100, className: "h-25 w-25 lg:h-37.5 lg:w-37.5 size-full p-2" }) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name, {
|
|
32
32
|
totalCharsCount: 6,
|
|
33
33
|
}) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
|
|
34
34
|
currency: localeInfo.currency.code,
|
|
35
35
|
minDecimalPlaces: 2,
|
|
36
36
|
maxDecimalPlaces: 2,
|
|
37
|
-
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
37
|
+
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 hidden w-full gap-4 rounded-lg p-4 lg:flex", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] }))] }) }) }), _jsxs("div", { className: "mt-3 lg:mt-4", children: [_jsxs("div", { className: "mb-1 flex justify-between", children: [_jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(0, {
|
|
38
38
|
currency: localeInfo.currency.code,
|
|
39
39
|
compact: true,
|
|
40
40
|
}) }), _jsxs("div", { className: "relative flex items-center justify-end gap-1.5", children: [isPayingOut ? (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-red-flash-1']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-red-flash-2']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-red-flash-3']), children: _jsx(ChevronLeftIcon, { className: "size-4.5" }) })] })) : (_jsxs("div", { className: "flex w-6 items-center", children: [_jsx("div", { className: twMerge('absolute left-0', styles['animate-arrow-green-flash-1']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-1.5', styles['animate-arrow-green-flash-2']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) }), _jsx("div", { className: twMerge('absolute left-3', styles['animate-arrow-green-flash-3']), children: _jsx(ChevronRightIcon, { className: "size-4.5" }) })] })), _jsx("div", { className: "text-text-primary-900 text-xs font-semibold", children: formatNumber(jackpot?.maximumJackpotPoolLimit, {
|
|
@@ -43,11 +43,11 @@ export function JackpotsListItemMobile({ animate = true, ...props }) {
|
|
|
43
43
|
currency: localeInfo.currency.code,
|
|
44
44
|
compact: true,
|
|
45
45
|
})} Play now for your chance to win big! 🔥`
|
|
46
|
-
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
46
|
+
: getAccumulatingJackpotDescription(Number(jackpot?.pool) ?? 0, Number(jackpot?.maximumJackpotPoolLimit) ?? 0) })] }), topJackpotPayout.amount ? (_jsx("div", { children: _jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsxs("div", { className: "bg-bg-tertiary relative flex h-18 w-18 items-center justify-center rounded-full", children: [_jsx(User01Icon, { className: "text-text-quarterary-500 size-9" }), _jsxs("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: [topJackpotPayout.multiplier, "x"] })] }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: mask(topJackpotPayout.member.name) }), _jsx("div", { className: "text-brand-400 text-2xl", children: formatNumber(topJackpotPayout.amount, {
|
|
47
47
|
currency: localeInfo.currency.code,
|
|
48
48
|
minDecimalPlaces: 2,
|
|
49
49
|
maxDecimalPlaces: 2,
|
|
50
|
-
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "
|
|
50
|
+
}) })] })] }) })) : (_jsxs("div", { className: "bg-bg-primary relative mt-4 flex w-full gap-4 rounded-lg p-4", children: [_jsx(Image, { width: 66, height: 87, src: firstPlace, alt: "closeChest", className: "size-full h-auto w-[66px] mix-blend-luminosity" }), _jsxs("div", { className: "flex flex-col gap-1 text-left", children: [_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: [_jsx(Trophy01Icon, { className: "text-utility-brand-600 size-3.5" }), "Recent Payout"] }), _jsx("div", { className: "font-semibold", children: "No winners yet" }), _jsx("div", { className: "text-text-secondary-700 text-xs", children: "You could be the first to win the tournament!" })] })] })), _jsx(Button, { variant: "outline", className: twMerge('mt-5.5 px-3.5 py-2.5 text-sm', isDetailsVisible ? 'hidden' : 'flex'), onClick: () => setIsDetailsVisible(!isDetailsVisible), children: _jsxs("div", { className: "flex gap-1.5", children: ["See Details", _jsx(ArrowNarrowDownIcon, { className: "size-5" })] }) })] }), isPayingOut && animate && (_jsx("div", { className: twMerge(styles['light-rays'], 'absolute right-0 top-0 rounded-2xl [--light-rays-top:15%] lg:[--light-rays-top:150px]') }))] }), isDetailsVisible && (_jsxs("div", { children: [_jsxs("div", { className: "z-1 flex-1", children: [_jsxs("div", { className: "flex items-center justify-between p-3", children: [_jsx("div", { className: "flex gap-2", children: _jsx("div", { className: "text-text-primary-900 text-lg font-semibold", children: jackpotPayouts.length ? 'Recent payouts' : 'Starting soon!' }) }), _jsx(JackpotsListItemRules, {})] }), _jsx("div", { className: "border-gray-200 overflow-x-auto", children: _jsxs("table", { className: "w-full min-w-[600px]", children: [_jsx("thead", { children: _jsx("tr", { className: "bg-bg-secondary text-text-tertiary-600 h-8 whitespace-nowrap text-left text-xs font-medium", children: [
|
|
51
51
|
'Player',
|
|
52
52
|
'Game Provider',
|
|
53
53
|
'Multiplier',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { ChevronLeftIcon
|
|
3
|
-
import {
|
|
2
|
+
import { ChevronLeftIcon } from '../../icons/ChevronLeftIcon.js';
|
|
3
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
4
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
5
|
+
import { IconButton } from '../../ui/IconButton/index.js';
|
|
4
6
|
export function Header() {
|
|
5
7
|
return (_jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "bg-bg-primary-alt relative flex items-center gap-xl px-xl py-md lg:justify-center lg:bg-transparent lg:p-0", children: [_jsx(IconButton, { size: "2xs", variant: "outline", colorScheme: "gray", className: "lg:hidden", onClick: () => api.setOpen(false), children: _jsx(ChevronLeftIcon, {}) }), _jsx(Dialog.Title, { className: "text-lg font-semibold", children: "Personal Verification" }), _jsx("button", { type: "button", className: "text-text-quinary absolute right-0 top-1/2 hidden -translate-y-1/2 lg:block", onClick: () => api.setOpen(false), children: _jsx(XIcon, { className: "size-6" }) })] })) }));
|
|
6
8
|
}
|
|
@@ -30,7 +30,7 @@ export function KYCReminder(props) {
|
|
|
30
30
|
session?.status === 'authenticated' &&
|
|
31
31
|
hasMissingData, onOpenChange: (details) => {
|
|
32
32
|
globalStore.kycReminder.setOpen(details.open);
|
|
33
|
-
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "bg-bg-primary-alt mx-auto h-fit max-w-[400px]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto w-fit rounded-full p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: "text-lg text-white", children: "Personal Verification" }), _jsxs("p", { className: "text-text-tertiary-600 mt-xs text-sm", children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
33
|
+
}, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "bg-bg-primary-alt mx-auto h-fit max-w-[calc(100dvw-1rem)] rounded-lg lg:max-w-[400px]", children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "bg-bg-warning-secondary mx-auto w-fit rounded-full p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: "mt-4 text-lg text-white", children: "Personal Verification" }), _jsxs("p", { className: "text-text-tertiary-600 mt-xs text-sm", children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, " services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
|
|
34
34
|
api.setOpen(false);
|
|
35
35
|
globalStore.kyc.setOpen(true);
|
|
36
36
|
}, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] }) })] }) }));
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image from 'next/image';
|
|
3
|
-
import { CheckIcon
|
|
3
|
+
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
4
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
4
5
|
import uploadId from '../../images/capture-id-banner.png';
|
|
5
|
-
import { Button } from '../../ui/index.js';
|
|
6
|
+
import { Button } from '../../ui/Button/index.js';
|
|
6
7
|
import { useKYCContext } from './KYCContext.js';
|
|
7
8
|
export function Step1() {
|
|
8
9
|
const context = useKYCContext();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import Image from 'next/image';
|
|
3
|
-
import { CheckIcon
|
|
3
|
+
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
4
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
4
5
|
import selfie from '../../images/capture-selfie-banner.png';
|
|
5
|
-
import { Button } from '../../ui/index.js';
|
|
6
|
+
import { Button } from '../../ui/Button/index.js';
|
|
6
7
|
import { useKYCContext } from './KYCContext.js';
|
|
7
8
|
export function Step2() {
|
|
8
9
|
const context = useKYCContext();
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CheckIcon } from '../../icons/
|
|
3
|
-
import { Button
|
|
2
|
+
import { CheckIcon } from '../../icons/CheckIcon.js';
|
|
3
|
+
import { Button } from '../../ui/Button/index.js';
|
|
4
|
+
import { Checkbox } from '../../ui/Checkbox/index.js';
|
|
5
|
+
import { Field } from '../../ui/Field/index.js';
|
|
4
6
|
import { useKYCContext } from './KYCContext.js';
|
|
5
7
|
export function Step3() {
|
|
6
8
|
const context = useKYCContext();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { CheckCircleIcon } from '../../icons/
|
|
3
|
-
import { Button
|
|
2
|
+
import { CheckCircleIcon } from '../../icons/CheckCircleIcon.js';
|
|
3
|
+
import { Button } from '../../ui/Button/index.js';
|
|
4
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
4
5
|
export function Step4() {
|
|
5
6
|
return (_jsxs("div", { children: [_jsx("div", { className: "bg-bg-success-secondary text-text-featured-icon-light-success mx-auto flex size-12 items-center justify-center rounded-full", children: _jsx(CheckCircleIcon, {}) }), _jsx("h2", { className: "mt-3 text-center", children: "Submission Successful" }), _jsx("p", { className: "text-text-tertiary-600 text-center", children: "Your documents have been submitted successfully. They\u2019re now under review, and you\u2019ll receive a notification as soon as your account is verified." }), _jsx(Dialog.Context, { children: (api) => (_jsx(Button, { className: "mt-3xl", onClick: () => api.setOpen(false), children: "Ok" })) })] }));
|
|
6
7
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { UseKYCReturn } from './useKYC';
|
|
2
|
-
export declare const KYCContext:
|
|
2
|
+
export declare const KYCContext: (props: {
|
|
3
|
+
value: UseKYCReturn;
|
|
4
|
+
} & {
|
|
5
|
+
children?: import("react").ReactNode | undefined;
|
|
6
|
+
}) => React.ReactNode, useKYCContext: () => UseKYCReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function loadFaceApiModels(): Promise<void>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as faceapi from 'face-api.js';
|
|
2
|
+
export async function loadFaceApiModels() {
|
|
3
|
+
const MODEL_URL = '/models';
|
|
4
|
+
await Promise.all([
|
|
5
|
+
faceapi.nets.tinyFaceDetector.loadFromUri(MODEL_URL),
|
|
6
|
+
faceapi.nets.faceLandmark68Net.loadFromUri(MODEL_URL),
|
|
7
|
+
faceapi.nets.faceRecognitionNet.loadFromUri(MODEL_URL),
|
|
8
|
+
]);
|
|
9
|
+
}
|
|
@@ -7,7 +7,7 @@ import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
|
7
7
|
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
8
8
|
import { useMarkMessageAsReadMutation } from '../../client/hooks/useMarkMessageAsReadMutation.js';
|
|
9
9
|
import { useMessageContext } from './MessageContext.js';
|
|
10
|
-
import {
|
|
10
|
+
import { MessageIcon } from './MessageIcon.js';
|
|
11
11
|
export function Message() {
|
|
12
12
|
const message = useMessageContext();
|
|
13
13
|
const localeInfo = useLocaleInfo();
|
|
@@ -16,7 +16,6 @@ export function Message() {
|
|
|
16
16
|
messages: ctx.messages,
|
|
17
17
|
})));
|
|
18
18
|
const markMessageAsReadMutation = useMarkMessageAsReadMutation();
|
|
19
|
-
const Icon = getMessageIcon(message.icon);
|
|
20
19
|
const handleViewMessage = async () => {
|
|
21
20
|
globalStore.message.setData(message);
|
|
22
21
|
globalStore.message.setOpen(true);
|
|
@@ -31,5 +30,5 @@ export function Message() {
|
|
|
31
30
|
};
|
|
32
31
|
return (_jsxs("div", { role: "button", tabIndex: 0, className: "border-border-secondary rounded-xs bg-bg-secondary flex h-auto flex-shrink-0 cursor-pointer flex-col border px-3.5 py-2.5", onClick: handleViewMessage, "aria-pressed": "false", children: [_jsxs("div", { className: "flex items-center space-x-2", children: [_jsx("p", { className: "text-text-tertiary-600 text-xs font-normal", children: format(new Date(message.dateTimeCreated), 'M/d/yyyy - h:mma', {
|
|
33
32
|
in: tz(localeInfo.timezone),
|
|
34
|
-
}) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(
|
|
33
|
+
}) }), !message.markedAsRead && (_jsx("div", { className: "bg-utility-success-500 h-2.5 w-2.5 rounded-full" }))] }), _jsxs("div", { className: "mb-2 flex items-center space-x-2", children: [_jsx(MessageIcon, { type: message.icon, className: "text-brand-400 size-5" }), _jsx("p", { className: "text-text-primary-brand text-sm font-semibold", children: message.title })] }), _jsx("p", { className: "line-clamp-3 text-wrap text-sm font-normal", dangerouslySetInnerHTML: { __html: message.content } }), message.actions.length > 0 && (_jsx("div", { className: "mt-2 flex flex-wrap items-center justify-end gap-2", children: message.actions.map((action, index) => (_jsx(Link, { className: "border-button-secondary-border text-button-secondary-fg rounded-md border px-3 py-2 text-sm", href: action.url, onClick: handleActionClick, children: action.name }, index))) }))] }));
|
|
35
34
|
}
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
import type { Message } from '../../types';
|
|
2
|
-
export declare const MessageContext:
|
|
2
|
+
export declare const MessageContext: (props: {
|
|
3
|
+
value: Message;
|
|
4
|
+
} & {
|
|
5
|
+
children?: import("react").ReactNode | undefined;
|
|
6
|
+
}) => React.ReactNode, useMessageContext: () => Message;
|