@apolitical/component-library 3.5.22-beta.0 → 3.5.22-beta.1
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.
- package/index.js +11 -11
- package/index.mjs +497 -473
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -130,11 +130,11 @@ var ot = {};
|
|
|
130
130
|
var kr;
|
|
131
131
|
function qs() {
|
|
132
132
|
return kr || (kr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
|
-
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"),
|
|
134
|
-
function
|
|
133
|
+
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), b = Symbol.iterator, h = "@@iterator";
|
|
134
|
+
function g(v) {
|
|
135
135
|
if (v === null || typeof v != "object")
|
|
136
136
|
return null;
|
|
137
|
-
var M =
|
|
137
|
+
var M = b && v[b] || v[h];
|
|
138
138
|
return typeof M == "function" ? M : null;
|
|
139
139
|
}
|
|
140
140
|
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
@@ -630,7 +630,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
630
630
|
else if (hn(v))
|
|
631
631
|
v._store && (v._store.validated = !0);
|
|
632
632
|
else if (v) {
|
|
633
|
-
var le =
|
|
633
|
+
var le = g(v);
|
|
634
634
|
if (typeof le == "function" && le !== v.entries)
|
|
635
635
|
for (var me = le.call(v), ce; !(ce = me.next()).done; )
|
|
636
636
|
hn(ce.value) && yr(ce.value, M);
|
|
@@ -737,7 +737,7 @@ function Us(t, e, n) {
|
|
|
737
737
|
if (typeof t != "function")
|
|
738
738
|
throw new TypeError("Expected a function");
|
|
739
739
|
e = +e || 0;
|
|
740
|
-
var
|
|
740
|
+
var b = !!(n = n || {}).leading, h = !("trailing" in n) || !!n.trailing, g = "maxWait" in n, y = "debounceOnServer" in n && !!n.debounceOnServer, _ = g ? Math.max(+n.maxWait || 0, e) : null;
|
|
741
741
|
re(function() {
|
|
742
742
|
return m.current = !0, function() {
|
|
743
743
|
m.current = !1;
|
|
@@ -753,15 +753,15 @@ function Us(t, e, n) {
|
|
|
753
753
|
if (!m.current)
|
|
754
754
|
return !1;
|
|
755
755
|
var C = $ - s.current;
|
|
756
|
-
return !s.current || C >= e || C < 0 ||
|
|
756
|
+
return !s.current || C >= e || C < 0 || g && $ - i.current >= _;
|
|
757
757
|
}, R = function($) {
|
|
758
|
-
return o.current = null,
|
|
758
|
+
return o.current = null, h && c.current ? w($) : (c.current = u.current = null, l.current);
|
|
759
759
|
}, X = function $() {
|
|
760
760
|
var C = Date.now();
|
|
761
761
|
if (F(C))
|
|
762
762
|
return R(C);
|
|
763
763
|
if (m.current) {
|
|
764
|
-
var j = e - (C - s.current), k =
|
|
764
|
+
var j = e - (C - s.current), k = g ? Math.min(j, _ - (C - i.current)) : j;
|
|
765
765
|
x($, k);
|
|
766
766
|
}
|
|
767
767
|
}, B = function() {
|
|
@@ -769,8 +769,8 @@ function Us(t, e, n) {
|
|
|
769
769
|
var $ = Date.now(), C = F($);
|
|
770
770
|
if (c.current = [].slice.call(arguments), u.current = r, s.current = $, C) {
|
|
771
771
|
if (!o.current && m.current)
|
|
772
|
-
return i.current = s.current, x(X, e),
|
|
773
|
-
if (
|
|
772
|
+
return i.current = s.current, x(X, e), b ? w(s.current) : l.current;
|
|
773
|
+
if (g)
|
|
774
774
|
return x(X, e), w(s.current);
|
|
775
775
|
}
|
|
776
776
|
return o.current || x(X, e), l.current;
|
|
@@ -783,7 +783,7 @@ function Us(t, e, n) {
|
|
|
783
783
|
}, B.flush = function() {
|
|
784
784
|
return o.current ? R(Date.now()) : l.current;
|
|
785
785
|
}, B;
|
|
786
|
-
}, [
|
|
786
|
+
}, [b, g, e, _, h, p, f, y]);
|
|
787
787
|
return S;
|
|
788
788
|
}
|
|
789
789
|
function pa(t, e, n) {
|
|
@@ -1455,26 +1455,26 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1455
1455
|
}) => {
|
|
1456
1456
|
const p = kt(typeof e == "object");
|
|
1457
1457
|
if (typeof e == "object" && typeof p == "number") {
|
|
1458
|
-
const
|
|
1459
|
-
e = va(p, y,
|
|
1458
|
+
const g = Object.assign({}, e), y = ga(Object.keys(g));
|
|
1459
|
+
e = va(p, y, g);
|
|
1460
1460
|
}
|
|
1461
|
-
const
|
|
1462
|
-
typeof e == "string" &&
|
|
1463
|
-
const
|
|
1461
|
+
const b = [];
|
|
1462
|
+
typeof e == "string" && b.push(e), r && (b.push("icon"), typeof r == "object" ? (b.push(r.icon), r.position ? b.push(r.position) : b.push("left"), r.hover && b.push(`hover_${r.hover}`), r.animate && (b.push("animate"), typeof r.animate == "string" && b.push(r.animate))) : (b.push(r), !r.includes("right") && !r.includes("left") && b.push("left"))), n.muted && b.push("muted"), n.fullWidth && b.push("full-width");
|
|
1463
|
+
const h = {
|
|
1464
1464
|
...m,
|
|
1465
|
-
className: E(t, c,
|
|
1465
|
+
className: E(t, c, b, {
|
|
1466
1466
|
"no-text": !d,
|
|
1467
1467
|
disabled: u,
|
|
1468
1468
|
button: s
|
|
1469
1469
|
}),
|
|
1470
|
-
onClick: (
|
|
1471
|
-
(!s || s[0] === "#") && o && (
|
|
1470
|
+
onClick: (g) => {
|
|
1471
|
+
(!s || s[0] === "#") && o && (g.preventDefault(), g.stopPropagation()), o && o(g);
|
|
1472
1472
|
},
|
|
1473
1473
|
disabled: typeof u == "object" && "isClickable" in u ? !u.isClickable : u
|
|
1474
1474
|
};
|
|
1475
|
-
return s && (i = "a",
|
|
1475
|
+
return s && (i = "a", h.href = s), Y.createElement(
|
|
1476
1476
|
i,
|
|
1477
|
-
|
|
1477
|
+
h,
|
|
1478
1478
|
d || (l ? /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: l }) : null)
|
|
1479
1479
|
);
|
|
1480
1480
|
}, Tt = ({ buttons: t, className: e = "", ...n }) => {
|
|
@@ -1618,7 +1618,7 @@ const Et = ({ image: t, className: e, testId: n }) => {
|
|
|
1618
1618
|
loading: l,
|
|
1619
1619
|
decoding: d,
|
|
1620
1620
|
fetchPriority: m
|
|
1621
|
-
} = t, { range: f, sizes: p } = ii(t),
|
|
1621
|
+
} = t, { range: f, sizes: p } = ii(t), b = vn({ format: "avif", query: o, range: f, url: c }), h = vn({ format: "webp", query: o, range: f, url: c }), g = vn({ format: "", query: o, range: f, url: c });
|
|
1622
1622
|
return i && i.includes("svg") ? /* @__PURE__ */ a.jsx("picture", { className: e, children: /* @__PURE__ */ a.jsx(
|
|
1623
1623
|
"img",
|
|
1624
1624
|
{
|
|
@@ -1636,16 +1636,16 @@ const Et = ({ image: t, className: e, testId: n }) => {
|
|
|
1636
1636
|
"source",
|
|
1637
1637
|
{
|
|
1638
1638
|
type: "image/avif",
|
|
1639
|
-
srcSet:
|
|
1639
|
+
srcSet: b,
|
|
1640
1640
|
sizes: p,
|
|
1641
1641
|
"data-testid": "source"
|
|
1642
1642
|
}
|
|
1643
1643
|
),
|
|
1644
|
-
/* @__PURE__ */ a.jsx("source", { type: "image/webp", srcSet:
|
|
1644
|
+
/* @__PURE__ */ a.jsx("source", { type: "image/webp", srcSet: h, sizes: p, "data-testid": "source" }),
|
|
1645
1645
|
/* @__PURE__ */ a.jsx(
|
|
1646
1646
|
"img",
|
|
1647
1647
|
{
|
|
1648
|
-
srcSet:
|
|
1648
|
+
srcSet: g,
|
|
1649
1649
|
sizes: p,
|
|
1650
1650
|
src: c,
|
|
1651
1651
|
alt: r,
|
|
@@ -1945,29 +1945,29 @@ const fi = ({
|
|
|
1945
1945
|
t || (t = Date.now().toString());
|
|
1946
1946
|
const [l, d] = Q(""), [m, f] = Q("closed");
|
|
1947
1947
|
re(() => {
|
|
1948
|
-
const
|
|
1949
|
-
if (
|
|
1950
|
-
return
|
|
1951
|
-
|
|
1948
|
+
const h = u.current;
|
|
1949
|
+
if (h)
|
|
1950
|
+
return h.addEventListener("transitionend", p), () => {
|
|
1951
|
+
h.removeEventListener("transitionend", p);
|
|
1952
1952
|
};
|
|
1953
1953
|
}, []), re(() => {
|
|
1954
1954
|
if (!s || typeof s != "string")
|
|
1955
1955
|
return;
|
|
1956
|
-
const
|
|
1956
|
+
const h = s.split(`
|
|
1957
1957
|
`);
|
|
1958
1958
|
d(
|
|
1959
|
-
|
|
1959
|
+
h.length < 3 ? `${s.substring(0, 400)}...` : h.slice(0, 3).join(`
|
|
1960
1960
|
`)
|
|
1961
1961
|
);
|
|
1962
1962
|
}, [s]), re(() => {
|
|
1963
1963
|
m === "ready-to-close" && f("closing");
|
|
1964
1964
|
}, [m]);
|
|
1965
|
-
const p = ({ propertyName:
|
|
1966
|
-
|
|
1965
|
+
const p = ({ propertyName: h }) => {
|
|
1966
|
+
h === "max-height" && f((g) => g === "opening" ? "open" : g === "closing" ? "closed" : g);
|
|
1967
1967
|
};
|
|
1968
1968
|
if (!s)
|
|
1969
1969
|
return null;
|
|
1970
|
-
const
|
|
1970
|
+
const b = ["opening", "open"].includes(m);
|
|
1971
1971
|
return /* @__PURE__ */ a.jsxs(
|
|
1972
1972
|
Fe,
|
|
1973
1973
|
{
|
|
@@ -1984,13 +1984,13 @@ const fi = ({
|
|
|
1984
1984
|
variant: "tertiary",
|
|
1985
1985
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
1986
1986
|
styling: { muted: !0 },
|
|
1987
|
-
className: E({ "rotate-180":
|
|
1987
|
+
className: E({ "rotate-180": b }),
|
|
1988
1988
|
onClick: () => {
|
|
1989
|
-
f(
|
|
1989
|
+
f(b ? "ready-to-close" : "opening");
|
|
1990
1990
|
},
|
|
1991
|
-
"aria-expanded":
|
|
1991
|
+
"aria-expanded": b,
|
|
1992
1992
|
"aria-controls": t,
|
|
1993
|
-
children:
|
|
1993
|
+
children: b ? r || c.formatMessage({ id: "hideShowTextBox_hide" }) : n || c.formatMessage({ id: "hideShowTextBox_show" })
|
|
1994
1994
|
}
|
|
1995
1995
|
) })
|
|
1996
1996
|
]
|
|
@@ -2382,8 +2382,8 @@ const Rr = 256, Ve = ({
|
|
|
2382
2382
|
const f = m.getContext("2d");
|
|
2383
2383
|
if (!f)
|
|
2384
2384
|
return;
|
|
2385
|
-
const p = s,
|
|
2386
|
-
typeof window < "u" && window.devicePixelRatio && (m.width = p * window.devicePixelRatio, m.height =
|
|
2385
|
+
const p = s, b = i;
|
|
2386
|
+
typeof window < "u" && window.devicePixelRatio && (m.width = p * window.devicePixelRatio, m.height = b * window.devicePixelRatio, f.scale(window.devicePixelRatio, window.devicePixelRatio)), f.fillStyle = ki(n), f.fillRect(0, 0, p, b), f.font = `${p / 3}px Arial`, f.textAlign = "center", f.fillStyle = "white", f.fillText(ja(n), p / 2, b / 1.6);
|
|
2387
2387
|
}, [n]);
|
|
2388
2388
|
let d = !1;
|
|
2389
2389
|
return e && e !== "" && !c && (e.includes("http") || e.includes("//")) && (d = !0), /* @__PURE__ */ a.jsx(
|
|
@@ -2445,7 +2445,7 @@ const an = ({
|
|
|
2445
2445
|
const { name: d, image: m } = l;
|
|
2446
2446
|
let { url: f } = l;
|
|
2447
2447
|
e.link !== void 0 && (e.link === !1 ? f = void 0 : f = e.link);
|
|
2448
|
-
const p = Ti(l),
|
|
2448
|
+
const p = Ti(l), b = n && n.createdAt ? zn(n.createdAt) : !1, h = n && n.createdAt ? ba(n.createdAt) : "";
|
|
2449
2449
|
return Y.createElement(t, {
|
|
2450
2450
|
className: E("member text-medium", u, o),
|
|
2451
2451
|
children: /* @__PURE__ */ a.jsxs(
|
|
@@ -2454,17 +2454,17 @@ const an = ({
|
|
|
2454
2454
|
href: f,
|
|
2455
2455
|
gtmType: i,
|
|
2456
2456
|
gtmContext: s,
|
|
2457
|
-
onClick: (
|
|
2458
|
-
|
|
2457
|
+
onClick: (g) => {
|
|
2458
|
+
g == null || g.stopPropagation();
|
|
2459
2459
|
},
|
|
2460
2460
|
children: [
|
|
2461
2461
|
/* @__PURE__ */ a.jsx(Ve, { name: d, src: m }),
|
|
2462
2462
|
/* @__PURE__ */ a.jsxs("p", { className: "details", children: [
|
|
2463
2463
|
/* @__PURE__ */ a.jsx("strong", { children: d }),
|
|
2464
2464
|
n && /* @__PURE__ */ a.jsxs("span", { className: "additional-content", children: [
|
|
2465
|
-
n.createdAt &&
|
|
2466
|
-
{ id: `dates_${
|
|
2467
|
-
{ number:
|
|
2465
|
+
n.createdAt && b && /* @__PURE__ */ a.jsx("span", { className: "date", title: h, "aria-label": h, children: c.formatMessage(
|
|
2466
|
+
{ id: `dates_${b.path}` },
|
|
2467
|
+
{ number: b.number }
|
|
2468
2468
|
) }),
|
|
2469
2469
|
n.didEdit && /* @__PURE__ */ a.jsx("em", { children: c.formatMessage({ id: "discussion_edited" }) })
|
|
2470
2470
|
] }),
|
|
@@ -2498,34 +2498,34 @@ const Fr = {
|
|
|
2498
2498
|
className: E("contributors", l, s, { "has-gap": i }),
|
|
2499
2499
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2500
2500
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((f, p) => {
|
|
2501
|
-
let
|
|
2501
|
+
let b, h = "";
|
|
2502
2502
|
if (p < c) {
|
|
2503
|
-
const { name:
|
|
2503
|
+
const { name: g = "", image: y = "" } = ka(f);
|
|
2504
2504
|
if (o)
|
|
2505
2505
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "contributor" }, p);
|
|
2506
|
-
|
|
2506
|
+
b = /* @__PURE__ */ a.jsx(
|
|
2507
2507
|
Ve,
|
|
2508
2508
|
{
|
|
2509
|
-
name:
|
|
2509
|
+
name: g,
|
|
2510
2510
|
src: y,
|
|
2511
2511
|
width: Fr[s || "medium"],
|
|
2512
2512
|
height: Fr[s || "medium"]
|
|
2513
2513
|
}
|
|
2514
2514
|
);
|
|
2515
2515
|
} else if (p === c) {
|
|
2516
|
-
const
|
|
2517
|
-
|
|
2516
|
+
const g = (e || n.length) - c;
|
|
2517
|
+
b = /* @__PURE__ */ a.jsxs(
|
|
2518
2518
|
"small",
|
|
2519
2519
|
{
|
|
2520
|
-
className: E({ "large-number":
|
|
2520
|
+
className: E({ "large-number": g > 99 }),
|
|
2521
2521
|
children: [
|
|
2522
2522
|
"+",
|
|
2523
|
-
ri(
|
|
2523
|
+
ri(g, 0)
|
|
2524
2524
|
]
|
|
2525
2525
|
}
|
|
2526
|
-
),
|
|
2526
|
+
), h = "number-left";
|
|
2527
2527
|
}
|
|
2528
|
-
return
|
|
2528
|
+
return b ? /* @__PURE__ */ a.jsx("li", { className: E("contributor", h), children: b }, p) : null;
|
|
2529
2529
|
}) }),
|
|
2530
2530
|
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? m.formatMessage({ id: `member_${n[0]}` }) : et(n[0].name || "", 20) : u || null })
|
|
2531
2531
|
] })
|
|
@@ -2546,7 +2546,7 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2546
2546
|
}), [c, u] = Q(!1), l = Ut(
|
|
2547
2547
|
(p) => {
|
|
2548
2548
|
p.preventDefault(), p.stopPropagation();
|
|
2549
|
-
const
|
|
2549
|
+
const b = (h) => {
|
|
2550
2550
|
o({
|
|
2551
2551
|
path: `${$t}error_verificationFailedToSend`,
|
|
2552
2552
|
type: "error",
|
|
@@ -2554,7 +2554,7 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2554
2554
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2555
2555
|
"data-gtm-event-type": "SendEmailClick",
|
|
2556
2556
|
className: "gtm-trackable",
|
|
2557
|
-
onClick: (
|
|
2557
|
+
onClick: (g) => l(g),
|
|
2558
2558
|
href: "#",
|
|
2559
2559
|
"data-testid": "send-verify-email-click"
|
|
2560
2560
|
},
|
|
@@ -2564,17 +2564,17 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2564
2564
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2565
2565
|
"data-gtm-event-type": "email-concierge-click"
|
|
2566
2566
|
},
|
|
2567
|
-
error:
|
|
2567
|
+
error: h
|
|
2568
2568
|
});
|
|
2569
2569
|
};
|
|
2570
2570
|
if (typeof r != "function") {
|
|
2571
|
-
|
|
2571
|
+
b(s.formatMessage({ id: `${$t}error_noFunction` }));
|
|
2572
2572
|
return;
|
|
2573
2573
|
}
|
|
2574
2574
|
u(!0), r(e).then(() => {
|
|
2575
2575
|
localStorage.setItem("email", e), window.location.href = n || "/signup/verify-email";
|
|
2576
|
-
}).catch((
|
|
2577
|
-
h
|
|
2576
|
+
}).catch((h) => {
|
|
2577
|
+
b(h.message);
|
|
2578
2578
|
}).finally(() => {
|
|
2579
2579
|
u(!1);
|
|
2580
2580
|
});
|
|
@@ -2584,20 +2584,20 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2584
2584
|
);
|
|
2585
2585
|
re(
|
|
2586
2586
|
() => {
|
|
2587
|
-
let p = $t,
|
|
2587
|
+
let p = $t, b = "default", h = {}, g = {};
|
|
2588
2588
|
switch (t) {
|
|
2589
2589
|
case "gov":
|
|
2590
|
-
p += "autoApproved",
|
|
2590
|
+
p += "autoApproved", b = "success";
|
|
2591
2591
|
break;
|
|
2592
2592
|
case "nonGov":
|
|
2593
|
-
p += "unrecognisedEmail",
|
|
2593
|
+
p += "unrecognisedEmail", b = "error", h = {
|
|
2594
2594
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2595
2595
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2596
2596
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2597
2597
|
};
|
|
2598
2598
|
break;
|
|
2599
2599
|
case "pending":
|
|
2600
|
-
p += "pendingApproval",
|
|
2600
|
+
p += "pendingApproval", b = "error", g = {
|
|
2601
2601
|
href: "mailto:concierge@apolitical.co",
|
|
2602
2602
|
className: "gtm-trackable",
|
|
2603
2603
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -2605,7 +2605,7 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2605
2605
|
};
|
|
2606
2606
|
break;
|
|
2607
2607
|
case "verify":
|
|
2608
|
-
p += "emailUnverified",
|
|
2608
|
+
p += "emailUnverified", b = "error", h = {
|
|
2609
2609
|
href: "#",
|
|
2610
2610
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2611
2611
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2615,11 +2615,11 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2615
2615
|
};
|
|
2616
2616
|
break;
|
|
2617
2617
|
case "exists":
|
|
2618
|
-
p += "emailAlreadyExists",
|
|
2618
|
+
p += "emailAlreadyExists", b = "error", h = {
|
|
2619
2619
|
href: "/user-onboarding/login",
|
|
2620
2620
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2621
2621
|
"data-gtm-event-type": "login-click"
|
|
2622
|
-
},
|
|
2622
|
+
}, g = {
|
|
2623
2623
|
href: "mailto:concierge@apolitical.co",
|
|
2624
2624
|
className: "gtm-trackable",
|
|
2625
2625
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -2627,21 +2627,21 @@ const $t = "emailHelperTextBox_", Ei = ({
|
|
|
2627
2627
|
};
|
|
2628
2628
|
break;
|
|
2629
2629
|
default:
|
|
2630
|
-
p += "default",
|
|
2630
|
+
p += "default", h = {
|
|
2631
2631
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2632
2632
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2633
2633
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2634
2634
|
};
|
|
2635
2635
|
break;
|
|
2636
2636
|
}
|
|
2637
|
-
o({ ...i, path: p, type:
|
|
2637
|
+
o({ ...i, path: p, type: b, link: h, mail: g });
|
|
2638
2638
|
},
|
|
2639
2639
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2640
2640
|
[t]
|
|
2641
2641
|
);
|
|
2642
2642
|
const d = {};
|
|
2643
2643
|
return ["link", "mail"].forEach((p) => {
|
|
2644
|
-
d[p] = Object.keys(i[p]).length ? (
|
|
2644
|
+
d[p] = Object.keys(i[p]).length ? (b) => /* @__PURE__ */ a.jsx("a", { ...i[p], children: b }) : (b) => b;
|
|
2645
2645
|
}), /* @__PURE__ */ a.jsx(
|
|
2646
2646
|
di,
|
|
2647
2647
|
{
|
|
@@ -2726,49 +2726,49 @@ const Qe = {
|
|
|
2726
2726
|
displayInput: n,
|
|
2727
2727
|
debouncedInput: n
|
|
2728
2728
|
}), [
|
|
2729
|
-
{ predictions: f, activePredictionIndex: p, isPredictionSelected:
|
|
2730
|
-
|
|
2729
|
+
{ predictions: f, activePredictionIndex: p, isPredictionSelected: b },
|
|
2730
|
+
h
|
|
2731
2731
|
] = Q({
|
|
2732
2732
|
predictions: [],
|
|
2733
2733
|
activePredictionIndex: -1,
|
|
2734
2734
|
isPredictionSelected: !!n
|
|
2735
|
-
}), { formatMessage:
|
|
2736
|
-
r || (r =
|
|
2735
|
+
}), { formatMessage: g } = H();
|
|
2736
|
+
r || (r = g({ id: "inputAutocomplete_placeholder" })), re(() => {
|
|
2737
2737
|
const w = setTimeout(() => {
|
|
2738
|
-
|
|
2738
|
+
b || m((x) => ({ ...x, debouncedInput: u }));
|
|
2739
2739
|
}, Si);
|
|
2740
2740
|
return () => {
|
|
2741
2741
|
clearTimeout(w);
|
|
2742
2742
|
};
|
|
2743
|
-
}, [u,
|
|
2744
|
-
d && !
|
|
2743
|
+
}, [u, b]), re(() => {
|
|
2744
|
+
d && !b ? (async () => {
|
|
2745
2745
|
try {
|
|
2746
2746
|
const x = await c(d) || [];
|
|
2747
|
-
|
|
2747
|
+
h((F) => ({
|
|
2748
2748
|
...F,
|
|
2749
2749
|
predictions: x
|
|
2750
2750
|
}));
|
|
2751
2751
|
} catch (x) {
|
|
2752
|
-
console.error("Error fetching predictions:", x),
|
|
2752
|
+
console.error("Error fetching predictions:", x), h((F) => ({ ...F, predictions: [] }));
|
|
2753
2753
|
}
|
|
2754
|
-
})() :
|
|
2755
|
-
}, [d,
|
|
2754
|
+
})() : h((w) => ({ ...w, predictions: [] }));
|
|
2755
|
+
}, [d, b]), re(() => {
|
|
2756
2756
|
p >= 0 && f[p] && m((w) => ({
|
|
2757
2757
|
...w,
|
|
2758
2758
|
displayInput: f[p].description
|
|
2759
2759
|
}));
|
|
2760
2760
|
}, [p, f]);
|
|
2761
2761
|
const y = (w) => {
|
|
2762
|
-
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(w.key) && (w.preventDefault(), w.key === Qe.DOWN && p < f.length - 1 ?
|
|
2762
|
+
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(w.key) && (w.preventDefault(), w.key === Qe.DOWN && p < f.length - 1 ? h((x) => ({
|
|
2763
2763
|
...x,
|
|
2764
2764
|
activePredictionIndex: p + 1
|
|
2765
|
-
})) : w.key === Qe.UP && p > 0 ?
|
|
2765
|
+
})) : w.key === Qe.UP && p > 0 ? h((x) => ({
|
|
2766
2766
|
...x,
|
|
2767
2767
|
activePredictionIndex: p - 1
|
|
2768
2768
|
})) : w.key === Qe.ENTER && p > -1 && (o(f[p].description), m((x) => ({
|
|
2769
2769
|
...x,
|
|
2770
2770
|
input: f[p].description
|
|
2771
|
-
})),
|
|
2771
|
+
})), h((x) => ({
|
|
2772
2772
|
...x,
|
|
2773
2773
|
predictions: [],
|
|
2774
2774
|
isPredictionSelected: !0
|
|
@@ -2778,7 +2778,7 @@ const Qe = {
|
|
|
2778
2778
|
...x,
|
|
2779
2779
|
input: w.target.value,
|
|
2780
2780
|
displayInput: w.target.value
|
|
2781
|
-
})),
|
|
2781
|
+
})), h((x) => ({
|
|
2782
2782
|
...x,
|
|
2783
2783
|
activePredictionIndex: -1,
|
|
2784
2784
|
isPredictionSelected: !1
|
|
@@ -2788,7 +2788,7 @@ const Qe = {
|
|
|
2788
2788
|
...x,
|
|
2789
2789
|
input: w.description,
|
|
2790
2790
|
displayInput: w.description
|
|
2791
|
-
})),
|
|
2791
|
+
})), h((x) => ({
|
|
2792
2792
|
...x,
|
|
2793
2793
|
isPredictionSelected: !0,
|
|
2794
2794
|
predictions: []
|
|
@@ -2812,7 +2812,7 @@ const Qe = {
|
|
|
2812
2812
|
"li",
|
|
2813
2813
|
{
|
|
2814
2814
|
onClick: () => S(w),
|
|
2815
|
-
onMouseEnter: () =>
|
|
2815
|
+
onMouseEnter: () => h((F) => ({
|
|
2816
2816
|
...F,
|
|
2817
2817
|
activePredictionIndex: x
|
|
2818
2818
|
})),
|
|
@@ -2840,9 +2840,9 @@ const Ea = ({
|
|
|
2840
2840
|
value: d,
|
|
2841
2841
|
...m
|
|
2842
2842
|
}) => {
|
|
2843
|
-
const f = H(), { onChange: p, ...
|
|
2843
|
+
const f = H(), { onChange: p, ...b } = r, h = () => {
|
|
2844
2844
|
e || p(d ? null : u);
|
|
2845
|
-
},
|
|
2845
|
+
}, g = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2846
2846
|
/* @__PURE__ */ a.jsx(
|
|
2847
2847
|
"input",
|
|
2848
2848
|
{
|
|
@@ -2853,7 +2853,7 @@ const Ea = ({
|
|
|
2853
2853
|
value: u,
|
|
2854
2854
|
checked: d,
|
|
2855
2855
|
onKeyDown: (y) => {
|
|
2856
|
-
(y.key === "Enter" || y.code === "Space") && (y.preventDefault(), y.stopPropagation(),
|
|
2856
|
+
(y.key === "Enter" || y.code === "Space") && (y.preventDefault(), y.stopPropagation(), h());
|
|
2857
2857
|
},
|
|
2858
2858
|
readOnly: !0,
|
|
2859
2859
|
disabled: e
|
|
@@ -2869,13 +2869,13 @@ const Ea = ({
|
|
|
2869
2869
|
{
|
|
2870
2870
|
onClick: (y) => {
|
|
2871
2871
|
const _ = y.target;
|
|
2872
|
-
_.nodeName.toLowerCase() === "a" || _.parentNode && _.parentNode.nodeName.toLowerCase() === "a" || (y.preventDefault(), y.stopPropagation(),
|
|
2872
|
+
_.nodeName.toLowerCase() === "a" || _.parentNode && _.parentNode.nodeName.toLowerCase() === "a" || (y.preventDefault(), y.stopPropagation(), h());
|
|
2873
2873
|
},
|
|
2874
2874
|
className: E("checkbox-wrapper", t),
|
|
2875
2875
|
...m,
|
|
2876
|
-
...
|
|
2876
|
+
...b
|
|
2877
2877
|
},
|
|
2878
|
-
|
|
2878
|
+
g
|
|
2879
2879
|
);
|
|
2880
2880
|
};
|
|
2881
2881
|
const Ni = Oe(function({
|
|
@@ -2902,23 +2902,23 @@ const $i = ({
|
|
|
2902
2902
|
multiSelectOptions: u,
|
|
2903
2903
|
id: l
|
|
2904
2904
|
}) => {
|
|
2905
|
-
const d = H(), [m, f] = Q(!1), p = r || n,
|
|
2905
|
+
const d = H(), [m, f] = Q(!1), p = r || n, b = Array.isArray(p) ? [...p] : p ? [p] : [], [h, g] = Q(b);
|
|
2906
2906
|
let y;
|
|
2907
|
-
Array.isArray(
|
|
2908
|
-
b
|
|
2907
|
+
Array.isArray(h) && h.length === 1 && typeof h[0] == "string" ? y = e && h ? e.find((R) => R.id === h[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(h) && h.length === 1 && typeof h[0] != "string" ? y = h[0] : y = { id: "", label: "" }, re(() => {
|
|
2908
|
+
g(b);
|
|
2909
2909
|
}, [r, n]);
|
|
2910
2910
|
const { onChange: _, onMultiSelectSubmit: S, ...w } = s, x = (R) => {
|
|
2911
2911
|
if (c) {
|
|
2912
2912
|
let X = [];
|
|
2913
|
-
|
|
2913
|
+
h != null && h.includes(R.id) ? X = h.filter((B) => B !== R.id) : X = [...h, R.id], g([...X]), _ && _([...X]);
|
|
2914
2914
|
} else
|
|
2915
|
-
|
|
2915
|
+
g([R]), _ && _(R.id), f(!1);
|
|
2916
2916
|
}, F = (R) => {
|
|
2917
2917
|
if (R === "all") {
|
|
2918
2918
|
const X = (e == null ? void 0 : e.map((B) => B.id)) || [];
|
|
2919
|
-
|
|
2919
|
+
g(X), _ && _(X);
|
|
2920
2920
|
} else
|
|
2921
|
-
|
|
2921
|
+
g([]), _ && _([]);
|
|
2922
2922
|
};
|
|
2923
2923
|
return /* @__PURE__ */ a.jsxs("div", { className: E("dropdown-wrapper", t), children: [
|
|
2924
2924
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -2934,7 +2934,7 @@ const $i = ({
|
|
|
2934
2934
|
"data-testid": "dropdown-selector",
|
|
2935
2935
|
...w,
|
|
2936
2936
|
children: [
|
|
2937
|
-
c ? `${o} · ${
|
|
2937
|
+
c ? `${o} · ${h.length}` : y.label,
|
|
2938
2938
|
/* @__PURE__ */ a.jsx(Ni, { direction: m ? "up" : "down" })
|
|
2939
2939
|
]
|
|
2940
2940
|
}
|
|
@@ -2962,7 +2962,7 @@ const $i = ({
|
|
|
2962
2962
|
children: [
|
|
2963
2963
|
/* @__PURE__ */ a.jsxs("div", { className: "dropdown-menu-list", children: [
|
|
2964
2964
|
(u == null ? void 0 : u.topbar) && /* @__PURE__ */ a.jsxs("div", { className: "action-bar", children: [
|
|
2965
|
-
/* @__PURE__ */ a.jsx("p", { children: `${
|
|
2965
|
+
/* @__PURE__ */ a.jsx("p", { children: `${h == null ? void 0 : h.length} selected` }),
|
|
2966
2966
|
/* @__PURE__ */ a.jsxs("ul", { children: [
|
|
2967
2967
|
/* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2968
2968
|
ie,
|
|
@@ -2987,7 +2987,7 @@ const $i = ({
|
|
|
2987
2987
|
] })
|
|
2988
2988
|
] }),
|
|
2989
2989
|
/* @__PURE__ */ a.jsx("ul", { children: e == null ? void 0 : e.map((R) => {
|
|
2990
|
-
const X = R.id === y.id || (
|
|
2990
|
+
const X = R.id === y.id || (h == null ? void 0 : h.includes(R)) || (h == null ? void 0 : h.includes(R.id));
|
|
2991
2991
|
return /* @__PURE__ */ a.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ a.jsxs(
|
|
2992
2992
|
"button",
|
|
2993
2993
|
{
|
|
@@ -3016,11 +3016,11 @@ const $i = ({
|
|
|
3016
3016
|
{
|
|
3017
3017
|
variant: "secondary",
|
|
3018
3018
|
onClick: () => {
|
|
3019
|
-
S && S(
|
|
3019
|
+
S && S(h), document.dispatchEvent(
|
|
3020
3020
|
new CustomEvent("dropdownMultiSelectSubmit", {
|
|
3021
3021
|
detail: {
|
|
3022
3022
|
id: l || "dropdown-multi-select",
|
|
3023
|
-
value:
|
|
3023
|
+
value: h
|
|
3024
3024
|
}
|
|
3025
3025
|
})
|
|
3026
3026
|
), f(!1);
|
|
@@ -3048,7 +3048,7 @@ const Pi = ({
|
|
|
3048
3048
|
value: d,
|
|
3049
3049
|
...m
|
|
3050
3050
|
}) => {
|
|
3051
|
-
const f = H(), p = i ? d : [],
|
|
3051
|
+
const f = H(), p = i ? d : [], b = d;
|
|
3052
3052
|
return /* @__PURE__ */ a.jsx(
|
|
3053
3053
|
"ul",
|
|
3054
3054
|
{
|
|
@@ -3057,12 +3057,12 @@ const Pi = ({
|
|
|
3057
3057
|
"data-testid": `ul-${r}`,
|
|
3058
3058
|
children: c == null ? void 0 : c.map(
|
|
3059
3059
|
({
|
|
3060
|
-
id:
|
|
3061
|
-
label:
|
|
3062
|
-
value: y =
|
|
3060
|
+
id: h,
|
|
3061
|
+
label: g = !1,
|
|
3062
|
+
value: y = h,
|
|
3063
3063
|
disabled: _ = !1
|
|
3064
3064
|
}) => {
|
|
3065
|
-
const S = `${r}_${
|
|
3065
|
+
const S = `${r}_${h}`, w = () => {
|
|
3066
3066
|
if (_)
|
|
3067
3067
|
return;
|
|
3068
3068
|
let x;
|
|
@@ -3070,7 +3070,7 @@ const Pi = ({
|
|
|
3070
3070
|
const F = p == null ? void 0 : p.indexOf(y);
|
|
3071
3071
|
Array.isArray(p) && F >= 0 ? (x = p, x.splice(F, 1)) : (!p || p.length === 0 ? x = [] : x = p, x.push(y));
|
|
3072
3072
|
} else
|
|
3073
|
-
x =
|
|
3073
|
+
x = b === y ? void 0 : y;
|
|
3074
3074
|
e.onChange(x);
|
|
3075
3075
|
};
|
|
3076
3076
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -3080,14 +3080,14 @@ const Pi = ({
|
|
|
3080
3080
|
id: S,
|
|
3081
3081
|
type: l === "checkboxes" ? "checkbox" : "radio",
|
|
3082
3082
|
shownValue: y,
|
|
3083
|
-
value: i ? p == null ? void 0 : p.includes(y) :
|
|
3083
|
+
value: i ? p == null ? void 0 : p.includes(y) : b === y,
|
|
3084
3084
|
functions: {
|
|
3085
3085
|
...e,
|
|
3086
3086
|
onChange: w
|
|
3087
3087
|
},
|
|
3088
3088
|
intlPath: n,
|
|
3089
|
-
label:
|
|
3090
|
-
id: n ? `${n}_${
|
|
3089
|
+
label: g || f.formatMessage({
|
|
3090
|
+
id: n ? `${n}_${h}` : h
|
|
3091
3091
|
}),
|
|
3092
3092
|
disabled: _
|
|
3093
3093
|
},
|
|
@@ -3153,9 +3153,9 @@ const Je = {
|
|
|
3153
3153
|
value: l,
|
|
3154
3154
|
...d
|
|
3155
3155
|
}) => {
|
|
3156
|
-
const m = H(), f = u && u.some(({ condition: w }) => w === "required"), p = (l == null ? void 0 : l.toString().length) || 0,
|
|
3157
|
-
c && ["checkboxes"].includes(c) ?
|
|
3158
|
-
let
|
|
3156
|
+
const m = H(), f = u && u.some(({ condition: w }) => w === "required"), p = (l == null ? void 0 : l.toString().length) || 0, b = c && Je[c] && Je[c].component ? Je[c].component : gt, h = {};
|
|
3157
|
+
c && ["checkboxes"].includes(c) ? h.element = "span" : h.htmlFor = t;
|
|
3158
|
+
let g = {
|
|
3159
3159
|
...d,
|
|
3160
3160
|
id: t,
|
|
3161
3161
|
name: t,
|
|
@@ -3166,9 +3166,9 @@ const Je = {
|
|
|
3166
3166
|
functions: pt(s),
|
|
3167
3167
|
value: l
|
|
3168
3168
|
};
|
|
3169
|
-
i > 0 && (
|
|
3169
|
+
i > 0 && (g["data-character-limit"] = i, g.functions && (g.functions.onChange = (w) => {
|
|
3170
3170
|
((w == null ? void 0 : w.toString().length) || 0) > i && (w = w == null ? void 0 : w.toString().slice(0, i)), s.onChange(w);
|
|
3171
|
-
})), c && Je[c] && Je[c].props && (
|
|
3171
|
+
})), c && Je[c] && Je[c].props && (g = { ...g, ...Je[c].props }), c && ["checkboxes"].includes(c) && (g.intlPath = `${e}_${t}`), r && (g["aria-invalid"] = !0, g["aria-describedby"] = `error-${t}`);
|
|
3172
3172
|
const y = d.label || m.formatMessage({ id: e ? `${e}_${t}` : t }), _ = ({ ...w }) => r ? Y.createElement(
|
|
3173
3173
|
w.as || "dd",
|
|
3174
3174
|
{
|
|
@@ -3183,9 +3183,9 @@ const Je = {
|
|
|
3183
3183
|
if (c && ["checkbox"].includes(c))
|
|
3184
3184
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3185
3185
|
/* @__PURE__ */ a.jsx(
|
|
3186
|
-
|
|
3186
|
+
b,
|
|
3187
3187
|
{
|
|
3188
|
-
...
|
|
3188
|
+
...g,
|
|
3189
3189
|
label: y,
|
|
3190
3190
|
className: E("field-wrapper", n)
|
|
3191
3191
|
}
|
|
@@ -3198,7 +3198,7 @@ const Je = {
|
|
|
3198
3198
|
"data-testid": `label-${t}`
|
|
3199
3199
|
});
|
|
3200
3200
|
return /* @__PURE__ */ a.jsxs("dl", { className: E("field-wrapper text-medium", n), children: [
|
|
3201
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(S, { ...
|
|
3201
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(S, { ...h, children: [
|
|
3202
3202
|
y,
|
|
3203
3203
|
f && o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3204
3204
|
" ",
|
|
@@ -3210,7 +3210,7 @@ const Je = {
|
|
|
3210
3210
|
] })
|
|
3211
3211
|
] }) }),
|
|
3212
3212
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3213
|
-
/* @__PURE__ */ a.jsx(
|
|
3213
|
+
/* @__PURE__ */ a.jsx(b, { ...g }),
|
|
3214
3214
|
i > 0 ? /* @__PURE__ */ a.jsxs(
|
|
3215
3215
|
"small",
|
|
3216
3216
|
{
|
|
@@ -3270,37 +3270,37 @@ const Je = {
|
|
|
3270
3270
|
for (const f of o)
|
|
3271
3271
|
if (f.validation)
|
|
3272
3272
|
for (let p = 0; p < f.validation.length; p++) {
|
|
3273
|
-
const { condition:
|
|
3274
|
-
let
|
|
3275
|
-
if (typeof
|
|
3276
|
-
const y =
|
|
3277
|
-
y && (
|
|
3273
|
+
const { condition: b = "required", error: h = !1 } = f.validation[p];
|
|
3274
|
+
let g = !1;
|
|
3275
|
+
if (typeof b == "function") {
|
|
3276
|
+
const y = b(i);
|
|
3277
|
+
y && (g = h || y);
|
|
3278
3278
|
} else {
|
|
3279
3279
|
const y = i[f.id];
|
|
3280
|
-
switch (
|
|
3280
|
+
switch (b) {
|
|
3281
3281
|
case "required":
|
|
3282
|
-
(!y || typeof y == "string" && y.trim().length === 0) && (
|
|
3282
|
+
(!y || typeof y == "string" && y.trim().length === 0) && (g = h || (d == null ? void 0 : d.formatMessage({ id: "form_error_required" })));
|
|
3283
3283
|
break;
|
|
3284
3284
|
case "no-numbers": {
|
|
3285
|
-
y && !/^([^0-9]*)$/.test(y) && (
|
|
3285
|
+
y && !/^([^0-9]*)$/.test(y) && (g = h || (d == null ? void 0 : d.formatMessage({ id: "form_error_numbers" })));
|
|
3286
3286
|
break;
|
|
3287
3287
|
}
|
|
3288
3288
|
case "valid-email": {
|
|
3289
|
-
y && !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(y) && (
|
|
3289
|
+
y && !/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(y) && (g = h || (d == null ? void 0 : d.formatMessage({ id: "form_error_email" })));
|
|
3290
3290
|
break;
|
|
3291
3291
|
}
|
|
3292
3292
|
case "valid-url": {
|
|
3293
|
-
y && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(y) && (
|
|
3293
|
+
y && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(y) && (g = h || (d == null ? void 0 : d.formatMessage({ id: "form_error_url" })));
|
|
3294
3294
|
break;
|
|
3295
3295
|
}
|
|
3296
3296
|
default:
|
|
3297
3297
|
console.warn("WARNING! No field validation condition has been set");
|
|
3298
3298
|
}
|
|
3299
3299
|
}
|
|
3300
|
-
if (
|
|
3300
|
+
if (g) {
|
|
3301
3301
|
c({
|
|
3302
3302
|
type: "addError",
|
|
3303
|
-
payload: { key: f.id, value:
|
|
3303
|
+
payload: { key: f.id, value: g }
|
|
3304
3304
|
}), m.push(f.id);
|
|
3305
3305
|
break;
|
|
3306
3306
|
}
|
|
@@ -3366,7 +3366,7 @@ const sn = ({
|
|
|
3366
3366
|
},
|
|
3367
3367
|
...p
|
|
3368
3368
|
}) => {
|
|
3369
|
-
const { customOnSubmit:
|
|
3369
|
+
const { customOnSubmit: b, hideButton: h, ...g } = i, y = 40, {
|
|
3370
3370
|
shouldShowCancelButton: _ = !1,
|
|
3371
3371
|
shouldReset: S = !0,
|
|
3372
3372
|
showRequiredLabels: w = !0,
|
|
@@ -3414,7 +3414,7 @@ const sn = ({
|
|
|
3414
3414
|
i.text || (i.text = F.formatMessage({ id: "form_submit" }));
|
|
3415
3415
|
const Z = [
|
|
3416
3416
|
{
|
|
3417
|
-
...
|
|
3417
|
+
...g,
|
|
3418
3418
|
icon: j ? { icon: "tick", position: "left" } : !1,
|
|
3419
3419
|
className: "gtm-trackable",
|
|
3420
3420
|
onClick: (z) => {
|
|
@@ -3495,7 +3495,7 @@ const sn = ({
|
|
|
3495
3495
|
text: F.formatMessage({ id: "form_error_generalError" })
|
|
3496
3496
|
}
|
|
3497
3497
|
) : null,
|
|
3498
|
-
(!S || !C && !j ||
|
|
3498
|
+
(!S || !C && !j || b) && t.map((z, K) => {
|
|
3499
3499
|
const {
|
|
3500
3500
|
id: T = z.name || K,
|
|
3501
3501
|
component: P,
|
|
@@ -3523,7 +3523,7 @@ const sn = ({
|
|
|
3523
3523
|
T
|
|
3524
3524
|
);
|
|
3525
3525
|
}),
|
|
3526
|
-
|
|
3526
|
+
h ? null : (C || j) && b ? b : /* @__PURE__ */ a.jsx(
|
|
3527
3527
|
Tt,
|
|
3528
3528
|
{
|
|
3529
3529
|
className: E("cta", {
|
|
@@ -3611,13 +3611,13 @@ const Wl = ({
|
|
|
3611
3611
|
o && !u.setUp && d();
|
|
3612
3612
|
}, [o]), !o)
|
|
3613
3613
|
return /* @__PURE__ */ a.jsx(Se, { className: "rating-placeholder" });
|
|
3614
|
-
const { id: m, rating: f, disabled: p } = u,
|
|
3615
|
-
text: c.formatMessage({ id: `${
|
|
3616
|
-
low: c.formatMessage({ id: `${
|
|
3617
|
-
high: c.formatMessage({ id: `${
|
|
3618
|
-
success: c.formatMessage({ id: `${
|
|
3614
|
+
const { id: m, rating: f, disabled: p } = u, b = "ratings_", h = {
|
|
3615
|
+
text: c.formatMessage({ id: `${b}text` }),
|
|
3616
|
+
low: c.formatMessage({ id: `${b}low` }),
|
|
3617
|
+
high: c.formatMessage({ id: `${b}high` }),
|
|
3618
|
+
success: c.formatMessage({ id: `${b}success` }),
|
|
3619
3619
|
...t
|
|
3620
|
-
},
|
|
3620
|
+
}, g = async (y) => {
|
|
3621
3621
|
if (!(!m || p))
|
|
3622
3622
|
try {
|
|
3623
3623
|
l((_) => ({ ..._, rating: y, disabled: !0 })), await r({ id: m, value: y });
|
|
@@ -3628,7 +3628,7 @@ const Wl = ({
|
|
|
3628
3628
|
}
|
|
3629
3629
|
};
|
|
3630
3630
|
return /* @__PURE__ */ a.jsxs("div", { className: E("rating", i), children: [
|
|
3631
|
-
/* @__PURE__ */ a.jsx("span", { className: "label", children:
|
|
3631
|
+
/* @__PURE__ */ a.jsx("span", { className: "label", children: h[f ? "success" : "text"] }),
|
|
3632
3632
|
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(e).keys()).map((y) => {
|
|
3633
3633
|
const _ = y + 1;
|
|
3634
3634
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -3646,11 +3646,11 @@ const Wl = ({
|
|
|
3646
3646
|
hover: "star"
|
|
3647
3647
|
},
|
|
3648
3648
|
screenreaderText: `${c.formatMessage(
|
|
3649
|
-
{ id: `${
|
|
3649
|
+
{ id: `${b}stars` },
|
|
3650
3650
|
{ number: _, total: e }
|
|
3651
|
-
)}${_ === 1 || _ === e ? ` - ${
|
|
3651
|
+
)}${_ === 1 || _ === e ? ` - ${h[_ === 1 ? "low" : "high"]}` : ""}`,
|
|
3652
3652
|
onClick: (S) => {
|
|
3653
|
-
S.preventDefault(), S.stopPropagation(),
|
|
3653
|
+
S.preventDefault(), S.stopPropagation(), g(_);
|
|
3654
3654
|
},
|
|
3655
3655
|
disabled: p
|
|
3656
3656
|
}
|
|
@@ -3727,12 +3727,12 @@ function zl({ className: t = "", userId: e, userName: n, src: r, setUserImage: s
|
|
|
3727
3727
|
const p = f.target.files && f.target.files[0];
|
|
3728
3728
|
if (!p || !e)
|
|
3729
3729
|
throw c(!1), new Error("Image file or userID is missing");
|
|
3730
|
-
const
|
|
3731
|
-
s((
|
|
3732
|
-
...
|
|
3730
|
+
const b = await i({ fileObject: p, userId: e });
|
|
3731
|
+
s((h) => ({
|
|
3732
|
+
...h,
|
|
3733
3733
|
image: {
|
|
3734
|
-
thumbnail:
|
|
3735
|
-
full:
|
|
3734
|
+
thumbnail: b.thumbnailURL,
|
|
3735
|
+
full: b.originalURL
|
|
3736
3736
|
}
|
|
3737
3737
|
}));
|
|
3738
3738
|
} catch {
|
|
@@ -3832,40 +3832,40 @@ const Li = ({
|
|
|
3832
3832
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
3833
3833
|
/* NOT_SUBMITTED */
|
|
3834
3834
|
}) => {
|
|
3835
|
-
const [d, m] = Q([]), [f, p] = Q(!0), [
|
|
3835
|
+
const [d, m] = Q([]), [f, p] = Q(!0), [b, h] = Q(l), { formatMessage: g } = H(), y = async (w) => {
|
|
3836
3836
|
w.preventDefault();
|
|
3837
3837
|
try {
|
|
3838
|
-
await u(d), m([]),
|
|
3838
|
+
await u(d), m([]), h(
|
|
3839
3839
|
"SUCCESS"
|
|
3840
3840
|
/* SUCCESS */
|
|
3841
3841
|
);
|
|
3842
3842
|
} catch (x) {
|
|
3843
|
-
|
|
3843
|
+
h(
|
|
3844
3844
|
"ERROR"
|
|
3845
3845
|
/* ERROR */
|
|
3846
3846
|
), c(x);
|
|
3847
3847
|
}
|
|
3848
3848
|
}, _ = (w) => {
|
|
3849
|
-
w.preventDefault(),
|
|
3849
|
+
w.preventDefault(), h(
|
|
3850
3850
|
"NOT_SUBMITTED"
|
|
3851
3851
|
/* NOT_SUBMITTED */
|
|
3852
3852
|
), p(!0), m([]);
|
|
3853
3853
|
}, S = (w) => {
|
|
3854
|
-
w.preventDefault(), o(),
|
|
3854
|
+
w.preventDefault(), o(), h(
|
|
3855
3855
|
"CLOSED"
|
|
3856
3856
|
/* CLOSED */
|
|
3857
3857
|
);
|
|
3858
3858
|
};
|
|
3859
|
-
return
|
|
3860
|
-
/* @__PURE__ */ a.jsx("div", { className: "content centred", children:
|
|
3859
|
+
return b === "CLOSED" ? null : b === "ERROR" || b === "SUCCESS" ? /* @__PURE__ */ a.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
3860
|
+
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: b === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children: g({ id: "inviteForm_success" }) }) : /* @__PURE__ */ a.jsxs("h2", { className: "error-title", children: [
|
|
3861
3861
|
" ",
|
|
3862
|
-
|
|
3862
|
+
g({ id: "inviteForm_error" })
|
|
3863
3863
|
] }) }),
|
|
3864
3864
|
/* @__PURE__ */ a.jsx(ze, {}),
|
|
3865
|
-
/* @__PURE__ */ a.jsx("div", { className: "footer", children:
|
|
3866
|
-
/* @__PURE__ */ a.jsx(ie, { variant: "secondary", onClick: _, children:
|
|
3867
|
-
/* @__PURE__ */ a.jsx(ie, { onClick: S, children:
|
|
3868
|
-
] }) : /* @__PURE__ */ a.jsx(ie, { onClick: _, children:
|
|
3865
|
+
/* @__PURE__ */ a.jsx("div", { className: "footer", children: b === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3866
|
+
/* @__PURE__ */ a.jsx(ie, { variant: "secondary", onClick: _, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3867
|
+
/* @__PURE__ */ a.jsx(ie, { onClick: S, children: g({ id: "inviteForm_ctaDone" }) })
|
|
3868
|
+
] }) : /* @__PURE__ */ a.jsx(ie, { onClick: _, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3869
3869
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
3870
3870
|
"form",
|
|
3871
3871
|
{
|
|
@@ -3881,7 +3881,7 @@ const Li = ({
|
|
|
3881
3881
|
{
|
|
3882
3882
|
id: "email-input",
|
|
3883
3883
|
inputClassName: "email-input input",
|
|
3884
|
-
placeholder:
|
|
3884
|
+
placeholder: g({ id: "inviteForm_email_placeholder" }),
|
|
3885
3885
|
emails: d,
|
|
3886
3886
|
onChange: (w) => {
|
|
3887
3887
|
m(w), p(!w.length);
|
|
@@ -3899,7 +3899,7 @@ const Li = ({
|
|
|
3899
3899
|
F(x), p(!d.length);
|
|
3900
3900
|
},
|
|
3901
3901
|
className: "remove-email-button",
|
|
3902
|
-
screenreaderText:
|
|
3902
|
+
screenreaderText: g({ id: "overlay_close" })
|
|
3903
3903
|
}
|
|
3904
3904
|
)
|
|
3905
3905
|
] }, x)
|
|
@@ -3966,8 +3966,8 @@ const Li = ({
|
|
|
3966
3966
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3967
3967
|
onCatch: (p) => s(p == null ? void 0 : p.statusCode),
|
|
3968
3968
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3969
|
-
onFailure: (p,
|
|
3970
|
-
(
|
|
3969
|
+
onFailure: (p, b) => {
|
|
3970
|
+
(b.includes(Te.NEW_PASSWORD) || b.includes(Te.CONFIRMED_PASSWORD)) && o(!0);
|
|
3971
3971
|
}
|
|
3972
3972
|
},
|
|
3973
3973
|
meta: {
|
|
@@ -4130,8 +4130,8 @@ const Bi = ({
|
|
|
4130
4130
|
intl: l
|
|
4131
4131
|
// We need to pass `intl` in as it's being used in a hook
|
|
4132
4132
|
}) => {
|
|
4133
|
-
const { emailDetails: d } = o, m = (p,
|
|
4134
|
-
p.current && o.validFields[
|
|
4133
|
+
const { emailDetails: d } = o, m = (p, b) => {
|
|
4134
|
+
p.current && o.validFields[b] !== p.current.validity.valid && c([{ type: `validFields.${b}`, value: p.current.validity.valid }]);
|
|
4135
4135
|
}, f = [
|
|
4136
4136
|
{
|
|
4137
4137
|
id: "full_name",
|
|
@@ -4157,8 +4157,8 @@ const Bi = ({
|
|
|
4157
4157
|
onBlur: () => {
|
|
4158
4158
|
Or({ ref: i.email, validateEmail: r, dispatch: c });
|
|
4159
4159
|
},
|
|
4160
|
-
onChange: (p,
|
|
4161
|
-
c([{ type: "shouldDisableButton", value: !0 }]),
|
|
4160
|
+
onChange: (p, b) => {
|
|
4161
|
+
c([{ type: "shouldDisableButton", value: !0 }]), b && b({
|
|
4162
4162
|
type: "updateValue",
|
|
4163
4163
|
payload: { key: "terms", value: !1 }
|
|
4164
4164
|
});
|
|
@@ -4264,13 +4264,13 @@ const Bi = ({
|
|
|
4264
4264
|
onChange: (p) => {
|
|
4265
4265
|
if (!p)
|
|
4266
4266
|
return;
|
|
4267
|
-
const
|
|
4268
|
-
["name", "email"].forEach((
|
|
4269
|
-
o.validFields[
|
|
4270
|
-
type: `validFields.${
|
|
4271
|
-
value: i[
|
|
4272
|
-
}),
|
|
4273
|
-
}),
|
|
4267
|
+
const b = [];
|
|
4268
|
+
["name", "email"].forEach((h) => {
|
|
4269
|
+
o.validFields[h] !== i[h].current.validity.valid && (b.push({
|
|
4270
|
+
type: `validFields.${h}`,
|
|
4271
|
+
value: i[h].current.validity.valid
|
|
4272
|
+
}), h === "email" && Or({ ref: i.email, validateEmail: r, dispatch: c }));
|
|
4273
|
+
}), b.length && c(b);
|
|
4274
4274
|
}
|
|
4275
4275
|
},
|
|
4276
4276
|
validation: [{ condition: "required" }],
|
|
@@ -4332,20 +4332,20 @@ const Zi = {
|
|
|
4332
4332
|
url: m = !0,
|
|
4333
4333
|
logInButton: f = !0,
|
|
4334
4334
|
successMessage: p = !0
|
|
4335
|
-
} = s,
|
|
4335
|
+
} = s, b = {
|
|
4336
4336
|
title: l,
|
|
4337
4337
|
expectation: d,
|
|
4338
4338
|
url: m,
|
|
4339
4339
|
logInButton: f,
|
|
4340
4340
|
successMessage: p
|
|
4341
|
-
}, [
|
|
4341
|
+
}, [h, g] = Qn(ha, Zi), {
|
|
4342
4342
|
validFields: y,
|
|
4343
4343
|
emailDetails: _,
|
|
4344
4344
|
shouldManuallyApprove: S,
|
|
4345
4345
|
shouldDisableButton: w,
|
|
4346
4346
|
showSuccessMessage: x,
|
|
4347
4347
|
showError: F
|
|
4348
|
-
} =
|
|
4348
|
+
} = h, [R, X] = la([
|
|
4349
4349
|
"signup-this-session",
|
|
4350
4350
|
"functional-cookie-consent"
|
|
4351
4351
|
]), B = {
|
|
@@ -4360,7 +4360,7 @@ const Zi = {
|
|
|
4360
4360
|
re(() => {
|
|
4361
4361
|
S === !0 && B.jobTitle.current && B.jobTitle.current.focus();
|
|
4362
4362
|
}, [S]), re(() => {
|
|
4363
|
-
R["signup-this-session"] &&
|
|
4363
|
+
R["signup-this-session"] && g([{ type: "showSuccessMessage", value: !0 }]);
|
|
4364
4364
|
}, [R]), re(() => {
|
|
4365
4365
|
x && R["functional-cookie-consent"] && X("signup-this-session", "true", {
|
|
4366
4366
|
path: "/",
|
|
@@ -4370,21 +4370,21 @@ const Zi = {
|
|
|
4370
4370
|
const $ = wt(() => Ui({
|
|
4371
4371
|
placeholders: n,
|
|
4372
4372
|
labels: e,
|
|
4373
|
-
shouldShow:
|
|
4373
|
+
shouldShow: b,
|
|
4374
4374
|
functions: r,
|
|
4375
4375
|
refs: B,
|
|
4376
|
-
state:
|
|
4377
|
-
dispatch:
|
|
4376
|
+
state: h,
|
|
4377
|
+
dispatch: g,
|
|
4378
4378
|
dataToSubmit: o,
|
|
4379
4379
|
intl: u
|
|
4380
|
-
}), [o, r, u, B,
|
|
4381
|
-
return
|
|
4380
|
+
}), [o, r, u, B, b, h]), C = w ? !0 : S ? !Object.values(y).every((j) => j === !0) : !y.name || !y.email || ["exists", "pending", "verify"].includes(_.boxType);
|
|
4381
|
+
return b.successMessage && x ? /* @__PURE__ */ a.jsx(zi, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
4382
4382
|
"fieldset",
|
|
4383
4383
|
{
|
|
4384
4384
|
className: E("signup-form-fieldset", t),
|
|
4385
4385
|
"data-testid": "signup-form",
|
|
4386
4386
|
children: [
|
|
4387
|
-
|
|
4387
|
+
b.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_title" }) }),
|
|
4388
4388
|
F && /* @__PURE__ */ a.jsx(
|
|
4389
4389
|
He,
|
|
4390
4390
|
{
|
|
@@ -4421,7 +4421,7 @@ const Zi = {
|
|
|
4421
4421
|
meta: {
|
|
4422
4422
|
shouldReset: !1,
|
|
4423
4423
|
showRequiredLabels: !1,
|
|
4424
|
-
shouldShowCancelButton:
|
|
4424
|
+
shouldShowCancelButton: b.logInButton
|
|
4425
4425
|
},
|
|
4426
4426
|
gtm: {
|
|
4427
4427
|
context: "SignupForm",
|
|
@@ -4434,12 +4434,12 @@ const Zi = {
|
|
|
4434
4434
|
dataToSubmit: o,
|
|
4435
4435
|
createAccount: r.createAccount,
|
|
4436
4436
|
onSuccess: r.onSuccess,
|
|
4437
|
-
dispatch:
|
|
4438
|
-
state:
|
|
4437
|
+
dispatch: g,
|
|
4438
|
+
state: h
|
|
4439
4439
|
});
|
|
4440
4440
|
},
|
|
4441
4441
|
onCatch: (j) => {
|
|
4442
|
-
r.handleError(j),
|
|
4442
|
+
r.handleError(j), g([
|
|
4443
4443
|
{ type: "showSuccessMessage", value: !1 },
|
|
4444
4444
|
{ type: "showError", value: !0 }
|
|
4445
4445
|
]);
|
|
@@ -4466,7 +4466,7 @@ function Hi() {
|
|
|
4466
4466
|
if (Ar)
|
|
4467
4467
|
return ue;
|
|
4468
4468
|
Ar = 1;
|
|
4469
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, m = t ? Symbol.for("react.suspense") : 60113, f = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115,
|
|
4469
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, m = t ? Symbol.for("react.suspense") : 60113, f = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, b = t ? Symbol.for("react.lazy") : 60116, h = t ? Symbol.for("react.block") : 60121, g = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, _ = t ? Symbol.for("react.scope") : 60119;
|
|
4470
4470
|
function S(x) {
|
|
4471
4471
|
if (typeof x == "object" && x !== null) {
|
|
4472
4472
|
var F = x.$$typeof;
|
|
@@ -4484,7 +4484,7 @@ function Hi() {
|
|
|
4484
4484
|
switch (x = x && x.$$typeof, x) {
|
|
4485
4485
|
case c:
|
|
4486
4486
|
case d:
|
|
4487
|
-
case
|
|
4487
|
+
case b:
|
|
4488
4488
|
case p:
|
|
4489
4489
|
case o:
|
|
4490
4490
|
return x;
|
|
@@ -4500,7 +4500,7 @@ function Hi() {
|
|
|
4500
4500
|
function w(x) {
|
|
4501
4501
|
return S(x) === l;
|
|
4502
4502
|
}
|
|
4503
|
-
return ue.AsyncMode = u, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = d, ue.Fragment = r, ue.Lazy =
|
|
4503
|
+
return ue.AsyncMode = u, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = d, ue.Fragment = r, ue.Lazy = b, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = m, ue.isAsyncMode = function(x) {
|
|
4504
4504
|
return w(x) || S(x) === u;
|
|
4505
4505
|
}, ue.isConcurrentMode = w, ue.isContextConsumer = function(x) {
|
|
4506
4506
|
return S(x) === c;
|
|
@@ -4513,7 +4513,7 @@ function Hi() {
|
|
|
4513
4513
|
}, ue.isFragment = function(x) {
|
|
4514
4514
|
return S(x) === r;
|
|
4515
4515
|
}, ue.isLazy = function(x) {
|
|
4516
|
-
return S(x) ===
|
|
4516
|
+
return S(x) === b;
|
|
4517
4517
|
}, ue.isMemo = function(x) {
|
|
4518
4518
|
return S(x) === p;
|
|
4519
4519
|
}, ue.isPortal = function(x) {
|
|
@@ -4525,7 +4525,7 @@ function Hi() {
|
|
|
4525
4525
|
}, ue.isSuspense = function(x) {
|
|
4526
4526
|
return S(x) === m;
|
|
4527
4527
|
}, ue.isValidElementType = function(x) {
|
|
4528
|
-
return typeof x == "string" || typeof x == "function" || x === r || x === l || x === i || x === s || x === m || x === f || typeof x == "object" && x !== null && (x.$$typeof ===
|
|
4528
|
+
return typeof x == "string" || typeof x == "function" || x === r || x === l || x === i || x === s || x === m || x === f || typeof x == "object" && x !== null && (x.$$typeof === b || x.$$typeof === p || x.$$typeof === o || x.$$typeof === c || x.$$typeof === d || x.$$typeof === g || x.$$typeof === y || x.$$typeof === _ || x.$$typeof === h);
|
|
4529
4529
|
}, ue.typeOf = S, ue;
|
|
4530
4530
|
}
|
|
4531
4531
|
var de = {};
|
|
@@ -4540,10 +4540,10 @@ var de = {};
|
|
|
4540
4540
|
var Dr;
|
|
4541
4541
|
function Vi() {
|
|
4542
4542
|
return Dr || (Dr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4543
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, m = t ? Symbol.for("react.suspense") : 60113, f = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115,
|
|
4543
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, d = t ? Symbol.for("react.forward_ref") : 60112, m = t ? Symbol.for("react.suspense") : 60113, f = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, b = t ? Symbol.for("react.lazy") : 60116, h = t ? Symbol.for("react.block") : 60121, g = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, _ = t ? Symbol.for("react.scope") : 60119;
|
|
4544
4544
|
function S(D) {
|
|
4545
4545
|
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4546
|
-
D === r || D === l || D === i || D === s || D === m || D === f || typeof D == "object" && D !== null && (D.$$typeof ===
|
|
4546
|
+
D === r || D === l || D === i || D === s || D === m || D === f || typeof D == "object" && D !== null && (D.$$typeof === b || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === d || D.$$typeof === g || D.$$typeof === y || D.$$typeof === _ || D.$$typeof === h);
|
|
4547
4547
|
}
|
|
4548
4548
|
function w(D) {
|
|
4549
4549
|
if (typeof D == "object" && D !== null) {
|
|
@@ -4564,7 +4564,7 @@ function Vi() {
|
|
|
4564
4564
|
switch (Ce) {
|
|
4565
4565
|
case c:
|
|
4566
4566
|
case d:
|
|
4567
|
-
case
|
|
4567
|
+
case b:
|
|
4568
4568
|
case p:
|
|
4569
4569
|
case o:
|
|
4570
4570
|
return Ce;
|
|
@@ -4577,7 +4577,7 @@ function Vi() {
|
|
|
4577
4577
|
}
|
|
4578
4578
|
}
|
|
4579
4579
|
}
|
|
4580
|
-
var x = u, F = l, R = c, X = o, B = e, $ = d, C = r, j =
|
|
4580
|
+
var x = u, F = l, R = c, X = o, B = e, $ = d, C = r, j = b, k = p, N = n, A = i, W = s, Z = m, z = !1;
|
|
4581
4581
|
function K(D) {
|
|
4582
4582
|
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), T(D) || w(D) === u;
|
|
4583
4583
|
}
|
|
@@ -4600,7 +4600,7 @@ function Vi() {
|
|
|
4600
4600
|
return w(D) === r;
|
|
4601
4601
|
}
|
|
4602
4602
|
function G(D) {
|
|
4603
|
-
return w(D) ===
|
|
4603
|
+
return w(D) === b;
|
|
4604
4604
|
}
|
|
4605
4605
|
function V(D) {
|
|
4606
4606
|
return w(D) === p;
|
|
@@ -4719,8 +4719,8 @@ function Ki() {
|
|
|
4719
4719
|
throw f.name = "Invariant Violation", f;
|
|
4720
4720
|
}
|
|
4721
4721
|
m = i[d](o, d, u, c, null, e);
|
|
4722
|
-
} catch (
|
|
4723
|
-
m =
|
|
4722
|
+
} catch (b) {
|
|
4723
|
+
m = b;
|
|
4724
4724
|
}
|
|
4725
4725
|
if (m && !(m instanceof Error) && t(
|
|
4726
4726
|
(u || "React class") + ": type specification of " + c + " `" + d + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof m + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -4784,14 +4784,14 @@ function Gi() {
|
|
|
4784
4784
|
shape: j,
|
|
4785
4785
|
exact: k
|
|
4786
4786
|
};
|
|
4787
|
-
function
|
|
4787
|
+
function b(T, P) {
|
|
4788
4788
|
return T === P ? T !== 0 || 1 / T === 1 / P : T !== T && P !== P;
|
|
4789
4789
|
}
|
|
4790
|
-
function
|
|
4790
|
+
function h(T, P) {
|
|
4791
4791
|
this.message = T, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
4792
4792
|
}
|
|
4793
|
-
|
|
4794
|
-
function
|
|
4793
|
+
h.prototype = Error.prototype;
|
|
4794
|
+
function g(T) {
|
|
4795
4795
|
if (process.env.NODE_ENV !== "production")
|
|
4796
4796
|
var P = {}, I = 0;
|
|
4797
4797
|
function q(te, G, V, ee, ae, O, oe) {
|
|
@@ -4809,7 +4809,7 @@ function Gi() {
|
|
|
4809
4809
|
), P[ve] = !0, I++);
|
|
4810
4810
|
}
|
|
4811
4811
|
}
|
|
4812
|
-
return G[V] == null ? te ? G[V] === null ? new
|
|
4812
|
+
return G[V] == null ? te ? G[V] === null ? new h("The " + ae + " `" + O + "` is marked as required " + ("in `" + ee + "`, but its value is `null`.")) : new h("The " + ae + " `" + O + "` is marked as required in " + ("`" + ee + "`, but its value is `undefined`.")) : null : T(G, V, ee, ae, O);
|
|
4813
4813
|
}
|
|
4814
4814
|
var U = q.bind(null, !1);
|
|
4815
4815
|
return U.isRequired = q.bind(null, !0), U;
|
|
@@ -4819,26 +4819,26 @@ function Gi() {
|
|
|
4819
4819
|
var ee = I[q], ae = W(ee);
|
|
4820
4820
|
if (ae !== T) {
|
|
4821
4821
|
var O = Z(ee);
|
|
4822
|
-
return new
|
|
4822
|
+
return new h(
|
|
4823
4823
|
"Invalid " + te + " `" + G + "` of type " + ("`" + O + "` supplied to `" + U + "`, expected ") + ("`" + T + "`."),
|
|
4824
4824
|
{ expectedType: T }
|
|
4825
4825
|
);
|
|
4826
4826
|
}
|
|
4827
4827
|
return null;
|
|
4828
4828
|
}
|
|
4829
|
-
return
|
|
4829
|
+
return g(P);
|
|
4830
4830
|
}
|
|
4831
4831
|
function _() {
|
|
4832
|
-
return
|
|
4832
|
+
return g(o);
|
|
4833
4833
|
}
|
|
4834
4834
|
function S(T) {
|
|
4835
4835
|
function P(I, q, U, te, G) {
|
|
4836
4836
|
if (typeof T != "function")
|
|
4837
|
-
return new
|
|
4837
|
+
return new h("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside arrayOf.");
|
|
4838
4838
|
var V = I[q];
|
|
4839
4839
|
if (!Array.isArray(V)) {
|
|
4840
4840
|
var ee = W(V);
|
|
4841
|
-
return new
|
|
4841
|
+
return new h("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an array."));
|
|
4842
4842
|
}
|
|
4843
4843
|
for (var ae = 0; ae < V.length; ae++) {
|
|
4844
4844
|
var O = T(V, ae, U, te, G + "[" + ae + "]", n);
|
|
@@ -4847,39 +4847,39 @@ function Gi() {
|
|
|
4847
4847
|
}
|
|
4848
4848
|
return null;
|
|
4849
4849
|
}
|
|
4850
|
-
return
|
|
4850
|
+
return g(P);
|
|
4851
4851
|
}
|
|
4852
4852
|
function w() {
|
|
4853
4853
|
function T(P, I, q, U, te) {
|
|
4854
4854
|
var G = P[I];
|
|
4855
4855
|
if (!c(G)) {
|
|
4856
4856
|
var V = W(G);
|
|
4857
|
-
return new
|
|
4857
|
+
return new h("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + q + "`, expected a single ReactElement."));
|
|
4858
4858
|
}
|
|
4859
4859
|
return null;
|
|
4860
4860
|
}
|
|
4861
|
-
return
|
|
4861
|
+
return g(T);
|
|
4862
4862
|
}
|
|
4863
4863
|
function x() {
|
|
4864
4864
|
function T(P, I, q, U, te) {
|
|
4865
4865
|
var G = P[I];
|
|
4866
4866
|
if (!t.isValidElementType(G)) {
|
|
4867
4867
|
var V = W(G);
|
|
4868
|
-
return new
|
|
4868
|
+
return new h("Invalid " + U + " `" + te + "` of type " + ("`" + V + "` supplied to `" + q + "`, expected a single ReactElement type."));
|
|
4869
4869
|
}
|
|
4870
4870
|
return null;
|
|
4871
4871
|
}
|
|
4872
|
-
return
|
|
4872
|
+
return g(T);
|
|
4873
4873
|
}
|
|
4874
4874
|
function F(T) {
|
|
4875
4875
|
function P(I, q, U, te, G) {
|
|
4876
4876
|
if (!(I[q] instanceof T)) {
|
|
4877
4877
|
var V = T.name || f, ee = K(I[q]);
|
|
4878
|
-
return new
|
|
4878
|
+
return new h("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected ") + ("instance of `" + V + "`."));
|
|
4879
4879
|
}
|
|
4880
4880
|
return null;
|
|
4881
4881
|
}
|
|
4882
|
-
return
|
|
4882
|
+
return g(P);
|
|
4883
4883
|
}
|
|
4884
4884
|
function R(T) {
|
|
4885
4885
|
if (!Array.isArray(T))
|
|
@@ -4888,23 +4888,23 @@ function Gi() {
|
|
|
4888
4888
|
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
4889
4889
|
function P(I, q, U, te, G) {
|
|
4890
4890
|
for (var V = I[q], ee = 0; ee < T.length; ee++)
|
|
4891
|
-
if (
|
|
4891
|
+
if (b(V, T[ee]))
|
|
4892
4892
|
return null;
|
|
4893
4893
|
var ae = JSON.stringify(T, function(oe, D) {
|
|
4894
4894
|
var ve = Z(D);
|
|
4895
4895
|
return ve === "symbol" ? String(D) : D;
|
|
4896
4896
|
});
|
|
4897
|
-
return new
|
|
4897
|
+
return new h("Invalid " + te + " `" + G + "` of value `" + String(V) + "` " + ("supplied to `" + U + "`, expected one of " + ae + "."));
|
|
4898
4898
|
}
|
|
4899
|
-
return
|
|
4899
|
+
return g(P);
|
|
4900
4900
|
}
|
|
4901
4901
|
function X(T) {
|
|
4902
4902
|
function P(I, q, U, te, G) {
|
|
4903
4903
|
if (typeof T != "function")
|
|
4904
|
-
return new
|
|
4904
|
+
return new h("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside objectOf.");
|
|
4905
4905
|
var V = I[q], ee = W(V);
|
|
4906
4906
|
if (ee !== "object")
|
|
4907
|
-
return new
|
|
4907
|
+
return new h("Invalid " + te + " `" + G + "` of type " + ("`" + ee + "` supplied to `" + U + "`, expected an object."));
|
|
4908
4908
|
for (var ae in V)
|
|
4909
4909
|
if (r(V, ae)) {
|
|
4910
4910
|
var O = T(V, ae, U, te, G + "." + ae, n);
|
|
@@ -4913,7 +4913,7 @@ function Gi() {
|
|
|
4913
4913
|
}
|
|
4914
4914
|
return null;
|
|
4915
4915
|
}
|
|
4916
|
-
return
|
|
4916
|
+
return g(P);
|
|
4917
4917
|
}
|
|
4918
4918
|
function B(T) {
|
|
4919
4919
|
if (!Array.isArray(T))
|
|
@@ -4933,18 +4933,18 @@ function Gi() {
|
|
|
4933
4933
|
D.data && r(D.data, "expectedType") && ae.push(D.data.expectedType);
|
|
4934
4934
|
}
|
|
4935
4935
|
var ve = ae.length > 0 ? ", expected one of type [" + ae.join(", ") + "]" : "";
|
|
4936
|
-
return new
|
|
4936
|
+
return new h("Invalid " + V + " `" + ee + "` supplied to " + ("`" + G + "`" + ve + "."));
|
|
4937
4937
|
}
|
|
4938
|
-
return
|
|
4938
|
+
return g(q);
|
|
4939
4939
|
}
|
|
4940
4940
|
function $() {
|
|
4941
4941
|
function T(P, I, q, U, te) {
|
|
4942
|
-
return N(P[I]) ? null : new
|
|
4942
|
+
return N(P[I]) ? null : new h("Invalid " + U + " `" + te + "` supplied to " + ("`" + q + "`, expected a ReactNode."));
|
|
4943
4943
|
}
|
|
4944
|
-
return
|
|
4944
|
+
return g(T);
|
|
4945
4945
|
}
|
|
4946
4946
|
function C(T, P, I, q, U) {
|
|
4947
|
-
return new
|
|
4947
|
+
return new h(
|
|
4948
4948
|
(T || "React class") + ": " + P + " type `" + I + "." + q + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`."
|
|
4949
4949
|
);
|
|
4950
4950
|
}
|
|
@@ -4952,7 +4952,7 @@ function Gi() {
|
|
|
4952
4952
|
function P(I, q, U, te, G) {
|
|
4953
4953
|
var V = I[q], ee = W(V);
|
|
4954
4954
|
if (ee !== "object")
|
|
4955
|
-
return new
|
|
4955
|
+
return new h("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
4956
4956
|
for (var ae in T) {
|
|
4957
4957
|
var O = T[ae];
|
|
4958
4958
|
if (typeof O != "function")
|
|
@@ -4963,20 +4963,20 @@ function Gi() {
|
|
|
4963
4963
|
}
|
|
4964
4964
|
return null;
|
|
4965
4965
|
}
|
|
4966
|
-
return
|
|
4966
|
+
return g(P);
|
|
4967
4967
|
}
|
|
4968
4968
|
function k(T) {
|
|
4969
4969
|
function P(I, q, U, te, G) {
|
|
4970
4970
|
var V = I[q], ee = W(V);
|
|
4971
4971
|
if (ee !== "object")
|
|
4972
|
-
return new
|
|
4972
|
+
return new h("Invalid " + te + " `" + G + "` of type `" + ee + "` " + ("supplied to `" + U + "`, expected `object`."));
|
|
4973
4973
|
var ae = e({}, I[q], T);
|
|
4974
4974
|
for (var O in ae) {
|
|
4975
4975
|
var oe = T[O];
|
|
4976
4976
|
if (r(T, O) && typeof oe != "function")
|
|
4977
4977
|
return C(U, te, G, O, Z(oe));
|
|
4978
4978
|
if (!oe)
|
|
4979
|
-
return new
|
|
4979
|
+
return new h(
|
|
4980
4980
|
"Invalid " + te + " `" + G + "` key `" + O + "` supplied to `" + U + "`.\nBad object: " + JSON.stringify(I[q], null, " ") + `
|
|
4981
4981
|
Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
4982
4982
|
);
|
|
@@ -4986,7 +4986,7 @@ Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
|
4986
4986
|
}
|
|
4987
4987
|
return null;
|
|
4988
4988
|
}
|
|
4989
|
-
return
|
|
4989
|
+
return g(P);
|
|
4990
4990
|
}
|
|
4991
4991
|
function N(T) {
|
|
4992
4992
|
switch (typeof T) {
|
|
@@ -5549,7 +5549,7 @@ var Yr = {
|
|
|
5549
5549
|
var k = j.activeElement;
|
|
5550
5550
|
if (k)
|
|
5551
5551
|
return k.shadowRoot && k.shadowRoot.activeElement !== null ? C(k.shadowRoot) : k;
|
|
5552
|
-
},
|
|
5552
|
+
}, b = function C(j) {
|
|
5553
5553
|
if (j !== !1 && j !== p(document)) {
|
|
5554
5554
|
if (!j || !j.focus) {
|
|
5555
5555
|
C(m());
|
|
@@ -5559,10 +5559,10 @@ var Yr = {
|
|
|
5559
5559
|
preventScroll: !!i.preventScroll
|
|
5560
5560
|
}), o.mostRecentlyFocusedNode = j, xo(j) && j.select();
|
|
5561
5561
|
}
|
|
5562
|
-
},
|
|
5562
|
+
}, h = function(j) {
|
|
5563
5563
|
var k = d("setReturnFocus", j);
|
|
5564
5564
|
return k || (k === !1 ? !1 : j);
|
|
5565
|
-
},
|
|
5565
|
+
}, g = function(j) {
|
|
5566
5566
|
var k = j.target, N = j.event, A = j.isBackward, W = A === void 0 ? !1 : A;
|
|
5567
5567
|
k = k || Rt(N), f();
|
|
5568
5568
|
var Z = null;
|
|
@@ -5635,22 +5635,22 @@ var Yr = {
|
|
|
5635
5635
|
}) || (W = !1);
|
|
5636
5636
|
else
|
|
5637
5637
|
W = !1;
|
|
5638
|
-
W && (A =
|
|
5638
|
+
W && (A = g({
|
|
5639
5639
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
5640
5640
|
// outside the trap causing the focus escape we're trying to fix)
|
|
5641
5641
|
target: o.mostRecentlyFocusedNode,
|
|
5642
5642
|
isBackward: i.isKeyBackward(o.recentNavEvent)
|
|
5643
|
-
})),
|
|
5643
|
+
})), b(A || o.mostRecentlyFocusedNode || m());
|
|
5644
5644
|
}
|
|
5645
5645
|
o.recentNavEvent = void 0;
|
|
5646
5646
|
}, S = function(j) {
|
|
5647
5647
|
var k = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
5648
5648
|
o.recentNavEvent = j;
|
|
5649
|
-
var N =
|
|
5649
|
+
var N = g({
|
|
5650
5650
|
event: j,
|
|
5651
5651
|
isBackward: k
|
|
5652
5652
|
});
|
|
5653
|
-
N && (vt(j) && j.preventDefault(),
|
|
5653
|
+
N && (vt(j) && j.preventDefault(), b(N));
|
|
5654
5654
|
}, w = function(j) {
|
|
5655
5655
|
if (wo(j) && ct(i.escapeDeactivates, j) !== !1) {
|
|
5656
5656
|
j.preventDefault(), c.deactivate();
|
|
@@ -5663,8 +5663,8 @@ var Yr = {
|
|
|
5663
5663
|
}, F = function() {
|
|
5664
5664
|
if (o.active)
|
|
5665
5665
|
return Yr.activateTrap(s, c), o.delayInitialFocusTimer = i.delayInitialFocus ? Kr(function() {
|
|
5666
|
-
|
|
5667
|
-
}) :
|
|
5666
|
+
b(m());
|
|
5667
|
+
}) : b(m()), r.addEventListener("focusin", _, !0), r.addEventListener("mousedown", y, {
|
|
5668
5668
|
capture: !0,
|
|
5669
5669
|
passive: !1
|
|
5670
5670
|
}), r.addEventListener("touchstart", y, {
|
|
@@ -5687,7 +5687,7 @@ var Yr = {
|
|
|
5687
5687
|
return W === o.mostRecentlyFocusedNode;
|
|
5688
5688
|
});
|
|
5689
5689
|
});
|
|
5690
|
-
k &&
|
|
5690
|
+
k && b(m());
|
|
5691
5691
|
}, B = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(X) : void 0, $ = function() {
|
|
5692
5692
|
B && (B.disconnect(), o.active && !o.paused && o.containers.map(function(j) {
|
|
5693
5693
|
B.observe(j, {
|
|
@@ -5726,10 +5726,10 @@ var Yr = {
|
|
|
5726
5726
|
N == null || N();
|
|
5727
5727
|
var z = function() {
|
|
5728
5728
|
Kr(function() {
|
|
5729
|
-
Z && h(
|
|
5729
|
+
Z && b(h(o.nodeFocusedBeforeActivation)), A == null || A();
|
|
5730
5730
|
});
|
|
5731
5731
|
};
|
|
5732
|
-
return Z && W ? (W(
|
|
5732
|
+
return Z && W ? (W(h(o.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
|
|
5733
5733
|
},
|
|
5734
5734
|
pause: function(j) {
|
|
5735
5735
|
if (o.paused || !o.active)
|
|
@@ -5865,8 +5865,8 @@ var Ft = Y, J = eo, Io = Co, Lo = Io.createFocusTrap, Bo = No, qo = Bo.isFocusab
|
|
|
5865
5865
|
}
|
|
5866
5866
|
var p = l;
|
|
5867
5867
|
if (typeof l == "string") {
|
|
5868
|
-
var
|
|
5869
|
-
if (p = (
|
|
5868
|
+
var b;
|
|
5869
|
+
if (p = (b = this.getDocument()) === null || b === void 0 ? void 0 : b.querySelector(l), !p)
|
|
5870
5870
|
throw new Error("`".concat(c, "` as selector refers to no known node"));
|
|
5871
5871
|
}
|
|
5872
5872
|
return p;
|
|
@@ -6200,27 +6200,27 @@ const on = ({
|
|
|
6200
6200
|
className: d = "",
|
|
6201
6201
|
gtmContext: m = "Modal"
|
|
6202
6202
|
}) => {
|
|
6203
|
-
const f = H(), { registerOverlay: p, unregisterOverlay:
|
|
6203
|
+
const f = H(), { registerOverlay: p, unregisterOverlay: b } = Go(), [h, g] = Q(e), y = (w) => {
|
|
6204
6204
|
w.key === "Escape" && _(!1);
|
|
6205
6205
|
};
|
|
6206
6206
|
re(() => (window.addEventListener("keyup", y), () => {
|
|
6207
6207
|
window.removeEventListener("keyup", y);
|
|
6208
6208
|
}));
|
|
6209
6209
|
const _ = (w) => {
|
|
6210
|
-
|
|
6210
|
+
g(w), w ? (s(), p(t)) : (i(), b(t));
|
|
6211
6211
|
};
|
|
6212
6212
|
re(() => (_(e), () => {
|
|
6213
|
-
|
|
6213
|
+
h && b(t);
|
|
6214
6214
|
}), [e]);
|
|
6215
6215
|
const S = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
6216
|
-
return /* @__PURE__ */ a.jsx("div", { className: E("overlay", { open:
|
|
6216
|
+
return /* @__PURE__ */ a.jsx("div", { className: E("overlay", { open: h }), role: "dialog", children: /* @__PURE__ */ a.jsx(
|
|
6217
6217
|
Ua,
|
|
6218
6218
|
{
|
|
6219
6219
|
id: t,
|
|
6220
6220
|
className: E("overlay-modal", d, {
|
|
6221
6221
|
"has-max-width": r
|
|
6222
6222
|
}),
|
|
6223
|
-
hidden: !
|
|
6223
|
+
hidden: !h,
|
|
6224
6224
|
style: S,
|
|
6225
6225
|
children: e && /* @__PURE__ */ a.jsx(Uo, { children: /* @__PURE__ */ a.jsxs("div", { className: "overlay-content", children: [
|
|
6226
6226
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
@@ -6403,17 +6403,17 @@ const sr = ({
|
|
|
6403
6403
|
if (!t || typeof t != "number")
|
|
6404
6404
|
return null;
|
|
6405
6405
|
const c = (d) => {
|
|
6406
|
-
const m = d / 60, f = Math.floor(m), p = (m - f) * 60,
|
|
6406
|
+
const m = d / 60, f = Math.floor(m), p = (m - f) * 60, b = Math.round(p), h = `${i.formatMessage(
|
|
6407
6407
|
{ id: `${o}hours` },
|
|
6408
6408
|
{ time: f }
|
|
6409
|
-
)}${f > 0 &&
|
|
6409
|
+
)}${f > 0 && b > 0 ? ", " : ""}${i.formatMessage(
|
|
6410
6410
|
{ id: `${o}minutes` },
|
|
6411
|
-
{ time:
|
|
6411
|
+
{ time: b }
|
|
6412
6412
|
)}`;
|
|
6413
6413
|
return { text: `${f > 0 ? `${i.formatMessage(
|
|
6414
6414
|
{ id: `${o}hours_short` },
|
|
6415
6415
|
{ time: f }
|
|
6416
|
-
)} ` : ""}${
|
|
6416
|
+
)} ` : ""}${b > 0 ? i.formatMessage({ id: `${o}minutes_short` }, { time: b }) : ""}`, ariaText: h };
|
|
6417
6417
|
};
|
|
6418
6418
|
let { text: u, ariaText: l } = c(t);
|
|
6419
6419
|
if (e) {
|
|
@@ -6552,8 +6552,8 @@ const tc = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s
|
|
|
6552
6552
|
}, functions: {
|
|
6553
6553
|
...n == null ? void 0 : n.functions,
|
|
6554
6554
|
onSuccess: async (f) => {
|
|
6555
|
-
var p,
|
|
6556
|
-
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((
|
|
6555
|
+
var p, b;
|
|
6556
|
+
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((b = n == null ? void 0 : n.functions) == null ? void 0 : b.onSuccess(f)), l(!1);
|
|
6557
6557
|
},
|
|
6558
6558
|
onCancel: m
|
|
6559
6559
|
} })
|
|
@@ -6603,10 +6603,10 @@ const tu = ({
|
|
|
6603
6603
|
"two-col": i === 2 || i === 4,
|
|
6604
6604
|
"three-col": i === 5 || i <= 10 && i % 3 === 0
|
|
6605
6605
|
}),
|
|
6606
|
-
children: n.map(({ logo: d, nameOfBusiness: m, link: f = !1, description: p = !1 },
|
|
6606
|
+
children: n.map(({ logo: d, nameOfBusiness: m, link: f = !1, description: p = !1 }, b) => {
|
|
6607
6607
|
if (!d || !d.url)
|
|
6608
6608
|
return null;
|
|
6609
|
-
const
|
|
6609
|
+
const h = /* @__PURE__ */ a.jsx(
|
|
6610
6610
|
"img",
|
|
6611
6611
|
{
|
|
6612
6612
|
src: d.url,
|
|
@@ -6616,9 +6616,9 @@ const tu = ({
|
|
|
6616
6616
|
}
|
|
6617
6617
|
);
|
|
6618
6618
|
return /* @__PURE__ */ a.jsxs("li", { children: [
|
|
6619
|
-
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: f ? /* @__PURE__ */ a.jsx("a", { href: f, target: "_blank", rel: "nofollow noreferrer noopener", children:
|
|
6619
|
+
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: f ? /* @__PURE__ */ a.jsx("a", { href: f, target: "_blank", rel: "nofollow noreferrer noopener", children: h }) : h }),
|
|
6620
6620
|
p && /* @__PURE__ */ a.jsx("small", { children: p })
|
|
6621
|
-
] }, window.btoa(`${d.url}_${
|
|
6621
|
+
] }, window.btoa(`${d.url}_${b}`));
|
|
6622
6622
|
})
|
|
6623
6623
|
}
|
|
6624
6624
|
)
|
|
@@ -6655,39 +6655,39 @@ const nc = [
|
|
|
6655
6655
|
cta: c,
|
|
6656
6656
|
children: u
|
|
6657
6657
|
}) => {
|
|
6658
|
-
var
|
|
6658
|
+
var b, h;
|
|
6659
6659
|
const l = {
|
|
6660
6660
|
imageFullWidth: !0,
|
|
6661
6661
|
...i
|
|
6662
6662
|
};
|
|
6663
6663
|
r || (r = l.imageFullWidth ? "default" : "light");
|
|
6664
6664
|
const d = ["eyebrow", "title", "text"], m = { eyebrow: "small", title: "h1", text: "p" }, f = {};
|
|
6665
|
-
d.forEach((
|
|
6666
|
-
if (!e[
|
|
6667
|
-
f[
|
|
6665
|
+
d.forEach((g) => {
|
|
6666
|
+
if (!e[g]) {
|
|
6667
|
+
f[g] = !1;
|
|
6668
6668
|
return;
|
|
6669
6669
|
}
|
|
6670
|
-
if (!o[
|
|
6671
|
-
if (typeof e[
|
|
6672
|
-
f[
|
|
6673
|
-
const { text: y, element: _ } = e[
|
|
6670
|
+
if (!o[g]) {
|
|
6671
|
+
if (typeof e[g] == "object") {
|
|
6672
|
+
f[g] = e[g];
|
|
6673
|
+
const { text: y, element: _ } = e[g];
|
|
6674
6674
|
if (_ && nc.includes(_.toLowerCase()))
|
|
6675
6675
|
return;
|
|
6676
|
-
f[
|
|
6676
|
+
f[g] = {
|
|
6677
6677
|
text: y,
|
|
6678
|
-
element: m[
|
|
6678
|
+
element: m[g]
|
|
6679
6679
|
};
|
|
6680
6680
|
return;
|
|
6681
6681
|
}
|
|
6682
|
-
f[
|
|
6683
|
-
text: e[
|
|
6684
|
-
element: m[
|
|
6682
|
+
f[g] = {
|
|
6683
|
+
text: e[g],
|
|
6684
|
+
element: m[g]
|
|
6685
6685
|
};
|
|
6686
6686
|
}
|
|
6687
6687
|
});
|
|
6688
6688
|
const p = c && c.text && c.link;
|
|
6689
|
-
return p && c.link[0] === "#" && (c.props || (c.props = {}), c.props.onClick = (
|
|
6690
|
-
|
|
6689
|
+
return p && c.link[0] === "#" && (c.props || (c.props = {}), c.props.onClick = (g) => {
|
|
6690
|
+
g.preventDefault(), g.stopPropagation();
|
|
6691
6691
|
const y = document.getElementById(c.link.substring(1));
|
|
6692
6692
|
y && y.scrollIntoView({ behavior: "smooth" });
|
|
6693
6693
|
}), /* @__PURE__ */ a.jsx(
|
|
@@ -6702,10 +6702,10 @@ const nc = [
|
|
|
6702
6702
|
}),
|
|
6703
6703
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6704
6704
|
/* @__PURE__ */ a.jsxs("div", { className: "content-wrapper", children: [
|
|
6705
|
-
d.map((
|
|
6706
|
-
if (f[
|
|
6707
|
-
const { text: y, element: _ = "" } = f[
|
|
6708
|
-
return
|
|
6705
|
+
d.map((g) => {
|
|
6706
|
+
if (f[g] && typeof f[g] == "object") {
|
|
6707
|
+
const { text: y, element: _ = "" } = f[g];
|
|
6708
|
+
return g === "text" ? /* @__PURE__ */ a.jsx(xt, { overrideType: "text-only", className: "text", children: y }, g) : Y.createElement(_, { key: g, className: g }, y);
|
|
6709
6709
|
}
|
|
6710
6710
|
return null;
|
|
6711
6711
|
}),
|
|
@@ -6719,7 +6719,7 @@ const nc = [
|
|
|
6719
6719
|
...c.props,
|
|
6720
6720
|
className: E({
|
|
6721
6721
|
new: r === "subtle",
|
|
6722
|
-
[(
|
|
6722
|
+
[(b = c.props) == null ? void 0 : b.className]: (h = c.props) == null ? void 0 : h.className
|
|
6723
6723
|
}),
|
|
6724
6724
|
children: c.text
|
|
6725
6725
|
}
|
|
@@ -6935,7 +6935,7 @@ const su = ({
|
|
|
6935
6935
|
gtmEvent: "learning-hub"
|
|
6936
6936
|
}
|
|
6937
6937
|
}, ic = ({ data: t, cta: e, link: n, gtmContext: r }) => {
|
|
6938
|
-
var
|
|
6938
|
+
var h, g;
|
|
6939
6939
|
const s = H(), [i, o] = Q({
|
|
6940
6940
|
loading: !1,
|
|
6941
6941
|
registered: t.registered || !1
|
|
@@ -6945,7 +6945,7 @@ const su = ({
|
|
|
6945
6945
|
}, [t.registered]);
|
|
6946
6946
|
const { customLinkText: c, startDate: u, dateHasPassed: l, pill: d, slug: m } = t, f = t.contentType;
|
|
6947
6947
|
let p = "";
|
|
6948
|
-
if ((
|
|
6948
|
+
if ((h = Qt[f]) != null && h.gtmEvent && (p = Qt[f].gtmEvent), u && l)
|
|
6949
6949
|
return n ? /* @__PURE__ */ a.jsx(
|
|
6950
6950
|
"a",
|
|
6951
6951
|
{
|
|
@@ -6969,9 +6969,9 @@ const su = ({
|
|
|
6969
6969
|
children: c || s.formatMessage({ id: "card_cta_people" })
|
|
6970
6970
|
}
|
|
6971
6971
|
) : null;
|
|
6972
|
-
const
|
|
6973
|
-
if (e && e.onClick &&
|
|
6974
|
-
const y = i.loading || i.registered || ((
|
|
6972
|
+
const b = ["communityPage", "microcourse", "event"];
|
|
6973
|
+
if (e && e.onClick && b.includes(f) && d !== "premium") {
|
|
6974
|
+
const y = i.loading || i.registered || ((g = t == null ? void 0 : t.members) == null ? void 0 : g.isMember), _ = async (S) => {
|
|
6975
6975
|
if (S.preventDefault(), S.stopPropagation(), !(y || !e || !e.onClick)) {
|
|
6976
6976
|
o((w) => ({ ...w, loading: !0 }));
|
|
6977
6977
|
try {
|
|
@@ -7027,13 +7027,13 @@ const oc = {
|
|
|
7027
7027
|
const c = H(), u = Ee(Ae), l = u && typeof u.id == "string", [d, m] = Q({
|
|
7028
7028
|
data: null,
|
|
7029
7029
|
isLoading: !0
|
|
7030
|
-
}), { data: f, isLoading: p } = d,
|
|
7030
|
+
}), { data: f, isLoading: p } = d, b = Ut(() => {
|
|
7031
7031
|
n(e, l).then(($) => {
|
|
7032
7032
|
m(() => ({ data: $, isLoading: !1 }));
|
|
7033
7033
|
}).catch(() => m(($) => ({ ...$, isLoading: !1 })));
|
|
7034
7034
|
}, [t]);
|
|
7035
7035
|
if (re(() => {
|
|
7036
|
-
|
|
7036
|
+
b();
|
|
7037
7037
|
}, []), p || !f)
|
|
7038
7038
|
return /* @__PURE__ */ a.jsx(
|
|
7039
7039
|
Se,
|
|
@@ -7047,16 +7047,16 @@ const oc = {
|
|
|
7047
7047
|
text: c.formatMessage({ id: `card_cta_${e.contentType}` }),
|
|
7048
7048
|
onClick: o
|
|
7049
7049
|
});
|
|
7050
|
-
const { contentType:
|
|
7051
|
-
if (!
|
|
7050
|
+
const { contentType: h } = f;
|
|
7051
|
+
if (!h || !Qt[h])
|
|
7052
7052
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "card-wrapper" });
|
|
7053
7053
|
const {
|
|
7054
|
-
basePath:
|
|
7054
|
+
basePath: g = "",
|
|
7055
7055
|
className: y,
|
|
7056
7056
|
length: _,
|
|
7057
7057
|
gtmEvent: S
|
|
7058
|
-
} = Qt[
|
|
7059
|
-
let w = f.slug ? `${
|
|
7058
|
+
} = Qt[h];
|
|
7059
|
+
let w = f.slug ? `${g}${f.slug}` : !1;
|
|
7060
7060
|
f.slug && (f.slug.slice(0, 4) === "http" || f.slug.slice(0, 2) === "//" || f.slug.slice(0, 6) === "mailto" || f.slug.slice(0, 3) === "tel") && (w = f.slug);
|
|
7061
7061
|
const x = { ...oc, ..._ };
|
|
7062
7062
|
let F = { className: "card" };
|
|
@@ -7074,7 +7074,7 @@ const oc = {
|
|
|
7074
7074
|
"no-link": !w,
|
|
7075
7075
|
"has-image": f.banner
|
|
7076
7076
|
}),
|
|
7077
|
-
"data-testid": `${
|
|
7077
|
+
"data-testid": `${h}-card`,
|
|
7078
7078
|
children: Y.createElement(
|
|
7079
7079
|
w ? "a" : "div",
|
|
7080
7080
|
F,
|
|
@@ -7083,7 +7083,7 @@ const oc = {
|
|
|
7083
7083
|
ui,
|
|
7084
7084
|
{
|
|
7085
7085
|
className: "card-label",
|
|
7086
|
-
contentType:
|
|
7086
|
+
contentType: h,
|
|
7087
7087
|
customIcon: f.customIcon,
|
|
7088
7088
|
customLabel: f.customLabel
|
|
7089
7089
|
}
|
|
@@ -7117,7 +7117,7 @@ const oc = {
|
|
|
7117
7117
|
showGap: y !== "question",
|
|
7118
7118
|
showText: !0
|
|
7119
7119
|
},
|
|
7120
|
-
multipleText: ["event", "solutionArticle"].includes(
|
|
7120
|
+
multipleText: ["event", "solutionArticle"].includes(h) ? c.formatMessage({ id: `card_contributors_${h}` }) : void 0,
|
|
7121
7121
|
"data-testid": "contributors"
|
|
7122
7122
|
}
|
|
7123
7123
|
),
|
|
@@ -7215,10 +7215,10 @@ const dc = ({
|
|
|
7215
7215
|
const u = H(), [l, d] = Q({
|
|
7216
7216
|
cardsPerPage: 4,
|
|
7217
7217
|
isLoading: !0
|
|
7218
|
-
}), { cardsPerPage: m, isLoading: f } = l, [p,
|
|
7218
|
+
}), { cardsPerPage: m, isLoading: f } = l, [p, b] = Q({
|
|
7219
7219
|
currentPage: 0,
|
|
7220
7220
|
loadedPages: [0]
|
|
7221
|
-
}), { currentPage:
|
|
7221
|
+
}), { currentPage: h, loadedPages: g } = p, y = e.length, _ = Math.ceil(y / m), S = pe(null), w = kt(!0, !0, S == null ? void 0 : S.current);
|
|
7222
7222
|
re(() => {
|
|
7223
7223
|
let $ = 1;
|
|
7224
7224
|
w && (w >= Cn.fourCards ? $ = 4 : w >= Cn.threeCards ? $ = 3 : w >= Cn.twoCards && ($ = 2), $ > y && ($ = y)), d((C) => ({
|
|
@@ -7228,23 +7228,23 @@ const dc = ({
|
|
|
7228
7228
|
}));
|
|
7229
7229
|
}, [w, y]);
|
|
7230
7230
|
const x = ($ = "next") => {
|
|
7231
|
-
let C =
|
|
7231
|
+
let C = h;
|
|
7232
7232
|
if (typeof $ == "string")
|
|
7233
7233
|
if ($ === "next")
|
|
7234
|
-
if (
|
|
7235
|
-
C =
|
|
7234
|
+
if (h < _ - 1)
|
|
7235
|
+
C = h + 1;
|
|
7236
7236
|
else
|
|
7237
7237
|
return;
|
|
7238
|
-
else if (
|
|
7239
|
-
C =
|
|
7238
|
+
else if (h > 0)
|
|
7239
|
+
C = h - 1;
|
|
7240
7240
|
else
|
|
7241
7241
|
return;
|
|
7242
7242
|
else
|
|
7243
7243
|
C = $;
|
|
7244
|
-
|
|
7244
|
+
b((j) => ({
|
|
7245
7245
|
...j,
|
|
7246
7246
|
currentPage: C,
|
|
7247
|
-
loadedPages: [.../* @__PURE__ */ new Set([...
|
|
7247
|
+
loadedPages: [.../* @__PURE__ */ new Set([...g, C])]
|
|
7248
7248
|
}));
|
|
7249
7249
|
}, F = ($) => {
|
|
7250
7250
|
Ot = $.touches[0].clientX;
|
|
@@ -7257,7 +7257,7 @@ const dc = ({
|
|
|
7257
7257
|
"--width": `${w || 0}px`,
|
|
7258
7258
|
"--total-cards": y,
|
|
7259
7259
|
"--cards-per-page": m,
|
|
7260
|
-
"--page":
|
|
7260
|
+
"--page": h
|
|
7261
7261
|
};
|
|
7262
7262
|
if (f)
|
|
7263
7263
|
return /* @__PURE__ */ a.jsx(wa, { layout: `carousel${s ? "-with-title" : ""}` });
|
|
@@ -7284,7 +7284,7 @@ const dc = ({
|
|
|
7284
7284
|
"data-testid": "carousel-list",
|
|
7285
7285
|
children: e.map(($, C) => {
|
|
7286
7286
|
let j = B($, C);
|
|
7287
|
-
return j && lc(C, m,
|
|
7287
|
+
return j && lc(C, m, h, g) ? /* @__PURE__ */ a.jsx(
|
|
7288
7288
|
Za,
|
|
7289
7289
|
{
|
|
7290
7290
|
id: j,
|
|
@@ -7319,14 +7319,14 @@ const dc = ({
|
|
|
7319
7319
|
screenreaderText: u.formatMessage({
|
|
7320
7320
|
id: "carousel_pagination_previous"
|
|
7321
7321
|
}),
|
|
7322
|
-
disabled:
|
|
7322
|
+
disabled: h <= 0
|
|
7323
7323
|
}
|
|
7324
7324
|
) }),
|
|
7325
7325
|
[...Array(_)].map(($, C) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
7326
7326
|
"button",
|
|
7327
7327
|
{
|
|
7328
7328
|
className: E("page-indicator", {
|
|
7329
|
-
selected: C ===
|
|
7329
|
+
selected: C === h
|
|
7330
7330
|
}),
|
|
7331
7331
|
onClick: (j) => {
|
|
7332
7332
|
j.preventDefault(), j.stopPropagation(), x(C);
|
|
@@ -7347,7 +7347,7 @@ const dc = ({
|
|
|
7347
7347
|
$.preventDefault(), $.stopPropagation(), x("next");
|
|
7348
7348
|
},
|
|
7349
7349
|
screenreaderText: u.formatMessage({ id: "carousel_pagination_next" }),
|
|
7350
|
-
disabled:
|
|
7350
|
+
disabled: h >= _ - 1
|
|
7351
7351
|
}
|
|
7352
7352
|
) })
|
|
7353
7353
|
] })
|
|
@@ -7512,18 +7512,18 @@ const lu = ({
|
|
|
7512
7512
|
};
|
|
7513
7513
|
return /* @__PURE__ */ a.jsx("ul", { className: E("filters", s), children: o.map(({ id: d, text: m, disabled: f = !1, callback: p = () => {
|
|
7514
7514
|
} }) => {
|
|
7515
|
-
let
|
|
7516
|
-
return f && (
|
|
7515
|
+
let b = {};
|
|
7516
|
+
return f && (b = {
|
|
7517
7517
|
disabled: !0,
|
|
7518
7518
|
"aria-label": i.formatMessage({ id: "filters_disabled" }, { name: m })
|
|
7519
7519
|
}), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7520
7520
|
"button",
|
|
7521
7521
|
{
|
|
7522
7522
|
className: E(d, { selected: c.includes(d) }),
|
|
7523
|
-
onClick: (
|
|
7524
|
-
|
|
7523
|
+
onClick: (h) => {
|
|
7524
|
+
h.preventDefault(), h.stopPropagation(), l(d, p);
|
|
7525
7525
|
},
|
|
7526
|
-
...
|
|
7526
|
+
...b,
|
|
7527
7527
|
children: m
|
|
7528
7528
|
}
|
|
7529
7529
|
) }, d);
|
|
@@ -7556,44 +7556,44 @@ const At = "languageSwitcher_", uu = ({
|
|
|
7556
7556
|
if (re(() => {
|
|
7557
7557
|
t !== m && f(t);
|
|
7558
7558
|
}, [t]), !r || !Object.values(r).some(
|
|
7559
|
-
(
|
|
7559
|
+
(g) => g && g.post_name
|
|
7560
7560
|
))
|
|
7561
7561
|
return null;
|
|
7562
|
-
const
|
|
7562
|
+
const b = Object.keys(r), h = m !== t;
|
|
7563
7563
|
return /* @__PURE__ */ a.jsxs("div", { className: E("language-switcher text-small", o, u), children: [
|
|
7564
7564
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
7565
7565
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${At}label` }) }),
|
|
7566
|
-
/* @__PURE__ */ a.jsx("ul", { children:
|
|
7566
|
+
/* @__PURE__ */ a.jsx("ul", { children: b.map((g) => {
|
|
7567
7567
|
var S;
|
|
7568
|
-
if (!Sn[
|
|
7568
|
+
if (!Sn[g])
|
|
7569
7569
|
return null;
|
|
7570
|
-
const y = (S = r[
|
|
7571
|
-
let _ = { className:
|
|
7572
|
-
if (m ===
|
|
7570
|
+
const y = (S = r[g]) == null ? void 0 : S.post_name;
|
|
7571
|
+
let _ = { className: g };
|
|
7572
|
+
if (m === g)
|
|
7573
7573
|
_["aria-label"] = l.formatMessage(
|
|
7574
7574
|
{ id: `${At}selected` },
|
|
7575
|
-
{ language: Sn[
|
|
7575
|
+
{ language: Sn[g] }
|
|
7576
7576
|
);
|
|
7577
7577
|
else {
|
|
7578
|
-
const w = fc(
|
|
7578
|
+
const w = fc(g, y, i);
|
|
7579
7579
|
_ = {
|
|
7580
7580
|
..._,
|
|
7581
7581
|
href: typeof w == "string" ? w : w.url,
|
|
7582
7582
|
onClick: (x) => {
|
|
7583
|
-
f(
|
|
7584
|
-
|
|
7583
|
+
f(g), d(g), typeof s < "u" && (x.preventDefault(), x.stopPropagation(), s(
|
|
7584
|
+
g,
|
|
7585
7585
|
typeof w == "string" ? w : w.urlForRouter
|
|
7586
7586
|
));
|
|
7587
7587
|
}
|
|
7588
7588
|
};
|
|
7589
7589
|
}
|
|
7590
|
-
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ..._, fallbackElement: "span", children: Sn[
|
|
7590
|
+
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ..._, fallbackElement: "span", children: Sn[g] }) }, g);
|
|
7591
7591
|
}) }),
|
|
7592
|
-
o !== "short" && !
|
|
7592
|
+
o !== "short" && !h && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({
|
|
7593
7593
|
id: `${At}translation_${e ? "original" : n ? "human" : "machine"}`
|
|
7594
7594
|
}) })
|
|
7595
7595
|
] }),
|
|
7596
|
-
o !== "short" && !
|
|
7596
|
+
o !== "short" && !h && !e && !n && /* @__PURE__ */ a.jsx("small", {
|
|
7597
7597
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
7598
7598
|
// @ts-ignore
|
|
7599
7599
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
@@ -7601,9 +7601,9 @@ const At = "languageSwitcher_", uu = ({
|
|
|
7601
7601
|
{ id: `${At}disclaimer` },
|
|
7602
7602
|
{
|
|
7603
7603
|
email: ft.support,
|
|
7604
|
-
link: (
|
|
7605
|
-
const y = `mailto:${
|
|
7606
|
-
return /* @__PURE__ */ a.jsx("a", { href: y, children:
|
|
7604
|
+
link: (g) => {
|
|
7605
|
+
const y = `mailto:${g}`;
|
|
7606
|
+
return /* @__PURE__ */ a.jsx("a", { href: y, children: g });
|
|
7607
7607
|
}
|
|
7608
7608
|
}
|
|
7609
7609
|
)
|
|
@@ -7631,8 +7631,8 @@ const Pn = Ss({ locale: "en", messages: rt }), cn = ({
|
|
|
7631
7631
|
if (!n)
|
|
7632
7632
|
try {
|
|
7633
7633
|
await e(p);
|
|
7634
|
-
} catch (
|
|
7635
|
-
|
|
7634
|
+
} catch (b) {
|
|
7635
|
+
b instanceof Error ? m(b.message) : m("Unknown error");
|
|
7636
7636
|
}
|
|
7637
7637
|
};
|
|
7638
7638
|
return !d && !t && !c.endOfFeed ? null : /* @__PURE__ */ a.jsx("footer", { className: E("load-more", u), children: !d && t ? /* @__PURE__ */ a.jsx(
|
|
@@ -7698,11 +7698,11 @@ const mc = ({
|
|
|
7698
7698
|
className: "more-menu-button"
|
|
7699
7699
|
}
|
|
7700
7700
|
),
|
|
7701
|
-
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: d, text: m, icon: f, ...p },
|
|
7702
|
-
const
|
|
7701
|
+
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: d, text: m, icon: f, ...p }, b) => {
|
|
7702
|
+
const h = {
|
|
7703
7703
|
...p,
|
|
7704
|
-
onClick: (
|
|
7705
|
-
c(!1), typeof d == "function" && d(
|
|
7704
|
+
onClick: (g) => {
|
|
7705
|
+
c(!1), typeof d == "function" && d(g);
|
|
7706
7706
|
},
|
|
7707
7707
|
onFocus: () => {
|
|
7708
7708
|
Dt && (clearTimeout(Dt), Dt = !1);
|
|
@@ -7713,16 +7713,16 @@ const mc = ({
|
|
|
7713
7713
|
}, 100);
|
|
7714
7714
|
}
|
|
7715
7715
|
};
|
|
7716
|
-
return l && (
|
|
7716
|
+
return l && (h.href = l), /* @__PURE__ */ a.jsx("li", { className: "more-menu-list-item", children: /* @__PURE__ */ a.jsx(
|
|
7717
7717
|
ie,
|
|
7718
7718
|
{
|
|
7719
7719
|
variant: "tertiary",
|
|
7720
7720
|
size: "medium",
|
|
7721
7721
|
icon: f ? { icon: f, position: "left" } : !1,
|
|
7722
|
-
...
|
|
7722
|
+
...h,
|
|
7723
7723
|
children: m
|
|
7724
7724
|
}
|
|
7725
|
-
) }, `${window.btoa(m)}_${
|
|
7725
|
+
) }, `${window.btoa(m)}_${b}`);
|
|
7726
7726
|
}) })
|
|
7727
7727
|
] })
|
|
7728
7728
|
});
|
|
@@ -7843,8 +7843,8 @@ const bc = "shareLinks_", du = ({
|
|
|
7843
7843
|
/* @__PURE__ */ a.jsx("ul", { children: u.map(({ key: l, icon: d, url: m, shouldRender: f = !0, onClick: p }) => {
|
|
7844
7844
|
if (typeof f == "function" && !f())
|
|
7845
7845
|
return null;
|
|
7846
|
-
const
|
|
7847
|
-
return p && (
|
|
7846
|
+
const b = {};
|
|
7847
|
+
return p && (b.onClick = (h) => p(h, m)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7848
7848
|
ie,
|
|
7849
7849
|
{
|
|
7850
7850
|
size: s,
|
|
@@ -7858,7 +7858,7 @@ const bc = "shareLinks_", du = ({
|
|
|
7858
7858
|
"data-gtm-event-type": `${l}-click`,
|
|
7859
7859
|
"data-testid": "link",
|
|
7860
7860
|
screenreaderText: c.formatMessage({ id: `${bc}link_${l}` }),
|
|
7861
|
-
...
|
|
7861
|
+
...b
|
|
7862
7862
|
}
|
|
7863
7863
|
) }, l);
|
|
7864
7864
|
}) })
|
|
@@ -7890,9 +7890,9 @@ const fu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7890
7890
|
}
|
|
7891
7891
|
}, [i]);
|
|
7892
7892
|
const c = [], u = [];
|
|
7893
|
-
return t.forEach(({ id: d, text: m, content: f, href: p, hasCarousel:
|
|
7894
|
-
d = r(d, m,
|
|
7895
|
-
const
|
|
7893
|
+
return t.forEach(({ id: d, text: m, content: f, href: p, hasCarousel: b }, h) => {
|
|
7894
|
+
d = r(d, m, h);
|
|
7895
|
+
const g = i === d, y = {};
|
|
7896
7896
|
p || (y["aria-controls"] = d, y.onClick = (_) => {
|
|
7897
7897
|
_.preventDefault(), _.stopPropagation(), o(d), !n && (window.location.hash = `#${d}`);
|
|
7898
7898
|
}, u.push(
|
|
@@ -7900,10 +7900,10 @@ const fu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7900
7900
|
"section",
|
|
7901
7901
|
{
|
|
7902
7902
|
id: d,
|
|
7903
|
-
hidden: !
|
|
7903
|
+
hidden: !g,
|
|
7904
7904
|
role: "tabpanel",
|
|
7905
7905
|
"aria-labelledby": `tab-${d}`,
|
|
7906
|
-
"aria-live":
|
|
7906
|
+
"aria-live": g ? "assertive" : "off",
|
|
7907
7907
|
children: typeof f == "string" ? /* @__PURE__ */ a.jsx("p", { children: f }) : f
|
|
7908
7908
|
},
|
|
7909
7909
|
`section-${d}`
|
|
@@ -7914,9 +7914,9 @@ const fu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7914
7914
|
{
|
|
7915
7915
|
href: p || `#${d}`,
|
|
7916
7916
|
id: `tab-${d}`,
|
|
7917
|
-
className: E({ selected:
|
|
7917
|
+
className: E({ selected: g }),
|
|
7918
7918
|
role: "tab",
|
|
7919
|
-
"aria-selected":
|
|
7919
|
+
"aria-selected": g,
|
|
7920
7920
|
...y,
|
|
7921
7921
|
children: m
|
|
7922
7922
|
}
|
|
@@ -8254,9 +8254,28 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8254
8254
|
return;
|
|
8255
8255
|
fe.handlerCalled[t] = i;
|
|
8256
8256
|
let o = [{ type: `menus.${t}`, value: e }];
|
|
8257
|
-
e === !0
|
|
8258
|
-
|
|
8259
|
-
|
|
8257
|
+
if (e === !0)
|
|
8258
|
+
Object.keys(n).forEach((c) => {
|
|
8259
|
+
c === t || n[c] === !1 || o.push({ type: `menus.${c}`, value: !1 });
|
|
8260
|
+
});
|
|
8261
|
+
else {
|
|
8262
|
+
let c = null;
|
|
8263
|
+
switch (t) {
|
|
8264
|
+
case "navigation":
|
|
8265
|
+
c = document.querySelector("#header .menu-button"), c || (c = document.querySelector("#navigation > li.parent"));
|
|
8266
|
+
break;
|
|
8267
|
+
case "search":
|
|
8268
|
+
c = document.querySelector("#header .toggle-search-button");
|
|
8269
|
+
break;
|
|
8270
|
+
case "account":
|
|
8271
|
+
c = document.querySelector("#header .account-button");
|
|
8272
|
+
break;
|
|
8273
|
+
default:
|
|
8274
|
+
return;
|
|
8275
|
+
}
|
|
8276
|
+
c && c.focus();
|
|
8277
|
+
}
|
|
8278
|
+
r(o);
|
|
8260
8279
|
},
|
|
8261
8280
|
// Find the first child inside a ref that matches the `key` (and optional `value`) we're looking for,
|
|
8262
8281
|
// so we can automatically focus on the first link inside a menu for accessibility.
|
|
@@ -8280,26 +8299,26 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8280
8299
|
return t[0].children ? fe.findFirstChild(t[0].children, e, n) : !1;
|
|
8281
8300
|
},
|
|
8282
8301
|
autoFocus: ({ menu: t, navigationRef: e, isDesktopVersion: n, focusElements: r, dispatch: s }) => {
|
|
8302
|
+
var u;
|
|
8283
8303
|
if (!e.current || !e.current.children)
|
|
8284
8304
|
return;
|
|
8285
8305
|
const i = n ? "desktop" : "default";
|
|
8286
8306
|
if (r[t][i]) {
|
|
8287
|
-
r[t][i].focus();
|
|
8307
|
+
(u = document.querySelector(`#header ul a[href="${r[t][i]}"]:last-child`)) == null || u.focus();
|
|
8288
8308
|
return;
|
|
8289
8309
|
}
|
|
8290
8310
|
let o, c;
|
|
8291
8311
|
switch (t) {
|
|
8292
8312
|
case "navigation":
|
|
8293
8313
|
if (n) {
|
|
8294
|
-
const
|
|
8314
|
+
const l = fe.findFirstChild(
|
|
8295
8315
|
e.current.children,
|
|
8296
8316
|
"attributes.aria-controls",
|
|
8297
8317
|
"navigation"
|
|
8298
8318
|
);
|
|
8299
|
-
o = fe.findFirstChild(
|
|
8319
|
+
o = fe.findFirstChild(l.children, "href");
|
|
8300
8320
|
} else
|
|
8301
8321
|
o = fe.findFirstChild(e.current.children, "href");
|
|
8302
|
-
o || (o = e.current);
|
|
8303
8322
|
break;
|
|
8304
8323
|
case "account":
|
|
8305
8324
|
if (c = fe.findFirstChild(
|
|
@@ -8313,7 +8332,9 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8313
8332
|
default:
|
|
8314
8333
|
return;
|
|
8315
8334
|
}
|
|
8316
|
-
o && (s([
|
|
8335
|
+
o && (s([
|
|
8336
|
+
{ type: `focusElements.${t}.${i}`, value: o.attributes.href.value }
|
|
8337
|
+
]), o.focus());
|
|
8317
8338
|
},
|
|
8318
8339
|
events: {
|
|
8319
8340
|
onClick: (t, { id: e, callback: n, isOpen: r }) => {
|
|
@@ -8434,8 +8455,7 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8434
8455
|
_ = `${w === "topics" ? `${w}-` : ""}${S[S.length - 1]}`;
|
|
8435
8456
|
}
|
|
8436
8457
|
f = {
|
|
8437
|
-
href: c.href
|
|
8438
|
-
role: "menuitem"
|
|
8458
|
+
href: c.href
|
|
8439
8459
|
}, l && (f = {
|
|
8440
8460
|
...f,
|
|
8441
8461
|
className: "gtm-trackable",
|
|
@@ -8448,9 +8468,9 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8448
8468
|
...c.props || {}
|
|
8449
8469
|
});
|
|
8450
8470
|
}
|
|
8451
|
-
const p = c.order && c.order[0] && c[c.order[0]],
|
|
8452
|
-
let
|
|
8453
|
-
if (
|
|
8471
|
+
const p = c.order && c.order[0] && c[c.order[0]], b = p && c[c.order[0]].order, h = f && window.location.pathname === c.href;
|
|
8472
|
+
let g = {}, y = {};
|
|
8473
|
+
if (h && (g = { ...g, "aria-current": "page" }), p) {
|
|
8454
8474
|
const _ = c.menuId || t, S = {
|
|
8455
8475
|
onClick: (w) => fe.events.onClick(w, { id: _, callback: s, isOpen: r[_] }),
|
|
8456
8476
|
onFocus: () => fe.events.onFocus({ id: _ }),
|
|
@@ -8458,7 +8478,7 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8458
8478
|
onMouseLeave: () => fe.events.onBlur({ id: _, callback: s }),
|
|
8459
8479
|
onMouseEnter: () => fe.events.onMouseEnter({ id: _, callback: s })
|
|
8460
8480
|
};
|
|
8461
|
-
n && (
|
|
8481
|
+
n && (b && (g = {
|
|
8462
8482
|
...S,
|
|
8463
8483
|
onKeyPress: (w) => {
|
|
8464
8484
|
w.key === "Enter" && fe.events.onClick(w, { id: _, callback: s, isOpen: r[_] });
|
|
@@ -8468,7 +8488,7 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8468
8488
|
"aria-haspopup": !0,
|
|
8469
8489
|
"aria-expanded": r[_],
|
|
8470
8490
|
"aria-controls": _
|
|
8471
|
-
}), y = { hidden: _ in r ? !r[_] : !0 }),
|
|
8491
|
+
}), y = { hidden: _ in r ? !r[_] : !0 }), b || (y = {
|
|
8472
8492
|
...y,
|
|
8473
8493
|
...S
|
|
8474
8494
|
});
|
|
@@ -8479,10 +8499,10 @@ const Xe = "footer_", Jt = "SiteFooter", Jr = ({ group: t }) => {
|
|
|
8479
8499
|
className: E({
|
|
8480
8500
|
[c.className]: c.className,
|
|
8481
8501
|
"has-submenu": p,
|
|
8482
|
-
parent:
|
|
8483
|
-
active:
|
|
8502
|
+
parent: b,
|
|
8503
|
+
active: h
|
|
8484
8504
|
}),
|
|
8485
|
-
...
|
|
8505
|
+
...g,
|
|
8486
8506
|
children: [
|
|
8487
8507
|
f ? Y.createElement(
|
|
8488
8508
|
d ? ie : "a",
|
|
@@ -8543,35 +8563,39 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8543
8563
|
navigation: { desktop: !1, default: !1 },
|
|
8544
8564
|
account: { desktop: !1, default: !1 }
|
|
8545
8565
|
}
|
|
8546
|
-
}), { headerIsVisible: u, menus: l, focusElements: d } = o;
|
|
8547
|
-
|
|
8566
|
+
}), { headerIsVisible: u, menus: l, focusElements: d } = o, m = pe(o);
|
|
8567
|
+
re(() => {
|
|
8568
|
+
m.current = o;
|
|
8569
|
+
}, [o]), zs({
|
|
8548
8570
|
scrollPosition: wc[`height${i.navigation ? "_desktop" : ""}`],
|
|
8549
8571
|
callbacks: {
|
|
8550
8572
|
scrollUp: () => {
|
|
8551
|
-
|
|
8573
|
+
const h = m.current.menus;
|
|
8574
|
+
!i && h.navigation || fe.shouldChangeHeaderIsVisible(!0, h, c);
|
|
8552
8575
|
},
|
|
8553
8576
|
scrollDown: () => {
|
|
8554
|
-
|
|
8577
|
+
const h = m.current.menus;
|
|
8578
|
+
!i && h.navigation || fe.shouldChangeHeaderIsVisible(!1, h, c);
|
|
8555
8579
|
}
|
|
8556
8580
|
}
|
|
8557
8581
|
});
|
|
8558
|
-
const
|
|
8559
|
-
fe.handleMenus({ id: h, value: g, menus:
|
|
8560
|
-
},
|
|
8582
|
+
const f = (h, g, y = !1) => {
|
|
8583
|
+
fe.handleMenus({ id: h, value: g, menus: m.current.menus, dispatch: c, forceHandle: y });
|
|
8584
|
+
}, p = pe(null), b = (h) => {
|
|
8561
8585
|
h.key === "Escape" && ["navigation", "search", "account"].forEach((g) => {
|
|
8562
|
-
m(g, !1, !0);
|
|
8586
|
+
m.current.menus[g] && f(g, !1, !0);
|
|
8563
8587
|
});
|
|
8564
8588
|
};
|
|
8565
8589
|
return re(() => {
|
|
8566
8590
|
var h;
|
|
8567
|
-
return (h = document.getElementById("header")) == null || h.addEventListener("keydown",
|
|
8591
|
+
return (h = document.getElementById("header")) == null || h.addEventListener("keydown", b), () => {
|
|
8568
8592
|
var g;
|
|
8569
|
-
(g = document.getElementById("header")) == null || g.removeEventListener("keydown",
|
|
8593
|
+
(g = document.getElementById("header")) == null || g.removeEventListener("keydown", b);
|
|
8570
8594
|
};
|
|
8571
8595
|
}, []), _t(() => {
|
|
8572
8596
|
l.navigation && fe.autoFocus({
|
|
8573
8597
|
menu: "navigation",
|
|
8574
|
-
navigationRef:
|
|
8598
|
+
navigationRef: p,
|
|
8575
8599
|
isDesktopVersion: i.navigation,
|
|
8576
8600
|
focusElements: d,
|
|
8577
8601
|
dispatch: c
|
|
@@ -8579,7 +8603,7 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8579
8603
|
}, [l.navigation]), _t(() => {
|
|
8580
8604
|
l.account && fe.autoFocus({
|
|
8581
8605
|
menu: "account",
|
|
8582
|
-
navigationRef:
|
|
8606
|
+
navigationRef: p,
|
|
8583
8607
|
isDesktopVersion: i.navigation,
|
|
8584
8608
|
focusElements: d,
|
|
8585
8609
|
dispatch: c
|
|
@@ -8610,7 +8634,7 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8610
8634
|
{
|
|
8611
8635
|
className: "menu-button gtm-trackable",
|
|
8612
8636
|
onClick: (h) => {
|
|
8613
|
-
h.preventDefault(), h.stopPropagation(),
|
|
8637
|
+
h.preventDefault(), h.stopPropagation(), f("navigation", !l.navigation);
|
|
8614
8638
|
},
|
|
8615
8639
|
"data-gtm-event-type": "open-tab-menu-click",
|
|
8616
8640
|
"data-gtm-event-context": "HeaderLeft-Chevron",
|
|
@@ -8625,7 +8649,7 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8625
8649
|
/* @__PURE__ */ a.jsx(
|
|
8626
8650
|
"ul",
|
|
8627
8651
|
{
|
|
8628
|
-
ref:
|
|
8652
|
+
ref: p,
|
|
8629
8653
|
id: "navigation",
|
|
8630
8654
|
hidden: i.navigation || l.account ? !1 : !l.navigation,
|
|
8631
8655
|
"data-showing": !i.navigation && l.account ? "account" : "default",
|
|
@@ -8636,7 +8660,7 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8636
8660
|
isLoggedIn: s,
|
|
8637
8661
|
isDesktopVersion: i.navigation,
|
|
8638
8662
|
menus: { navigation: l.navigation, account: l.account },
|
|
8639
|
-
callback:
|
|
8663
|
+
callback: f
|
|
8640
8664
|
},
|
|
8641
8665
|
h
|
|
8642
8666
|
))
|
|
@@ -8647,7 +8671,7 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8647
8671
|
{
|
|
8648
8672
|
className: "search toggle-search-button",
|
|
8649
8673
|
onClick: (h) => {
|
|
8650
|
-
h.preventDefault(), h.stopPropagation(),
|
|
8674
|
+
h.preventDefault(), h.stopPropagation(), f("search", !l.search);
|
|
8651
8675
|
},
|
|
8652
8676
|
"aria-haspopup": "true",
|
|
8653
8677
|
"aria-expanded": l.search,
|
|
@@ -8680,11 +8704,11 @@ const wc = { height: 67, height_desktop: 83 }, Ka = ({ showNavigation: t = !0 })
|
|
|
8680
8704
|
className: "account-button",
|
|
8681
8705
|
onClick: (h) => fe.events.onClick(h, {
|
|
8682
8706
|
id: "account",
|
|
8683
|
-
callback:
|
|
8707
|
+
callback: f,
|
|
8684
8708
|
isOpen: l.account
|
|
8685
8709
|
}),
|
|
8686
|
-
onMouseEnter: () => fe.events.onMouseEnter({ id: "account", callback:
|
|
8687
|
-
onMouseLeave: () => fe.events.onBlur({ id: "account", callback:
|
|
8710
|
+
onMouseEnter: () => fe.events.onMouseEnter({ id: "account", callback: f }),
|
|
8711
|
+
onMouseLeave: () => fe.events.onBlur({ id: "account", callback: f }),
|
|
8688
8712
|
"aria-haspopup": "true",
|
|
8689
8713
|
"aria-expanded": l.account,
|
|
8690
8714
|
"aria-controls": "navigation",
|
|
@@ -8744,11 +8768,11 @@ const jc = () => {
|
|
|
8744
8768
|
variant: m = "default",
|
|
8745
8769
|
circle: f = "default",
|
|
8746
8770
|
modal: p = "default"
|
|
8747
|
-
} = i,
|
|
8771
|
+
} = i, b = Ws();
|
|
8748
8772
|
re(() => {
|
|
8749
8773
|
window.scrollTo(0, 0);
|
|
8750
|
-
}, [
|
|
8751
|
-
const
|
|
8774
|
+
}, [b]);
|
|
8775
|
+
const h = qt(t, { locale: c }), g = qt(e, {
|
|
8752
8776
|
locale: c
|
|
8753
8777
|
}), y = qt(n, {
|
|
8754
8778
|
locale: c
|
|
@@ -8761,18 +8785,18 @@ const jc = () => {
|
|
|
8761
8785
|
children: [
|
|
8762
8786
|
/* @__PURE__ */ a.jsx(Ka, { showNavigation: u }),
|
|
8763
8787
|
/* @__PURE__ */ a.jsxs("main", { id: "content-wrapper", children: [
|
|
8764
|
-
|
|
8788
|
+
g && /* @__PURE__ */ a.jsx(
|
|
8765
8789
|
"div",
|
|
8766
8790
|
{
|
|
8767
8791
|
className: E("additional-content prepended", {
|
|
8768
8792
|
"large-modal": p === "large"
|
|
8769
8793
|
}),
|
|
8770
|
-
children:
|
|
8794
|
+
children: g
|
|
8771
8795
|
}
|
|
8772
8796
|
),
|
|
8773
8797
|
Y.createElement(d === "bold" ? Ua : "div", {
|
|
8774
8798
|
id: "content",
|
|
8775
|
-
children:
|
|
8799
|
+
children: h,
|
|
8776
8800
|
className: E({ "large-modal": p === "large" })
|
|
8777
8801
|
})
|
|
8778
8802
|
] }),
|
|
@@ -9001,9 +9025,9 @@ const bu = ({
|
|
|
9001
9025
|
/* @__PURE__ */ a.jsx("p", { children: n }),
|
|
9002
9026
|
/* @__PURE__ */ a.jsx("ol", { children: t && t.length > 0 && t.map(
|
|
9003
9027
|
({
|
|
9004
|
-
completed:
|
|
9005
|
-
completionTime:
|
|
9006
|
-
contentType:
|
|
9028
|
+
completed: b,
|
|
9029
|
+
completionTime: h,
|
|
9030
|
+
contentType: g,
|
|
9007
9031
|
icon: y,
|
|
9008
9032
|
image: _,
|
|
9009
9033
|
isIntroduction: S,
|
|
@@ -9018,10 +9042,10 @@ const bu = ({
|
|
|
9018
9042
|
"li",
|
|
9019
9043
|
{
|
|
9020
9044
|
className: E({
|
|
9021
|
-
article:
|
|
9022
|
-
discussion:
|
|
9023
|
-
quiz:
|
|
9024
|
-
completed:
|
|
9045
|
+
article: g === Ct.ARTICLE,
|
|
9046
|
+
discussion: g === Ct.DISCUSSION,
|
|
9047
|
+
quiz: g === Ct.QUIZ,
|
|
9048
|
+
completed: b && g === Ct.ARTICLE,
|
|
9025
9049
|
locked: !B
|
|
9026
9050
|
}),
|
|
9027
9051
|
...$,
|
|
@@ -9047,7 +9071,7 @@ const bu = ({
|
|
|
9047
9071
|
/* @__PURE__ */ a.jsx(
|
|
9048
9072
|
Sc,
|
|
9049
9073
|
{
|
|
9050
|
-
completionTime:
|
|
9074
|
+
completionTime: h,
|
|
9051
9075
|
icon: y,
|
|
9052
9076
|
optional: w,
|
|
9053
9077
|
type: X,
|
|
@@ -9128,7 +9152,7 @@ const we = "discussion_form_", ir = ({
|
|
|
9128
9152
|
var $, C, j;
|
|
9129
9153
|
const d = H(), m = Ee(Ae), [f, p] = Q(
|
|
9130
9154
|
n.isEditing && n.isEditing.text || ""
|
|
9131
|
-
), [
|
|
9155
|
+
), [b, h] = Q(c.error || !1), [g, y] = Q(!1), _ = pe(null);
|
|
9132
9156
|
if (r || (r = _), n.isLoading)
|
|
9133
9157
|
return /* @__PURE__ */ a.jsx(
|
|
9134
9158
|
Se,
|
|
@@ -9151,7 +9175,7 @@ const we = "discussion_form_", ir = ({
|
|
|
9151
9175
|
`${we}error_noPermission`,
|
|
9152
9176
|
t.type,
|
|
9153
9177
|
"action"
|
|
9154
|
-
), A ?
|
|
9178
|
+
), A ? h(A) : b && h(!1);
|
|
9155
9179
|
};
|
|
9156
9180
|
let w = `${t.type}-form`;
|
|
9157
9181
|
if (t.type === "response" || t.type === "reply") {
|
|
@@ -9210,13 +9234,13 @@ const we = "discussion_form_", ir = ({
|
|
|
9210
9234
|
`${we}error_tooMany`,
|
|
9211
9235
|
t.type,
|
|
9212
9236
|
"action"
|
|
9213
|
-
) : Z != null && Z.message.includes("400") && (z = `${we}error`),
|
|
9237
|
+
) : Z != null && Z.message.includes("400") && (z = `${we}error`), h(z), F();
|
|
9214
9238
|
}
|
|
9215
9239
|
}, F = () => {
|
|
9216
9240
|
It = setTimeout(() => {
|
|
9217
|
-
|
|
9241
|
+
h(!1), y(!1);
|
|
9218
9242
|
}, 5e3);
|
|
9219
|
-
}, R = !f || !si(f), X =
|
|
9243
|
+
}, R = !f || !si(f), X = g === "submitting", B = [];
|
|
9220
9244
|
return (n.isEditing && !X || c.cancel) && B.push({
|
|
9221
9245
|
variant: "secondary",
|
|
9222
9246
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -9278,9 +9302,9 @@ const we = "discussion_form_", ir = ({
|
|
|
9278
9302
|
"action"
|
|
9279
9303
|
),
|
|
9280
9304
|
onChange: S,
|
|
9281
|
-
value:
|
|
9305
|
+
value: g === "submitting" && !b ? "" : f,
|
|
9282
9306
|
maxLength: i,
|
|
9283
|
-
"aria-invalid": !!
|
|
9307
|
+
"aria-invalid": !!b,
|
|
9284
9308
|
"aria-errormessage": "error-message",
|
|
9285
9309
|
minRows: o,
|
|
9286
9310
|
autoFocus: !!n.isEditing
|
|
@@ -9301,16 +9325,16 @@ const we = "discussion_form_", ir = ({
|
|
|
9301
9325
|
)
|
|
9302
9326
|
}) }),
|
|
9303
9327
|
/* @__PURE__ */ a.jsx(Tt, { buttons: B }),
|
|
9304
|
-
|
|
9305
|
-
|
|
9306
|
-
{ id:
|
|
9328
|
+
g === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Zt, { className: "success", "data-testid": "success", children: Ne(d.formatMessage, `${we}success`, t.type, "action") }),
|
|
9329
|
+
b && /* @__PURE__ */ a.jsx(Zt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof b == "string" ? b.includes(" ") ? b : d.formatMessage(
|
|
9330
|
+
{ id: b },
|
|
9307
9331
|
{
|
|
9308
9332
|
action: d.formatMessage({
|
|
9309
9333
|
id: `discussion_action_${t.type}`
|
|
9310
9334
|
}),
|
|
9311
9335
|
maxLength: i
|
|
9312
9336
|
}
|
|
9313
|
-
) :
|
|
9337
|
+
) : b })
|
|
9314
9338
|
]
|
|
9315
9339
|
}
|
|
9316
9340
|
);
|
|
@@ -9379,20 +9403,20 @@ const In = () => {
|
|
|
9379
9403
|
re(() => {
|
|
9380
9404
|
p(s);
|
|
9381
9405
|
}, [s]);
|
|
9382
|
-
const [d, m] = Q(e), [f, p] = Q(s), [
|
|
9406
|
+
const [d, m] = Q(e), [f, p] = Q(s), [b, h] = Q(!1), [g, y] = Q(!1), _ = wt(
|
|
9383
9407
|
() => Pc(n, Ln),
|
|
9384
9408
|
[n]
|
|
9385
9409
|
), S = (x) => {
|
|
9386
9410
|
if (x.preventDefault(), x.stopPropagation(), y(!1), bt)
|
|
9387
9411
|
return In(), !1;
|
|
9388
|
-
if (In(),
|
|
9412
|
+
if (In(), b || !o)
|
|
9389
9413
|
return !1;
|
|
9390
9414
|
bt = setTimeout(w, 350);
|
|
9391
9415
|
}, w = async () => {
|
|
9392
|
-
if (In(),
|
|
9416
|
+
if (In(), b || !o)
|
|
9393
9417
|
return !1;
|
|
9394
9418
|
let x = f ? d - 1 : d + 1;
|
|
9395
|
-
x < 0 && (x = 0),
|
|
9419
|
+
x < 0 && (x = 0), h(!0), m(x), p(!f);
|
|
9396
9420
|
try {
|
|
9397
9421
|
if (i && i.slugs) {
|
|
9398
9422
|
const F = $c(i.slugs);
|
|
@@ -9404,7 +9428,7 @@ const In = () => {
|
|
|
9404
9428
|
} catch {
|
|
9405
9429
|
m(e), p(s);
|
|
9406
9430
|
} finally {
|
|
9407
|
-
|
|
9431
|
+
h(!1);
|
|
9408
9432
|
}
|
|
9409
9433
|
};
|
|
9410
9434
|
return /* @__PURE__ */ a.jsxs(
|
|
@@ -9428,7 +9452,7 @@ const In = () => {
|
|
|
9428
9452
|
Gn,
|
|
9429
9453
|
{
|
|
9430
9454
|
className: E("discussion-button text-medium action-button", {
|
|
9431
|
-
"show-spinner":
|
|
9455
|
+
"show-spinner": b,
|
|
9432
9456
|
"is-liked": f,
|
|
9433
9457
|
disabled: !o
|
|
9434
9458
|
}),
|
|
@@ -9458,7 +9482,7 @@ const In = () => {
|
|
|
9458
9482
|
) })
|
|
9459
9483
|
}
|
|
9460
9484
|
),
|
|
9461
|
-
n && /* @__PURE__ */ a.jsx(ec, { isOpen:
|
|
9485
|
+
n && /* @__PURE__ */ a.jsx(ec, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
9462
9486
|
_.map((x) => typeof x == "string" || !x.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
9463
9487
|
at,
|
|
9464
9488
|
{
|
|
@@ -9509,9 +9533,9 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9509
9533
|
},
|
|
9510
9534
|
links: f = {},
|
|
9511
9535
|
className: p,
|
|
9512
|
-
gtmContext:
|
|
9513
|
-
children:
|
|
9514
|
-
isTruncated:
|
|
9536
|
+
gtmContext: b = "DiscussionAnswer",
|
|
9537
|
+
children: h,
|
|
9538
|
+
isTruncated: g = !1
|
|
9515
9539
|
}) => {
|
|
9516
9540
|
const y = H(), _ = Ee(Ae), S = Ee(or), { author: w, canLike: x, createdAt: F, id: R, likes: X = 0, userLiked: B, comments: $ = 0 } = e, C = _ && _.id && typeof w != "string" && w.id && w.id === _.id || !1, j = typeof x == "boolean" ? x : n ? !C : !1, k = C && (!e.createdAt || Qs(e.createdAt, 10, "seconds")), N = pe(null), [A, W] = Q({
|
|
9517
9541
|
body: e && e.body || "",
|
|
@@ -9546,7 +9570,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9546
9570
|
};
|
|
9547
9571
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
9548
9572
|
return /* @__PURE__ */ a.jsx(Se, { className: "discussion-card discussion-post" });
|
|
9549
|
-
const te =
|
|
9573
|
+
const te = g ? et(A.body, Rc) : A.body, G = async (O) => {
|
|
9550
9574
|
O || (O = ""), I("");
|
|
9551
9575
|
try {
|
|
9552
9576
|
if (!As(O, A.body)) {
|
|
@@ -9597,7 +9621,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9597
9621
|
onClick: () => W({ ...A, isEditing: !0 }),
|
|
9598
9622
|
icon: "pencil-paper",
|
|
9599
9623
|
className: "gtm-trackable",
|
|
9600
|
-
"data-gtm-event-context":
|
|
9624
|
+
"data-gtm-event-context": b,
|
|
9601
9625
|
"data-gtm-event-type": `edit-${e.type}-click`
|
|
9602
9626
|
},
|
|
9603
9627
|
{
|
|
@@ -9607,7 +9631,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9607
9631
|
},
|
|
9608
9632
|
icon: "trash",
|
|
9609
9633
|
className: "gtm-trackable",
|
|
9610
|
-
"data-gtm-event-context":
|
|
9634
|
+
"data-gtm-event-context": b,
|
|
9611
9635
|
"data-gtm-event-type": `delete-${e.type}-click`,
|
|
9612
9636
|
...Jo(`delete-${e.slug}-modal`, Z)
|
|
9613
9637
|
}
|
|
@@ -9618,7 +9642,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9618
9642
|
}),
|
|
9619
9643
|
ref: N,
|
|
9620
9644
|
"data-testid": `discussion-${e.type}-thread`,
|
|
9621
|
-
"data-gtm-event-context": `${
|
|
9645
|
+
"data-gtm-event-context": `${b}-post-click`,
|
|
9622
9646
|
onClick: (O) => {
|
|
9623
9647
|
!f.post || A.isEditing || (O.preventDefault(), O.stopPropagation(), window.location.href = f.post);
|
|
9624
9648
|
},
|
|
@@ -9638,7 +9662,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9638
9662
|
member: w,
|
|
9639
9663
|
additionalContent: { createdAt: F, didEdit: A.didEdit },
|
|
9640
9664
|
className: typeof w != "string" && w.id === s ? "highlighted" : "",
|
|
9641
|
-
gtmContext:
|
|
9665
|
+
gtmContext: b,
|
|
9642
9666
|
gtmType: "profile-click"
|
|
9643
9667
|
}
|
|
9644
9668
|
),
|
|
@@ -9670,7 +9694,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9670
9694
|
I(""), W({ ...A, isEditing: !1 });
|
|
9671
9695
|
}
|
|
9672
9696
|
},
|
|
9673
|
-
gtmContext: `${
|
|
9697
|
+
gtmContext: `${b}Form`
|
|
9674
9698
|
}
|
|
9675
9699
|
) : f.post ? /* @__PURE__ */ a.jsxs("a", { href: f.post, children: [
|
|
9676
9700
|
(e == null ? void 0 : e.title) && /* @__PURE__ */ a.jsx("p", { className: "content-title", children: e.title }),
|
|
@@ -9722,7 +9746,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9722
9746
|
O.preventDefault(), O.stopPropagation(), f.comments && (window.location.href = f.comments), typeof m == "function" && m();
|
|
9723
9747
|
},
|
|
9724
9748
|
icon: { icon: "speech-bubble_square_thick" },
|
|
9725
|
-
"data-gtm-event-context":
|
|
9749
|
+
"data-gtm-event-context": b,
|
|
9726
9750
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9727
9751
|
screenreaderText: y.formatMessage(
|
|
9728
9752
|
{ id: `${Me}comments_screenReader` },
|
|
@@ -9749,7 +9773,7 @@ const Me = "discussion_", Rc = 280, un = ({
|
|
|
9749
9773
|
]
|
|
9750
9774
|
}
|
|
9751
9775
|
),
|
|
9752
|
-
|
|
9776
|
+
h,
|
|
9753
9777
|
/* @__PURE__ */ a.jsx(
|
|
9754
9778
|
on,
|
|
9755
9779
|
{
|
|
@@ -10242,15 +10266,15 @@ function Yc({
|
|
|
10242
10266
|
},
|
|
10243
10267
|
user: u,
|
|
10244
10268
|
...l
|
|
10245
|
-
}, m = Hc({ ...d, mutationFn: t }), f = Vc({ ...d, mutationFn: e }), p = Kc({ ...d, mutationFn: n }),
|
|
10269
|
+
}, m = Hc({ ...d, mutationFn: t }), f = Vc({ ...d, mutationFn: e }), p = Kc({ ...d, mutationFn: n }), b = Qc({ ...d, mutationFn: s }), h = Jc({ ...d, mutationFn: i }), { activities: g, ...y } = Gc({ queryKey: o, queryFn: r });
|
|
10246
10270
|
return {
|
|
10247
|
-
activities:
|
|
10271
|
+
activities: g,
|
|
10248
10272
|
mutations: {
|
|
10249
10273
|
create: m,
|
|
10250
10274
|
edit: f,
|
|
10251
|
-
remove:
|
|
10275
|
+
remove: b,
|
|
10252
10276
|
like: p,
|
|
10253
|
-
unlike:
|
|
10277
|
+
unlike: h
|
|
10254
10278
|
},
|
|
10255
10279
|
user: u,
|
|
10256
10280
|
...y
|
|
@@ -10375,7 +10399,7 @@ const _u = ({
|
|
|
10375
10399
|
fetchNextPage: l,
|
|
10376
10400
|
hasNextPage: d,
|
|
10377
10401
|
isLoading: m,
|
|
10378
|
-
mutations: { create: f, edit: p, remove:
|
|
10402
|
+
mutations: { create: f, edit: p, remove: b, like: h, unlike: g },
|
|
10379
10403
|
user: y
|
|
10380
10404
|
} = Yc({
|
|
10381
10405
|
queryKey: [t, e, "activities"],
|
|
@@ -10450,13 +10474,13 @@ const _u = ({
|
|
|
10450
10474
|
functions: {
|
|
10451
10475
|
content: {
|
|
10452
10476
|
createContent: () => null,
|
|
10453
|
-
deleteContent: () =>
|
|
10477
|
+
deleteContent: () => b({ activityId: w }),
|
|
10454
10478
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10455
10479
|
updateContent: (I, { body: q }) => p({ activityId: w, content: q })
|
|
10456
10480
|
},
|
|
10457
10481
|
likes: {
|
|
10458
|
-
createLike: () =>
|
|
10459
|
-
deleteLike: () =>
|
|
10482
|
+
createLike: () => h({ activityId: w }),
|
|
10483
|
+
deleteLike: () => g({ activityId: w, reactionId: $ })
|
|
10460
10484
|
},
|
|
10461
10485
|
comments: {
|
|
10462
10486
|
openComments: () => null
|
|
@@ -11095,15 +11119,15 @@ function rs({
|
|
|
11095
11119
|
},
|
|
11096
11120
|
user: u,
|
|
11097
11121
|
...l
|
|
11098
|
-
}, m = tl({ ...d, mutationFn: t }), f = nl({ ...d, mutationFn: e }), p = rl({ ...d, mutationFn: n }),
|
|
11122
|
+
}, m = tl({ ...d, mutationFn: t }), f = nl({ ...d, mutationFn: e }), p = rl({ ...d, mutationFn: n }), b = sl({ ...d, mutationFn: s }), h = il({ ...d, mutationFn: i }), { replies: g, ...y } = al({ queryKey: o, queryFn: r });
|
|
11099
11123
|
return {
|
|
11100
|
-
replies:
|
|
11124
|
+
replies: g,
|
|
11101
11125
|
mutations: {
|
|
11102
11126
|
create: m,
|
|
11103
11127
|
edit: f,
|
|
11104
|
-
remove:
|
|
11128
|
+
remove: b,
|
|
11105
11129
|
like: p,
|
|
11106
|
-
unlike:
|
|
11130
|
+
unlike: h
|
|
11107
11131
|
},
|
|
11108
11132
|
user: u,
|
|
11109
11133
|
...y
|
|
@@ -11240,14 +11264,14 @@ const fl = ({
|
|
|
11240
11264
|
fetchNextPage: c,
|
|
11241
11265
|
hasNextPage: u,
|
|
11242
11266
|
isLoading: l,
|
|
11243
|
-
mutations: { create: d, edit: m, like: f, remove: p, unlike:
|
|
11244
|
-
user:
|
|
11267
|
+
mutations: { create: d, edit: m, like: f, remove: p, unlike: b },
|
|
11268
|
+
user: h
|
|
11245
11269
|
} = rs({
|
|
11246
11270
|
queryKey: [t, e, n, r, "replies"],
|
|
11247
11271
|
queryFns: {
|
|
11248
11272
|
...i,
|
|
11249
11273
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11250
|
-
list: (
|
|
11274
|
+
list: (g) => i.list({ ...g, reactionId: r })
|
|
11251
11275
|
}
|
|
11252
11276
|
});
|
|
11253
11277
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -11265,29 +11289,29 @@ const fl = ({
|
|
|
11265
11289
|
},
|
|
11266
11290
|
functions: {
|
|
11267
11291
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11268
|
-
create: (
|
|
11292
|
+
create: (g, { body: y }) => d({ activityId: n, replyId: r, content: y })
|
|
11269
11293
|
},
|
|
11270
11294
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
11271
11295
|
},
|
|
11272
|
-
children: o && o.length > 0 ? o == null ? void 0 : o.map((
|
|
11296
|
+
children: o && o.length > 0 ? o == null ? void 0 : o.map((g) => {
|
|
11273
11297
|
var A, W, Z, z, K, T, P, I, q, U, te, G;
|
|
11274
11298
|
const {
|
|
11275
11299
|
id: y,
|
|
11276
11300
|
own_children: _,
|
|
11277
11301
|
latest_children: S,
|
|
11278
11302
|
children_counts: w
|
|
11279
|
-
} =
|
|
11303
|
+
} = g, F = (((A = _ == null ? void 0 : _.like) == null ? void 0 : A.length) || 0) > 0 ? (W = _ == null ? void 0 : _.like) == null ? void 0 : W.find((V) => {
|
|
11280
11304
|
var ee;
|
|
11281
|
-
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (
|
|
11305
|
+
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (h == null ? void 0 : h.id);
|
|
11282
11306
|
}) : !1, R = F ? F == null ? void 0 : F.id : "", X = !!F, $ = (((Z = S == null ? void 0 : S.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = S == null ? void 0 : S.like) == null ? void 0 : z.map((V) => {
|
|
11283
11307
|
var ee, ae, O;
|
|
11284
11308
|
return {
|
|
11285
11309
|
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11286
11310
|
name: (O = (ae = V == null ? void 0 : V.user) == null ? void 0 : ae.data) == null ? void 0 : O.name
|
|
11287
11311
|
};
|
|
11288
|
-
}) : !1, C =
|
|
11312
|
+
}) : !1, C = g == null ? void 0 : g.user, j = (C == null ? void 0 : C.id) === (h == null ? void 0 : h.id), k = ln(s, j), N = typeof g.data.content == "string" ? (K = g == null ? void 0 : g.data) == null ? void 0 : K.content : (
|
|
11289
11313
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11290
|
-
((P = (T =
|
|
11314
|
+
((P = (T = g == null ? void 0 : g.data) == null ? void 0 : T.content) == null ? void 0 : P.text) || ""
|
|
11291
11315
|
);
|
|
11292
11316
|
return /* @__PURE__ */ a.jsx(
|
|
11293
11317
|
un,
|
|
@@ -11297,13 +11321,13 @@ const fl = ({
|
|
|
11297
11321
|
type: "reply",
|
|
11298
11322
|
body: N,
|
|
11299
11323
|
canLike: k,
|
|
11300
|
-
createdAt:
|
|
11324
|
+
createdAt: g == null ? void 0 : g.created_at,
|
|
11301
11325
|
slugs: {
|
|
11302
11326
|
question: `${t}/${e}`,
|
|
11303
11327
|
answer: n,
|
|
11304
11328
|
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
11305
11329
|
// The `reply` is currently used to define the form ID which handles the focus
|
|
11306
|
-
reply:
|
|
11330
|
+
reply: g == null ? void 0 : g.parent
|
|
11307
11331
|
},
|
|
11308
11332
|
slug: "",
|
|
11309
11333
|
author: {
|
|
@@ -11329,7 +11353,7 @@ const fl = ({
|
|
|
11329
11353
|
},
|
|
11330
11354
|
likes: {
|
|
11331
11355
|
createLike: () => f({ replyId: y }),
|
|
11332
|
-
deleteLike: () =>
|
|
11356
|
+
deleteLike: () => b({ replyId: y, reactionId: R })
|
|
11333
11357
|
},
|
|
11334
11358
|
comments: {}
|
|
11335
11359
|
}
|
|
@@ -11353,7 +11377,7 @@ const ml = ({
|
|
|
11353
11377
|
fetchNextPage: d,
|
|
11354
11378
|
hasNextPage: m,
|
|
11355
11379
|
isLoading: f,
|
|
11356
|
-
mutations: { create: p, edit:
|
|
11380
|
+
mutations: { create: p, edit: b, like: h, remove: g, unlike: y },
|
|
11357
11381
|
user: _
|
|
11358
11382
|
} = rs({
|
|
11359
11383
|
queryKey: [t, e, n, "replies"],
|
|
@@ -11429,12 +11453,12 @@ const ml = ({
|
|
|
11429
11453
|
functions: {
|
|
11430
11454
|
content: {
|
|
11431
11455
|
createContent: () => null,
|
|
11432
|
-
deleteContent: () =>
|
|
11456
|
+
deleteContent: () => g({ replyId: w }),
|
|
11433
11457
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11434
|
-
updateContent: (O, { body: oe }) =>
|
|
11458
|
+
updateContent: (O, { body: oe }) => b({ replyId: w, content: oe })
|
|
11435
11459
|
},
|
|
11436
11460
|
likes: {
|
|
11437
|
-
createLike: () =>
|
|
11461
|
+
createLike: () => h({ replyId: w }),
|
|
11438
11462
|
deleteLike: () => y({ replyId: w, reactionId: $ })
|
|
11439
11463
|
},
|
|
11440
11464
|
comments: {}
|
|
@@ -11580,7 +11604,7 @@ const wu = ({
|
|
|
11580
11604
|
activity: m,
|
|
11581
11605
|
error: f,
|
|
11582
11606
|
isLoading: p,
|
|
11583
|
-
mutations: { edit:
|
|
11607
|
+
mutations: { edit: b, like: h, unlike: g }
|
|
11584
11608
|
} = gl({
|
|
11585
11609
|
queryFns: i,
|
|
11586
11610
|
queryKey: [t, e, n]
|
|
@@ -11640,11 +11664,11 @@ const wu = ({
|
|
|
11640
11664
|
createContent: () => null,
|
|
11641
11665
|
deleteContent: s,
|
|
11642
11666
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11643
|
-
updateContent: (K, { body: T }) =>
|
|
11667
|
+
updateContent: (K, { body: T }) => b({ content: T })
|
|
11644
11668
|
},
|
|
11645
11669
|
likes: {
|
|
11646
|
-
createLike: () =>
|
|
11647
|
-
deleteLike: () =>
|
|
11670
|
+
createLike: () => h({ activityId: n }),
|
|
11671
|
+
deleteLike: () => g({ activityId: n, reactionId: x })
|
|
11648
11672
|
},
|
|
11649
11673
|
comments: {
|
|
11650
11674
|
openComments: () => {
|