@incodetech/core 2.1.0-rc.2 → 2.1.0-rc.3
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/dist/3dAvatarProvider-ChciZmjE.esm.js +28214 -0
- package/dist/{BrowserStorageProvider-D5xc7Lqo.esm.js → BrowserStorageProvider-CrrN540a.esm.js} +1 -25
- package/dist/BrowserVisibilityObserverProvider-rim9Jrz-.esm.js +25 -0
- package/dist/Face2DProvider-BeLlYBbB.esm.js +824 -0
- package/dist/FaceDetectionProvider-B78455D4.d.ts +119 -0
- package/dist/IVisibilityObserverCapability-BbWjgpiF.d.ts +12 -0
- package/dist/IWasmUtilCapability-d2XvzaCk.d.ts +145 -0
- package/dist/IpifyProvider-BRW14_uo.esm.js +51 -0
- package/dist/{Manager-B2OEDYqf.d.ts → Manager-CJ3G2zqi.d.ts} +1 -4
- package/dist/{OpenViduRecordingProvider-DF7A4ZNJ.esm.js → OpenViduRecordingProvider-B_0GKkzc.esm.js} +1 -1
- package/dist/PrivacyLensProvider-hDzaDzZ6.esm.js +339 -0
- package/dist/StateMachine-C_AY4cs7.d.ts +2 -0
- package/dist/{StreamCanvasCapture-Dr5n_iK1.esm.js → StreamCanvasCapture-Bz17q4FP.esm.js} +1 -1
- package/dist/StreamCanvasCapture-DS1TOoiH.d.ts +42 -0
- package/dist/{WasmUtilProvider-CIu373BZ.esm.js → WasmUtilProvider-ADG54T6M.esm.js} +16 -1
- package/dist/{addressSearch-BH96a3fq.esm.js → addressSearch-DJyNTg5S.esm.js} +4 -4
- package/dist/{ae-signature-CDEN8y-w.esm.js → ae-signature-DlElqFrZ.esm.js} +1 -1
- package/dist/ae-signature.d.ts +4 -3
- package/dist/ae-signature.esm.js +10 -9
- package/dist/antifraud.d.ts +4 -3
- package/dist/antifraud.esm.js +7 -6
- package/dist/{antifraudManager-DZifA5zX.esm.js → antifraudManager-BKdQoMFf.esm.js} +4 -3
- package/dist/{antifraudManager-B7WQTIdu.d.ts → antifraudManager-DpIvbrZP.d.ts} +2 -2
- package/dist/{antifraudStateMachine-DlKrK2hL.esm.js → antifraudStateMachine-C0NGnP9W.esm.js} +3 -3
- package/dist/{api-DUZwyz0o.esm.js → api-DsbUi7TO.esm.js} +21 -2
- package/dist/authentication.d.ts +19 -12
- package/dist/authentication.esm.js +33 -27
- package/dist/{authenticationManager-Dve7mGLe.d.ts → authenticationManager-CdPbNS2H.d.ts} +3 -3
- package/dist/{authenticationManager-BM4LzyV7.esm.js → authenticationManager-Dtl1vcET.esm.js} +6 -6
- package/dist/{authenticationStateMachine-Chx3ySdT.esm.js → authenticationStateMachine-D-hOlg8p.esm.js} +8 -8
- package/dist/avatar.d.ts +3 -0
- package/dist/avatar.esm.js +3 -0
- package/dist/{backCameraStream-iftkf3rd.esm.js → backCameraStream-ZyqrFyjO.esm.js} +3 -3
- package/dist/{browser-DlFgHpoC-7tbRR1aR.esm.js → browser-DlFgHpoC-qLKs75Qp.esm.js} +1 -1
- package/dist/{browserSimulation-CGjpdNA1.esm.js → browserSimulation-TsSoavQv.esm.js} +153 -1216
- package/dist/camera-DUkgmYMo.esm.js +79 -0
- package/dist/camera.d.ts +7 -1
- package/dist/camera.esm.js +4 -4
- package/dist/{StreamCanvasCapture-Ctgyx-oD.d.ts → canvas-CJUmoXSD.d.ts} +1 -41
- package/dist/certificate-issuance.d.ts +31 -30
- package/dist/certificate-issuance.esm.js +8 -7
- package/dist/{certificateIssuanceStateMachine-CLNXtXaC.esm.js → certificateIssuanceStateMachine-C07m7qtP.esm.js} +4 -4
- package/dist/clientLifecycle-Ct7h9uxx.esm.js +534 -0
- package/dist/consent.d.ts +4 -3
- package/dist/consent.esm.js +7 -6
- package/dist/{consentManager-psDCeJ0E.esm.js → consentManager-BtnPZUW4.esm.js} +4 -3
- package/dist/{consentManager-BqUGU_YD.d.ts → consentManager-DufVo9D9.d.ts} +52 -52
- package/dist/{consentStateMachine-DRsFFSHE.esm.js → consentStateMachine-DO2JqoZW.esm.js} +3 -3
- package/dist/cpf-ocr.d.ts +4 -3
- package/dist/cpf-ocr.esm.js +7 -6
- package/dist/{cpfOcrManager-BxcgxvgO.esm.js → cpfOcrManager-C4rLgKsu.esm.js} +6 -5
- package/dist/{cpfOcrManager-B2u9hMzd.d.ts → cpfOcrManager-DqZZ94Gt.d.ts} +19 -19
- package/dist/createFaceAvatar-B8pFpy6o.d.ts +401 -0
- package/dist/createFaceAvatar-BOHDKQRq.esm.js +46 -0
- package/dist/cross-document-data-match.d.ts +2 -1
- package/dist/cross-document-data-match.esm.js +6 -5
- package/dist/curp-validation.d.ts +10 -7
- package/dist/curp-validation.esm.js +7 -6
- package/dist/{curpValidationManager-BgLDw0Ub.esm.js → curpValidationManager-BafobPXC.esm.js} +4 -3
- package/dist/{curpValidationManager-Bt6CVD8b.d.ts → curpValidationManager-Co6LZAHT.d.ts} +3 -3
- package/dist/{curpValidationStateMachine-BK_wJ48C.esm.js → curpValidationStateMachine-DXTPK6vI.esm.js} +3 -3
- package/dist/custom-fields.d.ts +3 -2
- package/dist/custom-fields.esm.js +6 -5
- package/dist/custom-watchlist.d.ts +2 -1
- package/dist/custom-watchlist.esm.js +6 -5
- package/dist/{customWatchlistStateMachine-Bi4P59HM.esm.js → customWatchlistStateMachine-B4G3Chkx.esm.js} +3 -3
- package/dist/{deepsightLoader-BMmvk0X6.esm.js → deepsightLoader-DHSVD776.esm.js} +14 -13
- package/dist/{deepsightService-CEZrdiW0.esm.js → deepsightService-CDahSjGP.esm.js} +9 -38
- package/dist/deepsightService-CMB9XjES.d.ts +69 -0
- package/dist/device.d.ts +9 -1
- package/dist/device.esm.js +5 -5
- package/dist/document-capture.d.ts +175 -174
- package/dist/document-capture.esm.js +14 -13
- package/dist/document-upload.d.ts +48 -47
- package/dist/document-upload.esm.js +9 -8
- package/dist/{documentCaptureStateMachine-MpwpJO7t.esm.js → documentCaptureStateMachine-DSOX2epf.esm.js} +7 -7
- package/dist/dynamic-forms.d.ts +4 -192
- package/dist/dynamic-forms.esm.js +8 -160
- package/dist/dynamicFormsManager-BOefZbyF.esm.js +168 -0
- package/dist/dynamicFormsManager-CUYLOj9g.d.ts +239 -0
- package/dist/{dynamicFormsStateMachine-Do84A4uU.esm.js → dynamicFormsStateMachine-BXHcaocI.esm.js} +4 -4
- package/dist/ekyb.d.ts +9 -6
- package/dist/ekyb.esm.js +20 -17
- package/dist/{ekybStateMachine-nsuPOw3f.esm.js → ekybStateMachine-CCSeqjCt.esm.js} +5 -5
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +9 -8
- package/dist/{ekycStateMachine-DcynX0rj.esm.js → ekycStateMachine-DkLVTOyA.esm.js} +5 -5
- package/dist/electronic-signature.d.ts +4 -3
- package/dist/electronic-signature.esm.js +9 -8
- package/dist/{electronicSignatureManager-B63aAuI5.esm.js → electronicSignatureManager-DjzUzqZj.esm.js} +50 -87
- package/dist/email.d.ts +5 -4
- package/dist/email.esm.js +9 -8
- package/dist/{emailManager-DxHjAe5u.esm.js → emailManager-B_XzEsXH.esm.js} +5 -4
- package/dist/{emailManager-C6D2u4mQ.d.ts → emailManager-fHASH6uo.d.ts} +3 -3
- package/dist/{emailStateMachine-758f34gg.esm.js → emailStateMachine-fqJ42b19.esm.js} +5 -5
- package/dist/{endpoints-BM2_j_IE.esm.js → endpoints-BzMJFAPV.esm.js} +13 -0
- package/dist/{events-DN-u67gb.esm.js → events-CqGY1yMq.esm.js} +2 -188
- package/dist/events.d.ts +2 -0
- package/dist/events.esm.js +3 -2
- package/dist/extensibility.d.ts +37 -26
- package/dist/extensibility.esm.js +74 -59
- package/dist/{externalFetch-crimxkN9.esm.js → externalFetch-CyhBfD-n.esm.js} +1 -1
- package/dist/face-match.d.ts +2 -2
- package/dist/face-match.esm.js +6 -5
- package/dist/{faceCaptureManagerFactory-BNXZchWX.esm.js → faceCaptureManagerFactory-2brKTzMb.esm.js} +25 -16
- package/dist/faceCaptureManagerFactory-CGKbf7zt.d.ts +400 -0
- package/dist/{faceCaptureSetup-Dqb09D24.esm.js → faceCaptureSetup-CDUVU1nl.esm.js} +97 -13
- package/dist/{faceMatchStateMachine-FikRaUZH.esm.js → faceMatchStateMachine-DUeUjEPx.esm.js} +3 -3
- package/dist/field-comparison.d.ts +4 -3
- package/dist/field-comparison.esm.js +6 -5
- package/dist/{fieldComparisonManager-Dic0DVgl.esm.js → fieldComparisonManager-B9W0a9A5.esm.js} +5 -4
- package/dist/{fieldComparisonManager-BXc6-DJv.d.ts → fieldComparisonManager-DdLqDeB2.d.ts} +2 -2
- package/dist/fiscal-qr.d.ts +5 -3
- package/dist/fiscal-qr.esm.js +13 -12
- package/dist/flow-events.d.ts +8 -6
- package/dist/flow.d.ts +21 -13
- package/dist/flow.esm.js +28 -19
- package/dist/{flowCompletionService-CdGDKv0z.d.ts → flowCompletionService-BIqSTZcd.d.ts} +2 -1
- package/dist/{flowCompletionService-D_CsiDZM.esm.js → flowCompletionService-qEqh_g14.esm.js} +3 -3
- package/dist/{flowServices-ar5DXv71.esm.js → flowServices-C4piblgx.esm.js} +24 -9
- package/dist/geolocation.d.ts +4 -127
- package/dist/geolocation.esm.js +8 -115
- package/dist/geolocationManager-BP2Do9O-.esm.js +123 -0
- package/dist/geolocationManager-Cs50eRlC.d.ts +156 -0
- package/dist/{geolocationStateMachine-BWjrMGS_.esm.js → geolocationStateMachine-BYfOOOG0.esm.js} +4 -4
- package/dist/{getDeviceClass-rXKlXywy.esm.js → getDeviceClass-DGGzzfqm.esm.js} +1 -1
- package/dist/getDeviceData-TrKM8NPh.esm.js +101 -0
- package/dist/government-validation.d.ts +4 -3
- package/dist/government-validation.esm.js +8 -7
- package/dist/{governmentValidationStateMachine-BoF7U1of.esm.js → governmentValidationStateMachine-CwoPPO8b.esm.js} +5 -5
- package/dist/home.d.ts +18 -15
- package/dist/home.esm.js +4 -3
- package/dist/http.esm.js +2 -2
- package/dist/id-ocr.d.ts +4 -625
- package/dist/id-ocr.esm.js +8 -84
- package/dist/id-verification.d.ts +28 -27
- package/dist/id-verification.esm.js +6 -5
- package/dist/id.d.ts +16 -11
- package/dist/id.esm.js +39 -32
- package/dist/idCaptureDefaults-DNJON8Xo.esm.js +188 -0
- package/dist/{idCaptureManager-BvGUSN2e.d.ts → idCaptureManager-BVdvfJys.d.ts} +40 -10
- package/dist/{idCaptureManager-Bm6Wm6Qv.esm.js → idCaptureManager-Bo9DCQSU.esm.js} +14 -11
- package/dist/{idCaptureStateMachine-D1YhOj6n.esm.js → idCaptureStateMachine-BeDidMLU.esm.js} +395 -382
- package/dist/idOcrManager-BkRDrpZu.esm.js +92 -0
- package/dist/idOcrManager-CJzrmM91.d.ts +641 -0
- package/dist/{idOcrStateMachine-YMCDGplq.esm.js → idOcrStateMachine-DRZc4FBl.esm.js} +5 -5
- package/dist/{idVerificationStateMachine-Bo1IYuZH.esm.js → idVerificationStateMachine-oqiERKpg.esm.js} +3 -3
- package/dist/identity-reuse.d.ts +4 -3
- package/dist/identity-reuse.esm.js +7 -6
- package/dist/{identityReuseManager-D0knIrOy.esm.js → identityReuseManager-Bu62LToE.esm.js} +4 -3
- package/dist/{identityReuseManager-DcWSvC-A.d.ts → identityReuseManager-TWKbXuvY.d.ts} +33 -33
- package/dist/{identityReuseStateMachine-CSQfZOqD.esm.js → identityReuseStateMachine-BmONeF6B.esm.js} +3 -3
- package/dist/{index-BgxYUYuD.d.ts → index-DtUlD-bz.d.ts} +2 -2
- package/dist/{index-DV134v62.d.ts → index-Icld-cKW.d.ts} +175 -295
- package/dist/index.d.ts +3 -3
- package/dist/index.esm.js +16 -13
- package/dist/{invokeOnCaptureCallback-Dzemudhk.esm.js → invokeOnCaptureCallback-v_PV_IJz.esm.js} +1 -1
- package/dist/{lib-7ZQ9BdKH.esm.js → lib-B050WTth.esm.js} +1 -1
- package/dist/mandatory-consent.d.ts +10 -7
- package/dist/mandatory-consent.esm.js +7 -6
- package/dist/{mandatoryConsentManager-Tzl5Qd35.d.ts → mandatoryConsentManager-Bmdjo14S.d.ts} +50 -50
- package/dist/{mandatoryConsentManager-Lon46nPQ.esm.js → mandatoryConsentManager-CQ3jirlZ.esm.js} +4 -3
- package/dist/{mandatoryConsentStateMachine-D_dZ7IF6.esm.js → mandatoryConsentStateMachine-DkJJLHqC.esm.js} +3 -3
- package/dist/mediaRecorderOptions-C3NAkVgK.esm.js +42 -0
- package/dist/mediapipeShared-CRAKVElv.esm.js +67 -0
- package/dist/{recordingService-CxMJP4tQ.esm.js → onDeviceFaceResults-DVBggeq8.esm.js} +71 -389
- package/dist/{openviduLazy-oAXXI9w_.esm.js → openviduLazy-BTOIauGP.esm.js} +2 -2
- package/dist/openviduLazy-Dov8oKfL.esm.js +3 -0
- package/dist/{permissionGuards-D-Z-lgNj.esm.js → permissionGuards-BR2oN573.esm.js} +1 -1
- package/dist/{permissionServices-CPDboRoE.esm.js → permissionServices-BJhGL13R.esm.js} +7 -4
- package/dist/personhood.d.ts +534 -0
- package/dist/personhood.esm.js +1494 -0
- package/dist/phone.d.ts +5 -4
- package/dist/phone.esm.js +9 -8
- package/dist/{phoneManager-TSq1Ief6.d.ts → phoneManager-BOTcjXgs.d.ts} +3 -3
- package/dist/{phoneManager-Blt4Oc2P.esm.js → phoneManager-BWlxqbyD.esm.js} +5 -4
- package/dist/{phoneStateMachine-W3c6Z8sj.esm.js → phoneStateMachine-B_V9nODs.esm.js} +5 -5
- package/dist/{qe-signature-CQLK6LKE.esm.js → qe-signature-BhFnI9pT.esm.js} +1 -1
- package/dist/qe-signature.d.ts +4 -3
- package/dist/qe-signature.esm.js +10 -9
- package/dist/recordingService-m_1xCthr.esm.js +347 -0
- package/dist/redirect-to-mobile.d.ts +4 -3
- package/dist/redirect-to-mobile.esm.js +9 -8
- package/dist/{redirectToMobileManager-DCvpKdkD.esm.js → redirectToMobileManager-BaAo9rgi.esm.js} +5 -4
- package/dist/{redirectToMobileManager-yOHAmwg-.d.ts → redirectToMobileManager-Br0KZK1G.d.ts} +2 -2
- package/dist/{redirectToMobileStateMachine-DC9z4Vfu.esm.js → redirectToMobileStateMachine-DoAnf2ql.esm.js} +10 -12
- package/dist/{runChildModule-C9G0wfVC.esm.js → runChildModule-0nQfjVVo.esm.js} +3 -3
- package/dist/selfie.d.ts +19 -12
- package/dist/selfie.esm.js +34 -28
- package/dist/{selfieManager-BRL6c_Oc.esm.js → selfieManager-D_ZFERsE.esm.js} +6 -6
- package/dist/{selfieManager-imY2dAcH.d.ts → selfieManager-R0Jw5sjb.d.ts} +3 -3
- package/dist/{selfieStateMachine-D2Q0uwDK.esm.js → selfieStateMachine-CIgeeiN9.esm.js} +4 -4
- package/dist/{session-Be_IA1e0.esm.js → session-9jIfKFCc.esm.js} +3 -3
- package/dist/session.d.ts +7 -5
- package/dist/session.esm.js +16 -14
- package/dist/{sessionInitializer-CaiGA8GP.esm.js → sessionInitializer-C_TYIgyk.esm.js} +11 -107
- package/dist/{setup-BJZAkajt.d.ts → setup-CpRnXxn8.d.ts} +16 -3
- package/dist/setup-DHc6OaHm.esm.js +562 -0
- package/dist/signature.d.ts +3 -2
- package/dist/signature.esm.js +6 -5
- package/dist/{signatureStateMachine-DAxXmMrk.esm.js → signatureStateMachine-DtoiPzys.esm.js} +3 -3
- package/dist/{stats-DntyIiGr.esm.js → stats-CYcScXcO.esm.js} +2 -2
- package/dist/stats.esm.js +3 -3
- package/dist/thumbmarkAdapter-fHBUDlAP.esm.js +1194 -0
- package/dist/{tri-CtxWthxz.esm.js → tri-BG1iJsr4.esm.js} +12 -2
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-CrWAulDi.esm.js → tri.esm-DUC01NgO.esm.js} +27 -23
- package/dist/tri.esm.js +2 -2
- package/dist/trust-graph.d.ts +4 -3
- package/dist/trust-graph.esm.js +4 -3
- package/dist/{types-DpTWgfKY.d.ts → types-BklZ_Wne.d.ts} +1 -1
- package/dist/{types-Dv-9WPJX.d.ts → types-BsYXnC5s.d.ts} +39 -3
- package/dist/types-CxW2e0Ar.d.ts +132 -0
- package/dist/{types-Z9wv19v2.d.ts → types-DgGlgyZT.d.ts} +1 -1
- package/dist/types-ElOJAGaM.esm.js +189 -0
- package/dist/video-C2WIj6TS.esm.js +36 -0
- package/dist/video-selfie.d.ts +351 -0
- package/dist/video-selfie.esm.js +1509 -0
- package/dist/videoSelfieSteps-7M5vxKn-.esm.js +58 -0
- package/dist/{warmup--6HA3yUR.d.ts → warmup-BJZPQIiX.d.ts} +5 -1
- package/dist/wasm.d.ts +4 -4
- package/dist/wasm.esm.js +17 -14
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +6 -5
- package/dist/watchlist.d.ts +2 -1
- package/dist/watchlist.esm.js +6 -5
- package/dist/{watchlistForBusinessStateMachine-DtefJb-D.esm.js → watchlistForBusinessStateMachine-DvEunDxs.esm.js} +3 -3
- package/dist/{watchlistStateMachine-B0aIS2_n.esm.js → watchlistStateMachine-AHXVf-TB.esm.js} +3 -3
- package/dist/workflow.d.ts +230 -98
- package/dist/workflow.esm.js +123 -79
- package/dist/{xstate.esm-Dkm1jy5u.esm.js → xstate.esm-Bomq1a0z.esm.js} +41 -1
- package/package.json +16 -1
- package/dist/IpifyProvider-oZf7Ke1O.esm.js +0 -167
- package/dist/camera-x4LjGTjZ.esm.js +0 -22
- package/dist/deepsightService-ByNKY5Jv.d.ts +0 -276
- package/dist/faceCaptureManagerFactory-CL-7T_vH.d.ts +0 -731
- package/dist/getBrowser-Dv8LZyHE.esm.js +0 -8
- package/dist/openviduLazy-B_s6jnEk.esm.js +0 -3
- package/dist/setup-C7tintPc.esm.js +0 -1064
- /package/dist/{Actor-fIPLXfoi.d.ts → Actor-CGEelYtQ.d.ts} +0 -0
- /package/dist/{BrowserTimerProvider-BVgutW_b.esm.js → BrowserTimerProvider-CHloo0eQ.esm.js} +0 -0
- /package/dist/{ITimerCapability-BvH0pDwp.esm.js → ITimerCapability-pltuG1E8.esm.js} +0 -0
- /package/dist/{MotionSensorProvider-C9fPAJdS.esm.js → MotionSensorProvider-DCbId4De.esm.js} +0 -0
- /package/dist/{apiError-D-GTvFrH.esm.js → apiError-DNS2OCEX.esm.js} +0 -0
- /package/dist/{camera-biGPWlmx.d.ts → camera-CNVUo-bC.d.ts} +0 -0
- /package/dist/{canvas-7uX2izHb.esm.js → canvas-_I95hkPg.esm.js} +0 -0
- /package/dist/{chunk-BK1xu56N.esm.js → chunk-CIKcdghV.esm.js} +0 -0
- /package/dist/{cpf-xBg-DFNn.esm.js → cpf-BKaho0j_.esm.js} +0 -0
- /package/dist/{dateUtils-8dCcuArE.esm.js → dateUtils-7-tQYRNN.esm.js} +0 -0
- /package/dist/{getDeviceClass-C0zrM97a.esm.js → getDeviceClass-DavNdcxh.esm.js} +0 -0
- /package/dist/{http-CfVTgMfU.esm.js → http-BkiUT7EB.esm.js} +0 -0
- /package/dist/{index-52_qi4bd.d.ts → index-XTtxaahe.d.ts} +0 -0
- /package/dist/{otp-D87RTwrx.esm.js → otp-Bfnzf7I3.esm.js} +0 -0
- /package/dist/{otp-BHJnjEEc.d.ts → otp-M4iy57XY.d.ts} +0 -0
- /package/dist/{platform-BfoqeM61.esm.js → platform-uIVQUnJP.esm.js} +0 -0
- /package/dist/{types-BdVOWGGW.esm.js → types-CMcxlSmH.esm.js} +0 -0
- /package/dist/{types-DYZja-k9.d.ts → types-D_IceWxT.d.ts} +0 -0
- /package/dist/{types-F0IXbaCB.d.ts → types-Duy2rDxF.d.ts} +0 -0
- /package/dist/{urlUtils-8RNHyW3x.esm.js → urlUtils-BZqFU9rR.esm.js} +0 -0
package/dist/workflow.esm.js
CHANGED
|
@@ -1,69 +1,77 @@
|
|
|
1
|
-
import "./WasmUtilProvider-
|
|
2
|
-
import "./BrowserTimerProvider-
|
|
3
|
-
import { t as api } from "./api-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import "./browserSimulation-
|
|
9
|
-
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-
|
|
10
|
-
import "./
|
|
11
|
-
import "./
|
|
12
|
-
import "./
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import "./
|
|
16
|
-
import "./
|
|
17
|
-
import
|
|
18
|
-
import "./
|
|
19
|
-
import {
|
|
20
|
-
import "./
|
|
21
|
-
import "./
|
|
22
|
-
import "./
|
|
23
|
-
import "./
|
|
24
|
-
import "./
|
|
25
|
-
import "./
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
28
|
-
import "./
|
|
29
|
-
import "./
|
|
30
|
-
import "./
|
|
31
|
-
import "./
|
|
32
|
-
import "./
|
|
33
|
-
import "./
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import "./
|
|
38
|
-
import
|
|
39
|
-
import "./
|
|
40
|
-
import { t as
|
|
41
|
-
import { t as
|
|
42
|
-
import { t as
|
|
43
|
-
import
|
|
44
|
-
import "./
|
|
45
|
-
import "./
|
|
46
|
-
import "./
|
|
47
|
-
import {
|
|
48
|
-
import { t as
|
|
49
|
-
import "./
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import { t as
|
|
55
|
-
import { t as
|
|
56
|
-
import
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import
|
|
60
|
-
import { t as
|
|
61
|
-
import {
|
|
62
|
-
import { t as
|
|
63
|
-
import "./
|
|
64
|
-
import { t as
|
|
65
|
-
import { t as
|
|
66
|
-
import { t as
|
|
1
|
+
import "./WasmUtilProvider-ADG54T6M.esm.js";
|
|
2
|
+
import "./BrowserTimerProvider-CHloo0eQ.esm.js";
|
|
3
|
+
import { t as api } from "./api-DsbUi7TO.esm.js";
|
|
4
|
+
import { d as addEvent, n as createManagerInstrumentation } from "./events-CqGY1yMq.esm.js";
|
|
5
|
+
import { n as eventModuleNames } from "./types-ElOJAGaM.esm.js";
|
|
6
|
+
import { t as endpoints } from "./endpoints-BzMJFAPV.esm.js";
|
|
7
|
+
import "./stats-CYcScXcO.esm.js";
|
|
8
|
+
import "./browserSimulation-TsSoavQv.esm.js";
|
|
9
|
+
import { n as getSessionFingerprintResult, r as initializeSession } from "./sessionInitializer-C_TYIgyk.esm.js";
|
|
10
|
+
import "./getDeviceData-TrKM8NPh.esm.js";
|
|
11
|
+
import "./thumbmarkAdapter-fHBUDlAP.esm.js";
|
|
12
|
+
import "./IpifyProvider-BRW14_uo.esm.js";
|
|
13
|
+
import "./platform-uIVQUnJP.esm.js";
|
|
14
|
+
import "./tri-BG1iJsr4.esm.js";
|
|
15
|
+
import { a as fromPromise, l as createManager, r as assign, s as createActor, t as setup } from "./xstate.esm-Bomq1a0z.esm.js";
|
|
16
|
+
import "./urlUtils-BZqFU9rR.esm.js";
|
|
17
|
+
import "./externalFetch-CyhBfD-n.esm.js";
|
|
18
|
+
import { n as toIncodeApiError } from "./apiError-DNS2OCEX.esm.js";
|
|
19
|
+
import { n as electronicSignatureMachine } from "./electronicSignatureManager-DjzUzqZj.esm.js";
|
|
20
|
+
import "./ae-signature-DlElqFrZ.esm.js";
|
|
21
|
+
import { t as antifraudMachine } from "./antifraudStateMachine-C0NGnP9W.esm.js";
|
|
22
|
+
import "./faceCaptureSetup-CDUVU1nl.esm.js";
|
|
23
|
+
import "./MotionSensorProvider-DCbId4De.esm.js";
|
|
24
|
+
import "./permissionServices-BJhGL13R.esm.js";
|
|
25
|
+
import "./camera-DUkgmYMo.esm.js";
|
|
26
|
+
import "./onDeviceFaceResults-DVBggeq8.esm.js";
|
|
27
|
+
import "./ITimerCapability-pltuG1E8.esm.js";
|
|
28
|
+
import "./canvas-_I95hkPg.esm.js";
|
|
29
|
+
import "./backCameraStream-ZyqrFyjO.esm.js";
|
|
30
|
+
import "./video-C2WIj6TS.esm.js";
|
|
31
|
+
import "./getDeviceClass-DavNdcxh.esm.js";
|
|
32
|
+
import "./deepsightService-CDahSjGP.esm.js";
|
|
33
|
+
import "./getDeviceClass-DGGzzfqm.esm.js";
|
|
34
|
+
import "./types-CMcxlSmH.esm.js";
|
|
35
|
+
import "./createFaceAvatar-BOHDKQRq.esm.js";
|
|
36
|
+
import "./StreamCanvasCapture-Bz17q4FP.esm.js";
|
|
37
|
+
import "./permissionGuards-BR2oN573.esm.js";
|
|
38
|
+
import "./recordingService-m_1xCthr.esm.js";
|
|
39
|
+
import "./mediaRecorderOptions-C3NAkVgK.esm.js";
|
|
40
|
+
import { t as authenticationMachine } from "./authenticationStateMachine-D-hOlg8p.esm.js";
|
|
41
|
+
import { t as certificateIssuanceMachine } from "./certificateIssuanceStateMachine-C07m7qtP.esm.js";
|
|
42
|
+
import { t as consentMachine } from "./consentStateMachine-DO2JqoZW.esm.js";
|
|
43
|
+
import "./cpf-BKaho0j_.esm.js";
|
|
44
|
+
import { t as curpValidationMachine } from "./curpValidationStateMachine-DXTPK6vI.esm.js";
|
|
45
|
+
import "./dateUtils-7-tQYRNN.esm.js";
|
|
46
|
+
import { t as customWatchlistMachine } from "./customWatchlistStateMachine-B4G3Chkx.esm.js";
|
|
47
|
+
import { t as documentCaptureMachine } from "./documentCaptureStateMachine-DSOX2epf.esm.js";
|
|
48
|
+
import { t as dynamicFormsMachine } from "./dynamicFormsStateMachine-BXHcaocI.esm.js";
|
|
49
|
+
import { n as toEkybConfig, t as ekybMachine } from "./ekybStateMachine-CCSeqjCt.esm.js";
|
|
50
|
+
import "./addressSearch-DJyNTg5S.esm.js";
|
|
51
|
+
import "./session-9jIfKFCc.esm.js";
|
|
52
|
+
import "./videoSelfieSteps-7M5vxKn-.esm.js";
|
|
53
|
+
import "./flowServices-C4piblgx.esm.js";
|
|
54
|
+
import { n as toEkycConfig, t as ekycMachine } from "./ekycStateMachine-DkLVTOyA.esm.js";
|
|
55
|
+
import { t as emailMachine } from "./emailStateMachine-fqJ42b19.esm.js";
|
|
56
|
+
import "./otp-Bfnzf7I3.esm.js";
|
|
57
|
+
import { t as selfieMachine } from "./selfieStateMachine-CIgeeiN9.esm.js";
|
|
58
|
+
import { t as idCaptureMachine } from "./idCaptureStateMachine-BeDidMLU.esm.js";
|
|
59
|
+
import "./idCaptureDefaults-DNJON8Xo.esm.js";
|
|
60
|
+
import { t as phoneMachine } from "./phoneStateMachine-B_V9nODs.esm.js";
|
|
61
|
+
import { n as identityReuseMachine } from "./identityReuseStateMachine-BmONeF6B.esm.js";
|
|
62
|
+
import { t as mandatoryConsentMachine } from "./mandatoryConsentStateMachine-DkJJLHqC.esm.js";
|
|
63
|
+
import { t as idOcrStateMachine } from "./idOcrStateMachine-DRZc4FBl.esm.js";
|
|
64
|
+
import { t as redirectToMobileMachine } from "./redirectToMobileStateMachine-DoAnf2ql.esm.js";
|
|
65
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-BYfOOOG0.esm.js";
|
|
66
|
+
import { t as faceMatchMachine } from "./faceMatchStateMachine-DUeUjEPx.esm.js";
|
|
67
|
+
import { n as getFinishStatus, r as getTotalScoreStatus } from "./flowCompletionService-qEqh_g14.esm.js";
|
|
68
|
+
import { n as isAdvanceableError, r as attachFlowEventEmitter, t as runChildModule } from "./runChildModule-0nQfjVVo.esm.js";
|
|
69
|
+
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-CwoPPO8b.esm.js";
|
|
70
|
+
import { t as idVerificationMachine } from "./idVerificationStateMachine-oqiERKpg.esm.js";
|
|
71
|
+
import "./qe-signature-BhFnI9pT.esm.js";
|
|
72
|
+
import { t as signatureMachine } from "./signatureStateMachine-DtoiPzys.esm.js";
|
|
73
|
+
import { t as watchlistMachine } from "./watchlistStateMachine-AHXVf-TB.esm.js";
|
|
74
|
+
import { t as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-DvEunDxs.esm.js";
|
|
67
75
|
|
|
68
76
|
//#region src/internal/orchestration/defaultModules.ts
|
|
69
77
|
/**
|
|
@@ -332,6 +340,9 @@ const workflowMachine = setup({
|
|
|
332
340
|
notifyBackend: fromPromise(async ({ input, signal }) => {
|
|
333
341
|
return input.getFinishStatus(input.workflowId, signal);
|
|
334
342
|
}),
|
|
343
|
+
resolveScore: fromPromise(async ({ input, signal }) => {
|
|
344
|
+
return input.getTotalScoreStatus(signal);
|
|
345
|
+
}),
|
|
335
346
|
runChildModule
|
|
336
347
|
},
|
|
337
348
|
actions: {
|
|
@@ -359,6 +370,7 @@ const workflowMachine = setup({
|
|
|
359
370
|
}),
|
|
360
371
|
setResolvedMachine: assign(({ event }) => ({ resolvedMachine: event.output })),
|
|
361
372
|
setFinishStatus: assign(({ event }) => ({ finishStatus: event.output })),
|
|
373
|
+
setTotalScoreStatus: assign(({ event }) => ({ totalScoreStatus: event.output })),
|
|
362
374
|
setFinishStatusFailed: assign({ moduleErrorCode: "FINISH_STATUS_FAILED" }),
|
|
363
375
|
setError: assign(({ event }) => {
|
|
364
376
|
const { message, code } = extractErrorInfo(event.error);
|
|
@@ -400,6 +412,8 @@ const workflowMachine = setup({
|
|
|
400
412
|
},
|
|
401
413
|
isOnboardingFinishedSignal: ({ event }) => event.output?.action === "onboardingFinished",
|
|
402
414
|
isAdvanceableModuleError: ({ event }) => isAdvanceableError(event.moduleErrorCode),
|
|
415
|
+
shouldResolveScore: ({ context }) => context.workflowConfig?.showFinishScreenBySessionStatus === true,
|
|
416
|
+
isOnboardingFinishedWithStatusScreen: ({ context, event }) => event.output?.action === "onboardingFinished" && context.workflowConfig?.showFinishScreenBySessionStatus === true,
|
|
403
417
|
shouldEnterHome: ({ event }) => {
|
|
404
418
|
const result = event.output;
|
|
405
419
|
if (!result || result.currentNode.nodeType !== "MODULE") return false;
|
|
@@ -422,12 +436,14 @@ const workflowMachine = setup({
|
|
|
422
436
|
registeredModules: input.modules,
|
|
423
437
|
configMappers: input.configMappers ?? {},
|
|
424
438
|
finishStatus: void 0,
|
|
439
|
+
totalScoreStatus: void 0,
|
|
425
440
|
customModuleCallback: input.customModuleCallback,
|
|
426
441
|
interviewId: input.interviewId ?? "",
|
|
427
442
|
isDesktop: input.isDesktop ?? true,
|
|
428
443
|
isInjectedNode: false,
|
|
429
444
|
isHomeContinueLoading: false,
|
|
430
|
-
getFinishStatus: input.getFinishStatus ?? getFinishStatus
|
|
445
|
+
getFinishStatus: input.getFinishStatus ?? getFinishStatus,
|
|
446
|
+
getTotalScoreStatus: input.getTotalScoreStatus ?? getTotalScoreStatus
|
|
431
447
|
}),
|
|
432
448
|
states: {
|
|
433
449
|
idle: { on: { LOAD: "loading" } },
|
|
@@ -505,10 +521,17 @@ const workflowMachine = setup({
|
|
|
505
521
|
}
|
|
506
522
|
},
|
|
507
523
|
on: {
|
|
508
|
-
MODULE_COMPLETE: [
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
524
|
+
MODULE_COMPLETE: [
|
|
525
|
+
{
|
|
526
|
+
target: "resolvingScore",
|
|
527
|
+
guard: "isOnboardingFinishedWithStatusScreen"
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
target: "finished",
|
|
531
|
+
guard: "isOnboardingFinishedSignal"
|
|
532
|
+
},
|
|
533
|
+
{ target: "processingNode" }
|
|
534
|
+
],
|
|
512
535
|
MODULE_ERROR: [{
|
|
513
536
|
guard: "isAdvanceableModuleError",
|
|
514
537
|
target: "processingNode",
|
|
@@ -518,7 +541,10 @@ const workflowMachine = setup({
|
|
|
518
541
|
actions: "setModuleError"
|
|
519
542
|
}],
|
|
520
543
|
COMPLETE_FLOW: "completing",
|
|
521
|
-
FINISH_WORKFLOW:
|
|
544
|
+
FINISH_WORKFLOW: [{
|
|
545
|
+
target: "resolvingScore",
|
|
546
|
+
guard: "shouldResolveScore"
|
|
547
|
+
}, { target: "finished" }]
|
|
522
548
|
}
|
|
523
549
|
},
|
|
524
550
|
handlingCustomModule: { invoke: {
|
|
@@ -593,7 +619,7 @@ const workflowMachine = setup({
|
|
|
593
619
|
src: "notifyBackend",
|
|
594
620
|
input: ({ context }) => ({
|
|
595
621
|
getFinishStatus: context.getFinishStatus,
|
|
596
|
-
workflowId: context.workflowConfig?.id
|
|
622
|
+
workflowId: context.currentNode?.workflowId ?? context.workflowConfig?.id
|
|
597
623
|
}),
|
|
598
624
|
onDone: {
|
|
599
625
|
target: "finished",
|
|
@@ -604,6 +630,16 @@ const workflowMachine = setup({
|
|
|
604
630
|
actions: ["setError", "setFinishStatusFailed"]
|
|
605
631
|
}
|
|
606
632
|
} },
|
|
633
|
+
resolvingScore: { invoke: {
|
|
634
|
+
id: "resolveScore",
|
|
635
|
+
src: "resolveScore",
|
|
636
|
+
input: ({ context }) => ({ getTotalScoreStatus: context.getTotalScoreStatus }),
|
|
637
|
+
onDone: {
|
|
638
|
+
target: "finished",
|
|
639
|
+
actions: "setTotalScoreStatus"
|
|
640
|
+
},
|
|
641
|
+
onError: { target: "finished" }
|
|
642
|
+
} },
|
|
607
643
|
finished: { type: "final" },
|
|
608
644
|
asyncResolution: { type: "final" },
|
|
609
645
|
closed: { type: "final" },
|
|
@@ -681,17 +717,21 @@ function mapState(snapshot) {
|
|
|
681
717
|
homeScreen
|
|
682
718
|
};
|
|
683
719
|
}
|
|
684
|
-
if (snapshot.matches("finished"))
|
|
685
|
-
|
|
686
|
-
workflowConfig: context.workflowConfig,
|
|
687
|
-
finishStatus: context.finishStatus ?? {
|
|
720
|
+
if (snapshot.matches("finished")) {
|
|
721
|
+
const finishStatus = context.finishStatus ?? {
|
|
688
722
|
redirectionUrl: "",
|
|
689
723
|
action: "none",
|
|
690
724
|
scoreStatus: "UNKNOWN",
|
|
691
725
|
endScreenTitle: null,
|
|
692
726
|
endScreenText: null
|
|
693
|
-
}
|
|
694
|
-
|
|
727
|
+
};
|
|
728
|
+
return {
|
|
729
|
+
status: "finished",
|
|
730
|
+
workflowConfig: context.workflowConfig,
|
|
731
|
+
finishStatus,
|
|
732
|
+
scoreStatus: context.totalScoreStatus ?? finishStatus.scoreStatus
|
|
733
|
+
};
|
|
734
|
+
}
|
|
695
735
|
if (snapshot.matches("asyncResolution")) return {
|
|
696
736
|
status: "asyncResolution",
|
|
697
737
|
workflowConfig: context.workflowConfig,
|
|
@@ -704,6 +744,10 @@ function mapState(snapshot) {
|
|
|
704
744
|
errorCode: context.errorCode,
|
|
705
745
|
moduleErrorCode: context.moduleErrorCode
|
|
706
746
|
};
|
|
747
|
+
if (snapshot.matches("completing")) return {
|
|
748
|
+
status: "completing",
|
|
749
|
+
homeScreen
|
|
750
|
+
};
|
|
707
751
|
return {
|
|
708
752
|
status: "loading",
|
|
709
753
|
homeScreen
|
|
@@ -1133,6 +1133,46 @@ function stopChild(actorRef) {
|
|
|
1133
1133
|
stop$1.execute = executeStop;
|
|
1134
1134
|
return stop$1;
|
|
1135
1135
|
}
|
|
1136
|
+
function checkNot(snapshot, { context, event }, { guards }) {
|
|
1137
|
+
return !evaluateGuard(guards[0], context, event, snapshot);
|
|
1138
|
+
}
|
|
1139
|
+
/**
|
|
1140
|
+
* Higher-order guard that evaluates to `true` if the `guard` passed to it
|
|
1141
|
+
* evaluates to `false`.
|
|
1142
|
+
*
|
|
1143
|
+
* @category Guards
|
|
1144
|
+
* @example
|
|
1145
|
+
*
|
|
1146
|
+
* ```ts
|
|
1147
|
+
* import { setup, not } from 'xstate';
|
|
1148
|
+
*
|
|
1149
|
+
* const machine = setup({
|
|
1150
|
+
* guards: {
|
|
1151
|
+
* someNamedGuard: () => false
|
|
1152
|
+
* }
|
|
1153
|
+
* }).createMachine({
|
|
1154
|
+
* on: {
|
|
1155
|
+
* someEvent: {
|
|
1156
|
+
* guard: not('someNamedGuard'),
|
|
1157
|
+
* actions: () => {
|
|
1158
|
+
* // will be executed if guard in `not(...)`
|
|
1159
|
+
* // evaluates to `false`
|
|
1160
|
+
* }
|
|
1161
|
+
* }
|
|
1162
|
+
* }
|
|
1163
|
+
* });
|
|
1164
|
+
* ```
|
|
1165
|
+
*
|
|
1166
|
+
* @returns A guard
|
|
1167
|
+
*/
|
|
1168
|
+
function not(guard) {
|
|
1169
|
+
function not$1(_args, _params) {
|
|
1170
|
+
return false;
|
|
1171
|
+
}
|
|
1172
|
+
not$1.check = checkNot;
|
|
1173
|
+
not$1.guards = [guard];
|
|
1174
|
+
return not$1;
|
|
1175
|
+
}
|
|
1136
1176
|
function checkAnd(snapshot, { context, event }, { guards }) {
|
|
1137
1177
|
return guards.every((guard) => evaluateGuard(guard, context, event, snapshot));
|
|
1138
1178
|
}
|
|
@@ -3410,4 +3450,4 @@ function setup({ schemas, actors, actions, guards, delays }) {
|
|
|
3410
3450
|
}
|
|
3411
3451
|
|
|
3412
3452
|
//#endregion
|
|
3413
|
-
export { fromPromise as a,
|
|
3453
|
+
export { fromPromise as a, not as c, fromCallback as i, createManager as l, sendTo as n, and as o, assign as r, createActor as s, setup as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@incodetech/core",
|
|
3
|
-
"version": "2.1.0-rc.
|
|
3
|
+
"version": "2.1.0-rc.3",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/IncodeTechnologies/incode-web-sdk.git"
|
|
@@ -29,11 +29,26 @@
|
|
|
29
29
|
"types": "./dist/flow-events.d.ts",
|
|
30
30
|
"import": "./dist/flow-events.esm.js"
|
|
31
31
|
},
|
|
32
|
+
"./avatar": {
|
|
33
|
+
"source": "./src/modules/avatar/index.ts",
|
|
34
|
+
"types": "./dist/avatar.d.ts",
|
|
35
|
+
"import": "./dist/avatar.esm.js"
|
|
36
|
+
},
|
|
32
37
|
"./selfie": {
|
|
33
38
|
"source": "./src/modules/selfie/index.ts",
|
|
34
39
|
"types": "./dist/selfie.d.ts",
|
|
35
40
|
"import": "./dist/selfie.esm.js"
|
|
36
41
|
},
|
|
42
|
+
"./video-selfie": {
|
|
43
|
+
"source": "./src/modules/video-selfie/index.ts",
|
|
44
|
+
"types": "./dist/video-selfie.d.ts",
|
|
45
|
+
"import": "./dist/video-selfie.esm.js"
|
|
46
|
+
},
|
|
47
|
+
"./personhood": {
|
|
48
|
+
"source": "./src/modules/personhood/index.ts",
|
|
49
|
+
"types": "./dist/personhood.d.ts",
|
|
50
|
+
"import": "./dist/personhood.esm.js"
|
|
51
|
+
},
|
|
37
52
|
"./authentication": {
|
|
38
53
|
"source": "./src/modules/authentication/index.ts",
|
|
39
54
|
"types": "./dist/authentication.d.ts",
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
//#region ../infra/src/providers/browser/BrowserEnvironmentProvider.ts
|
|
2
|
-
var BrowserEnvironmentProvider = class {
|
|
3
|
-
getScreenDimensions() {
|
|
4
|
-
if (typeof screen === "undefined") return {
|
|
5
|
-
width: 0,
|
|
6
|
-
height: 0
|
|
7
|
-
};
|
|
8
|
-
return {
|
|
9
|
-
width: screen.width,
|
|
10
|
-
height: screen.height
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
generateCanvasFingerprint() {
|
|
14
|
-
try {
|
|
15
|
-
if (typeof document === "undefined") return "";
|
|
16
|
-
const canvas = document.createElement("canvas");
|
|
17
|
-
const ctx = canvas.getContext("2d");
|
|
18
|
-
if (!ctx) return "";
|
|
19
|
-
ctx.textBaseline = "top";
|
|
20
|
-
ctx.font = "14px Arial";
|
|
21
|
-
ctx.fillText("fingerprint", 2, 2);
|
|
22
|
-
return canvas.toDataURL().slice(-50);
|
|
23
|
-
} catch {
|
|
24
|
-
return "";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
getWebGLRenderer() {
|
|
28
|
-
try {
|
|
29
|
-
if (typeof document === "undefined") return "";
|
|
30
|
-
const canvas = document.createElement("canvas");
|
|
31
|
-
const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
|
|
32
|
-
if (!gl) return "";
|
|
33
|
-
const debugInfo = gl.getExtension("WEBGL_debug_renderer_info");
|
|
34
|
-
if (!debugInfo) return "";
|
|
35
|
-
return gl.getParameter(debugInfo.UNMASKED_RENDERER_WEBGL) || "";
|
|
36
|
-
} catch {
|
|
37
|
-
return "";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
getWindowProperty(prop) {
|
|
41
|
-
if (typeof window === "undefined") return;
|
|
42
|
-
return window[prop];
|
|
43
|
-
}
|
|
44
|
-
getNavigatorProperty(prop) {
|
|
45
|
-
if (typeof navigator === "undefined") return;
|
|
46
|
-
return navigator[prop];
|
|
47
|
-
}
|
|
48
|
-
getNavigatorPrefixes() {
|
|
49
|
-
if (typeof navigator === "undefined") return {
|
|
50
|
-
webkit: false,
|
|
51
|
-
moz: false,
|
|
52
|
-
o: false,
|
|
53
|
-
ms: false
|
|
54
|
-
};
|
|
55
|
-
const nav = navigator;
|
|
56
|
-
return {
|
|
57
|
-
webkit: nav.webkitGetUserMedia !== void 0,
|
|
58
|
-
moz: nav.mozGetUserMedia !== void 0,
|
|
59
|
-
o: nav.oGetUserMedia !== void 0,
|
|
60
|
-
ms: nav.msGetUserMedia !== void 0
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
getMaxTouchPoints() {
|
|
64
|
-
if (typeof navigator === "undefined") return 0;
|
|
65
|
-
return navigator.maxTouchPoints;
|
|
66
|
-
}
|
|
67
|
-
hasOnTouchStart() {
|
|
68
|
-
if (typeof window !== "undefined" && "ontouchstart" in window) return true;
|
|
69
|
-
if (typeof document !== "undefined") return "ontouchstart" in document.documentElement;
|
|
70
|
-
return false;
|
|
71
|
-
}
|
|
72
|
-
getNavigatorProductSub() {
|
|
73
|
-
if (typeof navigator === "undefined") return;
|
|
74
|
-
return navigator.productSub;
|
|
75
|
-
}
|
|
76
|
-
getEvalToStringLength() {
|
|
77
|
-
return eval.toString().length;
|
|
78
|
-
}
|
|
79
|
-
tryFirefoxToSource() {
|
|
80
|
-
try {
|
|
81
|
-
throw "a";
|
|
82
|
-
} catch (err) {
|
|
83
|
-
try {
|
|
84
|
-
err.toSource();
|
|
85
|
-
return true;
|
|
86
|
-
} catch {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
async fetchJson(url, timeoutMs = 3e3) {
|
|
92
|
-
try {
|
|
93
|
-
if (typeof fetch === "undefined") return null;
|
|
94
|
-
const controller = new AbortController();
|
|
95
|
-
const timeoutId = setTimeout(() => controller.abort(), timeoutMs);
|
|
96
|
-
const response = await fetch(url, { signal: controller.signal });
|
|
97
|
-
clearTimeout(timeoutId);
|
|
98
|
-
return await response.json();
|
|
99
|
-
} catch {
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
async enumerateVideoDeviceLabels() {
|
|
104
|
-
try {
|
|
105
|
-
if (typeof navigator === "undefined" || !navigator.mediaDevices?.enumerateDevices) return [];
|
|
106
|
-
return (await navigator.mediaDevices.enumerateDevices()).filter((device) => device.kind === "videoinput").map((device) => device.label);
|
|
107
|
-
} catch {
|
|
108
|
-
return [];
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
getTimestamp() {
|
|
112
|
-
return Date.now();
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
//#endregion
|
|
117
|
-
//#region ../infra/src/providers/browser/IpifyProvider.ts
|
|
118
|
-
let cachedIp;
|
|
119
|
-
let inFlightLookup;
|
|
120
|
-
/**
|
|
121
|
-
* Resets the module-level IP cache. Intended for tests and full session resets.
|
|
122
|
-
*/
|
|
123
|
-
function resetIpifyCache() {
|
|
124
|
-
cachedIp = void 0;
|
|
125
|
-
inFlightLookup = void 0;
|
|
126
|
-
}
|
|
127
|
-
async function fetchIpFromIpify() {
|
|
128
|
-
if (typeof fetch === "undefined") return "";
|
|
129
|
-
let timeoutId = 0;
|
|
130
|
-
const controller = new AbortController();
|
|
131
|
-
if (AbortSignal.timeout) {
|
|
132
|
-
const signal = AbortSignal.timeout(3e3);
|
|
133
|
-
return (await (await fetch("https://api.ipify.org?format=json", { signal })).json()).ip;
|
|
134
|
-
}
|
|
135
|
-
const timeoutPromise = new Promise((_, reject) => {
|
|
136
|
-
timeoutId = setTimeout(() => {
|
|
137
|
-
controller.abort();
|
|
138
|
-
reject(/* @__PURE__ */ new Error("Request timeout"));
|
|
139
|
-
}, 3e3);
|
|
140
|
-
});
|
|
141
|
-
const fetchPromise = fetch("https://api.ipify.org?format=json", { signal: controller.signal }).then((res) => res.json()).then((data) => data.ip);
|
|
142
|
-
const result = await Promise.race([fetchPromise, timeoutPromise]);
|
|
143
|
-
clearTimeout(timeoutId);
|
|
144
|
-
return result;
|
|
145
|
-
}
|
|
146
|
-
var IpifyProvider = class {
|
|
147
|
-
async getIp() {
|
|
148
|
-
if (cachedIp !== void 0) return cachedIp;
|
|
149
|
-
if (inFlightLookup) return inFlightLookup;
|
|
150
|
-
inFlightLookup = (async () => {
|
|
151
|
-
try {
|
|
152
|
-
const ip = await fetchIpFromIpify();
|
|
153
|
-
cachedIp = ip;
|
|
154
|
-
return ip;
|
|
155
|
-
} catch {
|
|
156
|
-
cachedIp = "";
|
|
157
|
-
return "";
|
|
158
|
-
} finally {
|
|
159
|
-
inFlightLookup = void 0;
|
|
160
|
-
}
|
|
161
|
-
})();
|
|
162
|
-
return inFlightLookup;
|
|
163
|
-
}
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
//#endregion
|
|
167
|
-
export { resetIpifyCache as n, BrowserEnvironmentProvider as r, IpifyProvider as t };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region ../infra/src/media/camera.ts
|
|
2
|
-
/**
|
|
3
|
-
* Request camera access with specific constraints.
|
|
4
|
-
* Throws if the request fails - no automatic fallback.
|
|
5
|
-
*/
|
|
6
|
-
async function requestCameraAccess(constraints) {
|
|
7
|
-
if (typeof navigator === "undefined" || !navigator.mediaDevices) throw new Error("MediaDevices API not available");
|
|
8
|
-
return navigator.mediaDevices.getUserMedia(constraints);
|
|
9
|
-
}
|
|
10
|
-
function stopCameraStream(stream) {
|
|
11
|
-
for (const track of stream.getTracks()) track.stop();
|
|
12
|
-
}
|
|
13
|
-
async function enumerateVideoDevices() {
|
|
14
|
-
if (typeof navigator === "undefined" || !navigator.mediaDevices) return [];
|
|
15
|
-
return (await navigator.mediaDevices.enumerateDevices()).filter((d) => d.kind === "videoinput");
|
|
16
|
-
}
|
|
17
|
-
async function applyTrackConstraints(track, constraints) {
|
|
18
|
-
await track.applyConstraints(constraints);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
//#endregion
|
|
22
|
-
export { stopCameraStream as i, enumerateVideoDevices as n, requestCameraAccess as r, applyTrackConstraints as t };
|