@incodetech/core 2.4.1 → 2.5.0-rc.0

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 (311) hide show
  1. package/dist/Actor-DqjOqDfU.d.ts +1 -0
  2. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
  3. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  4. package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-ppyMYVoY.esm.js} +7 -744
  5. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  6. package/dist/{FaceDetectionProvider-J_-1Cwck.esm.js → FaceDetectionProvider-n9u4dEn_.esm.js} +28 -64
  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-C-5M8pP1.d.ts} +2 -2
  10. package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +33 -6
  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/MultipartRecordingProvider-CduV32Qa.esm.js +151 -0
  14. package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
  15. package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-ixfy84ys.d.ts} +13 -4
  16. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  17. package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-0xTxgP0R.esm.js} +114 -25
  18. package/dist/WorkerEncoderRecordingProvider-CsDED9UU.esm.js +80 -0
  19. package/dist/addressSearch-Rxm1K67A.esm.js +73 -0
  20. package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-CxZyPRyh.esm.js} +4 -2
  21. package/dist/ae-signature.d.ts +2 -2
  22. package/dist/ae-signature.esm.js +1 -1
  23. package/dist/antifraud.d.ts +1 -1
  24. package/dist/antifraud.esm.js +2 -2
  25. package/dist/{antifraudManager-DbGCvlJs.d.ts → antifraudManager-BxfCsyA7.d.ts} +3 -3
  26. package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-DKNOi9-z.esm.js} +5 -3
  27. package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-BJ6PmCsw.esm.js} +3 -3
  28. package/dist/{api-Cz90EHyu.esm.js → api-CZpuJuZl.esm.js} +11 -6
  29. package/dist/{apiError-9Yi8xMeB.esm.js → apiError-CtArBUt-.esm.js} +1 -1
  30. package/dist/attemptCarry-BecGGZK8.esm.js +45 -0
  31. package/dist/authentication.d.ts +3 -3
  32. package/dist/authentication.esm.js +2 -2
  33. package/dist/{authenticationManager-pKQS4fHT.esm.js → authenticationManager-9N3eg3Uh.esm.js} +7 -6
  34. package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-DRaugLgH.d.ts} +2 -2
  35. package/dist/{authenticationStateMachine-D_DygKtQ.esm.js → authenticationStateMachine-DoK5RKIS.esm.js} +50 -18
  36. package/dist/avatar.d.ts +1 -1
  37. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  38. package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
  39. package/dist/{callback-645_omgz.d.ts → callback-BmjJ1G-5.d.ts} +1 -1
  40. package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
  41. package/dist/camera.d.ts +2 -2
  42. package/dist/camera.esm.js +1 -1
  43. package/dist/certificate-issuance.d.ts +1 -1
  44. package/dist/certificate-issuance.esm.js +2 -2
  45. package/dist/{certificateIssuanceManager-Dr8A4Lgr.d.ts → certificateIssuanceManager-BcYhxO63.d.ts} +4 -3
  46. package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-DaUklfNj.esm.js} +5 -3
  47. package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-_EQcjGE3.esm.js} +4 -4
  48. package/dist/cnpj-Bl_olpdX.esm.js +79 -0
  49. package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
  50. package/dist/consent.d.ts +1 -1
  51. package/dist/consent.esm.js +2 -2
  52. package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-BPocwpm2.esm.js} +7 -4
  53. package/dist/{consentManager-Ca8FHlC4.d.ts → consentManager-vI6QHkHU.d.ts} +16 -8
  54. package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DgiIcT9q.esm.js} +22 -9
  55. package/dist/cpf-DDXMTLYr.esm.js +37 -0
  56. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
  57. package/dist/cross-document-data-match.d.ts +1 -1
  58. package/dist/cross-document-data-match.esm.js +1 -1
  59. package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BfA29Aji.esm.js} +6 -4
  60. package/dist/{crossDocumentDataMatchManager-yCWCOzcU.d.ts → crossDocumentDataMatchManager-crZcIUSY.d.ts} +3 -3
  61. package/dist/curp-DZGvefg3.esm.js +14 -0
  62. package/dist/curp-validation.d.ts +1 -1
  63. package/dist/curp-validation.esm.js +2 -2
  64. package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-CbvBDoE1.esm.js} +6 -3
  65. package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-Ci2iVuog.d.ts} +4 -4
  66. package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-BQ8XK2Y3.esm.js} +30 -22
  67. package/dist/custom-fields.d.ts +1 -1
  68. package/dist/custom-fields.esm.js +1 -1
  69. package/dist/custom-watchlist.d.ts +1 -1
  70. package/dist/custom-watchlist.esm.js +2 -2
  71. package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-BRqSCR9R.esm.js} +6 -4
  72. package/dist/{customFieldsManager-CF-cO8ap.d.ts → customFieldsManager-CdWTbsew.d.ts} +3 -3
  73. package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-Bd1ooIDB.esm.js} +5 -3
  74. package/dist/{customWatchlistManager-DolUswyR.d.ts → customWatchlistManager-lJrveDS4.d.ts} +3 -3
  75. package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-r8nGhyo1.esm.js} +3 -3
  76. package/dist/{deepsightService-C3DVBOZd.esm.js → deepsightLoader-zG373VVx.esm.js} +39 -69
  77. package/dist/definitionSource-Nw0YCbpe.esm.js +221 -0
  78. package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BKFjsQpO.esm.js} +178 -41
  79. package/dist/device.esm.js +2 -2
  80. package/dist/document-capture.d.ts +3 -3
  81. package/dist/document-capture.esm.js +2 -2
  82. package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-BKaJVQxg.esm.js} +30 -20
  83. package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CoGcEiMK.d.ts} +42 -8
  84. package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-BYLb5Azk.esm.js} +107 -58
  85. package/dist/dynamic-forms.d.ts +2 -2
  86. package/dist/dynamic-forms.esm.js +2 -2
  87. package/dist/{dynamicFormsManager-DK_oc5Oy.esm.js → dynamicFormsManager-BfQKWG7a.esm.js} +5 -3
  88. package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-C45pTncO.d.ts} +4 -4
  89. package/dist/{dynamicFormsStateMachine-CGlIAWZ6.esm.js → dynamicFormsStateMachine-CRq01QNK.esm.js} +4 -4
  90. package/dist/ekyb.d.ts +5 -5
  91. package/dist/ekyb.esm.js +3 -3
  92. package/dist/{ekybManager-BLgkiWXw.esm.js → ekybManager-B489iXyO.esm.js} +5 -3
  93. package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BflWuTe4.d.ts} +5 -5
  94. package/dist/{ekybStateMachine-BfgOUZMK.esm.js → ekybStateMachine-DZxg8T0H.esm.js} +40 -56
  95. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  96. package/dist/ekyc-prefill.d.ts +17 -0
  97. package/dist/ekyc-prefill.esm.js +3 -0
  98. package/dist/ekyc.d.ts +4 -3
  99. package/dist/ekyc.esm.js +3 -3
  100. package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-BKVQazAb.d.ts} +49 -7
  101. package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-nRT0rxei.esm.js} +39 -16
  102. package/dist/ekycPrefillManager-BXWDF7vT.esm.js +103 -0
  103. package/dist/ekycPrefillManager-DOTl3Y2w.d.ts +566 -0
  104. package/dist/ekycPrefillStateMachine-CuWTVze1.esm.js +687 -0
  105. package/dist/ekycRules-DXP2hqVw.esm.js +479 -0
  106. package/dist/ekycStateMachine-nwJRel2s.esm.js +7897 -0
  107. package/dist/ekycUtils-FcqA6oU4.esm.js +1491 -0
  108. package/dist/electronic-signature.d.ts +1 -1
  109. package/dist/electronic-signature.esm.js +1 -1
  110. package/dist/{electronicSignatureManager-DTSLOvKR.d.ts → electronicSignatureManager-5tYz-a4o.d.ts} +4 -3
  111. package/dist/{electronicSignatureManager-CjKvJ6E-.esm.js → electronicSignatureManager-BcE0XMrN.esm.js} +8 -6
  112. package/dist/email.d.ts +1 -1
  113. package/dist/email.esm.js +2 -2
  114. package/dist/{emailManager-ButFktRm.esm.js → emailManager-Co4jarT1.esm.js} +5 -3
  115. package/dist/{emailManager-Dy6omJVp.d.ts → emailManager-pM7ZPuMa.d.ts} +3 -3
  116. package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-CTEaYncs.esm.js} +34 -22
  117. package/dist/events-CP3yOzAl.esm.js +299 -0
  118. package/dist/events.d.ts +3 -1
  119. package/dist/events.esm.js +2 -1
  120. package/dist/extensibility.d.ts +43 -41
  121. package/dist/extensibility.esm.js +39 -37
  122. package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
  123. package/dist/face-match.d.ts +1 -1
  124. package/dist/face-match.esm.js +2 -2
  125. package/dist/{faceCaptureManagerFactory-BDGhg24q.esm.js → faceCaptureManagerFactory-BBQzNrku.esm.js} +17 -6
  126. package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-CRGajjZ4.d.ts} +84 -72
  127. package/dist/{faceCaptureSetup-CvGYG4GZ.esm.js → faceCaptureSetup-D8_ilXFc.esm.js} +117 -482
  128. package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-C5b5WtcY.d.ts} +23 -7
  129. package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-CGmNGbov.esm.js} +5 -3
  130. package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-BuHt7kec.esm.js} +68 -29
  131. package/dist/{feature-management-D4ne_hXW.esm.js → feature-management-SIBmKJs8.esm.js} +35 -21
  132. package/dist/feature-management.esm.js +1 -1
  133. package/dist/field-comparison.d.ts +1 -1
  134. package/dist/field-comparison.esm.js +1 -1
  135. package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-VgCU4X96.esm.js} +6 -4
  136. package/dist/{fieldComparisonManager-CUX4gza2.d.ts → fieldComparisonManager-mFOHRhVd.d.ts} +3 -3
  137. package/dist/fiscal-qr.d.ts +1 -1
  138. package/dist/fiscal-qr.esm.js +1 -1
  139. package/dist/{fiscalQrManager-D0Iy7EKR.d.ts → fiscalQrManager-DFnFVpP9.d.ts} +3 -3
  140. package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-DOLq45ph.esm.js} +8 -6
  141. package/dist/flow-events.d.ts +1 -1
  142. package/dist/flow.d.ts +75 -24
  143. package/dist/flow.esm.js +288 -70
  144. package/dist/{flowCompletionService-Cemwaa5b.esm.js → flowCompletionService-BFCddN3G.esm.js} +24 -3
  145. package/dist/{flowServices-X6Rwf_7E.esm.js → flowServices-NX4ksmS5.esm.js} +447 -183
  146. package/dist/geolocation.d.ts +1 -1
  147. package/dist/geolocation.esm.js +2 -2
  148. package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-CENrvxpK.d.ts} +19 -20
  149. package/dist/{geolocationManager-B0dc5rW9.esm.js → geolocationManager-D1Ga7_lB.esm.js} +9 -9
  150. package/dist/{geolocationStateMachine-B3rcoODF.esm.js → geolocationStateMachine-oPgI5FIQ.esm.js} +14 -10
  151. package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
  152. package/dist/government-validation.d.ts +1 -1
  153. package/dist/government-validation.esm.js +2 -2
  154. package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-6JQQkzha.esm.js} +5 -3
  155. package/dist/{governmentValidationManager-B82zOut8.d.ts → governmentValidationManager-De_vU7bm.d.ts} +4 -4
  156. package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-wBunpfQ9.esm.js} +3 -3
  157. package/dist/home.d.ts +4 -3
  158. package/dist/home.esm.js +4 -2
  159. package/dist/http.esm.js +1 -1
  160. package/dist/id-ocr.d.ts +2 -2
  161. package/dist/id-ocr.esm.js +3 -19
  162. package/dist/id-selfie-flow.d.ts +6 -5
  163. package/dist/id-selfie-flow.esm.js +13 -11
  164. package/dist/id-verification.d.ts +1 -1
  165. package/dist/id-verification.esm.js +2 -2
  166. package/dist/id.d.ts +4 -17
  167. package/dist/id.esm.js +4 -4
  168. package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Drh207VJ.esm.js} +3 -3
  169. package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-Cqx2y_fC.d.ts} +76 -12
  170. package/dist/{idCaptureManager-IouAnrFm.esm.js → idCaptureManager-DjZyIbxc.esm.js} +68 -19
  171. package/dist/{idCaptureServices-VTKIPSpT.esm.js → idCaptureServices-DWs9Fb58.esm.js} +29 -198
  172. package/dist/{idCaptureStateMachine-_Pn2Xkpb.esm.js → idCaptureStateMachine-BGMkWF9t.esm.js} +961 -553
  173. package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +18 -0
  174. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-DflRx-_u.d.ts} +6 -5
  175. package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-im7VfJQi.esm.js} +5 -3
  176. package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-B832arAl.esm.js} +11 -10
  177. package/dist/{idVerificationManager-BJapZfpy.d.ts → idVerificationManager-B6R8xNZq.d.ts} +4 -3
  178. package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-PMGM4hXY.esm.js} +5 -3
  179. package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DeeugC00.esm.js} +3 -3
  180. package/dist/identity-reuse.d.ts +2 -2
  181. package/dist/identity-reuse.esm.js +2 -2
  182. package/dist/identity-search.d.ts +97 -0
  183. package/dist/identity-search.esm.js +97 -0
  184. package/dist/{identityReuseManager-ooAbp6Kc.d.ts → identityReuseManager-C40ngKeM.d.ts} +86 -19
  185. package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CjFZ7WRa.esm.js} +9 -4
  186. package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-CLFjPp13.esm.js} +22 -25
  187. package/dist/index-DHuAkTe0.d.ts +1 -0
  188. package/dist/{index-CKQ9QBZP.d.ts → index-DxYNO94y.d.ts} +2 -2
  189. package/dist/index.d.ts +1 -1
  190. package/dist/index.esm.js +1 -1
  191. package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-lXP41N7b.esm.js} +1 -1
  192. package/dist/kyb-checks.d.ts +3 -0
  193. package/dist/kyb-checks.esm.js +3 -0
  194. package/dist/kybChecksManager-B7Di9auB.d.ts +95 -0
  195. package/dist/kybChecksManager-eRU3ht0m.esm.js +90 -0
  196. package/dist/kybChecksStateMachine-CU0oIYDR.esm.js +720 -0
  197. package/dist/mandatory-consent.d.ts +2 -2
  198. package/dist/mandatory-consent.esm.js +2 -2
  199. package/dist/{mandatoryConsentManager-qYojnZYg.d.ts → mandatoryConsentManager-C1B2ERZk.d.ts} +28 -11
  200. package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-Dh3pBhOe.esm.js} +7 -4
  201. package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-BjuI72HZ.esm.js} +32 -13
  202. package/dist/mediaRecorderOptions-g1TwTlhd.esm.js +87 -0
  203. package/dist/multipartRecordingService-WgK8ieRI.esm.js +407 -0
  204. package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-pcrrqrPR.esm.js} +1 -1
  205. package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-DFJlH7K3.esm.js} +11 -9
  206. package/dist/phone-number.d.ts +7 -1
  207. package/dist/phone-number.esm.js +15 -2
  208. package/dist/phone.d.ts +1 -1
  209. package/dist/phone.esm.js +2 -2
  210. package/dist/phoneFormat-C3q0Ukh4.esm.js +27 -0
  211. package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-VO1HEoUZ.d.ts} +8 -3
  212. package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-rA7updqF.esm.js} +6 -4
  213. package/dist/phoneServices-CFXcwCFr.esm.js +77 -0
  214. package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DKdY2Scx.esm.js} +56 -84
  215. package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
  216. package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
  217. package/dist/processFaceMatch-B_DkDTE5.esm.js +21 -0
  218. package/dist/qe-signature.d.ts +2 -2
  219. package/dist/qe-signature.esm.js +1 -1
  220. package/dist/recordingService-DxiwS8TV.esm.js +397 -0
  221. package/dist/redirect-to-mobile.d.ts +2 -2
  222. package/dist/redirect-to-mobile.esm.js +2 -2
  223. package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-DjsEtWLq.esm.js} +9 -6
  224. package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-pT6FiPE7.d.ts} +6 -4
  225. package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CMjjUXSu.esm.js} +67 -28
  226. package/dist/resolveForm-DaaQSVWp.esm.js +146 -0
  227. package/dist/{runChildModule-DSpP41Hl.esm.js → runChildModule-CJ_aQO92.esm.js} +9 -7
  228. package/dist/{sdkVersion-DKHwWEyH.esm.js → sdkVersion-C9kbIDeX.esm.js} +1 -1
  229. package/dist/selfie.d.ts +4 -4
  230. package/dist/selfie.esm.js +13 -12
  231. package/dist/{selfieErrorUtils-DoN1KFSQ.esm.js → selfieErrorUtils-DUokfsv4.esm.js} +1 -1
  232. package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DihwheJ6.d.ts} +2 -2
  233. package/dist/{selfieManager-DtQegA6T.esm.js → selfieManager-uJtbzEp9.esm.js} +7 -6
  234. package/dist/{selfieStateMachine-CnCwJZuC.esm.js → selfieStateMachine-CKXAmNkA.esm.js} +5 -5
  235. package/dist/{session-CNUfjlRc.esm.js → session-Bk2K8TEv.esm.js} +77 -9
  236. package/dist/session.d.ts +96 -10
  237. package/dist/session.esm.js +7 -6
  238. package/dist/{sessionInitializer-JM_glXR2.esm.js → sessionInitializer-CUCBGZ_s.esm.js} +359 -115
  239. package/dist/{setup-C5tfWt6W.esm.js → setup-B3a5KQeI.esm.js} +36 -27
  240. package/dist/{setup-YPKTUCY5.d.ts → setup-DpOr8H_l.d.ts} +2 -2
  241. package/dist/signature.d.ts +1 -1
  242. package/dist/signature.esm.js +2 -2
  243. package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-BgAja97K.esm.js} +5 -3
  244. package/dist/{signatureManager-BpVt_Jv7.d.ts → signatureManager-daT_8fj_.d.ts} +3 -3
  245. package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-CVPmvU2p.esm.js} +3 -3
  246. package/dist/{spawn-D9jgw9pW.d.ts → spawn-COZKetCS.d.ts} +1 -1
  247. package/dist/{stats-BEvexnKC.esm.js → stats-DoByUnTa.esm.js} +1 -1
  248. package/dist/stats.esm.js +1 -1
  249. package/dist/textRules-D4NRinKY.d.ts +41 -0
  250. package/dist/{trueSightService-fLmL_cyg.esm.js → trueSightService-BnQDjqUu.esm.js} +22 -10
  251. package/dist/trust-graph.d.ts +4 -3
  252. package/dist/trust-graph.esm.js +5 -3
  253. package/dist/{types-yPH8lAH-.d.ts → types-9wlf1-GE.d.ts} +3 -3
  254. package/dist/types-B-PIc0en.d.ts +115 -0
  255. package/dist/types-B9C8W01q.d.ts +34 -0
  256. package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
  257. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  258. package/dist/{types-BQA7lRDV.d.ts → types-C3rfDzgE.d.ts} +4 -2
  259. package/dist/types-CE1jkHw3.d.ts +6 -0
  260. package/dist/types-CTaL0XJz.d.ts +80 -0
  261. package/dist/{types-BAxn7MpY.d.ts → types-Cpdum4vi.d.ts} +125 -50
  262. package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
  263. package/dist/types-DEa3taWc.d.ts +217 -0
  264. package/dist/{types-CK8Jbjkp.d.ts → types-DFP7eSle.d.ts} +1 -1
  265. package/dist/{types-Ckir_BEs.d.ts → types-DJPU3W2M.d.ts} +3 -2
  266. package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
  267. package/dist/{events-Du2A4-Qr.esm.js → types-DYYMdAGv.esm.js} +4 -299
  268. package/dist/{types-B6HsSzpk.d.ts → types-Ddc4Tr_f.d.ts} +42 -6
  269. package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
  270. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  271. package/dist/video-selfie.d.ts +16 -14
  272. package/dist/video-selfie.esm.js +100 -24
  273. package/dist/{videoSelfieCameraWarmer-BBNKiau1.esm.js → videoSelfieCameraWarmer-CgqaNI-W.esm.js} +26 -27
  274. package/dist/{videoSelfieFlowModuleMachine-BCFVHBQ1.esm.js → videoSelfieFlowModuleMachine-IWdxw1TW.esm.js} +1 -1
  275. package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-DRrh4P0A.d.ts} +10 -5
  276. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  277. package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
  278. package/dist/{warmup-BElYWRh7.esm.js → warmup-BZOMg303.esm.js} +243 -30
  279. package/dist/wasm.d.ts +9 -3
  280. package/dist/wasm.esm.js +3 -3
  281. package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-DPK7qGgo.esm.js} +1 -1
  282. package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
  283. package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-CyLCM31e.esm.js} +45 -26
  284. package/dist/watchlist-for-business.d.ts +2 -1
  285. package/dist/watchlist-for-business.esm.js +2 -2
  286. package/dist/watchlist.d.ts +1 -1
  287. package/dist/watchlist.esm.js +2 -2
  288. package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-BH6M4kqA.esm.js} +40 -8
  289. package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-l7ZERQcV.d.ts} +57 -21
  290. package/dist/watchlistForBusinessStateMachine-BMWm5mcP.esm.js +166 -0
  291. package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-BDaVjzLW.esm.js} +5 -3
  292. package/dist/{watchlistManager-DJQOd8Pw.d.ts → watchlistManager-DQq4GxBO.d.ts} +3 -3
  293. package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-Cx-6QAvu.esm.js} +3 -3
  294. package/dist/workflow.d.ts +234 -45
  295. package/dist/workflow.esm.js +194 -80
  296. package/dist/{xstate-actors.esm-8Gzepa_A.esm.js → xstate-actors.esm-BCcwgosu.esm.js} +1 -1
  297. package/dist/xstate.cjs-D6Ur0X1F.d.ts +7 -0
  298. package/dist/{xstate.esm-DSajW7CJ.esm.js → xstate.esm-CIqUf_i6.esm.js} +1 -125
  299. package/package.json +22 -5
  300. package/dist/Actor-DpTj5PFb.d.ts +0 -1
  301. package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
  302. package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
  303. package/dist/cpf-uAZTPUBy.esm.js +0 -61
  304. package/dist/deepsightLoader-sH7920zw.esm.js +0 -55
  305. package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
  306. package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
  307. package/dist/index-DpTj5PFb.d.ts +0 -1
  308. package/dist/types-BvLo3U4u.d.ts +0 -134
  309. package/dist/types-zOgZqMni.d.ts +0 -6
  310. package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
  311. /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
@@ -1,23 +1,125 @@
1
- import { C as subscribeEvent, b as getAnalyticsBatcher, y as addEvent } from "./events-Du2A4-Qr.esm.js";
2
- import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-Cz90EHyu.esm.js";
3
- import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-fLmL_cyg.esm.js";
4
- import { t as SDK_VERSION } from "./sdkVersion-DKHwWEyH.esm.js";
5
- import { E as updateFeatureManagementUser } from "./feature-management-D4ne_hXW.esm.js";
6
- import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-BEvexnKC.esm.js";
1
+ import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
+ import { n as setWasmMetadataV2Enabled } from "./wasmMetadataVersionSync-U8EFUr1T.esm.js";
3
+ import { S as subscribeEvent, v as addEvent, y as getAnalyticsBatcher } from "./types-DYYMdAGv.esm.js";
4
+ import { c as setToken, r as getToken, t as api, u as endpoints } from "./api-CZpuJuZl.esm.js";
5
+ import "./events-CP3yOzAl.esm.js";
6
+ import { C as noteTokenActivated, _ as isFeatureEnabled, b as noteEnvironment, c as startTrueSightCollection, g as fetchFeatureConfig, u as trueSightLog, v as resetFeatureConfigCache } from "./trueSightService-BnQDjqUu.esm.js";
7
+ import { t as SDK_VERSION } from "./sdkVersion-C9kbIDeX.esm.js";
8
+ import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
9
+ import { E as updateFeatureManagementUser } from "./feature-management-SIBmKJs8.esm.js";
10
+ import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-DoByUnTa.esm.js";
7
11
  import { t as getParsedUserAgent } from "./getParsedUserAgent-DhQPeKqw.esm.js";
8
12
  import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
9
- import { a as isIOS } from "./platform-DkcRc9JV.esm.js";
13
+ import { a as isIOS } from "./platform-aPh7gTWh.esm.js";
10
14
  import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
11
15
  import { i as linkSessionWithTRI, r as isTRIStarted } from "./tri-xzRLIIMN.esm.js";
16
+ import { i as retryAfterReconnect } from "./connectivity-BCuEoQ-n.esm.js";
17
+ //#region src/internal/version/sdkPlatform.ts
18
+ /**
19
+ * The platform SDK 2 reports to the backend: the device fingerprint post's
20
+ * `deviceType`, and the SDK platform the WASM module stamps on capture
21
+ * metadata and fingerprint signals. Keep them in one place so they agree.
22
+ */
23
+ const SDK_PLATFORM = "WEBAPP";
24
+ //#endregion
25
+ //#region src/internal/fingerprint/incodeDeviceHash.ts
26
+ function isNonEmptyString(value) {
27
+ return typeof value === "string" && value.trim() !== "";
28
+ }
29
+ /**
30
+ * Reads the device hash from a PID signal response. The SDK never pairs a
31
+ * hash with an algorithm user-service didn't name, so all three fields must be
32
+ * present.
33
+ */
34
+ function readIncodeDeviceHash(data) {
35
+ if (typeof data !== "object" || data === null) return null;
36
+ const { deviceHash, algorithmName, algorithmVersion } = data;
37
+ if (!isNonEmptyString(deviceHash) || !isNonEmptyString(algorithmName) || !isNonEmptyString(algorithmVersion)) return null;
38
+ return {
39
+ hash: deviceHash,
40
+ algorithmName,
41
+ algorithmVersion
42
+ };
43
+ }
44
+ function createIncodeDeviceHashWaiter(timer) {
45
+ const pendingByToken = /* @__PURE__ */ new Map();
46
+ function pendingFor(token) {
47
+ let pending = pendingByToken.get(token);
48
+ if (!pending) {
49
+ let settle = () => void 0;
50
+ const deviceHash = new Promise((resolve) => {
51
+ settle = resolve;
52
+ });
53
+ let release = () => void 0;
54
+ const released = new Promise((resolve) => {
55
+ release = () => resolve(null);
56
+ });
57
+ pending = {
58
+ deviceHash,
59
+ settle,
60
+ released,
61
+ release
62
+ };
63
+ pendingByToken.set(token, pending);
64
+ }
65
+ return pending;
66
+ }
67
+ return {
68
+ settle(token, deviceHash) {
69
+ pendingFor(token).settle(deviceHash);
70
+ },
71
+ release(token) {
72
+ pendingFor(token).release();
73
+ },
74
+ async waitFor(token, timeoutMs) {
75
+ let timeout;
76
+ const timedOut = new Promise((resolve) => {
77
+ timeout = timer.setTimeout(() => resolve(null), Math.max(0, timeoutMs));
78
+ });
79
+ const pending = pendingFor(token);
80
+ try {
81
+ return await Promise.race([
82
+ pending.deviceHash,
83
+ pending.released,
84
+ timedOut
85
+ ]);
86
+ } finally {
87
+ if (timeout !== void 0) timer.clearTimeout(timeout);
88
+ }
89
+ },
90
+ reset() {
91
+ pendingByToken.forEach((pending) => pending.settle(null));
92
+ pendingByToken.clear();
93
+ }
94
+ };
95
+ }
96
+ const incodeDeviceHashWaiter = createIncodeDeviceHashWaiter(BrowserTimerProvider.getInstance());
97
+ //#endregion
12
98
  //#region src/internal/fingerprint/fingerprintSignalsReporter.ts
13
99
  const START_INTERVIEW_EVENT = "modelLoadEnd";
14
100
  const CAPTURE_INTERVIEW_EVENT = "captureAttemptFinished";
15
- const START_SIGNALS = ["pid", "device"];
101
+ const START_SIGNALS = ["device"];
102
+ const EMPTY_BEHAVIOUR_BASELINE_MESSAGE = "first read was empty, native collection is not running";
103
+ /**
104
+ * The native envelope reads the SDK platform and version, and the start batch
105
+ * goes out before any capture's Deepsight session has set them. A failure is
106
+ * rethrown under its own name, so TrueSight does not blame the read.
107
+ */
108
+ function setSdkIdentity(wasmUtil) {
109
+ try {
110
+ wasmUtil.setSdkPlatform(SDK_PLATFORM);
111
+ wasmUtil.setSdkVersion(SDK_VERSION);
112
+ } catch (error) {
113
+ const message = error instanceof Error ? error.message : String(error);
114
+ throw new Error(`setting the SDK platform and version failed: ${message}`);
115
+ }
116
+ }
16
117
  function createFingerprintSignalsReporter(deps) {
17
118
  let enabled = true;
18
119
  let sessionActive = false;
19
120
  let wasmReady = false;
20
121
  let started = false;
122
+ let pidStarted = false;
21
123
  let pendingStartSignals = START_SIGNALS;
22
124
  let prefetchStarted = false;
23
125
  let deviceDataUpdated = true;
@@ -26,6 +128,7 @@ function createFingerprintSignalsReporter(deps) {
26
128
  let optInPending = false;
27
129
  let queue = Promise.resolve();
28
130
  let generation = 0;
131
+ let behaviourBaselinePending = true;
29
132
  function enqueue(work) {
30
133
  const scheduledGeneration = generation;
31
134
  queue = queue.then(async () => {
@@ -34,13 +137,33 @@ function createFingerprintSignalsReporter(deps) {
34
137
  });
35
138
  }
36
139
  async function send(token, interviewEvent, type) {
37
- const metadata = await (await deps.getWasmUtil()).getFingerprintSignals(type);
38
- if (!metadata) return;
39
- if (deps.getToken() !== token) return;
40
- await deps.post(endpoints.deviceFingerprintSignals, {
41
- interviewEvent,
42
- metadata
43
- }, { "X-Incode-Hardware-Id": token });
140
+ const isPid = type === "pid";
141
+ let deviceHash = null;
142
+ try {
143
+ const wasmUtil = await deps.getWasmUtil();
144
+ setSdkIdentity(wasmUtil);
145
+ const metadata = await wasmUtil.getFingerprintSignals(type);
146
+ if (type === "behaviour" && behaviourBaselinePending) {
147
+ behaviourBaselinePending = false;
148
+ if (!metadata) deps.reportFailure({
149
+ message: EMPTY_BEHAVIOUR_BASELINE_MESSAGE,
150
+ signalsType: type,
151
+ interviewEvent
152
+ });
153
+ }
154
+ if (!metadata || deps.getToken() !== token) return;
155
+ const response = await deps.post(endpoints.deviceFingerprintSignals, isPid ? {
156
+ interviewEvent,
157
+ metadata,
158
+ deviceHashRequested: true
159
+ } : {
160
+ interviewEvent,
161
+ metadata
162
+ }, { "X-Incode-Hardware-Id": token });
163
+ deviceHash = isPid && enabled ? readIncodeDeviceHash(response) : null;
164
+ } finally {
165
+ if (isPid) deps.onDeviceHash(token, deviceHash);
166
+ }
44
167
  }
45
168
  /**
46
169
  * Sends `types` in order and stops at the first failure. Resolves to the
@@ -61,6 +184,7 @@ function createFingerprintSignalsReporter(deps) {
61
184
  }
62
185
  /** Switches native behaviour collection (`sbc`); resolves to whether it worked. */
63
186
  async function applyNativeCollection(on) {
187
+ if (!on) behaviourBaselinePending = false;
64
188
  try {
65
189
  (await deps.getWasmUtil()).setBehaviourSignalsCollection(on);
66
190
  return true;
@@ -98,6 +222,7 @@ function createFingerprintSignalsReporter(deps) {
98
222
  if (!token) return;
99
223
  startPrefetch();
100
224
  if (optInPending) enqueue(applyNativeOptIn);
225
+ startPid(token);
101
226
  if (started || !sessionActive) return;
102
227
  started = true;
103
228
  ensureSubscribed();
@@ -117,6 +242,18 @@ function createFingerprintSignalsReporter(deps) {
117
242
  if (unsent.length > 0) allowRetry(unsent);
118
243
  });
119
244
  }
245
+ /**
246
+ * PID goes ahead of activation: the activation post waits for the pid. It is
247
+ * queued before DEVICE, so it still precedes it.
248
+ */
249
+ function startPid(token) {
250
+ if (pidStarted) return;
251
+ pidStarted = true;
252
+ const pidGeneration = generation;
253
+ enqueue(async () => {
254
+ if ((await sendAll(token, START_INTERVIEW_EVENT, ["pid"])).length > 0 && pidGeneration === generation) pidStarted = false;
255
+ });
256
+ }
120
257
  function onCaptureAttemptFinished() {
121
258
  wasmReady = true;
122
259
  tryStart();
@@ -142,6 +279,7 @@ function createFingerprintSignalsReporter(deps) {
142
279
  generation += 1;
143
280
  sessionActive = false;
144
281
  started = false;
282
+ pidStarted = false;
145
283
  pendingStartSignals = START_SIGNALS;
146
284
  optInPending = false;
147
285
  deviceDataUpdated = true;
@@ -186,11 +324,11 @@ function createFingerprintSignalsReporter(deps) {
186
324
  }
187
325
  const fingerprintSignalsReporter = createFingerprintSignalsReporter({
188
326
  getWasmUtil: async () => {
189
- const { WasmUtilProvider } = await import("./WasmUtilProvider-DtJuBdt-.esm.js").then((n) => n.n);
190
- return WasmUtilProvider.getInstance();
327
+ return (await import("./WasmUtilProvider-0xTxgP0R.esm.js").then((n) => n.n)).WasmUtilProvider.getInstance();
191
328
  },
192
329
  getToken: () => getToken(),
193
- post: (url, body, headers) => api.post(url, body, { headers }),
330
+ post: async (url, body, headers) => (await api.post(url, body, { headers })).data,
331
+ onDeviceHash: (token, deviceHash) => incodeDeviceHashWaiter.settle(token, deviceHash),
194
332
  subscribe: (listener) => subscribeEvent(listener),
195
333
  reportFailure: ({ message, signalsType, interviewEvent }) => trueSightLog("warning", "wasm", "other", `fingerprint signals failed type=${signalsType} event=${interviewEvent} error=${message}`)
196
334
  });
@@ -328,6 +466,55 @@ var BrowserInfoProvider = class {
328
466
  }
329
467
  };
330
468
  //#endregion
469
+ //#region ../infra/src/providers/browser/IpifyProvider.ts
470
+ let cachedIp;
471
+ let inFlightLookup;
472
+ /**
473
+ * Resets the module-level IP cache. Intended for tests and full session resets.
474
+ */
475
+ function resetIpifyCache() {
476
+ cachedIp = void 0;
477
+ inFlightLookup = void 0;
478
+ }
479
+ async function fetchIpFromIpify() {
480
+ if (typeof fetch === "undefined") return "";
481
+ let timeoutId = 0;
482
+ const controller = new AbortController();
483
+ if (AbortSignal.timeout) {
484
+ const signal = AbortSignal.timeout(3e3);
485
+ return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
486
+ }
487
+ const timeoutPromise = new Promise((_, reject) => {
488
+ timeoutId = setTimeout(() => {
489
+ controller.abort();
490
+ reject(/* @__PURE__ */ new Error("Request timeout"));
491
+ }, 3e3);
492
+ });
493
+ const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
494
+ const result = await Promise.race([fetchPromise, timeoutPromise]);
495
+ clearTimeout(timeoutId);
496
+ return result;
497
+ }
498
+ var IpifyProvider = class {
499
+ async getIp() {
500
+ if (cachedIp !== void 0) return cachedIp;
501
+ if (inFlightLookup) return inFlightLookup;
502
+ inFlightLookup = (async () => {
503
+ try {
504
+ const ip = await fetchIpFromIpify();
505
+ cachedIp = ip;
506
+ return ip;
507
+ } catch {
508
+ cachedIp = "";
509
+ return "";
510
+ } finally {
511
+ inFlightLookup = void 0;
512
+ }
513
+ })();
514
+ return inFlightLookup;
515
+ }
516
+ };
517
+ //#endregion
331
518
  //#region ../infra/src/device/getDeviceData.ts
332
519
  const HIGH_ENTROPY_HINTS = /* @__PURE__ */ new Set([
333
520
  "model",
@@ -515,19 +702,13 @@ var FingerprintProvider = class {
515
702
  constructor(ipLookup) {
516
703
  this.ipLookup = ipLookup;
517
704
  }
518
- prime() {
519
- this.startVisitorId();
520
- }
521
- startVisitorId() {
522
- if (!this.visitorIdPromise) {
523
- this.visitorIdPromise = getThumbmarkId();
524
- this.visitorIdPromise.catch(() => void 0);
525
- }
526
- return this.visitorIdPromise;
527
- }
528
705
  async getFingerprint(disableIpify = false) {
529
- const visitorId = await this.startVisitorId();
530
- const [deviceInfo, ip] = await Promise.all([getDeviceFingerprintInfo(), disableIpify ? Promise.resolve("") : this.ipLookup.getIp()]);
706
+ this.visitorIdPromise ??= getThumbmarkId();
707
+ const [visitorId, deviceInfo, ip] = await Promise.all([
708
+ this.visitorIdPromise,
709
+ getDeviceFingerprintInfo(),
710
+ disableIpify ? Promise.resolve("") : this.ipLookup.getIp()
711
+ ]);
531
712
  return {
532
713
  visitorId,
533
714
  ip,
@@ -537,55 +718,6 @@ var FingerprintProvider = class {
537
718
  }
538
719
  };
539
720
  //#endregion
540
- //#region ../infra/src/providers/browser/IpifyProvider.ts
541
- let cachedIp;
542
- let inFlightLookup;
543
- /**
544
- * Resets the module-level IP cache. Intended for tests and full session resets.
545
- */
546
- function resetIpifyCache() {
547
- cachedIp = void 0;
548
- inFlightLookup = void 0;
549
- }
550
- async function fetchIpFromIpify() {
551
- if (typeof fetch === "undefined") return "";
552
- let timeoutId = 0;
553
- const controller = new AbortController();
554
- if (AbortSignal.timeout) {
555
- const signal = AbortSignal.timeout(3e3);
556
- return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
557
- }
558
- const timeoutPromise = new Promise((_, reject) => {
559
- timeoutId = setTimeout(() => {
560
- controller.abort();
561
- reject(/* @__PURE__ */ new Error("Request timeout"));
562
- }, 3e3);
563
- });
564
- const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
565
- const result = await Promise.race([fetchPromise, timeoutPromise]);
566
- clearTimeout(timeoutId);
567
- return result;
568
- }
569
- var IpifyProvider = class {
570
- async getIp() {
571
- if (cachedIp !== void 0) return cachedIp;
572
- if (inFlightLookup) return inFlightLookup;
573
- inFlightLookup = (async () => {
574
- try {
575
- const ip = await fetchIpFromIpify();
576
- cachedIp = ip;
577
- return ip;
578
- } catch {
579
- cachedIp = "";
580
- return "";
581
- } finally {
582
- inFlightLookup = void 0;
583
- }
584
- })();
585
- return inFlightLookup;
586
- }
587
- };
588
- //#endregion
589
721
  //#region src/internal/fingerprint/fingerprintApi.ts
590
722
  async function getFingerprint(disableIpify) {
591
723
  const shouldDisableIpify = disableIpify ?? getDisableIpify();
@@ -657,25 +789,38 @@ function formatBrowser(browser) {
657
789
  if (!browser.name || !browser.version) return "Unknown";
658
790
  return `${browser.name} ${browser.version}`;
659
791
  }
792
+ /**
793
+ * The session's activation post: device data (IP, browser, OS) and, when it
794
+ * arrives in time, the pid as the device hash. Mandatory consent rides on its
795
+ * response. ThumbmarkJS is not sent: its hash collides too often to identify a
796
+ * device.
797
+ */
660
798
  async function submitDeviceFingerprint(options = {}, dependencies) {
661
799
  const { disableIpify = false, hostingApp, signal } = options;
662
800
  const token = getToken();
663
- const fingerprint = await dependencies.fingerprintProvider.getFingerprint(disableIpify);
801
+ const [deviceInfo, ip, deviceHash] = await Promise.all([
802
+ getDeviceFingerprintInfo(),
803
+ disableIpify ? Promise.resolve("") : dependencies.ipLookup.getIp(),
804
+ dependencies.getDeviceHash?.() ?? null
805
+ ]);
664
806
  if (getToken() !== token || dependencies.isCurrentSession?.() === false) throw new Error("Session changed during fingerprint collection");
665
807
  const hasLiedBrowser = isBrowserSimulation(dependencies.browserEnv);
666
808
  const payload = {
667
- hash: fingerprint.visitorId || "",
668
- ip: fingerprint.ip || "",
669
- deviceType: "WEBAPP",
670
- data: JSON.stringify(fingerprint),
671
- osVersion: formatOsVersion(fingerprint.deviceInfo.os),
672
- deviceModel: fingerprint.deviceInfo.device.model || "",
673
- browser: formatBrowser(fingerprint.deviceInfo.browser),
809
+ hash: deviceHash?.hash ?? "",
810
+ ip,
811
+ deviceType: SDK_PLATFORM,
812
+ data: JSON.stringify({
813
+ ip,
814
+ deviceInfo
815
+ }),
816
+ osVersion: formatOsVersion(deviceInfo.os),
817
+ deviceModel: deviceInfo.device.model || "",
818
+ browser: formatBrowser(deviceInfo.browser),
674
819
  hasLiedBrowser,
675
820
  sdkVersion: SDK_VERSION,
676
821
  hostingApp: hostingApp ?? "Web SDK",
677
- algorithmName: fingerprint.algorithmName,
678
- algorithmVersion: fingerprint.algorithmVersion
822
+ algorithmName: deviceHash?.algorithmName,
823
+ algorithmVersion: deviceHash?.algorithmVersion
679
824
  };
680
825
  const response = await api.post(endpoints.deviceFingerprint, payload, { signal });
681
826
  if (!response.ok) throw new Error(`Failed to submit fingerprint: ${response.status} ${response.statusText}`);
@@ -718,6 +863,9 @@ let cachedDisableIpify = false;
718
863
  let clientIpLookupEnabled = true;
719
864
  let clientFingerprintEnabled = true;
720
865
  let clientHostingApp;
866
+ let clientWasmConfig;
867
+ let clientWasmDisabled = false;
868
+ const DEVICE_HASH_WAIT_MS = 3e3;
721
869
  function setClientIpLookupEnabled(enabled) {
722
870
  clientIpLookupEnabled = enabled;
723
871
  }
@@ -735,6 +883,59 @@ function setClientFingerprintEnabled(enabled) {
735
883
  clientFingerprintEnabled = enabled;
736
884
  fingerprintSignalsReporter.setEnabled(enabled);
737
885
  }
886
+ /**
887
+ * The known WASM config: from `setup({ wasm })`, `setWasmConfig`, or
888
+ * `<incode-flow>` / `<incode-workflow>`, which pass the config their captures
889
+ * load. Activation loads the WASM runtime only when it is known, so headless
890
+ * hosts that never configured WASM don't download it.
891
+ */
892
+ function setClientWasmConfig(config) {
893
+ clientWasmConfig = config;
894
+ }
895
+ /**
896
+ * `setup({ wasm: false })`: activations load no WASM runtime, so their post
897
+ * sends no device hash, until `setup({ wasm })` or `reset()`.
898
+ */
899
+ function setClientWasmDisabled(disabled) {
900
+ clientWasmDisabled = disabled;
901
+ }
902
+ const SLOW_EFFECTIVE_TYPES = /* @__PURE__ */ new Set([
903
+ "slow-2g",
904
+ "2g",
905
+ "3g"
906
+ ]);
907
+ function isSlowNetwork() {
908
+ const connection = new BrowserEnvironmentProvider().getNavigatorProperty("connection");
909
+ return connection?.saveData === true || SLOW_EFFECTIVE_TYPES.has(connection?.effectiveType);
910
+ }
911
+ /** Why this activation's post won't wait for a pid, if it won't. */
912
+ function deviceHashSkipReason(activationOptedOut) {
913
+ if (activationOptedOut || clientWasmDisabled) return "wasmDisabled";
914
+ if (!clientWasmConfig) return "noWasmConfig";
915
+ return isSlowNetwork() ? "slowNetwork" : void 0;
916
+ }
917
+ /**
918
+ * Starts the WASM runtime, without models, so the PID signal can return the
919
+ * pid while activation runs: it is the device hash of the activation post.
920
+ * Capture modules add their pipelines later. A runtime that fails to start
921
+ * ends the post's wait at once.
922
+ */
923
+ function startSessionWasm(token, config) {
924
+ (async () => {
925
+ try {
926
+ const warmupModule = await import("./warmup-BZOMg303.esm.js").then((n) => n.c);
927
+ const warmup = warmupModule.warmupWasm({
928
+ ...config,
929
+ pipelines: []
930
+ });
931
+ warmup.catch(() => void 0);
932
+ await Promise.race([warmup, warmupModule.whenWasmRuntimeReady()]);
933
+ fingerprintSignalsReporter.onWasmReady();
934
+ } catch {
935
+ incodeDeviceHashWaiter.settle(token, null);
936
+ }
937
+ })();
938
+ }
738
939
  function resolveDisableIpify(serverDisableIpify) {
739
940
  return !clientIpLookupEnabled || serverDisableIpify;
740
941
  }
@@ -773,6 +974,24 @@ function whenSessionFingerprintSettled() {
773
974
  return fingerprintSettled?.promise ?? Promise.resolve(cachedFingerprintResult);
774
975
  }
775
976
  /**
977
+ * A screen now waits for the activation post (its consent decision), so the
978
+ * post stops waiting for the pid and goes with what it has. The pid needs the
979
+ * WASM runtime to download and start, about 2 s even on a fast desktop, so it
980
+ * goes with the post only when it is in before the post goes out.
981
+ */
982
+ function endDeviceHashWait() {
983
+ const token = getToken();
984
+ if (token) incodeDeviceHashWaiter.release(token);
985
+ }
986
+ /** Best-effort: the format latch must never fail session initialization. */
987
+ function applyCaptureMetadataFormat(v2Enabled) {
988
+ try {
989
+ setWasmMetadataV2Enabled(v2Enabled);
990
+ } catch (error) {
991
+ trueSightLog("warning", "session", "orchestration", `capture metadata format not applied error=${String(error)}`);
992
+ }
993
+ }
994
+ /**
776
995
  * Activates a session by setting the auth token on the HTTP client and
777
996
  * preloading session-scoped state.
778
997
  *
@@ -802,7 +1021,7 @@ function whenSessionFingerprintSettled() {
802
1021
  * ```
803
1022
  */
804
1023
  async function initializeSession(options = {}) {
805
- const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true } = options;
1024
+ const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true, wasm } = options;
806
1025
  let triLinkPromise = Promise.resolve();
807
1026
  if (token !== void 0 && token !== getToken()) {
808
1027
  setToken(token);
@@ -835,32 +1054,37 @@ async function initializeSession(options = {}) {
835
1054
  }
836
1055
  const settled = createFingerprintSettled();
837
1056
  fingerprintSettled = settled;
838
- const fingerprintProvider = clientFingerprintEnabled ? new FingerprintProvider(new IpifyProvider()) : void 0;
839
- fingerprintProvider?.prime?.();
1057
+ const fingerprintEnabled = clientFingerprintEnabled;
1058
+ const activeToken = getToken();
1059
+ const skipReason = deviceHashSkipReason(wasm === false);
1060
+ if (activeToken && fingerprintEnabled && clientWasmConfig && !skipReason) startSessionWasm(activeToken, clientWasmConfig);
840
1061
  let fingerprintPromise;
841
1062
  sessionInitPromise = (async () => {
842
1063
  let features;
843
1064
  let serverDisableIpify = false;
1065
+ let captureMetadataV2 = false;
844
1066
  try {
845
- features = await fetchFeatureConfig(signal);
1067
+ features = await retryAfterReconnect(() => fetchFeatureConfig(signal), signal);
846
1068
  serverDisableIpify = isFeatureEnabled("DISABLE_IPIFY", features.features);
1069
+ captureMetadataV2 = isFeatureEnabled("DEEPSIGHT_V2", features.features);
847
1070
  startTrueSightCollection(features);
848
1071
  } catch {
849
1072
  features = { sessionIdentifier: "" };
850
1073
  trueSightLog("warning", "session", "orchestration", "feature-config fetch failed");
851
1074
  startTrueSightCollection();
852
1075
  }
1076
+ applyCaptureMetadataFormat(captureMetadataV2);
853
1077
  const disableIpify = resolveDisableIpify(serverDisableIpify);
1078
+ fingerprintPromise = submitSessionFingerprint(fingerprintEnabled, {
1079
+ disableIpify,
1080
+ hostingApp,
1081
+ signal
1082
+ }, settled, skipReason);
854
1083
  const preloadedFlow = await flowPreloadPromise;
855
1084
  await updateFeatureManagementUser({ customIDs: {
856
1085
  hashed_onboarding_id: features.sessionIdentifier || void 0,
857
1086
  flow_id: preloadedFlow?.flowId
858
1087
  } });
859
- fingerprintPromise = submitSessionFingerprint(fingerprintProvider, {
860
- disableIpify,
861
- hostingApp,
862
- signal
863
- }, settled);
864
1088
  try {
865
1089
  const browserInfo = new BrowserInfoProvider().getBrowserInfo();
866
1090
  const language = new BrowserEnvironmentProvider().getNavigatorProperty("language");
@@ -910,25 +1134,43 @@ async function initializeSession(options = {}) {
910
1134
  * while it still belongs to the current activation (a token change resets
911
1135
  * `fingerprintSettled`) and always settles the waiter.
912
1136
  */
913
- async function submitSessionFingerprint(fingerprintProvider, options, settled) {
1137
+ async function submitSessionFingerprint(enabled, options, settled, skipReason) {
914
1138
  const isCurrent = () => fingerprintSettled === settled;
1139
+ const token = getToken();
1140
+ const startedAtMs = getTimestamp();
1141
+ const deadlineMs = startedAtMs + DEVICE_HASH_WAIT_MS;
1142
+ let outcomeLogged = false;
1143
+ const logOutcome = (outcome) => {
1144
+ if (!outcomeLogged) {
1145
+ outcomeLogged = true;
1146
+ trueSightLog("info", "session", "other", `device hash ${outcome}`);
1147
+ }
1148
+ };
1149
+ const getDeviceHash = !skipReason && token ? async () => {
1150
+ const deviceHash = await incodeDeviceHashWaiter.waitFor(token, deadlineMs - getTimestamp());
1151
+ logOutcome(`${deviceHash ? "sent" : "missing"} waitMs=${getTimestamp() - startedAtMs}`);
1152
+ return deviceHash;
1153
+ } : void 0;
915
1154
  try {
916
- if (fingerprintProvider) try {
917
- const result = await submitDeviceFingerprint(options, {
918
- fingerprintProvider,
919
- browserEnv: new BrowserEnvironmentProvider(),
920
- isCurrentSession: isCurrent
921
- });
922
- if (isCurrent()) {
923
- cachedFingerprintResult = result;
924
- cachedFingerprintSuccess = true;
925
- flushDeviceStatsQueue();
1155
+ if (enabled) {
1156
+ if (skipReason) logOutcome(`skipped reason=${skipReason}`);
1157
+ try {
1158
+ const result = await retryAfterReconnect(() => submitDeviceFingerprint(options, {
1159
+ ipLookup: new IpifyProvider(),
1160
+ browserEnv: new BrowserEnvironmentProvider(),
1161
+ isCurrentSession: isCurrent,
1162
+ getDeviceHash
1163
+ }), options.signal);
1164
+ if (isCurrent()) {
1165
+ cachedFingerprintResult = result;
1166
+ cachedFingerprintSuccess = true;
1167
+ flushDeviceStatsQueue();
1168
+ }
1169
+ } catch (error) {
1170
+ console.warn("Failed to submit device fingerprint:", error);
1171
+ trueSightLog("warning", "session", "other", "device fingerprint submit failed");
926
1172
  }
927
- } catch (error) {
928
- console.warn("Failed to submit device fingerprint:", error);
929
- trueSightLog("warning", "session", "other", "device fingerprint submit failed");
930
- }
931
- else if (isCurrent()) flushDeviceStatsQueue();
1173
+ } else if (isCurrent()) flushDeviceStatsQueue();
932
1174
  } finally {
933
1175
  settled.resolve(isCurrent() ? cachedFingerprintResult : void 0);
934
1176
  }
@@ -957,7 +1199,9 @@ function getFingerprintEnabled() {
957
1199
  * Useful for testing or when starting a new session.
958
1200
  */
959
1201
  function resetSessionInit() {
1202
+ applyCaptureMetadataFormat(false);
960
1203
  fingerprintSignalsReporter.resetSession();
1204
+ incodeDeviceHashWaiter.reset();
961
1205
  sessionInitialized = false;
962
1206
  cachedFeatures = null;
963
1207
  cachedDisableIpify = false;
@@ -970,4 +1214,4 @@ function resetSessionInit() {
970
1214
  resetDeviceStatsQueue();
971
1215
  }
972
1216
  //#endregion
973
- export { IpifyProvider as _, resetSessionInit as a, BrowserEnvironmentProvider as b, setClientIpLookupEnabled as c, registerFlowPreloader as d, resetStandaloneFlowPolicy as f, getFingerprint as g, isBrowserSimulation as h, initializeSession as i, whenSessionFingerprintSettled as l, setStandaloneFlowPolicy as m, getFingerprintEnabled as n, setClientFingerprintEnabled as o, resolveStandaloneFlowPolicy as p, getSessionFingerprintResult as r, setClientHostingApp as s, getDisableIpify as t, getStandaloneFlowPolicy as u, getThumbmarkId as v, fingerprintSignalsReporter as x, getDeviceFingerprintInfo as y };
1217
+ export { BrowserEnvironmentProvider as C, IpifyProvider as S, SDK_PLATFORM as T, setStandaloneFlowPolicy as _, initializeSession as a, getThumbmarkId as b, setClientHostingApp as c, setClientWasmDisabled as d, whenSessionFingerprintSettled as f, resolveStandaloneFlowPolicy as g, resetStandaloneFlowPolicy as h, getSessionFingerprintResult as i, setClientIpLookupEnabled as l, registerFlowPreloader as m, getDisableIpify as n, resetSessionInit as o, getStandaloneFlowPolicy as p, getFingerprintEnabled as r, setClientFingerprintEnabled as s, endDeviceHashWait as t, setClientWasmConfig as u, isBrowserSimulation as v, fingerprintSignalsReporter as w, getDeviceFingerprintInfo as x, getFingerprint as y };