@incodetech/core 2.4.1 → 2.5.0-agentic

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 (338) hide show
  1. package/dist/Actor-DqjOqDfU.d.ts +1 -0
  2. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-CPdofn7R.d.ts} +3 -5
  3. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  4. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-C7N1N61V.esm.js} +61 -744
  5. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  6. package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-Dv9iXub0.esm.js} +38 -66
  7. package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
  8. package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
  9. package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-CAxToGns.d.ts} +3 -3
  10. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-CLWIYHB4.d.ts} +35 -7
  11. package/dist/Manager-BvXAwDv9.esm.js +125 -0
  12. package/dist/{Manager-C9T5amUN.d.ts → Manager-DufwKlav.d.ts} +1 -7
  13. package/dist/{MotionSensorProvider-DYxh8TjR.esm.js → MotionSensorProvider-X4_2eBGd.esm.js} +15 -0
  14. package/dist/MultipartRecordingProvider-BtMQZEbg.esm.js +151 -0
  15. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  16. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-BqaHTJF0.d.ts} +36 -5
  17. package/dist/{StreamCanvasCapture-C9jtgBdT.esm.js → StreamCanvasCapture-CXd87trH.esm.js} +18 -3
  18. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  19. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-DVFDFlIL.esm.js} +135 -25
  20. package/dist/WorkerEncoderRecordingProvider-BO7urYwT.esm.js +80 -0
  21. package/dist/addressSearch-BKlynuBr.esm.js +71 -0
  22. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
  23. package/dist/ae-signature.d.ts +2 -2
  24. package/dist/ae-signature.esm.js +1 -1
  25. package/dist/antifraud.d.ts +1 -1
  26. package/dist/antifraud.esm.js +2 -2
  27. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BI2zr7YX.esm.js} +5 -3
  28. package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
  29. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-TWUu8wLN.esm.js} +4 -6
  30. package/dist/{api-Cz90EHyu.esm.js → api-BNxrW8xK.esm.js} +13 -6
  31. package/dist/{apiError-9Yi8xMeB.esm.js → apiError-BAfdBGxH.esm.js} +1 -1
  32. package/dist/attemptCarry-DWM8lV9V.esm.js +45 -0
  33. package/dist/authentication.d.ts +3 -3
  34. package/dist/authentication.esm.js +2 -2
  35. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-BJElkTsj.d.ts} +2 -2
  36. package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-DFzByAYo.esm.js} +7 -6
  37. package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-CKTOhwwc.esm.js} +50 -18
  38. package/dist/avatar.d.ts +1 -1
  39. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  40. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-6qVHvj76.esm.js} +12 -107
  41. package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-CG3C-xGt.esm.js} +161 -150
  42. package/dist/calendarDate-DcqGuEht.esm.js +35 -0
  43. package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
  44. package/dist/camera-9yYDUOsO.d.ts +5 -0
  45. package/dist/{camera-sIa9ceW2.esm.js → camera-CJKApt0x.esm.js} +19 -20
  46. package/dist/camera.d.ts +9 -5
  47. package/dist/camera.esm.js +1 -1
  48. package/dist/certificate-issuance.d.ts +1 -1
  49. package/dist/certificate-issuance.esm.js +2 -2
  50. package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
  51. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-P44yBRop.esm.js} +5 -3
  52. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-BPBrILt6.esm.js} +4 -4
  53. package/dist/cnpj-Bl_olpdX.esm.js +79 -0
  54. package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
  55. package/dist/consent.d.ts +1 -1
  56. package/dist/consent.esm.js +2 -2
  57. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-D43w2ms-.esm.js} +7 -4
  58. package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-Duzd8paN.d.ts} +17 -9
  59. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-CLK8PfM4.esm.js} +25 -15
  60. package/dist/cpf-DDXMTLYr.esm.js +37 -0
  61. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-Ct9QrQ66.d.ts} +1 -1
  62. package/dist/cross-document-data-match.d.ts +1 -1
  63. package/dist/cross-document-data-match.esm.js +1 -1
  64. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-Cag_bcyW.esm.js} +6 -5
  65. package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
  66. package/dist/curp-DZGvefg3.esm.js +14 -0
  67. package/dist/curp-validation.d.ts +1 -1
  68. package/dist/curp-validation.esm.js +2 -2
  69. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-C6WmQToS.esm.js} +6 -3
  70. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-CmL52FU8.d.ts} +4 -4
  71. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BbJ4YAzE.esm.js} +41 -34
  72. package/dist/custom-fields.d.ts +1 -1
  73. package/dist/custom-fields.esm.js +1 -1
  74. package/dist/custom-watchlist.d.ts +1 -1
  75. package/dist/custom-watchlist.esm.js +2 -2
  76. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-BBy6X9nh.esm.js} +15 -17
  77. package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
  78. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-CtBMy2EF.esm.js} +5 -3
  79. package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
  80. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-SS2ssNCg.esm.js} +4 -6
  81. package/dist/deepsightCaptureConfig-Nm_K8twx.esm.js +70 -0
  82. package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-BInnND1H.esm.js} +41 -74
  83. package/dist/definitionSource-B-Z2EgJJ.esm.js +234 -0
  84. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-JNBOXqvK.esm.js} +278 -44
  85. package/dist/device.d.ts +3 -3
  86. package/dist/device.esm.js +16 -16
  87. package/dist/document-capture.d.ts +3 -3
  88. package/dist/document-capture.esm.js +2 -2
  89. package/dist/document-signature.d.ts +123 -0
  90. package/dist/document-signature.esm.js +149 -0
  91. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-CGDtkfWj.esm.js} +30 -20
  92. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-sJWgqtUy.d.ts} +42 -8
  93. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-flAt9D4q.esm.js} +110 -63
  94. package/dist/documentSignatureStateMachine-DrRyICFT.esm.js +219 -0
  95. package/dist/dynamic-forms.d.ts +2 -2
  96. package/dist/dynamic-forms.esm.js +2 -2
  97. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
  98. package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-CxLq2KzT.esm.js} +5 -3
  99. package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-By-maT_4.esm.js} +12 -13
  100. package/dist/ekyb.d.ts +5 -5
  101. package/dist/ekyb.esm.js +3 -3
  102. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
  103. package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-CE19Pcdb.esm.js} +5 -3
  104. package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-q7JQ-x9l.esm.js} +1233 -124
  105. package/dist/ekybUtils-Z9MhFAer.esm.js +150 -0
  106. package/dist/ekyc-prefill.d.ts +17 -0
  107. package/dist/ekyc-prefill.esm.js +3 -0
  108. package/dist/ekyc.d.ts +4 -3
  109. package/dist/ekyc.esm.js +3 -3
  110. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
  111. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-p3uenUEi.esm.js} +39 -16
  112. package/dist/ekycPrefillManager-BcLhkpp8.d.ts +566 -0
  113. package/dist/ekycPrefillManager-gPX3XE7u.esm.js +103 -0
  114. package/dist/ekycPrefillStateMachine-SBnBKPGA.esm.js +685 -0
  115. package/dist/ekycRules-BH_Ll_0A.esm.js +482 -0
  116. package/dist/ekycStateMachine-D0NAHzS7.esm.js +8514 -0
  117. package/dist/ekycUtils-DEvtEyBI.esm.js +1501 -0
  118. package/dist/electronic-signature.d.ts +1 -1
  119. package/dist/electronic-signature.esm.js +1 -1
  120. package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
  121. package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-C1M-Yxf2.esm.js} +12 -18
  122. package/dist/email.d.ts +1 -1
  123. package/dist/email.esm.js +2 -2
  124. package/dist/{emailManager-ButFktRm.esm.js → emailManager-DWnhEsUf.esm.js} +5 -3
  125. package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
  126. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine--T9PHflK.esm.js} +35 -25
  127. package/dist/events-ChMS-UzR.esm.js +299 -0
  128. package/dist/events.d.ts +4 -1
  129. package/dist/events.esm.js +2 -1
  130. package/dist/extensibility.d.ts +57 -41
  131. package/dist/extensibility.esm.js +39 -37
  132. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-cUjJYyXj.esm.js} +4 -1
  133. package/dist/face-match.d.ts +1 -1
  134. package/dist/face-match.esm.js +2 -2
  135. package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-18QW0lmV.esm.js} +29 -12
  136. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-CHqmyOjM.d.ts} +101 -77
  137. package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-CFToXwHy.esm.js} +181 -513
  138. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
  139. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-DIStK4qi.esm.js} +5 -3
  140. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-DagrRdo2.esm.js} +70 -42
  141. package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-BlscKbeV.esm.js} +37 -22
  142. package/dist/feature-management.esm.js +1 -1
  143. package/dist/field-comparison.d.ts +1 -1
  144. package/dist/field-comparison.esm.js +1 -1
  145. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-BnWBtMN7.esm.js} +7 -7
  146. package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
  147. package/dist/fiscal-qr.d.ts +1 -1
  148. package/dist/fiscal-qr.esm.js +1 -1
  149. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BxXaLhin.esm.js} +9 -8
  150. package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
  151. package/dist/flow-events.d.ts +1 -1
  152. package/dist/flow.d.ts +73 -24
  153. package/dist/flow.esm.js +261 -66
  154. package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-DNLssMAg.esm.js} +2 -2
  155. package/dist/flowServices-Bzq3piUR.esm.js +951 -0
  156. package/dist/geolocation.d.ts +1 -1
  157. package/dist/geolocation.esm.js +2 -2
  158. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
  159. package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-DoLbpx5e.esm.js} +9 -9
  160. package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-d5_E7gAm.esm.js} +16 -14
  161. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-Dcy9erbl.esm.js} +1 -1
  162. package/dist/government-validation.d.ts +1 -1
  163. package/dist/government-validation.esm.js +2 -2
  164. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CaZxyEOO.esm.js} +5 -3
  165. package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
  166. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-DeHHhlcf.esm.js} +4 -6
  167. package/dist/home.d.ts +4 -3
  168. package/dist/home.esm.js +4 -2
  169. package/dist/http.esm.js +1 -1
  170. package/dist/id-ocr.d.ts +2 -2
  171. package/dist/id-ocr.esm.js +3 -19
  172. package/dist/id-selfie-flow.d.ts +7 -6
  173. package/dist/id-selfie-flow.esm.js +14 -12
  174. package/dist/id-verification.d.ts +1 -1
  175. package/dist/id-verification.esm.js +2 -2
  176. package/dist/id.d.ts +6 -19
  177. package/dist/id.esm.js +4 -4
  178. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-R3rHuTOE.esm.js} +4 -4
  179. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CgkQW3Xc.d.ts} +88 -14
  180. package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-D_YGMeCW.esm.js} +81 -26
  181. package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-CP6AxsFW.esm.js} +36 -213
  182. package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-BdBtGQZP.esm.js} +2922 -2498
  183. package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
  184. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-C0C7lFGd.d.ts} +7 -6
  185. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-XTbpfHoF.esm.js} +5 -3
  186. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B-00PgPh.esm.js} +20 -16
  187. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-B4NYLlUl.esm.js} +5 -3
  188. package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
  189. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-B48Ikl-7.esm.js} +4 -6
  190. package/dist/identity-reuse.d.ts +2 -2
  191. package/dist/identity-reuse.esm.js +2 -2
  192. package/dist/identity-search.d.ts +97 -0
  193. package/dist/identity-search.esm.js +96 -0
  194. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-CZ-qJ_Aa.d.ts} +82 -15
  195. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-tFeYm_So.esm.js} +9 -4
  196. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-Ckf39qFu.esm.js} +24 -31
  197. package/dist/{index-BKOWUhxG.d.ts → index-CNck5TLp.d.ts} +93 -22
  198. package/dist/{index-CKQ9QBZP.d.ts → index-CoePktWH.d.ts} +2 -2
  199. package/dist/index-DHuAkTe0.d.ts +1 -0
  200. package/dist/index.d.ts +1 -1
  201. package/dist/index.esm.js +1 -1
  202. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-DNQX9k5e.esm.js} +1 -1
  203. package/dist/kyb-checks.d.ts +3 -0
  204. package/dist/kyb-checks.esm.js +3 -0
  205. package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
  206. package/dist/kybChecksManager-DP76y-Qz.esm.js +90 -0
  207. package/dist/kybChecksStateMachine-OKLT8Zoc.esm.js +716 -0
  208. package/dist/mandatory-consent.d.ts +2 -2
  209. package/dist/mandatory-consent.esm.js +2 -2
  210. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-NX1lz6nk.esm.js} +7 -4
  211. package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-kzr5kdc_.d.ts} +28 -11
  212. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-D1J2NQSI.esm.js} +35 -19
  213. package/dist/mediaRecorderOptions-Di_V9TnZ.esm.js +87 -0
  214. package/dist/multipartRecordingService-Cz-cWrpV.esm.js +407 -0
  215. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-Cyh71hOt.esm.js} +1 -1
  216. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-BrtDMB0Z.esm.js} +31 -15
  217. package/dist/phone-number.d.ts +7 -1
  218. package/dist/phone-number.esm.js +15 -2
  219. package/dist/phone.d.ts +1 -1
  220. package/dist/phone.esm.js +2 -2
  221. package/dist/phoneFormat-C3q0Ukh4.esm.js +27 -0
  222. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-D1QPNbu0.esm.js} +6 -4
  223. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
  224. package/dist/phoneServices-DC7AuUed.esm.js +73 -0
  225. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-CxCPxTIy.esm.js} +56 -84
  226. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  227. package/dist/{platform-DkcRc9JV.esm.js → platform-GIg4uPWe.esm.js} +15 -4
  228. package/dist/processFaceMatch-BQoiqLVh.esm.js +21 -0
  229. package/dist/qe-signature.d.ts +2 -2
  230. package/dist/qe-signature.esm.js +1 -1
  231. package/dist/recordingService-CSCvD2tB.esm.js +404 -0
  232. package/dist/redirect-to-mobile.d.ts +2 -2
  233. package/dist/redirect-to-mobile.esm.js +2 -2
  234. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Db99n9Yu.d.ts} +7 -4
  235. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-Dcpg5GfP.esm.js} +10 -6
  236. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-BMehrtVP.esm.js} +82 -46
  237. package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
  238. package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-DNEmc7of.esm.js} +9 -7
  239. package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-etdZfyCR.esm.js} +1 -1
  240. package/dist/selfie.d.ts +6 -6
  241. package/dist/selfie.esm.js +15 -13
  242. package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-DT-uhK20.esm.js} +1 -1
  243. package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-CdS6a7Q8.esm.js} +7 -6
  244. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DrBYj5kA.d.ts} +2 -2
  245. package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-ChCl3nyf.esm.js} +5 -5
  246. package/dist/{session-CNUfjlRc.esm.js → session-VXYuRYzb.esm.js} +78 -9
  247. package/dist/session.d.ts +85 -9
  248. package/dist/session.esm.js +7 -6
  249. package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-BT_CmYcX.esm.js} +442 -208
  250. package/dist/{setup-C5tfWt6W.esm.js → setup-BXrgDdfx.esm.js} +42 -29
  251. package/dist/{setup-YPKTUCY5.d.ts → setup-rcXgYUcY.d.ts} +7 -6
  252. package/dist/signature.d.ts +1 -1
  253. package/dist/signature.esm.js +2 -2
  254. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-B737Gkvk.esm.js} +5 -3
  255. package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
  256. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-B-QG7fk0.esm.js} +5 -7
  257. package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
  258. package/dist/{stats-BEvexnKC.esm.js → stats-CrqhpKkP.esm.js} +1 -1
  259. package/dist/stats.esm.js +1 -1
  260. package/dist/step-up.d.ts +379 -0
  261. package/dist/step-up.esm.js +640 -0
  262. package/dist/textRules-D4NRinKY.d.ts +41 -0
  263. package/dist/{tri-xzRLIIMN.esm.js → tri-BD9z6z0w.esm.js} +137 -8
  264. package/dist/tri.d.ts +2 -2
  265. package/dist/tri.esm-DYdFtcDH.esm.js +3105 -0
  266. package/dist/tri.esm.js +2 -2
  267. package/dist/trueSight-BymJD5cW.esm.js +1 -0
  268. package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-BwyLhIAo.esm.js} +25 -14
  269. package/dist/trust-graph.d.ts +87 -27
  270. package/dist/trust-graph.esm.js +6 -25
  271. package/dist/trustGraphStateMachine-BxvReuo1.esm.js +58 -0
  272. package/dist/{types-B6HsSzpk.d.ts → types-4Re9FSOw.d.ts} +77 -8
  273. package/dist/types-B-PIc0en.d.ts +115 -0
  274. package/dist/types-B9C8W01q.d.ts +34 -0
  275. package/dist/types-BNkzXOXE.d.ts +45 -0
  276. package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
  277. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  278. package/dist/types-BtrJ5fkm.d.ts +6 -0
  279. package/dist/{types-Ckir_BEs.d.ts → types-C1056-J1.d.ts} +3 -2
  280. package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
  281. package/dist/{events-Du2A4-Qr.esm.js → types-CBQN04Rh.esm.js} +6 -300
  282. package/dist/{types-yPH8lAH-.d.ts → types-CEGG70FK.d.ts} +16 -3
  283. package/dist/types-CTaL0XJz.d.ts +80 -0
  284. package/dist/types-CXTDuzUJ.d.ts +16 -0
  285. package/dist/{types-BEwVKkLJ.d.ts → types-CeEcakO7.d.ts} +7 -1
  286. package/dist/{types-DUnFZ08M.d.ts → types-Cy6Lx3L6.d.ts} +18 -10
  287. package/dist/types-DEa3taWc.d.ts +217 -0
  288. package/dist/{types-CK8Jbjkp.d.ts → types-DHpz4Y37.d.ts} +1 -1
  289. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  290. package/dist/{types-BAxn7MpY.d.ts → types-b0l9b83G.d.ts} +134 -52
  291. package/dist/urlUtils-B2wagB5v.esm.js +39 -0
  292. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  293. package/dist/video-selfie.d.ts +17 -15
  294. package/dist/video-selfie.esm.js +100 -24
  295. package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-DgRlU_8q.esm.js} +27 -28
  296. package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
  297. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DC_Qh7qI.d.ts} +24 -9
  298. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  299. package/dist/{warmup-BElYWRh7.esm.js → warmup-BN8dG2KX.esm.js} +378 -57
  300. package/dist/{warmup-BO57syF6.d.ts → warmup-SWu5L7cW.d.ts} +19 -2
  301. package/dist/wasm.d.ts +9 -3
  302. package/dist/wasm.esm.js +3 -3
  303. package/dist/wasmDeepsightConfigSync-DukEcrU8.esm.js +77 -0
  304. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DwBfTlgB.esm.js} +1 -1
  305. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-B2P6Vlvv.esm.js} +77 -29
  306. package/dist/watchlist-for-business.d.ts +2 -1
  307. package/dist/watchlist-for-business.esm.js +2 -2
  308. package/dist/watchlist.d.ts +1 -1
  309. package/dist/watchlist.esm.js +2 -2
  310. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DxeSH80T.esm.js} +40 -8
  311. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
  312. package/dist/watchlistForBusinessStateMachine-BC9UWLuZ.esm.js +169 -0
  313. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BHzmC9OC.esm.js} +5 -3
  314. package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
  315. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Bxzn16iJ.esm.js} +4 -6
  316. package/dist/workflow.d.ts +10 -6
  317. package/dist/workflow.esm.js +95 -60
  318. package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
  319. package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
  320. package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
  321. package/package.json +35 -8
  322. package/dist/Actor-DpTj5PFb.d.ts +0 -1
  323. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  324. package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
  325. package/dist/camera-9wWD-pwg.d.ts +0 -4
  326. package/dist/cpf-uAZTPUBy.esm.js +0 -61
  327. package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
  328. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  329. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  330. package/dist/flowServices-X6Rwf_7E.esm.js +0 -688
  331. package/dist/index-DpTj5PFb.d.ts +0 -1
  332. package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
  333. package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
  334. package/dist/types-BvLo3U4u.d.ts +0 -134
  335. package/dist/types-zOgZqMni.d.ts +0 -6
  336. package/dist/urlUtils-6jsE6rKp.esm.js +0 -23
  337. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  338. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -0,0 +1,234 @@
1
+ //#region src/shared/addressSuggestion.ts
2
+ /** Shown when an autocomplete suggestion has no street (city/region-level result). */
3
+ const STREET_LEVEL_REQUIRED_ERROR = { key: "verification.errors.streetLevelRequired" };
4
+ function isStreetMissingFromSuggestion(suggestion) {
5
+ return !suggestion.street?.trim();
6
+ }
7
+ /**
8
+ * Validation error for `street` after selecting a suggestion without `street`,
9
+ * or `undefined` when the suggestion is street-level or street is not active.
10
+ */
11
+ function getStreetLevelErrorForSuggestion(suggestion, activeFields) {
12
+ if (!activeFields.has("street")) return void 0;
13
+ return isStreetMissingFromSuggestion(suggestion) ? STREET_LEVEL_REQUIRED_ERROR : void 0;
14
+ }
15
+ /**
16
+ * Fills form values from an address autocomplete suggestion.
17
+ * Shared between eKYC and eKYB address forms.
18
+ */
19
+ function fillFromSuggestion(values, touched, suggestion, activeFields) {
20
+ const newValues = { ...values };
21
+ const newTouched = { ...touched };
22
+ const hasHouseNoField = !activeFields || activeFields.has("houseNo");
23
+ const hasStreetField = !activeFields || activeFields.has("street");
24
+ const streetValue = buildStreetValue(suggestion.street, suggestion.houseNumber, hasHouseNoField);
25
+ if (hasStreetField) {
26
+ newValues.street = streetValue;
27
+ newTouched.street = true;
28
+ }
29
+ if (suggestion.city) {
30
+ newValues.city = suggestion.city;
31
+ newTouched.city = true;
32
+ }
33
+ if (suggestion.stateCode) {
34
+ newValues.state = suggestion.stateCode;
35
+ newTouched.state = true;
36
+ }
37
+ if (suggestion.postalCode) {
38
+ newValues.postalCode = suggestion.postalCode;
39
+ newTouched.postalCode = true;
40
+ }
41
+ if (suggestion.houseNumber && hasHouseNoField) {
42
+ newValues.houseNo = suggestion.houseNumber;
43
+ newTouched.houseNo = true;
44
+ }
45
+ return {
46
+ values: newValues,
47
+ touched: newTouched
48
+ };
49
+ }
50
+ function buildStreetValue(street, houseNumber, hasHouseNoField) {
51
+ if (hasHouseNoField) return street ?? "";
52
+ if (houseNumber && street) return `${houseNumber} ${street}`;
53
+ return houseNumber ?? street ?? "";
54
+ }
55
+ /** The suggestion-filled fields a source can show as a dropdown. */
56
+ const DROPDOWN_ADDRESS_FIELDS = ["city", "state"];
57
+ /**
58
+ * Compares ignoring case and accents, so `Istanbul` and `ISTANBUL` find
59
+ * `İstanbul`, and `Kowloon` finds `KOWLOON`.
60
+ */
61
+ const foldForMatch = (text) => text.trim().normalize("NFD").replace(/\p{M}/gu, "").toUpperCase();
62
+ /**
63
+ * Keeps an address suggestion's city and region inside their dropdowns, for a
64
+ * source that shows `city` (TR provinces) or `state` (HK regions, US states) as
65
+ * one. A suggested value that matches an option's value or label, ignoring case
66
+ * and accents, becomes that option's value. One that matches none is dropped,
67
+ * as if the suggestion had no such value, so the previous value stays if it
68
+ * matches an option the same way, also as that option's value (a prefill can
69
+ * leave `KOWLOON`, or a value no option has). Without this, a code such as `HK`
70
+ * or a district such as `Kadıköy` would pass `required` and be submitted though
71
+ * the dropdown can't show it. A free-text field takes the suggestion as it is.
72
+ * Shared between eKYC and eKYB address forms; run it on `fillFromSuggestion`'s
73
+ * values.
74
+ */
75
+ function keepSuggestionInOptions(fields, previous, next) {
76
+ let result = next;
77
+ for (const name of DROPDOWN_ADDRESS_FIELDS) {
78
+ const options = fields.find((field) => field.name === name)?.options;
79
+ const suggested = next[name];
80
+ if (!options || !suggested) continue;
81
+ const optionFor = (value) => {
82
+ const wanted = value ? foldForMatch(value) : "";
83
+ if (!wanted) return void 0;
84
+ return options.find((option) => foldForMatch(option.value) === wanted || foldForMatch(option.label) === wanted)?.value;
85
+ };
86
+ result = {
87
+ ...result,
88
+ [name]: optionFor(suggested) ?? optionFor(previous[name])
89
+ };
90
+ }
91
+ return result;
92
+ }
93
+ const POSTAL_CODE_MAX_LENGTH_BY_COUNTRY = {
94
+ US: 10,
95
+ BR: 9,
96
+ GB: 8,
97
+ UK: 8,
98
+ AR: 8,
99
+ CA: 7,
100
+ NL: 6,
101
+ PT: 8
102
+ };
103
+ const FIXED_LENGTH_KEY = "verification.errors.invalidPostalCodeFixedLength";
104
+ /**
105
+ * Countries whose postal code is a fixed number of digits. It sets the
106
+ * check, the input's max length and the digits-only typing mask.
107
+ */
108
+ const FIXED_DIGIT_POSTAL_CODE_LENGTH = {
109
+ BE: 4,
110
+ DK: 4,
111
+ NO: 4,
112
+ PH: 4,
113
+ DE: 5,
114
+ ES: 5,
115
+ FI: 5,
116
+ FR: 5,
117
+ GR: 5,
118
+ IT: 5,
119
+ KE: 5,
120
+ MX: 5,
121
+ CN: 6,
122
+ IN: 6,
123
+ NG: 6,
124
+ RO: 6,
125
+ SG: 6,
126
+ IL: 7
127
+ };
128
+ function getPostalCodeMaxLength(country) {
129
+ return POSTAL_CODE_MAX_LENGTH_BY_COUNTRY[country] ?? FIXED_DIGIT_POSTAL_CODE_LENGTH[country] ?? 8;
130
+ }
131
+ function getPostalCodeErrorKey(country) {
132
+ if (country in FIXED_DIGIT_POSTAL_CODE_LENGTH) return FIXED_LENGTH_KEY;
133
+ if (country === "CA") return "verification.errors.CAPostalCodeInvalidFormat";
134
+ if (country === "AR") return "verification.errors.ARPostalCodeInvalidFormat";
135
+ if (country === "GB" || country === "UK") return "verification.errors.UKPostalCodeInvalidFormat";
136
+ if (country === "NL") return "verification.errors.NLPostalCodeInvalidFormat";
137
+ if (country === "PT") return "verification.errors.PTPostalCodeInvalidFormat";
138
+ if (country === "US") return "verification.errors.zipCodeInvalidFormat";
139
+ return "verification.errors.postalCodeInvalidFormat";
140
+ }
141
+ /**
142
+ * The params of a postal code's error message: the digit count for a
143
+ * fixed-length format, otherwise the maximum length. US and BR don't count
144
+ * the dash.
145
+ */
146
+ function getPostalCodeErrorParams(country) {
147
+ const fixedLength = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
148
+ if (fixedLength !== void 0) return { length: fixedLength };
149
+ let maxLength = getPostalCodeMaxLength(country);
150
+ if (country === "US" || country === "BR") maxLength = maxLength - 1;
151
+ return { maxLength };
152
+ }
153
+ const US_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{9}|\d{5}-\d{4})$/;
154
+ const BR_POSTAL_CODE_REGEX = /^(?:\d{5}|\d{8}|\d{5}-\d{3})$/;
155
+ const CA_POSTAL_CODE_REGEX = /^[A-Za-z]\d[A-Za-z] \d[A-Za-z]\d$/;
156
+ const UK_POSTAL_CODE_REGEX = /^(?:[A-Z]{2}\d|[A-Z]{2}\d{2}|[A-Z]\d|[A-Z]\d{2}|[A-Z]\d[A-Z]|[A-Z]{2}\d[A-Z]) \d[A-Z]{2}$/;
157
+ const AR_POSTAL_CODE_REGEX = /^[A-Za-z]\d{4}[A-Za-z]{3}$/;
158
+ /** Four digits and two uppercase letters, such as 1016DV. */
159
+ const NL_POSTAL_CODE_REGEX = /^\d{4}[A-Z]{2}$/;
160
+ /** Seven digits, the first 1 to 9, with or without a hyphen: 4430-458. */
161
+ const PT_POSTAL_CODE_REGEX = /^[1-9]\d{3}-?\d{3}$/;
162
+ /**
163
+ * Validates a postal code by country.
164
+ * Covers all countries used by eKYC and eKYB.
165
+ */
166
+ function validatePostalCode(postalCode, country) {
167
+ if (!postalCode) return false;
168
+ const fixedDigits = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
169
+ if (fixedDigits !== void 0) return postalCode.length === fixedDigits && /^\d+$/.test(postalCode);
170
+ switch (country) {
171
+ case "US": return US_POSTAL_CODE_REGEX.test(postalCode);
172
+ case "BR": return BR_POSTAL_CODE_REGEX.test(postalCode);
173
+ case "CA": return CA_POSTAL_CODE_REGEX.test(postalCode);
174
+ case "GB":
175
+ case "UK": return UK_POSTAL_CODE_REGEX.test(postalCode.toUpperCase());
176
+ case "AR": return AR_POSTAL_CODE_REGEX.test(postalCode.replace(/\s/g, "").toUpperCase());
177
+ case "NL": return NL_POSTAL_CODE_REGEX.test(postalCode);
178
+ case "PT": return PT_POSTAL_CODE_REGEX.test(postalCode);
179
+ case "CM": return postalCode.length > 0;
180
+ default: {
181
+ const stripped = postalCode.replace(/\D/g, "");
182
+ return /^\d+$/.test(stripped) && [5, 8].includes(stripped.length);
183
+ }
184
+ }
185
+ }
186
+ /**
187
+ * Progressively formats postal code input by country.
188
+ * Covers all countries used by eKYC and eKYB.
189
+ */
190
+ function formatPostalCode(value, country) {
191
+ const fixedDigits = FIXED_DIGIT_POSTAL_CODE_LENGTH[country];
192
+ if (fixedDigits !== void 0) return value.replace(/\D/g, "").slice(0, fixedDigits);
193
+ if (country === "US" || country === "BR") {
194
+ const maxDigits = country === "US" ? 9 : 8;
195
+ const hasDash = value.includes("-");
196
+ const digits = value.replace(/\D/g, "").slice(0, maxDigits);
197
+ if (digits.length <= 5) {
198
+ if (hasDash && digits.length === 5) return `${digits}-`;
199
+ return digits;
200
+ }
201
+ if (hasDash) return `${digits.slice(0, 5)}-${digits.slice(5)}`;
202
+ return digits;
203
+ }
204
+ if (country === "CA") {
205
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 6);
206
+ if (normalized.length <= 3) return normalized;
207
+ return `${normalized.slice(0, 3)} ${normalized.slice(3)}`;
208
+ }
209
+ if (country === "GB" || country === "UK") {
210
+ const normalized = value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 7);
211
+ if (normalized.length <= 3) return normalized;
212
+ return `${normalized.slice(0, -3)} ${normalized.slice(-3)}`;
213
+ }
214
+ if (country === "AR") return value.replace(/[^A-Za-z0-9]/g, "").toUpperCase().slice(0, 8);
215
+ if (country === "PT") {
216
+ const digits = value.replace(/\D/g, "").slice(0, 7);
217
+ return digits.length <= 4 ? digits : `${digits.slice(0, 4)}-${digits.slice(4)}`;
218
+ }
219
+ if (country === "NL") return `${value.replace(/\D/g, "").slice(0, 4)}${value.replace(/[^A-Za-z]/g, "").slice(0, 2).toUpperCase()}`;
220
+ return value.slice(0, 8);
221
+ }
222
+ //#endregion
223
+ //#region src/internal/forms/definitionSource.ts
224
+ const queryKey = ({ module, source, country }) => `${module}|${source ?? ""}|${country ?? ""}`;
225
+ /**
226
+ * The definitions bundled with this build. Matches module, source and country
227
+ * exactly, so a pair without its own definition keeps the current builder.
228
+ */
229
+ function createBundledDefinitionSource(definitions) {
230
+ const byQuery = new Map(Object.values(definitions).map((definition) => [queryKey(definition), definition]));
231
+ return { select: (query) => byQuery.get(queryKey(query)) };
232
+ }
233
+ //#endregion
234
+ export { getPostalCodeMaxLength as a, fillFromSuggestion as c, getPostalCodeErrorParams as i, getStreetLevelErrorForSuggestion as l, formatPostalCode as n, validatePostalCode as o, getPostalCodeErrorKey as r, STREET_LEVEL_REQUIRED_ERROR as s, createBundledDefinitionSource as t, keepSuggestionInOptions as u };
@@ -1,7 +1,17 @@
1
- import { t as getTimestamp } from "./IBrowserEnvironmentCapability-DEaRRk-R.esm.js";
2
- import { c as wasmRuntime, l as CAMERA_CYCLE_OWNERSHIP_DOMAIN, u as getCameraCycleOwnershipDomain } from "./warmup-BElYWRh7.esm.js";
3
- import { t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
4
- import { t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
1
+ import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
+ import { d as CAMERA_CYCLE_OWNERSHIP_DOMAIN, f as getCameraCycleOwnershipDomain, l as wasmRuntime, u as resetWasmOtherStateSync } from "./warmup-BN8dG2KX.esm.js";
3
+ import { r as setWasmDeepsightConfigSync } from "./wasmDeepsightConfigSync-DukEcrU8.esm.js";
4
+ import { i as utilityWasmApi } from "./WasmUtilProvider-DVFDFlIL.esm.js";
5
+ import { t as api, u as endpoints } from "./api-BNxrW8xK.esm.js";
6
+ import { u as trueSightLog } from "./trueSightService-BwyLhIAo.esm.js";
7
+ import "./trueSight-BymJD5cW.esm.js";
8
+ import { m as getFeatureGate } from "./feature-management-BlscKbeV.esm.js";
9
+ import { t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
10
+ import { c as isCameraDenialErrorName, n as enumerateVideoDevices, o as withAudioTracks, r as requestCameraAccess, s as clearCameraGrantedInDocument, u as markCameraGrantedInDocument } from "./camera-CJKApt0x.esm.js";
11
+ import { l as queryCameraPermission } from "./permissionServices-BrtDMB0Z.esm.js";
12
+ import { t as getDeviceClass } from "./getDeviceClass-Dcy9erbl.esm.js";
13
+ import { t as deepsightCaptureConfigText } from "./deepsightCaptureConfig-Nm_K8twx.esm.js";
14
+ import { r as selectBestBackDevice, t as isBackCameraLabel } from "./backCameraLabel-yda5ugE4.esm.js";
5
15
  //#region ../infra/src/capabilities/ICameraCycleCapability.ts
6
16
  /**
7
17
  * Fixed protected-endpoint identifiers owned by ml-wasm-kit.
@@ -18,6 +28,57 @@ const PROTECTED_CAPTURE_TARGET = {
18
28
  backSecondId: 6
19
29
  };
20
30
  //#endregion
31
+ //#region src/internal/deepsight/deepsightSignalConfigActor.ts
32
+ /**
33
+ * Holds the WASM engine's Deepsight 2.0 signal config (`sdsc`) and, with it,
34
+ * the capture-metadata document (`smv`) for one module run. The face and ID
35
+ * machines invoke it at their root with the module's configuration, so it
36
+ * starts with the module, before any camera step, and stops when the machine
37
+ * reaches a final state or is stopped. A module with a config sets its text
38
+ * and selects v2; a module without one sets `''` and v1. At the end it clears
39
+ * both (`''`, v1) unless a later module has set its own. A machine that
40
+ * crashes skips the clear; the next module's set replaces what it left.
41
+ *
42
+ * At the start it also clears the results an earlier module left in the
43
+ * engine (`resetOther`): without it, a challenge this module's config turns
44
+ * off would upload the earlier module's result. The engine runs the reset
45
+ * behind the ML lock, after the earlier module's camera step and post-capture
46
+ * work have settled and before this module's first `rsp` or camera step, which
47
+ * queue behind it.
48
+ *
49
+ * Every step is best-effort: a throw from a callback actor would put the
50
+ * face or ID machine into its error state, which ignores every later event,
51
+ * so a failed set, reset or clear is logged to TrueSight and the module runs
52
+ * on.
53
+ */
54
+ const deepsightSignalConfigActor = fromCallback(({ input }) => {
55
+ resetEarlierModuleResults();
56
+ let handle;
57
+ try {
58
+ handle = setWasmDeepsightConfigSync(deepsightCaptureConfigText(input));
59
+ } catch {
60
+ logSignalConfigFailure("deepsight signal config not set");
61
+ return () => {};
62
+ }
63
+ return () => {
64
+ try {
65
+ handle.clear();
66
+ } catch {
67
+ logSignalConfigFailure("deepsight signal config not cleared");
68
+ }
69
+ };
70
+ });
71
+ function resetEarlierModuleResults() {
72
+ try {
73
+ resetWasmOtherStateSync().catch(() => logSignalConfigFailure("deepsight engine results not reset"));
74
+ } catch {
75
+ logSignalConfigFailure("deepsight engine results not reset");
76
+ }
77
+ }
78
+ function logSignalConfigFailure(message) {
79
+ trueSightLog("warning", "deepsight", "other", message);
80
+ }
81
+ //#endregion
21
82
  //#region src/internal/manualReview/manualReviewService.ts
22
83
  async function flagFaceManualReview() {
23
84
  try {
@@ -30,6 +91,57 @@ async function flagIdManualReview() {
30
91
  } catch {}
31
92
  }
32
93
  //#endregion
94
+ //#region ../infra/src/media/cameraCycleFailure.ts
95
+ /**
96
+ * Reads the `DOMException`-style name of what the kit's camera step handed to
97
+ * `onCameraFailed`. The kit forwards the browser's rejection unchanged on every
98
+ * branch but one, so this is the error's own `name` when it has one. The
99
+ * exception is the unnamed iPad front-camera failure; see
100
+ * {@link classifyCameraCycleFailure}. That value has no name, so this returns
101
+ * `undefined` for it.
102
+ */
103
+ function cameraCycleFailureName(error) {
104
+ if (typeof error !== "object" || error === null) return;
105
+ const { name } = error;
106
+ return typeof name === "string" && name.length > 0 ? name : void 0;
107
+ }
108
+ /**
109
+ * True for the value the kit's iPad front-camera branch reports for every
110
+ * `getUserMedia` rejection. `InitialStreamAcquisition::formatFailureForHost`
111
+ * copies the error's own enumerable properties into a plain object tagged
112
+ * `type: 'permissionDenied'`, which drops the prototype `name` getter. A busy
113
+ * camera and a real denial therefore look the same, and the branch never
114
+ * retries.
115
+ */
116
+ function isUnnamedIpadCameraFailure(error) {
117
+ return typeof error === "object" && error !== null && cameraCycleFailureName(error) === void 0 && error.type === "permissionDenied";
118
+ }
119
+ /** How long a permission query may take before the failure counts as unknown. */
120
+ const PERMISSION_QUERY_TIMEOUT_MS = 1e3;
121
+ async function queryWithTimeout(query) {
122
+ let timer;
123
+ try {
124
+ return await Promise.race([query(), new Promise((resolve) => {
125
+ timer = setTimeout(() => resolve("prompt"), PERMISSION_QUERY_TIMEOUT_MS);
126
+ })]);
127
+ } finally {
128
+ clearTimeout(timer);
129
+ }
130
+ }
131
+ /**
132
+ * Resolves what an `onCameraFailed` value means before anyone routes on it.
133
+ * Named failures pass through unchanged. For the unnamed iPad front-camera
134
+ * failure, the browser's camera permission decides: `denied` becomes a
135
+ * `NotAllowedError`, so the permission screen handles it. Anything else stays
136
+ * unnamed and takes the generic, retryable error path. The SDK's own
137
+ * permission step succeeded moments before the camera step, so a failure there
138
+ * is far more likely a busy or over-constrained camera than a denial.
139
+ */
140
+ async function classifyCameraCycleFailure(error, query = queryCameraPermission) {
141
+ if (!isUnnamedIpadCameraFailure(error)) return error;
142
+ return await queryWithTimeout(query) === "denied" ? new DOMException("Camera permission denied", "NotAllowedError") : error;
143
+ }
144
+ //#endregion
33
145
  //#region ../infra/src/providers/wasm/CameraCycleProvider.ts
34
146
  function asRecord(value) {
35
147
  return typeof value === "object" && value !== null ? value : null;
@@ -123,12 +235,45 @@ function sanitizeProtectedResponse(request, raw) {
123
235
  }
124
236
  }
125
237
  var CameraCycleProvider = class {
126
- constructor(runtime = wasmRuntime) {
238
+ constructor(runtime = wasmRuntime, deepsightFlag = utilityWasmApi) {
127
239
  this.runtime = runtime;
240
+ this.deepsightFlag = deepsightFlag;
128
241
  this[CAMERA_CYCLE_OWNERSHIP_DOMAIN] = getCameraCycleOwnershipDomain(runtime);
129
242
  }
130
- adoptStream(stream, constraints, options) {
131
- return this.runtime.adoptCameraStream(stream, constraints, options);
243
+ /**
244
+ * Fills `ds` from the SDK's deepsight flag — the JS-side `dsEnabled_` the
245
+ * utility facade replays into every `poc`/`rsp` call — unless the caller set
246
+ * it, so the in-step pre-capture IAD sees the flag `prc` used to receive.
247
+ *
248
+ * A failure is held until the step settles and classified first
249
+ * (`classifyCameraCycleFailure`): the unnamed iPad front-camera failure
250
+ * becomes a `NotAllowedError` only when the browser reports the camera
251
+ * permission as denied.
252
+ *
253
+ * Also feeds the document camera-grant memo, which `getUserMedia` paths feed
254
+ * through `trackCameraAcquisition` and the kit cannot: READY marks the grant,
255
+ * a permission denial clears it, any other failure leaves it untouched.
256
+ */
257
+ async startCameraCycle(options, callbacks) {
258
+ const step = {};
259
+ await this.runtime.startCameraCycle({
260
+ ...options,
261
+ ds: options.ds ?? this.deepsightFlag.getDsEnabled()
262
+ }, {
263
+ onNewFrame: callbacks.onNewFrame,
264
+ onFirstFrame: callbacks.onFirstFrame,
265
+ onCameraReady: (audioStream) => {
266
+ markCameraGrantedInDocument();
267
+ callbacks.onCameraReady(audioStream);
268
+ },
269
+ onCameraFailed: (error) => {
270
+ step.failure ??= { error };
271
+ }
272
+ });
273
+ if (!step.failure) return;
274
+ const error = await classifyCameraCycleFailure(step.failure.error);
275
+ if (isCameraDenialErrorName(cameraCycleFailureName(error))) clearCameraGrantedInDocument();
276
+ callbacks.onCameraFailed(error);
132
277
  }
133
278
  setWorkflowConsuming(workflow, consuming) {
134
279
  if (consuming && (workflow === 2 || workflow === 3)) throw new Error("[Incode SDK] Protected still capture is unavailable for video-selfie workflows.");
@@ -205,7 +350,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
205
350
  let pendingReadyStream = null;
206
351
  let pendingDeliveryEvent = null;
207
352
  let visibilityGeneration = 0;
208
- let unadoptedStream = input.streamSource.kind === "preAcquired" ? input.streamSource.stream : null;
353
+ let hostStream = null;
354
+ let audioStream = null;
209
355
  let resourcesReleased = false;
210
356
  let cycleTransferred = false;
211
357
  let commandQueue = Promise.resolve();
@@ -223,9 +369,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
223
369
  if (startupStartedAt === void 0 || !input.onStartupTiming) return;
224
370
  try {
225
371
  input.onStartupTiming({
226
- acquireMs: startupTiming.acquireMs ?? 0,
227
- adoptMs: startupTiming.adoptMs ?? 0,
228
- prcMs: startupTiming.prcMs ?? 0,
372
+ cameraStepMs: startupTiming.cameraStepMs ?? 0,
373
+ ...startupTiming.firstFrameMs === void 0 ? {} : { firstFrameMs: startupTiming.firstFrameMs },
229
374
  displayStreamMs: startupTiming.displayStreamMs ?? 0,
230
375
  configureMs: startupTiming.configureMs ?? 0,
231
376
  recorderMs: startupTiming.recorderMs ?? 0,
@@ -237,12 +382,13 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
237
382
  const sendParent = (event) => {
238
383
  sendBack(event);
239
384
  };
240
- const releaseRawStream = (stream) => {
385
+ const stopTracks = (stream) => {
386
+ if (!stream) return;
241
387
  try {
242
- input.releaseUnadoptedStream(stream);
388
+ stream.getTracks().forEach((track) => track.stop());
243
389
  } catch {}
244
390
  };
245
- const reportFailure = (stage, code, http = {}) => {
391
+ const reportFailure = (stage, code, details = {}) => {
246
392
  if (!active) return;
247
393
  sendParent({
248
394
  type: "PROTECTED_ATTEMPT_FAILED",
@@ -250,10 +396,11 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
250
396
  failure: {
251
397
  stage,
252
398
  code,
253
- ...http
399
+ ...details
254
400
  }
255
401
  });
256
402
  };
403
+ const withMic = (videoStream) => withAudioTracks(videoStream, audioStream);
257
404
  const releaseResources = () => {
258
405
  if (resourcesReleased) return;
259
406
  resourcesReleased = true;
@@ -272,8 +419,10 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
272
419
  postPocDisplayStream = null;
273
420
  pendingDeliveryEvent = null;
274
421
  finalizeDeferred = false;
275
- if (unadoptedStream) releaseRawStream(unadoptedStream);
276
- unadoptedStream = null;
422
+ stopTracks(hostStream);
423
+ hostStream = null;
424
+ stopTracks(audioStream);
425
+ audioStream = null;
277
426
  if (cycleTransferred) input.cycleOwnership.releaseByAttempt();
278
427
  else input.cycleOwnership.releaseByController();
279
428
  };
@@ -283,8 +432,8 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
283
432
  ready = false;
284
433
  releaseResources();
285
434
  };
286
- const failClosed = (stage, code) => {
287
- reportFailure(stage, code);
435
+ const failClosed = (stage, code, details = {}) => {
436
+ reportFailure(stage, code, details);
288
437
  deactivate();
289
438
  };
290
439
  const stopConsuming = () => {
@@ -345,46 +494,68 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
345
494
  let stage = "acquire";
346
495
  try {
347
496
  startupStartedAt = now();
348
- const acquisitionStartedAt = now();
349
- const acquired = input.streamSource.kind === "preAcquired" ? {
350
- stream: input.streamSource.stream,
351
- constraints: input.streamSource.constraints
352
- } : await input.streamSource.acquire(abortController.signal);
353
- startupTiming.acquireMs = Math.max(0, now() - acquisitionStartedAt);
497
+ const cameraStepStartedAt = now();
498
+ const options = await input.cameraStep();
354
499
  if (!active || abortController.signal.aborted) {
355
- releaseRawStream(acquired.stream);
500
+ stopTracks(options.hs);
356
501
  return;
357
502
  }
358
- unadoptedStream = acquired.stream;
359
- stage = "adopt";
360
- if (input.beforeAdopt) {
361
- await input.beforeAdopt(acquired.stream);
362
- if (!active || abortController.signal.aborted) return;
503
+ hostStream = options.hs ?? null;
504
+ if (input.preflight) {
505
+ stage = "configure";
506
+ input.preflight();
507
+ stage = "acquire";
508
+ }
509
+ const step = { outcome: null };
510
+ await input.cycle.startCameraCycle(options, {
511
+ onFirstFrame: () => {
512
+ startupTiming.firstFrameMs ??= Math.max(0, now() - cameraStepStartedAt);
513
+ },
514
+ onCameraReady: (claimedAudio) => {
515
+ stopTracks(claimedAudio);
516
+ step.outcome ??= { ready: true };
517
+ },
518
+ onCameraFailed: (error) => {
519
+ step.outcome ??= {
520
+ ready: false,
521
+ error
522
+ };
523
+ }
524
+ });
525
+ startupTiming.cameraStepMs = Math.max(0, now() - cameraStepStartedAt);
526
+ if (!active) return;
527
+ if (step.outcome === null) throw new Error("protected camera step ended without an outcome");
528
+ if (!step.outcome.ready) {
529
+ failClosed("acquire", "protected-attempt-acquire-failed", { errorName: cameraCycleFailureName(step.outcome.error) });
530
+ return;
363
531
  }
364
- const adoption = measure(() => input.cycle.adoptStream(acquired.stream, acquired.constraints, input.captureOptions));
365
- startupTiming.adoptMs = adoption.durationMs;
366
- if (!adoption.value) throw new Error("protected camera stream adoption was rejected");
367
- unadoptedStream = null;
368
532
  input.cycleOwnership.transferToAttempt();
369
533
  cycleTransferred = true;
370
- stage = "prc";
371
- const prcStartedAt = now();
372
- await input.runPrc();
373
- startupTiming.prcMs = Math.max(0, now() - prcStartedAt);
374
- if (!active) return;
375
534
  const displayStreamResult = measure(() => input.cycle.getUnprotectedStream());
376
535
  startupTiming.displayStreamMs = displayStreamResult.durationMs;
377
536
  const displayStream = displayStreamResult.value;
378
537
  if (!displayStream) throw new Error("protected camera cycle did not provide a stream");
379
538
  stage = "configure";
539
+ if (input.afterReady) {
540
+ await input.afterReady(displayStream);
541
+ if (!active) return;
542
+ }
380
543
  const configureStartedAt = now();
381
544
  await input.configureWorkflow();
382
545
  startupTiming.configureMs = Math.max(0, now() - configureStartedAt);
383
546
  if (!active) return;
547
+ if (input.recordAudio) try {
548
+ const mic = await requestCameraAccess({ audio: true });
549
+ if (!active) {
550
+ stopTracks(mic);
551
+ return;
552
+ }
553
+ audioStream = mic;
554
+ } catch {}
384
555
  recorderOperationInFlight = true;
385
556
  const recorderStartedAt = now();
386
557
  try {
387
- await input.recorder.start(displayStream);
558
+ await input.recorder.start(withMic(displayStream));
388
559
  recorderStarted = input.recorder.mode !== "none";
389
560
  } catch {
390
561
  try {
@@ -507,7 +678,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
507
678
  }
508
679
  try {
509
680
  recorderOperationInFlight = true;
510
- await input.recorder.resumeAfterPoc(displayStream);
681
+ await input.recorder.resumeAfterPoc(withMic(displayStream));
511
682
  recorderResumedAfterPoc = true;
512
683
  postPocDisplayStream = displayStream;
513
684
  } catch {
@@ -690,7 +861,7 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
690
861
  }
691
862
  recorderOperationInFlight = true;
692
863
  try {
693
- await input.recorder.resumeFromBackground(resumedStream);
864
+ await input.recorder.resumeFromBackground(withMic(resumedStream));
694
865
  if (!active) return;
695
866
  if (receivedVisibilityGeneration !== visibilityGeneration) {
696
867
  recorderOperationInFlight = false;
@@ -802,6 +973,35 @@ const runProtectedAttempt = ({ input, sendBack, receive }) => {
802
973
  };
803
974
  fromCallback(runProtectedAttempt);
804
975
  //#endregion
976
+ //#region src/internal/cameraCycle/iadCameraStepGates.ts
977
+ /** Statsig gate for the kit's desktop camera-open timing check (`gc`). */
978
+ const IAD_CAMERA_OPEN_TIMING_GATE = "iad_camera_open_timing";
979
+ /** Statsig gate for the kit's Continuity camera-switch verdict (`cc`). */
980
+ const IAD_CONTINUITY_GATE = "iad_continuity";
981
+ /**
982
+ * The two opt-in checks of ml-wasm-kit v2.14.55 that a camera step turns on
983
+ * through its options, read from the same Statsig gates as SDK 1. Both are
984
+ * off in the kit, and off here when feature management is disabled or not
985
+ * initialized, because a gate then reads `false`.
986
+ *
987
+ * - `gc`: on desktop, with `ds`, no audio and the camera already granted, the
988
+ * kit waits 5 s before the first open and times the cold and warm opens
989
+ * into `gid`, in place of that step's pre-capture frame duplication.
990
+ * - `cc`: with `ds`, on every platform, `poc` detects a camera-source switch
991
+ * anywhere in the attempt's live stream, from the camera open after the
992
+ * pre-capture checks to the post-capture check, on auto and manual capture,
993
+ * and sets the scored `ci`.
994
+ *
995
+ * Read when each camera step builds its options, so a gate that becomes ready
996
+ * after `setup()` reaches the next step.
997
+ */
998
+ function readIadCameraStepGates() {
999
+ return {
1000
+ gc: getFeatureGate(IAD_CAMERA_OPEN_TIMING_GATE).enabled,
1001
+ cc: getFeatureGate(IAD_CONTINUITY_GATE).enabled
1002
+ };
1003
+ }
1004
+ //#endregion
805
1005
  //#region ../infra/src/providers/wasm/createCameraCycleOwnership.ts
806
1006
  /** Creates an attempt lease in the underlying runtime's ownership domain. */
807
1007
  function createCameraCycleOwnership(cycle) {
@@ -833,4 +1033,38 @@ function createCameraCycleOwnership(cycle) {
833
1033
  };
834
1034
  }
835
1035
  //#endregion
836
- export { flagIdManualReview as a, flagFaceManualReview as i, runProtectedAttempt as n, PROTECTED_CAPTURE_TARGET as o, cameraCycleProvider as r, createCameraCycleOwnership as t };
1036
+ //#region src/internal/camera/desktopCameraElection.ts
1037
+ /**
1038
+ * Picks the exact camera the kit's camera step should open on desktop.
1039
+ *
1040
+ * On desktop, ml-wasm-kit ignores the facing preference and always requests
1041
+ * `facingMode: 'user'` (`InitialStreamConstraints::desktopVideoSpec`), but it
1042
+ * honours an exact device id (`di`). Electing the device here restores the
1043
+ * ENG-47583 host corrections without JavaScript opening a camera:
1044
+ * - a rear capture pins the best back-labelled device, so a Surface opens its
1045
+ * rear camera for ID (#543);
1046
+ * - a front capture pins the first device not labelled as a back camera, but
1047
+ * only when a back camera exists, so the browser cannot hand the rear camera
1048
+ * back for a selfie after an ID capture (#551).
1049
+ *
1050
+ * Returns `''`, which leaves the choice to the kit, off desktop, when labels
1051
+ * are unavailable, or when nothing needs pinning. Labels are available here
1052
+ * because the SDK's permission step runs before every capture. Like #551,
1053
+ * "first non-back device" can pick a Windows Hello IR sensor on machines that
1054
+ * expose one; that tradeoff is unchanged.
1055
+ */
1056
+ async function electDesktopCameraDevice(facing) {
1057
+ if (getDeviceClass() !== "desktop") return "";
1058
+ let devices;
1059
+ try {
1060
+ devices = await enumerateVideoDevices();
1061
+ } catch {
1062
+ return "";
1063
+ }
1064
+ const backDevices = devices.filter((device) => isBackCameraLabel(device.label));
1065
+ if (backDevices.length === 0) return "";
1066
+ if (facing === "environment") return selectBestBackDevice(backDevices).deviceId;
1067
+ return devices.find((device) => device.label !== "" && !isBackCameraLabel(device.label))?.deviceId ?? "";
1068
+ }
1069
+ //#endregion
1070
+ export { cameraCycleProvider as a, deepsightSignalConfigActor as c, runProtectedAttempt as i, PROTECTED_CAPTURE_TARGET as l, createCameraCycleOwnership as n, flagFaceManualReview as o, readIadCameraStepGates as r, flagIdManualReview as s, electDesktopCameraDevice as t };