@privateid/ultrapass-web-sdk 1.2.0 → 1.3.1-1300478

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 (237) hide show
  1. package/README.md +75 -75
  2. package/dist/apiUtils.d.ts +46 -46
  3. package/dist/apiUtils.js +922 -921
  4. package/dist/apiUtils.js.map +1 -1
  5. package/dist/application/index.d.ts +7 -7
  6. package/dist/application/index.js +27 -25
  7. package/dist/application/index.js.map +1 -1
  8. package/dist/application/modules/core/document/DocumentService.d.ts +22 -22
  9. package/dist/application/modules/core/document/DocumentService.js +254 -254
  10. package/dist/application/modules/core/document/document.constants.d.ts +15 -15
  11. package/dist/application/modules/core/document/document.constants.js +21 -21
  12. package/dist/application/modules/core/document/document.domain.d.ts +7 -7
  13. package/dist/application/modules/core/document/document.domain.js +1 -1
  14. package/dist/application/modules/core/document/document.types.d.ts +17 -17
  15. package/dist/application/modules/core/document/document.types.js +1 -1
  16. package/dist/application/modules/core/document/document.utils.d.ts +3 -3
  17. package/dist/application/modules/core/document/document.utils.js +58 -58
  18. package/dist/application/modules/core/document/index.d.ts +3 -3
  19. package/dist/application/modules/core/document/index.js +1 -1
  20. package/dist/application/modules/core/face/FaceService.d.ts +33 -33
  21. package/dist/application/modules/core/face/FaceService.js +228 -221
  22. package/dist/application/modules/core/face/FaceService.js.map +1 -1
  23. package/dist/application/modules/core/face/face.constants.d.ts +53 -53
  24. package/dist/application/modules/core/face/face.constants.js +53 -53
  25. package/dist/application/modules/core/face/face.domain.d.ts +10 -10
  26. package/dist/application/modules/core/face/face.domain.js +1 -1
  27. package/dist/application/modules/core/face/face.types.d.ts +41 -38
  28. package/dist/application/modules/core/face/face.types.js +1 -1
  29. package/dist/application/modules/core/face/face.utils.d.ts +15 -15
  30. package/dist/application/modules/core/face/face.utils.js +101 -101
  31. package/dist/application/modules/core/face/index.d.ts +3 -3
  32. package/dist/application/modules/core/face/index.js +1 -1
  33. package/dist/application/modules/global/shared.constants.d.ts +2 -2
  34. package/dist/application/modules/global/shared.constants.js +2 -2
  35. package/dist/application/modules/global/shared.utils.d.ts +25 -25
  36. package/dist/application/modules/global/shared.utils.js +100 -100
  37. package/dist/application/modules/global/shared.utils.js.map +1 -1
  38. package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.d.ts +9 -0
  39. package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js +32 -0
  40. package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js.map +1 -0
  41. package/dist/application/modules/internal/feature-flag/feature-flag-init.d.ts +11 -0
  42. package/dist/application/modules/internal/feature-flag/feature-flag-init.js +24 -0
  43. package/dist/application/modules/internal/feature-flag/feature-flag-init.js.map +1 -0
  44. package/dist/application/modules/internal/feature-flag/feature-flag.domain.d.ts +10 -0
  45. package/dist/application/modules/internal/feature-flag/feature-flag.domain.js +7 -0
  46. package/dist/application/modules/internal/feature-flag/feature-flag.domain.js.map +1 -0
  47. package/dist/application/modules/internal/feature-flag/featureFlagInit.d.ts +11 -0
  48. package/dist/application/modules/internal/feature-flag/featureFlagInit.js +44 -0
  49. package/dist/application/modules/internal/feature-flag/featureFlagInit.js.map +1 -0
  50. package/dist/application/modules/internal/feature-flag/index.d.ts +2 -0
  51. package/dist/application/modules/internal/feature-flag/index.js +3 -0
  52. package/dist/application/modules/internal/feature-flag/index.js.map +1 -0
  53. package/dist/application/modules/internal/shared/index.d.ts +2 -0
  54. package/dist/application/modules/internal/shared/index.js +3 -0
  55. package/dist/application/modules/internal/shared/index.js.map +1 -0
  56. package/dist/application/modules/internal/shared/shared.constants.d.ts +2 -0
  57. package/dist/application/modules/internal/shared/shared.constants.js +3 -0
  58. package/dist/application/modules/internal/shared/shared.constants.js.map +1 -0
  59. package/dist/application/modules/internal/shared/shared.utils.d.ts +44 -0
  60. package/dist/application/modules/internal/shared/shared.utils.js +204 -0
  61. package/dist/application/modules/internal/shared/shared.utils.js.map +1 -0
  62. package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
  63. package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js +380 -0
  64. package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
  65. package/dist/application/modules/internal/wasm-orchestrator/index.d.ts +6 -0
  66. package/dist/application/modules/internal/wasm-orchestrator/index.js +9 -0
  67. package/dist/application/modules/internal/wasm-orchestrator/index.js.map +1 -0
  68. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.d.ts +28 -0
  69. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js +35 -0
  70. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
  71. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.d.ts +51 -0
  72. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
  73. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
  74. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.d.ts +142 -0
  75. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
  76. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
  77. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.d.ts +86 -0
  78. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js +201 -0
  79. package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
  80. package/dist/application/modules/support/camera/CameraServiceFactory.d.ts +10 -8
  81. package/dist/application/modules/support/camera/CameraServiceFactory.js +33 -32
  82. package/dist/application/modules/support/camera/CameraServiceFactory.js.map +1 -1
  83. package/dist/application/modules/support/camera/camera.constants.d.ts +9 -9
  84. package/dist/application/modules/support/camera/camera.constants.js +48 -48
  85. package/dist/application/modules/support/camera/camera.domain.d.ts +15 -15
  86. package/dist/application/modules/support/camera/camera.domain.js +1 -1
  87. package/dist/application/modules/support/camera/camera.types.d.ts +42 -42
  88. package/dist/application/modules/support/camera/camera.types.js +10 -10
  89. package/dist/application/modules/support/camera/camera.utils.d.ts +157 -157
  90. package/dist/application/modules/support/camera/camera.utils.js +623 -637
  91. package/dist/application/modules/support/camera/camera.utils.js.map +1 -1
  92. package/dist/application/modules/support/camera/index.d.ts +24 -25
  93. package/dist/application/modules/support/camera/index.js +27 -29
  94. package/dist/application/modules/support/camera/index.js.map +1 -1
  95. package/dist/application/modules/support/camera/services/BaseCameraService.d.ts +41 -37
  96. package/dist/application/modules/support/camera/services/BaseCameraService.js +278 -277
  97. package/dist/application/modules/support/camera/services/BaseCameraService.js.map +1 -1
  98. package/dist/application/modules/support/camera/services/DesktopCameraService.d.ts +5 -5
  99. package/dist/application/modules/support/camera/services/DesktopCameraService.js +46 -45
  100. package/dist/application/modules/support/camera/services/DesktopCameraService.js.map +1 -1
  101. package/dist/application/modules/support/camera/services/FirefoxCameraService.d.ts +5 -5
  102. package/dist/application/modules/support/camera/services/FirefoxCameraService.js +46 -45
  103. package/dist/application/modules/support/camera/services/FirefoxCameraService.js.map +1 -1
  104. package/dist/application/modules/support/camera/services/MacSafariCameraService.d.ts +5 -5
  105. package/dist/application/modules/support/camera/services/MacSafariCameraService.js +47 -46
  106. package/dist/application/modules/support/camera/services/MacSafariCameraService.js.map +1 -1
  107. package/dist/application/modules/support/camera/services/MobileCameraService.d.ts +5 -5
  108. package/dist/application/modules/support/camera/services/MobileCameraService.js +133 -129
  109. package/dist/application/modules/support/camera/services/MobileCameraService.js.map +1 -1
  110. package/dist/application/modules/support/engine/EngineService.d.ts +15 -0
  111. package/dist/application/modules/support/engine/EngineService.js +106 -0
  112. package/dist/application/modules/support/engine/EngineService.js.map +1 -0
  113. package/dist/application/modules/support/engine/engine.constants.d.ts +33 -0
  114. package/dist/application/modules/support/engine/engine.constants.js +35 -0
  115. package/dist/application/modules/support/engine/engine.constants.js.map +1 -0
  116. package/dist/application/modules/support/engine/engine.domain.d.ts +23 -0
  117. package/dist/application/modules/support/engine/engine.domain.js +2 -0
  118. package/dist/application/modules/support/engine/engine.domain.js.map +1 -0
  119. package/dist/application/modules/support/engine/engine.types.d.ts +32 -0
  120. package/dist/application/modules/support/engine/engine.types.js +2 -0
  121. package/dist/application/modules/support/engine/engine.types.js.map +1 -0
  122. package/dist/application/modules/support/engine/engine.utils.d.ts +65 -0
  123. package/dist/application/modules/support/engine/engine.utils.js +135 -0
  124. package/dist/application/modules/support/engine/engine.utils.js.map +1 -0
  125. package/dist/application/modules/support/engine/index.d.ts +3 -0
  126. package/dist/application/modules/support/engine/index.js +2 -0
  127. package/dist/application/modules/support/engine/index.js.map +1 -0
  128. package/dist/application/modules/support/permissions/PermissionsService.d.ts +55 -0
  129. package/dist/application/modules/support/permissions/PermissionsService.js +184 -0
  130. package/dist/application/modules/support/permissions/PermissionsService.js.map +1 -0
  131. package/dist/application/modules/support/permissions/index.d.ts +4 -0
  132. package/dist/application/modules/support/permissions/index.js +3 -0
  133. package/dist/application/modules/support/permissions/index.js.map +1 -0
  134. package/dist/application/modules/support/permissions/permission.utils.d.ts +6 -0
  135. package/dist/application/modules/support/permissions/permission.utils.js +34 -0
  136. package/dist/application/modules/support/permissions/permission.utils.js.map +1 -0
  137. package/dist/application/modules/support/permissions/permissions.domain.d.ts +6 -0
  138. package/dist/application/modules/support/permissions/permissions.domain.js +2 -0
  139. package/dist/application/modules/support/permissions/permissions.domain.js.map +1 -0
  140. package/dist/application/modules/support/permissions/permissions.types.d.ts +9 -0
  141. package/dist/application/modules/support/permissions/permissions.types.js +2 -0
  142. package/dist/application/modules/support/permissions/permissions.types.js.map +1 -0
  143. package/dist/application/modules/support/wasm/WasmService.d.ts +25 -25
  144. package/dist/application/modules/support/wasm/WasmService.js +156 -155
  145. package/dist/application/modules/support/wasm/WasmService.js.map +1 -1
  146. package/dist/application/modules/support/wasm/index.d.ts +6 -6
  147. package/dist/application/modules/support/wasm/index.js +8 -8
  148. package/dist/application/modules/support/wasm/wasm.constants.d.ts +78 -78
  149. package/dist/application/modules/support/wasm/wasm.constants.js +86 -86
  150. package/dist/application/modules/support/wasm/wasm.domain.d.ts +52 -52
  151. package/dist/application/modules/support/wasm/wasm.domain.js +1 -1
  152. package/dist/application/modules/support/wasm/wasm.types.d.ts +119 -118
  153. package/dist/application/modules/support/wasm/wasm.types.js +1 -1
  154. package/dist/application/modules/support/wasm/wasm.utils.d.ts +88 -88
  155. package/dist/application/modules/support/wasm/wasm.utils.js +243 -243
  156. package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
  157. package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js +324 -0
  158. package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
  159. package/dist/application/modules/support/wasm-orchestrator/index.d.ts +6 -0
  160. package/dist/application/modules/support/wasm-orchestrator/index.js +9 -0
  161. package/dist/application/modules/support/wasm-orchestrator/index.js.map +1 -0
  162. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.d.ts +36 -0
  163. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js +44 -0
  164. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
  165. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.d.ts +47 -0
  166. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
  167. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
  168. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.d.ts +136 -0
  169. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
  170. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
  171. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.d.ts +91 -0
  172. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js +250 -0
  173. package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
  174. package/dist/application/workers/index.d.ts +42 -42
  175. package/dist/application/workers/index.js +8 -8
  176. package/dist/application/workers/wasm/WasmWorkerService.d.ts +66 -0
  177. package/dist/application/workers/wasm/WasmWorkerService.js +801 -0
  178. package/dist/application/workers/wasm/WasmWorkerService.js.map +1 -0
  179. package/dist/application/workers/wasm/index.d.ts +4 -0
  180. package/dist/application/workers/wasm/index.js +9 -0
  181. package/dist/application/workers/wasm/index.js.map +1 -0
  182. package/dist/application/workers/wasm/wasm-worker.constants.d.ts +5 -0
  183. package/dist/application/workers/wasm/wasm-worker.constants.js +6 -0
  184. package/dist/application/workers/wasm/wasm-worker.constants.js.map +1 -0
  185. package/dist/application/workers/wasm/wasm-worker.domain.d.ts +99 -0
  186. package/dist/application/workers/wasm/wasm-worker.domain.js +2 -0
  187. package/dist/application/workers/wasm/wasm-worker.domain.js.map +1 -0
  188. package/dist/application/workers/wasm/wasm-worker.types.d.ts +88 -0
  189. package/dist/application/workers/wasm/wasm-worker.types.js +2 -0
  190. package/dist/application/workers/wasm/wasm-worker.types.js.map +1 -0
  191. package/dist/application/workers/wasm/wasm-worker.utils.d.ts +10 -0
  192. package/dist/application/workers/wasm/wasm-worker.utils.js +130 -0
  193. package/dist/application/workers/wasm/wasm-worker.utils.js.map +1 -0
  194. package/dist/buildConfig.d.ts +3 -0
  195. package/dist/buildConfig.js +7 -0
  196. package/dist/buildConfig.js.map +1 -0
  197. package/dist/cameraUtils.d.ts +77 -77
  198. package/dist/cameraUtils.js +361 -360
  199. package/dist/cameraUtils.js.map +1 -1
  200. package/dist/constants.d.ts +9 -9
  201. package/dist/constants.js +13 -12
  202. package/dist/constants.js.map +1 -1
  203. package/dist/createCallback.d.ts +56 -56
  204. package/dist/createCallback.js +332 -330
  205. package/dist/createCallback.js.map +1 -1
  206. package/dist/dbUtils.d.ts +14 -14
  207. package/dist/dbUtils.js +148 -147
  208. package/dist/dbUtils.js.map +1 -1
  209. package/dist/envUtils.d.ts +4 -4
  210. package/dist/envUtils.js +16 -15
  211. package/dist/envUtils.js.map +1 -1
  212. package/dist/faceModule.d.ts +196 -196
  213. package/dist/faceModule.js +978 -981
  214. package/dist/faceModule.js.map +1 -1
  215. package/dist/featureFlagInit.d.ts +11 -0
  216. package/dist/featureFlagInit.js +44 -0
  217. package/dist/featureFlagInit.js.map +1 -0
  218. package/dist/index.d.ts +38 -38
  219. package/dist/index.js +82 -82
  220. package/dist/main.d.ts +30 -13
  221. package/dist/main.js +84 -51
  222. package/dist/main.js.map +1 -1
  223. package/dist/types.d.ts +139 -139
  224. package/dist/types.js +77 -77
  225. package/dist/utils.d.ts +84 -84
  226. package/dist/utils.js +580 -579
  227. package/dist/utils.js.map +1 -1
  228. package/package.json +102 -102
  229. package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
  230. package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
  231. package/wasm/ultra/nosimd/version.json +2 -2
  232. package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
  233. package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
  234. package/wasm/ultra/simd/version.json +2 -2
  235. package/workers/comlink.min.js +7 -7
  236. package/workers/comlink.min.js.map +1 -1
  237. package/workers/wasm.worker.js +936 -924
@@ -1,87 +1,87 @@
1
- export const WASM_DATABASE_NAME = '/privid-wasm';
2
- export const WASM_DATABASE_VERSION = 21;
3
- export const SAFARI_MIN_VERSION_FOR_SIMD = 16;
4
- export const SAFARI_MIN_SUBVERSION_FOR_SIMD = 4;
5
- // Default configuration values for face enrollment
6
- export const DEFAULT_ENROLL_CONFIG = {
7
- input_image_format: 'rgba',
8
- angle_rotation_left_threshold: 20.0,
9
- angle_rotation_right_threshold: 20.0,
10
- threshold_high_vertical_enroll: 0.9,
11
- threshold_down_vertical_enroll: 2.2,
12
- anti_spoofing_threshold: 0.8,
13
- threshold_profile_enroll: 0.66,
14
- blur_threshold_enroll_pred: 40,
15
- threshold_user_too_close: 0.52,
16
- threshold_user_too_far: 0.165,
17
- allow_only_one_face: true,
18
- threshold_user_up: 0.15,
19
- threshold_user_down: 0.9,
20
- threshold_user_left: 0.8,
21
- threshold_user_right: 0.2,
22
- };
23
- // Mobile-specific enroll config overrides
24
- export const MOBILE_ENROLL_CONFIG_OVERRIDES = {
25
- threshold_user_too_far: 0.31,
26
- threshold_user_too_close: 0.55,
27
- threshold_user_right: 0.2,
28
- threshold_user_left: 0.8,
29
- threshold_profile_enroll: 0.66,
30
- };
31
- // Default configuration values for face prediction
32
- export const DEFAULT_PREDICT_CONFIG = {
33
- input_image_format: 'rgba',
34
- angle_rotation_left_threshold: 20.0,
35
- angle_rotation_right_threshold: 20.0,
36
- anti_spoofing_threshold: 0.8,
37
- threshold_profile_predict: 0.66,
38
- blur_threshold_enroll_pred: 40,
39
- threshold_user_too_close: 0.52,
40
- threshold_user_too_far: 0.165,
41
- threshold_user_up: 0.15,
42
- threshold_user_down: 0.9,
43
- threshold_user_left: 0.8,
44
- threshold_user_right: 0.2,
45
- threshold_high_vertical_predict: 0.9,
46
- threshold_down_vertical_predict: 2.2,
47
- url_name_override: '',
48
- disallowed_results: [20],
49
- disable_predict_mf: false,
50
- mf_count_override: 5,
51
- };
52
- // Default configuration for age estimation
53
- export const DEFAULT_AGE_ESTIMATION_CONFIG = {
54
- anti_spoofing_threshold: 0.8,
55
- mf_count_override: 5,
56
- disable_estimate_age_mf: false,
57
- threshold_user_too_close: 0.8,
58
- threshold_profile_enroll: 0.6,
59
- threshold_user_too_far: 0.2,
60
- allow_only_one_face: false,
61
- };
62
- // Default configuration for document scanning
63
- export const DEFAULT_DOCUMENT_SCAN_CONFIG = {
64
- input_image_format: 'rgba',
65
- fingers_over_document_threshold: 0.2,
66
- };
67
- // Default configuration for document OCR
68
- export const DEFAULT_DOCUMENT_OCR_CONFIG = {
69
- input_image_format: 'rgba',
70
- calculate_age_from_ocr_text: true,
71
- threshold_doc_x: 0.0,
72
- threshold_doc_y: 0.0,
73
- threshold_doc_too_close: 0.99,
74
- threshold_doc_too_far: 0.1,
75
- };
76
- // Debug types that enable image creation
77
- export const DEBUG_TYPES_WITH_IMAGES = ['900', '901', '902', '903'];
78
- // Browser compatibility messages
79
- export const BROWSER_COMPATIBILITY_MESSAGES = {
80
- OPERA_MOBILE_NOT_SUPPORTED: 'Opera mobile version 72 and below is not support WASM',
81
- OPERA_NOT_SUPPORTED: 'Opera version 43 and below is not support WASM',
82
- CHROME_NOT_SUPPORTED: 'Chrome version 57 and below is not support WASM',
83
- FIREFOX_NOT_SUPPORTED: 'Firefox version 52 and below is not support WASM',
84
- ANDROID_BROWSER_NOT_SUPPORTED: 'Android Browser version 96 and below is not supported.',
85
- UNABLE_TO_LOAD_WASM: 'Unable to load wasm',
86
- };
1
+ export const WASM_DATABASE_NAME = '/privid-wasm';
2
+ export const WASM_DATABASE_VERSION = 21;
3
+ export const SAFARI_MIN_VERSION_FOR_SIMD = 16;
4
+ export const SAFARI_MIN_SUBVERSION_FOR_SIMD = 4;
5
+ // Default configuration values for face enrollment
6
+ export const DEFAULT_ENROLL_CONFIG = {
7
+ input_image_format: 'rgba',
8
+ angle_rotation_left_threshold: 20.0,
9
+ angle_rotation_right_threshold: 20.0,
10
+ threshold_high_vertical_enroll: 0.9,
11
+ threshold_down_vertical_enroll: 2.2,
12
+ anti_spoofing_threshold: 0.8,
13
+ threshold_profile_enroll: 0.66,
14
+ blur_threshold_enroll_pred: 40,
15
+ threshold_user_too_close: 0.52,
16
+ threshold_user_too_far: 0.165,
17
+ allow_only_one_face: true,
18
+ threshold_user_up: 0.15,
19
+ threshold_user_down: 0.9,
20
+ threshold_user_left: 0.8,
21
+ threshold_user_right: 0.2,
22
+ };
23
+ // Mobile-specific enroll config overrides
24
+ export const MOBILE_ENROLL_CONFIG_OVERRIDES = {
25
+ threshold_user_too_far: 0.31,
26
+ threshold_user_too_close: 0.55,
27
+ threshold_user_right: 0.2,
28
+ threshold_user_left: 0.8,
29
+ threshold_profile_enroll: 0.66,
30
+ };
31
+ // Default configuration values for face prediction
32
+ export const DEFAULT_PREDICT_CONFIG = {
33
+ input_image_format: 'rgba',
34
+ angle_rotation_left_threshold: 20.0,
35
+ angle_rotation_right_threshold: 20.0,
36
+ anti_spoofing_threshold: 0.8,
37
+ threshold_profile_predict: 0.66,
38
+ blur_threshold_enroll_pred: 40,
39
+ threshold_user_too_close: 0.52,
40
+ threshold_user_too_far: 0.165,
41
+ threshold_user_up: 0.15,
42
+ threshold_user_down: 0.9,
43
+ threshold_user_left: 0.8,
44
+ threshold_user_right: 0.2,
45
+ threshold_high_vertical_predict: 0.9,
46
+ threshold_down_vertical_predict: 2.2,
47
+ url_name_override: '',
48
+ disallowed_results: [20],
49
+ disable_predict_mf: false,
50
+ mf_count_override: 5,
51
+ };
52
+ // Default configuration for age estimation
53
+ export const DEFAULT_AGE_ESTIMATION_CONFIG = {
54
+ anti_spoofing_threshold: 0.8,
55
+ mf_count_override: 5,
56
+ disable_estimate_age_mf: false,
57
+ threshold_user_too_close: 0.8,
58
+ threshold_profile_enroll: 0.6,
59
+ threshold_user_too_far: 0.2,
60
+ allow_only_one_face: false,
61
+ };
62
+ // Default configuration for document scanning
63
+ export const DEFAULT_DOCUMENT_SCAN_CONFIG = {
64
+ input_image_format: 'rgba',
65
+ fingers_over_document_threshold: 0.2,
66
+ };
67
+ // Default configuration for document OCR
68
+ export const DEFAULT_DOCUMENT_OCR_CONFIG = {
69
+ input_image_format: 'rgba',
70
+ calculate_age_from_ocr_text: true,
71
+ threshold_doc_x: 0.0,
72
+ threshold_doc_y: 0.0,
73
+ threshold_doc_too_close: 0.99,
74
+ threshold_doc_too_far: 0.1,
75
+ };
76
+ // Debug types that enable image creation
77
+ export const DEBUG_TYPES_WITH_IMAGES = ['900', '901', '902', '903'];
78
+ // Browser compatibility messages
79
+ export const BROWSER_COMPATIBILITY_MESSAGES = {
80
+ OPERA_MOBILE_NOT_SUPPORTED: 'Opera mobile version 72 and below is not support WASM',
81
+ OPERA_NOT_SUPPORTED: 'Opera version 43 and below is not support WASM',
82
+ CHROME_NOT_SUPPORTED: 'Chrome version 57 and below is not support WASM',
83
+ FIREFOX_NOT_SUPPORTED: 'Firefox version 52 and below is not support WASM',
84
+ ANDROID_BROWSER_NOT_SUPPORTED: 'Android Browser version 96 and below is not supported.',
85
+ UNABLE_TO_LOAD_WASM: 'Unable to load wasm',
86
+ };
87
87
  //# sourceMappingURL=wasm.constants.js.map
@@ -1,52 +1,52 @@
1
- import { WasmLoadResult, WasmModuleOptions, EncryptionResult } from './wasm.types';
2
- export interface Wasm {
3
- /**
4
- * Load the WASM module with the given options
5
- */
6
- loadModule(options: WasmModuleOptions): Promise<WasmLoadResult>;
7
- /**
8
- * Check if WASM models are loaded
9
- */
10
- checkIfModelsLoaded(isEnroll: boolean): Promise<boolean>;
11
- /**
12
- * Face enrollment
13
- */
14
- enroll(imageData: ImageData, config: string, callback: any): Promise<any>;
15
- /**
16
- * Face prediction/verification
17
- */
18
- predict(images: ImageData[], isSimd: boolean, config: string, callback: any): Promise<any>;
19
- /**
20
- * Age estimation
21
- */
22
- estimateAge(images: ImageData[], isSimd: boolean, config: string, callback: any): Promise<{
23
- result: number;
24
- imageData: Uint8ClampedArray | null;
25
- height: number | null;
26
- width: number | null;
27
- }>;
28
- /**
29
- * Compare face embeddings
30
- */
31
- compareEmbeddings(embeddingsA: string, embeddingsB: string, config: string, callback: any): Promise<any>;
32
- /**
33
- * Scan front of government photo id document
34
- */
35
- scanFrontPhotoIdDocument(imageData: ImageData, config: string, callback: any): Promise<void>;
36
- /**
37
- * Scan back document
38
- */
39
- scanBackDocument(imageData: ImageData, isSimd: boolean, config: string, callback: any): Promise<any>;
40
- /**
41
- * Scan front of passport document
42
- */
43
- scanPassport(imageData: ImageData, config: string, callback: any): Promise<void>;
44
- /**
45
- * Document OCR
46
- */
47
- documentOcr(imageData: ImageData | string, config: string, callback: any): Promise<any>;
48
- /**
49
- * PKI encryption
50
- */
51
- pkiEncrypt(payload: any): Promise<EncryptionResult>;
52
- }
1
+ import { WasmLoadResult, WasmModuleOptions, EncryptionResult } from './wasm.types';
2
+ export interface Wasm {
3
+ /**
4
+ * Load the WASM module with the given options
5
+ */
6
+ loadModule(options: WasmModuleOptions): Promise<WasmLoadResult>;
7
+ /**
8
+ * Check if WASM models are loaded
9
+ */
10
+ checkIfModelsLoaded(isEnroll: boolean): Promise<boolean>;
11
+ /**
12
+ * Face enrollment
13
+ */
14
+ enroll(imageData: ImageData, config: string, callback: any): Promise<any>;
15
+ /**
16
+ * Face prediction/verification
17
+ */
18
+ predict(images: ImageData[], isSimd: boolean, config: string, callback: any): Promise<any>;
19
+ /**
20
+ * Age estimation
21
+ */
22
+ estimateAge(images: ImageData[], isSimd: boolean, config: string, callback: any): Promise<{
23
+ result: number;
24
+ imageData: Uint8ClampedArray | null;
25
+ height: number | null;
26
+ width: number | null;
27
+ }>;
28
+ /**
29
+ * Compare face embeddings
30
+ */
31
+ compareEmbeddings(embeddingsA: string, embeddingsB: string, config: string, callback: any): Promise<any>;
32
+ /**
33
+ * Scan front of government photo id document
34
+ */
35
+ scanFrontPhotoIdDocument(imageData: ImageData, config: string, callback: any): Promise<void>;
36
+ /**
37
+ * Scan back document
38
+ */
39
+ scanBackDocument(imageData: ImageData, isSimd: boolean, config: string, callback: any): Promise<any>;
40
+ /**
41
+ * Scan front of passport document
42
+ */
43
+ scanPassport(imageData: ImageData, config: string, callback: any): Promise<void>;
44
+ /**
45
+ * Document OCR
46
+ */
47
+ documentOcr(imageData: ImageData | string, config: string, callback: any): Promise<any>;
48
+ /**
49
+ * PKI encryption
50
+ */
51
+ pkiEncrypt(payload: any): Promise<EncryptionResult>;
52
+ }
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=wasm.domain.js.map
@@ -1,118 +1,119 @@
1
- export type WasmLoadResult = {
2
- support: boolean;
3
- message?: string;
4
- };
5
- type ApiUrl = {
6
- collections: {
7
- default: {
8
- named_urls: {
9
- base_url: string;
10
- predict?: string;
11
- enroll?: string;
12
- validate_api_key?: string;
13
- };
14
- };
15
- };
16
- };
17
- export type WasmModuleOptions = {
18
- apiUrl: ApiUrl;
19
- sessionToken: string;
20
- publicKey: string;
21
- timeout?: number;
22
- useCdn?: boolean;
23
- usageScenario?: string;
24
- shouldRegenerateSession?: boolean;
25
- wasmFailureCallback?: (result: any) => void;
26
- };
27
- export type EnrollConfig = {
28
- input_image_format: string;
29
- angle_rotation_left_threshold: number;
30
- angle_rotation_right_threshold: number;
31
- threshold_high_vertical_enroll: number;
32
- threshold_down_vertical_enroll: number;
33
- anti_spoofing_threshold: number;
34
- threshold_profile_enroll: number;
35
- blur_threshold_enroll_pred: number;
36
- threshold_user_too_close: number;
37
- threshold_user_too_far: number;
38
- allow_only_one_face: boolean;
39
- threshold_user_up: number;
40
- threshold_user_down: number;
41
- threshold_user_left: number;
42
- threshold_user_right: number;
43
- };
44
- export type PredictConfig = {
45
- input_image_format: string;
46
- angle_rotation_left_threshold: number;
47
- angle_rotation_right_threshold: number;
48
- anti_spoofing_threshold: number;
49
- threshold_profile_predict: number;
50
- blur_threshold_enroll_pred: number;
51
- threshold_user_too_close: number;
52
- threshold_user_too_far: number;
53
- threshold_user_up: number;
54
- threshold_user_down: number;
55
- threshold_user_left: number;
56
- threshold_user_right: number;
57
- threshold_high_vertical_predict: number;
58
- threshold_down_vertical_predict: number;
59
- url_name_override: string;
60
- disallowed_results: number[];
61
- disable_predict_mf: boolean;
62
- mf_count_override: number;
63
- };
64
- export type DocumentScanConfig = {
65
- input_image_format: string;
66
- fingers_over_document_threshold?: number;
67
- document_scan_barcode_only?: boolean;
68
- detect_barcode_without_parsing?: boolean;
69
- detect_document_only?: boolean;
70
- };
71
- export type DocumentOcrConfig = {
72
- input_image_format: string;
73
- calculate_age_from_ocr_text: boolean;
74
- threshold_doc_x: number;
75
- threshold_doc_y: number;
76
- threshold_doc_too_close: number;
77
- threshold_doc_too_far: number;
78
- };
79
- export type AgeEstimationConfig = {
80
- anti_spoofing_threshold: number;
81
- mf_count_override: number;
82
- disable_estimate_age_mf: boolean;
83
- threshold_user_too_close: number;
84
- threshold_profile_enroll: number;
85
- threshold_user_too_far: number;
86
- allow_only_one_face: boolean;
87
- };
88
- export type CompareEmbeddingsConfig = {
89
- encrypt_compare_result?: boolean;
90
- };
91
- export type WasmCallbackResult = {
92
- operation: string;
93
- id: string;
94
- response_str: any;
95
- };
96
- export type WasmResultCallback = (operation: string, id: string, response_str: any) => void;
97
- export type EncryptionResult = {
98
- encryptedKey: string;
99
- iv: string;
100
- gcmAad: string;
101
- gcmTag: string;
102
- encrptedMessage: string;
103
- };
104
- export type WorkerFunctions = {
105
- isLoad: (simd: boolean, url: any, sessionToken: string, publicKey: string, debugType: string, cacheConfig: boolean, timeout: number | null, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>;
106
- ultraPredict: any;
107
- ultraAgeEstimate: any;
108
- ultraEnroll: any;
109
- compareEmbeddings: any;
110
- pkiEncrypt: any;
111
- checkIfModelsLoaded: any;
112
- freeMemory: any;
113
- ultraScanFrontDocument: any;
114
- ultraScanBackDocument: any;
115
- ultraCompareEmbeddings: any;
116
- ultraDocumentOcr: any;
117
- };
118
- export {};
1
+ export type WasmLoadResult = {
2
+ support: boolean;
3
+ message?: string;
4
+ };
5
+ type ApiUrl = {
6
+ collections: {
7
+ default: {
8
+ named_urls: {
9
+ base_url: string;
10
+ predict?: string;
11
+ enroll?: string;
12
+ validate_api_key?: string;
13
+ };
14
+ };
15
+ };
16
+ };
17
+ export type WasmModuleOptions = {
18
+ apiUrl: ApiUrl;
19
+ sessionToken: string;
20
+ publicKey: string;
21
+ timeout?: number;
22
+ useCdn?: boolean;
23
+ usageScenario?: string;
24
+ shouldRegenerateSession?: boolean;
25
+ wasmFailureCallback?: (result: any) => void;
26
+ skipSimdCheck?: boolean;
27
+ };
28
+ export type EnrollConfig = {
29
+ input_image_format: string;
30
+ angle_rotation_left_threshold: number;
31
+ angle_rotation_right_threshold: number;
32
+ threshold_high_vertical_enroll: number;
33
+ threshold_down_vertical_enroll: number;
34
+ anti_spoofing_threshold: number;
35
+ threshold_profile_enroll: number;
36
+ blur_threshold_enroll_pred: number;
37
+ threshold_user_too_close: number;
38
+ threshold_user_too_far: number;
39
+ allow_only_one_face: boolean;
40
+ threshold_user_up: number;
41
+ threshold_user_down: number;
42
+ threshold_user_left: number;
43
+ threshold_user_right: number;
44
+ };
45
+ export type PredictConfig = {
46
+ input_image_format: string;
47
+ angle_rotation_left_threshold: number;
48
+ angle_rotation_right_threshold: number;
49
+ anti_spoofing_threshold: number;
50
+ threshold_profile_predict: number;
51
+ blur_threshold_enroll_pred: number;
52
+ threshold_user_too_close: number;
53
+ threshold_user_too_far: number;
54
+ threshold_user_up: number;
55
+ threshold_user_down: number;
56
+ threshold_user_left: number;
57
+ threshold_user_right: number;
58
+ threshold_high_vertical_predict: number;
59
+ threshold_down_vertical_predict: number;
60
+ url_name_override: string;
61
+ disallowed_results: number[];
62
+ disable_predict_mf: boolean;
63
+ mf_count_override: number;
64
+ };
65
+ export type DocumentScanConfig = {
66
+ input_image_format: string;
67
+ fingers_over_document_threshold?: number;
68
+ document_scan_barcode_only?: boolean;
69
+ detect_barcode_without_parsing?: boolean;
70
+ detect_document_only?: boolean;
71
+ };
72
+ export type DocumentOcrConfig = {
73
+ input_image_format: string;
74
+ calculate_age_from_ocr_text: boolean;
75
+ threshold_doc_x: number;
76
+ threshold_doc_y: number;
77
+ threshold_doc_too_close: number;
78
+ threshold_doc_too_far: number;
79
+ };
80
+ export type AgeEstimationConfig = {
81
+ anti_spoofing_threshold: number;
82
+ mf_count_override: number;
83
+ disable_estimate_age_mf: boolean;
84
+ threshold_user_too_close: number;
85
+ threshold_profile_enroll: number;
86
+ threshold_user_too_far: number;
87
+ allow_only_one_face: boolean;
88
+ };
89
+ export type CompareEmbeddingsConfig = {
90
+ encrypt_compare_result?: boolean;
91
+ };
92
+ export type WasmCallbackResult = {
93
+ operation: string;
94
+ id: string;
95
+ response_str: any;
96
+ };
97
+ export type WasmResultCallback = (operation: string, id: string, response_str: any) => void;
98
+ export type EncryptionResult = {
99
+ encryptedKey: string;
100
+ iv: string;
101
+ gcmAad: string;
102
+ gcmTag: string;
103
+ encrptedMessage: string;
104
+ };
105
+ export type WorkerFunctions = {
106
+ isLoad: (simd: boolean, url: any, sessionToken: string, publicKey: string, debugType: string, cacheConfig: boolean, timeout: number | null, useCdn: boolean, shouldRegenerateSession?: boolean, wasmFailureCallback?: any, usageScenario?: string, cacheContent?: string) => Promise<string>;
107
+ ultraPredict: any;
108
+ ultraAgeEstimate: any;
109
+ ultraEnroll: any;
110
+ compareEmbeddings: any;
111
+ pkiEncrypt: any;
112
+ checkIfModelsLoaded: any;
113
+ freeMemory: any;
114
+ ultraScanFrontDocument: any;
115
+ ultraScanBackDocument: any;
116
+ ultraCompareEmbeddings: any;
117
+ ultraDocumentOcr: any;
118
+ };
119
+ export {};
@@ -1,2 +1,2 @@
1
- export {};
1
+ export {};
2
2
  //# sourceMappingURL=wasm.types.js.map