@incodetech/web 0.0.0-dev-20260416-e8e67a4 → 0.0.0-dev-20260416-3692bda
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/dist/{AsYouType-RC03ULcj.js → AsYouType-C9ozHT0m.js} +1 -1
- package/dist/{addressAutocomplete-n0bBMSty.js → addressAutocomplete-BPpO7rrX.js} +4 -4
- package/dist/ae-signature/ae-signature.es.js +2 -2
- package/dist/antifraud/antifraud.es.js +3 -3
- package/dist/authentication/authentication.es.js +3 -3
- package/dist/{button-BlHmZn6D.js → button-wmLHLQxG.js} +1 -1
- package/dist/{checkbox-BNgPsssk.js → checkbox-CM72oZfM.js} +2 -2
- package/dist/consent/consent.es.js +9 -9
- package/dist/cross-document-data-match/cross-document-data-match.es.js +3 -3
- package/dist/curp-validation/curp-validation.es.js +14 -14
- package/dist/{dateInputComposed-B8nKYsUG.js → dateInputComposed-CvIDakYb.js} +4 -4
- package/dist/dateInputComposed-fdBzdL8N.js +1 -0
- package/dist/{documentCapture-DHtlw3Lu.js → documentCapture-BAvYoKZ7.js} +65 -64
- package/dist/{dropdownComposed-CR1bc7Z9.js → dropdownComposed-BE7-ghHI.js} +3 -3
- package/dist/dropdownComposed-ChSksPc2.js +1 -0
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekybModule-BeYiTLFg.js +2 -0
- package/dist/{ekybModule-BBSKwZZy.js → ekybModule-Dm6NrgtW.js} +14 -14
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/{ekycModule-Dca-zhQw.js → ekycModule-ChHA8VPJ.js} +19 -19
- package/dist/ekycModule-zakzAXhB.js +2 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/{electronic-signature-DEAXKbsk.js → electronic-signature-CPfLwg-x.js} +9 -9
- package/dist/email/email.es.js +8 -8
- package/dist/{extensibility-BlGCucJR.js → extensibility-t-H5EpZ8.js} +96 -95
- package/dist/extensibility.es.js +22 -22
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/faceMatch-B74pDVYi.js +2 -0
- package/dist/{faceMatch-D6HVVSiY.js → faceMatch-ClWhkFUE.js} +6 -6
- package/dist/flow/flow.es.js +195 -186
- package/dist/{formField-B9_nvbhW.js → formField-9ouSScYr.js} +2 -2
- package/dist/geolocation/geolocation.es.js +6 -6
- package/dist/governmentValidation/governmentValidation.es.js +8 -8
- package/dist/homeScreen-C0-81utl.js +210 -0
- package/dist/{i18n-DUMvrSNM.js → i18n-BpEDCZi_.js} +1 -1
- package/dist/{icons-CVO6RxwW.js → icons-G_Ct2lZU.js} +1 -1
- package/dist/id/id.es.js +6 -6
- package/dist/identity-reuse/identity-reuse.es.js +6 -6
- package/dist/incode-logo-DX016usY.js +4 -0
- package/dist/{loadingIcon-ahC-hZN7.js → incodeComponent-DIb7wDAq.js} +2 -42
- package/dist/index.es.js +1 -1
- package/dist/inputComposed-BqRIZ9pG.js +1 -0
- package/dist/{inputComposed-COz9TuR1.js → inputComposed-d8s1aPjr.js} +3 -3
- package/dist/loadingIcon-HWY04StG.js +42 -0
- package/dist/{mandatoryConsent-DWwvkGGf.js → mandatoryConsent-BVrqZJDU.js} +9 -9
- package/dist/{modal-D75YXA_d.js → modal-BQF9tPLH.js} +2 -2
- package/dist/{otpInput-CNAOHZxZ.js → otpInput-OtCx4bG4.js} +4 -4
- package/dist/{page-kB-LDkaO.js → page-D5Mt-0zn.js} +4 -3
- package/dist/phone/phone.es.js +8 -8
- package/dist/{phoneInput-CzcmqH3C.js → phoneInput-DHepphBa.js} +3 -3
- package/dist/{phoneInputComposed-w9tF4xYB.js → phoneInputComposed-DOuz7g1p.js} +6 -6
- package/dist/{processing-CR7zb0TX.js → processing-LdRzxpWv.js} +2 -2
- package/dist/qe-signature/qe-signature.es.js +2 -2
- package/dist/{redirectToMobile-CYt-uhqB.js → redirectToMobile-1oLWg6QJ.js} +23 -21
- package/dist/{richText-MNrzpRze.js → richText-gJTUJEMX.js} +1 -1
- package/dist/selfie/selfie.es.js +4 -4
- package/dist/{setup-IE6CqyVs.js → setup-D7-7VjBv.js} +1 -1
- package/dist/signature/signature.es.js +9 -9
- package/dist/spinner-CFvndzMU.js +1 -0
- package/dist/{spinner-BAVCJLTE.js → spinner-l6dvYqCg.js} +7 -7
- package/dist/{tutorial-Dqk1zedL.js → tutorial-DMwavp-V.js} +43 -42
- package/dist/{typography-7cXma7kl.js → typography-CNNFm2Bl.js} +1 -1
- package/dist/typography-ClOy6Kmo.js +1 -0
- package/dist/{useModuleLoader-DPGKFaMr.js → useModuleLoader-C8N5qfo6.js} +109 -75
- package/dist/{verificationResult-LpiTdYIu.js → verificationResult-WLz8qNU8.js} +6 -6
- package/dist/{verifiedByIncode-CMPwRtA2.js → verifiedByIncode-ChZBpqNy.js} +12 -15
- package/dist/watchlist/watchlist.es.js +22 -21
- package/dist/workflow/workflow.es.js +18 -18
- package/package.json +2 -2
- package/dist/dateInputComposed-DnYA7nZG.js +0 -1
- package/dist/dropdownComposed-P1FeTlTM.js +0 -1
- package/dist/ekybModule-qBQ8sJSr.js +0 -2
- package/dist/ekycModule-R0YaUzV3.js +0 -2
- package/dist/faceMatch-CFxHH3ic.js +0 -2
- package/dist/home/home.es.js +0 -224
- package/dist/home/styles.css +0 -172
- package/dist/inputComposed-BWxnXHJf.js +0 -1
- package/dist/spinner-B-jf992b.js +0 -1
- package/dist/types/home.d.ts +0 -30
- package/dist/typography-CsEiWMTG.js +0 -1
- /package/dist/{aligndevicelottie-B9K1XnzC.js → aligndevicelottie-BfnvOtwi.js} +0 -0
- /package/dist/{back-horizontal-hint-Dy_Qglma.js → back-horizontal-hint-CpDPt7Pn.js} +0 -0
- /package/dist/{back-tutorial-Cc5SwoLa.js → back-tutorial-DRNlpp1o.js} +0 -0
- /package/dist/{back-vertical-hint-Dg3OKUKF.js → back-vertical-hint-CMS6HTd5.js} +0 -0
- /package/dist/{backdevicelottie-DPvn_MCA.js → backdevicelottie-DqTioBhp.js} +0 -0
- /package/dist/{blurdevicelottie-DGpZjyZE.js → blurdevicelottie-BCYf_azj.js} +0 -0
- /package/dist/{browser-ponyfill-CTu_YiCx.js → browser-ponyfill-CRq2EKxP.js} +0 -0
- /package/dist/{countries-DKKNtuUp.js → countries-Bbn2lyxr.js} +0 -0
- /package/dist/{defineProperty-DXvyTpBq.js → defineProperty-CqT6YdHJ.js} +0 -0
- /package/dist/{flip-animation-DwJvEqyX.js → flip-animation-Dj8sBkxM.js} +0 -0
- /package/dist/{front-horizontal-hint-DgopDgUF.js → front-horizontal-hint-C204EjG5.js} +0 -0
- /package/dist/{front-vertical-hint-nOpxcjqw.js → front-vertical-hint-BT8dqgFS.js} +0 -0
- /package/dist/{frontdevicelottie-DBrRXwKx.js → frontdevicelottie-BOCUyhYK.js} +0 -0
- /package/dist/{glaredevicelottie-DvG7qeiM.js → glaredevicelottie-g5gLJDcn.js} +0 -0
- /package/dist/{id-laser-h-BrG7qvHh.js → id-laser-h-C9wj3dpL.js} +0 -0
- /package/dist/{id-laser-v-Bt1xfH5h.js → id-laser-v-Bmnxnt0M.js} +0 -0
- /package/dist/{id-tutorial-WgpG0ahL.js → id-tutorial-CFTli-M3.js} +0 -0
- /package/dist/{incodeModule-Di2OUZ5_.js → incodeModule-D_r2n18O.js} +0 -0
- /package/dist/{numberedStep-LYLcVRNh.js → numberedStep-CR4w_BpM.js} +0 -0
- /package/dist/{passport-horizontal-hint-DXzBzsri.js → passport-horizontal-hint-DQ_bncwr.js} +0 -0
- /package/dist/{passport-tutorial-DEr1yuAg.js → passport-tutorial-Bihd5YfK.js} +0 -0
- /package/dist/{passport-vertical-hint-B8Sap2l6.js → passport-vertical-hint-Bck8hVuX.js} +0 -0
- /package/dist/{selfieTutorial-B5l5ny8O.js → selfieTutorial-Cu9vXjss.js} +0 -0
- /package/dist/{successIcon-AHrfmJvv.js → successIcon-C4GI_9SU.js} +0 -0
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { n as e } from "../i18n-
|
|
2
|
-
import { _ as t,
|
|
3
|
-
import { t as
|
|
4
|
-
import {
|
|
5
|
-
import { t as
|
|
6
|
-
import "../spinner-
|
|
7
|
-
import { t as
|
|
8
|
-
import { a as
|
|
9
|
-
import { getRequiredWasmPipelines as
|
|
1
|
+
import { n as e } from "../i18n-BpEDCZi_.js";
|
|
2
|
+
import { _ as t, c as n, l as r, o as i, p as a, v as o } from "../vendor-preact-D6SntenC.js";
|
|
3
|
+
import { t as s } from "../uiConfig-CwpQ-IM6.js";
|
|
4
|
+
import { o as c, t as l } from "../incodeComponent-DIb7wDAq.js";
|
|
5
|
+
import { t as u } from "../spinner-l6dvYqCg.js";
|
|
6
|
+
import "../spinner-CFvndzMU.js";
|
|
7
|
+
import { t as d } from "../incodeModule-D_r2n18O.js";
|
|
8
|
+
import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x } from "../useModuleLoader-C8N5qfo6.js";
|
|
9
|
+
import { getRequiredWasmPipelines as S } from "@incodetech/core/flow";
|
|
10
10
|
//#region src/modules/flow/preloadFlow.ts
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
let t =
|
|
11
|
+
var C = /* @__PURE__ */ new Map();
|
|
12
|
+
function w(e) {
|
|
13
|
+
let t = C.get(e);
|
|
14
14
|
if (!t) throw Error("Preload state not found");
|
|
15
15
|
return {
|
|
16
16
|
get isReady() {
|
|
@@ -26,16 +26,18 @@ function x(e) {
|
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
cancel() {
|
|
29
|
-
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")),
|
|
29
|
+
t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), C.delete(e));
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function T(e) {
|
|
34
34
|
let { token: t } = e;
|
|
35
|
-
if (
|
|
35
|
+
if (C.has(t)) return w(t);
|
|
36
36
|
let n, r, i = new Promise((e, t) => {
|
|
37
37
|
n = e, r = t;
|
|
38
|
-
}), a =
|
|
38
|
+
}), a = f(e);
|
|
39
|
+
a.getState().presentation.shouldPrefetchHome && g();
|
|
40
|
+
let o = {
|
|
39
41
|
status: "loading",
|
|
40
42
|
flowManager: a,
|
|
41
43
|
config: e,
|
|
@@ -43,49 +45,52 @@ function S(e) {
|
|
|
43
45
|
readyResolve: n,
|
|
44
46
|
readyReject: r
|
|
45
47
|
};
|
|
46
|
-
return
|
|
48
|
+
return C.set(t, o), (async () => {
|
|
47
49
|
try {
|
|
48
|
-
await
|
|
50
|
+
await b({
|
|
49
51
|
apiURL: e.apiURL,
|
|
50
52
|
token: e.token,
|
|
51
53
|
lang: e.lang,
|
|
52
54
|
flowManager: a
|
|
53
55
|
});
|
|
54
|
-
let t = e.disableDashboardTheme ? Promise.resolve({}) :
|
|
56
|
+
let t = e.disableDashboardTheme ? Promise.resolve({}) : v().then((e) => {
|
|
55
57
|
o.theme = e.theme, o.uiConfig = e.uiConfig;
|
|
56
58
|
});
|
|
57
59
|
o.unsubscribe = a.subscribe((t) => {
|
|
58
60
|
if (t.status === "ready") {
|
|
59
61
|
let n = t;
|
|
60
|
-
|
|
62
|
+
m(n, e.wasmConfig), p(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
|
|
61
63
|
} else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
|
|
62
64
|
}), await t;
|
|
63
65
|
} catch (e) {
|
|
64
|
-
o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")),
|
|
66
|
+
o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), C.delete(t);
|
|
65
67
|
}
|
|
66
|
-
})(),
|
|
68
|
+
})(), w(t);
|
|
67
69
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
70
|
+
function E(e) {
|
|
71
|
+
return C.get(e) ?? null;
|
|
70
72
|
}
|
|
71
|
-
function
|
|
72
|
-
let t =
|
|
73
|
-
return t &&
|
|
73
|
+
function D(e) {
|
|
74
|
+
let t = E(e);
|
|
75
|
+
return t && C.delete(e), t;
|
|
74
76
|
}
|
|
75
77
|
//#endregion
|
|
76
78
|
//#region src/modules/flow/useFlowInitialization.ts
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
|
|
79
|
+
function O(e) {
|
|
80
|
+
e.getState().presentation.shouldPrefetchHome && g();
|
|
81
|
+
}
|
|
82
|
+
function k(e) {
|
|
83
|
+
let { apiURL: n, token: i, lang: o, disableDashboardTheme: c, enableHome: l, onError: u } = e, d = r(null), [p, m] = a(() => {
|
|
84
|
+
let t = E(i);
|
|
80
85
|
if (t?.status === "ready") {
|
|
81
|
-
let e =
|
|
82
|
-
if (e) return
|
|
86
|
+
let e = D(i);
|
|
87
|
+
if (e) return d.current = e.flowManager, O(e.flowManager), e.uiConfig && s(e.uiConfig), {
|
|
83
88
|
status: "ready",
|
|
84
89
|
flowManager: e.flowManager
|
|
85
90
|
};
|
|
86
91
|
}
|
|
87
|
-
let n =
|
|
88
|
-
return
|
|
92
|
+
let n = f(e);
|
|
93
|
+
return d.current = n, O(n), t?.status === "error" ? {
|
|
89
94
|
status: "error",
|
|
90
95
|
error: t.error ?? "Preload failed",
|
|
91
96
|
flowManager: n
|
|
@@ -93,309 +98,313 @@ function T(e) {
|
|
|
93
98
|
status: "initializing",
|
|
94
99
|
flowManager: n
|
|
95
100
|
};
|
|
96
|
-
}),
|
|
101
|
+
}), h = r(!1);
|
|
97
102
|
return t(() => {
|
|
98
103
|
if (p.status !== "initializing") return;
|
|
99
|
-
let e =
|
|
104
|
+
let e = E(i);
|
|
100
105
|
if (e?.status === "loading") {
|
|
101
106
|
e.readyPromise.then(() => {
|
|
102
|
-
let e =
|
|
103
|
-
e && (
|
|
107
|
+
let e = D(i);
|
|
108
|
+
e && (d.current = e.flowManager, O(e.flowManager), e.uiConfig && s(e.uiConfig), m({
|
|
104
109
|
status: "ready",
|
|
105
110
|
flowManager: e.flowManager
|
|
106
111
|
}));
|
|
107
112
|
}).catch((e) => {
|
|
108
113
|
let t = e instanceof Error ? e.message : "Preload failed";
|
|
109
|
-
|
|
114
|
+
m({
|
|
110
115
|
status: "error",
|
|
111
116
|
error: t,
|
|
112
117
|
flowManager: p.flowManager
|
|
113
|
-
}),
|
|
118
|
+
}), u?.(t);
|
|
114
119
|
});
|
|
115
120
|
return;
|
|
116
121
|
}
|
|
117
|
-
|
|
122
|
+
h.current || (h.current = !0, (async () => {
|
|
118
123
|
try {
|
|
119
|
-
await
|
|
120
|
-
apiURL:
|
|
121
|
-
token:
|
|
122
|
-
lang:
|
|
124
|
+
await b({
|
|
125
|
+
apiURL: n,
|
|
126
|
+
token: i,
|
|
127
|
+
lang: o,
|
|
123
128
|
flowManager: p.flowManager
|
|
124
|
-
}), await (c ? Promise.resolve() :
|
|
125
|
-
e.uiConfig &&
|
|
126
|
-
})),
|
|
129
|
+
}), await (c ? Promise.resolve() : v().then((e) => {
|
|
130
|
+
e.uiConfig && s(e.uiConfig);
|
|
131
|
+
})), m({
|
|
127
132
|
status: "ready",
|
|
128
133
|
flowManager: p.flowManager
|
|
129
134
|
});
|
|
130
135
|
} catch (e) {
|
|
131
136
|
let t = e instanceof Error ? e.message : "Failed to initialize SDK";
|
|
132
|
-
|
|
137
|
+
m({
|
|
133
138
|
status: "error",
|
|
134
139
|
error: t,
|
|
135
140
|
flowManager: p.flowManager
|
|
136
|
-
}),
|
|
141
|
+
}), u?.(t);
|
|
137
142
|
}
|
|
138
143
|
})());
|
|
139
144
|
}, [
|
|
145
|
+
n,
|
|
140
146
|
i,
|
|
141
147
|
o,
|
|
142
|
-
s,
|
|
143
148
|
c,
|
|
144
149
|
l,
|
|
145
|
-
|
|
150
|
+
u,
|
|
146
151
|
p
|
|
147
152
|
]), p;
|
|
148
153
|
}
|
|
149
154
|
//#endregion
|
|
150
155
|
//#region src/modules/flow/flow.tsx
|
|
151
|
-
var
|
|
152
|
-
let { t: s, i18n: l } = e(),
|
|
156
|
+
var A = n(() => import("../homeScreen-C0-81utl.js").then((e) => ({ default: e.HomeScreen }))), j = ({ config: n, onFinish: r, onError: a }) => {
|
|
157
|
+
let { t: s, i18n: l } = e(), d = k({
|
|
153
158
|
...n,
|
|
154
159
|
onError: a
|
|
155
|
-
}), [
|
|
156
|
-
moduleKey:
|
|
157
|
-
modules:
|
|
160
|
+
}), [f, p] = c(() => d.flowManager, { autoLoad: !1 }), v = f.presentation.lazyModuleKey, b = x({
|
|
161
|
+
moduleKey: v,
|
|
162
|
+
modules: h,
|
|
158
163
|
onModuleLoading: n.onModuleLoading,
|
|
159
164
|
onModuleLoaded: n.onModuleLoaded,
|
|
160
165
|
onError: a
|
|
161
|
-
});
|
|
162
|
-
if (
|
|
166
|
+
}), C = b.status === "loaded";
|
|
167
|
+
if (_(f?.status === "ready" ? f.steps : [], f?.status === "ready" ? f.currentStepIndex : -1, h, C), t(() => {
|
|
168
|
+
f.presentation.shouldPrefetchHome && g();
|
|
169
|
+
}, [f.presentation.shouldPrefetchHome]), t(() => {
|
|
163
170
|
n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
|
|
164
171
|
}, [n.lang, l]), t(() => {
|
|
165
|
-
if (
|
|
166
|
-
let e =
|
|
167
|
-
t.length > 0 && (n.onWasmWarmup?.(t),
|
|
172
|
+
if (f?.status === "ready") {
|
|
173
|
+
let e = f, t = S(e.flow);
|
|
174
|
+
t.length > 0 && (n.onWasmWarmup?.(t), m(e, n.wasmConfig));
|
|
168
175
|
}
|
|
169
|
-
}, [
|
|
170
|
-
|
|
176
|
+
}, [f, n]), t(() => {
|
|
177
|
+
f?.status === "finished" && r(f.finishStatus);
|
|
171
178
|
}, [
|
|
172
|
-
|
|
179
|
+
f?.status,
|
|
173
180
|
r,
|
|
174
|
-
|
|
181
|
+
f
|
|
175
182
|
]), t(() => {
|
|
176
|
-
|
|
183
|
+
f?.status === "error" && a && a(f.error);
|
|
177
184
|
}, [
|
|
178
|
-
|
|
185
|
+
f?.status,
|
|
179
186
|
a,
|
|
180
|
-
|
|
187
|
+
f
|
|
181
188
|
]), t(() => {
|
|
182
|
-
|
|
183
|
-
}, [
|
|
189
|
+
f?.status === "ready" && f.currentStep === "ID" && f.steps.includes("TUTORIAL_ID") && p.completeModule();
|
|
190
|
+
}, [f, p]), d.status === "error") return /* @__PURE__ */ o("div", {
|
|
191
|
+
class: "IncodeFlow",
|
|
192
|
+
children: /* @__PURE__ */ o("div", { children: ["Error: ", d.error] })
|
|
193
|
+
});
|
|
194
|
+
if (f.homeScreen.visible) return /* @__PURE__ */ o("div", {
|
|
184
195
|
class: "IncodeFlow",
|
|
185
|
-
children: /* @__PURE__ */ i
|
|
196
|
+
children: /* @__PURE__ */ o(i, {
|
|
197
|
+
fallback: null,
|
|
198
|
+
children: /* @__PURE__ */ o(A, {
|
|
199
|
+
isContinueLoading: f.homeScreen.isContinueLoading,
|
|
200
|
+
onContinue: () => p.continueFromHome()
|
|
201
|
+
})
|
|
202
|
+
})
|
|
186
203
|
});
|
|
187
|
-
if (
|
|
204
|
+
if (d.status === "initializing" || f.presentation.isAwaitingReady) return /* @__PURE__ */ o("div", {
|
|
188
205
|
class: "IncodeFlow",
|
|
189
|
-
children: /* @__PURE__ */
|
|
206
|
+
children: /* @__PURE__ */ o(u, {
|
|
190
207
|
title: n.spinnerConfig?.title,
|
|
191
208
|
subtitle: n.spinnerConfig?.subtitle,
|
|
192
209
|
size: n.spinnerConfig?.size,
|
|
193
210
|
fullScreen: !0
|
|
194
211
|
})
|
|
195
212
|
});
|
|
196
|
-
if (
|
|
213
|
+
if (f.status === "error") return /* @__PURE__ */ o("div", {
|
|
197
214
|
class: "IncodeFlow",
|
|
198
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ o("div", { children: ["Error: ", f.error] })
|
|
199
216
|
});
|
|
200
|
-
if (
|
|
201
|
-
if (
|
|
202
|
-
let { currentStep: e, config: t, flow: { flowId: r } } =
|
|
203
|
-
if (!e || !t) return /* @__PURE__ */
|
|
217
|
+
if (f.status === "finished") return null;
|
|
218
|
+
if (f?.status === "ready") {
|
|
219
|
+
let { currentStep: e, config: t, flow: { flowId: r } } = f;
|
|
220
|
+
if (!e || !t) return /* @__PURE__ */ o("div", {
|
|
204
221
|
class: "IncodeFlow",
|
|
205
|
-
children: /* @__PURE__ */
|
|
222
|
+
children: /* @__PURE__ */ o(u, {
|
|
206
223
|
title: n.spinnerConfig?.title ?? s("loadingCircle.hangOn"),
|
|
207
224
|
subtitle: n.spinnerConfig?.subtitle ?? s("loadingCircle.validating"),
|
|
208
225
|
size: n.spinnerConfig?.size,
|
|
209
226
|
fullScreen: !0
|
|
210
227
|
})
|
|
211
228
|
});
|
|
212
|
-
if (
|
|
229
|
+
if (b.status === "unsupported") return /* @__PURE__ */ o("div", {
|
|
213
230
|
class: "IncodeFlow",
|
|
214
|
-
children: /* @__PURE__ */
|
|
231
|
+
children: /* @__PURE__ */ o(y, {
|
|
215
232
|
moduleKey: e,
|
|
216
|
-
onNext: () =>
|
|
233
|
+
onNext: () => p.completeModule()
|
|
217
234
|
})
|
|
218
235
|
});
|
|
219
|
-
if (
|
|
236
|
+
if (b.status === "idle" || b.status === "loading" || b.status === "error") return /* @__PURE__ */ o("div", {
|
|
220
237
|
class: "IncodeFlow",
|
|
221
|
-
children: /* @__PURE__ */
|
|
238
|
+
children: /* @__PURE__ */ o(u, {
|
|
222
239
|
title: n.spinnerConfig?.title,
|
|
223
240
|
subtitle: n.spinnerConfig?.subtitle,
|
|
224
241
|
size: n.spinnerConfig?.size,
|
|
225
242
|
fullScreen: !0
|
|
226
243
|
})
|
|
227
244
|
});
|
|
228
|
-
let { Component:
|
|
229
|
-
if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */
|
|
230
|
-
class: "IncodeFlow",
|
|
231
|
-
children: /* @__PURE__ */ i(o, {
|
|
232
|
-
config: t,
|
|
233
|
-
onFinish: () => m.completeFlow(),
|
|
234
|
-
onContinue: () => m.completeModule(),
|
|
235
|
-
onError: a
|
|
236
|
-
}, `redirect-to-mobile-${d.currentStepIndex}`)
|
|
237
|
-
});
|
|
238
|
-
if (e === "HOME") return /* @__PURE__ */ i("div", {
|
|
245
|
+
let { Component: i } = b;
|
|
246
|
+
if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ o("div", {
|
|
239
247
|
class: "IncodeFlow",
|
|
240
|
-
children: /* @__PURE__ */ i
|
|
248
|
+
children: /* @__PURE__ */ o(i, {
|
|
241
249
|
config: t,
|
|
242
|
-
onFinish: () =>
|
|
250
|
+
onFinish: () => p.completeFlow(),
|
|
251
|
+
onContinue: () => p.completeModule(),
|
|
243
252
|
onError: a
|
|
244
|
-
}, `
|
|
253
|
+
}, `redirect-to-mobile-${f.currentStepIndex}`)
|
|
245
254
|
});
|
|
246
|
-
if (e === "SELFIE") return /* @__PURE__ */
|
|
255
|
+
if (e === "SELFIE") return /* @__PURE__ */ o("div", {
|
|
247
256
|
class: "IncodeFlow",
|
|
248
|
-
children: /* @__PURE__ */ i
|
|
257
|
+
children: /* @__PURE__ */ o(i, {
|
|
249
258
|
config: t,
|
|
250
|
-
onFinish: () =>
|
|
259
|
+
onFinish: () => p.completeModule(),
|
|
251
260
|
onError: (e) => {
|
|
252
261
|
a?.(e ?? "Selfie verification error");
|
|
253
262
|
}
|
|
254
|
-
}, `selfie-${
|
|
263
|
+
}, `selfie-${f.currentStepIndex}`)
|
|
255
264
|
});
|
|
256
|
-
if (e === "AUTHENTICATION") return /* @__PURE__ */
|
|
265
|
+
if (e === "AUTHENTICATION") return /* @__PURE__ */ o("div", {
|
|
257
266
|
class: "IncodeFlow",
|
|
258
|
-
children: /* @__PURE__ */ i
|
|
267
|
+
children: /* @__PURE__ */ o(i, {
|
|
259
268
|
config: {
|
|
260
269
|
...t,
|
|
261
270
|
authHint: n.authHint
|
|
262
271
|
},
|
|
263
|
-
onFinish: () =>
|
|
272
|
+
onFinish: () => p.completeModule(),
|
|
264
273
|
onError: (e) => {
|
|
265
274
|
a?.(e ?? "Authentication error");
|
|
266
275
|
}
|
|
267
|
-
}, `authentication-${
|
|
276
|
+
}, `authentication-${f.currentStepIndex}`)
|
|
268
277
|
});
|
|
269
|
-
if (e === "PHONE") return /* @__PURE__ */
|
|
278
|
+
if (e === "PHONE") return /* @__PURE__ */ o("div", {
|
|
270
279
|
class: "IncodeFlow",
|
|
271
|
-
children: /* @__PURE__ */ i
|
|
280
|
+
children: /* @__PURE__ */ o(i, {
|
|
272
281
|
config: t,
|
|
273
|
-
onFinish: () =>
|
|
282
|
+
onFinish: () => p.completeModule(),
|
|
274
283
|
onError: (e) => {
|
|
275
284
|
a?.(e ?? "Phone verification error");
|
|
276
285
|
}
|
|
277
|
-
}, `phone-${
|
|
286
|
+
}, `phone-${f.currentStepIndex}`)
|
|
278
287
|
});
|
|
279
288
|
if (e === "EMAIL") {
|
|
280
289
|
let e = t;
|
|
281
|
-
return !e || typeof e.otpVerification != "boolean" || typeof e.otpExpirationInMinutes != "number" ? /* @__PURE__ */
|
|
290
|
+
return !e || typeof e.otpVerification != "boolean" || typeof e.otpExpirationInMinutes != "number" ? /* @__PURE__ */ o("div", {
|
|
282
291
|
class: "IncodeFlow",
|
|
283
|
-
children: /* @__PURE__ */
|
|
284
|
-
}) : /* @__PURE__ */
|
|
292
|
+
children: /* @__PURE__ */ o("div", { children: "Error: Invalid email configuration" })
|
|
293
|
+
}) : /* @__PURE__ */ o("div", {
|
|
285
294
|
class: "IncodeFlow",
|
|
286
|
-
children: /* @__PURE__ */ i
|
|
295
|
+
children: /* @__PURE__ */ o(i, {
|
|
287
296
|
config: e,
|
|
288
|
-
onFinish: () =>
|
|
297
|
+
onFinish: () => p.completeModule(),
|
|
289
298
|
onError: (e) => {
|
|
290
299
|
a?.(e ?? "Email verification error");
|
|
291
300
|
}
|
|
292
|
-
}, `email-${
|
|
301
|
+
}, `email-${f.currentStepIndex}`)
|
|
293
302
|
});
|
|
294
303
|
}
|
|
295
304
|
if (e === "ID" || e === "SECOND_ID") {
|
|
296
305
|
let n = t;
|
|
297
|
-
return /* @__PURE__ */
|
|
306
|
+
return /* @__PURE__ */ o("div", {
|
|
298
307
|
class: "IncodeFlow",
|
|
299
|
-
children: /* @__PURE__ */ i
|
|
308
|
+
children: /* @__PURE__ */ o(i, {
|
|
300
309
|
config: e === "SECOND_ID" ? {
|
|
301
310
|
...n,
|
|
302
311
|
isSecondId: !0
|
|
303
312
|
} : n,
|
|
304
|
-
onFinish: () =>
|
|
313
|
+
onFinish: () => p.completeModule(),
|
|
305
314
|
onError: (e) => {
|
|
306
315
|
a?.(e ?? "ID capture error");
|
|
307
316
|
}
|
|
308
|
-
}, `id-${
|
|
317
|
+
}, `id-${f.currentStepIndex}`)
|
|
309
318
|
});
|
|
310
319
|
}
|
|
311
|
-
if (e === "FACE_MATCH") return /* @__PURE__ */
|
|
320
|
+
if (e === "FACE_MATCH") return /* @__PURE__ */ o("div", {
|
|
312
321
|
class: "IncodeFlow",
|
|
313
|
-
children: /* @__PURE__ */ i
|
|
322
|
+
children: /* @__PURE__ */ o(i, {
|
|
314
323
|
config: t,
|
|
315
|
-
onFinish: () =>
|
|
324
|
+
onFinish: () => p.completeModule(),
|
|
316
325
|
onError: (e) => {
|
|
317
326
|
a?.(e ?? "Face match error");
|
|
318
327
|
}
|
|
319
|
-
}, `face-match-${
|
|
328
|
+
}, `face-match-${f.currentStepIndex}`)
|
|
320
329
|
});
|
|
321
|
-
if (e === "CURP_VALIDATION") return /* @__PURE__ */
|
|
330
|
+
if (e === "CURP_VALIDATION") return /* @__PURE__ */ o("div", {
|
|
322
331
|
class: "IncodeFlow",
|
|
323
|
-
children: /* @__PURE__ */ i
|
|
332
|
+
children: /* @__PURE__ */ o(i, {
|
|
324
333
|
config: t,
|
|
325
|
-
onFinish: () =>
|
|
334
|
+
onFinish: () => p.completeModule(),
|
|
326
335
|
onError: (e) => {
|
|
327
336
|
a?.(e ?? "CURP validation error");
|
|
328
337
|
}
|
|
329
|
-
}, `curp-validation-${
|
|
338
|
+
}, `curp-validation-${f.currentStepIndex}`)
|
|
330
339
|
});
|
|
331
|
-
if (e === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */
|
|
340
|
+
if (e === "GOVT_VALIDATION_PROVISIONING") return /* @__PURE__ */ o("div", {
|
|
332
341
|
class: "IncodeFlow",
|
|
333
|
-
children: /* @__PURE__ */ i
|
|
342
|
+
children: /* @__PURE__ */ o(i, {
|
|
334
343
|
config: t,
|
|
335
|
-
onFinish: () =>
|
|
344
|
+
onFinish: () => p.completeModule(),
|
|
336
345
|
onError: (e) => {
|
|
337
346
|
a?.(e ?? "Government validation error");
|
|
338
347
|
}
|
|
339
|
-
}, `govt-validation-${
|
|
348
|
+
}, `govt-validation-${f.currentStepIndex}`)
|
|
340
349
|
});
|
|
341
|
-
if (e === "GEOLOCATION") return /* @__PURE__ */
|
|
350
|
+
if (e === "GEOLOCATION") return /* @__PURE__ */ o("div", {
|
|
342
351
|
class: "IncodeFlow",
|
|
343
|
-
children: /* @__PURE__ */ i
|
|
352
|
+
children: /* @__PURE__ */ o(i, {
|
|
344
353
|
config: t,
|
|
345
|
-
onFinish: () =>
|
|
354
|
+
onFinish: () => p.completeModule(),
|
|
346
355
|
onError: (e) => {
|
|
347
356
|
a?.(e ?? "Geolocation error");
|
|
348
357
|
}
|
|
349
|
-
}, `geolocation-${
|
|
358
|
+
}, `geolocation-${f.currentStepIndex}`)
|
|
350
359
|
});
|
|
351
|
-
if (e === "EXTERNAL_VERIFICATION") return /* @__PURE__ */
|
|
360
|
+
if (e === "EXTERNAL_VERIFICATION") return /* @__PURE__ */ o("div", {
|
|
352
361
|
class: "IncodeFlow",
|
|
353
|
-
children: /* @__PURE__ */ i
|
|
354
|
-
config: { flowId:
|
|
355
|
-
onFinish: () =>
|
|
362
|
+
children: /* @__PURE__ */ o(i, {
|
|
363
|
+
config: { flowId: f.flow.flowId },
|
|
364
|
+
onFinish: () => p.completeModule(),
|
|
356
365
|
onError: (e) => {
|
|
357
366
|
a?.(e ?? "External verification error");
|
|
358
367
|
}
|
|
359
|
-
}, `ekyc-${
|
|
368
|
+
}, `ekyc-${f.currentStepIndex}`)
|
|
360
369
|
});
|
|
361
|
-
if (e === "DOCUMENT_CAPTURE") return /* @__PURE__ */
|
|
370
|
+
if (e === "DOCUMENT_CAPTURE") return /* @__PURE__ */ o("div", {
|
|
362
371
|
class: "IncodeFlow",
|
|
363
|
-
children: /* @__PURE__ */ i
|
|
372
|
+
children: /* @__PURE__ */ o(i, {
|
|
364
373
|
config: t,
|
|
365
|
-
onFinish: () =>
|
|
374
|
+
onFinish: () => p.completeModule(),
|
|
366
375
|
onError: (e) => {
|
|
367
376
|
a?.(e ?? "Document capture error");
|
|
368
377
|
}
|
|
369
|
-
}, `document-capture-${
|
|
378
|
+
}, `document-capture-${f.currentStepIndex}`)
|
|
370
379
|
});
|
|
371
|
-
if (e === "ADDRESS") return /* @__PURE__ */
|
|
380
|
+
if (e === "ADDRESS") return /* @__PURE__ */ o("div", {
|
|
372
381
|
class: "IncodeFlow",
|
|
373
|
-
children: /* @__PURE__ */ i
|
|
382
|
+
children: /* @__PURE__ */ o(i, {
|
|
374
383
|
config: {
|
|
375
384
|
...t,
|
|
376
385
|
processingType: "addressStatement"
|
|
377
386
|
},
|
|
378
|
-
onFinish: () =>
|
|
387
|
+
onFinish: () => p.completeModule(),
|
|
379
388
|
onError: (e) => {
|
|
380
389
|
a?.(e ?? "Address capture error");
|
|
381
390
|
}
|
|
382
|
-
}, `address-${
|
|
391
|
+
}, `address-${f.currentStepIndex}`)
|
|
383
392
|
});
|
|
384
|
-
if (e === "SIGNATURE") return /* @__PURE__ */
|
|
393
|
+
if (e === "SIGNATURE") return /* @__PURE__ */ o("div", {
|
|
385
394
|
class: "IncodeFlow",
|
|
386
|
-
children: /* @__PURE__ */ i
|
|
395
|
+
children: /* @__PURE__ */ o(i, {
|
|
387
396
|
config: t,
|
|
388
|
-
onFinish: () =>
|
|
397
|
+
onFinish: () => p.completeModule(),
|
|
389
398
|
onError: (e) => {
|
|
390
399
|
a?.(e ?? "Signature capture error");
|
|
391
400
|
}
|
|
392
|
-
}, `signature-${
|
|
401
|
+
}, `signature-${f.currentStepIndex}`)
|
|
393
402
|
});
|
|
394
403
|
if (e === "EKYB") {
|
|
395
404
|
let e = t;
|
|
396
|
-
return /* @__PURE__ */
|
|
405
|
+
return /* @__PURE__ */ o("div", {
|
|
397
406
|
class: "IncodeFlow",
|
|
398
|
-
children: /* @__PURE__ */ i
|
|
407
|
+
children: /* @__PURE__ */ o(i, {
|
|
399
408
|
config: {
|
|
400
409
|
flowId: r,
|
|
401
410
|
checkBusinessName: e.checkBusinessName,
|
|
@@ -403,83 +412,83 @@ var E = ({ config: n, onFinish: r, onError: a }) => {
|
|
|
403
412
|
checkTaxId: e.checkTaxId,
|
|
404
413
|
checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
|
|
405
414
|
},
|
|
406
|
-
onFinish: () =>
|
|
415
|
+
onFinish: () => p.completeModule(),
|
|
407
416
|
onError: (e) => {
|
|
408
417
|
a?.(e ?? "eKYB verification error");
|
|
409
418
|
}
|
|
410
|
-
}, `ekyb-${
|
|
419
|
+
}, `ekyb-${f.currentStepIndex}`)
|
|
411
420
|
});
|
|
412
421
|
}
|
|
413
|
-
if (e === "COMBINED_CONSENT") return /* @__PURE__ */
|
|
422
|
+
if (e === "COMBINED_CONSENT") return /* @__PURE__ */ o("div", {
|
|
414
423
|
class: "IncodeFlow",
|
|
415
|
-
children: /* @__PURE__ */ i
|
|
424
|
+
children: /* @__PURE__ */ o(i, {
|
|
416
425
|
config: t,
|
|
417
|
-
onFinish: () =>
|
|
426
|
+
onFinish: () => p.completeModule(),
|
|
418
427
|
onError: (e) => {
|
|
419
428
|
a?.(e ?? "Combined consent error");
|
|
420
429
|
}
|
|
421
|
-
}, `combined-consent-${
|
|
430
|
+
}, `combined-consent-${f.currentStepIndex}`)
|
|
422
431
|
});
|
|
423
|
-
if (e === "MANDATORY_CONSENT") return /* @__PURE__ */
|
|
432
|
+
if (e === "MANDATORY_CONSENT") return /* @__PURE__ */ o("div", {
|
|
424
433
|
class: "IncodeFlow",
|
|
425
|
-
children: /* @__PURE__ */ i
|
|
434
|
+
children: /* @__PURE__ */ o(i, {
|
|
426
435
|
config: t,
|
|
427
|
-
onFinish: () =>
|
|
436
|
+
onFinish: () => p.completeModule(),
|
|
428
437
|
onError: (e) => {
|
|
429
438
|
a?.(e ?? "Mandatory consent error");
|
|
430
439
|
}
|
|
431
|
-
}, `mandatory-consent-${
|
|
440
|
+
}, `mandatory-consent-${f.currentStepIndex}`)
|
|
432
441
|
});
|
|
433
442
|
if (e === "AE_SIGNATURE" || e === "QE_SIGNATURE") {
|
|
434
443
|
let n = t, r = e === "QE_SIGNATURE" ? "qe" : "ae";
|
|
435
|
-
return /* @__PURE__ */
|
|
444
|
+
return /* @__PURE__ */ o("div", {
|
|
436
445
|
class: "IncodeFlow",
|
|
437
|
-
children: /* @__PURE__ */ i
|
|
446
|
+
children: /* @__PURE__ */ o(i, {
|
|
438
447
|
config: {
|
|
439
448
|
uploadDocument: n.uploadDocument,
|
|
440
449
|
downloadDocument: n.downloadDocument
|
|
441
450
|
},
|
|
442
|
-
onFinish: () =>
|
|
451
|
+
onFinish: () => p.completeModule(),
|
|
443
452
|
onError: (e) => {
|
|
444
453
|
a?.(e ?? `${r.toUpperCase()} Signature error`);
|
|
445
454
|
}
|
|
446
|
-
}, `${r}-signature-${
|
|
455
|
+
}, `${r}-signature-${f.currentStepIndex}`)
|
|
447
456
|
});
|
|
448
457
|
}
|
|
449
|
-
if (e === "ANTIFRAUD") return /* @__PURE__ */
|
|
458
|
+
if (e === "ANTIFRAUD") return /* @__PURE__ */ o("div", {
|
|
450
459
|
class: "IncodeFlow",
|
|
451
|
-
children: /* @__PURE__ */ i
|
|
452
|
-
onFinish: () =>
|
|
460
|
+
children: /* @__PURE__ */ o(i, {
|
|
461
|
+
onFinish: () => p.completeModule(),
|
|
453
462
|
onError: (e) => {
|
|
454
463
|
a?.(e ?? "Antifraud check error");
|
|
455
464
|
}
|
|
456
|
-
}, `antifraud-${
|
|
465
|
+
}, `antifraud-${f.currentStepIndex}`)
|
|
457
466
|
});
|
|
458
|
-
if (e === "WATCHLIST") return /* @__PURE__ */
|
|
467
|
+
if (e === "WATCHLIST") return /* @__PURE__ */ o("div", {
|
|
459
468
|
class: "IncodeFlow",
|
|
460
|
-
children: /* @__PURE__ */ i
|
|
461
|
-
onFinish: () =>
|
|
469
|
+
children: /* @__PURE__ */ o(i, {
|
|
470
|
+
onFinish: () => p.completeModule(),
|
|
462
471
|
onError: (e) => {
|
|
463
472
|
a?.(e ?? "Watchlist check error");
|
|
464
473
|
}
|
|
465
|
-
}, `watchlist-${
|
|
474
|
+
}, `watchlist-${f.currentStepIndex}`)
|
|
466
475
|
});
|
|
467
|
-
if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */
|
|
476
|
+
if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */ o("div", {
|
|
468
477
|
class: "IncodeFlow",
|
|
469
|
-
children: /* @__PURE__ */ i
|
|
470
|
-
onFinish: () =>
|
|
478
|
+
children: /* @__PURE__ */ o(i, {
|
|
479
|
+
onFinish: () => p.completeModule(),
|
|
471
480
|
onError: (e) => {
|
|
472
481
|
a?.(e ?? "Cross document data match error");
|
|
473
482
|
}
|
|
474
|
-
}, `cross-document-data-match-${
|
|
483
|
+
}, `cross-document-data-match-${f.currentStepIndex}`)
|
|
475
484
|
});
|
|
476
485
|
}
|
|
477
486
|
return null;
|
|
478
|
-
},
|
|
487
|
+
}, M = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(j, {
|
|
479
488
|
config: e,
|
|
480
489
|
onFinish: t,
|
|
481
490
|
onError: n
|
|
482
491
|
}) : null });
|
|
483
|
-
|
|
492
|
+
d(M, "incode-flow");
|
|
484
493
|
//#endregion
|
|
485
|
-
export {
|
|
494
|
+
export { M as IncodeFlow, T as preloadIncodeFlow };
|