@incodetech/core 0.0.0-dev-20260205-3c3a4bf → 0.0.0-dev-20260206-4cf3405
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/OpenViduLogger-B6-UWyJe.esm.js +3 -0
- package/dist/{OpenViduLogger-XKcjntVs.esm.js → OpenViduLogger-DrE4_cHh.esm.js} +1 -1
- package/dist/{deepsightLoader-k3wsWNe9.esm.js → deepsightLoader-CHzDt5p2.esm.js} +4 -4
- package/dist/{deepsightService-cv8dG6Xt.esm.js → deepsightService-C_AyxXhJ.esm.js} +3 -3
- package/dist/{deepsightService-C-8SR9TZ.d.ts → deepsightService-D8qaikEi.d.ts} +1 -1
- package/dist/email.d.ts +1 -1
- package/dist/email.esm.js +4 -4
- package/dist/{endpoints-C8rHyk-E.esm.js → endpoints-Q2cBwc8v.esm.js} +3 -0
- package/dist/{events-17x9_Rhn.esm.js → events-BN5bIhsN.esm.js} +2 -2
- package/dist/face-match.d.ts +227 -0
- package/dist/face-match.esm.js +312 -0
- package/dist/flow.d.ts +2 -2
- package/dist/flow.esm.js +3 -3
- package/dist/{id-B5Mot-OC.esm.js → id-B6VREnGU.esm.js} +8 -8
- package/dist/id.d.ts +4 -4
- package/dist/id.esm.js +8 -8
- package/dist/{index-aadmCg5s.d.ts → index-BOpNqAs7.d.ts} +3 -3
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +8 -8
- package/dist/{lib-Cmee0CBZ.esm.js → lib-ieMlAKG1.esm.js} +2 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +4 -4
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +8 -8
- package/dist/{src-B7aPHCq5.esm.js → src-B0UBQ8zw.esm.js} +3 -3
- package/dist/{stats-onWUN0tY.esm.js → stats-CpcCA-Ml.esm.js} +1 -1
- package/dist/stats.esm.js +2 -2
- package/dist/{streamingEvents-B13rmFOY.esm.js → streamingEvents-DhMoimL8.esm.js} +3 -3
- package/package.json +5 -1
- package/dist/OpenViduLogger-Cu0BjUgP.esm.js +0 -3
- /package/dist/{Manager-WTb99jnh.d.ts → Manager-CWwvSZqZ.d.ts} +0 -0
- /package/dist/{api-DfRLAneb.esm.js → api-BkkE6cfa.esm.js} +0 -0
- /package/dist/{chunk-V5DOKNPJ.esm.js → chunk-CiY78uGR.esm.js} +0 -0
- /package/dist/{types-CflhN94Q.d.ts → types-BHcijCvX.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __commonJS } from "./chunk-
|
|
1
|
+
import { t as __commonJS } from "./chunk-CiY78uGR.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js
|
|
4
4
|
var require_jsnlog = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/jsnlog@2.30.0/node_modules/jsnlog/jsnlog.js": ((exports) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-
|
|
2
|
-
import { t as createDeepsightService } from "./deepsightService-
|
|
3
|
-
import "./api-
|
|
4
|
-
import "./stats-
|
|
1
|
+
import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-B0UBQ8zw.esm.js";
|
|
2
|
+
import { t as createDeepsightService } from "./deepsightService-C_AyxXhJ.esm.js";
|
|
3
|
+
import "./api-BkkE6cfa.esm.js";
|
|
4
|
+
import "./stats-CpcCA-Ml.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/internal/deepsight/deepsightLoader.ts
|
|
7
7
|
const SDK_VERSION = "2.0.0";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, b as createHiddenVideoElement, w as requestCameraAccess, x as IncodeCanvas } from "./src-
|
|
2
|
-
import { t as api } from "./api-
|
|
3
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, b as createHiddenVideoElement, w as requestCameraAccess, x as IncodeCanvas } from "./src-B0UBQ8zw.esm.js";
|
|
2
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
3
|
+
import { t as addDeviceStats } from "./stats-CpcCA-Ml.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/internal/device/browserSimulation.ts
|
|
6
6
|
const AUTOMATION_MARKERS = {
|
package/dist/email.d.ts
CHANGED
package/dist/email.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
2
|
-
import { E as createManager, p as BrowserTimerProvider } from "./src-
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { E as createManager, p as BrowserTimerProvider } from "./src-B0UBQ8zw.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
4
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/email/emailServices.ts
|
|
7
7
|
async function fetchEmail(signal) {
|
|
@@ -3279,6 +3279,9 @@ const endpoints = {
|
|
|
3279
3279
|
frontId: "/omni/add/front-id/v2",
|
|
3280
3280
|
backId: "/omni/add/back-id/v2",
|
|
3281
3281
|
getImages: "/omni/get/images",
|
|
3282
|
+
getImagesV2: "/omni/get/images/v2",
|
|
3283
|
+
getScore: "/omni/get/score",
|
|
3284
|
+
getImagesSecondId: "/omni/get/images-second-id",
|
|
3282
3285
|
processId: "/omni/process/id",
|
|
3283
3286
|
processSecondId: "/omni/process/second-id",
|
|
3284
3287
|
processFace: "/omni/process/face",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as endpoints } from "./endpoints-
|
|
2
|
-
import { i as isApiConfigured, r as getToken, t as api } from "./api-
|
|
1
|
+
import { t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
2
|
+
import { i as isApiConfigured, r as getToken, t as api } from "./api-BkkE6cfa.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../infra/src/capabilities/IBrowserEnvironmentCapability.ts
|
|
5
5
|
function getTimestamp() {
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { t as Manager } from "./Manager-CWwvSZqZ.js";
|
|
2
|
+
|
|
3
|
+
//#region src/modules/face-match/types.d.ts
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Face match comparison variant.
|
|
7
|
+
* Determines which images are compared in the face match flow.
|
|
8
|
+
*/
|
|
9
|
+
type FaceMatchVariant = 'selfieVsId' | 'selfieVsNfc' | 'idVsNfc' | 'nfc3Way' | 'secondId';
|
|
10
|
+
/**
|
|
11
|
+
* Configuration options for face match module.
|
|
12
|
+
*
|
|
13
|
+
* @example Standard face match with animation
|
|
14
|
+
* ```typescript
|
|
15
|
+
* const config: FaceMatchConfig = {
|
|
16
|
+
* variant: 'selfieVsId',
|
|
17
|
+
* disableFaceMatchAnimation: false,
|
|
18
|
+
* };
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @example Auto-skip mode (headless)
|
|
22
|
+
* ```typescript
|
|
23
|
+
* const config: FaceMatchConfig = {
|
|
24
|
+
* variant: 'selfieVsId',
|
|
25
|
+
* disableFaceMatchAnimation: true,
|
|
26
|
+
* };
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
type FaceMatchConfig = {
|
|
30
|
+
/**
|
|
31
|
+
* Which images to compare in the face match flow.
|
|
32
|
+
* @default 'selfieVsId'
|
|
33
|
+
*/
|
|
34
|
+
variant?: FaceMatchVariant;
|
|
35
|
+
/**
|
|
36
|
+
* When true, skips the animation UI and auto-completes immediately after fetching data.
|
|
37
|
+
* Useful for headless integrations or silent verification flows.
|
|
38
|
+
* @default false
|
|
39
|
+
*/
|
|
40
|
+
disableFaceMatchAnimation?: boolean;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Cropped face images fetched from the backend.
|
|
44
|
+
*/
|
|
45
|
+
type FaceMatchImages = {
|
|
46
|
+
/**
|
|
47
|
+
* Cropped face from ID document.
|
|
48
|
+
*/
|
|
49
|
+
idFace: string | null;
|
|
50
|
+
/**
|
|
51
|
+
* Cropped selfie image (from face capture).
|
|
52
|
+
*/
|
|
53
|
+
selfie: string | null;
|
|
54
|
+
/**
|
|
55
|
+
* Cropped face from second ID document (only for 'secondId' variant).
|
|
56
|
+
*/
|
|
57
|
+
secondIdFace?: string | null;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Face match result parsed from score response.
|
|
61
|
+
*/
|
|
62
|
+
type FaceMatchResult = {
|
|
63
|
+
/**
|
|
64
|
+
* Whether faces matched (OK = true, FAIL = false, null = unknown).
|
|
65
|
+
*/
|
|
66
|
+
matched: boolean | null;
|
|
67
|
+
/**
|
|
68
|
+
* Whether liveness check passed.
|
|
69
|
+
*/
|
|
70
|
+
liveness: boolean | null;
|
|
71
|
+
};
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/modules/face-match/faceMatchActor.d.ts
|
|
74
|
+
type CreateFaceMatchActorOptions = {
|
|
75
|
+
config: FaceMatchConfig;
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/modules/face-match/faceMatchManager.d.ts
|
|
79
|
+
/** Face match manager is in initial state, waiting for `load()` to be called */
|
|
80
|
+
type FaceMatchIdleState = {
|
|
81
|
+
status: 'idle';
|
|
82
|
+
};
|
|
83
|
+
/** Fetching images and score from backend */
|
|
84
|
+
type FaceMatchLoadingState = {
|
|
85
|
+
status: 'loading';
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* Animation is playing - images are animating.
|
|
89
|
+
* @property images - Cropped face images fetched from backend
|
|
90
|
+
* @property result - Face match result (matched, liveness)
|
|
91
|
+
*/
|
|
92
|
+
type FaceMatchAnimatingState = {
|
|
93
|
+
status: 'animating';
|
|
94
|
+
images: {
|
|
95
|
+
idFace: string | null;
|
|
96
|
+
selfie: string | null;
|
|
97
|
+
secondIdFace?: string | null;
|
|
98
|
+
};
|
|
99
|
+
result: {
|
|
100
|
+
matched: boolean | null;
|
|
101
|
+
liveness: boolean | null;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* Showing match result - waiting for user to click continue.
|
|
106
|
+
* @property images - Cropped face images
|
|
107
|
+
* @property result - Face match result
|
|
108
|
+
* @property matched - Whether faces matched (true/false/null)
|
|
109
|
+
*/
|
|
110
|
+
type FaceMatchResultState = {
|
|
111
|
+
status: 'result';
|
|
112
|
+
images: {
|
|
113
|
+
idFace: string | null;
|
|
114
|
+
selfie: string | null;
|
|
115
|
+
secondIdFace?: string | null;
|
|
116
|
+
};
|
|
117
|
+
result: {
|
|
118
|
+
matched: boolean | null;
|
|
119
|
+
liveness: boolean | null;
|
|
120
|
+
};
|
|
121
|
+
matched: boolean | null;
|
|
122
|
+
};
|
|
123
|
+
/** Face match completed successfully */
|
|
124
|
+
type FaceMatchFinishedState = {
|
|
125
|
+
status: 'finished';
|
|
126
|
+
matched: boolean | null;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Fatal error occurred - call `reset()` to start over
|
|
130
|
+
* @property error - Error message describing what went wrong
|
|
131
|
+
*/
|
|
132
|
+
type FaceMatchErrorState = {
|
|
133
|
+
status: 'error';
|
|
134
|
+
error: string;
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Union of all possible face match manager states.
|
|
138
|
+
* Use discriminated union pattern to narrow the type:
|
|
139
|
+
*
|
|
140
|
+
* @example
|
|
141
|
+
* ```typescript
|
|
142
|
+
* const state = faceMatchManager.getState();
|
|
143
|
+
* if (state.status === 'animating') {
|
|
144
|
+
* // TypeScript knows state has images and result
|
|
145
|
+
* console.log(state.images.idFace);
|
|
146
|
+
* }
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
type FaceMatchState = FaceMatchIdleState | FaceMatchLoadingState | FaceMatchAnimatingState | FaceMatchResultState | FaceMatchFinishedState | FaceMatchErrorState;
|
|
150
|
+
/**
|
|
151
|
+
* Creates a face match manager for headless or UI-driven usage.
|
|
152
|
+
*
|
|
153
|
+
* The manager provides a state machine-based API for face comparison
|
|
154
|
+
* with optional animation display.
|
|
155
|
+
*
|
|
156
|
+
* @param options - Configuration options
|
|
157
|
+
* @param options.config - Face match configuration
|
|
158
|
+
* @param options.config.variant - Which images to compare (default: 'selfieVsId')
|
|
159
|
+
* @param options.config.disableFaceMatchAnimation - Skip animation and auto-complete (default: false)
|
|
160
|
+
*
|
|
161
|
+
* @returns Face match manager with state, API methods, and subscription
|
|
162
|
+
*
|
|
163
|
+
* @example Headless usage
|
|
164
|
+
* ```typescript
|
|
165
|
+
* const manager = createFaceMatchManager({
|
|
166
|
+
* config: { variant: 'selfieVsId', disableFaceMatchAnimation: true },
|
|
167
|
+
* });
|
|
168
|
+
*
|
|
169
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
170
|
+
* manager.load();
|
|
171
|
+
* // Auto-completes when disableFaceMatchAnimation is true
|
|
172
|
+
* manager.stop();
|
|
173
|
+
* ```
|
|
174
|
+
*
|
|
175
|
+
* @example With React/Preact UI hook
|
|
176
|
+
* ```tsx
|
|
177
|
+
* const [state, manager] = useManager(() => createFaceMatchManager({ config }));
|
|
178
|
+
*
|
|
179
|
+
* if (state.status === 'animating') {
|
|
180
|
+
* return <Animation images={state.images} />;
|
|
181
|
+
* }
|
|
182
|
+
* ```
|
|
183
|
+
*/
|
|
184
|
+
declare function createFaceMatchManager(options: CreateFaceMatchActorOptions): Manager<FaceMatchState> & {
|
|
185
|
+
/**
|
|
186
|
+
* Initializes the face match flow.
|
|
187
|
+
* Transitions from 'idle' to 'loading'.
|
|
188
|
+
* Must be called before any other method.
|
|
189
|
+
*/
|
|
190
|
+
load(): void;
|
|
191
|
+
/**
|
|
192
|
+
* Signals that the animation has completed.
|
|
193
|
+
* Should be called when state is 'animating' and your UI animation finishes.
|
|
194
|
+
* Transitions to 'result' state.
|
|
195
|
+
*/
|
|
196
|
+
animationComplete(): void;
|
|
197
|
+
/**
|
|
198
|
+
* User clicked continue button.
|
|
199
|
+
* Should be called when state is 'result'.
|
|
200
|
+
* Transitions to 'finished' state.
|
|
201
|
+
*/
|
|
202
|
+
continue(): void;
|
|
203
|
+
/**
|
|
204
|
+
* Resets the manager to initial state.
|
|
205
|
+
* Can be called from 'error' state to start over.
|
|
206
|
+
* Clears all stored data including images and result.
|
|
207
|
+
*/
|
|
208
|
+
reset(): void;
|
|
209
|
+
};
|
|
210
|
+
/**
|
|
211
|
+
* Type representing a face match manager instance.
|
|
212
|
+
* Includes state access, API methods, and lifecycle management.
|
|
213
|
+
*
|
|
214
|
+
* @property getState - Returns the current FaceMatchState
|
|
215
|
+
* @property subscribe - Subscribes to state changes, returns unsubscribe function
|
|
216
|
+
* @property stop - Stops the manager and cleans up resources
|
|
217
|
+
* @property load - Initializes the face match flow
|
|
218
|
+
* @property animationComplete - Signals animation finished
|
|
219
|
+
* @property continue - User clicked continue button
|
|
220
|
+
* @property reset - Resets to initial state
|
|
221
|
+
*/
|
|
222
|
+
type FaceMatchManager = ReturnType<typeof createFaceMatchManager>;
|
|
223
|
+
//#endregion
|
|
224
|
+
//#region src/modules/face-match/faceMatchStateMachine.d.ts
|
|
225
|
+
declare const faceMatchMachine: any;
|
|
226
|
+
//#endregion
|
|
227
|
+
export { type FaceMatchConfig, type FaceMatchImages, type FaceMatchManager, type FaceMatchResult, type FaceMatchState, type FaceMatchVariant, createFaceMatchManager, faceMatchMachine };
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { E as createManager } from "./src-B0UBQ8zw.esm.js";
|
|
3
|
+
import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
4
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
5
|
+
|
|
6
|
+
//#region src/modules/face-match/faceMatchServices.ts
|
|
7
|
+
/**
|
|
8
|
+
* Fetches cropped face images from the backend.
|
|
9
|
+
*/
|
|
10
|
+
async function fetchFaceMatchImages(signal) {
|
|
11
|
+
const res = await api.post(endpoints.getImagesV2, { images: [
|
|
12
|
+
"croppedFace",
|
|
13
|
+
"croppedIDFace",
|
|
14
|
+
"croppedAuthenticationSelfie"
|
|
15
|
+
] }, { signal });
|
|
16
|
+
if (!res.ok) throw new Error(`POST ${endpoints.getImagesV2} failed: ${res.status} ${res.statusText}`);
|
|
17
|
+
const data = res.data;
|
|
18
|
+
return {
|
|
19
|
+
idFace: data.croppedIDFace ?? null,
|
|
20
|
+
selfie: data.croppedFace ?? data.croppedAuthenticationSelfie ?? null,
|
|
21
|
+
secondIdFace: void 0
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Fetches face recognition score from the backend.
|
|
26
|
+
*/
|
|
27
|
+
async function fetchScore(signal) {
|
|
28
|
+
const res = await api.get(endpoints.getScore, { signal });
|
|
29
|
+
if (!res.ok) throw new Error(`GET ${endpoints.getScore} failed: ${res.status} ${res.statusText}`);
|
|
30
|
+
const data = res.data;
|
|
31
|
+
return {
|
|
32
|
+
matched: data.faceRecognition?.overall?.status === "OK" ? true : data.faceRecognition?.overall?.status === "FAIL" ? false : null,
|
|
33
|
+
liveness: data.deepsight ? data.deepsight.multimodalIntelligence?.overall?.status === "OK" : data.liveness?.overall?.status === "OK"
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Fetches second ID face images from the backend.
|
|
38
|
+
*/
|
|
39
|
+
async function fetchSecondIdImages(signal) {
|
|
40
|
+
const res = await api.post(endpoints.getImagesSecondId, { images: ["croppedIDFace"] }, { signal });
|
|
41
|
+
if (!res.ok) throw new Error(`POST ${endpoints.getImagesSecondId} failed: ${res.status} ${res.statusText}`);
|
|
42
|
+
return { secondIdFace: res.data.croppedIDFace ?? null };
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Fetches all face match data in parallel (images, score, and optionally second ID images).
|
|
46
|
+
*/
|
|
47
|
+
async function fetchFaceMatchData(config, signal) {
|
|
48
|
+
const promises = [fetchFaceMatchImages(signal), fetchScore(signal)];
|
|
49
|
+
if (config.variant === "secondId") promises.push(fetchSecondIdImages(signal));
|
|
50
|
+
const [imagesRes, resultRes, secondIdRes] = await Promise.all(promises);
|
|
51
|
+
return {
|
|
52
|
+
images: {
|
|
53
|
+
...imagesRes,
|
|
54
|
+
secondIdFace: secondIdRes?.secondIdFace ?? null
|
|
55
|
+
},
|
|
56
|
+
result: resultRes
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/modules/face-match/faceMatchStateMachine.ts
|
|
62
|
+
const faceMatchMachine = setup({
|
|
63
|
+
types: {
|
|
64
|
+
context: {},
|
|
65
|
+
events: {},
|
|
66
|
+
input: {}
|
|
67
|
+
},
|
|
68
|
+
actors: { fetchData: fromPromise(async ({ input, signal }) => {
|
|
69
|
+
return fetchFaceMatchData(input.config, signal);
|
|
70
|
+
}) },
|
|
71
|
+
actions: {
|
|
72
|
+
setData: assign(({ event }) => {
|
|
73
|
+
const output = event.output;
|
|
74
|
+
return {
|
|
75
|
+
images: output.images,
|
|
76
|
+
result: output.result
|
|
77
|
+
};
|
|
78
|
+
}),
|
|
79
|
+
setError: assign(({ event }) => ({ error: String(event.error) })),
|
|
80
|
+
clearError: assign({ error: () => void 0 }),
|
|
81
|
+
resetContext: assign(({ context }) => ({
|
|
82
|
+
config: context.config,
|
|
83
|
+
images: null,
|
|
84
|
+
result: null,
|
|
85
|
+
error: void 0
|
|
86
|
+
})),
|
|
87
|
+
trackModuleOpened: () => {
|
|
88
|
+
addEvent({
|
|
89
|
+
code: "moduleOpened",
|
|
90
|
+
module: eventModuleNames.faceMatch,
|
|
91
|
+
screen: eventScreenNames.faceMatch
|
|
92
|
+
});
|
|
93
|
+
},
|
|
94
|
+
trackContinue: () => {
|
|
95
|
+
addEvent({
|
|
96
|
+
code: "continue",
|
|
97
|
+
module: eventModuleNames.faceMatch,
|
|
98
|
+
screen: eventScreenNames.faceMatch
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
guards: { isAnimationDisabled: ({ context }) => context.config.disableFaceMatchAnimation === true }
|
|
103
|
+
}).createMachine({
|
|
104
|
+
id: "faceMatch",
|
|
105
|
+
initial: "idle",
|
|
106
|
+
context: ({ input }) => ({
|
|
107
|
+
config: input.config,
|
|
108
|
+
images: null,
|
|
109
|
+
result: null,
|
|
110
|
+
error: void 0
|
|
111
|
+
}),
|
|
112
|
+
states: {
|
|
113
|
+
idle: {
|
|
114
|
+
entry: "trackModuleOpened",
|
|
115
|
+
on: { LOAD: { target: "loading" } }
|
|
116
|
+
},
|
|
117
|
+
loading: { invoke: {
|
|
118
|
+
id: "fetchData",
|
|
119
|
+
src: "fetchData",
|
|
120
|
+
input: ({ context }) => ({ config: context.config }),
|
|
121
|
+
onDone: [{
|
|
122
|
+
target: "finished",
|
|
123
|
+
guard: "isAnimationDisabled",
|
|
124
|
+
actions: "setData"
|
|
125
|
+
}, {
|
|
126
|
+
target: "animating",
|
|
127
|
+
actions: "setData"
|
|
128
|
+
}],
|
|
129
|
+
onError: {
|
|
130
|
+
target: "error",
|
|
131
|
+
actions: "setError"
|
|
132
|
+
}
|
|
133
|
+
} },
|
|
134
|
+
animating: { on: { ANIMATION_COMPLETE: { target: "result" } } },
|
|
135
|
+
result: { on: { CONTINUE: {
|
|
136
|
+
target: "finished",
|
|
137
|
+
actions: "trackContinue"
|
|
138
|
+
} } },
|
|
139
|
+
finished: { type: "final" },
|
|
140
|
+
error: { on: { RESET: {
|
|
141
|
+
target: "idle",
|
|
142
|
+
actions: "resetContext"
|
|
143
|
+
} } }
|
|
144
|
+
}
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
//#endregion
|
|
148
|
+
//#region src/modules/face-match/faceMatchActor.ts
|
|
149
|
+
function createFaceMatchActor(options) {
|
|
150
|
+
return createActor(faceMatchMachine, { input: { config: options.config } }).start();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/modules/face-match/faceMatchManager.ts
|
|
155
|
+
/**
|
|
156
|
+
* @module @incodetech/core/face-match
|
|
157
|
+
*
|
|
158
|
+
* Face match module for the Incode Web SDK.
|
|
159
|
+
* Supports both headless (programmatic) and UI-driven usage patterns.
|
|
160
|
+
*
|
|
161
|
+
* ## Headless Usage
|
|
162
|
+
*
|
|
163
|
+
* The face match manager can be used entirely without UI for backend integrations,
|
|
164
|
+
* custom UI implementations, or automated workflows.
|
|
165
|
+
*
|
|
166
|
+
* @example Basic headless face match with auto-skip
|
|
167
|
+
* ```typescript
|
|
168
|
+
* import { createFaceMatchManager } from '@incodetech/core/face-match';
|
|
169
|
+
* import { setup } from '@incodetech/core';
|
|
170
|
+
*
|
|
171
|
+
* // 1. Configure the SDK (required before using any module)
|
|
172
|
+
* setup({ apiURL: 'https://api.example.com', token: 'your-token' });
|
|
173
|
+
*
|
|
174
|
+
* // 2. Create the face match manager
|
|
175
|
+
* const faceMatchManager = createFaceMatchManager({
|
|
176
|
+
* config: {
|
|
177
|
+
* variant: 'selfieVsId',
|
|
178
|
+
* disableFaceMatchAnimation: true,
|
|
179
|
+
* },
|
|
180
|
+
* });
|
|
181
|
+
*
|
|
182
|
+
* // 3. Subscribe to state changes (optional but recommended)
|
|
183
|
+
* faceMatchManager.subscribe((state) => {
|
|
184
|
+
* console.log('Face match state:', state.status);
|
|
185
|
+
* if (state.status === 'finished') {
|
|
186
|
+
* console.log('Face match complete!', state.matched);
|
|
187
|
+
* }
|
|
188
|
+
* if (state.status === 'error') {
|
|
189
|
+
* console.error('Error:', state.error);
|
|
190
|
+
* }
|
|
191
|
+
* });
|
|
192
|
+
*
|
|
193
|
+
* // 4. Start the flow
|
|
194
|
+
* faceMatchManager.load();
|
|
195
|
+
*
|
|
196
|
+
* // 5. Auto-completes when disableFaceMatchAnimation is true
|
|
197
|
+
* // Or call faceMatchManager.continue() after animation in custom UI
|
|
198
|
+
*
|
|
199
|
+
* // 6. Clean up when done
|
|
200
|
+
* faceMatchManager.stop();
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example Headless face match with custom UI
|
|
204
|
+
* ```typescript
|
|
205
|
+
* const faceMatchManager = createFaceMatchManager({
|
|
206
|
+
* config: { variant: 'selfieVsId', disableFaceMatchAnimation: false },
|
|
207
|
+
* });
|
|
208
|
+
*
|
|
209
|
+
* faceMatchManager.subscribe((state) => {
|
|
210
|
+
* if (state.status === 'animating') {
|
|
211
|
+
* // Render your custom animation
|
|
212
|
+
* renderAnimation(state.images, state.result);
|
|
213
|
+
* }
|
|
214
|
+
* if (state.status === 'result') {
|
|
215
|
+
* // Show result and wait for user to click continue
|
|
216
|
+
* showResult(state.matched);
|
|
217
|
+
* }
|
|
218
|
+
* });
|
|
219
|
+
*
|
|
220
|
+
* faceMatchManager.load();
|
|
221
|
+
* // When animation completes in your UI:
|
|
222
|
+
* faceMatchManager.animationComplete();
|
|
223
|
+
* // When user clicks continue:
|
|
224
|
+
* faceMatchManager.continue();
|
|
225
|
+
* ```
|
|
226
|
+
*/
|
|
227
|
+
function mapState(snapshot) {
|
|
228
|
+
const typedSnapshot = snapshot;
|
|
229
|
+
const { context } = typedSnapshot;
|
|
230
|
+
if (typedSnapshot.matches("idle")) return { status: "idle" };
|
|
231
|
+
if (typedSnapshot.matches("loading")) return { status: "loading" };
|
|
232
|
+
if (typedSnapshot.matches("animating")) return {
|
|
233
|
+
status: "animating",
|
|
234
|
+
images: context.images,
|
|
235
|
+
result: context.result
|
|
236
|
+
};
|
|
237
|
+
if (typedSnapshot.matches("result")) return {
|
|
238
|
+
status: "result",
|
|
239
|
+
images: context.images,
|
|
240
|
+
result: context.result,
|
|
241
|
+
matched: context.result.matched
|
|
242
|
+
};
|
|
243
|
+
if (typedSnapshot.matches("finished")) return {
|
|
244
|
+
status: "finished",
|
|
245
|
+
matched: context.result?.matched ?? null
|
|
246
|
+
};
|
|
247
|
+
if (typedSnapshot.matches("error")) return {
|
|
248
|
+
status: "error",
|
|
249
|
+
error: context.error ?? "An error occurred"
|
|
250
|
+
};
|
|
251
|
+
return { status: "idle" };
|
|
252
|
+
}
|
|
253
|
+
function createApi({ actor }) {
|
|
254
|
+
return {
|
|
255
|
+
load() {
|
|
256
|
+
actor.send({ type: "LOAD" });
|
|
257
|
+
},
|
|
258
|
+
animationComplete() {
|
|
259
|
+
actor.send({ type: "ANIMATION_COMPLETE" });
|
|
260
|
+
},
|
|
261
|
+
continue() {
|
|
262
|
+
actor.send({ type: "CONTINUE" });
|
|
263
|
+
},
|
|
264
|
+
reset() {
|
|
265
|
+
actor.send({ type: "RESET" });
|
|
266
|
+
}
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Creates a face match manager for headless or UI-driven usage.
|
|
271
|
+
*
|
|
272
|
+
* The manager provides a state machine-based API for face comparison
|
|
273
|
+
* with optional animation display.
|
|
274
|
+
*
|
|
275
|
+
* @param options - Configuration options
|
|
276
|
+
* @param options.config - Face match configuration
|
|
277
|
+
* @param options.config.variant - Which images to compare (default: 'selfieVsId')
|
|
278
|
+
* @param options.config.disableFaceMatchAnimation - Skip animation and auto-complete (default: false)
|
|
279
|
+
*
|
|
280
|
+
* @returns Face match manager with state, API methods, and subscription
|
|
281
|
+
*
|
|
282
|
+
* @example Headless usage
|
|
283
|
+
* ```typescript
|
|
284
|
+
* const manager = createFaceMatchManager({
|
|
285
|
+
* config: { variant: 'selfieVsId', disableFaceMatchAnimation: true },
|
|
286
|
+
* });
|
|
287
|
+
*
|
|
288
|
+
* manager.subscribe((state) => console.log(state.status));
|
|
289
|
+
* manager.load();
|
|
290
|
+
* // Auto-completes when disableFaceMatchAnimation is true
|
|
291
|
+
* manager.stop();
|
|
292
|
+
* ```
|
|
293
|
+
*
|
|
294
|
+
* @example With React/Preact UI hook
|
|
295
|
+
* ```tsx
|
|
296
|
+
* const [state, manager] = useManager(() => createFaceMatchManager({ config }));
|
|
297
|
+
*
|
|
298
|
+
* if (state.status === 'animating') {
|
|
299
|
+
* return <Animation images={state.images} />;
|
|
300
|
+
* }
|
|
301
|
+
* ```
|
|
302
|
+
*/
|
|
303
|
+
function createFaceMatchManager(options) {
|
|
304
|
+
return createManager({
|
|
305
|
+
actor: createFaceMatchActor(options),
|
|
306
|
+
mapState,
|
|
307
|
+
createApi
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
//#endregion
|
|
312
|
+
export { createFaceMatchManager, faceMatchMachine };
|
package/dist/flow.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as AnyStateMachine, n as FlowModule, r as FlowModuleConfig, s as WasmPipeline, t as Flow } from "./types-
|
|
2
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import { a as AnyStateMachine, n as FlowModule, r as FlowModuleConfig, s as WasmPipeline, t as Flow } from "./types-BHcijCvX.js";
|
|
2
|
+
import { t as Manager } from "./Manager-CWwvSZqZ.js";
|
|
3
3
|
|
|
4
4
|
//#region src/modules/flow/flowAnalyzer.d.ts
|
|
5
5
|
|
package/dist/flow.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { E as createManager } from "./src-
|
|
2
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as api } from "./api-
|
|
1
|
+
import { E as createManager } from "./src-B0UBQ8zw.esm.js";
|
|
2
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
3
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/modules/flow/flowAnalyzer.ts
|
|
6
6
|
const WASM_MODULE_PIPELINES = {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-
|
|
2
|
-
import { C as enumerateVideoDevices, E as createManager, F as isSafari, M as isDesktop, N as isIOS, P as isIPhone14OrHigher, S as applyTrackConstraints, T as stopCameraStream, _ as StreamCanvasProcessingSession, c as OpenViduRecordingProvider, d as IpifyProvider, f as FingerprintProvider, g as BrowserEnvironmentProvider, h as BrowserInfoProvider, j as isAndroid, k as getWindowDimensions, m as BrowserStorageProvider, n as DEFAULT_ID_CAPTURE_THRESHOLDS, p as BrowserTimerProvider, t as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as StreamCanvasCapture, w as requestCameraAccess, x as IncodeCanvas } from "./src-
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-
|
|
5
|
-
import { n as isBrowserSimulation } from "./deepsightService-
|
|
6
|
-
import { n as getApi, r as getToken, t as api } from "./api-
|
|
7
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { C as enumerateVideoDevices, E as createManager, F as isSafari, M as isDesktop, N as isIOS, P as isIPhone14OrHigher, S as applyTrackConstraints, T as stopCameraStream, _ as StreamCanvasProcessingSession, c as OpenViduRecordingProvider, d as IpifyProvider, f as FingerprintProvider, g as BrowserEnvironmentProvider, h as BrowserInfoProvider, j as isAndroid, k as getWindowDimensions, m as BrowserStorageProvider, n as DEFAULT_ID_CAPTURE_THRESHOLDS, p as BrowserTimerProvider, t as DEFAULT_ID_CAPTURE_MODEL_VERSION, v as StreamCanvasCapture, w as requestCameraAccess, x as IncodeCanvas } from "./src-B0UBQ8zw.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
4
|
+
import { c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-DhMoimL8.esm.js";
|
|
5
|
+
import { n as isBrowserSimulation } from "./deepsightService-C_AyxXhJ.esm.js";
|
|
6
|
+
import { n as getApi, r as getToken, t as api } from "./api-BkkE6cfa.esm.js";
|
|
7
|
+
import { t as addDeviceStats } from "./stats-CpcCA-Ml.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region ../infra/src/capabilities/ITimerCapability.ts
|
|
10
10
|
function sleep(ms) {
|
|
@@ -1120,7 +1120,7 @@ const checkMotionSensorActor = fromCallback(({ input, sendBack }) => {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
const initializeDeepsightSessionActor = fromPromise(async ({ input }) => {
|
|
1122
1122
|
if (!input.dependencies) return;
|
|
1123
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
1123
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-CHzDt5p2.esm.js");
|
|
1124
1124
|
return loadDeepsightSession({
|
|
1125
1125
|
ds: input.ds,
|
|
1126
1126
|
storage: input.dependencies.storage,
|
package/dist/id.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-
|
|
2
|
-
import { n as PermissionResult, o as CameraStream, r as PermissionStatus } from "./deepsightService-
|
|
3
|
-
import "./types-
|
|
4
|
-
import "./Manager-
|
|
1
|
+
import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-BOpNqAs7.js";
|
|
2
|
+
import { n as PermissionResult, o as CameraStream, r as PermissionStatus } from "./deepsightService-D8qaikEi.js";
|
|
3
|
+
import "./types-BHcijCvX.js";
|
|
4
|
+
import "./Manager-CWwvSZqZ.js";
|
|
5
5
|
export { CameraStream, CaptureIdResponse, CapturedImage, CreateIdCaptureActorOptions, DetectionArea, DetectionOrientation, DetectionStatus, ID_ERROR_CODES, IIdCaptureCapability, IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, IdCaptureMachine, IdCaptureManager, IdCaptureMode, IdCaptureProvider, IdCaptureSettings, IdCaptureState, IdCaptureThresholds, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, PermissionResult, PermissionStatus, RecordingSession, StartRecordingParams, UploadIdImageParams, UploadIdResponse, ValidationError, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
package/dist/id.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./events-
|
|
2
|
-
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
3
|
-
import { i as IdCaptureProvider } from "./src-
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import "./streamingEvents-
|
|
6
|
-
import "./deepsightService-
|
|
7
|
-
import "./api-
|
|
8
|
-
import "./stats-
|
|
1
|
+
import "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { a as processId, c as stopStream, d as ID_ERROR_CODES, i as initializeIdCapture, l as uploadIdImage, n as createIdCaptureActor, o as startRecordingSession, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-B6VREnGU.esm.js";
|
|
3
|
+
import { i as IdCaptureProvider } from "./src-B0UBQ8zw.esm.js";
|
|
4
|
+
import "./endpoints-Q2cBwc8v.esm.js";
|
|
5
|
+
import "./streamingEvents-DhMoimL8.esm.js";
|
|
6
|
+
import "./deepsightService-C_AyxXhJ.esm.js";
|
|
7
|
+
import "./api-BkkE6cfa.esm.js";
|
|
8
|
+
import "./stats-CpcCA-Ml.esm.js";
|
|
9
9
|
|
|
10
10
|
export { ID_ERROR_CODES, IdCaptureProvider, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as StreamCanvasCapture, c as IRecordingCapability, d as IMLProviderCapability, f as MLProviderConfig, i as BaseWasmProvider, l as RecordingConnection, n as PermissionResult, o as CameraStream, p as IncodeCanvas, r as PermissionStatus, s as IStorageCapability, t as DeepsightService, u as IMotionSensorCapability } from "./deepsightService-
|
|
2
|
-
import { a as AnyStateMachine, i as TutorialIdConfig, o as StateMachine, t as Flow } from "./types-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import { a as StreamCanvasCapture, c as IRecordingCapability, d as IMLProviderCapability, f as MLProviderConfig, i as BaseWasmProvider, l as RecordingConnection, n as PermissionResult, o as CameraStream, p as IncodeCanvas, r as PermissionStatus, s as IStorageCapability, t as DeepsightService, u as IMotionSensorCapability } from "./deepsightService-D8qaikEi.js";
|
|
2
|
+
import { a as AnyStateMachine, i as TutorialIdConfig, o as StateMachine, t as Flow } from "./types-BHcijCvX.js";
|
|
3
|
+
import { t as Manager } from "./Manager-CWwvSZqZ.js";
|
|
4
4
|
import { ActorRefFrom } from "xstate";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-
|
|
2
|
-
import { n as PermissionResult, o as CameraStream, r as PermissionStatus } from "./deepsightService-
|
|
3
|
-
import { c as warmupWasm, s as WasmPipeline } from "./types-
|
|
4
|
-
import "./Manager-
|
|
1
|
+
import { A as IdCaptureGeometry, B as IdCaptureProvider, C as DetectionArea, D as IdCaptureContext, E as IdCaptureConfig, F as IdError, H as IIdCaptureCapability, I as IdErrorCode, L as IdFlowStep, M as IdCaptureMode, N as IdCaptureThresholds, O as IdCaptureDependencies, P as IdDocumentType, R as RecordingSession, S as CapturedImage, T as ID_ERROR_CODES, U as IdCaptureSettings, V as DetectionOrientation, _ as IdCaptureActor, a as InitializeIdCaptureParams, b as idCaptureMachine, c as ValidationError, d as startRecordingSession, f as stopRecording, g as CreateIdCaptureActorOptions, h as validateUploadResponse, i as IdCaptureInitResult, j as IdCaptureInput, k as IdCaptureEvent, l as initializeIdCapture, m as uploadIdImage, n as IdCaptureState, o as StartRecordingParams, p as stopStream, r as createIdCaptureManager, s as UploadIdImageParams, t as IdCaptureManager, u as processId, v as createIdCaptureActor, w as DetectionStatus, x as CaptureIdResponse, y as IdCaptureMachine, z as UploadIdResponse } from "./index-BOpNqAs7.js";
|
|
2
|
+
import { n as PermissionResult, o as CameraStream, r as PermissionStatus } from "./deepsightService-D8qaikEi.js";
|
|
3
|
+
import { c as warmupWasm, s as WasmPipeline } from "./types-BHcijCvX.js";
|
|
4
|
+
import "./Manager-CWwvSZqZ.js";
|
|
5
5
|
|
|
6
6
|
//#region ../infra/src/http/types.d.ts
|
|
7
7
|
type CreateApiConfig = {
|
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as videoSelfieEvents, c as screenClosed, d as addEvent, f as flushEventQueue, i as tutorialScreenNamesMapper, l as screenEvent, n as eventModuleNames, o as moduleClosed, p as subscribeEvent, r as eventScreenNames, s as moduleOpened, t as cameraScreenNamesMapper, u as screenOpened } from "./events-
|
|
2
|
-
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-
|
|
3
|
-
import { D as createApi_default, i as IdCaptureProvider, o as warmupWasm, r as WasmUtilProvider } from "./src-
|
|
4
|
-
import "./endpoints-
|
|
5
|
-
import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as requestPermission } from "./streamingEvents-
|
|
6
|
-
import "./deepsightService-
|
|
7
|
-
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-
|
|
8
|
-
import "./stats-
|
|
1
|
+
import { a as videoSelfieEvents, c as screenClosed, d as addEvent, f as flushEventQueue, i as tutorialScreenNamesMapper, l as screenEvent, n as eventModuleNames, o as moduleClosed, p as subscribeEvent, r as eventScreenNames, s as moduleOpened, t as cameraScreenNamesMapper, u as screenOpened } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { _ as createSession, a as processId, c as stopStream, d as ID_ERROR_CODES, f as getDisableIpify, g as resetSessionInit, h as isSessionInitialized, i as initializeIdCapture, l as uploadIdImage, m as initializeSession, n as createIdCaptureActor, o as startRecordingSession, p as getSessionFeatures, r as idCaptureMachine, s as stopRecording, t as createIdCaptureManager, u as validateUploadResponse } from "./id-B6VREnGU.esm.js";
|
|
3
|
+
import { D as createApi_default, i as IdCaptureProvider, o as warmupWasm, r as WasmUtilProvider } from "./src-B0UBQ8zw.esm.js";
|
|
4
|
+
import "./endpoints-Q2cBwc8v.esm.js";
|
|
5
|
+
import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as requestPermission } from "./streamingEvents-DhMoimL8.esm.js";
|
|
6
|
+
import "./deepsightService-C_AyxXhJ.esm.js";
|
|
7
|
+
import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-BkkE6cfa.esm.js";
|
|
8
|
+
import "./stats-CpcCA-Ml.esm.js";
|
|
9
9
|
|
|
10
10
|
//#region src/setup.ts
|
|
11
11
|
let wasmConfig;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-
|
|
2
|
-
import { n as require_jsnlog, t as require_OpenViduLogger } from "./OpenViduLogger-
|
|
1
|
+
import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-CiY78uGR.esm.js";
|
|
2
|
+
import { n as require_jsnlog, t as require_OpenViduLogger } from "./OpenViduLogger-DrE4_cHh.esm.js";
|
|
3
3
|
|
|
4
4
|
//#region ../../node_modules/.pnpm/openvidu-browser@2.32.1/node_modules/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js
|
|
5
5
|
var require_LocalRecorderState = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/openvidu-browser@2.32.1/node_modules/openvidu-browser/lib/OpenViduInternal/Enums/LocalRecorderState.js": ((exports) => {
|
package/dist/phone.d.ts
CHANGED
package/dist/phone.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-
|
|
2
|
-
import { E as createManager, p as BrowserTimerProvider } from "./src-
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { t as api } from "./api-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { E as createManager, p as BrowserTimerProvider } from "./src-B0UBQ8zw.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
4
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
5
5
|
|
|
6
6
|
//#region src/modules/phone/phoneServices.ts
|
|
7
7
|
async function fetchPhone(signal) {
|
package/dist/selfie.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as StreamCanvasCapture, c as IRecordingCapability, d as IMLProviderCapability, f as MLProviderConfig, i as BaseWasmProvider, n as PermissionResult, o as CameraStream, p as IncodeCanvas, r as PermissionStatus, s as IStorageCapability, t as DeepsightService } from "./deepsightService-
|
|
2
|
-
import { a as AnyStateMachine, o as StateMachine, r as FlowModuleConfig, s as WasmPipeline, t as Flow } from "./types-
|
|
3
|
-
import { t as Manager } from "./Manager-
|
|
1
|
+
import { a as StreamCanvasCapture, c as IRecordingCapability, d as IMLProviderCapability, f as MLProviderConfig, i as BaseWasmProvider, n as PermissionResult, o as CameraStream, p as IncodeCanvas, r as PermissionStatus, s as IStorageCapability, t as DeepsightService } from "./deepsightService-D8qaikEi.js";
|
|
2
|
+
import { a as AnyStateMachine, o as StateMachine, r as FlowModuleConfig, s as WasmPipeline, t as Flow } from "./types-BHcijCvX.js";
|
|
3
|
+
import { t as Manager } from "./Manager-CWwvSZqZ.js";
|
|
4
4
|
|
|
5
5
|
//#region ../infra/src/capabilities/IFaceDetectionCapability.d.ts
|
|
6
6
|
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { d as addEvent, n as eventModuleNames } from "./events-
|
|
2
|
-
import { E as createManager, T as stopCameraStream, _ as StreamCanvasProcessingSession, a as FaceDetectionProvider, c as OpenViduRecordingProvider, m as BrowserStorageProvider, r as WasmUtilProvider, u as LocalRecordingProvider, v as StreamCanvasCapture, w as requestCameraAccess } from "./src-
|
|
3
|
-
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-
|
|
4
|
-
import { a as uploadDeepsightVideo, c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-
|
|
5
|
-
import "./deepsightService-
|
|
6
|
-
import { r as getToken, t as api } from "./api-
|
|
7
|
-
import { t as addDeviceStats } from "./stats-
|
|
1
|
+
import { d as addEvent, n as eventModuleNames } from "./events-BN5bIhsN.esm.js";
|
|
2
|
+
import { E as createManager, T as stopCameraStream, _ as StreamCanvasProcessingSession, a as FaceDetectionProvider, c as OpenViduRecordingProvider, m as BrowserStorageProvider, r as WasmUtilProvider, u as LocalRecordingProvider, v as StreamCanvasCapture, w as requestCameraAccess } from "./src-B0UBQ8zw.esm.js";
|
|
3
|
+
import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
4
|
+
import { a as uploadDeepsightVideo, c as getDeviceClass, i as stopRecording$1, n as createRecordingSession, o as checkPermission, r as startRecording, s as requestPermission, t as streamingEvents } from "./streamingEvents-DhMoimL8.esm.js";
|
|
5
|
+
import "./deepsightService-C_AyxXhJ.esm.js";
|
|
6
|
+
import { r as getToken, t as api } from "./api-BkkE6cfa.esm.js";
|
|
7
|
+
import { t as addDeviceStats } from "./stats-CpcCA-Ml.esm.js";
|
|
8
8
|
|
|
9
9
|
//#region src/modules/selfie/types.ts
|
|
10
10
|
const FACE_ERROR_CODES = {
|
|
@@ -373,7 +373,7 @@ function stopRecording(session) {
|
|
|
373
373
|
})();
|
|
374
374
|
}
|
|
375
375
|
async function initializeDeepsightSession(options) {
|
|
376
|
-
const { loadDeepsightSession } = await import("./deepsightLoader-
|
|
376
|
+
const { loadDeepsightSession } = await import("./deepsightLoader-CHzDt5p2.esm.js");
|
|
377
377
|
return loadDeepsightSession({
|
|
378
378
|
ds: options.ds,
|
|
379
379
|
storage: options.storage
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as __toDynamicImportESM } from "./chunk-
|
|
1
|
+
import { a as __toDynamicImportESM } from "./chunk-CiY78uGR.esm.js";
|
|
2
2
|
|
|
3
3
|
//#region ../infra/src/capabilities/platform.ts
|
|
4
4
|
/**
|
|
@@ -4393,13 +4393,13 @@ var MotionSensorProvider = class {
|
|
|
4393
4393
|
//#region ../infra/src/providers/browser/openviduLazy.ts
|
|
4394
4394
|
let openViduImport;
|
|
4395
4395
|
async function enableProdModeBeforeLoad() {
|
|
4396
|
-
const { OpenViduLogger } = await import("./OpenViduLogger-
|
|
4396
|
+
const { OpenViduLogger } = await import("./OpenViduLogger-B6-UWyJe.esm.js").then(__toDynamicImportESM(1));
|
|
4397
4397
|
OpenViduLogger.getInstance().enableProdMode();
|
|
4398
4398
|
}
|
|
4399
4399
|
async function loadOpenVidu() {
|
|
4400
4400
|
if (openViduImport) return openViduImport;
|
|
4401
4401
|
await enableProdModeBeforeLoad();
|
|
4402
|
-
openViduImport = import("./lib-
|
|
4402
|
+
openViduImport = import("./lib-ieMlAKG1.esm.js").then(__toDynamicImportESM(1));
|
|
4403
4403
|
return openViduImport;
|
|
4404
4404
|
}
|
|
4405
4405
|
|
package/dist/stats.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, l as MotionSensorProvider, w as requestCameraAccess, y as queryCameraPermission } from "./src-
|
|
2
|
-
import { t as endpoints } from "./endpoints-
|
|
3
|
-
import { t as api } from "./api-
|
|
1
|
+
import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, l as MotionSensorProvider, w as requestCameraAccess, y as queryCameraPermission } from "./src-B0UBQ8zw.esm.js";
|
|
2
|
+
import { t as endpoints } from "./endpoints-Q2cBwc8v.esm.js";
|
|
3
|
+
import { t as api } from "./api-BkkE6cfa.esm.js";
|
|
4
4
|
|
|
5
5
|
//#region src/internal/device/getBrowser.ts
|
|
6
6
|
function getBrowser() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260206-4cf3405",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.esm.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -29,6 +29,10 @@
|
|
|
29
29
|
"types": "./dist/id.d.ts",
|
|
30
30
|
"import": "./dist/id.esm.js"
|
|
31
31
|
},
|
|
32
|
+
"./face-match": {
|
|
33
|
+
"types": "./dist/face-match.d.ts",
|
|
34
|
+
"import": "./dist/face-match.esm.js"
|
|
35
|
+
},
|
|
32
36
|
"./camera": {
|
|
33
37
|
"types": "./dist/camera.d.ts",
|
|
34
38
|
"import": "./dist/camera.esm.js"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|