@incodetech/core 0.0.0-dev-20260422-9672ed5 → 0.0.0-dev-20260423-6581cc6

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 (33) hide show
  1. package/dist/ae-signature.d.ts +1 -1
  2. package/dist/authentication.esm.js +4 -4
  3. package/dist/{authenticationManager-D64D2deE.esm.js → authenticationManager-CqvsvGqo.esm.js} +1 -1
  4. package/dist/{authenticationStateMachine-CureH7Ki.esm.js → authenticationStateMachine-Dq1qr6Sc.esm.js} +1 -1
  5. package/dist/camera.d.ts +4 -2
  6. package/dist/camera.esm.js +1 -1
  7. package/dist/consent.d.ts +47 -47
  8. package/dist/document-capture.d.ts +67 -67
  9. package/dist/document-upload.d.ts +40 -40
  10. package/dist/electronic-signature.d.ts +1 -1
  11. package/dist/extensibility.d.ts +1 -1
  12. package/dist/extensibility.esm.js +10 -10
  13. package/dist/{faceCaptureSetup-C65JUwp_.esm.js → faceCaptureSetup-Cc7fBwa-.esm.js} +4 -3
  14. package/dist/home.d.ts +10 -10
  15. package/dist/id.esm.js +3 -3
  16. package/dist/{idCaptureManager-CLJJoV74.esm.js → idCaptureManager-BXiOjaTB.esm.js} +1 -1
  17. package/dist/{idCaptureStateMachine-DJGWsVbh.esm.js → idCaptureStateMachine-CGT6w3Nw.esm.js} +4 -3
  18. package/dist/identity-reuse.d.ts +47 -47
  19. package/dist/{index-C4L3Okdp.d.ts → index-WyJv3W9w.d.ts} +119 -119
  20. package/dist/mandatory-consent.d.ts +50 -50
  21. package/dist/{permissionServices-7GX060Fo.esm.js → permissionServices-nSyjSTQY.esm.js} +2 -2
  22. package/dist/phone.d.ts +1 -1
  23. package/dist/phone.esm.js +2 -2
  24. package/dist/{phoneManager-D9CsGQPS.esm.js → phoneManager-Bd1-CLb-.esm.js} +1 -1
  25. package/dist/{phoneManager-B06CapY3.d.ts → phoneManager-BlnuDKw6.d.ts} +1 -1
  26. package/dist/{phoneStateMachine-BDojEAdF.esm.js → phoneStateMachine-DzCW_9FY.esm.js} +51 -35
  27. package/dist/qe-signature.d.ts +1 -1
  28. package/dist/selfie.esm.js +4 -4
  29. package/dist/{selfieManager-BnBJ47OE.esm.js → selfieManager-Dvi0cZ4c.esm.js} +1 -1
  30. package/dist/{selfieStateMachine-DbI8xrNK.esm.js → selfieStateMachine-DRKNuv4Y.esm.js} +1 -1
  31. package/dist/workflow.d.ts +82 -82
  32. package/dist/workflow.esm.js +6 -6
  33. package/package.json +38 -1
@@ -3,7 +3,7 @@ import "./Actor-B15bmdr9.js";
3
3
  import "./camera-BORJdHZf.js";
4
4
  import "./types-DH6IUrUs.js";
5
5
  import { a as RegulationTypes } from "./types-DoC698nG.js";
6
- import * as xstate0 from "xstate";
6
+ import * as xstate398 from "xstate";
7
7
 
8
8
  //#region src/modules/mandatory-consent/types.d.ts
9
9
  type MandatoryConsentConfig = {
@@ -30,7 +30,7 @@ type MandatoryConsentContext = {
30
30
  type MandatoryConsentInput = {
31
31
  config: MandatoryConsentConfig;
32
32
  };
33
- declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentContext, {
33
+ declare const mandatoryConsentMachine: xstate398.StateMachine<MandatoryConsentContext, {
34
34
  type: "LOAD";
35
35
  } | {
36
36
  type: "TOGGLE";
@@ -43,53 +43,53 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
43
43
  } | {
44
44
  type: "RESET";
45
45
  }, {
46
- [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
46
+ [x: string]: xstate398.ActorRefFromLogic<xstate398.PromiseActorLogic<FetchMandatoryConsentResponse, {
47
47
  config: MandatoryConsentConfig;
48
- }, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
48
+ }, xstate398.EventObject>> | xstate398.ActorRefFromLogic<xstate398.PromiseActorLogic<void, {
49
49
  consentId: string;
50
50
  isSigned: boolean;
51
- }, xstate0.EventObject>> | undefined;
52
- }, xstate0.Values<{
51
+ }, xstate398.EventObject>> | undefined;
52
+ }, xstate398.Values<{
53
53
  fetchConsent: {
54
54
  src: "fetchConsent";
55
- logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
55
+ logic: xstate398.PromiseActorLogic<FetchMandatoryConsentResponse, {
56
56
  config: MandatoryConsentConfig;
57
- }, xstate0.EventObject>;
57
+ }, xstate398.EventObject>;
58
58
  id: string | undefined;
59
59
  };
60
60
  submitConsent: {
61
61
  src: "submitConsent";
62
- logic: xstate0.PromiseActorLogic<void, {
62
+ logic: xstate398.PromiseActorLogic<void, {
63
63
  consentId: string;
64
64
  isSigned: boolean;
65
- }, xstate0.EventObject>;
65
+ }, xstate398.EventObject>;
66
66
  id: string | undefined;
67
67
  };
68
- }>, xstate0.Values<{
68
+ }>, xstate398.Values<{
69
69
  setConsent: {
70
70
  type: "setConsent";
71
- params: xstate0.NonReducibleUnknown;
72
- };
73
- toggleSigned: {
74
- type: "toggleSigned";
75
- params: xstate0.NonReducibleUnknown;
71
+ params: xstate398.NonReducibleUnknown;
76
72
  };
77
73
  setError: {
78
74
  type: "setError";
79
- params: xstate0.NonReducibleUnknown;
75
+ params: xstate398.NonReducibleUnknown;
80
76
  };
81
77
  clearError: {
82
78
  type: "clearError";
83
- params: xstate0.NonReducibleUnknown;
79
+ params: xstate398.NonReducibleUnknown;
80
+ };
81
+ toggleSigned: {
82
+ type: "toggleSigned";
83
+ params: xstate398.NonReducibleUnknown;
84
84
  };
85
85
  resetContext: {
86
86
  type: "resetContext";
87
- params: xstate0.NonReducibleUnknown;
87
+ params: xstate398.NonReducibleUnknown;
88
88
  };
89
89
  }>, {
90
90
  type: "canSubmit";
91
91
  params: unknown;
92
- }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
92
+ }, never, "error" | "idle" | "closed" | "finished" | "loading" | "display" | "submitting", string, MandatoryConsentInput, xstate398.NonReducibleUnknown, xstate398.EventObject, xstate398.MetaObject, {
93
93
  readonly id: "mandatoryConsent";
94
94
  readonly initial: "idle";
95
95
  readonly context: ({
@@ -98,70 +98,70 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
98
98
  spawn: {
99
99
  <TSrc extends "fetchConsent" | "submitConsent">(logic: TSrc, ...[options]: ({
100
100
  src: "fetchConsent";
101
- logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
101
+ logic: xstate398.PromiseActorLogic<FetchMandatoryConsentResponse, {
102
102
  config: MandatoryConsentConfig;
103
- }, xstate0.EventObject>;
103
+ }, xstate398.EventObject>;
104
104
  id: string | undefined;
105
105
  } extends infer T ? T extends {
106
106
  src: "fetchConsent";
107
- logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
107
+ logic: xstate398.PromiseActorLogic<FetchMandatoryConsentResponse, {
108
108
  config: MandatoryConsentConfig;
109
- }, xstate0.EventObject>;
109
+ }, xstate398.EventObject>;
110
110
  id: string | undefined;
111
111
  } ? T extends {
112
112
  src: TSrc;
113
- } ? xstate0.ConditionalRequired<[options?: ({
113
+ } ? xstate398.ConditionalRequired<[options?: ({
114
114
  id?: T["id"] | undefined;
115
115
  systemId?: string;
116
- input?: xstate0.InputFrom<T["logic"]> | undefined;
116
+ input?: xstate398.InputFrom<T["logic"]> | undefined;
117
117
  syncSnapshot?: boolean;
118
- } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
118
+ } & { [K in xstate398.RequiredActorOptions<T>]: unknown }) | undefined], xstate398.IsNotNever<xstate398.RequiredActorOptions<T>>> : never : never : never) | ({
119
119
  src: "submitConsent";
120
- logic: xstate0.PromiseActorLogic<void, {
120
+ logic: xstate398.PromiseActorLogic<void, {
121
121
  consentId: string;
122
122
  isSigned: boolean;
123
- }, xstate0.EventObject>;
123
+ }, xstate398.EventObject>;
124
124
  id: string | undefined;
125
125
  } extends infer T_1 ? T_1 extends {
126
126
  src: "submitConsent";
127
- logic: xstate0.PromiseActorLogic<void, {
127
+ logic: xstate398.PromiseActorLogic<void, {
128
128
  consentId: string;
129
129
  isSigned: boolean;
130
- }, xstate0.EventObject>;
130
+ }, xstate398.EventObject>;
131
131
  id: string | undefined;
132
132
  } ? T_1 extends {
133
133
  src: TSrc;
134
- } ? xstate0.ConditionalRequired<[options?: ({
134
+ } ? xstate398.ConditionalRequired<[options?: ({
135
135
  id?: T_1["id"] | undefined;
136
136
  systemId?: string;
137
- input?: xstate0.InputFrom<T_1["logic"]> | undefined;
137
+ input?: xstate398.InputFrom<T_1["logic"]> | undefined;
138
138
  syncSnapshot?: boolean;
139
- } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
139
+ } & { [K_1 in xstate398.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate398.IsNotNever<xstate398.RequiredActorOptions<T_1>>> : never : never : never)): xstate398.ActorRefFromLogic<xstate398.GetConcreteByKey<xstate398.Values<{
140
140
  fetchConsent: {
141
141
  src: "fetchConsent";
142
- logic: xstate0.PromiseActorLogic<FetchMandatoryConsentResponse, {
142
+ logic: xstate398.PromiseActorLogic<FetchMandatoryConsentResponse, {
143
143
  config: MandatoryConsentConfig;
144
- }, xstate0.EventObject>;
144
+ }, xstate398.EventObject>;
145
145
  id: string | undefined;
146
146
  };
147
147
  submitConsent: {
148
148
  src: "submitConsent";
149
- logic: xstate0.PromiseActorLogic<void, {
149
+ logic: xstate398.PromiseActorLogic<void, {
150
150
  consentId: string;
151
151
  isSigned: boolean;
152
- }, xstate0.EventObject>;
152
+ }, xstate398.EventObject>;
153
153
  id: string | undefined;
154
154
  };
155
155
  }>, "src", TSrc>["logic"]>;
156
- <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
156
+ <TLogic extends xstate398.AnyActorLogic>(src: TLogic, ...[options]: xstate398.ConditionalRequired<[options?: ({
157
157
  id?: never;
158
158
  systemId?: string;
159
- input?: xstate0.InputFrom<TLogic> | undefined;
159
+ input?: xstate398.InputFrom<TLogic> | undefined;
160
160
  syncSnapshot?: boolean;
161
- } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
161
+ } & { [K in xstate398.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate398.IsNotNever<xstate398.RequiredLogicInput<TLogic>>>): xstate398.ActorRefFromLogic<TLogic>;
162
162
  };
163
163
  input: MandatoryConsentInput;
164
- self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
164
+ self: xstate398.ActorRef<xstate398.MachineSnapshot<MandatoryConsentContext, {
165
165
  type: "LOAD";
166
166
  } | {
167
167
  type: "TOGGLE";
@@ -173,7 +173,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
173
173
  type: "RETRY";
174
174
  } | {
175
175
  type: "RESET";
176
- }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
176
+ }, Record<string, xstate398.AnyActorRef | undefined>, xstate398.StateValue, string, unknown, any, any>, {
177
177
  type: "LOAD";
178
178
  } | {
179
179
  type: "TOGGLE";
@@ -185,7 +185,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
185
185
  type: "RETRY";
186
186
  } | {
187
187
  type: "RESET";
188
- }, xstate0.AnyEventObject>;
188
+ }, xstate398.AnyEventObject>;
189
189
  }) => {
190
190
  config: MandatoryConsentConfig;
191
191
  consent: undefined;
@@ -222,7 +222,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
222
222
  } | {
223
223
  type: "RESET";
224
224
  };
225
- self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
225
+ self: xstate398.ActorRef<xstate398.MachineSnapshot<MandatoryConsentContext, {
226
226
  type: "LOAD";
227
227
  } | {
228
228
  type: "TOGGLE";
@@ -234,7 +234,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
234
234
  type: "RETRY";
235
235
  } | {
236
236
  type: "RESET";
237
- }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
237
+ }, Record<string, xstate398.AnyActorRef>, xstate398.StateValue, string, unknown, any, any>, {
238
238
  type: "LOAD";
239
239
  } | {
240
240
  type: "TOGGLE";
@@ -246,7 +246,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
246
246
  type: "RETRY";
247
247
  } | {
248
248
  type: "RESET";
249
- }, xstate0.AnyEventObject>;
249
+ }, xstate398.AnyEventObject>;
250
250
  }) => {
251
251
  config: MandatoryConsentConfig;
252
252
  };
@@ -299,7 +299,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
299
299
  } | {
300
300
  type: "RESET";
301
301
  };
302
- self: xstate0.ActorRef<xstate0.MachineSnapshot<MandatoryConsentContext, {
302
+ self: xstate398.ActorRef<xstate398.MachineSnapshot<MandatoryConsentContext, {
303
303
  type: "LOAD";
304
304
  } | {
305
305
  type: "TOGGLE";
@@ -311,7 +311,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
311
311
  type: "RETRY";
312
312
  } | {
313
313
  type: "RESET";
314
- }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
314
+ }, Record<string, xstate398.AnyActorRef>, xstate398.StateValue, string, unknown, any, any>, {
315
315
  type: "LOAD";
316
316
  } | {
317
317
  type: "TOGGLE";
@@ -323,7 +323,7 @@ declare const mandatoryConsentMachine: xstate0.StateMachine<MandatoryConsentCont
323
323
  type: "RETRY";
324
324
  } | {
325
325
  type: "RESET";
326
- }, xstate0.AnyEventObject>;
326
+ }, xstate398.AnyEventObject>;
327
327
  }) => {
328
328
  consentId: string;
329
329
  isSigned: boolean;
@@ -97,9 +97,9 @@ async function requestMotionPermission() {
97
97
  * stops the obtained stream. Also requests motion sensor permission (required on iOS
98
98
  * to be called during a user gesture). This function does not keep or return the stream.
99
99
  */
100
- async function requestPermission() {
100
+ async function requestPermission(options = {}) {
101
101
  try {
102
- await requestMotionPermission();
102
+ if (options.requestMotion) await requestMotionPermission();
103
103
  stopCameraStream(await requestCameraAccess({ video: true }));
104
104
  markCameraPermissionGranted();
105
105
  return "granted";
package/dist/phone.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import "./Manager-gbK55c4u.js";
2
2
  import "./Actor-B15bmdr9.js";
3
- import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-B06CapY3.js";
3
+ import { a as phoneMachine, n as PhoneState, o as PhoneConfig, r as createPhoneManager, t as PhoneManager } from "./phoneManager-BlnuDKw6.js";
4
4
  export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
package/dist/phone.esm.js CHANGED
@@ -2,7 +2,7 @@ import "./api-jWFd-4Qh.esm.js";
2
2
  import "./events-CV5uidDd.esm.js";
3
3
  import "./xstate.esm-DMwldSzU.esm.js";
4
4
  import "./BrowserTimerProvider-N8UcbvU5.esm.js";
5
- import { t as phoneMachine } from "./phoneStateMachine-BDojEAdF.esm.js";
6
- import { t as createPhoneManager } from "./phoneManager-D9CsGQPS.esm.js";
5
+ import { t as phoneMachine } from "./phoneStateMachine-DzCW_9FY.esm.js";
6
+ import { t as createPhoneManager } from "./phoneManager-Bd1-CLb-.esm.js";
7
7
 
8
8
  export { createPhoneManager, phoneMachine };
@@ -1,6 +1,6 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CV5uidDd.esm.js";
2
2
  import { a as createActor, o as createManager } from "./xstate.esm-DMwldSzU.esm.js";
3
- import { t as phoneMachine } from "./phoneStateMachine-BDojEAdF.esm.js";
3
+ import { t as phoneMachine } from "./phoneStateMachine-DzCW_9FY.esm.js";
4
4
 
5
5
  //#region src/modules/phone/phoneActor.ts
6
6
  function createPhoneActor(options) {
@@ -88,7 +88,7 @@ type PhoneLoadingPrefillState = {
88
88
  * @property countryCode - ISO country code (e.g., 'US', 'MX')
89
89
  * @property phonePrefix - International dialing prefix (e.g., '+1', '+52')
90
90
  * @property prefilledPhone - Pre-populated phone number (if prefill enabled)
91
- * @property phoneError - Validation error message if phone was rejected
91
+ * @property phoneError - Submission error message if the backend rejected the phone number
92
92
  * @property otpVerification - Whether OTP SMS verification is enabled (from module config). When omitted, treat as `false`.
93
93
  * @property optinEnabled - Whether marketing opt-in checkbox is shown (from module config). When omitted, treat as `false`.
94
94
  */
@@ -4,6 +4,10 @@ import { i as fromPromise, n as assign, r as fromCallback, t as setup } from "./
4
4
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-N8UcbvU5.esm.js";
5
5
 
6
6
  //#region src/modules/phone/phoneServices.ts
7
+ function getPhoneServerFailureReason(error, invalidStatus) {
8
+ if (error.status === invalidStatus) return "invalidPhone";
9
+ return "serverError";
10
+ }
7
11
  async function fetchPhone(signal) {
8
12
  const res = await api.get(endpoints.getPhone, { signal });
9
13
  if (!res.ok) throw new Error(`GET ${endpoints.getPhone} failed: ${res.status} ${res.statusText}`);
@@ -15,34 +19,47 @@ async function fetchStartInfo(signal) {
15
19
  return res.data;
16
20
  }
17
21
  async function addPhone(params, signal) {
18
- const res = await api.post(endpoints.phone, {
19
- phone: params.phone,
20
- optInGranted: params.optInGranted
21
- }, { signal });
22
- if (!res.ok) throw new Error(`POST ${endpoints.phone} failed: ${res.status} ${res.statusText}`);
23
- return res.data;
22
+ try {
23
+ return (await api.post(endpoints.phone, {
24
+ phone: params.phone + "1",
25
+ optInGranted: params.optInGranted
26
+ }, { signal })).data;
27
+ } catch (error) {
28
+ throw new Error(getPhoneServerFailureReason(error, 400));
29
+ }
24
30
  }
25
31
  async function addPhoneInstantVerify(params, signal) {
26
- const res = await api.post(endpoints.phoneInstant, {
27
- phone: params.phone,
28
- optInGranted: params.optInGranted
29
- }, { signal });
30
- if (!res.ok) throw new Error(`POST ${endpoints.phoneInstant} failed: ${res.status} ${res.statusText}`);
31
- return res.data;
32
+ try {
33
+ return (await api.post(endpoints.phoneInstant, {
34
+ phone: params.phone,
35
+ optInGranted: params.optInGranted
36
+ }, { signal })).data;
37
+ } catch (error) {
38
+ throw new Error(getPhoneServerFailureReason(error, 400));
39
+ }
32
40
  }
33
41
  async function sendOtp(signal) {
34
- const res = await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
35
- if (!res.ok) throw new Error(`GET ${endpoints.sendSmsOtp} failed: ${res.status} ${res.statusText}`);
42
+ try {
43
+ await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
44
+ } catch (error) {
45
+ throw new Error(getPhoneServerFailureReason(error));
46
+ }
36
47
  }
37
48
  async function verifyOtp(code, signal) {
38
- const res = await api.get(`${endpoints.compareOtp}?code=${code}&channel=SMS`, { signal });
39
- if (!res.ok) throw new Error(`GET ${endpoints.compareOtp} failed: ${res.status} ${res.statusText}`);
40
- return res.data;
49
+ try {
50
+ return (await api.get(`${endpoints.compareOtp}?code=${code}&channel=SMS`, { signal })).data;
51
+ } catch (error) {
52
+ throw new Error(getPhoneServerFailureReason(error));
53
+ }
41
54
  }
42
55
 
43
56
  //#endregion
44
57
  //#region src/modules/phone/phoneStateMachine.ts
45
58
  const RESEND_TIMER_SECONDS = 30;
59
+ function getErrorMessage(error) {
60
+ if (error instanceof Error) return error.message;
61
+ return String(error);
62
+ }
46
63
  const phoneMachine = setup({
47
64
  types: {
48
65
  context: {},
@@ -105,12 +122,12 @@ const phoneMachine = setup({
105
122
  return {
106
123
  phone: e.phone,
107
124
  isValid: e.isValid,
108
- phoneError: e.isValid ? void 0 : "phone.invalid"
125
+ phoneError: void 0
109
126
  };
110
127
  }),
111
- setPhoneError: assign(({ event }) => ({ phoneError: String(event.error) })),
128
+ setPhoneError: assign(({ event }) => ({ phoneError: getErrorMessage(event.error) })),
112
129
  setOptInGranted: assign(({ event }) => ({ optInGranted: event.granted })),
113
- setError: assign(({ event }) => ({ error: String(event.error) })),
130
+ setError: assign(({ event }) => ({ error: getErrorMessage(event.error) })),
114
131
  clearError: assign({ error: () => void 0 }),
115
132
  clearPhoneError: assign({ phoneError: () => void 0 }),
116
133
  setOtpCode: assign(({ event }) => ({
@@ -118,9 +135,10 @@ const phoneMachine = setup({
118
135
  otpError: void 0
119
136
  })),
120
137
  setOtpError: assign(({ context, event }) => ({
121
- otpError: String(event.error),
138
+ otpError: getErrorMessage(event.error),
122
139
  attemptsRemaining: context.attemptsRemaining - 1
123
140
  })),
141
+ setOtpRequestError: assign(({ event }) => ({ otpError: getErrorMessage(event.error) })),
124
142
  clearOtpError: assign({
125
143
  otpError: () => void 0,
126
144
  otpCode: () => ""
@@ -204,17 +222,15 @@ const phoneMachine = setup({
204
222
  },
205
223
  onError: { target: "inputting" }
206
224
  } },
207
- inputting: {
208
- entry: "clearPhoneError",
209
- on: {
210
- PHONE_CHANGED: { actions: "setPhone" },
211
- OPT_IN_CHANGED: { actions: "setOptInGranted" },
212
- SUBMIT: {
213
- target: "submitting",
214
- guard: "isValidPhone"
215
- }
225
+ inputting: { on: {
226
+ PHONE_CHANGED: { actions: "setPhone" },
227
+ OPT_IN_CHANGED: { actions: "setOptInGranted" },
228
+ SUBMIT: {
229
+ target: "submitting",
230
+ guard: "isValidPhone",
231
+ actions: "clearPhoneError"
216
232
  }
217
- },
233
+ } },
218
234
  submitting: { invoke: {
219
235
  id: "submitPhone",
220
236
  src: "submitPhone",
@@ -240,8 +256,8 @@ const phoneMachine = setup({
240
256
  actions: "startResendTimer"
241
257
  },
242
258
  onError: {
243
- target: "awaitingOtp",
244
- actions: ["setError", "startResendTimer"]
259
+ target: "otpError",
260
+ actions: ["setOtpRequestError", "startResendTimer"]
245
261
  }
246
262
  } },
247
263
  resendingOtp: { invoke: {
@@ -252,8 +268,8 @@ const phoneMachine = setup({
252
268
  actions: "startResendTimer"
253
269
  },
254
270
  onError: {
255
- target: "awaitingOtp",
256
- actions: ["setError", "startResendTimer"]
271
+ target: "otpError",
272
+ actions: ["setOtpRequestError", "startResendTimer"]
257
273
  }
258
274
  } },
259
275
  awaitingOtp: {
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-gbK55c4u.js";
2
2
  import "./Actor-B15bmdr9.js";
3
- import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-C4L3Okdp.js";
3
+ import { c as ConsentKey, f as QE_CONSENT_KEYS, g as getDefaultConsentChecks, i as electronicSignatureMachine, l as ElectronicSignatureConfig, m as areAllConsented, n as ElectronicSignatureState, s as ConsentChecks, u as ElectronicSignatureDocument } from "./index-WyJv3W9w.js";
4
4
 
5
5
  //#region src/modules/qe-signature/index.d.ts
6
6
 
@@ -8,7 +8,7 @@ import "./faceCaptureManagerFactory-CMdOPsTP.esm.js";
8
8
  import "./BrowserStorageProvider-BZEFyh0O.esm.js";
9
9
  import { l as processFace } from "./recordingService-DX6MuFa9.esm.js";
10
10
  import "./deepsightService-DwQsyY5W.esm.js";
11
- import "./permissionServices-7GX060Fo.esm.js";
11
+ import "./permissionServices-nSyjSTQY.esm.js";
12
12
  import "./camera-YfPOKQXU.esm.js";
13
13
  import "./getBrowser-Bcjdnapi.esm.js";
14
14
  import "./stats-UZA4FM8j.esm.js";
@@ -17,8 +17,8 @@ import "./platform-uIVQUnJP.esm.js";
17
17
  import "./ITimerCapability-DS0Vjetp.esm.js";
18
18
  import "./backCameraStream-BEyWAklK.esm.js";
19
19
  import "./getDeviceClass-Cs-jWK1p.esm.js";
20
- import "./faceCaptureSetup-C65JUwp_.esm.js";
21
- import { t as selfieMachine } from "./selfieStateMachine-DbI8xrNK.esm.js";
22
- import { t as createSelfieManager } from "./selfieManager-BnBJ47OE.esm.js";
20
+ import "./faceCaptureSetup-Cc7fBwa-.esm.js";
21
+ import { t as selfieMachine } from "./selfieStateMachine-DRKNuv4Y.esm.js";
22
+ import { t as createSelfieManager } from "./selfieManager-Dvi0cZ4c.esm.js";
23
23
 
24
24
  export { createSelfieManager, processFace, selfieMachine };
@@ -3,7 +3,7 @@ import { n as eventModuleNames } from "./events-CV5uidDd.esm.js";
3
3
  import { a as createActor } from "./xstate.esm-DMwldSzU.esm.js";
4
4
  import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CMdOPsTP.esm.js";
5
5
  import { t as BrowserStorageProvider } from "./BrowserStorageProvider-BZEFyh0O.esm.js";
6
- import { t as selfieMachine } from "./selfieStateMachine-DbI8xrNK.esm.js";
6
+ import { t as selfieMachine } from "./selfieStateMachine-DRKNuv4Y.esm.js";
7
7
 
8
8
  //#region src/modules/selfie/selfieActor.ts
9
9
  function createSelfieActor(options) {
@@ -1,6 +1,6 @@
1
1
  import { i as fromPromise, n as assign } from "./xstate.esm-DMwldSzU.esm.js";
2
2
  import { l as processFace, u as uploadSelfie, v as FACE_ERROR_CODES } from "./recordingService-DX6MuFa9.esm.js";
3
- import { t as faceCaptureMachine } from "./faceCaptureSetup-C65JUwp_.esm.js";
3
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-Cc7fBwa-.esm.js";
4
4
 
5
5
  //#region src/modules/selfie/selfieErrorUtils.ts
6
6
  const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);