@incodetech/core 2.4.1-agentic → 2.4.1-agentic.10

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 (239) hide show
  1. package/dist/{BaseWasmProvider-Bq3OHo7P.d.ts → BaseWasmProvider-bBNquvYn.d.ts} +2 -2
  2. package/dist/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
  3. package/dist/{multipartRecordingService-DMBxHKS2.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -734
  4. package/dist/DateFormattingProvider-DPq9zco-.esm.js +25 -0
  5. package/dist/{FaceDetectionProvider-B83VmClw.esm.js → FaceDetectionProvider-BSLpXAGx.esm.js} +11 -12
  6. package/dist/{IIdCaptureCapability-CGcEt2Cw.d.ts → IIdCaptureCapability-C-5M8pP1.d.ts} +2 -2
  7. package/dist/{IWasmUtilCapability-Cqiaxydi.d.ts → IWasmUtilCapability-BRn0wz8v.d.ts} +2 -2
  8. package/dist/MultipartRecordingProvider-BfQPSgSO.esm.js +151 -0
  9. package/dist/{StreamCanvasCapture-C3xNfOsv.d.ts → StreamCanvasCapture-ixfy84ys.d.ts} +2 -2
  10. package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
  11. package/dist/{WasmUtilProvider-GTkoJyFY.esm.js → WasmUtilProvider-C_puwvVn.esm.js} +2 -2
  12. package/dist/WorkerEncoderRecordingProvider-CyCrQnZR.esm.js +80 -0
  13. package/dist/addressSearch-B_4JYKa-.esm.js +72 -0
  14. package/dist/ae-signature.esm.js +1 -1
  15. package/dist/antifraud.esm.js +2 -2
  16. package/dist/{antifraudManager-CQ08atTC.esm.js → antifraudManager-BWCVkSu2.esm.js} +2 -2
  17. package/dist/{antifraudStateMachine-BcsUTTIr.esm.js → antifraudStateMachine-CX9I2f3s.esm.js} +1 -1
  18. package/dist/{api-BO8JA7Pf.esm.js → api-BSnbg4HO.esm.js} +4 -0
  19. package/dist/{apiError-CfuIvnUy.esm.js → apiError-Bmwy1Fa7.esm.js} +1 -1
  20. package/dist/{attemptCarry-BjTJ6bMQ.esm.js → attemptCarry-zQH85Elh.esm.js} +2 -2
  21. package/dist/authentication.d.ts +3 -3
  22. package/dist/authentication.esm.js +2 -2
  23. package/dist/{authenticationManager-DvmklBTE.esm.js → authenticationManager-BoiOaB0m.esm.js} +5 -5
  24. package/dist/{authenticationManager-C-cOki0Y.d.ts → authenticationManager-CISxaY6N.d.ts} +1 -1
  25. package/dist/{authenticationStateMachine-BL2ptOA0.esm.js → authenticationStateMachine-BMD1JLwr.esm.js} +3 -3
  26. package/dist/avatar.d.ts +1 -1
  27. package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
  28. package/dist/{backCameraStream-C5_NNfUN.esm.js → backCameraStream-DS1oDiUq.esm.js} +10 -65
  29. package/dist/{browser-pQZA35G2-DtkAf6sn.esm.js → browser-pQZA35G2-PIj2uGBm.esm.js} +1 -1
  30. package/dist/camera.d.ts +2 -2
  31. package/dist/camera.esm.js +1 -1
  32. package/dist/certificate-issuance.esm.js +2 -2
  33. package/dist/{certificateIssuanceManager-CM0fuqDC.esm.js → certificateIssuanceManager-DzDuQTsK.esm.js} +2 -2
  34. package/dist/{certificateIssuanceStateMachine-kksIUOPD.esm.js → certificateIssuanceStateMachine-BAOYLACb.esm.js} +2 -2
  35. package/dist/{connectivity-HSl0diCx.esm.js → connectivity-BCuEoQ-n.esm.js} +2 -21
  36. package/dist/consent.d.ts +1 -1
  37. package/dist/consent.esm.js +2 -2
  38. package/dist/{consentManager-_q9yJUku.d.ts → consentManager-7aHaehwF.d.ts} +5 -5
  39. package/dist/{consentManager-CBwFozhv.esm.js → consentManager-DFSKQTcR.esm.js} +2 -2
  40. package/dist/{consentStateMachine-CpmRAcr2.esm.js → consentStateMachine-4nZIH2O8.esm.js} +1 -1
  41. package/dist/{cpf-uAZTPUBy.esm.js → cpf-BIADjddF.esm.js} +1 -25
  42. package/dist/{createFaceAvatar-lYX0VTYs.d.ts → createFaceAvatar-BimBTONm.d.ts} +1 -1
  43. package/dist/cross-document-data-match.esm.js +1 -1
  44. package/dist/{crossDocumentDataMatchManager-64O8t10a.esm.js → crossDocumentDataMatchManager-D7ka2qOC.esm.js} +2 -2
  45. package/dist/curp-validation.d.ts +1 -1
  46. package/dist/curp-validation.esm.js +2 -2
  47. package/dist/{curpValidationManager-CLgJQcx0.esm.js → curpValidationManager-BVTt7IgC.esm.js} +2 -2
  48. package/dist/{curpValidationManager-CXpFE-Mv.d.ts → curpValidationManager-DEqTUWdu.d.ts} +1 -1
  49. package/dist/{curpValidationStateMachine-Bx9YhVkJ.esm.js → curpValidationStateMachine-FB_MRbZQ.esm.js} +2 -2
  50. package/dist/custom-fields.esm.js +1 -1
  51. package/dist/custom-watchlist.esm.js +2 -2
  52. package/dist/{customFieldsManager-DWt_0YtJ.esm.js → customFieldsManager-gbsq53p6.esm.js} +2 -2
  53. package/dist/{customWatchlistManager-D8o-2Nej.esm.js → customWatchlistManager-50APwk4Z.esm.js} +2 -2
  54. package/dist/{customWatchlistStateMachine-Sbi6DIcK.esm.js → customWatchlistStateMachine-CpEVPzuT.esm.js} +1 -1
  55. package/dist/{deepsightService-twg3bXqY.esm.js → deepsightLoader-BKCT8UT1.esm.js} +34 -29
  56. package/dist/definitionSource-BHNxbuiv.esm.js +184 -0
  57. package/dist/{desktopCameraElection-kHY2IDJi.esm.js → desktopCameraElection-Dvvw7PRY.esm.js} +5 -5
  58. package/dist/document-capture.d.ts +3 -3
  59. package/dist/document-capture.esm.js +2 -2
  60. package/dist/{documentCaptureManager-CMSC_Mhd.esm.js → documentCaptureManager-BG5TuqJz.esm.js} +3 -2
  61. package/dist/{documentCaptureManager-6tnnDkMX.d.ts → documentCaptureManager-DDfviFg0.d.ts} +25 -4
  62. package/dist/{documentCaptureStateMachine-BCwD5Rto.esm.js → documentCaptureStateMachine-C7PW_Ah9.esm.js} +67 -26
  63. package/dist/dynamic-forms.esm.js +2 -2
  64. package/dist/{dynamicFormsManager-DU6W1e20.esm.js → dynamicFormsManager-B0bpHhhJ.esm.js} +2 -2
  65. package/dist/{dynamicFormsStateMachine-C8Z7k3vo.esm.js → dynamicFormsStateMachine-2ZHyejBc.esm.js} +2 -2
  66. package/dist/ekyb.d.ts +4 -4
  67. package/dist/ekyb.esm.js +3 -3
  68. package/dist/{ekybManager-TB6ZG5lX.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
  69. package/dist/{ekybManager-TGfqyjuu.esm.js → ekybManager-P9mC7W9J.esm.js} +2 -2
  70. package/dist/{ekybStateMachine-DBgFuEPK.esm.js → ekybStateMachine-C7HKaeVr.esm.js} +7 -3
  71. package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
  72. package/dist/ekyc-prefill.d.ts +17 -0
  73. package/dist/ekyc-prefill.esm.js +3 -0
  74. package/dist/ekyc.d.ts +3 -2
  75. package/dist/ekyc.esm.js +3 -3
  76. package/dist/{ekycManager-C2cgG2Pl.esm.js → ekycManager-CeeJoRFY.esm.js} +2 -2
  77. package/dist/{ekycManager-BSQteIfC.d.ts → ekycManager-q1fos6IY.d.ts} +2 -1
  78. package/dist/ekycPrefillManager-C6BFFKxc.esm.js +102 -0
  79. package/dist/ekycPrefillManager-PPGVZbWk.d.ts +565 -0
  80. package/dist/ekycPrefillStateMachine-Dku90kZL.esm.js +686 -0
  81. package/dist/ekycRules-BLX7Elcb.esm.js +319 -0
  82. package/dist/{ekycStateMachine-CuNF7z4O.esm.js → ekycStateMachine-DBTczgGE.esm.js} +719 -596
  83. package/dist/{ekycUtils-BFncpC4F.esm.js → ekycUtils-Dcff8BOD.esm.js} +103 -14
  84. package/dist/electronic-signature.esm.js +1 -1
  85. package/dist/{electronicSignatureManager-C7pqXsRm.esm.js → electronicSignatureManager-BKQuhJm_.esm.js} +4 -4
  86. package/dist/email.esm.js +2 -2
  87. package/dist/{emailManager-FH_CP0cT.esm.js → emailManager-CGmKbsBL.esm.js} +2 -2
  88. package/dist/{emailStateMachine-Cx-uTaBV.esm.js → emailStateMachine-CGY1UGs2.esm.js} +2 -2
  89. package/dist/{events-CQteqXfy.esm.js → events-C7h7oaTE.esm.js} +1 -1
  90. package/dist/events.esm.js +1 -1
  91. package/dist/extensibility.d.ts +20 -18
  92. package/dist/extensibility.esm.js +37 -35
  93. package/dist/{externalFetch-CQY41QT1.esm.js → externalFetch-cUjJYyXj.esm.js} +1 -1
  94. package/dist/face-match.d.ts +1 -1
  95. package/dist/face-match.esm.js +2 -2
  96. package/dist/{faceCaptureManagerFactory-C-xKdj-d.d.ts → faceCaptureManagerFactory-BVwVGa3z.d.ts} +7 -7
  97. package/dist/{faceCaptureManagerFactory-CBm05KnT.esm.js → faceCaptureManagerFactory-ClFsByZc.esm.js} +4 -4
  98. package/dist/{faceCaptureSetup-BQjCbL51.esm.js → faceCaptureSetup-9hv5GC_H.esm.js} +12 -403
  99. package/dist/{faceMatchManager-Z4UDLwAv.d.ts → faceMatchManager-BZtEw6bB.d.ts} +9 -3
  100. package/dist/{faceMatchManager-B2zp7yP4.esm.js → faceMatchManager-CRe7Nvm6.esm.js} +2 -2
  101. package/dist/{faceMatchStateMachine-ByTMQCUC.esm.js → faceMatchStateMachine-EX9QhxFE.esm.js} +28 -14
  102. package/dist/{feature-management-DjAG5lsJ.esm.js → feature-management-CmKTG_T5.esm.js} +35 -21
  103. package/dist/feature-management.esm.js +1 -1
  104. package/dist/field-comparison.esm.js +1 -1
  105. package/dist/{fieldComparisonManager-CC0vKmpf.esm.js → fieldComparisonManager-DuosZJso.esm.js} +2 -2
  106. package/dist/fiscal-qr.esm.js +1 -1
  107. package/dist/{fiscalQrManager-Be-r4oZj.esm.js → fiscalQrManager-ji0qDaTW.esm.js} +3 -3
  108. package/dist/flow-events.d.ts +1 -1
  109. package/dist/flow.d.ts +33 -18
  110. package/dist/flow.esm.js +82 -17
  111. package/dist/{flowCompletionService-ChMU2v79.esm.js → flowCompletionService-DvcH16XO.esm.js} +24 -3
  112. package/dist/{flowServices-g2tVWsJl.esm.js → flowServices-Ca2vKNt2.esm.js} +84 -139
  113. package/dist/geolocation.esm.js +2 -2
  114. package/dist/{geolocationManager-DLbvZwUB.esm.js → geolocationManager-CiG32lIm.esm.js} +2 -2
  115. package/dist/{geolocationStateMachine-CAJVongM.esm.js → geolocationStateMachine-5rnTEOuw.esm.js} +3 -3
  116. package/dist/government-validation.esm.js +2 -2
  117. package/dist/{governmentValidationManager-CkX9TEkh.esm.js → governmentValidationManager-BivVZNVe.esm.js} +2 -2
  118. package/dist/{governmentValidationStateMachine-PTPCP26N.esm.js → governmentValidationStateMachine-CeSDNgha.esm.js} +1 -1
  119. package/dist/home.d.ts +1 -1
  120. package/dist/home.esm.js +1 -1
  121. package/dist/http.esm.js +1 -1
  122. package/dist/id-ocr.d.ts +2 -2
  123. package/dist/id-ocr.esm.js +3 -19
  124. package/dist/id-selfie-flow.d.ts +3 -3
  125. package/dist/id-selfie-flow.esm.js +10 -9
  126. package/dist/id-verification.esm.js +2 -2
  127. package/dist/id.d.ts +4 -4
  128. package/dist/id.esm.js +4 -4
  129. package/dist/{idCaptureDefaults-MSQoqScU.esm.js → idCaptureDefaults-DBnOC28H.esm.js} +3 -3
  130. package/dist/{idCaptureManager-zZdTcpG1.esm.js → idCaptureManager-B5xqok0L.esm.js} +9 -8
  131. package/dist/{idCaptureManager-DzTfQ1Am.d.ts → idCaptureManager-CG8zbAp0.d.ts} +10 -8
  132. package/dist/{idCaptureServices-8OHinO0N.esm.js → idCaptureServices-BIF_7rub.esm.js} +27 -196
  133. package/dist/{idCaptureStateMachine-B3G6XoDG.esm.js → idCaptureStateMachine-B5cfgKvn.esm.js} +50 -22
  134. package/dist/idOcrCpfUtils-Nfln1Psb.esm.js +18 -0
  135. package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-B5xeI2lg.d.ts} +3 -3
  136. package/dist/{idOcrManager-B64-fjWg.esm.js → idOcrManager-DNbVTMIu.esm.js} +2 -2
  137. package/dist/{idOcrStateMachine-B1aZnobs.esm.js → idOcrStateMachine-MAGnpWkb.esm.js} +8 -7
  138. package/dist/{idVerificationManager-_Kebv-Ue.esm.js → idVerificationManager-BEAkamNm.esm.js} +2 -2
  139. package/dist/{idVerificationStateMachine-DQn6c84z.esm.js → idVerificationStateMachine-D5mBN2Ye.esm.js} +1 -1
  140. package/dist/identity-reuse.esm.js +2 -2
  141. package/dist/{identityReuseManager-DDXkNVZi.esm.js → identityReuseManager-M8-BTjar.esm.js} +2 -2
  142. package/dist/{identityReuseStateMachine-Bcnkbjf8.esm.js → identityReuseStateMachine-D5bXgw9h.esm.js} +1 -1
  143. package/dist/{index-DEfwds5y.d.ts → index-Btj1EhiM.d.ts} +43 -19
  144. package/dist/{index-DMDAk85K.d.ts → index-CSPOoqah.d.ts} +1 -1
  145. package/dist/index.d.ts +1 -1
  146. package/dist/index.esm.js +1 -1
  147. package/dist/{invokeOnCaptureCallback-CXIBwBeE.esm.js → invokeOnCaptureCallback-C1-j4fsq.esm.js} +1 -1
  148. package/dist/kyb-checks.d.ts +3 -0
  149. package/dist/kyb-checks.esm.js +3 -0
  150. package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
  151. package/dist/kybChecksManager-CnqwgKoV.esm.js +89 -0
  152. package/dist/kybChecksStateMachine-Be41K_NS.esm.js +719 -0
  153. package/dist/mandatory-consent.d.ts +2 -2
  154. package/dist/mandatory-consent.esm.js +2 -2
  155. package/dist/{mandatoryConsentManager-xx3mY-xw.d.ts → mandatoryConsentManager-CYOJd_IZ.d.ts} +20 -11
  156. package/dist/{mandatoryConsentManager-43W5d_8G.esm.js → mandatoryConsentManager-LFhUlLvO.esm.js} +2 -2
  157. package/dist/{mandatoryConsentStateMachine-CVlgdlnt.esm.js → mandatoryConsentStateMachine-DTSyDqQs.esm.js} +11 -5
  158. package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
  159. package/dist/multipartRecordingService-CCiRpByl.esm.js +407 -0
  160. package/dist/{permissionGuards-B3OPL8Si.esm.js → permissionGuards-DjQUR1du.esm.js} +1 -1
  161. package/dist/{permissionServices-DnBAN_hW.esm.js → permissionServices-CZpORUWY.esm.js} +8 -6
  162. package/dist/phone.esm.js +2 -2
  163. package/dist/phoneFormat-DEpESpz2.esm.js +87 -0
  164. package/dist/{phoneManager-C6jut_pz.esm.js → phoneManager-C-qD3p3N.esm.js} +3 -3
  165. package/dist/phoneServices-BdR1nmSO.esm.js +77 -0
  166. package/dist/{phoneStateMachine-T1-drWfG.esm.js → phoneStateMachine-2FMTdjtJ.esm.js} +20 -60
  167. package/dist/{processFaceMatch-BWme3kVV.esm.js → processFaceMatch-B1YnoBer.esm.js} +1 -1
  168. package/dist/qe-signature.esm.js +1 -1
  169. package/dist/recordingService-BVSCo0ac.esm.js +397 -0
  170. package/dist/redirect-to-mobile.esm.js +2 -2
  171. package/dist/{redirectToMobileManager-BJXC6Kx9.esm.js → redirectToMobileManager-CqyDfDxs.esm.js} +3 -3
  172. package/dist/{redirectToMobileStateMachine-BBMAc2Gb.esm.js → redirectToMobileStateMachine-CXqfo2Gd.esm.js} +40 -22
  173. package/dist/resolveForm-f9PhUo9j.esm.js +143 -0
  174. package/dist/{runChildModule-DPHTqSdF.esm.js → runChildModule-BmteMhR7.esm.js} +2 -2
  175. package/dist/{sdkVersion-C3_P-Qbq.esm.js → sdkVersion-KZROt6l3.esm.js} +1 -1
  176. package/dist/selfie.d.ts +4 -4
  177. package/dist/selfie.esm.js +10 -10
  178. package/dist/{selfieErrorUtils-BL0BLMnp.esm.js → selfieErrorUtils-fqxp645p.esm.js} +1 -1
  179. package/dist/{selfieManager-Cbliomv7.esm.js → selfieManager-A-n3k9Tu.esm.js} +5 -5
  180. package/dist/{selfieManager-BMmpUii2.d.ts → selfieManager-DREuBhXZ.d.ts} +1 -1
  181. package/dist/{selfieStateMachine-B5m_Kn0O.esm.js → selfieStateMachine-48PKdKrw.esm.js} +3 -3
  182. package/dist/{session-DAaAewMX.esm.js → session-D0DWDKp9.esm.js} +4 -4
  183. package/dist/session.d.ts +2 -2
  184. package/dist/session.esm.js +6 -6
  185. package/dist/{sessionInitializer-CWFT4dfw.esm.js → sessionInitializer-I92b2dmL.esm.js} +94 -24
  186. package/dist/{setup-CDAKwTr7.esm.js → setup-BpjzWqR1.esm.js} +25 -27
  187. package/dist/{setup-D9qt8YVU.d.ts → setup-CG6oLkAa.d.ts} +2 -2
  188. package/dist/signature.esm.js +2 -2
  189. package/dist/{signatureManager-BeEVCcsC.esm.js → signatureManager-M9vQBj19.esm.js} +2 -2
  190. package/dist/{signatureStateMachine-_1c1vSid.esm.js → signatureStateMachine-0_frzAN5.esm.js} +1 -1
  191. package/dist/{stats-BpMz-hTP.esm.js → stats-C2sigf9p.esm.js} +1 -1
  192. package/dist/stats.esm.js +1 -1
  193. package/dist/step-up.d.ts +378 -0
  194. package/dist/step-up.esm.js +639 -0
  195. package/dist/textRules-D4NRinKY.d.ts +41 -0
  196. package/dist/{tri-BajQnjbf.esm.js → tri-DaUNvo-o.esm.js} +29 -34
  197. package/dist/tri.d.ts +2 -2
  198. package/dist/tri.esm-Df5eKLsY.esm.js +2165 -0
  199. package/dist/tri.esm.js +2 -2
  200. package/dist/{trueSightService-BujtUIW6.esm.js → trueSightService-DHYTBCIn.esm.js} +4 -4
  201. package/dist/trust-graph.esm.js +1 -1
  202. package/dist/types-B-PIc0en.d.ts +115 -0
  203. package/dist/{types-C397LhmN.d.ts → types-BgRHw-dR.d.ts} +1 -1
  204. package/dist/{types-CJ7Yl9K-.d.ts → types-Bpo97EOh.d.ts} +4 -2
  205. package/dist/{types-xEEWCx1j.d.ts → types-BqlZSoZ-.d.ts} +5 -5
  206. package/dist/types-CTaL0XJz.d.ts +80 -0
  207. package/dist/{types-e8fCsvvk.d.ts → types-Cbm9J2yF.d.ts} +1 -1
  208. package/dist/{types--3HDl2SF.d.ts → types-CgihAhT_.d.ts} +3 -3
  209. package/dist/{types-ZTZelfbM.d.ts → types-CyNndVAT.d.ts} +14 -6
  210. package/dist/{types-B2FK_wYb.d.ts → types-DEa3taWc.d.ts} +9 -41
  211. package/dist/{types-PTZHRhGX.d.ts → types-P9LzsfRo.d.ts} +3 -2
  212. package/dist/{types-DuD8TRJU.d.ts → types-TisHEbBg.d.ts} +12 -4
  213. package/dist/types-kLsU6Jkt.d.ts +6 -0
  214. package/dist/{urlUtils-eYiyWjh0.esm.js → urlUtils-B2wagB5v.esm.js} +14 -1
  215. package/dist/usStates-CwOQ2kAx.esm.js +209 -0
  216. package/dist/video-selfie.d.ts +5 -4
  217. package/dist/video-selfie.esm.js +9 -7
  218. package/dist/{videoSelfieCameraWarmer-DjkPpoj_.esm.js → videoSelfieCameraWarmer-CTOpqhov.esm.js} +16 -14
  219. package/dist/{videoSelfieStepDetector-RfSmlFFW.d.ts → videoSelfieStepDetector-4XE2QI5q.d.ts} +4 -4
  220. package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
  221. package/dist/{warmup-BkfxQZsC.esm.js → warmup-9iKKNNuW.esm.js} +69 -20
  222. package/dist/{warmup-BO57syF6.d.ts → warmup-BNhIuURi.d.ts} +18 -2
  223. package/dist/wasm.d.ts +9 -3
  224. package/dist/wasm.esm.js +3 -3
  225. package/dist/{wasmDsFlagSync-BhU5H2oR.esm.js → wasmDsFlagSync-lRIgn5Ic.esm.js} +1 -1
  226. package/dist/{wasmWebClient-DTj9auyA.esm.js → wasmWebClient-C3v3s_4H.esm.js} +34 -19
  227. package/dist/watchlist-for-business.esm.js +2 -2
  228. package/dist/watchlist.esm.js +2 -2
  229. package/dist/{watchlistForBusinessManager-CVay6-9A.esm.js → watchlistForBusinessManager-C1S5y5yj.esm.js} +2 -2
  230. package/dist/{watchlistForBusinessStateMachine-DA6K5na4.esm.js → watchlistForBusinessStateMachine-Bj_hnoK5.esm.js} +1 -1
  231. package/dist/{watchlistManager-B8gQ_rw3.esm.js → watchlistManager-BpegtZbc.esm.js} +2 -2
  232. package/dist/{watchlistStateMachine-CSi_ZhtT.esm.js → watchlistStateMachine-Bgkh1gra.esm.js} +1 -1
  233. package/dist/workflow.d.ts +226 -41
  234. package/dist/workflow.esm.js +163 -67
  235. package/package.json +21 -5
  236. package/dist/addressSearch-41sMcnJk.esm.js +0 -604
  237. package/dist/deepsightLoader-DMxtowCm.esm.js +0 -33
  238. package/dist/tri.esm-CzTNi5Q_.esm.js +0 -3826
  239. package/dist/types-D9r3zRfY.d.ts +0 -6
@@ -1,21 +1,19 @@
1
1
  import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
2
- import { r as getToken, t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
3
- import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-BujtUIW6.esm.js";
4
- import "./sessionInitializer-CWFT4dfw.esm.js";
5
- import { t as addDeviceStats } from "./stats-BpMz-hTP.esm.js";
2
+ import { r as getToken } from "./api-BSnbg4HO.esm.js";
3
+ import { l as trueSightHintTransition, r as noteTrueSightCaptureActivity, u as trueSightLog, y as isTrueSightTesting } from "./trueSightService-DHYTBCIn.esm.js";
4
+ import "./sessionInitializer-I92b2dmL.esm.js";
5
+ import { t as addDeviceStats } from "./stats-C2sigf9p.esm.js";
6
6
  import { c as isIPhone14OrHigher } from "./platform-aPh7gTWh.esm.js";
7
- import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
8
7
  import { i as assign, n as enqueueActions, r as sendTo, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
9
8
  import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-8Gzepa_A.esm.js";
10
9
  import { s as isCameraDenialErrorName } from "./camera-E_Kcre4O.esm.js";
11
- import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-DnBAN_hW.esm.js";
12
- import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-B83VmClw.esm.js";
13
- import { a as flagFaceManualReview, i as cameraCycleProvider, n as createCameraCycleOwnership, r as runProtectedAttempt, s as PROTECTED_CAPTURE_TARGET, t as electDesktopCameraDevice } from "./desktopCameraElection-kHY2IDJi.esm.js";
10
+ import { n as invokeRequestPermissionActor, t as checkPermission } from "./permissionServices-CZpORUWY.esm.js";
11
+ import { a as sendLabelInspectionEvent, i as probeFaceCamera, l as getFaceUploadErrorCode, r as initializeDeepsightSession, t as FaceDetectionProvider, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-BSLpXAGx.esm.js";
12
+ import { a as flagFaceManualReview, i as cameraCycleProvider, n as createCameraCycleOwnership, r as runProtectedAttempt, s as PROTECTED_CAPTURE_TARGET, t as electDesktopCameraDevice } from "./desktopCameraElection-Dvvw7PRY.esm.js";
14
13
  import { n as releaseFaceAvatarWarmup, r as warmFaceAvatar, t as createFaceAvatar } from "./createFaceAvatar-BNHdeFj8.esm.js";
15
14
  import { t as IncodeCanvas } from "./canvas-BxFzWTt-.esm.js";
16
- import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-B3OPL8Si.esm.js";
17
- import { t as carryAttempts } from "./attemptCarry-BjTJ6bMQ.esm.js";
18
- import { a as getAdaptiveMediaRecorderOptions, i as createRecordingCompositor, n as WorkerEncoderRecordingProvider, t as MultipartRecordingService } from "./multipartRecordingService-DMBxHKS2.esm.js";
15
+ import { n as needsMotionPrimeOnlyFromPermission, r as resolveStoredPermissionResult, t as isReadyForCaptureFromPermission } from "./permissionGuards-DjQUR1du.esm.js";
16
+ import { t as carryAttempts } from "./attemptCarry-zQH85Elh.esm.js";
19
17
  import { t as getDeviceClass } from "./getDeviceClass-DoIWuKI8.esm.js";
20
18
  //#region src/internal/avatar/concealment.ts
21
19
  /**
@@ -72,396 +70,6 @@ function logFaceCameraDiagnostic(event, fields) {
72
70
  console.debug(`${FACE_CAMERA_DIAGNOSTIC_PREFIX} ${event} ${JSON.stringify(fields)}`);
73
71
  }
74
72
  //#endregion
75
- //#region ../infra/src/media/VideoTrimmer.ts
76
- /** A trim that runs longer than this uploads the full recording instead. */
77
- const TRIM_TIMEOUT_MS = 1e4;
78
- const trimmer = BrowserLazyImportProvider.getInstance().create(() => import("./videoTrimByCopy-BFfAiNpv.esm.js").then((module) => module.trimLastNSecondsByCopy), {
79
- label: "Video liveness",
80
- moduleName: "mediabunny",
81
- timeoutMs: 1e4,
82
- disabledMessage: "the full recording will be uploaded untrimmed."
83
- });
84
- /** Starts loading the trimmer, e.g. when a recording that will be trimmed starts. */
85
- function preloadVideoTrimmer() {
86
- trimmer.load();
87
- }
88
- /**
89
- * Keeps about the last `seconds` of a recording. Never rejects and never
90
- * hangs: when the trimmer cannot load, fails, or takes longer than
91
- * {@link TRIM_TIMEOUT_MS}, it resolves the untrimmed recording.
92
- */
93
- async function trimLastNSeconds(videoBlob, seconds) {
94
- const trim = await trimmer.load();
95
- if (!trim) return videoBlob;
96
- let timeout;
97
- try {
98
- return await Promise.race([trim(videoBlob, seconds), new Promise((resolve) => {
99
- timeout = setTimeout(() => {
100
- console.warn("[Video liveness] Trimming timed out; the full recording will be uploaded untrimmed.");
101
- resolve(videoBlob);
102
- }, TRIM_TIMEOUT_MS);
103
- })]);
104
- } catch (error) {
105
- console.warn("[Video liveness] Trimming failed; the full recording will be uploaded untrimmed.", error);
106
- return videoBlob;
107
- } finally {
108
- clearTimeout(timeout);
109
- }
110
- }
111
- //#endregion
112
- //#region ../infra/src/providers/browser/LocalRecordingProvider.ts
113
- function toBase64(videoBlob) {
114
- return new Promise((resolve, reject) => {
115
- const reader = new FileReader();
116
- reader.onloadend = () => {
117
- const base64 = reader.result.split(",")[1];
118
- resolve(base64);
119
- };
120
- reader.onerror = () => reject(reader.error ?? /* @__PURE__ */ new Error("FileReader error"));
121
- reader.readAsDataURL(videoBlob);
122
- });
123
- }
124
- /** `MediaRecorderOptions.videoKeyFrameIntervalDuration`, see `startRecording`. */
125
- const KEYFRAME_INTERVAL_MS = 1e3;
126
- var LocalRecordingProvider = class {
127
- constructor() {
128
- this.mediaRecorder = null;
129
- this._isRecording = false;
130
- this._hasError = false;
131
- this._error = null;
132
- this.mimeType = "";
133
- this.stream = null;
134
- this.pauseRecordingBound = this.pauseRecording.bind(this);
135
- }
136
- get isRecording() {
137
- return this._isRecording;
138
- }
139
- get hasError() {
140
- return this._hasError;
141
- }
142
- get error() {
143
- return this._error;
144
- }
145
- startRecording(stream) {
146
- this.reset();
147
- preloadVideoTrimmer();
148
- this.registerEventListeners();
149
- this.stream = stream;
150
- try {
151
- const options = getAdaptiveMediaRecorderOptions();
152
- this.mimeType = options.mimeType;
153
- const recorder = new MediaRecorder(stream.clone(), {
154
- ...options,
155
- videoKeyFrameIntervalDuration: KEYFRAME_INTERVAL_MS
156
- });
157
- recorder.onerror = (event) => {
158
- this._error = `Recording error: ${event}`;
159
- this._isRecording = false;
160
- this._hasError = true;
161
- };
162
- recorder.start();
163
- this.mediaRecorder = recorder;
164
- this._isRecording = true;
165
- this._error = null;
166
- this._hasError = false;
167
- } catch (err) {
168
- this._error = `Failed to start recording: ${err}`;
169
- this._hasError = true;
170
- }
171
- }
172
- async stopRecording(trimSeconds, encrypt, generateChecksum) {
173
- const recorder = this.mediaRecorder;
174
- return new Promise((resolve, reject) => {
175
- this.removeEventListeners();
176
- if (recorder && this._isRecording) {
177
- const chunks = [];
178
- recorder.ondataavailable = (event) => {
179
- if (event.data.size > 0) chunks.push(event.data);
180
- };
181
- recorder.onstop = async () => {
182
- try {
183
- const trimmedVideo = await trimLastNSeconds(new Blob(chunks, { type: this.mimeType }), trimSeconds);
184
- const encryptedVideoBase64 = encrypt(await toBase64(trimmedVideo));
185
- generateChecksum(await trimmedVideo.arrayBuffer());
186
- this._isRecording = false;
187
- resolve({
188
- trimmedBlob: trimmedVideo,
189
- encryptedVideo: encryptedVideoBase64
190
- });
191
- } catch (error) {
192
- this._isRecording = false;
193
- this._error = `Recording stop failed: ${error}`;
194
- this._hasError = true;
195
- reject(error);
196
- }
197
- };
198
- recorder.stop();
199
- this._isRecording = false;
200
- } else resolve({
201
- trimmedBlob: new Blob([], { type: this.mimeType }),
202
- encryptedVideo: ""
203
- });
204
- recorder?.stream?.getTracks().forEach((track) => track.stop());
205
- });
206
- }
207
- /**
208
- * Discards the in-progress recording without producing a result: detaches
209
- * the recorder's handlers, stops it, releases its cloned tracks and clears
210
- * the flags. Idempotent, and safe after `stopRecording` or when never
211
- * started. Mirrors `MultipartRecordingProvider.reset()` so an attempt that is
212
- * released before finalization cannot leave a live camera clone behind
213
- * (ENG-56648).
214
- */
215
- reset() {
216
- this.removeEventListeners();
217
- const recorder = this.mediaRecorder;
218
- if (recorder) {
219
- recorder.ondataavailable = null;
220
- recorder.onerror = null;
221
- recorder.onstop = null;
222
- if (recorder.state !== "inactive") try {
223
- recorder.stop();
224
- } catch {}
225
- recorder.stream?.getTracks().forEach((track) => track.stop());
226
- this.mediaRecorder = null;
227
- }
228
- this.stream = null;
229
- this._isRecording = false;
230
- this._error = null;
231
- this._hasError = false;
232
- }
233
- pauseRecording() {
234
- if (!this._isRecording) return;
235
- if (this.mediaRecorder?.state === "recording") try {
236
- this.mediaRecorder.pause();
237
- } catch {}
238
- }
239
- registerEventListeners() {
240
- document.addEventListener("visibilitychange", this.pauseRecordingBound);
241
- }
242
- removeEventListeners() {
243
- document.removeEventListener("visibilitychange", this.pauseRecordingBound);
244
- }
245
- };
246
- //#endregion
247
- //#region src/internal/recordings/recordingsRepository.ts
248
- async function uploadDeepsightVideo(encryptedVideo, token) {
249
- try {
250
- return (await api.post(endpoints.deepsightVideoImport, {
251
- video: encryptedVideo,
252
- type: "selfie"
253
- }, { headers: { "X-Incode-Hardware-Id": token } })).data.recordingId ?? "";
254
- } catch {
255
- return "";
256
- }
257
- }
258
- //#endregion
259
- //#region src/internal/faceCapture/recordingService.ts
260
- /**
261
- * Records on-device and uploads encrypted video for liveness.
262
- */
263
- var LocalRecordingService = class {
264
- constructor(wasmUtil, sessionToken) {
265
- this.recorder = new LocalRecordingProvider();
266
- this.sessionToken = sessionToken;
267
- this.wasmUtil = wasmUtil;
268
- }
269
- async start(stream) {
270
- this.recorder.startRecording(stream);
271
- this.wasmUtil.osv();
272
- }
273
- async stop() {
274
- if (!this.recorder.isRecording) return { recordingId: null };
275
- this.wasmUtil.oev();
276
- const result = await this.recorder.stopRecording(10, (base64) => this.wasmUtil.encryptImage(base64), (buffer) => this.wasmUtil.ckvcks(buffer));
277
- if (!this.sessionToken) return { recordingId: null };
278
- return { recordingId: await uploadDeepsightVideo(result.encryptedVideo, this.sessionToken) };
279
- }
280
- prepareUpload() {
281
- return this.stop();
282
- }
283
- async stopAndGetVideo() {
284
- if (!this.recorder.isRecording) return { videoBase64: void 0 };
285
- try {
286
- this.wasmUtil.oev();
287
- const videoBase64 = (await this.recorder.stopRecording(10, (base64) => base64, () => {})).encryptedVideo;
288
- return { videoBase64: videoBase64 ? videoBase64 : void 0 };
289
- } catch {
290
- return { videoBase64: void 0 };
291
- }
292
- }
293
- cleanup() {
294
- this.recorder.reset();
295
- }
296
- };
297
- /**
298
- * Records a regular Selfie capture locally and streams it through the scoped
299
- * video-selfie-service multipart protocol. The recording is associated with
300
- * the interview asynchronously by the backend's `selfie` scope consumer, so
301
- * its upload id must not be forwarded to `/omni/add/face` as a legacy
302
- * `recordingId`.
303
- *
304
- * The recording is scoped to the capture step (ENG-56648). The recorder
305
- * records a stable `CameraCompositor` stream instead of a raw camera clone, so
306
- * every attempt can end its own clone before PRC and POC run and the next
307
- * attempt swaps a fresh clone into the same multipart upload. The owning
308
- * controller completes the upload once the backend accepts a capture or the
309
- * step ends without a retry.
310
- */
311
- var MultipartFaceRecordingService = class {
312
- constructor() {
313
- this.recordingCompositor = createRecordingCompositor();
314
- this.service = new MultipartRecordingService("selfie", new WorkerEncoderRecordingProvider(this.recordingCompositor));
315
- this.audioSource = [];
316
- this.needsVideoSourceReplacement = false;
317
- this.pausedForAttempt = false;
318
- this.startInFlight = false;
319
- this.suspendRequested = false;
320
- this.stopping = false;
321
- }
322
- async start(stream) {
323
- if (this.stopping) throw new Error("Face recording already completed");
324
- if (this.compositor) {
325
- await this.resume(stream);
326
- return;
327
- }
328
- const recordingSource = stream.clone();
329
- const compositor = this.recordingCompositor;
330
- this.startInFlight = true;
331
- try {
332
- const composite = compositor.start(recordingSource);
333
- await this.service.start(composite);
334
- } catch (error) {
335
- compositor.stop();
336
- recordingSource.getTracks().forEach((track) => track.stop());
337
- this.service.cleanup();
338
- throw error;
339
- } finally {
340
- this.startInFlight = false;
341
- }
342
- if (this.stopping) {
343
- compositor.stop();
344
- recordingSource.getTracks().forEach((track) => track.stop());
345
- this.service.cleanup();
346
- return;
347
- }
348
- this.compositor = compositor;
349
- this.recordingSource = recordingSource;
350
- this.audioSource = recordingSource.getAudioTracks();
351
- if (this.suspendRequested) {
352
- this.suspendRequested = false;
353
- this.suspend();
354
- }
355
- }
356
- /**
357
- * Pauses the container and ends the camera clone on the calling thread. The
358
- * composite stream and the upload stay open for the next attempt.
359
- */
360
- suspend() {
361
- if (this.stopping) return;
362
- if (!this.compositor) {
363
- this.suspendRequested = this.startInFlight;
364
- return;
365
- }
366
- if (!this.pausedForAttempt) this.pausedForAttempt = this.service.pause();
367
- this.releaseCameraClone({ keepAudio: true });
368
- this.needsVideoSourceReplacement = true;
369
- }
370
- async prepareUpload() {
371
- this.suspend();
372
- return { recordingId: null };
373
- }
374
- async stop() {
375
- await this.complete();
376
- return { recordingId: null };
377
- }
378
- pauseForBackground() {
379
- this.suspend();
380
- }
381
- async resumeFromBackground(stream) {
382
- if (!this.compositor || this.stopping) return;
383
- await this.resume(stream);
384
- }
385
- async stopAndGetVideo() {
386
- await this.complete();
387
- return { videoBase64: void 0 };
388
- }
389
- cleanup() {
390
- this.suspendRequested = false;
391
- this.pausedForAttempt = false;
392
- this.needsVideoSourceReplacement = false;
393
- this.releaseCameraClone({ keepAudio: false });
394
- this.compositor?.stop();
395
- this.compositor = void 0;
396
- this.recordingSource = void 0;
397
- this.audioSource = [];
398
- this.service.cleanup();
399
- }
400
- /** Swaps this attempt's camera clone into the composite and resumes. */
401
- async resume(stream) {
402
- const compositor = this.compositor;
403
- if (!compositor) return;
404
- if (this.needsVideoSourceReplacement) {
405
- const recordingSource = stream.clone();
406
- recordingSource.getAudioTracks().forEach((track) => track.stop());
407
- compositor.switchVideo(recordingSource);
408
- this.needsVideoSourceReplacement = false;
409
- this.recordingSource = recordingSource;
410
- const result = await compositor.resume();
411
- if (result !== "resumed") throw new Error(`Face recording camera did not resume: ${result}`);
412
- }
413
- if (this.pausedForAttempt && !this.service.resume()) throw new Error("Face recording did not resume");
414
- this.pausedForAttempt = false;
415
- }
416
- /**
417
- * Completes the scoped upload. The camera clone ends synchronously before the
418
- * drain so a step that ends mid-attempt never pins the camera; the composite
419
- * stays alive until the recorder has emitted its final chunk.
420
- */
421
- async complete() {
422
- this.stopping = true;
423
- this.suspendRequested = false;
424
- this.releaseCameraClone({ keepAudio: false });
425
- try {
426
- await this.service.stop();
427
- } finally {
428
- this.compositor?.stop();
429
- this.compositor = void 0;
430
- this.recordingSource = void 0;
431
- this.audioSource = [];
432
- this.pausedForAttempt = false;
433
- this.needsVideoSourceReplacement = false;
434
- }
435
- }
436
- releaseCameraClone(options) {
437
- try {
438
- this.compositor?.pause();
439
- } catch {}
440
- const tracks = options.keepAudio ? this.recordingSource?.getVideoTracks() ?? [] : /* @__PURE__ */ new Set([...this.recordingSource?.getTracks() ?? [], ...this.audioSource]);
441
- for (const track of tracks) try {
442
- track.stop();
443
- } catch {}
444
- }
445
- };
446
- /**
447
- * Creates the recording service for the current configuration.
448
- *
449
- * Order of precedence:
450
- * 1. `onDeviceFaceResultsSubmissionEnabled === true` → no recording. The
451
- * on-device workflow never uploads media, only the staged face-results
452
- * JSON via `WebApi.postFaceResults`. Mirrors V1's
453
- * `FaceFlowManager.setRecorders()` early return.
454
- * 2. `deepsightLiveness === 'VIDEOLIVENESS'` → local Deepsight recorder.
455
- * 3. `enableFaceRecording === true` → scoped multipart recorder.
456
- * 4. otherwise → no recording.
457
- */
458
- function createRecordingService(params) {
459
- if (params.config.onDeviceFaceResultsSubmissionEnabled === true) return;
460
- if (params.localDelivery === true) return params.config.enableFaceRecording === true || params.config.deepsightLiveness === "VIDEOLIVENESS" ? new LocalRecordingService(params.wasmUtil, null) : void 0;
461
- if (params.config.deepsightLiveness === "VIDEOLIVENESS") return new LocalRecordingService(params.wasmUtil, params.sessionToken);
462
- if (params.config.enableFaceRecording === true) return new MultipartFaceRecordingService();
463
- }
464
- //#endregion
465
73
  //#region src/internal/faceCapture/protectedFaceAttempt.ts
466
74
  const ON_DEVICE_MANUAL_CAPTURE_TIMEOUT_MS = 2147483647;
467
75
  /**
@@ -573,7 +181,7 @@ var ProtectedFaceAttemptRuntime = class ProtectedFaceAttemptRuntime {
573
181
  /** Per-attempt fallback when no step owner supplies the recording service. */
574
182
  async createAttemptRecordingService() {
575
183
  const wasmUtil = await this.options.dependencies.getWasmUtil();
576
- return createRecordingService({
184
+ return (await import("./recordingService-BVSCo0ac.esm.js")).createRecordingService({
577
185
  config: this.options.config,
578
186
  wasmUtil,
579
187
  sessionToken: getToken(),
@@ -871,8 +479,9 @@ function createProtectedFaceControllerActor(options) {
871
479
  const input = getControllerInput();
872
480
  const pending = (async () => {
873
481
  const wasmUtil = await input.dependencies.getWasmUtil();
482
+ const recordingModule = await import("./recordingService-BVSCo0ac.esm.js");
874
483
  if (!active) return;
875
- stepRecording ??= createRecordingService({
484
+ stepRecording ??= recordingModule.createRecordingService({
876
485
  config: input.config,
877
486
  wasmUtil,
878
487
  sessionToken: getToken(),
@@ -83,7 +83,13 @@ type FaceMatchResult = {
83
83
  * `WARN` score).
84
84
  */
85
85
  matched: boolean | null;
86
- /** @deprecated Always `null`. */
86
+ /**
87
+ * Whether the liveness check passed, from `/omni/get/score`: the Deepsight
88
+ * multimodal status, or else the liveness status. `null` when the module
89
+ * did not read the score (score retrieval is blocked, or the match result
90
+ * came from `config.matched` or an earlier selfie capture) or the score has
91
+ * no liveness status.
92
+ */
87
93
  liveness: boolean | null;
88
94
  };
89
95
  //#endregion
@@ -117,7 +123,7 @@ type FaceMatchAnimatingState = {
117
123
  };
118
124
  result: {
119
125
  matched: boolean | null;
120
- /** @deprecated Always `null`. */
126
+ /** Liveness result, or `null` when unavailable. See `FaceMatchResult`. */
121
127
  liveness: boolean | null;
122
128
  };
123
129
  };
@@ -136,7 +142,7 @@ type FaceMatchResultState = {
136
142
  };
137
143
  result: {
138
144
  matched: boolean | null;
139
- /** @deprecated Always `null`. */
145
+ /** Liveness result, or `null` when unavailable. See `FaceMatchResult`. */
140
146
  liveness: boolean | null;
141
147
  };
142
148
  matched: boolean | null;
@@ -1,6 +1,6 @@
1
- import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-CQteqXfy.esm.js";
1
+ import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-C7h7oaTE.esm.js";
2
2
  import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
3
- import { t as faceMatchMachine } from "./faceMatchStateMachine-ByTMQCUC.esm.js";
3
+ import { t as faceMatchMachine } from "./faceMatchStateMachine-EX9QhxFE.esm.js";
4
4
  //#region src/modules/face-match/faceMatchActor.ts
5
5
  function createFaceMatchActor(options) {
6
6
  return createActor(faceMatchMachine, { input: { config: options.config } }).start();
@@ -1,7 +1,7 @@
1
- import { t as api, u as endpoints } from "./api-BO8JA7Pf.esm.js";
1
+ import { t as api, u as endpoints } from "./api-BSnbg4HO.esm.js";
2
2
  import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
3
3
  import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
4
- import { t as getProcessFaceMatch } from "./processFaceMatch-BWme3kVV.esm.js";
4
+ import { t as getProcessFaceMatch } from "./processFaceMatch-B1YnoBer.esm.js";
5
5
  //#region src/modules/face-match/constants.ts
6
6
  /**
7
7
  * Backend error code returned by face-match endpoints (e.g. `/omni/process/face`,
@@ -54,15 +54,25 @@ async function fetchSecondIdImages(signal) {
54
54
  return { secondIdFace: /^(?:data:|https?:\/\/|blob:)/i.test(image) ? image : `data:image/png;base64,${image}` };
55
55
  }
56
56
  /**
57
- * Reads the face recognition result from `/omni/get/score`. Used only when
58
- * `/omni/process/face` sent no `success`, which means the API key allows
59
- * score retrieval.
57
+ * Reads the selected document's face recognition result and the liveness
58
+ * result from `/omni/get/score`. Used only when the processing response omits
59
+ * `success`, which means the API key allows score retrieval.
60
+ *
61
+ * The match is `faceRecognitionSecondId` for `secondId` and `faceRecognition`
62
+ * otherwise. Liveness is the Deepsight multimodal status when the score has
63
+ * one, else the liveness status (the fields SDK 1 reads). `OK` passes, `WARN`
64
+ * and `FAIL` fail, and a score with neither status gives `null`.
60
65
  */
61
- async function fetchScoreMatched(signal) {
66
+ async function fetchScore(matchingType, signal) {
62
67
  const res = await api.get(endpoints.getScore, { signal });
63
68
  if (!res.ok) throw new Error(`GET ${endpoints.getScore} failed: ${res.status} ${res.statusText}`);
64
- const status = res.data.faceRecognition?.overall?.status;
65
- return status === "OK" ? true : status === "FAIL" ? false : null;
69
+ const data = res.data;
70
+ const matchStatus = (matchingType === "secondId" ? data.faceRecognitionSecondId : data.faceRecognition)?.overall?.status;
71
+ const livenessStatus = data.deepsight?.multimodalIntelligence?.overall?.status ?? data.liveness?.overall?.status;
72
+ return {
73
+ matched: matchStatus === "OK" ? true : matchStatus === "FAIL" ? false : null,
74
+ liveness: livenessStatus ? livenessStatus === "OK" : null
75
+ };
66
76
  }
67
77
  /**
68
78
  * Runs server-side face matching for the captured selfie and returns the match
@@ -98,24 +108,28 @@ async function processFaceForMatch(matchingType, signal) {
98
108
  * capture in this session, skips the call. The second ID
99
109
  * always runs its own call, because the selfie matches only against the
100
110
  * primary ID.
111
+ *
112
+ * Liveness comes only from `/omni/get/score`, so it is `null` whenever the
113
+ * match result comes from `success`, `config.matched` or the saved selfie
114
+ * result.
101
115
  */
102
116
  async function fetchFaceMatchData(config, signal) {
103
117
  const isSecondId = config.matchingType === "secondId";
104
118
  const fromProcessFace = (isSecondId ? null : config.matched ?? getProcessFaceMatch()) ?? await processFaceForMatch(config.matchingType, signal);
105
- const [imagesRes, secondIdRes, matched] = await Promise.all([
119
+ const [imagesRes, secondIdRes, result] = await Promise.all([
106
120
  fetchFaceMatchImages(signal),
107
121
  isSecondId ? fetchSecondIdImages(signal) : void 0,
108
- fromProcessFace ?? fetchScoreMatched(signal)
122
+ fromProcessFace === null ? fetchScore(config.matchingType, signal) : {
123
+ matched: fromProcessFace,
124
+ liveness: null
125
+ }
109
126
  ]);
110
127
  return {
111
128
  images: {
112
129
  ...imagesRes,
113
130
  secondIdFace: secondIdRes?.secondIdFace ?? null
114
131
  },
115
- result: {
116
- matched,
117
- liveness: null
118
- }
132
+ result
119
133
  };
120
134
  }
121
135
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "./rolldown-runtime-B-1-B7_t.esm.js";
2
- import { t as SDK_VERSION } from "./sdkVersion-C3_P-Qbq.esm.js";
2
+ import { t as SDK_VERSION } from "./sdkVersion-KZROt6l3.esm.js";
3
3
  import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
4
4
  let currentEnvironment;
5
5
  /** Effective tier: the explicitly-set value, else the default (see note above). */
@@ -94,35 +94,50 @@ var FeatureManagementProvider = class FeatureManagementProvider {
94
94
  get initialized() {
95
95
  return this._client !== void 0;
96
96
  }
97
- async initialize(config) {
97
+ initialize(config) {
98
+ this._redactedUserInfo = {
99
+ ...DEFAULT_REDACTED_USER_INFO,
100
+ ...config.redactedUserInfo
101
+ };
102
+ this._user = this._getAdjustedUser({
103
+ customIDs: config.customIDs,
104
+ custom: config.custom,
105
+ appVersion: config.appVersion
106
+ });
107
+ this._initialization = this._initialize(config);
108
+ return this._initialization;
109
+ }
110
+ async _initialize(config) {
98
111
  try {
99
112
  const module = await this._lazySdk.load();
100
113
  if (!module) return;
101
- this._redactedUserInfo = {
102
- ...DEFAULT_REDACTED_USER_INFO,
103
- ...config.redactedUserInfo
104
- };
105
- this._user = this._getAdjustedUser({
106
- customIDs: config.customIDs,
107
- custom: config.custom,
108
- appVersion: config.appVersion
109
- });
110
- const client = new module.StatsigClient(CLIENT_SDK_KEY, this._user, {
114
+ const user = this._user;
115
+ const client = new module.StatsigClient(CLIENT_SDK_KEY, user, {
111
116
  environment: { tier: config.environment },
112
117
  disableStableID: config.disableStableId,
113
118
  disableStorage: config.disablePersistence
114
119
  });
115
120
  await client.initializeAsync({ timeoutMs: FEATURE_MANAGEMENT_REQUEST_TIMEOUT_MS });
116
121
  this._client = client;
122
+ this._clientUser = user;
117
123
  } catch (error) {
118
124
  console.warn("[FeatureManagement] initialize() failed; gates/experiments/layers will be disabled for this session.", error);
119
125
  }
120
126
  }
127
+ /**
128
+ * During `initialize()`, merges into the user the client starts with and
129
+ * resolves once it is initialized; sends a request only when the client's
130
+ * user lacks the update.
131
+ */
121
132
  async updateUser(user) {
122
- if (!this._client) return;
133
+ if (!this._client && !this._initialization) return;
123
134
  this._user = this._getAdjustedUser(user);
135
+ await this._initialization;
136
+ if (!this._client || this._clientUser === this._user) return;
137
+ const next = this._user;
124
138
  try {
125
- await this._client.updateUserAsync(this._user, { timeoutMs: FEATURE_MANAGEMENT_REQUEST_TIMEOUT_MS });
139
+ await this._client.updateUserAsync(next, { timeoutMs: FEATURE_MANAGEMENT_REQUEST_TIMEOUT_MS });
140
+ this._clientUser = next;
126
141
  } catch (error) {
127
142
  console.warn("[FeatureManagement] updateUser() failed.", error);
128
143
  }
@@ -201,6 +216,8 @@ var FeatureManagementProvider = class FeatureManagementProvider {
201
216
  async reset() {
202
217
  const client = this._client;
203
218
  this._client = void 0;
219
+ this._clientUser = void 0;
220
+ this._initialization = void 0;
204
221
  this._user = {};
205
222
  this._redactedUserInfo = { ...DEFAULT_REDACTED_USER_INFO };
206
223
  return client?.shutdown().catch(() => {});
@@ -403,13 +420,10 @@ async function updateFeatureManagementUser(update) {
403
420
  const previousCustomIDs = {};
404
421
  for (const key of Object.keys(adaptedCustomIDs)) previousCustomIDs[key] = appliedCustomIDs[key];
405
422
  Object.assign(appliedCustomIDs, adaptedCustomIDs);
406
- const providerUpdate = (async () => {
407
- if (isFeatureManagementLocked) await readyPromise;
408
- await getProvider().updateUser({
409
- customIDs: adaptedCustomIDs,
410
- custom
411
- });
412
- })();
423
+ const providerUpdate = getProvider().updateUser({
424
+ customIDs: adaptedCustomIDs,
425
+ custom
426
+ });
413
427
  inFlightUserUpdate = providerUpdate;
414
428
  try {
415
429
  await providerUpdate;
@@ -1,2 +1,2 @@
1
- import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-DjAG5lsJ.esm.js";
1
+ import { E as updateFeatureManagementUser, T as subscribeFeatureManagement, _ as getIsFeatureManagementInitialized, a as stringParam, d as ONBOARDING_WEB_SDK_PARAMETER_STORE, f as getExperiment, g as getFeatureParameterStore, h as getFeatureManagementVersion, i as numberParam, l as resolveExperiment, m as getFeatureGate, n as defineExperimentParams, o as EXPERIMENT_UNAVAILABLE_SENTINEL, p as getFeatureDynamicConfig, r as enumParam, s as exposeExperimentOnce, t as booleanParam, u as resolveExperimentOnce, x as logEvent, y as getLayer } from "./feature-management-CmKTG_T5.esm.js";
2
2
  export { EXPERIMENT_UNAVAILABLE_SENTINEL, ONBOARDING_WEB_SDK_PARAMETER_STORE, booleanParam, defineExperimentParams, enumParam, exposeExperimentOnce, getExperiment, getFeatureDynamicConfig, getFeatureGate, getFeatureManagementVersion, getFeatureParameterStore, getIsFeatureManagementInitialized, getLayer, logEvent, numberParam, resolveExperiment, resolveExperimentOnce, stringParam, subscribeFeatureManagement, updateFeatureManagementUser };
@@ -1,2 +1,2 @@
1
- import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-CC0vKmpf.esm.js";
1
+ import { n as createFieldComparisonManagerFromActor, r as fieldComparisonMachine, t as createFieldComparisonManager } from "./fieldComparisonManager-DuosZJso.esm.js";
2
2
  export { createFieldComparisonManager, createFieldComparisonManagerFromActor, fieldComparisonMachine };