@opexa/portal-components 0.0.931 → 0.0.932
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/DepositWithdrawal/Deposit/QRPHDeposit__legacy/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__legacy/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Confirmed.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Failed.js +11 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/Form.js +126 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/GeneratingQrCode.js +10 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDeposit.js +12 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.d.ts +17 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QRPHDepositContext.js +2 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.d.ts +1 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/QrCodeGenerated.js +41 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.d.ts +13 -0
- package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit__next/useQRPHDeposit.js +91 -0
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/OnlineBankDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/OnlineBankDeposit/useOnlineBankDeposit.d.ts +1 -1
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
- package/dist/components/DepositWithdrawal/Deposit__legacy/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
- package/dist/components/DigitainLauncher/Loading.js +1 -1
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
- package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
- package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
- package/dist/components/Disclaimer/TermsOfUse.js +13 -0
- package/dist/components/FeatureFlag/FeatureFlag.d.ts +1 -0
- package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
- package/dist/components/FeatureFlag/index.d.ts +1 -0
- package/dist/components/FeatureFlag/index.js +1 -0
- package/dist/components/ForgotPassword/Crazywin/ForgotPassword.module.css +42 -42
- package/dist/components/Jackpots/Jackpots.module.css +288 -288
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/AutoOpen.d.ts +1 -0
- package/dist/components/KYC/AutoOpen.js +40 -0
- package/dist/components/KYC/BasicInformation.js +1 -1
- package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/KYC/CaptureIdDocument.js +219 -0
- package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/KYC/CaptureSelfie.js +285 -0
- package/dist/components/KYC/DisplayImage.d.ts +5 -0
- package/dist/components/KYC/DisplayImage.js +8 -0
- package/dist/components/KYC/FileUpload.d.ts +10 -0
- package/dist/components/KYC/FileUpload.js +72 -0
- package/dist/components/KYC/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYC.lazy.js +1 -1
- package/dist/components/KYC/KYCDefault/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCNonPagCor/KYCVerificationStatus.lazy.js +2 -2
- package/dist/components/KYC/KYCVerificationStatus.lazy.js +8 -5
- package/dist/components/KYC/NoCameraError.d.ts +7 -0
- package/dist/components/KYC/NoCameraError.js +6 -0
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/KYC/PersonalInformation.js +1 -1
- package/dist/components/KYC/backup/Header.d.ts +1 -0
- package/dist/components/KYC/backup/Header.js +8 -0
- package/dist/components/KYC/backup/Indicator.d.ts +1 -0
- package/dist/components/KYC/backup/Indicator.js +9 -0
- package/dist/components/KYC/backup/KYC.d.ts +1 -0
- package/dist/components/KYC/backup/KYC.js +14 -0
- package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
- package/dist/components/KYC/backup/KYC.lazy.js +26 -0
- package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
- package/dist/components/KYC/backup/KYCContext.js +2 -0
- package/dist/components/KYC/backup/Step1.d.ts +1 -0
- package/dist/components/KYC/backup/Step1.js +13 -0
- package/dist/components/KYC/backup/Step2.d.ts +1 -0
- package/dist/components/KYC/backup/Step2.js +13 -0
- package/dist/components/KYC/backup/Step3.d.ts +1 -0
- package/dist/components/KYC/backup/Step3.js +13 -0
- package/dist/components/KYC/backup/Step4.d.ts +1 -0
- package/dist/components/KYC/backup/Step4.js +7 -0
- package/dist/components/KYC/backup/useKYC.d.ts +10 -0
- package/dist/components/KYC/backup/useKYC.js +8 -0
- package/dist/components/KYC/loadModels.d.ts +1 -0
- package/dist/components/KYC/loadModels.js +9 -0
- package/dist/components/KYC/utils.d.ts +9 -0
- package/dist/components/KYC/utils.js +79 -0
- package/dist/components/Messages/Message.d.ts +1 -0
- package/dist/components/Messages/Message.js +35 -0
- package/dist/components/Messages/MessageContext.d.ts +6 -0
- package/dist/components/Messages/MessageContext.js +2 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +20 -0
- package/dist/components/Messages/MessageTrigger.d.ts +8 -0
- package/dist/components/Messages/MessageTrigger.js +19 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +11 -11
- package/dist/components/Quests/CountdownTimer.d.ts +15 -0
- package/dist/components/Quests/CountdownTimer.js +33 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
- package/dist/components/Search/Search.lazy.js +4 -2
- package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
- package/dist/components/SignUp/SignUp.lazy.js +18 -0
- package/dist/components/SignUp/SignUpContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
- package/dist/components/SignUp/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpForm.js +284 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
- package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
- package/dist/components/shared/IdDocumentField.client.js +204 -0
- package/dist/components/shared/IdDocumentField.d.ts +2 -0
- package/dist/components/shared/IdDocumentField.js +11 -0
- package/dist/components/shared/SelfieField.client.d.ts +20 -0
- package/dist/components/shared/SelfieField.client.js +327 -0
- package/dist/components/shared/SelfieField.d.ts +2 -0
- package/dist/components/shared/SelfieField.js +11 -0
- package/dist/constants/BranchCode.d.ts +4 -0
- package/dist/constants/BranchCode.js +42 -0
- package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
- package/dist/handlers/postTransformIdFrontImage.js +67 -0
- package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
- package/dist/handlers/postTransformSelfieImage.js +71 -0
- package/dist/handlers.d.ts +43 -0
- package/dist/handlers.js +297 -0
- package/dist/icons/BellRingIcon.d.ts +2 -0
- package/dist/icons/BellRingIcon.js +4 -0
- package/dist/images/phone-icon.svg +10 -10
- package/dist/services/queries.js +3369 -3369
- package/dist/styles/theme.css +776 -776
- package/dist/utils/dataUrlToBlob.d.ts +1 -0
- package/dist/utils/dataUrlToBlob.js +11 -0
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
- package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
- package/dist/utils/getGameName.d.ts +1 -0
- package/dist/utils/getGameName.js +6 -0
- package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
- package/dist/utils/isBetween3amAnd3pm.js +5 -0
- package/dist/utils/resizeImageSize.d.ts +2 -0
- package/dist/utils/resizeImageSize.js +11 -0
- package/package.json +179 -179
- package/dist/components/Banner/Banner.client.d.ts +0 -12
- package/dist/components/Banner/Banner.client.js +0 -49
- package/dist/components/PortalProvider/AndroidOnlyComponents.d.ts +0 -1
- package/dist/components/PortalProvider/AndroidOnlyComponents.js +0 -12
|
@@ -1,184 +1,184 @@
|
|
|
1
|
-
@keyframes arrow-green-flash {
|
|
2
|
-
0% {
|
|
3
|
-
color: #abefc6;
|
|
4
|
-
}
|
|
5
|
-
100% {
|
|
6
|
-
color: #079455;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.animate-arrow-green-flash-1 {
|
|
11
|
-
animation: arrow-green-flash 0.4s infinite;
|
|
12
|
-
animation-delay: -0.2s;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.animate-arrow-green-flash-2 {
|
|
16
|
-
animation: arrow-green-flash 0.4s infinite;
|
|
17
|
-
animation-delay: -0.1s;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.animate-arrow-green-flash-3 {
|
|
21
|
-
animation: arrow-green-flash 0.4s infinite;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
@keyframes arrow-red-flash {
|
|
25
|
-
0%,
|
|
26
|
-
100% {
|
|
27
|
-
color: #f97066;
|
|
28
|
-
}
|
|
29
|
-
50% {
|
|
30
|
-
color: #fecdca;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.animate-arrow-red-flash-1 {
|
|
35
|
-
animation: arrow-red-flash 0.4s infinite;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.animate-arrow-red-flash-2 {
|
|
39
|
-
animation: arrow-red-flash 0.4s infinite;
|
|
40
|
-
animation-delay: -0.1s;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.animate-arrow-red-flash-3 {
|
|
44
|
-
animation: arrow-red-flash 0.4s infinite;
|
|
45
|
-
animation-delay: -0.2s;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/* Animated BG */
|
|
49
|
-
@keyframes rotate {
|
|
50
|
-
to {
|
|
51
|
-
transform: rotate(1turn);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
.light-rays {
|
|
56
|
-
position: absolute;
|
|
57
|
-
top: 0;
|
|
58
|
-
left: 0;
|
|
59
|
-
right: 0;
|
|
60
|
-
bottom: 0;
|
|
61
|
-
overflow: hidden;
|
|
62
|
-
|
|
63
|
-
--first: var(--color-bg-tertiary);
|
|
64
|
-
--second: var(--color-bg-quaternary);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.light-rays::before,
|
|
68
|
-
.light-rays::after {
|
|
69
|
-
content: '';
|
|
70
|
-
position: absolute;
|
|
71
|
-
top: var(--light-rays-top, 150px);
|
|
72
|
-
left: calc(50% - 90px);
|
|
73
|
-
margin: -100vmax;
|
|
74
|
-
width: 200vmax;
|
|
75
|
-
height: 200vmax;
|
|
76
|
-
opacity: 0.6;
|
|
77
|
-
transform-origin: center;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
.light-rays::before {
|
|
81
|
-
background: conic-gradient(
|
|
82
|
-
var(--first) 0deg 7.2deg,
|
|
83
|
-
var(--second) 7.2deg 14.4deg,
|
|
84
|
-
var(--first) 14.4deg 21.6deg,
|
|
85
|
-
var(--second) 21.6deg 28.8deg,
|
|
86
|
-
var(--first) 28.8deg 36deg,
|
|
87
|
-
var(--second) 36deg 43.2deg,
|
|
88
|
-
var(--first) 43.2deg 50.4deg,
|
|
89
|
-
var(--second) 50.4deg 57.6deg,
|
|
90
|
-
var(--first) 57.6deg 64.8deg,
|
|
91
|
-
var(--second) 64.8deg 72deg,
|
|
92
|
-
var(--first) 72deg 79.2deg,
|
|
93
|
-
var(--second) 79.2deg 86.4deg,
|
|
94
|
-
var(--first) 86.4deg 93.6deg,
|
|
95
|
-
var(--second) 93.6deg 100.8deg,
|
|
96
|
-
var(--first) 100.8deg 108deg,
|
|
97
|
-
var(--second) 108deg 115.2deg,
|
|
98
|
-
var(--first) 115.2deg 122.4deg,
|
|
99
|
-
var(--second) 122.4deg 129.6deg,
|
|
100
|
-
var(--first) 129.6deg 136.8deg,
|
|
101
|
-
var(--second) 136.8deg 144deg,
|
|
102
|
-
var(--first) 144deg 151.2deg,
|
|
103
|
-
var(--second) 151.2deg 158.4deg,
|
|
104
|
-
var(--first) 158.4deg 165.6deg,
|
|
105
|
-
var(--second) 165.6deg 172.8deg,
|
|
106
|
-
var(--first) 172.8deg 180deg,
|
|
107
|
-
var(--second) 180deg 187.2deg,
|
|
108
|
-
var(--first) 187.2deg 194.4deg,
|
|
109
|
-
var(--second) 194.4deg 201.6deg,
|
|
110
|
-
var(--first) 201.6deg 208.8deg,
|
|
111
|
-
var(--second) 208.8deg 216deg,
|
|
112
|
-
var(--first) 216deg 223.2deg,
|
|
113
|
-
var(--second) 223.2deg 230.4deg,
|
|
114
|
-
var(--first) 230.4deg 237.6deg,
|
|
115
|
-
var(--second) 237.6deg 244.8deg,
|
|
116
|
-
var(--first) 244.8deg 252deg,
|
|
117
|
-
var(--second) 252deg 259.2deg,
|
|
118
|
-
var(--first) 259.2deg 266.4deg,
|
|
119
|
-
var(--second) 266.4deg 273.6deg,
|
|
120
|
-
var(--first) 273.6deg 280.8deg,
|
|
121
|
-
var(--second) 280.8deg 288deg,
|
|
122
|
-
var(--first) 288deg 295.2deg,
|
|
123
|
-
var(--second) 295.2deg 302.4deg,
|
|
124
|
-
var(--first) 302.4deg 309.6deg,
|
|
125
|
-
var(--second) 309.6deg 316.8deg,
|
|
126
|
-
var(--first) 316.8deg 324deg,
|
|
127
|
-
var(--second) 324deg 331.2deg,
|
|
128
|
-
var(--first) 331.2deg 338.4deg,
|
|
129
|
-
var(--second) 338.4deg 345.6deg,
|
|
130
|
-
var(--first) 345.6deg 352.8deg,
|
|
131
|
-
var(--second) 352.8deg 360deg
|
|
132
|
-
);
|
|
133
|
-
animation: rotate 20s linear infinite;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@media (max-width: 1024px) {
|
|
137
|
-
.light-rays::before,
|
|
138
|
-
.light-rays::after {
|
|
139
|
-
left: auto;
|
|
140
|
-
right: 11%;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
/* ScrollArea.module.css */
|
|
145
|
-
.scrollArea {
|
|
146
|
-
overflow-y: scroll;
|
|
147
|
-
padding-right: 4px;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/* WebKit-based browsers */
|
|
151
|
-
.scrollArea::-webkit-scrollbar {
|
|
152
|
-
width: 8px;
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
.scrollArea::-webkit-scrollbar-track {
|
|
156
|
-
background: var(--color-bg-primary-alt);
|
|
157
|
-
border-radius: 9999px;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
.scrollArea::-webkit-scrollbar-thumb {
|
|
161
|
-
background-color: var(--color-bg-quaternary);
|
|
162
|
-
border-radius: 9999px;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
@keyframes waveColor {
|
|
166
|
-
0%,
|
|
167
|
-
2.5% {
|
|
168
|
-
color: var(--wave-highlight-color);
|
|
169
|
-
}
|
|
170
|
-
2.51%,
|
|
171
|
-
100% {
|
|
172
|
-
color: var(--color-brand-300);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.animate-wave-color-success {
|
|
177
|
-
--wave-highlight-color: var(--color-success-800);
|
|
178
|
-
animation: waveColor 4s ease-in-out infinite;
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
.animate-wave-color-error {
|
|
182
|
-
--wave-highlight-color: var(--color-error-600);
|
|
183
|
-
animation: waveColor 4s ease-in-out infinite;
|
|
184
|
-
}
|
|
1
|
+
@keyframes arrow-green-flash {
|
|
2
|
+
0% {
|
|
3
|
+
color: #abefc6;
|
|
4
|
+
}
|
|
5
|
+
100% {
|
|
6
|
+
color: #079455;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.animate-arrow-green-flash-1 {
|
|
11
|
+
animation: arrow-green-flash 0.4s infinite;
|
|
12
|
+
animation-delay: -0.2s;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.animate-arrow-green-flash-2 {
|
|
16
|
+
animation: arrow-green-flash 0.4s infinite;
|
|
17
|
+
animation-delay: -0.1s;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.animate-arrow-green-flash-3 {
|
|
21
|
+
animation: arrow-green-flash 0.4s infinite;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
@keyframes arrow-red-flash {
|
|
25
|
+
0%,
|
|
26
|
+
100% {
|
|
27
|
+
color: #f97066;
|
|
28
|
+
}
|
|
29
|
+
50% {
|
|
30
|
+
color: #fecdca;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.animate-arrow-red-flash-1 {
|
|
35
|
+
animation: arrow-red-flash 0.4s infinite;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.animate-arrow-red-flash-2 {
|
|
39
|
+
animation: arrow-red-flash 0.4s infinite;
|
|
40
|
+
animation-delay: -0.1s;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.animate-arrow-red-flash-3 {
|
|
44
|
+
animation: arrow-red-flash 0.4s infinite;
|
|
45
|
+
animation-delay: -0.2s;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/* Animated BG */
|
|
49
|
+
@keyframes rotate {
|
|
50
|
+
to {
|
|
51
|
+
transform: rotate(1turn);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.light-rays {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 0;
|
|
58
|
+
left: 0;
|
|
59
|
+
right: 0;
|
|
60
|
+
bottom: 0;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
|
|
63
|
+
--first: var(--color-bg-tertiary);
|
|
64
|
+
--second: var(--color-bg-quaternary);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.light-rays::before,
|
|
68
|
+
.light-rays::after {
|
|
69
|
+
content: '';
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: var(--light-rays-top, 150px);
|
|
72
|
+
left: calc(50% - 90px);
|
|
73
|
+
margin: -100vmax;
|
|
74
|
+
width: 200vmax;
|
|
75
|
+
height: 200vmax;
|
|
76
|
+
opacity: 0.6;
|
|
77
|
+
transform-origin: center;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.light-rays::before {
|
|
81
|
+
background: conic-gradient(
|
|
82
|
+
var(--first) 0deg 7.2deg,
|
|
83
|
+
var(--second) 7.2deg 14.4deg,
|
|
84
|
+
var(--first) 14.4deg 21.6deg,
|
|
85
|
+
var(--second) 21.6deg 28.8deg,
|
|
86
|
+
var(--first) 28.8deg 36deg,
|
|
87
|
+
var(--second) 36deg 43.2deg,
|
|
88
|
+
var(--first) 43.2deg 50.4deg,
|
|
89
|
+
var(--second) 50.4deg 57.6deg,
|
|
90
|
+
var(--first) 57.6deg 64.8deg,
|
|
91
|
+
var(--second) 64.8deg 72deg,
|
|
92
|
+
var(--first) 72deg 79.2deg,
|
|
93
|
+
var(--second) 79.2deg 86.4deg,
|
|
94
|
+
var(--first) 86.4deg 93.6deg,
|
|
95
|
+
var(--second) 93.6deg 100.8deg,
|
|
96
|
+
var(--first) 100.8deg 108deg,
|
|
97
|
+
var(--second) 108deg 115.2deg,
|
|
98
|
+
var(--first) 115.2deg 122.4deg,
|
|
99
|
+
var(--second) 122.4deg 129.6deg,
|
|
100
|
+
var(--first) 129.6deg 136.8deg,
|
|
101
|
+
var(--second) 136.8deg 144deg,
|
|
102
|
+
var(--first) 144deg 151.2deg,
|
|
103
|
+
var(--second) 151.2deg 158.4deg,
|
|
104
|
+
var(--first) 158.4deg 165.6deg,
|
|
105
|
+
var(--second) 165.6deg 172.8deg,
|
|
106
|
+
var(--first) 172.8deg 180deg,
|
|
107
|
+
var(--second) 180deg 187.2deg,
|
|
108
|
+
var(--first) 187.2deg 194.4deg,
|
|
109
|
+
var(--second) 194.4deg 201.6deg,
|
|
110
|
+
var(--first) 201.6deg 208.8deg,
|
|
111
|
+
var(--second) 208.8deg 216deg,
|
|
112
|
+
var(--first) 216deg 223.2deg,
|
|
113
|
+
var(--second) 223.2deg 230.4deg,
|
|
114
|
+
var(--first) 230.4deg 237.6deg,
|
|
115
|
+
var(--second) 237.6deg 244.8deg,
|
|
116
|
+
var(--first) 244.8deg 252deg,
|
|
117
|
+
var(--second) 252deg 259.2deg,
|
|
118
|
+
var(--first) 259.2deg 266.4deg,
|
|
119
|
+
var(--second) 266.4deg 273.6deg,
|
|
120
|
+
var(--first) 273.6deg 280.8deg,
|
|
121
|
+
var(--second) 280.8deg 288deg,
|
|
122
|
+
var(--first) 288deg 295.2deg,
|
|
123
|
+
var(--second) 295.2deg 302.4deg,
|
|
124
|
+
var(--first) 302.4deg 309.6deg,
|
|
125
|
+
var(--second) 309.6deg 316.8deg,
|
|
126
|
+
var(--first) 316.8deg 324deg,
|
|
127
|
+
var(--second) 324deg 331.2deg,
|
|
128
|
+
var(--first) 331.2deg 338.4deg,
|
|
129
|
+
var(--second) 338.4deg 345.6deg,
|
|
130
|
+
var(--first) 345.6deg 352.8deg,
|
|
131
|
+
var(--second) 352.8deg 360deg
|
|
132
|
+
);
|
|
133
|
+
animation: rotate 20s linear infinite;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
@media (max-width: 1024px) {
|
|
137
|
+
.light-rays::before,
|
|
138
|
+
.light-rays::after {
|
|
139
|
+
left: auto;
|
|
140
|
+
right: 11%;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* ScrollArea.module.css */
|
|
145
|
+
.scrollArea {
|
|
146
|
+
overflow-y: scroll;
|
|
147
|
+
padding-right: 4px;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* WebKit-based browsers */
|
|
151
|
+
.scrollArea::-webkit-scrollbar {
|
|
152
|
+
width: 8px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.scrollArea::-webkit-scrollbar-track {
|
|
156
|
+
background: var(--color-bg-primary-alt);
|
|
157
|
+
border-radius: 9999px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.scrollArea::-webkit-scrollbar-thumb {
|
|
161
|
+
background-color: var(--color-bg-quaternary);
|
|
162
|
+
border-radius: 9999px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
@keyframes waveColor {
|
|
166
|
+
0%,
|
|
167
|
+
2.5% {
|
|
168
|
+
color: var(--wave-highlight-color);
|
|
169
|
+
}
|
|
170
|
+
2.51%,
|
|
171
|
+
100% {
|
|
172
|
+
color: var(--color-brand-300);
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.animate-wave-color-success {
|
|
177
|
+
--wave-highlight-color: var(--color-success-800);
|
|
178
|
+
animation: waveColor 4s ease-in-out infinite;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.animate-wave-color-error {
|
|
182
|
+
--wave-highlight-color: var(--color-error-600);
|
|
183
|
+
animation: waveColor 4s ease-in-out infinite;
|
|
184
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AutoOpen(): null;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { useShallow } from 'zustand/shallow';
|
|
3
|
+
import { useAccountQuery } from '../../client/hooks/useAccountQuery.js';
|
|
4
|
+
import { useGlobalStore } from '../../client/hooks/useGlobalStore.js';
|
|
5
|
+
import { useMemberVerificationQuery } from '../../client/hooks/useMemberVerificationQuery.js';
|
|
6
|
+
import { useSessionQuery } from '../../client/hooks/useSessionQuery.js';
|
|
7
|
+
import { KYC_PROMPT_LOCALSTORAGE_KEY } from '../../constants/index.js';
|
|
8
|
+
export function AutoOpen() {
|
|
9
|
+
const kycStore = useGlobalStore(useShallow((ctx) => ctx.kyc));
|
|
10
|
+
const { data: session } = useSessionQuery();
|
|
11
|
+
const { data: account } = useAccountQuery();
|
|
12
|
+
const { data: verification } = useMemberVerificationQuery();
|
|
13
|
+
const isBasicInfoCompleted = account?.realName !== null && account?.birthDay !== null;
|
|
14
|
+
const isUploadCompleted = verification &&
|
|
15
|
+
verification.idFrontImage !== null &&
|
|
16
|
+
verification.selfieImage !== null;
|
|
17
|
+
const isRejected = Boolean(verification?.status === 'REJECTED');
|
|
18
|
+
const step = !isBasicInfoCompleted
|
|
19
|
+
? 1
|
|
20
|
+
: isRejected
|
|
21
|
+
? 2
|
|
22
|
+
: isUploadCompleted
|
|
23
|
+
? 3
|
|
24
|
+
: 2;
|
|
25
|
+
const shouldOpen = !isBasicInfoCompleted || !isUploadCompleted || isRejected;
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (session?.status == 'authenticated' &&
|
|
28
|
+
shouldOpen &&
|
|
29
|
+
localStorage.getItem(KYC_PROMPT_LOCALSTORAGE_KEY) === null) {
|
|
30
|
+
kycStore.setKycReminder(true);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
}, [kycStore, session?.status, shouldOpen]);
|
|
34
|
+
useEffect(() => {
|
|
35
|
+
if (step) {
|
|
36
|
+
kycStore.setStep(step);
|
|
37
|
+
}
|
|
38
|
+
}, [kycStore, step]);
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
@@ -84,7 +84,7 @@ export function BasicInformation() {
|
|
|
84
84
|
});
|
|
85
85
|
},
|
|
86
86
|
});
|
|
87
|
-
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center font-semibold
|
|
87
|
+
return (_jsxs("div", { children: [_jsx(Dialog.Title, { className: "text-center text-lg font-semibold", children: "Basic Information" }), _jsx(Dialog.Description, { className: "text-text-secondary-700 mt-xs text-center text-sm", children: "Enter your basic details for identification and communication." }), _jsxs("form", { className: "mt-3", onSubmit: form.handleSubmit((data) => {
|
|
88
88
|
invariant(account);
|
|
89
89
|
const input = omitBy({
|
|
90
90
|
realName: account.realName === data.realName ? undefined : data.realName,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptureIdDocument(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useRef, useState } from 'react';
|
|
4
|
+
import { twMerge } from 'tailwind-merge';
|
|
5
|
+
import { useUploadImageFileMutation } from '../../client/hooks/useUploadImageFileMutation.js';
|
|
6
|
+
import { ArrowLeftIcon } from '../../icons/ArrowLeftIcon.js';
|
|
7
|
+
import { Camera01Icon } from '../../icons/Camera01Icon.js';
|
|
8
|
+
import { CheckCircleIcon } from '../../icons/CheckCircleIcon.js';
|
|
9
|
+
import { XIcon } from '../../icons/XIcon.js';
|
|
10
|
+
import { Button } from '../../ui/Button/index.js';
|
|
11
|
+
import { Dialog } from '../../ui/Dialog/index.js';
|
|
12
|
+
import { useKYCContext } from './KYCContext.js';
|
|
13
|
+
import NoCameraError from './NoCameraError.js';
|
|
14
|
+
import { cameraErrorDescriptions, dataURLtoBlob, resizeFile, showPermissionInstructions, } from './utils.js';
|
|
15
|
+
export function CaptureIdDocument() {
|
|
16
|
+
const kyc = useKYCContext();
|
|
17
|
+
const { mutate, isPending } = useUploadImageFileMutation();
|
|
18
|
+
const [videoStream, setVideoStream] = useState(null);
|
|
19
|
+
const [cameraError, setCameraError] = useState(null);
|
|
20
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
21
|
+
const [selectedImage, setSelectedImage] = useState(null);
|
|
22
|
+
const [captureInProgress, setCaptureInProgress] = useState(false);
|
|
23
|
+
const [proccessImageCanvas, setProccessImageCanvas] = useState(null);
|
|
24
|
+
const videoElement = useRef(null);
|
|
25
|
+
const containerRef = useRef(null);
|
|
26
|
+
function stopCamera() {
|
|
27
|
+
if (videoStream) {
|
|
28
|
+
videoStream.getTracks().forEach((track) => track.stop());
|
|
29
|
+
setVideoStream(null);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
useEffect(() => {
|
|
33
|
+
return () => {
|
|
34
|
+
stopCamera();
|
|
35
|
+
};
|
|
36
|
+
}, [videoStream]);
|
|
37
|
+
async function startCamera() {
|
|
38
|
+
try {
|
|
39
|
+
setIsLoading(true);
|
|
40
|
+
setCameraError(null);
|
|
41
|
+
setCaptureInProgress(true);
|
|
42
|
+
console.log('Starting camera...');
|
|
43
|
+
const stream = await navigator.mediaDevices.getUserMedia({
|
|
44
|
+
video: {
|
|
45
|
+
facingMode: 'environment',
|
|
46
|
+
aspectRatio: 16 / 9,
|
|
47
|
+
width: { ideal: 1920, max: 1920 },
|
|
48
|
+
height: { ideal: 1080, max: 1080 },
|
|
49
|
+
frameRate: {
|
|
50
|
+
ideal: 30,
|
|
51
|
+
max: 60,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
audio: false,
|
|
55
|
+
});
|
|
56
|
+
// Set the stream directly to the video element
|
|
57
|
+
if (videoElement.current) {
|
|
58
|
+
videoElement.current.srcObject = stream;
|
|
59
|
+
videoElement.current.onloadedmetadata = () => {
|
|
60
|
+
console.log('Video metadata loaded, starting playback...');
|
|
61
|
+
videoElement.current
|
|
62
|
+
?.play()
|
|
63
|
+
.then(() => {
|
|
64
|
+
setVideoStream(stream);
|
|
65
|
+
setIsLoading(false);
|
|
66
|
+
})
|
|
67
|
+
.catch(() => {
|
|
68
|
+
setCameraError('Failed to start camera stream. Please try again.');
|
|
69
|
+
setIsLoading(false);
|
|
70
|
+
// Stop the stream if playback fails
|
|
71
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
videoElement.current.onerror = (err) => {
|
|
75
|
+
console.error('Video element error:', err);
|
|
76
|
+
setCameraError('Video playback error. Please try again.');
|
|
77
|
+
setIsLoading(false);
|
|
78
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
console.error('Video element not available');
|
|
83
|
+
setCameraError('Camera initialization failed. Please try again.');
|
|
84
|
+
setCaptureInProgress(false);
|
|
85
|
+
setIsLoading(false);
|
|
86
|
+
stream.getTracks().forEach((track) => track.stop());
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
setIsLoading(false);
|
|
91
|
+
if (error instanceof DOMException) {
|
|
92
|
+
console.error('Error accessing camera:', error.message);
|
|
93
|
+
setCameraError(error.name);
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
console.error('Unknown error accessing camera:', error);
|
|
97
|
+
setCameraError('An unknown error occurred. Please check permissions and try again.');
|
|
98
|
+
}
|
|
99
|
+
setCaptureInProgress(false);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function captureAndProcessImage() {
|
|
103
|
+
if (!videoElement.current || !videoStream) {
|
|
104
|
+
console.error('Video element or stream not available for capture');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
try {
|
|
108
|
+
const canvas = document.createElement('canvas');
|
|
109
|
+
const parentDiv = document.getElementById('parent');
|
|
110
|
+
canvas.width = parentDiv?.clientWidth || videoElement.current.width;
|
|
111
|
+
canvas.height = parentDiv?.clientHeight || videoElement.current.height;
|
|
112
|
+
const ctx = canvas.getContext('2d');
|
|
113
|
+
if (!ctx) {
|
|
114
|
+
console.error('Could not get 2D context for canvas');
|
|
115
|
+
setCameraError('Failed to process image. Please try again.');
|
|
116
|
+
setCaptureInProgress(false);
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
ctx.drawImage(videoElement.current, 0, 0, canvas.width, canvas.height);
|
|
120
|
+
const imageSrc = canvas.toDataURL('image/png', 1.0);
|
|
121
|
+
setSelectedImage({ src: imageSrc });
|
|
122
|
+
setCaptureInProgress(false);
|
|
123
|
+
stopCamera();
|
|
124
|
+
const newImg = document.createElement('img');
|
|
125
|
+
newImg.src = imageSrc;
|
|
126
|
+
//@ts-expect-error jscanify is not typed
|
|
127
|
+
const scanner = new jscanify();
|
|
128
|
+
newImg.onload = () => {
|
|
129
|
+
try {
|
|
130
|
+
if (containerRef.current) {
|
|
131
|
+
// containerRef.current.innerHTML = '';
|
|
132
|
+
const paperWidth = parentDiv?.clientWidth || videoElement.current?.videoWidth;
|
|
133
|
+
const paperHeight = parentDiv?.clientHeight || videoElement.current?.videoHeight;
|
|
134
|
+
//@ts-expect-error jscanify is not typed
|
|
135
|
+
const contour = scanner.findPaperContour(cv.imread(newImg));
|
|
136
|
+
const cornerPoints = scanner.getCornerPoints(contour);
|
|
137
|
+
const resultCanvas = scanner.extractPaper(newImg, paperWidth, paperHeight, cornerPoints);
|
|
138
|
+
newImg.className =
|
|
139
|
+
'absolute inset-0 m-auto w-full h-auto md:max-h-[333px] md:max-w-[643px] aspect-video rounded-lg object-contain';
|
|
140
|
+
setProccessImageCanvas(resultCanvas);
|
|
141
|
+
containerRef.current.appendChild(resultCanvas);
|
|
142
|
+
setCaptureInProgress(false);
|
|
143
|
+
setSelectedImage({ src: resultCanvas.toDataURL('image/png') });
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
console.error('Error processing image:', error);
|
|
148
|
+
setCameraError('Failed to process image. Please try again.');
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
newImg.onerror = () => {
|
|
152
|
+
console.error('Error loading image');
|
|
153
|
+
setCameraError('NoIdDetectedError');
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
catch (error) {
|
|
157
|
+
console.error('Error capturing image:', error);
|
|
158
|
+
setCameraError('NoIdDetectedError');
|
|
159
|
+
setCaptureInProgress(false);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
async function uploadPhoto() {
|
|
163
|
+
if (!proccessImageCanvas) {
|
|
164
|
+
console.error('Failed to process the image. Please try again.');
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const blob = proccessImageCanvas.toDataURL('image/png', 1.0);
|
|
168
|
+
const processedBlob = dataURLtoBlob(blob);
|
|
169
|
+
const img = new File([processedBlob], 'frontImage', { type: 'image/jpeg' });
|
|
170
|
+
const resizedImage = (await resizeFile(img));
|
|
171
|
+
if (resizedImage) {
|
|
172
|
+
await mutate({
|
|
173
|
+
file: resizedImage,
|
|
174
|
+
}, {
|
|
175
|
+
onSuccess: (data) => {
|
|
176
|
+
kyc.setFrontImageId(data);
|
|
177
|
+
kyc.setCapturing(null);
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
function retakePhoto() {
|
|
183
|
+
setSelectedImage(null);
|
|
184
|
+
setCaptureInProgress(true);
|
|
185
|
+
setCameraError(null);
|
|
186
|
+
if (containerRef.current) {
|
|
187
|
+
const canvas = containerRef.current.querySelector('canvas');
|
|
188
|
+
if (canvas) {
|
|
189
|
+
canvas.width = canvas.width;
|
|
190
|
+
}
|
|
191
|
+
containerRef.current.innerHTML = '';
|
|
192
|
+
}
|
|
193
|
+
if (videoElement.current) {
|
|
194
|
+
videoElement.current.play();
|
|
195
|
+
}
|
|
196
|
+
startCamera();
|
|
197
|
+
}
|
|
198
|
+
function checkCameraPermission() {
|
|
199
|
+
const constraints = { video: true };
|
|
200
|
+
navigator.mediaDevices
|
|
201
|
+
.getUserMedia(constraints)
|
|
202
|
+
.then(() => {
|
|
203
|
+
setCameraError(null);
|
|
204
|
+
startCamera();
|
|
205
|
+
})
|
|
206
|
+
.catch(() => {
|
|
207
|
+
showPermissionInstructions();
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { className: "w-full p-4 lg:w-[640px] lg:px-12 lg:py-4xl", children: [_jsxs("button", { type: "button", className: "flex items-center gap-lg lg:absolute lg:right-5 lg:top-5 lg:p-md", onClick: () => {
|
|
211
|
+
stopCamera();
|
|
212
|
+
kyc.setCapturing(null);
|
|
213
|
+
}, children: [_jsx(XIcon, { className: "text-text-senary-300 hidden size-5 lg:block" }), _jsx(ArrowLeftIcon, { className: "text-text-senary-300 size-5 lg:hidden" }), _jsx("span", { className: "text-lg font-semibold lg:hidden", children: "Back" })] }), _jsx(Dialog.Title, { className: "mt-6 text-center text-lg font-semibold lg:mt-0", children: "Take a Picture of Your Front ID" }), _jsxs(Dialog.Description, { className: "lg:max-w-auto text-text-tertiary-600 mx-auto mt-sm max-w-[19rem] text-center text-sm lg:max-w-full", children: ["Make sure your ID is clearly visible, well-lit, and not blurry.", _jsx("br", { className: "hidden lg:block" }), " Avoid glare or reflections, and ensure all corners are within the frame."] }), _jsx("div", { id: "parent", className: "border-border-disabled mt-6 aspect-video rounded-xl border bg-black lg:mt-8", children: [
|
|
214
|
+
'NotAllowedError',
|
|
215
|
+
'NotReadableError',
|
|
216
|
+
'NotFoundError',
|
|
217
|
+
'NoIdDetectedError',
|
|
218
|
+
].includes(cameraError) ? (_jsx(NoCameraError, { onRetry: checkCameraPermission, title: "Camera Access Required", description: cameraErrorDescriptions[cameraError] })) : captureInProgress ? (_jsxs("div", { className: "relative flex h-fit w-full flex-col items-center justify-center", children: [_jsx("video", { ref: videoElement, autoPlay: true, muted: true, playsInline: true, className: "relative h-[50vh] w-full rounded-lg object-cover md:aspect-video md:max-h-[333px]", width: "100%", height: "100%" }), _jsxs("div", { className: "pointer-events-none absolute inset-0 z-50", children: [_jsx("div", { className: twMerge('absolute inset-0 w-full bg-black/60 backdrop-blur-sm [clip-path:polygon(0%_0%,0%_100%,calc(50%-158px)_100%,calc(50%-158px)_calc(50%-100px),calc(50%+158px)_calc(50%-100px),calc(50%+158px)_calc(50%+100px),calc(50%-158px)_calc(50%+100px),calc(50%-158px)_100%,100%_100%,100%_0%)] md:[clip-path:polygon(0%_0%,0%_100%,calc(50%-225px)_100%,calc(50%-225px)_calc(50%-142px),calc(50%+225px)_calc(50%-142px),calc(50%+225px)_calc(50%+142px),calc(50%-225px)_calc(50%+142px),calc(50%-225px)_100%,100%_100%,100%_0%)]') }), _jsx("div", { className: "absolute inset-0 z-[60] mx-auto flex items-center justify-center", children: _jsx("div", { className: "relative aspect-[1011/638] h-[200px] md:h-[295px] md:w-[450px]", children: _jsx("div", { className: "h-full w-full rounded-lg border-4 border-dashed border-[#B54708]" }) }) })] })] })) : (_jsx("div", { ref: containerRef, className: "relative grid h-full w-full place-items-center rounded-lg object-contain md:max-h-[333px]" })) }), captureInProgress ? (_jsxs(Button, { className: "disabled:bg-bg-disabled disabled:text-text-disabled mx-auto mt-6 px-xl disabled:opacity-100 lg:mt-8 lg:w-fit", onClick: captureAndProcessImage, children: ["Capture Image", _jsx(Camera01Icon, { className: "size-5" })] })) : selectedImage && selectedImage.src ? (_jsxs("div", { className: "mt-4 flex flex-col items-center justify-center gap-2 md:flex-row", children: [_jsxs(Button, { className: "lg:w-fit", type: "button", onClick: retakePhoto, children: ["Retake Photo ", _jsx(Camera01Icon, { className: "ml-1" })] }), _jsxs(Button, { className: "lg:w-fit", type: "button", onClick: uploadPhoto, disabled: isPending, children: ["Use Photo ", _jsx(CheckCircleIcon, { className: "ml-1" })] })] })) : (_jsxs(Button, { className: twMerge('disabled:bg-bg-disabled disabled:text-text-disabled mx-auto mt-6 px-xl disabled:opacity-100 lg:mt-8 lg:w-fit', cameraError && 'hidden'), onClick: startCamera, disabled: isLoading || !!videoStream, children: [isLoading ? 'Starting Camera...' : 'Start Camera', _jsx(Camera01Icon, { className: "size-5" })] }))] }) }));
|
|
219
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function CaptureSelfie(): import("react/jsx-runtime").JSX.Element;
|