@incodetech/welcome 1.85.0-20251212151907.0 → 1.85.0-20251212184639.0
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Flow } from '../../../types/src';
|
|
1
2
|
import { PipelineProfile } from '../wasmUtils/pipelineProfile';
|
|
2
3
|
import { DetectionType } from './detectionType';
|
|
3
4
|
|
|
@@ -8,11 +9,12 @@ declare class DetectionSetup {
|
|
|
8
9
|
private static instance;
|
|
9
10
|
static getInstance(): DetectionSetup;
|
|
10
11
|
private setIsIPhone14OrHigher;
|
|
11
|
-
setupDetect(forceProductionMode?: boolean, sdkVersion?: string, disableIpify?: boolean): Promise<void>;
|
|
12
|
+
setupDetect(forceProductionMode?: boolean, sdkVersion?: string, disableIpify?: boolean, flow?: Flow): Promise<void>;
|
|
12
13
|
getProfiles(): Map<DetectionType, PipelineProfile> | null;
|
|
13
14
|
getProfile(type: DetectionType): PipelineProfile | null;
|
|
14
15
|
warmup(): Promise<void>;
|
|
15
|
-
|
|
16
|
+
private parseFlowConfigurations;
|
|
17
|
+
_runSetupDetect(forceProductionMode?: boolean, sdkVersion?: string, disableIpify?: boolean, flow?: Flow): Promise<void>;
|
|
16
18
|
}
|
|
17
19
|
declare const _default: DetectionSetup;
|
|
18
20
|
export default _default;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { IncodeOptions, IncodeTheme } from '../../types/src';
|
|
1
|
+
import { Flow, IncodeOptions, IncodeTheme } from '../../types/src';
|
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
|
3
3
|
|
|
4
4
|
export type Translations = {
|
|
5
5
|
[key: string]: string | Translations;
|
|
6
6
|
};
|
|
7
|
-
export declare const initializeDetection: ({ forceProductionMode, disableIpify, sdkVersion, }?: {
|
|
7
|
+
export declare const initializeDetection: ({ forceProductionMode, disableIpify, sdkVersion, flow, }?: {
|
|
8
8
|
forceProductionMode?: boolean;
|
|
9
9
|
sdkVersion?: string;
|
|
10
10
|
disableIpify?: boolean;
|
|
11
|
+
flow?: Flow;
|
|
11
12
|
}) => Promise<void>;
|
|
12
13
|
export declare const setupI18n: (lang: string, translations: Translations) => Promise<void>;
|
|
13
14
|
type SetupParams = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "new_id_capture_ux_least_risky_clients", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "new_fingerprint", "mp_test_hashed_id"
|
|
1
|
+
declare const FEATURE_FLAGS: readonly ["id_text_barcode_readability", "selfie_local_lenses_check_web", "id_model_hebrew_back_id", "id_face_readability", "new_id_capture_ux_least_risky_clients", "id_test_aa", "id_iou_check", "iad_checks", "iad_c_checks", "new_fingerprint", "mp_test_hashed_id"];
|
|
2
2
|
type FeatureFlag = (typeof FEATURE_FLAGS)[number];
|
|
3
3
|
type FeatureFlags = {
|
|
4
4
|
[key in FeatureFlag]: boolean;
|
package/dist/onBoarding.mjs
CHANGED
|
@@ -7521,8 +7521,7 @@ const FEATURE_FLAGS = [
|
|
|
7521
7521
|
"iad_checks",
|
|
7522
7522
|
"iad_c_checks",
|
|
7523
7523
|
"new_fingerprint",
|
|
7524
|
-
"mp_test_hashed_id"
|
|
7525
|
-
"face_occlusion"
|
|
7524
|
+
"mp_test_hashed_id"
|
|
7526
7525
|
], GLOBAL_FLAGS = ["new_fingerprint"], ID_MODULE_FLAGS = [
|
|
7527
7526
|
"id_face_readability",
|
|
7528
7527
|
"id_test_aa",
|
|
@@ -7533,10 +7532,7 @@ const FEATURE_FLAGS = [
|
|
|
7533
7532
|
"iad_checks",
|
|
7534
7533
|
"new_id_capture_ux_least_risky_clients",
|
|
7535
7534
|
"id_text_barcode_readability"
|
|
7536
|
-
], SELFIE_MODULE_FLAGS = [
|
|
7537
|
-
"selfie_local_lenses_check_web",
|
|
7538
|
-
"face_occlusion"
|
|
7539
|
-
];
|
|
7535
|
+
], SELFIE_MODULE_FLAGS = ["selfie_local_lenses_check_web"];
|
|
7540
7536
|
function getStatsigEnvironment(Be) {
|
|
7541
7537
|
return isStageK8sEnv(Be) ? { tier: "development" } : isStageEnv(Be) || isDemoEnv(Be) ? { tier: "staging" } : isSaasEnv(Be) ? { tier: "production" } : { tier: "development" };
|
|
7542
7538
|
}
|
|
@@ -7551,8 +7547,7 @@ const clientApiKey = "client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc", featu
|
|
|
7551
7547
|
iad_c_checks: !1,
|
|
7552
7548
|
id_iou_check: !0,
|
|
7553
7549
|
new_fingerprint: !1,
|
|
7554
|
-
mp_test_hashed_id: !1
|
|
7555
|
-
face_occlusion: !1
|
|
7550
|
+
mp_test_hashed_id: !1
|
|
7556
7551
|
}, clientExperimentIds = {
|
|
7557
7552
|
new_id_capture_ux_least_risky_clients: "experimentV2"
|
|
7558
7553
|
};
|
|
@@ -7628,7 +7623,7 @@ function getSelfieFaceDetectionPipelineParams() {
|
|
|
7628
7623
|
closedEyesThreshold: 0.9,
|
|
7629
7624
|
maskThreshold: 0.85,
|
|
7630
7625
|
minFaceQualityScore: 0.63,
|
|
7631
|
-
isOcclusionCheckEnabled:
|
|
7626
|
+
isOcclusionCheckEnabled: !1,
|
|
7632
7627
|
faceOcclusionThreshold: 0.3
|
|
7633
7628
|
};
|
|
7634
7629
|
}
|
|
@@ -7772,7 +7767,7 @@ function getProfile(Be) {
|
|
|
7772
7767
|
throw new Error(`Profile not found for type: ${Be}`);
|
|
7773
7768
|
return Le;
|
|
7774
7769
|
}
|
|
7775
|
-
const wasmVersion = "v2.12.
|
|
7770
|
+
const wasmVersion = "v2.12.43";
|
|
7776
7771
|
function generateBundle() {
|
|
7777
7772
|
const Be = getFeatureFlag("id_text_barcode_readability") ? PipelineProfileName.IdCapture_3_02 : getFeatureFlag("id_model_hebrew_back_id") ? PipelineProfileName.IdCapture_2_02 : PipelineProfileName.IdCapture_2_01, Le = PipelineProfileName.SelfieWithQualityMetrics, Ye = PipelineProfileName.SelfieVideoSelfie, tt = PipelineProfileName.IdVideoSelfie_2_01;
|
|
7778
7773
|
return [
|
|
@@ -8355,7 +8350,7 @@ class MlWasmJSApi {
|
|
|
8355
8350
|
);
|
|
8356
8351
|
}
|
|
8357
8352
|
}
|
|
8358
|
-
const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-
|
|
8353
|
+
const MlWasmJSApi$1 = MlWasmJSApi.getInstance(), version$4 = "1.85.0-20251212184639.0";
|
|
8359
8354
|
function e$2(Be, Le) {
|
|
8360
8355
|
return function(Ye, tt) {
|
|
8361
8356
|
return Object.prototype.hasOwnProperty.call(Ye, tt);
|
|
@@ -9493,11 +9488,12 @@ class DetectionSetup {
|
|
|
9493
9488
|
)
|
|
9494
9489
|
);
|
|
9495
9490
|
}
|
|
9496
|
-
async setupDetect(Le, Ye, tt) {
|
|
9491
|
+
async setupDetect(Le, Ye, tt, nt) {
|
|
9497
9492
|
return this.setupDetectPromise ? this.setupDetectPromise : (this.setupDetectPromise = this._runSetupDetect(
|
|
9498
9493
|
Le,
|
|
9499
9494
|
Ye,
|
|
9500
|
-
tt
|
|
9495
|
+
tt,
|
|
9496
|
+
nt
|
|
9501
9497
|
), this.setupDetectPromise);
|
|
9502
9498
|
}
|
|
9503
9499
|
getProfiles() {
|
|
@@ -9511,35 +9507,45 @@ class DetectionSetup {
|
|
|
9511
9507
|
for (; !MlWasmJSApi$1.isInitialized(); )
|
|
9512
9508
|
await new Promise((Le) => setTimeout(Le, 100));
|
|
9513
9509
|
}
|
|
9514
|
-
|
|
9515
|
-
var
|
|
9510
|
+
parseFlowConfigurations(Le) {
|
|
9511
|
+
var nt, ft, ht;
|
|
9512
|
+
const Ye = (nt = Le == null ? void 0 : Le.flowModules) == null ? void 0 : nt.find(
|
|
9513
|
+
(gt) => gt.key === "SELFIE"
|
|
9514
|
+
), tt = ((ft = Ye == null ? void 0 : Ye.configuration) == null ? void 0 : ft.isOcclusionEnabled) ?? !1;
|
|
9515
|
+
if (tt !== void 0) {
|
|
9516
|
+
const gt = (ht = this.profiles) == null ? void 0 : ht.get(DetectionType.Selfie);
|
|
9517
|
+
gt && (gt.parameters.isOcclusionCheckEnabled = tt);
|
|
9518
|
+
}
|
|
9519
|
+
}
|
|
9520
|
+
async _runSetupDetect(Le, Ye, tt, nt) {
|
|
9521
|
+
var At, xt;
|
|
9516
9522
|
if (this.isSetupDetect)
|
|
9517
9523
|
return;
|
|
9518
9524
|
addEvent({
|
|
9519
|
-
token: (
|
|
9525
|
+
token: (At = state.token) == null ? void 0 : At.token,
|
|
9520
9526
|
code: "modelLoadStart"
|
|
9521
9527
|
}), this.setIsIPhone14OrHigher();
|
|
9522
|
-
const
|
|
9523
|
-
this.profiles =
|
|
9524
|
-
const
|
|
9525
|
-
|
|
9526
|
-
|
|
9527
|
-
|
|
9528
|
-
|
|
9529
|
-
|
|
9530
|
-
|
|
9528
|
+
const ft = getInitializationParams();
|
|
9529
|
+
this.profiles = ft.profiles, nt && this.parseFlowConfigurations(nt), onboardingAnalytics.setProfiles(this.profiles);
|
|
9530
|
+
const ht = await MlWasmJSApi$1.initialize(
|
|
9531
|
+
ft.wasmModulePath,
|
|
9532
|
+
ft.wasmSimdModulePath,
|
|
9533
|
+
ft.glueCodePath,
|
|
9534
|
+
ft.enableSIMD,
|
|
9535
|
+
ft.versionsFilePath,
|
|
9536
|
+
ft.pipelineModels
|
|
9531
9537
|
);
|
|
9532
9538
|
for (; !MlWasmJSApi$1.isInitialized(); )
|
|
9533
|
-
await new Promise((
|
|
9534
|
-
onboardingAnalytics.estimatePerformance(), onboardingAnalytics.setWasmVersion(
|
|
9535
|
-
const
|
|
9539
|
+
await new Promise((Et) => setTimeout(Et, 100));
|
|
9540
|
+
onboardingAnalytics.estimatePerformance(), onboardingAnalytics.setWasmVersion(ft.wasmVersion), onboardingAnalytics.setSimdIsEnabled(ht), await MlWasmJSApi$1.initializePipelines(), await onboardingAnalytics.initializeMetadata(Ye, tt);
|
|
9541
|
+
const gt = Le;
|
|
9536
9542
|
try {
|
|
9537
|
-
await MlWasmJSApi$1.setProductionMode(
|
|
9538
|
-
} catch (
|
|
9539
|
-
console.error(`Exception: ${
|
|
9543
|
+
await MlWasmJSApi$1.setProductionMode(gt);
|
|
9544
|
+
} catch (Et) {
|
|
9545
|
+
console.error(`Exception: ${Et}`);
|
|
9540
9546
|
}
|
|
9541
9547
|
this.isSetupDetect = !0, addEvent({
|
|
9542
|
-
token: (
|
|
9548
|
+
token: (xt = state.token) == null ? void 0 : xt.token,
|
|
9543
9549
|
code: "modelLoadEnd",
|
|
9544
9550
|
payload: {
|
|
9545
9551
|
loadSuccessful: !0
|
|
@@ -146436,7 +146442,11 @@ function useSelfie({
|
|
|
146436
146442
|
zt(getSelfieTranslation("removeMask", xt))
|
|
146437
146443
|
));
|
|
146438
146444
|
}, u0 = () => {
|
|
146439
|
-
|
|
146445
|
+
Le(
|
|
146446
|
+
getLogObject("faceOccluded", {
|
|
146447
|
+
message: zt("notifications.faceOccluded")
|
|
146448
|
+
})
|
|
146449
|
+
), Bt(zt("notifications.faceOccluded"));
|
|
146440
146450
|
}, x0 = async () => {
|
|
146441
146451
|
jt.current = new FaceDetection(), await jt.current.initialize({
|
|
146442
146452
|
onNoFace: emptyFunc,
|
|
@@ -355896,7 +355906,6 @@ function Email$1({ onSuccess: Be, token: Le, otpVerification: Ye }) {
|
|
|
355896
355906
|
});
|
|
355897
355907
|
const kt = async () => {
|
|
355898
355908
|
if (At) return;
|
|
355899
|
-
ft(!0);
|
|
355900
355909
|
const bt = Et.trim();
|
|
355901
355910
|
try {
|
|
355902
355911
|
xt(!0), await addEmail({ email: bt, token: Le }), addEvent({
|
|
@@ -355932,15 +355941,16 @@ function Email$1({ onSuccess: Be, token: Le, otpVerification: Ye }) {
|
|
|
355932
355941
|
value: Et,
|
|
355933
355942
|
onChange: vt,
|
|
355934
355943
|
placeholder: "Email",
|
|
355935
|
-
showErrorIcon: !0
|
|
355944
|
+
showErrorIcon: !0,
|
|
355945
|
+
disabled: At
|
|
355936
355946
|
}
|
|
355937
355947
|
)
|
|
355938
355948
|
] }),
|
|
355939
355949
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
355940
355950
|
Button$b,
|
|
355941
355951
|
{
|
|
355942
|
-
disabled: nt,
|
|
355943
355952
|
isLoading: At,
|
|
355953
|
+
disabled: nt,
|
|
355944
355954
|
onClick: kt,
|
|
355945
355955
|
children: tt("common.continue")
|
|
355946
355956
|
}
|
|
@@ -364235,6 +364245,9 @@ const useDetectSelfie = ({
|
|
|
364235
364245
|
onFaceMask: () => {
|
|
364236
364246
|
gt("idle"), ft(Ct("notifications.mask"));
|
|
364237
364247
|
},
|
|
364248
|
+
onFaceOccluded: () => {
|
|
364249
|
+
gt("idle"), ft(Ct("notifications.faceOccluded"));
|
|
364250
|
+
},
|
|
364238
364251
|
onSwitchToManualCapture: emptyFunc,
|
|
364239
364252
|
onCapture: throttle$2(kt, 1e3),
|
|
364240
364253
|
isLensesCheckEnabled: It,
|
|
@@ -379016,12 +379029,14 @@ function getRecorderProvider(Be) {
|
|
|
379016
379029
|
const initializeDetection = async ({
|
|
379017
379030
|
forceProductionMode: Be,
|
|
379018
379031
|
disableIpify: Le = !1,
|
|
379019
|
-
sdkVersion: Ye
|
|
379032
|
+
sdkVersion: Ye,
|
|
379033
|
+
flow: tt
|
|
379020
379034
|
} = {}) => {
|
|
379021
379035
|
await detectionSetup.setupDetect(
|
|
379022
379036
|
Be,
|
|
379023
379037
|
Ye,
|
|
379024
|
-
Le
|
|
379038
|
+
Le,
|
|
379039
|
+
tt
|
|
379025
379040
|
);
|
|
379026
379041
|
}, setupI18n = async (Be, Le) => {
|
|
379027
379042
|
i18n.isInitialized ? await i18nSetup(Be, Le) : await new Promise((Ye) => {
|