@incodetech/core 2.2.0 → 2.3.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.
- package/THIRD_PARTY_NOTICES.txt +281 -0
- package/dist/BaseWasmProvider-Dyi6dKp1.d.ts +65 -0
- package/dist/{BrowserDiagnosticsCryptoProvider-B8vorxN5.esm.js → BrowserDiagnosticsCryptoProvider-C_9o3L2L.esm.js} +1 -1
- package/dist/{BrowserVisibilityObserverProvider-BX1BiLDK.esm.js → BrowserVisibilityObserverProvider-BrJN1B8A.esm.js} +2 -0
- package/dist/FaceDetectionProvider-DTetAE8H.esm.js +476 -0
- package/dist/FaceDetectionProvider-LdZ47bWy.d.ts +36 -0
- package/dist/{IIdCaptureCapability-DHTT3FC2.d.ts → IIdCaptureCapability-RNiFhvXR.d.ts} +7 -33
- package/dist/IWasmUtilCapability-CXXDA5l1.d.ts +159 -0
- package/dist/{MotionSensorProvider-DGiV77J_.esm.js → MotionSensorProvider-BgTYwg9L.esm.js} +1 -1
- package/dist/{deepsightService-DLVQS_RH.d.ts → StreamCanvasCapture-B3YT2Bt6.d.ts} +54 -41
- package/dist/{StreamCanvasCapture-D2XcXCZ4.esm.js → StreamCanvasCapture-C9jtgBdT.esm.js} +2 -2
- package/dist/{addressSearch-D1XpBdUS.esm.js → addressSearch-BRSu_aGA.esm.js} +1 -1
- package/dist/advanceableErrors-CpF2cBy6.esm.js +21 -0
- package/dist/ae-signature.d.ts +4 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CQFNgSPt.esm.js → antifraudManager-Bg9ynGum.esm.js} +2 -2
- package/dist/{antifraudStateMachine-Bf_JVNwn.esm.js → antifraudStateMachine-BHxehiJZ.esm.js} +1 -1
- package/dist/{apiError-BA1d_au0.esm.js → apiError-D0v5hFyN.esm.js} +14 -2
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-zh9TC62P.esm.js → authenticationManager-C4B4-29g.esm.js} +5 -5
- package/dist/{authenticationManager-BBMGTcwW.d.ts → authenticationManager-DXTIUcma.d.ts} +7 -1
- package/dist/{authenticationStateMachine-xzi-vnvE.esm.js → authenticationStateMachine-DJ0zUm-A.esm.js} +6 -62
- package/dist/avatar.d.ts +1 -2
- package/dist/avatar.esm.js +1 -1
- package/dist/{backCameraStream-CUeYm5eu.esm.js → backCameraStream-BOtyQowf.esm.js} +83 -22
- package/dist/{camera-_2sXMXiF.esm.js → camera-sIa9ceW2.esm.js} +19 -1
- package/dist/camera.esm.js +1 -1
- package/dist/{canvas-E1zGkel4.esm.js → canvas-BxFzWTt-.esm.js} +19 -0
- package/dist/certificate-issuance.d.ts +2 -302
- package/dist/certificate-issuance.esm.js +3 -66
- package/dist/certificateIssuanceManager-Bfvkq7Cy.esm.js +69 -0
- package/dist/certificateIssuanceManager-DCgEidHz.d.ts +312 -0
- package/dist/{certificateIssuanceStateMachine-D_R92TYu.esm.js → certificateIssuanceStateMachine-BBD5h8c4.esm.js} +1 -1
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-BxjpLZAG.esm.js → consentManager-B5Vqdez-.esm.js} +2 -2
- package/dist/{consentManager-3Pbtj-RV.d.ts → consentManager-uhDPdU6i.d.ts} +4 -4
- package/dist/{consentStateMachine-D9D4ON8Z.esm.js → consentStateMachine-DbUmqWgV.esm.js} +1 -1
- package/dist/createCameraCycleOwnership-DQ5-F2oW.esm.js +826 -0
- package/dist/{createFaceAvatar-DQKaRise.esm.js → createFaceAvatar-BNHdeFj8.esm.js} +2 -2
- package/dist/createFaceAvatar-BlcTYgJv.d.ts +497 -0
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-CGT0V6RV.esm.js → crossDocumentDataMatchManager-QMOGwHXR.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-6Nmkn5u1.esm.js → curpValidationManager-D1ppROcF.esm.js} +2 -2
- package/dist/{curpValidationManager-DVGr7Fq7.d.ts → curpValidationManager-SSKNrm5Z.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-Ds7KMacK.esm.js → curpValidationStateMachine-DvUPC_8S.esm.js} +1 -1
- package/dist/custom-fields.d.ts +2 -114
- package/dist/custom-fields.esm.js +2 -232
- package/dist/custom-watchlist.d.ts +2 -51
- package/dist/custom-watchlist.esm.js +3 -70
- package/dist/customFieldsManager-2j_PBq4U.esm.js +264 -0
- package/dist/customFieldsManager-8-W2KY4n.d.ts +141 -0
- package/dist/customWatchlistManager-DUVrEdw9.esm.js +73 -0
- package/dist/customWatchlistManager-PBWHr_oM.d.ts +64 -0
- package/dist/{customWatchlistStateMachine-YWSgKLbF.esm.js → customWatchlistStateMachine-qZVgkKgP.esm.js} +1 -1
- package/dist/{deepsightLoader--wMKWECS.esm.js → deepsightLoader-Dm7ejW4v.esm.js} +27 -71
- package/dist/device.d.ts +25 -2
- package/dist/device.esm.js +69 -7
- package/dist/document-capture.d.ts +2 -2
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DsQQhWry.esm.js → documentCaptureManager-DR_Wv-3H.esm.js} +2 -2
- package/dist/{documentCaptureManager-B3t0ydtg.d.ts → documentCaptureManager-DensIj5F.d.ts} +83 -83
- package/dist/{documentCaptureStateMachine-BM4Ex_5x.esm.js → documentCaptureStateMachine-CWOATHfE.esm.js} +5 -5
- package/dist/dynamic-forms.d.ts +1 -1
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-fhK0yINk.d.ts → dynamicFormsManager-D5R_uxLQ.d.ts} +25 -3
- package/dist/{dynamicFormsManager-fFVIRBNv.esm.js → dynamicFormsManager-Dt98SDfV.esm.js} +16 -5
- package/dist/{dynamicFormsStateMachine-D6D7oEYk.esm.js → dynamicFormsStateMachine-obKr4IIp.esm.js} +35 -3
- package/dist/ekyb.d.ts +1 -1
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-Y3MkoXpC.esm.js → ekybManager-DNZKrKF3.esm.js} +2 -2
- package/dist/{ekybStateMachine-3nlnqdlr.esm.js → ekybStateMachine-DjhHQXZ8.esm.js} +3 -3
- package/dist/ekyc.esm.js +2 -2
- package/dist/{ekycManager-DgT48ky6.esm.js → ekycManager-CmQBpeiI.esm.js} +2 -2
- package/dist/{ekycStateMachine-CQwqiR-R.esm.js → ekycStateMachine-CmdW2gVm.esm.js} +2 -2
- package/dist/electronic-signature.d.ts +3 -3
- package/dist/electronic-signature.esm.js +2 -2
- package/dist/electronicSignatureManager-Ds-KEVTq.d.ts +2786 -0
- package/dist/{electronicSignatureManager-DGbAJ00W.esm.js → electronicSignatureManager-DzulxM4_.esm.js} +357 -51
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-BY0jeYwR.esm.js → emailManager-B5ek_UfM.esm.js} +2 -2
- package/dist/{emailStateMachine-Crw8QVmc.esm.js → emailStateMachine-CyPFZ7dW.esm.js} +1 -1
- package/dist/{endpoints-CCzL3XD_.esm.js → endpoints-D3B9mUHh.esm.js} +24 -7
- package/dist/{events-DYiyoSlx.esm.js → events-ijlbX_Wx.esm.js} +2 -2
- package/dist/events.d.ts +1 -1
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +24 -64
- package/dist/extensibility.esm.js +35 -29
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-BxWPpxyd.d.ts → faceCaptureManagerFactory-CvtqcLxs.d.ts} +87 -54
- package/dist/{faceCaptureManagerFactory-CVnZ0fa5.esm.js → faceCaptureManagerFactory-pCmG4MeF.esm.js} +68 -7
- package/dist/faceCaptureSetup-BSextack.esm.js +2106 -0
- package/dist/{faceMatchManager-Ri4UbNz0.esm.js → faceMatchManager-Caal2zyV.esm.js} +2 -2
- package/dist/{faceMatchStateMachine-20DdZ3jg.esm.js → faceMatchStateMachine-BUc5FXYy.esm.js} +1 -1
- package/dist/{feature-management-CPQ4qv3F.esm.js → feature-management-B0sGlozZ.esm.js} +32 -7
- package/dist/feature-management.d.ts +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-Cg6kPQQx.esm.js → fieldComparisonManager-BIs6HPJG.esm.js} +2 -2
- package/dist/fiscal-qr.d.ts +2 -56
- package/dist/fiscal-qr.esm.js +2 -308
- package/dist/fiscalQrManager-Bp_-3LJr.esm.js +34131 -0
- package/dist/fiscalQrManager-CHcBJwUM.d.ts +68 -0
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +212 -185
- package/dist/flow.esm.js +119 -30
- package/dist/{flowCompletionService-tfeoGre9.esm.js → flowCompletionService-CLtbWhSK.esm.js} +2 -2
- package/dist/{flowServices-f5Ruz7R9.esm.js → flowServices-B5FwukTQ.esm.js} +91 -26
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-CH6RfqFH.esm.js → geolocationManager-DIw-xq9a.esm.js} +2 -2
- package/dist/{geolocationStateMachine-DmbWFely.esm.js → geolocationStateMachine-DpG0TFOU.esm.js} +3 -3
- package/dist/getBrowser-CBiibsL-.esm.js +19 -0
- package/dist/{getBrowser-DNrQeL4T.esm.js → getBrowser-Cbe1C4Tn.esm.js} +2 -1
- package/dist/{getDeviceClass-9y-kbVDw.esm.js → getDeviceClass-5NYZg9s6.esm.js} +2 -2
- package/dist/getParsedUserAgent-B2iFDql1.esm.js +1278 -0
- package/dist/government-validation.d.ts +2 -85
- package/dist/government-validation.esm.js +3 -120
- package/dist/governmentValidationManager-D02vT4yY.d.ts +63 -0
- package/dist/governmentValidationManager-TjC9iVjH.esm.js +79 -0
- package/dist/governmentValidationStateMachine-D1ZnEqdd.esm.js +54 -0
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/id-ocr.d.ts +2 -2
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +3 -2
- package/dist/id-selfie-flow.esm.js +11 -10
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +29 -5
- package/dist/id.esm.js +48 -46
- package/dist/idCaptureDefaults-BcxjQDI3.esm.js +484 -0
- package/dist/{idCaptureManager-CqrqSjJV.d.ts → idCaptureManager-CvmHOWWd.d.ts} +227 -39
- package/dist/{idCaptureManager-BYwTZ2H8.esm.js → idCaptureManager-Vby8oYqh.esm.js} +259 -46
- package/dist/{idCaptureServices-44kwQItl.esm.js → idCaptureServices-CJIxD9ep.esm.js} +342 -31
- package/dist/idCaptureStateMachine-CmqihkUy.esm.js +5343 -0
- package/dist/{idOcrManager-DXc_xRN7.d.ts → idOcrManager-BF_cXZq8.d.ts} +1 -1
- package/dist/{idOcrManager-BIQYQXXj.esm.js → idOcrManager-DHU22hVn.esm.js} +2 -2
- package/dist/{idOcrStateMachine-cSxzHpHt.esm.js → idOcrStateMachine-33UvRAHE.esm.js} +1 -1
- package/dist/{idVerificationManager-JpV_SAsl.esm.js → idVerificationManager-CyaixD0D.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-nPeUNyFq.esm.js → idVerificationStateMachine-BPGrQZEm.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-kNCg9AbD.esm.js → identityReuseManager-CWaNHBO3.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DyulxDjP.esm.js → identityReuseStateMachine-CQgnATo5.esm.js} +1 -1
- package/dist/{index-CLMF0QLQ.d.ts → index-DLcJT5YP.d.ts} +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-GpvMuz9o.esm.js → invokeOnCaptureCallback-BjzPjJ_p.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-DyPzUmsZ.d.ts → mandatoryConsentManager-CJSyhTpi.d.ts} +5 -5
- package/dist/{mandatoryConsentManager-B4Niyg_u.esm.js → mandatoryConsentManager-Du-m-tZ_.esm.js} +2 -2
- package/dist/{mandatoryConsentStateMachine-B4-1u-L8.esm.js → mandatoryConsentStateMachine-DSDAk7WZ.esm.js} +1 -1
- package/dist/multipartRecordingService-B3C_zlev.esm.js +594 -0
- package/dist/{permissionGuards-KINpmKtI.esm.js → permissionGuards-uYZYFu4J.esm.js} +1 -1
- package/dist/{permissionServices-UvUcOSRb.esm.js → permissionServices-Bj_fyWtv.esm.js} +5 -5
- package/dist/personhood.d.ts +6 -5
- package/dist/personhood.esm.js +10 -10
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-FsJ0W2Ei.esm.js → phoneManager-N1-sbrY4.esm.js} +2 -2
- package/dist/{phoneStateMachine-Ba0wKHyX.esm.js → phoneStateMachine-jl8LJKCo.esm.js} +1 -1
- package/dist/{platform-BJrm5nzZ.esm.js → platform-DkcRc9JV.esm.js} +29 -1
- package/dist/qe-signature.d.ts +5 -3
- package/dist/qe-signature.esm.js +2 -2
- package/dist/recordingsRepository-CCWy13M-.esm.js +72 -0
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-y4VQB11M.esm.js → redirectToMobileManager-DsFzdTwA.esm.js} +2 -2
- package/dist/{redirectToMobileStateMachine-Cyv2x0PP.esm.js → redirectToMobileStateMachine-v3otpT-L.esm.js} +1 -1
- package/dist/{rolldown-runtime-FZ4Itg2g.esm.js → rolldown-runtime-FDOR9p9I.esm.js} +1 -19
- package/dist/{runChildModule-Dukuw23X.esm.js → runChildModule-TuyGE00X.esm.js} +3 -21
- package/dist/safeStorage-B-trhxg6.esm.js +423 -0
- package/dist/{sdkVersion-D1Bm59g6.esm.js → sdkVersion-CLxKvdyz.esm.js} +1 -1
- package/dist/selfie.d.ts +5 -5
- package/dist/selfie.esm.js +14 -76
- package/dist/{selfieErrorUtils-C2PYBVsp.esm.js → selfieErrorUtils-C77GXJH6.esm.js} +30 -4
- package/dist/{selfieManager-Bj6B2ZVy.esm.js → selfieManager-CihVnODO.esm.js} +5 -5
- package/dist/{selfieManager-DwlCppg0.d.ts → selfieManager-D1KRJ39M.d.ts} +8 -11
- package/dist/selfieStateMachine-fwMmNtOi.esm.js +69 -0
- package/dist/{session-BFdLgN4i.esm.js → session-BHIeAamR.esm.js} +4 -5
- package/dist/session.d.ts +21 -11
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-dlfDehHk.esm.js → sessionInitializer-BLoK7SP9.esm.js} +187 -68
- package/dist/{setup-BgoWtvIS.d.ts → setup-Cv-JM9QC.d.ts} +63 -69
- package/dist/{setup-BIAtLa8k.esm.js → setup-msLybMbC.esm.js} +226 -100
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-Ca43yhwk.esm.js → signatureManager-ChsB-nMD.esm.js} +2 -2
- package/dist/{signatureStateMachine-K1LMRrxG.esm.js → signatureStateMachine-BHPwkJZS.esm.js} +1 -1
- package/dist/{src-0Jurt29N.esm.js → src-35ekGRzK.esm.js} +1 -1
- package/dist/{stats-B0nFKawG.esm.js → stats-DkK-f8JT.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{trueSightService---iW2KKJ.esm.js → trueSightService-CKrrfV0Q.esm.js} +7 -7
- package/dist/trust-graph.esm.js +1 -1
- package/dist/{types-BX_XkMsQ2.d.ts → types-9_esGTPj.d.ts} +1 -1
- package/dist/types-BT_Oalip.d.ts +1 -0
- package/dist/{types-DelMqZLe.d.ts → types-BjSly8cp.d.ts} +1 -1
- package/dist/{types-Hmd7U0JA.d.ts → types-CM-jtjJ2.d.ts} +6 -81
- package/dist/{types-Bdf8_LYB2.d.ts → types-CjKBS37a2.d.ts} +303 -13
- package/dist/{types-DVmXIdzW.d.ts → types-D0gekt4U.d.ts} +38 -5
- package/dist/types-DgDvvzg0.d.ts +10 -0
- package/dist/{types-KPvmag_B.d.ts → types-Do5rEXij.d.ts} +7 -4
- package/dist/types-ZT1XFIJ8.d.ts +6 -0
- package/dist/video-selfie.d.ts +59 -35
- package/dist/video-selfie.esm.js +510 -601
- package/dist/{videoSelfieCameraWarmer-NEhFZvWx.esm.js → videoSelfieCameraWarmer-CB1IzZkt.esm.js} +14 -153
- package/dist/videoSelfieFlowModuleMachine-BUe2uACW.esm.js +32 -0
- package/dist/{videoSelfieStepDetector-D3oo2ofo.d.ts → videoSelfieStepDetector-5YHFe0Mq.d.ts} +21 -5
- package/dist/virtualCameraCheck-WOloJ-do.esm.js +48 -0
- package/dist/warmup-CUUnwYxe.esm.js +714 -0
- package/dist/warmup-Cis2p6O0.d.ts +128 -0
- package/dist/wasm.d.ts +30 -6
- package/dist/wasm.esm.js +36 -4
- package/dist/{wasmDsFlagSync-BqUCwLY8.esm.js → wasmDsFlagSync-B2e8p268.esm.js} +2 -2
- package/dist/{wasmWebClient-DM8lkb0z.esm.js → wasmWebClient-B7baE-Wf.esm.js} +358 -28
- package/dist/watchlist-for-business.d.ts +2 -78
- package/dist/watchlist-for-business.esm.js +3 -102
- package/dist/watchlist.esm.js +2 -2
- package/dist/watchlistForBusinessManager-CpuuB1J2.esm.js +107 -0
- package/dist/watchlistForBusinessManager-CsnJnG-C.d.ts +99 -0
- package/dist/{watchlistForBusinessStateMachine-CxFnlshm.esm.js → watchlistForBusinessStateMachine-DEzgjz7C.esm.js} +13 -6
- package/dist/{watchlistManager-LoNZH9qm.esm.js → watchlistManager-CI8BHFob.esm.js} +2 -2
- package/dist/{watchlistStateMachine-DIKQDoUT.esm.js → watchlistStateMachine-DvOby3a-.esm.js} +1 -1
- package/dist/workflow.d.ts +12 -8
- package/dist/workflow.esm.js +48 -39
- package/package.json +4 -10
- package/dist/BrowserStorageProvider-k-FDkC4W.esm.js +0 -67
- package/dist/FaceDetectionProvider-Mh6q3EbA.d.ts +0 -349
- package/dist/IFaceAvatarCapability-BrL19G0s.d.ts +0 -23
- package/dist/IStorageCapability-ORkQfK3F.d.ts +0 -242
- package/dist/OpenViduRecordingProvider-Du98qevC.esm.js +0 -85
- package/dist/createFaceAvatar-BEj18KXi.d.ts +0 -50
- package/dist/document-upload.d.ts +0 -325
- package/dist/document-upload.esm.js +0 -197
- package/dist/electronicSignatureManager-CcUXQZS7.d.ts +0 -1300
- package/dist/faceCaptureSetup-Cd-04W_X.esm.js +0 -863
- package/dist/getBrowser-Cb8Zgrgp.esm.js +0 -7
- package/dist/getParsedUserAgent-pJjATANs.esm.js +0 -1622
- package/dist/governmentValidationStateMachine-CK9DrZXX.esm.js +0 -226
- package/dist/idCaptureDefaults-WeHbQM7W.esm.js +0 -225
- package/dist/idCaptureStateMachine-kZ5OpdfM.esm.js +0 -3342
- package/dist/lib-DAyUtOTj.esm.js +0 -12420
- package/dist/manualReviewService-D4IkipnN.esm.js +0 -15
- package/dist/mediaRecorderOptions-dALSV8af.esm.js +0 -40
- package/dist/onDeviceFaceResults-CUHwyZT4.esm.js +0 -646
- package/dist/openviduLazy-CCDpFWg1.esm.js +0 -10
- package/dist/recordingService-3NSENVwp.esm.js +0 -329
- package/dist/safeStorage-Ep56I-f_.esm.js +0 -982
- package/dist/selfieStateMachine-CHV_WNst.esm.js +0 -55
- package/dist/trueSight-B_icM8r2.esm.js +0 -1
- package/dist/types-EELWyWpd.d.ts +0 -6
- package/dist/types-Vb4P9ovf.d.ts +0 -22
- package/dist/warmup-Dv2alr2-.d.ts +0 -82
- package/dist/wasmDefaults-DTUrftxR.esm.js +0 -125
- package/dist/{Face2DProvider-UUQt_vRC.esm.js → Face2DProvider-BF48sz5c.esm.js} +1 -1
- package/dist/{PrivacyLensProvider-D8PS7AJa.esm.js → PrivacyLensProvider-EwnC_C5n.esm.js} +1 -1
- /package/dist/{types-BfgmV7s72.d.ts → types-BfgmV7s7.d.ts} +0 -0
- /package/dist/{types-CJ7Yl9K-2.d.ts → types-CJ7Yl9K-.d.ts} +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { i as assign } from "./xstate.esm-BuFLFuzz.esm.js";
|
|
2
|
+
import { n as fromPromise } from "./xstate-actors.esm-BXeQ-Ucz.esm.js";
|
|
3
|
+
import { n as createDefaultProtectedFaceControllerActor, r as manualFaceUploadMachine, t as faceCaptureMachine } from "./faceCaptureSetup-BSextack.esm.js";
|
|
4
|
+
import { u as isOnDeviceMode } from "./FaceDetectionProvider-DTetAE8H.esm.js";
|
|
5
|
+
import { t as FACE_ERROR_CODES } from "./types-BN5RPPIZ.esm.js";
|
|
6
|
+
import { s as PROTECTED_CAPTURE_TARGET } from "./createCameraCycleOwnership-DQ5-F2oW.esm.js";
|
|
7
|
+
import { i as uploadManualSelfie, n as validateUploadResponse, r as processFace } from "./selfieErrorUtils-C77GXJH6.esm.js";
|
|
8
|
+
//#region src/modules/selfie/selfieStateMachine.ts
|
|
9
|
+
/**
|
|
10
|
+
* Validates like the camera path does: a 200 that reports lenses, a mask or
|
|
11
|
+
* failed liveness is still a rejection, and throwing lets the child machine
|
|
12
|
+
* spend a retry and map the code to copy.
|
|
13
|
+
*/
|
|
14
|
+
const manualUploadMachine = manualFaceUploadMachine.provide({ actors: {
|
|
15
|
+
protectedFaceController: createDefaultProtectedFaceControllerActor({
|
|
16
|
+
target: PROTECTED_CAPTURE_TARGET.selfie,
|
|
17
|
+
delivery: "protected"
|
|
18
|
+
}),
|
|
19
|
+
uploadFile: fromPromise(async ({ input, signal }) => {
|
|
20
|
+
const { base64Image, config, dependencies } = input;
|
|
21
|
+
const validationError = validateUploadResponse({
|
|
22
|
+
config,
|
|
23
|
+
response: await uploadManualSelfie({
|
|
24
|
+
base64Image,
|
|
25
|
+
dependencies,
|
|
26
|
+
signal
|
|
27
|
+
})
|
|
28
|
+
});
|
|
29
|
+
if (validationError) throw new Error(validationError);
|
|
30
|
+
})
|
|
31
|
+
} });
|
|
32
|
+
/**
|
|
33
|
+
* The selfie capture state machine.
|
|
34
|
+
*
|
|
35
|
+
* Note: Uses AnyStateMachine type for declaration file portability.
|
|
36
|
+
* Type safety is ensured via the machine configuration.
|
|
37
|
+
*/
|
|
38
|
+
const selfieMachine = faceCaptureMachine.provide({
|
|
39
|
+
actors: {
|
|
40
|
+
manualUploadMachine,
|
|
41
|
+
processFace: fromPromise(async ({ input, signal }) => {
|
|
42
|
+
if (isOnDeviceMode(input.config)) return {};
|
|
43
|
+
return processFace("selfie", signal);
|
|
44
|
+
})
|
|
45
|
+
},
|
|
46
|
+
actions: {
|
|
47
|
+
prepareStreamForRetry: () => void 0,
|
|
48
|
+
setUploadErrorFromUploadValidation: assign({ uploadError: ({ context }) => {
|
|
49
|
+
if (isOnDeviceMode(context.config)) return;
|
|
50
|
+
return validateUploadResponse({
|
|
51
|
+
config: context.config,
|
|
52
|
+
response: context.uploadResponse
|
|
53
|
+
}) ?? FACE_ERROR_CODES.SERVER;
|
|
54
|
+
} })
|
|
55
|
+
},
|
|
56
|
+
guards: {
|
|
57
|
+
hasUploadValidationError: ({ context }) => {
|
|
58
|
+
if (isOnDeviceMode(context.config)) return false;
|
|
59
|
+
return validateUploadResponse({
|
|
60
|
+
config: context.config,
|
|
61
|
+
response: context.uploadResponse
|
|
62
|
+
}) !== void 0;
|
|
63
|
+
},
|
|
64
|
+
isTerminalUploadError: () => false,
|
|
65
|
+
hasManualUploadEnabled: ({ context }) => context.config.manualUploadSelfieCapture === true
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//#endregion
|
|
69
|
+
export { selfieMachine as t };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { n as getApi } from "./api-Bx3gKW_y.esm.js";
|
|
2
|
-
import {
|
|
3
|
-
import "./sessionInitializer-
|
|
4
|
-
import { t as endpoints } from "./endpoints-
|
|
5
|
-
import "./
|
|
6
|
-
import { r as toIncodeApiError } from "./apiError-BA1d_au0.esm.js";
|
|
2
|
+
import { g as noteSessionCreated, l as trueSightLog } from "./trueSightService-CKrrfV0Q.esm.js";
|
|
3
|
+
import "./sessionInitializer-BLoK7SP9.esm.js";
|
|
4
|
+
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
5
|
+
import { i as toIncodeApiError } from "./apiError-D0v5hFyN.esm.js";
|
|
7
6
|
//#region src/internal/session/sessionService.ts
|
|
8
7
|
/**
|
|
9
8
|
* HTTP status codes the QR validation endpoint emits, keyed by their semantic
|
package/dist/session.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as DeviceFingerprintResult } from "./types-DgDvvzg0.js";
|
|
2
2
|
import { n as FinishStatus, r as GetFinishStatusFn, s as getFinishStatus } from "./flowCompletionService-BlAHsKyv.js";
|
|
3
|
-
//#region src/internal/fingerprint/types.d.ts
|
|
4
|
-
type DeviceFingerprintResult = {
|
|
5
|
-
success: boolean;
|
|
6
|
-
sessionStatus: string;
|
|
7
|
-
showMandatoryConsent?: boolean;
|
|
8
|
-
regulationType?: RegulationTypes;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
3
|
//#region src/internal/session/sessionService.d.ts
|
|
12
4
|
type CreateSessionOptions = {
|
|
13
5
|
/** The configuration/flow ID from the Incode dashboard */
|
|
@@ -196,6 +188,13 @@ type Features = {
|
|
|
196
188
|
};
|
|
197
189
|
//#endregion
|
|
198
190
|
//#region src/internal/session/sessionInitializer.d.ts
|
|
191
|
+
/**
|
|
192
|
+
* Resolves once the device-fingerprint step of the current session
|
|
193
|
+
* activation has settled (submitted, failed, or skipped) — with the backend's
|
|
194
|
+
* result when there is one. Resolves immediately when no activation is in
|
|
195
|
+
* flight. Pairs with `initializeSession({ awaitFingerprint: false })`.
|
|
196
|
+
*/
|
|
197
|
+
declare function whenSessionFingerprintSettled(): Promise<DeviceFingerprintResult | undefined>;
|
|
199
198
|
type SessionInitOptions = {
|
|
200
199
|
/**
|
|
201
200
|
* Session token returned by `createSession`. Persisted on the HTTP client
|
|
@@ -207,12 +206,23 @@ type SessionInitOptions = {
|
|
|
207
206
|
* token. Application code should always pass `token` explicitly.
|
|
208
207
|
*/
|
|
209
208
|
token?: string;
|
|
210
|
-
/**
|
|
209
|
+
/**
|
|
210
|
+
* Custom hosting app name for fingerprint. Defaults to the value given to
|
|
211
|
+
* `setup({ hostingApp })`, so internal activations inherit the host identity.
|
|
212
|
+
*/
|
|
211
213
|
hostingApp?: string;
|
|
212
214
|
/** Abort signal for cancellation */
|
|
213
215
|
signal?: AbortSignal;
|
|
214
216
|
/** Set to `true` to preload Flow configuration during session activation. */
|
|
215
217
|
preloadFlow?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* `false` resolves as soon as the feature config is in, leaving the device
|
|
220
|
+
* fingerprint (thumbmark + IP lookup + submit) to finish in the background;
|
|
221
|
+
* `fingerprintSuccess`/`fingerprintResult` on the result are then not yet
|
|
222
|
+
* known — read them via `whenSessionFingerprintSettled()`. Default `true`
|
|
223
|
+
* keeps the historical contract: the promise settles after the fingerprint.
|
|
224
|
+
*/
|
|
225
|
+
awaitFingerprint?: boolean;
|
|
216
226
|
};
|
|
217
227
|
type SessionInitResult = {
|
|
218
228
|
features: Features;
|
|
@@ -251,4 +261,4 @@ type SessionInitResult = {
|
|
|
251
261
|
*/
|
|
252
262
|
declare function initializeSession(options?: SessionInitOptions): Promise<SessionInitResult>;
|
|
253
263
|
//#endregion
|
|
254
|
-
export { type BootstrapSessionOptions, type CreateSessionOptions, type FinishStatus, type GetFinishStatusFn, IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, type QrValidationErrorCode, type QrValidationResult, type RefreshQrUrlUuidOptions, type Session, type SessionInitOptions, type SessionInitResult, type ValidateQrUuidOptions, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|
|
264
|
+
export { type BootstrapSessionOptions, type CreateSessionOptions, type DeviceFingerprintResult, type FinishStatus, type GetFinishStatusFn, IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, type QrValidationErrorCode, type QrValidationResult, type RefreshQrUrlUuidOptions, type Session, type SessionInitOptions, type SessionInitResult, type ValidateQrUuidOptions, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid, whenSessionFingerprintSettled };
|
package/dist/session.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as initializeSession } from "./sessionInitializer-
|
|
2
|
-
import { t as IncodeApiError } from "./apiError-
|
|
3
|
-
import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-
|
|
4
|
-
import { n as getFinishStatus } from "./flowCompletionService-
|
|
5
|
-
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid };
|
|
1
|
+
import { i as initializeSession, l as whenSessionFingerprintSettled } from "./sessionInitializer-BLoK7SP9.esm.js";
|
|
2
|
+
import { t as IncodeApiError } from "./apiError-D0v5hFyN.esm.js";
|
|
3
|
+
import { a as refreshQrUrlUuid, i as createSession, n as QrValidationError, o as validateQrUuid, r as bootstrapSession, t as QR_VALIDATION_ERROR_CODES } from "./session-BHIeAamR.esm.js";
|
|
4
|
+
import { n as getFinishStatus } from "./flowCompletionService-CLtbWhSK.esm.js";
|
|
5
|
+
export { IncodeApiError, QR_VALIDATION_ERROR_CODES, QrValidationError, bootstrapSession, createSession, getFinishStatus, initializeSession, refreshQrUrlUuid, validateQrUuid, whenSessionFingerprintSettled };
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { E as updateFeatureManagementUser } from "./feature-management-
|
|
1
|
+
import { E as updateFeatureManagementUser } from "./feature-management-B0sGlozZ.esm.js";
|
|
2
2
|
import { c as setToken, r as getToken, t as api } from "./api-Bx3gKW_y.esm.js";
|
|
3
|
-
import {
|
|
4
|
-
import { v as addEvent, y as getAnalyticsBatcher } from "./events-
|
|
5
|
-
import { t as SDK_VERSION } from "./sdkVersion-
|
|
6
|
-
import { t as endpoints } from "./endpoints-
|
|
7
|
-
import "./
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as getUserAgent } from "./getBrowser-Cb8Zgrgp.esm.js";
|
|
3
|
+
import { d as fetchFeatureConfig, f as isFeatureEnabled, h as noteEnvironment, l as trueSightLog, p as resetFeatureConfigCache, s as startTrueSightCollection, v as noteTokenActivated } from "./trueSightService-CKrrfV0Q.esm.js";
|
|
4
|
+
import { v as addEvent, y as getAnalyticsBatcher } from "./events-ijlbX_Wx.esm.js";
|
|
5
|
+
import { t as SDK_VERSION } from "./sdkVersion-CLxKvdyz.esm.js";
|
|
6
|
+
import { t as endpoints } from "./endpoints-D3B9mUHh.esm.js";
|
|
7
|
+
import { n as flushDeviceStatsQueue, r as resetDeviceStatsQueue } from "./stats-DkK-f8JT.esm.js";
|
|
8
|
+
import { t as getParsedUserAgent } from "./getParsedUserAgent-B2iFDql1.esm.js";
|
|
9
|
+
import { a as isIOS } from "./platform-DkcRc9JV.esm.js";
|
|
10
|
+
import { t as getUserAgent } from "./getBrowser-CBiibsL-.esm.js";
|
|
12
11
|
import { i as linkSessionWithTRI, r as isTRIStarted } from "./tri-4RsGrIt6.esm.js";
|
|
13
12
|
//#region ../infra/src/providers/browser/BrowserEnvironmentProvider.ts
|
|
14
13
|
var BrowserEnvironmentProvider = class {
|
|
@@ -135,28 +134,10 @@ var BrowserInfoProvider = class {
|
|
|
135
134
|
}
|
|
136
135
|
getBrowserInfo() {
|
|
137
136
|
const userAgent = typeof navigator !== "undefined" ? navigator.userAgent : "";
|
|
138
|
-
const result = new UAParser(userAgent).getResult();
|
|
139
137
|
return {
|
|
140
138
|
userAgent,
|
|
141
139
|
isWebRtcSupported: this.checkWebRtcSupport(),
|
|
142
|
-
|
|
143
|
-
name: result.browser.name,
|
|
144
|
-
version: result.browser.version
|
|
145
|
-
},
|
|
146
|
-
os: {
|
|
147
|
-
name: result.os.name,
|
|
148
|
-
version: result.os.version
|
|
149
|
-
},
|
|
150
|
-
device: {
|
|
151
|
-
model: result.device.model,
|
|
152
|
-
type: result.device.type,
|
|
153
|
-
vendor: result.device.vendor
|
|
154
|
-
},
|
|
155
|
-
engine: {
|
|
156
|
-
name: result.engine.name,
|
|
157
|
-
version: result.engine.version
|
|
158
|
-
},
|
|
159
|
-
cpu: { architecture: result.cpu.architecture }
|
|
140
|
+
...getParsedUserAgent(userAgent)
|
|
160
141
|
};
|
|
161
142
|
}
|
|
162
143
|
};
|
|
@@ -258,7 +239,7 @@ async function getDeviceFingerprintInfo() {
|
|
|
258
239
|
}
|
|
259
240
|
}
|
|
260
241
|
//#endregion
|
|
261
|
-
//#region ../../node_modules/.pnpm/@thumbmarkjs+thumbmarkjs@1.6.
|
|
242
|
+
//#region ../../node_modules/.pnpm/@thumbmarkjs+thumbmarkjs@1.6.4_patch_hash=4567be4f9456c742dbb8f16dd684bd7f9e5d056dfdc5a42aa48c836cab4a540a/node_modules/@thumbmarkjs/thumbmarkjs/dist/thumbmark.esm.js
|
|
262
243
|
const e = 2592e5;
|
|
263
244
|
const t = "thumbmark";
|
|
264
245
|
const n = "https://api.thumbmarkjs.com";
|
|
@@ -331,6 +312,11 @@ function c(e) {
|
|
|
331
312
|
function l(e, t, n) {
|
|
332
313
|
let o = [];
|
|
333
314
|
for (let t = 0; t < e[0].data.length; t++) {
|
|
315
|
+
const first = e[0].data[t];
|
|
316
|
+
if (e.every((image) => image.data[t] === first)) {
|
|
317
|
+
o.push(first);
|
|
318
|
+
continue;
|
|
319
|
+
}
|
|
334
320
|
let n = [];
|
|
335
321
|
for (let o = 0; o < e.length; o++) n.push(e[o].data[t]);
|
|
336
322
|
o.push(u(n));
|
|
@@ -414,7 +400,7 @@ async function g(e) {
|
|
|
414
400
|
o.setProperty("position", "fixed"), o.setProperty("display", "block", "important"), o.setProperty("visibility", "visible"), o.setProperty("border", "0"), o.setProperty("opacity", "0"), n.src = "about:blank", document.body.appendChild(n);
|
|
415
401
|
const r = n.contentDocument || (null === (t = n.contentWindow) || void 0 === t ? void 0 : t.document);
|
|
416
402
|
if (!r) throw new Error("Iframe document is not accessible");
|
|
417
|
-
e({ iframe: r }), setTimeout((() => {
|
|
403
|
+
await e({ iframe: r }), setTimeout((() => {
|
|
418
404
|
document.body.removeChild(n);
|
|
419
405
|
}), 0);
|
|
420
406
|
}
|
|
@@ -821,7 +807,7 @@ const V = {
|
|
|
821
807
|
0 !== t.length ? e({ commonPixelsHash: h(l(t, p, 20).data.toString()).toString() }) : e(null);
|
|
822
808
|
}));
|
|
823
809
|
},
|
|
824
|
-
fonts: async function(
|
|
810
|
+
fonts: async function(options) {
|
|
825
811
|
return new Promise(((e) => {
|
|
826
812
|
try {
|
|
827
813
|
g((async ({ iframe: t }) => {
|
|
@@ -829,10 +815,12 @@ const V = {
|
|
|
829
815
|
if (!n) return void e(null);
|
|
830
816
|
const o = y.map(((e) => S(n, e)));
|
|
831
817
|
let r = {};
|
|
832
|
-
v.
|
|
833
|
-
|
|
818
|
+
for (let i = 0; i < v.length; i++) {
|
|
819
|
+
if (options?.yield && i % 8 === 0) await options.yield();
|
|
820
|
+
const e = v[i], t = S(n, e);
|
|
834
821
|
o.includes(t) || (r[e] = t);
|
|
835
|
-
}
|
|
822
|
+
}
|
|
823
|
+
e(r);
|
|
836
824
|
}));
|
|
837
825
|
} catch (t) {
|
|
838
826
|
e(null);
|
|
@@ -1409,7 +1397,14 @@ async function oe(e, t) {
|
|
|
1409
1397
|
})).filter((([e]) => {
|
|
1410
1398
|
var t, o, r, i;
|
|
1411
1399
|
return (null === (t = null == n ? void 0 : n.include) || void 0 === t ? void 0 : t.some(((e) => e.includes(".")))) ? null === (o = null == n ? void 0 : n.include) || void 0 === o ? void 0 : o.some(((t) => t.startsWith(e))) : 0 === (null === (r = null == n ? void 0 : n.include) || void 0 === r ? void 0 : r.length) || (null === (i = null == n ? void 0 : n.include) || void 0 === i ? void 0 : i.includes(e));
|
|
1412
|
-
})), i = r.map((([e]) => e)),
|
|
1400
|
+
})), i = r.map((([e]) => e)), a = [];
|
|
1401
|
+
for (const [e, fn] of r) {
|
|
1402
|
+
if (n.yield) await n.yield();
|
|
1403
|
+
const pending = fn(t);
|
|
1404
|
+
pending.catch(() => void 0);
|
|
1405
|
+
a.push(pending);
|
|
1406
|
+
}
|
|
1407
|
+
const s = await function(e, t, n) {
|
|
1413
1408
|
return Promise.all(e.map(((e) => {
|
|
1414
1409
|
const o = performance.now();
|
|
1415
1410
|
return Promise.race([e.then(((e) => ({
|
|
@@ -1423,7 +1418,7 @@ async function oe(e, t) {
|
|
|
1423
1418
|
})))]);
|
|
1424
1419
|
var r, i;
|
|
1425
1420
|
})));
|
|
1426
|
-
}(
|
|
1421
|
+
}(a, (null == n ? void 0 : n.timeout) || 5e3, j), c = {}, l = {};
|
|
1427
1422
|
s.forEach(((e, t) => {
|
|
1428
1423
|
var n;
|
|
1429
1424
|
null != e.value && (l[i[t]] = e.value, c[i[t]] = null !== (n = e.elapsed) && void 0 !== n ? n : 0);
|
|
@@ -1454,6 +1449,54 @@ var se = class {
|
|
|
1454
1449
|
}
|
|
1455
1450
|
};
|
|
1456
1451
|
//#endregion
|
|
1452
|
+
//#region ../infra/src/scheduling/yieldUntilNextPaint.ts
|
|
1453
|
+
/**
|
|
1454
|
+
* Resolves after the browser has had a chance to commit and paint a queued
|
|
1455
|
+
* render.
|
|
1456
|
+
*
|
|
1457
|
+
* Strategy:
|
|
1458
|
+
* - `requestAnimationFrame` callbacks fire BEFORE the paint of the frame
|
|
1459
|
+
* they belong to (per the HTML5 "update the rendering" step). If we
|
|
1460
|
+
* resolve the promise inside a rAF callback, the await-continuation
|
|
1461
|
+
* runs as a microtask immediately after the callback returns — still
|
|
1462
|
+
* before the paint phase of that frame. A caller that then blocks the
|
|
1463
|
+
* main thread (e.g. synchronous WASM `processPhoto`) starves the paint.
|
|
1464
|
+
* - We therefore chain rAF → setTimeout: the rAF fires before frame N's
|
|
1465
|
+
* paint, the setTimeout runs as a macrotask scheduled after frame N's
|
|
1466
|
+
* "update the rendering" step, which the browser will only get to once
|
|
1467
|
+
* the paint actually lands. By the time setTimeout fires, the paint
|
|
1468
|
+
* for the queued render is on screen.
|
|
1469
|
+
* - In environments where rAF never ticks (jsdom, happy-dom, backgrounded
|
|
1470
|
+
* tabs), a parallel `setTimeout` fallback at 100 ms resolves instead.
|
|
1471
|
+
* 100 ms is comfortably longer than two real-browser frames so rAF +
|
|
1472
|
+
* setTimeout wins reliably in any foregrounded browser. (An earlier
|
|
1473
|
+
* implementation raced rAF against a `MessageChannel` macrotask, but
|
|
1474
|
+
* MessageChannel drains immediately after the current task's
|
|
1475
|
+
* microtasks — before the next paint — so it resolved the promise too
|
|
1476
|
+
* early and defeated the whole point of the helper.)
|
|
1477
|
+
*
|
|
1478
|
+
* Lives in infra because it touches browser APIs (`requestAnimationFrame`,
|
|
1479
|
+
* `setTimeout`) that the architecture rules forbid from core. Core modules
|
|
1480
|
+
* that need to yield to the browser render loop should import this helper
|
|
1481
|
+
* directly via its file path.
|
|
1482
|
+
*/
|
|
1483
|
+
function yieldUntilNextPaint() {
|
|
1484
|
+
return new Promise((resolve) => {
|
|
1485
|
+
let resolved = false;
|
|
1486
|
+
const done = () => {
|
|
1487
|
+
if (resolved) return;
|
|
1488
|
+
resolved = true;
|
|
1489
|
+
resolve();
|
|
1490
|
+
};
|
|
1491
|
+
if (typeof requestAnimationFrame === "function") requestAnimationFrame(() => {
|
|
1492
|
+
requestAnimationFrame(() => {
|
|
1493
|
+
setTimeout(done, 0);
|
|
1494
|
+
});
|
|
1495
|
+
});
|
|
1496
|
+
setTimeout(done, 100);
|
|
1497
|
+
});
|
|
1498
|
+
}
|
|
1499
|
+
//#endregion
|
|
1457
1500
|
//#region ../infra/src/providers/browser/thumbmarkAdapter.ts
|
|
1458
1501
|
/**
|
|
1459
1502
|
* Adapter for @thumbmarkjs/thumbmarkjs. Single point of dependency so bundlers
|
|
@@ -1475,7 +1518,10 @@ const THUMBMARK_ALGORITHM = {
|
|
|
1475
1518
|
* read. It also stops upstream's 1-in-10 000 telemetry POST to
|
|
1476
1519
|
* api.thumbmarkjs.com. Re-check this when bumping the dependency.
|
|
1477
1520
|
*/
|
|
1478
|
-
const THUMBMARK_OPTIONS = {
|
|
1521
|
+
const THUMBMARK_OPTIONS = {
|
|
1522
|
+
logging: false,
|
|
1523
|
+
yield: yieldUntilNextPaint
|
|
1524
|
+
};
|
|
1479
1525
|
async function getThumbmarkId() {
|
|
1480
1526
|
return (await new se(THUMBMARK_OPTIONS).get()).thumbmark;
|
|
1481
1527
|
}
|
|
@@ -1485,8 +1531,18 @@ var FingerprintProvider = class {
|
|
|
1485
1531
|
constructor(ipLookup) {
|
|
1486
1532
|
this.ipLookup = ipLookup;
|
|
1487
1533
|
}
|
|
1534
|
+
prime() {
|
|
1535
|
+
this.startVisitorId();
|
|
1536
|
+
}
|
|
1537
|
+
startVisitorId() {
|
|
1538
|
+
if (!this.visitorIdPromise) {
|
|
1539
|
+
this.visitorIdPromise = getThumbmarkId();
|
|
1540
|
+
this.visitorIdPromise.catch(() => void 0);
|
|
1541
|
+
}
|
|
1542
|
+
return this.visitorIdPromise;
|
|
1543
|
+
}
|
|
1488
1544
|
async getFingerprint(disableIpify = false) {
|
|
1489
|
-
const visitorId = await
|
|
1545
|
+
const visitorId = await this.startVisitorId();
|
|
1490
1546
|
const [deviceInfo, ip] = await Promise.all([getDeviceFingerprintInfo(), disableIpify ? Promise.resolve("") : this.ipLookup.getIp()]);
|
|
1491
1547
|
return {
|
|
1492
1548
|
visitorId,
|
|
@@ -1619,7 +1675,9 @@ function formatBrowser(browser) {
|
|
|
1619
1675
|
}
|
|
1620
1676
|
async function submitDeviceFingerprint(options = {}, dependencies) {
|
|
1621
1677
|
const { disableIpify = false, hostingApp, signal } = options;
|
|
1678
|
+
const token = getToken();
|
|
1622
1679
|
const fingerprint = await dependencies.fingerprintProvider.getFingerprint(disableIpify);
|
|
1680
|
+
if (getToken() !== token || dependencies.isCurrentSession?.() === false) throw new Error("Session changed during fingerprint collection");
|
|
1623
1681
|
const hasLiedBrowser = isBrowserSimulation(dependencies.browserEnv);
|
|
1624
1682
|
const payload = {
|
|
1625
1683
|
hash: fingerprint.visitorId || "",
|
|
@@ -1675,9 +1733,20 @@ let cachedFeatures = null;
|
|
|
1675
1733
|
let cachedDisableIpify = false;
|
|
1676
1734
|
let clientIpLookupEnabled = true;
|
|
1677
1735
|
let clientFingerprintEnabled = true;
|
|
1736
|
+
let clientHostingApp;
|
|
1678
1737
|
function setClientIpLookupEnabled(enabled) {
|
|
1679
1738
|
clientIpLookupEnabled = enabled;
|
|
1680
1739
|
}
|
|
1740
|
+
/**
|
|
1741
|
+
* Host identifier from `setup({ hostingApp })`, used as the default for every
|
|
1742
|
+
* activation. Without it the option only reached the fingerprint when the host
|
|
1743
|
+
* also passed `token` to `setup()` — activations triggered later from inside
|
|
1744
|
+
* `<incode-flow>` / `<incode-workflow>` / standalone modules carry a token but
|
|
1745
|
+
* no host identity, so those sessions fell back to the `'Web SDK'` default.
|
|
1746
|
+
*/
|
|
1747
|
+
function setClientHostingApp(hostingApp) {
|
|
1748
|
+
clientHostingApp = hostingApp;
|
|
1749
|
+
}
|
|
1681
1750
|
function setClientFingerprintEnabled(enabled) {
|
|
1682
1751
|
clientFingerprintEnabled = enabled;
|
|
1683
1752
|
}
|
|
@@ -1699,6 +1768,25 @@ function preloadOptionalFlow() {
|
|
|
1699
1768
|
let cachedFingerprintSuccess = false;
|
|
1700
1769
|
let cachedFingerprintResult;
|
|
1701
1770
|
let sessionInitPromise = null;
|
|
1771
|
+
let fingerprintSettled = null;
|
|
1772
|
+
function createFingerprintSettled() {
|
|
1773
|
+
let resolve = () => void 0;
|
|
1774
|
+
return {
|
|
1775
|
+
promise: new Promise((r) => {
|
|
1776
|
+
resolve = r;
|
|
1777
|
+
}),
|
|
1778
|
+
resolve
|
|
1779
|
+
};
|
|
1780
|
+
}
|
|
1781
|
+
/**
|
|
1782
|
+
* Resolves once the device-fingerprint step of the current session
|
|
1783
|
+
* activation has settled (submitted, failed, or skipped) — with the backend's
|
|
1784
|
+
* result when there is one. Resolves immediately when no activation is in
|
|
1785
|
+
* flight. Pairs with `initializeSession({ awaitFingerprint: false })`.
|
|
1786
|
+
*/
|
|
1787
|
+
function whenSessionFingerprintSettled() {
|
|
1788
|
+
return fingerprintSettled?.promise ?? Promise.resolve(cachedFingerprintResult);
|
|
1789
|
+
}
|
|
1702
1790
|
/**
|
|
1703
1791
|
* Activates a session by setting the auth token on the HTTP client and
|
|
1704
1792
|
* preloading session-scoped state.
|
|
@@ -1729,7 +1817,7 @@ let sessionInitPromise = null;
|
|
|
1729
1817
|
* ```
|
|
1730
1818
|
*/
|
|
1731
1819
|
async function initializeSession(options = {}) {
|
|
1732
|
-
const { token, hostingApp, signal, preloadFlow } = options;
|
|
1820
|
+
const { token, hostingApp = clientHostingApp, signal, preloadFlow, awaitFingerprint = true } = options;
|
|
1733
1821
|
let triLinkPromise = Promise.resolve();
|
|
1734
1822
|
if (token !== void 0 && token !== getToken()) {
|
|
1735
1823
|
setToken(token);
|
|
@@ -1740,6 +1828,7 @@ async function initializeSession(options = {}) {
|
|
|
1740
1828
|
const flowPreloadPromise = getToken() && preloadFlow === true ? preloadOptionalFlow() : Promise.resolve();
|
|
1741
1829
|
await triLinkPromise;
|
|
1742
1830
|
if (sessionInitialized && cachedFeatures) {
|
|
1831
|
+
if (awaitFingerprint) await whenSessionFingerprintSettled();
|
|
1743
1832
|
await flowPreloadPromise;
|
|
1744
1833
|
return {
|
|
1745
1834
|
features: cachedFeatures,
|
|
@@ -1750,9 +1839,19 @@ async function initializeSession(options = {}) {
|
|
|
1750
1839
|
}
|
|
1751
1840
|
if (sessionInitPromise) {
|
|
1752
1841
|
const result = await sessionInitPromise;
|
|
1842
|
+
if (awaitFingerprint) await whenSessionFingerprintSettled();
|
|
1753
1843
|
await flowPreloadPromise;
|
|
1754
|
-
return
|
|
1844
|
+
return {
|
|
1845
|
+
...result,
|
|
1846
|
+
fingerprintSuccess: cachedFingerprintSuccess,
|
|
1847
|
+
fingerprintResult: cachedFingerprintResult
|
|
1848
|
+
};
|
|
1755
1849
|
}
|
|
1850
|
+
const settled = createFingerprintSettled();
|
|
1851
|
+
fingerprintSettled = settled;
|
|
1852
|
+
const fingerprintProvider = clientFingerprintEnabled ? new FingerprintProvider(new IpifyProvider()) : void 0;
|
|
1853
|
+
fingerprintProvider?.prime?.();
|
|
1854
|
+
let fingerprintPromise;
|
|
1756
1855
|
sessionInitPromise = (async () => {
|
|
1757
1856
|
let features;
|
|
1758
1857
|
let serverDisableIpify = false;
|
|
@@ -1766,27 +1865,16 @@ async function initializeSession(options = {}) {
|
|
|
1766
1865
|
startTrueSightCollection();
|
|
1767
1866
|
}
|
|
1768
1867
|
const disableIpify = resolveDisableIpify(serverDisableIpify);
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
}, {
|
|
1780
|
-
fingerprintProvider,
|
|
1781
|
-
browserEnv
|
|
1782
|
-
});
|
|
1783
|
-
fingerprintSuccess = true;
|
|
1784
|
-
flushDeviceStatsQueue();
|
|
1785
|
-
} catch (error) {
|
|
1786
|
-
console.warn("Failed to submit device fingerprint:", error);
|
|
1787
|
-
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
1788
|
-
}
|
|
1789
|
-
else flushDeviceStatsQueue();
|
|
1868
|
+
const preloadedFlow = await flowPreloadPromise;
|
|
1869
|
+
await updateFeatureManagementUser({ customIDs: {
|
|
1870
|
+
hashed_onboarding_id: features.sessionIdentifier || void 0,
|
|
1871
|
+
flow_id: preloadedFlow?.flowId
|
|
1872
|
+
} });
|
|
1873
|
+
fingerprintPromise = submitSessionFingerprint(fingerprintProvider, {
|
|
1874
|
+
disableIpify,
|
|
1875
|
+
hostingApp,
|
|
1876
|
+
signal
|
|
1877
|
+
}, settled);
|
|
1790
1878
|
try {
|
|
1791
1879
|
const browserInfo = new BrowserInfoProvider().getBrowserInfo();
|
|
1792
1880
|
const language = new BrowserEnvironmentProvider().getNavigatorProperty("language");
|
|
@@ -1810,25 +1898,55 @@ async function initializeSession(options = {}) {
|
|
|
1810
1898
|
} catch (error) {
|
|
1811
1899
|
console.warn("Failed to send browser info event:", error);
|
|
1812
1900
|
}
|
|
1901
|
+
if (awaitFingerprint) await fingerprintPromise;
|
|
1813
1902
|
sessionInitialized = true;
|
|
1814
1903
|
cachedFeatures = features;
|
|
1815
1904
|
cachedDisableIpify = disableIpify;
|
|
1816
|
-
cachedFingerprintSuccess = fingerprintSuccess;
|
|
1817
|
-
cachedFingerprintResult = fingerprintResult;
|
|
1818
1905
|
await flowPreloadPromise;
|
|
1819
1906
|
return {
|
|
1820
1907
|
features,
|
|
1821
1908
|
disableIpify,
|
|
1822
|
-
fingerprintSuccess,
|
|
1823
|
-
fingerprintResult
|
|
1909
|
+
fingerprintSuccess: cachedFingerprintSuccess,
|
|
1910
|
+
fingerprintResult: cachedFingerprintResult
|
|
1824
1911
|
};
|
|
1825
1912
|
})().finally(() => {
|
|
1826
1913
|
sessionInitPromise = null;
|
|
1827
|
-
|
|
1914
|
+
if (!fingerprintPromise) settled.resolve(void 0);
|
|
1915
|
+
(fingerprintPromise ?? Promise.resolve()).finally(() => {
|
|
1916
|
+
if (fingerprintSettled === settled) getAnalyticsBatcher()?.start();
|
|
1917
|
+
});
|
|
1828
1918
|
});
|
|
1829
1919
|
return sessionInitPromise;
|
|
1830
1920
|
}
|
|
1831
1921
|
/**
|
|
1922
|
+
* Device-fingerprint step of session activation. Writes the cached result only
|
|
1923
|
+
* while it still belongs to the current activation (a token change resets
|
|
1924
|
+
* `fingerprintSettled`) and always settles the waiter.
|
|
1925
|
+
*/
|
|
1926
|
+
async function submitSessionFingerprint(fingerprintProvider, options, settled) {
|
|
1927
|
+
const isCurrent = () => fingerprintSettled === settled;
|
|
1928
|
+
try {
|
|
1929
|
+
if (fingerprintProvider) try {
|
|
1930
|
+
const result = await submitDeviceFingerprint(options, {
|
|
1931
|
+
fingerprintProvider,
|
|
1932
|
+
browserEnv: new BrowserEnvironmentProvider(),
|
|
1933
|
+
isCurrentSession: isCurrent
|
|
1934
|
+
});
|
|
1935
|
+
if (isCurrent()) {
|
|
1936
|
+
cachedFingerprintResult = result;
|
|
1937
|
+
cachedFingerprintSuccess = true;
|
|
1938
|
+
flushDeviceStatsQueue();
|
|
1939
|
+
}
|
|
1940
|
+
} catch (error) {
|
|
1941
|
+
console.warn("Failed to submit device fingerprint:", error);
|
|
1942
|
+
trueSightLog("warning", "session", "other", "device fingerprint submit failed");
|
|
1943
|
+
}
|
|
1944
|
+
else if (isCurrent()) flushDeviceStatsQueue();
|
|
1945
|
+
} finally {
|
|
1946
|
+
settled.resolve(isCurrent() ? cachedFingerprintResult : void 0);
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1832
1950
|
* Gets the cached disableIpify flag.
|
|
1833
1951
|
* Returns false if session hasn't been initialized.
|
|
1834
1952
|
*/
|
|
@@ -1858,9 +1976,10 @@ function resetSessionInit() {
|
|
|
1858
1976
|
cachedFingerprintSuccess = false;
|
|
1859
1977
|
cachedFingerprintResult = void 0;
|
|
1860
1978
|
sessionInitPromise = null;
|
|
1979
|
+
fingerprintSettled = null;
|
|
1861
1980
|
resetFeatureConfigCache();
|
|
1862
1981
|
resetIpifyCache();
|
|
1863
1982
|
resetDeviceStatsQueue();
|
|
1864
1983
|
}
|
|
1865
1984
|
//#endregion
|
|
1866
|
-
export {
|
|
1985
|
+
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, getDeviceFingerprintInfo as y };
|