@sanctum-key/react-native-sdk 1.0.12 → 1.0.14
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/build/package.json +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.js +69 -37
- package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +131 -105
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js +97 -65
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +1 -1
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/package.json +1 -1
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +127 -95
- package/src/components/KYCElements/IDCardCapture.tsx +210 -173
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +185 -165
- package/src/modules/api/KYCService.ts +1 -1
package/build/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailVerificationTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/KYCElements/EmailVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAiB,MAAM,uBAAuB,CAAC;AAMzE,UAAU,8BAA8B;IACpC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,
|
|
1
|
+
{"version":3,"file":"EmailVerificationTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/KYCElements/EmailVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAiB,MAAM,uBAAuB,CAAC;AAMzE,UAAU,8BAA8B;IACpC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,aAAa,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AASD,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CA0O9E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect } from 'react';
|
|
2
|
-
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert, Pressable } from 'react-native';
|
|
2
|
+
import { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert, Pressable, Platform } from 'react-native';
|
|
3
3
|
import { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';
|
|
4
4
|
import { useI18n } from '../../hooks/useI18n';
|
|
5
5
|
import { Button } from '../ui/Button';
|
|
@@ -18,6 +18,8 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
18
18
|
const [otp, setOtp] = useState('');
|
|
19
19
|
const [localError, setLocalError] = useState(null);
|
|
20
20
|
const [isSimulating, setIsSimulating] = useState(false);
|
|
21
|
+
// Track actual focus state for visual feedback
|
|
22
|
+
const [isInputFocused, setIsInputFocused] = useState(false);
|
|
21
23
|
const inputRef = useRef(null);
|
|
22
24
|
const title = getLocalizedText(component.labels);
|
|
23
25
|
const instructions = getLocalizedText(component.instructions);
|
|
@@ -25,12 +27,23 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
25
27
|
const verifyButtonText = getLocalizedText(component.ui.buttonText) || t('common.verify') || 'Verify';
|
|
26
28
|
const sendButtonText = t('common.sendCode') || 'Send Verification Code';
|
|
27
29
|
const buttonText = step === 'email' ? sendButtonText : verifyButtonText;
|
|
28
|
-
// --- AUTO SUBMIT LOGIC ---
|
|
29
30
|
useEffect(() => {
|
|
30
31
|
if (otp.length === CODE_LENGTH && step === 'otp' && !isSimulating) {
|
|
31
32
|
handleVerifyCode();
|
|
32
33
|
}
|
|
33
34
|
}, [otp]);
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
let focusTimer;
|
|
37
|
+
if (step === 'otp' && !isSimulating) {
|
|
38
|
+
focusTimer = setTimeout(() => {
|
|
39
|
+
inputRef.current?.focus();
|
|
40
|
+
}, 300);
|
|
41
|
+
}
|
|
42
|
+
return () => {
|
|
43
|
+
if (focusTimer)
|
|
44
|
+
clearTimeout(focusTimer);
|
|
45
|
+
};
|
|
46
|
+
}, [step, isSimulating]);
|
|
34
47
|
const handleSendCode = async () => {
|
|
35
48
|
const trimmed = email.trim();
|
|
36
49
|
if (!trimmed || !isValidEmail(trimmed)) {
|
|
@@ -42,8 +55,6 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
42
55
|
try {
|
|
43
56
|
await kycService.sendEmailVerificationCode(trimmed, auth);
|
|
44
57
|
setStep('otp');
|
|
45
|
-
// Auto-focus the OTP input shortly after switching steps
|
|
46
|
-
setTimeout(() => inputRef.current?.focus(), 100);
|
|
47
58
|
}
|
|
48
59
|
catch (err) {
|
|
49
60
|
const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send verification code');
|
|
@@ -98,48 +109,53 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
98
109
|
return (<Pressable style={styles.otpBoxesContainer} onPress={() => inputRef.current?.focus()}>
|
|
99
110
|
{boxes.map((_, index) => {
|
|
100
111
|
const digit = otp[index] || '';
|
|
101
|
-
const isCurrent = index === otp.length;
|
|
102
112
|
const isFilled = index < otp.length;
|
|
113
|
+
const isActiveIndex = index === otp.length || (index === CODE_LENGTH - 1 && otp.length === CODE_LENGTH);
|
|
114
|
+
const isCurrent = isInputFocused && isActiveIndex;
|
|
103
115
|
return (<View key={index} style={[
|
|
104
116
|
styles.otpBox,
|
|
105
|
-
|
|
106
|
-
|
|
117
|
+
isFilled && styles.otpBoxFilled,
|
|
118
|
+
isCurrent && styles.otpBoxActive
|
|
107
119
|
]}>
|
|
108
120
|
<Text style={styles.otpBoxText}>{digit}</Text>
|
|
109
121
|
</View>);
|
|
110
122
|
})}
|
|
111
123
|
</Pressable>);
|
|
112
124
|
};
|
|
113
|
-
return (<View style={styles.
|
|
114
|
-
<
|
|
115
|
-
|
|
116
|
-
{
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<View style={styles.contentContainer}>
|
|
120
|
-
{step === 'email' ? (<View style={styles.inputContainer}>
|
|
121
|
-
<Text style={styles.label}>{t('common.email') || 'Email'}</Text>
|
|
122
|
-
<TextInput style={styles.input} placeholder="name@example.com" value={email} onChangeText={onChangeEmail} keyboardType="email-address" autoCapitalize="none" autoCorrect={false} editable={!isSimulating}/>
|
|
123
|
-
</View>) : (<View style={styles.inputContainer}>
|
|
124
|
-
<Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>
|
|
125
|
-
|
|
126
|
-
<View style={styles.otpWrapper}>
|
|
127
|
-
{renderOtpBoxes()}
|
|
128
|
-
{/* Hidden TextInput overlaid to handle native keyboard & pasting seamlessly */}
|
|
129
|
-
<TextInput ref={inputRef} style={styles.hiddenInput} value={otp} onChangeText={onChangeOtp} keyboardType="number-pad" maxLength={CODE_LENGTH} editable={!isSimulating} textContentType="oneTimeCode" caretHidden={true}/>
|
|
130
|
-
</View>
|
|
125
|
+
return (<View style={styles.wrapper}>
|
|
126
|
+
<View style={styles.container}>
|
|
127
|
+
<Text style={styles.title}>{title}</Text>
|
|
128
|
+
<Text style={styles.instructions}>
|
|
129
|
+
{step === 'email' ? instructions : (t('kyc.enterCodeSent') || `Please enter the code sent to ${email}`)}
|
|
130
|
+
</Text>
|
|
131
131
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
132
|
+
<View style={styles.contentContainer}>
|
|
133
|
+
{step === 'email' ? (<View style={styles.inputContainer}>
|
|
134
|
+
<Text style={styles.label}>{t('common.email') || 'Email'}</Text>
|
|
135
|
+
<TextInput style={[
|
|
136
|
+
styles.input,
|
|
137
|
+
Platform.OS === 'web' && { outlineStyle: 'none' }
|
|
138
|
+
]} placeholder="name@example.com" placeholderTextColor="#9CA3AF" value={email} onChangeText={onChangeEmail} keyboardType="email-address" autoCapitalize="none" autoCorrect={false} editable={!isSimulating}/>
|
|
139
|
+
</View>) : (<View style={styles.inputContainer}>
|
|
140
|
+
<Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>
|
|
141
|
+
<View style={styles.otpWrapper}>
|
|
142
|
+
{renderOtpBoxes()}
|
|
143
|
+
<TextInput ref={inputRef} style={[
|
|
144
|
+
styles.hiddenInput,
|
|
145
|
+
Platform.OS === 'web' && { outlineStyle: 'none' }
|
|
146
|
+
]} value={otp} onChangeText={onChangeOtp} keyboardType="number-pad" maxLength={CODE_LENGTH} editable={!isSimulating} textContentType="oneTimeCode" caretHidden={true} onFocus={() => setIsInputFocused(true)} onBlur={() => setIsInputFocused(false)}/>
|
|
147
|
+
</View>
|
|
148
|
+
<TouchableOpacity onPress={handleBackToEmail} style={styles.changeEmailLink} disabled={isSimulating}>
|
|
149
|
+
<Text style={styles.changeEmailText}>{t('common.changeEmail') || 'Change email'}</Text>
|
|
150
|
+
</TouchableOpacity>
|
|
151
|
+
</View>)}
|
|
136
152
|
|
|
137
|
-
|
|
153
|
+
{(localError || propError) && (<Text style={styles.errorText}>{localError || propError}</Text>)}
|
|
138
154
|
|
|
139
|
-
|
|
155
|
+
<Button title={isSimulating ? (t('common.processing') || 'Processing...') : buttonText} onPress={step === 'email' ? handleSendCode : handleVerifyCode} style={styles.button} disabled={isSimulating ||
|
|
140
156
|
(step === 'email' ? !email : otp.length < CODE_LENGTH)}/>
|
|
141
157
|
|
|
142
|
-
|
|
158
|
+
{step === 'otp' && (<TouchableOpacity onPress={async () => {
|
|
143
159
|
if (isSimulating)
|
|
144
160
|
return;
|
|
145
161
|
setLocalError(null);
|
|
@@ -147,6 +163,7 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
147
163
|
try {
|
|
148
164
|
await kycService.sendEmailVerificationCode(email.trim(), auth);
|
|
149
165
|
Alert.alert(t('common.codeResent') || 'Code Resent', t('common.codeResentMessage', { email }) || 'Code resent to ' + email);
|
|
166
|
+
inputRef.current?.focus();
|
|
150
167
|
}
|
|
151
168
|
catch (err) {
|
|
152
169
|
const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send code');
|
|
@@ -156,12 +173,19 @@ export const EmailVerificationTemplate = ({ component, value, onValueChange, err
|
|
|
156
173
|
setIsSimulating(false);
|
|
157
174
|
}
|
|
158
175
|
}} style={styles.resendButton} disabled={isSimulating}>
|
|
159
|
-
|
|
160
|
-
|
|
176
|
+
<Text style={styles.resendText}>{t('common.resendCode') || 'Resend Code'}</Text>
|
|
177
|
+
</TouchableOpacity>)}
|
|
178
|
+
</View>
|
|
161
179
|
</View>
|
|
162
180
|
</View>);
|
|
163
181
|
};
|
|
164
182
|
const styles = StyleSheet.create({
|
|
183
|
+
wrapper: {
|
|
184
|
+
flex: 1,
|
|
185
|
+
width: '100%',
|
|
186
|
+
alignItems: 'center',
|
|
187
|
+
justifyContent: 'center',
|
|
188
|
+
},
|
|
165
189
|
container: {
|
|
166
190
|
padding: 24,
|
|
167
191
|
backgroundColor: 'white',
|
|
@@ -173,6 +197,7 @@ const styles = StyleSheet.create({
|
|
|
173
197
|
shadowRadius: 12,
|
|
174
198
|
elevation: 5,
|
|
175
199
|
width: '95%',
|
|
200
|
+
...(Platform.OS === 'web' ? { maxWidth: 450, paddingVertical: 40 } : {}),
|
|
176
201
|
},
|
|
177
202
|
title: {
|
|
178
203
|
fontSize: 24,
|
|
@@ -188,7 +213,9 @@ const styles = StyleSheet.create({
|
|
|
188
213
|
lineHeight: 24,
|
|
189
214
|
textAlign: 'center',
|
|
190
215
|
},
|
|
191
|
-
contentContainer: {
|
|
216
|
+
contentContainer: {
|
|
217
|
+
width: '100%',
|
|
218
|
+
},
|
|
192
219
|
inputContainer: {
|
|
193
220
|
marginBottom: 24,
|
|
194
221
|
},
|
|
@@ -202,7 +229,7 @@ const styles = StyleSheet.create({
|
|
|
202
229
|
input: {
|
|
203
230
|
borderWidth: 1,
|
|
204
231
|
borderColor: '#e0e0e0',
|
|
205
|
-
padding: 16,
|
|
232
|
+
padding: Platform.OS === 'web' ? 14 : 16,
|
|
206
233
|
borderRadius: 12,
|
|
207
234
|
fontSize: 16,
|
|
208
235
|
backgroundColor: '#f8f9fa',
|
|
@@ -219,10 +246,12 @@ const styles = StyleSheet.create({
|
|
|
219
246
|
alignItems: 'center',
|
|
220
247
|
width: '100%',
|
|
221
248
|
height: '100%',
|
|
249
|
+
...(Platform.OS === 'web' ? { cursor: 'text' } : {}),
|
|
222
250
|
},
|
|
223
251
|
otpBox: {
|
|
224
252
|
width: '14%',
|
|
225
|
-
aspectRatio: 1,
|
|
253
|
+
aspectRatio: Platform.OS === 'web' ? undefined : 1,
|
|
254
|
+
height: Platform.OS === 'web' ? 56 : undefined,
|
|
226
255
|
borderWidth: 1,
|
|
227
256
|
borderColor: '#e0e0e0',
|
|
228
257
|
borderRadius: 12,
|
|
@@ -251,6 +280,7 @@ const styles = StyleSheet.create({
|
|
|
251
280
|
width: '100%',
|
|
252
281
|
height: '100%',
|
|
253
282
|
opacity: 0,
|
|
283
|
+
...(Platform.OS === 'web' ? { cursor: 'text' } : {}),
|
|
254
284
|
},
|
|
255
285
|
errorText: {
|
|
256
286
|
color: '#dc2626',
|
|
@@ -270,6 +300,7 @@ const styles = StyleSheet.create({
|
|
|
270
300
|
changeEmailLink: {
|
|
271
301
|
alignSelf: 'flex-end',
|
|
272
302
|
marginTop: 12,
|
|
303
|
+
...(Platform.OS === 'web' ? { cursor: 'pointer' } : {}),
|
|
273
304
|
},
|
|
274
305
|
changeEmailText: {
|
|
275
306
|
color: '#2DBD60',
|
|
@@ -280,6 +311,7 @@ const styles = StyleSheet.create({
|
|
|
280
311
|
marginTop: 16,
|
|
281
312
|
alignItems: 'center',
|
|
282
313
|
width: "100%",
|
|
314
|
+
...(Platform.OS === 'web' ? { cursor: 'pointer' } : {}),
|
|
283
315
|
},
|
|
284
316
|
resendText: {
|
|
285
317
|
color: '#666',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmailVerificationTemplate.js","sourceRoot":"","sources":["../../../../src/components/KYCElements/EmailVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAErG,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,EAAE,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAWxE,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,mDAAmD;AACnD,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACjD,MAAM,YAAY,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,WAAW,CAAC,IAAI,CAA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AE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,KAAK,EAAE,SAAS;KACnB;IACD,WAAW,EAAE;QACT,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,CAAC;KACb;IACD,SAAS,EAAE;QACP,KAAK,EAAE,SAAS;QAChB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,CAAC;QACV,YAAY,EAAE,CAAC;QACf,QAAQ,EAAE,QAAQ;KACrB;IACD,MAAM,EAAE;QACJ,MAAM,EAAE,EAAE;QACV,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,MAAM;KAChB;IACD,eAAe,EAAE;QACb,SAAS,EAAE,UAAU;QACrB,SAAS,EAAE,EAAE;KAChB;IACD,eAAe,EAAE;QACb,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KACpB;IACD,YAAY,EAAE;QACV,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,KAAK,EAAE,MAAM;KAChB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,WAAW;KAClC;CACJ,CAAC,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert, Pressable } from 'react-native';\nimport { TemplateComponent, LocalizedText } from '../../types/KYC.types';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\nimport { Button } from '../ui/Button';\nimport kycService, { errorMessage } from '../../modules/api/KYCService';\n\ninterface EmailVerificationTemplateProps {\n component: TemplateComponent;\n value?: any;\n onValueChange: (data: any) => void;\n error?: string;\n language?: string;\n}\n\ntype VerificationStep = 'email' | 'otp';\nconst CODE_LENGTH = 6;\n\n/** RFC-style email validation: local@domain.tld */\nconst EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst isValidEmail = (value: string): boolean => EMAIL_REGEX.test((value || '').trim());\n\nexport const EmailVerificationTemplate: React.FC<EmailVerificationTemplateProps> = ({\n component,\n value,\n onValueChange,\n error: propError,\n}) => {\n const { actions, getLocalizedText, state, apiKey } = useTemplateKYCFlowContext();\n const { t } = useI18n();\n\n const auth = apiKey ? { apiKey } : (state.session.token ? { token: state.session.token } : undefined);\n\n // State\n const [step, setStep] = useState<VerificationStep>('email');\n const [email, setEmail] = useState('');\n const [otp, setOtp] = useState('');\n const [localError, setLocalError] = useState<string | null>(null);\n const [isSimulating, setIsSimulating] = useState(false);\n\n const inputRef = useRef<TextInput>(null);\n\n const title = getLocalizedText(component.labels as LocalizedText);\n const instructions = getLocalizedText(component.instructions as LocalizedText);\n\n // Determine button text based on step\n const verifyButtonText = getLocalizedText((component.ui as any).buttonText) || t('common.verify') || 'Verify';\n const sendButtonText = t('common.sendCode') || 'Send Verification Code';\n const buttonText = step === 'email' ? sendButtonText : verifyButtonText;\n\n // --- AUTO SUBMIT LOGIC ---\n useEffect(() => {\n if (otp.length === CODE_LENGTH && step === 'otp' && !isSimulating) {\n handleVerifyCode();\n }\n }, [otp]);\n\n const handleSendCode = async () => {\n const trimmed = email.trim();\n if (!trimmed || !isValidEmail(trimmed)) {\n setLocalError(t('errors.invalidEmail') || 'Please enter a valid email address');\n return;\n }\n\n setLocalError(null);\n setIsSimulating(true);\n\n try {\n await kycService.sendEmailVerificationCode(trimmed, auth);\n setStep('otp');\n // Auto-focus the OTP input shortly after switching steps\n setTimeout(() => inputRef.current?.focus(), 100);\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send verification code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n } finally {\n setIsSimulating(false);\n }\n };\n\n const handleVerifyCode = async () => {\n if (!otp || otp.length < CODE_LENGTH) {\n setLocalError(t('errors.invalidCode') || 'Please enter the 6-digit code');\n return;\n }\n\n setLocalError(null);\n setIsSimulating(true);\n\n try {\n await kycService.verifyEmailCode(otp.trim(), auth);\n const data = { email, otp, verified: true };\n onValueChange(data);\n actions.nextComponent(data);\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.wrongCode') || 'Invalid verification code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n setOtp(''); // Clear the boxes on error so they can type again\n inputRef.current?.focus();\n } finally {\n setIsSimulating(false);\n }\n };\n\n const onChangeEmail = (text: string) => {\n setEmail(text);\n if (localError) setLocalError(null);\n };\n\n const onChangeOtp = (text: string) => {\n // Only allow numbers\n const cleaned = text.replace(/[^0-9]/g, '');\n setOtp(cleaned);\n if (localError) setLocalError(null);\n };\n\n const handleBackToEmail = () => {\n setStep('email');\n setOtp('');\n setLocalError(null);\n };\n\n const renderOtpBoxes = () => {\n const boxes = new Array(CODE_LENGTH).fill(0);\n return (\n <Pressable style={styles.otpBoxesContainer} onPress={() => inputRef.current?.focus()}>\n {boxes.map((_, index) => {\n const digit = otp[index] || '';\n const isCurrent = index === otp.length;\n const isFilled = index < otp.length;\n\n return (\n <View \n key={index} \n style={[\n styles.otpBox, \n isCurrent && styles.otpBoxActive,\n isFilled && styles.otpBoxFilled\n ]}\n >\n <Text style={styles.otpBoxText}>{digit}</Text>\n </View>\n );\n })}\n </Pressable>\n );\n };\n\n return (\n <View style={styles.container}>\n <Text style={styles.title}>{title}</Text>\n <Text style={styles.instructions}>\n {step === 'email' ? instructions : (t('kyc.enterCodeSent') || `Please enter the code sent to ${email}`)}\n </Text>\n\n <View style={styles.contentContainer}>\n {step === 'email' ? (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.email') || 'Email'}</Text>\n <TextInput\n style={styles.input}\n placeholder=\"name@example.com\"\n value={email}\n onChangeText={onChangeEmail}\n keyboardType=\"email-address\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n editable={!isSimulating}\n />\n </View>\n ) : (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>\n \n <View style={styles.otpWrapper}>\n {renderOtpBoxes()}\n {/* Hidden TextInput overlaid to handle native keyboard & pasting seamlessly */}\n <TextInput\n ref={inputRef}\n style={styles.hiddenInput}\n value={otp}\n onChangeText={onChangeOtp}\n keyboardType=\"number-pad\"\n maxLength={CODE_LENGTH}\n editable={!isSimulating}\n textContentType=\"oneTimeCode\"\n caretHidden={true}\n />\n </View>\n\n <TouchableOpacity onPress={handleBackToEmail} style={styles.changeEmailLink} disabled={isSimulating}>\n <Text style={styles.changeEmailText}>{t('common.changeEmail') || 'Change email'}</Text>\n </TouchableOpacity>\n </View>\n )}\n\n {(localError || propError) && (\n <Text style={styles.errorText}>{localError || propError}</Text>\n )}\n\n <Button\n title={isSimulating ? (t('common.processing') || 'Processing...') : buttonText}\n onPress={step === 'email' ? handleSendCode : handleVerifyCode}\n style={styles.button}\n disabled={\n isSimulating ||\n (step === 'email' ? !email : otp.length < CODE_LENGTH)\n }\n />\n\n {step === 'otp' && (\n <TouchableOpacity\n onPress={async () => {\n if (isSimulating) return;\n setLocalError(null);\n setIsSimulating(true);\n try {\n await kycService.sendEmailVerificationCode(email.trim(), auth);\n Alert.alert(\n t('common.codeResent') || 'Code Resent',\n t('common.codeResentMessage', { email }) || 'Code resent to ' + email\n );\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n } finally {\n setIsSimulating(false);\n }\n }}\n style={styles.resendButton}\n disabled={isSimulating}\n >\n <Text style={styles.resendText}>{t('common.resendCode') || 'Resend Code'}</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 24,\n backgroundColor: 'white',\n borderRadius: 16,\n margin: 16,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.1,\n shadowRadius: 12,\n elevation: 5,\n width: '95%',\n },\n title: {\n fontSize: 24,\n fontWeight: '700',\n marginBottom: 8,\n color: '#1a1a1a',\n textAlign: 'center',\n },\n instructions: {\n fontSize: 16,\n color: '#666',\n marginBottom: 32,\n lineHeight: 24,\n textAlign: 'center',\n },\n contentContainer: {},\n inputContainer: {\n marginBottom: 24,\n },\n label: {\n fontSize: 14,\n fontWeight: '600',\n color: '#333',\n marginBottom: 8,\n marginLeft: 4,\n },\n input: {\n borderWidth: 1,\n borderColor: '#e0e0e0',\n padding: 16,\n borderRadius: 12,\n fontSize: 16,\n backgroundColor: '#f8f9fa',\n color: '#333',\n },\n otpWrapper: {\n position: 'relative',\n width: '100%',\n height: 60,\n },\n otpBoxesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n },\n otpBox: {\n width: '14%',\n aspectRatio: 1,\n borderWidth: 1,\n borderColor: '#e0e0e0',\n borderRadius: 12,\n backgroundColor: '#f8f9fa',\n justifyContent: 'center',\n alignItems: 'center',\n },\n otpBoxFilled: {\n borderColor: '#9ca3af',\n backgroundColor: '#ffffff',\n },\n otpBoxActive: {\n borderColor: '#2DBD60',\n borderWidth: 2,\n backgroundColor: '#ffffff',\n },\n otpBoxText: {\n fontSize: 24,\n fontWeight: '700',\n color: '#1a1a1a',\n },\n hiddenInput: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n opacity: 0,\n },\n errorText: {\n color: '#dc2626',\n marginBottom: 16,\n fontSize: 14,\n textAlign: 'center',\n backgroundColor: '#fee2e2',\n padding: 8,\n borderRadius: 8,\n overflow: 'hidden',\n },\n button: {\n height: 50,\n borderRadius: 12,\n width: \"100%\",\n },\n changeEmailLink: {\n alignSelf: 'flex-end',\n marginTop: 12,\n },\n changeEmailText: {\n color: '#2DBD60',\n fontSize: 14,\n fontWeight: '500',\n },\n resendButton: {\n marginTop: 16,\n alignItems: 'center',\n width: \"100%\",\n },\n resendText: {\n color: '#666',\n fontSize: 14,\n textDecorationLine: 'underline',\n },\n});"]}
|
|
1
|
+
{"version":3,"file":"EmailVerificationTemplate.js","sourceRoot":"","sources":["../../../../src/components/KYCElements/EmailVerificationTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE/G,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,EAAE,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAWxE,MAAM,WAAW,GAAG,CAAC,CAAC;AAEtB,mDAAmD;AACnD,MAAM,WAAW,GAAG,4BAA4B,CAAC;AACjD,MAAM,YAAY,GAAG,CAAC,KAAa,EAAW,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC;AAExF,MAAM,CAAC,MAAM,yBAAyB,GAA6C,CAAC,EAChF,SAAS,EACT,KAAK,EACL,aAAa,EACb,KAAK,EAAE,SAAS,GACnB,EAAE,EAAE;IACD,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,yBAAyB,EAAE,CAAC;IACjF,MAAM,EAAE,CAAC,EAAE,GAAG,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AAM,EAAE,SAAS,EAAS,CAAC,CAAC,CAAC,EAAE,CAAC;KACjE;IACD,UAAU,EAAE;QACR,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,EAAE;QACZ,kBAAkB,EAAE,WAAW;KAClC;CACJ,CAAC,CAAC","sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport { View, Text, StyleSheet, TextInput, TouchableOpacity, Alert, Pressable, Platform } from 'react-native';\nimport { TemplateComponent, LocalizedText } from '../../types/KYC.types';\nimport { useTemplateKYCFlowContext } from '../../hooks/useTemplateKYCFlow';\nimport { useI18n } from '../../hooks/useI18n';\nimport { Button } from '../ui/Button';\nimport kycService, { errorMessage } from '../../modules/api/KYCService';\n\ninterface EmailVerificationTemplateProps {\n component: TemplateComponent;\n value?: any;\n onValueChange: (data: any) => void;\n error?: string;\n language?: string;\n}\n\ntype VerificationStep = 'email' | 'otp';\nconst CODE_LENGTH = 6;\n\n/** RFC-style email validation: local@domain.tld */\nconst EMAIL_REGEX = /^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/;\nconst isValidEmail = (value: string): boolean => EMAIL_REGEX.test((value || '').trim());\n\nexport const EmailVerificationTemplate: React.FC<EmailVerificationTemplateProps> = ({\n component,\n value,\n onValueChange,\n error: propError,\n}) => {\n const { actions, getLocalizedText, state, apiKey } = useTemplateKYCFlowContext();\n const { t } = useI18n();\n\n const auth = apiKey ? { apiKey } : (state.session.token ? { token: state.session.token } : undefined);\n\n // State\n const [step, setStep] = useState<VerificationStep>('email');\n const [email, setEmail] = useState('');\n const [otp, setOtp] = useState('');\n const [localError, setLocalError] = useState<string | null>(null);\n const [isSimulating, setIsSimulating] = useState(false);\n \n // Track actual focus state for visual feedback\n const [isInputFocused, setIsInputFocused] = useState(false);\n const inputRef = useRef<TextInput>(null);\n\n const title = getLocalizedText(component.labels as LocalizedText);\n const instructions = getLocalizedText(component.instructions as LocalizedText);\n\n // Determine button text based on step\n const verifyButtonText = getLocalizedText((component.ui as any).buttonText) || t('common.verify') || 'Verify';\n const sendButtonText = t('common.sendCode') || 'Send Verification Code';\n const buttonText = step === 'email' ? sendButtonText : verifyButtonText;\n\n useEffect(() => {\n if (otp.length === CODE_LENGTH && step === 'otp' && !isSimulating) {\n handleVerifyCode();\n }\n }, [otp]);\n\n useEffect(() => {\n let focusTimer: ReturnType<typeof setTimeout>;\n if (step === 'otp' && !isSimulating) {\n focusTimer = setTimeout(() => {\n inputRef.current?.focus();\n }, 300);\n }\n return () => {\n if (focusTimer) clearTimeout(focusTimer);\n };\n }, [step, isSimulating]);\n\n const handleSendCode = async () => {\n const trimmed = email.trim();\n if (!trimmed || !isValidEmail(trimmed)) {\n setLocalError(t('errors.invalidEmail') || 'Please enter a valid email address');\n return;\n }\n setLocalError(null);\n setIsSimulating(true);\n\n try {\n await kycService.sendEmailVerificationCode(trimmed, auth);\n setStep('otp');\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send verification code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n } finally {\n setIsSimulating(false);\n }\n };\n\n const handleVerifyCode = async () => {\n if (!otp || otp.length < CODE_LENGTH) {\n setLocalError(t('errors.invalidCode') || 'Please enter the 6-digit code');\n return;\n }\n setLocalError(null);\n setIsSimulating(true);\n\n try {\n await kycService.verifyEmailCode(otp.trim(), auth);\n const data = { email, otp, verified: true };\n onValueChange(data);\n actions.nextComponent(data);\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.wrongCode') || 'Invalid verification code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n setOtp(''); // Clear the boxes on error so they can type again\n inputRef.current?.focus();\n } finally {\n setIsSimulating(false);\n }\n };\n\n const onChangeEmail = (text: string) => {\n setEmail(text);\n if (localError) setLocalError(null);\n };\n\n const onChangeOtp = (text: string) => {\n // Only allow numbers\n const cleaned = text.replace(/[^0-9]/g, '');\n setOtp(cleaned);\n if (localError) setLocalError(null);\n };\n\n const handleBackToEmail = () => {\n setStep('email');\n setOtp('');\n setLocalError(null);\n };\n\n const renderOtpBoxes = () => {\n const boxes = new Array(CODE_LENGTH).fill(0);\n return (\n <Pressable style={styles.otpBoxesContainer} onPress={() => inputRef.current?.focus()}>\n {boxes.map((_, index) => {\n const digit = otp[index] || '';\n const isFilled = index < otp.length;\n const isActiveIndex = index === otp.length || (index === CODE_LENGTH - 1 && otp.length === CODE_LENGTH);\n const isCurrent = isInputFocused && isActiveIndex;\n return (\n <View\n key={index}\n style={[\n styles.otpBox,\n isFilled && styles.otpBoxFilled,\n isCurrent && styles.otpBoxActive\n ]}\n >\n <Text style={styles.otpBoxText}>{digit}</Text>\n </View>\n );\n })}\n </Pressable>\n );\n };\n\n return (\n <View style={styles.wrapper}>\n <View style={styles.container}>\n <Text style={styles.title}>{title}</Text>\n <Text style={styles.instructions}>\n {step === 'email' ? instructions : (t('kyc.enterCodeSent') || `Please enter the code sent to ${email}`)}\n </Text>\n\n <View style={styles.contentContainer}>\n {step === 'email' ? (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.email') || 'Email'}</Text>\n <TextInput\n style={[\n styles.input,\n Platform.OS === 'web' && { outlineStyle: 'none' } as any\n ]}\n placeholder=\"name@example.com\"\n placeholderTextColor=\"#9CA3AF\"\n value={email}\n onChangeText={onChangeEmail}\n keyboardType=\"email-address\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n editable={!isSimulating}\n />\n </View>\n ) : (\n <View style={styles.inputContainer}>\n <Text style={styles.label}>{t('common.verificationCode') || 'Verification Code'}</Text>\n <View style={styles.otpWrapper}>\n {renderOtpBoxes()}\n <TextInput\n ref={inputRef}\n style={[\n styles.hiddenInput,\n Platform.OS === 'web' && { outlineStyle: 'none' } as any\n ]}\n value={otp}\n onChangeText={onChangeOtp}\n keyboardType=\"number-pad\"\n maxLength={CODE_LENGTH}\n editable={!isSimulating}\n textContentType=\"oneTimeCode\"\n caretHidden={true}\n onFocus={() => setIsInputFocused(true)}\n onBlur={() => setIsInputFocused(false)}\n />\n </View>\n <TouchableOpacity onPress={handleBackToEmail} style={styles.changeEmailLink} disabled={isSimulating}>\n <Text style={styles.changeEmailText}>{t('common.changeEmail') || 'Change email'}</Text>\n </TouchableOpacity>\n </View>\n )}\n\n {(localError || propError) && (\n <Text style={styles.errorText}>{localError || propError}</Text>\n )}\n\n <Button\n title={isSimulating ? (t('common.processing') || 'Processing...') : buttonText}\n onPress={step === 'email' ? handleSendCode : handleVerifyCode}\n style={styles.button}\n disabled={\n isSimulating ||\n (step === 'email' ? !email : otp.length < CODE_LENGTH)\n }\n />\n\n {step === 'otp' && (\n <TouchableOpacity\n onPress={async () => {\n if (isSimulating) return;\n setLocalError(null);\n setIsSimulating(true);\n try {\n await kycService.sendEmailVerificationCode(email.trim(), auth);\n Alert.alert(\n t('common.codeResent') || 'Code Resent',\n t('common.codeResentMessage', { email }) || 'Code resent to ' + email\n );\n inputRef.current?.focus();\n } catch (err: any) {\n const msg = errorMessage(err) ?? err?.message ?? (t('errors.sendCodeFailed') || 'Failed to send code');\n setLocalError(typeof msg === 'string' ? msg : JSON.stringify(msg));\n } finally {\n setIsSimulating(false);\n }\n }}\n style={styles.resendButton}\n disabled={isSimulating}\n >\n <Text style={styles.resendText}>{t('common.resendCode') || 'Resend Code'}</Text>\n </TouchableOpacity>\n )}\n </View>\n </View>\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n wrapper: {\n flex: 1,\n width: '100%',\n alignItems: 'center',\n justifyContent: 'center',\n },\n container: {\n padding: 24,\n backgroundColor: 'white',\n borderRadius: 16,\n margin: 16,\n shadowColor: '#000',\n shadowOffset: { width: 0, height: 4 },\n shadowOpacity: 0.1,\n shadowRadius: 12,\n elevation: 5,\n width: '95%',\n ...(Platform.OS === 'web' ? { maxWidth: 450, paddingVertical: 40 } : {}),\n },\n title: {\n fontSize: 24,\n fontWeight: '700',\n marginBottom: 8,\n color: '#1a1a1a',\n textAlign: 'center',\n },\n instructions: {\n fontSize: 16,\n color: '#666',\n marginBottom: 32,\n lineHeight: 24,\n textAlign: 'center',\n },\n contentContainer: {\n width: '100%',\n },\n inputContainer: {\n marginBottom: 24,\n },\n label: {\n fontSize: 14,\n fontWeight: '600',\n color: '#333',\n marginBottom: 8,\n marginLeft: 4,\n },\n input: {\n borderWidth: 1,\n borderColor: '#e0e0e0',\n padding: Platform.OS === 'web' ? 14 : 16,\n borderRadius: 12,\n fontSize: 16,\n backgroundColor: '#f8f9fa',\n color: '#333',\n },\n otpWrapper: {\n position: 'relative',\n width: '100%',\n height: 60,\n },\n otpBoxesContainer: {\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'center',\n width: '100%',\n height: '100%',\n ...(Platform.OS === 'web' ? { cursor: 'text' } as any : {}),\n },\n otpBox: {\n width: '14%',\n aspectRatio: Platform.OS === 'web' ? undefined : 1, \n height: Platform.OS === 'web' ? 56 : undefined, \n borderWidth: 1,\n borderColor: '#e0e0e0',\n borderRadius: 12,\n backgroundColor: '#f8f9fa',\n justifyContent: 'center',\n alignItems: 'center',\n },\n otpBoxFilled: {\n borderColor: '#9ca3af',\n backgroundColor: '#ffffff',\n },\n otpBoxActive: {\n borderColor: '#2DBD60',\n borderWidth: 2,\n backgroundColor: '#ffffff',\n },\n otpBoxText: {\n fontSize: 24,\n fontWeight: '700',\n color: '#1a1a1a',\n },\n hiddenInput: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n opacity: 0,\n ...(Platform.OS === 'web' ? { cursor: 'text' } as any : {}),\n },\n errorText: {\n color: '#dc2626',\n marginBottom: 16,\n fontSize: 14,\n textAlign: 'center',\n backgroundColor: '#fee2e2',\n padding: 8,\n borderRadius: 8,\n overflow: 'hidden',\n },\n button: {\n height: 50,\n borderRadius: 12,\n width: \"100%\",\n },\n changeEmailLink: {\n alignSelf: 'flex-end',\n marginTop: 12,\n ...(Platform.OS === 'web' ? { cursor: 'pointer' } as any : {}),\n },\n changeEmailText: {\n color: '#2DBD60',\n fontSize: 14,\n fontWeight: '500',\n },\n resendButton: {\n marginTop: 16,\n alignItems: 'center',\n width: \"100%\",\n ...(Platform.OS === 'web' ? { cursor: 'pointer' } as any : {}),\n },\n resendText: {\n color: '#666',\n fontSize: 14,\n textDecorationLine: 'underline',\n },\n});"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDCardCapture.d.ts","sourceRoot":"","sources":["../../../../src/components/KYCElements/IDCardCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,iBAAiB,EAAoI,MAAM,uBAAuB,CAAC;AAc5L,UAAU,cAAc;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAC;CAAE;AAC3F,UAAU,kBAAkB;IAAG,SAAS,EAAE,iBAAiB,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IAAC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAAC,KAAK,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;CAAE;AAExO,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"IDCardCapture.d.ts","sourceRoot":"","sources":["../../../../src/components/KYCElements/IDCardCapture.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,iBAAiB,EAAoI,MAAM,uBAAuB,CAAC;AAc5L,UAAU,cAAc;IAAG,GAAG,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,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