@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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { r as getWasmStatus } from "./warmup-
|
|
2
|
-
import { n as eventModuleNames } from "./types-
|
|
3
|
-
import { r as getToken, t as api, u as endpoints } from "./api-
|
|
4
|
-
import { d as whenSessionFingerprintSettled, f as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-
|
|
5
|
-
import { E as updateFeatureManagementUser } from "./feature-management-
|
|
6
|
-
import { i as toIncodeApiError } from "./apiError-
|
|
7
|
-
import "./session-
|
|
1
|
+
import { r as getWasmStatus } from "./warmup-ClZxXOkg.esm.js";
|
|
2
|
+
import { n as eventModuleNames } from "./types-DLsivQsu.esm.js";
|
|
3
|
+
import { r as getToken, t as api, u as endpoints } from "./api-B58edv6M.esm.js";
|
|
4
|
+
import { d as whenSessionFingerprintSettled, f as getStandaloneFlowPolicy, i as initializeSession, r as getSessionFingerprintResult } from "./sessionInitializer-CaY5gnUl.esm.js";
|
|
5
|
+
import { E as updateFeatureManagementUser } from "./feature-management-CUzbPq54.esm.js";
|
|
6
|
+
import { i as toIncodeApiError } from "./apiError-CWjo9dzH.esm.js";
|
|
7
|
+
import "./session-B49EJzZg.esm.js";
|
|
8
8
|
import { n as loadPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
9
|
-
import {
|
|
9
|
+
import { i as prefetchStartInfo } from "./phoneServices-Dk4j3NhI.esm.js";
|
|
10
10
|
//#region src/modules/flow/dashboardConfig.ts
|
|
11
11
|
function isPlainObject(value) {
|
|
12
12
|
if (value === null || typeof value !== "object" || Array.isArray(value)) return false;
|
|
@@ -255,7 +255,7 @@ let configConverters;
|
|
|
255
255
|
async function loadFlowConfigConverters(flow) {
|
|
256
256
|
const needed = flow.flowModules.some((module) => module.key === "EXTERNAL_VERIFICATION" || module.key === "EKYB");
|
|
257
257
|
if (configConverters || !needed) return;
|
|
258
|
-
const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-
|
|
258
|
+
const [ekyc, ekyb] = await Promise.all([import("./ekycUtils-C6HZB46m.esm.js").then((n) => n.n), import("./ekybUtils-Dl0MU-ib.esm.js").then((n) => n.t)]);
|
|
259
259
|
configConverters = {
|
|
260
260
|
toEkycConfig: ekyc.toEkycConfig,
|
|
261
261
|
toEkybConfig: ekyb.toEkybConfig
|
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import { t as getPhoneValidation } from "./phoneValidation-OggtfjRt.esm.js";
|
|
2
|
+
import { r as isCalendarDate, t as INVALID_DATE_ERROR_KEY } from "./calendarDate-D2zWfUlA.esm.js";
|
|
3
|
+
import { r as DYNAMIC_REQUIRED_KEY } from "./resolveForm-DaaQSVWp.esm.js";
|
|
4
|
+
import { n as hasAllowedCharacters, t as CLASS_PATTERNS } from "./allowedCharacters-Bnir--CN.esm.js";
|
|
5
|
+
//#region src/internal/forms/validateForm.ts
|
|
6
|
+
const blank = (value) => value.trim() === "";
|
|
7
|
+
/**
|
|
8
|
+
* A value as the kernel reads it: text, a list of texts, or absent. A host
|
|
9
|
+
* can set anything (`setField`), so `null` counts as absent and a number or
|
|
10
|
+
* other scalar as its text.
|
|
11
|
+
*/
|
|
12
|
+
function readValue(value) {
|
|
13
|
+
if (value === void 0 || value === null) return void 0;
|
|
14
|
+
if (typeof value === "string") return value;
|
|
15
|
+
if (Array.isArray(value)) return value.map((entry) => entry === void 0 || entry === null ? "" : String(entry));
|
|
16
|
+
return String(value);
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Whether a value is empty (spec semantic 2): absent or only whitespace, or
|
|
20
|
+
* a list with no entry that isn't.
|
|
21
|
+
*
|
|
22
|
+
* A phone with only its calling code is a value, not empty, as in every
|
|
23
|
+
* module (CK1 decision K15): the kernel can't tell a calling code from a
|
|
24
|
+
* number being typed (`+44` from `+441`) without calling-code data the phone
|
|
25
|
+
* rules don't expose, and the UI never stores one (an untouched phone input
|
|
26
|
+
* is `""`). ENG-63329 drops the spec's calling-code clause.
|
|
27
|
+
*/
|
|
28
|
+
function isEmptyValue(_field, value) {
|
|
29
|
+
const read = readValue(value);
|
|
30
|
+
if (read === void 0) return true;
|
|
31
|
+
return typeof read === "string" ? blank(read) : read.every(blank);
|
|
32
|
+
}
|
|
33
|
+
function optionValues(field, registry) {
|
|
34
|
+
if (field.options) return field.options.map((option) => option.value);
|
|
35
|
+
if (field.optionsRef) return registry.optionLists.get(field.optionsRef);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether a locked phone has its country's calling code: its national number
|
|
39
|
+
* in that country gives the same E.164 number. Without the phone rules it
|
|
40
|
+
* can't be told and passes; `phoneFormat` fails the phone then anyway.
|
|
41
|
+
*/
|
|
42
|
+
function inCountry(value, env) {
|
|
43
|
+
const phone = env.deps.phone;
|
|
44
|
+
if (!phone) return true;
|
|
45
|
+
const national = phone.nationalNumber(value, env.country);
|
|
46
|
+
if (national === null) return true;
|
|
47
|
+
return phone.formatE164(national, env.country) === phone.formatE164(value, env.country);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The checks a field's structure implies, before its rules (spec semantic 3).
|
|
51
|
+
* They read the value trimmed, as eKYC's date check does and as the UI types
|
|
52
|
+
* it (CK1 decision K8); the request body still sends the value as typed
|
|
53
|
+
* unless the field has a `trim` transform.
|
|
54
|
+
*/
|
|
55
|
+
function structureError(resolved, value, registry, env) {
|
|
56
|
+
const { field } = resolved;
|
|
57
|
+
const trimmed = value.trim();
|
|
58
|
+
const maxLength = field.input?.maxLength;
|
|
59
|
+
if (maxLength !== void 0 && [...trimmed].length > maxLength) return registry.structure.maxLength(maxLength);
|
|
60
|
+
const options = field.kind === "choice" ? optionValues(field, registry) : void 0;
|
|
61
|
+
if (options && !options.includes(trimmed)) return registry.structure.option;
|
|
62
|
+
if (field.kind === "date" && !isCalendarDate(trimmed)) return registry.structure.date;
|
|
63
|
+
if (resolved.phoneLocked && !inCountry(trimmed, env)) return registry.structure.phoneLock(env.country);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Runs one rule on a non-empty value. The rule's own message replaces the
|
|
67
|
+
* key and keeps the params; otherwise the rule's computed error or the
|
|
68
|
+
* registry's default message is used. A rule the registry doesn't implement
|
|
69
|
+
* passes: call `checkSupport` first for a definition that wasn't bundled.
|
|
70
|
+
*/
|
|
71
|
+
function checkRule(ref, value, registry, env) {
|
|
72
|
+
const rule = registry.rules.get(ref.id);
|
|
73
|
+
if (!rule) return void 0;
|
|
74
|
+
const params = ref.params ?? {};
|
|
75
|
+
if (rule.test(value, params, env)) return void 0;
|
|
76
|
+
const error = rule.error?.(params, env) ?? { key: registry.messages.get(ref.id) ?? ref.id };
|
|
77
|
+
return ref.message ? withMessage(error, ref.message) : error;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* An error under a definition's own message: its key, with the computed
|
|
81
|
+
* params and the message's own params over them.
|
|
82
|
+
*/
|
|
83
|
+
function withMessage(error, message) {
|
|
84
|
+
const params = {
|
|
85
|
+
...error.params,
|
|
86
|
+
...message.params
|
|
87
|
+
};
|
|
88
|
+
return Object.keys(params).length > 0 ? {
|
|
89
|
+
key: message.key,
|
|
90
|
+
params
|
|
91
|
+
} : { key: message.key };
|
|
92
|
+
}
|
|
93
|
+
/** A value's first failing check: structure, then rules in order. */
|
|
94
|
+
function valueError(resolved, value, registry, env) {
|
|
95
|
+
const structure = structureError(resolved, value, registry, env);
|
|
96
|
+
if (structure) return structure;
|
|
97
|
+
for (const ref of resolved.field.rules ?? []) {
|
|
98
|
+
const error = checkRule(ref, value, registry, env);
|
|
99
|
+
if (error) return error;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* A field's own error: requiredness when it's empty, otherwise its structure
|
|
104
|
+
* and rules (each list entry on its own). Group rules come after.
|
|
105
|
+
*/
|
|
106
|
+
function fieldError(resolved, values, registry, env, isShownEmpty) {
|
|
107
|
+
const { field } = resolved;
|
|
108
|
+
const value = readValue(values[field.name]);
|
|
109
|
+
if (isEmptyValue(field, value)) return resolved.required || resolved.requiredIfFilled.some((name) => !isShownEmpty(name)) ? registry.required(field) : void 0;
|
|
110
|
+
const entries = typeof value === "string" ? [value] : (value ?? []).filter((e) => !blank(e));
|
|
111
|
+
for (const entry of entries) {
|
|
112
|
+
const error = valueError(resolved, entry, registry, env);
|
|
113
|
+
if (error) return error;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
/** The text of a value for a group rule: a list's entries joined. */
|
|
117
|
+
const text = (value) => {
|
|
118
|
+
const read = readValue(value);
|
|
119
|
+
return read === void 0 || typeof read === "string" ? read : read.join(" ");
|
|
120
|
+
};
|
|
121
|
+
/** Whether a field is hidden or its value is empty, by field name. */
|
|
122
|
+
const shownEmpty = (form, values) => {
|
|
123
|
+
const shown = new Map(form.fields.map(({ field }) => [field.name, field]));
|
|
124
|
+
return (name) => {
|
|
125
|
+
const field = shown.get(name);
|
|
126
|
+
return !field || isEmptyValue(field, values[name]);
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
/** Errors from the form's group rules, by field name (spec semantic 4). */
|
|
130
|
+
function groupErrors(form, values, registry, env) {
|
|
131
|
+
const errors = {};
|
|
132
|
+
const texts = Object.fromEntries(form.fields.map(({ field }) => [field.name, text(values[field.name])]));
|
|
133
|
+
const isEmpty = shownEmpty(form, values);
|
|
134
|
+
for (const { rule, fields } of form.groupRules) {
|
|
135
|
+
const impl = registry.groupRules.get(rule.id);
|
|
136
|
+
if (!impl) continue;
|
|
137
|
+
const found = impl.check({
|
|
138
|
+
rule,
|
|
139
|
+
fields,
|
|
140
|
+
values: texts,
|
|
141
|
+
isEmpty,
|
|
142
|
+
checkRule: (ref, value) => checkRule(ref, value, registry, env),
|
|
143
|
+
defaultMessage: registry.messages.get(rule.id)
|
|
144
|
+
});
|
|
145
|
+
for (const [name, error] of Object.entries(found)) errors[name] ??= error;
|
|
146
|
+
}
|
|
147
|
+
return errors;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* One error as `validateForm` gives it, for checking one field as the user
|
|
151
|
+
* leaves it: a shown field by name, a collection entry's field as
|
|
152
|
+
* `<collection>.<index>.<field>`, or a collection's own error by its id. A
|
|
153
|
+
* field that isn't shown has none.
|
|
154
|
+
*/
|
|
155
|
+
function validateField(form, name, values, registry, env, entries = {}) {
|
|
156
|
+
const resolved = form.fields.find(({ field }) => field.name === name);
|
|
157
|
+
if (!resolved) {
|
|
158
|
+
const collection = name.split(".")[0];
|
|
159
|
+
return form.collections.some((c) => c.collection.id === collection) ? validateForm(form, values, registry, env, entries)[name] : void 0;
|
|
160
|
+
}
|
|
161
|
+
return fieldError(resolved, values, registry, env, shownEmpty(form, values)) ?? groupErrors(form, values, registry, env)[name];
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Every error in the form (spec semantics 1–4). Only shown fields are
|
|
165
|
+
* checked. A field's own error (requiredness, structure, rules) wins over a
|
|
166
|
+
* group rule's. Collection entries are checked field by field: the first
|
|
167
|
+
* `min` entries always, later ones once any of their fields has a value. An
|
|
168
|
+
* entry's field is checked by `required`, its structure and its rules only:
|
|
169
|
+
* the compiler rejects `requiredWhen` and a locked phone on a collection
|
|
170
|
+
* field, and group rules name top-level fields only.
|
|
171
|
+
*/
|
|
172
|
+
function validateForm(form, values, registry, env, entries = {}) {
|
|
173
|
+
const errors = {};
|
|
174
|
+
const isShownEmpty = shownEmpty(form, values);
|
|
175
|
+
for (const resolved of form.fields) {
|
|
176
|
+
const error = fieldError(resolved, values, registry, env, isShownEmpty);
|
|
177
|
+
if (error) errors[resolved.field.name] = error;
|
|
178
|
+
}
|
|
179
|
+
for (const [name, error] of Object.entries(groupErrors(form, values, registry, env))) errors[name] ??= error;
|
|
180
|
+
for (const { collection, min, max } of form.collections) {
|
|
181
|
+
const list = entries[collection.id] ?? [];
|
|
182
|
+
const count = Math.max(list.length, min);
|
|
183
|
+
for (let index = 0; index < count; index++) {
|
|
184
|
+
const entry = list[index] ?? {};
|
|
185
|
+
const touched = collection.fields.some((field) => !isEmptyValue(field, entry[field.name]));
|
|
186
|
+
if (index >= min && !touched) continue;
|
|
187
|
+
for (const field of collection.fields) {
|
|
188
|
+
const error = fieldError({
|
|
189
|
+
field,
|
|
190
|
+
required: field.required === true,
|
|
191
|
+
requiredIfFilled: [],
|
|
192
|
+
forced: false,
|
|
193
|
+
phoneLocked: false
|
|
194
|
+
}, entry, registry, env, () => true);
|
|
195
|
+
if (error) errors[`${collection.id}.${index}.${field.name}`] = error;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
if (max !== void 0 && list.length > max) errors[collection.id] = registry.structure.tooMany(max);
|
|
199
|
+
}
|
|
200
|
+
return errors;
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/internal/forms/buildPayload.ts
|
|
204
|
+
/** The request key a field writes, or nothing when it's never sent. */
|
|
205
|
+
const keyOf = (field) => field.payload?.omit ? void 0 : field.payload?.key ?? field.name;
|
|
206
|
+
const isBlank = (value) => (value ?? "").trim() === "";
|
|
207
|
+
/** The ids of a field's request transforms the registry doesn't implement. */
|
|
208
|
+
const unknownTransforms = (field, registry) => (field.payload?.transforms ?? []).map((ref) => ref.id).filter((id) => !registry.transforms.has(id));
|
|
209
|
+
function transform(field, value, registry, env) {
|
|
210
|
+
return (field.payload?.transforms ?? []).reduce((current, ref) => {
|
|
211
|
+
const impl = registry.transforms.get(ref.id);
|
|
212
|
+
return impl ? impl.apply(current, ref.params ?? {}, env) : current;
|
|
213
|
+
}, value);
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A `submit.context` entry's runtime value, or nothing when it's empty: the
|
|
217
|
+
* source module configuration names (it can be an alias of the definition's
|
|
218
|
+
* source), else the definition's; the definition's country, so a form with
|
|
219
|
+
* no fixed country leaves the key out; module configuration's risk add-ons.
|
|
220
|
+
*/
|
|
221
|
+
function contextValue(name, definition, env) {
|
|
222
|
+
switch (name) {
|
|
223
|
+
case "source": return env.source || definition.source || void 0;
|
|
224
|
+
case "country": return definition.country || void 0;
|
|
225
|
+
case "riskAddons": return env.riskAddons?.length ? [...env.riskAddons] : void 0;
|
|
226
|
+
default: return;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* The request body a definition describes (spec semantic 5):
|
|
231
|
+
*
|
|
232
|
+
* 1. Every shown field with a non-empty value, under `payload.key` (default
|
|
233
|
+
* its name), after its request transforms. Empty values are left out,
|
|
234
|
+
* never sent as `""` or `null`, so `omitWhenEmpty` changes nothing here;
|
|
235
|
+
* so is a value its transforms leave blank. A list sends its non-blank
|
|
236
|
+
* entries, each transformed. A collection sends each entry with a value as
|
|
237
|
+
* its `join` fields' values, trimmed and joined with a space.
|
|
238
|
+
* 2. `submit.static` keys as written, then `submit.context` keys: the source
|
|
239
|
+
* (`env.source`, else the definition's), the definition's country, or
|
|
240
|
+
* `riskAddons`. An empty context value is left out.
|
|
241
|
+
* 3. `submit.copies` in order: each replaces `to` with `from`'s value, when
|
|
242
|
+
* `from` is in the body.
|
|
243
|
+
*
|
|
244
|
+
* Two writers of one key keep the first and report a problem.
|
|
245
|
+
*/
|
|
246
|
+
function buildPayload(form, values, registry, env, entries = {}) {
|
|
247
|
+
const { definition } = form;
|
|
248
|
+
const body = {};
|
|
249
|
+
const writers = /* @__PURE__ */ new Map();
|
|
250
|
+
const problems = [];
|
|
251
|
+
const write = (key, value, writer) => {
|
|
252
|
+
const first = writers.get(key);
|
|
253
|
+
if (first !== void 0) {
|
|
254
|
+
problems.push({
|
|
255
|
+
kind: "duplicateKey",
|
|
256
|
+
key,
|
|
257
|
+
writers: [first, writer]
|
|
258
|
+
});
|
|
259
|
+
return;
|
|
260
|
+
}
|
|
261
|
+
writers.set(key, writer);
|
|
262
|
+
body[key] = value;
|
|
263
|
+
};
|
|
264
|
+
for (const { field } of form.fields) {
|
|
265
|
+
const key = keyOf(field);
|
|
266
|
+
const value = readValue(values[field.name]);
|
|
267
|
+
if (key === void 0 || isEmptyValue(field, value)) continue;
|
|
268
|
+
for (const id of unknownTransforms(field, registry)) problems.push({
|
|
269
|
+
kind: "unknownTransform",
|
|
270
|
+
field: field.name,
|
|
271
|
+
transform: id
|
|
272
|
+
});
|
|
273
|
+
if (typeof value === "string") {
|
|
274
|
+
const sent = transform(field, value, registry, env);
|
|
275
|
+
if (!isBlank(sent)) write(key, sent, field.name);
|
|
276
|
+
} else if (Array.isArray(value)) {
|
|
277
|
+
const sent = value.filter((entry) => !isBlank(entry)).map((entry) => transform(field, entry, registry, env)).filter((entry) => !isBlank(entry));
|
|
278
|
+
if (sent.length > 0) write(key, sent, field.name);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
for (const { collection } of form.collections) {
|
|
282
|
+
const joined = (entries[collection.id] ?? []).map((entry) => collection.payload.join.map((name) => (entry[name] ?? "").trim()).filter((part) => part !== "").join(" ")).filter((value) => value !== "");
|
|
283
|
+
if (joined.length > 0) write(collection.payload.key, joined, collection.id);
|
|
284
|
+
}
|
|
285
|
+
for (const [key, value] of Object.entries(definition.submit.static ?? {})) write(key, value, "static");
|
|
286
|
+
for (const [key, name] of Object.entries(definition.submit.context ?? {})) {
|
|
287
|
+
const value = contextValue(name, definition, env);
|
|
288
|
+
if (value !== void 0) write(key, value, "context");
|
|
289
|
+
}
|
|
290
|
+
for (const { from, to } of definition.submit.copies ?? []) if (Object.prototype.hasOwnProperty.call(body, from)) body[to] = body[from];
|
|
291
|
+
return {
|
|
292
|
+
body,
|
|
293
|
+
problems
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region src/internal/forms/registry.ts
|
|
298
|
+
const byId = (items = []) => new Map(items.map((item) => [item.id, item]));
|
|
299
|
+
/** Builds a registry from lists, keyed by id. */
|
|
300
|
+
function createFormRegistry(input) {
|
|
301
|
+
return {
|
|
302
|
+
schemaVersions: [...input.schemaVersions],
|
|
303
|
+
vocabulary: input.vocabulary,
|
|
304
|
+
kinds: new Set(input.kinds),
|
|
305
|
+
groups: new Set(input.groups),
|
|
306
|
+
conditions: new Set(input.conditions ?? []),
|
|
307
|
+
prefillSources: new Set(input.prefillSources ?? []),
|
|
308
|
+
rules: byId(input.rules),
|
|
309
|
+
transforms: byId(input.transforms),
|
|
310
|
+
groupRules: byId(input.groupRules),
|
|
311
|
+
optionLists: new Map(Object.entries(input.optionLists ?? {})),
|
|
312
|
+
messages: new Map(Object.entries(input.messages ?? {})),
|
|
313
|
+
flags: new Set(input.flags ?? []),
|
|
314
|
+
required: input.required,
|
|
315
|
+
structure: input.structure
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
/** The ids a registry implements, for `checkSupport`. */
|
|
319
|
+
function supportedIds(registry) {
|
|
320
|
+
return {
|
|
321
|
+
schemaVersions: registry.schemaVersions,
|
|
322
|
+
vocabulary: registry.vocabulary,
|
|
323
|
+
kinds: registry.kinds,
|
|
324
|
+
groups: registry.groups,
|
|
325
|
+
rules: new Set(registry.rules.keys()),
|
|
326
|
+
transforms: new Set(registry.transforms.keys()),
|
|
327
|
+
groupRules: new Set(registry.groupRules.keys()),
|
|
328
|
+
optionLists: new Set(registry.optionLists.keys()),
|
|
329
|
+
conditions: registry.conditions,
|
|
330
|
+
prefillSources: registry.prefillSources,
|
|
331
|
+
flags: registry.flags
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/shared/formFields.ts
|
|
336
|
+
/**
|
|
337
|
+
* Field state for a module on the form-definition kernel: the values, each
|
|
338
|
+
* field's error, and the fields whose input reports a malformed value (a
|
|
339
|
+
* phone). One set of events (`SET_FIELD`, `VALIDATE_FIELD`) and plain
|
|
340
|
+
* functions a machine wraps in its own `assign` actions, so the kernel's
|
|
341
|
+
* `validateForm` / `validateField` run the same way in every module. No
|
|
342
|
+
* XState here: an `assign` built outside a machine's `setup()` loses its
|
|
343
|
+
* context type.
|
|
344
|
+
*/
|
|
345
|
+
/** The phone rules once they've loaded; the only runtime dependency these modules' rules have. */
|
|
346
|
+
function phoneDeps() {
|
|
347
|
+
const phone = getPhoneValidation();
|
|
348
|
+
return phone ? { phone } : {};
|
|
349
|
+
}
|
|
350
|
+
const isShown = (check, name) => check.form.fields.some(({ field }) => field.name === name);
|
|
351
|
+
/** The input-reported error for a shown, non-empty field the kernel passes. */
|
|
352
|
+
function inputError(state, name, check) {
|
|
353
|
+
if (!state.invalidFormats[name]) return void 0;
|
|
354
|
+
const resolved = check.form.fields.find(({ field }) => field.name === name);
|
|
355
|
+
if (!resolved || isEmptyValue(resolved.field, state.values[name])) return;
|
|
356
|
+
return check.invalidFormatError;
|
|
357
|
+
}
|
|
358
|
+
function errorOf(state, name, check) {
|
|
359
|
+
return validateField(check.form, name, state.values, check.registry, check.env()) ?? inputError(state, name, check);
|
|
360
|
+
}
|
|
361
|
+
/** The other shown fields that share a group rule with `name`. */
|
|
362
|
+
function groupSiblings(check, name) {
|
|
363
|
+
const siblings = /* @__PURE__ */ new Set();
|
|
364
|
+
for (const { fields } of check.form.groupRules) {
|
|
365
|
+
if (!fields.includes(name)) continue;
|
|
366
|
+
for (const other of fields) if (other !== name) siblings.add(other);
|
|
367
|
+
}
|
|
368
|
+
return [...siblings];
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Saves a value and clears the field's own error. A sibling in one of its
|
|
372
|
+
* group rules that shows an error is checked again, so an "at least one of"
|
|
373
|
+
* message goes away from the others once one member has a value.
|
|
374
|
+
*/
|
|
375
|
+
function setFieldValue(state, event, check) {
|
|
376
|
+
const { name, value, isValid } = event;
|
|
377
|
+
const values = {
|
|
378
|
+
...state.values,
|
|
379
|
+
[name]: value
|
|
380
|
+
};
|
|
381
|
+
const invalidFormats = { ...state.invalidFormats };
|
|
382
|
+
if (isValid === false) invalidFormats[name] = true;
|
|
383
|
+
else delete invalidFormats[name];
|
|
384
|
+
const next = {
|
|
385
|
+
values,
|
|
386
|
+
errors: state.errors,
|
|
387
|
+
invalidFormats
|
|
388
|
+
};
|
|
389
|
+
const errors = { ...state.errors };
|
|
390
|
+
delete errors[name];
|
|
391
|
+
for (const sibling of groupSiblings(check, name)) {
|
|
392
|
+
if (!errors[sibling]) continue;
|
|
393
|
+
const error = errorOf(next, sibling, check);
|
|
394
|
+
if (error) errors[sibling] = error;
|
|
395
|
+
else delete errors[sibling];
|
|
396
|
+
}
|
|
397
|
+
return {
|
|
398
|
+
values,
|
|
399
|
+
errors,
|
|
400
|
+
invalidFormats
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/** Checks one field: the kernel's error, else an input-reported one. */
|
|
404
|
+
function validateFieldValue(state, name, check) {
|
|
405
|
+
const errors = { ...state.errors };
|
|
406
|
+
const error = isShown(check, name) ? errorOf(state, name, check) : void 0;
|
|
407
|
+
if (error) errors[name] = error;
|
|
408
|
+
else delete errors[name];
|
|
409
|
+
return errors;
|
|
410
|
+
}
|
|
411
|
+
/** Every error in the form: the kernel's, then input-reported ones on fields it passes. */
|
|
412
|
+
function validateAllValues(state, check) {
|
|
413
|
+
const errors = { ...validateForm(check.form, state.values, check.registry, check.env()) };
|
|
414
|
+
for (const name of Object.keys(state.invalidFormats)) {
|
|
415
|
+
const error = errors[name] ? void 0 : inputError(state, name, check);
|
|
416
|
+
if (error) errors[name] = error;
|
|
417
|
+
}
|
|
418
|
+
return errors;
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#region src/internal/forms/rules/allowedCharacters.ts
|
|
422
|
+
const isCharacterClass = (value) => typeof value === "string" && Object.prototype.hasOwnProperty.call(CLASS_PATTERNS, value);
|
|
423
|
+
/**
|
|
424
|
+
* `allowedCharacters`, leading and trailing whitespace ignored as eKYC and
|
|
425
|
+
* KYB Checks trim the value first. `ascii` (vocabulary 1.3) is honored as
|
|
426
|
+
* KYB Checks does; eKYC drops it today. The allowed set is the listed classes
|
|
427
|
+
* plus `extra`, so an empty class list with an `extra` allows only those
|
|
428
|
+
* characters (a served `^[ABC]+$`). With nothing allowed at all, unknown
|
|
429
|
+
* classes, or an `extra` or `ascii` of the wrong type, the rule passes.
|
|
430
|
+
*/
|
|
431
|
+
const allowedCharacters = {
|
|
432
|
+
id: "allowedCharacters",
|
|
433
|
+
test: (value, { classes, extra, ascii }) => {
|
|
434
|
+
if (!Array.isArray(classes) || !classes.every(isCharacterClass) || extra !== void 0 && typeof extra !== "string" || ascii !== void 0 && typeof ascii !== "boolean" || classes.length === 0 && !extra) return true;
|
|
435
|
+
return hasAllowedCharacters(value.trim(), classes, extra, ascii);
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
//#endregion
|
|
439
|
+
//#region src/internal/forms/rules/e164.ts
|
|
440
|
+
/**
|
|
441
|
+
* `e164`: the phone as `+<country code><number>`. While the phone rules
|
|
442
|
+
* aren't loaded, or the number isn't valid, it stays as typed.
|
|
443
|
+
*/
|
|
444
|
+
const e164 = {
|
|
445
|
+
id: "e164",
|
|
446
|
+
apply: (value, _params, env) => env.deps.phone?.formatE164(value, env.country) ?? value
|
|
447
|
+
};
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/internal/forms/rules/oneOfRequired.ts
|
|
450
|
+
/**
|
|
451
|
+
* `oneOfRequired`: at least one of the rule's shown fields has a value. With
|
|
452
|
+
* none shown it passes. Otherwise its message goes on each shown field: the
|
|
453
|
+
* rule's own, or the registry's default.
|
|
454
|
+
*/
|
|
455
|
+
const oneOfRequired = {
|
|
456
|
+
id: "oneOfRequired",
|
|
457
|
+
check: ({ rule, fields, isEmpty, defaultMessage }) => {
|
|
458
|
+
if (fields.length === 0 || fields.some((name) => !isEmpty(name))) return {};
|
|
459
|
+
const error = rule.message ? {
|
|
460
|
+
key: rule.message.key,
|
|
461
|
+
...rule.message.params && { params: rule.message.params }
|
|
462
|
+
} : { key: defaultMessage ?? rule.id };
|
|
463
|
+
return Object.fromEntries(fields.map((name) => [name, error]));
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
//#endregion
|
|
467
|
+
//#region src/internal/forms/rules/trim.ts
|
|
468
|
+
/**
|
|
469
|
+
* `trim`: removes leading and trailing whitespace. On a list, the caller
|
|
470
|
+
* applies it to each entry.
|
|
471
|
+
*/
|
|
472
|
+
const trim = {
|
|
473
|
+
id: "trim",
|
|
474
|
+
apply: (value) => value.trim()
|
|
475
|
+
};
|
|
476
|
+
//#endregion
|
|
477
|
+
//#region src/shared/formErrors.ts
|
|
478
|
+
/**
|
|
479
|
+
* The error for an empty required field, as eKYC, eKYB and Pre-fill show it
|
|
480
|
+
* today: the dynamic required message naming the field by its display label
|
|
481
|
+
* (its English text when it has one, such as "CPF") or its label key.
|
|
482
|
+
*/
|
|
483
|
+
function requiredError(field) {
|
|
484
|
+
return {
|
|
485
|
+
key: DYNAMIC_REQUIRED_KEY,
|
|
486
|
+
params: { fieldName: field.displayLabel ? field.displayLabel.text ?? field.displayLabel.key : field.label.key }
|
|
487
|
+
};
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* The structure checks' messages. A date that isn't in the calendar gets
|
|
491
|
+
* `validation.invalidDate`, as every module's own date check gives it (CK1
|
|
492
|
+
* decision K7). The others reuse today's generic keys until i18nexus has
|
|
493
|
+
* their own (K17): too long, not an option, wrong country, too many entries.
|
|
494
|
+
*/
|
|
495
|
+
const STRUCTURE_MESSAGES = {
|
|
496
|
+
maxLength: (maxLength) => ({
|
|
497
|
+
key: "verification.errors.invalidFormat",
|
|
498
|
+
params: { maxLength }
|
|
499
|
+
}),
|
|
500
|
+
option: { key: "verification.errors.invalidFormat" },
|
|
501
|
+
date: { key: INVALID_DATE_ERROR_KEY },
|
|
502
|
+
phoneLock: (country) => ({
|
|
503
|
+
key: "verification.errors.phoneInvalid",
|
|
504
|
+
params: { country }
|
|
505
|
+
}),
|
|
506
|
+
tooMany: (max) => ({
|
|
507
|
+
key: "verification.errors.invalidFormat",
|
|
508
|
+
params: { max }
|
|
509
|
+
})
|
|
510
|
+
};
|
|
511
|
+
//#endregion
|
|
512
|
+
export { e164 as a, setFieldValue as c, createFormRegistry as d, supportedIds as f, oneOfRequired as i, validateAllValues as l, withMessage as m, requiredError as n, allowedCharacters as o, buildPayload as p, trim as r, phoneDeps as s, STRUCTURE_MESSAGES as t, validateFieldValue as u };
|
package/dist/geolocation.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as createGeolocationManager } from "./geolocationManager-
|
|
2
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
1
|
+
import { t as createGeolocationManager } from "./geolocationManager-D7J-rLJp.esm.js";
|
|
2
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-5g2Quxbz.esm.js";
|
|
3
3
|
export { createGeolocationManager, geolocationMachine };
|
|
@@ -1,8 +1,8 @@
|
|
|
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 createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
4
4
|
import { s as createActor } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
|
-
import { t as geolocationMachine } from "./geolocationStateMachine-
|
|
5
|
+
import { t as geolocationMachine } from "./geolocationStateMachine-5g2Quxbz.esm.js";
|
|
6
6
|
//#region ../infra/src/providers/browser/BrowserGeolocationProvider.ts
|
|
7
7
|
var BrowserGeolocationProvider = class {
|
|
8
8
|
getCurrentPosition() {
|
package/dist/{geolocationStateMachine-d5_E7gAm.esm.js → geolocationStateMachine-5g2Quxbz.esm.js}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
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 { i as isIOS, t as isAndroid } from "./platform-GIg4uPWe.esm.js";
|
|
3
|
-
import { n as isConnectivityError } from "./apiError-
|
|
3
|
+
import { n as isConnectivityError } from "./apiError-CWjo9dzH.esm.js";
|
|
4
4
|
import { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
5
|
import { n as fromPromise } 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
|
//#region src/modules/geolocation/geolocationServices.ts
|
|
8
8
|
async function addGeolocation(params, signal) {
|
|
9
9
|
return (await api.post(endpoints.addGeolocation, {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-
|
|
2
|
-
import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-
|
|
1
|
+
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-BFIcq3UB.esm.js";
|
|
2
|
+
import { n as createGovernmentValidationManagerFromActor, t as createGovernmentValidationManager } from "./governmentValidationManager-0-L21hu6.esm.js";
|
|
3
3
|
export { createGovernmentValidationManager, createGovernmentValidationManagerFromActor, governmentValidationMachine };
|
|
@@ -1,9 +1,9 @@
|
|
|
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 topLevelStateName } from "./topLevelStateName-B5i2avbh.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
|
-
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-
|
|
6
|
+
import { t as governmentValidationMachine } from "./governmentValidationStateMachine-BFIcq3UB.esm.js";
|
|
7
7
|
//#region src/modules/government-validation/governmentValidationActor.ts
|
|
8
8
|
function createGovernmentValidationActor(options) {
|
|
9
9
|
return createActor(governmentValidationMachine, { input: { config: options.config } }).start();
|
|
@@ -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 { i as assign, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-BCcwgosu.esm.js";
|
|
4
4
|
//#region src/modules/government-validation/governmentValidationServices.ts
|
package/dist/home.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { b as NonReducibleUnknown, j as StateMachine, m as EventObject, y as MetaObject } from "./spawn-COZKetCS.js";
|
|
2
2
|
import "./xstate.cjs-D6Ur0X1F.js";
|
|
3
3
|
import { t as Manager } from "./Manager-DufwKlav.js";
|
|
4
|
-
import { t as EmptyConfig } from "./types-
|
|
4
|
+
import { t as EmptyConfig } from "./types-BZsmNYom.js";
|
|
5
5
|
//#region src/modules/home/types.d.ts
|
|
6
6
|
type HomeConfig = EmptyConfig;
|
|
7
7
|
//#endregion
|
package/dist/home.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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 createManager } from "./Manager-BvXAwDv9.esm.js";
|
|
4
4
|
import { s as createActor, t as setup } from "./xstate.esm-CIqUf_i6.esm.js";
|
|
5
5
|
//#region src/modules/home/homeStateMachine.ts
|
package/dist/http.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as getApi, t as api } from "./api-
|
|
1
|
+
import { n as getApi, t as api } from "./api-B58edv6M.esm.js";
|
|
2
2
|
export { api, getApi };
|
package/dist/id-ocr.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as UpdateOcrDataParams, n as OcrData, o as ValidationRule, r as OcrFieldConfig, t as IdOcrConfig } from "./types-Bpo97EOh.js";
|
|
2
|
-
import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-
|
|
2
|
+
import { a as IdOcrActor, i as createIdOcrManagerFromActor, n as IdOcrState, o as IdOcrOcrDocument, r as createIdOcrManager, s as idOcrStateMachine, t as IdOcrManager } from "./idOcrManager-DflRx-_u.js";
|
|
3
3
|
//#region src/modules/id-ocr/idOcrFields.d.ts
|
|
4
4
|
declare const OCR_FIELDS: OcrFieldConfig[];
|
|
5
5
|
declare const getOcrFields: (config: Pick<IdOcrConfig, "cpfOnly" | "flowId">) => OcrFieldConfig[];
|
package/dist/id-ocr.esm.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-
|
|
3
|
-
import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-
|
|
1
|
+
import { t as validateCPF } from "./cpf-DDXMTLYr.esm.js";
|
|
2
|
+
import { a as MIN_AGE, i as CPFFlowIds, n as OCR_FIELDS, r as getOcrFields, t as idOcrStateMachine } from "./idOcrStateMachine-D5ifJ1B8.esm.js";
|
|
3
|
+
import { n as createIdOcrManagerFromActor, t as createIdOcrManager } from "./idOcrManager-bjBLjrEE.esm.js";
|
|
4
|
+
//#region src/modules/id-ocr/idOcrCpfUtils.ts
|
|
5
|
+
function formatCPF(value) {
|
|
6
|
+
const digits = value.replace(/\D/g, "").slice(0, 11);
|
|
7
|
+
const first = digits.slice(0, 3);
|
|
8
|
+
const second = digits.slice(3, 6);
|
|
9
|
+
const third = digits.slice(6, 9);
|
|
10
|
+
const verifier = digits.slice(9, 11);
|
|
11
|
+
if (digits.length > 9) return `${first}.${second}.${third}-${verifier}`;
|
|
12
|
+
if (digits.length > 6) return `${first}.${second}.${third}`;
|
|
13
|
+
if (digits.length > 3) return `${first}.${second}`;
|
|
14
|
+
return first;
|
|
15
|
+
}
|
|
16
|
+
function isValidCPF(value) {
|
|
17
|
+
return validateCPF(value);
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
4
20
|
export { CPFFlowIds, MIN_AGE, OCR_FIELDS, createIdOcrManager, createIdOcrManagerFromActor, formatCPF, getOcrFields, idOcrStateMachine, isValidCPF };
|