@incodetech/core 0.0.0-dev-20260323-4991693 → 0.0.0-dev-20260323-d29613f

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 (35) hide show
  1. package/dist/{addressSearch-IJq48WDV.esm.js → addressSearch-B3sA8vgs.esm.js} +2 -2
  2. package/dist/authentication.esm.js +7 -7
  3. package/dist/{authenticationManager-DACsi9Bs.esm.js → authenticationManager-CVEXKvB3.esm.js} +4 -4
  4. package/dist/{backCameraStream-THvMPTG_.esm.js → backCameraStream-BxXYKUoc.esm.js} +1 -1
  5. package/dist/consent.esm.js +5 -3
  6. package/dist/curp-validation.esm.js +9 -3
  7. package/dist/{deepsightLoader-DfXPJe4B.esm.js → deepsightLoader-CF1OkQt_.esm.js} +2 -2
  8. package/dist/{deepsightService-DaDUTB6Q.esm.js → deepsightService-tFm-XfrF.esm.js} +1 -1
  9. package/dist/document-capture.d.ts +55 -55
  10. package/dist/document-capture.esm.js +17 -5
  11. package/dist/document-upload.d.ts +43 -43
  12. package/dist/document-upload.esm.js +7 -4
  13. package/dist/ekyb.esm.js +9 -4
  14. package/dist/ekyc.esm.js +8 -4
  15. package/dist/email.esm.js +3 -3
  16. package/dist/{emailManager-DPTdyYgi.esm.js → emailManager-CtSwZTSn.esm.js} +7 -3
  17. package/dist/{events-BfIbM5SS.esm.js → events-c-r7jhs3.esm.js} +43 -6
  18. package/dist/extensibility.esm.js +11 -11
  19. package/dist/face-match.esm.js +4 -3
  20. package/dist/{faceCaptureSetup-CW_ZDHuU.esm.js → faceCaptureSetup-yPrsOQES.esm.js} +19 -7
  21. package/dist/flow.esm.js +10 -4
  22. package/dist/geolocation.esm.js +6 -3
  23. package/dist/government-validation.esm.js +6 -3
  24. package/dist/id.esm.js +6 -6
  25. package/dist/{idCaptureManager-Ctn8I9Rf.esm.js → idCaptureManager-Dkzxvhrt.esm.js} +33 -9
  26. package/dist/index.d.ts +7 -1
  27. package/dist/index.esm.js +7 -7
  28. package/dist/phone.esm.js +3 -3
  29. package/dist/{phoneManager-BzZI460X.esm.js → phoneManager-D18wCI69.esm.js} +7 -3
  30. package/dist/{recordingsRepository-D5Tfsc2D.esm.js → recordingsRepository-CIzyj6XC.esm.js} +1 -1
  31. package/dist/redirect-to-mobile.esm.js +7 -3
  32. package/dist/selfie.esm.js +7 -7
  33. package/dist/{selfieManager-BXRLyPy4.esm.js → selfieManager-5_CouEZs.esm.js} +3 -3
  34. package/dist/{src-D9pJSMO5.esm.js → src-DevpZoey.esm.js} +25 -3
  35. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- import { v as fromCallback } from "./events-BfIbM5SS.esm.js";
2
- import { g as BrowserTimerProvider } from "./src-D9pJSMO5.esm.js";
1
+ import { y as fromCallback } from "./events-c-r7jhs3.esm.js";
2
+ import { g as BrowserTimerProvider } from "./src-DevpZoey.esm.js";
3
3
  import { t as api } from "./api-3fZO5bmj.esm.js";
4
4
  import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
5
5
 
@@ -1,12 +1,12 @@
1
- import "./events-BfIbM5SS.esm.js";
2
- import "./backCameraStream-THvMPTG_.esm.js";
3
- import "./src-D9pJSMO5.esm.js";
4
- import "./recordingsRepository-D5Tfsc2D.esm.js";
5
- import "./deepsightService-DaDUTB6Q.esm.js";
1
+ import "./events-c-r7jhs3.esm.js";
2
+ import "./backCameraStream-BxXYKUoc.esm.js";
3
+ import "./src-DevpZoey.esm.js";
4
+ import "./recordingsRepository-CIzyj6XC.esm.js";
5
+ import "./deepsightService-tFm-XfrF.esm.js";
6
6
  import "./api-3fZO5bmj.esm.js";
7
7
  import "./endpoints-Bydn-Ave.esm.js";
8
8
  import "./stats-D76Thmqp.esm.js";
9
- import "./faceCaptureSetup-CW_ZDHuU.esm.js";
10
- import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-DACsi9Bs.esm.js";
9
+ import "./faceCaptureSetup-yPrsOQES.esm.js";
10
+ import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-CVEXKvB3.esm.js";
11
11
 
12
12
  export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
@@ -1,9 +1,9 @@
1
- import { _ as assign, b as createActor, n as eventModuleNames, y as fromPromise } from "./events-BfIbM5SS.esm.js";
2
- import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-D9pJSMO5.esm.js";
3
- import { c as getDeviceClass } from "./recordingsRepository-D5Tfsc2D.esm.js";
1
+ import { b as fromPromise, n as eventModuleNames, v as assign, x as createActor } from "./events-c-r7jhs3.esm.js";
2
+ import { _ as BrowserStorageProvider, a as WasmUtilProvider } from "./src-DevpZoey.esm.js";
3
+ import { c as getDeviceClass } from "./recordingsRepository-CIzyj6XC.esm.js";
4
4
  import { t as api } from "./api-3fZO5bmj.esm.js";
5
5
  import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
6
- import { a as createFaceCaptureManagerFromActor, i as FACE_ERROR_CODES, t as faceCaptureMachine } from "./faceCaptureSetup-CW_ZDHuU.esm.js";
6
+ import { a as createFaceCaptureManagerFromActor, i as FACE_ERROR_CODES, t as faceCaptureMachine } from "./faceCaptureSetup-yPrsOQES.esm.js";
7
7
 
8
8
  //#region src/modules/authentication/authenticationErrorUtils.ts
9
9
  const AUTH_ERROR_MAP = {
@@ -1,4 +1,4 @@
1
- import { B as isSafari, D as enumerateVideoDevices, E as applyTrackConstraints, F as isAndroid, L as isIOS, O as requestCameraAccess, k as stopCameraStream, z as isIPhone14OrHigher } from "./src-D9pJSMO5.esm.js";
1
+ import { B as isSafari, D as enumerateVideoDevices, E as applyTrackConstraints, F as isAndroid, L as isIOS, O as requestCameraAccess, k as stopCameraStream, z as isIPhone14OrHigher } from "./src-DevpZoey.esm.js";
2
2
 
3
3
  //#region ../infra/src/capabilities/ITimerCapability.ts
4
4
  function sleep(ms) {
@@ -1,5 +1,5 @@
1
- import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, y as fromPromise } from "./events-BfIbM5SS.esm.js";
2
- import { A as createManager } from "./src-D9pJSMO5.esm.js";
1
+ import { _ as setup, b as fromPromise, n as eventModuleNames, o as createManagerInstrumentation, v as assign, x as createActor } from "./events-c-r7jhs3.esm.js";
2
+ import { A as createManager } from "./src-DevpZoey.esm.js";
3
3
  import { t as api } from "./api-3fZO5bmj.esm.js";
4
4
  import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
5
5
 
@@ -187,7 +187,7 @@ function mapState(snapshot) {
187
187
  };
188
188
  return { status: "idle" };
189
189
  }
190
- function createApi({ actor }) {
190
+ function createApi({ actor, trackElementClicked }) {
191
191
  return {
192
192
  load() {
193
193
  actor.send({ type: "LOAD" });
@@ -199,9 +199,11 @@ function createApi({ actor }) {
199
199
  });
200
200
  },
201
201
  submit() {
202
+ trackElementClicked?.("submit");
202
203
  actor.send({ type: "SUBMIT" });
203
204
  },
204
205
  retry() {
206
+ trackElementClicked?.("retry");
205
207
  actor.send({ type: "RETRY" });
206
208
  },
207
209
  reset() {
@@ -1,5 +1,5 @@
1
- import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, y as fromPromise } from "./events-BfIbM5SS.esm.js";
2
- import { A as createManager } from "./src-D9pJSMO5.esm.js";
1
+ import { _ as setup, b as fromPromise, n as eventModuleNames, o as createManagerInstrumentation, v as assign, x as createActor } from "./events-c-r7jhs3.esm.js";
2
+ import { A as createManager } from "./src-DevpZoey.esm.js";
3
3
  import { t as api } from "./api-3fZO5bmj.esm.js";
4
4
  import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
5
5
 
@@ -458,7 +458,7 @@ function mapState(snapshot) {
458
458
  if (typedSnapshot.matches("closed")) return { status: "closed" };
459
459
  return { status: "idle" };
460
460
  }
461
- function createApi({ actor }) {
461
+ function createApi({ actor, trackElementClicked }) {
462
462
  return {
463
463
  load() {
464
464
  actor.send({ type: "LOAD" });
@@ -470,9 +470,11 @@ function createApi({ actor }) {
470
470
  });
471
471
  },
472
472
  verify() {
473
+ trackElementClicked?.("verify");
473
474
  actor.send({ type: "VERIFY" });
474
475
  },
475
476
  switchToGenerate() {
477
+ trackElementClicked?.("switchToGenerate");
476
478
  actor.send({ type: "SWITCH_TO_GENERATE" });
477
479
  },
478
480
  setGenerateForm(form) {
@@ -482,15 +484,19 @@ function createApi({ actor }) {
482
484
  });
483
485
  },
484
486
  generate() {
487
+ trackElementClicked?.("generate");
485
488
  actor.send({ type: "GENERATE" });
486
489
  },
487
490
  confirmGenerated() {
491
+ trackElementClicked?.("confirmGenerated");
488
492
  actor.send({ type: "CONFIRM" });
489
493
  },
490
494
  retry() {
495
+ trackElementClicked?.("retry");
491
496
  actor.send({ type: "RETRY" });
492
497
  },
493
498
  close() {
499
+ trackElementClicked?.("close");
494
500
  actor.send({ type: "CLOSE" });
495
501
  }
496
502
  };
@@ -1,5 +1,5 @@
1
- import { a as WasmUtilProvider, f as MotionSensorProvider, l as VisibilityProvider, y as BrowserEnvironmentProvider } from "./src-D9pJSMO5.esm.js";
2
- import { t as createDeepsightService } from "./deepsightService-DaDUTB6Q.esm.js";
1
+ import { a as WasmUtilProvider, f as MotionSensorProvider, l as VisibilityProvider, y as BrowserEnvironmentProvider } from "./src-DevpZoey.esm.js";
2
+ import { t as createDeepsightService } from "./deepsightService-tFm-XfrF.esm.js";
3
3
  import "./api-3fZO5bmj.esm.js";
4
4
  import "./stats-D76Thmqp.esm.js";
5
5
 
@@ -1,4 +1,4 @@
1
- import { M as getDeviceInfo, O as requestCameraAccess, P as getUserAgent, T as IncodeCanvas, k as stopCameraStream, w as createHiddenVideoElement } from "./src-D9pJSMO5.esm.js";
1
+ import { M as getDeviceInfo, O as requestCameraAccess, P as getUserAgent, T as IncodeCanvas, k as stopCameraStream, w as createHiddenVideoElement } from "./src-DevpZoey.esm.js";
2
2
  import { t as api } from "./api-3fZO5bmj.esm.js";
3
3
  import { t as addDeviceStats } from "./stats-D76Thmqp.esm.js";
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { t as Manager } from "./Manager-CVDYGoSq.js";
2
2
  import { t as CameraStream } from "./camera-CVBwqx-j.js";
3
- import * as xstate67 from "xstate";
3
+ import * as xstate131 from "xstate";
4
4
 
5
5
  //#region src/modules/document-capture/types.d.ts
6
6
  type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
@@ -72,7 +72,7 @@ type DocumentCaptureInput = {
72
72
  };
73
73
  //#endregion
74
74
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
75
- declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureContext, {
75
+ declare const documentCaptureMachine: xstate131.StateMachine<DocumentCaptureContext, {
76
76
  type: "CAPTURE";
77
77
  } | {
78
78
  type: "FILE_SELECTED";
@@ -95,84 +95,84 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
95
95
  } | {
96
96
  type: "CLOSE";
97
97
  }, {
98
- [x: string]: xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>> | xstate67.ActorRefFromLogic<xstate67.PromiseActorLogic<DocumentUploadResponse, {
98
+ [x: string]: xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>> | xstate131.ActorRefFromLogic<xstate131.PromiseActorLogic<DocumentUploadResponse, {
99
99
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
100
100
  processingType: string;
101
101
  onProgress: (progress: number) => void;
102
- }, xstate67.EventObject>> | undefined;
103
- }, xstate67.Values<{
102
+ }, xstate131.EventObject>> | undefined;
103
+ }, xstate131.Values<{
104
104
  initCamera: {
105
105
  src: "initCamera";
106
- logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
106
+ logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
107
107
  id: string | undefined;
108
108
  };
109
109
  uploadDocument: {
110
110
  src: "uploadDocument";
111
- logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
111
+ logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
112
112
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
113
113
  processingType: string;
114
114
  onProgress: (progress: number) => void;
115
- }, xstate67.EventObject>;
115
+ }, xstate131.EventObject>;
116
116
  id: string | undefined;
117
117
  };
118
- }>, xstate67.Values<{
118
+ }>, xstate131.Values<{
119
119
  clearError: {
120
120
  type: "clearError";
121
- params: xstate67.NonReducibleUnknown;
121
+ params: xstate131.NonReducibleUnknown;
122
122
  };
123
123
  setStream: {
124
124
  type: "setStream";
125
- params: xstate67.NonReducibleUnknown;
125
+ params: xstate131.NonReducibleUnknown;
126
+ };
127
+ setProgress: {
128
+ type: "setProgress";
129
+ params: xstate131.NonReducibleUnknown;
130
+ };
131
+ stopStream: {
132
+ type: "stopStream";
133
+ params: xstate131.NonReducibleUnknown;
126
134
  };
127
135
  setCapturedDocument: {
128
136
  type: "setCapturedDocument";
129
- params: xstate67.NonReducibleUnknown;
137
+ params: xstate131.NonReducibleUnknown;
130
138
  };
131
139
  setFileTooLargeError: {
132
140
  type: "setFileTooLargeError";
133
- params: xstate67.NonReducibleUnknown;
134
- };
135
- setProgress: {
136
- type: "setProgress";
137
- params: xstate67.NonReducibleUnknown;
141
+ params: xstate131.NonReducibleUnknown;
138
142
  };
139
143
  setUploadError: {
140
144
  type: "setUploadError";
141
- params: xstate67.NonReducibleUnknown;
145
+ params: xstate131.NonReducibleUnknown;
142
146
  };
143
147
  decrementAttemptsRemaining: {
144
148
  type: "decrementAttemptsRemaining";
145
- params: xstate67.NonReducibleUnknown;
149
+ params: xstate131.NonReducibleUnknown;
146
150
  };
147
151
  setCaptureMethodFile: {
148
152
  type: "setCaptureMethodFile";
149
- params: xstate67.NonReducibleUnknown;
153
+ params: xstate131.NonReducibleUnknown;
150
154
  };
151
155
  setCaptureMethodCamera: {
152
156
  type: "setCaptureMethodCamera";
153
- params: xstate67.NonReducibleUnknown;
157
+ params: xstate131.NonReducibleUnknown;
154
158
  };
155
159
  clearCapturedDocument: {
156
160
  type: "clearCapturedDocument";
157
- params: xstate67.NonReducibleUnknown;
161
+ params: xstate131.NonReducibleUnknown;
158
162
  };
159
163
  setPendingNextPage: {
160
164
  type: "setPendingNextPage";
161
- params: xstate67.NonReducibleUnknown;
165
+ params: xstate131.NonReducibleUnknown;
162
166
  };
163
167
  clearForNextPage: {
164
168
  type: "clearForNextPage";
165
- params: xstate67.NonReducibleUnknown;
169
+ params: xstate131.NonReducibleUnknown;
166
170
  };
167
171
  resetProgress: {
168
172
  type: "resetProgress";
169
- params: xstate67.NonReducibleUnknown;
170
- };
171
- stopStream: {
172
- type: "stopStream";
173
- params: xstate67.NonReducibleUnknown;
173
+ params: xstate131.NonReducibleUnknown;
174
174
  };
175
- }>, xstate67.Values<{
175
+ }>, xstate131.Values<{
176
176
  allowSkip: {
177
177
  type: "allowSkip";
178
178
  params: unknown;
@@ -209,7 +209,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
209
209
  type: "isPendingNextPage";
210
210
  params: unknown;
211
211
  };
212
- }>, never, "finished" | "initCamera" | "tutorial" | "capturing" | "preview" | "closed" | "failure" | "uploading" | "success", string, DocumentCaptureInput, xstate67.NonReducibleUnknown, xstate67.EventObject, xstate67.MetaObject, {
212
+ }>, never, "finished" | "initCamera" | "capturing" | "closed" | "uploading" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate131.NonReducibleUnknown, xstate131.EventObject, xstate131.MetaObject, {
213
213
  readonly id: "documentCapture";
214
214
  readonly initial: "tutorial";
215
215
  readonly context: ({
@@ -218,67 +218,67 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
218
218
  spawn: {
219
219
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
220
220
  src: "initCamera";
221
- logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
221
+ logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
222
222
  id: string | undefined;
223
223
  } extends infer T ? T extends {
224
224
  src: "initCamera";
225
- logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
225
+ logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
226
226
  id: string | undefined;
227
227
  } ? T extends {
228
228
  src: TSrc;
229
- } ? xstate67.ConditionalRequired<[options?: ({
229
+ } ? xstate131.ConditionalRequired<[options?: ({
230
230
  id?: T["id"] | undefined;
231
231
  systemId?: string;
232
- input?: xstate67.InputFrom<T["logic"]> | undefined;
232
+ input?: xstate131.InputFrom<T["logic"]> | undefined;
233
233
  syncSnapshot?: boolean;
234
- } & { [K in xstate67.RequiredActorOptions<T>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T>>> : never : never : never) | ({
234
+ } & { [K in xstate131.RequiredActorOptions<T>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T>>> : never : never : never) | ({
235
235
  src: "uploadDocument";
236
- logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
236
+ logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
237
237
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
238
238
  processingType: string;
239
239
  onProgress: (progress: number) => void;
240
- }, xstate67.EventObject>;
240
+ }, xstate131.EventObject>;
241
241
  id: string | undefined;
242
242
  } extends infer T_1 ? T_1 extends {
243
243
  src: "uploadDocument";
244
- logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
244
+ logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
245
245
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
246
246
  processingType: string;
247
247
  onProgress: (progress: number) => void;
248
- }, xstate67.EventObject>;
248
+ }, xstate131.EventObject>;
249
249
  id: string | undefined;
250
250
  } ? T_1 extends {
251
251
  src: TSrc;
252
- } ? xstate67.ConditionalRequired<[options?: ({
252
+ } ? xstate131.ConditionalRequired<[options?: ({
253
253
  id?: T_1["id"] | undefined;
254
254
  systemId?: string;
255
- input?: xstate67.InputFrom<T_1["logic"]> | undefined;
255
+ input?: xstate131.InputFrom<T_1["logic"]> | undefined;
256
256
  syncSnapshot?: boolean;
257
- } & { [K_1 in xstate67.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredActorOptions<T_1>>> : never : never : never)): xstate67.ActorRefFromLogic<xstate67.GetConcreteByKey<xstate67.Values<{
257
+ } & { [K_1 in xstate131.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredActorOptions<T_1>>> : never : never : never)): xstate131.ActorRefFromLogic<xstate131.GetConcreteByKey<xstate131.Values<{
258
258
  initCamera: {
259
259
  src: "initCamera";
260
- logic: xstate67.PromiseActorLogic<MediaStream, void, xstate67.EventObject>;
260
+ logic: xstate131.PromiseActorLogic<MediaStream, void, xstate131.EventObject>;
261
261
  id: string | undefined;
262
262
  };
263
263
  uploadDocument: {
264
264
  src: "uploadDocument";
265
- logic: xstate67.PromiseActorLogic<DocumentUploadResponse, {
265
+ logic: xstate131.PromiseActorLogic<DocumentUploadResponse, {
266
266
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
267
267
  processingType: string;
268
268
  onProgress: (progress: number) => void;
269
- }, xstate67.EventObject>;
269
+ }, xstate131.EventObject>;
270
270
  id: string | undefined;
271
271
  };
272
272
  }>, "src", TSrc>["logic"]>;
273
- <TLogic extends xstate67.AnyActorLogic>(src: TLogic, ...[options]: xstate67.ConditionalRequired<[options?: ({
273
+ <TLogic extends xstate131.AnyActorLogic>(src: TLogic, ...[options]: xstate131.ConditionalRequired<[options?: ({
274
274
  id?: never;
275
275
  systemId?: string;
276
- input?: xstate67.InputFrom<TLogic> | undefined;
276
+ input?: xstate131.InputFrom<TLogic> | undefined;
277
277
  syncSnapshot?: boolean;
278
- } & { [K in xstate67.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate67.IsNotNever<xstate67.RequiredLogicInput<TLogic>>>): xstate67.ActorRefFromLogic<TLogic>;
278
+ } & { [K in xstate131.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate131.IsNotNever<xstate131.RequiredLogicInput<TLogic>>>): xstate131.ActorRefFromLogic<TLogic>;
279
279
  };
280
280
  input: DocumentCaptureInput;
281
- self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentCaptureContext, {
281
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<DocumentCaptureContext, {
282
282
  type: "CAPTURE";
283
283
  } | {
284
284
  type: "FILE_SELECTED";
@@ -300,7 +300,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
300
300
  type: "SKIP";
301
301
  } | {
302
302
  type: "CLOSE";
303
- }, Record<string, xstate67.AnyActorRef | undefined>, xstate67.StateValue, string, unknown, any, any>, {
303
+ }, Record<string, xstate131.AnyActorRef | undefined>, xstate131.StateValue, string, unknown, any, any>, {
304
304
  type: "CAPTURE";
305
305
  } | {
306
306
  type: "FILE_SELECTED";
@@ -322,7 +322,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
322
322
  type: "SKIP";
323
323
  } | {
324
324
  type: "CLOSE";
325
- }, xstate67.AnyEventObject>;
325
+ }, xstate131.AnyEventObject>;
326
326
  }) => {
327
327
  config: {
328
328
  processingType: DocumentType;
@@ -459,7 +459,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
459
459
  } | {
460
460
  type: "CLOSE";
461
461
  };
462
- self: xstate67.ActorRef<xstate67.MachineSnapshot<DocumentCaptureContext, {
462
+ self: xstate131.ActorRef<xstate131.MachineSnapshot<DocumentCaptureContext, {
463
463
  type: "CAPTURE";
464
464
  } | {
465
465
  type: "FILE_SELECTED";
@@ -481,7 +481,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
481
481
  type: "SKIP";
482
482
  } | {
483
483
  type: "CLOSE";
484
- }, Record<string, xstate67.AnyActorRef>, xstate67.StateValue, string, unknown, any, any>, {
484
+ }, Record<string, xstate131.AnyActorRef>, xstate131.StateValue, string, unknown, any, any>, {
485
485
  type: "CAPTURE";
486
486
  } | {
487
487
  type: "FILE_SELECTED";
@@ -503,7 +503,7 @@ declare const documentCaptureMachine: xstate67.StateMachine<DocumentCaptureConte
503
503
  type: "SKIP";
504
504
  } | {
505
505
  type: "CLOSE";
506
- }, xstate67.AnyEventObject>;
506
+ }, xstate131.AnyEventObject>;
507
507
  }) => {
508
508
  capturedDocument: CapturedDocument;
509
509
  processingType: DocumentType;
@@ -1,6 +1,6 @@
1
- import { _ as assign, b as createActor, g as setup, n as eventModuleNames, o as createManagerInstrumentation, y as fromPromise } from "./events-BfIbM5SS.esm.js";
2
- import { t as getBackCameraStream } from "./backCameraStream-THvMPTG_.esm.js";
3
- import { A as createManager, k as stopCameraStream } from "./src-D9pJSMO5.esm.js";
1
+ import { _ as setup, b as fromPromise, n as eventModuleNames, o as createManagerInstrumentation, v as assign, x as createActor } from "./events-c-r7jhs3.esm.js";
2
+ import { t as getBackCameraStream } from "./backCameraStream-BxXYKUoc.esm.js";
3
+ import { A as createManager, k as stopCameraStream } from "./src-DevpZoey.esm.js";
4
4
  import { t as api } from "./api-3fZO5bmj.esm.js";
5
5
  import { t as endpoints } from "./endpoints-Bydn-Ave.esm.js";
6
6
 
@@ -355,9 +355,10 @@ function mapState(snapshot) {
355
355
  pageNumber: 1
356
356
  };
357
357
  }
358
- function createApi({ actor }) {
358
+ function createApi({ actor, trackElementClicked }) {
359
359
  return {
360
360
  capture() {
361
+ trackElementClicked?.("capture");
361
362
  actor.send({ type: "CAPTURE" });
362
363
  },
363
364
  setFile(file, imageBase64) {
@@ -369,31 +370,42 @@ function createApi({ actor }) {
369
370
  });
370
371
  },
371
372
  accept() {
373
+ trackElementClicked?.("accept");
372
374
  actor.send({ type: "ACCEPT" });
373
375
  },
374
376
  retake() {
377
+ trackElementClicked?.("retake");
375
378
  actor.send({ type: "RETAKE" });
376
379
  },
377
380
  retry() {
381
+ trackElementClicked?.("retry");
378
382
  actor.send({ type: "RETRY" });
379
383
  },
380
384
  continue() {
385
+ trackElementClicked?.("continue");
381
386
  actor.send({ type: "CONTINUE" });
382
387
  },
383
388
  skip() {
389
+ trackElementClicked?.("skip");
384
390
  actor.send({ type: "SKIP" });
385
391
  },
386
392
  close() {
393
+ trackElementClicked?.("close");
387
394
  actor.send({ type: "CLOSE" });
388
395
  }
389
396
  };
390
397
  }
398
+ function getDocumentCaptureErrorPayload(snapshot) {
399
+ const errorCode = snapshot.context.error;
400
+ if (errorCode === void 0) return;
401
+ return { errorCode };
402
+ }
391
403
  function createDocumentCaptureManager(options) {
392
404
  return createManager({
393
405
  actor: createDocumentCaptureActor(options),
394
406
  mapState,
395
407
  createApi,
396
- instrumentation: createManagerInstrumentation(eventModuleNames.document)
408
+ instrumentation: createManagerInstrumentation(eventModuleNames.document, { getErrorPayload: getDocumentCaptureErrorPayload })
397
409
  });
398
410
  }
399
411