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

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-CU6kBvqv.esm.js} +1 -1
  2. package/dist/{FaceDetectionProvider-DTetAE8H.esm.js → FaceDetectionProvider-BfhWkK90.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-Budb6m6w.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-cMXhG70r.esm.js} +3 -3
  16. package/dist/{authenticationStateMachine-DJ0zUm-A.esm.js → authenticationStateMachine-MOYz4HCf.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-DDv3vhXU.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-BbS-XMFc.esm.js} +1 -1
  42. package/dist/{dynamicFormsStateMachine-obKr4IIp.esm.js → dynamicFormsStateMachine-D8zHBCh4.esm.js} +2 -2
  43. package/dist/ekyb.esm.js +3 -3
  44. package/dist/{ekybManager-DNZKrKF3.esm.js → ekybManager-5aiac8wL.esm.js} +1 -1
  45. package/dist/{ekybStateMachine-DjhHQXZ8.esm.js → ekybStateMachine-Bn2IE9rx.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-BJJH0Tvi.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-pCmG4MeF.esm.js → faceCaptureManagerFactory-B7Ms6pSs.esm.js} +1 -1
  59. package/dist/{faceCaptureManagerFactory-CvtqcLxs.d.ts → faceCaptureManagerFactory-BeUl8fl1.d.ts} +4 -5
  60. package/dist/{faceCaptureSetup-BSextack.esm.js → faceCaptureSetup-bkAlr5d8.esm.js} +25 -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-E0mq0pMs.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-DJp1odGN.esm.js} +2 -2
  74. package/dist/{flowServices-B5FwukTQ.esm.js → flowServices-DjPFGs_D.esm.js} +5 -5
  75. package/dist/geolocation.esm.js +2 -2
  76. package/dist/{geolocationManager-DIw-xq9a.esm.js → geolocationManager-D5906YXx.esm.js} +1 -1
  77. package/dist/{geolocationStateMachine-DpG0TFOU.esm.js → geolocationStateMachine-BVOduc3y.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-CbPA-Auz.esm.js} +272 -29
  88. package/dist/{idCaptureManager-CvmHOWWd.d.ts → idCaptureManager-DKESug0R.d.ts} +11 -12
  89. package/dist/{idCaptureManager-Vby8oYqh.esm.js → idCaptureManager-rfV9dIXy.esm.js} +3 -3
  90. package/dist/{idCaptureServices-CJIxD9ep.esm.js → idCaptureServices-i1KxugN7.esm.js} +21 -119
  91. package/dist/{idCaptureStateMachine-CmqihkUy.esm.js → idCaptureStateMachine-Ne_PXth_.esm.js} +16 -26
  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-CI1gGWN1.esm.js} +1 -1
  116. package/dist/{sdkVersion-CLxKvdyz.esm.js → sdkVersion-BZh6dj53.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-D1KRJ39M.d.ts → selfieManager-4RRLi21P.d.ts} +1 -1
  121. package/dist/{selfieManager-CihVnODO.esm.js → selfieManager-B-2c1n_x.esm.js} +3 -3
  122. package/dist/{selfieStateMachine-fwMmNtOi.esm.js → selfieStateMachine-Bzx41R8d.esm.js} +4 -4
  123. package/dist/{session-BHIeAamR.esm.js → session-3LmvAU4S.esm.js} +4 -4
  124. package/dist/session.esm.js +4 -4
  125. package/dist/{sessionInitializer-BLoK7SP9.esm.js → sessionInitializer-BFk33E67.esm.js} +5 -5
  126. package/dist/{setup-msLybMbC.esm.js → setup-BWG-hivt.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-BN-Hzw82.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-B8PcYqmz.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
@@ -1,3 +1,3 @@
1
- import { t as createGeolocationManager } from "./geolocationManager-DIw-xq9a.esm.js";
2
- import { t as geolocationMachine } from "./geolocationStateMachine-DpG0TFOU.esm.js";
1
+ import { t as createGeolocationManager } from "./geolocationManager-D5906YXx.esm.js";
2
+ import { t as geolocationMachine } from "./geolocationStateMachine-BVOduc3y.esm.js";
3
3
  export { createGeolocationManager, geolocationMachine };
@@ -1,6 +1,6 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
2
2
  import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
3
- import { t as geolocationMachine } from "./geolocationStateMachine-DpG0TFOU.esm.js";
3
+ import { t as geolocationMachine } from "./geolocationStateMachine-BVOduc3y.esm.js";
4
4
  //#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
5
5
  var BrowserGeolocationProvider = class {
6
6
  getCurrentPosition() {
@@ -1,7 +1,7 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
2
+ import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
3
3
  import { a as isIOS, t as isAndroid } from "./platform-DkcRc9JV.esm.js";
4
- import { n as isConnectivityError } from "./apiError-D0v5hFyN.esm.js";
4
+ import { n as isConnectivityError } from "./apiError-Budb6m6w.esm.js";
5
5
  import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
6
6
  import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
7
7
  //#region src/modules/geolocation/geolocationServices.ts
@@ -1,3 +1,3 @@
1
- import { t as governmentValidationMachine } from "./governmentValidationStateMachine-D1ZnEqdd.esm.js";
2
- import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-TjC9iVjH.esm.js";
1
+ import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CoaZOSTP.esm.js";
2
+ import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-CacFOtKO.esm.js";
3
3
  export { createGovernmentValidationManager, createGovernmentValidationManagerFromActor, governmentValidationMachine };
@@ -1,7 +1,7 @@
1
1
  import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ijlbX_Wx.esm.js";
2
2
  import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
3
3
  import { s as createActor, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
4
- import { t as governmentValidationMachine } from "./governmentValidationStateMachine-D1ZnEqdd.esm.js";
4
+ import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CoaZOSTP.esm.js";
5
5
  //#region src/modules/government-validation/governmentValidationActor.ts
6
6
  function createGovernmentValidationActor(options) {
7
7
  return createActor(governmentValidationMachine, { input: { config: options.config } }).start();
@@ -1,5 +1,5 @@
1
1
  import { t as api } from "./api-Bx3gKW_y.esm.js";
2
- import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
2
+ import { t as endpoints } from "./endpoints-B-3Q-LUw.esm.js";
3
3
  import { i as assign, t as setup } from "./xstate.esm-BuFLFuzz.esm.js";
4
4
  import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
5
5
  //#region src/modules/government-validation/governmentValidationServices.ts
@@ -1,6 +1,6 @@
1
1
  import { t as validateCPF } from "./cpf-BIADjddF.esm.js";
2
- import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-33UvRAHE.esm.js";
3
- import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-DHU22hVn.esm.js";
2
+ import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-ClDEP-VI.esm.js";
3
+ import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-r46XfZGE.esm.js";
4
4
  //#region src/modules/id-ocr/idOcrCpfUtils.ts
5
5
  function formatCPF(value) {
6
6
  const digits = value.replace(/\D/g, "").slice(0, 11);
@@ -4,7 +4,7 @@ import "./Actor-iTq7YY48.js";
4
4
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
5
5
  import { t as DetectionOrientation } from "./IIdCaptureCapability-RNiFhvXR.js";
6
6
  import { n as FinishStatus } from "./flowCompletionService-BlAHsKyv.js";
7
- import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-5YHFe0Mq.js";
7
+ import { a as FacingMode, i as CameraCompositor, n as VideoSelfieDetectionStatus, r as VideoSelfieValidationFailure, s as VideoSelfieStep, t as StepDetector } from "./videoSelfieStepDetector-Co0Gu2k2.js";
8
8
  //#region src/modules/id-selfie-flow/types.d.ts
9
9
  /**
10
10
  * The capture steps an ID + Selfie flow session can run, in flow order. A
@@ -1,18 +1,18 @@
1
- import { t as ensureWasmPipelines } from "./setup-msLybMbC.esm.js";
1
+ import { t as ensureWasmPipelines } from "./setup-BWG-hivt.esm.js";
2
2
  import { r as WasmUtilProvider } from "./safeStorage-B-trhxg6.esm.js";
3
3
  import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
4
- import { a as resolveDashboardModuleConfig, d as facingModeForStep } from "./flowServices-B5FwukTQ.esm.js";
4
+ import { a as resolveDashboardModuleConfig, d as facingModeForStep } from "./flowServices-DjPFGs_D.esm.js";
5
5
  import { i as assign, r as sendTo, s as createActor, t as setup, u as createManager } from "./xstate.esm-BuFLFuzz.esm.js";
6
6
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
7
- import { n as encryptSelfieImage, o as startDetection, t as FaceDetectionProvider } from "./FaceDetectionProvider-DTetAE8H.esm.js";
8
- import { a as StreamCanvasProcessingSession } from "./recordingsRepository-CCWy13M-.esm.js";
7
+ import { n as encryptSelfieImage, o as startDetection, t as FaceDetectionProvider } from "./FaceDetectionProvider-BfhWkK90.esm.js";
8
+ import { t as StreamCanvasProcessingSession } from "./StreamCanvasProcessingSession-CBnbTnOr.esm.js";
9
9
  import { n as getWindowDimensions } from "./getDeviceClass-CeBiEayS.esm.js";
10
- import { a as uploadSelfie, r as processFace } from "./selfieErrorUtils-C77GXJH6.esm.js";
11
- import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-BcxjQDI3.esm.js";
12
- import { _ as ID_ERROR_CODES, g as validateUploadResponse, m as uploadIdImage, u as processId } from "./idCaptureServices-CJIxD9ep.esm.js";
10
+ import { a as uploadSelfie, r as processFace } from "./selfieErrorUtils-UiQ46EBa.esm.js";
11
+ import { i as CameraCompositor, n as DEFAULT_ID_CAPTURE_THRESHOLDS, r as IdCaptureProvider, t as DEFAULT_ID_CAPTURE_GEOMETRY } from "./idCaptureDefaults-CbPA-Auz.esm.js";
12
+ import { g as ID_ERROR_CODES, h as validateUploadResponse, l as processId, p as uploadIdImage } from "./idCaptureServices-i1KxugN7.esm.js";
13
13
  import { t as StreamCanvasCapture } from "./StreamCanvasCapture-C9jtgBdT.esm.js";
14
- import { n as getFinishStatus } from "./flowCompletionService-CLtbWhSK.esm.js";
15
- import { i as delay, n as defaultAcquireCamera, o as isSelfieValidationError, s as isWrongVideoSelfieIdSide } from "./videoSelfieCameraWarmer-CB1IzZkt.esm.js";
14
+ import { n as getFinishStatus } from "./flowCompletionService-DJp1odGN.esm.js";
15
+ import { i as delay, n as defaultAcquireCamera, o as isSelfieValidationError, s as isWrongVideoSelfieIdSide } from "./videoSelfieCameraWarmer-B8PcYqmz.esm.js";
16
16
  //#region src/modules/id-selfie-flow/idSelfieFlowStepDetector.ts
17
17
  /** Default autocapture window for the selfie step. */
18
18
  const SELFIE_AUTOCAPTURE_MS = 1e4;
@@ -1,3 +1,3 @@
1
- import { t as idVerificationMachine } from "./idVerificationStateMachine-BPGrQZEm.esm.js";
2
- import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-CyaixD0D.esm.js";
1
+ import { t as idVerificationMachine } from "./idVerificationStateMachine-DbDVIh9t.esm.js";
2
+ import { n as createIdVerificationManagerFromActor, t as createIdVerificationManager } from "./idVerificationManager-DT42c77H.esm.js";
3
3
  export { createIdVerificationManager, createIdVerificationManagerFromActor, idVerificationMachine };
package/dist/id.d.ts CHANGED
@@ -2,8 +2,8 @@ import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapabil
2
2
  import { n as PermissionStatus, t as PermissionResult } from "./types-BEwVKkLJ.js";
3
3
  import { t as CameraStream } from "./camera-9wWD-pwg.js";
4
4
  import { r as IdCaptureSettings, t as DetectionOrientation } from "./IIdCaptureCapability-RNiFhvXR.js";
5
- import { A as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, B as DeviceWalletPlatform, C as IdDocumentType, D as RecordingSession, E as IdFlowStep, F as ManualUploadTab, G as DigitalIdFunnelEntry, H as DIGITAL_ID_DOCUMENT_TYPES, I as DeviceWalletDecision, J as isRedirectFlowType, K as DigitalIdPlatformSupport, L as DeviceWalletDecryptResponse, M as MANUAL_UPLOAD_MAX_RETRIES, N as ManualUploadContext, O as UploadIdResponse, P as ManualUploadSide, Q as RedirectReturnParams, R as DeviceWalletFailReason, S as IdCapturedImageData, T as IdErrorCode, U as DIGITAL_ID_REGISTRY, V as DeviceWalletProvider, W as DigitalIdDocumentType, X as DigitalIdProviderId, Y as resolveDigitalIdImplementation, _ as IdCaptureInput, a as CaptureOnlyResponse, b as IdCaptureOutput, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureGeometry, h as IdCaptureEvent, i as CaptureIdResponse, j as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, l as ID_ERROR_CODES, m as IdCaptureDigitalIdMethod, n as AcceptedDocumentType, o as CapturedImage, p as IdCaptureDigitalIdFlowType, q as ResolvedDigitalIdRoute, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureMode, w as IdError, x as IdCaptureThresholds, y as IdCaptureOnlyConfig, z as DeviceWalletOutput } from "./types-CjKBS37a2.js";
6
- import { A as preloadIdRecordingProvider, C as addBarcode, D as getRealQualityValue, E as finalizeRecordingSession, F as stopStream, I as uploadIdImage, L as uploadManualIdFile, M as processId, N as startRecordingSession, O as initializeIdCapture, P as stopRecording, R as validateUploadResponse, S as ValidationError, T as disposeRecordingSession, _ as IdCaptureInitResult, a as CreateIdCaptureOnlyActorOptions, b as UploadIdImageParams, c as IdCaptureOnlyMachine, d as IdCaptureActor, f as createIdCaptureActor, g as FinalizedIdRecording, h as AddBarcodeParams, j as prepareRecordingForCameraRetry, k as pauseRecordingForAttempt, l as idCaptureOnlyMachine, m as idCaptureMachine, n as IdCaptureManager, o as IdCaptureOnlyActor, p as IdCaptureMachine, r as IdCaptureState, s as createIdCaptureOnlyActor, t as createIdCaptureManager, u as CreateIdCaptureActorOptions, v as InitializeIdCaptureParams, w as barcodeToBase64, x as UploadManualIdFileParams, y as StartRecordingParams } from "./idCaptureManager-CvmHOWWd.js";
5
+ import { A as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, B as DeviceWalletProvider, C as IdDocumentType, D as UploadIdResponse, E as IdFlowStep, F as DeviceWalletDecision, G as DigitalIdPlatformSupport, H as DIGITAL_ID_REGISTRY, I as DeviceWalletDecryptResponse, J as resolveDigitalIdImplementation, K as ResolvedDigitalIdRoute, L as DeviceWalletFailReason, M as ManualUploadContext, N as ManualUploadSide, P as ManualUploadTab, R as DeviceWalletOutput, S as IdCapturedImageData, T as IdErrorCode, U as DigitalIdDocumentType, V as DIGITAL_ID_DOCUMENT_TYPES, W as DigitalIdFunnelEntry, Y as DigitalIdProviderId, Z as RedirectReturnParams, _ as IdCaptureInput, a as CaptureOnlyResponse, b as IdCaptureOutput, c as DetectionStatus, d as IdCaptureContext, f as IdCaptureDependencies, g as IdCaptureGeometry, h as IdCaptureEvent, i as CaptureIdResponse, j as MANUAL_UPLOAD_MAX_RETRIES, k as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, l as ID_ERROR_CODES, m as IdCaptureDigitalIdMethod, n as AcceptedDocumentType, o as CapturedImage, p as IdCaptureDigitalIdFlowType, q as isRedirectFlowType, r as AddBarcodeV3Response, s as DetectionArea, t as AcceptedDocument, u as IdCaptureConfig, v as IdCaptureMode, w as IdError, x as IdCaptureThresholds, y as IdCaptureOnlyConfig, z as DeviceWalletPlatform } from "./types-byBHOzCG2.js";
6
+ import { A as prepareRecordingForCameraRetry, C as addBarcode, D as getRealQualityValue, E as finalizeRecordingSession, F as uploadIdImage, I as uploadManualIdFile, L as validateUploadResponse, M as startRecordingSession, N as stopRecording, O as initializeIdCapture, P as stopStream, S as ValidationError, T as disposeRecordingSession, _ as IdCaptureInitResult, a as CreateIdCaptureOnlyActorOptions, b as UploadIdImageParams, c as IdCaptureOnlyMachine, d as IdCaptureActor, f as createIdCaptureActor, g as FinalizedIdRecording, h as AddBarcodeParams, j as processId, k as pauseRecordingForAttempt, l as idCaptureOnlyMachine, m as idCaptureMachine, n as IdCaptureManager, o as IdCaptureOnlyActor, p as IdCaptureMachine, r as IdCaptureState, s as createIdCaptureOnlyActor, t as createIdCaptureManager, u as CreateIdCaptureActorOptions, v as InitializeIdCaptureParams, w as barcodeToBase64, x as UploadManualIdFileParams, y as StartRecordingParams } from "./idCaptureManager-DKESug0R.js";
7
7
  //#region src/modules/id/deviceWallet/deviceWalletErrors.d.ts
8
8
  /**
9
9
  * Fail reason → i18n key for the device-wallet error screen (same shape as
@@ -47,4 +47,4 @@ declare function createIdCaptureOnlyManagerFromActor(actor: IdCaptureOnlyActor,
47
47
  */
48
48
  declare function createIdCaptureOnlyManager(options: CreateIdCaptureOnlyActorOptions): IdCaptureOnlyManager;
49
49
  //#endregion
50
- export { AcceptedDocument, AcceptedDocumentType, AddBarcodeParams, AddBarcodeV3Response, type CameraStream, CaptureIdResponse, CaptureOnlyResponse, CapturedImage, type CreateIdCaptureActorOptions, type CreateIdCaptureOnlyActorOptions, DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, DetectionArea, type DetectionOrientation, DetectionStatus, type DeviceWalletDecision, type DeviceWalletDecryptResponse, type DeviceWalletFailReason, type DeviceWalletOutput, type DeviceWalletPlatform, type DeviceWalletProvider, type DigitalIdDocumentType, type DigitalIdFunnelEntry, type DigitalIdPlatformSupport, type DigitalIdProviderId, FinalizedIdRecording, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureDigitalIdFlowType, IdCaptureDigitalIdMethod, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, type IdCaptureOnlyActor, IdCaptureOnlyConfig, type IdCaptureOnlyMachine, type IdCaptureOnlyManager, IdCaptureOutput, type IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdCapturedImageData, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, type ManualUploadContext, type ManualUploadSide, type ManualUploadTab, type PermissionResult, type PermissionStatus, RecordingSession, type RedirectReturnParams, type ResolvedDigitalIdRoute, StartRecordingParams, UploadIdImageParams, UploadIdResponse, UploadManualIdFileParams, ValidationError, addBarcode, barcodeToBase64, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, preloadIdRecordingProvider, prepareRecordingForCameraRetry, processId, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
50
+ export { AcceptedDocument, AcceptedDocumentType, AddBarcodeParams, AddBarcodeV3Response, type CameraStream, CaptureIdResponse, CaptureOnlyResponse, CapturedImage, type CreateIdCaptureActorOptions, type CreateIdCaptureOnlyActorOptions, DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, DetectionArea, type DetectionOrientation, DetectionStatus, type DeviceWalletDecision, type DeviceWalletDecryptResponse, type DeviceWalletFailReason, type DeviceWalletOutput, type DeviceWalletPlatform, type DeviceWalletProvider, type DigitalIdDocumentType, type DigitalIdFunnelEntry, type DigitalIdPlatformSupport, type DigitalIdProviderId, FinalizedIdRecording, ID_ERROR_CODES, type IdCaptureActor, IdCaptureConfig, IdCaptureContext, IdCaptureDependencies, IdCaptureDigitalIdFlowType, IdCaptureDigitalIdMethod, IdCaptureEvent, IdCaptureGeometry, IdCaptureInitResult, IdCaptureInput, type IdCaptureMachine, type IdCaptureManager, IdCaptureMode, type IdCaptureOnlyActor, IdCaptureOnlyConfig, type IdCaptureOnlyMachine, type IdCaptureOnlyManager, IdCaptureOutput, type IdCaptureSettings, type IdCaptureState, IdCaptureThresholds, IdCapturedImageData, IdDocumentType, IdError, IdErrorCode, IdFlowStep, InitializeIdCaptureParams, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, type ManualUploadContext, type ManualUploadSide, type ManualUploadTab, type PermissionResult, type PermissionStatus, type RedirectReturnParams, type ResolvedDigitalIdRoute, StartRecordingParams, UploadIdImageParams, UploadIdResponse, UploadManualIdFileParams, ValidationError, addBarcode, barcodeToBase64, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
package/dist/id.esm.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { n as eventModuleNames } from "./events-ijlbX_Wx.esm.js";
2
2
  import { i as assign, s as createActor } from "./xstate.esm-BuFLFuzz.esm.js";
3
3
  import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
4
- import { a as createIdProtectedCaptureController, c as DIGITAL_ID_DOCUMENT_TYPES, d as resolveDigitalIdImplementation, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, h as resolveWalletPlatform, i as createIdCaptureOnlyDeliveryActor, l as DIGITAL_ID_REGISTRY, m as MANUAL_UPLOAD_MAX_RETRIES, n as provideIdProtectedCaptureController, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as attachIdProtectedCaptureController, t as idCaptureMachine, u as isRedirectFlowType } from "./idCaptureStateMachine-CmqihkUy.esm.js";
5
- import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-Vby8oYqh.esm.js";
6
- import { _ as ID_ERROR_CODES, a as getRealQualityValue, c as preloadIdRecordingProvider, d as startRecordingSession, f as stopRecording, g as validateUploadResponse, h as uploadManualIdFile, i as finalizeRecordingSession, l as prepareRecordingForCameraRetry, m as uploadIdImage, n as barcodeToBase64, o as initializeIdCapture, p as stopStream, r as disposeRecordingSession, s as pauseRecordingForAttempt, t as addBarcode, u as processId, y as resolveIdCaptureThresholds } from "./idCaptureServices-CJIxD9ep.esm.js";
4
+ import { a as createIdProtectedCaptureController, c as DIGITAL_ID_DOCUMENT_TYPES, d as resolveDigitalIdImplementation, f as MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, h as resolveWalletPlatform, i as createIdCaptureOnlyDeliveryActor, l as DIGITAL_ID_REGISTRY, m as MANUAL_UPLOAD_MAX_RETRIES, n as provideIdProtectedCaptureController, p as MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, r as attachIdProtectedCaptureController, t as idCaptureMachine, u as isRedirectFlowType } from "./idCaptureStateMachine-Ne_PXth_.esm.js";
5
+ import { n as createIdCaptureActor, r as createIdCaptureManagerFromActor, t as createIdCaptureManager } from "./idCaptureManager-rfV9dIXy.esm.js";
6
+ import { a as getRealQualityValue, c as prepareRecordingForCameraRetry, d as stopRecording, f as stopStream, g as ID_ERROR_CODES, h as validateUploadResponse, i as finalizeRecordingSession, l as processId, m as uploadManualIdFile, n as barcodeToBase64, o as initializeIdCapture, p as uploadIdImage, r as disposeRecordingSession, s as pauseRecordingForAttempt, t as addBarcode, u as startRecordingSession, v as resolveIdCaptureThresholds } from "./idCaptureServices-i1KxugN7.esm.js";
7
7
  import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-BjzPjJ_p.esm.js";
8
8
  //#region src/modules/id/deviceWallet/deviceWalletErrors.ts
9
9
  /**
@@ -213,4 +213,4 @@ function createIdCaptureOnlyManager(options) {
213
213
  return createIdCaptureOnlyManagerFromActor(createIdCaptureOnlyActor(options), options.config);
214
214
  }
215
215
  //#endregion
216
- export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, addBarcode, barcodeToBase64, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, preloadIdRecordingProvider, prepareRecordingForCameraRetry, processId, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
216
+ export { DEVICE_WALLET_ERROR_KEYS, DIGITAL_ID_DOCUMENT_TYPES, DIGITAL_ID_REGISTRY, ID_ERROR_CODES, MANUAL_UPLOAD_EXHAUSTION_FORWARD_MS, MANUAL_UPLOAD_MAX_FILE_SIZE_BYTES, MANUAL_UPLOAD_MAX_RETRIES, addBarcode, barcodeToBase64, createIdCaptureActor, createIdCaptureManager, createIdCaptureOnlyActor, createIdCaptureOnlyManager, createIdCaptureOnlyManagerFromActor, disposeRecordingSession, finalizeRecordingSession, getRealQualityValue, idCaptureMachine, idCaptureOnlyMachine, initializeIdCapture, isRedirectFlowType, pauseRecordingForAttempt, prepareRecordingForCameraRetry, processId, resolveDigitalIdImplementation, resolveWalletPlatform, startRecordingSession, stopRecording, stopStream, uploadIdImage, uploadManualIdFile, validateUploadResponse };
@@ -1,20 +1,161 @@
1
1
  import { b as resolveWasmSource, p as WASM_MODEL_FILES } from "./wasmWebClient-B7baE-Wf.esm.js";
2
- import { p as getBarcodeEnhanceModelUrl } from "./setup-msLybMbC.esm.js";
2
+ import { p as getBarcodeEnhanceModelUrl } from "./setup-BWG-hivt.esm.js";
3
3
  import { s as wasmRuntime, t as getResolvedModelSource } from "./warmup-CUUnwYxe.esm.js";
4
4
  import { i as BaseWasmProvider } from "./safeStorage-B-trhxg6.esm.js";
5
5
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
6
+ //#region ../infra/src/media/cameraCompositorWorker.ts
7
+ /**
8
+ * Whether the worker transport is available here. Every probe must hold;
9
+ * anything missing routes `CameraCompositor` to its main-thread path.
10
+ */
11
+ function canUseCameraCompositorWorker() {
12
+ const g = globalThis;
13
+ return typeof g.MediaStreamTrackProcessor === "function" && typeof g.MediaStreamTrackGenerator === "function" && typeof g.Worker === "function" && typeof g.OffscreenCanvas === "function" && typeof g.VideoFrame === "function";
14
+ }
15
+ function createTrackProcessor(track) {
16
+ const Ctor = globalThis.MediaStreamTrackProcessor;
17
+ if (!Ctor) throw new Error("MediaStreamTrackProcessor unavailable");
18
+ return new Ctor({ track });
19
+ }
20
+ function createTrackGenerator() {
21
+ const Ctor = globalThis.MediaStreamTrackGenerator;
22
+ if (!Ctor) throw new Error("MediaStreamTrackGenerator unavailable");
23
+ return new Ctor({ kind: "video" });
24
+ }
25
+ /**
26
+ * The worker's entire logic. SELF-CONTAINED (serialized via toString into the
27
+ * blob): no module references. Frame loop: read → scale within the bound →
28
+ * write → close. The processor buffers at most one frame, so reads always
29
+ * yield the freshest frame; while paused, frames are still read and closed so
30
+ * the camera's frame pool stays healthy — an unclosed VideoFrame can stall the
31
+ * capture pipeline, which the recording must never do.
32
+ */
33
+ function cameraCompositorWorkerMain(scope) {
34
+ const g = globalThis;
35
+ let maxLongEdge = 1280;
36
+ let maxShortEdge = 720;
37
+ let canvas = null;
38
+ let ctx = null;
39
+ let writer = null;
40
+ let activeReader = null;
41
+ let generation = 0;
42
+ let paused = false;
43
+ let announceNextFrame = false;
44
+ const boundedSize = (width, height) => {
45
+ const scale = Math.min(1, maxLongEdge / Math.max(width, height), maxShortEdge / Math.min(width, height));
46
+ return {
47
+ width: Math.max(1, Math.round(width * scale)),
48
+ height: Math.max(1, Math.round(height * scale))
49
+ };
50
+ };
51
+ const scaled = (frame) => {
52
+ const size = boundedSize(frame.displayWidth, frame.displayHeight);
53
+ if (!canvas || !ctx || size.width === frame.displayWidth && size.height === frame.displayHeight) return frame;
54
+ if (canvas.width !== size.width || canvas.height !== size.height) {
55
+ canvas.width = size.width;
56
+ canvas.height = size.height;
57
+ }
58
+ ctx.drawImage(frame, 0, 0, size.width, size.height);
59
+ const out = new g.VideoFrame(canvas, { timestamp: frame.timestamp });
60
+ frame.close();
61
+ return out;
62
+ };
63
+ const pump = async (readable, gen) => {
64
+ const reader = readable.getReader();
65
+ activeReader = reader;
66
+ try {
67
+ for (;;) {
68
+ const { value: frame, done } = await reader.read();
69
+ if (done) {
70
+ if (gen === generation) scope.postMessage({ type: "ended" });
71
+ return;
72
+ }
73
+ if (gen !== generation) {
74
+ frame.close();
75
+ return;
76
+ }
77
+ if (paused || !writer) {
78
+ frame.close();
79
+ continue;
80
+ }
81
+ await writer.write(scaled(frame));
82
+ if (announceNextFrame) {
83
+ announceNextFrame = false;
84
+ scope.postMessage({ type: "frame" });
85
+ }
86
+ }
87
+ } catch (error) {
88
+ if (gen === generation) scope.postMessage({
89
+ type: "fatal",
90
+ message: String(error)
91
+ });
92
+ }
93
+ };
94
+ const switchSource = (readable) => {
95
+ generation += 1;
96
+ const previous = activeReader;
97
+ activeReader = null;
98
+ previous?.cancel().catch(() => {});
99
+ pump(readable, generation);
100
+ };
101
+ scope.onmessage = (event) => {
102
+ const message = event.data;
103
+ switch (message.type) {
104
+ case "start":
105
+ maxLongEdge = message.maxLongEdge;
106
+ maxShortEdge = message.maxShortEdge;
107
+ canvas = new g.OffscreenCanvas(1, 1);
108
+ ctx = canvas.getContext("2d");
109
+ writer = message.writable.getWriter();
110
+ announceNextFrame = true;
111
+ switchSource(message.readable);
112
+ break;
113
+ case "source":
114
+ switchSource(message.readable);
115
+ break;
116
+ case "pause":
117
+ paused = true;
118
+ break;
119
+ case "resume":
120
+ paused = false;
121
+ announceNextFrame = true;
122
+ break;
123
+ default: break;
124
+ }
125
+ };
126
+ }
127
+ /** Assembles the classic-worker script from the serialized worker main. */
128
+ function buildCameraCompositorWorkerSource() {
129
+ return [`const workerMain = ${cameraCompositorWorkerMain.toString()};`, "workerMain(self);"].join("\n");
130
+ }
131
+ //#endregion
6
132
  //#region ../infra/src/media/CameraCompositor.ts
7
133
  const MAX_COMPOSITE_LONG_EDGE = 1280;
8
134
  const MAX_COMPOSITE_SHORT_EDGE = 720;
9
135
  const FRAME_INTERVAL_TOLERANCE_RATIO = .9;
10
136
  const DEFAULT_RESUME_TIMEOUT_MS = 2e3;
11
137
  /**
12
- * Composites the *active* camera into a canvas and exposes the canvas as a
13
- * single, stable `MediaStream` to record. Switching cameras (front ↔ back)
14
- * just repoints what the canvas draws — the output stream and its audio track
15
- * are never replaced — so a single `MediaRecorder` produces one continuous
16
- * video that follows the camera switches (V1 parity), instead of restarting
17
- * per camera.
138
+ * Composites the *active* camera into a single, stable `MediaStream` to
139
+ * record. Switching cameras (front ↔ back) just repoints the source — the
140
+ * output stream and its audio track are never replaced — so a single
141
+ * `MediaRecorder` produces one continuous video that follows the camera
142
+ * switches (V1 parity), instead of restarting per camera.
143
+ *
144
+ * Two transports (ENG-55397):
145
+ * - **Worker (preferred, Chromium 94+):** camera track →
146
+ * `MediaStreamTrackProcessor` → worker scales on an `OffscreenCanvas` →
147
+ * `MediaStreamTrackGenerator`. The main thread is not in the frame path, so
148
+ * the recording stays at camera rate while the synchronous ID detection
149
+ * tick saturates the main thread (measured: 4–9 fps main-thread vs 30 fps
150
+ * worker on a Galaxy S21 under the same load).
151
+ * - **Main thread (fallback):** hidden `<video>` → rVFC/rAF → canvas →
152
+ * `captureStream`, for Safari, Firefox and strict-CSP hosts that block blob
153
+ * workers.
154
+ *
155
+ * A worker that dies mid-recording (GPU-process crash, OOM) is released at
156
+ * once; the composite track stays valid but receives no further frames, and
157
+ * the next `resume()` reports `timed-out` so the caller reacquires the camera
158
+ * instead of talking to a dead worker.
18
159
  *
19
160
  * The audio track from the initial stream is carried through unchanged across
20
161
  * video switches, so there's no audio glitch when the camera flips.
@@ -24,8 +165,11 @@ var CameraCompositor = class {
24
165
  this.canvas = null;
25
166
  this.ctx = null;
26
167
  this.video = null;
168
+ this.transport = null;
169
+ this.generator = null;
27
170
  this.frameRequestId = null;
28
171
  this.frameRequestKind = null;
172
+ this.sourceExceedsTargetFps = false;
29
173
  this.lastDrawTimeMs = null;
30
174
  this.lastVideoTimeSeconds = null;
31
175
  this.audioTrack = null;
@@ -41,29 +185,33 @@ var CameraCompositor = class {
41
185
  * `switchVideo` calls.
42
186
  */
43
187
  start(stream) {
44
- this.canvas = document.createElement("canvas");
45
- this.ctx = this.canvas.getContext("2d");
46
- this.video = document.createElement("video");
47
- this.video.muted = true;
48
- this.video.playsInline = true;
49
188
  this.audioTrack = stream.getAudioTracks()[0] ?? null;
50
- this.setVideoSource(stream);
51
- const composite = this.canvas.captureStream(this.fps);
189
+ const composite = this.startWorkerTransport(stream) ?? this.startMainThread(stream);
52
190
  if (this.audioTrack) composite.addTrack(this.audioTrack);
53
191
  this.composite = composite;
54
- this.startDrawLoop();
55
192
  return composite;
56
193
  }
57
194
  /**
58
- * Swap the camera feeding the canvas without interrupting the composite
195
+ * Swap the camera feeding the composite without interrupting the composite
59
196
  * stream. Pass a video-only stream (audio is kept from `start`). The previous
60
197
  * video track is stopped.
61
198
  */
62
199
  switchVideo(stream) {
63
200
  if (!this.composite) return;
64
201
  const previousVideoTrack = this.videoTrack;
65
- this.setVideoSource(stream);
66
- this.startDrawLoop();
202
+ if (this.transport) {
203
+ this.videoTrack = stream.getVideoTracks()[0] ?? null;
204
+ if (this.videoTrack) try {
205
+ const processor = createTrackProcessor(this.videoTrack);
206
+ this.postToWorker({
207
+ type: "source",
208
+ readable: processor.readable
209
+ }, [processor.readable]);
210
+ } catch {}
211
+ } else if (this.video) {
212
+ this.setVideoSource(stream);
213
+ this.startDrawLoop();
214
+ } else this.videoTrack = stream.getVideoTracks()[0] ?? null;
67
215
  if (previousVideoTrack) previousVideoTrack.stop();
68
216
  }
69
217
  /** The composite stream being recorded, if compositing is active. */
@@ -73,26 +221,32 @@ var CameraCompositor = class {
73
221
  /** Pause source playback and drawing while the page is backgrounded. */
74
222
  pause() {
75
223
  this.finishResume("timed-out");
224
+ if (this.transport) {
225
+ this.postToWorker({ type: "pause" });
226
+ return;
227
+ }
76
228
  this.cancelDrawLoop();
77
229
  this.video?.pause();
78
230
  }
79
231
  /**
80
- * Restart source playback and wait for a genuinely new camera frame to be
81
- * drawn into the stable canvas stream. The caller must not resume encoding
82
- * until this resolves with `resumed`.
232
+ * Restart source playback and wait for a genuinely new camera frame to reach
233
+ * the stable composite stream. The caller must not resume encoding until
234
+ * this resolves with `resumed`.
83
235
  */
84
236
  async resume(signal) {
85
237
  const video = this.video;
86
- if (!video || !this.composite) return "timed-out";
238
+ if (!this.composite || !video && !this.transport) return "timed-out";
87
239
  if (this.audioTrack?.readyState === "ended") return "audio-ended";
88
240
  if (!this.videoTrack || this.videoTrack.readyState === "ended") return "video-ended";
89
241
  if (signal?.aborted) return "timed-out";
90
- try {
91
- await video.play();
92
- } catch {
93
- return "timed-out";
242
+ if (video && !this.transport) {
243
+ try {
244
+ await video.play();
245
+ } catch {
246
+ return "timed-out";
247
+ }
248
+ if (signal?.aborted) return "timed-out";
94
249
  }
95
- if (signal?.aborted) return "timed-out";
96
250
  this.finishResume("timed-out");
97
251
  return new Promise((resolve) => {
98
252
  const timeout = setTimeout(() => {
@@ -115,13 +269,20 @@ var CameraCompositor = class {
115
269
  resolve,
116
270
  timeout
117
271
  };
272
+ if (this.transport) {
273
+ this.postToWorker({ type: "resume" });
274
+ return;
275
+ }
118
276
  this.startDrawLoop(false);
119
277
  });
120
278
  }
121
- /** Stop compositing and release the canvas, audio, and video tracks. */
279
+ /** Stop compositing and release the worker, canvas, audio and video tracks. */
122
280
  stop() {
123
281
  this.finishResume("timed-out");
124
282
  this.cancelDrawLoop();
283
+ this.releaseWorker();
284
+ this.generator?.stop();
285
+ this.generator = null;
125
286
  this.videoTrack?.stop();
126
287
  this.audioTrack?.stop();
127
288
  this.composite?.getTracks().forEach((track) => track.stop());
@@ -133,8 +294,90 @@ var CameraCompositor = class {
133
294
  this.audioTrack = null;
134
295
  this.composite = null;
135
296
  }
297
+ /**
298
+ * Worker transport. Returns `null` — and leaves nothing behind — when the
299
+ * browser lacks insertable streams or a strict `worker-src` CSP blocks blob
300
+ * workers, so `start` falls through to the main-thread path. Never throws.
301
+ */
302
+ startWorkerTransport(stream) {
303
+ const track = stream.getVideoTracks()[0];
304
+ if (!track || !canUseCameraCompositorWorker()) return null;
305
+ let worker = null;
306
+ let generator = null;
307
+ let blobUrl = null;
308
+ try {
309
+ const processor = createTrackProcessor(track);
310
+ generator = createTrackGenerator();
311
+ blobUrl = URL.createObjectURL(new Blob([buildCameraCompositorWorkerSource()], { type: "text/javascript" }));
312
+ worker = new Worker(blobUrl);
313
+ worker.onmessage = (event) => this.onWorkerMessage(event.data);
314
+ worker.onerror = (event) => this.onWorkerMessage({
315
+ type: "fatal",
316
+ message: event?.message || "worker error"
317
+ });
318
+ const message = {
319
+ type: "start",
320
+ readable: processor.readable,
321
+ writable: generator.writable,
322
+ maxLongEdge: MAX_COMPOSITE_LONG_EDGE,
323
+ maxShortEdge: MAX_COMPOSITE_SHORT_EDGE
324
+ };
325
+ worker.postMessage(message, [processor.readable, generator.writable]);
326
+ } catch {
327
+ worker?.terminate();
328
+ generator?.stop();
329
+ if (blobUrl) URL.revokeObjectURL(blobUrl);
330
+ return null;
331
+ }
332
+ this.videoTrack = track;
333
+ this.transport = {
334
+ worker,
335
+ blobUrl
336
+ };
337
+ this.generator = generator;
338
+ return new MediaStream([generator]);
339
+ }
340
+ /** Terminates the worker and frees its blob; idempotent. */
341
+ releaseWorker() {
342
+ if (!this.transport) return;
343
+ this.transport.worker.terminate();
344
+ URL.revokeObjectURL(this.transport.blobUrl);
345
+ this.transport = null;
346
+ }
347
+ startMainThread(stream) {
348
+ this.canvas = document.createElement("canvas");
349
+ this.ctx = this.canvas.getContext("2d");
350
+ this.video = document.createElement("video");
351
+ this.video.muted = true;
352
+ this.video.playsInline = true;
353
+ this.setVideoSource(stream);
354
+ const composite = this.canvas.captureStream(this.fps);
355
+ this.startDrawLoop();
356
+ return composite;
357
+ }
358
+ postToWorker(message, transfer = []) {
359
+ this.transport?.worker.postMessage(message, transfer);
360
+ }
361
+ onWorkerMessage(message) {
362
+ if (!this.transport) return;
363
+ switch (message.type) {
364
+ case "frame":
365
+ this.finishResume("resumed");
366
+ break;
367
+ case "ended":
368
+ this.finishResume("video-ended");
369
+ break;
370
+ case "fatal":
371
+ this.releaseWorker();
372
+ this.finishResume("timed-out");
373
+ break;
374
+ default: break;
375
+ }
376
+ }
136
377
  setVideoSource(stream) {
137
378
  this.videoTrack = stream.getVideoTracks()[0] ?? null;
379
+ const sourceFps = this.videoTrack && typeof this.videoTrack.getSettings === "function" ? this.videoTrack.getSettings().frameRate : void 0;
380
+ this.sourceExceedsTargetFps = typeof sourceFps === "number" && sourceFps > this.fps;
138
381
  const video = this.video;
139
382
  if (!video) return;
140
383
  video.srcObject = new MediaStream(stream.getVideoTracks());
@@ -146,7 +389,7 @@ var CameraCompositor = class {
146
389
  if (resetSourceTime) this.lastVideoTimeSeconds = null;
147
390
  const draw = (timeMs) => {
148
391
  const elapsed = this.lastDrawTimeMs === null ? Infinity : timeMs - this.lastDrawTimeMs;
149
- if ((this.frameIntervalMs === 0 || elapsed >= this.frameIntervalMs * FRAME_INTERVAL_TOLERANCE_RATIO) && this.drawCurrentFrame()) {
392
+ if ((!(this.frameIntervalMs > 0 && (this.frameRequestKind !== "video" || this.sourceExceedsTargetFps)) || elapsed >= this.frameIntervalMs * FRAME_INTERVAL_TOLERANCE_RATIO) && this.drawCurrentFrame()) {
150
393
  this.lastDrawTimeMs = timeMs;
151
394
  this.finishResume("resumed");
152
395
  }
@@ -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,13 +120,12 @@ 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;
130
129
  type FinalizedIdRecording = Readonly<{
131
130
  recordingId?: string | null;
132
131
  }>;
@@ -134,10 +133,10 @@ type FinalizedIdRecording = Readonly<{
134
133
  * Fully drains an ID recording before the protected camera cycle runs POC.
135
134
  * Every recorder clone is stopped before this promise settles.
136
135
  */
137
- declare function finalizeRecordingSession(session: RecordingSession): Promise<FinalizedIdRecording>;
136
+ declare function finalizeRecordingSession(session: object): Promise<FinalizedIdRecording>;
138
137
  /** Synchronous teardown used when an attempt is cancelled before finalization. */
139
- declare function disposeRecordingSession(session: RecordingSession): void;
140
- declare function stopRecording(session: RecordingSession): void;
138
+ declare function disposeRecordingSession(session: object): void;
139
+ declare function stopRecording(session: object): void;
141
140
  declare function processId(isSecondId?: boolean, queueName?: string, signal?: AbortSignal): Promise<{
142
141
  isDocumentExpired: boolean;
143
142
  }>;
@@ -624,4 +623,4 @@ declare function createIdCaptureManager(options: CreateIdCaptureActorOptions): M
624
623
  deviceWalletUseAnotherMethod(): void;
625
624
  };
626
625
  //#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 };
626
+ export { prepareRecordingForCameraRetry as A, addBarcode as C, getRealQualityValue as D, finalizeRecordingSession as E, uploadIdImage as F, uploadManualIdFile as I, validateUploadResponse as L, startRecordingSession as M, stopRecording as N, initializeIdCapture as O, stopStream as P, WasmUtilProvider 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, processId 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 };
@@ -1,12 +1,12 @@
1
- import { l as BrowserStorageProvider } from "./setup-msLybMbC.esm.js";
1
+ import { l as BrowserStorageProvider } from "./setup-BWG-hivt.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
5
  import { t as setWasmDsFlagSync } from "./wasmDsFlagSync-B2e8p268.esm.js";
6
6
  import { t as BrowserVisibilityObserverProvider } from "./BrowserVisibilityObserverProvider-BrJN1B8A.esm.js";
7
7
  import { o as resetWasmMotionPrimedForModule, r as primeMotionFromUserGestureIfNeeded } from "./permissionServices-Bj_fyWtv.esm.js";
8
- import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-CmqihkUy.esm.js";
9
- import { v as resolveCaptureOptimizingTreatment, y as resolveIdCaptureThresholds } from "./idCaptureServices-CJIxD9ep.esm.js";
8
+ import { a as createIdProtectedCaptureController, n as provideIdProtectedCaptureController, o as findIdProtectedCaptureController, s as getManualUploadTabs, t as idCaptureMachine } from "./idCaptureStateMachine-Ne_PXth_.esm.js";
9
+ import { _ as resolveCaptureOptimizingTreatment, v as resolveIdCaptureThresholds } from "./idCaptureServices-i1KxugN7.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) {