@incodetech/web 0.0.0-dev-20260513-14f81c3 → 0.0.0-dev-20260513-5fa7154

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,12 +5,12 @@ import { o as l } from "../hooks-BVnGysT7.js";
5
5
  import { t as u } from "../incodeComponent-C1o4M0ZK.js";
6
6
  import { t as d } from "../transitionSpinner-PIEPU2Vx.js";
7
7
  import { t as f } from "../incodeModule-BqCjVgEI.js";
8
- import { a as p, c as m, d as h, f as g, l as _, m as v, n as y, o as b, r as x, s as S, t as C, u as w } from "../useModuleLoader-CXOG2py6.js";
9
- import { getDeviceClass as T } from "@incodetech/core/device";
10
- import { getRequiredWasmPipelines as E } from "@incodetech/core/flow";
11
- import { QrValidationError as D, bootstrapSession as O, refreshQrUrlUuid as k } from "@incodetech/core/session";
8
+ import { a as p, c as m, d as h, f as g, h as _, l as v, n as y, o as b, p as x, r as S, s as C, t as w, u as T } from "../useModuleLoader-BTK8of8_.js";
9
+ import { getDeviceClass as E } from "@incodetech/core/device";
10
+ import { getRequiredWasmPipelines as D } from "@incodetech/core/flow";
11
+ import { QrValidationError as O, bootstrapSession as k, refreshQrUrlUuid as A } from "@incodetech/core/session";
12
12
  //#region src/shared/processing/useDelayedFlag.ts
13
- function A(e, n) {
13
+ function j(e, n) {
14
14
  let [r, i] = o(!1);
15
15
  return t(() => {
16
16
  if (e === !1) {
@@ -27,21 +27,21 @@ function A(e, n) {
27
27
  }
28
28
  //#endregion
29
29
  //#region src/modules/flow/createFlowSession.ts
30
- function j(e) {
30
+ function M(e) {
31
31
  return Array.from(new Uint8Array(e), (e) => e.toString(16).padStart(2, "0")).join("");
32
32
  }
33
- async function M(e) {
33
+ async function N(e) {
34
34
  let t = globalThis.crypto?.subtle;
35
35
  if (!t) throw Error("SHA-1 is not available in this environment");
36
- return j(await t.digest("SHA-1", new TextEncoder().encode(e)));
36
+ return M(await t.digest("SHA-1", new TextEncoder().encode(e)));
37
37
  }
38
- async function N(e) {
38
+ async function P(e) {
39
39
  if (typeof e.apiKey == "string") return e.apiKey;
40
- if (typeof e.clientId == "string") return M(e.clientId);
40
+ if (typeof e.clientId == "string") return N(e.clientId);
41
41
  throw Error("Flow self-loading mode requires apiKey or clientId");
42
42
  }
43
- async function P(e, t) {
44
- return O(await N(e), {
43
+ async function F(e, t) {
44
+ return k(await P(e), {
45
45
  configurationId: e.configurationId,
46
46
  externalId: e.externalId,
47
47
  externalCustomerId: e.externalCustomerId,
@@ -55,18 +55,18 @@ async function P(e, t) {
55
55
  }
56
56
  //#endregion
57
57
  //#region src/modules/flow/flowConfig.ts
58
- function F(e) {
58
+ function I(e) {
59
59
  return typeof e.token == "string";
60
60
  }
61
- function I(e) {
61
+ function L(e) {
62
62
  let t = e;
63
63
  return typeof t.configurationId == "string" && (typeof t.apiKey == "string" || typeof t.clientId == "string");
64
64
  }
65
65
  //#endregion
66
66
  //#region src/modules/flow/preloadFlow.ts
67
- var L = /* @__PURE__ */ new Map();
68
- function R(e) {
69
- let t = L.get(e);
67
+ var R = /* @__PURE__ */ new Map();
68
+ function z(e) {
69
+ let t = R.get(e);
70
70
  if (!t) throw Error("Preload state not found");
71
71
  return {
72
72
  get isReady() {
@@ -82,18 +82,18 @@ function R(e) {
82
82
  }
83
83
  },
84
84
  cancel() {
85
- t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), L.delete(e));
85
+ t.status === "loading" && (t.unsubscribe && t.unsubscribe(), t.flowManager.stop(), t.readyReject(/* @__PURE__ */ Error("Preload cancelled")), R.delete(e));
86
86
  }
87
87
  };
88
88
  }
89
- function z(e) {
89
+ function B(e) {
90
90
  let { token: t } = e;
91
91
  if (e.urlUuid) throw Error("preloadIncodeFlow does not support urlUuid; pass it to <IncodeFlow> directly so the SDK can rotate it on mount.");
92
- if (L.has(t)) return R(t);
92
+ if (R.has(t)) return z(t);
93
93
  let n, r, i = new Promise((e, t) => {
94
94
  n = e, r = t;
95
- }), a = S(e);
96
- a.getState().presentation.shouldPrefetchHome && h();
95
+ }), a = m(e);
96
+ a.getState().presentation.shouldPrefetchHome && g();
97
97
  let o = {
98
98
  status: "loading",
99
99
  flowManager: a,
@@ -102,59 +102,59 @@ function z(e) {
102
102
  readyResolve: n,
103
103
  readyReject: r
104
104
  };
105
- return L.set(t, o), (async () => {
105
+ return R.set(t, o), (async () => {
106
106
  try {
107
- await _({
107
+ await T({
108
108
  token: e.token,
109
109
  lang: e.lang,
110
110
  flowManager: a
111
111
  });
112
- let t = e.disableDashboardTheme ? Promise.resolve({}) : m().then((e) => {
112
+ let t = e.disableDashboardTheme ? Promise.resolve({}) : v().then((e) => {
113
113
  o.theme = e.theme, o.uiConfig = e.uiConfig;
114
114
  });
115
115
  o.unsubscribe = a.subscribe((t) => {
116
116
  if (t.status === "ready") {
117
117
  let n = t;
118
- v(n, e.wasmConfig), w(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
118
+ _(n, e.wasmConfig), h(n), o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "ready", o.readyResolve();
119
119
  } else t.status === "error" && (o.unsubscribe?.(), o.unsubscribe = void 0, o.status = "error", o.error = t.error, o.readyReject(Error(t.error)));
120
120
  }), await t;
121
121
  } catch (e) {
122
- o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), L.delete(t);
122
+ o.status = "error", o.error = e instanceof Error ? e.message : "Failed to preload", o.readyReject(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to preload")), R.delete(t);
123
123
  }
124
- })(), R(t);
125
- }
126
- function B(e) {
127
- return L.get(e) ?? null;
124
+ })(), z(t);
128
125
  }
129
126
  function V(e) {
130
- let t = B(e);
131
- return t && L.delete(e), t;
127
+ return R.get(e) ?? null;
128
+ }
129
+ function H(e) {
130
+ let t = V(e);
131
+ return t && R.delete(e), t;
132
132
  }
133
133
  //#endregion
134
134
  //#region src/modules/flow/useFlowInitialization.ts
135
- function H(e) {
136
- e.getState().presentation.shouldPrefetchHome && h();
135
+ function U(e) {
136
+ e.getState().presentation.shouldPrefetchHome && g();
137
137
  }
138
- function U() {
139
- T() === "desktop" && g();
138
+ function W() {
139
+ E() === "desktop" && x();
140
140
  }
141
- function W(e) {
142
- let { lang: n, disableDashboardTheme: r, enableHome: a, onError: s, useCPF: l } = e, u = F(e) ? e.token : void 0, d = i(null), [f, p] = o(() => {
143
- let t = u ? B(u) : null;
141
+ function G(e) {
142
+ let { lang: n, disableDashboardTheme: r, enableHome: a, onError: s, useCPF: l } = e, u = I(e) ? e.token : void 0, d = i(null), [f, p] = o(() => {
143
+ let t = u ? V(u) : null;
144
144
  if (u && t?.status === "ready") {
145
- let e = V(u);
146
- if (e) return d.current = e.flowManager, H(e.flowManager), U(), e.uiConfig && c(e.uiConfig), {
145
+ let e = H(u);
146
+ if (e) return d.current = e.flowManager, U(e.flowManager), W(), e.uiConfig && c(e.uiConfig), {
147
147
  status: "ready",
148
148
  flowManager: e.flowManager
149
149
  };
150
150
  }
151
- let n = S({
151
+ let n = m({
152
152
  authHint: e.authHint,
153
153
  lang: e.lang,
154
154
  enableHome: e.enableHome,
155
155
  useCPF: e.useCPF
156
156
  });
157
- return d.current = n, H(n), U(), t?.status === "error" ? {
157
+ return d.current = n, U(n), W(), t?.status === "error" ? {
158
158
  status: "error",
159
159
  error: t.error ?? "Preload failed",
160
160
  flowManager: n
@@ -165,16 +165,16 @@ function W(e) {
165
165
  }), h = i(!1);
166
166
  return t(() => {
167
167
  if (f.status !== "initializing") return;
168
- let t = u ? B(u) : null;
168
+ let t = u ? V(u) : null;
169
169
  if (u && t?.status === "loading") {
170
170
  t.readyPromise.then(() => {
171
- let e = V(u);
172
- e && (d.current = e.flowManager, H(e.flowManager), U(), e.uiConfig && c(e.uiConfig), p({
171
+ let e = H(u);
172
+ e && (d.current = e.flowManager, U(e.flowManager), W(), e.uiConfig && c(e.uiConfig), p({
173
173
  status: "ready",
174
174
  flowManager: e.flowManager
175
175
  }));
176
176
  }).catch((e) => {
177
- let t = e instanceof Error ? e.message : "Preload failed", n = e instanceof D ? e.status : void 0;
177
+ let t = e instanceof Error ? e.message : "Preload failed", n = e instanceof O ? e.status : void 0;
178
178
  p({
179
179
  status: "error",
180
180
  error: t,
@@ -190,19 +190,19 @@ function W(e) {
190
190
  return (async () => {
191
191
  try {
192
192
  let t;
193
- if (F(e)) t = e.token, e.urlUuid && await k({
193
+ if (I(e)) t = e.token, e.urlUuid && await A({
194
194
  urlUuid: e.urlUuid,
195
195
  onboardingId: null,
196
196
  onRefreshed: e.onUrlUuidRefreshed
197
197
  }, a);
198
- else if (I(e)) t = (await P(e, a)).token;
198
+ else if (L(e)) t = (await F(e, a)).token;
199
199
  else throw Error("Flow requires token, or configurationId with apiKey or clientId");
200
- await _({
200
+ await T({
201
201
  token: t,
202
202
  lang: n,
203
203
  flowManager: f.flowManager
204
204
  });
205
- let i = r ? Promise.resolve() : m().then((e) => {
205
+ let i = r ? Promise.resolve() : v().then((e) => {
206
206
  e.uiConfig && c(e.uiConfig);
207
207
  }), o = f.flowManager.waitForReady();
208
208
  await Promise.all([o, i]), p({
@@ -211,7 +211,7 @@ function W(e) {
211
211
  });
212
212
  } catch (e) {
213
213
  if (a.aborted) return;
214
- let t = e instanceof Error ? e.message : "Failed to initialize SDK", n = e instanceof D ? e.status : void 0;
214
+ let t = e instanceof Error ? e.message : "Failed to initialize SDK", n = e instanceof O ? e.status : void 0;
215
215
  p({
216
216
  status: "error",
217
217
  error: t,
@@ -233,32 +233,32 @@ function W(e) {
233
233
  }
234
234
  //#endregion
235
235
  //#region src/modules/flow/flow.tsx
236
- var G = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.HomeScreen }))), K = ({ config: n, onFinish: i, onError: o }) => {
237
- let { i18n: c } = e(), u = W(r(() => ({
236
+ var K = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.HomeScreen }))), q = ({ config: n, onFinish: i, onError: o }) => {
237
+ let { i18n: c } = e(), u = G(r(() => ({
238
238
  ...n,
239
239
  onError: o
240
- }), [n, o])), [f, m] = l(() => u.flowManager, { autoLoad: !1 }), g = f.presentation.lazyModuleKey, _ = f.status === "ready" ? f.currentStep : void 0, S = C({
241
- moduleKey: g,
242
- modules: b,
240
+ }), [n, o])), [f, m] = l(() => u.flowManager, { autoLoad: !1 }), h = f.presentation.lazyModuleKey, v = f.status === "ready" ? f.currentStep : void 0, x = w({
241
+ moduleKey: h,
242
+ modules: C,
243
243
  onModuleLoading: n.onModuleLoading,
244
244
  onModuleLoaded: n.onModuleLoaded,
245
245
  onError: o
246
246
  });
247
247
  y({
248
- moduleKey: f.status === "ready" && f.homeScreen.visible ? _ : void 0,
249
- modules: b
248
+ moduleKey: f.status === "ready" && f.homeScreen.visible ? v : void 0,
249
+ modules: C
250
250
  });
251
- let w = S.status === "loaded", T = n.enableHome === !0 && f.status === "ready" && f.flow.disableLaunchScreen !== !0 && f.currentStepIndex === 0 && f.homeScreen.visible === !1 && S.status === "loading", D = A(f.presentation.isAwaitingReady === !0, 150), O = A(f.status === "ready" && (S.status === "idle" || S.status === "loading" || S.status === "error"), 150);
252
- x(f?.status === "ready" ? f.steps : [], f?.status === "ready" ? f.currentStepIndex : -1, b, w), t(() => {
251
+ let T = x.status === "loaded", E = n.enableHome === !0 && f.status === "ready" && f.flow.disableLaunchScreen !== !0 && f.currentStepIndex === 0 && f.homeScreen.visible === !1 && x.status === "loading", O = j(f.presentation.isAwaitingReady === !0, 150), k = j(f.status === "ready" && (x.status === "idle" || x.status === "loading" || x.status === "error"), 150);
252
+ S(f?.status === "ready" ? f.steps : [], f?.status === "ready" ? f.currentStepIndex : -1, C, T), t(() => {
253
253
  if (n.onFlowEvent) return m.subscribeFlowEvent(n.onFlowEvent);
254
254
  }, [m, n.onFlowEvent]), t(() => {
255
- f.presentation.shouldPrefetchHome && h();
255
+ f.presentation.shouldPrefetchHome && g();
256
256
  }, [f.presentation.shouldPrefetchHome]), t(() => {
257
257
  n.lang && c.language !== n.lang && c.changeLanguage(n.lang);
258
258
  }, [n.lang, c]), t(() => {
259
259
  if (f?.status !== "ready" || f.currentStep === "REDIRECT_TO_MOBILE") return;
260
- let e = f, t = E(e.flow);
261
- t.length > 0 && (n.onWasmWarmup?.(t), v(e, n.wasmConfig));
260
+ let e = f, t = D(e.flow);
261
+ t.length > 0 && (n.onWasmWarmup?.(t), _(e, n.wasmConfig));
262
262
  }, [f, n]), t(() => {
263
263
  f?.status === "finished" && i(f.finishStatus);
264
264
  }, [
@@ -274,17 +274,17 @@ var G = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.Ho
274
274
  ]), t(() => {
275
275
  f?.status === "ready" && f.currentStep === "ID" && f.steps.includes("TUTORIAL_ID") && m.completeModule();
276
276
  }, [f, m]);
277
- let k = !(n.spinnerConfig?.title || n.spinnerConfig?.subtitle);
277
+ let A = !(n.spinnerConfig?.title || n.spinnerConfig?.subtitle);
278
278
  if (u.status === "error") return /* @__PURE__ */ s("div", {
279
279
  class: "IncodeFlow",
280
280
  children: /* @__PURE__ */ s("div", { children: ["Error: ", u.error] })
281
281
  });
282
- if (f.homeScreen.visible || T) return /* @__PURE__ */ s("div", {
282
+ if (f.homeScreen.visible || E) return /* @__PURE__ */ s("div", {
283
283
  class: "IncodeFlow",
284
284
  children: /* @__PURE__ */ s(a, {
285
285
  fallback: null,
286
- children: /* @__PURE__ */ s(G, {
287
- isContinueLoading: f.homeScreen.isContinueLoading || T,
286
+ children: /* @__PURE__ */ s(K, {
287
+ isContinueLoading: f.homeScreen.isContinueLoading || E,
288
288
  onContinue: () => m.continueFromHome()
289
289
  })
290
290
  })
@@ -293,14 +293,14 @@ var G = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.Ho
293
293
  class: "IncodeFlow",
294
294
  children: /* @__PURE__ */ s(d, {
295
295
  spinnerConfig: n.spinnerConfig,
296
- hideText: k
296
+ hideText: A
297
297
  })
298
298
  });
299
- if (f.presentation.isAwaitingReady) return D ? /* @__PURE__ */ s("div", {
299
+ if (f.presentation.isAwaitingReady) return O ? /* @__PURE__ */ s("div", {
300
300
  class: "IncodeFlow",
301
301
  children: /* @__PURE__ */ s(d, {
302
302
  spinnerConfig: n.spinnerConfig,
303
- hideText: k
303
+ hideText: A
304
304
  })
305
305
  }) : /* @__PURE__ */ s("div", { class: "IncodeFlow" });
306
306
  if (f.status === "error") return /* @__PURE__ */ s("div", {
@@ -314,25 +314,25 @@ var G = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.Ho
314
314
  class: "IncodeFlow",
315
315
  children: /* @__PURE__ */ s(d, {
316
316
  spinnerConfig: n.spinnerConfig,
317
- hideText: k
317
+ hideText: A
318
318
  })
319
319
  });
320
- if (e === "IP_ADDRESS") return /* @__PURE__ */ s("div", { class: "IncodeFlow" });
321
- if (S.status === "unsupported") return /* @__PURE__ */ s("div", {
320
+ if (b.has(e)) return /* @__PURE__ */ s("div", { class: "IncodeFlow" });
321
+ if (x.status === "unsupported") return /* @__PURE__ */ s("div", {
322
322
  class: "IncodeFlow",
323
323
  children: /* @__PURE__ */ s(p, {
324
324
  moduleKey: e,
325
325
  onNext: () => m.completeModule()
326
326
  })
327
327
  });
328
- if (S.status === "idle" || S.status === "loading" || S.status === "error") return O ? /* @__PURE__ */ s("div", {
328
+ if (x.status === "idle" || x.status === "loading" || x.status === "error") return k ? /* @__PURE__ */ s("div", {
329
329
  class: "IncodeFlow",
330
330
  children: /* @__PURE__ */ s(d, {
331
331
  spinnerConfig: n.spinnerConfig,
332
- hideText: k
332
+ hideText: A
333
333
  })
334
334
  }) : /* @__PURE__ */ s("div", { class: "IncodeFlow" });
335
- let { Component: a } = S;
335
+ let { Component: a } = x;
336
336
  if (e === "REDIRECT_TO_MOBILE") return /* @__PURE__ */ s("div", {
337
337
  class: "IncodeFlow",
338
338
  children: /* @__PURE__ */ s(a, {
@@ -651,11 +651,11 @@ var G = n(() => import("../homeScreen-3D6x-cBC.js").then((e) => ({ default: e.Ho
651
651
  });
652
652
  }
653
653
  return null;
654
- }, q = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ s(u, { children: e ? /* @__PURE__ */ s(K, {
654
+ }, J = ({ config: e, onFinish: t = () => {}, onError: n }) => /* @__PURE__ */ s(u, { children: e ? /* @__PURE__ */ s(q, {
655
655
  config: e,
656
656
  onFinish: t,
657
657
  onError: n
658
658
  }) : null });
659
- f(q, "incode-flow");
659
+ f(J, "incode-flow");
660
660
  //#endregion
661
- export { q as IncodeFlow, z as preloadIncodeFlow };
661
+ export { J as IncodeFlow, B as preloadIncodeFlow };
@@ -62,7 +62,7 @@ function ee(e) {
62
62
  }
63
63
  //#endregion
64
64
  //#region src/styles/applyTheme.ts
65
- function te(e, t) {
65
+ function x(e, t) {
66
66
  if (typeof document > "u") return;
67
67
  let n = ee(e), r = document.getElementById("incode-theme");
68
68
  r || (r = document.createElement("style"), r.id = "incode-theme", document.head.appendChild(r));
@@ -83,22 +83,22 @@ function te(e, t) {
83
83
  }
84
84
  //#endregion
85
85
  //#region src/styles/fetchTheme.ts
86
- async function x() {
86
+ async function S() {
87
87
  return (await v.get("/omni/asset/fetch-all")).data;
88
88
  }
89
- var S = /* @__PURE__ */ new Map();
90
- async function C(e) {
89
+ var C = /* @__PURE__ */ new Map();
90
+ async function w(e) {
91
91
  if (e.startsWith("data:")) return e;
92
- let t = S.get(e);
92
+ let t = C.get(e);
93
93
  if (t) return t;
94
94
  let n = await (await fetch(e)).blob(), r = await new Promise((e, t) => {
95
95
  let r = new FileReader();
96
96
  r.onloadend = () => e(r.result), r.onerror = t, r.readAsDataURL(n);
97
97
  });
98
- return S.set(e, r), r;
98
+ return C.set(e, r), r;
99
99
  }
100
- async function w() {
101
- let e = await x();
100
+ async function T() {
101
+ let e = await S();
102
102
  if (!e.theme) throw Error("Theme URL not found in assets response");
103
103
  let t = e.theme, n = t.startsWith("http://") || t.startsWith("https://"), r;
104
104
  if (n) {
@@ -107,20 +107,21 @@ async function w() {
107
107
  r = await e.json();
108
108
  } else r = (await v.get(t)).data;
109
109
  let i = e["logo.png"] || e["logo.svg"] || e["logo.jpg"] || e["logo.jpeg"] || e["logo.webp"] || r.logo, a = i;
110
- return i && (a = await C(i)), {
110
+ return i && (a = await w(i)), {
111
111
  ...r,
112
112
  logo: a
113
113
  };
114
114
  }
115
- async function T() {
116
- let e = await w();
117
- return e.main && te(e.main, e.buttonColor), e;
115
+ async function E() {
116
+ let e = await T();
117
+ return e.main && x(e.main, e.buttonColor), e;
118
118
  }
119
119
  //#endregion
120
120
  //#region src/modules/flow/flowInit.ts
121
- var E = () => import("./id/id.es.js").then((e) => e.Id), D = () => import("./homeScreen-3D6x-cBC.js").then((e) => e.HomeScreen), O;
122
- function k(e) {
121
+ var D = () => import("./id/id.es.js").then((e) => e.Id), O = () => import("./homeScreen-3D6x-cBC.js").then((e) => e.HomeScreen), k, te = new Set(["IP_ADDRESS", "TRUST_GRAPH"]);
122
+ function A(e) {
123
123
  if (e === "IP_ADDRESS") return () => import("@incodetech/core/flow").then((e) => e.noOpFlowModuleMachine);
124
+ if (e === "TRUST_GRAPH") return () => import("@incodetech/core/trust-graph").then((e) => e.trustGraphMachine);
124
125
  if (e === "REDIRECT_TO_MOBILE") return () => import("@incodetech/core/redirect-to-mobile").then((e) => e.redirectToMobileMachine);
125
126
  if (e === "PHONE") return () => import("@incodetech/core/phone").then((e) => e.phoneMachine);
126
127
  if (e === "EMAIL") return () => import("@incodetech/core/email").then((e) => e.emailMachine);
@@ -149,26 +150,26 @@ function k(e) {
149
150
  if (e === "CROSS_DOCUMENT_DATA_MATCH") return () => import("@incodetech/core/cross-document-data-match").then((e) => e.crossDocumentDataMatchMachine);
150
151
  if (e === "DYNAMIC_FORMS") return () => import("@incodetech/core/dynamic-forms").then((e) => e.dynamicFormsMachine);
151
152
  }
152
- function A(e) {
153
+ function j(e) {
153
154
  let t = {};
154
155
  for (let n of e) {
155
156
  let e = n.key;
156
157
  if (t[e]) continue;
157
- let r = k(e);
158
+ let r = A(e);
158
159
  r && (t[e] = r);
159
160
  }
160
161
  return t;
161
162
  }
162
- var j = {
163
+ var M = {
163
164
  REDIRECT_TO_MOBILE: () => import("./redirectToMobile-C3k1gloW.js").then((e) => e.RedirectToMobile),
164
165
  PHONE: () => import("./phone/phone.es.js").then((e) => e.Phone),
165
166
  EMAIL: () => import("./email/email.es.js").then((e) => e.Email),
166
167
  SELFIE: () => import("./selfie/selfie.es.js").then((e) => e.Selfie),
167
168
  AUTHENTICATION: () => import("./authentication/authentication.es.js").then((e) => e.Authentication),
168
- ID: E,
169
- ID_CAPTURE: E,
170
- TUTORIAL_ID: E,
171
- SECOND_ID: E,
169
+ ID: D,
170
+ ID_CAPTURE: D,
171
+ TUTORIAL_ID: D,
172
+ SECOND_ID: D,
172
173
  FACE_MATCH: () => import("./faceMatch-B8j0g0Yo.js").then((e) => e.FaceMatch),
173
174
  CURP_VALIDATION: () => import("./curp-validation/curp-validation.es.js").then((e) => e.CurpValidation),
174
175
  GOVT_VALIDATION_PROVISIONING: () => import("./governmentValidation/governmentValidation.es.js").then((e) => e.GovernmentValidation),
@@ -192,23 +193,23 @@ var j = {
192
193
  CROSS_DOCUMENT_DATA_MATCH: () => import("./cross-document-data-match/cross-document-data-match.es.js").then((e) => e.CrossDocumentDataMatch),
193
194
  DYNAMIC_FORMS: () => import("./dynamicForms-BeEur2CV.js").then((e) => e.DynamicForms)
194
195
  };
195
- function M() {
196
- return D();
197
- }
198
196
  function N() {
199
- O || (O = M(), O.catch(() => {
200
- O = void 0;
197
+ return O();
198
+ }
199
+ function P() {
200
+ k || (k = N(), k.catch(() => {
201
+ k = void 0;
201
202
  }));
202
203
  }
203
- var P;
204
- function F() {
205
- if (P) return;
206
- let e = j.REDIRECT_TO_MOBILE, t = k("REDIRECT_TO_MOBILE"), n = [];
207
- e && n.push(e()), t && n.push(t()), P = Promise.all(n), P.catch(() => {
208
- P = void 0;
204
+ var F;
205
+ function I() {
206
+ if (F) return;
207
+ let e = M.REDIRECT_TO_MOBILE, t = A("REDIRECT_TO_MOBILE"), n = [];
208
+ e && n.push(e()), t && n.push(t()), F = Promise.all(n), F.catch(() => {
209
+ F = void 0;
209
210
  });
210
211
  }
211
- function I(e = {}) {
212
+ function L(e = {}) {
212
213
  let t = {}, n = e.isDesktop ?? m() === "desktop", { enableHome: r, ...i } = e;
213
214
  return h({
214
215
  enableHome: r,
@@ -216,29 +217,29 @@ function I(e = {}) {
216
217
  let r = await g(e, {
217
218
  ...i,
218
219
  isDesktop: n
219
- }), a = A(r.flowModules ?? []);
220
+ }), a = j(r.flowModules ?? []);
220
221
  for (let e of Object.keys(t)) delete t[e];
221
222
  return Object.assign(t, a), r;
222
223
  },
223
224
  lazyModules: t
224
225
  });
225
226
  }
226
- async function L(n) {
227
+ async function R(n) {
227
228
  await p({
228
229
  token: n.token,
229
230
  wasm: !1
230
231
  }), t(e(n.lang ? { lang: n.lang } : void 0));
231
232
  }
232
- async function R(e) {
233
+ async function z(e) {
233
234
  let { token: t, lang: n, flowManager: r } = e;
234
- await L({
235
+ await R({
235
236
  token: t,
236
237
  lang: n
237
238
  }), r.load();
238
239
  }
239
- async function z() {
240
+ async function B() {
240
241
  try {
241
- let e = await T(), t = {
242
+ let e = await E(), t = {
242
243
  logoSrc: e.logo,
243
244
  subtitle: e.subtitle,
244
245
  hideFooterBranding: e.hideFooterBranding
@@ -251,7 +252,7 @@ async function z() {
251
252
  return {};
252
253
  }
253
254
  }
254
- function B(e, t) {
255
+ function V(e, t) {
255
256
  if (e.currentStep === "REDIRECT_TO_MOBILE") return;
256
257
  let n = _(e.flow);
257
258
  if (n.length > 0) {
@@ -267,16 +268,16 @@ function B(e, t) {
267
268
  });
268
269
  }
269
270
  }
270
- function V(e) {
271
+ function H(e) {
271
272
  let t = e.currentStep;
272
273
  if (t) {
273
- let e = j[t];
274
+ let e = M[t];
274
275
  e && e().catch(() => {});
275
276
  }
276
277
  }
277
278
  //#endregion
278
279
  //#region src/modules/flow/unsupportedModule.tsx
279
- var H = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ a("section", {
280
+ var U = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ a("section", {
280
281
  class: "IncodeUnsupportedModule",
281
282
  "aria-live": "polite",
282
283
  children: /* @__PURE__ */ a("div", {
@@ -302,39 +303,39 @@ var H = ({ moduleKey: e, onNext: t }) => /* @__PURE__ */ a("section", {
302
303
  })
303
304
  ]
304
305
  })
305
- }), U = () => null, W = () => Promise.resolve(U), G = new Set(["IDENTITY_SEARCH"]);
306
+ }), W = () => null, G = () => Promise.resolve(W), K = new Set(["IDENTITY_SEARCH"]);
306
307
  //#endregion
307
308
  //#region src/modules/flow/useModuleLoader.ts
308
- function K(e, t) {
309
+ function q(e, t) {
309
310
  return e instanceof Error ? e.message : t;
310
311
  }
311
- var q = /* @__PURE__ */ new WeakMap(), J = /* @__PURE__ */ new WeakMap();
312
- function Y(e) {
313
- return e;
314
- }
312
+ var J = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap();
315
313
  function X(e) {
316
- if (e) return q.get(Y(e));
314
+ return e;
317
315
  }
318
316
  function Z(e) {
319
- let t = Y(e), n = q.get(t);
317
+ if (e) return J.get(X(e));
318
+ }
319
+ function ne(e) {
320
+ let t = X(e), n = J.get(t);
320
321
  if (n) return Promise.resolve(n);
321
- let r = J.get(t);
322
+ let r = Y.get(t);
322
323
  if (r) return r;
323
- let i = e().then((e) => (q.set(t, e), J.delete(t), e)).catch((e) => {
324
- throw J.delete(t), e;
324
+ let i = e().then((e) => (J.set(t, e), Y.delete(t), e)).catch((e) => {
325
+ throw Y.delete(t), e;
325
326
  });
326
- return J.set(t, i), i;
327
+ return Y.set(t, i), i;
327
328
  }
328
329
  function Q(e) {
329
330
  if (!e) return { status: "idle" };
330
- let t = X(e);
331
+ let t = Z(e);
331
332
  return t ? {
332
333
  status: "loaded",
333
334
  Component: t
334
335
  } : { status: "loading" };
335
336
  }
336
- function ne(e, t, n) {
337
- if (e) return t[e] ?? (n?.has(e) ? W : void 0);
337
+ function re(e, t, n) {
338
+ if (e) return t[e] ?? (n?.has(e) ? G : void 0);
338
339
  }
339
340
  function $(e) {
340
341
  let { loader: t, onLoading: a, onLoaded: o, onError: s } = e, [c, l] = i(() => Q(t)), u = r(t), d = r(a), f = r(o), p = r(s);
@@ -346,20 +347,20 @@ function $(e) {
346
347
  s
347
348
  ]), u.current !== t && (u.current = t, l(Q(t))), n(() => {
348
349
  if (!t) return;
349
- if (X(t)) {
350
+ if (Z(t)) {
350
351
  f.current?.();
351
352
  return;
352
353
  }
353
354
  d.current?.();
354
355
  let e = !1;
355
- return Z(t).then((t) => {
356
+ return ne(t).then((t) => {
356
357
  e || (l({
357
358
  status: "loaded",
358
359
  Component: t
359
360
  }), f.current?.());
360
361
  }).catch((t) => {
361
362
  if (!e) {
362
- let e = K(t, "Failed to load component");
363
+ let e = q(t, "Failed to load component");
363
364
  l({
364
365
  status: "error",
365
366
  error: e
@@ -370,8 +371,8 @@ function $(e) {
370
371
  };
371
372
  }, [t]), c;
372
373
  }
373
- function re(e) {
374
- let { moduleKey: t, modules: r, headlessModuleKeys: a, onModuleLoading: o, onModuleLoaded: s, onError: c } = e, [l, u] = i(void 0), d = ne(t, r, a), f = $({
374
+ function ie(e) {
375
+ let { moduleKey: t, modules: r, headlessModuleKeys: a, onModuleLoading: o, onModuleLoaded: s, onError: c } = e, [l, u] = i(void 0), d = re(t, r, a), f = $({
375
376
  loader: d,
376
377
  onLoading: t ? () => o?.(t) : void 0,
377
378
  onLoaded: t ? () => s?.(t) : void 0,
@@ -399,16 +400,16 @@ function re(e) {
399
400
  Component: f.Component
400
401
  } : { status: "idle" };
401
402
  }
402
- function ie(e) {
403
+ function ae(e) {
403
404
  let { moduleKey: t, modules: n } = e, r = t ? n[t] : void 0, i = $({ loader: r });
404
405
  return r != null && i.status === "loaded";
405
406
  }
406
- function ae(e) {
407
+ function oe(e) {
407
408
  typeof requestIdleCallback < "u" ? requestIdleCallback(() => {
408
409
  e();
409
410
  }) : setTimeout(e, 0);
410
411
  }
411
- function oe(e, t, i, a) {
412
+ function se(e, t, i, a) {
412
413
  let o = r(/* @__PURE__ */ new Set());
413
414
  n(() => {
414
415
  if (a && t < e.length - 1) {
@@ -416,7 +417,7 @@ function oe(e, t, i, a) {
416
417
  if (n && !o.current.has(n)) {
417
418
  o.current.add(n);
418
419
  let e = i[n];
419
- e && ae(() => {
420
+ e && oe(() => {
420
421
  e().catch(() => {
421
422
  o.current.delete(n);
422
423
  });
@@ -431,4 +432,4 @@ function oe(e, t, i, a) {
431
432
  ]);
432
433
  }
433
434
  //#endregion
434
- export { H as a, z as c, N as d, F as f, T as h, G as i, R as l, B as m, ie as n, j as o, L as p, oe as r, I as s, re as t, V as u };
435
+ export { U as a, L as c, H as d, P as f, E as g, V as h, K as i, B as l, R as m, ae as n, te as o, I as p, se as r, M as s, ie as t, z as u };
@@ -6,14 +6,14 @@ import { t as l } from "../incodeComponent-C1o4M0ZK.js";
6
6
  import "../spinner-B4dcie2T.js";
7
7
  import { t as u } from "../transitionSpinner-PIEPU2Vx.js";
8
8
  import { t as d } from "../incodeModule-BqCjVgEI.js";
9
- import { a as f, h as p, i as m, o as h, p as g, t as _ } from "../useModuleLoader-CXOG2py6.js";
9
+ import { a as f, g as p, i as m, m as h, s as g, t as _ } from "../useModuleLoader-BTK8of8_.js";
10
10
  import { resolveWasmConfig as v, upgradeToWasmHttpClient as y, warmupWasm as b } from "@incodetech/core/wasm";
11
11
  import { getDeviceClass as x } from "@incodetech/core/device";
12
12
  import { QrValidationError as S, refreshQrUrlUuid as C } from "@incodetech/core/session";
13
13
  import { createWorkflowManager as w } from "@incodetech/core/workflow";
14
14
  //#region src/modules/workflow/workflowInit.ts
15
15
  var T = {
16
- ...h,
16
+ ...g,
17
17
  REDIRECT_TO_MOBILE: () => import("../redirectToMobile-C3k1gloW.js").then((e) => e.RedirectToMobile)
18
18
  };
19
19
  async function E() {
@@ -53,13 +53,13 @@ function O(e) {
53
53
  //#endregion
54
54
  //#region src/modules/workflow/useWorkflowInitialization.ts
55
55
  function k(e) {
56
- let { token: n, lang: i, disableDashboardTheme: o, wasmConfig: c, customModuleCallback: l, interviewId: u, isDesktop: d, urlUuid: f, onError: p, onUrlUuidRefreshed: m } = e, h = r(null), [_, v] = a(() => {
56
+ let { token: n, lang: i, disableDashboardTheme: o, wasmConfig: c, customModuleCallback: l, interviewId: u, isDesktop: d, urlUuid: f, onError: p, onUrlUuidRefreshed: m } = e, g = r(null), [_, v] = a(() => {
57
57
  let e = D({
58
58
  customModuleCallback: l,
59
59
  interviewId: u,
60
60
  isDesktop: d
61
61
  });
62
- return h.current = e, {
62
+ return g.current = e, {
63
63
  status: "initializing",
64
64
  workflowManager: e
65
65
  };
@@ -67,10 +67,10 @@ function k(e) {
67
67
  return t(() => {
68
68
  if (_.status !== "initializing" || y.current) return;
69
69
  y.current = !0;
70
- let e = h.current, t = new AbortController(), { signal: r } = t;
70
+ let e = g.current, t = new AbortController(), { signal: r } = t;
71
71
  return (async () => {
72
72
  try {
73
- await g({
73
+ await h({
74
74
  token: n,
75
75
  lang: i
76
76
  }), f && await C({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@incodetech/web",
3
- "version": "0.0.0-dev-20260513-14f81c3",
3
+ "version": "0.0.0-dev-20260513-5fa7154",
4
4
  "type": "module",
5
5
  "main": "./dist/index.es.js",
6
6
  "types": "./dist/types/index.d.ts",
@@ -239,7 +239,7 @@
239
239
  "qrcode": "^1.5.4",
240
240
  "signature_pad": "^5.1.3",
241
241
  "tailwindcss": "^4.1.17",
242
- "@incodetech/core": "0.0.0-dev-20260513-14f81c3"
242
+ "@incodetech/core": "0.0.0-dev-20260513-5fa7154"
243
243
  },
244
244
  "devDependencies": {
245
245
  "@microsoft/api-extractor": "^7.53.3",