@incodetech/core 0.0.0-dev-20260911-aec162f0 → 0.0.0-dev-20260914-8aef7789

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 (118) hide show
  1. package/dist/{FaceDetectionProvider-Cn1wS-sA.d.ts → BaseWasmProvider-CO0GfaHM.d.ts} +7 -37
  2. package/dist/{BrowserDiagnosticsCryptoProvider-8sT0QLgq.esm.js → BrowserDiagnosticsCryptoProvider-BoYzmYY5.esm.js} +1 -1
  3. package/dist/{onDeviceFaceResults-hle2Ci9l.esm.js → FaceDetectionProvider-0bWjPgW5.esm.js} +219 -340
  4. package/dist/FaceDetectionProvider-CyLxkzRP.d.ts +36 -0
  5. package/dist/{IIdCaptureCapability-DDWlQzhi.d.ts → IIdCaptureCapability-nfpic2z2.d.ts} +7 -3
  6. package/dist/{IWasmUtilCapability-SNPhmIwB.d.ts → IWasmUtilCapability-DaP6pfHq.d.ts} +10 -4
  7. package/dist/{MotionSensorProvider-Vlyhbcty.esm.js → MotionSensorProvider-BnZ8_1Sk.esm.js} +1 -1
  8. package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
  9. package/dist/{deepsightService-MZOpj7Vp.d.ts → StreamCanvasCapture-D9Dz8kqB.d.ts} +54 -41
  10. package/dist/ae-signature.esm.js +1 -1
  11. package/dist/{apiError-XdhqSAmg.esm.js → apiError-CixFeCyt.esm.js} +1 -1
  12. package/dist/authentication.d.ts +3 -3
  13. package/dist/authentication.esm.js +2 -2
  14. package/dist/{authenticationManager-DqBOkMzk.esm.js → authenticationManager-CN26fkJa.esm.js} +4 -4
  15. package/dist/{authenticationManager-BCkV6CSG.d.ts → authenticationManager-D7UUqgnN.d.ts} +1 -1
  16. package/dist/{authenticationStateMachine-Cto_G5bN.esm.js → authenticationStateMachine-CUXpIxAD.esm.js} +6 -62
  17. package/dist/avatar.d.ts +1 -1
  18. package/dist/avatar.esm.js +1 -1
  19. package/dist/{backCameraStream-DE_5qY04.esm.js → backCameraStream-BOtyQowf.esm.js} +75 -18
  20. package/dist/{camera-_2sXMXiF.esm.js → camera-sIa9ceW2.esm.js} +19 -1
  21. package/dist/camera.esm.js +1 -1
  22. package/dist/{canvas-E1zGkel4.esm.js → canvas-BxFzWTt-.esm.js} +19 -0
  23. package/dist/createCameraCycleOwnership-DQ5-F2oW.esm.js +826 -0
  24. package/dist/{createFaceAvatar-DQKaRise.esm.js → createFaceAvatar-BNHdeFj8.esm.js} +2 -2
  25. package/dist/{createFaceAvatar-pUEkdk4X.d.ts → createFaceAvatar-CTM9aj9Q.d.ts} +12 -6
  26. package/dist/curp-validation.d.ts +1 -1
  27. package/dist/{curpValidationManager-cSd2MrOQ.d.ts → curpValidationManager-CTJB2RsD.d.ts} +1 -1
  28. package/dist/{deepsightLoader-Dwr1zKFa.esm.js → deepsightLoader-Dhz9T_KJ.esm.js} +19 -53
  29. package/dist/document-capture.esm.js +2 -2
  30. package/dist/{documentCaptureManager-BTpHZMgW.esm.js → documentCaptureManager-BwcbMwo5.esm.js} +1 -1
  31. package/dist/{documentCaptureStateMachine-CPizkpcg.esm.js → documentCaptureStateMachine-F8SCOtL_.esm.js} +4 -4
  32. package/dist/dynamic-forms.esm.js +2 -2
  33. package/dist/{dynamicFormsManager-Cmh84Nz4.esm.js → dynamicFormsManager-CNBrBOR3.esm.js} +1 -1
  34. package/dist/{dynamicFormsStateMachine-DZr7Ugvy.esm.js → dynamicFormsStateMachine-Bo2qrjHB.esm.js} +1 -1
  35. package/dist/ekyb.d.ts +1 -1
  36. package/dist/ekyb.esm.js +3 -3
  37. package/dist/{ekybManager-Dc2tT9fu.esm.js → ekybManager-D8DdfRAD.esm.js} +1 -1
  38. package/dist/{ekybStateMachine-GSEMOiHn.esm.js → ekybStateMachine-oPCbEFob.esm.js} +1 -1
  39. package/dist/electronic-signature.esm.js +1 -1
  40. package/dist/{electronicSignatureManager-CpLuqw7T.esm.js → electronicSignatureManager-DkKQ07vx.esm.js} +1 -1
  41. package/dist/extensibility.d.ts +11 -58
  42. package/dist/extensibility.esm.js +13 -13
  43. package/dist/{faceCaptureManagerFactory-kDmbL0I7.esm.js → faceCaptureManagerFactory-D_EjQnnE.esm.js} +19 -4
  44. package/dist/{faceCaptureManagerFactory-CzUr_ZPq.d.ts → faceCaptureManagerFactory-DqrYpjA5.d.ts} +24 -12
  45. package/dist/{faceCaptureSetup-CAGBnLVx.esm.js → faceCaptureSetup-WeO8-TfR.esm.js} +999 -382
  46. package/dist/{feature-management-B6CtmH1O.esm.js → feature-management-BEqf3Sr3.esm.js} +1 -1
  47. package/dist/feature-management.esm.js +1 -1
  48. package/dist/fiscal-qr.esm.js +1 -1
  49. package/dist/{fiscalQrManager-DI6uOffY.esm.js → fiscalQrManager-Bp_-3LJr.esm.js} +3 -3
  50. package/dist/flow-events.d.ts +1 -1
  51. package/dist/flow.d.ts +6 -6
  52. package/dist/flow.esm.js +3 -3
  53. package/dist/{flowCompletionService-BpoZDpAn.esm.js → flowCompletionService-DELbVeL5.esm.js} +1 -1
  54. package/dist/{flowServices-BVnSStkh.esm.js → flowServices-Brr2fh_c.esm.js} +5 -5
  55. package/dist/geolocation.esm.js +2 -2
  56. package/dist/{geolocationManager-CLm86P8G.esm.js → geolocationManager-CtVZDjng.esm.js} +1 -1
  57. package/dist/{geolocationStateMachine-Bi3vy7Wl.esm.js → geolocationStateMachine-tjsYcMhr.esm.js} +1 -1
  58. package/dist/home.d.ts +1 -1
  59. package/dist/id-selfie-flow.d.ts +3 -3
  60. package/dist/id-selfie-flow.esm.js +10 -10
  61. package/dist/id.d.ts +4 -4
  62. package/dist/id.esm.js +35 -44
  63. package/dist/{idCaptureDefaults-BLsd7shz.esm.js → idCaptureDefaults-C66YvkgN.esm.js} +19 -14
  64. package/dist/{idCaptureManager-DW1GeEUk.d.ts → idCaptureManager-DE_jyr5X.d.ts} +98 -37
  65. package/dist/{idCaptureManager-BUTdcmaD.esm.js → idCaptureManager-zjul9YdZ.esm.js} +27 -17
  66. package/dist/{idCaptureServices-fzIhBqAK.esm.js → idCaptureServices-UXYCBZPK.esm.js} +80 -20
  67. package/dist/{idCaptureStateMachine-Cp2_revF.esm.js → idCaptureStateMachine-D3pqfK2Z.esm.js} +1954 -1082
  68. package/dist/{index-1PoJuUJ-.d.ts → index-BGxFwnld.d.ts} +1 -1
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.esm.js +1 -1
  71. package/dist/mandatory-consent.d.ts +2 -2
  72. package/dist/{mandatoryConsentManager-BJnylLZO.d.ts → mandatoryConsentManager-CZwhsUlO.d.ts} +1 -1
  73. package/dist/{permissionGuards-DxbvOoZJ.esm.js → permissionGuards-o1JLtewE.esm.js} +1 -1
  74. package/dist/{permissionServices-f7nBnW5P.esm.js → permissionServices-7lzEiOsO.esm.js} +3 -3
  75. package/dist/personhood.d.ts +5 -5
  76. package/dist/personhood.esm.js +8 -8
  77. package/dist/qe-signature.esm.js +1 -1
  78. package/dist/{runChildModule-BPlX2IDO.esm.js → runChildModule-BDlvNMrA.esm.js} +1 -1
  79. package/dist/{safeStorage-Dp9m6aOh.esm.js → safeStorage-1O9k0ulP.esm.js} +8 -8
  80. package/dist/{sdkVersion-Dr9_E3d9.esm.js → sdkVersion-CS_0s_Lc.esm.js} +1 -1
  81. package/dist/selfie.d.ts +4 -4
  82. package/dist/selfie.esm.js +12 -74
  83. package/dist/{selfieManager-BdP-RgH4.esm.js → selfieManager-BouB9yUQ.esm.js} +4 -4
  84. package/dist/{selfieManager-Bg_Xwe4p.d.ts → selfieManager-DZ3u_WN9.d.ts} +1 -1
  85. package/dist/{selfieStateMachine-B8vFeT39.esm.js → selfieStateMachine-TGfI9hNp.esm.js} +22 -31
  86. package/dist/{session-C2THUsQZ.esm.js → session-m9j27bHm.esm.js} +3 -3
  87. package/dist/session.d.ts +1 -1
  88. package/dist/session.esm.js +4 -4
  89. package/dist/{sessionInitializer-CEycxhm4.esm.js → sessionInitializer-CUpgbHzs.esm.js} +4 -4
  90. package/dist/{setup-D6yz9se2.d.ts → setup-CEX95gJ1.d.ts} +11 -6
  91. package/dist/{setup-BHJ3-fhX.esm.js → setup-CfNAVG-d.esm.js} +12 -11
  92. package/dist/{trueSightService-DLzYznkh.esm.js → trueSightService-TqmmYye3.esm.js} +4 -4
  93. package/dist/types-BhHF-CuL.d.ts +6 -0
  94. package/dist/{types-DJ2OM9rw.d.ts → types-BzuUebkB.d.ts} +1 -1
  95. package/dist/{types-DzmqFoCH.d.ts → types-CBctcPeF.d.ts} +1 -1
  96. package/dist/{types-BBI4-s9u2.d.ts → types-CoOlCUp82.d.ts} +5 -5
  97. package/dist/{types-hSqUyXyw.d.ts → types-DL0CXuWv.d.ts} +3 -3
  98. package/dist/types-Ds928RiU.d.ts +1 -0
  99. package/dist/{types-_pWNFY1F.d.ts → types-eLtVBhon.d.ts} +1 -1
  100. package/dist/video-selfie.d.ts +3 -3
  101. package/dist/video-selfie.esm.js +5 -5
  102. package/dist/{videoSelfieCameraWarmer-D5E12WjL.esm.js → videoSelfieCameraWarmer-C-cESczy.esm.js} +9 -9
  103. package/dist/{videoSelfieStepDetector-B8TvFDNK.d.ts → videoSelfieStepDetector-CdXIFh9s.d.ts} +4 -4
  104. package/dist/virtualCameraCheck-WOloJ-do.esm.js +48 -0
  105. package/dist/{warmup-BOM-sD-6.esm.js → warmup-CUUnwYxe.esm.js} +282 -90
  106. package/dist/{warmup-CXHBgvFC.d.ts → warmup-Cis2p6O0.d.ts} +13 -2
  107. package/dist/wasm.d.ts +9 -3
  108. package/dist/wasm.esm.js +10 -4
  109. package/dist/{wasmDsFlagSync-C3k_VK9o.esm.js → wasmDsFlagSync-BJtLh2XK.esm.js} +1 -1
  110. package/dist/{wasmWebClient-BJCaFeBL.esm.js → wasmWebClient-B7baE-Wf.esm.js} +223 -2
  111. package/dist/workflow.d.ts +1 -1
  112. package/dist/workflow.esm.js +15 -15
  113. package/package.json +1 -1
  114. package/dist/imageFile-CLaua6xO.esm.js +0 -69
  115. package/dist/types-m4t_cT5J.d.ts +0 -6
  116. package/dist/{Face2DProvider-UUQt_vRC.esm.js → Face2DProvider-BF48sz5c.esm.js} +1 -1
  117. package/dist/{PrivacyLensProvider-D8PS7AJa.esm.js → PrivacyLensProvider-EwnC_C5n.esm.js} +1 -1
  118. package/dist/{selfieErrorUtils-C6gC06J7.esm.js → selfieErrorUtils-C77GXJH6.esm.js} +1 -1
@@ -4,44 +4,61 @@ import { t as Manager } from "./Manager-CQQ99QOI.js";
4
4
  import "./Actor-iTq7YY48.js";
5
5
  import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
6
6
  import "./index-B8weJxmL.js";
7
- import { a as RegulationTypes } from "./types-DzmqFoCH.js";
7
+ import "./createFaceAvatar-CTM9aj9Q.js";
8
+ import { a as RegulationTypes } from "./types-CBctcPeF.js";
9
+ import { n as VirtualCameraCheckOutput, r as WasmUtilConfig, t as IWasmUtilCapability } from "./IWasmUtilCapability-DaP6pfHq.js";
8
10
  import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
11
+ import { t as BaseWasmProvider } from "./BaseWasmProvider-CO0GfaHM.js";
12
+ import "./types-Ds928RiU.js";
13
+ import { n as DeepsightService } from "./StreamCanvasCapture-D9Dz8kqB.js";
9
14
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
10
- import { t as DeepsightService } from "./deepsightService-MZOpj7Vp.js";
11
- import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-DDWlQzhi.js";
12
- import { B as DeviceWalletPlatform, C as IdDocumentType, D as RecordingSession, F as ManualUploadTab, O as UploadIdResponse, P as ManualUploadSide, R as DeviceWalletFailReason, T as IdErrorCode, X as DigitalIdProviderId, Z as FailureReason, _ as IdCaptureInput, b as IdCaptureOutput, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, h as IdCaptureEvent, i as CaptureIdResponse, k as IAnalyticsCapability, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureMode, y as IdCaptureOnlyConfig } from "./types-BBI4-s9u2.js";
13
- //#region src/modules/id/idCaptureStateMachine.d.ts
14
- declare const idCaptureMachine: AnyStateMachine;
15
- type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
16
- //#endregion
17
- //#region src/modules/id/idCaptureActor.d.ts
18
- type CreateIdCaptureActorOptions = {
19
- config: IdCaptureConfig;
20
- dependencies?: IdCaptureDependencies;
21
- };
22
- type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
23
- declare function createIdCaptureActor(options: CreateIdCaptureActorOptions): IdCaptureActor;
24
- //#endregion
25
- //#region src/modules/id/idCaptureOnlyStateMachine.d.ts
26
- type IdCaptureOnlyContext = IdCaptureContext;
27
- type IdCaptureOnlyEvent = IdCaptureEvent;
28
- type IdCaptureOnlyInput = IdCaptureInput;
29
- /**
30
- * ID capture state machine variant for the captureOnly flow. Shares the full
31
- * base ID-capture state tree (chooser, tutorial, permissions, capture,
32
- * front/back finished, processing, finished); only the upload, process, and
33
- * recording steps are local instead of remote.
34
- */
35
- declare const idCaptureOnlyMachine: AnyStateMachine;
36
- type IdCaptureOnlyMachine = StateMachine<IdCaptureOnlyContext, IdCaptureOnlyEvent, any, any, any, any, any, any, any, IdCaptureOnlyInput, any, any, any, any>;
37
- //#endregion
38
- //#region src/modules/id/idCaptureOnlyActor.d.ts
39
- type CreateIdCaptureOnlyActorOptions = {
40
- config: IdCaptureOnlyConfig;
41
- dependencies?: IdCaptureDependencies;
42
- };
43
- type IdCaptureOnlyActor = ActorRefFrom<IdCaptureOnlyMachine>;
44
- declare function createIdCaptureOnlyActor(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyActor;
15
+ import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-nfpic2z2.js";
16
+ import { B as DeviceWalletPlatform, C as IdDocumentType, D as RecordingSession, F as ManualUploadTab, O as UploadIdResponse, P as ManualUploadSide, R as DeviceWalletFailReason, T as IdErrorCode, X as DigitalIdProviderId, Z as FailureReason, _ as IdCaptureInput, b as IdCaptureOutput, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, h as IdCaptureEvent, i as CaptureIdResponse, k as IAnalyticsCapability, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureMode, y as IdCaptureOnlyConfig } from "./types-CoOlCUp82.js";
17
+ //#region ../infra/src/providers/wasm/WasmUtilProvider.d.ts
18
+ declare class WasmUtilProvider extends BaseWasmProvider implements IWasmUtilCapability {
19
+ private static instance;
20
+ private static initPromise;
21
+ static getInstance(): Promise<WasmUtilProvider>;
22
+ static resetInstance(): void;
23
+ constructor();
24
+ initialize(config: WasmUtilConfig): Promise<void>;
25
+ processFrame(_image: ImageData): Promise<void>;
26
+ encryptImage(image: string): string;
27
+ setSdkVersion(version: string): void;
28
+ setSdkPlatform(platform: string): void;
29
+ setDeviceInfo(deviceInfo: object, overrideExisting?: boolean): void;
30
+ setBrowserInfo(browserInfo: object, overrideExisting?: boolean): void;
31
+ setCameraInfo(cameraInfo: object, overrideExisting?: boolean): void;
32
+ setMotionStatus(status: string): void;
33
+ setBackgroundMode(backgroundMode: boolean): void;
34
+ setOnDeviceMode(enabled: boolean): void;
35
+ setZc(zc: string): void;
36
+ setInspectorOpened(opened: boolean): void;
37
+ getInspectorOpened(): boolean;
38
+ /**
39
+ * Toggles the WASM module's production mode. When `true`, the native module
40
+ * suppresses its verbose debug logging/console output; when `false`, those
41
+ * logs are emitted. The SDK forces this to `true` by default and only flips
42
+ * it off when the caller opts in via `setup({ wasm: { showLogs: true } })`.
43
+ *
44
+ * @param productionMode - `true` to silence WASM logs, `false` to emit them.
45
+ */
46
+ setProductionMode(productionMode: boolean): Promise<void>;
47
+ getMetadata(): string;
48
+ analyzeFrame(image: ImageData): Promise<void>;
49
+ getCheck(): string;
50
+ getPipelineState(): string;
51
+ estimatePerformance(): string;
52
+ isVirtualCamera(label: string | null): boolean;
53
+ prc(): Promise<void>;
54
+ poc(output: VirtualCameraCheckOutput): Promise<void>;
55
+ rsp(): Promise<void>;
56
+ ssl(): void;
57
+ stl(): void;
58
+ osv(): void;
59
+ oev(): void;
60
+ ckvcks(data: ArrayBuffer): void;
61
+ }
45
62
  //#endregion
46
63
  //#region src/modules/id/idCaptureServices.d.ts
47
64
  type IdCaptureInitResult = {
@@ -98,6 +115,7 @@ declare function validateUploadResponse(response: UploadIdResponse & {
98
115
  skipGlareFront?: boolean;
99
116
  skipGlareBack?: boolean;
100
117
  }): ValidationError | undefined;
118
+ declare const getRealQualityValue: (value: number) => number;
101
119
  declare function uploadIdImage(params: UploadIdImageParams): Promise<CaptureIdResponse>;
102
120
  type StartRecordingParams = {
103
121
  config: IdCaptureConfig;
@@ -109,6 +127,16 @@ declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
109
127
  declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
110
128
  declare function pauseRecordingForAttempt(session: RecordingSession): void;
111
129
  declare function prepareRecordingForCameraRetry(session: RecordingSession): void;
130
+ type FinalizedIdRecording = Readonly<{
131
+ recordingId?: string | null;
132
+ }>;
133
+ /**
134
+ * Fully drains an ID recording before the protected camera cycle runs POC.
135
+ * Every recorder clone is stopped before this promise settles.
136
+ */
137
+ declare function finalizeRecordingSession(session: RecordingSession): Promise<FinalizedIdRecording>;
138
+ /** Synchronous teardown used when an attempt is cancelled before finalization. */
139
+ declare function disposeRecordingSession(session: RecordingSession): void;
112
140
  declare function stopRecording(session: RecordingSession): void;
113
141
  declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
114
142
  isDocumentExpired: boolean;
@@ -171,6 +199,39 @@ type AddBarcodeParams = {
171
199
  */
172
200
  declare function addBarcode(params: AddBarcodeParams): Promise<AddBarcodeV3Response>;
173
201
  //#endregion
202
+ //#region src/modules/id/idCaptureStateMachine.d.ts
203
+ declare const idCaptureMachine: AnyStateMachine;
204
+ type IdCaptureMachine = StateMachine<IdCaptureContext, IdCaptureEvent, any, any, any, any, any, any, any, IdCaptureInput, any, any, any, any>;
205
+ //#endregion
206
+ //#region src/modules/id/idCaptureActor.d.ts
207
+ type CreateIdCaptureActorOptions = {
208
+ config: IdCaptureConfig;
209
+ dependencies?: IdCaptureDependencies;
210
+ };
211
+ type IdCaptureActor = ActorRefFrom<IdCaptureMachine>;
212
+ declare function createIdCaptureActor(options: CreateIdCaptureActorOptions): IdCaptureActor;
213
+ //#endregion
214
+ //#region src/modules/id/idCaptureOnlyStateMachine.d.ts
215
+ type IdCaptureOnlyContext = IdCaptureContext;
216
+ type IdCaptureOnlyEvent = IdCaptureEvent;
217
+ type IdCaptureOnlyInput = IdCaptureInput;
218
+ /**
219
+ * ID capture state machine variant for the captureOnly flow. Shares the full
220
+ * base ID-capture state tree (chooser, tutorial, permissions, capture,
221
+ * front/back finished, processing, finished); only the upload, process, and
222
+ * recording steps are local instead of remote.
223
+ */
224
+ declare const idCaptureOnlyMachine: AnyStateMachine;
225
+ type IdCaptureOnlyMachine = StateMachine<IdCaptureOnlyContext, IdCaptureOnlyEvent, any, any, any, any, any, any, any, IdCaptureOnlyInput, any, any, any, any>;
226
+ //#endregion
227
+ //#region src/modules/id/idCaptureOnlyActor.d.ts
228
+ type CreateIdCaptureOnlyActorOptions = {
229
+ config: IdCaptureOnlyConfig;
230
+ dependencies?: IdCaptureDependencies;
231
+ };
232
+ type IdCaptureOnlyActor = ActorRefFrom<IdCaptureOnlyMachine>;
233
+ declare function createIdCaptureOnlyActor(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyActor;
234
+ //#endregion
174
235
  //#region src/modules/id/digitalUpload/types.d.ts
175
236
  type DigitalUploadFailReason = 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED' | 'ID_TYPE_UNACCEPTABLE' | 'FILE_CHANGED_ERROR' | 'INVALID_FILE_TYPE' | 'NETWORK_ERROR' | 'GENERIC';
176
237
  //#endregion
@@ -563,4 +624,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
563
624
  deviceWalletUseAnotherMethod(): void;
564
625
  };
565
626
  //#endregion
566
- export { CreateIdCaptureActorOptions as A, uploadManualIdFile as C, createIdCaptureOnlyActor as D, IdCaptureOnlyActor as E, createIdCaptureActor as M, IdCaptureMachine as N, IdCaptureOnlyMachine as O, idCaptureMachine as P, uploadIdImage as S, CreateIdCaptureOnlyActorOptions as T, prepareRecordingForCameraRetry as _, AddBarcodeParams as a, stopRecording as b, StartRecordingParams as c, ValidationError as d, addBarcode as f, preloadIdRecordingProvider as g, pauseRecordingForAttempt as h, createIdCaptureManagerFromActor as i, IdCaptureActor as j, idCaptureOnlyMachine as k, UploadIdImageParams as l, initializeIdCapture as m, IdCaptureManager as n, IdCaptureInitResult as o, barcodeToBase64 as p, IdCaptureState as r, InitializeIdCaptureParams as s, createIdCaptureManager as t, UploadManualIdFileParams as u, processId as v, validateUploadResponse as w, stopStream as x, startRecordingSession as y };
627
+ export { preloadIdRecordingProvider as A, addBarcode as C, getRealQualityValue as D, finalizeRecordingSession as E, stopStream as F, uploadIdImage as I, uploadManualIdFile as L, processId as M, startRecordingSession as N, initializeIdCapture as O, stopRecording as P, validateUploadResponse as R, ValidationError as S, disposeRecordingSession as T, IdCaptureInitResult as _, CreateIdCaptureOnlyActorOptions as a, UploadIdImageParams as b, IdCaptureOnlyMachine as c, IdCaptureActor as d, createIdCaptureActor as f, FinalizedIdRecording as g, AddBarcodeParams as h, createIdCaptureManagerFromActor as i, prepareRecordingForCameraRetry as j, pauseRecordingForAttempt as k, idCaptureOnlyMachine as l, idCaptureMachine as m, IdCaptureManager as n, IdCaptureOnlyActor as o, IdCaptureMachine as p, IdCaptureState as r, createIdCaptureOnlyActor as s, createIdCaptureManager as t, CreateIdCaptureActorOptions as u, InitializeIdCaptureParams as v, barcodeToBase64 as w, UploadManualIdFileParams as x, StartRecordingParams as y, WasmUtilProvider as z };
@@ -1,12 +1,12 @@
1
- import { l as BrowserStorageProvider } from "./setup-BHJ3-fhX.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-CfNAVG-d.esm.js";
2
2
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
3
3
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
4
4
  import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
5
- import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-C3k_VK9o.esm.js";
5
+ import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-BJtLh2XK.esm.js";
6
6
  import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
7
- import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-f7nBnW5P.esm.js";
8
- import { n as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-Cp2_revF.esm.js";
9
- import { g as resolveIdCaptureThresholds, h as resolveCaptureOptimizingTreatment } from "./idCaptureServices-fzIhBqAK.esm.js";
7
+ import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-7lzEiOsO.esm.js";
8
+ import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-D3pqfK2Z.esm.js";
9
+ import { v as resolveCaptureOptimizingTreatment, y as resolveIdCaptureThresholds } from "./idCaptureServices-UXYCBZPK.esm.js";
10
10
  //#region src/modules/id/digitalUpload/instrumentation.ts
11
11
  const TERMINAL_REASONS = /* @__PURE__ */ new Set(["DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED", "ID_TYPE_UNACCEPTABLE"]);
12
12
  function isHoldingState(value) {
@@ -276,13 +276,13 @@ function getEffectiveSelectedDocumentType(context) {
276
276
  if (isIdAvailable) return "id";
277
277
  if (isPassportAvailable) return "passport";
278
278
  }
279
- function mapCaptureState(snapshot, context) {
279
+ function mapCaptureState(snapshot, context, presentationStream) {
280
280
  const captureStatus = getCaptureStatus(snapshot) ?? "initializing";
281
281
  const { uploadError, uploadResponse } = context;
282
282
  return {
283
283
  status: "capture",
284
284
  captureStatus,
285
- stream: context.stream,
285
+ stream: presentationStream,
286
286
  usingBackCamera: context.usingBackCamera ?? true,
287
287
  detectionStatus: context.detectionStatus,
288
288
  attemptsRemaining: context.attemptsRemaining,
@@ -459,7 +459,7 @@ function mapDeviceWalletState(snapshot) {
459
459
  platform: childCtx?.platform
460
460
  };
461
461
  }
462
- function mapState(snapshot) {
462
+ function mapState(snapshot, presentationStream) {
463
463
  const { context } = snapshot;
464
464
  if (snapshot.matches("idle")) return { status: "idle" };
465
465
  const loadingPhase = getLoadingPhase(snapshot);
@@ -473,7 +473,7 @@ function mapState(snapshot) {
473
473
  if (snapshot.matches("ageVerification")) return { status: "ageVerification" };
474
474
  if (snapshot.matches("closed")) return { status: "closed" };
475
475
  if (snapshot.matches("permissions")) return mapPermissionsState(snapshot, context);
476
- if (snapshot.matches("capture")) return mapCaptureState(snapshot, context);
476
+ if (snapshot.matches("capture")) return mapCaptureState(snapshot, context, presentationStream);
477
477
  if (snapshot.matches("mandatoryConsent")) return {
478
478
  status: "mandatoryConsent",
479
479
  regulationType: context.uploadResponse?.regulationType ?? "Other"
@@ -521,7 +521,7 @@ function createApi({ actor, trackElementClicked, trackCaptureAttemptFinished })
521
521
  return {
522
522
  load() {
523
523
  const { config } = actor.getSnapshot().context;
524
- if (config.ds === true) setWasmDsFlagSync(true);
524
+ setWasmDsFlagSync(config.ds === true);
525
525
  resetWasmMotionPrimedForModule();
526
526
  actor.send({ type: "LOAD" });
527
527
  },
@@ -955,15 +955,24 @@ function getIdCaptureErrorPayload(snapshot) {
955
955
  * `docs/patterns/CAPABILITY.md`). Pass a fake/no-op to override (tests do).
956
956
  */
957
957
  function createIdCaptureManagerFromActor(actor, visibilityObserver = new BrowserVisibilityObserverProvider()) {
958
+ const protectedCaptureController = findIdProtectedCaptureController(actor);
959
+ protectedCaptureController?.setVisible(visibilityObserver.isVisible());
958
960
  return createManager({
959
961
  actor,
960
- mapState,
962
+ mapState: (snapshot) => mapState(snapshot, protectedCaptureController?.getProjection().stream),
961
963
  createApi,
962
964
  instrumentation: createManagerInstrumentation(eventModuleNames.idCapture, {
963
965
  getEventScreenName: mapIdCaptureScreenName,
964
966
  getErrorName: getIdCaptureErrorName,
965
967
  getErrorPayload: getIdCaptureErrorPayload,
966
- visibilityObserver
968
+ visibilityObserver: {
969
+ isVisible: () => visibilityObserver.isVisible(),
970
+ onVisibilityChange: (listener) => visibilityObserver.onVisibilityChange((visible) => {
971
+ protectedCaptureController?.setVisible(visible);
972
+ actor.send({ type: visible ? "FOREGROUND" : "BACKGROUND" });
973
+ listener(visible);
974
+ })
975
+ }
967
976
  })
968
977
  });
969
978
  }
@@ -990,11 +999,12 @@ function createIdCaptureActor(options) {
990
999
  credentials: options.dependencies?.credentials ?? new BrowserDigitalCredentialsProvider()
991
1000
  };
992
1001
  const treatment = resolveCaptureOptimizingTreatment(options.config);
993
- return createActor(idCaptureMachine, { input: {
994
- config: {
995
- ...options.config,
996
- thresholds: resolveIdCaptureThresholds(options.config, treatment?.framesAggregationInterval)
997
- },
1002
+ const config = {
1003
+ ...options.config,
1004
+ thresholds: resolveIdCaptureThresholds(options.config, treatment?.framesAggregationInterval)
1005
+ };
1006
+ return createActor(provideIdProtectedCaptureController(idCaptureMachine, createIdProtectedCaptureController()), { input: {
1007
+ config,
998
1008
  dependencies,
999
1009
  captureFeedbackMode: treatment?.mode ?? "countdown",
1000
1010
  captureWindowMs: treatment?.captureWindowMs,
@@ -1,16 +1,16 @@
1
- import { t as ensureWasmPipelines } from "./setup-BHJ3-fhX.esm.js";
2
- import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-B6CtmH1O.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-CfNAVG-d.esm.js";
2
+ import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-BEqf3Sr3.esm.js";
3
3
  import { t as api } from "./api-Bx3gKW_y.esm.js";
4
4
  import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
5
5
  import { i as isDesktop } from "./platform-DkcRc9JV.esm.js";
6
6
  import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
7
7
  import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
8
- import { s as queryCameraPermission } from "./permissionServices-f7nBnW5P.esm.js";
8
+ import { s as queryCameraPermission } from "./permissionServices-7lzEiOsO.esm.js";
9
9
  import { n as startRecording, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-CCWy13M-.esm.js";
10
- import { a as isBackFacingTrack, n as getBackCameraStream } from "./backCameraStream-DE_5qY04.esm.js";
10
+ import { a as isBackFacingTrack, n as getBackCameraStream } from "./backCameraStream-BOtyQowf.esm.js";
11
11
  import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
12
12
  import { t as MultipartRecordingService } from "./multipartRecordingService-B3C_zlev.esm.js";
13
- import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-BLsd7shz.esm.js";
13
+ import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-C66YvkgN.esm.js";
14
14
  //#region src/internal/camera/cameraServices.ts
15
15
  function createCameraServices(camera) {
16
16
  return {
@@ -214,9 +214,9 @@ async function getIdCameraStream(deviceId) {
214
214
  * payload whose halves exceed it is halved to fit rather than rejected, and a
215
215
  * session whose budget cannot fit a meaningful split runs the countdown arm.
216
216
  * Note this means the console payload decides total capture duration — a
217
- * treatment payload that leaves `framesAggregationIntervalMs` at its 3000
218
- * default produces a 4500ms window against the 5s default budget, i.e. longer
219
- * than the countdown arm's 3000ms. Set both halves explicitly.
217
+ * treatment payload that leaves `framesAggregationIntervalMs` at its 1700
218
+ * default produces a 3200ms window against the 5s default budget, i.e. longer
219
+ * than the countdown arm's 1700ms. Set both halves explicitly.
220
220
  */
221
221
  const MAX_OPTIMIZING_DWELL_MS = 2500;
222
222
  const DEFAULT_OPTIMIZING_DWELL_MS = 1500;
@@ -247,7 +247,8 @@ const OPTIMIZING_WATCHDOG_MARGIN_MS = 1e3;
247
247
  * the countdown arm, only the pre-boundary half in the treatment arm. Bounding it
248
248
  * for one would break the other, so the arm-aware handling lives in
249
249
  * `resolveCaptureOptimizingTreatment`. Its code default stays at the
250
- * canonical 3000 so an unallocated session keeps shipped control behavior.
250
+ * canonical SDK 1-compatible 1700 so an unallocated session keeps production
251
+ * parity.
251
252
  */
252
253
  const CAPTURE_OPTIMIZING = {
253
254
  storeParam: "idcExp05ShowResult",
@@ -342,8 +343,8 @@ function resolveCaptureOptimizingTreatment(config) {
342
343
  /**
343
344
  * Single source of truth for the WASM ID-capture thresholds passed to
344
345
  * `IIdCaptureCapability.setThresholds`. Resolves `framesAggregationInterval`
345
- * — the countdown / best-frame aggregation window (canonical default
346
- * 3000ms) — with precedence:
346
+ * — the countdown / best-frame aggregation window (SDK 1-compatible canonical
347
+ * default 1700ms) — with precedence:
347
348
  *
348
349
  * 1. An explicit `config.thresholds.framesAggregationInterval` (host/headless
349
350
  * override) always wins. Such a session never runs the IDC-05 treatment
@@ -476,6 +477,12 @@ function validateUploadResponse(response, sessionState) {
476
477
  messageDescription: response.side === "back" ? "Please show the back side of your ID" : "Please show the front side of your ID",
477
478
  errorKey: ID_ERROR_CODES.WRONG_DOCUMENT_SIDE
478
479
  };
480
+ if (response.failReason === "DOCUMENT_NOT_READABLE") return {
481
+ error: true,
482
+ message: "Info is not readable",
483
+ messageDescription: "Minimize camera shake by holding your phone steady",
484
+ errorKey: ID_ERROR_CODES.READABILITY_ISSUE
485
+ };
479
486
  if (!response.classification) return {
480
487
  error: true,
481
488
  message: "ID classification failed",
@@ -585,6 +592,10 @@ function buildResolutionFromStream(stream) {
585
592
  }
586
593
  function preloadIdRecordingProvider(config) {}
587
594
  const multipartIdSessions = /* @__PURE__ */ new WeakMap();
595
+ const legacyIdRecordingStreams = /* @__PURE__ */ new WeakMap();
596
+ const idRecordingFinalizations = /* @__PURE__ */ new WeakMap();
597
+ const releasedLegacyIdRecordings = /* @__PURE__ */ new WeakSet();
598
+ const legacyIdDisconnects = /* @__PURE__ */ new WeakMap();
588
599
  function createMultipartSessionHandle(service, compositor, recordingSource, resolution, hasAudio) {
589
600
  const session = {
590
601
  token: "",
@@ -658,7 +669,7 @@ async function startRecordingSession(params) {
658
669
  resolution,
659
670
  hasAudio
660
671
  });
661
- return {
672
+ const recordingSession = {
662
673
  token: session.token,
663
674
  sessionId: session.sessionId,
664
675
  videoRecordingId: session.videoRecordingId,
@@ -666,6 +677,8 @@ async function startRecordingSession(params) {
666
677
  resolution,
667
678
  hasAudio
668
679
  };
680
+ legacyIdRecordingStreams.set(recordingSession, clonedStream);
681
+ return recordingSession;
669
682
  }
670
683
  function pauseRecordingForAttempt(session) {
671
684
  const multipartSession = multipartIdSessions.get(session);
@@ -680,20 +693,67 @@ function prepareRecordingForCameraRetry(session) {
680
693
  multipartSession.recordingSource.getVideoTracks().forEach((track) => track.stop());
681
694
  multipartSession.needsVideoSourceReplacement = true;
682
695
  }
683
- function stopRecording(session) {
696
+ function releaseLegacyRecordingResources(session) {
697
+ if (releasedLegacyIdRecordings.has(session)) return;
698
+ releasedLegacyIdRecordings.add(session);
699
+ try {
700
+ session.connection.publisher.destroy();
701
+ } catch {}
702
+ const clonedStream = legacyIdRecordingStreams.get(session);
703
+ legacyIdRecordingStreams.delete(session);
704
+ for (const track of clonedStream?.getTracks() ?? []) try {
705
+ track.stop();
706
+ } catch {}
707
+ }
708
+ function disconnectLegacyRecording(session) {
709
+ const existing = legacyIdDisconnects.get(session);
710
+ if (existing) return existing;
711
+ const disconnect = session.connection.disconnect();
712
+ legacyIdDisconnects.set(session, disconnect);
713
+ return disconnect;
714
+ }
715
+ /**
716
+ * Fully drains an ID recording before the protected camera cycle runs POC.
717
+ * Every recorder clone is stopped before this promise settles.
718
+ */
719
+ async function finalizeRecordingSession(session) {
720
+ const existing = idRecordingFinalizations.get(session);
721
+ if (existing) return existing;
684
722
  const multipartSession = multipartIdSessions.get(session);
685
- if (multipartSession) {
723
+ const finalization = multipartSession ? (async () => {
686
724
  multipartIdSessions.delete(session);
687
- multipartSession.service.stop().catch(() => {}).finally(() => multipartSession.compositor.stop());
688
- return;
689
- }
690
- (async () => {
725
+ try {
726
+ return await multipartSession.service.stop();
727
+ } finally {
728
+ multipartSession.compositor.stop();
729
+ }
730
+ })() : (async () => {
691
731
  try {
692
732
  await stopRecording$1(session.videoRecordingId);
733
+ return { recordingId: session.videoRecordingId || null };
693
734
  } finally {
694
- await session.connection.disconnect();
735
+ releaseLegacyRecordingResources(session);
736
+ await disconnectLegacyRecording(session);
695
737
  }
696
738
  })();
739
+ idRecordingFinalizations.set(session, finalization);
740
+ return finalization;
741
+ }
742
+ /** Synchronous teardown used when an attempt is cancelled before finalization. */
743
+ function disposeRecordingSession(session) {
744
+ const multipartSession = multipartIdSessions.get(session);
745
+ if (multipartSession) {
746
+ multipartIdSessions.delete(session);
747
+ const finalization = multipartSession.service.stop().finally(() => multipartSession.compositor.stop());
748
+ idRecordingFinalizations.set(session, finalization);
749
+ finalization.catch(() => {});
750
+ return;
751
+ }
752
+ releaseLegacyRecordingResources(session);
753
+ disconnectLegacyRecording(session).catch(() => {});
754
+ }
755
+ function stopRecording(session) {
756
+ finalizeRecordingSession(session).catch(() => {});
697
757
  }
698
758
  async function processId(isSecondId = false, queueName = "", signal) {
699
759
  const endpoint = isSecondId ? endpoints.processSecondId : endpoints.processId;
@@ -770,4 +830,4 @@ async function addBarcode(params) {
770
830
  return res.data;
771
831
  }
772
832
  //#endregion
773
- export { CAPTURE_OPTIMIZING as _, preloadIdRecordingProvider as a, startRecordingSession as c, uploadIdImage as d, uploadManualIdFile as f, resolveIdCaptureThresholds as g, resolveCaptureOptimizingTreatment as h, pauseRecordingForAttempt as i, stopRecording as l, ID_ERROR_CODES as m, barcodeToBase64 as n, prepareRecordingForCameraRetry as o, validateUploadResponse as p, initializeIdCapture as r, processId as s, addBarcode as t, stopStream as u, OPTIMIZING_WATCHDOG_MARGIN_MS as v, getIdCameraStream as y };
833
+ export { getIdCameraStream as S, ID_ERROR_CODES as _, getRealQualityValue as a, CAPTURE_OPTIMIZING as b, preloadIdRecordingProvider as c, startRecordingSession as d, stopRecording as f, validateUploadResponse as g, uploadManualIdFile as h, finalizeRecordingSession as i, prepareRecordingForCameraRetry as l, uploadIdImage as m, barcodeToBase64 as n, initializeIdCapture as o, stopStream as p, disposeRecordingSession as r, pauseRecordingForAttempt as s, addBarcode as t, processId as u, resolveCaptureOptimizingTreatment as v, OPTIMIZING_WATCHDOG_MARGIN_MS as x, resolveIdCaptureThresholds as y };