@tesouro/embedded-components-react 0.5.83 → 0.5.84

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 (21) hide show
  1. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index.js +6 -7
  2. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js +28 -21
  3. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index2.js +7 -23
  4. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index3.js +34 -6
  5. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index5.js +8 -8
  6. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index6.js +11 -17
  7. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index7.js +37 -16
  8. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index8.js +3 -43
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js +31 -3
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +29 -33
  11. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +31 -30
  12. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/EmbedApiContext.js +7 -5
  13. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +186 -175
  14. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/scopedClientSecret.js +8 -0
  15. package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/transportInterceptors.js +9 -6
  16. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/RootWidgetProvider.js +39 -36
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/WidgetProvider.js +86 -83
  18. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  19. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/client.js +3 -2
  20. package/package.json +1 -1
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index11.js +0 -48
@@ -1,12 +1,11 @@
1
1
  import { OnboardingSuppressionReason as e } from "../../../shared/data-access/dist/lib/onboardingSuppressionReason.js";
2
2
  import { useOrganizationOnboardingSuppression as t } from "../../../shared/data-access/dist/lib/useOrganizationOnboardingSuppression.js";
3
3
  import "../../../shared/data-access/dist/index.js";
4
- import { ApplicationClientSecretProvider as n, useApplicationClientSecret as r } from "./index2.js";
5
- import "./index3.js";
4
+ import { ApplicationClientSecretProvider as n, useApplicationClientSecret as r } from "./index3.js";
6
5
  import { useCreateApplication as i } from "./index4.js";
7
- import { useUpdateApplication as a } from "./index6.js";
8
- import { useSubmitApplication as o } from "./index7.js";
9
- import { usePollApplicationCompletion as s } from "./index8.js";
10
- import { useResumableBankAccountApplication as c } from "./index10.js";
11
- import { useStartedBankAccountApplication as l } from "./index11.js";
6
+ import { useUpdateApplication as a } from "./index5.js";
7
+ import { useSubmitApplication as o } from "./index6.js";
8
+ import { usePollApplicationCompletion as s } from "./index7.js";
9
+ import { useResumableBankAccountApplication as c } from "./index9.js";
10
+ import { useStartedBankAccountApplication as l } from "./index10.js";
12
11
  export { n as ApplicationClientSecretProvider, e as OnboardingSuppressionReason, r as useApplicationClientSecret, i as useCreateApplication, t as useOrganizationOnboardingSuppression, s as usePollApplicationCompletion, c as useResumableBankAccountApplication, l as useStartedBankAccountApplication, o as useSubmitApplication, a as useUpdateApplication };
@@ -3,32 +3,39 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { getApplicationStatusOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
6
+ import { optionalOrganizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { getBankAccountApplicationOptions as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
8
+ import { withAuthEpoch as r } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
9
  import "../../../shared/data-access/dist/index.js";
9
- import { hasFreshAnswer as r } from "./index9.js";
10
- import { useQuery as i } from "@tanstack/react-query";
10
+ import { useInstallApplicationClientSecret as i } from "./index3.js";
11
+ import { hasFreshAnswer as a } from "./index8.js";
12
+ import { useMemo as o } from "react";
13
+ import { useQuery as s } from "@tanstack/react-query";
11
14
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index10.js
12
- var a = "DRAFT", o = "BANK_ACCOUNT", s = "STARTED_BY_YOU";
13
- function c(e) {
14
- return e.find((e) => e.product === o && e.ownership === s && e.status === a && !!e.applicationId && !!e.clientSecret);
15
- }
16
- function l(e) {
17
- return e.filter((e) => e.product === o && e.ownership === s).map((e) => e.applicationId).filter((e) => !!e);
18
- }
19
- function u() {
20
- let { client: a, widgetToken: o, authEpoch: s } = e(), u = !!o, d = i({
21
- ...n(t({ client: a }), s),
22
- enabled: u,
15
+ var c = (e, t) => (n, r) => {
16
+ if (n === void 0 || r === void 0) return;
17
+ let [i] = r.queryKey;
18
+ if (i !== void 0 && i.baseUrl === e && i.path?.id === t) return n;
19
+ };
20
+ function l(l, u) {
21
+ let { client: d, organizationId: f, widgetToken: p, authEpoch: m } = e();
22
+ i(l, u);
23
+ let h = !!(p && l && u), g = d.getConfig().baseUrl, _ = o(() => c(g, l), [g, l]), v = s({
24
+ ...r(n({
25
+ client: d,
26
+ path: { id: l ?? "" },
27
+ headers: t(f)
28
+ }), m),
29
+ placeholderData: _,
30
+ enabled: h,
23
31
  retry: 2,
24
32
  retryDelay: 300
25
- }), f = u && r(d), p = f && !d.isError ? d.data?.applications ?? null : null, m = p ? c(p) : void 0;
33
+ });
26
34
  return {
27
- applicationId: m?.applicationId ?? null,
28
- clientSecret: m?.clientSecret ?? null,
29
- isResolved: f,
30
- ownApplicationIds: p ? l(p) : null
35
+ application: v.data ?? null,
36
+ isResolved: !h || a(v),
37
+ isUnavailable: h && v.isError
31
38
  };
32
39
  }
33
40
  //#endregion
34
- export { u as useResumableBankAccountApplication };
41
+ export { l as useStartedBankAccountApplication };
@@ -1,26 +1,10 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { createContext as e, useContext as t, useMemo as n, useState as r } from "react";
6
- import { jsx as i } from "react/jsx-runtime";
7
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index2.js
8
- var a = e({
9
- clientSecret: null,
10
- setClientSecret: () => void 0
11
- });
12
- function o({ children: e }) {
13
- let [t, o] = r(null), s = n(() => ({
14
- clientSecret: t,
15
- setClientSecret: o
16
- }), [t]);
17
- return /* @__PURE__ */ i(a.Provider, {
18
- value: s,
19
- children: e
20
- });
21
- }
22
- function s() {
23
- return t(a);
2
+ var e = ["/embedded-banking/v1/bank-account-applications/{id}"];
3
+ function t(t, n) {
4
+ return {
5
+ clientSecret: n,
6
+ appliesTo: ({ url: n, path: r }) => e.some((e) => n.startsWith(e)) && r?.id === t
7
+ };
24
8
  }
25
9
  //#endregion
26
- export { o as ApplicationClientSecretProvider, s as useApplicationClientSecret };
10
+ export { t as applicationClientSecret };
@@ -1,9 +1,37 @@
1
- import { optionalOrganizationHeaders as e } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
2
6
  import "../../../shared/data-access/dist/index.js";
7
+ import { applicationClientSecret as t } from "./index2.js";
8
+ import { createContext as n, useContext as r, useEffect as i, useLayoutEffect as a, useMemo as o, useRef as s } from "react";
9
+ import { jsx as c } from "react/jsx-runtime";
3
10
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index3.js
4
- var t = (t, n) => ({
5
- ...e(t),
6
- ...n ? { "X-Client-Secret": n } : {}
7
- });
11
+ var l = n({ setClientSecret: () => void 0 }), u = "document" in globalThis ? a : i;
12
+ function d({ children: n }) {
13
+ let { installClientSecret: r } = e(), i = s(null), a = s(null), d = s(!1), f = o(() => ({ setClientSecret: (e, n) => {
14
+ i.current = t(e, n), d.current && (a.current = r?.(i.current) ?? null);
15
+ } }), [r]);
16
+ return u(() => (d.current = !0, i.current && (a.current = r?.(i.current) ?? null), () => {
17
+ d.current = !1, a.current?.(), a.current = null;
18
+ }), [r]), /* @__PURE__ */ c(l.Provider, {
19
+ value: f,
20
+ children: n
21
+ });
22
+ }
23
+ function f() {
24
+ return r(l);
25
+ }
26
+ function p(e, t) {
27
+ let { setClientSecret: n } = f();
28
+ u(() => {
29
+ e && t && n(e, t);
30
+ }, [
31
+ e,
32
+ t,
33
+ n
34
+ ]);
35
+ }
8
36
  //#endregion
9
- export { t as applicationResourceHeaders };
37
+ export { d as ApplicationClientSecretProvider, f as useApplicationClientSecret, p as useInstallApplicationClientSecret };
@@ -3,17 +3,17 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { optionalOrganizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { updateApplicationMutation as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
8
  import "../../../shared/data-access/dist/index.js";
7
- import { useApplicationClientSecret as t } from "./index2.js";
8
- import { applicationResourceHeaders as n } from "./index3.js";
9
- import { useRef as r } from "react";
9
+ import { useMutation as r } from "@tanstack/react-query";
10
10
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index5.js
11
11
  function i() {
12
- let { client: i, organizationId: a } = e(), { clientSecret: o } = t(), s = r(o);
13
- return s.current = o, {
12
+ let { client: i, organizationId: a } = e();
13
+ return r(n({
14
14
  client: i,
15
- getHeaders: () => n(a, s.current)
16
- };
15
+ headers: t(a)
16
+ }));
17
17
  }
18
18
  //#endregion
19
- export { i as useApplicationResourceMutationOptions };
19
+ export { i as useUpdateApplication };
@@ -2,24 +2,18 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { updateApplicationMutation as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { optionalOrganizationHeaders as t } from "../../../shared/data-access/dist/lib/organizationHeaders.js";
7
+ import { submitApplicationMutation as n } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
6
8
  import "../../../shared/data-access/dist/index.js";
7
- import { useApplicationResourceMutationOptions as t } from "./index5.js";
8
- import { useMutation as n } from "@tanstack/react-query";
9
+ import { useMutation as r } from "@tanstack/react-query";
9
10
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index6.js
10
- function r() {
11
- let { client: r, getHeaders: i } = t();
12
- return n({
13
- ...e({
14
- client: r,
15
- headers: i()
16
- }),
17
- mutationFn: (t, n) => e({
18
- client: r,
19
- headers: i(),
20
- ...t
21
- }).mutationFn(t, n)
22
- });
11
+ function i() {
12
+ let { client: i, organizationId: a } = e();
13
+ return r(n({
14
+ client: i,
15
+ headers: t(a)
16
+ }));
23
17
  }
24
18
  //#endregion
25
- export { r as useUpdateApplication };
19
+ export { i as useSubmitApplication };
@@ -2,24 +2,45 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { submitApplicationMutation as e } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { getApplicationStatus as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
6
7
  import "../../../shared/data-access/dist/index.js";
7
- import { useApplicationResourceMutationOptions as t } from "./index5.js";
8
- import { useMutation as n } from "@tanstack/react-query";
8
+ import { useCallback as n } from "react";
9
9
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index7.js
10
- function r() {
11
- let { client: r, getHeaders: i } = t();
12
- return n({
13
- ...e({
14
- client: r,
15
- headers: i()
16
- }),
17
- mutationFn: (t, n) => e({
18
- client: r,
19
- headers: i(),
20
- ...t
21
- }).mutationFn(t, n)
10
+ var r = 2e3, i = 30, a = "COMPLETE", o = "BANK_ACCOUNT";
11
+ function s(e, t) {
12
+ return new Promise((n, r) => {
13
+ if (t?.aborted) {
14
+ r(new DOMException("Aborted", "AbortError"));
15
+ return;
16
+ }
17
+ let i = () => {
18
+ clearTimeout(a), r(new DOMException("Aborted", "AbortError"));
19
+ }, a = setTimeout(() => {
20
+ t?.removeEventListener("abort", i), n();
21
+ }, e);
22
+ t?.addEventListener("abort", i, { once: !0 });
22
23
  });
23
24
  }
25
+ function c() {
26
+ let { client: c } = e();
27
+ return n(async (e, n = {}) => {
28
+ let { signal: l } = n, u = !1;
29
+ for (let n = 0; n < i; n++) {
30
+ if (l?.aborted) throw new DOMException("Aborted", "AbortError");
31
+ try {
32
+ let n = await t({
33
+ client: c,
34
+ signal: l
35
+ });
36
+ if (u = !0, n.data?.applications.some((t) => t.product === o && t.applicationId === e && t.status === a)) return { status: "complete" };
37
+ } catch (e) {
38
+ if (e instanceof DOMException && e.name === "AbortError") throw e;
39
+ }
40
+ n < 29 && await s(r, l);
41
+ }
42
+ return u ? { status: "timeout" } : { status: "error" };
43
+ }, [c]);
44
+ }
24
45
  //#endregion
25
- export { r as useSubmitApplication };
46
+ export { c as usePollApplicationCompletion };
@@ -1,46 +1,6 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
- import { getApplicationStatus as t } from "../../../shared/data-access/dist/lib/rest/sdk.gen.js";
7
- import "../../../shared/data-access/dist/index.js";
8
- import { useCallback as n } from "react";
9
1
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index8.js
10
- var r = 2e3, i = 30, a = "COMPLETE", o = "BANK_ACCOUNT";
11
- function s(e, t) {
12
- return new Promise((n, r) => {
13
- if (t?.aborted) {
14
- r(new DOMException("Aborted", "AbortError"));
15
- return;
16
- }
17
- let i = () => {
18
- clearTimeout(a), r(new DOMException("Aborted", "AbortError"));
19
- }, a = setTimeout(() => {
20
- t?.removeEventListener("abort", i), n();
21
- }, e);
22
- t?.addEventListener("abort", i, { once: !0 });
23
- });
24
- }
25
- function c() {
26
- let { client: c } = e();
27
- return n(async (e, n = {}) => {
28
- let { signal: l } = n, u = !1;
29
- for (let n = 0; n < i; n++) {
30
- if (l?.aborted) throw new DOMException("Aborted", "AbortError");
31
- try {
32
- let n = await t({
33
- client: c,
34
- signal: l
35
- });
36
- if (u = !0, n.data?.applications.some((t) => t.product === o && t.applicationId === e && t.status === a)) return { status: "complete" };
37
- } catch (e) {
38
- if (e instanceof DOMException && e.name === "AbortError") throw e;
39
- }
40
- n < 29 && await s(r, l);
41
- }
42
- return u ? { status: "timeout" } : { status: "error" };
43
- }, [c]);
2
+ function e(e) {
3
+ return (e.isSuccess || e.isError) && !e.isFetching;
44
4
  }
45
5
  //#endregion
46
- export { c as usePollApplicationCompletion };
6
+ export { e as hasFreshAnswer };
@@ -1,6 +1,34 @@
1
+ "use client";
2
+ "use client";
3
+ "use client";
4
+ "use client";
5
+ import { useEmbedApi as e } from "../../../shared/data-access/dist/lib/EmbedApiContext.js";
6
+ import { getApplicationStatusOptions as t } from "../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
+ import { withAuthEpoch as n } from "../../../shared/data-access/dist/lib/withAuthEpoch.js";
8
+ import "../../../shared/data-access/dist/index.js";
9
+ import { hasFreshAnswer as r } from "./index8.js";
10
+ import { useQuery as i } from "@tanstack/react-query";
1
11
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/data-access/dist/index9.js
2
- function e(e) {
3
- return (e.isSuccess || e.isError) && !e.isFetching;
12
+ var a = "DRAFT", o = "BANK_ACCOUNT", s = "STARTED_BY_YOU";
13
+ function c(e) {
14
+ return e.find((e) => e.product === o && e.ownership === s && e.status === a && !!e.applicationId && !!e.clientSecret);
15
+ }
16
+ function l(e) {
17
+ return e.filter((e) => e.product === o && e.ownership === s).map((e) => e.applicationId).filter((e) => !!e);
18
+ }
19
+ function u() {
20
+ let { client: a, widgetToken: o, authEpoch: s } = e(), u = !!o, d = i({
21
+ ...n(t({ client: a }), s),
22
+ enabled: u,
23
+ retry: 2,
24
+ retryDelay: 300
25
+ }), f = u && r(d), p = f && !d.isError ? d.data?.applications ?? null : null, m = p ? c(p) : void 0;
26
+ return {
27
+ applicationId: m?.applicationId ?? null,
28
+ clientSecret: m?.clientSecret ?? null,
29
+ isResolved: f,
30
+ ownApplicationIds: p ? l(p) : null
31
+ };
4
32
  }
5
33
  //#endregion
6
- export { e as hasFreshAnswer };
34
+ export { u as useResumableBankAccountApplication };
@@ -32,13 +32,13 @@ import { buildOnboardingPrefill as y } from "./index18.js";
32
32
  import { OnboardingAnalyticsEvent as se, WIDGET_NAME as ce } from "./index19.js";
33
33
  import { DEFAULT_LABELS as b } from "./index20.js";
34
34
  import { withoutResumeOnlyOwnerFields as le, withoutStoredIdentifierMarkers as ue } from "./index21.js";
35
- import { ApplicationClientSecretProvider as de, useApplicationClientSecret as fe } from "../../data-access/dist/index2.js";
35
+ import { ApplicationClientSecretProvider as de, useApplicationClientSecret as fe } from "../../data-access/dist/index3.js";
36
36
  import { useCreateApplication as pe } from "../../data-access/dist/index4.js";
37
- import { useUpdateApplication as me } from "../../data-access/dist/index6.js";
38
- import { useSubmitApplication as he } from "../../data-access/dist/index7.js";
39
- import { usePollApplicationCompletion as ge } from "../../data-access/dist/index8.js";
40
- import { useResumableBankAccountApplication as x } from "../../data-access/dist/index10.js";
41
- import { useStartedBankAccountApplication as _e } from "../../data-access/dist/index11.js";
37
+ import { useUpdateApplication as me } from "../../data-access/dist/index5.js";
38
+ import { useSubmitApplication as he } from "../../data-access/dist/index6.js";
39
+ import { usePollApplicationCompletion as ge } from "../../data-access/dist/index7.js";
40
+ import { useResumableBankAccountApplication as x } from "../../data-access/dist/index9.js";
41
+ import { useStartedBankAccountApplication as _e } from "../../data-access/dist/index10.js";
42
42
  import "../../data-access/dist/index.js";
43
43
  import { useCallback as ve, useEffect as S, useMemo as C, useRef as ye, useState as w } from "react";
44
44
  import { Fragment as be, jsx as T, jsxs as xe } from "react/jsx-runtime";
@@ -209,7 +209,7 @@ function Ee({ onEmbeddedOnboardingCompletedSuccessfully: u, onNavigateToDashboar
209
209
  });
210
210
  else {
211
211
  let t = dt.current, n = await Xe.mutateAsync({ body: oe(H) });
212
- e = n.id, We(e), Ke(t), n.clientSecret && $e(n.clientSecret);
212
+ e = n.id, We(e), Ke(t), n.clientSecret && $e(e, n.clientSecret);
213
213
  }
214
214
  vt(), ft && xt(), z(1);
215
215
  } else if (R === 1) {
@@ -378,51 +378,47 @@ function k(e) {
378
378
  }
379
379
  var A = { canRender: !1 };
380
380
  function j(e) {
381
- let { setClientSecret: t } = fe(), { authEpoch: n } = r(), { applicationId: i, clientSecret: a, isResolved: o } = x(), { application: s, isResolved: c, isUnavailable: l } = _e(i, a);
382
- S(() => {
383
- a && t(a);
384
- }, [a, t]);
385
- let [u, d] = w(null);
381
+ let { authEpoch: t } = r(), { applicationId: n, clientSecret: i, isResolved: a } = x(), { application: o, isResolved: s, isUnavailable: c } = _e(n, i), [l, u] = w(null);
386
382
  if (S(() => {
387
- if (!(u?.canRender === !0 || !o || !c)) {
388
- if (l) {
389
- d(A);
383
+ if (!(l?.canRender === !0 || !a || !s)) {
384
+ if (c) {
385
+ u(A);
390
386
  return;
391
387
  }
392
- if (s !== null && s.status !== void 0 && s.status !== E) {
393
- d(A);
388
+ if (o !== null && o.status !== void 0 && o.status !== E) {
389
+ u(A);
394
390
  return;
395
391
  }
396
- d({
392
+ u({
397
393
  canRender: !0,
398
- applicationId: s === null ? null : i,
399
- authEpoch: n,
400
- prefill: y(s)
394
+ applicationId: o === null ? null : n,
395
+ authEpoch: t,
396
+ prefill: y(o)
401
397
  });
402
398
  }
403
399
  }, [
404
- n,
405
- u,
406
- o,
407
- c,
400
+ t,
408
401
  l,
402
+ a,
409
403
  s,
410
- i
411
- ]), u === null || !u.canRender) return null;
412
- let { applicationId: f, authEpoch: p, prefill: m } = u;
404
+ c,
405
+ o,
406
+ n
407
+ ]), l === null || !l.canRender) return null;
408
+ let { applicationId: d, authEpoch: f, prefill: p } = l;
413
409
  return /* @__PURE__ */ T(Ee, {
414
410
  ...e,
415
- initialApplicationId: f,
416
- initialBoundAuthEpoch: p,
411
+ initialApplicationId: d,
412
+ initialBoundAuthEpoch: f,
417
413
  initialBusinessDetails: {
418
414
  ...ue(e.initialBusinessDetails),
419
- ...m?.businessDetails
415
+ ...p?.businessDetails
420
416
  },
421
417
  initialPersonalDetails: {
422
418
  ...ue(e.initialPersonalDetails),
423
- ...m?.personalDetails
419
+ ...p?.personalDetails
424
420
  },
425
- initialAdditionalOwners: m?.additionalOwners ?? e.initialAdditionalOwners?.map(le)
421
+ initialAdditionalOwners: p?.additionalOwners ?? e.initialAdditionalOwners?.map(le)
426
422
  });
427
423
  }
428
424
  //#endregion