@incodetech/core 0.0.0-dev-20260212-7db2d06 → 0.0.0-dev-20260216-4495485

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/{OpenViduLogger-CPED-Apt.esm.js → OpenViduLogger-Bb6eA6r2.esm.js} +1 -1
  2. package/dist/OpenViduLogger-SBQRaB7x.esm.js +3 -0
  3. package/dist/authentication.d.ts +6 -6
  4. package/dist/authentication.esm.js +8 -8
  5. package/dist/curp-validation.d.ts +2 -2
  6. package/dist/curp-validation.esm.js +4 -4
  7. package/dist/{deepsightLoader-ClEe-KdI.esm.js → deepsightLoader-B4IkXWbZ.esm.js} +4 -4
  8. package/dist/{deepsightService-DY1w5Amz.esm.js → deepsightService-B_mt2btN.esm.js} +3 -3
  9. package/dist/{deepsightService-X02Vowli.d.ts → deepsightService-DQAQJ3oJ.d.ts} +2 -2
  10. package/dist/email.d.ts +1 -1
  11. package/dist/email.esm.js +4 -4
  12. package/dist/{endpoints-DxmUJ8rX.esm.js → endpoints-D8PkEWyi.esm.js} +1 -0
  13. package/dist/{events-CuIAKgDr.esm.js → events-DaWYPjV7.esm.js} +2 -2
  14. package/dist/face-match.d.ts +1 -1
  15. package/dist/face-match.esm.js +4 -4
  16. package/dist/{faceCaptureManagerFactory-CNQN7doV.d.ts → faceCaptureManagerFactory-1c0Ah2Vw.d.ts} +4 -4
  17. package/dist/{faceCaptureSetup-iJblI_NP.esm.js → faceCaptureSetup-D7eXNsxo.esm.js} +7 -7
  18. package/dist/flow.d.ts +3 -3
  19. package/dist/flow.esm.js +7 -4
  20. package/dist/governmentValidation.d.ts +66 -0
  21. package/dist/governmentValidation.esm.js +339 -0
  22. package/dist/{id-BbXYE__Q.esm.js → id-CDDijEMo.esm.js} +8 -8
  23. package/dist/id.d.ts +7 -7
  24. package/dist/id.esm.js +8 -8
  25. package/dist/{index-B4Ei_1T2.d.ts → index-o9XK4ywM.d.ts} +6 -6
  26. package/dist/index.d.ts +7 -7
  27. package/dist/index.esm.js +8 -8
  28. package/dist/{lib-DkCxYA3C.esm.js → lib-Czux-snZ.esm.js} +2 -2
  29. package/dist/phone.d.ts +1 -1
  30. package/dist/phone.esm.js +4 -4
  31. package/dist/selfie.d.ts +6 -6
  32. package/dist/selfie.esm.js +8 -8
  33. package/dist/{src-CGwA8Bgy.esm.js → src-BfSGepfs.esm.js} +3 -3
  34. package/dist/{stats-ftyC31aH.esm.js → stats-Bv2CLzQ0.esm.js} +1 -1
  35. package/dist/stats.esm.js +2 -2
  36. package/dist/{streamingEvents-IkhAllE0.esm.js → streamingEvents-DenKMpAy.esm.js} +3 -3
  37. package/package.json +5 -1
  38. package/dist/OpenViduLogger-Bz7LPAnM.esm.js +0 -3
  39. /package/dist/{Actor-DVQMXFy4.d.ts → Actor-slOFXjCJ.d.ts} +0 -0
  40. /package/dist/{Manager-DfrNSCCo.d.ts → Manager-C647XkuZ.d.ts} +0 -0
  41. /package/dist/{StateMachine-BTwgcH8g.d.ts → StateMachine-UXl65oQ4.d.ts} +0 -0
  42. /package/dist/{api-DlSxxyGw.esm.js → api-CmRbOLxk.esm.js} +0 -0
  43. /package/dist/{chunk-CzJBZnft.esm.js → chunk-BYFjCiHC.esm.js} +0 -0
  44. /package/dist/{types-c0XgGLsM.d.ts → types-9w6h_a6Y.d.ts} +0 -0
  45. /package/dist/{types-DGhQYTse.d.ts → types-Bt1L3nIZ.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import { t as __commonJS } from "./chunk-CzJBZnft.esm.js";
1
+ import { t as __commonJS } from "./chunk-BYFjCiHC.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) => {
@@ -0,0 +1,3 @@
1
+ import { t as require_OpenViduLogger } from "./OpenViduLogger-Bb6eA6r2.esm.js";
2
+
3
+ export default require_OpenViduLogger();
@@ -1,9 +1,9 @@
1
- import "./types-DGhQYTse.js";
2
- import { t as AnyStateMachine } from "./StateMachine-BTwgcH8g.js";
3
- import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CNQN7doV.js";
4
- import { t as Manager } from "./Manager-DfrNSCCo.js";
5
- import { t as ActorRefFrom } from "./Actor-DVQMXFy4.js";
6
- import { r as FlowModuleConfig } from "./types-c0XgGLsM.js";
1
+ import "./types-Bt1L3nIZ.js";
2
+ import { t as AnyStateMachine } from "./StateMachine-UXl65oQ4.js";
3
+ import { a as FaceCaptureDependencies, n as FaceCaptureManagerState, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-1c0Ah2Vw.js";
4
+ import { t as Manager } from "./Manager-C647XkuZ.js";
5
+ import { t as ActorRefFrom } from "./Actor-slOFXjCJ.js";
6
+ import { r as FlowModuleConfig } from "./types-9w6h_a6Y.js";
7
7
 
8
8
  //#region src/modules/authentication/authenticationStateMachine.d.ts
9
9
  declare const _authenticationMachine: AnyStateMachine;
@@ -1,11 +1,11 @@
1
- import { d as addEvent, n as eventModuleNames } from "./events-CuIAKgDr.esm.js";
2
- import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
4
- import { c as getDeviceClass } from "./streamingEvents-IkhAllE0.esm.js";
5
- import "./deepsightService-DY1w5Amz.esm.js";
6
- import { t as api } from "./api-DlSxxyGw.esm.js";
7
- import "./stats-ftyC31aH.esm.js";
8
- import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-iJblI_NP.esm.js";
1
+ import { d as addEvent, n as eventModuleNames } from "./events-DaWYPjV7.esm.js";
2
+ import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
4
+ import { c as getDeviceClass } from "./streamingEvents-DenKMpAy.esm.js";
5
+ import "./deepsightService-B_mt2btN.esm.js";
6
+ import { t as api } from "./api-CmRbOLxk.esm.js";
7
+ import "./stats-Bv2CLzQ0.esm.js";
8
+ import { a as FACE_ERROR_CODES, n as faceCaptureMachine, o as createFaceCaptureManager, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-D7eXNsxo.esm.js";
9
9
 
10
10
  //#region src/modules/authentication/authenticationErrorUtils.ts
11
11
  const AUTH_ERROR_MAP = {
@@ -1,5 +1,5 @@
1
- import { t as Manager } from "./Manager-DfrNSCCo.js";
2
- import { r as FlowModuleConfig } from "./types-c0XgGLsM.js";
1
+ import { t as Manager } from "./Manager-C647XkuZ.js";
2
+ import { r as FlowModuleConfig } from "./types-9w6h_a6Y.js";
3
3
 
4
4
  //#region src/modules/curp-validation/types.d.ts
5
5
  type CurpValidationConfig = FlowModuleConfig['CURP_VALIDATION'] & {
@@ -1,7 +1,7 @@
1
- import { n as eventModuleNames, r as eventScreenNames, u as screenOpened } from "./events-CuIAKgDr.esm.js";
2
- import { E as createManager } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
4
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { n as eventModuleNames, r as eventScreenNames, u as screenOpened } from "./events-DaWYPjV7.esm.js";
2
+ import { E as createManager } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
4
+ import { t as api } from "./api-CmRbOLxk.esm.js";
5
5
 
6
6
  //#region src/modules/curp-validation/curpValidationUtils.ts
7
7
  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,7 +1,7 @@
1
- import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-CGwA8Bgy.esm.js";
2
- import { t as createDeepsightService } from "./deepsightService-DY1w5Amz.esm.js";
3
- import "./api-DlSxxyGw.esm.js";
4
- import "./stats-ftyC31aH.esm.js";
1
+ import { g as BrowserEnvironmentProvider, l as MotionSensorProvider, r as WasmUtilProvider, s as VisibilityProvider } from "./src-BfSGepfs.esm.js";
2
+ import { t as createDeepsightService } from "./deepsightService-B_mt2btN.esm.js";
3
+ import "./api-CmRbOLxk.esm.js";
4
+ import "./stats-Bv2CLzQ0.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-CGwA8Bgy.esm.js";
2
- import { t as api } from "./api-DlSxxyGw.esm.js";
3
- import { t as addDeviceStats } from "./stats-ftyC31aH.esm.js";
1
+ import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, b as createHiddenVideoElement, w as requestCameraAccess, x as IncodeCanvas } from "./src-BfSGepfs.esm.js";
2
+ import { t as api } from "./api-CmRbOLxk.esm.js";
3
+ import { t as addDeviceStats } from "./stats-Bv2CLzQ0.esm.js";
4
4
 
5
5
  //#region src/internal/device/browserSimulation.ts
6
6
  const AUTOMATION_MARKERS = {
@@ -1,5 +1,5 @@
1
- import { r as CameraStream } from "./types-DGhQYTse.js";
2
- import { r as WasmPipeline } from "./StateMachine-BTwgcH8g.js";
1
+ import { r as CameraStream } from "./types-Bt1L3nIZ.js";
2
+ import { r as WasmPipeline } from "./StateMachine-UXl65oQ4.js";
3
3
 
4
4
  //#region ../infra/src/media/canvas.d.ts
5
5
  /**
package/dist/email.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as Manager } from "./Manager-DfrNSCCo.js";
1
+ import { t as Manager } from "./Manager-C647XkuZ.js";
2
2
 
3
3
  //#region src/modules/email/types.d.ts
4
4
 
package/dist/email.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-CuIAKgDr.esm.js";
2
- import { E as createManager, p as BrowserTimerProvider } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
4
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-DaWYPjV7.esm.js";
2
+ import { E as createManager, p as BrowserTimerProvider } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
4
+ import { t as api } from "./api-CmRbOLxk.esm.js";
5
5
 
6
6
  //#region src/modules/email/emailServices.ts
7
7
  async function fetchEmail(signal) {
@@ -3286,6 +3286,7 @@ const endpoints = {
3286
3286
  processId: "/omni/process/id",
3287
3287
  processSecondId: "/omni/process/second-id",
3288
3288
  processFace: "/omni/process/face",
3289
+ governmentValidation: "/omni/process/government-validation",
3289
3290
  deviceStats: "/omni/device/stats",
3290
3291
  featureConfig: "/omni/feature-config",
3291
3292
  deviceFingerprint: "/omni/add/device-fingerprint",
@@ -1,5 +1,5 @@
1
- import { t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
2
- import { i as isApiConfigured, r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
2
+ import { i as isApiConfigured, r as getToken, t as api } from "./api-CmRbOLxk.esm.js";
3
3
 
4
4
  //#region ../infra/src/capabilities/IBrowserEnvironmentCapability.ts
5
5
  function getTimestamp() {
@@ -1,4 +1,4 @@
1
- import { t as Manager } from "./Manager-DfrNSCCo.js";
1
+ import { t as Manager } from "./Manager-C647XkuZ.js";
2
2
 
3
3
  //#region src/modules/face-match/types.d.ts
4
4
 
@@ -1,7 +1,7 @@
1
- import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-CuIAKgDr.esm.js";
2
- import { E as createManager } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
4
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-DaWYPjV7.esm.js";
2
+ import { E as createManager } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
4
+ import { t as api } from "./api-CmRbOLxk.esm.js";
5
5
 
6
6
  //#region src/modules/face-match/faceMatchServices.ts
7
7
  /**
@@ -1,7 +1,7 @@
1
- import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-DGhQYTse.js";
2
- import { r as WasmPipeline } from "./StateMachine-BTwgcH8g.js";
3
- import { t as Manager } from "./Manager-DfrNSCCo.js";
4
- import { t as Flow } from "./types-c0XgGLsM.js";
1
+ import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, r as CameraStream } from "./types-Bt1L3nIZ.js";
2
+ import { r as WasmPipeline } from "./StateMachine-UXl65oQ4.js";
3
+ import { t as Manager } from "./Manager-C647XkuZ.js";
4
+ import { t as Flow } from "./types-9w6h_a6Y.js";
5
5
 
6
6
  //#region ../infra/src/capabilities/IWasmUtilCapability.d.ts
7
7
  type WasmUtilConfig = MLProviderConfig & {
@@ -1,9 +1,9 @@
1
- import { d as addEvent, n as eventModuleNames } from "./events-CuIAKgDr.esm.js";
2
- import { E as createManager, T as stopCameraStream, _ as StreamCanvasProcessingSession, a as FaceDetectionProvider, c as OpenViduRecordingProvider, u as LocalRecordingProvider, v as StreamCanvasCapture, w as requestCameraAccess } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, i as fromCallback, n as setup, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.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-IkhAllE0.esm.js";
5
- import { r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
6
- import { t as addDeviceStats } from "./stats-ftyC31aH.esm.js";
1
+ import { d as addEvent, n as eventModuleNames } from "./events-DaWYPjV7.esm.js";
2
+ import { E as createManager, T as stopCameraStream, _ as StreamCanvasProcessingSession, a as FaceDetectionProvider, c as OpenViduRecordingProvider, u as LocalRecordingProvider, v as StreamCanvasCapture, w as requestCameraAccess } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, i as fromCallback, n as setup, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.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-DenKMpAy.esm.js";
5
+ import { r as getToken, t as api } from "./api-CmRbOLxk.esm.js";
6
+ import { t as addDeviceStats } from "./stats-Bv2CLzQ0.esm.js";
7
7
 
8
8
  //#region src/internal/faceCapture/faceCaptureManagerFactory.ts
9
9
  function getPermissionStatus(snapshot) {
@@ -444,7 +444,7 @@ function stopRecording(session) {
444
444
  })();
445
445
  }
446
446
  async function initializeDeepsightSession(options) {
447
- const { loadDeepsightSession } = await import("./deepsightLoader-ClEe-KdI.esm.js");
447
+ const { loadDeepsightSession } = await import("./deepsightLoader-B4IkXWbZ.esm.js");
448
448
  return loadDeepsightSession({
449
449
  ds: options.ds,
450
450
  storage: options.storage
package/dist/flow.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { r as WasmPipeline, t as AnyStateMachine } from "./StateMachine-BTwgcH8g.js";
2
- import { t as Manager } from "./Manager-DfrNSCCo.js";
3
- import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-c0XgGLsM.js";
1
+ import { r as WasmPipeline, t as AnyStateMachine } from "./StateMachine-UXl65oQ4.js";
2
+ import { t as Manager } from "./Manager-C647XkuZ.js";
3
+ import { n as FlowModule, r as FlowModuleConfig, t as Flow } from "./types-9w6h_a6Y.js";
4
4
 
5
5
  //#region src/modules/flow/flowAnalyzer.d.ts
6
6
 
package/dist/flow.esm.js CHANGED
@@ -1,6 +1,6 @@
1
- import { E as createManager } from "./src-CGwA8Bgy.esm.js";
2
- import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
3
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { E as createManager } from "./src-BfSGepfs.esm.js";
2
+ import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
3
+ import { t as api } from "./api-CmRbOLxk.esm.js";
4
4
 
5
5
  //#region src/modules/flow/flowAnalyzer.ts
6
6
  const WASM_MODULE_PIPELINES = {
@@ -451,7 +451,10 @@ const orchestratedFlowMachine = setup({
451
451
  actions: "setFlowData"
452
452
  }, {
453
453
  target: "error",
454
- actions: assign({ error: () => "No registered module found for flow" })
454
+ actions: assign({ error: ({ event }) => {
455
+ const firstModuleKey = event.output.flowModules?.[0]?.key;
456
+ return firstModuleKey ? `No registered module found for: ${firstModuleKey}` : "No registered module found: flow has no modules";
457
+ } })
455
458
  }],
456
459
  onError: {
457
460
  target: "error",
@@ -0,0 +1,66 @@
1
+ import { t as Manager } from "./Manager-C647XkuZ.js";
2
+
3
+ //#region src/modules/governmentValidation/types.d.ts
4
+ type GovernmentValidationConfig = {
5
+ validationCountries: string[];
6
+ facialValidation: boolean;
7
+ dataValidation: boolean;
8
+ faceAndDataValidation: boolean;
9
+ addressValidation: boolean;
10
+ backgroundExecution: boolean;
11
+ faceMatchOverrideDataScore: boolean;
12
+ useCroppedIdFacePhoto: boolean;
13
+ maxOtpAttempts?: number;
14
+ };
15
+ //#endregion
16
+ //#region src/modules/governmentValidation/governmentValidationStateMachine.d.ts
17
+
18
+ declare const governmentValidationMachine: any;
19
+ //#endregion
20
+ //#region src/modules/governmentValidation/governmentValidationActor.d.ts
21
+ type CreateGovernmentValidationActorOptions = {
22
+ config: GovernmentValidationConfig;
23
+ };
24
+ //#endregion
25
+ //#region src/modules/governmentValidation/governmentValidationManager.d.ts
26
+ type GovernmentValidationIdleState = {
27
+ status: 'idle';
28
+ };
29
+ type GovernmentValidationLoadingState = {
30
+ status: 'loading';
31
+ };
32
+ type GovernmentValidationProcessingState = {
33
+ status: 'processing';
34
+ };
35
+ type GovernmentValidationAwaitingOtpState = {
36
+ status: 'awaitingOtp';
37
+ resendTimer: number;
38
+ canResend: boolean;
39
+ attemptsRemaining: number;
40
+ otpError?: string;
41
+ };
42
+ type GovernmentValidationVerifyingOtpState = {
43
+ status: 'verifyingOtp';
44
+ };
45
+ type GovernmentValidationFinishedState = {
46
+ status: 'finished';
47
+ };
48
+ type GovernmentValidationErrorState = {
49
+ status: 'error';
50
+ error: string;
51
+ };
52
+ type GovernmentValidationUnknownState = {
53
+ status: 'unknown';
54
+ error: string;
55
+ };
56
+ type GovernmentValidationState = GovernmentValidationIdleState | GovernmentValidationLoadingState | GovernmentValidationProcessingState | GovernmentValidationAwaitingOtpState | GovernmentValidationVerifyingOtpState | GovernmentValidationFinishedState | GovernmentValidationErrorState | GovernmentValidationUnknownState;
57
+ declare function createGovernmentValidationManager(options: CreateGovernmentValidationActorOptions): Manager<GovernmentValidationState> & {
58
+ load(): void;
59
+ setOtpCode(code: string): void;
60
+ submitOtp(code: string): void;
61
+ resendOtp(): void;
62
+ retry(): void;
63
+ };
64
+ type GovernmentValidationManager = ReturnType<typeof createGovernmentValidationManager>;
65
+ //#endregion
66
+ export { type GovernmentValidationConfig, type GovernmentValidationManager, type GovernmentValidationState, createGovernmentValidationManager, governmentValidationMachine };
@@ -0,0 +1,339 @@
1
+ import { E as createManager, p as BrowserTimerProvider } from "./src-BfSGepfs.esm.js";
2
+ import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
3
+ import { t as api } from "./api-CmRbOLxk.esm.js";
4
+
5
+ //#region src/modules/governmentValidation/governmentValidationServices.ts
6
+ async function processGovernmentValidation(signal) {
7
+ const res = await api.post(endpoints.governmentValidation, {}, { signal });
8
+ if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} failed: ${res.status} ${res.statusText}`);
9
+ return res.data;
10
+ }
11
+ async function submitGovernmentValidationOtp(params, signal) {
12
+ const res = await api.post(endpoints.governmentValidation, { otpCode: params.code }, { signal });
13
+ if (!res.ok) throw new Error(`POST ${endpoints.governmentValidation} (OTP) failed: ${res.status} ${res.statusText}`);
14
+ return res.data;
15
+ }
16
+
17
+ //#endregion
18
+ //#region src/modules/governmentValidation/governmentValidationStateMachine.ts
19
+ const RESEND_TIMER_SECONDS = 30;
20
+ const POLL_INTERVAL_MS = 2e3;
21
+ const MAX_POLL_COUNT = 60;
22
+ const AUTO_PROCEED_DELAY_MS = 3e3;
23
+ const governmentValidationMachine = setup({
24
+ types: {
25
+ context: {},
26
+ events: {},
27
+ input: {}
28
+ },
29
+ delays: { AUTO_PROCEED: AUTO_PROCEED_DELAY_MS },
30
+ actors: {
31
+ processValidation: fromPromise(async ({ signal }) => {
32
+ return processGovernmentValidation(signal);
33
+ }),
34
+ submitOtp: fromPromise(async ({ input, signal }) => {
35
+ return submitGovernmentValidationOtp({ code: input.code }, signal);
36
+ }),
37
+ pollingTimer: fromCallback(({ sendBack }) => {
38
+ const timer = BrowserTimerProvider.getInstance();
39
+ const interval = timer.setInterval(() => {
40
+ sendBack({ type: "POLL" });
41
+ }, POLL_INTERVAL_MS);
42
+ return () => timer.clearInterval(interval);
43
+ }),
44
+ resendTimer: fromCallback(({ sendBack }) => {
45
+ const timer = BrowserTimerProvider.getInstance();
46
+ let seconds = RESEND_TIMER_SECONDS;
47
+ const interval = timer.setInterval(() => {
48
+ seconds -= 1;
49
+ sendBack({ type: "TICK" });
50
+ if (seconds <= 0) timer.clearInterval(interval);
51
+ }, 1e3);
52
+ return () => timer.clearInterval(interval);
53
+ })
54
+ },
55
+ actions: {
56
+ setError: assign(({ event }) => ({ error: String(event.error) })),
57
+ setErrorFromResponse: assign({ error: () => "Government validation failed" }),
58
+ setUnknownError: assign({ error: () => "Unknown validation status" }),
59
+ clearError: assign({ error: () => void 0 }),
60
+ setOtpCode: assign(({ event }) => ({
61
+ otpCode: event.code,
62
+ otpError: void 0
63
+ })),
64
+ setOtpError: assign(({ context }) => ({
65
+ otpError: "Invalid OTP code",
66
+ attemptsRemaining: context.attemptsRemaining - 1
67
+ })),
68
+ clearOtpError: assign({
69
+ otpError: () => void 0,
70
+ otpCode: () => ""
71
+ }),
72
+ startResendTimer: assign({
73
+ resendTimer: () => RESEND_TIMER_SECONDS,
74
+ resendTimerActive: () => true
75
+ }),
76
+ tickResendTimer: assign(({ context }) => {
77
+ const newTimer = Math.max(0, context.resendTimer - 1);
78
+ return {
79
+ resendTimer: newTimer,
80
+ resendTimerActive: newTimer > 0
81
+ };
82
+ }),
83
+ incrementPollCount: assign(({ context }) => ({ pollCount: context.pollCount + 1 })),
84
+ resetPollCount: assign({ pollCount: () => 0 }),
85
+ resetContext: assign(({ context }) => ({
86
+ config: context.config,
87
+ error: void 0,
88
+ otpCode: "",
89
+ otpError: void 0,
90
+ attemptsRemaining: context.config.maxOtpAttempts ?? 3,
91
+ resendTimer: 0,
92
+ resendTimerActive: false,
93
+ pollCount: 0
94
+ }))
95
+ },
96
+ guards: {
97
+ isProcessing: (_, params) => params.response.statusCode === -1,
98
+ isSuccess: (_, params) => params.response.statusCode === 0 && params.response.validationStatus?.status !== "UNKNOWN",
99
+ isError: (_, params) => params.response.statusCode > 0,
100
+ isOtpRequested: (_, params) => params.response.otpResponse?.authBridge?.otpCodeRequested === true,
101
+ isUnknown: (_, params) => params.response.validationStatus?.status === "UNKNOWN",
102
+ hasAttemptsRemaining: ({ context }) => context.attemptsRemaining > 0,
103
+ canResend: ({ context }) => !context.resendTimerActive,
104
+ hasReachedMaxPolls: ({ context }) => context.pollCount >= MAX_POLL_COUNT
105
+ }
106
+ }).createMachine({
107
+ id: "governmentValidation",
108
+ initial: "idle",
109
+ context: ({ input }) => ({
110
+ config: input.config,
111
+ error: void 0,
112
+ otpCode: "",
113
+ otpError: void 0,
114
+ attemptsRemaining: input.config.maxOtpAttempts ?? 3,
115
+ resendTimer: 0,
116
+ resendTimerActive: false,
117
+ pollCount: 0
118
+ }),
119
+ states: {
120
+ idle: { on: { LOAD: { target: "loading" } } },
121
+ loading: { invoke: {
122
+ id: "processValidation",
123
+ src: "processValidation",
124
+ onDone: [
125
+ {
126
+ target: "awaitingOtp",
127
+ guard: {
128
+ type: "isOtpRequested",
129
+ params: ({ event }) => ({ response: event.output })
130
+ }
131
+ },
132
+ {
133
+ target: "displaySuccess",
134
+ guard: {
135
+ type: "isSuccess",
136
+ params: ({ event }) => ({ response: event.output })
137
+ }
138
+ },
139
+ {
140
+ target: "polling",
141
+ guard: {
142
+ type: "isProcessing",
143
+ params: ({ event }) => ({ response: event.output })
144
+ }
145
+ },
146
+ {
147
+ target: "displayUnknown",
148
+ guard: {
149
+ type: "isUnknown",
150
+ params: ({ event }) => ({ response: event.output })
151
+ },
152
+ actions: "setUnknownError"
153
+ },
154
+ {
155
+ target: "displayError",
156
+ actions: "setErrorFromResponse"
157
+ }
158
+ ],
159
+ onError: {
160
+ target: "displayError",
161
+ actions: "setError"
162
+ }
163
+ } },
164
+ polling: {
165
+ invoke: {
166
+ id: "pollingTimer",
167
+ src: "pollingTimer"
168
+ },
169
+ on: { POLL: [{
170
+ target: "displayError",
171
+ guard: "hasReachedMaxPolls",
172
+ actions: assign({ error: () => "Validation timed out" })
173
+ }, {
174
+ target: "pollingRequest",
175
+ actions: "incrementPollCount"
176
+ }] }
177
+ },
178
+ pollingRequest: { invoke: {
179
+ id: "pollValidation",
180
+ src: "processValidation",
181
+ onDone: [
182
+ {
183
+ target: "displaySuccess",
184
+ guard: {
185
+ type: "isSuccess",
186
+ params: ({ event }) => ({ response: event.output })
187
+ }
188
+ },
189
+ {
190
+ target: "polling",
191
+ guard: {
192
+ type: "isProcessing",
193
+ params: ({ event }) => ({ response: event.output })
194
+ }
195
+ },
196
+ {
197
+ target: "displayUnknown",
198
+ guard: {
199
+ type: "isUnknown",
200
+ params: ({ event }) => ({ response: event.output })
201
+ },
202
+ actions: "setUnknownError"
203
+ },
204
+ {
205
+ target: "displayError",
206
+ actions: "setErrorFromResponse"
207
+ }
208
+ ],
209
+ onError: {
210
+ target: "displayError",
211
+ actions: "setError"
212
+ }
213
+ } },
214
+ awaitingOtp: {
215
+ entry: "startResendTimer",
216
+ invoke: {
217
+ id: "resendTimer",
218
+ src: "resendTimer"
219
+ },
220
+ on: {
221
+ TICK: { actions: "tickResendTimer" },
222
+ OTP_CHANGED: { actions: "setOtpCode" },
223
+ SUBMIT_OTP: { target: "verifyingOtp" },
224
+ RESEND_OTP: {
225
+ target: "loading",
226
+ guard: "canResend"
227
+ }
228
+ }
229
+ },
230
+ verifyingOtp: { invoke: {
231
+ id: "submitOtp",
232
+ src: "submitOtp",
233
+ input: ({ context }) => ({ code: context.otpCode }),
234
+ onDone: [
235
+ {
236
+ target: "displaySuccess",
237
+ guard: {
238
+ type: "isSuccess",
239
+ params: ({ event }) => ({ response: event.output })
240
+ }
241
+ },
242
+ {
243
+ target: "awaitingOtp",
244
+ guard: "hasAttemptsRemaining",
245
+ actions: "setOtpError"
246
+ },
247
+ {
248
+ target: "displayError",
249
+ actions: assign({ error: () => "Maximum OTP attempts exceeded" })
250
+ }
251
+ ],
252
+ onError: [{
253
+ target: "awaitingOtp",
254
+ guard: "hasAttemptsRemaining",
255
+ actions: "setOtpError"
256
+ }, {
257
+ target: "displayError",
258
+ actions: "setError"
259
+ }]
260
+ } },
261
+ displaySuccess: { after: { AUTO_PROCEED: { target: "finished" } } },
262
+ displayProcessing: { after: { AUTO_PROCEED: { target: "finished" } } },
263
+ displayError: { after: { AUTO_PROCEED: { target: "finished" } } },
264
+ displayUnknown: { after: { AUTO_PROCEED: { target: "finished" } } },
265
+ finished: { type: "final" }
266
+ }
267
+ });
268
+
269
+ //#endregion
270
+ //#region src/modules/governmentValidation/governmentValidationActor.ts
271
+ function createGovernmentValidationActor(options) {
272
+ return createActor(governmentValidationMachine, { input: { config: options.config } }).start();
273
+ }
274
+
275
+ //#endregion
276
+ //#region src/modules/governmentValidation/governmentValidationManager.ts
277
+ function mapState(snapshot) {
278
+ const typedSnapshot = snapshot;
279
+ const { context } = typedSnapshot;
280
+ if (typedSnapshot.matches("idle")) return { status: "idle" };
281
+ if (typedSnapshot.matches("loading")) return { status: "loading" };
282
+ if (typedSnapshot.matches("polling") || typedSnapshot.matches("pollingRequest")) return { status: "processing" };
283
+ if (typedSnapshot.matches("awaitingOtp")) return {
284
+ status: "awaitingOtp",
285
+ resendTimer: context.resendTimer,
286
+ canResend: !context.resendTimerActive,
287
+ attemptsRemaining: context.attemptsRemaining,
288
+ otpError: context.otpError
289
+ };
290
+ if (typedSnapshot.matches("verifyingOtp")) return { status: "verifyingOtp" };
291
+ if (typedSnapshot.matches("displaySuccess")) return { status: "finished" };
292
+ if (typedSnapshot.matches("displayProcessing")) return { status: "processing" };
293
+ if (typedSnapshot.matches("finished")) return { status: "finished" };
294
+ if (typedSnapshot.matches("displayError")) return {
295
+ status: "error",
296
+ error: context.error ?? "An error occurred"
297
+ };
298
+ if (typedSnapshot.matches("displayUnknown")) return {
299
+ status: "unknown",
300
+ error: context.error ?? "Unknown validation status"
301
+ };
302
+ return { status: "idle" };
303
+ }
304
+ function createApi({ actor }) {
305
+ return {
306
+ load() {
307
+ actor.send({ type: "LOAD" });
308
+ },
309
+ setOtpCode(code) {
310
+ actor.send({
311
+ type: "OTP_CHANGED",
312
+ code
313
+ });
314
+ },
315
+ submitOtp(code) {
316
+ actor.send({
317
+ type: "OTP_CHANGED",
318
+ code
319
+ });
320
+ actor.send({ type: "SUBMIT_OTP" });
321
+ },
322
+ resendOtp() {
323
+ actor.send({ type: "RESEND_OTP" });
324
+ },
325
+ retry() {
326
+ actor.send({ type: "RETRY" });
327
+ }
328
+ };
329
+ }
330
+ function createGovernmentValidationManager(options) {
331
+ return createManager({
332
+ actor: createGovernmentValidationActor(options),
333
+ mapState,
334
+ createApi
335
+ });
336
+ }
337
+
338
+ //#endregion
339
+ export { createGovernmentValidationManager, governmentValidationMachine };
@@ -1,10 +1,10 @@
1
- import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-CuIAKgDr.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-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.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-IkhAllE0.esm.js";
5
- import { n as isBrowserSimulation } from "./deepsightService-DY1w5Amz.esm.js";
6
- import { n as getApi, r as getToken, t as api } from "./api-DlSxxyGw.esm.js";
7
- import { t as addDeviceStats } from "./stats-ftyC31aH.esm.js";
1
+ import { d as addEvent, m as revokeObjectURL, n as eventModuleNames } from "./events-DaWYPjV7.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-BfSGepfs.esm.js";
3
+ import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.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-DenKMpAy.esm.js";
5
+ import { n as isBrowserSimulation } from "./deepsightService-B_mt2btN.esm.js";
6
+ import { n as getApi, r as getToken, t as api } from "./api-CmRbOLxk.esm.js";
7
+ import { t as addDeviceStats } from "./stats-Bv2CLzQ0.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-ClEe-KdI.esm.js");
1123
+ const { loadDeepsightSession } = await import("./deepsightLoader-B4IkXWbZ.esm.js");
1124
1124
  return loadDeepsightSession({
1125
1125
  ds: input.ds,
1126
1126
  storage: input.dependencies.storage,
package/dist/id.d.ts CHANGED
@@ -1,8 +1,8 @@
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-B4Ei_1T2.js";
2
- import "./deepsightService-X02Vowli.js";
3
- import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-DGhQYTse.js";
4
- import "./StateMachine-BTwgcH8g.js";
5
- import "./Manager-DfrNSCCo.js";
6
- import "./Actor-DVQMXFy4.js";
7
- import "./types-c0XgGLsM.js";
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-o9XK4ywM.js";
2
+ import "./deepsightService-DQAQJ3oJ.js";
3
+ import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-Bt1L3nIZ.js";
4
+ import "./StateMachine-UXl65oQ4.js";
5
+ import "./Manager-C647XkuZ.js";
6
+ import "./Actor-slOFXjCJ.js";
7
+ import "./types-9w6h_a6Y.js";
8
8
  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-CuIAKgDr.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-BbXYE__Q.esm.js";
3
- import { i as IdCaptureProvider } from "./src-CGwA8Bgy.esm.js";
4
- import "./endpoints-DxmUJ8rX.esm.js";
5
- import "./streamingEvents-IkhAllE0.esm.js";
6
- import "./deepsightService-DY1w5Amz.esm.js";
7
- import "./api-DlSxxyGw.esm.js";
8
- import "./stats-ftyC31aH.esm.js";
1
+ import "./events-DaWYPjV7.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-CDDijEMo.esm.js";
3
+ import { i as IdCaptureProvider } from "./src-BfSGepfs.esm.js";
4
+ import "./endpoints-D8PkEWyi.esm.js";
5
+ import "./streamingEvents-DenKMpAy.esm.js";
6
+ import "./deepsightService-B_mt2btN.esm.js";
7
+ import "./api-CmRbOLxk.esm.js";
8
+ import "./stats-Bv2CLzQ0.esm.js";
9
9
 
10
10
  export { ID_ERROR_CODES, IdCaptureProvider, createIdCaptureActor, createIdCaptureManager, idCaptureMachine, initializeIdCapture, processId, startRecordingSession, stopRecording, stopStream, uploadIdImage, validateUploadResponse };
@@ -1,9 +1,9 @@
1
- import { a as IncodeCanvas, i as IMotionSensorCapability, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-X02Vowli.js";
2
- import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, o as RecordingConnection, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-DGhQYTse.js";
3
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BTwgcH8g.js";
4
- import { t as Manager } from "./Manager-DfrNSCCo.js";
5
- import { t as ActorRefFrom } from "./Actor-DVQMXFy4.js";
6
- import { i as TutorialIdConfig, t as Flow } from "./types-c0XgGLsM.js";
1
+ import { a as IncodeCanvas, i as IMotionSensorCapability, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-DQAQJ3oJ.js";
2
+ import { a as IRecordingCapability, c as MLProviderConfig, i as IStorageCapability, n as PermissionStatus, o as RecordingConnection, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-Bt1L3nIZ.js";
3
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-UXl65oQ4.js";
4
+ import { t as Manager } from "./Manager-C647XkuZ.js";
5
+ import { t as ActorRefFrom } from "./Actor-slOFXjCJ.js";
6
+ import { i as TutorialIdConfig, t as Flow } from "./types-9w6h_a6Y.js";
7
7
 
8
8
  //#region ../infra/src/capabilities/IAnalyticsCapability.d.ts
9
9
  interface IAnalyticsCapability {
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
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-B4Ei_1T2.js";
2
- import "./deepsightService-X02Vowli.js";
3
- import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-DGhQYTse.js";
4
- import { i as warmupWasm, r as WasmPipeline } from "./StateMachine-BTwgcH8g.js";
5
- import "./Manager-DfrNSCCo.js";
6
- import "./Actor-DVQMXFy4.js";
7
- import "./types-c0XgGLsM.js";
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-o9XK4ywM.js";
2
+ import "./deepsightService-DQAQJ3oJ.js";
3
+ import { n as PermissionStatus, r as CameraStream, t as PermissionResult } from "./types-Bt1L3nIZ.js";
4
+ import { i as warmupWasm, r as WasmPipeline } from "./StateMachine-UXl65oQ4.js";
5
+ import "./Manager-C647XkuZ.js";
6
+ import "./Actor-slOFXjCJ.js";
7
+ import "./types-9w6h_a6Y.js";
8
8
 
9
9
  //#region ../infra/src/http/types.d.ts
10
10
  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-CuIAKgDr.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-BbXYE__Q.esm.js";
3
- import { D as createApi_default, i as IdCaptureProvider, o as warmupWasm, r as WasmUtilProvider } from "./src-CGwA8Bgy.esm.js";
4
- import "./endpoints-DxmUJ8rX.esm.js";
5
- import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as requestPermission } from "./streamingEvents-IkhAllE0.esm.js";
6
- import "./deepsightService-DY1w5Amz.esm.js";
7
- import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-DlSxxyGw.esm.js";
8
- import "./stats-ftyC31aH.esm.js";
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-DaWYPjV7.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-CDDijEMo.esm.js";
3
+ import { D as createApi_default, i as IdCaptureProvider, o as warmupWasm, r as WasmUtilProvider } from "./src-BfSGepfs.esm.js";
4
+ import "./endpoints-D8PkEWyi.esm.js";
5
+ import { c as getDeviceClass, l as getBrowser, o as checkPermission, s as requestPermission } from "./streamingEvents-DenKMpAy.esm.js";
6
+ import "./deepsightService-B_mt2btN.esm.js";
7
+ import { a as resetApi, n as getApi, o as setClient, s as setToken, t as api } from "./api-CmRbOLxk.esm.js";
8
+ import "./stats-Bv2CLzQ0.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-CzJBZnft.esm.js";
2
- import { n as require_jsnlog, t as require_OpenViduLogger } from "./OpenViduLogger-CPED-Apt.esm.js";
1
+ import { i as __toCommonJS, n as __esm, r as __export, t as __commonJS } from "./chunk-BYFjCiHC.esm.js";
2
+ import { n as require_jsnlog, t as require_OpenViduLogger } from "./OpenViduLogger-Bb6eA6r2.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
@@ -1,4 +1,4 @@
1
- import { t as Manager } from "./Manager-DfrNSCCo.js";
1
+ import { t as Manager } from "./Manager-C647XkuZ.js";
2
2
 
3
3
  //#region src/modules/phone/types.d.ts
4
4
 
package/dist/phone.esm.js CHANGED
@@ -1,7 +1,7 @@
1
- import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-CuIAKgDr.esm.js";
2
- import { E as createManager, p as BrowserTimerProvider } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
4
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { d as addEvent, n as eventModuleNames, r as eventScreenNames } from "./events-DaWYPjV7.esm.js";
2
+ import { E as createManager, p as BrowserTimerProvider } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, i as fromCallback, n as setup, o as createActor, r as assign, t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
4
+ import { t as api } from "./api-CmRbOLxk.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,9 +1,9 @@
1
- import { a as IncodeCanvas, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-X02Vowli.js";
2
- import { c as MLProviderConfig, n as PermissionStatus, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-DGhQYTse.js";
3
- import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-BTwgcH8g.js";
4
- import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-CNQN7doV.js";
5
- import { t as Manager } from "./Manager-DfrNSCCo.js";
6
- import { r as FlowModuleConfig } from "./types-c0XgGLsM.js";
1
+ import { a as IncodeCanvas, n as BaseWasmProvider, r as StreamCanvasCapture, t as DeepsightService } from "./deepsightService-DQAQJ3oJ.js";
2
+ import { c as MLProviderConfig, n as PermissionStatus, r as CameraStream, s as IMLProviderCapability, t as PermissionResult } from "./types-Bt1L3nIZ.js";
3
+ import { n as StateMachine, t as AnyStateMachine } from "./StateMachine-UXl65oQ4.js";
4
+ import { a as FaceCaptureDependencies, i as DetectionStatus, n as FaceCaptureManagerState, o as FaceErrorCode, r as BaseFaceCaptureConfig, t as FaceCaptureManager } from "./faceCaptureManagerFactory-1c0Ah2Vw.js";
5
+ import { t as Manager } from "./Manager-C647XkuZ.js";
6
+ import { r as FlowModuleConfig } from "./types-9w6h_a6Y.js";
7
7
 
8
8
  //#region ../infra/src/capabilities/IFaceDetectionCapability.d.ts
9
9
  /**
@@ -1,11 +1,11 @@
1
- import { d as addEvent, n as eventModuleNames } from "./events-CuIAKgDr.esm.js";
2
- import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-CGwA8Bgy.esm.js";
3
- import { a as fromPromise, o as createActor, r as assign } from "./endpoints-DxmUJ8rX.esm.js";
4
- import "./streamingEvents-IkhAllE0.esm.js";
5
- import "./deepsightService-DY1w5Amz.esm.js";
6
- import "./api-DlSxxyGw.esm.js";
7
- import "./stats-ftyC31aH.esm.js";
8
- import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-iJblI_NP.esm.js";
1
+ import { d as addEvent, n as eventModuleNames } from "./events-DaWYPjV7.esm.js";
2
+ import { m as BrowserStorageProvider, r as WasmUtilProvider } from "./src-BfSGepfs.esm.js";
3
+ import { a as fromPromise, o as createActor, r as assign } from "./endpoints-D8PkEWyi.esm.js";
4
+ import "./streamingEvents-DenKMpAy.esm.js";
5
+ import "./deepsightService-B_mt2btN.esm.js";
6
+ import "./api-CmRbOLxk.esm.js";
7
+ import "./stats-Bv2CLzQ0.esm.js";
8
+ import { a as FACE_ERROR_CODES, i as uploadSelfie, n as faceCaptureMachine, o as createFaceCaptureManager, r as processFace, t as FACE_CAPTURE_EVENT_CODES } from "./faceCaptureSetup-D7eXNsxo.esm.js";
9
9
 
10
10
  //#region src/modules/selfie/selfieErrorUtils.ts
11
11
  const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
@@ -1,4 +1,4 @@
1
- import { a as __toDynamicImportESM } from "./chunk-CzJBZnft.esm.js";
1
+ import { a as __toDynamicImportESM } from "./chunk-BYFjCiHC.esm.js";
2
2
 
3
3
  //#region ../infra/src/capabilities/platform.ts
4
4
  /**
@@ -4403,13 +4403,13 @@ var MotionSensorProvider = class {
4403
4403
  //#region ../infra/src/providers/browser/openviduLazy.ts
4404
4404
  let openViduImport;
4405
4405
  async function enableProdModeBeforeLoad() {
4406
- const { OpenViduLogger } = await import("./OpenViduLogger-Bz7LPAnM.esm.js").then(__toDynamicImportESM(1));
4406
+ const { OpenViduLogger } = await import("./OpenViduLogger-SBQRaB7x.esm.js").then(__toDynamicImportESM(1));
4407
4407
  OpenViduLogger.getInstance().enableProdMode();
4408
4408
  }
4409
4409
  async function loadOpenVidu() {
4410
4410
  if (openViduImport) return openViduImport;
4411
4411
  await enableProdModeBeforeLoad();
4412
- openViduImport = import("./lib-DkCxYA3C.esm.js").then(__toDynamicImportESM(1));
4412
+ openViduImport = import("./lib-Czux-snZ.esm.js").then(__toDynamicImportESM(1));
4413
4413
  return openViduImport;
4414
4414
  }
4415
4415
 
@@ -1,4 +1,4 @@
1
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { t as api } from "./api-CmRbOLxk.esm.js";
2
2
 
3
3
  //#region src/modules/stats/statsServices.ts
4
4
  /**
package/dist/stats.esm.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./api-DlSxxyGw.esm.js";
2
- import { t as addDeviceStats } from "./stats-ftyC31aH.esm.js";
1
+ import "./api-CmRbOLxk.esm.js";
2
+ import { t as addDeviceStats } from "./stats-Bv2CLzQ0.esm.js";
3
3
 
4
4
  export { addDeviceStats };
@@ -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-CGwA8Bgy.esm.js";
2
- import { t as endpoints } from "./endpoints-DxmUJ8rX.esm.js";
3
- import { t as api } from "./api-DlSxxyGw.esm.js";
1
+ import { A as getUserAgent, O as getDeviceInfo, T as stopCameraStream, l as MotionSensorProvider, w as requestCameraAccess, y as queryCameraPermission } from "./src-BfSGepfs.esm.js";
2
+ import { t as endpoints } from "./endpoints-D8PkEWyi.esm.js";
3
+ import { t as api } from "./api-CmRbOLxk.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-20260212-7db2d06",
3
+ "version": "0.0.0-dev-20260216-4495485",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",
@@ -41,6 +41,10 @@
41
41
  "types": "./dist/curp-validation.d.ts",
42
42
  "import": "./dist/curp-validation.esm.js"
43
43
  },
44
+ "./government-validation": {
45
+ "types": "./dist/government-validation.d.ts",
46
+ "import": "./dist/government-validation.esm.js"
47
+ },
44
48
  "./camera": {
45
49
  "types": "./dist/camera.d.ts",
46
50
  "import": "./dist/camera.esm.js"
@@ -1,3 +0,0 @@
1
- import { t as require_OpenViduLogger } from "./OpenViduLogger-CPED-Apt.esm.js";
2
-
3
- export default require_OpenViduLogger();