@velion-la/onboarding-sdk-react-native 1.0.0-beta.10

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.
Files changed (614) hide show
  1. package/CHANGELOG.md +66 -0
  2. package/LICENSE +12 -0
  3. package/README.md +888 -0
  4. package/app.plugin.js +101 -0
  5. package/lib/commonjs/camera/AddressSearchBar.js +304 -0
  6. package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
  7. package/lib/commonjs/camera/DocumentCapture.js +513 -0
  8. package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
  9. package/lib/commonjs/camera/LivenessCamera.js +628 -0
  10. package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
  11. package/lib/commonjs/camera/MapAddressPicker.js +331 -0
  12. package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
  13. package/lib/commonjs/core/VelionOnboarding.js +1113 -0
  14. package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
  15. package/lib/commonjs/core/retryStepCopy.js +43 -0
  16. package/lib/commonjs/core/retryStepCopy.js.map +1 -0
  17. package/lib/commonjs/core/routingCommands.js +62 -0
  18. package/lib/commonjs/core/routingCommands.js.map +1 -0
  19. package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
  20. package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
  21. package/lib/commonjs/core/sessionStateMapper.js +200 -0
  22. package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
  23. package/lib/commonjs/core/sseReasonMessages.js +450 -0
  24. package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
  25. package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
  26. package/lib/commonjs/data/iso3166CountryNames.json +251 -0
  27. package/lib/commonjs/i18n/index.js +30 -0
  28. package/lib/commonjs/i18n/index.js.map +1 -0
  29. package/lib/commonjs/i18n/strings/en.js +301 -0
  30. package/lib/commonjs/i18n/strings/en.js.map +1 -0
  31. package/lib/commonjs/i18n/strings/es.js +306 -0
  32. package/lib/commonjs/i18n/strings/es.js.map +1 -0
  33. package/lib/commonjs/index.js +225 -0
  34. package/lib/commonjs/index.js.map +1 -0
  35. package/lib/commonjs/package.json +1 -0
  36. package/lib/commonjs/steps/AddressInfoStep.js +662 -0
  37. package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
  38. package/lib/commonjs/steps/DocumentsOcrStep.js +405 -0
  39. package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
  40. package/lib/commonjs/steps/EconomicActivityStep.js +214 -0
  41. package/lib/commonjs/steps/EconomicActivityStep.js.map +1 -0
  42. package/lib/commonjs/steps/EmailContactStep.js +150 -0
  43. package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
  44. package/lib/commonjs/steps/EmailOtpStep.js +225 -0
  45. package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
  46. package/lib/commonjs/steps/FaceMatchStep.js +169 -0
  47. package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
  48. package/lib/commonjs/steps/FingerprintStep.js +92 -0
  49. package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
  50. package/lib/commonjs/steps/HumanBasicInfoStep.js +251 -0
  51. package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
  52. package/lib/commonjs/steps/HumanExtendedInfoStep.js +275 -0
  53. package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
  54. package/lib/commonjs/steps/LegalBasicInfoStep.js +195 -0
  55. package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
  56. package/lib/commonjs/steps/LegalExtendedInfoStep.js +173 -0
  57. package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
  58. package/lib/commonjs/steps/LivenessMatchStep.js +1184 -0
  59. package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
  60. package/lib/commonjs/steps/PhoneContactStep.js +151 -0
  61. package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
  62. package/lib/commonjs/steps/PhoneOtpStep.js +224 -0
  63. package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
  64. package/lib/commonjs/steps/SwornDeclarationStep.js +206 -0
  65. package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
  66. package/lib/commonjs/steps/TaxInfoStep.js +251 -0
  67. package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
  68. package/lib/commonjs/steps/TermsAndConditionsStep.js +245 -0
  69. package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
  70. package/lib/commonjs/steps/_shared.js +61 -0
  71. package/lib/commonjs/steps/_shared.js.map +1 -0
  72. package/lib/commonjs/steps/types.js +6 -0
  73. package/lib/commonjs/steps/types.js.map +1 -0
  74. package/lib/commonjs/transport/api.js +176 -0
  75. package/lib/commonjs/transport/api.js.map +1 -0
  76. package/lib/commonjs/transport/irisWebSocket.js +121 -0
  77. package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
  78. package/lib/commonjs/transport/secureUrl.js +50 -0
  79. package/lib/commonjs/transport/secureUrl.js.map +1 -0
  80. package/lib/commonjs/transport/sse.js +248 -0
  81. package/lib/commonjs/transport/sse.js.map +1 -0
  82. package/lib/commonjs/types/index.js +458 -0
  83. package/lib/commonjs/types/index.js.map +1 -0
  84. package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
  85. package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
  86. package/lib/commonjs/ui/StepShell.js +251 -0
  87. package/lib/commonjs/ui/StepShell.js.map +1 -0
  88. package/lib/commonjs/ui/VelionOnboardingScreen.js +276 -0
  89. package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
  90. package/lib/commonjs/ui/forms/index.js +38 -0
  91. package/lib/commonjs/ui/forms/index.js.map +1 -0
  92. package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
  93. package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
  94. package/lib/commonjs/ui/forms/validators.js +34 -0
  95. package/lib/commonjs/ui/forms/validators.js.map +1 -0
  96. package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
  97. package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
  98. package/lib/commonjs/ui/icons/StepIcon.js +59 -0
  99. package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
  100. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
  101. package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
  102. package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
  103. package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
  104. package/lib/commonjs/ui/overlays/ProgressBar.js +101 -0
  105. package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
  106. package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
  107. package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
  108. package/lib/commonjs/ui/overlays/index.js +33 -0
  109. package/lib/commonjs/ui/overlays/index.js.map +1 -0
  110. package/lib/commonjs/ui/primitives/BackButton.js +75 -0
  111. package/lib/commonjs/ui/primitives/BackButton.js.map +1 -0
  112. package/lib/commonjs/ui/primitives/Banner.js +81 -0
  113. package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
  114. package/lib/commonjs/ui/primitives/Button.js +142 -0
  115. package/lib/commonjs/ui/primitives/Button.js.map +1 -0
  116. package/lib/commonjs/ui/primitives/Card.js +50 -0
  117. package/lib/commonjs/ui/primitives/Card.js.map +1 -0
  118. package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
  119. package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
  120. package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
  121. package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
  122. package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
  123. package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
  124. package/lib/commonjs/ui/primitives/Input.js +101 -0
  125. package/lib/commonjs/ui/primitives/Input.js.map +1 -0
  126. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js +162 -0
  127. package/lib/commonjs/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  128. package/lib/commonjs/ui/primitives/Select.js +209 -0
  129. package/lib/commonjs/ui/primitives/Select.js.map +1 -0
  130. package/lib/commonjs/ui/primitives/Spinner.js +25 -0
  131. package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
  132. package/lib/commonjs/ui/primitives/index.js +89 -0
  133. package/lib/commonjs/ui/primitives/index.js.map +1 -0
  134. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js +31 -0
  135. package/lib/commonjs/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  136. package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
  137. package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
  138. package/lib/commonjs/ui/theme/index.js +68 -0
  139. package/lib/commonjs/ui/theme/index.js.map +1 -0
  140. package/lib/commonjs/ui/theme/tokens.js +154 -0
  141. package/lib/commonjs/ui/theme/tokens.js.map +1 -0
  142. package/lib/commonjs/utils/EventEmitter.js +144 -0
  143. package/lib/commonjs/utils/EventEmitter.js.map +1 -0
  144. package/lib/commonjs/utils/base64.js +53 -0
  145. package/lib/commonjs/utils/base64.js.map +1 -0
  146. package/lib/commonjs/utils/deviceFingerprint.js +132 -0
  147. package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
  148. package/lib/commonjs/utils/documentTypeOptions.js +35 -0
  149. package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
  150. package/lib/commonjs/utils/googleMapsPreflight.js +88 -0
  151. package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
  152. package/lib/commonjs/utils/hmac.js +58 -0
  153. package/lib/commonjs/utils/hmac.js.map +1 -0
  154. package/lib/commonjs/utils/iso3166Countries.js +98 -0
  155. package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
  156. package/lib/commonjs/utils/jpegFromUri.js +44 -0
  157. package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
  158. package/lib/commonjs/utils/keepAwake.js +58 -0
  159. package/lib/commonjs/utils/keepAwake.js.map +1 -0
  160. package/lib/commonjs/utils/log.js +42 -0
  161. package/lib/commonjs/utils/log.js.map +1 -0
  162. package/lib/commonjs/utils/osGeocoder.js +70 -0
  163. package/lib/commonjs/utils/osGeocoder.js.map +1 -0
  164. package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
  165. package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
  166. package/lib/commonjs/utils/personNameNormalize.js +24 -0
  167. package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
  168. package/lib/commonjs/utils/sdkError.js +34 -0
  169. package/lib/commonjs/utils/sdkError.js.map +1 -0
  170. package/lib/commonjs/utils/sdkVersion.js +13 -0
  171. package/lib/commonjs/utils/sdkVersion.js.map +1 -0
  172. package/lib/commonjs/utils/stepConfig.js +65 -0
  173. package/lib/commonjs/utils/stepConfig.js.map +1 -0
  174. package/lib/commonjs/utils/taxInfoConfig.js +19 -0
  175. package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
  176. package/lib/commonjs/utils/useSafeAreaInsets.js +41 -0
  177. package/lib/commonjs/utils/useSafeAreaInsets.js.map +1 -0
  178. package/lib/commonjs/utils/velionExtra.js +48 -0
  179. package/lib/commonjs/utils/velionExtra.js.map +1 -0
  180. package/lib/module/camera/AddressSearchBar.js +299 -0
  181. package/lib/module/camera/AddressSearchBar.js.map +1 -0
  182. package/lib/module/camera/DocumentCapture.js +508 -0
  183. package/lib/module/camera/DocumentCapture.js.map +1 -0
  184. package/lib/module/camera/LivenessCamera.js +623 -0
  185. package/lib/module/camera/LivenessCamera.js.map +1 -0
  186. package/lib/module/camera/MapAddressPicker.js +326 -0
  187. package/lib/module/camera/MapAddressPicker.js.map +1 -0
  188. package/lib/module/core/VelionOnboarding.js +1109 -0
  189. package/lib/module/core/VelionOnboarding.js.map +1 -0
  190. package/lib/module/core/retryStepCopy.js +39 -0
  191. package/lib/module/core/retryStepCopy.js.map +1 -0
  192. package/lib/module/core/routingCommands.js +57 -0
  193. package/lib/module/core/routingCommands.js.map +1 -0
  194. package/lib/module/core/sessionDeclinedCopy.js +52 -0
  195. package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
  196. package/lib/module/core/sessionStateMapper.js +189 -0
  197. package/lib/module/core/sessionStateMapper.js.map +1 -0
  198. package/lib/module/core/sseReasonMessages.js +446 -0
  199. package/lib/module/core/sseReasonMessages.js.map +1 -0
  200. package/lib/module/data/iso3166Alpha2Codes.json +1 -0
  201. package/lib/module/data/iso3166CountryNames.json +251 -0
  202. package/lib/module/i18n/index.js +25 -0
  203. package/lib/module/i18n/index.js.map +1 -0
  204. package/lib/module/i18n/strings/en.js +297 -0
  205. package/lib/module/i18n/strings/en.js.map +1 -0
  206. package/lib/module/i18n/strings/es.js +302 -0
  207. package/lib/module/i18n/strings/es.js.map +1 -0
  208. package/lib/module/index.js +36 -0
  209. package/lib/module/index.js.map +1 -0
  210. package/lib/module/steps/AddressInfoStep.js +658 -0
  211. package/lib/module/steps/AddressInfoStep.js.map +1 -0
  212. package/lib/module/steps/DocumentsOcrStep.js +399 -0
  213. package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
  214. package/lib/module/steps/EconomicActivityStep.js +209 -0
  215. package/lib/module/steps/EconomicActivityStep.js.map +1 -0
  216. package/lib/module/steps/EmailContactStep.js +145 -0
  217. package/lib/module/steps/EmailContactStep.js.map +1 -0
  218. package/lib/module/steps/EmailOtpStep.js +220 -0
  219. package/lib/module/steps/EmailOtpStep.js.map +1 -0
  220. package/lib/module/steps/FaceMatchStep.js +164 -0
  221. package/lib/module/steps/FaceMatchStep.js.map +1 -0
  222. package/lib/module/steps/FingerprintStep.js +87 -0
  223. package/lib/module/steps/FingerprintStep.js.map +1 -0
  224. package/lib/module/steps/HumanBasicInfoStep.js +246 -0
  225. package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
  226. package/lib/module/steps/HumanExtendedInfoStep.js +270 -0
  227. package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
  228. package/lib/module/steps/LegalBasicInfoStep.js +190 -0
  229. package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
  230. package/lib/module/steps/LegalExtendedInfoStep.js +168 -0
  231. package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
  232. package/lib/module/steps/LivenessMatchStep.js +1177 -0
  233. package/lib/module/steps/LivenessMatchStep.js.map +1 -0
  234. package/lib/module/steps/PhoneContactStep.js +146 -0
  235. package/lib/module/steps/PhoneContactStep.js.map +1 -0
  236. package/lib/module/steps/PhoneOtpStep.js +219 -0
  237. package/lib/module/steps/PhoneOtpStep.js.map +1 -0
  238. package/lib/module/steps/SwornDeclarationStep.js +203 -0
  239. package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
  240. package/lib/module/steps/TaxInfoStep.js +246 -0
  241. package/lib/module/steps/TaxInfoStep.js.map +1 -0
  242. package/lib/module/steps/TermsAndConditionsStep.js +240 -0
  243. package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
  244. package/lib/module/steps/_shared.js +52 -0
  245. package/lib/module/steps/_shared.js.map +1 -0
  246. package/lib/module/steps/types.js +4 -0
  247. package/lib/module/steps/types.js.map +1 -0
  248. package/lib/module/transport/api.js +173 -0
  249. package/lib/module/transport/api.js.map +1 -0
  250. package/lib/module/transport/irisWebSocket.js +115 -0
  251. package/lib/module/transport/irisWebSocket.js.map +1 -0
  252. package/lib/module/transport/secureUrl.js +45 -0
  253. package/lib/module/transport/secureUrl.js.map +1 -0
  254. package/lib/module/transport/sse.js +242 -0
  255. package/lib/module/transport/sse.js.map +1 -0
  256. package/lib/module/types/index.js +532 -0
  257. package/lib/module/types/index.js.map +1 -0
  258. package/lib/module/ui/MapFallbackBoundary.js +37 -0
  259. package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
  260. package/lib/module/ui/StepShell.js +246 -0
  261. package/lib/module/ui/StepShell.js.map +1 -0
  262. package/lib/module/ui/VelionOnboardingScreen.js +273 -0
  263. package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
  264. package/lib/module/ui/forms/index.js +5 -0
  265. package/lib/module/ui/forms/index.js.map +1 -0
  266. package/lib/module/ui/forms/useInlineValidation.js +84 -0
  267. package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
  268. package/lib/module/ui/forms/validators.js +27 -0
  269. package/lib/module/ui/forms/validators.js.map +1 -0
  270. package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
  271. package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
  272. package/lib/module/ui/icons/StepIcon.js +55 -0
  273. package/lib/module/ui/icons/StepIcon.js.map +1 -0
  274. package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
  275. package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
  276. package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
  277. package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
  278. package/lib/module/ui/overlays/ProgressBar.js +97 -0
  279. package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
  280. package/lib/module/ui/overlays/RetryDialog.js +121 -0
  281. package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
  282. package/lib/module/ui/overlays/index.js +6 -0
  283. package/lib/module/ui/overlays/index.js.map +1 -0
  284. package/lib/module/ui/primitives/BackButton.js +71 -0
  285. package/lib/module/ui/primitives/BackButton.js.map +1 -0
  286. package/lib/module/ui/primitives/Banner.js +77 -0
  287. package/lib/module/ui/primitives/Banner.js.map +1 -0
  288. package/lib/module/ui/primitives/Button.js +138 -0
  289. package/lib/module/ui/primitives/Button.js.map +1 -0
  290. package/lib/module/ui/primitives/Card.js +46 -0
  291. package/lib/module/ui/primitives/Card.js.map +1 -0
  292. package/lib/module/ui/primitives/Checkbox.js +136 -0
  293. package/lib/module/ui/primitives/Checkbox.js.map +1 -0
  294. package/lib/module/ui/primitives/CountrySelect.js +284 -0
  295. package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
  296. package/lib/module/ui/primitives/DatePicker.js +241 -0
  297. package/lib/module/ui/primitives/DatePicker.js.map +1 -0
  298. package/lib/module/ui/primitives/Input.js +97 -0
  299. package/lib/module/ui/primitives/Input.js.map +1 -0
  300. package/lib/module/ui/primitives/SearchableSingleSelectList.js +153 -0
  301. package/lib/module/ui/primitives/SearchableSingleSelectList.js.map +1 -0
  302. package/lib/module/ui/primitives/Select.js +205 -0
  303. package/lib/module/ui/primitives/Select.js.map +1 -0
  304. package/lib/module/ui/primitives/Spinner.js +21 -0
  305. package/lib/module/ui/primitives/Spinner.js.map +1 -0
  306. package/lib/module/ui/primitives/index.js +14 -0
  307. package/lib/module/ui/primitives/index.js.map +1 -0
  308. package/lib/module/ui/primitives/searchableSingleSelectFilter.js +27 -0
  309. package/lib/module/ui/primitives/searchableSingleSelectFilter.js.map +1 -0
  310. package/lib/module/ui/theme/ThemeProvider.js +67 -0
  311. package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
  312. package/lib/module/ui/theme/index.js +5 -0
  313. package/lib/module/ui/theme/index.js.map +1 -0
  314. package/lib/module/ui/theme/tokens.js +145 -0
  315. package/lib/module/ui/theme/tokens.js.map +1 -0
  316. package/lib/module/utils/EventEmitter.js +139 -0
  317. package/lib/module/utils/EventEmitter.js.map +1 -0
  318. package/lib/module/utils/base64.js +47 -0
  319. package/lib/module/utils/base64.js.map +1 -0
  320. package/lib/module/utils/deviceFingerprint.js +129 -0
  321. package/lib/module/utils/deviceFingerprint.js.map +1 -0
  322. package/lib/module/utils/documentTypeOptions.js +31 -0
  323. package/lib/module/utils/documentTypeOptions.js.map +1 -0
  324. package/lib/module/utils/googleMapsPreflight.js +84 -0
  325. package/lib/module/utils/googleMapsPreflight.js.map +1 -0
  326. package/lib/module/utils/hmac.js +53 -0
  327. package/lib/module/utils/hmac.js.map +1 -0
  328. package/lib/module/utils/iso3166Countries.js +92 -0
  329. package/lib/module/utils/iso3166Countries.js.map +1 -0
  330. package/lib/module/utils/jpegFromUri.js +40 -0
  331. package/lib/module/utils/jpegFromUri.js.map +1 -0
  332. package/lib/module/utils/keepAwake.js +53 -0
  333. package/lib/module/utils/keepAwake.js.map +1 -0
  334. package/lib/module/utils/log.js +37 -0
  335. package/lib/module/utils/log.js.map +1 -0
  336. package/lib/module/utils/osGeocoder.js +65 -0
  337. package/lib/module/utils/osGeocoder.js.map +1 -0
  338. package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
  339. package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
  340. package/lib/module/utils/personNameNormalize.js +20 -0
  341. package/lib/module/utils/personNameNormalize.js.map +1 -0
  342. package/lib/module/utils/sdkError.js +29 -0
  343. package/lib/module/utils/sdkError.js.map +1 -0
  344. package/lib/module/utils/sdkVersion.js +9 -0
  345. package/lib/module/utils/sdkVersion.js.map +1 -0
  346. package/lib/module/utils/stepConfig.js +59 -0
  347. package/lib/module/utils/stepConfig.js.map +1 -0
  348. package/lib/module/utils/taxInfoConfig.js +15 -0
  349. package/lib/module/utils/taxInfoConfig.js.map +1 -0
  350. package/lib/module/utils/useSafeAreaInsets.js +37 -0
  351. package/lib/module/utils/useSafeAreaInsets.js.map +1 -0
  352. package/lib/module/utils/velionExtra.js +44 -0
  353. package/lib/module/utils/velionExtra.js.map +1 -0
  354. package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
  355. package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
  356. package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
  357. package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
  358. package/lib/typescript/camera/LivenessCamera.d.ts +67 -0
  359. package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
  360. package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
  361. package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
  362. package/lib/typescript/core/VelionOnboarding.d.ts +169 -0
  363. package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
  364. package/lib/typescript/core/retryStepCopy.d.ts +27 -0
  365. package/lib/typescript/core/retryStepCopy.d.ts.map +1 -0
  366. package/lib/typescript/core/routingCommands.d.ts +39 -0
  367. package/lib/typescript/core/routingCommands.d.ts.map +1 -0
  368. package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
  369. package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
  370. package/lib/typescript/core/sessionStateMapper.d.ts +52 -0
  371. package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
  372. package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
  373. package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
  374. package/lib/typescript/i18n/index.d.ts +13 -0
  375. package/lib/typescript/i18n/index.d.ts.map +1 -0
  376. package/lib/typescript/i18n/strings/en.d.ts +3 -0
  377. package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
  378. package/lib/typescript/i18n/strings/es.d.ts +297 -0
  379. package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
  380. package/lib/typescript/index.d.ts +26 -0
  381. package/lib/typescript/index.d.ts.map +1 -0
  382. package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
  383. package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
  384. package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
  385. package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
  386. package/lib/typescript/steps/EconomicActivityStep.d.ts +29 -0
  387. package/lib/typescript/steps/EconomicActivityStep.d.ts.map +1 -0
  388. package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
  389. package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
  390. package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
  391. package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
  392. package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
  393. package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
  394. package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
  395. package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
  396. package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
  397. package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
  398. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
  399. package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
  400. package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
  401. package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
  402. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
  403. package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
  404. package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
  405. package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
  406. package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
  407. package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
  408. package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
  409. package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
  410. package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
  411. package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
  412. package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
  413. package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
  414. package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
  415. package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
  416. package/lib/typescript/steps/_shared.d.ts +22 -0
  417. package/lib/typescript/steps/_shared.d.ts.map +1 -0
  418. package/lib/typescript/steps/types.d.ts +89 -0
  419. package/lib/typescript/steps/types.d.ts.map +1 -0
  420. package/lib/typescript/transport/api.d.ts +35 -0
  421. package/lib/typescript/transport/api.d.ts.map +1 -0
  422. package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
  423. package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
  424. package/lib/typescript/transport/secureUrl.d.ts +14 -0
  425. package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
  426. package/lib/typescript/transport/sse.d.ts +54 -0
  427. package/lib/typescript/transport/sse.d.ts.map +1 -0
  428. package/lib/typescript/types/index.d.ts +1219 -0
  429. package/lib/typescript/types/index.d.ts.map +1 -0
  430. package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
  431. package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
  432. package/lib/typescript/ui/StepShell.d.ts +29 -0
  433. package/lib/typescript/ui/StepShell.d.ts.map +1 -0
  434. package/lib/typescript/ui/VelionOnboardingScreen.d.ts +26 -0
  435. package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
  436. package/lib/typescript/ui/forms/index.d.ts +3 -0
  437. package/lib/typescript/ui/forms/index.d.ts.map +1 -0
  438. package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
  439. package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
  440. package/lib/typescript/ui/forms/validators.d.ts +11 -0
  441. package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
  442. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
  443. package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
  444. package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
  445. package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
  446. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
  447. package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
  448. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
  449. package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
  450. package/lib/typescript/ui/overlays/ProgressBar.d.ts +32 -0
  451. package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
  452. package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
  453. package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
  454. package/lib/typescript/ui/overlays/index.d.ts +4 -0
  455. package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
  456. package/lib/typescript/ui/primitives/BackButton.d.ts +20 -0
  457. package/lib/typescript/ui/primitives/BackButton.d.ts.map +1 -0
  458. package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
  459. package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
  460. package/lib/typescript/ui/primitives/Button.d.ts +27 -0
  461. package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
  462. package/lib/typescript/ui/primitives/Card.d.ts +10 -0
  463. package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
  464. package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
  465. package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
  466. package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
  467. package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
  468. package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
  469. package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
  470. package/lib/typescript/ui/primitives/Input.d.ts +17 -0
  471. package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
  472. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts +33 -0
  473. package/lib/typescript/ui/primitives/SearchableSingleSelectList.d.ts.map +1 -0
  474. package/lib/typescript/ui/primitives/Select.d.ts +26 -0
  475. package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
  476. package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
  477. package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
  478. package/lib/typescript/ui/primitives/index.d.ts +12 -0
  479. package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
  480. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts +25 -0
  481. package/lib/typescript/ui/primitives/searchableSingleSelectFilter.d.ts.map +1 -0
  482. package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
  483. package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
  484. package/lib/typescript/ui/theme/index.d.ts +3 -0
  485. package/lib/typescript/ui/theme/index.d.ts.map +1 -0
  486. package/lib/typescript/ui/theme/tokens.d.ts +42 -0
  487. package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
  488. package/lib/typescript/utils/EventEmitter.d.ts +98 -0
  489. package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
  490. package/lib/typescript/utils/base64.d.ts +19 -0
  491. package/lib/typescript/utils/base64.d.ts.map +1 -0
  492. package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
  493. package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
  494. package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
  495. package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
  496. package/lib/typescript/utils/googleMapsPreflight.d.ts +52 -0
  497. package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
  498. package/lib/typescript/utils/hmac.d.ts +39 -0
  499. package/lib/typescript/utils/hmac.d.ts.map +1 -0
  500. package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
  501. package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
  502. package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
  503. package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
  504. package/lib/typescript/utils/keepAwake.d.ts +16 -0
  505. package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
  506. package/lib/typescript/utils/log.d.ts +18 -0
  507. package/lib/typescript/utils/log.d.ts.map +1 -0
  508. package/lib/typescript/utils/osGeocoder.d.ts +38 -0
  509. package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
  510. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
  511. package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
  512. package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
  513. package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
  514. package/lib/typescript/utils/sdkError.d.ts +14 -0
  515. package/lib/typescript/utils/sdkError.d.ts.map +1 -0
  516. package/lib/typescript/utils/sdkVersion.d.ts +7 -0
  517. package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
  518. package/lib/typescript/utils/stepConfig.d.ts +8 -0
  519. package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
  520. package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
  521. package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
  522. package/lib/typescript/utils/useSafeAreaInsets.d.ts +26 -0
  523. package/lib/typescript/utils/useSafeAreaInsets.d.ts.map +1 -0
  524. package/lib/typescript/utils/velionExtra.d.ts +24 -0
  525. package/lib/typescript/utils/velionExtra.d.ts.map +1 -0
  526. package/package.json +107 -0
  527. package/src/camera/AddressSearchBar.tsx +363 -0
  528. package/src/camera/DocumentCapture.tsx +514 -0
  529. package/src/camera/LivenessCamera.tsx +706 -0
  530. package/src/camera/MapAddressPicker.tsx +391 -0
  531. package/src/core/VelionOnboarding.ts +1291 -0
  532. package/src/core/retryStepCopy.ts +54 -0
  533. package/src/core/routingCommands.ts +63 -0
  534. package/src/core/sessionDeclinedCopy.ts +76 -0
  535. package/src/core/sessionStateMapper.ts +232 -0
  536. package/src/core/sseReasonMessages.ts +531 -0
  537. package/src/data/iso3166Alpha2Codes.json +1 -0
  538. package/src/data/iso3166CountryNames.json +251 -0
  539. package/src/i18n/index.ts +26 -0
  540. package/src/i18n/strings/en.ts +335 -0
  541. package/src/i18n/strings/es.ts +337 -0
  542. package/src/index.ts +146 -0
  543. package/src/steps/AddressInfoStep.tsx +744 -0
  544. package/src/steps/DocumentsOcrStep.tsx +481 -0
  545. package/src/steps/EconomicActivityStep.tsx +230 -0
  546. package/src/steps/EmailContactStep.tsx +165 -0
  547. package/src/steps/EmailOtpStep.tsx +256 -0
  548. package/src/steps/FaceMatchStep.tsx +176 -0
  549. package/src/steps/FingerprintStep.tsx +99 -0
  550. package/src/steps/HumanBasicInfoStep.tsx +286 -0
  551. package/src/steps/HumanExtendedInfoStep.tsx +362 -0
  552. package/src/steps/LegalBasicInfoStep.tsx +214 -0
  553. package/src/steps/LegalExtendedInfoStep.tsx +184 -0
  554. package/src/steps/LivenessMatchStep.tsx +1351 -0
  555. package/src/steps/PhoneContactStep.tsx +166 -0
  556. package/src/steps/PhoneOtpStep.tsx +255 -0
  557. package/src/steps/SwornDeclarationStep.tsx +237 -0
  558. package/src/steps/TaxInfoStep.tsx +288 -0
  559. package/src/steps/TermsAndConditionsStep.tsx +269 -0
  560. package/src/steps/_shared.ts +69 -0
  561. package/src/steps/types.ts +93 -0
  562. package/src/transport/api.ts +257 -0
  563. package/src/transport/irisWebSocket.ts +186 -0
  564. package/src/transport/secureUrl.ts +47 -0
  565. package/src/transport/sse.ts +310 -0
  566. package/src/types/index.ts +1421 -0
  567. package/src/ui/MapFallbackBoundary.tsx +46 -0
  568. package/src/ui/StepShell.tsx +273 -0
  569. package/src/ui/VelionOnboardingScreen.tsx +297 -0
  570. package/src/ui/forms/index.ts +12 -0
  571. package/src/ui/forms/useInlineValidation.ts +115 -0
  572. package/src/ui/forms/validators.ts +29 -0
  573. package/src/ui/icons/HomeHeartIcon.tsx +34 -0
  574. package/src/ui/icons/StepIcon.tsx +78 -0
  575. package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
  576. package/src/ui/overlays/LoadingOverlay.tsx +115 -0
  577. package/src/ui/overlays/ProgressBar.tsx +106 -0
  578. package/src/ui/overlays/RetryDialog.tsx +128 -0
  579. package/src/ui/overlays/index.ts +3 -0
  580. package/src/ui/primitives/BackButton.tsx +65 -0
  581. package/src/ui/primitives/Banner.tsx +81 -0
  582. package/src/ui/primitives/Button.tsx +164 -0
  583. package/src/ui/primitives/Card.tsx +55 -0
  584. package/src/ui/primitives/Checkbox.tsx +153 -0
  585. package/src/ui/primitives/CountrySelect.tsx +356 -0
  586. package/src/ui/primitives/DatePicker.tsx +266 -0
  587. package/src/ui/primitives/Input.tsx +110 -0
  588. package/src/ui/primitives/SearchableSingleSelectList.tsx +195 -0
  589. package/src/ui/primitives/Select.tsx +259 -0
  590. package/src/ui/primitives/Spinner.tsx +17 -0
  591. package/src/ui/primitives/index.ts +16 -0
  592. package/src/ui/primitives/searchableSingleSelectFilter.ts +38 -0
  593. package/src/ui/theme/ThemeProvider.tsx +102 -0
  594. package/src/ui/theme/index.ts +17 -0
  595. package/src/ui/theme/tokens.ts +159 -0
  596. package/src/utils/EventEmitter.ts +155 -0
  597. package/src/utils/base64.ts +44 -0
  598. package/src/utils/deviceFingerprint.ts +184 -0
  599. package/src/utils/documentTypeOptions.ts +31 -0
  600. package/src/utils/googleMapsPreflight.ts +89 -0
  601. package/src/utils/hmac.ts +61 -0
  602. package/src/utils/iso3166Countries.ts +111 -0
  603. package/src/utils/jpegFromUri.ts +42 -0
  604. package/src/utils/keepAwake.ts +62 -0
  605. package/src/utils/log.ts +37 -0
  606. package/src/utils/osGeocoder.ts +75 -0
  607. package/src/utils/parseGoogleAddressComponents.ts +123 -0
  608. package/src/utils/personNameNormalize.ts +17 -0
  609. package/src/utils/sdkError.ts +40 -0
  610. package/src/utils/sdkVersion.ts +6 -0
  611. package/src/utils/stepConfig.ts +75 -0
  612. package/src/utils/taxInfoConfig.ts +14 -0
  613. package/src/utils/useSafeAreaInsets.ts +37 -0
  614. package/src/utils/velionExtra.ts +46 -0
@@ -0,0 +1,706 @@
1
+ /**
2
+ * @fileoverview Liveness camera surface — front-facing vision-camera with an
3
+ * oval mask, status pill, and capture loop driven by the parent step.
4
+ *
5
+ * Capture strategy: vision-camera v4 frame processors run on a worklet thread
6
+ * and don't expose the JPEG bytes back to JS without a custom native plugin.
7
+ * We avoid that complication by using `takePhoto({ qualityPrioritization:
8
+ * 'speed' })` on a JS-level interval (matches the `setInterval` pattern in
9
+ * `web/LivenessModule.ts`). Real-world FPS lands around 3–8 fps which is
10
+ * sufficient for Iris's challenge cadence.
11
+ *
12
+ * The parent owns the loop and the WebSocket — this component just exposes a
13
+ * `captureFrame` ref so the step can drive the timing while the camera stays
14
+ * mounted across challenges.
15
+ */
16
+
17
+ import {
18
+ forwardRef,
19
+ useCallback,
20
+ useEffect,
21
+ useImperativeHandle,
22
+ useRef,
23
+ useState,
24
+ } from 'react';
25
+ import {
26
+ ActivityIndicator,
27
+ Animated,
28
+ Easing,
29
+ StyleSheet,
30
+ Text,
31
+ useWindowDimensions,
32
+ View,
33
+ } from 'react-native';
34
+ import Svg, { Defs, Ellipse, Mask, Rect } from 'react-native-svg';
35
+ import {
36
+ Camera,
37
+ useCameraDevice,
38
+ useCameraFormat,
39
+ useCameraPermission,
40
+ type PhotoFile,
41
+ type VideoFile,
42
+ } from 'react-native-vision-camera';
43
+ import { Button } from '../ui/primitives/Button';
44
+ import { useTheme, withAlpha } from '../ui/theme';
45
+ import { useSafeAreaInsets } from '../utils/useSafeAreaInsets';
46
+
47
+ export interface LivenessCameraHandle {
48
+ takeFrame: () => Promise<PhotoFile | null>;
49
+ /**
50
+ * Start an mp4/h264 video recording on the same `<Camera>` that feeds the
51
+ * frame loop. Audio is disabled. Errors during recording are delivered
52
+ * through `onRecordingError` — startup failures throw synchronously and
53
+ * must be caught by the caller. Best-effort: liveness must keep working
54
+ * even when this fails.
55
+ */
56
+ startVideoRecording(opts: {
57
+ onRecordingFinished: (video: VideoFile) => void;
58
+ onRecordingError: (err: unknown) => void;
59
+ }): void;
60
+ /**
61
+ * Stop the active recording. Resolves once `onRecordingFinished` has been
62
+ * scheduled by vision-camera; the file path arrives there, not here.
63
+ * No-op when no recording is active.
64
+ */
65
+ stopVideoRecording(): Promise<void>;
66
+ }
67
+
68
+ /**
69
+ * Visual cue applied to the oval guide. The parent maps the current Iris
70
+ * challenge to one of these so the oval animates in a way that reinforces
71
+ * the instruction (oval grows for MOVE_CLOSER, shrinks back for MOVE_FARTHER,
72
+ * stays neutral otherwise).
73
+ */
74
+ export type LivenessOvalCue = 'NEUTRAL' | 'MOVE_CLOSER' | 'MOVE_FARTHER';
75
+
76
+ export interface LivenessCameraProps {
77
+ /** Status text rendered in the centred pill. Pass `null` to hide it. */
78
+ statusText: string | null;
79
+ /** Active challenge instruction (rendered above the oval). Optional. */
80
+ challengeText?: string | null | undefined;
81
+ /** Visual cue for the oval shape (size animation). Defaults to NEUTRAL. */
82
+ ovalCue?: LivenessOvalCue | undefined;
83
+ /** Toast text — passed in as a `{ kind, message }` so the parent owns timing. */
84
+ toast?: { kind: 'success' | 'warning'; message: string } | null | undefined;
85
+ /** Linear progress 0–1 shown under the oval (CHALLENGE_PROGRESS). */
86
+ progress?: number | null | undefined;
87
+ /** Localized permission denied copy. */
88
+ permissionDeniedLabel: string;
89
+ /** Localized retry label for the permission CTA. */
90
+ retryLabel: string;
91
+ /** Localized cancel / back label. */
92
+ cancelLabel: string;
93
+ onCancel?: (() => void) | undefined;
94
+ }
95
+
96
+ export const LivenessCamera = forwardRef<LivenessCameraHandle, LivenessCameraProps>(
97
+ function LivenessCamera(props, ref) {
98
+ const theme = useTheme();
99
+ const insets = useSafeAreaInsets();
100
+ const cameraRef = useRef<Camera>(null);
101
+ const device = useCameraDevice('front');
102
+ // Pick a 720p / 30-fps format so the recorded mp4 stays a few MB instead
103
+ // of the device-default 1080p–4K bitrate (a 30 s session can otherwise
104
+ // produce a 50–80 MB file that times out on mobile uplinks). The face
105
+ // visibility for liveness evidence is fine at 720p. Constraints are
106
+ // ordered by priority — vision-camera picks the closest match.
107
+ const format = useCameraFormat(device, [
108
+ { videoResolution: { width: 1280, height: 720 } },
109
+ { fps: 30 },
110
+ { videoStabilizationMode: 'off' },
111
+ ]);
112
+ const { hasPermission, requestPermission } = useCameraPermission();
113
+ const requestedRef = useRef(false);
114
+ const inFlightRef = useRef(false);
115
+ // Same simulator-friendly timeout as DocumentCapture: bail out of the
116
+ // infinite spinner after 4s without a device.
117
+ const [deviceTimeout, setDeviceTimeout] = useState(false);
118
+
119
+ useEffect(() => {
120
+ if (!hasPermission && !requestedRef.current) {
121
+ requestedRef.current = true;
122
+ void requestPermission();
123
+ }
124
+ }, [hasPermission, requestPermission]);
125
+
126
+ useEffect(() => {
127
+ if (device || !hasPermission) {
128
+ setDeviceTimeout(false);
129
+ return;
130
+ }
131
+ const t = setTimeout(() => setDeviceTimeout(true), 4000);
132
+ return () => clearTimeout(t);
133
+ }, [device, hasPermission]);
134
+
135
+ const takeFrame = useCallback(async (): Promise<PhotoFile | null> => {
136
+ if (inFlightRef.current) return null;
137
+ const camera = cameraRef.current;
138
+ if (!camera) return null;
139
+ inFlightRef.current = true;
140
+ try {
141
+ return await camera.takePhoto({
142
+ flash: 'off',
143
+ enableShutterSound: false,
144
+ });
145
+ } catch {
146
+ // Frame failures are non-fatal — the parent loop just retries on the
147
+ // next tick. Keep the camera mounted.
148
+ return null;
149
+ } finally {
150
+ inFlightRef.current = false;
151
+ }
152
+ }, []);
153
+
154
+ // Recording is best-effort and orthogonal to the frame loop. We track an
155
+ // `isRecording` flag so `stopVideoRecording` is idempotent even if the
156
+ // parent calls it twice (e.g. on SESSION_COMPLETE and again on unmount).
157
+ const recordingRef = useRef(false);
158
+
159
+ const startVideoRecording = useCallback(
160
+ (opts: {
161
+ onRecordingFinished: (video: VideoFile) => void;
162
+ onRecordingError: (err: unknown) => void;
163
+ }) => {
164
+ const camera = cameraRef.current;
165
+ if (!camera) {
166
+ throw new Error('Camera is not mounted; cannot start recording.');
167
+ }
168
+ if (recordingRef.current) return;
169
+ recordingRef.current = true;
170
+ camera.startRecording({
171
+ fileType: 'mp4',
172
+ videoCodec: 'h264',
173
+ flash: 'off',
174
+ onRecordingFinished: (video) => {
175
+ recordingRef.current = false;
176
+ opts.onRecordingFinished(video);
177
+ },
178
+ onRecordingError: (err) => {
179
+ recordingRef.current = false;
180
+ opts.onRecordingError(err);
181
+ },
182
+ });
183
+ },
184
+ [],
185
+ );
186
+
187
+ const stopVideoRecording = useCallback(async (): Promise<void> => {
188
+ const camera = cameraRef.current;
189
+ if (!camera || !recordingRef.current) return;
190
+ await camera.stopRecording();
191
+ // recordingRef is cleared inside onRecordingFinished/onRecordingError to
192
+ // avoid a window where a follow-up start() races with the unfinished stop.
193
+ }, []);
194
+
195
+ useImperativeHandle(
196
+ ref,
197
+ () => ({ takeFrame, startVideoRecording, stopVideoRecording }),
198
+ [takeFrame, startVideoRecording, stopVideoRecording],
199
+ );
200
+
201
+ if (!hasPermission) {
202
+ return (
203
+ <View style={[styles.permission, { backgroundColor: theme.backgroundColor }]}>
204
+ <Text style={[styles.permissionText, { color: theme.textColor }]}>
205
+ {props.permissionDeniedLabel}
206
+ </Text>
207
+ <View style={styles.row}>
208
+ {props.onCancel ? (
209
+ <Button
210
+ variant="ghost"
211
+ label={props.cancelLabel}
212
+ onPress={props.onCancel}
213
+ fullWidth={false}
214
+ style={styles.actionBtn}
215
+ />
216
+ ) : null}
217
+ <Button
218
+ label={props.retryLabel}
219
+ onPress={() => {
220
+ void requestPermission();
221
+ }}
222
+ fullWidth={false}
223
+ style={styles.actionBtn}
224
+ />
225
+ </View>
226
+ </View>
227
+ );
228
+ }
229
+
230
+ if (!device) {
231
+ if (deviceTimeout) {
232
+ return (
233
+ <View style={[styles.permission, { backgroundColor: theme.backgroundColor }]}>
234
+ <Text style={[styles.permissionText, { color: theme.textColor }]}>
235
+ No camera detected. The iOS Simulator does not provide a real
236
+ camera — please run on a physical device to perform the
237
+ liveness check.
238
+ </Text>
239
+ {props.onCancel ? (
240
+ <View style={styles.row}>
241
+ <Button
242
+ variant="ghost"
243
+ label={props.cancelLabel}
244
+ onPress={props.onCancel}
245
+ fullWidth={false}
246
+ style={styles.actionBtn}
247
+ />
248
+ </View>
249
+ ) : null}
250
+ </View>
251
+ );
252
+ }
253
+ return (
254
+ <View style={[styles.permission, { backgroundColor: theme.backgroundColor }]}>
255
+ <ActivityIndicator color={theme.primaryColor} />
256
+ </View>
257
+ );
258
+ }
259
+
260
+ return (
261
+ <View style={styles.root}>
262
+ <Camera
263
+ ref={cameraRef}
264
+ style={StyleSheet.absoluteFill}
265
+ device={device}
266
+ // `format` and `fps` cap the sensor output to 720p / 30 fps so the
267
+ // recorded mp4 lands in the few-MB range instead of the device
268
+ // default (which on modern iPhones is 1080p–4K @ 60 fps).
269
+ {...(format ? { format } : {})}
270
+ fps={30}
271
+ // Cap the encoder to ~2 Mbps. The default `'normal'` setting maps
272
+ // to ~8 Mbps for 720p, producing a 38 MB file for a 30 s session;
273
+ // ~2 Mbps is plenty for face visibility (compliance evidence) and
274
+ // keeps a 30 s recording around 7-8 MB.
275
+ videoBitRate={2}
276
+ // Lock the recorded video orientation to the preview view's so it
277
+ // is never upside-down or sideways on the back-office player.
278
+ outputOrientation="preview"
279
+ photo
280
+ // Enable mp4/h264 recording in parallel with takePhoto(). vision-camera
281
+ // v4 supports both surfaces on the same <Camera>; the recording runs
282
+ // best-effort and does not affect the frame cadence sent to Iris.
283
+ video
284
+ audio={false}
285
+ photoQualityBalance="speed"
286
+ // Keep the vision-camera default (`isMirrored=true` for front cam):
287
+ // overriding it to `false` causes a v4 iOS bug where the tkhd matrix
288
+ // is written rotated −90° instead of +90°, leaving the recorded mp4
289
+ // upside-down. The JPEG frames we send to Iris are un-mirrored
290
+ // separately in `captureAndSend` via a horizontal flip with
291
+ // expo-image-manipulator, so TURN_LEFT/RIGHT still maps to the
292
+ // real-world yaw.
293
+ isActive
294
+ />
295
+ <OvalOverlay
296
+ primaryColor={theme.primaryColor}
297
+ cue={props.ovalCue ?? 'NEUTRAL'}
298
+ />
299
+ {props.challengeText ? (
300
+ <ChallengeBanner
301
+ text={props.challengeText}
302
+ tint={theme.primaryColor}
303
+ />
304
+ ) : null}
305
+ {props.statusText ? (
306
+ <View style={[styles.statusPill, { top: insets.top + 130 }]}>
307
+ <ActivityIndicator color="#FFFFFF" size="small" />
308
+ <Text style={styles.statusText}>{props.statusText}</Text>
309
+ </View>
310
+ ) : null}
311
+ {props.toast ? (
312
+ <View
313
+ style={[
314
+ styles.toast,
315
+ { bottom: insets.bottom + 100 },
316
+ {
317
+ backgroundColor:
318
+ props.toast.kind === 'success'
319
+ ? withAlpha(theme.successColor, 0.92)
320
+ : withAlpha(theme.warningColor, 0.92),
321
+ },
322
+ ]}
323
+ >
324
+ <Text style={styles.toastText}>{props.toast.message}</Text>
325
+ </View>
326
+ ) : null}
327
+ {props.progress != null ? (
328
+ <ProgressBar
329
+ progress={props.progress}
330
+ color={theme.primaryColor}
331
+ />
332
+ ) : null}
333
+ </View>
334
+ );
335
+ },
336
+ );
337
+
338
+ interface ProgressBarProps {
339
+ progress: number;
340
+ color: string;
341
+ }
342
+
343
+ /**
344
+ * Challenge progress bar with an indeterminate fallback.
345
+ *
346
+ * When the orchestrator hasn't sent any CHALLENGE_PROGRESS yet (still
347
+ * collecting baseline, user hasn't started moving, etc.) `progress` is 0
348
+ * and a static empty bar looks broken. We treat the [0, 0.05) range as
349
+ * "no measurable progress yet" and run a left-to-right shimmer instead,
350
+ * so the user can tell the system is still listening.
351
+ */
352
+ function ProgressBar({ progress, color }: ProgressBarProps) {
353
+ const insets = useSafeAreaInsets();
354
+ const trackBottom = insets.bottom + 60;
355
+ const clamped = Math.max(0, Math.min(1, progress));
356
+ const isIndeterminate = clamped < 0.05;
357
+
358
+ const shimmer = useRef(new Animated.Value(0)).current;
359
+ useEffect(() => {
360
+ if (!isIndeterminate) {
361
+ shimmer.stopAnimation();
362
+ return;
363
+ }
364
+ shimmer.setValue(0);
365
+ const loop = Animated.loop(
366
+ Animated.timing(shimmer, {
367
+ toValue: 1,
368
+ duration: 1200,
369
+ easing: Easing.inOut(Easing.ease),
370
+ useNativeDriver: false,
371
+ }),
372
+ );
373
+ loop.start();
374
+ return () => loop.stop();
375
+ }, [isIndeterminate, shimmer]);
376
+
377
+ if (isIndeterminate) {
378
+ // 30 % wide segment sliding from -30 % to +100 % of the track.
379
+ const left = shimmer.interpolate({
380
+ inputRange: [0, 1],
381
+ outputRange: ['-30%', '100%'],
382
+ });
383
+ return (
384
+ <View style={[styles.progressTrack, { bottom: trackBottom }]}>
385
+ <Animated.View
386
+ style={[
387
+ styles.progressShimmer,
388
+ { backgroundColor: color, left },
389
+ ]}
390
+ />
391
+ </View>
392
+ );
393
+ }
394
+
395
+ return (
396
+ <View style={[styles.progressTrack, { bottom: trackBottom }]}>
397
+ <View
398
+ style={[
399
+ styles.progressBar,
400
+ {
401
+ width: `${clamped * 100}%`,
402
+ backgroundColor: color,
403
+ },
404
+ ]}
405
+ />
406
+ </View>
407
+ );
408
+ }
409
+
410
+ interface ChallengeBannerProps {
411
+ text: string;
412
+ tint: string;
413
+ }
414
+
415
+ /**
416
+ * Attention-grabbing challenge instruction.
417
+ *
418
+ * The previous small grey pill was easy to miss — users sat confused
419
+ * while Iris's 800-8000 ms BLINK window closed. This banner is bold,
420
+ * sits on a dark translucent surface (less visually heavy than a full
421
+ * primary-tinted fill), and runs a fade-in + scale-up animation every
422
+ * time the `text` prop changes so the eye snaps to the new instruction.
423
+ *
424
+ * The `tint` prop is no longer used for the background (too saturated);
425
+ * it's kept in the signature for future re-introduction of an accent
426
+ * line / icon if needed without changing the call site.
427
+ */
428
+ function ChallengeBanner({ text, tint: _tint }: ChallengeBannerProps) {
429
+ const insets = useSafeAreaInsets();
430
+ const opacity = useRef(new Animated.Value(0)).current;
431
+ const scale = useRef(new Animated.Value(0.85)).current;
432
+
433
+ useEffect(() => {
434
+ // Reset to invisible/shrunk, then animate in. `text` in deps means each
435
+ // new challenge re-triggers the entrance animation.
436
+ opacity.setValue(0);
437
+ scale.setValue(0.85);
438
+ Animated.parallel([
439
+ Animated.timing(opacity, {
440
+ toValue: 1,
441
+ duration: 240,
442
+ easing: Easing.out(Easing.cubic),
443
+ useNativeDriver: true,
444
+ }),
445
+ Animated.spring(scale, {
446
+ toValue: 1,
447
+ damping: 12,
448
+ stiffness: 180,
449
+ mass: 0.7,
450
+ useNativeDriver: true,
451
+ }),
452
+ ]).start();
453
+ }, [text, opacity, scale]);
454
+
455
+ return (
456
+ <Animated.View
457
+ pointerEvents="none"
458
+ style={[
459
+ styles.challengeBanner,
460
+ { top: insets.top + 76 },
461
+ {
462
+ opacity,
463
+ transform: [{ scale }],
464
+ },
465
+ ]}
466
+ >
467
+ <Text style={styles.challengeBannerText} numberOfLines={2}>
468
+ {text}
469
+ </Text>
470
+ </Animated.View>
471
+ );
472
+ }
473
+
474
+ interface OvalOverlayProps {
475
+ primaryColor: string;
476
+ cue: LivenessOvalCue;
477
+ }
478
+
479
+ // Face-shaped oval: real human heads have a width-to-height ratio close to
480
+ // ~0.72 (slightly taller than a circle). Sized explicitly from
481
+ // `useWindowDimensions` and rendered as a true ellipse via SVG (NOT a
482
+ // rounded View) so the dim mask can follow the actual curve.
483
+ const OVAL_WIDTH_RATIO = 0.78; // 78 % of screen width
484
+ const OVAL_MAX_HEIGHT_RATIO = 0.62; // never taller than 62 % of screen height
485
+ const OVAL_ASPECT = 0.78; // width / height — face proportion
486
+ // Visual nudge: dim the screen symmetrically around the geometric centre
487
+ // looks slightly low because of the status bar / Dynamic Island at the
488
+ // top. Lift the oval by this many points so the user's natural framing
489
+ // (eyes near the top third of the oval) aligns with the screen's optical
490
+ // centre.
491
+ const OVAL_OPTICAL_OFFSET_UP = 24;
492
+ const OVAL_BORDER_WIDTH = 4;
493
+ // Secondary halo drawn outside the main stroke. Gives the user a clearer
494
+ // "your face should fill this" target without being so heavy that it
495
+ // distracts during the challenges.
496
+ const OVAL_HALO_WIDTH = 2;
497
+ const OVAL_HALO_OFFSET = 6; // px outside the primary stroke
498
+ const DIM_FILL = 'rgba(0, 0, 0, 0.55)';
499
+ // Scale targets per oval cue. The oval visually invites the user to bring
500
+ // their face closer (it grows) on MOVE_CLOSER, and to back away (it shrinks
501
+ // back to neutral size) on MOVE_FARTHER. NEUTRAL is the default oval size.
502
+ const OVAL_SCALE_BY_CUE: Record<LivenessOvalCue, number> = {
503
+ NEUTRAL: 1.0,
504
+ MOVE_CLOSER: 1.25,
505
+ MOVE_FARTHER: 1.0,
506
+ };
507
+ const OVAL_SCALE_ANIM_MS = 600;
508
+
509
+ function OvalOverlay({ primaryColor, cue }: OvalOverlayProps) {
510
+ const { width: screenW, height: screenH } = useWindowDimensions();
511
+
512
+ // Compute width first, then derive height to keep the face aspect ratio.
513
+ // If that height would dominate the screen, clip from the height side
514
+ // instead so the oval stays well within the visible area on tall phones.
515
+ let ovalW = screenW * OVAL_WIDTH_RATIO;
516
+ let ovalH = ovalW / OVAL_ASPECT;
517
+ const maxH = screenH * OVAL_MAX_HEIGHT_RATIO;
518
+ if (ovalH > maxH) {
519
+ ovalH = maxH;
520
+ ovalW = ovalH * OVAL_ASPECT;
521
+ }
522
+ const rx = ovalW / 2;
523
+ const ry = ovalH / 2;
524
+ const cx = screenW / 2;
525
+ const cy = Math.max(ry + 20, screenH / 2 - OVAL_OPTICAL_OFFSET_UP);
526
+
527
+ // Animate the oval scale on cue changes. We scale the entire Svg via an
528
+ // Animated.View transform — that keeps the mask + stroke perfectly
529
+ // aligned (no need to animate every SVG attribute individually). Scaling
530
+ // the dim rectangle past the screen edge is harmless: the user only sees
531
+ // the on-screen portion, which is exactly what we want.
532
+ const ovalScale = useRef(new Animated.Value(OVAL_SCALE_BY_CUE[cue])).current;
533
+ useEffect(() => {
534
+ Animated.timing(ovalScale, {
535
+ toValue: OVAL_SCALE_BY_CUE[cue],
536
+ duration: OVAL_SCALE_ANIM_MS,
537
+ easing: Easing.out(Easing.cubic),
538
+ useNativeDriver: true,
539
+ }).start();
540
+ }, [cue, ovalScale]);
541
+
542
+ // SVG mask trick:
543
+ // - The Mask defines a black/white image where white = "show the masked
544
+ // element" and black = "hide it (transparent)".
545
+ // - We mask a full-screen dim rectangle so the dim shows EVERYWHERE
546
+ // except inside the ellipse (where the mask is black).
547
+ // - On top of the dim, we draw the ellipse stroke as the visual
548
+ // viewfinder. Stroke is inset half its width so it stays exactly on
549
+ // the dim/transparent boundary.
550
+ return (
551
+ <Animated.View
552
+ pointerEvents="none"
553
+ style={[StyleSheet.absoluteFill, { transform: [{ scale: ovalScale }] }]}
554
+ >
555
+ <Svg
556
+ width={screenW}
557
+ height={screenH}
558
+ style={StyleSheet.absoluteFill}
559
+ >
560
+ <Defs>
561
+ <Mask id="ovalCutout">
562
+ <Rect x={0} y={0} width={screenW} height={screenH} fill="white" />
563
+ <Ellipse cx={cx} cy={cy} rx={rx} ry={ry} fill="black" />
564
+ </Mask>
565
+ </Defs>
566
+ <Rect
567
+ x={0}
568
+ y={0}
569
+ width={screenW}
570
+ height={screenH}
571
+ fill={DIM_FILL}
572
+ mask="url(#ovalCutout)"
573
+ />
574
+ {/* Outer halo: lower-opacity white ring that frames the primary
575
+ stroke. The pair reads as "here's the target shape" much more
576
+ clearly than a single 3 px stroke against the live camera feed,
577
+ especially on Android phones with low-contrast OLED panels. */}
578
+ <Ellipse
579
+ cx={cx}
580
+ cy={cy}
581
+ rx={rx + OVAL_HALO_OFFSET}
582
+ ry={ry + OVAL_HALO_OFFSET}
583
+ stroke="rgba(255, 255, 255, 0.45)"
584
+ strokeWidth={OVAL_HALO_WIDTH}
585
+ fill="none"
586
+ />
587
+ <Ellipse
588
+ cx={cx}
589
+ cy={cy}
590
+ rx={rx - OVAL_BORDER_WIDTH / 2}
591
+ ry={ry - OVAL_BORDER_WIDTH / 2}
592
+ stroke={primaryColor}
593
+ strokeWidth={OVAL_BORDER_WIDTH}
594
+ fill="none"
595
+ />
596
+ </Svg>
597
+ </Animated.View>
598
+ );
599
+ }
600
+
601
+ const styles = StyleSheet.create({
602
+ root: {
603
+ flex: 1,
604
+ backgroundColor: '#000',
605
+ },
606
+ permission: {
607
+ flex: 1,
608
+ alignItems: 'center',
609
+ justifyContent: 'center',
610
+ padding: 32,
611
+ gap: 16,
612
+ },
613
+ permissionText: {
614
+ textAlign: 'center',
615
+ fontSize: 15,
616
+ lineHeight: 22,
617
+ },
618
+ row: {
619
+ flexDirection: 'row',
620
+ gap: 12,
621
+ width: '100%',
622
+ maxWidth: 380,
623
+ },
624
+ actionBtn: {
625
+ flex: 1,
626
+ },
627
+ challengeBanner: {
628
+ position: 'absolute',
629
+ top: 76,
630
+ left: 24,
631
+ right: 24,
632
+ paddingHorizontal: 16,
633
+ paddingVertical: 10,
634
+ borderRadius: 18,
635
+ alignItems: 'center',
636
+ justifyContent: 'center',
637
+ backgroundColor: 'rgba(0, 0, 0, 0.62)',
638
+ },
639
+ challengeBannerText: {
640
+ color: '#FFFFFF',
641
+ fontSize: 19,
642
+ fontWeight: '700',
643
+ textAlign: 'center',
644
+ letterSpacing: 0.1,
645
+ lineHeight: 24,
646
+ },
647
+ statusPill: {
648
+ position: 'absolute',
649
+ top: 130,
650
+ left: 0,
651
+ right: 0,
652
+ alignSelf: 'center',
653
+ flexDirection: 'row',
654
+ alignItems: 'center',
655
+ justifyContent: 'center',
656
+ gap: 8,
657
+ backgroundColor: 'rgba(0,0,0,0.55)',
658
+ paddingHorizontal: 14,
659
+ paddingVertical: 8,
660
+ borderRadius: 16,
661
+ marginHorizontal: 60,
662
+ overflow: 'hidden',
663
+ },
664
+ statusText: {
665
+ color: '#FFFFFF',
666
+ fontSize: 13,
667
+ fontWeight: '500',
668
+ },
669
+ toast: {
670
+ position: 'absolute',
671
+ bottom: 100,
672
+ left: 24,
673
+ right: 24,
674
+ paddingVertical: 10,
675
+ paddingHorizontal: 14,
676
+ borderRadius: 14,
677
+ alignItems: 'center',
678
+ },
679
+ toastText: {
680
+ color: '#FFFFFF',
681
+ fontWeight: '600',
682
+ fontSize: 14,
683
+ textAlign: 'center',
684
+ },
685
+ progressTrack: {
686
+ position: 'absolute',
687
+ bottom: 60,
688
+ left: 24,
689
+ right: 24,
690
+ height: 6,
691
+ borderRadius: 3,
692
+ backgroundColor: 'rgba(255,255,255,0.25)',
693
+ overflow: 'hidden',
694
+ },
695
+ progressBar: {
696
+ height: '100%',
697
+ },
698
+ progressShimmer: {
699
+ position: 'absolute',
700
+ top: 0,
701
+ bottom: 0,
702
+ width: '30%',
703
+ opacity: 0.85,
704
+ borderRadius: 3,
705
+ },
706
+ });