@opexa/portal-components 0.0.313 → 0.0.314
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/components/DigitainLauncher/DigitainLauncher.d.ts +2 -0
- package/dist/components/DigitainLauncher/DigitainLauncher.js +1 -1
- package/dist/components/DigitainLauncher/DigitianContainter.d.ts +2 -0
- package/dist/components/DigitainLauncher/DigitianContainter.js +2 -2
- package/dist/components/DigitainLauncher/Fallback.d.ts +4 -1
- package/dist/components/DigitainLauncher/Fallback.js +11 -11
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/services/queries.js +2644 -2644
- package/dist/styles/theme.css +706 -706
- package/package.json +160 -160
- package/dist/client/utils/recaptcha.d.ts +0 -14
- package/dist/client/utils/recaptcha.js +0 -18
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +0 -10
- package/dist/components/Disclaimer/ResponsibleGaming.js +0 -13
- package/dist/components/Disclaimer/TermsOfUse.d.ts +0 -11
- package/dist/components/Disclaimer/TermsOfUse.js +0 -13
- package/dist/components/KYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/KYC/CaptureIdDocument.js +0 -219
- package/dist/components/KYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/KYC/CaptureSelfie.js +0 -285
- package/dist/components/KYC/DisplayImage.d.ts +0 -5
- package/dist/components/KYC/DisplayImage.js +0 -8
- package/dist/components/KYC/FileUpload.d.ts +0 -10
- package/dist/components/KYC/FileUpload.js +0 -72
- package/dist/components/KYC/NoCameraError.d.ts +0 -7
- package/dist/components/KYC/NoCameraError.js +0 -6
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/KYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/KYC/utils.d.ts +0 -9
- package/dist/components/KYC/utils.js +0 -79
- package/dist/components/SignIn/utils.d.ts +0 -8
- package/dist/components/SignIn/utils.js +0 -26
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +0 -17
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +0 -18
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +0 -6
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +0 -2
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +0 -1
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +0 -310
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +0 -198
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +0 -251
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +0 -10
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +0 -42
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +0 -7
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +0 -9
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +0 -1
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +0 -464
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +0 -11
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +0 -20
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +0 -9
- package/dist/components/SignUp/SignUpKYC/utils.js +0 -79
- package/dist/constants/Branches.d.ts +0 -2
- package/dist/constants/Branches.js +0 -42
- package/dist/handlers/postTransformIdFrontImage.d.ts +0 -3
- package/dist/handlers/postTransformIdFrontImage.js +0 -82
- package/dist/handlers/postTransformSelfieImage.d.ts +0 -3
- package/dist/handlers/postTransformSelfieImage.js +0 -82
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +0 -1
- package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
- package/dist/third-parties/FacebookPixel/index.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
- package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
- package/dist/third-parties/index.d.ts +0 -2
- package/dist/third-parties/index.js +0 -2
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +0 -1
- package/dist/utils/gamesAvailable3pmTo3am.js +0 -1
- package/dist/utils/getGameName.d.ts +0 -1
- package/dist/utils/getGameName.js +0 -6
- package/dist/utils/isBetween3amAnd3pm.d.ts +0 -1
- package/dist/utils/isBetween3amAnd3pm.js +0 -5
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { NextResponse } from 'next/server';
|
|
2
|
-
import sharp from 'sharp';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { validateFile } from '../utils/validateFile.js';
|
|
5
|
-
const TransformIdFrontImageDefinition = z.object({
|
|
6
|
-
image: z.instanceof(File).superRefine((file, context) => {
|
|
7
|
-
const error = validateFile(file);
|
|
8
|
-
if (error) {
|
|
9
|
-
context.addIssue({
|
|
10
|
-
code: z.ZodIssueCode.custom,
|
|
11
|
-
message: error.message,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}),
|
|
15
|
-
cropTop: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
16
|
-
cropLeft: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
17
|
-
cropWidth: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
18
|
-
cropHeight: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
19
|
-
});
|
|
20
|
-
export async function postTransformIdFrontImage(request) {
|
|
21
|
-
const form = await request.formData();
|
|
22
|
-
const parsed = TransformIdFrontImageDefinition.safeParse({
|
|
23
|
-
image: form.get('image'),
|
|
24
|
-
cropTop: form.get('cropTop'),
|
|
25
|
-
cropLeft: form.get('cropLeft'),
|
|
26
|
-
cropWidth: form.get('cropWidth'),
|
|
27
|
-
cropHeight: form.get('cropHeight'),
|
|
28
|
-
});
|
|
29
|
-
if (!parsed.success) {
|
|
30
|
-
return NextResponse.json({
|
|
31
|
-
ok: false,
|
|
32
|
-
message: parsed.error.issues[0].message,
|
|
33
|
-
__error: parsed.error,
|
|
34
|
-
}, { status: 400 });
|
|
35
|
-
}
|
|
36
|
-
const file = parsed.data.image;
|
|
37
|
-
const arrayBuffer = await file.arrayBuffer();
|
|
38
|
-
const buffer = Buffer.from(arrayBuffer);
|
|
39
|
-
const cropped = await sharp(buffer)
|
|
40
|
-
.extract({
|
|
41
|
-
top: parsed.data.cropTop,
|
|
42
|
-
left: parsed.data.cropLeft,
|
|
43
|
-
width: parsed.data.cropWidth,
|
|
44
|
-
height: parsed.data.cropHeight,
|
|
45
|
-
})
|
|
46
|
-
.resize({
|
|
47
|
-
fit: 'contain',
|
|
48
|
-
width: 1200,
|
|
49
|
-
height: 757,
|
|
50
|
-
kernel: sharp.kernel.lanczos3,
|
|
51
|
-
withoutEnlargement: true,
|
|
52
|
-
})
|
|
53
|
-
.modulate({
|
|
54
|
-
brightness: 1.03,
|
|
55
|
-
saturation: 1.05,
|
|
56
|
-
})
|
|
57
|
-
.median(1)
|
|
58
|
-
.blur(0.3)
|
|
59
|
-
.sharpen({
|
|
60
|
-
sigma: 1,
|
|
61
|
-
m1: 0.5,
|
|
62
|
-
m2: 1.0,
|
|
63
|
-
x1: 2,
|
|
64
|
-
y2: 10,
|
|
65
|
-
y3: 20,
|
|
66
|
-
})
|
|
67
|
-
.webp({
|
|
68
|
-
effort: 6,
|
|
69
|
-
quality: 100,
|
|
70
|
-
alphaQuality: 100,
|
|
71
|
-
lossless: false,
|
|
72
|
-
nearLossless: false,
|
|
73
|
-
smartSubsample: true,
|
|
74
|
-
})
|
|
75
|
-
.toBuffer();
|
|
76
|
-
return new NextResponse(cropped, {
|
|
77
|
-
headers: {
|
|
78
|
-
'Content-Type': 'image/webp',
|
|
79
|
-
'Content-Disposition': `inline; filename="id-front-${Date.now()}.webp"`,
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { NextResponse } from 'next/server';
|
|
2
|
-
import sharp from 'sharp';
|
|
3
|
-
import { z } from 'zod';
|
|
4
|
-
import { validateFile } from '../utils/validateFile.js';
|
|
5
|
-
const TransformSelfieImageDefinition = z.object({
|
|
6
|
-
image: z.instanceof(File).superRefine((file, context) => {
|
|
7
|
-
const error = validateFile(file);
|
|
8
|
-
if (error) {
|
|
9
|
-
context.addIssue({
|
|
10
|
-
code: z.ZodIssueCode.custom,
|
|
11
|
-
message: error.message,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}),
|
|
15
|
-
cropTop: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
16
|
-
cropLeft: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
17
|
-
cropWidth: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
18
|
-
cropHeight: z.number().or(z.string().transform((v) => Math.round(Number(v)))),
|
|
19
|
-
});
|
|
20
|
-
export async function postTransformSelfieImage(request) {
|
|
21
|
-
const form = await request.formData();
|
|
22
|
-
const parsed = TransformSelfieImageDefinition.safeParse({
|
|
23
|
-
image: form.get('image'),
|
|
24
|
-
cropTop: form.get('cropTop'),
|
|
25
|
-
cropLeft: form.get('cropLeft'),
|
|
26
|
-
cropWidth: form.get('cropWidth'),
|
|
27
|
-
cropHeight: form.get('cropHeight'),
|
|
28
|
-
});
|
|
29
|
-
if (!parsed.success) {
|
|
30
|
-
return NextResponse.json({
|
|
31
|
-
ok: false,
|
|
32
|
-
message: parsed.error.issues[0].message,
|
|
33
|
-
__error: parsed.error,
|
|
34
|
-
}, { status: 400 });
|
|
35
|
-
}
|
|
36
|
-
const file = parsed.data.image;
|
|
37
|
-
const arrayBuffer = await file.arrayBuffer();
|
|
38
|
-
const buffer = Buffer.from(arrayBuffer);
|
|
39
|
-
const cropped = await sharp(buffer)
|
|
40
|
-
.extract({
|
|
41
|
-
top: parsed.data.cropTop,
|
|
42
|
-
left: parsed.data.cropLeft,
|
|
43
|
-
width: parsed.data.cropWidth,
|
|
44
|
-
height: parsed.data.cropHeight,
|
|
45
|
-
})
|
|
46
|
-
.resize({
|
|
47
|
-
fit: 'contain',
|
|
48
|
-
width: 1200,
|
|
49
|
-
height: 1200,
|
|
50
|
-
kernel: sharp.kernel.lanczos3,
|
|
51
|
-
withoutEnlargement: true,
|
|
52
|
-
})
|
|
53
|
-
.modulate({
|
|
54
|
-
brightness: 1.03,
|
|
55
|
-
saturation: 1.05,
|
|
56
|
-
})
|
|
57
|
-
.median(1)
|
|
58
|
-
.blur(0.3)
|
|
59
|
-
.sharpen({
|
|
60
|
-
sigma: 1,
|
|
61
|
-
m1: 0.5,
|
|
62
|
-
m2: 1.0,
|
|
63
|
-
x1: 2,
|
|
64
|
-
y2: 10,
|
|
65
|
-
y3: 20,
|
|
66
|
-
})
|
|
67
|
-
.webp({
|
|
68
|
-
effort: 6,
|
|
69
|
-
quality: 100,
|
|
70
|
-
alphaQuality: 100,
|
|
71
|
-
lossless: false,
|
|
72
|
-
nearLossless: false,
|
|
73
|
-
smartSubsample: true,
|
|
74
|
-
})
|
|
75
|
-
.toBuffer();
|
|
76
|
-
return new NextResponse(cropped, {
|
|
77
|
-
headers: {
|
|
78
|
-
'Content-Type': 'image/webp',
|
|
79
|
-
'Content-Disposition': `inline; filename="selfie-${Date.now()}.webp"`,
|
|
80
|
-
},
|
|
81
|
-
});
|
|
82
|
-
}
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './FacebookPixel.js';
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleRecaptcha';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './GoogleRecaptcha.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const GAMES_AVAILABLE_3PM_TO_3AM: string[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export const GAMES_AVAILABLE_3PM_TO_3AM = ['Marble Race', 'Rainbow Ball'];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getGameName(reference: string, defaultName: string): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const isBetween3amAnd3pm: () => boolean;
|