@incodetech/core 0.0.0-dev-20260403-10f7d94 → 0.0.0-dev-20260407-4580f1c
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.
- package/dist/{BaseWasmProvider-BFXU7jj8.esm.js → BaseWasmProvider--AzPfwOm.esm.js} +4 -4
- package/dist/{Manager-9L3Rmc6X.esm.js → Manager-C6AGXEq_.esm.js} +4 -3
- package/dist/{StreamCanvasCapture-BowJVbkC.esm.js → StreamCanvasCapture-DkpkIgyL.esm.js} +6 -6
- package/dist/{WasmUtilProvider-DctESPCy.esm.js → WasmUtilProvider-BonqBWdj.esm.js} +1 -1
- package/dist/{addressSearch-uoJHvUT9.esm.js → addressSearch-B8Fo4v9V.esm.js} +15 -8
- package/dist/antifraud.d.ts +57 -0
- package/dist/antifraud.esm.js +77 -0
- package/dist/authentication.d.ts +9 -9
- package/dist/authentication.esm.js +13 -13
- package/dist/{authenticationManager-xQrUkboA.esm.js → authenticationManager-B4gSCgrO.esm.js} +6 -6
- package/dist/{authenticationManager-B5Yv9bDw.d.ts → authenticationManager-Bd10YGSO.d.ts} +2 -2
- package/dist/{backCameraStream-BJwEXNl4.esm.js → backCameraStream-DF_d7hTz.esm.js} +50 -21
- package/dist/consent.d.ts +2 -2
- package/dist/consent.esm.js +3 -3
- package/dist/curp-validation.d.ts +5 -5
- package/dist/curp-validation.esm.js +3 -3
- package/dist/{deepsightLoader-D2MKmB5z.esm.js → deepsightLoader-DKgEdLIS.esm.js} +7 -7
- package/dist/{deepsightService-CWnhwXLw.d.ts → deepsightService-Ciu0atv5.d.ts} +2 -2
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +8 -7
- package/dist/document-upload.d.ts +47 -47
- package/dist/document-upload.esm.js +8 -7
- package/dist/ekyb.d.ts +3 -3
- package/dist/ekyb.esm.js +11 -10
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +104 -22
- package/dist/email.d.ts +3 -3
- package/dist/email.esm.js +5 -5
- package/dist/{emailManager-BIq6pJa8.d.ts → emailManager-BQPIJR_O.d.ts} +2 -2
- package/dist/{emailManager-DDioJ_AQ.esm.js → emailManager-CpAwvP3v.esm.js} +4 -4
- package/dist/{endpoints-DEXxYYFi.esm.js → endpoints-CI5-28jT.esm.js} +2 -1
- package/dist/extensibility.d.ts +13 -13
- package/dist/extensibility.esm.js +20 -27
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +3 -3
- package/dist/{faceCaptureManagerFactory-CN5-GRxP.d.ts → faceCaptureManagerFactory-CdwpYykv.d.ts} +6 -6
- package/dist/{faceCaptureSetup-Bq4TPX5D.esm.js → faceCaptureSetup-DbXgtcp7.esm.js} +11 -11
- package/dist/flow.d.ts +6 -6
- package/dist/flow.esm.js +8 -8
- package/dist/{flowCompletionService-CUT-cibE.esm.js → flowCompletionService-TnWijsSw.esm.js} +2 -2
- package/dist/{flowServices-Bi3F1654.esm.js → flowServices-D5ugKT5n.esm.js} +3 -3
- package/dist/geolocation.d.ts +2 -2
- package/dist/geolocation.esm.js +4 -4
- package/dist/government-validation.d.ts +2 -2
- package/dist/government-validation.esm.js +4 -4
- package/dist/id.d.ts +9 -9
- package/dist/id.esm.js +15 -15
- package/dist/{idCaptureManager-DlZXRwne.esm.js → idCaptureManager-DUZxcSP_.esm.js} +53 -24
- package/dist/{idCaptureManager-B1RWflj0.d.ts → idCaptureManager-IdqsAASp.d.ts} +14 -6
- package/dist/index.d.ts +10 -9
- package/dist/index.esm.js +16 -16
- package/dist/{lib-B5byelWf.esm.js → lib-i-4qLKdG.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +55 -55
- package/dist/mandatory-consent.esm.js +3 -3
- package/dist/phone.d.ts +3 -3
- package/dist/phone.esm.js +5 -5
- package/dist/{phoneManager-DXxuWtoy.esm.js → phoneManager-BAPHSXx8.esm.js} +4 -4
- package/dist/{phoneManager-Ba66ysK2.d.ts → phoneManager-DA8WUJtl.d.ts} +2 -2
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +4 -4
- package/dist/selfie.d.ts +9 -9
- package/dist/selfie.esm.js +13 -13
- package/dist/{selfieManager-DSEpKb7Q.esm.js → selfieManager-BSkzncsa.esm.js} +4 -4
- package/dist/{selfieManager-BnfnTPcx.d.ts → selfieManager-Dft5wZQ_.d.ts} +2 -2
- package/dist/{session-Cr89qxxK.esm.js → session-DqNrvO4r.esm.js} +13 -6
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +3 -3
- package/dist/signature.d.ts +2 -2
- package/dist/signature.esm.js +3 -3
- package/dist/{stats-D4C7iDy1.esm.js → stats-BVigf5Rn.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{types-BWGxcjiZ.d.ts → types-CiLyvJGb.d.ts} +1 -1
- package/dist/{types-BX1ZlbSR.d.ts → types-D8Y1faI5.d.ts} +1 -1
- package/package.json +8 -4
- /package/dist/{Actor-phIcsUhv.d.ts → Actor-By8WNHi-.d.ts} +0 -0
- /package/dist/{BrowserEnvironmentProvider-DApG6lNu.esm.js → BrowserEnvironmentProvider-BECjyw3_.esm.js} +0 -0
- /package/dist/{BrowserTimerProvider-CRhCvln7.esm.js → BrowserTimerProvider-CIqH6hJp.esm.js} +0 -0
- /package/dist/{Manager-BndLda4_.d.ts → Manager-CCT_-HuZ.d.ts} +0 -0
- /package/dist/{StateMachine-CGAi8x_b.d.ts → StateMachine-CM_aOfNL.d.ts} +0 -0
- /package/dist/{api-3fZO5bmj.esm.js → api-C2uzxrpN.esm.js} +0 -0
- /package/dist/{browserSimulation-zWJAZ1vA.esm.js → browserSimulation-DYAk0Ipe.esm.js} +0 -0
- /package/dist/{camera-Dv2WEhGe.d.ts → camera-6XJdOeBF.d.ts} +0 -0
- /package/dist/{camera-D-MPXRbZ.esm.js → camera-DAuRUvnp.esm.js} +0 -0
- /package/dist/{chunk-Boje8faD.esm.js → chunk-D6hkk-hd.esm.js} +0 -0
- /package/dist/{displayErrors-DzzB3fcR.d.ts → displayErrors-CGJwvrTl.d.ts} +0 -0
- /package/dist/{flowCompletionService-C_CShl_d.d.ts → flowCompletionService-BOd4Rk8n.d.ts} +0 -0
- /package/dist/{id-Dv0it9CY.esm.js → id-CzDAG_kM.esm.js} +0 -0
- /package/dist/{index-CuY8tqBC.d.ts → index-BuVKc9bv.d.ts} +0 -0
- /package/dist/{platform-B3nGssGZ.esm.js → platform-DdhkonXk.esm.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as isBrowserSimulation } from "./browserSimulation-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-
|
|
4
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { t as isBrowserSimulation } from "./browserSimulation-DYAk0Ipe.esm.js";
|
|
2
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
3
|
+
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-DAuRUvnp.esm.js";
|
|
4
|
+
import { t as addDeviceStats } from "./stats-BVigf5Rn.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/wasm/IdCaptureModelType.ts
|
|
7
7
|
let IdCaptureModelType = /* @__PURE__ */ function(IdCaptureModelType$1) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as isApiConfigured, r as getToken, t as api } from "./api-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
1
|
+
import { i as isApiConfigured, r as getToken, t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/xstate@5.24.0/node_modules/xstate/dev/dist/xstate-dev.esm.js
|
|
5
5
|
function getGlobal() {
|
|
@@ -3525,7 +3525,8 @@ const eventModuleNames = {
|
|
|
3525
3525
|
forms: "FORMS",
|
|
3526
3526
|
customModule: "CUSTOM_MODULE",
|
|
3527
3527
|
geolocation: "GEOLOCATION",
|
|
3528
|
-
ekyb: "EKYB"
|
|
3528
|
+
ekyb: "EKYB",
|
|
3529
|
+
antifraud: "ANTIFRAUD"
|
|
3529
3530
|
};
|
|
3530
3531
|
const eventScreenNames = {
|
|
3531
3532
|
faceMatch: "FACE_MATCH",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as __toDynamicImportESM } from "./chunk-
|
|
2
|
-
import { a as getDeviceInfo, i as IncodeCanvas, n as MotionSensorProvider } from "./BaseWasmProvider
|
|
3
|
-
import { t as api } from "./api-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
5
|
-
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-
|
|
1
|
+
import { a as __toDynamicImportESM } from "./chunk-D6hkk-hd.esm.js";
|
|
2
|
+
import { a as getDeviceInfo, i as IncodeCanvas, n as MotionSensorProvider } from "./BaseWasmProvider--AzPfwOm.esm.js";
|
|
3
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
5
|
+
import { i as stopCameraStream, r as requestCameraAccess } from "./camera-DAuRUvnp.esm.js";
|
|
6
6
|
|
|
7
7
|
//#region src/internal/device/getDeviceClass.ts
|
|
8
8
|
function getDeviceClass() {
|
|
@@ -174,7 +174,7 @@ async function requestPermission() {
|
|
|
174
174
|
let openViduImport;
|
|
175
175
|
async function loadOpenVidu() {
|
|
176
176
|
if (openViduImport) return openViduImport;
|
|
177
|
-
openViduImport = import("./lib-
|
|
177
|
+
openViduImport = import("./lib-i-4qLKdG.esm.js").then(__toDynamicImportESM(1));
|
|
178
178
|
return openViduImport;
|
|
179
179
|
}
|
|
180
180
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider
|
|
1
|
+
import { l as mlWasmJSApi_default, t as BaseWasmProvider } from "./BaseWasmProvider--AzPfwOm.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../infra/src/providers/wasm/WasmUtilProvider.ts
|
|
4
4
|
var WasmUtilProvider = class WasmUtilProvider extends BaseWasmProvider {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { x as fromCallback } from "./Manager-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-
|
|
1
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
|
+
import { x as fromCallback } from "./Manager-C6AGXEq_.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
4
|
+
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-CIqH6hJp.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/shared/usStates.ts
|
|
7
7
|
const usStates = {
|
|
@@ -343,11 +343,13 @@ const DYNAMIC_REQUIRED_KEY = "verification.errors.fieldRequiredDynamic";
|
|
|
343
343
|
* Fills form values from an address autocomplete suggestion.
|
|
344
344
|
* Shared between eKYC and eKYB address forms.
|
|
345
345
|
*/
|
|
346
|
-
function fillFromSuggestion(values, touched, suggestion) {
|
|
346
|
+
function fillFromSuggestion(values, touched, suggestion, activeFields) {
|
|
347
347
|
const newValues = { ...values };
|
|
348
348
|
const newTouched = { ...touched };
|
|
349
|
-
|
|
350
|
-
|
|
349
|
+
const hasHouseNoField = !activeFields || activeFields.has("houseNo");
|
|
350
|
+
const streetValue = buildStreetValue(suggestion.street, suggestion.houseNumber, hasHouseNoField);
|
|
351
|
+
if (streetValue) {
|
|
352
|
+
newValues.street = streetValue;
|
|
351
353
|
newTouched.street = true;
|
|
352
354
|
}
|
|
353
355
|
if (suggestion.city) {
|
|
@@ -362,7 +364,7 @@ function fillFromSuggestion(values, touched, suggestion) {
|
|
|
362
364
|
newValues.postalCode = suggestion.postalCode;
|
|
363
365
|
newTouched.postalCode = true;
|
|
364
366
|
}
|
|
365
|
-
if (suggestion.houseNumber) {
|
|
367
|
+
if (suggestion.houseNumber && hasHouseNoField) {
|
|
366
368
|
newValues.houseNo = suggestion.houseNumber;
|
|
367
369
|
newTouched.houseNo = true;
|
|
368
370
|
}
|
|
@@ -371,6 +373,11 @@ function fillFromSuggestion(values, touched, suggestion) {
|
|
|
371
373
|
touched: newTouched
|
|
372
374
|
};
|
|
373
375
|
}
|
|
376
|
+
function buildStreetValue(street, houseNumber, hasHouseNoField) {
|
|
377
|
+
if (hasHouseNoField) return street ?? "";
|
|
378
|
+
if (houseNumber && street) return `${houseNumber} ${street}`;
|
|
379
|
+
return houseNumber ?? street ?? "";
|
|
380
|
+
}
|
|
374
381
|
|
|
375
382
|
//#endregion
|
|
376
383
|
//#region src/shared/addressSearch.ts
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-CCT_-HuZ.js";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/antifraud/antifraudManager.d.ts
|
|
4
|
+
type AntifraudIdleState = {
|
|
5
|
+
status: 'idle';
|
|
6
|
+
};
|
|
7
|
+
type AntifraudProcessingState = {
|
|
8
|
+
status: 'processing';
|
|
9
|
+
};
|
|
10
|
+
type AntifraudFinishedState = {
|
|
11
|
+
status: 'finished';
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Union of all possible antifraud manager states.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const state = antifraudManager.getState();
|
|
19
|
+
* if (state.status === 'finished') {
|
|
20
|
+
* console.log('Antifraud check complete');
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
type AntifraudState = AntifraudIdleState | AntifraudProcessingState | AntifraudFinishedState;
|
|
25
|
+
/**
|
|
26
|
+
* Creates an antifraud manager for headless or UI-driven usage.
|
|
27
|
+
*
|
|
28
|
+
* @example Headless usage
|
|
29
|
+
* ```typescript
|
|
30
|
+
* const manager = createAntifraudManager();
|
|
31
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
32
|
+
* manager.load();
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
declare function createAntifraudManager(): Manager<AntifraudState> & {
|
|
36
|
+
/**
|
|
37
|
+
* Kicks off the antifraud process.
|
|
38
|
+
* Transitions from 'idle' to 'processing'.
|
|
39
|
+
*/
|
|
40
|
+
load(): void;
|
|
41
|
+
};
|
|
42
|
+
type AntifraudManager = ReturnType<typeof createAntifraudManager>;
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region src/modules/antifraud/antifraudStateMachine.d.ts
|
|
45
|
+
declare const antifraudMachine: any;
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/modules/antifraud/types.d.ts
|
|
48
|
+
/**
|
|
49
|
+
* Configuration options for the antifraud module.
|
|
50
|
+
*
|
|
51
|
+
* The antifraud module requires no configuration — it is a fire-and-forget
|
|
52
|
+
* process that runs the backend antifraud check and completes regardless of
|
|
53
|
+
* the API outcome.
|
|
54
|
+
*/
|
|
55
|
+
type AntifraudConfig = Record<string, never>;
|
|
56
|
+
//#endregion
|
|
57
|
+
export { type AntifraudConfig, type AntifraudManager, type AntifraudState, antifraudMachine, createAntifraudManager };
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
|
+
import { C as createActor, S as fromPromise, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
4
|
+
|
|
5
|
+
//#region src/modules/antifraud/antifraudServices.ts
|
|
6
|
+
async function processAntifraud(signal) {
|
|
7
|
+
const res = await api.get(endpoints.processAntifraud, { signal });
|
|
8
|
+
if (!res.ok) throw new Error(`GET ${endpoints.processAntifraud} failed: ${res.status} ${res.statusText}`);
|
|
9
|
+
return res.data;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
//#region src/modules/antifraud/antifraudStateMachine.ts
|
|
14
|
+
const antifraudMachine = setup({
|
|
15
|
+
types: {
|
|
16
|
+
context: {},
|
|
17
|
+
events: {}
|
|
18
|
+
},
|
|
19
|
+
actors: { processAntifraud: fromPromise(async ({ signal }) => {
|
|
20
|
+
return processAntifraud(signal);
|
|
21
|
+
}) }
|
|
22
|
+
}).createMachine({
|
|
23
|
+
id: "antifraud",
|
|
24
|
+
initial: "idle",
|
|
25
|
+
context: {},
|
|
26
|
+
states: {
|
|
27
|
+
idle: { on: { LOAD: { target: "processing" } } },
|
|
28
|
+
processing: { invoke: {
|
|
29
|
+
id: "processAntifraud",
|
|
30
|
+
src: "processAntifraud",
|
|
31
|
+
onDone: { target: "finished" },
|
|
32
|
+
onError: { target: "finished" }
|
|
33
|
+
} },
|
|
34
|
+
finished: { type: "final" }
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/modules/antifraud/antifraudActor.ts
|
|
40
|
+
function createAntifraudActor() {
|
|
41
|
+
return createActor(antifraudMachine).start();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/modules/antifraud/antifraudManager.ts
|
|
46
|
+
function mapState(snapshot) {
|
|
47
|
+
const typedSnapshot = snapshot;
|
|
48
|
+
if (typedSnapshot.matches("processing")) return { status: "processing" };
|
|
49
|
+
if (typedSnapshot.matches("finished")) return { status: "finished" };
|
|
50
|
+
return { status: "idle" };
|
|
51
|
+
}
|
|
52
|
+
function createApi({ actor }) {
|
|
53
|
+
return { load() {
|
|
54
|
+
actor.send({ type: "LOAD" });
|
|
55
|
+
} };
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Creates an antifraud manager for headless or UI-driven usage.
|
|
59
|
+
*
|
|
60
|
+
* @example Headless usage
|
|
61
|
+
* ```typescript
|
|
62
|
+
* const manager = createAntifraudManager();
|
|
63
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
64
|
+
* manager.load();
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
function createAntifraudManager() {
|
|
68
|
+
return createManager({
|
|
69
|
+
actor: createAntifraudActor(),
|
|
70
|
+
mapState,
|
|
71
|
+
createApi,
|
|
72
|
+
instrumentation: createManagerInstrumentation(eventModuleNames.antifraud)
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
//#endregion
|
|
77
|
+
export { antifraudMachine, createAntifraudManager };
|
package/dist/authentication.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./StateMachine-
|
|
2
|
-
import "./Actor-
|
|
3
|
-
import "./deepsightService-
|
|
4
|
-
import "./camera-
|
|
5
|
-
import "./types-
|
|
6
|
-
import "./types-
|
|
7
|
-
import "./Manager-
|
|
8
|
-
import { _ as AuthenticationConfig, b as authenticationMachine, g as createAuthenticationActor, h as CreateAuthenticationActorOptions, m as AuthenticationActor } from "./faceCaptureManagerFactory-
|
|
9
|
-
import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-
|
|
1
|
+
import "./StateMachine-CM_aOfNL.js";
|
|
2
|
+
import "./Actor-By8WNHi-.js";
|
|
3
|
+
import "./deepsightService-Ciu0atv5.js";
|
|
4
|
+
import "./camera-6XJdOeBF.js";
|
|
5
|
+
import "./types-CiLyvJGb.js";
|
|
6
|
+
import "./types-D8Y1faI5.js";
|
|
7
|
+
import "./Manager-CCT_-HuZ.js";
|
|
8
|
+
import { _ as AuthenticationConfig, b as authenticationMachine, g as createAuthenticationActor, h as CreateAuthenticationActorOptions, m as AuthenticationActor } from "./faceCaptureManagerFactory-CdwpYykv.js";
|
|
9
|
+
import { n as AuthenticationState, r as createAuthenticationManager, t as AuthenticationManager } from "./authenticationManager-Bd10YGSO.js";
|
|
10
10
|
export { type AuthenticationActor, type AuthenticationConfig, type AuthenticationManager, type AuthenticationState, type CreateAuthenticationActorOptions, authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./platform-
|
|
2
|
-
import "./BaseWasmProvider
|
|
3
|
-
import "./StreamCanvasCapture-
|
|
4
|
-
import "./browserSimulation-
|
|
5
|
-
import "./api-
|
|
6
|
-
import "./Manager-
|
|
7
|
-
import "./endpoints-
|
|
8
|
-
import "./camera-
|
|
9
|
-
import "./stats-
|
|
10
|
-
import "./backCameraStream-
|
|
11
|
-
import "./WasmUtilProvider-
|
|
12
|
-
import "./faceCaptureSetup-
|
|
13
|
-
import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-
|
|
1
|
+
import "./platform-DdhkonXk.esm.js";
|
|
2
|
+
import "./BaseWasmProvider--AzPfwOm.esm.js";
|
|
3
|
+
import "./StreamCanvasCapture-DkpkIgyL.esm.js";
|
|
4
|
+
import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
5
|
+
import "./api-C2uzxrpN.esm.js";
|
|
6
|
+
import "./Manager-C6AGXEq_.esm.js";
|
|
7
|
+
import "./endpoints-CI5-28jT.esm.js";
|
|
8
|
+
import "./camera-DAuRUvnp.esm.js";
|
|
9
|
+
import "./stats-BVigf5Rn.esm.js";
|
|
10
|
+
import "./backCameraStream-DF_d7hTz.esm.js";
|
|
11
|
+
import "./WasmUtilProvider-BonqBWdj.esm.js";
|
|
12
|
+
import "./faceCaptureSetup-DbXgtcp7.esm.js";
|
|
13
|
+
import { i as authenticationMachine, r as createAuthenticationActor, t as createAuthenticationManager } from "./authenticationManager-B4gSCgrO.esm.js";
|
|
14
14
|
|
|
15
15
|
export { authenticationMachine, createAuthenticationActor, createAuthenticationManager };
|
package/dist/{authenticationManager-xQrUkboA.esm.js → authenticationManager-B4gSCgrO.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { f as BrowserStorageProvider, p as getDeviceClass } from "./StreamCanvasCapture-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames } from "./Manager-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
5
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
6
|
-
import { a as createFaceCaptureManagerFromActor, i as FACE_ERROR_CODES, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
1
|
+
import { f as BrowserStorageProvider, p as getDeviceClass } from "./StreamCanvasCapture-DkpkIgyL.esm.js";
|
|
2
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
3
|
+
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames } from "./Manager-C6AGXEq_.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
5
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-BonqBWdj.esm.js";
|
|
6
|
+
import { a as createFaceCaptureManagerFromActor, i as FACE_ERROR_CODES, t as faceCaptureMachine } from "./faceCaptureSetup-DbXgtcp7.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/authentication/authenticationErrorUtils.ts
|
|
9
9
|
const AUTH_ERROR_MAP = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as Manager } from "./Manager-
|
|
2
|
-
import { h as CreateAuthenticationActorOptions, m as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
1
|
+
import { t as Manager } from "./Manager-CCT_-HuZ.js";
|
|
2
|
+
import { h as CreateAuthenticationActorOptions, m as AuthenticationActor, n as FaceCaptureManagerState, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CdwpYykv.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/authentication/authenticationManager.d.ts
|
|
5
5
|
type AuthenticationState = FaceCaptureManagerState;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as isIPhone14OrHigher, o as isSafari, r as isIOS, t as isAndroid } from "./platform-
|
|
2
|
-
import { i as stopCameraStream, n as enumerateVideoDevices, r as requestCameraAccess, t as applyTrackConstraints } from "./camera-
|
|
1
|
+
import { a as isIPhone14OrHigher, o as isSafari, r as isIOS, t as isAndroid } from "./platform-DdhkonXk.esm.js";
|
|
2
|
+
import { i as stopCameraStream, n as enumerateVideoDevices, r as requestCameraAccess, t as applyTrackConstraints } from "./camera-DAuRUvnp.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/capabilities/ITimerCapability.ts
|
|
5
5
|
function sleep(ms) {
|
|
@@ -75,6 +75,26 @@ async function getCameras() {
|
|
|
75
75
|
}
|
|
76
76
|
return cameras;
|
|
77
77
|
}
|
|
78
|
+
function selectBestBackCamera(track, backCameras) {
|
|
79
|
+
if (backCameras.length === 0) return void 0;
|
|
80
|
+
if (backCameras.length === 1) return backCameras[0];
|
|
81
|
+
const withMp = backCameras.map((c) => {
|
|
82
|
+
const match = c.label.match(/\b([0-9]+)\s*MP?\b/i);
|
|
83
|
+
return {
|
|
84
|
+
camera: c,
|
|
85
|
+
mp: match ? parseInt(match[1], 10) : 0
|
|
86
|
+
};
|
|
87
|
+
});
|
|
88
|
+
const maxMp = Math.max(...withMp.map((w) => w.mp));
|
|
89
|
+
if (maxMp > 0) {
|
|
90
|
+
const best = withMp.find((w) => w.mp === maxMp);
|
|
91
|
+
if (best) return best.camera;
|
|
92
|
+
}
|
|
93
|
+
const settings = track.getSettings();
|
|
94
|
+
const browserPick = backCameras.find((c) => c.deviceId === settings.deviceId || c.label === track.label);
|
|
95
|
+
if (browserPick) return browserPick;
|
|
96
|
+
return backCameras[0];
|
|
97
|
+
}
|
|
78
98
|
function selectMainCameraFromStream(track, cameras) {
|
|
79
99
|
const settings = track.getSettings();
|
|
80
100
|
const activeCamera = cameras.find((c) => c.deviceId === settings.deviceId || c.label !== "" && c.label === track.label);
|
|
@@ -84,7 +104,7 @@ function selectMainCameraFromStream(track, cameras) {
|
|
|
84
104
|
if (camera.deviceId === activeCamera.deviceId) camera.cameraType = "back";
|
|
85
105
|
else if (!isBackCameraLabel(camera.label)) camera.cameraType = "front";
|
|
86
106
|
});
|
|
87
|
-
return cameras.filter((c) => c.cameraType === "back")
|
|
107
|
+
return selectBestBackCamera(track, cameras.filter((c) => c.cameraType === "back"));
|
|
88
108
|
}
|
|
89
109
|
if (cameras.length === 1) return activeCamera;
|
|
90
110
|
}
|
|
@@ -166,6 +186,23 @@ function getAndroidVideoConstraints(level) {
|
|
|
166
186
|
default: return {};
|
|
167
187
|
}
|
|
168
188
|
}
|
|
189
|
+
function getAndroidFinalConstraints(mainCamera, fallbackLevel) {
|
|
190
|
+
const base = {
|
|
191
|
+
deviceId: { exact: mainCamera.deviceId },
|
|
192
|
+
resizeMode: "none"
|
|
193
|
+
};
|
|
194
|
+
if (fallbackLevel <= 1) return {
|
|
195
|
+
...base,
|
|
196
|
+
width: { ideal: 1920 },
|
|
197
|
+
height: { ideal: 1080 }
|
|
198
|
+
};
|
|
199
|
+
const full = getAndroidVideoConstraints(fallbackLevel);
|
|
200
|
+
return {
|
|
201
|
+
...base,
|
|
202
|
+
width: full.width,
|
|
203
|
+
height: full.height
|
|
204
|
+
};
|
|
205
|
+
}
|
|
169
206
|
async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
170
207
|
if (fallbackLevel > 5) throw new Error("Failed to get camera after all fallback attempts");
|
|
171
208
|
try {
|
|
@@ -174,20 +211,12 @@ async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
|
174
211
|
const mainCamera = selectMainCameraFromStream(track, await getCameras());
|
|
175
212
|
stopCameraStream(initialStream);
|
|
176
213
|
if (!mainCamera) throw new Error("Could not identify main camera");
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
idealWidth = width?.ideal ?? 1280;
|
|
184
|
-
idealHeight = height?.ideal ?? 720;
|
|
185
|
-
}
|
|
186
|
-
return await requestCameraAccess({ video: {
|
|
187
|
-
deviceId: { exact: mainCamera.deviceId },
|
|
188
|
-
width: { ideal: idealWidth },
|
|
189
|
-
height: { ideal: idealHeight }
|
|
190
|
-
} });
|
|
214
|
+
const finalStream = await requestCameraAccess({ video: getAndroidFinalConstraints(mainCamera, fallbackLevel) });
|
|
215
|
+
await applyFocusHint(finalStream);
|
|
216
|
+
return {
|
|
217
|
+
stream: finalStream,
|
|
218
|
+
fallbackLevel
|
|
219
|
+
};
|
|
191
220
|
} catch (error) {
|
|
192
221
|
const errorName = error instanceof Error ? error.name : "UnknownError";
|
|
193
222
|
const nextLevel = Math.min(fallbackLevel + 1, 5);
|
|
@@ -202,7 +231,7 @@ async function getAndroidBackCameraStream(fallbackLevel = 0) {
|
|
|
202
231
|
return getAndroidBackCameraStream(nextLevel);
|
|
203
232
|
}
|
|
204
233
|
}
|
|
205
|
-
async function
|
|
234
|
+
async function applyFocusHint(stream) {
|
|
206
235
|
const videoTrack = stream.getVideoTracks()[0];
|
|
207
236
|
try {
|
|
208
237
|
await applyTrackConstraints(videoTrack, { advanced: [{ focusDistance: 1 }] });
|
|
@@ -220,7 +249,7 @@ function getIOSConstraints() {
|
|
|
220
249
|
}
|
|
221
250
|
async function getIOSCameraStream() {
|
|
222
251
|
const stream = await requestCameraAccess(getIOSConstraints());
|
|
223
|
-
await
|
|
252
|
+
await applyFocusHint(stream);
|
|
224
253
|
return stream;
|
|
225
254
|
}
|
|
226
255
|
function getDesktopVideoConstraints(level) {
|
|
@@ -313,9 +342,9 @@ async function getDesktopCameraStream(options, fallbackLevel = 0) {
|
|
|
313
342
|
}
|
|
314
343
|
}
|
|
315
344
|
async function getBackCameraStream(deviceId) {
|
|
316
|
-
if (isIOS()) return getIOSCameraStream();
|
|
345
|
+
if (isIOS()) return { stream: await getIOSCameraStream() };
|
|
317
346
|
if (isAndroid()) return getAndroidBackCameraStream(0);
|
|
318
|
-
return getDesktopCameraStream({ deviceId });
|
|
347
|
+
return { stream: await getDesktopCameraStream({ deviceId }) };
|
|
319
348
|
}
|
|
320
349
|
|
|
321
350
|
//#endregion
|
package/dist/consent.d.ts
CHANGED
package/dist/consent.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
1
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
|
+
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/consent/consentServices.ts
|
|
6
6
|
async function fetchCombinedConsent(consentId, signal) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "./Actor-
|
|
2
|
-
import "./camera-
|
|
3
|
-
import "./types-
|
|
4
|
-
import { r as FlowModuleConfig } from "./types-
|
|
5
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import "./Actor-By8WNHi-.js";
|
|
2
|
+
import "./camera-6XJdOeBF.js";
|
|
3
|
+
import "./types-CiLyvJGb.js";
|
|
4
|
+
import { r as FlowModuleConfig } from "./types-D8Y1faI5.js";
|
|
5
|
+
import { t as Manager } from "./Manager-CCT_-HuZ.js";
|
|
6
6
|
|
|
7
7
|
//#region src/modules/curp-validation/types.d.ts
|
|
8
8
|
type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as api } from "./api-
|
|
2
|
-
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-
|
|
3
|
-
import { t as endpoints } from "./endpoints-
|
|
1
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
2
|
+
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
3
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/curp-validation/curpValidationUtils.ts
|
|
6
6
|
const CURP_PATTERN = /^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as MotionSensorProvider, r as createDeepsightService } from "./BaseWasmProvider
|
|
2
|
-
import "./browserSimulation-
|
|
3
|
-
import "./api-
|
|
4
|
-
import { t as BrowserEnvironmentProvider } from "./BrowserEnvironmentProvider-
|
|
5
|
-
import "./camera-
|
|
6
|
-
import "./stats-
|
|
7
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
1
|
+
import { n as MotionSensorProvider, r as createDeepsightService } from "./BaseWasmProvider--AzPfwOm.esm.js";
|
|
2
|
+
import "./browserSimulation-DYAk0Ipe.esm.js";
|
|
3
|
+
import "./api-C2uzxrpN.esm.js";
|
|
4
|
+
import { t as BrowserEnvironmentProvider } from "./BrowserEnvironmentProvider-BECjyw3_.esm.js";
|
|
5
|
+
import "./camera-DAuRUvnp.esm.js";
|
|
6
|
+
import "./stats-BVigf5Rn.esm.js";
|
|
7
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-BonqBWdj.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region ../infra/src/providers/browser/VisibilityProvider.ts
|
|
10
10
|
var VisibilityProvider = class {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as WasmPipeline } from "./StateMachine-
|
|
2
|
-
import { t as CameraStream } from "./camera-
|
|
1
|
+
import { a as WasmPipeline } from "./StateMachine-CM_aOfNL.js";
|
|
2
|
+
import { t as CameraStream } from "./camera-6XJdOeBF.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/media/canvas.d.ts
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "./Actor-
|
|
2
|
-
import { t as CameraStream } from "./camera-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import "./Actor-By8WNHi-.js";
|
|
2
|
+
import { t as CameraStream } from "./camera-6XJdOeBF.js";
|
|
3
|
+
import { t as Manager } from "./Manager-CCT_-HuZ.js";
|
|
4
4
|
import * as xstate0 from "xstate";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/document-capture/types.d.ts
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./platform-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
5
|
-
import { i as stopCameraStream } from "./camera-
|
|
6
|
-
import { t as getBackCameraStream } from "./backCameraStream-
|
|
1
|
+
import "./platform-DdhkonXk.esm.js";
|
|
2
|
+
import { t as api } from "./api-C2uzxrpN.esm.js";
|
|
3
|
+
import { C as createActor, S as fromPromise, b as assign, r as eventModuleNames, s as createManagerInstrumentation, t as createManager, y as setup } from "./Manager-C6AGXEq_.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-CI5-28jT.esm.js";
|
|
5
|
+
import { i as stopCameraStream } from "./camera-DAuRUvnp.esm.js";
|
|
6
|
+
import { t as getBackCameraStream } from "./backCameraStream-DF_d7hTz.esm.js";
|
|
7
7
|
|
|
8
8
|
//#region src/modules/document-capture/types.ts
|
|
9
9
|
const PROCESSING_TYPE_MAP = {
|
|
@@ -92,7 +92,8 @@ const documentCaptureMachine = setup({
|
|
|
92
92
|
},
|
|
93
93
|
actors: {
|
|
94
94
|
initCamera: fromPromise(async () => {
|
|
95
|
-
|
|
95
|
+
const { stream } = await getBackCameraStream(void 0);
|
|
96
|
+
return stream;
|
|
96
97
|
}),
|
|
97
98
|
uploadDocument: fromPromise(async ({ input, signal }) => {
|
|
98
99
|
return uploadDocumentCapture({
|