@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.
- package/README.md +75 -75
- package/dist/apiUtils.d.ts +46 -46
- package/dist/apiUtils.js +922 -921
- package/dist/apiUtils.js.map +1 -1
- package/dist/application/index.d.ts +7 -7
- package/dist/application/index.js +27 -25
- package/dist/application/index.js.map +1 -1
- package/dist/application/modules/core/document/DocumentService.d.ts +22 -22
- package/dist/application/modules/core/document/DocumentService.js +254 -254
- package/dist/application/modules/core/document/document.constants.d.ts +15 -15
- package/dist/application/modules/core/document/document.constants.js +21 -21
- package/dist/application/modules/core/document/document.domain.d.ts +7 -7
- package/dist/application/modules/core/document/document.domain.js +1 -1
- package/dist/application/modules/core/document/document.types.d.ts +17 -17
- package/dist/application/modules/core/document/document.types.js +1 -1
- package/dist/application/modules/core/document/document.utils.d.ts +3 -3
- package/dist/application/modules/core/document/document.utils.js +58 -58
- package/dist/application/modules/core/document/index.d.ts +3 -3
- package/dist/application/modules/core/document/index.js +1 -1
- package/dist/application/modules/core/face/FaceService.d.ts +33 -33
- package/dist/application/modules/core/face/FaceService.js +228 -221
- package/dist/application/modules/core/face/FaceService.js.map +1 -1
- package/dist/application/modules/core/face/face.constants.d.ts +53 -53
- package/dist/application/modules/core/face/face.constants.js +53 -53
- package/dist/application/modules/core/face/face.domain.d.ts +10 -10
- package/dist/application/modules/core/face/face.domain.js +1 -1
- package/dist/application/modules/core/face/face.types.d.ts +41 -38
- package/dist/application/modules/core/face/face.types.js +1 -1
- package/dist/application/modules/core/face/face.utils.d.ts +15 -15
- package/dist/application/modules/core/face/face.utils.js +101 -101
- package/dist/application/modules/core/face/index.d.ts +3 -3
- package/dist/application/modules/core/face/index.js +1 -1
- package/dist/application/modules/global/shared.constants.d.ts +2 -2
- package/dist/application/modules/global/shared.constants.js +2 -2
- package/dist/application/modules/global/shared.utils.d.ts +25 -25
- package/dist/application/modules/global/shared.utils.js +100 -100
- package/dist/application/modules/global/shared.utils.js.map +1 -1
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.d.ts +9 -0
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js +32 -0
- package/dist/application/modules/internal/feature-flag/LDFeatureFlagService.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.d.ts +11 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.js +24 -0
- package/dist/application/modules/internal/feature-flag/feature-flag-init.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.d.ts +10 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.js +7 -0
- package/dist/application/modules/internal/feature-flag/feature-flag.domain.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.d.ts +11 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.js +44 -0
- package/dist/application/modules/internal/feature-flag/featureFlagInit.js.map +1 -0
- package/dist/application/modules/internal/feature-flag/index.d.ts +2 -0
- package/dist/application/modules/internal/feature-flag/index.js +3 -0
- package/dist/application/modules/internal/feature-flag/index.js.map +1 -0
- package/dist/application/modules/internal/shared/index.d.ts +2 -0
- package/dist/application/modules/internal/shared/index.js +3 -0
- package/dist/application/modules/internal/shared/index.js.map +1 -0
- package/dist/application/modules/internal/shared/shared.constants.d.ts +2 -0
- package/dist/application/modules/internal/shared/shared.constants.js +3 -0
- package/dist/application/modules/internal/shared/shared.constants.js.map +1 -0
- package/dist/application/modules/internal/shared/shared.utils.d.ts +44 -0
- package/dist/application/modules/internal/shared/shared.utils.js +204 -0
- package/dist/application/modules/internal/shared/shared.utils.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js +380 -0
- package/dist/application/modules/internal/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.d.ts +6 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.js +9 -0
- package/dist/application/modules/internal/wasm-orchestrator/index.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.d.ts +28 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js +35 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.d.ts +51 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.d.ts +142 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.d.ts +86 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js +201 -0
- package/dist/application/modules/internal/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
- package/dist/application/modules/support/camera/CameraServiceFactory.d.ts +10 -8
- package/dist/application/modules/support/camera/CameraServiceFactory.js +33 -32
- package/dist/application/modules/support/camera/CameraServiceFactory.js.map +1 -1
- package/dist/application/modules/support/camera/camera.constants.d.ts +9 -9
- package/dist/application/modules/support/camera/camera.constants.js +48 -48
- package/dist/application/modules/support/camera/camera.domain.d.ts +15 -15
- package/dist/application/modules/support/camera/camera.domain.js +1 -1
- package/dist/application/modules/support/camera/camera.types.d.ts +42 -42
- package/dist/application/modules/support/camera/camera.types.js +10 -10
- package/dist/application/modules/support/camera/camera.utils.d.ts +157 -157
- package/dist/application/modules/support/camera/camera.utils.js +623 -637
- package/dist/application/modules/support/camera/camera.utils.js.map +1 -1
- package/dist/application/modules/support/camera/index.d.ts +24 -25
- package/dist/application/modules/support/camera/index.js +27 -29
- package/dist/application/modules/support/camera/index.js.map +1 -1
- package/dist/application/modules/support/camera/services/BaseCameraService.d.ts +41 -37
- package/dist/application/modules/support/camera/services/BaseCameraService.js +278 -277
- package/dist/application/modules/support/camera/services/BaseCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/DesktopCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/DesktopCameraService.js +46 -45
- package/dist/application/modules/support/camera/services/DesktopCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/FirefoxCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js +46 -45
- package/dist/application/modules/support/camera/services/FirefoxCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MacSafariCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js +47 -46
- package/dist/application/modules/support/camera/services/MacSafariCameraService.js.map +1 -1
- package/dist/application/modules/support/camera/services/MobileCameraService.d.ts +5 -5
- package/dist/application/modules/support/camera/services/MobileCameraService.js +133 -129
- package/dist/application/modules/support/camera/services/MobileCameraService.js.map +1 -1
- package/dist/application/modules/support/engine/EngineService.d.ts +15 -0
- package/dist/application/modules/support/engine/EngineService.js +106 -0
- package/dist/application/modules/support/engine/EngineService.js.map +1 -0
- package/dist/application/modules/support/engine/engine.constants.d.ts +33 -0
- package/dist/application/modules/support/engine/engine.constants.js +35 -0
- package/dist/application/modules/support/engine/engine.constants.js.map +1 -0
- package/dist/application/modules/support/engine/engine.domain.d.ts +23 -0
- package/dist/application/modules/support/engine/engine.domain.js +2 -0
- package/dist/application/modules/support/engine/engine.domain.js.map +1 -0
- package/dist/application/modules/support/engine/engine.types.d.ts +32 -0
- package/dist/application/modules/support/engine/engine.types.js +2 -0
- package/dist/application/modules/support/engine/engine.types.js.map +1 -0
- package/dist/application/modules/support/engine/engine.utils.d.ts +65 -0
- package/dist/application/modules/support/engine/engine.utils.js +135 -0
- package/dist/application/modules/support/engine/engine.utils.js.map +1 -0
- package/dist/application/modules/support/engine/index.d.ts +3 -0
- package/dist/application/modules/support/engine/index.js +2 -0
- package/dist/application/modules/support/engine/index.js.map +1 -0
- package/dist/application/modules/support/permissions/PermissionsService.d.ts +55 -0
- package/dist/application/modules/support/permissions/PermissionsService.js +184 -0
- package/dist/application/modules/support/permissions/PermissionsService.js.map +1 -0
- package/dist/application/modules/support/permissions/index.d.ts +4 -0
- package/dist/application/modules/support/permissions/index.js +3 -0
- package/dist/application/modules/support/permissions/index.js.map +1 -0
- package/dist/application/modules/support/permissions/permission.utils.d.ts +6 -0
- package/dist/application/modules/support/permissions/permission.utils.js +34 -0
- package/dist/application/modules/support/permissions/permission.utils.js.map +1 -0
- package/dist/application/modules/support/permissions/permissions.domain.d.ts +6 -0
- package/dist/application/modules/support/permissions/permissions.domain.js +2 -0
- package/dist/application/modules/support/permissions/permissions.domain.js.map +1 -0
- package/dist/application/modules/support/permissions/permissions.types.d.ts +9 -0
- package/dist/application/modules/support/permissions/permissions.types.js +2 -0
- package/dist/application/modules/support/permissions/permissions.types.js.map +1 -0
- package/dist/application/modules/support/wasm/WasmService.d.ts +25 -25
- package/dist/application/modules/support/wasm/WasmService.js +156 -155
- package/dist/application/modules/support/wasm/WasmService.js.map +1 -1
- package/dist/application/modules/support/wasm/index.d.ts +6 -6
- package/dist/application/modules/support/wasm/index.js +8 -8
- package/dist/application/modules/support/wasm/wasm.constants.d.ts +78 -78
- package/dist/application/modules/support/wasm/wasm.constants.js +86 -86
- package/dist/application/modules/support/wasm/wasm.domain.d.ts +52 -52
- package/dist/application/modules/support/wasm/wasm.domain.js +1 -1
- package/dist/application/modules/support/wasm/wasm.types.d.ts +119 -118
- package/dist/application/modules/support/wasm/wasm.types.js +1 -1
- package/dist/application/modules/support/wasm/wasm.utils.d.ts +88 -88
- package/dist/application/modules/support/wasm/wasm.utils.js +243 -243
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.d.ts +28 -0
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js +324 -0
- package/dist/application/modules/support/wasm-orchestrator/WasmOrchestratorService.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/index.d.ts +6 -0
- package/dist/application/modules/support/wasm-orchestrator/index.js +9 -0
- package/dist/application/modules/support/wasm-orchestrator/index.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.d.ts +36 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js +44 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.constants.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.d.ts +47 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js +2 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.domain.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.d.ts +136 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js +2 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.types.js.map +1 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.d.ts +91 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js +250 -0
- package/dist/application/modules/support/wasm-orchestrator/wasm-orchestrator.utils.js.map +1 -0
- package/dist/application/workers/index.d.ts +42 -42
- package/dist/application/workers/index.js +8 -8
- package/dist/application/workers/wasm/WasmWorkerService.d.ts +66 -0
- package/dist/application/workers/wasm/WasmWorkerService.js +801 -0
- package/dist/application/workers/wasm/WasmWorkerService.js.map +1 -0
- package/dist/application/workers/wasm/index.d.ts +4 -0
- package/dist/application/workers/wasm/index.js +9 -0
- package/dist/application/workers/wasm/index.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.constants.d.ts +5 -0
- package/dist/application/workers/wasm/wasm-worker.constants.js +6 -0
- package/dist/application/workers/wasm/wasm-worker.constants.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.domain.d.ts +99 -0
- package/dist/application/workers/wasm/wasm-worker.domain.js +2 -0
- package/dist/application/workers/wasm/wasm-worker.domain.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.types.d.ts +88 -0
- package/dist/application/workers/wasm/wasm-worker.types.js +2 -0
- package/dist/application/workers/wasm/wasm-worker.types.js.map +1 -0
- package/dist/application/workers/wasm/wasm-worker.utils.d.ts +10 -0
- package/dist/application/workers/wasm/wasm-worker.utils.js +130 -0
- package/dist/application/workers/wasm/wasm-worker.utils.js.map +1 -0
- package/dist/buildConfig.d.ts +3 -0
- package/dist/buildConfig.js +7 -0
- package/dist/buildConfig.js.map +1 -0
- package/dist/cameraUtils.d.ts +77 -77
- package/dist/cameraUtils.js +361 -360
- package/dist/cameraUtils.js.map +1 -1
- package/dist/constants.d.ts +9 -9
- package/dist/constants.js +13 -12
- package/dist/constants.js.map +1 -1
- package/dist/createCallback.d.ts +56 -56
- package/dist/createCallback.js +332 -330
- package/dist/createCallback.js.map +1 -1
- package/dist/dbUtils.d.ts +14 -14
- package/dist/dbUtils.js +148 -147
- package/dist/dbUtils.js.map +1 -1
- package/dist/envUtils.d.ts +4 -4
- package/dist/envUtils.js +16 -15
- package/dist/envUtils.js.map +1 -1
- package/dist/faceModule.d.ts +196 -196
- package/dist/faceModule.js +978 -981
- package/dist/faceModule.js.map +1 -1
- package/dist/featureFlagInit.d.ts +11 -0
- package/dist/featureFlagInit.js +44 -0
- package/dist/featureFlagInit.js.map +1 -0
- package/dist/index.d.ts +38 -38
- package/dist/index.js +82 -82
- package/dist/main.d.ts +30 -13
- package/dist/main.js +84 -51
- package/dist/main.js.map +1 -1
- package/dist/types.d.ts +139 -139
- package/dist/types.js +77 -77
- package/dist/utils.d.ts +84 -84
- package/dist/utils.js +580 -579
- package/dist/utils.js.map +1 -1
- package/package.json +102 -102
- package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
- package/wasm/ultra/nosimd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
- package/wasm/ultra/nosimd/version.json +2 -2
- package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.js +18 -18
- package/wasm/ultra/simd/{25.11.13-1357710 → 26.01.08-1300478}/privid_fhe_uber.wasm +0 -0
- package/wasm/ultra/simd/version.json +2 -2
- package/workers/comlink.min.js +7 -7
- package/workers/comlink.min.js.map +1 -1
- 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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
export type
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|