@incodetech/core 0.0.0-dev-20260325-9772cd2 → 0.0.0-dev-20260326-ac8336a

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.
@@ -1,5 +1,5 @@
1
1
  import { d as CameraStream, f as Manager } from "./index-BTaLQSj9.js";
2
- import * as xstate199 from "xstate";
2
+ import * as xstate0 from "xstate";
3
3
 
4
4
  //#region src/modules/document-capture/types.d.ts
5
5
  type DocumentType = 'addressStatement' | 'otherDocument1' | 'otherDocument2' | 'otherDocument3' | 'v5cMultiPageLogbook' | 'circulationCard' | 'financeSettlement' | 'carInvoice' | 'capture' | 'processPoaOcr' | 'processLoaOcr' | 'processAsylumSeekerVisaZaf' | 'processBankStatementOCR' | 'processBankCheck' | 'processV5CLogbook' | 'processCarInvoice' | 'processCirculationCard' | 'processFinanceSettlement';
@@ -71,7 +71,7 @@ type DocumentCaptureInput = {
71
71
  };
72
72
  //#endregion
73
73
  //#region src/modules/document-capture/documentCaptureStateMachine.d.ts
74
- declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureContext, {
74
+ declare const documentCaptureMachine: xstate0.StateMachine<DocumentCaptureContext, {
75
75
  type: "CAPTURE";
76
76
  } | {
77
77
  type: "FILE_SELECTED";
@@ -94,84 +94,84 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
94
94
  } | {
95
95
  type: "CLOSE";
96
96
  }, {
97
- [x: string]: xstate199.ActorRefFromLogic<xstate199.PromiseActorLogic<MediaStream, void, xstate199.EventObject>> | xstate199.ActorRefFromLogic<xstate199.PromiseActorLogic<DocumentUploadResponse, {
97
+ [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<DocumentUploadResponse, {
98
98
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
99
99
  processingType: string;
100
100
  onProgress: (progress: number) => void;
101
- }, xstate199.EventObject>> | undefined;
102
- }, xstate199.Values<{
101
+ }, xstate0.EventObject>> | undefined;
102
+ }, xstate0.Values<{
103
103
  initCamera: {
104
104
  src: "initCamera";
105
- logic: xstate199.PromiseActorLogic<MediaStream, void, xstate199.EventObject>;
105
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
106
106
  id: string | undefined;
107
107
  };
108
108
  uploadDocument: {
109
109
  src: "uploadDocument";
110
- logic: xstate199.PromiseActorLogic<DocumentUploadResponse, {
110
+ logic: xstate0.PromiseActorLogic<DocumentUploadResponse, {
111
111
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
112
112
  processingType: string;
113
113
  onProgress: (progress: number) => void;
114
- }, xstate199.EventObject>;
114
+ }, xstate0.EventObject>;
115
115
  id: string | undefined;
116
116
  };
117
- }>, xstate199.Values<{
117
+ }>, xstate0.Values<{
118
118
  setStream: {
119
119
  type: "setStream";
120
- params: xstate199.NonReducibleUnknown;
121
- };
122
- setProgress: {
123
- type: "setProgress";
124
- params: xstate199.NonReducibleUnknown;
125
- };
126
- clearError: {
127
- type: "clearError";
128
- params: xstate199.NonReducibleUnknown;
129
- };
130
- stopStream: {
131
- type: "stopStream";
132
- params: xstate199.NonReducibleUnknown;
120
+ params: xstate0.NonReducibleUnknown;
133
121
  };
134
122
  setCapturedDocument: {
135
123
  type: "setCapturedDocument";
136
- params: xstate199.NonReducibleUnknown;
124
+ params: xstate0.NonReducibleUnknown;
137
125
  };
138
126
  setFileTooLargeError: {
139
127
  type: "setFileTooLargeError";
140
- params: xstate199.NonReducibleUnknown;
128
+ params: xstate0.NonReducibleUnknown;
129
+ };
130
+ setProgress: {
131
+ type: "setProgress";
132
+ params: xstate0.NonReducibleUnknown;
141
133
  };
142
134
  setUploadError: {
143
135
  type: "setUploadError";
144
- params: xstate199.NonReducibleUnknown;
136
+ params: xstate0.NonReducibleUnknown;
145
137
  };
146
138
  decrementAttemptsRemaining: {
147
139
  type: "decrementAttemptsRemaining";
148
- params: xstate199.NonReducibleUnknown;
140
+ params: xstate0.NonReducibleUnknown;
149
141
  };
150
142
  setCaptureMethodFile: {
151
143
  type: "setCaptureMethodFile";
152
- params: xstate199.NonReducibleUnknown;
144
+ params: xstate0.NonReducibleUnknown;
153
145
  };
154
146
  setCaptureMethodCamera: {
155
147
  type: "setCaptureMethodCamera";
156
- params: xstate199.NonReducibleUnknown;
148
+ params: xstate0.NonReducibleUnknown;
157
149
  };
158
150
  clearCapturedDocument: {
159
151
  type: "clearCapturedDocument";
160
- params: xstate199.NonReducibleUnknown;
152
+ params: xstate0.NonReducibleUnknown;
161
153
  };
162
154
  setPendingNextPage: {
163
155
  type: "setPendingNextPage";
164
- params: xstate199.NonReducibleUnknown;
156
+ params: xstate0.NonReducibleUnknown;
165
157
  };
166
158
  clearForNextPage: {
167
159
  type: "clearForNextPage";
168
- params: xstate199.NonReducibleUnknown;
160
+ params: xstate0.NonReducibleUnknown;
161
+ };
162
+ clearError: {
163
+ type: "clearError";
164
+ params: xstate0.NonReducibleUnknown;
169
165
  };
170
166
  resetProgress: {
171
167
  type: "resetProgress";
172
- params: xstate199.NonReducibleUnknown;
168
+ params: xstate0.NonReducibleUnknown;
169
+ };
170
+ stopStream: {
171
+ type: "stopStream";
172
+ params: xstate0.NonReducibleUnknown;
173
173
  };
174
- }>, xstate199.Values<{
174
+ }>, xstate0.Values<{
175
175
  allowSkip: {
176
176
  type: "allowSkip";
177
177
  params: unknown;
@@ -208,7 +208,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
208
208
  type: "isPendingNextPage";
209
209
  params: unknown;
210
210
  };
211
- }>, never, "initCamera" | "capturing" | "closed" | "uploading" | "finished" | "tutorial" | "preview" | "failure" | "success", string, DocumentCaptureInput, xstate199.NonReducibleUnknown, xstate199.EventObject, xstate199.MetaObject, {
211
+ }>, never, "initCamera" | "tutorial" | "capturing" | "preview" | "finished" | "closed" | "failure" | "uploading" | "success", string, DocumentCaptureInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
212
212
  readonly id: "documentCapture";
213
213
  readonly initial: "tutorial";
214
214
  readonly context: ({
@@ -217,67 +217,67 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
217
217
  spawn: {
218
218
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
219
219
  src: "initCamera";
220
- logic: xstate199.PromiseActorLogic<MediaStream, void, xstate199.EventObject>;
220
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
221
221
  id: string | undefined;
222
222
  } extends infer T ? T extends {
223
223
  src: "initCamera";
224
- logic: xstate199.PromiseActorLogic<MediaStream, void, xstate199.EventObject>;
224
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
225
225
  id: string | undefined;
226
226
  } ? T extends {
227
227
  src: TSrc;
228
- } ? xstate199.ConditionalRequired<[options?: ({
228
+ } ? xstate0.ConditionalRequired<[options?: ({
229
229
  id?: T["id"] | undefined;
230
230
  systemId?: string;
231
- input?: xstate199.InputFrom<T["logic"]> | undefined;
231
+ input?: xstate0.InputFrom<T["logic"]> | undefined;
232
232
  syncSnapshot?: boolean;
233
- } & { [K in xstate199.RequiredActorOptions<T>]: unknown }) | undefined], xstate199.IsNotNever<xstate199.RequiredActorOptions<T>>> : never : never : never) | ({
233
+ } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
234
234
  src: "uploadDocument";
235
- logic: xstate199.PromiseActorLogic<DocumentUploadResponse, {
235
+ logic: xstate0.PromiseActorLogic<DocumentUploadResponse, {
236
236
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
237
237
  processingType: string;
238
238
  onProgress: (progress: number) => void;
239
- }, xstate199.EventObject>;
239
+ }, xstate0.EventObject>;
240
240
  id: string | undefined;
241
241
  } extends infer T_1 ? T_1 extends {
242
242
  src: "uploadDocument";
243
- logic: xstate199.PromiseActorLogic<DocumentUploadResponse, {
243
+ logic: xstate0.PromiseActorLogic<DocumentUploadResponse, {
244
244
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
245
245
  processingType: string;
246
246
  onProgress: (progress: number) => void;
247
- }, xstate199.EventObject>;
247
+ }, xstate0.EventObject>;
248
248
  id: string | undefined;
249
249
  } ? T_1 extends {
250
250
  src: TSrc;
251
- } ? xstate199.ConditionalRequired<[options?: ({
251
+ } ? xstate0.ConditionalRequired<[options?: ({
252
252
  id?: T_1["id"] | undefined;
253
253
  systemId?: string;
254
- input?: xstate199.InputFrom<T_1["logic"]> | undefined;
254
+ input?: xstate0.InputFrom<T_1["logic"]> | undefined;
255
255
  syncSnapshot?: boolean;
256
- } & { [K_1 in xstate199.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate199.IsNotNever<xstate199.RequiredActorOptions<T_1>>> : never : never : never)): xstate199.ActorRefFromLogic<xstate199.GetConcreteByKey<xstate199.Values<{
256
+ } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
257
257
  initCamera: {
258
258
  src: "initCamera";
259
- logic: xstate199.PromiseActorLogic<MediaStream, void, xstate199.EventObject>;
259
+ logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
260
260
  id: string | undefined;
261
261
  };
262
262
  uploadDocument: {
263
263
  src: "uploadDocument";
264
- logic: xstate199.PromiseActorLogic<DocumentUploadResponse, {
264
+ logic: xstate0.PromiseActorLogic<DocumentUploadResponse, {
265
265
  capturedDocument: NonNullable<DocumentCaptureContext["capturedDocument"]>;
266
266
  processingType: string;
267
267
  onProgress: (progress: number) => void;
268
- }, xstate199.EventObject>;
268
+ }, xstate0.EventObject>;
269
269
  id: string | undefined;
270
270
  };
271
271
  }>, "src", TSrc>["logic"]>;
272
- <TLogic extends xstate199.AnyActorLogic>(src: TLogic, ...[options]: xstate199.ConditionalRequired<[options?: ({
272
+ <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
273
273
  id?: never;
274
274
  systemId?: string;
275
- input?: xstate199.InputFrom<TLogic> | undefined;
275
+ input?: xstate0.InputFrom<TLogic> | undefined;
276
276
  syncSnapshot?: boolean;
277
- } & { [K in xstate199.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate199.IsNotNever<xstate199.RequiredLogicInput<TLogic>>>): xstate199.ActorRefFromLogic<TLogic>;
277
+ } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
278
278
  };
279
279
  input: DocumentCaptureInput;
280
- self: xstate199.ActorRef<xstate199.MachineSnapshot<DocumentCaptureContext, {
280
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentCaptureContext, {
281
281
  type: "CAPTURE";
282
282
  } | {
283
283
  type: "FILE_SELECTED";
@@ -299,7 +299,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
299
299
  type: "SKIP";
300
300
  } | {
301
301
  type: "CLOSE";
302
- }, Record<string, xstate199.AnyActorRef | undefined>, xstate199.StateValue, string, unknown, any, any>, {
302
+ }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
303
303
  type: "CAPTURE";
304
304
  } | {
305
305
  type: "FILE_SELECTED";
@@ -321,7 +321,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
321
321
  type: "SKIP";
322
322
  } | {
323
323
  type: "CLOSE";
324
- }, xstate199.AnyEventObject>;
324
+ }, xstate0.AnyEventObject>;
325
325
  }) => {
326
326
  config: {
327
327
  processingType: DocumentType;
@@ -458,7 +458,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
458
458
  } | {
459
459
  type: "CLOSE";
460
460
  };
461
- self: xstate199.ActorRef<xstate199.MachineSnapshot<DocumentCaptureContext, {
461
+ self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentCaptureContext, {
462
462
  type: "CAPTURE";
463
463
  } | {
464
464
  type: "FILE_SELECTED";
@@ -480,7 +480,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
480
480
  type: "SKIP";
481
481
  } | {
482
482
  type: "CLOSE";
483
- }, Record<string, xstate199.AnyActorRef>, xstate199.StateValue, string, unknown, any, any>, {
483
+ }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
484
484
  type: "CAPTURE";
485
485
  } | {
486
486
  type: "FILE_SELECTED";
@@ -502,7 +502,7 @@ declare const documentCaptureMachine: xstate199.StateMachine<DocumentCaptureCont
502
502
  type: "SKIP";
503
503
  } | {
504
504
  type: "CLOSE";
505
- }, xstate199.AnyEventObject>;
505
+ }, xstate0.AnyEventObject>;
506
506
  }) => {
507
507
  capturedDocument: CapturedDocument;
508
508
  processingType: DocumentType;
@@ -1,5 +1,5 @@
1
1
  import { S as createActor, n as eventModuleNames, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
2
- import { t as getBackCameraStream } from "./backCameraStream-DtcVhHEz.esm.js";
2
+ import { t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
3
3
  import { A as stopCameraStream, j as createManager } from "./src-DCc0dMkT.esm.js";
4
4
  import { t as api } from "./api-G4JA8CXK.esm.js";
5
5
  import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
@@ -1,9 +1,9 @@
1
1
  import { f as Manager } from "./index-BTaLQSj9.js";
2
2
  import { n as DocumentUploadContext, r as DocumentUploadInput, t as DocumentUploadConfig } from "./types-oveF7RrS.js";
3
- import * as xstate0 from "xstate";
3
+ import * as xstate140 from "xstate";
4
4
 
5
5
  //#region src/modules/document-upload/documentUploadStateMachine.d.ts
6
- declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext, {
6
+ declare const documentUploadMachine: xstate140.StateMachine<DocumentUploadContext, {
7
7
  type: "START";
8
8
  } | {
9
9
  type: "CAPTURE";
@@ -16,52 +16,52 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
16
16
  } | {
17
17
  type: "CLOSE";
18
18
  }, {
19
- [x: string]: xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>> | xstate0.ActorRefFromLogic<xstate0.PromiseActorLogic<void, {
19
+ [x: string]: xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>> | xstate140.ActorRefFromLogic<xstate140.PromiseActorLogic<void, {
20
20
  imageBase64: string;
21
21
  documentType: string;
22
22
  onProgress: (progress: number) => void;
23
- }, xstate0.EventObject>> | undefined;
24
- }, xstate0.Values<{
23
+ }, xstate140.EventObject>> | undefined;
24
+ }, xstate140.Values<{
25
25
  initCamera: {
26
26
  src: "initCamera";
27
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
27
+ logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
28
28
  id: string | undefined;
29
29
  };
30
30
  uploadDocument: {
31
31
  src: "uploadDocument";
32
- logic: xstate0.PromiseActorLogic<void, {
32
+ logic: xstate140.PromiseActorLogic<void, {
33
33
  imageBase64: string;
34
34
  documentType: string;
35
35
  onProgress: (progress: number) => void;
36
- }, xstate0.EventObject>;
36
+ }, xstate140.EventObject>;
37
37
  id: string | undefined;
38
38
  };
39
- }>, xstate0.Values<{
39
+ }>, xstate140.Values<{
40
40
  setStream: {
41
41
  type: "setStream";
42
- params: xstate0.NonReducibleUnknown;
43
- };
44
- setImageAndClearError: {
45
- type: "setImageAndClearError";
46
- params: xstate0.NonReducibleUnknown;
42
+ params: xstate140.NonReducibleUnknown;
47
43
  };
48
44
  setProgress: {
49
45
  type: "setProgress";
50
- params: xstate0.NonReducibleUnknown;
51
- };
52
- setError: {
53
- type: "setError";
54
- params: xstate0.NonReducibleUnknown;
46
+ params: xstate140.NonReducibleUnknown;
55
47
  };
56
48
  clearError: {
57
49
  type: "clearError";
58
- params: xstate0.NonReducibleUnknown;
50
+ params: xstate140.NonReducibleUnknown;
59
51
  };
60
52
  stopStream: {
61
53
  type: "stopStream";
62
- params: xstate0.NonReducibleUnknown;
54
+ params: xstate140.NonReducibleUnknown;
55
+ };
56
+ setError: {
57
+ type: "setError";
58
+ params: xstate140.NonReducibleUnknown;
59
+ };
60
+ setImageAndClearError: {
61
+ type: "setImageAndClearError";
62
+ params: xstate140.NonReducibleUnknown;
63
63
  };
64
- }>, never, never, "error" | "initCamera" | "idle" | "capturing" | "closed" | "uploading" | "finished", string, DocumentUploadInput, xstate0.NonReducibleUnknown, xstate0.EventObject, xstate0.MetaObject, {
64
+ }>, never, never, "error" | "initCamera" | "capturing" | "finished" | "closed" | "uploading" | "idle", string, DocumentUploadInput, xstate140.NonReducibleUnknown, xstate140.EventObject, xstate140.MetaObject, {
65
65
  readonly id: "documentUpload";
66
66
  readonly initial: "idle";
67
67
  readonly context: ({
@@ -70,67 +70,67 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
70
70
  spawn: {
71
71
  <TSrc extends "initCamera" | "uploadDocument">(logic: TSrc, ...[options]: ({
72
72
  src: "initCamera";
73
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
73
+ logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
74
74
  id: string | undefined;
75
75
  } extends infer T ? T extends {
76
76
  src: "initCamera";
77
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
77
+ logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
78
78
  id: string | undefined;
79
79
  } ? T extends {
80
80
  src: TSrc;
81
- } ? xstate0.ConditionalRequired<[options?: ({
81
+ } ? xstate140.ConditionalRequired<[options?: ({
82
82
  id?: T["id"] | undefined;
83
83
  systemId?: string;
84
- input?: xstate0.InputFrom<T["logic"]> | undefined;
84
+ input?: xstate140.InputFrom<T["logic"]> | undefined;
85
85
  syncSnapshot?: boolean;
86
- } & { [K in xstate0.RequiredActorOptions<T>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T>>> : never : never : never) | ({
86
+ } & { [K in xstate140.RequiredActorOptions<T>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T>>> : never : never : never) | ({
87
87
  src: "uploadDocument";
88
- logic: xstate0.PromiseActorLogic<void, {
88
+ logic: xstate140.PromiseActorLogic<void, {
89
89
  imageBase64: string;
90
90
  documentType: string;
91
91
  onProgress: (progress: number) => void;
92
- }, xstate0.EventObject>;
92
+ }, xstate140.EventObject>;
93
93
  id: string | undefined;
94
94
  } extends infer T_1 ? T_1 extends {
95
95
  src: "uploadDocument";
96
- logic: xstate0.PromiseActorLogic<void, {
96
+ logic: xstate140.PromiseActorLogic<void, {
97
97
  imageBase64: string;
98
98
  documentType: string;
99
99
  onProgress: (progress: number) => void;
100
- }, xstate0.EventObject>;
100
+ }, xstate140.EventObject>;
101
101
  id: string | undefined;
102
102
  } ? T_1 extends {
103
103
  src: TSrc;
104
- } ? xstate0.ConditionalRequired<[options?: ({
104
+ } ? xstate140.ConditionalRequired<[options?: ({
105
105
  id?: T_1["id"] | undefined;
106
106
  systemId?: string;
107
- input?: xstate0.InputFrom<T_1["logic"]> | undefined;
107
+ input?: xstate140.InputFrom<T_1["logic"]> | undefined;
108
108
  syncSnapshot?: boolean;
109
- } & { [K_1 in xstate0.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredActorOptions<T_1>>> : never : never : never)): xstate0.ActorRefFromLogic<xstate0.GetConcreteByKey<xstate0.Values<{
109
+ } & { [K_1 in xstate140.RequiredActorOptions<T_1>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredActorOptions<T_1>>> : never : never : never)): xstate140.ActorRefFromLogic<xstate140.GetConcreteByKey<xstate140.Values<{
110
110
  initCamera: {
111
111
  src: "initCamera";
112
- logic: xstate0.PromiseActorLogic<MediaStream, void, xstate0.EventObject>;
112
+ logic: xstate140.PromiseActorLogic<MediaStream, void, xstate140.EventObject>;
113
113
  id: string | undefined;
114
114
  };
115
115
  uploadDocument: {
116
116
  src: "uploadDocument";
117
- logic: xstate0.PromiseActorLogic<void, {
117
+ logic: xstate140.PromiseActorLogic<void, {
118
118
  imageBase64: string;
119
119
  documentType: string;
120
120
  onProgress: (progress: number) => void;
121
- }, xstate0.EventObject>;
121
+ }, xstate140.EventObject>;
122
122
  id: string | undefined;
123
123
  };
124
124
  }>, "src", TSrc>["logic"]>;
125
- <TLogic extends xstate0.AnyActorLogic>(src: TLogic, ...[options]: xstate0.ConditionalRequired<[options?: ({
125
+ <TLogic extends xstate140.AnyActorLogic>(src: TLogic, ...[options]: xstate140.ConditionalRequired<[options?: ({
126
126
  id?: never;
127
127
  systemId?: string;
128
- input?: xstate0.InputFrom<TLogic> | undefined;
128
+ input?: xstate140.InputFrom<TLogic> | undefined;
129
129
  syncSnapshot?: boolean;
130
- } & { [K in xstate0.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate0.IsNotNever<xstate0.RequiredLogicInput<TLogic>>>): xstate0.ActorRefFromLogic<TLogic>;
130
+ } & { [K in xstate140.RequiredLogicInput<TLogic>]: unknown }) | undefined], xstate140.IsNotNever<xstate140.RequiredLogicInput<TLogic>>>): xstate140.ActorRefFromLogic<TLogic>;
131
131
  };
132
132
  input: DocumentUploadInput;
133
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
133
+ self: xstate140.ActorRef<xstate140.MachineSnapshot<DocumentUploadContext, {
134
134
  type: "START";
135
135
  } | {
136
136
  type: "CAPTURE";
@@ -142,7 +142,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
142
142
  type: "RETRY";
143
143
  } | {
144
144
  type: "CLOSE";
145
- }, Record<string, xstate0.AnyActorRef | undefined>, xstate0.StateValue, string, unknown, any, any>, {
145
+ }, Record<string, xstate140.AnyActorRef | undefined>, xstate140.StateValue, string, unknown, any, any>, {
146
146
  type: "START";
147
147
  } | {
148
148
  type: "CAPTURE";
@@ -154,7 +154,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
154
154
  type: "RETRY";
155
155
  } | {
156
156
  type: "CLOSE";
157
- }, xstate0.AnyEventObject>;
157
+ }, xstate140.AnyEventObject>;
158
158
  }) => {
159
159
  config: DocumentUploadConfig;
160
160
  stream: undefined;
@@ -224,7 +224,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
224
224
  } | {
225
225
  type: "CLOSE";
226
226
  };
227
- self: xstate0.ActorRef<xstate0.MachineSnapshot<DocumentUploadContext, {
227
+ self: xstate140.ActorRef<xstate140.MachineSnapshot<DocumentUploadContext, {
228
228
  type: "START";
229
229
  } | {
230
230
  type: "CAPTURE";
@@ -236,7 +236,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
236
236
  type: "RETRY";
237
237
  } | {
238
238
  type: "CLOSE";
239
- }, Record<string, xstate0.AnyActorRef>, xstate0.StateValue, string, unknown, any, any>, {
239
+ }, Record<string, xstate140.AnyActorRef>, xstate140.StateValue, string, unknown, any, any>, {
240
240
  type: "START";
241
241
  } | {
242
242
  type: "CAPTURE";
@@ -248,7 +248,7 @@ declare const documentUploadMachine: xstate0.StateMachine<DocumentUploadContext,
248
248
  type: "RETRY";
249
249
  } | {
250
250
  type: "CLOSE";
251
- }, xstate0.AnyEventObject>;
251
+ }, xstate140.AnyEventObject>;
252
252
  }) => {
253
253
  imageBase64: string;
254
254
  documentType: string;
@@ -1,5 +1,5 @@
1
1
  import { S as createActor, n as eventModuleNames, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
2
- import { t as getBackCameraStream } from "./backCameraStream-DtcVhHEz.esm.js";
2
+ import { t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
3
3
  import { A as stopCameraStream, j as createManager } from "./src-DCc0dMkT.esm.js";
4
4
  import { t as api } from "./api-G4JA8CXK.esm.js";
5
5
  import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
@@ -1,12 +1,12 @@
1
1
  import { S as CaptureIdResponse, i as createIdCaptureManagerFromActor, n as IdCaptureState, t as IdCaptureManager } from "./idCaptureManager-Dc2NJMy_.js";
2
2
  import { l as createActor, s as fromPromise } from "./index-BTaLQSj9.js";
3
3
  import { i as IStorageCapability } from "./deepsightService-DxA--87N.js";
4
- import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-MPKxiFCQ.js";
4
+ import { C as WasmUtilConfig, S as VirtualCameraCheckOutput, b as BaseWasmProvider, c as FaceCaptureEvent, f as SendFaceImageResponse, l as FaceCaptureInput, n as FaceCaptureManagerState, s as FaceCaptureContext, t as FaceCaptureManager, u as faceCaptureMachine, x as IWasmUtilCapability } from "./faceCaptureManagerFactory-CGpkO_S3.js";
5
5
  import "./warmup-CzfSiaMj.js";
6
6
  import "./types-oveF7RrS.js";
7
7
  import "./types-mQLzH6uw.js";
8
- import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-qS-A0pXo.js";
9
- import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-DbKSx46Q.js";
8
+ import { a as ProcessFaceResponse, i as createSelfieManagerFromActor, n as SelfieState, t as SelfieManager } from "./selfieManager-B4Nnp7ws.js";
9
+ import { i as createAuthenticationManagerFromActor, n as AuthenticationState, t as AuthenticationManager } from "./authenticationManager-TaI12wf3.js";
10
10
  import { i as createEmailManagerFromActor, n as EmailState, t as EmailManager } from "./emailManager-DsAtfVR-.js";
11
11
  import { i as createPhoneManagerFromActor, n as PhoneState, t as PhoneManager } from "./phoneManager-CenWu6bP.js";
12
12
 
@@ -1,18 +1,18 @@
1
1
  import { S as createActor, x as fromPromise } from "./events-Cc1xUUgF.esm.js";
2
- import "./backCameraStream-DtcVhHEz.esm.js";
2
+ import "./backCameraStream-jiRgi6k7.esm.js";
3
3
  import { o as WasmUtilProvider, v as BrowserStorageProvider } from "./src-DCc0dMkT.esm.js";
4
4
  import "./recordingsRepository-COovU1i4.esm.js";
5
5
  import "./browserSimulation-C8gNnn5p.esm.js";
6
6
  import "./api-G4JA8CXK.esm.js";
7
7
  import "./endpoints-CCuj1KZH.esm.js";
8
8
  import "./session-CRPiwwF-.esm.js";
9
- import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-Bl-CBtgX.esm.js";
9
+ import { n as createIdCaptureManagerFromActor } from "./idCaptureManager-BxlkQJq-.esm.js";
10
10
  import "./deepsightService-lTQvj-Wf.esm.js";
11
11
  import "./stats-D0m3TvIg.esm.js";
12
- import { t as faceCaptureMachine } from "./faceCaptureSetup-4itNYIdX.esm.js";
13
- import { n as createAuthenticationManagerFromActor } from "./authenticationManager-CRC59Vms.esm.js";
12
+ import { t as faceCaptureMachine } from "./faceCaptureSetup-CP7WXoGS.esm.js";
13
+ import { n as createAuthenticationManagerFromActor } from "./authenticationManager-CoeHnXPS.esm.js";
14
14
  import { n as createEmailManagerFromActor } from "./emailManager-Bl3NqSZ-.esm.js";
15
- import { n as createSelfieManagerFromActor } from "./selfieManager-UcQu7POO.esm.js";
15
+ import { n as createSelfieManagerFromActor } from "./selfieManager-DZTwDE-b.esm.js";
16
16
  import { n as createPhoneManagerFromActor } from "./phoneManager-2NN9q777.esm.js";
17
17
 
18
18
  export { BrowserStorageProvider, WasmUtilProvider, createActor, createAuthenticationManagerFromActor, createEmailManagerFromActor, createIdCaptureManagerFromActor, createPhoneManagerFromActor, createSelfieManagerFromActor, faceCaptureMachine, fromPromise };
@@ -304,6 +304,10 @@ type AuthenticationMachine = typeof _authenticationMachine;
304
304
  declare const authenticationMachine: AnyStateMachine;
305
305
  //#endregion
306
306
  //#region src/internal/faceCapture/types.d.ts
307
+ type CameraResolution = {
308
+ width?: number;
309
+ height?: number;
310
+ };
307
311
  type BaseFaceCaptureConfig = {
308
312
  showTutorial: boolean;
309
313
  showPreview?: boolean;
@@ -318,6 +322,7 @@ type BaseFaceCaptureConfig = {
318
322
  validateClosedEyes?: boolean;
319
323
  validateBrightness?: boolean;
320
324
  deepsightLiveness?: 'SINGLE_FRAME' | 'MULTIMODAL' | 'VIDEOLIVENESS';
325
+ cameraResolution?: CameraResolution;
321
326
  recording?: {
322
327
  capability?: IRecordingCapability;
323
328
  };
@@ -1,6 +1,6 @@
1
1
  import { b as fromCallback, o as createManagerInstrumentation, v as setup, x as fromPromise, y as assign } from "./events-Cc1xUUgF.esm.js";
2
- import { t as getBackCameraStream } from "./backCameraStream-DtcVhHEz.esm.js";
3
- import { A as stopCameraStream, C as StreamCanvasCapture, S as StreamCanvasProcessingSession, c as FaceDetectionProvider, f as OpenViduRecordingProvider, j as createManager, k as requestCameraAccess, m as LocalRecordingProvider } from "./src-DCc0dMkT.esm.js";
2
+ import { n as getDesktopCameraStream, t as getBackCameraStream } from "./backCameraStream-jiRgi6k7.esm.js";
3
+ import { A as stopCameraStream, B as isIPhone14OrHigher, C as StreamCanvasCapture, L as isDesktop, S as StreamCanvasProcessingSession, c as FaceDetectionProvider, f as OpenViduRecordingProvider, j as createManager, k as requestCameraAccess, m as LocalRecordingProvider } from "./src-DCc0dMkT.esm.js";
4
4
  import { a as checkPermission, i as uploadDeepsightVideo, n as startRecording, o as requestPermission, r as stopRecording$1, s as flagFaceManualReview, t as createRecordingSession, u as getDeviceClass } from "./recordingsRepository-COovU1i4.esm.js";
5
5
  import { r as getToken, t as api } from "./api-G4JA8CXK.esm.js";
6
6
  import { t as endpoints } from "./endpoints-CCuj1KZH.esm.js";
@@ -207,7 +207,7 @@ async function processFace(imageType = "selfie", signal) {
207
207
  function sendLabelInspectionEvent() {
208
208
  return addDeviceStats({ cameraLabelInspectionStatus: "FAIL" });
209
209
  }
210
- const CAMERA_CONSTRAINTS = {
210
+ const MOBILE_SELFIE_CONSTRAINTS = {
211
211
  video: {
212
212
  facingMode: "user",
213
213
  height: { ideal: 480 },
@@ -215,11 +215,33 @@ const CAMERA_CONSTRAINTS = {
215
215
  },
216
216
  audio: false
217
217
  };
218
+ const IPHONE14_SELFIE_CONSTRAINTS = {
219
+ video: { height: { ideal: 1080 } },
220
+ audio: false
221
+ };
222
+ function buildCameraConstraints(resolution) {
223
+ if (resolution) return {
224
+ video: {
225
+ facingMode: "user",
226
+ height: resolution.height ? { ideal: resolution.height } : void 0,
227
+ width: resolution.width ? { ideal: resolution.width } : void 0
228
+ },
229
+ audio: false
230
+ };
231
+ if (isIPhone14OrHigher()) return IPHONE14_SELFIE_CONSTRAINTS;
232
+ return MOBILE_SELFIE_CONSTRAINTS;
233
+ }
218
234
  function stopStream(stream) {
219
235
  stopCameraStream(stream);
220
236
  }
237
+ async function getFrontCameraStream(resolution) {
238
+ if (resolution) return requestCameraAccess(buildCameraConstraints(resolution));
239
+ if (isDesktop()) return getDesktopCameraStream({});
240
+ return requestCameraAccess(buildCameraConstraints());
241
+ }
221
242
  async function initializeCamera(params) {
222
243
  const { config } = params;
244
+ const prcConstraints = buildCameraConstraints(config.cameraResolution);
223
245
  const provider = new FaceDetectionProvider();
224
246
  await provider.initialize({ autocaptureInterval: config.autoCaptureTimeout * 1e3 });
225
247
  provider.setChecksEnabled({
@@ -229,12 +251,9 @@ async function initializeCamera(params) {
229
251
  headWear: config.validateHeadCover ?? false,
230
252
  occlusion: false
231
253
  });
232
- await params.deepsightService.performPrcCheck({ constraints: { video: CAMERA_CONSTRAINTS.video } });
254
+ await params.deepsightService.performPrcCheck({ constraints: { video: prcConstraints.video } });
233
255
  return {
234
- stream: config.assistedOnboarding ? await getBackCameraStream() : await requestCameraAccess({
235
- video: CAMERA_CONSTRAINTS.video,
236
- audio: false
237
- }),
256
+ stream: config.assistedOnboarding ? await getBackCameraStream() : await getFrontCameraStream(config.cameraResolution),
238
257
  provider
239
258
  };
240
259
  }
package/dist/id.esm.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import "./events-Cc1xUUgF.esm.js";
2
- import "./backCameraStream-DtcVhHEz.esm.js";
2
+ import "./backCameraStream-jiRgi6k7.esm.js";
3
3
  import "./src-DCc0dMkT.esm.js";
4
4
  import "./recordingsRepository-COovU1i4.esm.js";
5
5
  import "./browserSimulation-C8gNnn5p.esm.js";
6
6
  import "./api-G4JA8CXK.esm.js";
7
7
  import "./endpoints-CCuj1KZH.esm.js";
8
8
  import "./session-CRPiwwF-.esm.js";
9
- import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-Bl-CBtgX.esm.js";
9
+ import { a as initializeIdCapture, c as stopRecording, d as validateUploadResponse, f as ID_ERROR_CODES, i as idCaptureMachine, l as stopStream, o as processId, r as createIdCaptureActor, s as startRecordingSession, t as createIdCaptureManager, u as uploadIdImage } from "./idCaptureManager-BxlkQJq-.esm.js";
10
10
  import "./deepsightService-lTQvj-Wf.esm.js";
11
11
  import "./stats-D0m3TvIg.esm.js";
12
12
  import "./id-B30uqGbp.esm.js";