@incodetech/web 2.2.0 → 2.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_NOTICES.txt +398 -0
- package/dist/ae-signature/ae-signature.es.js +4 -4
- package/dist/af-ZA-DTqKc5t4.js +3041 -0
- package/dist/am-EGNy2cbo.js +3041 -0
- package/dist/antifraud/antifraud.es.js +4 -4
- package/dist/ar-AE-Cb55U6s-.js +3057 -0
- package/dist/ar-EG-C8ucZII6.js +3057 -0
- package/dist/ar-MUpu33jy.js +3057 -0
- package/dist/assets/dm-sans-latin-400-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-500-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-600-normal.woff2 +0 -0
- package/dist/assets/dm-sans-latin-700-normal.woff2 +0 -0
- package/dist/assets/rethink-sans-latin-800-normal.woff2 +0 -0
- package/dist/authentication/authentication.es.js +15 -11
- package/dist/{autoFocusTitle-DB-23sv_.js → autoFocusTitle-CIbcUW_x.js} +2 -2
- package/dist/az-DlXjPSya.js +3041 -0
- package/dist/{back-horizontal-hint-CjdigFZj.js → back-horizontal-hint-UQ7Nof6k.js} +1 -1
- package/dist/{back-vertical-hint-OhaKsINF.js → back-vertical-hint-Crc8ybfk.js} +1 -1
- package/dist/base.css +917 -283
- package/dist/baseTutorial-DkL0vjUa.js +172 -0
- package/dist/bn-BuTjJr44.js +3041 -0
- package/dist/bottomSheet-DtUFrIAG.js +101 -0
- package/dist/bs-DUzGtLhU.js +3045 -0
- package/dist/ca-B6SY43GQ.js +3041 -0
- package/dist/cameraOverlay-Dn0r4NR9.js +2 -0
- package/dist/cameraOverlayHeader-CsokPtuL.js +43 -0
- package/dist/cameraView-DrTBPNWX.js +49 -0
- package/dist/captureFooter-DWCaAdIU.js +67 -0
- package/dist/ceb-DmXy5txv.js +3041 -0
- package/dist/certificate-issuance/certificate-issuance.es.js +19 -14
- package/dist/certificate-issuance/styles.css.js +1 -0
- package/dist/{checkbox-FGA-Ij-D.js → checkbox-D0wfscwg.js} +9 -8
- package/dist/{connectionError-BurQq_4R.js → connectionError-B61O7L3N.js} +4 -4
- package/dist/consent/consent.es.js +26 -33
- package/dist/consent/styles.css +4 -4
- package/dist/consent/styles.css.js +1 -0
- package/dist/countries-5e8kwG_m.js +8560 -0
- package/dist/{countrySelector-COZ7XQHp.js → countrySelector-C60Cdc5P.js} +8 -10
- package/dist/cross-document-data-match/cross-document-data-match.es.js +4 -4
- package/dist/cs-CZ-Gn3ZmW27.js +3049 -0
- package/dist/cs-dsQ7umNS.js +3049 -0
- package/dist/curp-validation/curp-validation.es.js +15 -22
- package/dist/curp-validation/styles.css.js +1 -0
- package/dist/custom-fields/styles.css.js +1 -0
- package/dist/{customFields-rVMTo1Yu.js → customFields-BdnLB6L1.js} +44 -19
- package/dist/{customWatchlist-DgpXtVRf.js → customWatchlist-DzeHJAa3.js} +14 -11
- package/dist/da-DK-CFQaOERk.js +3041 -0
- package/dist/{dashboardTheme-BUDq5UYs.js → dashboardTheme-BwKtcRSO.js} +31 -7
- package/dist/{dateInputComposed-DSgV0wnb.js → dateInputComposed-BcmKKwRL.js} +5 -5
- package/dist/dateInputComposed-DPM6l_SL.js +1 -0
- package/dist/de-BqG02U9o.js +3041 -0
- package/dist/document-capture/document-capture.es.js +1 -1
- package/dist/document-capture/styles.css +4 -4
- package/dist/document-capture/styles.css.js +1 -0
- package/dist/{documentCapture-sZj09g0I.js → documentCapture-CoMsW_gC.js} +16 -17
- package/dist/documentCapture-DMxz9eqT.js +2 -0
- package/dist/dropdownComposed-CXwC9j18.js +1 -0
- package/dist/{dropdownComposed-CEegNzG4.js → dropdownComposed-DYdI3B4r.js} +9 -9
- package/dist/{dynamicForms-t3vepXqJ.js → dynamic-forms/dynamic-forms.es.js} +24 -19
- package/dist/dynamic-forms/styles.css +5 -0
- package/dist/dynamic-forms/styles.css.js +1 -0
- package/dist/ekyb/ekyb.es.js +1 -1
- package/dist/ekyb/styles.css +15 -13
- package/dist/ekyb/styles.css.js +1 -0
- package/dist/{ekybModule-Dvkf5WAr.js → ekybModule-BRh9D01p.js} +17 -30
- package/dist/ekybModule-C5NPsc0F.js +2 -0
- package/dist/ekyc/ekyc.es.js +1 -1
- package/dist/ekyc/styles.css +17 -16
- package/dist/ekyc/styles.css.js +1 -0
- package/dist/{ekycModule-C5QXVGP7.js → ekycModule-Da6Bl3jg.js} +14 -29
- package/dist/ekycModule-DwKPvgA8.js +2 -0
- package/dist/el-BP_RmMeB.js +3041 -0
- package/dist/el-GR-9I2fVd-W.js +3041 -0
- package/dist/electronic-signature/electronic-signature.es.js +1 -1
- package/dist/electronic-signature/styles.css +62 -2
- package/dist/electronic-signature/styles.css.js +1 -0
- package/dist/{electronic-signature-CyE8F7LZ.js → electronic-signature-KFF7qbid.js} +65 -18
- package/dist/email/email.es.js +9 -8
- package/dist/email/styles.css.js +1 -0
- package/dist/{emailInput-CsT8_C01.js → emailInput-B_qAEKBC.js} +4 -4
- package/dist/en-DG-poeSJZ7W.js +3041 -0
- package/dist/en-DnIfMNS1.js +3041 -0
- package/dist/errorContent-CMNfCIo_.js +58 -0
- package/dist/es-2x55EFTs.js +3041 -0
- package/dist/es-419-DgAnO5DV.js +3041 -0
- package/dist/es-ES-BSnroYMU.js +3041 -0
- package/dist/es-MX-CfztSSs4.js +3041 -0
- package/dist/et-CPoI8fYI.js +3041 -0
- package/dist/{expiredId-BQ1uPh7b.js → expiredId-DJYL_--M.js} +22 -27
- package/dist/extensibility.es.js +701 -24
- package/dist/fa-IR-CVf6F8GG.js +3041 -0
- package/dist/face-match/face-match.es.js +1 -1
- package/dist/face-match/styles.css +76 -40
- package/dist/face-match/styles.css.js +1 -0
- package/dist/{faceMatch-Rf-MMdto.js → faceMatch-CwoYbKBB.js} +7 -8
- package/dist/faceMatch-DCkrehin.js +2 -0
- package/dist/fi-FI-A4oUFztt.js +3041 -0
- package/dist/field-comparison/field-comparison.es.js +1 -1
- package/dist/field-comparison/styles.css +12 -0
- package/dist/field-comparison/styles.css.js +1 -0
- package/dist/{fieldComparison-BnGj3nNp.js → fieldComparison-D2WI5cYb.js} +27 -11
- package/dist/fieldComparison-OwqIkMRe.js +2 -0
- package/dist/fieldLabelHint-CxjArYkQ.js +16 -0
- package/dist/{finalSuccessScreen-B9uB3bST.js → finalSuccessScreen-BtJ5o2pi.js} +13 -14
- package/dist/fiscal-qr/fiscal-qr.es.js +22 -9
- package/dist/fiscal-qr/styles.css +13 -1
- package/dist/fiscal-qr/styles.css.js +1 -0
- package/dist/{extensibility-C5XqL_A3.js → flipAnimation-Bb5FQVF-.js} +608 -1005
- package/dist/flow/flow.es.js +308 -62
- package/dist/flow/shell/styles.css +402 -0
- package/dist/flow/shell/styles.css.js +1 -0
- package/dist/flow/styles.css +582 -312
- package/dist/formField-CBwWQ7wD.js +60 -0
- package/dist/fr-CA-CI4CD8PC.js +3045 -0
- package/dist/fr-ON88Zj-c.js +3045 -0
- package/dist/{front-horizontal-hint-Bhz1rq-w.js → front-horizontal-hint-mgovnJf3.js} +1 -1
- package/dist/{front-vertical-hint-C4FC1ksx.js → front-vertical-hint-qXMVdLri.js} +1 -1
- package/dist/geolocation/geolocation.es.js +9 -9
- package/dist/geolocation/styles.css +4 -4
- package/dist/geolocation/styles.css.js +1 -0
- package/dist/government-validation/government-validation.es.js +38 -86
- package/dist/government-validation/styles.css +2 -38
- package/dist/government-validation/styles.css.js +1 -0
- package/dist/he-pbmbYdr4.js +3049 -0
- package/dist/hi-DUIfQ6FS.js +3041 -0
- package/dist/hmn-DL-aQCTc.js +3041 -0
- package/dist/{homeScreen-Bv9mUUOF.js → homeScreen-vLMuzGDq.js} +8 -7
- package/dist/hr-DfJZSVnR.js +3045 -0
- package/dist/ht-DkZi3f0t.js +3041 -0
- package/dist/hu-ClhgOpVy.js +3041 -0
- package/dist/{icons-ChHV5iHi.js → icons-eIgP34nj.js} +99 -11
- package/dist/id/id.es.js +575 -62
- package/dist/id/styles.css +114 -45
- package/dist/id/styles.css.js +1 -0
- package/dist/id-DzyWelEE.js +3035 -0
- package/dist/{id-back-of-card-C4XViC7W.js → id-back-of-card-B6EcmiCs.js} +1 -1
- package/dist/{id-back-of-card-vertical-DCz0rj8m.js → id-back-of-card-vertical-B3FXhPpj.js} +1 -1
- package/dist/{id-front-of-card-CUA1ocVF.js → id-front-of-card-V_BlLaZr.js} +1 -1
- package/dist/{id-front-of-card-vertical-Ddm_BwD3.js → id-front-of-card-vertical-CuZjL8kc.js} +1 -1
- package/dist/id-ocr/styles.css.js +1 -0
- package/dist/id-selfie-flow/id-selfie-flow.es.js +10 -9
- package/dist/id-selfie-flow/styles.css +40 -8
- package/dist/id-verification/id-verification.es.js +5 -5
- package/dist/{idOcr-Da1-2sWY.js → idOcr-C5R3RWuL.js} +13 -16
- package/dist/identity-reuse/identity-reuse.es.js +8 -113
- package/dist/identity-reuse/styles.css +1 -1
- package/dist/{incode-logo-DeIDDejm.js → incode-logo-BzJOZr3f.js} +1 -64
- package/dist/{incodeComponent-BtFz-bx2.js → incodeComponent-D3_BSWan.js} +192 -22
- package/dist/{incodeModule-9K8KUs61.js → incodeModule-BQgvYKyr.js} +3 -3
- package/dist/index.es.js +4 -3
- package/dist/{inputComposed-C2zTEXsp.js → inputComposed-CTZnsHLi.js} +9 -9
- package/dist/inputComposed-wy0-orhJ.js +1 -0
- package/dist/it-D_u7w6N4.js +3041 -0
- package/dist/ja-Drh4oAoU.js +3035 -0
- package/dist/ja-JP-Pdxq82Pi.js +3035 -0
- package/dist/jv-DFcKF0Jp.js +3035 -0
- package/dist/ka--2y3Ae63.js +3041 -0
- package/dist/kk-CAs7inco.js +3041 -0
- package/dist/km-BlxkLYfw.js +3035 -0
- package/dist/ko-B1XhW0dx.js +3035 -0
- package/dist/ko-KP-DO1TCCY3.js +3035 -0
- package/dist/ky-BN92RThU.js +3041 -0
- package/dist/lo-DPUo8xJT.js +3035 -0
- package/dist/lt-CYBwI4Sq.js +3049 -0
- package/dist/lv-eBlwWu05.js +3045 -0
- package/dist/{mandatoryConsent-CxShVycM.js → mandatoryConsent-D96_9XTp.js} +10 -7
- package/dist/manualCaptureButton-C9H2_SJS.js +63 -0
- package/dist/{manualCaptureButton-DzJFIEfu.js → manualCaptureButton-igyQk3Yb.js} +10 -55
- package/dist/mk-QMUTND8Y.js +3041 -0
- package/dist/mn-CCTUOA1D.js +3041 -0
- package/dist/{modal-BH2wi8Q0.js → modal-CmF_MYIK.js} +7 -6
- package/dist/{modal.hooks-DcakflQ4.js → modal.hooks-B0Wrc9s2.js} +7 -1
- package/dist/ms-BKJgaJfx.js +3035 -0
- package/dist/my-DyLbN8b0.js +3035 -0
- package/dist/nb-NO-TVHxhuqB.js +3041 -0
- package/dist/ne-gBLZraiK.js +3041 -0
- package/dist/nl-CrO6Mvej.js +3041 -0
- package/dist/{numberedStep-DqtXyT11.js → numberedStep-DYznpDKc.js} +1 -1
- package/dist/{optionAccessibleLabel-C5iZCrlq.js → optionAccessibleLabel-CqBUOBxK.js} +6 -6
- package/dist/{otpInput-CvPR3ZpP.js → otpInput-tEovwPs7.js} +8 -83
- package/dist/{passport-horizontal-hint-DzkhjC8Q.js → passport-horizontal-hint-6Ghn2EEN.js} +1 -1
- package/dist/{passport-vertical-hint-Bd0BQn2Y.js → passport-vertical-hint-UPFFpdf4.js} +1 -1
- package/dist/passwordInputComposed-DNlYgHHW.js +74 -0
- package/dist/{pdf-BUoY_2gv.js → pdf-CFubyG0B.js} +1 -1
- package/dist/{pdfViewer-TTZmPABh.js → pdfViewer-4u14PDPr.js} +4 -4
- package/dist/pdfViewer-e2o97yIv.js +2 -0
- package/dist/{manualCaptureButton-D58WsS-x.js → permissions-DowRodJj.js} +200 -105
- package/dist/phone/phone.es.js +10 -9
- package/dist/phone/styles.css +1 -1
- package/dist/phone/styles.css.js +1 -0
- package/dist/{phoneInputComposed-byyszNoS.js → phoneInputComposed-B6sv-uB2.js} +20 -8412
- package/dist/pl-Bde7cCcc.js +3049 -0
- package/dist/{processing-B2eaSGLu.js → processing-s6GfNwuL.js} +2 -2
- package/dist/pt-BR-DFr2fPNi.js +3041 -0
- package/dist/pt-DhDCeOLY.js +3041 -0
- package/dist/pt-PT-CpiPMuNf.js +3041 -0
- package/dist/qe-signature/qe-signature.es.js +4 -4
- package/dist/radioGroupComposed-CJkzLiFc.js +1 -0
- package/dist/{radioGroupComposed-DQzTWutW.js → radioGroupComposed-DmoMukus.js} +15 -71
- package/dist/redirect-to-mobile/redirect-to-mobile.es.js +34 -178
- package/dist/redirect-to-mobile/styles.css +2 -27
- package/dist/redirect-to-mobile/styles.css.js +1 -0
- package/dist/{registerIncodeElement-DW2PE_DX.js → registerIncodeElement-CbZczi4S.js} +1 -1
- package/dist/resendTimer-Cskll9rx.js +79 -0
- package/dist/{useModuleLoader-DxOEZ0vn.js → resolveApiKey-CB1_7ISm.js} +70 -222
- package/dist/{richText-CEwM8jib.js → richText-C8-Ny2SD.js} +9 -9
- package/dist/ro-B_ITJxYh.js +3045 -0
- package/dist/ru-Cg4U-rYv.js +3049 -0
- package/dist/ru-RU-fR_tbAfz.js +3049 -0
- package/dist/selfie/selfie.es.js +184 -8
- package/dist/selfie/styles.css +225 -36
- package/dist/selfie/styles.css.js +1 -0
- package/dist/signature/signature.es.js +8 -9
- package/dist/signature/styles.css.js +1 -0
- package/dist/sk-DbraxlnX.js +3049 -0
- package/dist/sl-DXgvmUsz.js +3049 -0
- package/dist/smsTabContent-Dado9q8t.js +172 -0
- package/dist/so-HI13bXme.js +3041 -0
- package/dist/{spacer-DLEDuWEx.js → spacer-ayyj5lMa.js} +10 -10
- package/dist/spinner-Z-5sEEDQ.js +88 -0
- package/dist/sr-DAb2JkvB.js +3045 -0
- package/dist/sr-Latn-DzSc6KyA.js +3045 -0
- package/dist/sr-YU-C9HskKa8.js +3045 -0
- package/dist/{statusPage-BF4qGjF3.js → statusPage-Bqz3Ci4f.js} +4 -4
- package/dist/sv-SE-B3X2fvQj.js +3041 -0
- package/dist/sw-BVL9Boua.js +3041 -0
- package/dist/{tabs-BGL1oRLb.js → tabs-B-ERCzA4.js} +2 -2
- package/dist/th-Cq87oDI8.js +3035 -0
- package/dist/th-TH-CY5gd6Bd.js +3035 -0
- package/dist/themes/dark.css +125 -0
- package/dist/themes/light.css +124 -0
- package/dist/tl-DUm9tRZ_.js +3041 -0
- package/dist/tl-PH-CNYNkY1M.js +3041 -0
- package/dist/tr-Cg3WJqb6.js +3041 -0
- package/dist/{tutorial-LQuJ4dse.js → tutorial-CHNfV-I3.js} +40 -226
- package/dist/types/certificate-issuance.d.ts +4 -4
- package/dist/types/dynamic-forms.d.ts +177 -0
- package/dist/types/extensibility.d.ts +75 -23
- package/dist/types/flow.d.ts +37 -0
- package/dist/types/government-validation.d.ts +2 -1
- package/dist/types/index.d.ts +28 -4
- package/dist/types/video-selfie.d.ts +6 -161
- package/dist/typography-ikD4-Z8S.js +53 -0
- package/dist/{uiConfig-Dqnjankd.js → uiConfig-C1jdTj-i.js} +184 -8
- package/dist/uk-C7hhE-77.js +3049 -0
- package/dist/uk-UA-DRsynQ5S.js +3049 -0
- package/dist/ur-BEX50SCe.js +3041 -0
- package/dist/useCoverMedia-VLw3OYN_.js +149 -0
- package/dist/useModuleLoader-DpcbSKBH.js +176 -0
- package/dist/uz-BYlUXaIK.js +3041 -0
- package/dist/{vendor-preact-BPXMFRom.js → vendor-preact-C0jX1Cbq.js} +68 -181
- package/dist/{verificationResult-q_zD_Pxh.js → verificationResult-B26DDXFT.js} +32 -25
- package/dist/vi-DddAM-WF.js +3035 -0
- package/dist/video-selfie/styles.css +51 -17
- package/dist/video-selfie/styles.css.js +1 -0
- package/dist/video-selfie/video-selfie.es.js +35 -23
- package/dist/watchlist/watchlist.es.js +7 -7
- package/dist/watchlist-for-business/styles.css.js +1 -0
- package/dist/{watchlistForBusiness-C_zqdY4P.js → watchlistForBusiness-o4F6Czxp.js} +28 -16
- package/dist/workflow/styles.css +1073 -356
- package/dist/workflow/workflow.es.js +17 -15
- package/dist/zh-CN-B8y9prPe.js +3035 -0
- package/dist/zh-HANT-ChrXbHBA.js +3035 -0
- package/dist/zh-TW-DrkMIR_e.js +3035 -0
- package/dist/zh-aG_wPYUs.js +3035 -0
- package/package.json +32 -22
- package/dist/bottomSheet-BWEUBq8m.js +0 -38
- package/dist/dateInputComposed-BGC37jC7.js +0 -1
- package/dist/documentCapture-CO9kIxru.js +0 -2
- package/dist/dropdownComposed-Bf4EcKFw.js +0 -1
- package/dist/ekybModule-uN0ComAn.js +0 -2
- package/dist/ekycModule-B7KRJ7l3.js +0 -2
- package/dist/faceMatch-DjD2hgBp.js +0 -2
- package/dist/fieldComparison-DFH4hUM_.js +0 -2
- package/dist/inputComposed-kKtrvJU5.js +0 -1
- package/dist/pdfViewer-C1B-07Wu.js +0 -2
- package/dist/requiredLabelHint-Dx0WS2cR.js +0 -17
- package/dist/snackbar-eBOj46AK.js +0 -16
- package/dist/spinner-CJCOHUKx.js +0 -95
- package/dist/successIcon-DS8BLsgy.js +0 -30
- package/dist/types/dynamic-forms/styles.d.ts +0 -1
- /package/dist/{aligndevicelottie-CfoZ5Uus.js → aligndevicelottie-B12hbVhG.js} +0 -0
- /package/dist/{back-tutorial-BHyRHyET.js → back-tutorial-XdmQ0Wml.js} +0 -0
- /package/dist/{backdevicelottie-yKkczgFy.js → backdevicelottie-m_DOD8xE.js} +0 -0
- /package/dist/{blurdevicelottie-8BbophdM.js → blurdevicelottie-DQo_hTMD.js} +0 -0
- /package/dist/{browser-ponyfill-CBjGwwPW.js → browser-ponyfill-ZkeBm4ji.js} +0 -0
- /package/dist/{defineProperty-BbpBna-2.js → defineProperty-BojnCa44.js} +0 -0
- /package/dist/{flip-animation-CvN8FLNc.js → flip-animation-VicedlT5.js} +0 -0
- /package/dist/{frontdevicelottie-CFcahVLk.js → frontdevicelottie-CyIerlMv.js} +0 -0
- /package/dist/{glaredevicelottie-Cnvah0kz.js → glaredevicelottie-QM2C6Ivp.js} +0 -0
- /package/dist/{id-laser-h-BaUHzX-d.js → id-laser-h-B0-iXcvl.js} +0 -0
- /package/dist/{id-laser-v-Dv9yEYJE.js → id-laser-v-Bqh6vimi.js} +0 -0
- /package/dist/{id-tutorial-BOOsXlAJ.js → id-tutorial-IhmAzrIF.js} +0 -0
- /package/dist/{lottie_light-Bv56F2Ae.js → lottie_light-CzZ3CHBk.js} +0 -0
- /package/dist/{passport-tutorial-CeSup6m9.js → passport-tutorial-61vlloJS.js} +0 -0
- /package/dist/{selfieTutorial-CYa8bq6B.js → selfieTutorial-BRQ2QNxQ.js} +0 -0
package/dist/flow/flow.es.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { t as StatusPage } from "../statusPage-
|
|
6
|
-
import { t as registerIncodeModuleElement } from "../incodeModule-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { o as useTranslation, t as setThemeUiConfig, u as readStoredLanguage } from "../uiConfig-C1jdTj-i.js";
|
|
2
|
+
import { _ as y, a as P, c as A, f as d, s as z, u as T, v as u } from "../vendor-preact-C0jX1Cbq.js";
|
|
3
|
+
import { S as useManager, a as ResolvedConfigProvider, d as TransitionSpinner, s as TerminalErrorPage, t as IncodeComponent } from "../incodeComponent-D3_BSWan.js";
|
|
4
|
+
import { b as ErrorIcon } from "../icons-eIgP34nj.js";
|
|
5
|
+
import { t as StatusPage } from "../statusPage-Bqz3Ci4f.js";
|
|
6
|
+
import { t as registerIncodeModuleElement } from "../incodeModule-BQgvYKyr.js";
|
|
7
|
+
import { a as LAZY_UI_MODULES, c as initializeFlowManager, f as warmupWasmIfNeeded, i as HEADLESS_FLOW_MODULE_KEYS, l as preloadFirstModule, m as resolveSessionLanguage, n as extractIncodeStatus, o as createFlowManager, r as UnsupportedModule, s as fetchTheme, t as resolveApiKey, u as preloadHomeScreen } from "../resolveApiKey-CB1_7ISm.js";
|
|
8
|
+
import { i as usePrefetchNextModule, n as useModuleLoader, r as useModulePreloader } from "../useModuleLoader-DpcbSKBH.js";
|
|
9
|
+
import { getNextRequiredWasmPipelines } from "@incodetech/core/flow";
|
|
9
10
|
import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
|
|
10
11
|
//#region src/shared/processing/useDelayedFlag.ts
|
|
11
12
|
/**
|
|
@@ -32,6 +33,28 @@ function useDelayedFlag(isTrue, delayMs) {
|
|
|
32
33
|
return delayed;
|
|
33
34
|
}
|
|
34
35
|
//#endregion
|
|
36
|
+
//#region src/modules/flow/flowConfig.ts
|
|
37
|
+
function hasFlowToken(config) {
|
|
38
|
+
return typeof config.token === "string";
|
|
39
|
+
}
|
|
40
|
+
function isSelfLoadingFlowConfig(config) {
|
|
41
|
+
const bootstrapConfig = config;
|
|
42
|
+
return typeof bootstrapConfig.configurationId === "string" && (typeof bootstrapConfig.apiKey === "string" || typeof bootstrapConfig.clientId === "string");
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/modules/flow/moduleErrorHandler.ts
|
|
46
|
+
/**
|
|
47
|
+
* Use the module's real error message when present, else `fallbackMessage`.
|
|
48
|
+
* Note: several module managers (e.g. mandatoryConsentManager) backfill a
|
|
49
|
+
* non-undefined 'Unknown error' when they have no real message — this still
|
|
50
|
+
* forwards that as-is, so only use this where a specific message is wanted.
|
|
51
|
+
*/
|
|
52
|
+
function createModuleErrorHandler(flowManager, fallbackMessage) {
|
|
53
|
+
return (error, _errorCode, moduleErrorCode) => {
|
|
54
|
+
flowManager.errorModule(error ?? fallbackMessage, moduleErrorCode);
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
35
58
|
//#region src/modules/flow/sessionFinishedPage.tsx
|
|
36
59
|
var SessionFinishedPage = () => {
|
|
37
60
|
const { ready, t } = useTranslation();
|
|
@@ -61,15 +84,6 @@ async function createFlowSession(config, signal) {
|
|
|
61
84
|
}, signal);
|
|
62
85
|
}
|
|
63
86
|
//#endregion
|
|
64
|
-
//#region src/modules/flow/flowConfig.ts
|
|
65
|
-
function hasFlowToken(config) {
|
|
66
|
-
return typeof config.token === "string";
|
|
67
|
-
}
|
|
68
|
-
function isSelfLoadingFlowConfig(config) {
|
|
69
|
-
const bootstrapConfig = config;
|
|
70
|
-
return typeof bootstrapConfig.configurationId === "string" && (typeof bootstrapConfig.apiKey === "string" || typeof bootstrapConfig.clientId === "string");
|
|
71
|
-
}
|
|
72
|
-
//#endregion
|
|
73
87
|
//#region src/modules/flow/preloadFlow.ts
|
|
74
88
|
var preloadCache = /* @__PURE__ */ new Map();
|
|
75
89
|
function createPreloadHandle(token) {
|
|
@@ -120,20 +134,19 @@ function preloadIncodeFlow(config) {
|
|
|
120
134
|
preloadCache.set(token, state);
|
|
121
135
|
const preload = async () => {
|
|
122
136
|
try {
|
|
123
|
-
|
|
137
|
+
const managerReady = initializeFlowManager({
|
|
124
138
|
token: config.token,
|
|
125
139
|
lang: config.lang,
|
|
126
140
|
flowManager
|
|
127
141
|
});
|
|
142
|
+
managerReady.catch(() => void 0);
|
|
128
143
|
const themePromise = config.disableDashboardTheme ? Promise.resolve({}) : fetchTheme(config.token).then((result) => {
|
|
129
144
|
state.theme = result.theme;
|
|
130
145
|
state.uiConfig = result.uiConfig;
|
|
131
146
|
});
|
|
132
|
-
|
|
147
|
+
const onManagerState = (managerState) => {
|
|
133
148
|
if (managerState.status === "ready") {
|
|
134
|
-
|
|
135
|
-
warmupWasmIfNeeded(readyState, config.wasmConfig);
|
|
136
|
-
preloadFirstModule(readyState);
|
|
149
|
+
preloadFirstModule(managerState);
|
|
137
150
|
state.unsubscribe?.();
|
|
138
151
|
state.unsubscribe = void 0;
|
|
139
152
|
state.status = "ready";
|
|
@@ -145,8 +158,15 @@ function preloadIncodeFlow(config) {
|
|
|
145
158
|
state.error = managerState.error;
|
|
146
159
|
state.readyReject(new Error(managerState.error));
|
|
147
160
|
}
|
|
148
|
-
}
|
|
161
|
+
};
|
|
162
|
+
state.unsubscribe = flowManager.subscribe(onManagerState);
|
|
163
|
+
onManagerState(flowManager.getState());
|
|
149
164
|
await themePromise;
|
|
165
|
+
try {
|
|
166
|
+
await managerReady;
|
|
167
|
+
} catch (error) {
|
|
168
|
+
console.warn("[incode] Session activation failed; the preload continues on the flow state:", error);
|
|
169
|
+
}
|
|
150
170
|
} catch (error) {
|
|
151
171
|
state.status = "error";
|
|
152
172
|
state.error = error instanceof Error ? error.message : "Failed to preload";
|
|
@@ -170,9 +190,6 @@ function consumePreloadedData(token) {
|
|
|
170
190
|
function maybePreloadHomeScreen(flowManager) {
|
|
171
191
|
if (flowManager.getState().presentation.shouldPrefetchHome) preloadHomeScreen();
|
|
172
192
|
}
|
|
173
|
-
function maybePreloadRedirectToMobile() {
|
|
174
|
-
if (isDesktopOrEmulated()) preloadRedirectToMobile();
|
|
175
|
-
}
|
|
176
193
|
function isFlowManagerError(flowManager, errorMessage) {
|
|
177
194
|
const managerState = flowManager.getState();
|
|
178
195
|
return managerState.status === "error" && managerState.error === errorMessage;
|
|
@@ -189,7 +206,6 @@ function useFlowInitialization(options) {
|
|
|
189
206
|
if (consumed) {
|
|
190
207
|
flowManagerRef.current = consumed.flowManager;
|
|
191
208
|
maybePreloadHomeScreen(consumed.flowManager);
|
|
192
|
-
maybePreloadRedirectToMobile();
|
|
193
209
|
if (consumed.uiConfig) setThemeUiConfig(consumed.uiConfig);
|
|
194
210
|
return {
|
|
195
211
|
status: "ready",
|
|
@@ -211,7 +227,6 @@ function useFlowInitialization(options) {
|
|
|
211
227
|
if (preloaded.status === "loading") {
|
|
212
228
|
flowManagerRef.current = preloaded.flowManager;
|
|
213
229
|
maybePreloadHomeScreen(preloaded.flowManager);
|
|
214
|
-
maybePreloadRedirectToMobile();
|
|
215
230
|
return {
|
|
216
231
|
status: "initializing",
|
|
217
232
|
flowManager: preloaded.flowManager
|
|
@@ -231,7 +246,6 @@ function useFlowInitialization(options) {
|
|
|
231
246
|
flowManager
|
|
232
247
|
};
|
|
233
248
|
maybePreloadHomeScreen(flowManager);
|
|
234
|
-
maybePreloadRedirectToMobile();
|
|
235
249
|
return {
|
|
236
250
|
status: "initializing",
|
|
237
251
|
flowManager
|
|
@@ -242,12 +256,13 @@ function useFlowInitialization(options) {
|
|
|
242
256
|
if (state.status !== "initializing") return;
|
|
243
257
|
const preloaded = token ? getPreloadedData(token) : null;
|
|
244
258
|
if (token && preloaded?.status === "loading") {
|
|
259
|
+
let cancelled = false;
|
|
245
260
|
preloaded.readyPromise.then(() => {
|
|
261
|
+
if (cancelled) return;
|
|
246
262
|
const consumed = consumePreloadedData(token);
|
|
247
263
|
if (consumed) {
|
|
248
264
|
flowManagerRef.current = consumed.flowManager;
|
|
249
265
|
maybePreloadHomeScreen(consumed.flowManager);
|
|
250
|
-
maybePreloadRedirectToMobile();
|
|
251
266
|
if (consumed.uiConfig) setThemeUiConfig(consumed.uiConfig);
|
|
252
267
|
setState({
|
|
253
268
|
status: "ready",
|
|
@@ -255,6 +270,7 @@ function useFlowInitialization(options) {
|
|
|
255
270
|
});
|
|
256
271
|
}
|
|
257
272
|
}).catch((error) => {
|
|
273
|
+
if (cancelled) return;
|
|
258
274
|
const flowManager = consumePreloadedData(token)?.flowManager ?? state.flowManager;
|
|
259
275
|
const errorMessage = error instanceof Error ? error.message : "Preload failed";
|
|
260
276
|
const errorCode = extractIncodeStatus(error);
|
|
@@ -266,7 +282,9 @@ function useFlowInitialization(options) {
|
|
|
266
282
|
});
|
|
267
283
|
if (!isFlowManagerError(flowManager, errorMessage)) onError?.(errorMessage, errorCode);
|
|
268
284
|
});
|
|
269
|
-
return
|
|
285
|
+
return () => {
|
|
286
|
+
cancelled = true;
|
|
287
|
+
};
|
|
270
288
|
}
|
|
271
289
|
if (initStartedRef.current) return;
|
|
272
290
|
initStartedRef.current = true;
|
|
@@ -287,20 +305,27 @@ function useFlowInitialization(options) {
|
|
|
287
305
|
resolvedToken = session.token;
|
|
288
306
|
state.flowManager.setEndScreenTexts(session.endScreenTitle ?? null, session.endScreenText ?? null);
|
|
289
307
|
} else throw new Error("Flow requires token, or configurationId with apiKey or clientId");
|
|
290
|
-
|
|
308
|
+
const activation = initializeFlowManager({
|
|
291
309
|
token: resolvedToken,
|
|
292
310
|
lang,
|
|
293
311
|
flowManager: state.flowManager
|
|
294
312
|
});
|
|
313
|
+
activation.catch(() => void 0);
|
|
295
314
|
const themePromise = disableDashboardTheme ? Promise.resolve() : fetchTheme(resolvedToken).then((result) => {
|
|
296
|
-
if (result.uiConfig) setThemeUiConfig(result.uiConfig);
|
|
315
|
+
if (!signal.aborted && result.uiConfig) setThemeUiConfig(result.uiConfig);
|
|
297
316
|
});
|
|
298
317
|
const flowReadyPromise = state.flowManager.waitForReady();
|
|
299
318
|
await Promise.all([flowReadyPromise, themePromise]);
|
|
319
|
+
if (signal.aborted) return;
|
|
300
320
|
setState({
|
|
301
321
|
status: "ready",
|
|
302
322
|
flowManager: state.flowManager
|
|
303
323
|
});
|
|
324
|
+
try {
|
|
325
|
+
await activation;
|
|
326
|
+
} catch (error) {
|
|
327
|
+
console.warn("[incode] Session activation failed; continuing with the rendered flow:", error);
|
|
328
|
+
}
|
|
304
329
|
} catch (error) {
|
|
305
330
|
if (signal.aborted) return;
|
|
306
331
|
const errorMessage = error instanceof Error ? error.message : "Failed to initialize SDK";
|
|
@@ -329,20 +354,215 @@ function useFlowInitialization(options) {
|
|
|
329
354
|
return state;
|
|
330
355
|
}
|
|
331
356
|
//#endregion
|
|
357
|
+
//#region src/modules/flow/loadFlowStylesheets.ts
|
|
358
|
+
var loads = /* @__PURE__ */ new WeakMap();
|
|
359
|
+
/** Keep module sheets after base.css, in CSS import order rather than fetch order. */
|
|
360
|
+
function loadFlowStylesheet(load, order, nonce) {
|
|
361
|
+
let documentLoads = loads.get(document);
|
|
362
|
+
if (!documentLoads) {
|
|
363
|
+
documentLoads = /* @__PURE__ */ new Map();
|
|
364
|
+
loads.set(document, documentLoads);
|
|
365
|
+
}
|
|
366
|
+
const cached = documentLoads.get(load);
|
|
367
|
+
if (cached) return cached;
|
|
368
|
+
const promise = load().then(({ default: css }) => {
|
|
369
|
+
const style = document.createElement("style");
|
|
370
|
+
style.dataset.incodeFlowCss = String(order);
|
|
371
|
+
if (nonce) style.nonce = nonce;
|
|
372
|
+
style.textContent = css;
|
|
373
|
+
const owned = Array.from(document.head.querySelectorAll("style[data-incode-flow-css]"));
|
|
374
|
+
const next = owned.find((sheet) => Number(sheet.dataset.incodeFlowCss) > order);
|
|
375
|
+
const last = owned[owned.length - 1];
|
|
376
|
+
document.head.insertBefore(style, next ?? (last ? last.nextSibling : null));
|
|
377
|
+
if (!style.sheet) {
|
|
378
|
+
style.remove();
|
|
379
|
+
throw new Error("Flow stylesheet blocked; check the Content Security Policy and cssNonce");
|
|
380
|
+
}
|
|
381
|
+
}).catch((error) => {
|
|
382
|
+
documentLoads.delete(load);
|
|
383
|
+
throw error;
|
|
384
|
+
});
|
|
385
|
+
documentLoads.set(load, promise);
|
|
386
|
+
return promise;
|
|
387
|
+
}
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/modules/flow/flowStyles.ts
|
|
390
|
+
var shell = () => import("./shell/styles.css.js");
|
|
391
|
+
var moduleSheets = [
|
|
392
|
+
{
|
|
393
|
+
keys: [
|
|
394
|
+
"SELFIE",
|
|
395
|
+
"AUTHENTICATION",
|
|
396
|
+
"VIDEO_ONBOARDING"
|
|
397
|
+
],
|
|
398
|
+
load: () => import("../selfie/styles.css.js")
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
keys: ["PHONE"],
|
|
402
|
+
load: () => import("../phone/styles.css.js")
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
keys: ["EMAIL", "DYNAMIC_FORMS"],
|
|
406
|
+
load: () => import("../email/styles.css.js")
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
keys: ["FACE_MATCH"],
|
|
410
|
+
load: () => import("../face-match/styles.css.js")
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
keys: ["GOVT_VALIDATION_PROVISIONING", "INE_VALIDATION"],
|
|
414
|
+
load: () => import("../government-validation/styles.css.js")
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
keys: [
|
|
418
|
+
"ID",
|
|
419
|
+
"ID_CAPTURE",
|
|
420
|
+
"TUTORIAL_ID",
|
|
421
|
+
"SECOND_ID",
|
|
422
|
+
"VIDEO_ONBOARDING"
|
|
423
|
+
],
|
|
424
|
+
load: () => import("../id/styles.css.js")
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
keys: ["ID_OCR"],
|
|
428
|
+
load: () => import("../id-ocr/styles.css.js")
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
keys: ["DOCUMENT_CAPTURE", "ADDRESS"],
|
|
432
|
+
load: () => import("../document-capture/styles.css.js")
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
keys: ["CURP_VALIDATION"],
|
|
436
|
+
load: () => import("../curp-validation/styles.css.js")
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
keys: ["GEOLOCATION"],
|
|
440
|
+
load: () => import("../geolocation/styles.css.js")
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
keys: ["EXTERNAL_VERIFICATION"],
|
|
444
|
+
load: () => import("../ekyc/styles.css.js")
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
keys: ["EKYB"],
|
|
448
|
+
load: () => import("../ekyb/styles.css.js")
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
keys: ["REDIRECT_TO_MOBILE"],
|
|
452
|
+
load: () => import("../redirect-to-mobile/styles.css.js")
|
|
453
|
+
},
|
|
454
|
+
{
|
|
455
|
+
keys: [
|
|
456
|
+
"COMBINED_CONSENT",
|
|
457
|
+
"MANDATORY_CONSENT",
|
|
458
|
+
"ML_CONSENT"
|
|
459
|
+
],
|
|
460
|
+
load: () => import("../consent/styles.css.js")
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
keys: ["CUSTOM_FIELDS"],
|
|
464
|
+
load: () => import("../custom-fields/styles.css.js")
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
keys: ["DYNAMIC_FORMS"],
|
|
468
|
+
load: () => import("../dynamic-forms/styles.css.js")
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
keys: ["SIGNATURE"],
|
|
472
|
+
load: () => import("../signature/styles.css.js")
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
keys: ["FIELD_COMPARISON"],
|
|
476
|
+
load: () => import("../field-comparison/styles.css.js")
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
keys: ["WATCHLIST_BUSINESS"],
|
|
480
|
+
load: () => import("../watchlist-for-business/styles.css.js")
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
keys: ["AE_SIGNATURE", "QE_SIGNATURE"],
|
|
484
|
+
load: () => import("../electronic-signature/styles.css.js")
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
keys: ["CERTIFICATE_ISSUANCE"],
|
|
488
|
+
load: () => import("../certificate-issuance/styles.css.js")
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
keys: ["FISCAL_QR"],
|
|
492
|
+
load: () => import("../fiscal-qr/styles.css.js")
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
keys: ["VIDEO_ONBOARDING"],
|
|
496
|
+
load: () => import("../video-selfie/styles.css.js")
|
|
497
|
+
}
|
|
498
|
+
];
|
|
499
|
+
async function loadFlowStyles(moduleKey, nonce) {
|
|
500
|
+
const pending = [loadFlowStylesheet(shell, moduleSheets.length, nonce)];
|
|
501
|
+
if (moduleKey) moduleSheets.forEach((sheet, index) => {
|
|
502
|
+
if (sheet.keys.includes(moduleKey)) pending.push(loadFlowStylesheet(sheet.load, index, nonce));
|
|
503
|
+
});
|
|
504
|
+
await Promise.all(pending);
|
|
505
|
+
}
|
|
506
|
+
//#endregion
|
|
507
|
+
//#region src/modules/flow/useFlowStyles.ts
|
|
508
|
+
function useFlowStyles(enabled, onError, nonce) {
|
|
509
|
+
const [loaded, setLoaded] = d(false);
|
|
510
|
+
const [error, setError] = d(false);
|
|
511
|
+
const onErrorRef = A(onError);
|
|
512
|
+
onErrorRef.current = onError;
|
|
513
|
+
y(() => {
|
|
514
|
+
if (!enabled) return;
|
|
515
|
+
let cancelled = false;
|
|
516
|
+
loadFlowStyles(void 0, nonce).then(() => {
|
|
517
|
+
if (!cancelled) setLoaded(true);
|
|
518
|
+
}, (error) => {
|
|
519
|
+
if (!cancelled) {
|
|
520
|
+
setError(true);
|
|
521
|
+
onErrorRef.current?.(error instanceof Error ? error.message : "Failed to load flow styles");
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
return () => {
|
|
525
|
+
cancelled = true;
|
|
526
|
+
};
|
|
527
|
+
}, [enabled, nonce]);
|
|
528
|
+
return {
|
|
529
|
+
ready: !enabled || loaded,
|
|
530
|
+
error: enabled && error
|
|
531
|
+
};
|
|
532
|
+
}
|
|
533
|
+
//#endregion
|
|
332
534
|
//#region src/modules/flow/flow.tsx
|
|
333
|
-
var LazyHomeScreen = z(() => import("../homeScreen-
|
|
334
|
-
var
|
|
535
|
+
var LazyHomeScreen = z(() => import("../homeScreen-vLMuzGDq.js").then((module) => ({ default: module.HomeScreen })));
|
|
536
|
+
var IncodeFlowInitialization = ({ config, onFinish, onError, stylesReady }) => {
|
|
335
537
|
const { i18n } = useTranslation();
|
|
538
|
+
const initialSessionLanguage = A(isSelfLoadingFlowConfig(config) ? resolveSessionLanguage(config.lang, i18n.language, readStoredLanguage()) : config.lang).current;
|
|
336
539
|
const initState = useFlowInitialization(T(() => ({
|
|
337
540
|
...config,
|
|
541
|
+
lang: initialSessionLanguage,
|
|
338
542
|
onError
|
|
339
|
-
}), [
|
|
543
|
+
}), [
|
|
544
|
+
config,
|
|
545
|
+
initialSessionLanguage,
|
|
546
|
+
onError
|
|
547
|
+
]));
|
|
340
548
|
const [flowState, flowManager] = useManager(() => initState.flowManager, { autoLoad: false });
|
|
549
|
+
if (!stylesReady) return null;
|
|
550
|
+
return /* @__PURE__ */ u(IncodeFlowContent, {
|
|
551
|
+
config,
|
|
552
|
+
onFinish,
|
|
553
|
+
onError,
|
|
554
|
+
initState,
|
|
555
|
+
flowState,
|
|
556
|
+
flowManager
|
|
557
|
+
});
|
|
558
|
+
};
|
|
559
|
+
var IncodeFlowContent = ({ config, onFinish, onError, initState, flowState, flowManager }) => {
|
|
560
|
+
const { i18n } = useTranslation();
|
|
341
561
|
const lazyModuleKey = flowState.presentation.lazyModuleKey;
|
|
342
562
|
const currentModuleKey = flowState.status === "ready" ? flowState.currentStep : void 0;
|
|
343
563
|
const moduleLoaderState = useModuleLoader({
|
|
344
564
|
moduleKey: lazyModuleKey,
|
|
345
|
-
modules: LAZY_UI_MODULES,
|
|
565
|
+
modules: T(() => config.injectCss ? Object.fromEntries(Object.entries(LAZY_UI_MODULES).map(([key, load]) => [key, () => Promise.all([load(), loadFlowStyles(key, config.cssNonce)]).then(([Component]) => Component)])) : LAZY_UI_MODULES, [config.injectCss, config.cssNonce]),
|
|
346
566
|
onModuleLoading: config.onModuleLoading,
|
|
347
567
|
onModuleLoaded: config.onModuleLoaded,
|
|
348
568
|
onError
|
|
@@ -352,7 +572,7 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
352
572
|
modules: LAZY_UI_MODULES
|
|
353
573
|
});
|
|
354
574
|
const currentModuleLoaded = moduleLoaderState.status === "loaded";
|
|
355
|
-
const showHomeLoadingScreen = config.enableHome === true && flowState.status === "ready" && flowState.flow.disableLaunchScreen !== true && flowState.currentStepIndex === 0 && flowState.homeScreen.visible === false && moduleLoaderState.status === "loading";
|
|
575
|
+
const showHomeLoadingScreen = config.enableHome === true && flowState.status === "ready" && flowState.flow.disableLaunchScreen !== true && flowState.currentStepIndex === 0 && flowState.currentStep !== "REDIRECT_TO_MOBILE" && flowState.homeScreen.visible === false && moduleLoaderState.status === "loading";
|
|
356
576
|
const isAwaitingReadyDelayed = useDelayedFlag(flowState.presentation.isAwaitingReady === true, 150);
|
|
357
577
|
const isModuleLoadingDelayed = useDelayedFlag(flowState.status === "ready" && (moduleLoaderState.status === "idle" || moduleLoaderState.status === "loading" || moduleLoaderState.status === "error"), 150);
|
|
358
578
|
usePrefetchNextModule(flowState?.status === "ready" ? flowState.steps : [], flowState?.status === "ready" ? flowState.currentStepIndex : -1, LAZY_UI_MODULES, currentModuleLoaded);
|
|
@@ -367,16 +587,30 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
367
587
|
if (readStoredLanguage()) return;
|
|
368
588
|
if (config.lang && i18n.language !== config.lang) i18n.changeLanguage(config.lang);
|
|
369
589
|
}, [config.lang, i18n]);
|
|
590
|
+
const showHome = flowState.homeScreen.visible || showHomeLoadingScreen;
|
|
591
|
+
const canWarmup = !flowState.homeScreen.visible || flowState.homeScreen.isContinueLoading;
|
|
592
|
+
const [, refreshWasmStatus] = d(0);
|
|
593
|
+
const pipelineKey = flowState.status === "ready" ? getNextRequiredWasmPipelines(flowState).join(",") : "";
|
|
594
|
+
const onWasmWarmup = A(config.onWasmWarmup);
|
|
595
|
+
onWasmWarmup.current = config.onWasmWarmup;
|
|
370
596
|
y(() => {
|
|
371
|
-
if (
|
|
372
|
-
|
|
373
|
-
const
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
597
|
+
if (!canWarmup || !pipelineKey) return;
|
|
598
|
+
let cancelled = false;
|
|
599
|
+
const pipelines = pipelineKey.split(",");
|
|
600
|
+
onWasmWarmup.current?.(pipelines);
|
|
601
|
+
warmupWasmIfNeeded(pipelines, config.wasmConfig).then(() => {
|
|
602
|
+
if (!cancelled) refreshWasmStatus((version) => version + 1);
|
|
603
|
+
}).catch((error) => {
|
|
604
|
+
console.error("WASM warmup failed:", error);
|
|
605
|
+
});
|
|
606
|
+
return () => {
|
|
607
|
+
cancelled = true;
|
|
608
|
+
};
|
|
609
|
+
}, [
|
|
610
|
+
pipelineKey,
|
|
611
|
+
canWarmup,
|
|
612
|
+
config.wasmConfig
|
|
613
|
+
]);
|
|
380
614
|
const terminalFiredRef = A(false);
|
|
381
615
|
y(() => {
|
|
382
616
|
if (terminalFiredRef.current) return;
|
|
@@ -409,7 +643,7 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
409
643
|
class: "IncodeFlow",
|
|
410
644
|
children: /* @__PURE__ */ u(TerminalErrorPage, { message: initState.error })
|
|
411
645
|
});
|
|
412
|
-
if (
|
|
646
|
+
if (showHome) return /* @__PURE__ */ u("div", {
|
|
413
647
|
class: "IncodeFlow",
|
|
414
648
|
children: /* @__PURE__ */ u(P, {
|
|
415
649
|
fallback: null,
|
|
@@ -463,6 +697,10 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
463
697
|
onNext: () => flowManager.completeModule()
|
|
464
698
|
})
|
|
465
699
|
});
|
|
700
|
+
if (config.injectCss && moduleLoaderState.status === "error") return /* @__PURE__ */ u("div", {
|
|
701
|
+
class: "IncodeFlow",
|
|
702
|
+
children: /* @__PURE__ */ u(TerminalErrorPage, {})
|
|
703
|
+
});
|
|
466
704
|
if (moduleLoaderState.status === "idle" || moduleLoaderState.status === "loading" || moduleLoaderState.status === "error") {
|
|
467
705
|
if (!isModuleLoadingDelayed) return /* @__PURE__ */ u("div", { class: "IncodeFlow" });
|
|
468
706
|
return /* @__PURE__ */ u("div", {
|
|
@@ -477,7 +715,10 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
477
715
|
if (currentStep === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ u("div", {
|
|
478
716
|
class: "IncodeFlow",
|
|
479
717
|
children: /* @__PURE__ */ u(Component, {
|
|
480
|
-
config:
|
|
718
|
+
config: {
|
|
719
|
+
...flowConfig,
|
|
720
|
+
...config.redirectToMobileUrl !== void 0 ? { url: config.redirectToMobileUrl } : {}
|
|
721
|
+
},
|
|
481
722
|
onFinish: () => flowManager.finishFlow(),
|
|
482
723
|
onContinue: () => flowManager.completeModule(),
|
|
483
724
|
onError
|
|
@@ -498,9 +739,7 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
498
739
|
children: /* @__PURE__ */ u(Component, {
|
|
499
740
|
config: flowConfig,
|
|
500
741
|
onFinish: () => flowManager.completeModule(),
|
|
501
|
-
onError: (error)
|
|
502
|
-
onError?.(error ?? "Video selfie error");
|
|
503
|
-
}
|
|
742
|
+
onError: createModuleErrorHandler(flowManager, "Video selfie error")
|
|
504
743
|
}, `video-onboarding-${flowState.currentStepIndex}`)
|
|
505
744
|
});
|
|
506
745
|
if (currentStep === "AUTHENTICATION") return /* @__PURE__ */ u("div", {
|
|
@@ -511,7 +750,7 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
511
750
|
authHint: config.authHint
|
|
512
751
|
},
|
|
513
752
|
onFinish: () => flowManager.completeModule(),
|
|
514
|
-
onError: (
|
|
753
|
+
onError: createModuleErrorHandler(flowManager, "Authentication error")
|
|
515
754
|
}, `authentication-${flowState.currentStepIndex}`)
|
|
516
755
|
});
|
|
517
756
|
if (currentStep === "PHONE") return /* @__PURE__ */ u("div", {
|
|
@@ -543,13 +782,16 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
543
782
|
}
|
|
544
783
|
if (currentStep === "ID" || currentStep === "SECOND_ID") {
|
|
545
784
|
const idConfig = flowConfig;
|
|
785
|
+
const isSecondId = currentStep === "SECOND_ID";
|
|
546
786
|
return /* @__PURE__ */ u("div", {
|
|
547
787
|
class: "IncodeFlow",
|
|
548
788
|
children: /* @__PURE__ */ u(Component, {
|
|
549
|
-
config:
|
|
789
|
+
config: {
|
|
550
790
|
...idConfig,
|
|
551
|
-
isSecondId: true
|
|
552
|
-
|
|
791
|
+
...isSecondId ? { isSecondId: true } : {},
|
|
792
|
+
digitalIdReturn: config.digitalIdReturn,
|
|
793
|
+
digitalIdReturnUrl: config.digitalIdReturnUrl ?? (typeof window !== "undefined" ? `${window.location.origin}${window.location.pathname}` : void 0)
|
|
794
|
+
},
|
|
553
795
|
onFinish: (output) => flowManager.completeModule(output),
|
|
554
796
|
onError: (error) => {
|
|
555
797
|
onError?.(error ?? "ID capture error");
|
|
@@ -707,21 +949,22 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
707
949
|
type: isMlConsent ? "ML" : "MANDATORY"
|
|
708
950
|
},
|
|
709
951
|
onFinish: () => flowManager.completeModule(),
|
|
710
|
-
onError: (
|
|
711
|
-
onError?.(error ?? (isMlConsent ? "ML consent error" : "Mandatory consent error"));
|
|
712
|
-
}
|
|
952
|
+
onError: createModuleErrorHandler(flowManager)
|
|
713
953
|
}, `${isMlConsent ? "ml" : "mandatory"}-consent-${flowState.currentStepIndex}`)
|
|
714
954
|
});
|
|
715
955
|
}
|
|
716
956
|
if (currentStep === "AE_SIGNATURE" || currentStep === "QE_SIGNATURE") {
|
|
717
957
|
const sigConfig = flowConfig;
|
|
718
958
|
const label = currentStep === "QE_SIGNATURE" ? "qe" : "ae";
|
|
959
|
+
const providerCode = currentStep === "QE_SIGNATURE" ? flowConfig.providerCode : void 0;
|
|
719
960
|
return /* @__PURE__ */ u("div", {
|
|
720
961
|
class: "IncodeFlow",
|
|
721
962
|
children: /* @__PURE__ */ u(Component, {
|
|
722
963
|
config: {
|
|
723
964
|
uploadDocument: sigConfig.uploadDocument,
|
|
724
|
-
downloadDocument: sigConfig.downloadDocument
|
|
965
|
+
downloadDocument: sigConfig.downloadDocument,
|
|
966
|
+
providerCode,
|
|
967
|
+
language: i18n.language
|
|
725
968
|
},
|
|
726
969
|
onFinish: () => flowManager.completeModule(),
|
|
727
970
|
onError: (error) => {
|
|
@@ -845,10 +1088,13 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
|
|
|
845
1088
|
return null;
|
|
846
1089
|
};
|
|
847
1090
|
var IncodeFlow = ({ config, onFinish = () => {}, onError }) => {
|
|
848
|
-
|
|
1091
|
+
const styles = useFlowStyles(config?.injectCss, onError, config?.cssNonce);
|
|
1092
|
+
if (styles.error) return /* @__PURE__ */ u(IncodeComponent, { children: /* @__PURE__ */ u(TerminalErrorPage, {}) });
|
|
1093
|
+
return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(ResolvedConfigProvider, { children: /* @__PURE__ */ u(IncodeFlowInitialization, {
|
|
849
1094
|
config,
|
|
850
1095
|
onFinish,
|
|
851
|
-
onError
|
|
1096
|
+
onError,
|
|
1097
|
+
stylesReady: styles.ready
|
|
852
1098
|
}) }) : null });
|
|
853
1099
|
};
|
|
854
1100
|
registerIncodeModuleElement(IncodeFlow, "incode-flow");
|