@incodetech/web 2.1.1 → 2.2.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.
Files changed (205) hide show
  1. package/dist/ae-signature/ae-signature.es.js +7 -4
  2. package/dist/antifraud/antifraud.es.js +6 -6
  3. package/dist/authentication/authentication.es.js +7 -7
  4. package/dist/{autoFocusTitle-CuRu2lPg.js → autoFocusTitle-gLba2mgp.js} +6 -3
  5. package/dist/{back-horizontal-hint-xTnSQbzn.js → back-horizontal-hint-BBGuJ75y.js} +1 -1
  6. package/dist/{back-vertical-hint-BWWlHfX2.js → back-vertical-hint-B9usJ5lY.js} +1 -1
  7. package/dist/base.css +425 -3290
  8. package/dist/{bottomSheet-CnWbbUAM.js → bottomSheet-Cp8DLulN.js} +7 -8
  9. package/dist/certificate-issuance/certificate-issuance.es.js +34 -87
  10. package/dist/certificate-issuance/styles.css +0 -41
  11. package/dist/{checkbox-1wUHSoaK.js → checkbox-C38Elx0O.js} +5 -5
  12. package/dist/connectionError-DAeXp8sE.js +45 -0
  13. package/dist/consent/consent.es.js +10 -12
  14. package/dist/consent/styles.css +5 -4
  15. package/dist/{countrySelector-SvUOyPo0.js → countrySelector-2t-ZTgGo.js} +3 -3
  16. package/dist/cross-document-data-match/cross-document-data-match.es.js +13 -10
  17. package/dist/curp-validation/curp-validation.es.js +28 -29
  18. package/dist/curp-validation/styles.css +47 -0
  19. package/dist/{customFields-BDsXR7A-.js → customFields-B8HQZ7Mh.js} +13 -14
  20. package/dist/{customWatchlist-CYoRNCim.js → customWatchlist-_tUmZ855.js} +9 -9
  21. package/dist/dashboardTheme-CVliZSR-.js +223 -0
  22. package/dist/{dateInputComposed-DuaofcBl.js → dateInputComposed-eRcbt_SL.js} +5 -5
  23. package/dist/dateInputComposed-ks0-opuq.js +1 -0
  24. package/dist/document-capture/document-capture.es.js +1 -1
  25. package/dist/document-capture/styles.css +85 -70
  26. package/dist/{documentCapture-DhbO-A-V.js → documentCapture-BvEGCYj-.js} +218 -136
  27. package/dist/documentCapture-DdHdRPzR.js +2 -0
  28. package/dist/{dropdownComposed-CoU0enG6.js → dropdownComposed-OHDHzt1Q.js} +18 -11
  29. package/dist/dropdownComposed-kjG4UblM.js +1 -0
  30. package/dist/dynamic-forms/styles.css +58 -6
  31. package/dist/{dynamicForms-BifGbC9F.js → dynamicForms-P-4E42IA.js} +53 -45
  32. package/dist/ekyb/ekyb.es.js +1 -1
  33. package/dist/ekyb/styles.css +1 -28
  34. package/dist/ekybModule-CiaxFHXo.js +2 -0
  35. package/dist/{ekybModule-DGnTw5UV.js → ekybModule-DmjkzVWE.js} +51 -27
  36. package/dist/ekyc/ekyc.es.js +1 -1
  37. package/dist/ekyc/styles.css +2 -2
  38. package/dist/ekycModule-BVt10kgv.js +2 -0
  39. package/dist/{ekycModule-Dxpdd0ns.js → ekycModule-Da1Fm7ai.js} +45 -19
  40. package/dist/electronic-signature/electronic-signature.es.js +1 -1
  41. package/dist/{ae-signature → electronic-signature}/styles.css +2 -2
  42. package/dist/{electronic-signature-Ueoffasr.js → electronic-signature-yamI6zHM.js} +31 -23
  43. package/dist/email/email.es.js +10 -11
  44. package/dist/{emailInput-DsLkDtER.js → emailInput-B0P2Q-pk.js} +4 -4
  45. package/dist/{expiredId-BZXLrLk-.js → expiredId-BXXE3srN.js} +6 -6
  46. package/dist/{extensibility-7sRIN0JC.js → extensibility-iJYzpW6H.js} +440 -374
  47. package/dist/extensibility.es.js +24 -28
  48. package/dist/face-match/face-match.es.js +1 -1
  49. package/dist/face-match/styles.css +9 -609
  50. package/dist/faceMatch-D4XFihTc.js +2 -0
  51. package/dist/{faceMatch-DyTBoMDm.js → faceMatch-VtEZvsen.js} +71 -79
  52. package/dist/field-comparison/field-comparison.es.js +1 -1
  53. package/dist/fieldComparison-B_r9Bal7.js +2 -0
  54. package/dist/{fieldComparison-L_knHqgw.js → fieldComparison-NLdDSOEh.js} +11 -12
  55. package/dist/finalSuccessScreen-DryADx1n.js +500 -0
  56. package/dist/fiscal-qr/fiscal-qr.es.js +12 -12
  57. package/dist/flip-animation-CvN8FLNc.js +6996 -0
  58. package/dist/flow/flow.es.js +81 -45
  59. package/dist/flow/styles.css +908 -5423
  60. package/dist/{front-horizontal-hint-B84GgTO1.js → front-horizontal-hint-D3CrWViZ.js} +1 -1
  61. package/dist/{front-vertical-hint-Bs_avngq.js → front-vertical-hint-BoLZvyx5.js} +1 -1
  62. package/dist/geolocation/geolocation.es.js +36 -13
  63. package/dist/geolocation/styles.css +1 -1
  64. package/dist/government-validation/government-validation.es.js +11 -12
  65. package/dist/{homeScreen-B6T0JVh8.js → homeScreen-Pv3v_0ji.js} +7 -9
  66. package/dist/{icons-CJJbIpBq.js → icons--ezYG2Fb.js} +92 -7
  67. package/dist/id/id.es.js +222 -52
  68. package/dist/id/styles.css +290 -10
  69. package/dist/id-back-of-card-DO593HH8.js +83 -0
  70. package/dist/id-back-of-card-vertical-DArEQ0hE.js +88 -0
  71. package/dist/id-front-of-card-Bcit7Pnq.js +308 -0
  72. package/dist/id-front-of-card-vertical-Bcr-KXcl.js +278 -0
  73. package/dist/id-laser-h-BaUHzX-d.js +480 -0
  74. package/dist/{id-laser-v-BiUXkM4x.js → id-laser-v-Dv9yEYJE.js} +7 -17
  75. package/dist/id-selfie-flow/id-selfie-flow.es.js +239 -0
  76. package/dist/id-selfie-flow/styles.css +749 -0
  77. package/dist/id-verification/id-verification.es.js +13 -9
  78. package/dist/{idOcr-WFBvqy3b.js → idOcr-gsIXHq6R.js} +14 -15
  79. package/dist/identity-reuse/identity-reuse.es.js +6 -8
  80. package/dist/identity-reuse/styles.css +1 -1
  81. package/dist/{incode-logo-57XFniXU.js → incode-logo-rGFjZHqi.js} +64 -1
  82. package/dist/incodeComponent-K9ZWg302.js +713 -0
  83. package/dist/incodeModule-CcLzar_X.js +25 -0
  84. package/dist/index.es.js +16 -5
  85. package/dist/{inputComposed-C1R2LAa3.js → inputComposed-BeROn635.js} +9 -9
  86. package/dist/inputComposed-CADVQW-o.js +1 -0
  87. package/dist/{mandatoryConsent-D0GTKu-H.js → mandatoryConsent-BtqB-FxY.js} +9 -11
  88. package/dist/{capture-CkGvdDNH.js → manualCaptureButton-quGa2ufS.js} +68 -198
  89. package/dist/manualCaptureButton-t_oIol88.js +300 -0
  90. package/dist/{modal-OxkFuuiR.js → modal-BjjJFpZu.js} +4 -4
  91. package/dist/{modal.hooks-ZrzmHAUa.js → modal.hooks-BvXzNWvY.js} +1 -1
  92. package/dist/{numberedStep-CEb-lFJm.js → numberedStep-DUs77Gy3.js} +1 -1
  93. package/dist/{optionAccessibleLabel-gfF-58Mv.js → optionAccessibleLabel-DgfHD_mx.js} +6 -6
  94. package/dist/{otpInput-CnDc6pQm.js → otpInput-D5dLXrmC.js} +72 -36
  95. package/dist/{passport-horizontal-hint-Bj0ZJY0g.js → passport-horizontal-hint-DgnU-8bl.js} +1 -1
  96. package/dist/{passport-vertical-hint-Dfk77xUJ.js → passport-vertical-hint-Dd2Wknw7.js} +1 -1
  97. package/dist/{pdf-BqtJTlor.js → pdf-BUoY_2gv.js} +1 -1
  98. package/dist/pdfViewer-CZb6obcZ.js +2 -0
  99. package/dist/{pdfViewer-B97DmT9m.js → pdfViewer-vud1VZv6.js} +5 -7
  100. package/dist/phone/phone.es.js +13 -12
  101. package/dist/{phoneInputComposed-DMiXfF-1.js → phoneInputComposed-CeVWTS_O.js} +7 -6
  102. package/dist/{processing-BeUMfdJJ.js → processing-BsvHyDWa.js} +2 -2
  103. package/dist/qe-signature/qe-signature.es.js +7 -4
  104. package/dist/{radioGroupComposed-DuQxslB2.js → radioGroupComposed-DzNGUbZQ.js} +16 -15
  105. package/dist/redirect-to-mobile/redirect-to-mobile.es.js +132 -45
  106. package/dist/redirect-to-mobile/styles.css +20 -10
  107. package/dist/{registerIncodeElement-DaNjbAwZ.js → registerIncodeElement-BduCekz5.js} +1 -1
  108. package/dist/{richText-CB1fmegc.js → richText-CTHBpZOw.js} +3 -1607
  109. package/dist/selfie/selfie.es.js +10 -10
  110. package/dist/selfie/styles.css +16 -949
  111. package/dist/signature/signature.es.js +27 -19
  112. package/dist/{ae-signature/styles2.css → signature/styles.css} +4 -4
  113. package/dist/{snackbar-DS7Mv62v.js → snackbar-C9Mqrh0e.js} +2 -2
  114. package/dist/spacer-CDlQd12V.js +2344 -0
  115. package/dist/{spinner-BMeIEK1d.js → spinner-CLZ2fz4u.js} +45 -4
  116. package/dist/statusPage--GVFSUJp.js +36 -0
  117. package/dist/{successIcon-B5mGvdx1.js → successIcon-Bj8Y9CuI.js} +1 -1
  118. package/dist/{tabs-C__chW-u.js → tabs-DweBZTV2.js} +4 -3
  119. package/dist/themes/dark.css +35 -0
  120. package/dist/themes/light.css +35 -0
  121. package/dist/{tutorial-CCfPuVKX.js → tutorial-BZZC93Ur.js} +222 -180
  122. package/dist/types/ae-signature.d.ts +91 -5
  123. package/dist/types/antifraud.d.ts +86 -3
  124. package/dist/types/authentication.d.ts +86 -3
  125. package/dist/types/certificate-issuance.d.ts +86 -3
  126. package/dist/types/consent.d.ts +86 -3
  127. package/dist/types/cross-document-data-match.d.ts +88 -4
  128. package/dist/types/curp-validation.d.ts +86 -3
  129. package/dist/types/document-capture.d.ts +88 -4
  130. package/dist/types/ekyb.d.ts +88 -4
  131. package/dist/types/ekyc.d.ts +88 -4
  132. package/dist/types/electronic-signature.d.ts +87 -4
  133. package/dist/types/email.d.ts +82 -22
  134. package/dist/types/extensibility.d.ts +157 -5
  135. package/dist/types/face-match.d.ts +84 -22
  136. package/dist/types/field-comparison.d.ts +86 -3
  137. package/dist/types/fiscal-qr.d.ts +89 -5
  138. package/dist/types/flow.d.ts +92 -2
  139. package/dist/types/geolocation.d.ts +86 -3
  140. package/dist/types/government-validation.d.ts +86 -3
  141. package/dist/types/id-selfie-flow.d.ts +161 -0
  142. package/dist/types/id-verification.d.ts +87 -4
  143. package/dist/types/id.d.ts +88 -5
  144. package/dist/types/identity-reuse.d.ts +82 -2
  145. package/dist/types/index.d.ts +106 -1
  146. package/dist/types/phone.d.ts +83 -24
  147. package/dist/types/qe-signature.d.ts +91 -5
  148. package/dist/types/redirect-to-mobile.d.ts +4 -1
  149. package/dist/types/selfie.d.ts +86 -3
  150. package/dist/types/signature.d.ts +91 -5
  151. package/dist/types/video-selfie.d.ts +83 -6
  152. package/dist/types/watchlist.d.ts +91 -5
  153. package/dist/types/workflow.d.ts +85 -2
  154. package/dist/{i18n-CU4xq8qC.js → uiConfig-B5ASPUL4.js} +26 -3
  155. package/dist/{useModuleLoader-Bi26kJbg.js → useModuleLoader-D_YpuVsS.js} +37 -248
  156. package/dist/{vendor-preact-DThS2ZQ_.js → vendor-preact-mvwZ8mJj.js} +1 -1
  157. package/dist/{verificationResult-BWWkmeiA.js → verificationResult-B8HwR07t.js} +26 -15
  158. package/dist/video-selfie/styles.css +349 -1202
  159. package/dist/video-selfie/video-selfie.es.js +120 -381
  160. package/dist/watchlist/watchlist.es.js +16 -13
  161. package/dist/{watchlistForBusiness-D2Uo_TwF.js → watchlistForBusiness-D8Is99bZ.js} +12 -13
  162. package/dist/workflow/styles.css +501 -3977
  163. package/dist/workflow/workflow.es.js +25 -18
  164. package/package.json +22 -20
  165. package/dist/button-Dz6AsbmF.js +0 -40
  166. package/dist/cameraView-DIEzM5ru.js +0 -47
  167. package/dist/cpf-ocr/cpf-ocr.es.js +0 -2
  168. package/dist/cpf-ocr/styles.css +0 -45
  169. package/dist/cpfOcr-B79245-3.js +0 -2
  170. package/dist/cpfOcr-BhxT-lRN.js +0 -92
  171. package/dist/dateInputComposed-DRzZi6uy.js +0 -1
  172. package/dist/documentCapture-DXYYyxZl.js +0 -2
  173. package/dist/dropdownComposed-BAoxIIsE.js +0 -1
  174. package/dist/ekybModule-C6Nttked.js +0 -2
  175. package/dist/ekycModule-CDIEjI6V.js +0 -2
  176. package/dist/errorIcon-BA4T6iy-.js +0 -26
  177. package/dist/faceMatch-B_HvxLm_.js +0 -2
  178. package/dist/fieldComparison-DfNEuEE5.js +0 -2
  179. package/dist/flip-animation-CZYSUtMm.js +0 -6983
  180. package/dist/hooks-CNu7o-v8.js +0 -186
  181. package/dist/id-laser-h-CzPegPMn.js +0 -467
  182. package/dist/incodeComponent-CfzJGETt.js +0 -64
  183. package/dist/incodeModule-B-4_3JrK.js +0 -13
  184. package/dist/inputComposed-BaY5q9WM.js +0 -1
  185. package/dist/loadingIcon-B0ysgiNq.js +0 -148
  186. package/dist/page-DidH_RkX.js +0 -171
  187. package/dist/spinner-BCDCoi9C.js +0 -1
  188. package/dist/statusPage-Bk8nJwXV.js +0 -28
  189. package/dist/transitionSpinner-CuNCqHNi.js +0 -30
  190. package/dist/types/cpf-ocr.d.ts +0 -12
  191. package/dist/typography-BZIpjo97.js +0 -45
  192. package/dist/uiConfig-D2_wawvr.js +0 -25
  193. /package/dist/{aligndevicelottie-DFscByAI.js → aligndevicelottie-CfoZ5Uus.js} +0 -0
  194. /package/dist/{back-tutorial-cI_4VHmE.js → back-tutorial-BHyRHyET.js} +0 -0
  195. /package/dist/{backdevicelottie-COyhTrxM.js → backdevicelottie-yKkczgFy.js} +0 -0
  196. /package/dist/{blurdevicelottie-BLVeJHEG.js → blurdevicelottie-8BbophdM.js} +0 -0
  197. /package/dist/{browser-ponyfill-Df13Th-G.js → browser-ponyfill-CBjGwwPW.js} +0 -0
  198. /package/dist/{defineProperty-Qjefk7Uf.js → defineProperty-BbpBna-2.js} +0 -0
  199. /package/dist/{frontdevicelottie-B4tE2PYQ.js → frontdevicelottie-CFcahVLk.js} +0 -0
  200. /package/dist/{glaredevicelottie-D1pR73sx.js → glaredevicelottie-Cnvah0kz.js} +0 -0
  201. /package/dist/{id-tutorial-DwO90SAm.js → id-tutorial-BOOsXlAJ.js} +0 -0
  202. /package/dist/{lottie_light-C6B2ec41.js → lottie_light-Bv56F2Ae.js} +0 -0
  203. /package/dist/{passport-tutorial-D9JNsMsM.js → passport-tutorial-CeSup6m9.js} +0 -0
  204. /package/dist/{requiredLabelHint-D0RhuMed.js → requiredLabelHint-Dx0WS2cR.js} +0 -0
  205. /package/dist/{selfieTutorial-pB-N-fj5.js → selfieTutorial-CYa8bq6B.js} +0 -0
@@ -1,12 +1,10 @@
1
- import { n as useTranslation, o as readStoredLanguage } from "../i18n-CU4xq8qC.js";
2
- import { _ as y, c as z, d as T, l as A, o as P, p as d, v as u } from "../vendor-preact-DThS2ZQ_.js";
3
- import { t as setUiConfig } from "../uiConfig-D2_wawvr.js";
4
- import { u as useManager } from "../hooks-CNu7o-v8.js";
5
- import { t as IncodeComponent } from "../incodeComponent-CfzJGETt.js";
6
- import { t as TransitionSpinner } from "../transitionSpinner-CuNCqHNi.js";
7
- import { t as registerIncodeModuleElement } from "../incodeModule-B-4_3JrK.js";
8
- import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, y as TerminalErrorPage } from "../useModuleLoader-Bi26kJbg.js";
9
- import { getDeviceClass } from "@incodetech/core/device";
1
+ import { c as readStoredLanguage, i as useTranslation, t as setUiConfig } from "../uiConfig-B5ASPUL4.js";
2
+ import { _ as y, c as z, d as T, l as A, o as P, p as d, v as u } from "../vendor-preact-mvwZ8mJj.js";
3
+ import { a as TerminalErrorPage, i as ResolvedConfigProvider, l as TransitionSpinner, t as IncodeComponent, y as useManager } from "../incodeComponent-K9ZWg302.js";
4
+ import { n as ErrorIcon } from "../incode-logo-rGFjZHqi.js";
5
+ import { t as StatusPage } from "../statusPage--GVFSUJp.js";
6
+ import { t as registerIncodeModuleElement } from "../incodeModule-CcLzar_X.js";
7
+ import { _ as warmupWasmIfNeeded, a as resolveApiKey, c as HEADLESS_FLOW_MODULE_KEYS, d as fetchTheme, f as initializeFlowManager, h as preloadRedirectToMobile, l as LAZY_UI_MODULES, m as preloadHomeScreen, n as useModulePreloader, o as extractIncodeStatus, p as preloadFirstModule, r as usePrefetchNextModule, s as UnsupportedModule, t as useModuleLoader, u as createFlowManager, v as isDesktopOrEmulated } from "../useModuleLoader-D_YpuVsS.js";
10
8
  import { getRequiredWasmPipelines } from "@incodetech/core/flow";
11
9
  import { bootstrapSession, refreshQrUrlUuid } from "@incodetech/core/session";
12
10
  //#region src/shared/processing/useDelayedFlag.ts
@@ -34,6 +32,19 @@ function useDelayedFlag(isTrue, delayMs) {
34
32
  return delayed;
35
33
  }
36
34
  //#endregion
35
+ //#region src/modules/flow/sessionFinishedPage.tsx
36
+ var SessionFinishedPage = () => {
37
+ const { ready, t } = useTranslation();
38
+ if (!ready) return /* @__PURE__ */ u(TransitionSpinner, {});
39
+ const subtitle = t("onboarding.errors.sessionFinished.message");
40
+ return /* @__PURE__ */ u(StatusPage, {
41
+ variant: "error",
42
+ icon: /* @__PURE__ */ u(ErrorIcon, { size: 48 }),
43
+ title: t("onboarding.errors.sessionFinished.title"),
44
+ subtitle: subtitle || void 0
45
+ });
46
+ };
47
+ //#endregion
37
48
  //#region src/modules/flow/createFlowSession.ts
38
49
  async function createFlowSession(config, signal) {
39
50
  return bootstrapSession(await resolveApiKey(config), {
@@ -114,7 +125,7 @@ function preloadIncodeFlow(config) {
114
125
  lang: config.lang,
115
126
  flowManager
116
127
  });
117
- const themePromise = config.disableDashboardTheme ? Promise.resolve({}) : fetchTheme().then((result) => {
128
+ const themePromise = config.disableDashboardTheme ? Promise.resolve({}) : fetchTheme(config.token).then((result) => {
118
129
  state.theme = result.theme;
119
130
  state.uiConfig = result.uiConfig;
120
131
  });
@@ -160,7 +171,11 @@ function maybePreloadHomeScreen(flowManager) {
160
171
  if (flowManager.getState().presentation.shouldPrefetchHome) preloadHomeScreen();
161
172
  }
162
173
  function maybePreloadRedirectToMobile() {
163
- if (getDeviceClass() === "desktop") preloadRedirectToMobile();
174
+ if (isDesktopOrEmulated()) preloadRedirectToMobile();
175
+ }
176
+ function isFlowManagerError(flowManager, errorMessage) {
177
+ const managerState = flowManager.getState();
178
+ return managerState.status === "error" && managerState.error === errorMessage;
164
179
  }
165
180
  function useFlowInitialization(options) {
166
181
  const { lang, disableDashboardTheme, enableHome, onError, useCPF } = options;
@@ -168,8 +183,8 @@ function useFlowInitialization(options) {
168
183
  const flowManagerRef = A(null);
169
184
  const [state, setState] = d(() => {
170
185
  const preloaded = token ? getPreloadedData(token) : null;
171
- if (token) {
172
- if (preloaded?.status === "ready") {
186
+ if (token && preloaded) {
187
+ if (preloaded.status === "ready") {
173
188
  const consumed = consumePreloadedData(token);
174
189
  if (consumed) {
175
190
  flowManagerRef.current = consumed.flowManager;
@@ -182,6 +197,26 @@ function useFlowInitialization(options) {
182
197
  };
183
198
  }
184
199
  }
200
+ if (preloaded.status === "error") {
201
+ const consumed = consumePreloadedData(token);
202
+ if (consumed) {
203
+ flowManagerRef.current = consumed.flowManager;
204
+ return {
205
+ status: "error",
206
+ error: consumed.error ?? "Preload failed",
207
+ flowManager: consumed.flowManager
208
+ };
209
+ }
210
+ }
211
+ if (preloaded.status === "loading") {
212
+ flowManagerRef.current = preloaded.flowManager;
213
+ maybePreloadHomeScreen(preloaded.flowManager);
214
+ maybePreloadRedirectToMobile();
215
+ return {
216
+ status: "initializing",
217
+ flowManager: preloaded.flowManager
218
+ };
219
+ }
185
220
  }
186
221
  const flowManager = createFlowManager({
187
222
  authHint: options.authHint,
@@ -190,13 +225,13 @@ function useFlowInitialization(options) {
190
225
  useCPF: options.useCPF
191
226
  });
192
227
  flowManagerRef.current = flowManager;
193
- maybePreloadHomeScreen(flowManager);
194
- maybePreloadRedirectToMobile();
195
228
  if (preloaded?.status === "error") return {
196
229
  status: "error",
197
230
  error: preloaded.error ?? "Preload failed",
198
231
  flowManager
199
232
  };
233
+ maybePreloadHomeScreen(flowManager);
234
+ maybePreloadRedirectToMobile();
200
235
  return {
201
236
  status: "initializing",
202
237
  flowManager
@@ -220,15 +255,16 @@ function useFlowInitialization(options) {
220
255
  });
221
256
  }
222
257
  }).catch((error) => {
258
+ const flowManager = consumePreloadedData(token)?.flowManager ?? state.flowManager;
223
259
  const errorMessage = error instanceof Error ? error.message : "Preload failed";
224
260
  const errorCode = extractIncodeStatus(error);
225
261
  setState({
226
262
  status: "error",
227
263
  error: errorMessage,
228
264
  errorCode,
229
- flowManager: state.flowManager
265
+ flowManager
230
266
  });
231
- onError?.(errorMessage, errorCode);
267
+ if (!isFlowManagerError(flowManager, errorMessage)) onError?.(errorMessage, errorCode);
232
268
  });
233
269
  return;
234
270
  }
@@ -256,7 +292,7 @@ function useFlowInitialization(options) {
256
292
  lang,
257
293
  flowManager: state.flowManager
258
294
  });
259
- const themePromise = disableDashboardTheme ? Promise.resolve() : fetchTheme().then((result) => {
295
+ const themePromise = disableDashboardTheme ? Promise.resolve() : fetchTheme(resolvedToken).then((result) => {
260
296
  if (result.uiConfig) setUiConfig(result.uiConfig);
261
297
  });
262
298
  const flowReadyPromise = state.flowManager.waitForReady();
@@ -275,7 +311,7 @@ function useFlowInitialization(options) {
275
311
  errorCode,
276
312
  flowManager: state.flowManager
277
313
  });
278
- onError?.(errorMessage, errorCode);
314
+ if (!isFlowManagerError(state.flowManager, errorMessage)) onError?.(errorMessage, errorCode);
279
315
  }
280
316
  };
281
317
  initialize();
@@ -294,7 +330,7 @@ function useFlowInitialization(options) {
294
330
  }
295
331
  //#endregion
296
332
  //#region src/modules/flow/flow.tsx
297
- var LazyHomeScreen = z(() => import("../homeScreen-B6T0JVh8.js").then((module) => ({ default: module.HomeScreen })));
333
+ var LazyHomeScreen = z(() => import("../homeScreen-Pv3v_0ji.js").then((module) => ({ default: module.HomeScreen })));
298
334
  var IncodeFlowContent = ({ config, onFinish, onError }) => {
299
335
  const { i18n } = useTranslation();
300
336
  const initState = useFlowInitialization(T(() => ({
@@ -365,6 +401,10 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
365
401
  if (flowState?.status === "ready" && flowState.currentStep === "ID" && flowState.steps.includes("TUTORIAL_ID")) flowManager.completeModule();
366
402
  }, [flowState, flowManager]);
367
403
  const hideSpinnerText = !(config.spinnerConfig?.title || config.spinnerConfig?.subtitle);
404
+ if (flowState.status === "error" && flowState.moduleErrorCode === "SESSION_FINISHED") return /* @__PURE__ */ u("div", {
405
+ class: "IncodeFlow",
406
+ children: /* @__PURE__ */ u(SessionFinishedPage, {})
407
+ });
368
408
  if (initState.status === "error") return /* @__PURE__ */ u("div", {
369
409
  class: "IncodeFlow",
370
410
  children: /* @__PURE__ */ u(TerminalErrorPage, { message: initState.error })
@@ -510,7 +550,7 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
510
550
  ...idConfig,
511
551
  isSecondId: true
512
552
  } : idConfig,
513
- onFinish: () => flowManager.completeModule(),
553
+ onFinish: (output) => flowManager.completeModule(output),
514
554
  onError: (error) => {
515
555
  onError?.(error ?? "ID capture error");
516
556
  }
@@ -535,15 +575,6 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
535
575
  }, `id-ocr-${flowState.currentStepIndex}`)
536
576
  });
537
577
  }
538
- if (currentStep === "CPF_OCR") return /* @__PURE__ */ u("div", {
539
- class: "IncodeFlow",
540
- children: /* @__PURE__ */ u(Component, {
541
- onFinish: () => flowManager.completeModule(),
542
- onError: (error) => {
543
- onError?.(error ?? "CPF OCR error");
544
- }
545
- }, `cpf-ocr-${flowState.currentStepIndex}`)
546
- });
547
578
  if (currentStep === "FACE_MATCH") return /* @__PURE__ */ u("div", {
548
579
  class: "IncodeFlow",
549
580
  children: /* @__PURE__ */ u(Component, {
@@ -777,19 +808,24 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
777
808
  if (currentStep === "DYNAMIC_FORMS") return /* @__PURE__ */ u("div", {
778
809
  class: "IncodeFlow",
779
810
  children: /* @__PURE__ */ u(Component, {
780
- config: { screens: flowConfig.screens.map((s) => ({
781
- title: s.title,
782
- hideTitle: s.hideTitle,
783
- questions: s.questions.map((q) => ({
784
- questionId: q.questionId,
785
- question: q.question,
786
- inputType: q.inputType,
787
- isOptional: q.isOptional,
788
- overrides: q.overrides ?? void 0,
789
- isPredefined: q.isPredefined,
790
- options: q.options
791
- }))
792
- })) },
811
+ config: {
812
+ screens: flowConfig.screens.map((s) => ({
813
+ title: s.title,
814
+ hideTitle: s.hideTitle,
815
+ questions: s.questions.map((q) => ({
816
+ questionId: q.questionId,
817
+ question: q.question,
818
+ inputType: q.inputType,
819
+ isOptional: q.isOptional,
820
+ overrides: q.overrides ?? void 0,
821
+ isPredefined: q.isPredefined,
822
+ options: q.options,
823
+ prefillSource: q.prefillSource,
824
+ editable: q.editable
825
+ }))
826
+ })),
827
+ prefillValue: config.loginHintPrefill
828
+ },
793
829
  onFinish: () => flowManager.completeModule(),
794
830
  onError: (error) => {
795
831
  onError?.(error ?? "Dynamic forms error");
@@ -809,11 +845,11 @@ var IncodeFlowContent = ({ config, onFinish, onError }) => {
809
845
  return null;
810
846
  };
811
847
  var IncodeFlow = ({ config, onFinish = () => {}, onError }) => {
812
- return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(IncodeFlowContent, {
848
+ return /* @__PURE__ */ u(IncodeComponent, { children: config ? /* @__PURE__ */ u(ResolvedConfigProvider, { children: /* @__PURE__ */ u(IncodeFlowContent, {
813
849
  config,
814
850
  onFinish,
815
851
  onError
816
- }) : null });
852
+ }) }) : null });
817
853
  };
818
854
  registerIncodeModuleElement(IncodeFlow, "incode-flow");
819
855
  //#endregion