@incodetech/core 2.3.0-rc.0 → 2.3.0-rc.2

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 (149) hide show
  1. package/dist/{BrowserDiagnosticsCryptoProvider-C_9o3L2L.esm.js → BrowserDiagnosticsCryptoProvider-Crg8fwBl.esm.js} +1 -1
  2. package/dist/{FaceDetectionProvider-DTetAE8H.esm.js → FaceDetectionProvider-i55W_Jkj.esm.js} +7 -52
  3. package/dist/{IWasmUtilCapability-CXXDA5l1.d.ts → IWasmUtilCapability-CNWRl7jr.d.ts} +1 -43
  4. package/dist/{StreamCanvasCapture-B3YT2Bt6.d.ts → StreamCanvasCapture-_8gdW5Lk.d.ts} +1 -1
  5. package/dist/{recordingsRepository-CCWy13M-.esm.js → StreamCanvasProcessingSession-CBnbTnOr.esm.js} +1 -31
  6. package/dist/{addressSearch-BRSu_aGA.esm.js → addressSearch-DyHGgeX8.esm.js} +1 -1
  7. package/dist/ae-signature.esm.js +1 -1
  8. package/dist/antifraud.esm.js +2 -2
  9. package/dist/{antifraudManager-Bg9ynGum.esm.js → antifraudManager-DNkw66oW.esm.js} +1 -1
  10. package/dist/{antifraudStateMachine-BHxehiJZ.esm.js → antifraudStateMachine-DBeq47D2.esm.js} +1 -1
  11. package/dist/{apiError-D0v5hFyN.esm.js → apiError-DcnaKSwk.esm.js} +1 -1
  12. package/dist/authentication.d.ts +3 -3
  13. package/dist/authentication.esm.js +2 -2
  14. package/dist/{authenticationManager-DXTIUcma.d.ts → authenticationManager-CjXBjC-c.d.ts} +1 -1
  15. package/dist/{authenticationManager-C4B4-29g.esm.js → authenticationManager-D-UWdyhr.esm.js} +3 -3
  16. package/dist/{authenticationStateMachine-DJ0zUm-A.esm.js → authenticationStateMachine-Cklrmjfo.esm.js} +3 -3
  17. package/dist/certificate-issuance.esm.js +2 -2
  18. package/dist/{certificateIssuanceManager-Bfvkq7Cy.esm.js → certificateIssuanceManager-C3-CI0_s.esm.js} +1 -1
  19. package/dist/{certificateIssuanceStateMachine-BBD5h8c4.esm.js → certificateIssuanceStateMachine-CxqS_nD-.esm.js} +1 -1
  20. package/dist/consent.d.ts +1 -1
  21. package/dist/consent.esm.js +2 -2
  22. package/dist/{consentManager-B5Vqdez-.esm.js → consentManager-B6E1XJDw.esm.js} +1 -1
  23. package/dist/{consentManager-uhDPdU6i.d.ts → consentManager-BhYFeKiG.d.ts} +8 -8
  24. package/dist/{consentStateMachine-DbUmqWgV.esm.js → consentStateMachine-DTSfdGiW.esm.js} +1 -1
  25. package/dist/{createCameraCycleOwnership-DQ5-F2oW.esm.js → createCameraCycleOwnership-CX3hJGKc.esm.js} +1 -1
  26. package/dist/cross-document-data-match.esm.js +1 -1
  27. package/dist/{crossDocumentDataMatchManager-QMOGwHXR.esm.js → crossDocumentDataMatchManager-9XhFVZ5S.esm.js} +1 -1
  28. package/dist/curp-validation.esm.js +2 -2
  29. package/dist/{curpValidationManager-D1ppROcF.esm.js → curpValidationManager-DbIMYFcJ.esm.js} +1 -1
  30. package/dist/{curpValidationStateMachine-DvUPC_8S.esm.js → curpValidationStateMachine-g5kMfuLj.esm.js} +1 -1
  31. package/dist/custom-fields.esm.js +1 -1
  32. package/dist/custom-watchlist.esm.js +2 -2
  33. package/dist/{customFieldsManager-2j_PBq4U.esm.js → customFieldsManager-CzWZTkW-.esm.js} +1 -1
  34. package/dist/{customWatchlistManager-DUVrEdw9.esm.js → customWatchlistManager-DWTED5Ur.esm.js} +1 -1
  35. package/dist/{customWatchlistStateMachine-qZVgkKgP.esm.js → customWatchlistStateMachine-DOQou6TW.esm.js} +1 -1
  36. package/dist/{deepsightLoader-Dm7ejW4v.esm.js → deepsightLoader-BNDIPbEK.esm.js} +4 -4
  37. package/dist/document-capture.esm.js +2 -2
  38. package/dist/{documentCaptureManager-DR_Wv-3H.esm.js → documentCaptureManager-CwAiM9WY.esm.js} +1 -1
  39. package/dist/{documentCaptureStateMachine-CWOATHfE.esm.js → documentCaptureStateMachine-DfGOBapD.esm.js} +1 -1
  40. package/dist/dynamic-forms.esm.js +2 -2
  41. package/dist/{dynamicFormsManager-Dt98SDfV.esm.js → dynamicFormsManager-DOu0Xgs0.esm.js} +1 -1
  42. package/dist/{dynamicFormsStateMachine-obKr4IIp.esm.js → dynamicFormsStateMachine-DehYndAZ.esm.js} +2 -2
  43. package/dist/ekyb.esm.js +3 -3
  44. package/dist/{ekybManager-DNZKrKF3.esm.js → ekybManager-CCcz4-FC.esm.js} +1 -1
  45. package/dist/{ekybStateMachine-DjhHQXZ8.esm.js → ekybStateMachine-xesYf5pK.esm.js} +3 -3
  46. package/dist/ekyc.esm.js +2 -2
  47. package/dist/{ekycManager-CmQBpeiI.esm.js → ekycManager-BlQ-Qj4E.esm.js} +1 -1
  48. package/dist/{ekycStateMachine-CmdW2gVm.esm.js → ekycStateMachine-CshSNJhh.esm.js} +2 -2
  49. package/dist/electronic-signature.esm.js +1 -1
  50. package/dist/{electronicSignatureManager-DzulxM4_.esm.js → electronicSignatureManager-8VGN2aKU.esm.js} +2 -2
  51. package/dist/email.esm.js +2 -2
  52. package/dist/{emailManager-B5ek_UfM.esm.js → emailManager-bR1N5rV_.esm.js} +1 -1
  53. package/dist/{emailStateMachine-CyPFZ7dW.esm.js → emailStateMachine-Bc_6oIYw.esm.js} +1 -1
  54. package/dist/{endpoints-D3B9mUHh.esm.js → endpoints-B-3Q-LUw.esm.js} +0 -3
  55. package/dist/extensibility.d.ts +10 -10
  56. package/dist/extensibility.esm.js +33 -33
  57. package/dist/face-match.esm.js +2 -2
  58. package/dist/{faceCaptureManagerFactory-CvtqcLxs.d.ts → faceCaptureManagerFactory-BeUl8fl1.d.ts} +4 -5
  59. package/dist/{faceCaptureManagerFactory-pCmG4MeF.esm.js → faceCaptureManagerFactory-Bl6EffXD.esm.js} +1 -1
  60. package/dist/{faceCaptureSetup-BSextack.esm.js → faceCaptureSetup-CDGmqC8J.esm.js} +46 -64
  61. package/dist/{faceMatchManager-Caal2zyV.esm.js → faceMatchManager-Bmv0HzuY.esm.js} +1 -1
  62. package/dist/{faceMatchStateMachine-BUc5FXYy.esm.js → faceMatchStateMachine-mRIHQ3dA.esm.js} +1 -1
  63. package/dist/{feature-management-B0sGlozZ.esm.js → feature-management-J3rr-HDW.esm.js} +1 -1
  64. package/dist/feature-management.esm.js +1 -1
  65. package/dist/field-comparison.esm.js +1 -1
  66. package/dist/{fieldComparisonManager-BIs6HPJG.esm.js → fieldComparisonManager-CC-klG0h.esm.js} +1 -1
  67. package/dist/fiscal-qr.d.ts +1 -1
  68. package/dist/fiscal-qr.esm.js +1 -1
  69. package/dist/{fiscalQrManager-CHcBJwUM.d.ts → fiscalQrManager-B1STmT6z.d.ts} +4 -1
  70. package/dist/{fiscalQrManager-Bp_-3LJr.esm.js → fiscalQrManager-BunLVFbd.esm.js} +16 -4
  71. package/dist/flow.d.ts +2 -2
  72. package/dist/flow.esm.js +3 -3
  73. package/dist/{flowCompletionService-CLtbWhSK.esm.js → flowCompletionService-CayNS1FR.esm.js} +2 -2
  74. package/dist/{flowServices-B5FwukTQ.esm.js → flowServices-DX5ygAyn.esm.js} +5 -5
  75. package/dist/geolocation.esm.js +2 -2
  76. package/dist/{geolocationManager-DIw-xq9a.esm.js → geolocationManager-DYXuNsN2.esm.js} +1 -1
  77. package/dist/{geolocationStateMachine-DpG0TFOU.esm.js → geolocationStateMachine-C-37vSiR.esm.js} +2 -2
  78. package/dist/government-validation.esm.js +2 -2
  79. package/dist/{governmentValidationManager-TjC9iVjH.esm.js → governmentValidationManager-CacFOtKO.esm.js} +1 -1
  80. package/dist/{governmentValidationStateMachine-D1ZnEqdd.esm.js → governmentValidationStateMachine-CoaZOSTP.esm.js} +1 -1
  81. package/dist/id-ocr.esm.js +2 -2
  82. package/dist/id-selfie-flow.d.ts +1 -1
  83. package/dist/id-selfie-flow.esm.js +9 -9
  84. package/dist/id-verification.esm.js +2 -2
  85. package/dist/id.d.ts +3 -3
  86. package/dist/id.esm.js +4 -4
  87. package/dist/{idCaptureDefaults-BcxjQDI3.esm.js → idCaptureDefaults-CxOh31Xf.esm.js} +272 -29
  88. package/dist/{idCaptureManager-Vby8oYqh.esm.js → idCaptureManager-BFtpmjsP.esm.js} +3 -3
  89. package/dist/{idCaptureManager-CvmHOWWd.d.ts → idCaptureManager-De7O0TOD.d.ts} +33 -15
  90. package/dist/{idCaptureServices-CJIxD9ep.esm.js → idCaptureServices-C7aPT72E.esm.js} +69 -120
  91. package/dist/{idCaptureStateMachine-CmqihkUy.esm.js → idCaptureStateMachine-BEbzg_R1.esm.js} +217 -83
  92. package/dist/{idOcrManager-DHU22hVn.esm.js → idOcrManager-r46XfZGE.esm.js} +1 -1
  93. package/dist/{idOcrStateMachine-33UvRAHE.esm.js → idOcrStateMachine-ClDEP-VI.esm.js} +1 -1
  94. package/dist/{idVerificationManager-CyaixD0D.esm.js → idVerificationManager-DT42c77H.esm.js} +1 -1
  95. package/dist/{idVerificationStateMachine-BPGrQZEm.esm.js → idVerificationStateMachine-DbDVIh9t.esm.js} +1 -1
  96. package/dist/identity-reuse.esm.js +2 -2
  97. package/dist/{identityReuseManager-CWaNHBO3.esm.js → identityReuseManager-yG3acUrQ.esm.js} +1 -1
  98. package/dist/{identityReuseStateMachine-CQgnATo5.esm.js → identityReuseStateMachine-BhAkuIra.esm.js} +1 -1
  99. package/dist/index.esm.js +1 -1
  100. package/dist/mandatory-consent.d.ts +1 -1
  101. package/dist/mandatory-consent.esm.js +2 -2
  102. package/dist/{mandatoryConsentManager-Du-m-tZ_.esm.js → mandatoryConsentManager-7dI0D08q.esm.js} +1 -1
  103. package/dist/{mandatoryConsentManager-CJSyhTpi.d.ts → mandatoryConsentManager-vhv1co_n.d.ts} +4 -4
  104. package/dist/{mandatoryConsentStateMachine-DSDAk7WZ.esm.js → mandatoryConsentStateMachine-DC5Mo6M1.esm.js} +1 -1
  105. package/dist/{multipartRecordingService-B3C_zlev.esm.js → multipartRecordingService-OEgIRvqC.esm.js} +14 -3
  106. package/dist/personhood.d.ts +3 -3
  107. package/dist/personhood.esm.js +5 -5
  108. package/dist/phone.esm.js +2 -2
  109. package/dist/{phoneManager-N1-sbrY4.esm.js → phoneManager-IjhSv5XS.esm.js} +1 -1
  110. package/dist/{phoneStateMachine-jl8LJKCo.esm.js → phoneStateMachine-CXdXufKg.esm.js} +1 -1
  111. package/dist/qe-signature.esm.js +1 -1
  112. package/dist/redirect-to-mobile.esm.js +2 -2
  113. package/dist/{redirectToMobileManager-DsFzdTwA.esm.js → redirectToMobileManager-FLEWJtv8.esm.js} +1 -1
  114. package/dist/{redirectToMobileStateMachine-v3otpT-L.esm.js → redirectToMobileStateMachine-CSWWgUTO.esm.js} +1 -1
  115. package/dist/{runChildModule-TuyGE00X.esm.js → runChildModule-CT0aKjFV.esm.js} +1 -1
  116. package/dist/{sdkVersion-CLxKvdyz.esm.js → sdkVersion-DTrl2Jm7.esm.js} +1 -1
  117. package/dist/selfie.d.ts +4 -4
  118. package/dist/selfie.esm.js +7 -7
  119. package/dist/{selfieErrorUtils-C77GXJH6.esm.js → selfieErrorUtils-UiQ46EBa.esm.js} +2 -2
  120. package/dist/{selfieManager-CihVnODO.esm.js → selfieManager-0gvnAH1m.esm.js} +3 -3
  121. package/dist/{selfieManager-D1KRJ39M.d.ts → selfieManager-4RRLi21P.d.ts} +1 -1
  122. package/dist/{selfieStateMachine-fwMmNtOi.esm.js → selfieStateMachine-rfneTd9x.esm.js} +4 -4
  123. package/dist/{session-BHIeAamR.esm.js → session-ZAdron5D.esm.js} +4 -4
  124. package/dist/session.esm.js +4 -4
  125. package/dist/{sessionInitializer-BLoK7SP9.esm.js → sessionInitializer-C1A6s33W.esm.js} +5 -5
  126. package/dist/{setup-msLybMbC.esm.js → setup-6e71xCI7.esm.js} +6 -6
  127. package/dist/signature.esm.js +2 -2
  128. package/dist/{signatureManager-ChsB-nMD.esm.js → signatureManager-B72np4ZO.esm.js} +1 -1
  129. package/dist/{signatureStateMachine-BHPwkJZS.esm.js → signatureStateMachine-ce_XMA3l.esm.js} +1 -1
  130. package/dist/{stats-DkK-f8JT.esm.js → stats-CZcy2J53.esm.js} +1 -1
  131. package/dist/stats.esm.js +1 -1
  132. package/dist/{trueSightService-CKrrfV0Q.esm.js → trueSightService-DJ1kSDlH.esm.js} +3 -3
  133. package/dist/{types-CM-jtjJ2.d.ts → types-Bnl58jUQ.d.ts} +2 -6
  134. package/dist/{types-ZT1XFIJ8.d.ts → types-ChAowIxT.d.ts} +1 -1
  135. package/dist/{types-CjKBS37a2.d.ts → types-byBHOzCG2.d.ts} +5 -15
  136. package/dist/video-selfie.d.ts +1 -1
  137. package/dist/video-selfie.esm.js +6 -6
  138. package/dist/{videoSelfieCameraWarmer-CB1IzZkt.esm.js → videoSelfieCameraWarmer-BqXupt3L.esm.js} +6 -6
  139. package/dist/{videoSelfieStepDetector-5YHFe0Mq.d.ts → videoSelfieStepDetector-Co0Gu2k2.d.ts} +43 -13
  140. package/dist/{virtualCameraCheck-WOloJ-do.esm.js → virtualCameraCheck-Cjab7FTI.esm.js} +1 -1
  141. package/dist/wasm.esm.js +1 -1
  142. package/dist/watchlist-for-business.esm.js +2 -2
  143. package/dist/watchlist.esm.js +2 -2
  144. package/dist/{watchlistForBusinessManager-CpuuB1J2.esm.js → watchlistForBusinessManager-CIMkpEhu.esm.js} +1 -1
  145. package/dist/{watchlistForBusinessStateMachine-DEzgjz7C.esm.js → watchlistForBusinessStateMachine-CJ-MvUre.esm.js} +1 -1
  146. package/dist/{watchlistManager-CI8BHFob.esm.js → watchlistManager-CixcLNDT.esm.js} +1 -1
  147. package/dist/{watchlistStateMachine-DvOby3a-.esm.js → watchlistStateMachine-CBqk2w-h.esm.js} +1 -1
  148. package/dist/workflow.esm.js +34 -34
  149. package/package.json +1 -1
@@ -6,14 +6,14 @@ import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapabil
6
6
  import "./index-B8weJxmL.js";
7
7
  import "./createFaceAvatar-BlcTYgJv.js";
8
8
  import { a as RegulationTypes } from "./types-Do5rEXij.js";
9
- import { n as VirtualCameraCheckOutput, r as WasmUtilConfig, t as IWasmUtilCapability } from "./IWasmUtilCapability-CXXDA5l1.js";
9
+ import { n as VirtualCameraCheckOutput, r as WasmUtilConfig, t as IWasmUtilCapability } from "./IWasmUtilCapability-CNWRl7jr.js";
10
10
  import { n as PermissionStatus } from "./types-BEwVKkLJ.js";
11
11
  import { t as BaseWasmProvider } from "./BaseWasmProvider-Dyi6dKp1.js";
12
12
  import "./types-BT_Oalip.js";
13
- import { n as DeepsightService } from "./StreamCanvasCapture-B3YT2Bt6.js";
13
+ import { n as DeepsightService } from "./StreamCanvasCapture-_8gdW5Lk.js";
14
14
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
15
15
  import { i as Pdf417DecodeResult, n as IIdCaptureCapability, t as DetectionOrientation } from "./IIdCaptureCapability-RNiFhvXR.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-CjKBS37a2.js";
16
+ import { C as IdDocumentType, D as UploadIdResponse, L as DeviceWalletFailReason, N as ManualUploadSide, O as IAnalyticsCapability, P as ManualUploadTab, T as IdErrorCode, X as FailureReason, Y as DigitalIdProviderId, _ as IdCaptureInput, b as IdCaptureOutput, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, h as IdCaptureEvent, i as CaptureIdResponse, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureMode, y as IdCaptureOnlyConfig, z as DeviceWalletPlatform } from "./types-byBHOzCG2.js";
17
17
  //#region ../infra/src/providers/wasm/WasmUtilProvider.d.ts
18
18
  declare class WasmUtilProvider extends BaseWasmProvider implements IWasmUtilCapability {
19
19
  private static instance;
@@ -120,24 +120,42 @@ declare function uploadIdImage(params: UploadIdImageParams): Promise<CaptureIdRe
120
120
  type StartRecordingParams = {
121
121
  config: IdCaptureConfig;
122
122
  stream: CameraStream;
123
- existing?: RecordingSession;
123
+ existing?: object;
124
124
  type: 'frontId' | 'backId';
125
125
  };
126
- declare function preloadIdRecordingProvider(config: IdCaptureConfig): void;
127
- declare function startRecordingSession(params: StartRecordingParams): Promise<RecordingSession | undefined>;
128
- declare function pauseRecordingForAttempt(session: RecordingSession): void;
129
- declare function prepareRecordingForCameraRetry(session: RecordingSession): void;
126
+ declare function startRecordingSession(params: StartRecordingParams): Promise<object | undefined>;
127
+ declare function pauseRecordingForAttempt(session: object): void;
128
+ declare function prepareRecordingForCameraRetry(session: object): void;
129
+ /**
130
+ * Resumes a recording paused with `pauseRecordingForAttempt` while its camera
131
+ * clone is still attached (no source replacement pending). Returns whether the
132
+ * recorder is recording again.
133
+ */
134
+ declare function resumeRecordingAfterPause(session: object): boolean;
135
+ /**
136
+ * True only for a live SDK-managed multipart session. A session that has
137
+ * already been finalized or disposed is no longer in the registry, so callers
138
+ * use this to avoid resuming or re-pausing a torn-down recording.
139
+ */
140
+ declare function isSuspendableRecordingSession(session: object): boolean;
130
141
  type FinalizedIdRecording = Readonly<{
131
142
  recordingId?: string | null;
132
143
  }>;
133
144
  /**
134
- * Fully drains an ID recording before the protected camera cycle runs POC.
135
- * Every recorder clone is stopped before this promise settles.
145
+ * Completes an ID recording: drains the multipart upload and releases the
146
+ * compositor. The camera clone ends synchronously, before this function
147
+ * returns its promise, so a step that ends mid-attempt never pins the camera
148
+ * while the upload finishes (ENG-56648). The composite canvas stays alive until
149
+ * the recorder has emitted its final chunk.
150
+ */
151
+ declare function finalizeRecordingSession(session: object): Promise<FinalizedIdRecording>;
152
+ /**
153
+ * Teardown for an attempt released before finalization. The camera clone ends
154
+ * synchronously, before this function returns; the upload completes in the
155
+ * background with whatever was recorded.
136
156
  */
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;
140
- declare function stopRecording(session: RecordingSession): void;
157
+ declare function disposeRecordingSession(session: object): void;
158
+ declare function stopRecording(session: object): void;
141
159
  declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
142
160
  isDocumentExpired: boolean;
143
161
  }>;
@@ -624,4 +642,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
624
642
  deviceWalletUseAnotherMethod(): void;
625
643
  };
626
644
  //#endregion
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 };
645
+ export { pauseRecordingForAttempt as A, WasmUtilProvider as B, addBarcode as C, getRealQualityValue as D, finalizeRecordingSession as E, stopRecording as F, stopStream as I, uploadIdImage as L, processId as M, resumeRecordingAfterPause as N, initializeIdCapture as O, startRecordingSession as P, uploadManualIdFile 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, isSuspendableRecordingSession 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, validateUploadResponse as z };
@@ -1,16 +1,15 @@
1
- import { t as ensureWasmPipelines } from "./setup-msLybMbC.esm.js";
2
- import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-B0sGlozZ.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-6e71xCI7.esm.js";
2
+ import { i as numberParam, n as defineExperimentParams, t as booleanParam, u as resolveExperimentOnce } from "./feature-management-J3rr-HDW.esm.js";
3
3
  import { t as api } from "./api-Bx3gKW_y.esm.js";
4
- import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
4
+ import { t as endpoints } from "./endpoints-B-3Q-LUw.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
8
  import { s as queryCameraPermission } from "./permissionServices-Bj_fyWtv.esm.js";
9
- import { n as startRecording, r as stopRecording$1, t as createRecordingSession } from "./recordingsRepository-CCWy13M-.esm.js";
10
9
  import { a as isBackFacingTrack, n as getBackCameraStream } from "./backCameraStream-BOtyQowf.esm.js";
11
10
  import { t as getDeviceClass } from "./getDeviceClass-5NYZg9s6.esm.js";
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-BcxjQDI3.esm.js";
11
+ import { t as MultipartRecordingService } from "./multipartRecordingService-OEgIRvqC.esm.js";
12
+ import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider } from "./idCaptureDefaults-CxOh31Xf.esm.js";
14
13
  //#region src/internal/camera/cameraServices.ts
15
14
  function createCameraServices(camera) {
16
15
  return {
@@ -569,55 +568,16 @@ async function uploadIdImage(params) {
569
568
  throw new Error(`${ID_ERROR_CODES.UPLOAD_ERROR}: ${errorMessage}`);
570
569
  }
571
570
  }
572
- function buildStandardResolution(width, height) {
573
- return height > width ? {
574
- width: 1080,
575
- height: 1920
576
- } : {
577
- width: 1920,
578
- height: 1080
579
- };
580
- }
581
- function buildResolutionFromStream(stream) {
582
- const track = stream.getVideoTracks()[0];
583
- if (!track) return "1080x1920";
584
- const settings = track.getSettings();
585
- const width = settings.width;
586
- const height = settings.height;
587
- if (typeof width === "number" && typeof height === "number") {
588
- const standard = buildStandardResolution(width, height);
589
- return `${standard.width}x${standard.height}`;
590
- }
591
- return "1080x1920";
592
- }
593
- function preloadIdRecordingProvider(config) {}
594
571
  const multipartIdSessions = /* @__PURE__ */ new WeakMap();
595
- const legacyIdRecordingStreams = /* @__PURE__ */ new WeakMap();
596
572
  const idRecordingFinalizations = /* @__PURE__ */ new WeakMap();
597
- const releasedLegacyIdRecordings = /* @__PURE__ */ new WeakSet();
598
- const legacyIdDisconnects = /* @__PURE__ */ new WeakMap();
599
- function createMultipartSessionHandle(service, compositor, recordingSource, resolution, hasAudio) {
600
- const session = {
601
- token: "",
602
- sessionId: "",
603
- videoRecordingId: "",
604
- connection: {
605
- sessionId: void 0,
606
- publisher: {
607
- getStreamId: () => void 0,
608
- replaceVideoTrack: async () => {},
609
- destroy: () => {}
610
- },
611
- disconnect: async () => {}
612
- },
613
- resolution,
614
- hasAudio
615
- };
573
+ function createMultipartSessionHandle(service, compositor, recordingSource) {
574
+ const session = {};
616
575
  multipartIdSessions.set(session, {
617
576
  compositor,
618
577
  needsVideoSourceReplacement: false,
619
578
  recorderPaused: false,
620
579
  recordingSource,
580
+ audioSource: recordingSource.getAudioTracks(),
621
581
  service
622
582
  });
623
583
  return session;
@@ -639,46 +599,18 @@ async function startRecordingSession(params) {
639
599
  if (multipartSession) multipartSession.recorderPaused = false;
640
600
  return params.existing;
641
601
  }
642
- const hasAudio = params.stream.getAudioTracks().length > 0;
643
- const resolution = buildResolutionFromStream(params.stream);
644
- if (!params.config.recording?.capability) {
645
- const service = new MultipartRecordingService(params.type);
646
- const recordingSource = params.stream.clone();
647
- const compositor = new CameraCompositor({ fps: 30 });
648
- try {
649
- const recordingStream = compositor.start(recordingSource);
650
- await service.start(recordingStream);
651
- } catch (error) {
652
- compositor.stop();
653
- service.cleanup();
654
- throw error;
655
- }
656
- return createMultipartSessionHandle(service, compositor, recordingSource, resolution, hasAudio);
602
+ const service = new MultipartRecordingService(params.type);
603
+ const recordingSource = params.stream.clone();
604
+ const compositor = new CameraCompositor({ fps: 30 });
605
+ try {
606
+ const recordingStream = compositor.start(recordingSource);
607
+ await service.start(recordingStream);
608
+ } catch (error) {
609
+ compositor.stop();
610
+ service.cleanup();
611
+ throw error;
657
612
  }
658
- const provider = params.config.recording.capability;
659
- const clonedStream = params.stream.clone();
660
- const session = await createRecordingSession(params.type);
661
- const connection = await provider.connect({
662
- sessionToken: session.token,
663
- stream: clonedStream,
664
- events: {}
665
- });
666
- await startRecording({
667
- videoRecordingId: session.videoRecordingId,
668
- type: params.type,
669
- resolution,
670
- hasAudio
671
- });
672
- const recordingSession = {
673
- token: session.token,
674
- sessionId: session.sessionId,
675
- videoRecordingId: session.videoRecordingId,
676
- connection,
677
- resolution,
678
- hasAudio
679
- };
680
- legacyIdRecordingStreams.set(recordingSession, clonedStream);
681
- return recordingSession;
613
+ return createMultipartSessionHandle(service, compositor, recordingSource);
682
614
  }
683
615
  function pauseRecordingForAttempt(session) {
684
616
  const multipartSession = multipartIdSessions.get(session);
@@ -689,68 +621,85 @@ function prepareRecordingForCameraRetry(session) {
689
621
  const multipartSession = multipartIdSessions.get(session);
690
622
  if (!multipartSession) return;
691
623
  if (!multipartSession.recorderPaused) multipartSession.recorderPaused = multipartSession.service.pause();
692
- multipartSession.compositor.pause();
693
- multipartSession.recordingSource.getVideoTracks().forEach((track) => track.stop());
624
+ releaseCameraClone(multipartSession, { keepAudio: true });
694
625
  multipartSession.needsVideoSourceReplacement = true;
695
626
  }
696
- function releaseLegacyRecordingResources(session) {
697
- if (releasedLegacyIdRecordings.has(session)) return;
698
- releasedLegacyIdRecordings.add(session);
627
+ /**
628
+ * Resumes a recording paused with `pauseRecordingForAttempt` while its camera
629
+ * clone is still attached (no source replacement pending). Returns whether the
630
+ * recorder is recording again.
631
+ */
632
+ function resumeRecordingAfterPause(session) {
633
+ const multipartSession = multipartIdSessions.get(session);
634
+ if (!multipartSession || multipartSession.needsVideoSourceReplacement) return false;
635
+ if (!multipartSession.recorderPaused) return true;
636
+ if (!multipartSession.service.resume()) return false;
637
+ multipartSession.recorderPaused = false;
638
+ return true;
639
+ }
640
+ /**
641
+ * True only for a live SDK-managed multipart session. A session that has
642
+ * already been finalized or disposed is no longer in the registry, so callers
643
+ * use this to avoid resuming or re-pausing a torn-down recording.
644
+ */
645
+ function isSuspendableRecordingSession(session) {
646
+ return multipartIdSessions.has(session);
647
+ }
648
+ /**
649
+ * Ends the compositor's camera clone on the calling thread. The composite
650
+ * stream and its upload stay alive; only the tracks that pin the physical
651
+ * camera end. `keepAudio` preserves the compositor's audio track across a
652
+ * video-source swap. Every release path must call this before any async work
653
+ * so no camera clone can overlap a PRC or POC camera switch (ENG-47407) or pin
654
+ * the device for the next module (ENG-56648).
655
+ */
656
+ function releaseCameraClone(multipartSession, options) {
699
657
  try {
700
- session.connection.publisher.destroy();
658
+ multipartSession.compositor.pause();
701
659
  } catch {}
702
- const clonedStream = legacyIdRecordingStreams.get(session);
703
- legacyIdRecordingStreams.delete(session);
704
- for (const track of clonedStream?.getTracks() ?? []) try {
660
+ const tracks = options.keepAudio ? multipartSession.recordingSource.getVideoTracks() : /* @__PURE__ */ new Set([...multipartSession.recordingSource.getTracks(), ...multipartSession.audioSource]);
661
+ for (const track of tracks) try {
705
662
  track.stop();
706
663
  } catch {}
707
664
  }
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
665
  /**
716
- * Fully drains an ID recording before the protected camera cycle runs POC.
717
- * Every recorder clone is stopped before this promise settles.
666
+ * Completes an ID recording: drains the multipart upload and releases the
667
+ * compositor. The camera clone ends synchronously, before this function
668
+ * returns its promise, so a step that ends mid-attempt never pins the camera
669
+ * while the upload finishes (ENG-56648). The composite canvas stays alive until
670
+ * the recorder has emitted its final chunk.
718
671
  */
719
672
  async function finalizeRecordingSession(session) {
720
673
  const existing = idRecordingFinalizations.get(session);
721
674
  if (existing) return existing;
722
675
  const multipartSession = multipartIdSessions.get(session);
723
- const finalization = multipartSession ? (async () => {
724
- multipartIdSessions.delete(session);
676
+ if (!multipartSession) return {};
677
+ multipartIdSessions.delete(session);
678
+ releaseCameraClone(multipartSession, { keepAudio: false });
679
+ const finalization = (async () => {
725
680
  try {
726
681
  return await multipartSession.service.stop();
727
682
  } finally {
728
683
  multipartSession.compositor.stop();
729
684
  }
730
- })() : (async () => {
731
- try {
732
- await stopRecording$1(session.videoRecordingId);
733
- return { recordingId: session.videoRecordingId || null };
734
- } finally {
735
- releaseLegacyRecordingResources(session);
736
- await disconnectLegacyRecording(session);
737
- }
738
685
  })();
739
686
  idRecordingFinalizations.set(session, finalization);
740
687
  return finalization;
741
688
  }
742
- /** Synchronous teardown used when an attempt is cancelled before finalization. */
689
+ /**
690
+ * Teardown for an attempt released before finalization. The camera clone ends
691
+ * synchronously, before this function returns; the upload completes in the
692
+ * background with whatever was recorded.
693
+ */
743
694
  function disposeRecordingSession(session) {
744
695
  const multipartSession = multipartIdSessions.get(session);
745
696
  if (multipartSession) {
746
697
  multipartIdSessions.delete(session);
698
+ releaseCameraClone(multipartSession, { keepAudio: false });
747
699
  const finalization = multipartSession.service.stop().finally(() => multipartSession.compositor.stop());
748
700
  idRecordingFinalizations.set(session, finalization);
749
701
  finalization.catch(() => {});
750
- return;
751
702
  }
752
- releaseLegacyRecordingResources(session);
753
- disconnectLegacyRecording(session).catch(() => {});
754
703
  }
755
704
  function stopRecording(session) {
756
705
  finalizeRecordingSession(session).catch(() => {});
@@ -830,4 +779,4 @@ async function addBarcode(params) {
830
779
  return res.data;
831
780
  }
832
781
  //#endregion
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 };
782
+ export { getIdCameraStream as C, OPTIMIZING_WATCHDOG_MARGIN_MS as S, validateUploadResponse as _, getRealQualityValue as a, resolveIdCaptureThresholds as b, pauseRecordingForAttempt as c, resumeRecordingAfterPause as d, startRecordingSession as f, uploadManualIdFile as g, uploadIdImage as h, finalizeRecordingSession as i, prepareRecordingForCameraRetry as l, stopStream as m, barcodeToBase64 as n, initializeIdCapture as o, stopRecording as p, disposeRecordingSession as r, isSuspendableRecordingSession as s, addBarcode as t, processId as u, ID_ERROR_CODES as v, CAPTURE_OPTIMIZING as x, resolveCaptureOptimizingTreatment as y };