@incodetech/core 2.4.0 → 2.4.1-agentic.1
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/BrowserNetworkStatusProvider-BrDXBEDd.esm.js +21 -0
- package/dist/{multipartRecordingService-CLwrF5wD.esm.js → CameraCompositor-DN7NkJzV.esm.js} +7 -744
- package/dist/{FaceDetectionProvider-DcPOC2gS.esm.js → FaceDetectionProvider-CAY43vSI.esm.js} +28 -64
- package/dist/IBrowserEnvironmentCapability-D7JG7ML3.esm.js +16 -0
- package/dist/IGeolocationCapability-r49Qo7rR.d.ts +10 -0
- package/dist/{IWasmUtilCapability-GF2n7sfm.d.ts → IWasmUtilCapability-Cqiaxydi.d.ts} +31 -4
- package/dist/MultipartRecordingProvider-D9mauUdS.esm.js +146 -0
- package/dist/{PhoneValidationProvider-SZiOS0jB.esm.js → PhoneValidationProvider-Co4zk2en.esm.js} +7 -0
- package/dist/{StreamCanvasCapture-7JRf-2ck.d.ts → StreamCanvasCapture-C3xNfOsv.d.ts} +12 -3
- package/dist/StreamCanvasProcessingSession-CBnbTnOr.esm.js +42 -0
- package/dist/{WasmUtilProvider-DtJuBdt-.esm.js → WasmUtilProvider-Dp2V-Uct.esm.js} +75 -22
- package/dist/WorkerEncoderRecordingProvider-B1ODYtgN.esm.js +80 -0
- package/dist/addressSearch-DzbE9Ogt.esm.js +254 -0
- package/dist/{advanceableErrors-q_pfU3Cn.esm.js → advanceableErrors-k-U-cL5m.esm.js} +1 -2
- package/dist/ae-signature.esm.js +1 -1
- package/dist/antifraud.esm.js +2 -2
- package/dist/{antifraudManager-CaweCYnY.esm.js → antifraudManager-BObuHBjn.esm.js} +2 -2
- package/dist/{antifraudStateMachine-DRl0UVyA.esm.js → antifraudStateMachine-Dfrd2-26.esm.js} +1 -1
- package/dist/{api-Cz90EHyu.esm.js → api-CpP4PS4S.esm.js} +8 -5
- package/dist/{apiError-DPwFas2f.esm.js → apiError-DH-CH4Nz.esm.js} +1 -1
- package/dist/attemptCarry-WOkfvFMw.esm.js +45 -0
- package/dist/authentication.d.ts +3 -3
- package/dist/authentication.esm.js +2 -2
- package/dist/{authenticationManager-BIZC55Bi.d.ts → authenticationManager-CWmh7aSY.d.ts} +1 -1
- package/dist/{authenticationManager-2Lr5V_7p.esm.js → authenticationManager-DjX0XDyH.esm.js} +5 -5
- package/dist/{authenticationStateMachine-C99B0GFP.esm.js → authenticationStateMachine-BMbZL8wm.esm.js} +3 -3
- package/dist/backCameraLabel-yda5ugE4.esm.js +67 -0
- package/dist/{backCameraStream-CMvXj4X4.esm.js → backCameraStream-DS1oDiUq.esm.js} +12 -107
- package/dist/{browser-DlFgHpoC-DnyrCR8r.esm.js → browser-pQZA35G2-DtkAf6sn.esm.js} +161 -150
- package/dist/{camera-sIa9ceW2.esm.js → camera-E_Kcre4O.esm.js} +15 -23
- package/dist/camera.d.ts +2 -2
- package/dist/camera.esm.js +1 -1
- package/dist/certificate-issuance.esm.js +2 -2
- package/dist/{certificateIssuanceManager-BfeMv2PU.esm.js → certificateIssuanceManager-C1nETQos.esm.js} +2 -2
- package/dist/{certificateIssuanceStateMachine-Frgjbjw8.esm.js → certificateIssuanceStateMachine-DThXMDqr.esm.js} +2 -2
- package/dist/cnpj-Co1ottYN.esm.js +77 -0
- package/dist/connectivity-BCuEoQ-n.esm.js +114 -0
- package/dist/consent.d.ts +1 -1
- package/dist/consent.esm.js +2 -2
- package/dist/{consentManager-CvEu8h_W.esm.js → consentManager-DMlSL6Ax.esm.js} +4 -3
- package/dist/{consentManager-Cv_0QKLD.d.ts → consentManager-bjfVXO7p.d.ts} +9 -2
- package/dist/{consentStateMachine-DJTgN_-1.esm.js → consentStateMachine-DIYSMxKQ.esm.js} +20 -7
- package/dist/cross-document-data-match.esm.js +1 -1
- package/dist/{crossDocumentDataMatchManager-Cu141CE8.esm.js → crossDocumentDataMatchManager-BFTdiEDB.esm.js} +2 -2
- package/dist/curp-validation.d.ts +1 -1
- package/dist/curp-validation.esm.js +2 -2
- package/dist/{curpValidationManager-B-z9q5V3.esm.js → curpValidationManager-DNpC3wyf.esm.js} +3 -2
- package/dist/{curpValidationManager-C9sqoh9n.d.ts → curpValidationManager-z8428oCM.d.ts} +1 -1
- package/dist/{curpValidationStateMachine-vDEFLMPw.esm.js → curpValidationStateMachine-B3iVsDyt.esm.js} +28 -20
- package/dist/custom-fields.esm.js +1 -1
- package/dist/custom-watchlist.esm.js +2 -2
- package/dist/{customFieldsManager-D1ex2cFM.esm.js → customFieldsManager-CvI-pDT3.esm.js} +2 -2
- package/dist/{customWatchlistManager-CTI-SGk0.esm.js → customWatchlistManager-BuHtUb0y.esm.js} +2 -2
- package/dist/{customWatchlistStateMachine-hmRd0f2I.esm.js → customWatchlistStateMachine-CiVD9wyF.esm.js} +1 -1
- package/dist/{deepsightService-CKTYDIXD.esm.js → deepsightLoader-B7DEYoyY.esm.js} +40 -74
- package/dist/{createCameraCycleOwnership-Dj_LHUvN.esm.js → desktopCameraElection-BGMtYwk3.esm.js} +177 -40
- package/dist/device.esm.js +2 -2
- package/dist/document-capture.d.ts +3 -3
- package/dist/document-capture.esm.js +2 -2
- package/dist/{documentCaptureManager-DkyDtm3Y.d.ts → documentCaptureManager-CD5iQiUI.d.ts} +37 -4
- package/dist/{documentCaptureManager-DUJwpKC5.esm.js → documentCaptureManager-DLPqruXJ.esm.js} +27 -19
- package/dist/{documentCaptureStateMachine-B8i7GnLh.esm.js → documentCaptureStateMachine-DCvWQhFG.esm.js} +105 -56
- package/dist/dynamic-forms.d.ts +2 -2
- package/dist/dynamic-forms.esm.js +2 -2
- package/dist/{dynamicFormsManager-C0dHs1ty.d.ts → dynamicFormsManager-9kwY8Bf5.d.ts} +1 -1
- package/dist/{dynamicFormsManager-DiKYjcF3.esm.js → dynamicFormsManager-DfqCEPg9.esm.js} +2 -2
- package/dist/{dynamicFormsStateMachine-DEI45xYW.esm.js → dynamicFormsStateMachine-USQMB-uV.esm.js} +2 -2
- package/dist/ekyb.d.ts +4 -4
- package/dist/ekyb.esm.js +3 -3
- package/dist/{ekybManager-BaZ_7CEu.d.ts → ekybManager-BLOkwmWO.d.ts} +2 -2
- package/dist/{ekybManager-8WLkNcqg.esm.js → ekybManager-CR8YSYux.esm.js} +2 -2
- package/dist/{ekybStateMachine-BLRT45Ex.esm.js → ekybStateMachine-kHwdz6hm.esm.js} +28 -44
- package/dist/ekybUtils-Cw8Ta9Qi.esm.js +140 -0
- package/dist/ekyc.d.ts +4 -3
- package/dist/ekyc.esm.js +3 -3
- package/dist/{ekycManager-DW-ynodd.d.ts → ekycManager-DlGIn9wA.d.ts} +2 -1
- package/dist/{ekycManager-BO-Lui3t.esm.js → ekycManager-DymCvmVB.esm.js} +2 -2
- package/dist/ekycStateMachine-CoFCUJ2z.esm.js +7578 -0
- package/dist/ekycUtils-GRuMELYr.esm.js +1472 -0
- package/dist/electronic-signature.esm.js +1 -1
- package/dist/{electronicSignatureManager-CcIMOb_Y.esm.js → electronicSignatureManager-BCE3uA3z.esm.js} +4 -4
- package/dist/email.esm.js +2 -2
- package/dist/{emailManager-ButFktRm.esm.js → emailManager-CGoE3CUe.esm.js} +2 -2
- package/dist/{emailStateMachine-BXtlC0NV.esm.js → emailStateMachine-KgHfDNvM.esm.js} +32 -20
- package/dist/{events-Du2A4-Qr.esm.js → events-ggpBBaZ8.esm.js} +2 -2
- package/dist/events.esm.js +1 -1
- package/dist/extensibility.d.ts +37 -22
- package/dist/extensibility.esm.js +36 -35
- package/dist/{externalFetch-DrR9xshk.esm.js → externalFetch-CQY41QT1.esm.js} +4 -1
- package/dist/face-match.d.ts +1 -1
- package/dist/face-match.esm.js +2 -2
- package/dist/{faceCaptureManagerFactory-1hzeS_rB.d.ts → faceCaptureManagerFactory-DV2ULUYS.d.ts} +71 -66
- package/dist/{faceCaptureManagerFactory-BlGvXzXA.esm.js → faceCaptureManagerFactory-Dp90bedH.esm.js} +4 -4
- package/dist/{faceCaptureSetup-TY8RXc2N.esm.js → faceCaptureSetup-ZfiWg0fo.esm.js} +84 -457
- package/dist/{faceMatchManager-DWFUQjMQ.esm.js → faceMatchManager-D2xKPjjQ.esm.js} +2 -2
- package/dist/{faceMatchManager-DIgG-UFS.d.ts → faceMatchManager-Z4UDLwAv.d.ts} +16 -7
- package/dist/{faceMatchStateMachine-CUCvlydD.esm.js → faceMatchStateMachine-CUvwiQi9.esm.js} +40 -27
- package/dist/{feature-management-B5rR10uS.esm.js → feature-management-BbCIA4og.esm.js} +35 -21
- package/dist/feature-management.esm.js +1 -1
- package/dist/field-comparison.esm.js +1 -1
- package/dist/{fieldComparisonManager-v3knTYV_.esm.js → fieldComparisonManager-DgDbEeFZ.esm.js} +2 -2
- package/dist/fiscal-qr.esm.js +1 -1
- package/dist/{fiscalQrManager-Dt9fHG7h.esm.js → fiscalQrManager-BZeklojR.esm.js} +4 -4
- package/dist/flow-events.d.ts +1 -1
- package/dist/flow.d.ts +10 -10
- package/dist/flow.esm.js +10 -9
- package/dist/{flowCompletionService-BDI5QpfR.esm.js → flowCompletionService-CcCnPs_T.esm.js} +2 -2
- package/dist/{flowServices-roD0oIQL.esm.js → flowServices-Dmnc8Rye.esm.js} +69 -185
- package/dist/geolocation.d.ts +1 -1
- package/dist/geolocation.esm.js +2 -2
- package/dist/{geolocationManager-Dn24g1fl.d.ts → geolocationManager-6e1i9UIR.d.ts} +15 -17
- package/dist/{geolocationManager-DnONzWL5.esm.js → geolocationManager-BJJ3m_I8.esm.js} +6 -8
- package/dist/{geolocationStateMachine-eWy_G4Os.esm.js → geolocationStateMachine-CTI3m4Ie.esm.js} +12 -8
- package/dist/{getDeviceClass-bsWdEDxP.esm.js → getDeviceClass-DoIWuKI8.esm.js} +1 -1
- package/dist/government-validation.esm.js +2 -2
- package/dist/{governmentValidationManager-BtXWHICu.esm.js → governmentValidationManager-CjChjZ3C.esm.js} +2 -2
- package/dist/{governmentValidationStateMachine-COL-Vs48.esm.js → governmentValidationStateMachine-AEbn3Afi.esm.js} +1 -1
- package/dist/home.d.ts +1 -1
- package/dist/home.esm.js +1 -1
- package/dist/http.esm.js +1 -1
- package/dist/id-ocr.d.ts +1 -1
- package/dist/id-ocr.esm.js +2 -2
- package/dist/id-selfie-flow.d.ts +1 -1
- package/dist/id-selfie-flow.esm.js +10 -9
- package/dist/id-verification.esm.js +2 -2
- package/dist/id.d.ts +3 -16
- package/dist/id.esm.js +4 -4
- package/dist/{idCaptureDefaults-BGsG2OAs.esm.js → idCaptureDefaults-Dszuq9ng.esm.js} +3 -3
- package/dist/{idCaptureManager-BrfYjCm_.esm.js → idCaptureManager-B3oR4RnA.esm.js} +64 -17
- package/dist/{idCaptureManager-0M02hSuC.d.ts → idCaptureManager-CCA2D1Ah.d.ts} +68 -5
- package/dist/{idCaptureServices-BSj6EH2l.esm.js → idCaptureServices-DK0QboqT.esm.js} +29 -198
- package/dist/{idCaptureStateMachine-dXKBYHQp.esm.js → idCaptureStateMachine-zzar9MPy.esm.js} +914 -536
- package/dist/{idOcrManager-DT3kPIB3.d.ts → idOcrManager-BTdHlJ9D.d.ts} +1 -1
- package/dist/{idOcrManager-D3-HNMXP.esm.js → idOcrManager-xyEZNOBa.esm.js} +2 -2
- package/dist/{idOcrStateMachine-DyENX6Ki.esm.js → idOcrStateMachine-DNKXh4Rn.esm.js} +2 -2
- package/dist/{idVerificationManager-iWz7Avkr.esm.js → idVerificationManager-DdnvYfgN.esm.js} +2 -2
- package/dist/{idVerificationStateMachine-CL1kUdBe.esm.js → idVerificationStateMachine-DtIBCa32.esm.js} +1 -1
- package/dist/identity-reuse.esm.js +2 -2
- package/dist/{identityReuseManager-CD1ucp1d.esm.js → identityReuseManager-CcpovlfD.esm.js} +2 -2
- package/dist/{identityReuseStateMachine-DfV81wQC.esm.js → identityReuseStateMachine-DxZFWy47.esm.js} +1 -1
- package/dist/{index-CKQ9QBZP.d.ts → index-DC0P2Vzw.d.ts} +1 -1
- package/dist/{index-BKOWUhxG.d.ts → index-DEfwds5y.d.ts} +55 -8
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/{invokeOnCaptureCallback-DYrkOXO6.esm.js → invokeOnCaptureCallback-BJ0GVHGr.esm.js} +1 -1
- package/dist/kyb-checks.d.ts +3 -0
- package/dist/kyb-checks.esm.js +3 -0
- package/dist/kybChecksManager-CblEL97E.d.ts +95 -0
- package/dist/kybChecksManager-DpGOp4Su.esm.js +89 -0
- package/dist/kybChecksStateMachine-B43NAnv7.esm.js +718 -0
- package/dist/mandatory-consent.d.ts +2 -2
- package/dist/mandatory-consent.esm.js +2 -2
- package/dist/{mandatoryConsentManager-Cwqx1nK7.esm.js → mandatoryConsentManager-B4vCYslr.esm.js} +4 -3
- package/dist/{mandatoryConsentManager-BQ43yndC.d.ts → mandatoryConsentManager-B88Sm5nd.d.ts} +10 -3
- package/dist/{mandatoryConsentStateMachine-pXWqAHo_.esm.js → mandatoryConsentStateMachine-DWslYPA3.esm.js} +20 -7
- package/dist/mediaRecorderOptions-B9-IEVtV.esm.js +70 -0
- package/dist/multipartRecordingService-BTqkHGG9.esm.js +407 -0
- package/dist/nationalIds-B91f_RuB.esm.js +99 -0
- package/dist/{permissionGuards-gcy3U0SL.esm.js → permissionGuards-DFV-Ws0a.esm.js} +1 -1
- package/dist/{permissionServices-Ca-tSNhT.esm.js → permissionServices-D190ATGD.esm.js} +11 -9
- package/dist/phone-number.d.ts +7 -1
- package/dist/phone-number.esm.js +15 -2
- package/dist/phone.d.ts +1 -1
- package/dist/phone.esm.js +2 -2
- package/dist/phoneFormat-JJNaWthV.esm.js +75 -0
- package/dist/{phoneManager-BO-LTih5.d.ts → phoneManager-6nrJkvkG.d.ts} +5 -0
- package/dist/{phoneManager-KKUq-Vgo.esm.js → phoneManager-Dy5tODCU.esm.js} +3 -3
- package/dist/phoneServices-DJgyOzU2.esm.js +77 -0
- package/dist/{phoneStateMachine-D2QWS2cu.esm.js → phoneStateMachine-DnlPhnw7.esm.js} +54 -82
- package/dist/{phoneValidation-DnBcNUNh.esm.js → phoneValidation-OggtfjRt.esm.js} +1 -2
- package/dist/{platform-DkcRc9JV.esm.js → platform-aPh7gTWh.esm.js} +15 -1
- package/dist/processFaceMatch-Bst83HaS.esm.js +21 -0
- package/dist/qe-signature.esm.js +1 -1
- package/dist/recordingService-CTko6Cjn.esm.js +397 -0
- package/dist/redirect-to-mobile.d.ts +2 -2
- package/dist/redirect-to-mobile.esm.js +2 -2
- package/dist/{redirectToMobileManager-uHW3dyuQ.esm.js → redirectToMobileManager-CgGaT2NP.esm.js} +5 -4
- package/dist/{redirectToMobileManager-CVsvpVbQ.d.ts → redirectToMobileManager-Dm9ctRCC.d.ts} +3 -1
- package/dist/{redirectToMobileStateMachine-b-H-ipGM.esm.js → redirectToMobileStateMachine-CbhN8uVN.esm.js} +65 -26
- package/dist/resolveForm-O7-r79VA.esm.js +351 -0
- package/dist/{runChildModule-BF_atgNx.esm.js → runChildModule-BffFArwl.esm.js} +3 -3
- package/dist/{sdkVersion-CsIbltJF.esm.js → sdkVersion-CDd_gaR7.esm.js} +1 -1
- package/dist/selfie.d.ts +4 -4
- package/dist/selfie.esm.js +10 -10
- package/dist/{selfieErrorUtils-BY0-YbPW.esm.js → selfieErrorUtils-f4MgAG2A.esm.js} +1 -1
- package/dist/{selfieManager-BJdNu_nd.d.ts → selfieManager-DmZFzs1-.d.ts} +1 -1
- package/dist/{selfieManager-vAAwzsHk.esm.js → selfieManager-hopelYEk.esm.js} +5 -5
- package/dist/{selfieStateMachine-BFVp3ElQ.esm.js → selfieStateMachine-DaZIVv3Q.esm.js} +3 -3
- package/dist/{session-CpwfoVdH.esm.js → session-CdSX4wsZ.esm.js} +77 -9
- package/dist/session.d.ts +96 -10
- package/dist/session.esm.js +7 -6
- package/dist/{sessionInitializer-BTjYgE-V.esm.js → sessionInitializer-DsL7X2j9.esm.js} +465 -206
- package/dist/{setup-YPKTUCY5.d.ts → setup-D9qt8YVU.d.ts} +2 -2
- package/dist/{setup-BInNAvQw.esm.js → setup-DDahygZs.esm.js} +44 -30
- package/dist/signature.esm.js +2 -2
- package/dist/{signatureManager-f_dPAGXn.esm.js → signatureManager-CwqjcxPg.esm.js} +2 -2
- package/dist/{signatureStateMachine-C-nUq_oq.esm.js → signatureStateMachine-DBVDd1Eu.esm.js} +1 -1
- package/dist/{stats-BEvexnKC.esm.js → stats-CatA2dea.esm.js} +1 -1
- package/dist/stats.esm.js +1 -1
- package/dist/textRules-D4NRinKY.d.ts +41 -0
- package/dist/{tri-xzRLIIMN.esm.js → tri-DG6priFa.esm.js} +142 -8
- package/dist/tri.d.ts +1 -1
- package/dist/tri.esm-CzTNi5Q_.esm.js +3826 -0
- package/dist/tri.esm.js +1 -1
- package/dist/{trueSightService-BMT-TubT.esm.js → trueSightService-GuLthUVK.esm.js} +19 -10
- package/dist/trust-graph.esm.js +1 -1
- package/dist/types-B9C8W01q.d.ts +34 -0
- package/dist/{types-yPH8lAH-.d.ts → types-BEVHQbbC.d.ts} +2 -2
- package/dist/{types-BAxn7MpY.d.ts → types-BPm1JSu7.d.ts} +123 -48
- package/dist/{types-0L-eFDmr.d.ts → types-BgRHw-dR.d.ts} +1 -1
- package/dist/{types-B6HsSzpk.d.ts → types-CRaFu6wS.d.ts} +6 -3
- package/dist/types-CTaL0XJz.d.ts +80 -0
- package/dist/{types-Ckir_BEs.d.ts → types-Cd0J0F9D.d.ts} +1 -1
- package/dist/{types-CK8Jbjkp.d.ts → types-Csh8vzPo.d.ts} +1 -1
- package/dist/types-CuMJ2M7D.d.ts +210 -0
- package/dist/{types-DUnFZ08M.d.ts → types-CyNndVAT.d.ts} +16 -8
- package/dist/{types-DPIDuhut.d.ts → types-DNVzoRvi.d.ts} +2 -1
- package/dist/types-J6g6iKe_.d.ts +6 -0
- package/dist/{urlUtils-6jsE6rKp.esm.js → urlUtils-eYiyWjh0.esm.js} +4 -1
- package/dist/video-selfie.d.ts +8 -8
- package/dist/video-selfie.esm.js +97 -22
- package/dist/{videoSelfieCameraWarmer-D1xA0u8y.esm.js → videoSelfieCameraWarmer-e3irGfcO.esm.js} +18 -21
- package/dist/{videoSelfieStepDetector-CGsTltqB.d.ts → videoSelfieStepDetector-Dv3Mgws-.d.ts} +9 -4
- package/dist/virtualCameraCheck-eFOm2C9q.esm.js +27 -0
- package/dist/{warmup-BElYWRh7.esm.js → warmup-DtB0DJpl.esm.js} +198 -27
- package/dist/wasm.d.ts +2 -2
- package/dist/wasm.esm.js +3 -3
- package/dist/{wasmDsFlagSync-CYj5LL9z.esm.js → wasmDsFlagSync-BtiR5pig.esm.js} +1 -1
- package/dist/wasmMetadataVersionSync-U8EFUr1T.esm.js +27 -0
- package/dist/{wasmWebClient-BjZw_7OB.esm.js → wasmWebClient-BDrax6Eu.esm.js} +55 -26
- package/dist/watchlist-for-business.d.ts +2 -1
- package/dist/watchlist-for-business.esm.js +2 -2
- package/dist/watchlist.esm.js +2 -2
- package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts} +54 -18
- package/dist/{watchlistForBusinessManager-CZZOFkGl.esm.js → watchlistForBusinessManager-DqUpAEj_.esm.js} +37 -7
- package/dist/watchlistForBusinessStateMachine-DdaPl2PS.esm.js +166 -0
- package/dist/{watchlistManager-DXtX94SN.esm.js → watchlistManager-CdpXzT4B.esm.js} +2 -2
- package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-ofHW_lPk.esm.js} +1 -1
- package/dist/workflow.d.ts +5 -2
- package/dist/workflow.esm.js +60 -50
- package/package.json +12 -5
- package/dist/IBrowserEnvironmentCapability-DEaRRk-R.esm.js +0 -9
- package/dist/addressSearch-DPjIKJrX.esm.js +0 -563
- package/dist/deepsightLoader-DeNvGU3c.esm.js +0 -55
- package/dist/ekycStateMachine-CDnI_NRq.esm.js +0 -1443
- package/dist/ekycUtils-zY8CdKJL.esm.js +0 -300
- package/dist/thumbmark.esm-CRc0cYvz.esm.js +0 -1242
- package/dist/tri.esm-BIjHhBJ2.esm.js +0 -2620
- package/dist/types-BvLo3U4u.d.ts +0 -134
- package/dist/types-zOgZqMni.d.ts +0 -6
- package/dist/watchlistForBusinessStateMachine-B66E7jud.esm.js +0 -78
- /package/dist/{types-BSBzhHRH2.d.ts → types-BSBzhHRH.d.ts} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
2
|
//#region ../infra/src/wasm/wasmIntegrityManifest.ts
|
|
3
3
|
/** SHA-256 digests of the official WASM release files this SDK loads. */
|
|
4
4
|
const WASM_INTEGRITY_MANIFEST = {
|
|
5
|
-
wasmVersion: "v2.14.
|
|
5
|
+
wasmVersion: "v2.14.54-pre6",
|
|
6
6
|
files: {
|
|
7
7
|
"models/current/age_estimation_v2_2_2_fp16.ortmodelv2": "70bd372b5e140ea8e9773a25d371cb65e5a9090651fdfe73ab6fc7ce25d59c83",
|
|
8
8
|
"models/current/barcode_enhance_896x224_fp16.ortmodelv2": "bccecd74abf48181efb95bf020784b7e50d37ae255bf89c14c2c5186976279e0",
|
|
@@ -24,14 +24,14 @@ const WASM_INTEGRITY_MANIFEST = {
|
|
|
24
24
|
"models/legacy/mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2": "e41887f75b284ba1f973f2a26209bf365da8a587d266492b642e5b7c36716069",
|
|
25
25
|
"models/legacy/ondevice_physical_liveness_v2_1_fp16.ortmodelv2": "405eee9fd961c48fff608246ef579dc8ce9f0b5ce51361e05dac7d9afcf9162d",
|
|
26
26
|
"models/legacy/selfie_bf_angles_192x192_opset9_fp16.ortmodelv2": "1c8dda528d5111fa7b4272ffabca7cf0a59099f57258aaece7262974aebafc4a",
|
|
27
|
-
"webLib.js": "
|
|
28
|
-
"webLib.wasm": "
|
|
29
|
-
"webLibSimd.js": "
|
|
30
|
-
"webLibSimd.wasm": "
|
|
27
|
+
"webLib.js": "0db12df86a8b0d5c205486e508d391f0df3e69d652ab4dc30e06f9237ef89caf",
|
|
28
|
+
"webLib.wasm": "72a0a5b611af6ec1dfd2d77a61de72477f385d76569259d9c74c2ea116ffab42",
|
|
29
|
+
"webLibSimd.js": "7bc83d69c4d0b6c6e2a5e620ffa49405570936f5d01c3ad9a0c82548f72ca2f8",
|
|
30
|
+
"webLibSimd.wasm": "371af5334158b4f6b437c74f31fb55181a8d1ced7ad5e718e141f348c90a3029"
|
|
31
31
|
},
|
|
32
32
|
dist: {
|
|
33
|
-
"webLib.js": "
|
|
34
|
-
"webLibSimd.js": "
|
|
33
|
+
"webLib.js": "87a490cc43662337ad3e8540f34b3a81eeb07c98e1bb0817a0e165bf9d9a0117",
|
|
34
|
+
"webLibSimd.js": "ea683348b881de418dbb6c1447ba89bd592d16540ce899259c6d404f52568722"
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
//#endregion
|
|
@@ -314,7 +314,7 @@ function deriveSiblingJsPath(wasmPath) {
|
|
|
314
314
|
//#region ../infra/src/wasm/wasmDefaults.ts
|
|
315
315
|
const WASM_CDN_BASE_URL = "https://cdn.incodesmile.com/ml-wasm-kit-release";
|
|
316
316
|
/** The WASM version bundled and tested with this SDK release. */
|
|
317
|
-
const DEFAULT_WASM_VERSION = "v2.14.
|
|
317
|
+
const DEFAULT_WASM_VERSION = "v2.14.54-pre6";
|
|
318
318
|
const PATH_KEYS = [
|
|
319
319
|
"wasmPath",
|
|
320
320
|
"wasmSimdPath",
|
|
@@ -425,7 +425,7 @@ const BARCODE_ENHANCE_MODEL_FILE = WASM_MODEL_FILES.barcode;
|
|
|
425
425
|
* NOT part of any warmup model bundle.
|
|
426
426
|
*/
|
|
427
427
|
function getBarcodeEnhanceModelUrl(modelsBasePath, variant = "current") {
|
|
428
|
-
const source = buildModelVariantSources(modelsBasePath ?? `${WASM_CDN_BASE_URL}/v2.14.
|
|
428
|
+
const source = buildModelVariantSources(modelsBasePath ?? `${WASM_CDN_BASE_URL}/v2.14.54-pre6/models`, BARCODE_ENHANCE_MODEL_FILE);
|
|
429
429
|
return typeof source === "string" ? source : source[variant];
|
|
430
430
|
}
|
|
431
431
|
/**
|
|
@@ -597,6 +597,27 @@ async function importVerifiedGlue(bytes) {
|
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
599
|
//#endregion
|
|
600
|
+
//#region ../infra/src/wasm/wasmStartGate.ts
|
|
601
|
+
/**
|
|
602
|
+
* SDK 2's own addition, not mirrored from ml-wasm-kit.
|
|
603
|
+
*
|
|
604
|
+
* Holds back the WASM module load while another fingerprint module on the
|
|
605
|
+
* page initializes, such as TRI's fpSignals build. ML-Wasm's integration
|
|
606
|
+
* guide: on the legacy build the two modules must be initialized one after
|
|
607
|
+
* the other, since both use `window.wasmArrayBuffer`.
|
|
608
|
+
*/
|
|
609
|
+
let startGate = null;
|
|
610
|
+
/** Sets what the next module load waits for; `null` removes the wait. */
|
|
611
|
+
function setWasmStartGate(gate) {
|
|
612
|
+
startGate = gate;
|
|
613
|
+
}
|
|
614
|
+
/** Settles with the gate. A gate that rejects or throws never blocks the load. */
|
|
615
|
+
async function waitForWasmStartGate() {
|
|
616
|
+
try {
|
|
617
|
+
await startGate?.();
|
|
618
|
+
} catch {}
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
600
621
|
//#region ../infra/src/wasm/wasmStorageFallback.ts
|
|
601
622
|
/**
|
|
602
623
|
* SDK-local compatibility fallback for ml-wasm-kit releases whose embind
|
|
@@ -825,11 +846,8 @@ async function resolveGlue(loader, glueCodePath, slot) {
|
|
|
825
846
|
if (!glueCodePath) throw new Error("WASM glue code is required");
|
|
826
847
|
return await importGlueAt(glueCodePath, slot);
|
|
827
848
|
}
|
|
828
|
-
async function instantiate(factory,
|
|
829
|
-
window.wasmArrayBuffer =
|
|
830
|
-
kind: "binary",
|
|
831
|
-
slot
|
|
832
|
-
});
|
|
849
|
+
async function instantiate(factory, wasmBinary, showLogs = false) {
|
|
850
|
+
window.wasmArrayBuffer = wasmBinary;
|
|
833
851
|
return await factory({
|
|
834
852
|
wasmBinary: window.wasmArrayBuffer,
|
|
835
853
|
print: (text) => {
|
|
@@ -866,16 +884,20 @@ async function loadWasmModule(config) {
|
|
|
866
884
|
if (loadPromise) return loadPromise;
|
|
867
885
|
const startedAtMs = getTimestamp();
|
|
868
886
|
loadPromise = (async () => {
|
|
887
|
+
await waitForWasmStartGate();
|
|
869
888
|
let storageFallbackLease = null;
|
|
870
889
|
try {
|
|
871
890
|
storageFallbackLease = acquireWasmStorageFallback();
|
|
872
891
|
const wantSimd = config.useSimd !== false;
|
|
873
892
|
const simdBinary = config.wasmSimdPath ?? config.wasmPath;
|
|
874
893
|
if (wantSimd && simdBinary !== config.wasmPath) try {
|
|
875
|
-
const simdFactory = await resolveGlue(config.loadGlueSimd, typeof simdBinary === "string" ? config.glueCodeSimdPath || deriveSiblingJsPath(simdBinary) : config.glueCodeSimdPath, "webLibSimd.js")
|
|
894
|
+
const [simdFactory, simdBytes] = await Promise.all([resolveGlue(config.loadGlueSimd, typeof simdBinary === "string" ? config.glueCodeSimdPath || deriveSiblingJsPath(simdBinary) : config.glueCodeSimdPath, "webLibSimd.js"), resolveWasmSource(simdBinary, {
|
|
895
|
+
kind: "binary",
|
|
896
|
+
slot: "webLibSimd.wasm"
|
|
897
|
+
})]);
|
|
876
898
|
window.Module = simdFactory;
|
|
877
899
|
const result = {
|
|
878
|
-
wasmModule: await instantiate(simdFactory,
|
|
900
|
+
wasmModule: await instantiate(simdFactory, simdBytes, config.showLogs),
|
|
879
901
|
simdUsed: true
|
|
880
902
|
};
|
|
881
903
|
loadedResult = result;
|
|
@@ -896,10 +918,13 @@ async function loadWasmModule(config) {
|
|
|
896
918
|
message: `simd load failed falling back ${describeLoadError(simdError)}`
|
|
897
919
|
});
|
|
898
920
|
}
|
|
899
|
-
const nonSimdFactory = await resolveGlue(config.loadGlue, config.glueCodePath, "webLib.js")
|
|
921
|
+
const [nonSimdFactory, nonSimdBytes] = await Promise.all([resolveGlue(config.loadGlue, config.glueCodePath, "webLib.js"), resolveWasmSource(config.wasmPath, {
|
|
922
|
+
kind: "binary",
|
|
923
|
+
slot: "webLib.wasm"
|
|
924
|
+
})]);
|
|
900
925
|
window.Module = nonSimdFactory;
|
|
901
926
|
const result = {
|
|
902
|
-
wasmModule: await instantiate(nonSimdFactory,
|
|
927
|
+
wasmModule: await instantiate(nonSimdFactory, nonSimdBytes, config.showLogs),
|
|
903
928
|
simdUsed: false
|
|
904
929
|
};
|
|
905
930
|
loadedResult = result;
|
|
@@ -1020,7 +1045,7 @@ function resetWasmCallDiagnostics() {
|
|
|
1020
1045
|
//#endregion
|
|
1021
1046
|
//#region ../infra/src/wasm/wasmCallUtils.ts
|
|
1022
1047
|
/**
|
|
1023
|
-
* Poll bound applied to the ML long-poll call sites (`
|
|
1048
|
+
* Poll bound applied to the ML long-poll call sites (`poc` / `rsp` in
|
|
1024
1049
|
* `utilityWasmApi.ts`).
|
|
1025
1050
|
*
|
|
1026
1051
|
* Count-based, not deadline-based: the poll loop yields with `setTimeout(0)`,
|
|
@@ -1028,11 +1053,15 @@ function resetWasmCallDiagnostics() {
|
|
|
1028
1053
|
* would false-trip whenever the user backgrounds the page. A count bounds the
|
|
1029
1054
|
* number of C++ invocations regardless of how slowly the event loop turns.
|
|
1030
1055
|
*
|
|
1031
|
-
* 3000 is deliberately generous.
|
|
1032
|
-
*
|
|
1033
|
-
*
|
|
1034
|
-
*
|
|
1035
|
-
*
|
|
1056
|
+
* 3000 is deliberately generous. The pre-capture check (`prc`, until
|
|
1057
|
+
* ml-wasm-kit v2.14.52 moved it into the camera step) alone burned ~750 idle
|
|
1058
|
+
* polls waiting on the ~3s of camera frames the C++ side needs before it
|
|
1059
|
+
* reports done, so the bound sits well above the legitimate worst case. It
|
|
1060
|
+
* exists to break a permanently stuck poll that would otherwise hold the ML
|
|
1061
|
+
* semaphore forever and freeze detection — not to enforce a latency budget.
|
|
1062
|
+
* The camera step itself (`cst`) is deliberately unbounded: an open permission
|
|
1063
|
+
* prompt or a hidden tab parks it, and `rcc` is the only cancel — see
|
|
1064
|
+
* `WasmRuntime.startCameraCycle`.
|
|
1036
1065
|
*/
|
|
1037
1066
|
const ML_CALL_MAX_POLLS = 3e3;
|
|
1038
1067
|
/**
|
|
@@ -1271,4 +1300,4 @@ function ensureReady() {
|
|
|
1271
1300
|
return webClientApi;
|
|
1272
1301
|
}
|
|
1273
1302
|
//#endregion
|
|
1274
|
-
export {
|
|
1303
|
+
export { WASM_PIPELINE_OPTIONAL_MODEL_NAMES as A, getBarcodeEnhanceModelUrl as C, WASM_PIPELINE_LAZY_MODEL_NAMES as D, WASM_MODEL_FILES as E, setWasmIntegrityObserver as F, missingWasmModelError as M, resolveWasmSource as N, WASM_PIPELINE_MODELS as O, reportWasmIntegritySummary as P, buildWasmConfigFromBasePath as S, resolveWasmConfig as T, emitWasmDiagnostic as _, setWebApiHttpTransport as a, DEFAULT_WASM_VERSION as b, wasmCallWrapper as c, noteUnlockedCallStart as d, rearmWasmCallDiagnostics as f, setWasmStartGate as g, acquireWasmStorageFallback as h, initializeWasmWebClient as i, buildModelVariantSources as j, WASM_PIPELINE_MODEL_NAMES as k, notePipelineStatePulled as l, loadWasmModule as m, createWebApiHostAdapter as n, setupWasmConnection as o, resetWasmCallDiagnostics as p, executeWasmRequest as r, ML_CALL_MAX_POLLS as s, WasmWebClientError as t, noteUnlockedCallEnd as u, setWasmDiagnosticsHandler as v, isDefaultCdnWasmConfig as w, buildDefaultWasmConfig as x, SemaphoreProvider as y };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as WatchlistForBusinessValidationErrors, t as WatchlistForBusinessConfig } from "./types-B9C8W01q.js";
|
|
2
|
+
import { a as createWatchlistForBusinessManager, c as watchlistForBusinessMachine, i as WatchlistForBusinessState, n as WatchlistForBusinessFormState, o as createWatchlistForBusinessManagerFromActor, r as WatchlistForBusinessManager, s as WatchlistForBusinessActor, t as WatchlistForBusinessFinishedState } from "./watchlistForBusinessManager-DX2AyM4Y.js";
|
|
2
3
|
export { type WatchlistForBusinessActor, type WatchlistForBusinessConfig, type WatchlistForBusinessFinishedState, type WatchlistForBusinessFormState, type WatchlistForBusinessManager, type WatchlistForBusinessState, type WatchlistForBusinessValidationErrors, createWatchlistForBusinessManager, createWatchlistForBusinessManagerFromActor, watchlistForBusinessMachine };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as createWatchlistForBusinessManagerFromActor, t as createWatchlistForBusinessManager } from "./watchlistForBusinessManager-
|
|
1
|
+
import { n as watchlistForBusinessMachine } from "./watchlistForBusinessStateMachine-DdaPl2PS.esm.js";
|
|
2
|
+
import { n as createWatchlistForBusinessManagerFromActor, t as createWatchlistForBusinessManager } from "./watchlistForBusinessManager-DqUpAEj_.esm.js";
|
|
3
3
|
export { createWatchlistForBusinessManager, createWatchlistForBusinessManagerFromActor, watchlistForBusinessMachine };
|
package/dist/watchlist.esm.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as watchlistMachine } from "./watchlistStateMachine-
|
|
2
|
-
import { t as createWatchlistManager } from "./watchlistManager-
|
|
1
|
+
import { t as watchlistMachine } from "./watchlistStateMachine-ofHW_lPk.esm.js";
|
|
2
|
+
import { t as createWatchlistManager } from "./watchlistManager-CdpXzT4B.esm.js";
|
|
3
3
|
export { createWatchlistManager, watchlistMachine };
|
package/dist/{watchlistForBusinessManager-B3GDPZrr.d.ts → watchlistForBusinessManager-DX2AyM4Y.d.ts}
RENAMED
|
@@ -1,36 +1,47 @@
|
|
|
1
1
|
import { i as ActorRefFrom } from "./spawn-D9jgw9pW.js";
|
|
2
2
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
3
3
|
import "./Actor-DpTj5PFb.js";
|
|
4
|
+
import { n as WatchlistForBusinessValidationErrors, t as WatchlistForBusinessConfig } from "./types-B9C8W01q.js";
|
|
4
5
|
//#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.d.ts
|
|
5
6
|
declare const watchlistForBusinessMachine: any;
|
|
6
7
|
type WatchlistForBusinessMachine = typeof watchlistForBusinessMachine;
|
|
7
8
|
//#endregion
|
|
8
9
|
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.d.ts
|
|
9
|
-
type
|
|
10
|
-
|
|
11
|
-
//#region src/modules/watchlist-for-business/types.d.ts
|
|
12
|
-
/**
|
|
13
|
-
* Configuration for the watchlist-for-business module.
|
|
14
|
-
*
|
|
15
|
-
* No server-side configuration is required — the module collects
|
|
16
|
-
* country and business name from the user and submits them to the
|
|
17
|
-
* business watchlist endpoint.
|
|
18
|
-
*/
|
|
19
|
-
type WatchlistForBusinessConfig = Record<string, never>;
|
|
20
|
-
type WatchlistForBusinessValidationErrors = {
|
|
21
|
-
businessName?: string;
|
|
10
|
+
type CreateWatchlistForBusinessActorOptions = {
|
|
11
|
+
config?: WatchlistForBusinessConfig;
|
|
22
12
|
};
|
|
13
|
+
type WatchlistForBusinessActor = ActorRefFrom<WatchlistForBusinessMachine>;
|
|
23
14
|
//#endregion
|
|
24
15
|
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.d.ts
|
|
25
16
|
/** Waiting for `load()` to be called. */
|
|
26
17
|
type WatchlistForBusinessIdleState = {
|
|
27
18
|
status: 'idle';
|
|
28
19
|
};
|
|
29
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Form is ready — use `setCountry()`, `setBusinessName()`, `setTaxId()`,
|
|
22
|
+
* `setDateOfIncorporation()`, and `submit()`.
|
|
23
|
+
*/
|
|
30
24
|
type WatchlistForBusinessFormState = {
|
|
31
25
|
status: 'form';
|
|
32
26
|
country: string;
|
|
33
27
|
businessName: string;
|
|
28
|
+
/** Optional. Sent only when `showTaxId` is true and the value is not blank. */
|
|
29
|
+
taxId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Optional, `YYYY-MM-DD`. Sent only when `showDateOfIncorporation` is true
|
|
32
|
+
* and the value is not blank.
|
|
33
|
+
*/
|
|
34
|
+
dateOfIncorporation: string;
|
|
35
|
+
/** Whether the module config enables the optional Tax ID input. */
|
|
36
|
+
showTaxId: boolean;
|
|
37
|
+
/** Whether the module config enables the optional date-of-incorporation input. */
|
|
38
|
+
showDateOfIncorporation: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Latest allowed date of incorporation (`YYYY-MM-DD`): today in the user's
|
|
41
|
+
* local time. Use it as the date input's `max`; a later date fails submit.
|
|
42
|
+
*/
|
|
43
|
+
maxDateOfIncorporation: string;
|
|
44
|
+
/** Whether the required business name is filled. Optional fields never affect it. */
|
|
34
45
|
isValid: boolean;
|
|
35
46
|
validationErrors?: WatchlistForBusinessValidationErrors;
|
|
36
47
|
canSubmit: boolean;
|
|
@@ -59,6 +70,11 @@ type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBus
|
|
|
59
70
|
*
|
|
60
71
|
* On API error the module completes silently (fire-and-forget).
|
|
61
72
|
*
|
|
73
|
+
* @param options.config - Optional module config. `taxIdEnabled` and
|
|
74
|
+
* `dateOfIncorporationEnabled` turn on the optional Tax ID and date-of-
|
|
75
|
+
* incorporation inputs. Without config only country and business name are
|
|
76
|
+
* collected.
|
|
77
|
+
*
|
|
62
78
|
* @example Headless usage
|
|
63
79
|
* ```typescript
|
|
64
80
|
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
@@ -74,14 +90,24 @@ type WatchlistForBusinessState = WatchlistForBusinessIdleState | WatchlistForBus
|
|
|
74
90
|
* manager.stop();
|
|
75
91
|
* ```
|
|
76
92
|
*/
|
|
77
|
-
declare function createWatchlistForBusinessManager(): Manager<WatchlistForBusinessState> & {
|
|
93
|
+
declare function createWatchlistForBusinessManager(options?: CreateWatchlistForBusinessActorOptions): Manager<WatchlistForBusinessState> & {
|
|
78
94
|
/** Transitions from `idle` to the form. Must be called before any other method. */
|
|
79
95
|
load(): void;
|
|
80
96
|
/** Updates the selected country code (ISO 3166-1 alpha-2). */
|
|
81
97
|
setCountry(country: string): void;
|
|
82
98
|
/** Updates the business name field and recomputes validity. */
|
|
83
99
|
setBusinessName(value: string): void;
|
|
84
|
-
/**
|
|
100
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
101
|
+
setTaxId(value: string): void;
|
|
102
|
+
/**
|
|
103
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
104
|
+
* is not sent; a future date blocks submit.
|
|
105
|
+
*/
|
|
106
|
+
setDateOfIncorporation(value: string): void;
|
|
107
|
+
/**
|
|
108
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
109
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
110
|
+
*/
|
|
85
111
|
submit(): void;
|
|
86
112
|
};
|
|
87
113
|
declare function createWatchlistForBusinessManagerFromActor(actor: WatchlistForBusinessActor): Manager<WatchlistForBusinessState> & {
|
|
@@ -91,9 +117,19 @@ declare function createWatchlistForBusinessManagerFromActor(actor: WatchlistForB
|
|
|
91
117
|
setCountry(country: string): void;
|
|
92
118
|
/** Updates the business name field and recomputes validity. */
|
|
93
119
|
setBusinessName(value: string): void;
|
|
94
|
-
/**
|
|
120
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
121
|
+
setTaxId(value: string): void;
|
|
122
|
+
/**
|
|
123
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
124
|
+
* is not sent; a future date blocks submit.
|
|
125
|
+
*/
|
|
126
|
+
setDateOfIncorporation(value: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
129
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
130
|
+
*/
|
|
95
131
|
submit(): void;
|
|
96
132
|
};
|
|
97
133
|
type WatchlistForBusinessManager = ReturnType<typeof createWatchlistForBusinessManager>;
|
|
98
134
|
//#endregion
|
|
99
|
-
export { createWatchlistForBusinessManager as a,
|
|
135
|
+
export { createWatchlistForBusinessManager as a, watchlistForBusinessMachine as c, WatchlistForBusinessState as i, WatchlistForBusinessFormState as n, createWatchlistForBusinessManagerFromActor as o, WatchlistForBusinessManager as r, WatchlistForBusinessActor as s, WatchlistForBusinessFinishedState as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
3
|
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
-
import {
|
|
4
|
+
import { n as watchlistForBusinessMachine, t as getMaxDateOfIncorporation } from "./watchlistForBusinessStateMachine-DdaPl2PS.esm.js";
|
|
5
5
|
//#region src/modules/watchlist-for-business/watchlistForBusinessActor.ts
|
|
6
|
-
function createWatchlistForBusinessActor() {
|
|
7
|
-
return createActor(watchlistForBusinessMachine).start();
|
|
6
|
+
function createWatchlistForBusinessActor(options = {}) {
|
|
7
|
+
return createActor(watchlistForBusinessMachine, { input: { config: options.config ?? {} } }).start();
|
|
8
8
|
}
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/modules/watchlist-for-business/watchlistForBusinessManager.ts
|
|
@@ -38,6 +38,11 @@ function mapState(snapshot) {
|
|
|
38
38
|
status: "form",
|
|
39
39
|
country: context.country,
|
|
40
40
|
businessName: context.businessName,
|
|
41
|
+
taxId: context.taxId,
|
|
42
|
+
dateOfIncorporation: context.dateOfIncorporation,
|
|
43
|
+
showTaxId: context.config?.taxIdEnabled === true,
|
|
44
|
+
showDateOfIncorporation: context.config?.dateOfIncorporationEnabled === true,
|
|
45
|
+
maxDateOfIncorporation: getMaxDateOfIncorporation(),
|
|
41
46
|
isValid: context.isValid,
|
|
42
47
|
validationErrors: context.validationErrors,
|
|
43
48
|
canSubmit: Object.keys(context.validationErrors ?? {}).length === 0
|
|
@@ -67,7 +72,27 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
67
72
|
value
|
|
68
73
|
});
|
|
69
74
|
},
|
|
70
|
-
/**
|
|
75
|
+
/** Updates the optional Tax ID field. A blank value is not sent. */
|
|
76
|
+
setTaxId(value) {
|
|
77
|
+
actor.send({
|
|
78
|
+
type: "SET_TAX_ID",
|
|
79
|
+
value
|
|
80
|
+
});
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Updates the optional date of incorporation (`YYYY-MM-DD`). A blank value
|
|
84
|
+
* is not sent; a future date blocks submit.
|
|
85
|
+
*/
|
|
86
|
+
setDateOfIncorporation(value) {
|
|
87
|
+
actor.send({
|
|
88
|
+
type: "SET_DATE_OF_INCORPORATION",
|
|
89
|
+
value
|
|
90
|
+
});
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Submits the form. Transitions only when the business name is filled and
|
|
94
|
+
* every filled optional field is valid; otherwise sets `validationErrors`.
|
|
95
|
+
*/
|
|
71
96
|
submit() {
|
|
72
97
|
trackElementClicked?.("submit");
|
|
73
98
|
actor.send({ type: "SUBMIT" });
|
|
@@ -79,6 +104,11 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
79
104
|
*
|
|
80
105
|
* On API error the module completes silently (fire-and-forget).
|
|
81
106
|
*
|
|
107
|
+
* @param options.config - Optional module config. `taxIdEnabled` and
|
|
108
|
+
* `dateOfIncorporationEnabled` turn on the optional Tax ID and date-of-
|
|
109
|
+
* incorporation inputs. Without config only country and business name are
|
|
110
|
+
* collected.
|
|
111
|
+
*
|
|
82
112
|
* @example Headless usage
|
|
83
113
|
* ```typescript
|
|
84
114
|
* import { createWatchlistForBusinessManager } from '@incodetech/core/watchlist-for-business';
|
|
@@ -94,8 +124,8 @@ function createApi({ actor, trackElementClicked }) {
|
|
|
94
124
|
* manager.stop();
|
|
95
125
|
* ```
|
|
96
126
|
*/
|
|
97
|
-
function createWatchlistForBusinessManager() {
|
|
98
|
-
return createWatchlistForBusinessManagerFromActor(createWatchlistForBusinessActor());
|
|
127
|
+
function createWatchlistForBusinessManager(options = {}) {
|
|
128
|
+
return createWatchlistForBusinessManagerFromActor(createWatchlistForBusinessActor(options));
|
|
99
129
|
}
|
|
100
130
|
function createWatchlistForBusinessManagerFromActor(actor) {
|
|
101
131
|
return createManager({
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { n as getTimestamp } from "./IBrowserEnvironmentCapability-D7JG7ML3.esm.js";
|
|
2
|
+
import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
|
|
3
|
+
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
+
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
5
|
+
import { r as validateCNPJ, t as COUNTRIES_WITH_CNPJ_VALIDATION } from "./cnpj-Co1ottYN.esm.js";
|
|
6
|
+
//#region ../infra/src/time/epochMsToLocalIsoDate.ts
|
|
7
|
+
/**
|
|
8
|
+
* Converts an epoch-milliseconds timestamp to the user's local calendar date
|
|
9
|
+
* as `YYYY-MM-DD` — the format of an `<input type="date">` value.
|
|
10
|
+
*
|
|
11
|
+
* Use it to compare a user-entered date with "today" as the user sees it.
|
|
12
|
+
* `DateFormattingProvider.utcToIsoDateString` returns the UTC date, which is a
|
|
13
|
+
* day off near midnight outside UTC. Lives in Infra (L0) because Core cannot
|
|
14
|
+
* touch the `Date` global (`no-browser-api-in-core`); see `epochMsToIsoString`.
|
|
15
|
+
*/
|
|
16
|
+
function epochMsToLocalIsoDate(epochMs) {
|
|
17
|
+
const date = new Date(epochMs);
|
|
18
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
19
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
20
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessServices.ts
|
|
24
|
+
async function submitWatchlistForBusiness(data, signal) {
|
|
25
|
+
const res = await api.post(endpoints.watchlistForBusinessSubmit, data, { signal });
|
|
26
|
+
if (!res.ok) throw new Error(`POST ${endpoints.watchlistForBusinessSubmit} failed: ${res.status} ${res.statusText}`);
|
|
27
|
+
return res.data;
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/modules/watchlist-for-business/watchlistForBusinessStateMachine.ts
|
|
31
|
+
const DEFAULT_COUNTRY = "US";
|
|
32
|
+
const BUSINESS_NAME_REQUIRED_ERROR = "dynamicForms.fieldRequired";
|
|
33
|
+
const INVALID_TAX_ID_ERROR = "ekyb.error.invalidTaxId";
|
|
34
|
+
const FUTURE_DATE_OF_INCORPORATION_ERROR = "watchlistForBusiness.dateOfIncorporationFuture";
|
|
35
|
+
/**
|
|
36
|
+
* Country-specific Tax ID format checks, applied only to a filled Tax ID.
|
|
37
|
+
* Countries without an entry accept any value. The CNPJ countries come from
|
|
38
|
+
* the shared list eKYB also uses, so the two modules cannot drift.
|
|
39
|
+
*/
|
|
40
|
+
const TAX_ID_VALIDATORS = Object.fromEntries(COUNTRIES_WITH_CNPJ_VALIDATION.map((country) => [country, validateCNPJ]));
|
|
41
|
+
/**
|
|
42
|
+
* Latest allowed date of incorporation: today in the user's local time, as
|
|
43
|
+
* `YYYY-MM-DD`. The single source for both the future-date check and the
|
|
44
|
+
* date picker's `max` (exposed through the manager's `form` state).
|
|
45
|
+
*/
|
|
46
|
+
function getMaxDateOfIncorporation() {
|
|
47
|
+
return epochMsToLocalIsoDate(getTimestamp());
|
|
48
|
+
}
|
|
49
|
+
function computeIsValid(businessName) {
|
|
50
|
+
return businessName.trim().length > 0;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Returns the trimmed value of an optional field, or `undefined` when the
|
|
54
|
+
* field is disabled or blank — a blank optional field is never sent.
|
|
55
|
+
*/
|
|
56
|
+
function optionalValue(enabled, value) {
|
|
57
|
+
if (!enabled) return void 0;
|
|
58
|
+
const trimmed = value.trim();
|
|
59
|
+
return trimmed.length > 0 ? trimmed : void 0;
|
|
60
|
+
}
|
|
61
|
+
function getTaxId(context) {
|
|
62
|
+
return optionalValue(context.config?.taxIdEnabled, context.taxId);
|
|
63
|
+
}
|
|
64
|
+
function getDateOfIncorporation(context) {
|
|
65
|
+
return optionalValue(context.config?.dateOfIncorporationEnabled, context.dateOfIncorporation);
|
|
66
|
+
}
|
|
67
|
+
function computeValidationErrors(context) {
|
|
68
|
+
const errors = {};
|
|
69
|
+
if (!computeIsValid(context.businessName)) errors.businessName = BUSINESS_NAME_REQUIRED_ERROR;
|
|
70
|
+
const taxId = getTaxId(context);
|
|
71
|
+
const validateTaxId = TAX_ID_VALIDATORS[context.country];
|
|
72
|
+
if (taxId && validateTaxId && !validateTaxId(taxId)) errors.taxId = INVALID_TAX_ID_ERROR;
|
|
73
|
+
const dateOfIncorporation = getDateOfIncorporation(context);
|
|
74
|
+
if (dateOfIncorporation && dateOfIncorporation > getMaxDateOfIncorporation()) errors.dateOfIncorporation = FUTURE_DATE_OF_INCORPORATION_ERROR;
|
|
75
|
+
return Object.keys(errors).length > 0 ? errors : void 0;
|
|
76
|
+
}
|
|
77
|
+
function buildSubmitRequest(context) {
|
|
78
|
+
const request = {
|
|
79
|
+
countryCodes: [context.country],
|
|
80
|
+
businessName: context.businessName.trim()
|
|
81
|
+
};
|
|
82
|
+
const taxId = getTaxId(context);
|
|
83
|
+
if (taxId) request.taxId = taxId;
|
|
84
|
+
const dateOfIncorporation = getDateOfIncorporation(context);
|
|
85
|
+
if (dateOfIncorporation) request.dateOfIncorporation = dateOfIncorporation;
|
|
86
|
+
return request;
|
|
87
|
+
}
|
|
88
|
+
/** Drops one field's error once the user edits what it depends on. */
|
|
89
|
+
function withoutValidationError(context, field) {
|
|
90
|
+
if (!context.validationErrors?.[field]) return {};
|
|
91
|
+
const remaining = { ...context.validationErrors };
|
|
92
|
+
delete remaining[field];
|
|
93
|
+
return { validationErrors: Object.keys(remaining).length > 0 ? remaining : void 0 };
|
|
94
|
+
}
|
|
95
|
+
const watchlistForBusinessMachine = setup({
|
|
96
|
+
types: {
|
|
97
|
+
context: {},
|
|
98
|
+
events: {},
|
|
99
|
+
input: {}
|
|
100
|
+
},
|
|
101
|
+
actors: { submitWatchlistForBusiness: fromPromise(async ({ input, signal }) => {
|
|
102
|
+
await submitWatchlistForBusiness(input, signal);
|
|
103
|
+
}) },
|
|
104
|
+
actions: {
|
|
105
|
+
setCountry: assign(({ event }) => {
|
|
106
|
+
const { country } = event;
|
|
107
|
+
return { country };
|
|
108
|
+
}),
|
|
109
|
+
setBusinessName: assign(({ event }) => {
|
|
110
|
+
const { value } = event;
|
|
111
|
+
return {
|
|
112
|
+
businessName: value,
|
|
113
|
+
isValid: computeIsValid(value)
|
|
114
|
+
};
|
|
115
|
+
}),
|
|
116
|
+
setTaxId: assign(({ event }) => {
|
|
117
|
+
const { value } = event;
|
|
118
|
+
return { taxId: value };
|
|
119
|
+
}),
|
|
120
|
+
setDateOfIncorporation: assign(({ event }) => {
|
|
121
|
+
const { value } = event;
|
|
122
|
+
return { dateOfIncorporation: value };
|
|
123
|
+
}),
|
|
124
|
+
clearBusinessNameValidationError: assign(({ context }) => withoutValidationError(context, "businessName")),
|
|
125
|
+
clearTaxIdValidationError: assign(({ context }) => withoutValidationError(context, "taxId")),
|
|
126
|
+
clearDateOfIncorporationValidationError: assign(({ context }) => withoutValidationError(context, "dateOfIncorporation")),
|
|
127
|
+
setValidationErrors: assign(({ context }) => ({ validationErrors: computeValidationErrors(context) }))
|
|
128
|
+
},
|
|
129
|
+
guards: { canSubmit: ({ context }) => computeValidationErrors(context) === void 0 }
|
|
130
|
+
}).createMachine({
|
|
131
|
+
id: "watchlist-for-business",
|
|
132
|
+
initial: "idle",
|
|
133
|
+
context: ({ input }) => ({
|
|
134
|
+
config: input?.config ?? {},
|
|
135
|
+
country: DEFAULT_COUNTRY,
|
|
136
|
+
businessName: "",
|
|
137
|
+
taxId: "",
|
|
138
|
+
dateOfIncorporation: "",
|
|
139
|
+
isValid: false,
|
|
140
|
+
validationErrors: void 0
|
|
141
|
+
}),
|
|
142
|
+
states: {
|
|
143
|
+
idle: { on: { LOAD: { target: "form" } } },
|
|
144
|
+
form: { on: {
|
|
145
|
+
SET_COUNTRY: { actions: ["setCountry", "clearTaxIdValidationError"] },
|
|
146
|
+
SET_BUSINESS_NAME: { actions: ["setBusinessName", "clearBusinessNameValidationError"] },
|
|
147
|
+
SET_TAX_ID: { actions: ["setTaxId", "clearTaxIdValidationError"] },
|
|
148
|
+
SET_DATE_OF_INCORPORATION: { actions: ["setDateOfIncorporation", "clearDateOfIncorporationValidationError"] },
|
|
149
|
+
SUBMIT: [{
|
|
150
|
+
target: "submitting",
|
|
151
|
+
guard: "canSubmit"
|
|
152
|
+
}, { actions: "setValidationErrors" }]
|
|
153
|
+
} },
|
|
154
|
+
submitting: { invoke: {
|
|
155
|
+
id: "submitWatchlistForBusiness",
|
|
156
|
+
src: "submitWatchlistForBusiness",
|
|
157
|
+
input: ({ context }) => buildSubmitRequest(context),
|
|
158
|
+
onDone: { target: "success" },
|
|
159
|
+
onError: { target: "finished" }
|
|
160
|
+
} },
|
|
161
|
+
success: { after: { 3e3: { target: "finished" } } },
|
|
162
|
+
finished: { type: "final" }
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
//#endregion
|
|
166
|
+
export { watchlistForBusinessMachine as n, getMaxDateOfIncorporation as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-
|
|
1
|
+
import { n as eventModuleNames, o as createManagerInstrumentation } from "./events-ggpBBaZ8.esm.js";
|
|
2
2
|
import { t as topLevelStateName } from "./topLevelStateName-B5i2avbh.esm.js";
|
|
3
3
|
import { s as createActor, u as createManager } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
4
|
-
import { t as watchlistMachine } from "./watchlistStateMachine-
|
|
4
|
+
import { t as watchlistMachine } from "./watchlistStateMachine-ofHW_lPk.esm.js";
|
|
5
5
|
//#region src/modules/watchlist/watchlistActor.ts
|
|
6
6
|
function createWatchlistActor() {
|
|
7
7
|
return createActor(watchlistMachine).start();
|
package/dist/{watchlistStateMachine-McALifag.esm.js → watchlistStateMachine-ofHW_lPk.esm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as api, u as endpoints } from "./api-
|
|
1
|
+
import { t as api, u as endpoints } from "./api-CpP4PS4S.esm.js";
|
|
2
2
|
import { i as assign, t as setup } from "./xstate.esm-DSajW7CJ.esm.js";
|
|
3
3
|
import { n as fromPromise } from "./xstate-actors.esm-8Gzepa_A.esm.js";
|
|
4
4
|
//#region src/modules/watchlist/watchlistServices.ts
|
package/dist/workflow.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { A as StateMachine, C as StateValue, D as PromiseActorLogic, a as ActorR
|
|
|
2
2
|
import { t as CallbackActorLogic } from "./callback-645_omgz.js";
|
|
3
3
|
import { t as Manager } from "./Manager-C9T5amUN.js";
|
|
4
4
|
import { a as TotalScore, i as GetTotalScoreStatusFn, n as FinishStatus, r as GetFinishStatusFn } from "./flowCompletionService-BlAHsKyv.js";
|
|
5
|
-
import { o as FlowEventSubscribable } from "./index-
|
|
5
|
+
import { o as FlowEventSubscribable } from "./index-DC0P2Vzw.js";
|
|
6
6
|
import { a as WorkflowModuleRegistry, i as RunChildModuleInput, r as RunChildModuleEvent, t as ModuleConfigMappers } from "./types-BQA7lRDV.js";
|
|
7
7
|
//#region src/modules/workflow/types.d.ts
|
|
8
8
|
/** Possible node types returned by the workflow server. */
|
|
@@ -215,6 +215,8 @@ type LoadingResult = {
|
|
|
215
215
|
type ProcessNextNodeInput = {
|
|
216
216
|
isInjectedNode: boolean;
|
|
217
217
|
firstNode: WorkflowNode | undefined;
|
|
218
|
+
/** The node being left; compared with the server node after a reconnect. */
|
|
219
|
+
currentNodeId: string | undefined;
|
|
218
220
|
currentNodeModuleKey: string | undefined;
|
|
219
221
|
workflowConfigId: string | undefined;
|
|
220
222
|
workflowRedirectDesktopToMobile: boolean;
|
|
@@ -889,7 +891,7 @@ declare const workflowMachine: StateMachine<WorkflowContext, {
|
|
|
889
891
|
readonly actions: readonly ["setModuleErrorCode", "trackAdvanceableModuleError"];
|
|
890
892
|
}, {
|
|
891
893
|
readonly target: "error";
|
|
892
|
-
readonly actions: readonly ["setModuleError", "trackTerminalModuleError"];
|
|
894
|
+
readonly actions: readonly ["setModuleError", "setModuleErrorCode", "trackTerminalModuleError"];
|
|
893
895
|
}];
|
|
894
896
|
readonly COMPLETE_FLOW: "completing";
|
|
895
897
|
readonly FINISH_WORKFLOW: readonly [{
|
|
@@ -1033,6 +1035,7 @@ declare const workflowMachine: StateMachine<WorkflowContext, {
|
|
|
1033
1035
|
}) => {
|
|
1034
1036
|
isInjectedNode: boolean;
|
|
1035
1037
|
firstNode: WorkflowNode | undefined;
|
|
1038
|
+
currentNodeId: string | undefined;
|
|
1036
1039
|
currentNodeModuleKey: string | undefined;
|
|
1037
1040
|
workflowConfigId: string | undefined;
|
|
1038
1041
|
workflowRedirectDesktopToMobile: boolean;
|