@leatcom/portal-sessions 0.0.104 → 0.0.106
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.
|
@@ -6,7 +6,7 @@ import Se, { createContext as sa, useContext as Qo, useEffect as je, useLayoutEf
|
|
|
6
6
|
import { unstable_batchedUpdates as WE } from "react-dom";
|
|
7
7
|
try {
|
|
8
8
|
let t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {}, e = new t.Error().stack;
|
|
9
|
-
e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "
|
|
9
|
+
e && (t._sentryDebugIds = t._sentryDebugIds || {}, t._sentryDebugIds[e] = "61202dc3-ad6d-4780-91e5-e57d31cdfbfd", t._sentryDebugIdIdentifier = "sentry-dbid-61202dc3-ad6d-4780-91e5-e57d31cdfbfd");
|
|
10
10
|
} catch {
|
|
11
11
|
}
|
|
12
12
|
{
|
|
@@ -35,7 +35,7 @@ function YE(t, e) {
|
|
|
35
35
|
}
|
|
36
36
|
{
|
|
37
37
|
let t = typeof window < "u" ? window : typeof global < "u" ? global : typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : {};
|
|
38
|
-
t.SENTRY_RELEASE = { id: "
|
|
38
|
+
t.SENTRY_RELEASE = { id: "7adba88da23ede2dae4078a0b746377597b038d9" };
|
|
39
39
|
}
|
|
40
40
|
var pi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
41
41
|
function Dd(t) {
|
|
@@ -32812,7 +32812,7 @@ function yl({ redirectRoute: t }) {
|
|
|
32812
32812
|
o == null || o(E.data.data);
|
|
32813
32813
|
}), a().then(() => u(t));
|
|
32814
32814
|
}).catch((b) => {
|
|
32815
|
-
b.response.data.code === $u.CONTACT_NOT_FOUND && p(!0);
|
|
32815
|
+
b.response.data.code === $u.CONTACT_NOT_FOUND && (i.inputData.enable_registration === !1 ? r(b) : p(!0));
|
|
32816
32816
|
}).finally(() => h(!1));
|
|
32817
32817
|
}, w = () => {
|
|
32818
32818
|
h(!0), g.post(`${i.uuid}/contacts`, { email: c }).then(y).catch(r).finally(() => h(!1));
|
|
@@ -33286,27 +33286,27 @@ function Vh({ redirectRoute: t }) {
|
|
|
33286
33286
|
] }) });
|
|
33287
33287
|
}
|
|
33288
33288
|
function Uh({ redirectRoute: t }) {
|
|
33289
|
-
const { t: e } = qe(), { errorToast: n } = qt(), {
|
|
33289
|
+
const { t: e } = qe(), { errorToast: n } = qt(), { portalSession: r, uuid: o, mutate: i } = We(), { onContactLink: a } = zt(), { state: s } = Dn(), { publish: c } = Bs(), [l, d] = ve(""), [h, f] = ve(!1), [p, u] = ve(!1), g = rn(), m = Ft();
|
|
33290
33290
|
if (!s || !s.contactIdentifier)
|
|
33291
33291
|
return /* @__PURE__ */ v.jsx(Or, { to: "../" });
|
|
33292
33292
|
const y = () => {
|
|
33293
|
-
f(!0), m.post(`${
|
|
33293
|
+
f(!0), m.post(`${o}/contacts`, {
|
|
33294
33294
|
email: l
|
|
33295
33295
|
}).then(w).catch(n).finally(() => f(!1));
|
|
33296
33296
|
}, w = () => {
|
|
33297
|
-
f(!0), m.post(`${
|
|
33297
|
+
f(!0), m.post(`${o}/contacts/link-identifier`, {
|
|
33298
33298
|
contact_identifier_value: s.contactIdentifier,
|
|
33299
33299
|
email: l
|
|
33300
33300
|
}).then(b).catch((_) => {
|
|
33301
|
-
_.response.data.code === $u.CONTACT_NOT_FOUND ? u(!0) : n(_);
|
|
33301
|
+
_.response.data.code === $u.CONTACT_NOT_FOUND ? r.inputData.enable_registration === !1 ? n(_) : u(!0) : n(_);
|
|
33302
33302
|
}).finally(() => f(!1));
|
|
33303
33303
|
}, b = () => {
|
|
33304
|
-
m.put(
|
|
33304
|
+
m.put(o, { email: l }).then((_) => {
|
|
33305
33305
|
a && E(_.data.data.contact.uuid).then((S) => {
|
|
33306
33306
|
a == null || a(S.data.data);
|
|
33307
33307
|
}), i().then(() => g(t));
|
|
33308
33308
|
}).catch(n).finally(() => f(!1));
|
|
33309
|
-
}, E = (_) => m.get(`${
|
|
33309
|
+
}, E = (_) => m.get(`${o}/contacts`, { contact_uuid: _ });
|
|
33310
33310
|
return je(() => {
|
|
33311
33311
|
c("openKeyboard", {
|
|
33312
33312
|
inputId: "new-contact-identifier-input",
|
|
@@ -33345,8 +33345,8 @@ function Uh({ redirectRoute: t }) {
|
|
|
33345
33345
|
isOpen: p,
|
|
33346
33346
|
onClose: () => u(!1),
|
|
33347
33347
|
primaryAction: {
|
|
33348
|
-
label:
|
|
33349
|
-
action:
|
|
33348
|
+
label: r.inputData.enable_marketing_preferences ? e("continue") : e("confirm"),
|
|
33349
|
+
action: r.inputData.enable_marketing_preferences ? () => g("terms", { state: { ...s, email: l } }) : y,
|
|
33350
33350
|
loading: h
|
|
33351
33351
|
},
|
|
33352
33352
|
secondaryAction: {
|
|
@@ -34502,7 +34502,7 @@ function ZD() {
|
|
|
34502
34502
|
r == null || r(b.data.data);
|
|
34503
34503
|
}), i().then(() => p(`${$e.VOUCHER}/${n}/redeem`));
|
|
34504
34504
|
}).catch((w) => {
|
|
34505
|
-
w.response.data.code === $u.CONTACT_NOT_FOUND && f(!0);
|
|
34505
|
+
w.response.data.code === $u.CONTACT_NOT_FOUND && (o.inputData.enable_registration === !1 ? e(w) : f(!0));
|
|
34506
34506
|
}).finally(() => d(!1));
|
|
34507
34507
|
}, y = () => {
|
|
34508
34508
|
d(!0), u.post(`${o.uuid}/contacts`, { email: s }).then(m).catch(e).finally(() => d(!1));
|