facecog-liveness-showcase 0.0.1

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 (229) hide show
  1. package/.browserslistrc +15 -0
  2. package/.dockerignore +48 -0
  3. package/.editorconfig +16 -0
  4. package/.eslintrc.json +47 -0
  5. package/.vercelignore +7 -0
  6. package/.vscode/extensions.json +5 -0
  7. package/.vscode/settings.json +3 -0
  8. package/DOCKER.md +221 -0
  9. package/Dockerfile +33 -0
  10. package/README.md +268 -0
  11. package/angular.json +156 -0
  12. package/capacitor.config.ts +9 -0
  13. package/docker-compose.dev.yml +20 -0
  14. package/docker-compose.yml +18 -0
  15. package/ionic.config.json +7 -0
  16. package/jest.config.js +38 -0
  17. package/nginx.conf +50 -0
  18. package/package.json +131 -0
  19. package/patches/ng-packagr+20.3.2.patch +60 -0
  20. package/projects/facecog-liveness-verification/README.md +295 -0
  21. package/projects/facecog-liveness-verification/ng-package.json +7 -0
  22. package/projects/facecog-liveness-verification/package.json +48 -0
  23. package/projects/facecog-liveness-verification/scripts/build-with-wrapper-copy.js +38 -0
  24. package/projects/facecog-liveness-verification/scripts/copy-wrapper-after-ngc.js +35 -0
  25. package/projects/facecog-liveness-verification/sources/FaceLivenessReactWrapper.tsx +320 -0
  26. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/FaceLivenessReactWrapper.generated.d.ts +28 -0
  27. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/FaceLivenessReactWrapper.generated.js +247 -0
  28. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/FaceLivenessReactWrapper.generated.js.map +1 -0
  29. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/FaceLivenessReactWrapper.js.map +1 -0
  30. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/FaceLivenessReactWrapper.ts +5 -0
  31. package/projects/facecog-liveness-verification/src/lib/components/aws-face-liveness/aws-face-liveness.component.ts +500 -0
  32. package/projects/facecog-liveness-verification/src/lib/components/camera-permission/camera-permission.component.html +41 -0
  33. package/projects/facecog-liveness-verification/src/lib/components/camera-permission/camera-permission.component.scss +234 -0
  34. package/projects/facecog-liveness-verification/src/lib/components/camera-permission/camera-permission.component.spec.ts +158 -0
  35. package/projects/facecog-liveness-verification/src/lib/components/camera-permission/camera-permission.component.ts +58 -0
  36. package/projects/facecog-liveness-verification/src/lib/components/camera-verification/camera-verification.component.html +34 -0
  37. package/projects/facecog-liveness-verification/src/lib/components/camera-verification/camera-verification.component.ts +210 -0
  38. package/projects/facecog-liveness-verification/src/lib/components/dialogs/save-custom-pose-dialog.component.ts +174 -0
  39. package/projects/facecog-liveness-verification/src/lib/components/facetec-scan/facetec-scan.component.html +45 -0
  40. package/projects/facecog-liveness-verification/src/lib/components/facetec-scan/facetec-scan.component.scss +87 -0
  41. package/projects/facecog-liveness-verification/src/lib/components/facetec-scan/facetec-scan.component.ts +182 -0
  42. package/projects/facecog-liveness-verification/src/lib/components/intro/intro.component.html +394 -0
  43. package/projects/facecog-liveness-verification/src/lib/components/intro/intro.component.scss +1567 -0
  44. package/projects/facecog-liveness-verification/src/lib/components/intro/intro.component.spec.ts +699 -0
  45. package/projects/facecog-liveness-verification/src/lib/components/intro/intro.component.ts +721 -0
  46. package/projects/facecog-liveness-verification/src/lib/components/live-preview/live-preview.component.html +120 -0
  47. package/projects/facecog-liveness-verification/src/lib/components/live-preview/live-preview.component.scss +611 -0
  48. package/projects/facecog-liveness-verification/src/lib/components/live-preview/live-preview.component.spec.ts +605 -0
  49. package/projects/facecog-liveness-verification/src/lib/components/live-preview/live-preview.component.ts +524 -0
  50. package/projects/facecog-liveness-verification/src/lib/components/liveness-flow/liveness-flow.component.html +73 -0
  51. package/projects/facecog-liveness-verification/src/lib/components/liveness-flow/liveness-flow.component.scss +19 -0
  52. package/projects/facecog-liveness-verification/src/lib/components/liveness-flow/liveness-flow.component.spec.ts +673 -0
  53. package/projects/facecog-liveness-verification/src/lib/components/liveness-flow/liveness-flow.component.ts +963 -0
  54. package/projects/facecog-liveness-verification/src/lib/components/liveness-verification/liveness-verification.component.html +38 -0
  55. package/projects/facecog-liveness-verification/src/lib/components/liveness-verification/liveness-verification.component.scss +10 -0
  56. package/projects/facecog-liveness-verification/src/lib/components/liveness-verification/liveness-verification.component.ts +233 -0
  57. package/projects/facecog-liveness-verification/src/lib/components/pose-selection/pose-selection.component.html +17 -0
  58. package/projects/facecog-liveness-verification/src/lib/components/pose-selection/pose-selection.component.spec.ts +35 -0
  59. package/projects/facecog-liveness-verification/src/lib/components/pose-selection/pose-selection.component.ts +33 -0
  60. package/projects/facecog-liveness-verification/src/lib/components/processing/processing.component.html +17 -0
  61. package/projects/facecog-liveness-verification/src/lib/components/processing/processing.component.scss +156 -0
  62. package/projects/facecog-liveness-verification/src/lib/components/processing/processing.component.spec.ts +46 -0
  63. package/projects/facecog-liveness-verification/src/lib/components/processing/processing.component.ts +18 -0
  64. package/projects/facecog-liveness-verification/src/lib/components/verification-result/verification-result.component.html +190 -0
  65. package/projects/facecog-liveness-verification/src/lib/components/verification-result/verification-result.component.scss +534 -0
  66. package/projects/facecog-liveness-verification/src/lib/components/verification-result/verification-result.component.spec.ts +286 -0
  67. package/projects/facecog-liveness-verification/src/lib/components/verification-result/verification-result.component.ts +155 -0
  68. package/projects/facecog-liveness-verification/src/lib/interfaces/analyze-response.interface.ts +16 -0
  69. package/projects/facecog-liveness-verification/src/lib/interfaces/aws-face-liveness.interface.ts +46 -0
  70. package/projects/facecog-liveness-verification/src/lib/interfaces/backend-adapter.interface.ts +21 -0
  71. package/projects/facecog-liveness-verification/src/lib/interfaces/backend-http-client.interface.ts +93 -0
  72. package/projects/facecog-liveness-verification/src/lib/interfaces/backend-response.interface.ts +9 -0
  73. package/projects/facecog-liveness-verification/src/lib/interfaces/camera-provider.interface.ts +107 -0
  74. package/projects/facecog-liveness-verification/src/lib/interfaces/category-info.interface.ts +9 -0
  75. package/projects/facecog-liveness-verification/src/lib/interfaces/custom-pose-data.interface.ts +14 -0
  76. package/projects/facecog-liveness-verification/src/lib/interfaces/custom-pose-repository.interface.ts +48 -0
  77. package/projects/facecog-liveness-verification/src/lib/interfaces/custom-pose-response.interface.ts +14 -0
  78. package/projects/facecog-liveness-verification/src/lib/interfaces/index.ts +52 -0
  79. package/projects/facecog-liveness-verification/src/lib/interfaces/liveness-action-result.interface.ts +13 -0
  80. package/projects/facecog-liveness-verification/src/lib/interfaces/liveness-config.interface.ts +17 -0
  81. package/projects/facecog-liveness-verification/src/lib/interfaces/liveness-metadata.interface.ts +17 -0
  82. package/projects/facecog-liveness-verification/src/lib/interfaces/liveness-result.interface.ts +24 -0
  83. package/projects/facecog-liveness-verification/src/lib/interfaces/liveness-verification-config.interface.ts +41 -0
  84. package/projects/facecog-liveness-verification/src/lib/interfaces/multi-backend-analyze-response.interface.ts +21 -0
  85. package/projects/facecog-liveness-verification/src/lib/interfaces/multi-backend-liveness-result.interface.ts +14 -0
  86. package/projects/facecog-liveness-verification/src/lib/interfaces/pose-definition.interface.ts +35 -0
  87. package/projects/facecog-liveness-verification/src/lib/interfaces/pose-keypoint.interface.ts +12 -0
  88. package/projects/facecog-liveness-verification/src/lib/interfaces/pose-match-result.interface.ts +9 -0
  89. package/projects/facecog-liveness-verification/src/lib/interfaces/pose-verify-response.interface.ts +8 -0
  90. package/projects/facecog-liveness-verification/src/lib/interfaces/scan-results.interface.ts +29 -0
  91. package/projects/facecog-liveness-verification/src/lib/interfaces/verification-plan.interface.ts +42 -0
  92. package/projects/facecog-liveness-verification/src/lib/interfaces/verification-progress-event.interface.ts +12 -0
  93. package/projects/facecog-liveness-verification/src/lib/interfaces/verification-session.interface.ts +72 -0
  94. package/projects/facecog-liveness-verification/src/lib/interfaces/verification-step-change-event.interface.ts +11 -0
  95. package/projects/facecog-liveness-verification/src/lib/interfaces/video-recording.interface.ts +9 -0
  96. package/projects/facecog-liveness-verification/src/lib/liveness-verification.module.ts +123 -0
  97. package/projects/facecog-liveness-verification/src/lib/models/constants/aws-face-liveness-component.token.ts +23 -0
  98. package/projects/facecog-liveness-verification/src/lib/models/constants/category-info.constant.ts +14 -0
  99. package/projects/facecog-liveness-verification/src/lib/models/constants/default-liveness-config.constant.ts +18 -0
  100. package/projects/facecog-liveness-verification/src/lib/models/constants/index.ts +5 -0
  101. package/projects/facecog-liveness-verification/src/lib/models/constants/liveness-verification-config.token.ts +16 -0
  102. package/projects/facecog-liveness-verification/src/lib/models/constants/pose-definitions.constant.ts +377 -0
  103. package/projects/facecog-liveness-verification/src/lib/models/index.ts +5 -0
  104. package/projects/facecog-liveness-verification/src/lib/models/utils/index.ts +2 -0
  105. package/projects/facecog-liveness-verification/src/lib/models/utils/pose.utils.spec.ts +76 -0
  106. package/projects/facecog-liveness-verification/src/lib/models/utils/pose.utils.ts +59 -0
  107. package/projects/facecog-liveness-verification/src/lib/services/aws-face-liveness.service.ts +49 -0
  108. package/projects/facecog-liveness-verification/src/lib/services/backend-http.service.spec.ts +111 -0
  109. package/projects/facecog-liveness-verification/src/lib/services/backend-http.service.ts +130 -0
  110. package/projects/facecog-liveness-verification/src/lib/services/backends/azure-backend.service.spec.ts +69 -0
  111. package/projects/facecog-liveness-verification/src/lib/services/backends/azure-backend.service.ts +72 -0
  112. package/projects/facecog-liveness-verification/src/lib/services/backends/facetec-backend.service.spec.ts +24 -0
  113. package/projects/facecog-liveness-verification/src/lib/services/backends/facetec-backend.service.ts +35 -0
  114. package/projects/facecog-liveness-verification/src/lib/services/backends/mock-backend.service.spec.ts +36 -0
  115. package/projects/facecog-liveness-verification/src/lib/services/backends/mock-backend.service.ts +39 -0
  116. package/projects/facecog-liveness-verification/src/lib/services/backends/openpose-backend.service.spec.ts +81 -0
  117. package/projects/facecog-liveness-verification/src/lib/services/backends/openpose-backend.service.ts +72 -0
  118. package/projects/facecog-liveness-verification/src/lib/services/backends/rekognition-analysis-backend.service.spec.ts +69 -0
  119. package/projects/facecog-liveness-verification/src/lib/services/backends/rekognition-analysis-backend.service.ts +83 -0
  120. package/projects/facecog-liveness-verification/src/lib/services/camera.service.spec.ts +200 -0
  121. package/projects/facecog-liveness-verification/src/lib/services/camera.service.ts +155 -0
  122. package/projects/facecog-liveness-verification/src/lib/services/custom-poses-api.service.ts +117 -0
  123. package/projects/facecog-liveness-verification/src/lib/services/index.ts +18 -0
  124. package/projects/facecog-liveness-verification/src/lib/services/liveness-backend.service.spec.ts +103 -0
  125. package/projects/facecog-liveness-verification/src/lib/services/liveness-backend.service.ts +61 -0
  126. package/projects/facecog-liveness-verification/src/lib/services/liveness-config.service.spec.ts +109 -0
  127. package/projects/facecog-liveness-verification/src/lib/services/liveness-config.service.ts +70 -0
  128. package/projects/facecog-liveness-verification/src/lib/services/liveness-orchestrator.service.spec.ts +144 -0
  129. package/projects/facecog-liveness-verification/src/lib/services/liveness-orchestrator.service.ts +162 -0
  130. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/hand-gesture-detection.service.ts +315 -0
  131. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/index.ts +5 -0
  132. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/openpose.service.ts +287 -0
  133. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/pose-comparison.service.ts +353 -0
  134. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/pose-matching.service.ts +2370 -0
  135. package/projects/facecog-liveness-verification/src/lib/services/pose-detection/reference-pose.service.ts +271 -0
  136. package/projects/facecog-liveness-verification/src/lib/services/pose-selection.service.spec.ts +183 -0
  137. package/projects/facecog-liveness-verification/src/lib/services/pose-selection.service.ts +179 -0
  138. package/projects/facecog-liveness-verification/src/lib/services/verification-api.service.spec.ts +159 -0
  139. package/projects/facecog-liveness-verification/src/lib/services/verification-api.service.ts +151 -0
  140. package/projects/facecog-liveness-verification/src/lib/services/verification-plan.service.spec.ts +184 -0
  141. package/projects/facecog-liveness-verification/src/lib/services/verification-plan.service.ts +94 -0
  142. package/projects/facecog-liveness-verification/src/lib/services/video-recorder.service.spec.ts +52 -0
  143. package/projects/facecog-liveness-verification/src/lib/services/video-recorder.service.ts +117 -0
  144. package/projects/facecog-liveness-verification/src/lib/types/detection-strategy.type.ts +5 -0
  145. package/projects/facecog-liveness-verification/src/lib/types/index.ts +7 -0
  146. package/projects/facecog-liveness-verification/src/lib/types/liveness-action.type.ts +31 -0
  147. package/projects/facecog-liveness-verification/src/lib/types/liveness-backend.type.ts +5 -0
  148. package/projects/facecog-liveness-verification/src/lib/types/pose-category.type.ts +5 -0
  149. package/projects/facecog-liveness-verification/src/lib/types/pose-difficulty.type.ts +5 -0
  150. package/projects/facecog-liveness-verification/src/lib/types/verification-flow-step.type.ts +5 -0
  151. package/projects/facecog-liveness-verification/src/lib/types/verification-step-kind.type.ts +4 -0
  152. package/projects/facecog-liveness-verification/src/public-api.ts +150 -0
  153. package/projects/facecog-liveness-verification/tsconfig.lib.json +20 -0
  154. package/projects/facecog-liveness-verification/tsconfig.lib.prod.json +11 -0
  155. package/projects/facecog-liveness-verification/tsconfig.spec.json +13 -0
  156. package/projects/facecog-liveness-verification/tsconfig.wrapper.json +15 -0
  157. package/projects/facecog-liveness-verification-test/src/app/app-routing.module.ts +22 -0
  158. package/projects/facecog-liveness-verification-test/src/app/app.component.html +3 -0
  159. package/projects/facecog-liveness-verification-test/src/app/app.component.scss +0 -0
  160. package/projects/facecog-liveness-verification-test/src/app/app.component.ts +11 -0
  161. package/projects/facecog-liveness-verification-test/src/app/app.module.ts +27 -0
  162. package/projects/facecog-liveness-verification-test/src/app/home/home-routing.module.ts +16 -0
  163. package/projects/facecog-liveness-verification-test/src/app/home/home.module.ts +19 -0
  164. package/projects/facecog-liveness-verification-test/src/app/home/home.page.html +39 -0
  165. package/projects/facecog-liveness-verification-test/src/app/home/home.page.scss +97 -0
  166. package/projects/facecog-liveness-verification-test/src/app/home/home.page.spec.ts +24 -0
  167. package/projects/facecog-liveness-verification-test/src/app/home/home.page.ts +92 -0
  168. package/projects/facecog-liveness-verification-test/src/app/home/verification-modal.component.ts +106 -0
  169. package/projects/facecog-liveness-verification-test/src/assets/fonts/gilroy/Gilroy-Bold_0.ttf +0 -0
  170. package/projects/facecog-liveness-verification-test/src/assets/fonts/gilroy/Gilroy-Medium_0.ttf +0 -0
  171. package/projects/facecog-liveness-verification-test/src/assets/fonts/gilroy/Gilroy-Regular_0.ttf +0 -0
  172. package/projects/facecog-liveness-verification-test/src/assets/fonts/gilroy/Gilroy-SemiBold_0.ttf +0 -0
  173. package/projects/facecog-liveness-verification-test/src/assets/fonts/gilroy/Gilroy-Thin_0.ttf +0 -0
  174. package/projects/facecog-liveness-verification-test/src/assets/icon/favicon.png +0 -0
  175. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Five_Fingers_Left.jpg +0 -0
  176. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Left_Palm.jpg +0 -0
  177. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Ok_Sign_Right.jpg +0 -0
  178. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Peace_Sign_Left.jpg +0 -0
  179. package/projects/facecog-liveness-verification-test/src/assets/images/poses/README.md +77 -0
  180. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Right_Palm.jpg +0 -0
  181. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Speak_Phrase.jpg +0 -0
  182. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Three_Fingers_Right.jpg +0 -0
  183. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Thumbs_Up_Left.jpg +0 -0
  184. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Thumbs_Up_Right.jpg +0 -0
  185. package/projects/facecog-liveness-verification-test/src/assets/images/poses/Wave_Right.jpg +0 -0
  186. package/projects/facecog-liveness-verification-test/src/assets/images/poses/blink.jpeg +0 -0
  187. package/projects/facecog-liveness-verification-test/src/assets/images/poses/blink_twice.jpeg +0 -0
  188. package/projects/facecog-liveness-verification-test/src/assets/images/poses/center_face.png +0 -0
  189. package/projects/facecog-liveness-verification-test/src/assets/images/poses/clap.jpeg +0 -0
  190. package/projects/facecog-liveness-verification-test/src/assets/images/poses/cover_mouth.png +0 -0
  191. package/projects/facecog-liveness-verification-test/src/assets/images/poses/cover_right_eye.png +0 -0
  192. package/projects/facecog-liveness-verification-test/src/assets/images/poses/cross_arms.png +0 -0
  193. package/projects/facecog-liveness-verification-test/src/assets/images/poses/face_straight.png +0 -0
  194. package/projects/facecog-liveness-verification-test/src/assets/images/poses/follow_dot.png +0 -0
  195. package/projects/facecog-liveness-verification-test/src/assets/images/poses/look_down.png +0 -0
  196. package/projects/facecog-liveness-verification-test/src/assets/images/poses/look_up.png +0 -0
  197. package/projects/facecog-liveness-verification-test/src/assets/images/poses/move_closer.png +0 -0
  198. package/projects/facecog-liveness-verification-test/src/assets/images/poses/nod.png +0 -0
  199. package/projects/facecog-liveness-verification-test/src/assets/images/poses/open_mouth.png +0 -0
  200. package/projects/facecog-liveness-verification-test/src/assets/images/poses/raise_eyebrow.png +0 -0
  201. package/projects/facecog-liveness-verification-test/src/assets/images/poses/rotate_face.jpeg +0 -0
  202. package/projects/facecog-liveness-verification-test/src/assets/images/poses/shake_head.jpeg +0 -0
  203. package/projects/facecog-liveness-verification-test/src/assets/images/poses/smile.png +0 -0
  204. package/projects/facecog-liveness-verification-test/src/assets/images/poses/tilt_left.png +0 -0
  205. package/projects/facecog-liveness-verification-test/src/assets/images/poses/tilt_right.png +0 -0
  206. package/projects/facecog-liveness-verification-test/src/assets/images/poses/touch_chin_left.jpg +0 -0
  207. package/projects/facecog-liveness-verification-test/src/assets/images/poses/touch_left_cheek.jpeg +0 -0
  208. package/projects/facecog-liveness-verification-test/src/assets/images/poses/touch_nose_right.png +0 -0
  209. package/projects/facecog-liveness-verification-test/src/assets/images/poses/touch_right_cheek.jpeg +0 -0
  210. package/projects/facecog-liveness-verification-test/src/assets/images/poses/turn_left.png +0 -0
  211. package/projects/facecog-liveness-verification-test/src/assets/images/poses/turn_right.png +0 -0
  212. package/projects/facecog-liveness-verification-test/src/assets/images/poses/wink.jpeg +0 -0
  213. package/projects/facecog-liveness-verification-test/src/assets/images/reference-pose.jpg +0 -0
  214. package/projects/facecog-liveness-verification-test/src/assets/shapes.svg +1 -0
  215. package/projects/facecog-liveness-verification-test/src/environments/environment.prod.ts +4 -0
  216. package/projects/facecog-liveness-verification-test/src/environments/environment.ts +17 -0
  217. package/projects/facecog-liveness-verification-test/src/global.scss +288 -0
  218. package/projects/facecog-liveness-verification-test/src/index.html +31 -0
  219. package/projects/facecog-liveness-verification-test/src/main.ts +6 -0
  220. package/projects/facecog-liveness-verification-test/src/polyfills.ts +55 -0
  221. package/projects/facecog-liveness-verification-test/src/theme/nextsapien-theme.scss +174 -0
  222. package/projects/facecog-liveness-verification-test/src/theme/variables.scss +2 -0
  223. package/projects/facecog-liveness-verification-test/src/zone-flags.ts +6 -0
  224. package/projects/facecog-liveness-verification-test/tsconfig.app.json +15 -0
  225. package/projects/facecog-liveness-verification-test/tsconfig.spec.json +14 -0
  226. package/setup-jest.ts +118 -0
  227. package/tsconfig.json +41 -0
  228. package/tsconfig.spec.json +15 -0
  229. package/vercel.json +24 -0
@@ -0,0 +1,320 @@
1
+ import React, { useState, useEffect, useCallback, useRef } from 'react';
2
+ import { FaceLivenessDetectorCore, AwsCredentialProvider } from '@aws-amplify/ui-react-liveness';
3
+ import { ThemeProvider } from '@aws-amplify/ui-react';
4
+
5
+ export interface FaceLivenessWrapperProps {
6
+ sessionId: string;
7
+ region: string;
8
+ onAnalysisComplete: (result: {
9
+ isLive: boolean;
10
+ confidence: number;
11
+ videoBlob?: Blob;
12
+ startVideoCheckClickedAt?: string;
13
+ recordingStartedAt?: string;
14
+ }) => void;
15
+ onError: (error: Error) => void;
16
+ onUserCancel?: () => void;
17
+ accessKeyId?: string;
18
+ secretAccessKey?: string;
19
+ sessionToken?: string;
20
+ identityPoolId?: string;
21
+ userPoolId?: string;
22
+ userPoolClientId?: string;
23
+ enableVideoRecording?: boolean;
24
+ }
25
+
26
+ const checkBrowserCompatibility = (): { compatible: boolean; message?: string } => {
27
+ if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
28
+ return {
29
+ compatible: false,
30
+ message: 'Your browser does not support camera access. Please use a modern browser like Chrome, Edge, or Safari.'
31
+ };
32
+ }
33
+ return { compatible: true };
34
+ };
35
+
36
+ const FaceLivenessReactWrapper: React.FC<FaceLivenessWrapperProps> = ({
37
+ sessionId,
38
+ region,
39
+ onAnalysisComplete,
40
+ onError,
41
+ onUserCancel,
42
+ accessKeyId,
43
+ secretAccessKey,
44
+ sessionToken,
45
+ enableVideoRecording = true,
46
+ }) => {
47
+ const [isLoading, setIsLoading] = useState(true);
48
+ const [isReady, setIsReady] = useState(false);
49
+ const [error, setError] = useState<string | null>(null);
50
+ const [retryCount, setRetryCount] = useState(0);
51
+
52
+ const mediaRecorderRef = useRef<MediaRecorder | null>(null);
53
+ const recordedChunksRef = useRef<Blob[]>([]);
54
+ const cameraStreamRef = useRef<MediaStream | null>(null);
55
+ const startVideoCheckClickedAtRef = useRef<string | null>(null);
56
+ const recordingStartedAtRef = useRef<string | null>(null);
57
+ const containerRef = useRef<HTMLDivElement | null>(null);
58
+
59
+ const startRecording = useCallback(async () => {
60
+ if (!enableVideoRecording) return;
61
+ try {
62
+ console.log('[FaceLivenessWrapper] Requesting camera for recording...');
63
+ const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
64
+ cameraStreamRef.current = stream;
65
+ recordedChunksRef.current = [];
66
+
67
+ const mimeType = MediaRecorder.isTypeSupported('video/webm;codecs=vp9')
68
+ ? 'video/webm;codecs=vp9'
69
+ : MediaRecorder.isTypeSupported('video/webm')
70
+ ? 'video/webm'
71
+ : 'video/mp4';
72
+
73
+ const recorder = new MediaRecorder(stream, { mimeType });
74
+ recorder.ondataavailable = (e) => {
75
+ if (e.data && e.data.size > 0) recordedChunksRef.current.push(e.data);
76
+ };
77
+ recorder.start(100);
78
+ mediaRecorderRef.current = recorder;
79
+ recordingStartedAtRef.current = new Date().toISOString();
80
+ console.log('[FaceLivenessWrapper] Recording started at', recordingStartedAtRef.current);
81
+ } catch (e: any) {
82
+ const msg = e?.message || String(e);
83
+ console.error('[FaceLivenessWrapper] Failed to start recording:', msg);
84
+ if (msg.includes('NotAllowedError') || msg.includes('Permission denied')) {
85
+ throw new Error('Camera access denied. Please allow camera access in your browser/system settings and try again.');
86
+ } else if (msg.includes('NotFoundError')) {
87
+ throw new Error('No camera found. Please connect a camera and try again.');
88
+ } else if (msg.includes('NotReadableError')) {
89
+ throw new Error('Camera is in use by another application. Please close other apps using the camera.');
90
+ }
91
+ throw new Error(`Camera error: ${msg}. Please check your camera settings and try again.`);
92
+ }
93
+ }, [enableVideoRecording]);
94
+
95
+ const stopRecording = useCallback((): Promise<Blob | undefined> => {
96
+ return new Promise((resolve) => {
97
+ const recorder = mediaRecorderRef.current;
98
+ if (!recorder || recorder.state === 'inactive') {
99
+ resolve(undefined);
100
+ return;
101
+ }
102
+ recorder.onstop = () => {
103
+ const blob = new Blob(recordedChunksRef.current, { type: recorder.mimeType || 'video/webm' });
104
+ console.log('[FaceLivenessWrapper] Recording stopped, size:', (blob.size / 1024 / 1024).toFixed(2), 'MB');
105
+ resolve(blob);
106
+ };
107
+ recorder.stop();
108
+ if (cameraStreamRef.current) {
109
+ cameraStreamRef.current.getTracks().forEach(t => t.stop());
110
+ cameraStreamRef.current = null;
111
+ }
112
+ });
113
+ }, []);
114
+
115
+ useEffect(() => {
116
+ const initializeComponent = async () => {
117
+ const compatibility = checkBrowserCompatibility();
118
+ if (!compatibility.compatible) {
119
+ const msg = compatibility.message || 'Browser not compatible';
120
+ setError(msg);
121
+ setIsLoading(false);
122
+ onError(new Error(msg));
123
+ return;
124
+ }
125
+ try {
126
+ await startRecording();
127
+ if (!recordingStartedAtRef.current && enableVideoRecording) {
128
+ throw new Error('Recording failed to initialize. Please check camera permissions.');
129
+ }
130
+ setIsReady(true);
131
+ setIsLoading(false);
132
+ } catch (e: any) {
133
+ const msg = e.message || 'Failed to initialize camera';
134
+ setError(msg);
135
+ setIsLoading(false);
136
+ onError(new Error(msg));
137
+ }
138
+ };
139
+ initializeComponent();
140
+
141
+ return () => {
142
+ if (mediaRecorderRef.current && mediaRecorderRef.current.state !== 'inactive') {
143
+ mediaRecorderRef.current.stop();
144
+ }
145
+ if (cameraStreamRef.current) {
146
+ cameraStreamRef.current.getTracks().forEach(t => t.stop());
147
+ }
148
+ };
149
+ }, [sessionId, retryCount, startRecording]);
150
+
151
+ useEffect(() => {
152
+ if (!isReady || !containerRef.current) return;
153
+
154
+ const observer = new MutationObserver(() => {
155
+ const container = containerRef.current;
156
+ if (!container) return;
157
+
158
+ const startBtn = container.querySelector<HTMLButtonElement>(
159
+ 'button.amplify-button--primary, button[class*="StartButton"], button[data-amplify-liveness-start]'
160
+ );
161
+ if (startBtn && !startBtn.dataset['clickTracked']) {
162
+ startBtn.dataset['clickTracked'] = 'true';
163
+ startBtn.addEventListener('click', () => {
164
+ startVideoCheckClickedAtRef.current = new Date().toISOString();
165
+ console.log('[FaceLivenessWrapper] "Start video check" clicked at', startVideoCheckClickedAtRef.current);
166
+ }, { once: true });
167
+ }
168
+ });
169
+
170
+ observer.observe(containerRef.current, { childList: true, subtree: true });
171
+ return () => observer.disconnect();
172
+ }, [isReady]);
173
+
174
+ const credentialsProvider: AwsCredentialProvider = useCallback(async () => {
175
+ if (accessKeyId && secretAccessKey) {
176
+ return { accessKeyId, secretAccessKey, sessionToken };
177
+ }
178
+ throw new Error('No AWS credentials available. Please provide credentials via props.');
179
+ }, [accessKeyId, secretAccessKey, sessionToken]);
180
+
181
+ const handleAnalysisComplete = useCallback(async () => {
182
+ const videoBlob = await stopRecording();
183
+ console.log('[FaceLivenessWrapper] Analysis complete. videoBlob:', videoBlob ? `${(videoBlob.size / 1024 / 1024).toFixed(2)} MB` : 'NONE',
184
+ 'recordingStartedAt:', recordingStartedAtRef.current,
185
+ 'startVideoCheckClickedAt:', startVideoCheckClickedAtRef.current);
186
+
187
+ if (enableVideoRecording && (!videoBlob || videoBlob.size === 0)) {
188
+ console.warn('[FaceLivenessWrapper] WARNING: Video recording was enabled but no video blob was captured');
189
+ }
190
+
191
+ onAnalysisComplete({
192
+ isLive: true,
193
+ confidence: 0,
194
+ videoBlob,
195
+ startVideoCheckClickedAt: startVideoCheckClickedAtRef.current || undefined,
196
+ recordingStartedAt: recordingStartedAtRef.current || undefined,
197
+ });
198
+ }, [onAnalysisComplete, stopRecording, enableVideoRecording]);
199
+
200
+ const handleError = useCallback((livenessError: any) => {
201
+ let errorMessage = 'Face liveness detection failed';
202
+ if (livenessError?.error?.message) {
203
+ errorMessage = livenessError.error.message;
204
+ } else if (livenessError?.message) {
205
+ errorMessage = livenessError.message;
206
+ }
207
+ if (errorMessage.includes('Invalid constraint') || errorMessage.includes('OverconstrainedError')) {
208
+ errorMessage = 'Camera settings not supported. Please try Chrome or Edge.';
209
+ } else if (errorMessage.includes('NotAllowedError') || errorMessage.includes('Permission denied')) {
210
+ errorMessage = 'Camera access denied. Please allow camera and try again.';
211
+ } else if (errorMessage.includes('NotFoundError')) {
212
+ errorMessage = 'No camera found.';
213
+ } else if (errorMessage.includes('NotReadableError')) {
214
+ errorMessage = 'Camera is in use by another application.';
215
+ }
216
+ stopRecording();
217
+ setError(errorMessage);
218
+ onError(new Error(errorMessage));
219
+ }, [onError, stopRecording]);
220
+
221
+ const handleUserCancel = useCallback(() => {
222
+ stopRecording();
223
+ if (onUserCancel) onUserCancel();
224
+ }, [onUserCancel, stopRecording]);
225
+
226
+ const handleRetry = useCallback(() => {
227
+ setError(null);
228
+ setIsLoading(true);
229
+ setIsReady(false);
230
+ startVideoCheckClickedAtRef.current = null;
231
+ recordingStartedAtRef.current = null;
232
+ setRetryCount(prev => prev + 1);
233
+ }, []);
234
+
235
+ if (isLoading) {
236
+ return (
237
+ <div className="face-liveness-loading" style={{
238
+ display: 'flex', flexDirection: 'column', alignItems: 'center',
239
+ justifyContent: 'center', height: '100%', color: '#fff',
240
+ padding: '20px', textAlign: 'center'
241
+ }}>
242
+ <div className="spinner" style={{
243
+ width: '48px', height: '48px',
244
+ border: '4px solid rgba(255,255,255,0.3)', borderTopColor: '#fff',
245
+ borderRadius: '50%', animation: 'spin 1s linear infinite'
246
+ }}></div>
247
+ <p style={{ marginTop: '16px' }}>Preparing camera for liveness check...</p>
248
+ <style>{`@keyframes spin { to { transform: rotate(360deg); } }`}</style>
249
+ </div>
250
+ );
251
+ }
252
+
253
+ if (error) {
254
+ return (
255
+ <div className="face-liveness-error" style={{
256
+ display: 'flex', flexDirection: 'column', alignItems: 'center',
257
+ justifyContent: 'center', height: '100%', color: '#fff',
258
+ padding: '20px', textAlign: 'center'
259
+ }}>
260
+ <div style={{ fontSize: '48px', marginBottom: '16px' }}>&#x26A0;&#xFE0F;</div>
261
+ <p style={{ fontSize: '16px', marginBottom: '8px' }}>{error}</p>
262
+ <p style={{ fontSize: '14px', color: '#999', marginBottom: '20px' }}>
263
+ Try using Chrome or Edge for best compatibility.
264
+ </p>
265
+ <button onClick={handleRetry} style={{
266
+ padding: '12px 24px', fontSize: '16px', backgroundColor: '#007bff',
267
+ color: '#fff', border: 'none', borderRadius: '8px', cursor: 'pointer'
268
+ }}>Retry</button>
269
+ </div>
270
+ );
271
+ }
272
+
273
+ if (!isReady) return null;
274
+
275
+ return (
276
+ <ThemeProvider>
277
+ <div ref={containerRef} className="face-liveness-container" style={{ width: '100%', height: '100%' }}>
278
+ <FaceLivenessDetectorCore
279
+ sessionId={sessionId}
280
+ region={region}
281
+ onAnalysisComplete={handleAnalysisComplete}
282
+ onError={handleError}
283
+ onUserCancel={handleUserCancel}
284
+ config={{ credentialProvider: credentialsProvider }}
285
+ displayText={{
286
+ hintCenterFaceText: 'Center your face in the oval',
287
+ hintTooCloseText: 'Move back',
288
+ hintTooFarText: 'Move closer',
289
+ hintHoldFaceForFreshnessText: 'Hold still',
290
+ hintConnectingText: 'Connecting...',
291
+ hintVerifyingText: 'Verifying...',
292
+ hintCheckCompleteText: 'Check complete',
293
+ hintIlluminationNormalText: 'Good lighting',
294
+ hintIlluminationTooBrightText: 'Too bright',
295
+ hintIlluminationTooDarkText: 'Too dark',
296
+ hintFaceDetectedText: 'Face detected',
297
+ hintCanNotIdentifyText: 'Cannot identify face',
298
+ hintMatchIndicatorText: 'Match: ',
299
+ photosensitivityWarningHeadingText: 'Photosensitivity Warning',
300
+ photosensitivityWarningBodyText: 'This check flashes different colors. Use caution if you are photosensitive.',
301
+ photosensitivityWarningInfoText: 'Some people may experience seizures when exposed to flashing lights.',
302
+ photosensitivyWarningLabelText: 'I understand',
303
+ startScreenBeginCheckText: 'Start video check',
304
+ goodFitCaptionText: 'Good fit',
305
+ goodFitAltText: 'Face fits well in the oval',
306
+ tooFarCaptionText: 'Too far',
307
+ tooFarAltText: 'Face is too far from camera',
308
+ cameraMinSpecificationsHeadingText: 'Camera does not meet requirements',
309
+ cameraMinSpecificationsMessageText: 'Please use a device with a camera that supports at least 320x240 resolution.',
310
+ cameraNotFoundHeadingText: 'Camera not found',
311
+ cameraNotFoundMessageText: 'Please ensure a camera is connected.',
312
+ retryCameraPermissionsText: 'Allow camera access',
313
+ }}
314
+ />
315
+ </div>
316
+ </ThemeProvider>
317
+ );
318
+ };
319
+
320
+ export default FaceLivenessReactWrapper;
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Type declaration for the pre-built React wrapper (compiled from sources/FaceLivenessReactWrapper.tsx).
3
+ */
4
+ import type { FC } from 'react';
5
+
6
+ export interface FaceLivenessWrapperProps {
7
+ sessionId: string;
8
+ region: string;
9
+ onAnalysisComplete: (result: {
10
+ isLive: boolean;
11
+ confidence: number;
12
+ videoBlob?: Blob;
13
+ startVideoCheckClickedAt?: string;
14
+ recordingStartedAt?: string;
15
+ }) => void;
16
+ onError: (error: Error) => void;
17
+ onUserCancel?: () => void;
18
+ accessKeyId?: string;
19
+ secretAccessKey?: string;
20
+ sessionToken?: string;
21
+ identityPoolId?: string;
22
+ userPoolId?: string;
23
+ userPoolClientId?: string;
24
+ enableVideoRecording?: boolean;
25
+ }
26
+
27
+ declare const FaceLivenessReactWrapper: FC<FaceLivenessWrapperProps>;
28
+ export default FaceLivenessReactWrapper;
@@ -0,0 +1,247 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useEffect, useCallback, useRef } from 'react';
3
+ import { FaceLivenessDetectorCore } from '@aws-amplify/ui-react-liveness';
4
+ import { ThemeProvider } from '@aws-amplify/ui-react';
5
+ const checkBrowserCompatibility = () => {
6
+ if (!navigator.mediaDevices || !navigator.mediaDevices.getUserMedia) {
7
+ return {
8
+ compatible: false,
9
+ message: 'Your browser does not support camera access. Please use a modern browser like Chrome, Edge, or Safari.'
10
+ };
11
+ }
12
+ return { compatible: true };
13
+ };
14
+ const FaceLivenessReactWrapper = ({ sessionId, region, onAnalysisComplete, onError, onUserCancel, accessKeyId, secretAccessKey, sessionToken, enableVideoRecording = true, }) => {
15
+ const [isLoading, setIsLoading] = useState(true);
16
+ const [isReady, setIsReady] = useState(false);
17
+ const [error, setError] = useState(null);
18
+ const [retryCount, setRetryCount] = useState(0);
19
+ const mediaRecorderRef = useRef(null);
20
+ const recordedChunksRef = useRef([]);
21
+ const cameraStreamRef = useRef(null);
22
+ const startVideoCheckClickedAtRef = useRef(null);
23
+ const recordingStartedAtRef = useRef(null);
24
+ const containerRef = useRef(null);
25
+ const startRecording = useCallback(async () => {
26
+ if (!enableVideoRecording)
27
+ return;
28
+ try {
29
+ console.log('[FaceLivenessWrapper] Requesting camera for recording...');
30
+ const stream = await navigator.mediaDevices.getUserMedia({ video: true, audio: false });
31
+ cameraStreamRef.current = stream;
32
+ recordedChunksRef.current = [];
33
+ const mimeType = MediaRecorder.isTypeSupported('video/webm;codecs=vp9')
34
+ ? 'video/webm;codecs=vp9'
35
+ : MediaRecorder.isTypeSupported('video/webm')
36
+ ? 'video/webm'
37
+ : 'video/mp4';
38
+ const recorder = new MediaRecorder(stream, { mimeType });
39
+ recorder.ondataavailable = (e) => {
40
+ if (e.data && e.data.size > 0)
41
+ recordedChunksRef.current.push(e.data);
42
+ };
43
+ recorder.start(100);
44
+ mediaRecorderRef.current = recorder;
45
+ recordingStartedAtRef.current = new Date().toISOString();
46
+ console.log('[FaceLivenessWrapper] Recording started at', recordingStartedAtRef.current);
47
+ }
48
+ catch (e) {
49
+ const msg = e?.message || String(e);
50
+ console.error('[FaceLivenessWrapper] Failed to start recording:', msg);
51
+ if (msg.includes('NotAllowedError') || msg.includes('Permission denied')) {
52
+ throw new Error('Camera access denied. Please allow camera access in your browser/system settings and try again.');
53
+ }
54
+ else if (msg.includes('NotFoundError')) {
55
+ throw new Error('No camera found. Please connect a camera and try again.');
56
+ }
57
+ else if (msg.includes('NotReadableError')) {
58
+ throw new Error('Camera is in use by another application. Please close other apps using the camera.');
59
+ }
60
+ throw new Error(`Camera error: ${msg}. Please check your camera settings and try again.`);
61
+ }
62
+ }, [enableVideoRecording]);
63
+ const stopRecording = useCallback(() => {
64
+ return new Promise((resolve) => {
65
+ const recorder = mediaRecorderRef.current;
66
+ if (!recorder || recorder.state === 'inactive') {
67
+ resolve(undefined);
68
+ return;
69
+ }
70
+ recorder.onstop = () => {
71
+ const blob = new Blob(recordedChunksRef.current, { type: recorder.mimeType || 'video/webm' });
72
+ console.log('[FaceLivenessWrapper] Recording stopped, size:', (blob.size / 1024 / 1024).toFixed(2), 'MB');
73
+ resolve(blob);
74
+ };
75
+ recorder.stop();
76
+ if (cameraStreamRef.current) {
77
+ cameraStreamRef.current.getTracks().forEach(t => t.stop());
78
+ cameraStreamRef.current = null;
79
+ }
80
+ });
81
+ }, []);
82
+ useEffect(() => {
83
+ const initializeComponent = async () => {
84
+ const compatibility = checkBrowserCompatibility();
85
+ if (!compatibility.compatible) {
86
+ const msg = compatibility.message || 'Browser not compatible';
87
+ setError(msg);
88
+ setIsLoading(false);
89
+ onError(new Error(msg));
90
+ return;
91
+ }
92
+ try {
93
+ await startRecording();
94
+ if (!recordingStartedAtRef.current && enableVideoRecording) {
95
+ throw new Error('Recording failed to initialize. Please check camera permissions.');
96
+ }
97
+ setIsReady(true);
98
+ setIsLoading(false);
99
+ }
100
+ catch (e) {
101
+ const msg = e.message || 'Failed to initialize camera';
102
+ setError(msg);
103
+ setIsLoading(false);
104
+ onError(new Error(msg));
105
+ }
106
+ };
107
+ initializeComponent();
108
+ return () => {
109
+ if (mediaRecorderRef.current && mediaRecorderRef.current.state !== 'inactive') {
110
+ mediaRecorderRef.current.stop();
111
+ }
112
+ if (cameraStreamRef.current) {
113
+ cameraStreamRef.current.getTracks().forEach(t => t.stop());
114
+ }
115
+ };
116
+ }, [sessionId, retryCount, startRecording]);
117
+ useEffect(() => {
118
+ if (!isReady || !containerRef.current)
119
+ return;
120
+ const observer = new MutationObserver(() => {
121
+ const container = containerRef.current;
122
+ if (!container)
123
+ return;
124
+ const startBtn = container.querySelector('button.amplify-button--primary, button[class*="StartButton"], button[data-amplify-liveness-start]');
125
+ if (startBtn && !startBtn.dataset['clickTracked']) {
126
+ startBtn.dataset['clickTracked'] = 'true';
127
+ startBtn.addEventListener('click', () => {
128
+ startVideoCheckClickedAtRef.current = new Date().toISOString();
129
+ console.log('[FaceLivenessWrapper] "Start video check" clicked at', startVideoCheckClickedAtRef.current);
130
+ }, { once: true });
131
+ }
132
+ });
133
+ observer.observe(containerRef.current, { childList: true, subtree: true });
134
+ return () => observer.disconnect();
135
+ }, [isReady]);
136
+ const credentialsProvider = useCallback(async () => {
137
+ if (accessKeyId && secretAccessKey) {
138
+ return { accessKeyId, secretAccessKey, sessionToken };
139
+ }
140
+ throw new Error('No AWS credentials available. Please provide credentials via props.');
141
+ }, [accessKeyId, secretAccessKey, sessionToken]);
142
+ const handleAnalysisComplete = useCallback(async () => {
143
+ const videoBlob = await stopRecording();
144
+ console.log('[FaceLivenessWrapper] Analysis complete. videoBlob:', videoBlob ? `${(videoBlob.size / 1024 / 1024).toFixed(2)} MB` : 'NONE', 'recordingStartedAt:', recordingStartedAtRef.current, 'startVideoCheckClickedAt:', startVideoCheckClickedAtRef.current);
145
+ if (enableVideoRecording && (!videoBlob || videoBlob.size === 0)) {
146
+ console.warn('[FaceLivenessWrapper] WARNING: Video recording was enabled but no video blob was captured');
147
+ }
148
+ onAnalysisComplete({
149
+ isLive: true,
150
+ confidence: 0,
151
+ videoBlob,
152
+ startVideoCheckClickedAt: startVideoCheckClickedAtRef.current || undefined,
153
+ recordingStartedAt: recordingStartedAtRef.current || undefined,
154
+ });
155
+ }, [onAnalysisComplete, stopRecording, enableVideoRecording]);
156
+ const handleError = useCallback((livenessError) => {
157
+ let errorMessage = 'Face liveness detection failed';
158
+ if (livenessError?.error?.message) {
159
+ errorMessage = livenessError.error.message;
160
+ }
161
+ else if (livenessError?.message) {
162
+ errorMessage = livenessError.message;
163
+ }
164
+ if (errorMessage.includes('Invalid constraint') || errorMessage.includes('OverconstrainedError')) {
165
+ errorMessage = 'Camera settings not supported. Please try Chrome or Edge.';
166
+ }
167
+ else if (errorMessage.includes('NotAllowedError') || errorMessage.includes('Permission denied')) {
168
+ errorMessage = 'Camera access denied. Please allow camera and try again.';
169
+ }
170
+ else if (errorMessage.includes('NotFoundError')) {
171
+ errorMessage = 'No camera found.';
172
+ }
173
+ else if (errorMessage.includes('NotReadableError')) {
174
+ errorMessage = 'Camera is in use by another application.';
175
+ }
176
+ stopRecording();
177
+ setError(errorMessage);
178
+ onError(new Error(errorMessage));
179
+ }, [onError, stopRecording]);
180
+ const handleUserCancel = useCallback(() => {
181
+ stopRecording();
182
+ if (onUserCancel)
183
+ onUserCancel();
184
+ }, [onUserCancel, stopRecording]);
185
+ const handleRetry = useCallback(() => {
186
+ setError(null);
187
+ setIsLoading(true);
188
+ setIsReady(false);
189
+ startVideoCheckClickedAtRef.current = null;
190
+ recordingStartedAtRef.current = null;
191
+ setRetryCount(prev => prev + 1);
192
+ }, []);
193
+ if (isLoading) {
194
+ return (_jsxs("div", { className: "face-liveness-loading", style: {
195
+ display: 'flex', flexDirection: 'column', alignItems: 'center',
196
+ justifyContent: 'center', height: '100%', color: '#fff',
197
+ padding: '20px', textAlign: 'center'
198
+ }, children: [_jsx("div", { className: "spinner", style: {
199
+ width: '48px', height: '48px',
200
+ border: '4px solid rgba(255,255,255,0.3)', borderTopColor: '#fff',
201
+ borderRadius: '50%', animation: 'spin 1s linear infinite'
202
+ } }), _jsx("p", { style: { marginTop: '16px' }, children: "Preparing camera for liveness check..." }), _jsx("style", { children: `@keyframes spin { to { transform: rotate(360deg); } }` })] }));
203
+ }
204
+ if (error) {
205
+ return (_jsxs("div", { className: "face-liveness-error", style: {
206
+ display: 'flex', flexDirection: 'column', alignItems: 'center',
207
+ justifyContent: 'center', height: '100%', color: '#fff',
208
+ padding: '20px', textAlign: 'center'
209
+ }, children: [_jsx("div", { style: { fontSize: '48px', marginBottom: '16px' }, children: "\u26A0\uFE0F" }), _jsx("p", { style: { fontSize: '16px', marginBottom: '8px' }, children: error }), _jsx("p", { style: { fontSize: '14px', color: '#999', marginBottom: '20px' }, children: "Try using Chrome or Edge for best compatibility." }), _jsx("button", { onClick: handleRetry, style: {
210
+ padding: '12px 24px', fontSize: '16px', backgroundColor: '#007bff',
211
+ color: '#fff', border: 'none', borderRadius: '8px', cursor: 'pointer'
212
+ }, children: "Retry" })] }));
213
+ }
214
+ if (!isReady)
215
+ return null;
216
+ return (_jsx(ThemeProvider, { children: _jsx("div", { ref: containerRef, className: "face-liveness-container", style: { width: '100%', height: '100%' }, children: _jsx(FaceLivenessDetectorCore, { sessionId: sessionId, region: region, onAnalysisComplete: handleAnalysisComplete, onError: handleError, onUserCancel: handleUserCancel, config: { credentialProvider: credentialsProvider }, displayText: {
217
+ hintCenterFaceText: 'Center your face in the oval',
218
+ hintTooCloseText: 'Move back',
219
+ hintTooFarText: 'Move closer',
220
+ hintHoldFaceForFreshnessText: 'Hold still',
221
+ hintConnectingText: 'Connecting...',
222
+ hintVerifyingText: 'Verifying...',
223
+ hintCheckCompleteText: 'Check complete',
224
+ hintIlluminationNormalText: 'Good lighting',
225
+ hintIlluminationTooBrightText: 'Too bright',
226
+ hintIlluminationTooDarkText: 'Too dark',
227
+ hintFaceDetectedText: 'Face detected',
228
+ hintCanNotIdentifyText: 'Cannot identify face',
229
+ hintMatchIndicatorText: 'Match: ',
230
+ photosensitivityWarningHeadingText: 'Photosensitivity Warning',
231
+ photosensitivityWarningBodyText: 'This check flashes different colors. Use caution if you are photosensitive.',
232
+ photosensitivityWarningInfoText: 'Some people may experience seizures when exposed to flashing lights.',
233
+ photosensitivyWarningLabelText: 'I understand',
234
+ startScreenBeginCheckText: 'Start video check',
235
+ goodFitCaptionText: 'Good fit',
236
+ goodFitAltText: 'Face fits well in the oval',
237
+ tooFarCaptionText: 'Too far',
238
+ tooFarAltText: 'Face is too far from camera',
239
+ cameraMinSpecificationsHeadingText: 'Camera does not meet requirements',
240
+ cameraMinSpecificationsMessageText: 'Please use a device with a camera that supports at least 320x240 resolution.',
241
+ cameraNotFoundHeadingText: 'Camera not found',
242
+ cameraNotFoundMessageText: 'Please ensure a camera is connected.',
243
+ retryCameraPermissionsText: 'Allow camera access',
244
+ } }) }) }));
245
+ };
246
+ export default FaceLivenessReactWrapper;
247
+ //# sourceMappingURL=FaceLivenessReactWrapper.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FaceLivenessReactWrapper.js","sourceRoot":"","sources":["../../../../sources/FaceLivenessReactWrapper.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAyB,MAAM,gCAAgC,CAAC;AAgBjG,MAAM,4BAA4B,GAAG,KAAK,IAAmB,EAAE;IAC7D,IAAI,CAAC;QACH,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,YAAY,CAAC,YAAY,CAAC;YAC3D,KAAK,EAAE,IAAI;YACX,KAAK,EAAE,KAAK;SACb,CAAC,CAAC;QACH,UAAU,CAA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AqB;iBAClD,GACD,GACE,GACQ,CACjB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Re-export the pre-built React wrapper (compiled from sources/FaceLivenessReactWrapper.tsx).
3
+ * This allows the lib to bundle the wrapper without compiling .tsx in the main build.
4
+ */
5
+ export { default } from './FaceLivenessReactWrapper.generated.js';