@incodetech/web 0.0.0-dev-20260417-f366ac3 → 0.0.0-dev-20260418-89e0d60

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.
@@ -5,48 +5,59 @@ import { o as c, t as l } from "../incodeComponent-CutyB4AE.js";
5
5
  import { t as u } from "../spinner-l6dvYqCg.js";
6
6
  import "../spinner-CFvndzMU.js";
7
7
  import { t as d } from "../incodeModule-D_r2n18O.js";
8
- import { a as f, c as p, f as m, i as h, l as g, n as _, o as v, r as y, s as b, t as x, u as S } from "../useModuleLoader-D2b8kAsh.js";
9
- import { getRequiredWasmPipelines as C } from "@incodetech/core/flow";
10
- import { createSession as w } from "@incodetech/core/session";
8
+ import { a as f, c as p, d as m, i as h, l as g, n as _, o as v, p as y, r as b, s as x, t as S, u as C } from "../useModuleLoader-CjYPWq6s.js";
9
+ import { getDeviceClass as w } from "@incodetech/core/device";
10
+ import { getRequiredWasmPipelines as T } from "@incodetech/core/flow";
11
+ import { createSession as E, validateQrUuid as D } from "@incodetech/core/session";
11
12
  //#region src/modules/flow/createFlowSession.ts
12
- function T(e) {
13
+ function O(e) {
13
14
  return Array.from(new Uint8Array(e), (e) => e.toString(16).padStart(2, "0")).join("");
14
15
  }
15
- async function E(e) {
16
+ async function k(e) {
16
17
  let t = globalThis.crypto?.subtle;
17
18
  if (!t) throw Error("SHA-1 is not available in this environment");
18
- return T(await t.digest("SHA-1", new TextEncoder().encode(e)));
19
+ return O(await t.digest("SHA-1", new TextEncoder().encode(e)));
19
20
  }
20
- async function D(e) {
21
+ async function A(e) {
21
22
  if (typeof e.apiKey == "string") return e.apiKey;
22
- if (typeof e.clientId == "string") return E(e.clientId);
23
+ if (typeof e.clientId == "string") return k(e.clientId);
23
24
  throw Error("Flow self-loading mode requires apiKey or clientId");
24
25
  }
25
- async function O(e, t) {
26
- return w(await D(e), {
26
+ async function j(e, t) {
27
+ if (typeof e.urlUuid != "string" || e.urlUuid.length === 0) return;
28
+ let n = await D({
29
+ onboardingId: e.uuid ?? null,
30
+ urlUuid: e.urlUuid
31
+ }, t);
32
+ return e.onUrlUuidRefreshed?.(n.urlUuid), n.urlUuid;
33
+ }
34
+ async function M(e, t) {
35
+ let n = await A(e), r = await j(e, t);
36
+ return E(n, {
27
37
  configurationId: e.configurationId,
28
38
  externalId: e.externalId,
29
39
  externalCustomerId: e.externalCustomerId,
30
40
  language: e.lang,
31
41
  customFields: e.customFields,
32
42
  uuid: e.uuid,
43
+ urlUuid: r,
33
44
  interviewId: e.interviewId
34
45
  }, t);
35
46
  }
36
47
  //#endregion
37
48
  //#region src/modules/flow/flowConfig.ts
38
- function k(e) {
49
+ function N(e) {
39
50
  return typeof e.token == "string";
40
51
  }
41
- function A(e) {
52
+ function P(e) {
42
53
  let t = e;
43
54
  return typeof t.configurationId == "string" && (typeof t.apiKey == "string" || typeof t.clientId == "string");
44
55
  }
45
56
  //#endregion
46
57
  //#region src/modules/flow/preloadFlow.ts
47
- var j = /* @__PURE__ */ new Map();
48
- function M(e) {
49
- let t = j.get(e);
58
+ var F = /* @__PURE__ */ new Map();
59
+ function I(e) {
60
+ let t = F.get(e);
50
61
  if (!t) throw Error("Preload state not found");
51
62
  return {
52
63
  get isReady() {
@@ -62,17 +73,17 @@ function M(e) {
62
73
  }
63
74
  },
64
75
  cancel() {
65
- t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), j.delete(e));
76
+ t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), F.delete(e));
66
77
  }
67
78
  };
68
79
  }
69
- function N(e) {
80
+ function L(e) {
70
81
  let { token: t } = e;
71
- if (j.has(t)) return M(t);
82
+ if (F.has(t)) return I(t);
72
83
  let n, r, i = new Promise((e, t) => {
73
84
  n = e, r = t;
74
85
  }), a = v(e);
75
- a.getState().presentation.shouldPrefetchHome && S();
86
+ a.getState().presentation.shouldPrefetchHome && C();
76
87
  let o = {
77
88
  status: "loading",
78
89
  flowManager: a,
@@ -81,7 +92,7 @@ function N(e) {
81
92
  readyResolve: n,
82
93
  readyReject: r
83
94
  };
84
- return j.set(t, o), (async () => {
95
+ return F.set(t, o), (async () => {
85
96
  try {
86
97
  await p({
87
98
  apiURL: e.apiURL,
@@ -89,44 +100,47 @@ function N(e) {
89
100
  lang: e.lang,
90
101
  flowManager: a
91
102
  });
92
- let t = e.disableDashboardTheme ? Promise.resolve({}) : b().then((e) => {
103
+ let t = e.disableDashboardTheme ? Promise.resolve({}) : x().then((e) => {
93
104
  o.theme = e.theme, o.uiConfig = e.uiConfig;
94
105
  });
95
106
  o.unsubscribe = a.subscribe((t) => {
96
107
  if (t.status === "ready") {
97
108
  let n = t;
98
- m(n, e.wasmConfig), g(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
109
+ y(n, e.wasmConfig), g(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
99
110
  } else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
100
111
  }), await t;
101
112
  } catch (e) {
102
- o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), j.delete(t);
113
+ o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), F.delete(t);
103
114
  }
104
- })(), M(t);
115
+ })(), I(t);
105
116
  }
106
- function P(e) {
107
- return j.get(e) ?? null;
117
+ function R(e) {
118
+ return F.get(e) ?? null;
108
119
  }
109
- function F(e) {
110
- let t = P(e);
111
- return t && j.delete(e), t;
120
+ function z(e) {
121
+ let t = R(e);
122
+ return t && F.delete(e), t;
112
123
  }
113
124
  //#endregion
114
125
  //#region src/modules/flow/useFlowInitialization.ts
115
- function I(e) {
116
- e.getState().presentation.shouldPrefetchHome && S();
126
+ function B(e) {
127
+ e.getState().presentation.shouldPrefetchHome && C();
117
128
  }
118
- function L(e) {
119
- let { apiURL: n, lang: i, disableDashboardTheme: o, enableHome: c, onError: l } = e, u = k(e) ? e.token : void 0, d = r(null), [f, m] = a(() => {
120
- let t = u ? P(u) : null;
129
+ function V() {
130
+ w() === "desktop" && m();
131
+ }
132
+ function H(e) {
133
+ let { apiURL: n, lang: i, disableDashboardTheme: o, enableHome: c, onError: l } = e, u = N(e) ? e.token : void 0, d = r(null), [f, m] = a(() => {
134
+ let t = u ? R(u) : null;
121
135
  if (u && t?.status === "ready") {
122
- let e = F(u);
123
- if (e) return d.current = e.flowManager, I(e.flowManager), e.uiConfig && s(e.uiConfig), {
136
+ let e = z(u);
137
+ if (e) return d.current = e.flowManager, B(e.flowManager), V(), e.uiConfig && s(e.uiConfig), {
124
138
  status: "ready",
125
139
  flowManager: e.flowManager
126
140
  };
127
141
  }
128
142
  let n = v(e);
129
- return d.current = n, I(n), t?.status === "error" ? {
143
+ return d.current = n, B(n), V(), t?.status === "error" ? {
130
144
  status: "error",
131
145
  error: t.error ?? "Preload failed",
132
146
  flowManager: n
@@ -137,11 +151,11 @@ function L(e) {
137
151
  }), h = r(!1);
138
152
  return t(() => {
139
153
  if (f.status !== "initializing") return;
140
- let t = u ? P(u) : null;
154
+ let t = u ? R(u) : null;
141
155
  if (u && t?.status === "loading") {
142
156
  t.readyPromise.then(() => {
143
- let e = F(u);
144
- e && (d.current = e.flowManager, I(e.flowManager), e.uiConfig && s(e.uiConfig), m({
157
+ let e = z(u);
158
+ e && (d.current = e.flowManager, B(e.flowManager), V(), e.uiConfig && s(e.uiConfig), m({
145
159
  status: "ready",
146
160
  flowManager: e.flowManager
147
161
  }));
@@ -158,15 +172,15 @@ function L(e) {
158
172
  h.current || (h.current = !0, (async () => {
159
173
  try {
160
174
  let t;
161
- if (k(e)) t = e.token;
162
- else if (A(e)) t = (await O(e)).token;
175
+ if (N(e)) t = e.token;
176
+ else if (P(e)) t = (await M(e)).token;
163
177
  else throw Error("Flow requires token, or configurationId with apiKey or clientId");
164
178
  await p({
165
179
  apiURL: n,
166
180
  token: t,
167
181
  lang: i,
168
182
  flowManager: f.flowManager
169
- }), await (o ? Promise.resolve() : b().then((e) => {
183
+ }), await (o ? Promise.resolve() : x().then((e) => {
170
184
  e.uiConfig && s(e.uiConfig);
171
185
  })), m({
172
186
  status: "ready",
@@ -194,31 +208,30 @@ function L(e) {
194
208
  }
195
209
  //#endregion
196
210
  //#region src/modules/flow/flow.tsx
197
- var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.HomeScreen }))), z = ({ config: n, onFinish: r, onError: a }) => {
198
- let { t: s, i18n: l } = e(), d = L({
211
+ var U = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.HomeScreen }))), W = ({ config: n, onFinish: r, onError: a }) => {
212
+ let { t: s, i18n: l } = e(), d = H({
199
213
  ...n,
200
214
  onError: a
201
- }), [p, g] = c(() => d.flowManager, { autoLoad: !1 }), v = p.presentation.lazyModuleKey, b = p.status === "ready" ? p.currentStep : void 0, w = x({
202
- moduleKey: v,
215
+ }), [p, m] = c(() => d.flowManager, { autoLoad: !1 }), g = p.presentation.lazyModuleKey, v = p.status === "ready" ? p.currentStep : void 0, x = S({
216
+ moduleKey: g,
203
217
  modules: f,
204
218
  onModuleLoading: n.onModuleLoading,
205
219
  onModuleLoaded: n.onModuleLoaded,
206
220
  onError: a
207
- }), T = _({
208
- moduleKey: p.status === "ready" && p.homeScreen.visible ? b : void 0,
221
+ }), w = _({
222
+ moduleKey: p.status === "ready" && p.homeScreen.visible ? v : void 0,
209
223
  modules: f
210
- }), E = w.status === "loaded";
211
- E === !1 && p.homeScreen.visible && (E = T);
212
- let D = n.enableHome === !0 && p.status === "ready" && p.currentStepIndex === 0 && p.homeScreen.visible === !1 && w.status === "loading";
213
- if (y(p?.status === "ready" ? p.steps : [], p?.status === "ready" ? p.currentStepIndex : -1, f, E), t(() => {
214
- p.presentation.shouldPrefetchHome && S();
224
+ }), E = x.status === "loaded";
225
+ E === !1 && p.homeScreen.visible && (E = w);
226
+ let D = n.enableHome === !0 && p.status === "ready" && p.currentStepIndex === 0 && p.homeScreen.visible === !1 && x.status === "loading";
227
+ if (b(p?.status === "ready" ? p.steps : [], p?.status === "ready" ? p.currentStepIndex : -1, f, E), t(() => {
228
+ p.presentation.shouldPrefetchHome && C();
215
229
  }, [p.presentation.shouldPrefetchHome]), t(() => {
216
230
  n.lang && l.language !== n.lang && l.changeLanguage(n.lang);
217
231
  }, [n.lang, l]), t(() => {
218
- if (p?.status === "ready") {
219
- let e = p, t = C(e.flow);
220
- t.length > 0 && (n.onWasmWarmup?.(t), m(e, n.wasmConfig));
221
- }
232
+ if (p?.status !== "ready" || p.currentStep === "REDIRECT_TO_MOBILE") return;
233
+ let e = p, t = T(e.flow);
234
+ t.length > 0 && (n.onWasmWarmup?.(t), y(e, n.wasmConfig));
222
235
  }, [p, n]), t(() => {
223
236
  p?.status === "finished" && r(p.finishStatus);
224
237
  }, [
@@ -232,8 +245,8 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
232
245
  a,
233
246
  p
234
247
  ]), t(() => {
235
- p?.status === "ready" && p.currentStep === "ID" && p.steps.includes("TUTORIAL_ID") && g.completeModule();
236
- }, [p, g]), d.status === "error") return /* @__PURE__ */ o("div", {
248
+ p?.status === "ready" && p.currentStep === "ID" && p.steps.includes("TUTORIAL_ID") && m.completeModule();
249
+ }, [p, m]), d.status === "error") return /* @__PURE__ */ o("div", {
237
250
  class: "IncodeFlow",
238
251
  children: /* @__PURE__ */ o("div", { children: ["Error: ", d.error] })
239
252
  });
@@ -241,9 +254,9 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
241
254
  class: "IncodeFlow",
242
255
  children: /* @__PURE__ */ o(i, {
243
256
  fallback: null,
244
- children: /* @__PURE__ */ o(R, {
257
+ children: /* @__PURE__ */ o(U, {
245
258
  isContinueLoading: p.homeScreen.isContinueLoading || D,
246
- onContinue: () => g.continueFromHome()
259
+ onContinue: () => m.continueFromHome()
247
260
  })
248
261
  })
249
262
  });
@@ -272,14 +285,14 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
272
285
  fullScreen: !0
273
286
  })
274
287
  });
275
- if (w.status === "unsupported") return /* @__PURE__ */ o("div", {
288
+ if (x.status === "unsupported") return /* @__PURE__ */ o("div", {
276
289
  class: "IncodeFlow",
277
290
  children: /* @__PURE__ */ o(h, {
278
291
  moduleKey: e,
279
- onNext: () => g.completeModule()
292
+ onNext: () => m.completeModule()
280
293
  })
281
294
  });
282
- if (w.status === "idle" || w.status === "loading" || w.status === "error") return /* @__PURE__ */ o("div", {
295
+ if (x.status === "idle" || x.status === "loading" || x.status === "error") return /* @__PURE__ */ o("div", {
283
296
  class: "IncodeFlow",
284
297
  children: /* @__PURE__ */ o(u, {
285
298
  title: n.spinnerConfig?.title,
@@ -288,13 +301,13 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
288
301
  fullScreen: !0
289
302
  })
290
303
  });
291
- let { Component: i } = w;
304
+ let { Component: i } = x;
292
305
  if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ o("div", {
293
306
  class: "IncodeFlow",
294
307
  children: /* @__PURE__ */ o(i, {
295
308
  config: t,
296
- onFinish: () => g.completeFlow(),
297
- onContinue: () => g.completeModule(),
309
+ onFinish: () => m.completeFlow(),
310
+ onContinue: () => m.completeModule(),
298
311
  onError: a
299
312
  }, `redirect-to-mobile-${p.currentStepIndex}`)
300
313
  });
@@ -302,7 +315,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
302
315
  class: "IncodeFlow",
303
316
  children: /* @__PURE__ */ o(i, {
304
317
  config: t,
305
- onFinish: () => g.completeModule(),
318
+ onFinish: () => m.completeModule(),
306
319
  onError: (e) => {
307
320
  a?.(e ?? "Selfie verification error");
308
321
  }
@@ -315,7 +328,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
315
328
  ...t,
316
329
  authHint: n.authHint
317
330
  },
318
- onFinish: () => g.completeModule(),
331
+ onFinish: () => m.completeModule(),
319
332
  onError: (e) => {
320
333
  a?.(e ?? "Authentication error");
321
334
  }
@@ -325,7 +338,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
325
338
  class: "IncodeFlow",
326
339
  children: /* @__PURE__ */ o(i, {
327
340
  config: t,
328
- onFinish: () => g.completeModule(),
341
+ onFinish: () => m.completeModule(),
329
342
  onError: (e) => {
330
343
  a?.(e ?? "Phone verification error");
331
344
  }
@@ -340,7 +353,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
340
353
  class: "IncodeFlow",
341
354
  children: /* @__PURE__ */ o(i, {
342
355
  config: e,
343
- onFinish: () => g.completeModule(),
356
+ onFinish: () => m.completeModule(),
344
357
  onError: (e) => {
345
358
  a?.(e ?? "Email verification error");
346
359
  }
@@ -356,7 +369,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
356
369
  ...n,
357
370
  isSecondId: !0
358
371
  } : n,
359
- onFinish: () => g.completeModule(),
372
+ onFinish: () => m.completeModule(),
360
373
  onError: (e) => {
361
374
  a?.(e ?? "ID capture error");
362
375
  }
@@ -367,7 +380,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
367
380
  class: "IncodeFlow",
368
381
  children: /* @__PURE__ */ o(i, {
369
382
  config: t,
370
- onFinish: () => g.completeModule(),
383
+ onFinish: () => m.completeModule(),
371
384
  onError: (e) => {
372
385
  a?.(e ?? "Face match error");
373
386
  }
@@ -377,7 +390,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
377
390
  class: "IncodeFlow",
378
391
  children: /* @__PURE__ */ o(i, {
379
392
  config: t,
380
- onFinish: () => g.completeModule(),
393
+ onFinish: () => m.completeModule(),
381
394
  onError: (e) => {
382
395
  a?.(e ?? "CURP validation error");
383
396
  }
@@ -387,7 +400,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
387
400
  class: "IncodeFlow",
388
401
  children: /* @__PURE__ */ o(i, {
389
402
  config: t,
390
- onFinish: () => g.completeModule(),
403
+ onFinish: () => m.completeModule(),
391
404
  onError: (e) => {
392
405
  a?.(e ?? "Government validation error");
393
406
  }
@@ -397,7 +410,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
397
410
  class: "IncodeFlow",
398
411
  children: /* @__PURE__ */ o(i, {
399
412
  config: t,
400
- onFinish: () => g.completeModule(),
413
+ onFinish: () => m.completeModule(),
401
414
  onError: (e) => {
402
415
  a?.(e ?? "Geolocation error");
403
416
  }
@@ -407,7 +420,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
407
420
  class: "IncodeFlow",
408
421
  children: /* @__PURE__ */ o(i, {
409
422
  config: { flowId: p.flow.flowId },
410
- onFinish: () => g.completeModule(),
423
+ onFinish: () => m.completeModule(),
411
424
  onError: (e) => {
412
425
  a?.(e ?? "External verification error");
413
426
  }
@@ -417,7 +430,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
417
430
  class: "IncodeFlow",
418
431
  children: /* @__PURE__ */ o(i, {
419
432
  config: t,
420
- onFinish: () => g.completeModule(),
433
+ onFinish: () => m.completeModule(),
421
434
  onError: (e) => {
422
435
  a?.(e ?? "Document capture error");
423
436
  }
@@ -430,7 +443,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
430
443
  ...t,
431
444
  processingType: "addressStatement"
432
445
  },
433
- onFinish: () => g.completeModule(),
446
+ onFinish: () => m.completeModule(),
434
447
  onError: (e) => {
435
448
  a?.(e ?? "Address capture error");
436
449
  }
@@ -440,7 +453,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
440
453
  class: "IncodeFlow",
441
454
  children: /* @__PURE__ */ o(i, {
442
455
  config: t,
443
- onFinish: () => g.completeModule(),
456
+ onFinish: () => m.completeModule(),
444
457
  onError: (e) => {
445
458
  a?.(e ?? "Signature capture error");
446
459
  }
@@ -458,7 +471,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
458
471
  checkTaxId: e.checkTaxId,
459
472
  checkUniqueBeneficialOwner: e.checkUniqueBeneficialOwner
460
473
  },
461
- onFinish: () => g.completeModule(),
474
+ onFinish: () => m.completeModule(),
462
475
  onError: (e) => {
463
476
  a?.(e ?? "eKYB verification error");
464
477
  }
@@ -469,7 +482,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
469
482
  class: "IncodeFlow",
470
483
  children: /* @__PURE__ */ o(i, {
471
484
  config: t,
472
- onFinish: () => g.completeModule(),
485
+ onFinish: () => m.completeModule(),
473
486
  onError: (e) => {
474
487
  a?.(e ?? "Combined consent error");
475
488
  }
@@ -479,7 +492,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
479
492
  class: "IncodeFlow",
480
493
  children: /* @__PURE__ */ o(i, {
481
494
  config: t,
482
- onFinish: () => g.completeModule(),
495
+ onFinish: () => m.completeModule(),
483
496
  onError: (e) => {
484
497
  a?.(e ?? "Mandatory consent error");
485
498
  }
@@ -494,7 +507,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
494
507
  uploadDocument: n.uploadDocument,
495
508
  downloadDocument: n.downloadDocument
496
509
  },
497
- onFinish: () => g.completeModule(),
510
+ onFinish: () => m.completeModule(),
498
511
  onError: (e) => {
499
512
  a?.(e ?? `${r.toUpperCase()} Signature error`);
500
513
  }
@@ -504,7 +517,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
504
517
  if (e === "ANTIFRAUD") return /* @__PURE__ */ o("div", {
505
518
  class: "IncodeFlow",
506
519
  children: /* @__PURE__ */ o(i, {
507
- onFinish: () => g.completeModule(),
520
+ onFinish: () => m.completeModule(),
508
521
  onError: (e) => {
509
522
  a?.(e ?? "Antifraud check error");
510
523
  }
@@ -513,7 +526,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
513
526
  if (e === "WATCHLIST") return /* @__PURE__ */ o("div", {
514
527
  class: "IncodeFlow",
515
528
  children: /* @__PURE__ */ o(i, {
516
- onFinish: () => g.completeModule(),
529
+ onFinish: () => m.completeModule(),
517
530
  onError: (e) => {
518
531
  a?.(e ?? "Watchlist check error");
519
532
  }
@@ -522,7 +535,7 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
522
535
  if (e === "CROSS_DOCUMENT_DATA_MATCH") return /* @__PURE__ */ o("div", {
523
536
  class: "IncodeFlow",
524
537
  children: /* @__PURE__ */ o(i, {
525
- onFinish: () => g.completeModule(),
538
+ onFinish: () => m.completeModule(),
526
539
  onError: (e) => {
527
540
  a?.(e ?? "Cross document data match error");
528
541
  }
@@ -530,11 +543,11 @@ var R = n(() => import("../homeScreen-DISgp8BK.js").then((e) => ({ default: e.Ho
530
543
  });
531
544
  }
532
545
  return null;
533
- }, B = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(z, {
546
+ }, G = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ o(l, { children: e ? /* @__PURE__ */ o(W, {
534
547
  config: e,
535
548
  onFinish: t,
536
549
  onError: n
537
550
  }) : null });
538
- d(B, "incode-flow");
551
+ d(G, "incode-flow");
539
552
  //#endregion
540
- export { B as IncodeFlow, N as preloadIncodeFlow };
553
+ export { G as IncodeFlow, L as preloadIncodeFlow };
@@ -30,6 +30,7 @@ declare type FlowUiConfig = {
30
30
  onModuleLoading?: (moduleKey: string) => void;
31
31
  onModuleLoaded?: (moduleKey: string) => void;
32
32
  onWasmWarmup?: (pipelines: string[]) => void;
33
+ onUrlUuidRefreshed?: (urlUuid: string) => void;
33
34
  spinnerConfig?: SpinnerConfig;
34
35
  };
35
36
 
@@ -73,7 +74,7 @@ declare type SelfLoadingFlowRuntimeConfig = FlowBaseConfig & SelfLoadingSessionO
73
74
  token?: never;
74
75
  };
75
76
 
76
- declare type SelfLoadingSessionOptions = Pick<CreateSessionOptions, 'configurationId' | 'externalId' | 'externalCustomerId' | 'customFields' | 'uuid' | 'interviewId'>;
77
+ declare type SelfLoadingSessionOptions = Pick<CreateSessionOptions, 'configurationId' | 'externalId' | 'externalCustomerId' | 'customFields' | 'uuid' | 'urlUuid' | 'interviewId'>;
77
78
 
78
79
  declare type SpinnerConfig = {
79
80
  title?: string;
@@ -92,6 +93,7 @@ declare type TokenFlowRuntimeConfig = FlowBaseConfig & {
92
93
  externalCustomerId?: never;
93
94
  customFields?: never;
94
95
  uuid?: never;
96
+ urlUuid?: never;
95
97
  interviewId?: never;
96
98
  };
97
99
 
@@ -185,7 +185,15 @@ function M() {
185
185
  D = void 0;
186
186
  }));
187
187
  }
188
- function N(e = {}) {
188
+ var N;
189
+ function P() {
190
+ if (N) return;
191
+ let e = A.REDIRECT_TO_MOBILE, t = O("REDIRECT_TO_MOBILE"), n = [];
192
+ e && n.push(e()), t && n.push(t()), N = Promise.all(n), N.catch(() => {
193
+ N = void 0;
194
+ });
195
+ }
196
+ function F(e = {}) {
189
197
  let t = {}, n = e.isDesktop ?? d() === "desktop", { enableHome: r, ...i } = e;
190
198
  return f({
191
199
  enableHome: r,
@@ -200,7 +208,7 @@ function N(e = {}) {
200
208
  lazyModules: t
201
209
  });
202
210
  }
203
- async function P(e) {
211
+ async function I(e) {
204
212
  await a({
205
213
  apiURL: e.apiURL,
206
214
  token: e.token,
@@ -208,15 +216,15 @@ async function P(e) {
208
216
  i18n: e.lang ? { lang: e.lang } : void 0
209
217
  });
210
218
  }
211
- async function F(e) {
219
+ async function L(e) {
212
220
  let { apiURL: t, token: n, lang: r, flowManager: i } = e;
213
- await P({
221
+ await I({
214
222
  apiURL: t,
215
223
  token: n,
216
224
  lang: r
217
225
  }), i.load();
218
226
  }
219
- async function I() {
227
+ async function R() {
220
228
  try {
221
229
  let e = await w(), t = {
222
230
  logoSrc: e.logo,
@@ -231,7 +239,8 @@ async function I() {
231
239
  return {};
232
240
  }
233
241
  }
234
- function L(e, t) {
242
+ function z(e, t) {
243
+ if (e.currentStep === "REDIRECT_TO_MOBILE") return;
235
244
  let n = m(e.flow);
236
245
  if (n.length > 0) {
237
246
  let e = c({
@@ -246,7 +255,7 @@ function L(e, t) {
246
255
  });
247
256
  }
248
257
  }
249
- function R(e) {
258
+ function B(e) {
250
259
  let t = e.currentStep;
251
260
  if (t) {
252
261
  let e = A[t];
@@ -255,7 +264,7 @@ function R(e) {
255
264
  }
256
265
  //#endregion
257
266
  //#region src/modules/flow/unsupportedModule.tsx
258
- var z = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
267
+ var V = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
259
268
  class: "IncodeUnsupportedModule",
260
269
  "aria-live": "polite",
261
270
  children: /* @__PURE__ */ r("div", {
@@ -284,10 +293,10 @@ var z = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ r("section", {
284
293
  });
285
294
  //#endregion
286
295
  //#region src/modules/flow/useModuleLoader.ts
287
- function B(e, t) {
296
+ function H(e, t) {
288
297
  return e instanceof Error ? e.message : t;
289
298
  }
290
- function V(r) {
299
+ function U(r) {
291
300
  let { loader: i, onLoading: a, onLoaded: o, onError: s } = r, [c, l] = n({ status: "idle" }), u = t(a), d = t(o), f = t(s);
292
301
  return e(() => {
293
302
  u.current = a, d.current = o, f.current = s;
@@ -309,7 +318,7 @@ function V(r) {
309
318
  }), d.current?.());
310
319
  }).catch((t) => {
311
320
  if (!e) {
312
- let e = B(t, "Failed to load component");
321
+ let e = H(t, "Failed to load component");
313
322
  l({
314
323
  status: "error",
315
324
  error: e
@@ -320,8 +329,8 @@ function V(r) {
320
329
  };
321
330
  }, [i]), c;
322
331
  }
323
- function H(t) {
324
- let { moduleKey: r, modules: i, onModuleLoading: a, onModuleLoaded: o, onError: s } = t, [c, l] = n(void 0), u = r ? i[r] : void 0, d = V({
332
+ function W(t) {
333
+ let { moduleKey: r, modules: i, onModuleLoading: a, onModuleLoaded: o, onError: s } = t, [c, l] = n(void 0), u = r ? i[r] : void 0, d = U({
325
334
  loader: u,
326
335
  onLoading: r ? () => a?.(r) : void 0,
327
336
  onLoaded: r ? () => o?.(r) : void 0,
@@ -349,16 +358,16 @@ function H(t) {
349
358
  Component: d.Component
350
359
  } : { status: "idle" };
351
360
  }
352
- function U(e) {
353
- let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = V({ loader: r });
361
+ function G(e) {
362
+ let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = U({ loader: r });
354
363
  return r != null && i.status === "loaded";
355
364
  }
356
- function W(e) {
365
+ function K(e) {
357
366
  typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
358
367
  e();
359
368
  }) : setTimeout(e, 0);
360
369
  }
361
- function G(n, r, i, a) {
370
+ function q(n, r, i, a) {
362
371
  let o = t(/* @__PURE__ */ new Set());
363
372
  e(() => {
364
373
  if (a && r < n.length - 1) {
@@ -366,7 +375,7 @@ function G(n, r, i, a) {
366
375
  if (e && !o.current.has(e)) {
367
376
  o.current.add(e);
368
377
  let t = i[e];
369
- t && W(() => {
378
+ t && K(() => {
370
379
  t().catch(() => {
371
380
  o.current.delete(e);
372
381
  });
@@ -381,4 +390,4 @@ function G(n, r, i, a) {
381
390
  ]);
382
391
  }
383
392
  //#endregion
384
- export { A as a, F as c, P as d, L as f, z as i, R as l, U as n, N as o, w as p, G as r, I as s, H as t, M as u };
393
+ export { A as a, L as c, P as d, I as f, V as i, B as l, w as m, G as n, F as o, z as p, q as r, R as s, W as t, M as u };
@@ -5,7 +5,7 @@ import { o, t as s } from "../incodeComponent-CutyB4AE.js";
5
5
  import { t as c } from "../spinner-l6dvYqCg.js";
6
6
  import "../spinner-CFvndzMU.js";
7
7
  import { t as l } from "../incodeModule-D_r2n18O.js";
8
- import { a as u, d, i as f, p, t as m } from "../useModuleLoader-D2b8kAsh.js";
8
+ import { a as u, f as d, i as f, m as p, t as m } from "../useModuleLoader-CjYPWq6s.js";
9
9
  import { resolveWasmConfig as h, warmupWasm as g } from "@incodetech/core/wasm";
10
10
  import { createWorkflowManager as _ } from "@incodetech/core/workflow";
11
11
  //#region src/modules/workflow/workflowInit.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260417-f366ac3",
3
+ "version": "0.0.0-dev-20260418-89e0d60",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -183,7 +183,7 @@
183
183
  "qrcode": "^1.5.4",
184
184
  "signature_pad": "^5.1.3",
185
185
  "tailwindcss": "^4.1.17",
186
- "@incodetech/core": "0.0.0-dev-20260417-f366ac3"
186
+ "@incodetech/core": "0.0.0-dev-20260418-89e0d60"
187
187
  },
188
188
  "devDependencies": {
189
189
  "@microsoft/api-extractor": "^7.53.3",