@incodetech/web 0.0.0-dev-20260416-bf5b221 → 0.0.0-dev-20260417-78468b3

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