@incodetech/core 2.5.0-agentic → 2.5.0-agentic.2
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/{FaceDetectionProvider-Dv9iXub0.esm.js → FaceDetectionProvider-ClZEDaLF.esm.js} +9 -9
- package/dist/{IIdCaptureCapability-CAxToGns.d.ts → IIdCaptureCapability-BRAZQtkM.d.ts} +1 -0
- package/dist/{MotionSensorProvider-X4_2eBGd.esm.js → MotionSensorProvider-BAGydZPH.esm.js} +5 -0
- package/dist/{WasmUtilProvider-DVFDFlIL.esm.js → WasmUtilProvider-C4x5gc1c.esm.js} +2 -2
- package/dist/{definitionSource-B-Z2EgJJ.esm.js → addressSearch-DBJeg_g3.esm.js} +76 -9
- package/dist/ae-signature.esm.js +1 -1
- package/dist/{phoneFormat-C3q0Ukh4.esm.js → allowedCharacters-Bnir--CN.esm.js} +1 -11
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-BI2zr7YX.esm.js → antifraudManager-DRMBLSh7.esm.js} +3 -3
- package/dist/{antifraudStateMachine-TWUu8wLN.esm.js → antifraudStateMachine-Bi0m60oV.esm.js} +1 -1
- package/dist/{api-BNxrW8xK.esm.js → api-B58edv6M.esm.js} +0 -1
- package/dist/{apiError-BAfdBGxH.esm.js → apiError-CWjo9dzH.esm.js} +1 -1
- package/dist/{attemptCarry-DWM8lV9V.esm.js → attemptCarry-CxiYlUAO.esm.js} +1 -1
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BJElkTsj.d.ts → authenticationManager-CkD0JR7Q.d.ts} +1 -1
- package/dist/{authenticationManager-DFzByAYo.esm.js → authenticationManager-D_qFuB3y.esm.js} +6 -6
- package/dist/{authenticationStateMachine-CKTOhwwc.esm.js → authenticationStateMachine-DJJWTDZS.esm.js} +3 -3
- package/dist/{browser-pQZA35G2-CG3C-xGt.esm.js → browser-pQZA35G2-B4Dwja1e.esm.js} +1 -1
- package/dist/{calendarDate-DcqGuEht.esm.js → calendarDate-D2zWfUlA.esm.js} +1 -1
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-P44yBRop.esm.js → certificateIssuanceManager-Ctj6AJC7.esm.js} +3 -3
- package/dist/{certificateIssuanceStateMachine-BPBrILt6.esm.js → certificateIssuanceStateMachine-DDqN9kvL.esm.js} +1 -1
- package/dist/{cnpj-Bl_olpdX.esm.js → cnpj-CVq3vL39.esm.js} +1 -9
- package/dist/cnpj-D5cxwIe-.esm.js +9 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-Duzd8paN.d.ts → consentManager-B0YKqYtZ.d.ts} +5 -5
- package/dist/{consentManager-D43w2ms-.esm.js → consentManager-CyoeiABc.esm.js} +3 -3
- package/dist/{consentStateMachine-CLK8PfM4.esm.js → consentStateMachine-BTUrAslr.esm.js} +1 -1
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cag_bcyW.esm.js → crossDocumentDataMatchManager-cmQmp7Bi.esm.js} +3 -3
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-C6WmQToS.esm.js → curpValidationManager-EW44fVpH.esm.js} +3 -3
- package/dist/{curpValidationManager-CmL52FU8.d.ts → curpValidationManager-HOidAKvT.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-BbJ4YAzE.esm.js → curpValidationStateMachine-BFkt90Zs.esm.js} +3 -3
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-BBy6X9nh.esm.js → customFieldsManager-DPMBJrcH.esm.js} +4 -4
- package/dist/{customWatchlistManager-CtBMy2EF.esm.js → customWatchlistManager-DiYpPjZx.esm.js} +3 -3
- package/dist/{customWatchlistStateMachine-SS2ssNCg.esm.js → customWatchlistStateMachine-D7VxQggF.esm.js} +1 -1
- package/dist/{deepsightCaptureConfig-Nm_K8twx.esm.js → deepsightCaptureConfig-XPx0BN30.esm.js} +2 -2
- package/dist/{deepsightLoader-BInnND1H.esm.js → deepsightLoader-Bvs8HYaK.esm.js} +7 -7
- package/dist/definitionSource-B9WTvQb9.esm.js +30 -0
- package/dist/{desktopCameraElection-JNBOXqvK.esm.js → desktopCameraElection-CdrLiJTn.esm.js} +8 -8
- package/dist/document-capture.esm.js +2 -2
- package/dist/document-signature.esm.js +3 -3
- package/dist/{documentCaptureManager-CGDtkfWj.esm.js → documentCaptureManager-SRG6YEMh.esm.js} +3 -3
- package/dist/{documentCaptureStateMachine-flAt9D4q.esm.js → documentCaptureStateMachine-Bh0uyfGq.esm.js} +4 -4
- package/dist/{documentSignatureStateMachine-DrRyICFT.esm.js → documentSignatureStateMachine-oqU3EPca.esm.js} +4 -4
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-CxLq2KzT.esm.js → dynamicFormsManager-YGL7Avp-.esm.js} +3 -3
- package/dist/{dynamicFormsStateMachine-By-maT_4.esm.js → dynamicFormsStateMachine-BE_WfmVE.esm.js} +3 -3
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-CE19Pcdb.esm.js → ekybManager-35NxvxZK.esm.js} +3 -3
- package/dist/{ekybManager-BflWuTe4.d.ts → ekybManager-Cjk8pQX0.d.ts} +2 -2
- package/dist/{ekybStateMachine-q7JQ-x9l.esm.js → ekybStateMachine-BD4zpC3O.esm.js} +141 -10
- package/dist/{ekybUtils-Z9MhFAer.esm.js → ekybUtils-Dl0MU-ib.esm.js} +23 -1
- package/dist/ekyc-prefill.d.ts +5 -5
- package/dist/ekyc-prefill.esm.js +2 -2
- package/dist/ekyc.d.ts +3 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-p3uenUEi.esm.js → ekycManager-D2K8AaMV.esm.js} +3 -3
- package/dist/{ekycManager-BKVQazAb.d.ts → ekycManager-DusmB-4j.d.ts} +2 -2
- package/dist/{ekycPrefillManager-BcLhkpp8.d.ts → ekycPrefillManager-BwmPXfhY.d.ts} +12 -12
- package/dist/{ekycPrefillManager-gPX3XE7u.esm.js → ekycPrefillManager-CxzjSch2.esm.js} +6 -7
- package/dist/ekycPrefillStateMachine-x6skDqhq.esm.js +1289 -0
- package/dist/{ekycStateMachine-D0NAHzS7.esm.js → ekycStateMachine-6EKndBd7.esm.js} +740 -230
- package/dist/{ekycUtils-DEvtEyBI.esm.js → ekycUtils-C6HZB46m.esm.js} +37 -6
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-C1M-Yxf2.esm.js → electronicSignatureManager-BYJHywZK.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-DWnhEsUf.esm.js → emailManager-BBdRYLtH.esm.js} +3 -3
- package/dist/{emailStateMachine--T9PHflK.esm.js → emailStateMachine-DO7lWYvn.esm.js} +2 -2
- package/dist/{events-ChMS-UzR.esm.js → events-PUWyizJn.esm.js} +2 -2
- package/dist/events.d.ts +0 -3
- package/dist/events.esm.js +2 -2
- package/dist/extensibility.d.ts +15 -15
- package/dist/extensibility.esm.js +36 -36
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-18QW0lmV.esm.js → faceCaptureManagerFactory-CYr2rVEj.esm.js} +6 -6
- package/dist/{faceCaptureManagerFactory-CHqmyOjM.d.ts → faceCaptureManagerFactory-D1EJw36F.d.ts} +3 -3
- package/dist/{faceCaptureSetup-CFToXwHy.esm.js → faceCaptureSetup-DadLKnMf.esm.js} +20 -12
- package/dist/{faceMatchManager-DIStK4qi.esm.js → faceMatchManager-nBvS9z0o.esm.js} +3 -3
- package/dist/{faceMatchStateMachine-DagrRdo2.esm.js → faceMatchStateMachine-48O8j_Lx.esm.js} +2 -2
- package/dist/{feature-management-BlscKbeV.esm.js → feature-management-CUzbPq54.esm.js} +1 -1
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-BnWBtMN7.esm.js → fieldComparisonManager-B1ipvtnp.esm.js} +3 -3
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-BxXaLhin.esm.js → fiscalQrManager-yecjuXV4.esm.js} +3 -3
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +7 -7
- package/dist/flow.esm.js +5 -5
- package/dist/{flowCompletionService-DNLssMAg.esm.js → flowCompletionService-BSiUcHmU.esm.js} +2 -2
- package/dist/{flowServices-Bzq3piUR.esm.js → flowServices-BIMnpB8Q.esm.js} +9 -9
- package/dist/formErrors-lSfh7Y8J.esm.js +512 -0
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-DoLbpx5e.esm.js → geolocationManager-D7J-rLJp.esm.js} +3 -3
- package/dist/{geolocationStateMachine-d5_E7gAm.esm.js → geolocationStateMachine-5g2Quxbz.esm.js} +3 -3
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-CaZxyEOO.esm.js → governmentValidationManager-0-L21hu6.esm.js} +3 -3
- package/dist/{governmentValidationStateMachine-DeHHhlcf.esm.js → governmentValidationStateMachine-BFIcq3UB.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +2 -2
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +19 -3
- package/dist/id-selfie-flow.d.ts +2 -2
- package/dist/id-selfie-flow.esm.js +8 -8
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -3
- package/dist/id.esm.js +3 -3
- package/dist/{idCaptureDefaults-R3rHuTOE.esm.js → idCaptureDefaults-CNopPetU.esm.js} +16 -6
- package/dist/{idCaptureManager-CgkQW3Xc.d.ts → idCaptureManager-CNFBeYgV.d.ts} +20 -5
- package/dist/{idCaptureManager-D_YGMeCW.esm.js → idCaptureManager-Du5jr3gJ.esm.js} +24 -18
- package/dist/{idCaptureServices-CP6AxsFW.esm.js → idCaptureServices-N0sn1AOF.esm.js} +5 -5
- package/dist/{idCaptureStateMachine-BdBtGQZP.esm.js → idCaptureStateMachine-CHk0uv1U.esm.js} +191 -44
- package/dist/{idOcrManager-C0C7lFGd.d.ts → idOcrManager-DflRx-_u.d.ts} +1 -1
- package/dist/{idOcrManager-XTbpfHoF.esm.js → idOcrManager-bjBLjrEE.esm.js} +3 -3
- package/dist/{idOcrStateMachine-B-00PgPh.esm.js → idOcrStateMachine-D5ifJ1B8.esm.js} +2 -2
- package/dist/{idVerificationManager-B4NYLlUl.esm.js → idVerificationManager-C8Ja-vKq.esm.js} +3 -3
- package/dist/{idVerificationStateMachine-B48Ikl-7.esm.js → idVerificationStateMachine-BMnfZZli.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/identity-search.esm.js +2 -2
- package/dist/{identityReuseManager-tFeYm_So.esm.js → identityReuseManager-B5BWAleT.esm.js} +3 -3
- package/dist/{identityReuseStateMachine-Ckf39qFu.esm.js → identityReuseStateMachine-Cuggm1UP.esm.js} +1 -1
- package/dist/{index-CoePktWH.d.ts → index-BoGlwLGK.d.ts} +1 -1
- package/dist/{index-CNck5TLp.d.ts → index-bsGvWr9-.d.ts} +21 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DNQX9k5e.esm.js → invokeOnCaptureCallback-D2FOfi4O.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -3
- package/dist/kyb-checks.esm.js +2 -2
- package/dist/{kybChecksManager-DP76y-Qz.esm.js → kybChecksManager-CDxP2pYP.esm.js} +2 -2
- package/dist/{kybChecksManager-B7Di9auB.d.ts → kybChecksManager-CKDy1mel.d.ts} +1 -1
- package/dist/{kybChecksStateMachine-OKLT8Zoc.esm.js → kybChecksStateMachine-ZOKNXTUx.esm.js} +176 -179
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-kzr5kdc_.d.ts → mandatoryConsentManager-BcxCesP5.d.ts} +6 -6
- package/dist/{mandatoryConsentManager-NX1lz6nk.esm.js → mandatoryConsentManager-FfgHdPYw.esm.js} +3 -3
- package/dist/{mandatoryConsentStateMachine-D1J2NQSI.esm.js → mandatoryConsentStateMachine-CXuYC3qR.esm.js} +1 -1
- package/dist/{multipartRecordingService-Cz-cWrpV.esm.js → multipartRecordingService-CFmOUGQt.esm.js} +1 -1
- package/dist/numericRange-2e1vw1W0.esm.js +256 -0
- package/dist/{permissionGuards-Cyh71hOt.esm.js → permissionGuards-CZTCRHT-.esm.js} +1 -1
- package/dist/{permissionServices-BrtDMB0Z.esm.js → permissionServices-Vd86JiW9.esm.js} +19 -7
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/{phoneManager-VO1HEoUZ.d.ts → phoneManager-bA-xw2TP.d.ts} +0 -8
- package/dist/{phoneManager-D1QPNbu0.esm.js → phoneManager-oIMdbeLG.esm.js} +5 -6
- package/dist/{phoneServices-DC7AuUed.esm.js → phoneServices-Dk4j3NhI.esm.js} +2 -12
- package/dist/{phoneStateMachine-CxCPxTIy.esm.js → phoneStateMachine-Cu3y7ewi.esm.js} +3 -8
- package/dist/{processFaceMatch-BQoiqLVh.esm.js → processFaceMatch-CHeI0DEt.esm.js} +1 -1
- package/dist/qe-signature.esm.js +1 -1
- package/dist/{recordingService-CSCvD2tB.esm.js → recordingService-Cg-DwTxA.esm.js} +3 -3
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-Dcpg5GfP.esm.js → redirectToMobileManager-yYJGE47m.esm.js} +3 -3
- package/dist/{redirectToMobileStateMachine-BMehrtVP.esm.js → redirectToMobileStateMachine-g_NbyHrL.esm.js} +1 -1
- package/dist/{runChildModule-DNEmc7of.esm.js → runChildModule-Dd-tXDh2.esm.js} +2 -2
- package/dist/{sdkVersion-etdZfyCR.esm.js → sdkVersion-DDHH3E2F.esm.js} +1 -1
- package/dist/selfie.d.ts +3 -3
- package/dist/selfie.esm.js +11 -11
- package/dist/{selfieErrorUtils-DT-uhK20.esm.js → selfieErrorUtils-Dtm9bDS7.esm.js} +1 -1
- package/dist/{selfieManager-CdS6a7Q8.esm.js → selfieManager-BYJPzJW1.esm.js} +6 -6
- package/dist/{selfieManager-DrBYj5kA.d.ts → selfieManager-CqDlUy6B.d.ts} +1 -1
- package/dist/{selfieStateMachine-ChCl3nyf.esm.js → selfieStateMachine-DGg7S9O6.esm.js} +3 -3
- package/dist/{session-VXYuRYzb.esm.js → session-B49EJzZg.esm.js} +5 -5
- package/dist/session.d.ts +1 -1
- package/dist/session.esm.js +5 -5
- package/dist/{sessionInitializer-BT_CmYcX.esm.js → sessionInitializer-CaY5gnUl.esm.js} +11 -11
- package/dist/{setup-BXrgDdfx.esm.js → setup-B7SDCbtu.esm.js} +13 -13
- package/dist/{setup-rcXgYUcY.d.ts → setup-CTnxQSQW.d.ts} +1 -1
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-B737Gkvk.esm.js → signatureManager-DRUflksL.esm.js} +3 -3
- package/dist/{signatureStateMachine-B-QG7fk0.esm.js → signatureStateMachine-BQZenxel.esm.js} +1 -1
- package/dist/{stats-CrqhpKkP.esm.js → stats-DHu3li6G.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/{tri-BD9z6z0w.esm.js → tri-DBB-iiN3.esm.js} +8 -25
- package/dist/tri.d.ts +1 -1
- package/dist/{tri.esm-DYdFtcDH.esm.js → tri.esm-CftnGf9w.esm.js} +187 -177
- package/dist/tri.esm.js +1 -1
- package/dist/trueSight-Dg3TSVN7.esm.js +1 -0
- package/dist/{trueSightService-BwyLhIAo.esm.js → trueSightService-BWDGk571.esm.js} +5 -7
- package/dist/trust-graph.esm.js +3 -3
- package/dist/{trustGraphStateMachine-BxvReuo1.esm.js → trustGraphStateMachine-0Ehwried.esm.js} +1 -1
- package/dist/{types-4Re9FSOw.d.ts → types-BZsmNYom.d.ts} +3 -4
- package/dist/types-BinnzVrL.d.ts +6 -0
- package/dist/{types-BgRHw-dR.d.ts → types-BwMpWCVG.d.ts} +6 -2
- package/dist/{types-b0l9b83G.d.ts → types-D-FEM1rT.d.ts} +26 -10
- package/dist/{textRules-D4NRinKY.d.ts → types-D6Q1D1kx.d.ts} +1 -9
- package/dist/{types-CBQN04Rh.esm.js → types-DLsivQsu.esm.js} +0 -3
- package/dist/{types-CTaL0XJz.d.ts → types-DWqO7owj.d.ts} +2 -24
- package/dist/{types-CEGG70FK.d.ts → types-HHgsFhZn.d.ts} +1 -1
- package/dist/{types-C1056-J1.d.ts → types-LbccjQYX.d.ts} +1 -1
- package/dist/{types-DHpz4Y37.d.ts → types-PnJXvTkV.d.ts} +1 -1
- package/dist/{types-B-PIc0en.d.ts → types-g3NuVCT9.d.ts} +40 -37
- package/dist/{types-DEa3taWc.d.ts → types-tOSLpcSa.d.ts} +16 -2
- package/dist/video-selfie.d.ts +14 -6
- package/dist/video-selfie.esm.js +12 -9
- package/dist/{videoSelfieCameraWarmer-DgRlU_8q.esm.js → videoSelfieCameraWarmer-DFhlGeRd.esm.js} +27 -8
- package/dist/{videoSelfieStepDetector-DC_Qh7qI.d.ts → videoSelfieStepDetector-CxOc3kSI.d.ts} +3 -3
- package/dist/{warmup-BN8dG2KX.esm.js → warmup-ClZxXOkg.esm.js} +1 -1
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-DwBfTlgB.esm.js → wasmDsFlagSync-Bw-P5OG1.esm.js} +1 -1
- package/dist/{wasmWebClient-B2P6Vlvv.esm.js → wasmWebClient-BLtlzQhv.esm.js} +9 -9
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-DxeSH80T.esm.js → watchlistForBusinessManager-d8kdf35n.esm.js} +3 -3
- package/dist/{watchlistForBusinessStateMachine-BC9UWLuZ.esm.js → watchlistForBusinessStateMachine-Y9wFmuMH.esm.js} +4 -3
- package/dist/{watchlistManager-BHzmC9OC.esm.js → watchlistManager-D1BVrd3H.esm.js} +3 -3
- package/dist/{watchlistStateMachine-Bxzn16iJ.esm.js → watchlistStateMachine-Da4p0sTE.esm.js} +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.esm.js +42 -42
- package/package.json +3 -3
- package/dist/addressSearch-BKlynuBr.esm.js +0 -71
- package/dist/ekycPrefillStateMachine-SBnBKPGA.esm.js +0 -685
- package/dist/ekycRules-BH_Ll_0A.esm.js +0 -482
- package/dist/idOcrCpfUtils-D5Gwskxu.esm.js +0 -18
- package/dist/trueSight-BymJD5cW.esm.js +0 -1
- package/dist/types-BtrJ5fkm.d.ts +0 -6
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
//#region src/internal/forms/checks/esDni.ts
|
|
2
|
+
const DNI_LETTERS = "TRWAGMYFPDXBNJZSQVHLCKE";
|
|
3
|
+
/**
|
|
4
|
+
* Spanish DNI: 8 digits and the check letter for their value modulo 23
|
|
5
|
+
* (`12345678Z`). A space or hyphen before the letter is ignored. NIEs, the
|
|
6
|
+
* foreigners' IDs, are not DNIs and fail.
|
|
7
|
+
*/
|
|
8
|
+
function isValidEsDni(value) {
|
|
9
|
+
const dni = value.replace(/[\s-]/g, "").toUpperCase();
|
|
10
|
+
const match = /^([0-9]{8})([A-Z])$/.exec(dni);
|
|
11
|
+
if (!match) return false;
|
|
12
|
+
const [, digits, letter] = match;
|
|
13
|
+
return DNI_LETTERS[Number(digits) % 23] === letter;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region src/internal/forms/checks/fiPersonalIdentityCode.ts
|
|
17
|
+
const FI_CHECK_CHARACTERS = "0123456789ABCDEFHJKLMNPRSTUVWXY";
|
|
18
|
+
/** The first year of each century sign; the 2023 reform added Y-U and B-F. */
|
|
19
|
+
const FI_CENTURY = {
|
|
20
|
+
"+": 1800,
|
|
21
|
+
"-": 1900,
|
|
22
|
+
Y: 1900,
|
|
23
|
+
X: 1900,
|
|
24
|
+
W: 1900,
|
|
25
|
+
V: 1900,
|
|
26
|
+
U: 1900,
|
|
27
|
+
A: 2e3,
|
|
28
|
+
B: 2e3,
|
|
29
|
+
C: 2e3,
|
|
30
|
+
D: 2e3,
|
|
31
|
+
E: 2e3,
|
|
32
|
+
F: 2e3
|
|
33
|
+
};
|
|
34
|
+
const isLeapYear = (year) => year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
|
|
35
|
+
const daysInMonth = (year, month) => month === 2 ? isLeapYear(year) ? 29 : 28 : [
|
|
36
|
+
4,
|
|
37
|
+
6,
|
|
38
|
+
9,
|
|
39
|
+
11
|
|
40
|
+
].includes(month) ? 30 : 31;
|
|
41
|
+
/**
|
|
42
|
+
* Finnish personal identity code (henkilötunnus): `DDMMYY`, a century sign,
|
|
43
|
+
* a 3-digit individual number and a check character for the 9 digits modulo
|
|
44
|
+
* 31 (`131052-308T`). The date must exist.
|
|
45
|
+
*/
|
|
46
|
+
function isValidFiPersonalIdentityCode(value) {
|
|
47
|
+
const match = /^([0-9]{2})([0-9]{2})([0-9]{2})([-+A-FU-Y])([0-9]{3})([0-9A-Y])$/.exec(value.trim().toUpperCase());
|
|
48
|
+
if (!match) return false;
|
|
49
|
+
const [, dd, mm, yy, sign, individual, check] = match;
|
|
50
|
+
const year = FI_CENTURY[sign] + Number(yy);
|
|
51
|
+
const month = Number(mm);
|
|
52
|
+
const day = Number(dd);
|
|
53
|
+
if (month < 1 || month > 12 || day < 1 || day > daysInMonth(year, month)) return false;
|
|
54
|
+
return FI_CHECK_CHARACTERS[Number(`${dd}${mm}${yy}${individual}`) % 31] === check;
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/internal/forms/checks/inDrivingLicenseNumber.ts
|
|
58
|
+
const IN_DRIVING_LICENSE_REGEX = /^[A-Z]{2}[-\s]?[0-9]{2}(?:[0-9]{2})?[-\s]?(?:19|20)[0-9]{2}[-\s]?[0-9]{7}$/i;
|
|
59
|
+
/**
|
|
60
|
+
* Indian driving licence number format, `SS-RR[RR]-YYYY-NNNNNNN`, with or
|
|
61
|
+
* without hyphens (`MH-12-2011-0012345`, `MH1220110012345`). Format only:
|
|
62
|
+
* the number has no check digit.
|
|
63
|
+
*/
|
|
64
|
+
function isValidInDrivingLicenseNumber(value) {
|
|
65
|
+
return IN_DRIVING_LICENSE_REGEX.test(value.trim());
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
//#region src/internal/forms/checks/rut.ts
|
|
69
|
+
/**
|
|
70
|
+
* Chilean RUT/RUN: a 7- or 8-digit body and a check character, 0-9 or K,
|
|
71
|
+
* computed modulo 11. Dots, a hyphen and spaces are ignored
|
|
72
|
+
* (`12.345.678-5`, `12345678-5`, `123456785`).
|
|
73
|
+
*/
|
|
74
|
+
function isValidRut(value) {
|
|
75
|
+
const rut = value.replace(/[.\s-]/g, "").toUpperCase();
|
|
76
|
+
const match = /^([0-9]{7,8})([0-9K])$/.exec(rut);
|
|
77
|
+
if (!match) return false;
|
|
78
|
+
const [, body, check] = match;
|
|
79
|
+
let sum = 0;
|
|
80
|
+
let factor = 2;
|
|
81
|
+
for (let i = body.length - 1; i >= 0; i--) {
|
|
82
|
+
sum += Number(body[i]) * factor;
|
|
83
|
+
factor = factor === 7 ? 2 : factor + 1;
|
|
84
|
+
}
|
|
85
|
+
const rest = 11 - sum % 11;
|
|
86
|
+
return check === (rest === 11 ? "0" : rest === 10 ? "K" : String(rest));
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/internal/forms/resolvePrefill.ts
|
|
90
|
+
const DISPLAY_MODES = /* @__PURE__ */ new Set([
|
|
91
|
+
"editable",
|
|
92
|
+
"readOnly",
|
|
93
|
+
"hidden"
|
|
94
|
+
]);
|
|
95
|
+
const ONE_OF_REQUIRED = "oneOfRequired";
|
|
96
|
+
const filled = (value) => value !== void 0 && value.trim() !== "";
|
|
97
|
+
function configuredMode(context, group) {
|
|
98
|
+
const mode = context.displayModes?.[group];
|
|
99
|
+
return mode !== void 0 && DISPLAY_MODES.has(mode) ? mode : "editable";
|
|
100
|
+
}
|
|
101
|
+
/** The field's prefill source for its group's origin, if it lists one. */
|
|
102
|
+
function sourceFor(field, context) {
|
|
103
|
+
const origin = context.origins?.[field.group];
|
|
104
|
+
if (!origin) return void 0;
|
|
105
|
+
return field.prefill?.find((id) => id.startsWith(`${origin}.`));
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Decides each shown field's prefilled value and display mode, from the
|
|
109
|
+
* resolved form, module configuration's origins and display modes, and the
|
|
110
|
+
* values the module read. Pure and synchronous.
|
|
111
|
+
*
|
|
112
|
+
* A value that fails its field's checks is dropped. A group configured
|
|
113
|
+
* `hidden` or `readOnly` becomes `editable` as a whole when one of its
|
|
114
|
+
* required fields has no value, or when a `oneOfRequired` rule over it has
|
|
115
|
+
* none, so the user can always complete the form. An optional field without
|
|
116
|
+
* a value keeps its mode and sends nothing. An editable field filled from one
|
|
117
|
+
* of the context's `lockingOrigins` shows read-only.
|
|
118
|
+
*/
|
|
119
|
+
function resolvePrefill(form, context, data, checks) {
|
|
120
|
+
const candidates = {};
|
|
121
|
+
for (const { field } of form.fields) {
|
|
122
|
+
const source = sourceFor(field, context);
|
|
123
|
+
const raw = source ? data[source] : void 0;
|
|
124
|
+
if (filled(raw)) candidates[field.name] = checks.format(field, raw);
|
|
125
|
+
}
|
|
126
|
+
const values = {};
|
|
127
|
+
for (const { field } of form.fields) {
|
|
128
|
+
const value = candidates[field.name];
|
|
129
|
+
if (filled(value) && checks.isValid(field, value, candidates)) values[field.name] = value;
|
|
130
|
+
}
|
|
131
|
+
const isRequired = (resolved) => resolved.required || resolved.requiredIfFilled.some((name) => filled(values[name]));
|
|
132
|
+
const promoted = /* @__PURE__ */ new Set();
|
|
133
|
+
const promote = (group) => {
|
|
134
|
+
if (configuredMode(context, group) !== "editable") promoted.add(group);
|
|
135
|
+
};
|
|
136
|
+
for (const resolved of form.fields) if (isRequired(resolved) && !filled(values[resolved.field.name])) promote(resolved.field.group);
|
|
137
|
+
const groupOf = new Map(form.fields.map(({ field }) => [field.name, field.group]));
|
|
138
|
+
for (const { rule, fields } of form.groupRules) {
|
|
139
|
+
if (rule.id !== ONE_OF_REQUIRED) continue;
|
|
140
|
+
if (fields.some((name) => filled(values[name]))) continue;
|
|
141
|
+
for (const name of fields) {
|
|
142
|
+
const group = groupOf.get(name);
|
|
143
|
+
if (group) promote(group);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return {
|
|
147
|
+
fields: form.fields.map((resolved) => {
|
|
148
|
+
const { group, name } = resolved.field;
|
|
149
|
+
if (promoted.has(group)) return {
|
|
150
|
+
...resolved,
|
|
151
|
+
displayMode: "editable",
|
|
152
|
+
displayReason: "promoted"
|
|
153
|
+
};
|
|
154
|
+
const configured = configuredMode(context, group);
|
|
155
|
+
const origin = context.origins?.[group];
|
|
156
|
+
if (configured === "editable" && filled(values[name]) && origin !== void 0 && context.lockingOrigins?.includes(origin)) return {
|
|
157
|
+
...resolved,
|
|
158
|
+
displayMode: "readOnly",
|
|
159
|
+
displayReason: "locked"
|
|
160
|
+
};
|
|
161
|
+
return {
|
|
162
|
+
...resolved,
|
|
163
|
+
displayMode: configured,
|
|
164
|
+
displayReason: "configured"
|
|
165
|
+
};
|
|
166
|
+
}),
|
|
167
|
+
values
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/internal/forms/checks/digitCount.ts
|
|
172
|
+
/** `digitCount`: only the digits 0-9, with a count in `lengths` or between `min` and `max`. */
|
|
173
|
+
function hasDigitCount(value, count) {
|
|
174
|
+
if (!/^[0-9]+$/.test(value)) return false;
|
|
175
|
+
const { length } = value;
|
|
176
|
+
if (count.lengths) return count.lengths.includes(length);
|
|
177
|
+
return (count.min === void 0 || length >= count.min) && (count.max === void 0 || length <= count.max);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The `digitCount` message: one length (`exactDigits`), a list of lengths
|
|
181
|
+
* (`digitsOneOf`), or a range (`digitsBetween`), with the counts as params.
|
|
182
|
+
*/
|
|
183
|
+
function digitCountError(count) {
|
|
184
|
+
if (count.lengths?.length === 1) return {
|
|
185
|
+
key: "verification.errors.exactDigits",
|
|
186
|
+
params: { length: count.lengths[0] }
|
|
187
|
+
};
|
|
188
|
+
if (count.lengths) return {
|
|
189
|
+
key: "verification.errors.digitsOneOf",
|
|
190
|
+
params: { lengths: [...count.lengths] }
|
|
191
|
+
};
|
|
192
|
+
return {
|
|
193
|
+
key: "verification.errors.digitsBetween",
|
|
194
|
+
params: {
|
|
195
|
+
min: count.min ?? 0,
|
|
196
|
+
max: count.max ?? 0
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/internal/forms/checks/emailFormat.ts
|
|
202
|
+
/** One `@`, no whitespace, and a dot inside the domain. */
|
|
203
|
+
const EMAIL_PATTERN = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
204
|
+
/** Whether a value has an email's shape: one `@`, no spaces, a dot in the domain. */
|
|
205
|
+
function isEmailFormat(value) {
|
|
206
|
+
return EMAIL_PATTERN.test(value);
|
|
207
|
+
}
|
|
208
|
+
//#endregion
|
|
209
|
+
//#region src/internal/forms/checks/noPoBox.ts
|
|
210
|
+
const PO_BOX_PATTERN = /POBox|P\.O\.Box|pobox|postofficebox|postbox|po\.box|p\.o\.box/i;
|
|
211
|
+
/** Whether an address describes a P.O. box, ignoring whitespace and case. */
|
|
212
|
+
function isPoBox(address) {
|
|
213
|
+
return PO_BOX_PATTERN.test(address.replace(/\s/g, ""));
|
|
214
|
+
}
|
|
215
|
+
//#endregion
|
|
216
|
+
//#region src/internal/forms/checks/maxAge.ts
|
|
217
|
+
/**
|
|
218
|
+
* `maxAge`: an ISO `YYYY-MM-DD` date of birth at most `years` full years
|
|
219
|
+
* before `today`, also ISO, in the user's calendar. As in SDK1, someone turns
|
|
220
|
+
* a year older on their birthday. Field structure validation checks calendar
|
|
221
|
+
* dates before this age rule runs.
|
|
222
|
+
*/
|
|
223
|
+
function isWithinMaxAge(value, today, years) {
|
|
224
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
|
|
225
|
+
const [birthYear, birthMonthDay] = [value.slice(0, 4), value.slice(5)];
|
|
226
|
+
const [todayYear, todayMonthDay] = [today.slice(0, 4), today.slice(5)];
|
|
227
|
+
return Number(todayYear) - Number(birthYear) - (todayMonthDay < birthMonthDay ? 1 : 0) <= years;
|
|
228
|
+
}
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region src/internal/forms/checks/nameCharacters.ts
|
|
231
|
+
const NAME_REGEX = /^[\p{L}\p{M} '’-]+$/u;
|
|
232
|
+
/** `nameCharacters`: letters from any script, spaces, hyphens and apostrophes. */
|
|
233
|
+
function hasNameCharacters(value) {
|
|
234
|
+
return NAME_REGEX.test(value);
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
//#region src/internal/forms/checks/notFuture.ts
|
|
238
|
+
/**
|
|
239
|
+
* `notFuture`: an ISO `YYYY-MM-DD` date on or before `today`, also ISO, in
|
|
240
|
+
* the user's calendar. Field structure validation checks calendar dates
|
|
241
|
+
* before this range rule runs.
|
|
242
|
+
*/
|
|
243
|
+
function isNotFuture(value, today) {
|
|
244
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(value)) return true;
|
|
245
|
+
return value <= today;
|
|
246
|
+
}
|
|
247
|
+
//#endregion
|
|
248
|
+
//#region src/internal/forms/checks/numericRange.ts
|
|
249
|
+
/** `numericRange`: a whole number from `min` to `max`. */
|
|
250
|
+
function isInNumericRange(value, min, max) {
|
|
251
|
+
if (!/^-?[0-9]+$/.test(value)) return false;
|
|
252
|
+
const number = Number(value);
|
|
253
|
+
return number >= min && number <= max;
|
|
254
|
+
}
|
|
255
|
+
//#endregion
|
|
256
|
+
export { isPoBox as a, hasDigitCount as c, isValidInDrivingLicenseNumber as d, isValidFiPersonalIdentityCode as f, isWithinMaxAge as i, resolvePrefill as l, isNotFuture as n, isEmailFormat as o, isValidEsDni as p, hasNameCharacters as r, digitCountError as s, isInNumericRange as t, isValidRut as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { c as isWasmMotionPrimedForModule } from "./permissionServices-Vd86JiW9.esm.js";
|
|
2
2
|
//#region src/internal/permissions/permissionGuards.ts
|
|
3
3
|
function resolveStoredPermissionResult(fromEvent, fromContext) {
|
|
4
4
|
if (fromEvent === "granted" || fromEvent === "denied" || fromEvent === "prompt" || fromEvent === "refresh") return fromEvent;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
1
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-C4x5gc1c.esm.js";
|
|
2
2
|
import { n as isAndroidWebView } from "./platform-GIg4uPWe.esm.js";
|
|
3
|
-
import { t as MotionSensorProvider } from "./MotionSensorProvider-
|
|
3
|
+
import { t as MotionSensorProvider } from "./MotionSensorProvider-BAGydZPH.esm.js";
|
|
4
4
|
import { a as stopCameraStream, l as isCameraGrantedInDocument, r as requestCameraAccess, s as clearCameraGrantedInDocument } from "./camera-CJKApt0x.esm.js";
|
|
5
5
|
//#region ../infra/src/media/permissions.ts
|
|
6
6
|
async function queryPermission(name) {
|
|
@@ -52,6 +52,17 @@ function requiresMotionPermissionUserGesture(ds) {
|
|
|
52
52
|
return !motionSensor.hasPermission && !motionSensor.hasMotionPermissionDeniedThisSession();
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
|
+
* Whether the Deepsight motion setup (sensor start plus WASM `rsp`/`ssl`) can
|
|
56
|
+
* run without a user gesture. Only the iOS DeviceMotion permission API needs
|
|
57
|
+
* one. Elsewhere, Android Chrome included, the sensors and the WASM listeners
|
|
58
|
+
* start from script. So with the camera already granted, the capture machines
|
|
59
|
+
* set motion up directly instead of showing a sheet that asks for camera
|
|
60
|
+
* access the user already gave (ENG-64995).
|
|
61
|
+
*/
|
|
62
|
+
function canPrimeMotionWithoutUserGesture() {
|
|
63
|
+
return !MotionSensorProvider.isIosMotionPermissionRequired();
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
55
66
|
* Deliberately reads only the caller-supplied flag. Do not fold the camera grant
|
|
56
67
|
* memo in here: an earlier version OR'd in a session-cached grant, which made
|
|
57
68
|
* Firefox for Android skip camera acquisition entirely (PR #726). Motion priming
|
|
@@ -66,10 +77,11 @@ async function resolveMotionOsPermission(motionSensor) {
|
|
|
66
77
|
return requestMotionOsPermission(motionSensor);
|
|
67
78
|
}
|
|
68
79
|
/**
|
|
69
|
-
* On
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
80
|
+
* On iOS, the motion permission dialog and the WASM sensor priming (rsp/ssl)
|
|
81
|
+
* must run during a user gesture. Other browsers need no gesture (see
|
|
82
|
+
* `canPrimeMotionWithoutUserGesture`), but priming here is harmless there.
|
|
83
|
+
* When camera is already granted (cached permission), V1 requests motion on
|
|
84
|
+
* tutorial Continue before any async permission actors run.
|
|
73
85
|
*/
|
|
74
86
|
async function primeMotionFromUserGestureIfNeeded(options) {
|
|
75
87
|
if (options.ds !== true) return;
|
|
@@ -186,4 +198,4 @@ async function invokeRequestPermissionActor(input) {
|
|
|
186
198
|
});
|
|
187
199
|
}
|
|
188
200
|
//#endregion
|
|
189
|
-
export {
|
|
201
|
+
export { requestMotionPermission as a, isWasmMotionPrimedForModule as c, queryPermission as d, primeMotionFromUserGestureIfNeeded as i, resetWasmMotionPrimedForModule as l, checkPermission as n, requestPermission as o, invokeRequestPermissionActor as r, requiresMotionPermissionUserGesture as s, canPrimeMotionWithoutUserGesture as t, queryCameraPermission as u };
|
package/dist/phone.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-
|
|
1
|
+
import { n as PhoneState, o as phoneMachine, r as createPhoneManager, s as PhoneConfig, t as PhoneManager } from "./phoneManager-bA-xw2TP.js";
|
|
2
2
|
export { type PhoneConfig, type PhoneManager, type PhoneState, createPhoneManager, phoneMachine };
|
package/dist/phone.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as phoneMachine } from "./phoneStateMachine-
|
|
2
|
-
import { t as createPhoneManager } from "./phoneManager-
|
|
1
|
+
import { t as phoneMachine } from "./phoneStateMachine-Cu3y7ewi.esm.js";
|
|
2
|
+
import { t as createPhoneManager } from "./phoneManager-oIMdbeLG.esm.js";
|
|
3
3
|
export { createPhoneManager, phoneMachine };
|
|
@@ -34,7 +34,6 @@ type IPhoneValidationCapability = {
|
|
|
34
34
|
* otpVerification: true,
|
|
35
35
|
* otpExpirationInMinutes: 10,
|
|
36
36
|
* prefill: true,
|
|
37
|
-
* isInstantVerify: false,
|
|
38
37
|
* optinEnabled: true,
|
|
39
38
|
* maxOtpAttempts: 3,
|
|
40
39
|
* };
|
|
@@ -56,12 +55,6 @@ type PhoneConfig = {
|
|
|
56
55
|
* Useful for returning users.
|
|
57
56
|
*/
|
|
58
57
|
prefill: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Use carrier-based instant verification instead of OTP.
|
|
61
|
-
* Not available in all regions.
|
|
62
|
-
* @default false
|
|
63
|
-
*/
|
|
64
|
-
isInstantVerify?: boolean;
|
|
65
58
|
/**
|
|
66
59
|
* Show a marketing opt-in checkbox in the UI.
|
|
67
60
|
* User's preference is sent with the phone submission.
|
|
@@ -239,7 +232,6 @@ type PhoneState = PhoneIdleState | PhoneLoadingPrefillState | PhoneLoadingStartI
|
|
|
239
232
|
* @param options.config.otpVerification - Whether to require OTP verification
|
|
240
233
|
* @param options.config.otpExpirationInMinutes - How long the OTP is valid
|
|
241
234
|
* @param options.config.prefill - Whether to fetch a pre-filled phone number
|
|
242
|
-
* @param options.config.isInstantVerify - Use instant verification API
|
|
243
235
|
* @param options.config.optinEnabled - Show marketing opt-in checkbox
|
|
244
236
|
* @param options.config.maxOtpAttempts - Maximum OTP verification attempts (default: 3)
|
|
245
237
|
*
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
3
3
|
import { n as loadPhoneValidation, t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
6
|
import { n as isOtpComplete } from "./otp-D2k3PeSL.esm.js";
|
|
7
|
-
import { t as phoneMachine } from "./phoneStateMachine-
|
|
7
|
+
import { t as phoneMachine } from "./phoneStateMachine-Cu3y7ewi.esm.js";
|
|
8
8
|
//#region src/modules/phone/phoneActor.ts
|
|
9
9
|
function createPhoneActor(options) {
|
|
10
10
|
return createActor(phoneMachine, { input: { config: options.config } }).start();
|
|
@@ -132,8 +132,8 @@ function getPhoneScreenName(snapshot, phoneValidation) {
|
|
|
132
132
|
}
|
|
133
133
|
case "loadingPrefill":
|
|
134
134
|
case "loadingStartInfo":
|
|
135
|
-
case "loadingPhoneRules":
|
|
136
|
-
case "submitting": return
|
|
135
|
+
case "loadingPhoneRules":
|
|
136
|
+
case "submitting": return "phoneNumber.verify.loading";
|
|
137
137
|
case "sendingInitialOtp":
|
|
138
138
|
case "resendingOtp": return "phoneNumber.OTP.typing";
|
|
139
139
|
case "awaitingOtp":
|
|
@@ -350,7 +350,6 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
350
350
|
* @param options.config.otpVerification - Whether to require OTP verification
|
|
351
351
|
* @param options.config.otpExpirationInMinutes - How long the OTP is valid
|
|
352
352
|
* @param options.config.prefill - Whether to fetch a pre-filled phone number
|
|
353
|
-
* @param options.config.isInstantVerify - Use instant verification API
|
|
354
353
|
* @param options.config.optinEnabled - Show marketing opt-in checkbox
|
|
355
354
|
* @param options.config.maxOtpAttempts - Maximum OTP verification attempts (default: 3)
|
|
356
355
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as getToken, t as api, u as endpoints } from "./api-
|
|
1
|
+
import { r as getToken, t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
2
|
//#region src/modules/phone/phoneServices.ts
|
|
3
3
|
function getPhoneServerFailureReason(error, invalidStatus) {
|
|
4
4
|
if (error.status === invalidStatus) return "invalidPhone";
|
|
@@ -45,16 +45,6 @@ async function addPhone(params, signal) {
|
|
|
45
45
|
throw new Error(getPhoneServerFailureReason(error, 400));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
async function addPhoneInstantVerify(params, signal) {
|
|
49
|
-
try {
|
|
50
|
-
return (await api.post(endpoints.phoneInstant, {
|
|
51
|
-
phone: params.phone,
|
|
52
|
-
optInGranted: params.optInGranted
|
|
53
|
-
}, { signal })).data;
|
|
54
|
-
} catch (error) {
|
|
55
|
-
throw new Error(getPhoneServerFailureReason(error, 400));
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
48
|
async function sendOtp(signal) {
|
|
59
49
|
try {
|
|
60
50
|
await api.get(`${endpoints.sendSmsOtp}?communicationchannel=SMS`, { signal });
|
|
@@ -70,4 +60,4 @@ async function verifyOtp(code, signal) {
|
|
|
70
60
|
}
|
|
71
61
|
}
|
|
72
62
|
//#endregion
|
|
73
|
-
export {
|
|
63
|
+
export { sendOtp as a, prefetchStartInfo as i, fetchPhone as n, verifyOtp as o, fetchStartInfo as r, addPhone as t };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
2
2
|
import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
3
|
-
import {
|
|
3
|
+
import { a as sendOtp, n as fetchPhone, o as verifyOtp, r as fetchStartInfo, t as addPhone } from "./phoneServices-Dk4j3NhI.esm.js";
|
|
4
4
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
5
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
6
|
-
import { t as carryAttempts } from "./attemptCarry-
|
|
6
|
+
import { t as carryAttempts } from "./attemptCarry-CxiYlUAO.esm.js";
|
|
7
7
|
import { n as isOtpComplete, t as computeOtpValidationErrors } from "./otp-D2k3PeSL.esm.js";
|
|
8
8
|
//#region src/modules/phone/phoneStateMachine.ts
|
|
9
9
|
const RESEND_TIMER_SECONDS = 30;
|
|
@@ -32,10 +32,6 @@ const phoneMachine = setup({
|
|
|
32
32
|
await loadPhoneValidation();
|
|
33
33
|
}),
|
|
34
34
|
submitPhone: fromPromise(async ({ input, signal }) => {
|
|
35
|
-
if (input.isInstantVerify) return addPhoneInstantVerify({
|
|
36
|
-
phone: input.phone,
|
|
37
|
-
optInGranted: input.optInGranted
|
|
38
|
-
}, signal);
|
|
39
35
|
return addPhone({
|
|
40
36
|
phone: input.phone,
|
|
41
37
|
optInGranted: input.optInGranted
|
|
@@ -255,8 +251,7 @@ const phoneMachine = setup({
|
|
|
255
251
|
src: "submitPhone",
|
|
256
252
|
input: ({ context }) => ({
|
|
257
253
|
phone: context.phone,
|
|
258
|
-
optInGranted: context.config.optinEnabled ? context.optInGranted : void 0
|
|
259
|
-
isInstantVerify: context.config.isInstantVerify ?? false
|
|
254
|
+
optInGranted: context.config.optinEnabled ? context.optInGranted : void 0
|
|
260
255
|
}),
|
|
261
256
|
onDone: [{
|
|
262
257
|
target: "sendingInitialOtp",
|
package/dist/qe-signature.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-
|
|
1
|
+
import { a as NAMIRIAL_QES_CONSENT_KEYS, c as areAllConsented, o as NAMIRIAL_QES_PROVIDER_CODE, r as electronicSignatureMachine, s as QE_CONSENT_KEYS, t as createElectronicSignatureManager, u as getDefaultConsentChecks } from "./electronicSignatureManager-BYJHywZK.esm.js";
|
|
2
2
|
//#region src/modules/qe-signature/index.ts
|
|
3
3
|
function createQeSignatureManager(options) {
|
|
4
4
|
return createElectronicSignatureManager({ config: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
2
|
import { t as BrowserLazyImportProvider } from "./BrowserLazyImportProvider-BhoA957O.esm.js";
|
|
3
|
-
import { n as recordsLivenessClip } from "./deepsightCaptureConfig-
|
|
3
|
+
import { n as recordsLivenessClip } from "./deepsightCaptureConfig-XPx0BN30.esm.js";
|
|
4
4
|
import { r as createRecordingCompositor } from "./CameraCompositor-C7N1N61V.esm.js";
|
|
5
5
|
import { t as getAdaptiveMediaRecorderOptions } from "./mediaRecorderOptions-Di_V9TnZ.esm.js";
|
|
6
6
|
import { t as WorkerEncoderRecordingProvider } from "./WorkerEncoderRecordingProvider-BO7urYwT.esm.js";
|
|
7
|
-
import { t as MultipartRecordingService } from "./multipartRecordingService-
|
|
7
|
+
import { t as MultipartRecordingService } from "./multipartRecordingService-CFmOUGQt.esm.js";
|
|
8
8
|
//#region ../infra/src/media/VideoTrimmer.ts
|
|
9
9
|
/** A trim that runs longer than this uploads the full recording instead. */
|
|
10
10
|
const TRIM_TIMEOUT_MS = 1e4;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-
|
|
2
|
-
import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-
|
|
1
|
+
import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices } from "./redirectToMobileStateMachine-g_NbyHrL.esm.js";
|
|
2
|
+
import { n as createRedirectToMobileManagerFromActor, t as createRedirectToMobileManager } from "./redirectToMobileManager-yYJGE47m.esm.js";
|
|
3
3
|
export { createRedirectToMobileManager, createRedirectToMobileManagerFromActor, defaultRedirectToMobileServices, redirectToMobileMachine };
|
package/dist/{redirectToMobileManager-Dcpg5GfP.esm.js → redirectToMobileManager-yYJGE47m.esm.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as eventModuleNames } from "./types-
|
|
2
|
-
import { t as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
2
|
+
import { t as createManagerInstrumentation } from "./events-PUWyizJn.esm.js";
|
|
3
3
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
4
4
|
import { t as createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
6
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
7
|
-
import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-
|
|
7
|
+
import { n as redirectToMobileMachine, r as defaultRedirectToMobileServices, t as canResendSmsFromContext } from "./redirectToMobileStateMachine-g_NbyHrL.esm.js";
|
|
8
8
|
//#region src/modules/redirect-to-mobile/redirectToMobileActor.ts
|
|
9
9
|
const POLL_INTERVAL_MS = 5e3;
|
|
10
10
|
const QR_REFRESH_INTERVAL_MS = 5e3;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
2
|
import { t as BrowserTimerProvider } from "./BrowserTimerProvider-BXhgNxLt.esm.js";
|
|
3
3
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
4
4
|
import { n as fromPromise, t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
-
import { C as createEventBus } from "./types-
|
|
3
|
-
import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-
|
|
2
|
+
import { C as createEventBus } from "./types-DLsivQsu.esm.js";
|
|
3
|
+
import { a as notifyTrueSightManagerStopped, i as notifyTrueSightFlowEvent } from "./trueSightService-BWDGk571.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
5
|
import { t as fromCallback } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
6
6
|
//#region src/internal/flow-events/flowEvents.ts
|
package/dist/selfie.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
2
|
-
import { _ as SelfieCaptureOnlyConfig, a as SelfieCaptureOnlyMachine, c as SelfieActor, g as processFace, h as ProcessFaceResponse, i as SelfieCaptureOnlyActor, l as SelfieMachine, n as FaceCaptureManagerState, o as selfieCaptureOnlyMachine, r as CreateSelfieCaptureOnlyActorOptions, t as FaceCaptureManager, u as selfieMachine, v as SelfieConfig } from "./faceCaptureManagerFactory-
|
|
2
|
+
import { _ as SelfieCaptureOnlyConfig, a as SelfieCaptureOnlyMachine, c as SelfieActor, g as processFace, h as ProcessFaceResponse, i as SelfieCaptureOnlyActor, l as SelfieMachine, n as FaceCaptureManagerState, o as selfieCaptureOnlyMachine, r as CreateSelfieCaptureOnlyActorOptions, t as FaceCaptureManager, u as selfieMachine, v as SelfieConfig } from "./faceCaptureManagerFactory-D1EJw36F.js";
|
|
3
3
|
import { n as PermissionStatus, t as PermissionResult } from "./types-CeEcakO7.js";
|
|
4
|
-
import { a as FaceCapturedImageData, i as FaceCaptureOnlyResponse, n as DetectionStatus, o as FaceErrorCode } from "./types-
|
|
4
|
+
import { a as FaceCapturedImageData, i as FaceCaptureOnlyResponse, n as DetectionStatus, o as FaceErrorCode } from "./types-HHgsFhZn.js";
|
|
5
5
|
import { n as DeepsightService } from "./StreamCanvasCapture-BqaHTJF0.js";
|
|
6
6
|
import { t as CameraStream } from "./camera-9yYDUOsO.js";
|
|
7
|
-
import { i as createSelfieManagerFromActor, n as SelfieState, r as createSelfieManager, t as SelfieManager } from "./selfieManager-
|
|
7
|
+
import { i as createSelfieManagerFromActor, n as SelfieState, r as createSelfieManager, t as SelfieManager } from "./selfieManager-CqDlUy6B.js";
|
|
8
8
|
//#region src/modules/selfie/selfieCaptureOnlyManager.d.ts
|
|
9
9
|
type SelfieCaptureOnlyState = FaceCaptureManagerState;
|
|
10
10
|
type SelfieCaptureOnlyManager = FaceCaptureManager;
|
package/dist/selfie.esm.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { u as BrowserStorageProvider } from "./setup-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
3
|
-
import { n as eventModuleNames } from "./types-
|
|
4
|
-
import "./events-
|
|
1
|
+
import { u as BrowserStorageProvider } from "./setup-B7SDCbtu.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-C4x5gc1c.esm.js";
|
|
3
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
4
|
+
import "./events-PUWyizJn.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
6
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
7
|
-
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
8
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
9
|
-
import { s as processFace } from "./FaceDetectionProvider-
|
|
10
|
-
import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-
|
|
11
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
12
|
-
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-
|
|
13
|
-
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-
|
|
7
|
+
import { n as createDefaultProtectedFaceControllerActor, t as faceCaptureMachine } from "./faceCaptureSetup-DadLKnMf.esm.js";
|
|
8
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CYr2rVEj.esm.js";
|
|
9
|
+
import { s as processFace } from "./FaceDetectionProvider-ClZEDaLF.esm.js";
|
|
10
|
+
import { l as PROTECTED_CAPTURE_TARGET } from "./desktopCameraElection-CdrLiJTn.esm.js";
|
|
11
|
+
import { t as selfieMachine } from "./selfieStateMachine-DGg7S9O6.esm.js";
|
|
12
|
+
import { n as createSelfieManagerFromActor, t as createSelfieManager } from "./selfieManager-BYJPzJW1.esm.js";
|
|
13
|
+
import { t as invokeOnCaptureCallback } from "./invokeOnCaptureCallback-D2FOfi4O.esm.js";
|
|
14
14
|
/**
|
|
15
15
|
* Selfie state machine variant for the captureOnly flow. Shares the full base
|
|
16
16
|
* face-capture state tree; only the upload/process step is local instead of
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { u as FACE_ERROR_CODES } from "./FaceDetectionProvider-
|
|
1
|
+
import { u as FACE_ERROR_CODES } from "./FaceDetectionProvider-ClZEDaLF.esm.js";
|
|
2
2
|
//#region src/modules/selfie/selfieErrorUtils.ts
|
|
3
3
|
const FACE_ERROR_CODE_VALUES = Object.values(FACE_ERROR_CODES);
|
|
4
4
|
const isFaceErrorCode = (value) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as BrowserStorageProvider } from "./setup-
|
|
2
|
-
import { t as WasmUtilProvider } from "./WasmUtilProvider-
|
|
3
|
-
import { n as eventModuleNames } from "./types-
|
|
4
|
-
import "./events-
|
|
1
|
+
import { u as BrowserStorageProvider } from "./setup-B7SDCbtu.esm.js";
|
|
2
|
+
import { t as WasmUtilProvider } from "./WasmUtilProvider-C4x5gc1c.esm.js";
|
|
3
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
4
|
+
import "./events-PUWyizJn.esm.js";
|
|
5
5
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
6
|
-
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-
|
|
7
|
-
import { t as selfieMachine } from "./selfieStateMachine-
|
|
6
|
+
import { t as createFaceCaptureManagerFromActor } from "./faceCaptureManagerFactory-CYr2rVEj.esm.js";
|
|
7
|
+
import { t as selfieMachine } from "./selfieStateMachine-DGg7S9O6.esm.js";
|
|
8
8
|
//#region src/modules/selfie/selfieActor.ts
|
|
9
9
|
function createSelfieActor(options) {
|
|
10
10
|
const dependencies = options.dependencies ?? {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
2
2
|
import { t as IVisibilityObserverCapability } from "./IVisibilityObserverCapability-D4tvIB5v.js";
|
|
3
|
-
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-
|
|
3
|
+
import { c as SelfieActor, n as FaceCaptureManagerState, s as CreateSelfieActorOptions, t as FaceCaptureManager } from "./faceCaptureManagerFactory-D1EJw36F.js";
|
|
4
4
|
//#region src/modules/selfie/selfieManager.d.ts
|
|
5
5
|
type SelfieState = FaceCaptureManagerState;
|
|
6
6
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { i as assign } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
2
2
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
3
|
-
import { t as faceCaptureMachine } from "./faceCaptureSetup-
|
|
4
|
-
import { d as isOnDeviceMode, s as processFace, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-
|
|
5
|
-
import { n as validateUploadResponse } from "./selfieErrorUtils-
|
|
3
|
+
import { t as faceCaptureMachine } from "./faceCaptureSetup-DadLKnMf.esm.js";
|
|
4
|
+
import { d as isOnDeviceMode, s as processFace, u as FACE_ERROR_CODES } from "./FaceDetectionProvider-ClZEDaLF.esm.js";
|
|
5
|
+
import { n as validateUploadResponse } from "./selfieErrorUtils-Dtm9bDS7.esm.js";
|
|
6
6
|
/**
|
|
7
7
|
* The selfie capture state machine.
|
|
8
8
|
*
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as getApi, u as endpoints } from "./api-
|
|
2
|
-
import { u as trueSightLog, x as noteSessionCreated } from "./trueSightService-
|
|
3
|
-
import "./trueSight-
|
|
4
|
-
import "./sessionInitializer-
|
|
5
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
1
|
+
import { n as getApi, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
2
|
+
import { u as trueSightLog, x as noteSessionCreated } from "./trueSightService-BWDGk571.esm.js";
|
|
3
|
+
import "./trueSight-Dg3TSVN7.esm.js";
|
|
4
|
+
import "./sessionInitializer-CaY5gnUl.esm.js";
|
|
5
|
+
import { i as toIncodeApiError } from "./apiError-CWjo9dzH.esm.js";
|
|
6
6
|
//#region src/internal/session/sessionService.ts
|
|
7
7
|
/**
|
|
8
8
|
* HTTP status codes the QR validation endpoint emits, keyed by their semantic
|