@incodetech/web 0.0.0-dev-20260604-edfbb573 → 0.0.0-dev-20260604-659ac57f

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 (29) hide show
  1. package/dist/document-capture/document-capture.es.js +1 -1
  2. package/dist/{documentCapture-JOLoKg-o.js → documentCapture-CHmKVwqz.js} +1 -1
  3. package/dist/documentCapture-DfcF8h_m.js +2 -0
  4. package/dist/{dynamicForms-DavxiSRy.js → dynamicForms-ByfP6dw6.js} +1 -1
  5. package/dist/ekyb/ekyb.es.js +1 -1
  6. package/dist/{ekybModule-BgRVm537.js → ekybModule-D1D4edIu.js} +1 -1
  7. package/dist/ekybModule-DoaEfEqH.js +2 -0
  8. package/dist/email/email.es.js +18 -12
  9. package/dist/{emailInput-CCYF0Qwb.js → emailInput-DJdfL7eI.js} +1 -1
  10. package/dist/{extensibility-DmK4sDoK.js → extensibility-DF-z_Zts.js} +1 -1
  11. package/dist/extensibility.es.js +2 -2
  12. package/dist/field-comparison/field-comparison.es.js +1 -1
  13. package/dist/{fieldComparison-CA7rMe9-.js → fieldComparison-BiVqGXJq.js} +1 -1
  14. package/dist/fieldComparison-CM3YRwUd.js +2 -0
  15. package/dist/flow/flow.es.js +5 -3
  16. package/dist/governmentValidation/governmentValidation.es.js +9 -3
  17. package/dist/id/id.es.js +1 -1
  18. package/dist/{idOcr-cX6NMQRj.js → idOcr-DyiUeztu.js} +1 -1
  19. package/dist/otpInput-C4pk4BJU.js +157 -0
  20. package/dist/phone/phone.es.js +8 -2
  21. package/dist/signature/signature.es.js +1 -1
  22. package/dist/types/extensibility.d.ts +6 -0
  23. package/dist/{useModuleLoader-Dn_EKB2s.js → useModuleLoader-CvivqHRm.js} +73 -61
  24. package/dist/workflow/workflow.es.js +1 -1
  25. package/package.json +2 -2
  26. package/dist/documentCapture-DSoU1sJr.js +0 -2
  27. package/dist/ekybModule-hr0rGx_l.js +0 -2
  28. package/dist/fieldComparison-oheKoLrO.js +0 -2
  29. package/dist/otpInput-BQxXATyG.js +0 -145
@@ -1,2 +1,2 @@
1
- import { t as e } from "../documentCapture-JOLoKg-o.js";
1
+ import { t as e } from "../documentCapture-CHmKVwqz.js";
2
2
  export { e as DocumentCapture };
@@ -4,7 +4,7 @@ import { c as l, o as u, r as d } from "./hooks-MxHtZWTS.js";
4
4
  import { t as f } from "./incodeComponent-BoFhgK7G.js";
5
5
  import { n as p, r as m } from "./loadingIcon-BN5YRQUb.js";
6
6
  import { t as h } from "./page-C1yT4DLb.js";
7
- import { b as g, d as _, f as v, l as y, p as b, u as x, y as S } from "./extensibility-DmK4sDoK.js";
7
+ import { b as g, d as _, f as v, l as y, p as b, u as x, y as S } from "./extensibility-DF-z_Zts.js";
8
8
  import { t as C } from "./spinner-CKnjVHxw.js";
9
9
  import { t as w } from "./button-DcCUEn2n.js";
10
10
  import { a as T, p as E, r as D } from "./icons-9I5g9-_1.js";
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./documentCapture-CHmKVwqz.js";
2
+ export { e as DocumentCapture };
@@ -12,7 +12,7 @@ import { t as m } from "./dropdownComposed-CS2pyn-g.js";
12
12
  import { t as h } from "./dateInputComposed-Ddd7HLyM.js";
13
13
  import { t as g } from "./incodeModule-BiCoAJ5k.js";
14
14
  import { n as _, t as v } from "./requiredLabelHint-B6FN3v88.js";
15
- import { t as y } from "./emailInput-CCYF0Qwb.js";
15
+ import { t as y } from "./emailInput-DJdfL7eI.js";
16
16
  import { formatCPF as b, isValidCPF as x } from "@incodetech/core/cpf-ocr";
17
17
  import { createDynamicFormsManager as S } from "@incodetech/core/dynamic-forms";
18
18
  //#region src/modules/dynamic-forms/dynamicForms.tsx
@@ -1,2 +1,2 @@
1
- import { t as e } from "../ekybModule-BgRVm537.js";
1
+ import { t as e } from "../ekybModule-D1D4edIu.js";
2
2
  export { e as EkybModule };
@@ -4,7 +4,7 @@ import { c as o, i as s, o as c } from "./hooks-MxHtZWTS.js";
4
4
  import { t as l } from "./incodeComponent-BoFhgK7G.js";
5
5
  import { r as u } from "./loadingIcon-BN5YRQUb.js";
6
6
  import { t as d } from "./page-C1yT4DLb.js";
7
- import "./extensibility-DmK4sDoK.js";
7
+ import "./extensibility-DF-z_Zts.js";
8
8
  import { t as f } from "./spinner-CKnjVHxw.js";
9
9
  import { t as p } from "./button-DcCUEn2n.js";
10
10
  import { t as m } from "./verificationResult-V15L4ypC.js";
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./ekybModule-D1D4edIu.js";
2
+ export { e as EkybModule };
@@ -5,9 +5,9 @@ import { t as s } from "../incodeComponent-BoFhgK7G.js";
5
5
  import { r as c } from "../loadingIcon-BN5YRQUb.js";
6
6
  import { t as l } from "../page-C1yT4DLb.js";
7
7
  import { t as u } from "../button-DcCUEn2n.js";
8
- import { t as d } from "../otpInput-BQxXATyG.js";
8
+ import { t as d } from "../otpInput-C4pk4BJU.js";
9
9
  import { t as f } from "../incodeModule-BiCoAJ5k.js";
10
- import { t as p } from "../emailInput-CCYF0Qwb.js";
10
+ import { t as p } from "../emailInput-DJdfL7eI.js";
11
11
  import { createEmailManager as m } from "@incodetech/core/email";
12
12
  //#region src/modules/email/email.tsx
13
13
  function h(e) {
@@ -21,21 +21,21 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
21
21
  if (f) return f;
22
22
  if (!s) throw Error("Email config is required");
23
23
  return m({ config: s });
24
- }, { manageLifecycle: !f }), [S, C] = n(""), [w, T] = n(!1), [E, D] = n(!1), [O, k] = n(!1);
24
+ }, { manageLifecycle: !f }), [S, C] = n("");
25
25
  o({
26
26
  status: b.status,
27
27
  onFinish: _,
28
28
  onError: v,
29
29
  error: b.status === "error" ? b.error : void 0
30
30
  });
31
- let A = b.status === "inputting" ? b.prefilledEmail ?? "" : "";
31
+ let w = b.status === "inputting" ? b.prefilledEmail ?? "" : "";
32
32
  if (t(() => {
33
- if (A) {
34
- let e = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(A.trim());
35
- C(A.trim()), T(e), x.setEmail(A.trim(), e);
33
+ if (w) {
34
+ let e = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/.test(w.trim());
35
+ C(w.trim()), x.setEmail(w.trim(), e);
36
36
  }
37
- }, [A, x]), b.status === "idle" || b.status === "loadingPrefill" || b.status === "inputting" || b.status === "submitting" || b.status === "sendingInitialOtp") {
38
- let e = b.status === "idle" || b.status === "loadingPrefill" || b.status === "submitting" || b.status === "sendingInitialOtp", t = b.status === "inputting" && b.emailError ? y(g(b.emailError)) : void 0, n = b.status === "inputting" && E && O && !w ? y("verification.errors.emailInvalid") : void 0, i = t ?? n, a = !w || t !== void 0;
37
+ }, [w, x]), b.status === "idle" || b.status === "loadingPrefill" || b.status === "inputting" || b.status === "submitting" || b.status === "sendingInitialOtp") {
38
+ let e = b.status === "idle" || b.status === "loadingPrefill" || b.status === "submitting" || b.status === "sendingInitialOtp", t = b.status === "inputting" && b.emailError ? y(g(b.emailError)) : void 0, n = b.status === "inputting" && b.validationErrors?.email ? y(g(b.validationErrors.email)) : void 0, i = t ?? n, a = b.status === "inputting" ? b.isValid : !0;
39
39
  return /* @__PURE__ */ r(l, {
40
40
  className: "IncodeEmailPage",
41
41
  title: y("email.verify"),
@@ -47,16 +47,16 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
47
47
  disabled: e,
48
48
  required: !0,
49
49
  onEmailChange: (e, t) => {
50
- x.setEmail(e, t), C(e), D(!0), k(!1), T(t);
50
+ x.setEmail(e, t), C(e);
51
51
  },
52
52
  onBlur: () => {
53
- k(!0);
53
+ x.validateEmail();
54
54
  }
55
55
  }),
56
56
  /* @__PURE__ */ r(c, {}),
57
57
  /* @__PURE__ */ r(u, {
58
58
  onClick: () => x.submit(),
59
- disabled: a,
59
+ disabled: !a,
60
60
  isLoading: e,
61
61
  "data-testid": "email-submit",
62
62
  children: y("common.continue")
@@ -70,12 +70,18 @@ var _ = ({ config: s, manager: f, onFinish: _, onError: v }) => {
70
70
  className: "IncodeEmailPage IncodeEmailOtpPage",
71
71
  title: y("otp.enterCodeEmail"),
72
72
  children: /* @__PURE__ */ r(d, {
73
+ value: b.otpCode,
74
+ otpLength: b.otpLength,
73
75
  resendTimer: a ? b.resendTimer : 0,
74
76
  canResend: a ? b.canResend : !1,
75
77
  error: t ? y(h(b.otpError)) : void 0,
78
+ validationError: "otpValidationErrors" in b && b.otpValidationErrors?.otp ? y("otp.incompleteCode", { length: b.otpLength }) : void 0,
79
+ isValid: "isOtpValid" in b ? b.isOtpValid : !0,
76
80
  isLoading: e,
77
81
  disabled: i || e,
78
82
  onSubmit: (e) => x.submitOtp(e),
83
+ onChange: (e) => x.setOtpCode(e),
84
+ onValidate: () => x.validateOtp(),
79
85
  onResend: () => x.resendOtp(),
80
86
  onBack: () => x.back(),
81
87
  backLinkText: "otp.changeEmail"
@@ -1,6 +1,6 @@
1
1
  import { n as e } from "./i18n-Kzzvkz94.js";
2
2
  import { v as t } from "./vendor-preact-D6SntenC.js";
3
- import "./extensibility-DmK4sDoK.js";
3
+ import "./extensibility-DF-z_Zts.js";
4
4
  import { t as n } from "./inputComposed-DAEey9xm.js";
5
5
  //#region src/modules/email/emailInput.tsx
6
6
  var r = /^[^\s@]+@[^\s@]+\.[^\s@]{2,}$/, i = ({ value: i, emailError: a, label: o, labelHint: s, disabled: c = !1, required: l = !1, onEmailChange: u, onBlur: d }) => {
@@ -18,7 +18,7 @@ import { a as O, i as ee } from "./tutorial-B3nSsfRC.js";
18
18
  import "./verificationResult-V15L4ypC.js";
19
19
  import "./inputComposed-DAEey9xm.js";
20
20
  import "./inputComposed-eS4B0Mkh.js";
21
- import "./otpInput-BQxXATyG.js";
21
+ import "./otpInput-C4pk4BJU.js";
22
22
  import "./checkbox-DCCzBAuF.js";
23
23
  import "./radioGroupComposed-DRRxVk9Z.js";
24
24
  import "./phoneInputComposed-CjAxk2Gj.js";
@@ -4,7 +4,7 @@ import { c as n, s as r } from "./hooks-MxHtZWTS.js";
4
4
  import { n as i, t as a } from "./incodeComponent-BoFhgK7G.js";
5
5
  import { r as o } from "./loadingIcon-BN5YRQUb.js";
6
6
  import { t as s } from "./page-C1yT4DLb.js";
7
- import { _ as c, b as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, y as E } from "./extensibility-DmK4sDoK.js";
7
+ import { _ as c, b as l, c as u, d, f, g as p, h as m, i as h, l as g, m as _, n as v, o as y, p as b, r as x, s as S, t as C, u as w, v as T, y as E } from "./extensibility-DF-z_Zts.js";
8
8
  import { a as D, i as O, n as k, o as A, r as j, t as M } from "./typography-CxjaknHN.js";
9
9
  import { t as N } from "./spinner-CKnjVHxw.js";
10
10
  import { t as P } from "./processing-DPktVde2.js";
@@ -16,7 +16,7 @@ import { t as $ } from "./modal-ZqAhwiRF.js";
16
16
  import { a as ee, i as te, n as ne, o as re, r as ie, t as ae } from "./tutorial-B3nSsfRC.js";
17
17
  import { t as oe } from "./verificationResult-V15L4ypC.js";
18
18
  import { n as se, t as ce } from "./inputComposed-DAEey9xm.js";
19
- import { t as le } from "./otpInput-BQxXATyG.js";
19
+ import { t as le } from "./otpInput-C4pk4BJU.js";
20
20
  import { t as ue } from "./checkbox-DCCzBAuF.js";
21
21
  import { n as de, r as fe, t as pe } from "./radioGroupComposed-DRRxVk9Z.js";
22
22
  import { i as me, n as he, r as ge, t as _e } from "./phoneInputComposed-CjAxk2Gj.js";
@@ -1,2 +1,2 @@
1
- import { t as e } from "../fieldComparison-CA7rMe9-.js";
1
+ import { t as e } from "../fieldComparison-BiVqGXJq.js";
2
2
  export { e as FieldComparison };
@@ -4,7 +4,7 @@ import { c as n, o as r } from "./hooks-MxHtZWTS.js";
4
4
  import { t as i } from "./incodeComponent-BoFhgK7G.js";
5
5
  import { r as a } from "./loadingIcon-BN5YRQUb.js";
6
6
  import { t as o } from "./page-C1yT4DLb.js";
7
- import "./extensibility-DmK4sDoK.js";
7
+ import "./extensibility-DF-z_Zts.js";
8
8
  import { t as s } from "./button-DcCUEn2n.js";
9
9
  import { t as c } from "./verificationResult-V15L4ypC.js";
10
10
  import { t as l } from "./inputComposed-DAEey9xm.js";
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./fieldComparison-BiVqGXJq.js";
2
+ export { e as FieldComparison };
@@ -5,7 +5,7 @@ import { c as u } from "../hooks-MxHtZWTS.js";
5
5
  import { t as d } from "../incodeComponent-BoFhgK7G.js";
6
6
  import { t as f } from "../transitionSpinner-Di3bOyOu.js";
7
7
  import { t as p } from "../incodeModule-BiCoAJ5k.js";
8
- import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-Dn_EKB2s.js";
8
+ import { _ as m, a as h, c as g, d as _, f as v, h as y, l as b, m as x, n as S, o as C, p as w, r as T, s as E, t as D, u as O, y as k } from "../useModuleLoader-CvivqHRm.js";
9
9
  import { getDeviceClass as A } from "@incodetech/core/device";
10
10
  import { getRequiredWasmPipelines as j } from "@incodetech/core/flow";
11
11
  import { bootstrapSession as M, refreshQrUrlUuid as N } from "@incodetech/core/session";
@@ -183,8 +183,10 @@ function G(e) {
183
183
  onboardingId: null,
184
184
  onRefreshed: e.onUrlUuidRefreshed
185
185
  }, a);
186
- else if (L(e)) n = (await F(e, a)).token;
187
- else throw Error("Flow requires token, or configurationId with apiKey or clientId");
186
+ else if (L(e)) {
187
+ let t = await F(e, a);
188
+ n = t.token, f.flowManager.setEndScreenTexts(t.endScreenTitle ?? null, t.endScreenText ?? null);
189
+ } else throw Error("Flow requires token, or configurationId with apiKey or clientId");
188
190
  await v({
189
191
  token: n,
190
192
  lang: t,
@@ -4,10 +4,10 @@ import { c as r, o as i } from "../hooks-MxHtZWTS.js";
4
4
  import { t as a } from "../incodeComponent-BoFhgK7G.js";
5
5
  import { r as o } from "../loadingIcon-BN5YRQUb.js";
6
6
  import { t as s } from "../page-C1yT4DLb.js";
7
- import "../extensibility-DmK4sDoK.js";
7
+ import "../extensibility-DF-z_Zts.js";
8
8
  import { t as c } from "../autoFocusTitle-BpYdaSUM.js";
9
9
  import { t as l } from "../verificationResult-V15L4ypC.js";
10
- import { t as u } from "../otpInput-BQxXATyG.js";
10
+ import { t as u } from "../otpInput-C4pk4BJU.js";
11
11
  import { t as d } from "../incodeModule-BiCoAJ5k.js";
12
12
  import { createGovernmentValidationManager as f } from "@incodetech/core/government-validation";
13
13
  //#endregion
@@ -36,7 +36,7 @@ var p = ({ config: a, onFinish: d }) => {
36
36
  successTitle: p("ineCheck.processing")
37
37
  }),
38
38
  g && (() => {
39
- let e = m.status === "verifyingOtp", t = m.status === "awaitingOtp" ? m.otpError : void 0;
39
+ let e = m.status === "verifyingOtp", t = m.status === "awaitingOtp" ? m.otpError : void 0, r = m.status === "awaitingOtp" && m.otpValidationErrors?.otp ? p("otp.incompleteCode", { length: m.otpLength }) : void 0, i = m.status === "awaitingOtp" ? m.isOtpValid : !0;
40
40
  return /* @__PURE__ */ n("div", {
41
41
  class: "IncodeGovtValidation IncodeGovtValidation--otp",
42
42
  children: /* @__PURE__ */ n(s, {
@@ -48,10 +48,16 @@ var p = ({ config: a, onFinish: d }) => {
48
48
  children: [/* @__PURE__ */ n(c, { children: p("otp.insertSMS") }), /* @__PURE__ */ n("p", { children: p("otp.focus") })]
49
49
  }),
50
50
  /* @__PURE__ */ n(u, {
51
+ value: m.otpCode,
52
+ otpLength: m.otpLength,
51
53
  resendTimer: m.status === "awaitingOtp" ? m.resendTimer : 0,
52
54
  canResend: m.status === "awaitingOtp" ? m.canResend : !1,
53
55
  error: t,
56
+ validationError: r,
57
+ isValid: i,
54
58
  onSubmit: (e) => h.submitOtp(e),
59
+ onChange: (e) => h.setOtpCode(e),
60
+ onValidate: () => h.validateOtp(),
55
61
  onResend: () => h.resendOtp(),
56
62
  onBack: () => {},
57
63
  isLoading: e
package/dist/id/id.es.js CHANGED
@@ -4,7 +4,7 @@ import { c as l, o as u } from "../hooks-MxHtZWTS.js";
4
4
  import { t as d } from "../incodeComponent-BoFhgK7G.js";
5
5
  import { n as f } from "../loadingIcon-BN5YRQUb.js";
6
6
  import { t as p } from "../page-C1yT4DLb.js";
7
- import { a as m, i as h, n as g, o as _, r as v, s as y, t as b, y as ee } from "../extensibility-DmK4sDoK.js";
7
+ import { a as m, i as h, n as g, o as _, r as v, s as y, t as b, y as ee } from "../extensibility-DF-z_Zts.js";
8
8
  import { t as x } from "../spinner-CKnjVHxw.js";
9
9
  import "../spinner-B4dcie2T.js";
10
10
  import { t as S } from "../transitionSpinner-Di3bOyOu.js";
@@ -3,7 +3,7 @@ import { d as t, v as n } from "./vendor-preact-D6SntenC.js";
3
3
  import { c as r, o as i } from "./hooks-MxHtZWTS.js";
4
4
  import { t as a } from "./incodeComponent-BoFhgK7G.js";
5
5
  import { t as o } from "./page-C1yT4DLb.js";
6
- import "./extensibility-DmK4sDoK.js";
6
+ import "./extensibility-DF-z_Zts.js";
7
7
  import { t as s } from "./button-DcCUEn2n.js";
8
8
  import { t as c } from "./verificationResult-V15L4ypC.js";
9
9
  import { t as l } from "./inputComposed-DAEey9xm.js";
@@ -0,0 +1,157 @@
1
+ import { n as e } from "./i18n-Kzzvkz94.js";
2
+ import { _ as t, h as n, l as r, v as i } from "./vendor-preact-D6SntenC.js";
3
+ import { r as a } from "./loadingIcon-BN5YRQUb.js";
4
+ import { t as o } from "./button-DcCUEn2n.js";
5
+ import { t as s } from "./inputComposed-DAEey9xm.js";
6
+ import "./inputComposed-eS4B0Mkh.js";
7
+ //#region src/shared/otpInput/otpInput.tsx
8
+ var c = (e) => `${Math.floor(e / 60)}:${(e % 60).toString().padStart(2, "0")}`, l = (e, t) => e.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, t), u = ({ value: u, otpLength: d, resendTimer: f, canResend: p, error: m, validationError: h, isValid: g = !0, onSubmit: _, onChange: v, onValidate: y, onResend: b, onBack: x, backLinkText: S = "otp.changePhoneNumber", disabled: C = !1, isLoading: w = !1 }) => {
9
+ let { t: T } = e(), E = r(null), D = r(u.length), O = r(null), k = r(null), A = r(p), j = r(!1), M = r(), N = n((e) => {
10
+ let t = k.current;
11
+ t && (clearTimeout(M.current), t.textContent = "", M.current = setTimeout(() => {
12
+ t.textContent = e;
13
+ }, 50));
14
+ }, []);
15
+ t(() => {
16
+ let e = !A.current;
17
+ return A.current = p, e && p && N(T("otp.resendCodeAvailable")), () => clearTimeout(M.current);
18
+ }, [
19
+ p,
20
+ N,
21
+ T
22
+ ]), t(() => {
23
+ m && (O.current = null, setTimeout(() => {
24
+ E.current?.focus();
25
+ }, 0));
26
+ }, [m]);
27
+ let P = n((e) => {
28
+ let t = l(e, d);
29
+ t.length !== d || w || O.current !== t && (O.current = t, _(t));
30
+ }, [
31
+ w,
32
+ _,
33
+ d
34
+ ]);
35
+ t(() => {
36
+ let e = u.length === d && D.current < d;
37
+ D.current = u.length, e && P(u);
38
+ }, [
39
+ u,
40
+ d,
41
+ P
42
+ ]);
43
+ let F = (e) => {
44
+ let t = e.target;
45
+ v(l(t.value, d));
46
+ }, I = (e) => {
47
+ e.preventDefault();
48
+ let t = l(e.clipboardData?.getData("text") || "", d);
49
+ t && v(t);
50
+ }, L = () => {
51
+ if (u.length < d) {
52
+ y?.(), E.current?.focus();
53
+ return;
54
+ }
55
+ P(u);
56
+ }, R = m ?? h;
57
+ t(() => {
58
+ if (p || f <= 0) {
59
+ j.current = !1;
60
+ return;
61
+ }
62
+ if (!j.current) {
63
+ j.current = !0, N(T("otp.timerStarted", { time: String(f) }));
64
+ return;
65
+ }
66
+ f === 10 ? N(T("otp.timerTenSeconds")) : f === 5 && N(T("otp.timerFiveSeconds"));
67
+ }, [
68
+ f,
69
+ p,
70
+ N,
71
+ T
72
+ ]);
73
+ let z = () => {
74
+ if (!p && f > 0) return /* @__PURE__ */ i("div", {
75
+ class: "IncodeOtpInputActions",
76
+ children: /* @__PURE__ */ i("p", {
77
+ class: "IncodeOtpInputTimerText",
78
+ "data-testid": "otp-timer",
79
+ children: T("otp.resendCountdown", { time: c(f) })
80
+ })
81
+ });
82
+ let e = () => {
83
+ O.current = null, v(""), b();
84
+ }, t = () => {
85
+ O.current = null, v(""), x();
86
+ };
87
+ return /* @__PURE__ */ i("div", {
88
+ class: "IncodeOtpInputActions",
89
+ children: /* @__PURE__ */ i("p", {
90
+ class: `IncodeOtpInputResendText ${C ? "IncodeOtpInputResendTextDisabled" : ""}`,
91
+ "data-testid": "otp-resend-section",
92
+ children: [
93
+ T("otp.didYouNotGetIt"),
94
+ /* @__PURE__ */ i("button", {
95
+ type: "button",
96
+ class: "IncodeOtpInputLink",
97
+ onClick: e,
98
+ disabled: C || !p,
99
+ "data-testid": "otp-resend",
100
+ children: T("otp.resendCode")
101
+ }),
102
+ ` ${T("otp.or")} `,
103
+ /* @__PURE__ */ i("button", {
104
+ type: "button",
105
+ class: "IncodeOtpInputLink",
106
+ onClick: t,
107
+ disabled: C,
108
+ "data-testid": "otp-back",
109
+ children: T(S)
110
+ })
111
+ ]
112
+ })
113
+ });
114
+ };
115
+ return /* @__PURE__ */ i("div", {
116
+ class: "IncodeOtpInput IncodeOtpInputComposed",
117
+ children: [
118
+ /* @__PURE__ */ i("div", {
119
+ ref: k,
120
+ class: "IncodeSrOnly",
121
+ "aria-live": "polite",
122
+ "aria-atomic": "true"
123
+ }),
124
+ /* @__PURE__ */ i(s, {
125
+ id: "otp-code",
126
+ type: "text",
127
+ inputMode: "text",
128
+ ref: E,
129
+ maxLength: d,
130
+ value: u,
131
+ error: R,
132
+ onInput: F,
133
+ onBlur: y,
134
+ onPaste: I,
135
+ disabled: C || w,
136
+ required: !0,
137
+ autocomplete: "one-time-code",
138
+ "data-testid": "otp-input-0",
139
+ "aria-label": T("otp.verificationCode"),
140
+ class: "IncodeOtpSingleInput",
141
+ showErrorIcon: !0
142
+ }),
143
+ /* @__PURE__ */ i(a, {}),
144
+ /* @__PURE__ */ i(o, {
145
+ onClick: L,
146
+ disabled: C || w || !g,
147
+ isLoading: w,
148
+ "data-testid": "otp-submit",
149
+ children: T("common.continue")
150
+ }),
151
+ /* @__PURE__ */ i(a, { size: 12 }),
152
+ z()
153
+ ]
154
+ });
155
+ };
156
+ //#endregion
157
+ export { u as t };
@@ -5,7 +5,7 @@ import { t as o } from "../incodeComponent-BoFhgK7G.js";
5
5
  import { r as s } from "../loadingIcon-BN5YRQUb.js";
6
6
  import { t as c } from "../page-C1yT4DLb.js";
7
7
  import { t as l } from "../button-DcCUEn2n.js";
8
- import { t as u } from "../otpInput-BQxXATyG.js";
8
+ import { t as u } from "../otpInput-C4pk4BJU.js";
9
9
  import { t as d } from "../checkbox-DCCzBAuF.js";
10
10
  import { t as f } from "../phoneInputComposed-CjAxk2Gj.js";
11
11
  import { t as p } from "../incodeModule-BiCoAJ5k.js";
@@ -81,17 +81,23 @@ var _ = ({ config: o, manager: p, onFinish: _, onError: v }) => {
81
81
  }, "phone-input");
82
82
  }
83
83
  if (b.status === "awaitingOtp" || b.status === "verifyingOtp" || b.status === "otpError" || b.status === "resendingOtp") {
84
- let e = b.status === "verifyingOtp", t = b.status === "otpError", r = b.status === "awaitingOtp", i = b.status === "resendingOtp", a = r || t || e, o = t ? y(g(b.otpError)) : void 0;
84
+ let e = b.status === "verifyingOtp", t = b.status === "otpError", r = b.status === "awaitingOtp", i = b.status === "resendingOtp", a = r || t || e, o = t ? y(g(b.otpError)) : void 0, s = "otpValidationErrors" in b && b.otpValidationErrors?.otp ? y("otp.incompleteCode", { length: b.otpLength }) : void 0, l = "isOtpValid" in b ? b.isOtpValid : !0;
85
85
  return /* @__PURE__ */ n(c, {
86
86
  className: "IncodePhonePage",
87
87
  title: y("otp.enterCodeSMS"),
88
88
  children: /* @__PURE__ */ n(u, {
89
+ value: b.otpCode,
90
+ otpLength: b.otpLength,
89
91
  resendTimer: a ? b.resendTimer : 0,
90
92
  canResend: a ? b.canResend : !1,
91
93
  isLoading: e,
92
94
  disabled: i || e,
93
95
  error: o,
96
+ validationError: s,
97
+ isValid: l,
94
98
  onSubmit: (e) => x.submitOtp(e),
99
+ onChange: (e) => x.setOtpCode(e),
100
+ onValidate: () => x.validateOtp(),
95
101
  onResend: () => x.resendOtp(),
96
102
  onBack: () => x.back()
97
103
  })
@@ -4,7 +4,7 @@ import { c, o as l } from "../hooks-MxHtZWTS.js";
4
4
  import { t as u } from "../incodeComponent-BoFhgK7G.js";
5
5
  import { r as d } from "../loadingIcon-BN5YRQUb.js";
6
6
  import { t as f } from "../page-C1yT4DLb.js";
7
- import "../extensibility-DmK4sDoK.js";
7
+ import "../extensibility-DF-z_Zts.js";
8
8
  import { t as p } from "../button-DcCUEn2n.js";
9
9
  import { t as m } from "../verificationResult-V15L4ypC.js";
10
10
  import { t as h } from "../incodeModule-BiCoAJ5k.js";
@@ -625,10 +625,16 @@ declare type ModalTitleSectionProps = {
625
625
  export declare const OtpInput: FC<OtpInputProps>;
626
626
 
627
627
  declare type OtpInputProps = {
628
+ value: string;
629
+ otpLength: number;
628
630
  resendTimer: number;
629
631
  canResend: boolean;
630
632
  error?: string;
633
+ validationError?: string;
634
+ isValid?: boolean;
631
635
  onSubmit: (code: string) => void;
636
+ onChange: (code: string) => void;
637
+ onValidate?: () => void;
632
638
  onResend: () => void;
633
639
  onBack: () => void;
634
640
  /**
@@ -4,10 +4,10 @@ import { t as c } from "./uiConfig-CwpQ-IM6.js";
4
4
  import { t as l } from "./page-C1yT4DLb.js";
5
5
  import { t as u } from "./button-DcCUEn2n.js";
6
6
  import { t as d } from "./errorIcon-DpHzAoAo.js";
7
- import { initializeWasmUtil as f, resolveWasmConfig as p, setWasmConfig as m, upgradeToWasmHttpClient as h, warmupWasm as g } from "@incodetech/core/wasm";
8
- import { getDeviceClass as _ } from "@incodetech/core/device";
9
- import { createOrchestratedFlowManager as v, getFlow as y, getRequiredWasmPipelines as ee } from "@incodetech/core/flow";
10
- import { initializeSession as te } from "@incodetech/core/session";
7
+ import { initializeWasmUtil as f, resolveWasmConfig as p, setWasmConfig as m, upgradeToWasmHttpClient as ee, warmupWasm as h } from "@incodetech/core/wasm";
8
+ import { getDeviceClass as g } from "@incodetech/core/device";
9
+ import { createOrchestratedFlowManager as te, getFlow as ne, getRequiredWasmPipelines as _ } from "@incodetech/core/flow";
10
+ import { getFinishStatus as v, initializeSession as y } from "@incodetech/core/session";
11
11
  import { api as b } from "@incodetech/core/http";
12
12
  //#region src/shared/terminalErrorPage/terminalErrorPage.tsx
13
13
  var x = ({ message: e, onRetry: t }) => {
@@ -54,7 +54,7 @@ var x = ({ message: e, onRetry: t }) => {
54
54
  };
55
55
  //#endregion
56
56
  //#region src/styles/generatePalette.ts
57
- function ne(e) {
57
+ function S(e) {
58
58
  let t = e.replace("#", "");
59
59
  t.length === 3 && (t = t.split("").map((e) => e + e).join(""));
60
60
  let n = /^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
@@ -80,7 +80,7 @@ function ne(e) {
80
80
  l: u * 100
81
81
  };
82
82
  }
83
- function S(e, t, n) {
83
+ function C(e, t, n) {
84
84
  let r = e / 360, i = t / 100, a = n / 100, o, s, c;
85
85
  if (i === 0) o = s = c = a;
86
86
  else {
@@ -93,24 +93,24 @@ function S(e, t, n) {
93
93
  };
94
94
  return `#${l(o)}${l(s)}${l(c)}`;
95
95
  }
96
- function C(e) {
97
- let t = ne(e);
96
+ function re(e) {
97
+ let t = S(e);
98
98
  if (!t) throw Error(`Invalid color format: ${e}`);
99
99
  return {
100
- 50: S(t.h, t.s, 95),
101
- 200: S(t.h, t.s, 80),
102
- 300: S(t.h, t.s, 65),
103
- 400: S(t.h, t.s, Math.min(100, t.l + 10)),
100
+ 50: C(t.h, t.s, 95),
101
+ 200: C(t.h, t.s, 80),
102
+ 300: C(t.h, t.s, 65),
103
+ 400: C(t.h, t.s, Math.min(100, t.l + 10)),
104
104
  500: e,
105
- 600: S(t.h, t.s, Math.max(0, t.l - 10)),
106
- 900: S(t.h, t.s, 20)
105
+ 600: C(t.h, t.s, Math.max(0, t.l - 10)),
106
+ 900: C(t.h, t.s, 20)
107
107
  };
108
108
  }
109
109
  //#endregion
110
110
  //#region src/styles/applyTheme.ts
111
- function re(e, t) {
111
+ function ie(e, t) {
112
112
  if (typeof document > "u") return;
113
- let n = C(e), r = document.getElementById("incode-theme");
113
+ let n = re(e), r = document.getElementById("incode-theme");
114
114
  r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
115
115
  let i = t || "#ffffff", a = `
116
116
  :root,
@@ -129,11 +129,11 @@ function re(e, t) {
129
129
  }
130
130
  //#endregion
131
131
  //#region src/styles/fetchTheme.ts
132
- async function ie() {
132
+ async function ae() {
133
133
  return (await b.get("/omni/asset/fetch-all")).data;
134
134
  }
135
135
  var w = /* @__PURE__ */ new Map();
136
- async function ae(e) {
136
+ async function oe(e) {
137
137
  if (e.startsWith("data:")) return e;
138
138
  let t = w.get(e);
139
139
  if (t) return t;
@@ -144,7 +144,7 @@ async function ae(e) {
144
144
  return w.set(e, r), r;
145
145
  }
146
146
  async function T() {
147
- let e = await ie();
147
+ let e = await ae();
148
148
  if (!e.theme) throw Error("Theme URL not found in assets response");
149
149
  let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
150
150
  if (n) {
@@ -153,14 +153,14 @@ async function T() {
153
153
  r = await e.json();
154
154
  } else r = (await b.get(t)).data;
155
155
  let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
156
- return i && (a = await ae(i)), {
156
+ return i && (a = await oe(i)), {
157
157
  ...r,
158
158
  logo: a
159
159
  };
160
160
  }
161
161
  async function E() {
162
162
  let e = await T();
163
- return e.main && re(e.main, e.buttonColor), e;
163
+ return e.main && ie(e.main, e.buttonColor), e;
164
164
  }
165
165
  //#endregion
166
166
  //#region src/modules/flow/flowInit.ts
@@ -223,13 +223,13 @@ var N = {
223
223
  INE_VALIDATION: () => import("./governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
224
224
  GEOLOCATION: () => import("./geolocation/geolocation.es.js").then((e) => e.Geolocation),
225
225
  EXTERNAL_VERIFICATION: () => import("./ekycModule-Bx2PI3UK.js").then((e) => e.EkycModule),
226
- EKYB: () => import("./ekybModule-hr0rGx_l.js").then((e) => e.EkybModule),
227
- DOCUMENT_CAPTURE: () => import("./documentCapture-DSoU1sJr.js").then((e) => e.DocumentCapture),
228
- ADDRESS: () => import("./documentCapture-DSoU1sJr.js").then((e) => e.DocumentCapture),
226
+ EKYB: () => import("./ekybModule-DoaEfEqH.js").then((e) => e.EkybModule),
227
+ DOCUMENT_CAPTURE: () => import("./documentCapture-DfcF8h_m.js").then((e) => e.DocumentCapture),
228
+ ADDRESS: () => import("./documentCapture-DfcF8h_m.js").then((e) => e.DocumentCapture),
229
229
  COMBINED_CONSENT: () => import("./consent/consent.es.js").then((e) => e.Consent),
230
230
  MANDATORY_CONSENT: () => import("./mandatoryConsent-DAFLnk4s.js").then((e) => e.MandatoryConsent),
231
231
  SIGNATURE: () => import("./signature/signature.es.js").then((e) => e.Signature),
232
- ID_OCR: () => import("./idOcr-cX6NMQRj.js").then((e) => e.IdOcr),
232
+ ID_OCR: () => import("./idOcr-DyiUeztu.js").then((e) => e.IdOcr),
233
233
  CPF_OCR: () => import("./cpfOcr-DCTIr5fo.js").then((e) => e.CpfOcr),
234
234
  ANTIFRAUD: () => import("./antifraud/antifraud.es.js").then((e) => e.Antifraud),
235
235
  CUSTOM_FIELDS: () => import("./customFields-DNl42iD9.js").then((e) => e.CustomFields),
@@ -239,8 +239,8 @@ var N = {
239
239
  AE_SIGNATURE: () => import("./ae-signature/ae-signature.es.js").then((e) => e.AeSignature),
240
240
  QE_SIGNATURE: () => import("./qe-signature/qe-signature.es.js").then((e) => e.QeSignature),
241
241
  CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((e) => e.CrossDocumentDataMatch),
242
- DYNAMIC_FORMS: () => import("./dynamicForms-DavxiSRy.js").then((e) => e.DynamicForms),
243
- FIELD_COMPARISON: () => import("./fieldComparison-oheKoLrO.js").then((e) => e.FieldComparison)
242
+ DYNAMIC_FORMS: () => import("./dynamicForms-ByfP6dw6.js").then((e) => e.DynamicForms),
243
+ FIELD_COMPARISON: () => import("./fieldComparison-CM3YRwUd.js").then((e) => e.FieldComparison)
244
244
  };
245
245
  function P() {
246
246
  return O();
@@ -259,22 +259,34 @@ function L() {
259
259
  });
260
260
  }
261
261
  function R(e = {}) {
262
- let t = {}, n = e.isDesktop ?? _() === "desktop", { enableHome: r, ...i } = e;
263
- return v({
262
+ let t = {}, n = e.isDesktop ?? g() === "desktop", { enableHome: r, ...i } = e, a = {
263
+ endScreenTitle: null,
264
+ endScreenText: null
265
+ }, o = te({
264
266
  enableHome: r,
265
267
  getFlow: async (e) => {
266
- let r = await y(e, {
268
+ let r = await ne(e, {
267
269
  ...i,
268
270
  isDesktop: n
269
271
  }), a = M(r.flowModules ?? []);
270
272
  for (let e of Object.keys(t)) delete t[e];
271
273
  return Object.assign(t, a), r;
272
274
  },
275
+ getFinishStatus: async (e, t) => ({
276
+ ...await v(e, t),
277
+ ...a
278
+ }),
273
279
  lazyModules: t
274
280
  });
281
+ return Object.assign(o, { setEndScreenTexts(e, t) {
282
+ a = {
283
+ endScreenTitle: e,
284
+ endScreenText: t
285
+ };
286
+ } });
275
287
  }
276
288
  async function z(n) {
277
- await te({ token: n.token }), !r() && t(e(n.lang ? { lang: n.lang } : void 0));
289
+ await y({ token: n.token }), !r() && t(e(n.lang ? { lang: n.lang } : void 0));
278
290
  }
279
291
  async function B(e) {
280
292
  let { token: t, lang: n, flowManager: r } = e;
@@ -300,7 +312,7 @@ async function V() {
300
312
  }
301
313
  function H(e, t) {
302
314
  if (e.currentStep === "REDIRECT_TO_MOBILE") return;
303
- let n = ee(e.flow);
315
+ let n = _(e.flow);
304
316
  if (n.length > 0) {
305
317
  let e = p({
306
318
  ...t ?? {},
@@ -309,7 +321,7 @@ function H(e, t) {
309
321
  ...e,
310
322
  pipelines: e.pipelines ? [...e.pipelines] : void 0
311
323
  };
312
- m(r), g(e).then(() => f(r)).then(() => h(r)).catch((e) => {
324
+ m(r), h(e).then(() => f(r)).then(() => ee(r)).catch((e) => {
313
325
  console.error("WASM warmup failed:", e);
314
326
  });
315
327
  }
@@ -323,7 +335,7 @@ function U(e) {
323
335
  }
324
336
  //#endregion
325
337
  //#region src/modules/flow/unsupportedModule.tsx
326
- var W = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ s("section", {
338
+ var se = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ s("section", {
327
339
  class: "IncodeUnsupportedModule",
328
340
  "aria-live": "polite",
329
341
  children: /* @__PURE__ */ s("div", {
@@ -352,7 +364,7 @@ var W = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ s("section", {
352
364
  });
353
365
  //#endregion
354
366
  //#region src/modules/flow/extractIncodeStatus.ts
355
- function oe(e) {
367
+ function W(e) {
356
368
  if (typeof e == "object" && e && "status" in e && typeof e.status == "number") return e.status;
357
369
  }
358
370
  //#endregion
@@ -365,46 +377,46 @@ async function K(e) {
365
377
  if (!t) throw Error("SHA-1 is not available in this environment");
366
378
  return G(await t.digest("SHA-1", new TextEncoder().encode(e)));
367
379
  }
368
- async function q(e) {
380
+ async function ce(e) {
369
381
  if (typeof e.apiKey == "string") return e.apiKey;
370
382
  if (typeof e.clientId == "string") return K(e.clientId);
371
383
  throw Error("Self-loading mode requires apiKey or clientId");
372
384
  }
373
385
  //#endregion
374
386
  //#region src/modules/flow/headlessModule.ts
375
- var se = () => null, ce = () => Promise.resolve(se), le = new Set(["IDENTITY_SEARCH"]);
387
+ var le = () => null, ue = () => Promise.resolve(le), de = new Set(["IDENTITY_SEARCH"]);
376
388
  //#endregion
377
389
  //#region src/modules/flow/useModuleLoader.ts
378
- function ue(e, t) {
390
+ function fe(e, t) {
379
391
  return e instanceof Error ? e.message : t;
380
392
  }
381
- var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
382
- function X(e) {
393
+ var q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap();
394
+ function Y(e) {
383
395
  return e;
384
396
  }
385
- function Z(e) {
386
- if (e) return J.get(X(e));
397
+ function X(e) {
398
+ if (e) return q.get(Y(e));
387
399
  }
388
- function de(e) {
389
- let t = X(e), n = J.get(t);
400
+ function Z(e) {
401
+ let t = Y(e), n = q.get(t);
390
402
  if (n) return Promise.resolve(n);
391
- let r = Y.get(t);
403
+ let r = J.get(t);
392
404
  if (r) return r;
393
- let i = e().then((e) => (J.set(t, e), Y.delete(t), e)).catch((e) => {
394
- throw Y.delete(t), e;
405
+ let i = e().then((e) => (q.set(t, e), J.delete(t), e)).catch((e) => {
406
+ throw J.delete(t), e;
395
407
  });
396
- return Y.set(t, i), i;
408
+ return J.set(t, i), i;
397
409
  }
398
410
  function Q(e) {
399
411
  if (!e) return { status: "idle" };
400
- let t = Z(e);
412
+ let t = X(e);
401
413
  return t ? {
402
414
  status: "loaded",
403
415
  Component: t
404
416
  } : { status: "loading" };
405
417
  }
406
- function fe(e, t, n) {
407
- if (e) return t[e] ?? (n?.has(e) ? ce : void 0);
418
+ function pe(e, t, n) {
419
+ if (e) return t[e] ?? (n?.has(e) ? ue : void 0);
408
420
  }
409
421
  function $(e) {
410
422
  let { loader: t, onLoading: n, onLoaded: r, onError: s } = e, [c, l] = o(() => Q(t)), u = a(t), d = a(n), f = a(r), p = a(s);
@@ -416,20 +428,20 @@ function $(e) {
416
428
  s
417
429
  ]), u.current !== t && (u.current = t, l(Q(t))), i(() => {
418
430
  if (!t) return;
419
- if (Z(t)) {
431
+ if (X(t)) {
420
432
  f.current?.();
421
433
  return;
422
434
  }
423
435
  d.current?.();
424
436
  let e = !1;
425
- return de(t).then((t) => {
437
+ return Z(t).then((t) => {
426
438
  e || (l({
427
439
  status: "loaded",
428
440
  Component: t
429
441
  }), f.current?.());
430
442
  }).catch((t) => {
431
443
  if (!e) {
432
- let e = ue(t, "Failed to load component");
444
+ let e = fe(t, "Failed to load component");
433
445
  l({
434
446
  status: "error",
435
447
  error: e
@@ -440,8 +452,8 @@ function $(e) {
440
452
  };
441
453
  }, [t]), c;
442
454
  }
443
- function pe(e) {
444
- let { moduleKey: t, modules: n, headlessModuleKeys: r, onModuleLoading: a, onModuleLoaded: s, onError: c } = e, [l, u] = o(void 0), d = fe(t, n, r), f = $({
455
+ function me(e) {
456
+ let { moduleKey: t, modules: n, headlessModuleKeys: r, onModuleLoading: a, onModuleLoaded: s, onError: c } = e, [l, u] = o(void 0), d = pe(t, n, r), f = $({
445
457
  loader: d,
446
458
  onLoading: t ? () => a?.(t) : void 0,
447
459
  onLoaded: t ? () => s?.(t) : void 0,
@@ -469,16 +481,16 @@ function pe(e) {
469
481
  Component: f.Component
470
482
  } : { status: "idle" };
471
483
  }
472
- function me(e) {
484
+ function he(e) {
473
485
  let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = $({ loader: r });
474
486
  return r != null && i.status === "loaded";
475
487
  }
476
- function he(e) {
488
+ function ge(e) {
477
489
  typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
478
490
  e();
479
491
  }) : setTimeout(e, 0);
480
492
  }
481
- function ge(e, t, n, r) {
493
+ function _e(e, t, n, r) {
482
494
  let o = a(/* @__PURE__ */ new Set());
483
495
  i(() => {
484
496
  if (r && t < e.length - 1) {
@@ -486,7 +498,7 @@ function ge(e, t, n, r) {
486
498
  if (r && !o.current.has(r)) {
487
499
  o.current.add(r);
488
500
  let e = n[r];
489
- e && he(() => {
501
+ e && ge(() => {
490
502
  e().catch(() => {
491
503
  o.current.delete(r);
492
504
  });
@@ -501,4 +513,4 @@ function ge(e, t, n, r) {
501
513
  ]);
502
514
  }
503
515
  //#endregion
504
- export { H as _, q as a, A as c, V as d, B as f, z as g, L as h, le as i, N as l, F as m, me as n, oe as o, U as p, ge as r, W as s, pe as t, R as u, E as v, x as y };
516
+ export { H as _, ce as a, A as c, V as d, B as f, z as g, L as h, de as i, N as l, F as m, he as n, W as o, U as p, _e as r, se as s, me as t, R as u, E as v, x as y };
@@ -5,7 +5,7 @@ import { c as l } from "../hooks-MxHtZWTS.js";
5
5
  import { t as u } from "../incodeComponent-BoFhgK7G.js";
6
6
  import { t as d } from "../transitionSpinner-Di3bOyOu.js";
7
7
  import { t as f } from "../incodeModule-BiCoAJ5k.js";
8
- import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-Dn_EKB2s.js";
8
+ import { a as p, g as m, i as h, l as g, o as _, s as v, t as y, v as b, y as x } from "../useModuleLoader-CvivqHRm.js";
9
9
  import { resolveWasmConfig as S, upgradeToWasmHttpClient as C, warmupWasm as w } from "@incodetech/core/wasm";
10
10
  import { getDeviceClass as T } from "@incodetech/core/device";
11
11
  import { bootstrapSession as E, refreshQrUrlUuid as D } from "@incodetech/core/session";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260604-edfbb573",
3
+ "version": "0.0.0-dev-20260604-659ac57f",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
@@ -255,7 +255,7 @@
255
255
  "qrcode": "^1.5.4",
256
256
  "signature_pad": "^5.1.3",
257
257
  "tailwindcss": "^4.1.17",
258
- "@incodetech/core": "0.0.0-dev-20260604-edfbb573"
258
+ "@incodetech/core": "0.0.0-dev-20260604-659ac57f"
259
259
  },
260
260
  "devDependencies": {
261
261
  "@microsoft/api-extractor": "^7.53.3",
@@ -1,2 +0,0 @@
1
- import { t as e } from "./documentCapture-JOLoKg-o.js";
2
- export { e as DocumentCapture };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./ekybModule-BgRVm537.js";
2
- export { e as EkybModule };
@@ -1,2 +0,0 @@
1
- import { t as e } from "./fieldComparison-CA7rMe9-.js";
2
- export { e as FieldComparison };
@@ -1,145 +0,0 @@
1
- import { n as e } from "./i18n-Kzzvkz94.js";
2
- import { _ as t, h as n, l as r, p as i, v as a } from "./vendor-preact-D6SntenC.js";
3
- import { r as o } from "./loadingIcon-BN5YRQUb.js";
4
- import { t as s } from "./button-DcCUEn2n.js";
5
- import { t as c } from "./inputComposed-DAEey9xm.js";
6
- import "./inputComposed-eS4B0Mkh.js";
7
- //#region src/shared/otpInput/otpInput.tsx
8
- var l = 6, u = (e) => `${Math.floor(e / 60)}:${(e % 60).toString().padStart(2, "0")}`, d = (e) => e.replace(/[^a-zA-Z0-9]/g, "").toUpperCase().slice(0, l), f = ({ resendTimer: f, canResend: p, error: m, onSubmit: h, onResend: g, onBack: _, backLinkText: v = "otp.changePhoneNumber", disabled: y = !1, isLoading: b = !1 }) => {
9
- let { t: x } = e(), [S, C] = i(""), w = r(null), T = r(0), E = r(null), D = r(null), O = r(p), k = r(!1), A = r(), j = n((e) => {
10
- let t = D.current;
11
- t && (clearTimeout(A.current), t.textContent = "", A.current = setTimeout(() => {
12
- t.textContent = e;
13
- }, 50));
14
- }, []);
15
- t(() => {
16
- let e = !O.current;
17
- return O.current = p, e && p && j(x("otp.resendCodeAvailable")), () => clearTimeout(A.current);
18
- }, [
19
- p,
20
- j,
21
- x
22
- ]), t(() => {
23
- m && (E.current = null, setTimeout(() => {
24
- w.current?.focus();
25
- }, 0));
26
- }, [m]);
27
- let M = n((e) => {
28
- let t = d(e);
29
- t.length !== l || b || E.current !== t && (E.current = t, h(t));
30
- }, [b, h]);
31
- t(() => {
32
- if (!S) return;
33
- let e = S.length === l && T.current < l;
34
- T.current = S.length, e && M(S);
35
- }, [S, M]);
36
- let N = (e) => {
37
- let t = e.target;
38
- C(d(t.value));
39
- }, P = (e) => {
40
- e.preventDefault();
41
- let t = d(e.clipboardData?.getData("text") || "");
42
- t && (C(t), t.length === l && M(t));
43
- };
44
- t(() => {
45
- if (p || f <= 0) {
46
- k.current = !1;
47
- return;
48
- }
49
- if (!k.current) {
50
- k.current = !0, j(x("otp.timerStarted", { time: String(f) }));
51
- return;
52
- }
53
- f === 10 ? j(x("otp.timerTenSeconds")) : f === 5 && j(x("otp.timerFiveSeconds"));
54
- }, [
55
- f,
56
- p,
57
- j,
58
- x
59
- ]);
60
- let F = () => {
61
- if (!p && f > 0) return /* @__PURE__ */ a("div", {
62
- class: "IncodeOtpInputActions",
63
- children: /* @__PURE__ */ a("p", {
64
- class: "IncodeOtpInputTimerText",
65
- "data-testid": "otp-timer",
66
- children: x("otp.resendCountdown", { time: u(f) })
67
- })
68
- });
69
- let e = () => {
70
- E.current = null, C(""), g();
71
- }, t = () => {
72
- E.current = null, C(""), _();
73
- };
74
- return /* @__PURE__ */ a("div", {
75
- class: "IncodeOtpInputActions",
76
- children: /* @__PURE__ */ a("p", {
77
- class: `IncodeOtpInputResendText ${y ? "IncodeOtpInputResendTextDisabled" : ""}`,
78
- "data-testid": "otp-resend-section",
79
- children: [
80
- x("otp.didYouNotGetIt"),
81
- /* @__PURE__ */ a("button", {
82
- type: "button",
83
- class: "IncodeOtpInputLink",
84
- onClick: e,
85
- disabled: y || !p,
86
- "data-testid": "otp-resend",
87
- children: x("otp.resendCode")
88
- }),
89
- ` ${x("otp.or")} `,
90
- /* @__PURE__ */ a("button", {
91
- type: "button",
92
- class: "IncodeOtpInputLink",
93
- onClick: t,
94
- disabled: y,
95
- "data-testid": "otp-back",
96
- children: x(v)
97
- })
98
- ]
99
- })
100
- });
101
- };
102
- return /* @__PURE__ */ a("div", {
103
- class: "IncodeOtpInput IncodeOtpInputComposed",
104
- children: [
105
- /* @__PURE__ */ a("div", {
106
- ref: D,
107
- class: "IncodeSrOnly",
108
- "aria-live": "polite",
109
- "aria-atomic": "true"
110
- }),
111
- /* @__PURE__ */ a(c, {
112
- id: "otp-code",
113
- type: "text",
114
- inputMode: "text",
115
- ref: w,
116
- maxLength: l,
117
- value: S,
118
- error: m,
119
- onInput: N,
120
- onPaste: P,
121
- disabled: y || b,
122
- required: !0,
123
- autocomplete: "one-time-code",
124
- "data-testid": "otp-input-0",
125
- "aria-label": x("otp.verificationCode"),
126
- class: "IncodeOtpSingleInput",
127
- showErrorIcon: !0
128
- }),
129
- /* @__PURE__ */ a(o, {}),
130
- /* @__PURE__ */ a(s, {
131
- onClick: () => {
132
- M(S);
133
- },
134
- disabled: S.length < l || b,
135
- isLoading: b,
136
- "data-testid": "otp-submit",
137
- children: x("common.continue")
138
- }),
139
- /* @__PURE__ */ a(o, { size: 12 }),
140
- F()
141
- ]
142
- });
143
- };
144
- //#endregion
145
- export { f as t };