@apolitical/component-library 3.5.9 → 3.5.10-ac.7
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/helpers/intl.d.ts +3 -0
- package/index.js +12 -12
- package/index.mjs +402 -399
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -131,13 +131,13 @@ var wr;
|
|
|
131
131
|
function Is() {
|
|
132
132
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
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"), d = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, v = "@@iterator";
|
|
134
|
-
function
|
|
134
|
+
function _(h) {
|
|
135
135
|
if (h === null || typeof h != "object")
|
|
136
136
|
return null;
|
|
137
137
|
var M = g && h[g] || h[v];
|
|
138
138
|
return typeof M == "function" ? M : null;
|
|
139
139
|
}
|
|
140
|
-
var
|
|
140
|
+
var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
141
141
|
function x(h) {
|
|
142
142
|
{
|
|
143
143
|
for (var M = arguments.length, I = new Array(M > 1 ? M - 1 : 0), ne = 1; ne < M; ne++)
|
|
@@ -147,7 +147,7 @@ function Is() {
|
|
|
147
147
|
}
|
|
148
148
|
function E(h, M, I) {
|
|
149
149
|
{
|
|
150
|
-
var ne =
|
|
150
|
+
var ne = y.ReactDebugCurrentFrame, le = ne.getStackAddendum();
|
|
151
151
|
le !== "" && (M += "%s", I = I.concat([le]));
|
|
152
152
|
var me = I.map(function(ce) {
|
|
153
153
|
return String(ce);
|
|
@@ -155,10 +155,10 @@ function Is() {
|
|
|
155
155
|
me.unshift("Warning: " + M), Function.prototype.apply.call(console[h], console, me);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var w = !1,
|
|
158
|
+
var w = !1, b = !1, F = !1, R = !1, Q = !1, B;
|
|
159
159
|
B = Symbol.for("react.module.reference");
|
|
160
160
|
function $(h) {
|
|
161
|
-
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i || Q || h === s || h === l || h === u || R || h === p || w ||
|
|
161
|
+
return !!(typeof h == "string" || typeof h == "function" || h === r || h === i || Q || h === s || h === l || h === u || R || h === p || w || b || F || typeof h == "object" && h !== null && (h.$$typeof === m || h.$$typeof === f || h.$$typeof === o || h.$$typeof === c || h.$$typeof === d || // This needs to include all possible module reference object
|
|
162
162
|
// types supported by any Flight configuration anywhere since
|
|
163
163
|
// we don't know which Flight build this will end up being used
|
|
164
164
|
// with.
|
|
@@ -281,7 +281,7 @@ function Is() {
|
|
|
281
281
|
A < 0 && x("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
-
var G =
|
|
284
|
+
var G = y.ReactCurrentDispatcher, V;
|
|
285
285
|
function ee(h, M, I) {
|
|
286
286
|
{
|
|
287
287
|
if (V === void 0)
|
|
@@ -407,7 +407,7 @@ function Is() {
|
|
|
407
407
|
}
|
|
408
408
|
return "";
|
|
409
409
|
}
|
|
410
|
-
var Ue = Object.prototype.hasOwnProperty, cr = {}, lr =
|
|
410
|
+
var Ue = Object.prototype.hasOwnProperty, cr = {}, lr = y.ReactDebugCurrentFrame;
|
|
411
411
|
function Et(h) {
|
|
412
412
|
if (h) {
|
|
413
413
|
var M = h._owner, I = Ce(h.type, h._source, M ? M.type : null);
|
|
@@ -458,7 +458,7 @@ function Is() {
|
|
|
458
458
|
if (as(h))
|
|
459
459
|
return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rs(h)), ur(h);
|
|
460
460
|
}
|
|
461
|
-
var st =
|
|
461
|
+
var st = y.ReactCurrentOwner, ss = {
|
|
462
462
|
key: !0,
|
|
463
463
|
ref: !0,
|
|
464
464
|
__self: !0,
|
|
@@ -556,7 +556,7 @@ function Is() {
|
|
|
556
556
|
return ds(h, ie, xe, le, ne, st.current, ce);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
var dn =
|
|
559
|
+
var dn = y.ReactCurrentOwner, pr = y.ReactDebugCurrentFrame;
|
|
560
560
|
function Ke(h) {
|
|
561
561
|
if (h) {
|
|
562
562
|
var M = h._owner, I = Ce(h.type, h._source, M ? M.type : null);
|
|
@@ -630,7 +630,7 @@ Check the top-level render call using <` + I + ">.");
|
|
|
630
630
|
else if (mn(h))
|
|
631
631
|
h._store && (h._store.validated = !0);
|
|
632
632
|
else if (h) {
|
|
633
|
-
var le =
|
|
633
|
+
var le = _(h);
|
|
634
634
|
if (typeof le == "function" && le !== h.entries)
|
|
635
635
|
for (var me = le.call(h), ce; !(ce = me.next()).done; )
|
|
636
636
|
mn(ce.value) && vr(ce.value, M);
|
|
@@ -737,7 +737,7 @@ function Bs(t, e, n) {
|
|
|
737
737
|
if (typeof t != "function")
|
|
738
738
|
throw new TypeError("Expected a function");
|
|
739
739
|
e = +e || 0;
|
|
740
|
-
var g = !!(n = n || {}).leading, v = !("trailing" in n) || !!n.trailing,
|
|
740
|
+
var g = !!(n = n || {}).leading, v = !("trailing" in n) || !!n.trailing, _ = "maxWait" in n, y = "debounceOnServer" in n && !!n.debounceOnServer, x = _ ? Math.max(+n.maxWait || 0, e) : null;
|
|
741
741
|
ae(function() {
|
|
742
742
|
return f.current = !0, function() {
|
|
743
743
|
f.current = !1;
|
|
@@ -747,13 +747,13 @@ function Bs(t, e, n) {
|
|
|
747
747
|
var w = function($) {
|
|
748
748
|
var C = c.current, k = d.current;
|
|
749
749
|
return c.current = d.current = null, i.current = $, l.current = u.current.apply(k, C);
|
|
750
|
-
},
|
|
750
|
+
}, b = function($, C) {
|
|
751
751
|
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame($) : setTimeout($, C);
|
|
752
752
|
}, F = function($) {
|
|
753
753
|
if (!f.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 || _ && $ - i.current >= x;
|
|
757
757
|
}, R = function($) {
|
|
758
758
|
return o.current = null, v && c.current ? w($) : (c.current = d.current = null, l.current);
|
|
759
759
|
}, Q = function $() {
|
|
@@ -761,19 +761,19 @@ function Bs(t, e, n) {
|
|
|
761
761
|
if (F(C))
|
|
762
762
|
return R(C);
|
|
763
763
|
if (f.current) {
|
|
764
|
-
var k = e - (C - s.current), j =
|
|
765
|
-
|
|
764
|
+
var k = e - (C - s.current), j = _ ? Math.min(k, x - (C - i.current)) : k;
|
|
765
|
+
b($, j);
|
|
766
766
|
}
|
|
767
767
|
}, B = function() {
|
|
768
|
-
if (m ||
|
|
768
|
+
if (m || y) {
|
|
769
769
|
var $ = Date.now(), C = F($);
|
|
770
770
|
if (c.current = [].slice.call(arguments), d.current = r, s.current = $, C) {
|
|
771
771
|
if (!o.current && f.current)
|
|
772
|
-
return i.current = s.current,
|
|
773
|
-
if (
|
|
774
|
-
return
|
|
772
|
+
return i.current = s.current, b(Q, e), g ? w(s.current) : l.current;
|
|
773
|
+
if (_)
|
|
774
|
+
return b(Q, e), w(s.current);
|
|
775
775
|
}
|
|
776
|
-
return o.current ||
|
|
776
|
+
return o.current || b(Q, e), l.current;
|
|
777
777
|
}
|
|
778
778
|
};
|
|
779
779
|
return B.cancel = function() {
|
|
@@ -783,7 +783,7 @@ function Bs(t, e, n) {
|
|
|
783
783
|
}, B.flush = function() {
|
|
784
784
|
return o.current ? R(Date.now()) : l.current;
|
|
785
785
|
}, B;
|
|
786
|
-
}, [g,
|
|
786
|
+
}, [g, _, e, x, v, p, m, y]);
|
|
787
787
|
return E;
|
|
788
788
|
}
|
|
789
789
|
function fa(t, e, n) {
|
|
@@ -983,10 +983,13 @@ const ze = {
|
|
|
983
983
|
card_member_type_member: "Member",
|
|
984
984
|
card_member_count: "{count} members",
|
|
985
985
|
card_cta_people: "View profile",
|
|
986
|
+
card_cta_communityPage: "Join now",
|
|
986
987
|
card_cta_event: "Register now",
|
|
987
988
|
card_cta_microcourse: "Enrol now",
|
|
989
|
+
card_cta_communityPage_loading: "Joining...",
|
|
988
990
|
card_cta_event_loading: "Registering...",
|
|
989
991
|
card_cta_microcourse_loading: "Enrolling...",
|
|
992
|
+
card_cta_communityPage_done: "Joined",
|
|
990
993
|
card_cta_event_done: "Registered",
|
|
991
994
|
card_cta_microcourse_done: "Enrolled",
|
|
992
995
|
carousel_pagination_previous: "Previous",
|
|
@@ -1451,8 +1454,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1451
1454
|
}) => {
|
|
1452
1455
|
const p = jt(typeof e == "object");
|
|
1453
1456
|
if (typeof e == "object" && typeof p == "number") {
|
|
1454
|
-
const
|
|
1455
|
-
e = ha(p,
|
|
1457
|
+
const _ = Object.assign({}, e), y = pa(Object.keys(_));
|
|
1458
|
+
e = ha(p, y, _);
|
|
1456
1459
|
}
|
|
1457
1460
|
const g = [];
|
|
1458
1461
|
typeof e == "string" && g.push(e), r && (g.push("icon"), typeof r == "object" ? (g.push(r.icon), r.position ? g.push(r.position) : g.push("left"), r.hover && g.push(`hover_${r.hover}`), r.animate && (g.push("animate"), typeof r.animate == "string" && g.push(r.animate))) : (g.push(r), !r.includes("right") && !r.includes("left") && g.push("left"))), n.muted && g.push("muted"), n.fullWidth && g.push("full-width");
|
|
@@ -1463,8 +1466,8 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1463
1466
|
disabled: d,
|
|
1464
1467
|
button: s
|
|
1465
1468
|
}),
|
|
1466
|
-
onClick: (
|
|
1467
|
-
(!s || s[0] === "#") && o && (
|
|
1469
|
+
onClick: (_) => {
|
|
1470
|
+
(!s || s[0] === "#") && o && (_.preventDefault(), _.stopPropagation()), o && o(_);
|
|
1468
1471
|
},
|
|
1469
1472
|
disabled: typeof d == "object" && "isClickable" in d ? !d.isClickable : d
|
|
1470
1473
|
};
|
|
@@ -1614,7 +1617,7 @@ const Tt = ({ image: t, className: e, testId: n }) => {
|
|
|
1614
1617
|
loading: l,
|
|
1615
1618
|
decoding: u,
|
|
1616
1619
|
fetchPriority: f
|
|
1617
|
-
} = t, { range: m, sizes: p } = ri(t), g = hn({ format: "avif", query: o, range: m, url: c }), v = hn({ format: "webp", query: o, range: m, url: c }),
|
|
1620
|
+
} = t, { range: m, sizes: p } = ri(t), g = hn({ format: "avif", query: o, range: m, url: c }), v = hn({ format: "webp", query: o, range: m, url: c }), _ = hn({ format: "", query: o, range: m, url: c });
|
|
1618
1621
|
return /* @__PURE__ */ a.jsxs("picture", { className: e, children: [
|
|
1619
1622
|
i !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1620
1623
|
"source",
|
|
@@ -1629,7 +1632,7 @@ const Tt = ({ image: t, className: e, testId: n }) => {
|
|
|
1629
1632
|
/* @__PURE__ */ a.jsx(
|
|
1630
1633
|
"img",
|
|
1631
1634
|
{
|
|
1632
|
-
srcSet:
|
|
1635
|
+
srcSet: _,
|
|
1633
1636
|
sizes: p,
|
|
1634
1637
|
src: c,
|
|
1635
1638
|
alt: r,
|
|
@@ -2966,27 +2969,27 @@ const Pr = {
|
|
|
2966
2969
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((m, p) => {
|
|
2967
2970
|
let g, v = "";
|
|
2968
2971
|
if (p < c) {
|
|
2969
|
-
const { name:
|
|
2972
|
+
const { name: _ = "", image: y = "" } = ka(m);
|
|
2970
2973
|
if (o)
|
|
2971
2974
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "contributor" }, p);
|
|
2972
2975
|
g = /* @__PURE__ */ a.jsx(
|
|
2973
2976
|
Ye,
|
|
2974
2977
|
{
|
|
2975
|
-
name:
|
|
2976
|
-
src:
|
|
2978
|
+
name: _,
|
|
2979
|
+
src: y,
|
|
2977
2980
|
width: Pr[s || "medium"],
|
|
2978
2981
|
height: Pr[s || "medium"]
|
|
2979
2982
|
}
|
|
2980
2983
|
);
|
|
2981
2984
|
} else if (p === c) {
|
|
2982
|
-
const
|
|
2985
|
+
const _ = (e || n.length) - c;
|
|
2983
2986
|
g = /* @__PURE__ */ a.jsxs(
|
|
2984
2987
|
"small",
|
|
2985
2988
|
{
|
|
2986
|
-
className: S({ "large-number":
|
|
2989
|
+
className: S({ "large-number": _ > 99 }),
|
|
2987
2990
|
children: [
|
|
2988
2991
|
"+",
|
|
2989
|
-
ei(
|
|
2992
|
+
ei(_, 0)
|
|
2990
2993
|
]
|
|
2991
2994
|
}
|
|
2992
2995
|
), v = "number-left";
|
|
@@ -3020,7 +3023,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3020
3023
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3021
3024
|
"data-gtm-event-type": "SendEmailClick",
|
|
3022
3025
|
className: "gtm-trackable",
|
|
3023
|
-
onClick: (
|
|
3026
|
+
onClick: (_) => l(_),
|
|
3024
3027
|
href: "#",
|
|
3025
3028
|
"data-testid": "send-verify-email-click"
|
|
3026
3029
|
},
|
|
@@ -3050,7 +3053,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3050
3053
|
);
|
|
3051
3054
|
ae(
|
|
3052
3055
|
() => {
|
|
3053
|
-
let p = $t, g = "default", v = {},
|
|
3056
|
+
let p = $t, g = "default", v = {}, _ = {};
|
|
3054
3057
|
switch (t) {
|
|
3055
3058
|
case "gov":
|
|
3056
3059
|
p += "autoApproved", g = "success";
|
|
@@ -3063,7 +3066,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3063
3066
|
};
|
|
3064
3067
|
break;
|
|
3065
3068
|
case "pending":
|
|
3066
|
-
p += "pendingApproval", g = "error",
|
|
3069
|
+
p += "pendingApproval", g = "error", _ = {
|
|
3067
3070
|
href: "mailto:concierge@apolitical.co",
|
|
3068
3071
|
className: "gtm-trackable",
|
|
3069
3072
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3076,7 +3079,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3076
3079
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3077
3080
|
"data-gtm-event-type": "SendEmailClick",
|
|
3078
3081
|
className: "gtm-trackable",
|
|
3079
|
-
onClick: (
|
|
3082
|
+
onClick: (y) => l(y),
|
|
3080
3083
|
"data-testid": "send-verify-email-click"
|
|
3081
3084
|
};
|
|
3082
3085
|
break;
|
|
@@ -3085,7 +3088,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3085
3088
|
href: "/user-onboarding/login",
|
|
3086
3089
|
"data-gtm-event-context": "EmailExistsBox",
|
|
3087
3090
|
"data-gtm-event-type": "login-click"
|
|
3088
|
-
},
|
|
3091
|
+
}, _ = {
|
|
3089
3092
|
href: "mailto:concierge@apolitical.co",
|
|
3090
3093
|
className: "gtm-trackable",
|
|
3091
3094
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3100,7 +3103,7 @@ const $t = "emailHelperTextBox_", Oi = ({
|
|
|
3100
3103
|
};
|
|
3101
3104
|
break;
|
|
3102
3105
|
}
|
|
3103
|
-
o({ ...i, path: p, type: g, link: v, mail:
|
|
3106
|
+
o({ ...i, path: p, type: g, link: v, mail: _ });
|
|
3104
3107
|
},
|
|
3105
3108
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3106
3109
|
[t]
|
|
@@ -3198,10 +3201,10 @@ const Qe = {
|
|
|
3198
3201
|
predictions: [],
|
|
3199
3202
|
activePredictionIndex: -1,
|
|
3200
3203
|
isPredictionSelected: !!n
|
|
3201
|
-
}), { formatMessage:
|
|
3202
|
-
r || (r =
|
|
3204
|
+
}), { formatMessage: _ } = H();
|
|
3205
|
+
r || (r = _({ id: "inputAutocomplete_placeholder" })), ae(() => {
|
|
3203
3206
|
const w = setTimeout(() => {
|
|
3204
|
-
g || f((
|
|
3207
|
+
g || f((b) => ({ ...b, debouncedInput: d }));
|
|
3205
3208
|
}, Ai);
|
|
3206
3209
|
return () => {
|
|
3207
3210
|
clearTimeout(w);
|
|
@@ -3209,13 +3212,13 @@ const Qe = {
|
|
|
3209
3212
|
}, [d, g]), ae(() => {
|
|
3210
3213
|
u && !g ? (async () => {
|
|
3211
3214
|
try {
|
|
3212
|
-
const
|
|
3215
|
+
const b = await c(u) || [];
|
|
3213
3216
|
v((F) => ({
|
|
3214
3217
|
...F,
|
|
3215
|
-
predictions:
|
|
3218
|
+
predictions: b
|
|
3216
3219
|
}));
|
|
3217
|
-
} catch (
|
|
3218
|
-
console.error("Error fetching predictions:",
|
|
3220
|
+
} catch (b) {
|
|
3221
|
+
console.error("Error fetching predictions:", b), v((F) => ({ ...F, predictions: [] }));
|
|
3219
3222
|
}
|
|
3220
3223
|
})() : v((w) => ({ ...w, predictions: [] }));
|
|
3221
3224
|
}, [u, g]), ae(() => {
|
|
@@ -3224,38 +3227,38 @@ const Qe = {
|
|
|
3224
3227
|
displayInput: m[p].description
|
|
3225
3228
|
}));
|
|
3226
3229
|
}, [p, m]);
|
|
3227
|
-
const
|
|
3228
|
-
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(w.key) && (w.preventDefault(), w.key === Qe.DOWN && p < m.length - 1 ? v((
|
|
3229
|
-
...
|
|
3230
|
+
const y = (w) => {
|
|
3231
|
+
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(w.key) && (w.preventDefault(), w.key === Qe.DOWN && p < m.length - 1 ? v((b) => ({
|
|
3232
|
+
...b,
|
|
3230
3233
|
activePredictionIndex: p + 1
|
|
3231
|
-
})) : w.key === Qe.UP && p > 0 ? v((
|
|
3232
|
-
...
|
|
3234
|
+
})) : w.key === Qe.UP && p > 0 ? v((b) => ({
|
|
3235
|
+
...b,
|
|
3233
3236
|
activePredictionIndex: p - 1
|
|
3234
|
-
})) : w.key === Qe.ENTER && p > -1 && (o(m[p].description), f((
|
|
3235
|
-
...
|
|
3237
|
+
})) : w.key === Qe.ENTER && p > -1 && (o(m[p].description), f((b) => ({
|
|
3238
|
+
...b,
|
|
3236
3239
|
input: m[p].description
|
|
3237
|
-
})), v((
|
|
3238
|
-
...
|
|
3240
|
+
})), v((b) => ({
|
|
3241
|
+
...b,
|
|
3239
3242
|
predictions: [],
|
|
3240
3243
|
isPredictionSelected: !0
|
|
3241
3244
|
}))));
|
|
3242
3245
|
}, x = (w) => {
|
|
3243
|
-
o(w.target.value), f((
|
|
3244
|
-
...
|
|
3246
|
+
o(w.target.value), f((b) => ({
|
|
3247
|
+
...b,
|
|
3245
3248
|
input: w.target.value,
|
|
3246
3249
|
displayInput: w.target.value
|
|
3247
|
-
})), v((
|
|
3248
|
-
...
|
|
3250
|
+
})), v((b) => ({
|
|
3251
|
+
...b,
|
|
3249
3252
|
activePredictionIndex: -1,
|
|
3250
3253
|
isPredictionSelected: !1
|
|
3251
3254
|
}));
|
|
3252
3255
|
}, E = (w) => {
|
|
3253
|
-
o(w.description), f((
|
|
3254
|
-
...
|
|
3256
|
+
o(w.description), f((b) => ({
|
|
3257
|
+
...b,
|
|
3255
3258
|
input: w.description,
|
|
3256
3259
|
displayInput: w.description
|
|
3257
|
-
})), v((
|
|
3258
|
-
...
|
|
3260
|
+
})), v((b) => ({
|
|
3261
|
+
...b,
|
|
3259
3262
|
isPredictionSelected: !0,
|
|
3260
3263
|
predictions: []
|
|
3261
3264
|
}));
|
|
@@ -3267,27 +3270,27 @@ const Qe = {
|
|
|
3267
3270
|
type: "text",
|
|
3268
3271
|
value: l,
|
|
3269
3272
|
onChange: x,
|
|
3270
|
-
onKeyDown:
|
|
3273
|
+
onKeyDown: y,
|
|
3271
3274
|
placeholder: r,
|
|
3272
3275
|
name: e,
|
|
3273
3276
|
id: t,
|
|
3274
3277
|
...i
|
|
3275
3278
|
}
|
|
3276
3279
|
),
|
|
3277
|
-
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children: m.map((w,
|
|
3280
|
+
/* @__PURE__ */ a.jsx("ul", { className: "predictions-list", children: m.map((w, b) => /* @__PURE__ */ a.jsx(
|
|
3278
3281
|
"li",
|
|
3279
3282
|
{
|
|
3280
3283
|
onClick: () => E(w),
|
|
3281
3284
|
onMouseEnter: () => v((F) => ({
|
|
3282
3285
|
...F,
|
|
3283
|
-
activePredictionIndex:
|
|
3286
|
+
activePredictionIndex: b
|
|
3284
3287
|
})),
|
|
3285
3288
|
className: S("predictions-list-item", {
|
|
3286
|
-
active:
|
|
3289
|
+
active: b === p
|
|
3287
3290
|
}),
|
|
3288
3291
|
children: w.description
|
|
3289
3292
|
},
|
|
3290
|
-
|
|
3293
|
+
b
|
|
3291
3294
|
)) })
|
|
3292
3295
|
] });
|
|
3293
3296
|
};
|
|
@@ -3308,7 +3311,7 @@ const Ea = ({
|
|
|
3308
3311
|
}) => {
|
|
3309
3312
|
const m = H(), { onChange: p, ...g } = r, v = () => {
|
|
3310
3313
|
e || p(u ? null : d);
|
|
3311
|
-
},
|
|
3314
|
+
}, _ = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3312
3315
|
/* @__PURE__ */ a.jsx(
|
|
3313
3316
|
"input",
|
|
3314
3317
|
{
|
|
@@ -3318,8 +3321,8 @@ const Ea = ({
|
|
|
3318
3321
|
type: l,
|
|
3319
3322
|
value: d,
|
|
3320
3323
|
checked: u,
|
|
3321
|
-
onKeyDown: (
|
|
3322
|
-
(
|
|
3324
|
+
onKeyDown: (y) => {
|
|
3325
|
+
(y.key === "Enter" || y.code === "Space") && (y.preventDefault(), y.stopPropagation(), v());
|
|
3323
3326
|
},
|
|
3324
3327
|
readOnly: !0,
|
|
3325
3328
|
disabled: e
|
|
@@ -3333,15 +3336,15 @@ const Ea = ({
|
|
|
3333
3336
|
return Y.createElement(
|
|
3334
3337
|
n,
|
|
3335
3338
|
{
|
|
3336
|
-
onClick: (
|
|
3337
|
-
const x =
|
|
3338
|
-
x.nodeName.toLowerCase() === "a" || x.parentNode && x.parentNode.nodeName.toLowerCase() === "a" || (
|
|
3339
|
+
onClick: (y) => {
|
|
3340
|
+
const x = y.target;
|
|
3341
|
+
x.nodeName.toLowerCase() === "a" || x.parentNode && x.parentNode.nodeName.toLowerCase() === "a" || (y.preventDefault(), y.stopPropagation(), v());
|
|
3339
3342
|
},
|
|
3340
3343
|
className: S("checkbox-wrapper", t),
|
|
3341
3344
|
...f,
|
|
3342
3345
|
...g
|
|
3343
3346
|
},
|
|
3344
|
-
|
|
3347
|
+
_
|
|
3345
3348
|
);
|
|
3346
3349
|
};
|
|
3347
3350
|
const Ii = Ae(function({
|
|
@@ -3368,23 +3371,23 @@ const Li = ({
|
|
|
3368
3371
|
multiSelectOptions: d,
|
|
3369
3372
|
id: l
|
|
3370
3373
|
}) => {
|
|
3371
|
-
const u = H(), [f, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [v,
|
|
3372
|
-
let
|
|
3373
|
-
Array.isArray(v) && v.length === 1 && typeof v[0] == "string" ?
|
|
3374
|
-
|
|
3374
|
+
const u = H(), [f, m] = X(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [v, _] = X(g);
|
|
3375
|
+
let y;
|
|
3376
|
+
Array.isArray(v) && v.length === 1 && typeof v[0] == "string" ? y = e && v ? e.find((R) => R.id === v[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(v) && v.length === 1 && typeof v[0] != "string" ? y = v[0] : y = { id: "", label: "" }, ae(() => {
|
|
3377
|
+
_(g);
|
|
3375
3378
|
}, [r, n]);
|
|
3376
|
-
const { onChange: x, onMultiSelectSubmit: E, ...w } = s,
|
|
3379
|
+
const { onChange: x, onMultiSelectSubmit: E, ...w } = s, b = (R) => {
|
|
3377
3380
|
if (c) {
|
|
3378
3381
|
let Q = [];
|
|
3379
|
-
v != null && v.includes(R.id) ? Q = v.filter((B) => B !== R.id) : Q = [...v, R.id],
|
|
3382
|
+
v != null && v.includes(R.id) ? Q = v.filter((B) => B !== R.id) : Q = [...v, R.id], _([...Q]), x && x([...Q]);
|
|
3380
3383
|
} else
|
|
3381
|
-
|
|
3384
|
+
_([R]), x && x(R.id), m(!1);
|
|
3382
3385
|
}, F = (R) => {
|
|
3383
3386
|
if (R === "all") {
|
|
3384
3387
|
const Q = (e == null ? void 0 : e.map((B) => B.id)) || [];
|
|
3385
|
-
|
|
3388
|
+
_(Q), x && x(Q);
|
|
3386
3389
|
} else
|
|
3387
|
-
|
|
3390
|
+
_([]), x && x([]);
|
|
3388
3391
|
};
|
|
3389
3392
|
return /* @__PURE__ */ a.jsxs("div", { className: S("dropdown-wrapper", t), children: [
|
|
3390
3393
|
/* @__PURE__ */ a.jsxs(
|
|
@@ -3400,7 +3403,7 @@ const Li = ({
|
|
|
3400
3403
|
"data-testid": "dropdown-selector",
|
|
3401
3404
|
...w,
|
|
3402
3405
|
children: [
|
|
3403
|
-
c ? `${o} · ${v.length}` :
|
|
3406
|
+
c ? `${o} · ${v.length}` : y.label,
|
|
3404
3407
|
/* @__PURE__ */ a.jsx(Ii, { direction: f ? "up" : "down" })
|
|
3405
3408
|
]
|
|
3406
3409
|
}
|
|
@@ -3408,11 +3411,11 @@ const Li = ({
|
|
|
3408
3411
|
/* @__PURE__ */ a.jsx(
|
|
3409
3412
|
"select",
|
|
3410
3413
|
{
|
|
3411
|
-
defaultValue:
|
|
3414
|
+
defaultValue: y.id,
|
|
3412
3415
|
onChange: (R) => {
|
|
3413
3416
|
R.preventDefault(), R.stopPropagation();
|
|
3414
3417
|
const Q = e && e.find((B) => B.id === R.target.value);
|
|
3415
|
-
|
|
3418
|
+
b(Q);
|
|
3416
3419
|
},
|
|
3417
3420
|
hidden: !f,
|
|
3418
3421
|
...w,
|
|
@@ -3453,7 +3456,7 @@ const Li = ({
|
|
|
3453
3456
|
] })
|
|
3454
3457
|
] }),
|
|
3455
3458
|
/* @__PURE__ */ a.jsx("ul", { children: e == null ? void 0 : e.map((R) => {
|
|
3456
|
-
const Q = R.id ===
|
|
3459
|
+
const Q = R.id === y.id || (v == null ? void 0 : v.includes(R)) || (v == null ? void 0 : v.includes(R.id));
|
|
3457
3460
|
return /* @__PURE__ */ a.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ a.jsxs(
|
|
3458
3461
|
"button",
|
|
3459
3462
|
{
|
|
@@ -3464,7 +3467,7 @@ const Li = ({
|
|
|
3464
3467
|
"data-gtm-event-type": `${R}-click`,
|
|
3465
3468
|
"data-gtm-event-context": i,
|
|
3466
3469
|
onClick: (B) => {
|
|
3467
|
-
B.preventDefault(), B.stopPropagation(),
|
|
3470
|
+
B.preventDefault(), B.stopPropagation(), b(R);
|
|
3468
3471
|
},
|
|
3469
3472
|
role: "menuitem",
|
|
3470
3473
|
"aria-current": Q,
|
|
@@ -3524,20 +3527,20 @@ const Bi = ({
|
|
|
3524
3527
|
children: c == null ? void 0 : c.map(
|
|
3525
3528
|
({
|
|
3526
3529
|
id: v,
|
|
3527
|
-
label:
|
|
3528
|
-
value:
|
|
3530
|
+
label: _ = !1,
|
|
3531
|
+
value: y = v,
|
|
3529
3532
|
disabled: x = !1
|
|
3530
3533
|
}) => {
|
|
3531
3534
|
const E = `${r}_${v}`, w = () => {
|
|
3532
3535
|
if (x)
|
|
3533
3536
|
return;
|
|
3534
|
-
let
|
|
3537
|
+
let b;
|
|
3535
3538
|
if (i) {
|
|
3536
|
-
const F = p == null ? void 0 : p.indexOf(
|
|
3537
|
-
Array.isArray(p) && F >= 0 ? (
|
|
3539
|
+
const F = p == null ? void 0 : p.indexOf(y);
|
|
3540
|
+
Array.isArray(p) && F >= 0 ? (b = p, b.splice(F, 1)) : (!p || p.length === 0 ? b = [] : b = p, b.push(y));
|
|
3538
3541
|
} else
|
|
3539
|
-
|
|
3540
|
-
e.onChange(
|
|
3542
|
+
b = g === y ? void 0 : y;
|
|
3543
|
+
e.onChange(b);
|
|
3541
3544
|
};
|
|
3542
3545
|
return /* @__PURE__ */ a.jsx(
|
|
3543
3546
|
Ea,
|
|
@@ -3545,14 +3548,14 @@ const Bi = ({
|
|
|
3545
3548
|
element: "li",
|
|
3546
3549
|
id: E,
|
|
3547
3550
|
type: l === "checkboxes" ? "checkbox" : "radio",
|
|
3548
|
-
shownValue:
|
|
3549
|
-
value: i ? p == null ? void 0 : p.includes(
|
|
3551
|
+
shownValue: y,
|
|
3552
|
+
value: i ? p == null ? void 0 : p.includes(y) : g === y,
|
|
3550
3553
|
functions: {
|
|
3551
3554
|
...e,
|
|
3552
3555
|
onChange: w
|
|
3553
3556
|
},
|
|
3554
3557
|
intlPath: n,
|
|
3555
|
-
label:
|
|
3558
|
+
label: _ || m.formatMessage({
|
|
3556
3559
|
id: n ? `${n}_${v}` : v
|
|
3557
3560
|
}),
|
|
3558
3561
|
disabled: x
|
|
@@ -3621,7 +3624,7 @@ const Je = {
|
|
|
3621
3624
|
}) => {
|
|
3622
3625
|
const f = H(), m = d && d.some(({ condition: w }) => w === "required"), p = (l == null ? void 0 : l.toString().length) || 0, g = c && Je[c] && Je[c].component ? Je[c].component : gt, v = {};
|
|
3623
3626
|
c && ["checkboxes"].includes(c) ? v.element = "span" : v.htmlFor = t;
|
|
3624
|
-
let
|
|
3627
|
+
let _ = {
|
|
3625
3628
|
...u,
|
|
3626
3629
|
id: t,
|
|
3627
3630
|
name: t,
|
|
@@ -3632,10 +3635,10 @@ const Je = {
|
|
|
3632
3635
|
functions: pt(s),
|
|
3633
3636
|
value: l
|
|
3634
3637
|
};
|
|
3635
|
-
i > 0 && (
|
|
3638
|
+
i > 0 && (_["data-character-limit"] = i, _.functions && (_.functions.onChange = (w) => {
|
|
3636
3639
|
((w == null ? void 0 : w.toString().length) || 0) > i && (w = w == null ? void 0 : w.toString().slice(0, i)), s.onChange(w);
|
|
3637
|
-
})), c && Je[c] && Je[c].props && (
|
|
3638
|
-
const
|
|
3640
|
+
})), c && Je[c] && Je[c].props && (_ = { ..._, ...Je[c].props }), c && ["checkboxes"].includes(c) && (_.intlPath = `${e}_${t}`), r && (_["aria-invalid"] = !0, _["aria-describedby"] = `error-${t}`);
|
|
3641
|
+
const y = u.label || f.formatMessage({ id: e ? `${e}_${t}` : t }), x = ({ ...w }) => r ? Y.createElement(
|
|
3639
3642
|
w.as || "dd",
|
|
3640
3643
|
{
|
|
3641
3644
|
id: `error-${t}`,
|
|
@@ -3651,8 +3654,8 @@ const Je = {
|
|
|
3651
3654
|
/* @__PURE__ */ a.jsx(
|
|
3652
3655
|
g,
|
|
3653
3656
|
{
|
|
3654
|
-
...
|
|
3655
|
-
label:
|
|
3657
|
+
..._,
|
|
3658
|
+
label: y,
|
|
3656
3659
|
className: S("field-wrapper", n)
|
|
3657
3660
|
}
|
|
3658
3661
|
),
|
|
@@ -3665,7 +3668,7 @@ const Je = {
|
|
|
3665
3668
|
});
|
|
3666
3669
|
return /* @__PURE__ */ a.jsxs("dl", { className: S("field-wrapper text-medium", n), children: [
|
|
3667
3670
|
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(E, { ...v, children: [
|
|
3668
|
-
|
|
3671
|
+
y,
|
|
3669
3672
|
m && o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3670
3673
|
" ",
|
|
3671
3674
|
/* @__PURE__ */ a.jsxs("small", { children: [
|
|
@@ -3676,7 +3679,7 @@ const Je = {
|
|
|
3676
3679
|
] })
|
|
3677
3680
|
] }) }),
|
|
3678
3681
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3679
|
-
/* @__PURE__ */ a.jsx(g, { ...
|
|
3682
|
+
/* @__PURE__ */ a.jsx(g, { ..._ }),
|
|
3680
3683
|
i > 0 ? /* @__PURE__ */ a.jsxs(
|
|
3681
3684
|
"small",
|
|
3682
3685
|
{
|
|
@@ -3737,36 +3740,36 @@ const Je = {
|
|
|
3737
3740
|
if (m.validation)
|
|
3738
3741
|
for (let p = 0; p < m.validation.length; p++) {
|
|
3739
3742
|
const { condition: g = "required", error: v = !1 } = m.validation[p];
|
|
3740
|
-
let
|
|
3743
|
+
let _ = !1;
|
|
3741
3744
|
if (typeof g == "function") {
|
|
3742
|
-
const
|
|
3743
|
-
|
|
3745
|
+
const y = g(i);
|
|
3746
|
+
y && (_ = v || y);
|
|
3744
3747
|
} else {
|
|
3745
|
-
const
|
|
3748
|
+
const y = i[m.id];
|
|
3746
3749
|
switch (g) {
|
|
3747
3750
|
case "required":
|
|
3748
|
-
(!
|
|
3751
|
+
(!y || typeof y == "string" && y.trim().length === 0) && (_ = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_required" })));
|
|
3749
3752
|
break;
|
|
3750
3753
|
case "no-numbers": {
|
|
3751
|
-
|
|
3754
|
+
y && !/^([^0-9]*)$/.test(y) && (_ = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_numbers" })));
|
|
3752
3755
|
break;
|
|
3753
3756
|
}
|
|
3754
3757
|
case "valid-email": {
|
|
3755
|
-
|
|
3758
|
+
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) && (_ = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_email" })));
|
|
3756
3759
|
break;
|
|
3757
3760
|
}
|
|
3758
3761
|
case "valid-url": {
|
|
3759
|
-
|
|
3762
|
+
y && !/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/.test(y) && (_ = v || (u == null ? void 0 : u.formatMessage({ id: "form_error_url" })));
|
|
3760
3763
|
break;
|
|
3761
3764
|
}
|
|
3762
3765
|
default:
|
|
3763
3766
|
console.warn("WARNING! No field validation condition has been set");
|
|
3764
3767
|
}
|
|
3765
3768
|
}
|
|
3766
|
-
if (
|
|
3769
|
+
if (_) {
|
|
3767
3770
|
c({
|
|
3768
3771
|
type: "addError",
|
|
3769
|
-
payload: { key: m.id, value:
|
|
3772
|
+
payload: { key: m.id, value: _ }
|
|
3770
3773
|
}), f.push(m.id);
|
|
3771
3774
|
break;
|
|
3772
3775
|
}
|
|
@@ -3832,11 +3835,11 @@ const rn = ({
|
|
|
3832
3835
|
},
|
|
3833
3836
|
...p
|
|
3834
3837
|
}) => {
|
|
3835
|
-
const { customOnSubmit: g, hideButton: v, ...
|
|
3838
|
+
const { customOnSubmit: g, hideButton: v, ..._ } = i, y = 40, {
|
|
3836
3839
|
shouldShowCancelButton: x = !1,
|
|
3837
3840
|
shouldReset: E = !0,
|
|
3838
3841
|
showRequiredLabels: w = !0,
|
|
3839
|
-
showSuccessMessage:
|
|
3842
|
+
showSuccessMessage: b = !1
|
|
3840
3843
|
} = c || {}, F = H(), R = {};
|
|
3841
3844
|
t.length && t.forEach((z) => {
|
|
3842
3845
|
const K = z.id || z.name;
|
|
@@ -3880,7 +3883,7 @@ const rn = ({
|
|
|
3880
3883
|
i.text || (i.text = F.formatMessage({ id: "form_submit" }));
|
|
3881
3884
|
const Z = [
|
|
3882
3885
|
{
|
|
3883
|
-
...
|
|
3886
|
+
..._,
|
|
3884
3887
|
icon: k ? { icon: "tick", position: "left" } : !1,
|
|
3885
3888
|
className: "gtm-trackable",
|
|
3886
3889
|
onClick: (z) => {
|
|
@@ -3893,7 +3896,7 @@ const rn = ({
|
|
|
3893
3896
|
q && (K = q.getBoundingClientRect().top + window.scrollY);
|
|
3894
3897
|
}
|
|
3895
3898
|
const T = document.getElementById("header");
|
|
3896
|
-
if (T && (K = K - T.offsetHeight -
|
|
3899
|
+
if (T && (K = K - T.offsetHeight - y), K < 0 && (K = 0), window.scrollTo({ top: K, behavior: "smooth" }), B({ type: "toggleSubmitting" }), i.disabled) {
|
|
3897
3900
|
typeof i.disabled == "object" && i.disabled.isClickable && B({
|
|
3898
3901
|
type: "submitForm",
|
|
3899
3902
|
payload: {
|
|
@@ -4002,7 +4005,7 @@ const rn = ({
|
|
|
4002
4005
|
]
|
|
4003
4006
|
}
|
|
4004
4007
|
),
|
|
4005
|
-
|
|
4008
|
+
b && k && /* @__PURE__ */ a.jsx(Wt, { className: "success", children: typeof b == "string" ? b : F.formatMessage({ id: "form_success" }) })
|
|
4006
4009
|
] });
|
|
4007
4010
|
};
|
|
4008
4011
|
const Nt = "passwordRules_", Sa = "isMoreThanEightCharacters", Ca = "includesNumberAndSymbol", $a = "includesLowerAndUppercase", zi = {
|
|
@@ -4062,15 +4065,15 @@ const Vl = ({
|
|
|
4062
4065
|
disabled: !0
|
|
4063
4066
|
}), u = async () => {
|
|
4064
4067
|
try {
|
|
4065
|
-
const
|
|
4068
|
+
const y = await n();
|
|
4066
4069
|
l((x) => ({
|
|
4067
4070
|
...x,
|
|
4068
4071
|
setUp: !0,
|
|
4069
|
-
id:
|
|
4072
|
+
id: y && y.id,
|
|
4070
4073
|
disabled: !1
|
|
4071
4074
|
}));
|
|
4072
|
-
} catch (
|
|
4073
|
-
l((x) => ({ ...x, setUp: !0, disabled: !0 })), s(
|
|
4075
|
+
} catch (y) {
|
|
4076
|
+
l((x) => ({ ...x, setUp: !0, disabled: !0 })), s(y);
|
|
4074
4077
|
}
|
|
4075
4078
|
};
|
|
4076
4079
|
if (ae(() => {
|
|
@@ -4083,10 +4086,10 @@ const Vl = ({
|
|
|
4083
4086
|
high: c.formatMessage({ id: `${g}high` }),
|
|
4084
4087
|
success: c.formatMessage({ id: `${g}success` }),
|
|
4085
4088
|
...t
|
|
4086
|
-
},
|
|
4089
|
+
}, _ = async (y) => {
|
|
4087
4090
|
if (!(!f || p))
|
|
4088
4091
|
try {
|
|
4089
|
-
l((x) => ({ ...x, rating:
|
|
4092
|
+
l((x) => ({ ...x, rating: y, disabled: !0 })), await r({ id: f, value: y });
|
|
4090
4093
|
} catch (x) {
|
|
4091
4094
|
l((E) => ({ ...E, rating: null })), s(x);
|
|
4092
4095
|
} finally {
|
|
@@ -4095,8 +4098,8 @@ const Vl = ({
|
|
|
4095
4098
|
};
|
|
4096
4099
|
return /* @__PURE__ */ a.jsxs("div", { className: S("rating", i), children: [
|
|
4097
4100
|
/* @__PURE__ */ a.jsx("span", { className: "label", children: v[m ? "success" : "text"] }),
|
|
4098
|
-
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(e).keys()).map((
|
|
4099
|
-
const x =
|
|
4101
|
+
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(e).keys()).map((y) => {
|
|
4102
|
+
const x = y + 1;
|
|
4100
4103
|
return /* @__PURE__ */ a.jsx(
|
|
4101
4104
|
"li",
|
|
4102
4105
|
{
|
|
@@ -4116,7 +4119,7 @@ const Vl = ({
|
|
|
4116
4119
|
{ number: x, total: e }
|
|
4117
4120
|
)}${x === 1 || x === e ? ` - ${v[x === 1 ? "low" : "high"]}` : ""}`,
|
|
4118
4121
|
onClick: (E) => {
|
|
4119
|
-
E.preventDefault(), E.stopPropagation(),
|
|
4122
|
+
E.preventDefault(), E.stopPropagation(), _(x);
|
|
4120
4123
|
},
|
|
4121
4124
|
disabled: p
|
|
4122
4125
|
}
|
|
@@ -4298,18 +4301,18 @@ const Yi = ({
|
|
|
4298
4301
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
4299
4302
|
/* NOT_SUBMITTED */
|
|
4300
4303
|
}) => {
|
|
4301
|
-
const [u, f] = X([]), [m, p] = X(!0), [g, v] = X(l), { formatMessage:
|
|
4304
|
+
const [u, f] = X([]), [m, p] = X(!0), [g, v] = X(l), { formatMessage: _ } = H(), y = async (w) => {
|
|
4302
4305
|
w.preventDefault();
|
|
4303
4306
|
try {
|
|
4304
4307
|
await d(u), f([]), v(
|
|
4305
4308
|
"SUCCESS"
|
|
4306
4309
|
/* SUCCESS */
|
|
4307
4310
|
);
|
|
4308
|
-
} catch (
|
|
4311
|
+
} catch (b) {
|
|
4309
4312
|
v(
|
|
4310
4313
|
"ERROR"
|
|
4311
4314
|
/* ERROR */
|
|
4312
|
-
), c(
|
|
4315
|
+
), c(b);
|
|
4313
4316
|
}
|
|
4314
4317
|
}, x = (w) => {
|
|
4315
4318
|
w.preventDefault(), v(
|
|
@@ -4323,20 +4326,20 @@ const Yi = ({
|
|
|
4323
4326
|
);
|
|
4324
4327
|
};
|
|
4325
4328
|
return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ a.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
4326
|
-
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children:
|
|
4329
|
+
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children: _({ id: "inviteForm_success" }) }) : /* @__PURE__ */ a.jsxs("h2", { className: "error-title", children: [
|
|
4327
4330
|
" ",
|
|
4328
|
-
|
|
4331
|
+
_({ id: "inviteForm_error" })
|
|
4329
4332
|
] }) }),
|
|
4330
4333
|
/* @__PURE__ */ a.jsx(Oe, {}),
|
|
4331
4334
|
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4332
|
-
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick: x, children:
|
|
4333
|
-
/* @__PURE__ */ a.jsx(se, { onClick: E, children:
|
|
4334
|
-
] }) : /* @__PURE__ */ a.jsx(se, { onClick: x, children:
|
|
4335
|
+
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick: x, children: _({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
4336
|
+
/* @__PURE__ */ a.jsx(se, { onClick: E, children: _({ id: "inviteForm_ctaDone" }) })
|
|
4337
|
+
] }) : /* @__PURE__ */ a.jsx(se, { onClick: x, children: _({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
4335
4338
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
4336
4339
|
"form",
|
|
4337
4340
|
{
|
|
4338
4341
|
style: { backgroundColor: i },
|
|
4339
|
-
onSubmit:
|
|
4342
|
+
onSubmit: y,
|
|
4340
4343
|
className: S("invite-form gtm-trackable"),
|
|
4341
4344
|
children: [
|
|
4342
4345
|
/* @__PURE__ */ a.jsxs("fieldset", { className: "content", children: [
|
|
@@ -4347,13 +4350,13 @@ const Yi = ({
|
|
|
4347
4350
|
{
|
|
4348
4351
|
id: "email-input",
|
|
4349
4352
|
inputClassName: "email-input input",
|
|
4350
|
-
placeholder:
|
|
4353
|
+
placeholder: _({ id: "inviteForm_email_placeholder" }),
|
|
4351
4354
|
emails: u,
|
|
4352
4355
|
onChange: (w) => {
|
|
4353
4356
|
f(w), p(!w.length);
|
|
4354
4357
|
},
|
|
4355
4358
|
autoFocus: !1,
|
|
4356
|
-
getLabel: (w,
|
|
4359
|
+
getLabel: (w, b, F) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
4357
4360
|
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: w }),
|
|
4358
4361
|
/* @__PURE__ */ a.jsx(
|
|
4359
4362
|
se,
|
|
@@ -4362,13 +4365,13 @@ const Yi = ({
|
|
|
4362
4365
|
size: "small",
|
|
4363
4366
|
icon: { icon: "close" },
|
|
4364
4367
|
onClick: () => {
|
|
4365
|
-
F(
|
|
4368
|
+
F(b), p(!u.length);
|
|
4366
4369
|
},
|
|
4367
4370
|
className: "remove-email-button",
|
|
4368
|
-
screenreaderText:
|
|
4371
|
+
screenreaderText: _({ id: "overlay_close" })
|
|
4369
4372
|
}
|
|
4370
4373
|
)
|
|
4371
|
-
] },
|
|
4374
|
+
] }, b)
|
|
4372
4375
|
}
|
|
4373
4376
|
)
|
|
4374
4377
|
] }),
|
|
@@ -4811,12 +4814,12 @@ const eo = {
|
|
|
4811
4814
|
url: f,
|
|
4812
4815
|
logInButton: m,
|
|
4813
4816
|
successMessage: p
|
|
4814
|
-
}, [v,
|
|
4815
|
-
validFields:
|
|
4817
|
+
}, [v, _] = Yn(ma, eo), {
|
|
4818
|
+
validFields: y,
|
|
4816
4819
|
emailDetails: x,
|
|
4817
4820
|
shouldManuallyApprove: E,
|
|
4818
4821
|
shouldDisableButton: w,
|
|
4819
|
-
showSuccessMessage:
|
|
4822
|
+
showSuccessMessage: b,
|
|
4820
4823
|
showError: F
|
|
4821
4824
|
} = v, [R, Q] = oa([
|
|
4822
4825
|
"signup-this-session",
|
|
@@ -4833,13 +4836,13 @@ const eo = {
|
|
|
4833
4836
|
ae(() => {
|
|
4834
4837
|
E === !0 && B.jobTitle.current && B.jobTitle.current.focus();
|
|
4835
4838
|
}, [E]), ae(() => {
|
|
4836
|
-
R["signup-this-session"] &&
|
|
4839
|
+
R["signup-this-session"] && _([{ type: "showSuccessMessage", value: !0 }]);
|
|
4837
4840
|
}, [R]), ae(() => {
|
|
4838
|
-
|
|
4841
|
+
b && R["functional-cookie-consent"] && Q("signup-this-session", "true", {
|
|
4839
4842
|
path: "/",
|
|
4840
4843
|
maxAge: 3600
|
|
4841
4844
|
});
|
|
4842
|
-
}, [
|
|
4845
|
+
}, [b]);
|
|
4843
4846
|
const $ = wt(() => Ji({
|
|
4844
4847
|
placeholders: n,
|
|
4845
4848
|
labels: e,
|
|
@@ -4847,11 +4850,11 @@ const eo = {
|
|
|
4847
4850
|
functions: r,
|
|
4848
4851
|
refs: B,
|
|
4849
4852
|
state: v,
|
|
4850
|
-
dispatch:
|
|
4853
|
+
dispatch: _,
|
|
4851
4854
|
dataToSubmit: o,
|
|
4852
4855
|
intl: d
|
|
4853
|
-
}), [o, r, d, B, g, v]), C = w ? !0 : E ? !Object.values(
|
|
4854
|
-
return g.successMessage &&
|
|
4856
|
+
}), [o, r, d, B, g, v]), C = w ? !0 : E ? !Object.values(y).every((k) => k === !0) : !y.name || !y.email || ["exists", "pending", "verify"].includes(x.boxType);
|
|
4857
|
+
return g.successMessage && b ? /* @__PURE__ */ a.jsx(Xi, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
4855
4858
|
"fieldset",
|
|
4856
4859
|
{
|
|
4857
4860
|
className: S("signup-form-fieldset", t),
|
|
@@ -4907,12 +4910,12 @@ const eo = {
|
|
|
4907
4910
|
dataToSubmit: o,
|
|
4908
4911
|
createAccount: r.createAccount,
|
|
4909
4912
|
onSuccess: r.onSuccess,
|
|
4910
|
-
dispatch:
|
|
4913
|
+
dispatch: _,
|
|
4911
4914
|
state: v
|
|
4912
4915
|
});
|
|
4913
4916
|
},
|
|
4914
4917
|
onCatch: (k) => {
|
|
4915
|
-
r.handleError(k),
|
|
4918
|
+
r.handleError(k), _([
|
|
4916
4919
|
{ type: "showSuccessMessage", value: !1 },
|
|
4917
4920
|
{ type: "showError", value: !0 }
|
|
4918
4921
|
]);
|
|
@@ -4939,28 +4942,28 @@ function to() {
|
|
|
4939
4942
|
if (Rr)
|
|
4940
4943
|
return ue;
|
|
4941
4944
|
Rr = 1;
|
|
4942
|
-
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, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121,
|
|
4943
|
-
function E(
|
|
4944
|
-
if (typeof
|
|
4945
|
-
var F =
|
|
4945
|
+
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, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, x = t ? Symbol.for("react.scope") : 60119;
|
|
4946
|
+
function E(b) {
|
|
4947
|
+
if (typeof b == "object" && b !== null) {
|
|
4948
|
+
var F = b.$$typeof;
|
|
4946
4949
|
switch (F) {
|
|
4947
4950
|
case e:
|
|
4948
|
-
switch (
|
|
4951
|
+
switch (b = b.type, b) {
|
|
4949
4952
|
case d:
|
|
4950
4953
|
case l:
|
|
4951
4954
|
case r:
|
|
4952
4955
|
case i:
|
|
4953
4956
|
case s:
|
|
4954
4957
|
case f:
|
|
4955
|
-
return
|
|
4958
|
+
return b;
|
|
4956
4959
|
default:
|
|
4957
|
-
switch (
|
|
4960
|
+
switch (b = b && b.$$typeof, b) {
|
|
4958
4961
|
case c:
|
|
4959
4962
|
case u:
|
|
4960
4963
|
case g:
|
|
4961
4964
|
case p:
|
|
4962
4965
|
case o:
|
|
4963
|
-
return
|
|
4966
|
+
return b;
|
|
4964
4967
|
default:
|
|
4965
4968
|
return F;
|
|
4966
4969
|
}
|
|
@@ -4970,35 +4973,35 @@ function to() {
|
|
|
4970
4973
|
}
|
|
4971
4974
|
}
|
|
4972
4975
|
}
|
|
4973
|
-
function w(
|
|
4974
|
-
return E(
|
|
4976
|
+
function w(b) {
|
|
4977
|
+
return E(b) === l;
|
|
4975
4978
|
}
|
|
4976
|
-
return ue.AsyncMode = d, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = f, ue.isAsyncMode = function(
|
|
4977
|
-
return w(
|
|
4978
|
-
}, ue.isConcurrentMode = w, ue.isContextConsumer = function(
|
|
4979
|
-
return E(
|
|
4980
|
-
}, ue.isContextProvider = function(
|
|
4981
|
-
return E(
|
|
4982
|
-
}, ue.isElement = function(
|
|
4983
|
-
return typeof
|
|
4984
|
-
}, ue.isForwardRef = function(
|
|
4985
|
-
return E(
|
|
4986
|
-
}, ue.isFragment = function(
|
|
4987
|
-
return E(
|
|
4988
|
-
}, ue.isLazy = function(
|
|
4989
|
-
return E(
|
|
4990
|
-
}, ue.isMemo = function(
|
|
4991
|
-
return E(
|
|
4992
|
-
}, ue.isPortal = function(
|
|
4993
|
-
return E(
|
|
4994
|
-
}, ue.isProfiler = function(
|
|
4995
|
-
return E(
|
|
4996
|
-
}, ue.isStrictMode = function(
|
|
4997
|
-
return E(
|
|
4998
|
-
}, ue.isSuspense = function(
|
|
4999
|
-
return E(
|
|
5000
|
-
}, ue.isValidElementType = function(
|
|
5001
|
-
return typeof
|
|
4979
|
+
return ue.AsyncMode = d, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = g, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = f, ue.isAsyncMode = function(b) {
|
|
4980
|
+
return w(b) || E(b) === d;
|
|
4981
|
+
}, ue.isConcurrentMode = w, ue.isContextConsumer = function(b) {
|
|
4982
|
+
return E(b) === c;
|
|
4983
|
+
}, ue.isContextProvider = function(b) {
|
|
4984
|
+
return E(b) === o;
|
|
4985
|
+
}, ue.isElement = function(b) {
|
|
4986
|
+
return typeof b == "object" && b !== null && b.$$typeof === e;
|
|
4987
|
+
}, ue.isForwardRef = function(b) {
|
|
4988
|
+
return E(b) === u;
|
|
4989
|
+
}, ue.isFragment = function(b) {
|
|
4990
|
+
return E(b) === r;
|
|
4991
|
+
}, ue.isLazy = function(b) {
|
|
4992
|
+
return E(b) === g;
|
|
4993
|
+
}, ue.isMemo = function(b) {
|
|
4994
|
+
return E(b) === p;
|
|
4995
|
+
}, ue.isPortal = function(b) {
|
|
4996
|
+
return E(b) === n;
|
|
4997
|
+
}, ue.isProfiler = function(b) {
|
|
4998
|
+
return E(b) === i;
|
|
4999
|
+
}, ue.isStrictMode = function(b) {
|
|
5000
|
+
return E(b) === s;
|
|
5001
|
+
}, ue.isSuspense = function(b) {
|
|
5002
|
+
return E(b) === f;
|
|
5003
|
+
}, ue.isValidElementType = function(b) {
|
|
5004
|
+
return typeof b == "string" || typeof b == "function" || b === r || b === l || b === i || b === s || b === f || b === m || typeof b == "object" && b !== null && (b.$$typeof === g || b.$$typeof === p || b.$$typeof === o || b.$$typeof === c || b.$$typeof === u || b.$$typeof === _ || b.$$typeof === y || b.$$typeof === x || b.$$typeof === v);
|
|
5002
5005
|
}, ue.typeOf = E, ue;
|
|
5003
5006
|
}
|
|
5004
5007
|
var de = {};
|
|
@@ -5013,10 +5016,10 @@ var de = {};
|
|
|
5013
5016
|
var Fr;
|
|
5014
5017
|
function no() {
|
|
5015
5018
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
5016
|
-
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, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121,
|
|
5019
|
+
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, d = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, f = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, _ = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, x = t ? Symbol.for("react.scope") : 60119;
|
|
5017
5020
|
function E(D) {
|
|
5018
5021
|
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
5019
|
-
D === r || D === l || D === i || D === s || D === f || D === m || typeof D == "object" && D !== null && (D.$$typeof === g || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === u || D.$$typeof ===
|
|
5022
|
+
D === r || D === l || D === i || D === s || D === f || D === m || typeof D == "object" && D !== null && (D.$$typeof === g || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === u || D.$$typeof === _ || D.$$typeof === y || D.$$typeof === x || D.$$typeof === v);
|
|
5020
5023
|
}
|
|
5021
5024
|
function w(D) {
|
|
5022
5025
|
if (typeof D == "object" && D !== null) {
|
|
@@ -5050,7 +5053,7 @@ function no() {
|
|
|
5050
5053
|
}
|
|
5051
5054
|
}
|
|
5052
5055
|
}
|
|
5053
|
-
var
|
|
5056
|
+
var b = d, F = l, R = c, Q = o, B = e, $ = u, C = r, k = g, j = p, N = n, A = i, W = s, Z = f, z = !1;
|
|
5054
5057
|
function K(D) {
|
|
5055
5058
|
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) === d;
|
|
5056
5059
|
}
|
|
@@ -5090,7 +5093,7 @@ function no() {
|
|
|
5090
5093
|
function oe(D) {
|
|
5091
5094
|
return w(D) === f;
|
|
5092
5095
|
}
|
|
5093
|
-
de.AsyncMode =
|
|
5096
|
+
de.AsyncMode = b, de.ConcurrentMode = F, de.ContextConsumer = R, de.ContextProvider = Q, de.Element = B, de.ForwardRef = $, de.Fragment = C, de.Lazy = k, de.Memo = j, de.Portal = N, de.Profiler = A, de.StrictMode = W, de.Suspense = Z, de.isAsyncMode = K, de.isConcurrentMode = T, de.isContextConsumer = P, de.isContextProvider = q, de.isElement = L, de.isForwardRef = U, de.isFragment = te, de.isLazy = G, de.isMemo = V, de.isPortal = ee, de.isProfiler = re, de.isStrictMode = O, de.isSuspense = oe, de.isValidElementType = E, de.typeOf = w;
|
|
5094
5097
|
}()), de;
|
|
5095
5098
|
}
|
|
5096
5099
|
var Or;
|
|
@@ -5237,18 +5240,18 @@ function so() {
|
|
|
5237
5240
|
return P;
|
|
5238
5241
|
}
|
|
5239
5242
|
var m = "<<anonymous>>", p = {
|
|
5240
|
-
array:
|
|
5241
|
-
bigint:
|
|
5242
|
-
bool:
|
|
5243
|
-
func:
|
|
5244
|
-
number:
|
|
5245
|
-
object:
|
|
5246
|
-
string:
|
|
5247
|
-
symbol:
|
|
5243
|
+
array: y("array"),
|
|
5244
|
+
bigint: y("bigint"),
|
|
5245
|
+
bool: y("boolean"),
|
|
5246
|
+
func: y("function"),
|
|
5247
|
+
number: y("number"),
|
|
5248
|
+
object: y("object"),
|
|
5249
|
+
string: y("string"),
|
|
5250
|
+
symbol: y("symbol"),
|
|
5248
5251
|
any: x(),
|
|
5249
5252
|
arrayOf: E,
|
|
5250
5253
|
element: w(),
|
|
5251
|
-
elementType:
|
|
5254
|
+
elementType: b(),
|
|
5252
5255
|
instanceOf: F,
|
|
5253
5256
|
node: $(),
|
|
5254
5257
|
objectOf: Q,
|
|
@@ -5264,7 +5267,7 @@ function so() {
|
|
|
5264
5267
|
this.message = T, this.data = P && typeof P == "object" ? P : {}, this.stack = "";
|
|
5265
5268
|
}
|
|
5266
5269
|
v.prototype = Error.prototype;
|
|
5267
|
-
function
|
|
5270
|
+
function _(T) {
|
|
5268
5271
|
if (process.env.NODE_ENV !== "production")
|
|
5269
5272
|
var P = {}, q = 0;
|
|
5270
5273
|
function L(te, G, V, ee, re, O, oe) {
|
|
@@ -5287,7 +5290,7 @@ function so() {
|
|
|
5287
5290
|
var U = L.bind(null, !1);
|
|
5288
5291
|
return U.isRequired = L.bind(null, !0), U;
|
|
5289
5292
|
}
|
|
5290
|
-
function
|
|
5293
|
+
function y(T) {
|
|
5291
5294
|
function P(q, L, U, te, G, V) {
|
|
5292
5295
|
var ee = q[L], re = W(ee);
|
|
5293
5296
|
if (re !== T) {
|
|
@@ -5299,10 +5302,10 @@ function so() {
|
|
|
5299
5302
|
}
|
|
5300
5303
|
return null;
|
|
5301
5304
|
}
|
|
5302
|
-
return
|
|
5305
|
+
return _(P);
|
|
5303
5306
|
}
|
|
5304
5307
|
function x() {
|
|
5305
|
-
return
|
|
5308
|
+
return _(o);
|
|
5306
5309
|
}
|
|
5307
5310
|
function E(T) {
|
|
5308
5311
|
function P(q, L, U, te, G) {
|
|
@@ -5320,7 +5323,7 @@ function so() {
|
|
|
5320
5323
|
}
|
|
5321
5324
|
return null;
|
|
5322
5325
|
}
|
|
5323
|
-
return
|
|
5326
|
+
return _(P);
|
|
5324
5327
|
}
|
|
5325
5328
|
function w() {
|
|
5326
5329
|
function T(P, q, L, U, te) {
|
|
@@ -5331,9 +5334,9 @@ function so() {
|
|
|
5331
5334
|
}
|
|
5332
5335
|
return null;
|
|
5333
5336
|
}
|
|
5334
|
-
return
|
|
5337
|
+
return _(T);
|
|
5335
5338
|
}
|
|
5336
|
-
function
|
|
5339
|
+
function b() {
|
|
5337
5340
|
function T(P, q, L, U, te) {
|
|
5338
5341
|
var G = P[q];
|
|
5339
5342
|
if (!t.isValidElementType(G)) {
|
|
@@ -5342,7 +5345,7 @@ function so() {
|
|
|
5342
5345
|
}
|
|
5343
5346
|
return null;
|
|
5344
5347
|
}
|
|
5345
|
-
return
|
|
5348
|
+
return _(T);
|
|
5346
5349
|
}
|
|
5347
5350
|
function F(T) {
|
|
5348
5351
|
function P(q, L, U, te, G) {
|
|
@@ -5352,7 +5355,7 @@ function so() {
|
|
|
5352
5355
|
}
|
|
5353
5356
|
return null;
|
|
5354
5357
|
}
|
|
5355
|
-
return
|
|
5358
|
+
return _(P);
|
|
5356
5359
|
}
|
|
5357
5360
|
function R(T) {
|
|
5358
5361
|
if (!Array.isArray(T))
|
|
@@ -5369,7 +5372,7 @@ function so() {
|
|
|
5369
5372
|
});
|
|
5370
5373
|
return new v("Invalid " + te + " `" + G + "` of value `" + String(V) + "` " + ("supplied to `" + U + "`, expected one of " + re + "."));
|
|
5371
5374
|
}
|
|
5372
|
-
return
|
|
5375
|
+
return _(P);
|
|
5373
5376
|
}
|
|
5374
5377
|
function Q(T) {
|
|
5375
5378
|
function P(q, L, U, te, G) {
|
|
@@ -5386,7 +5389,7 @@ function so() {
|
|
|
5386
5389
|
}
|
|
5387
5390
|
return null;
|
|
5388
5391
|
}
|
|
5389
|
-
return
|
|
5392
|
+
return _(P);
|
|
5390
5393
|
}
|
|
5391
5394
|
function B(T) {
|
|
5392
5395
|
if (!Array.isArray(T))
|
|
@@ -5408,13 +5411,13 @@ function so() {
|
|
|
5408
5411
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
5409
5412
|
return new v("Invalid " + V + " `" + ee + "` supplied to " + ("`" + G + "`" + ve + "."));
|
|
5410
5413
|
}
|
|
5411
|
-
return
|
|
5414
|
+
return _(L);
|
|
5412
5415
|
}
|
|
5413
5416
|
function $() {
|
|
5414
5417
|
function T(P, q, L, U, te) {
|
|
5415
5418
|
return N(P[q]) ? null : new v("Invalid " + U + " `" + te + "` supplied to " + ("`" + L + "`, expected a ReactNode."));
|
|
5416
5419
|
}
|
|
5417
|
-
return
|
|
5420
|
+
return _(T);
|
|
5418
5421
|
}
|
|
5419
5422
|
function C(T, P, q, L, U) {
|
|
5420
5423
|
return new v(
|
|
@@ -5436,7 +5439,7 @@ function so() {
|
|
|
5436
5439
|
}
|
|
5437
5440
|
return null;
|
|
5438
5441
|
}
|
|
5439
|
-
return
|
|
5442
|
+
return _(P);
|
|
5440
5443
|
}
|
|
5441
5444
|
function j(T) {
|
|
5442
5445
|
function P(q, L, U, te, G) {
|
|
@@ -5459,7 +5462,7 @@ Valid keys: ` + JSON.stringify(Object.keys(T), null, " ")
|
|
|
5459
5462
|
}
|
|
5460
5463
|
return null;
|
|
5461
5464
|
}
|
|
5462
|
-
return
|
|
5465
|
+
return _(P);
|
|
5463
5466
|
}
|
|
5464
5467
|
function N(T) {
|
|
5465
5468
|
switch (typeof T) {
|
|
@@ -6035,7 +6038,7 @@ var Zr = {
|
|
|
6035
6038
|
}, v = function(k) {
|
|
6036
6039
|
var j = u("setReturnFocus", k);
|
|
6037
6040
|
return j || (j === !1 ? !1 : k);
|
|
6038
|
-
},
|
|
6041
|
+
}, _ = function(k) {
|
|
6039
6042
|
var j = k.target, N = k.event, A = k.isBackward, W = A === void 0 ? !1 : A;
|
|
6040
6043
|
j = j || Mt(N), m();
|
|
6041
6044
|
var Z = null;
|
|
@@ -6067,7 +6070,7 @@ var Zr = {
|
|
|
6067
6070
|
} else
|
|
6068
6071
|
Z = u("fallbackFocus");
|
|
6069
6072
|
return Z;
|
|
6070
|
-
},
|
|
6073
|
+
}, y = function(k) {
|
|
6071
6074
|
var j = Mt(k);
|
|
6072
6075
|
if (!(l(j, k) >= 0)) {
|
|
6073
6076
|
if (lt(i.clickOutsideDeactivates, k)) {
|
|
@@ -6108,7 +6111,7 @@ var Zr = {
|
|
|
6108
6111
|
}) || (W = !1);
|
|
6109
6112
|
else
|
|
6110
6113
|
W = !1;
|
|
6111
|
-
W && (A =
|
|
6114
|
+
W && (A = _({
|
|
6112
6115
|
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
6113
6116
|
// outside the trap causing the focus escape we're trying to fix)
|
|
6114
6117
|
target: o.mostRecentlyFocusedNode,
|
|
@@ -6119,7 +6122,7 @@ var Zr = {
|
|
|
6119
6122
|
}, E = function(k) {
|
|
6120
6123
|
var j = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
6121
6124
|
o.recentNavEvent = k;
|
|
6122
|
-
var N =
|
|
6125
|
+
var N = _({
|
|
6123
6126
|
event: k,
|
|
6124
6127
|
isBackward: j
|
|
6125
6128
|
});
|
|
@@ -6130,20 +6133,20 @@ var Zr = {
|
|
|
6130
6133
|
return;
|
|
6131
6134
|
}
|
|
6132
6135
|
(i.isKeyForward(k) || i.isKeyBackward(k)) && E(k, i.isKeyBackward(k));
|
|
6133
|
-
},
|
|
6136
|
+
}, b = function(k) {
|
|
6134
6137
|
var j = Mt(k);
|
|
6135
6138
|
l(j, k) >= 0 || lt(i.clickOutsideDeactivates, k) || lt(i.allowOutsideClick, k) || (k.preventDefault(), k.stopImmediatePropagation());
|
|
6136
6139
|
}, F = function() {
|
|
6137
6140
|
if (o.active)
|
|
6138
6141
|
return Zr.activateTrap(s, c), o.delayInitialFocusTimer = i.delayInitialFocus ? Hr(function() {
|
|
6139
6142
|
g(f());
|
|
6140
|
-
}) : g(f()), r.addEventListener("focusin", x, !0), r.addEventListener("mousedown",
|
|
6143
|
+
}) : g(f()), r.addEventListener("focusin", x, !0), r.addEventListener("mousedown", y, {
|
|
6141
6144
|
capture: !0,
|
|
6142
6145
|
passive: !1
|
|
6143
|
-
}), r.addEventListener("touchstart",
|
|
6146
|
+
}), r.addEventListener("touchstart", y, {
|
|
6144
6147
|
capture: !0,
|
|
6145
6148
|
passive: !1
|
|
6146
|
-
}), r.addEventListener("click",
|
|
6149
|
+
}), r.addEventListener("click", b, {
|
|
6147
6150
|
capture: !0,
|
|
6148
6151
|
passive: !1
|
|
6149
6152
|
}), r.addEventListener("keydown", w, {
|
|
@@ -6152,7 +6155,7 @@ var Zr = {
|
|
|
6152
6155
|
}), c;
|
|
6153
6156
|
}, R = function() {
|
|
6154
6157
|
if (o.active)
|
|
6155
|
-
return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown",
|
|
6158
|
+
return r.removeEventListener("focusin", x, !0), r.removeEventListener("mousedown", y, !0), r.removeEventListener("touchstart", y, !0), r.removeEventListener("click", b, !0), r.removeEventListener("keydown", w, !0), c;
|
|
6156
6159
|
}, Q = function(k) {
|
|
6157
6160
|
var j = k.some(function(N) {
|
|
6158
6161
|
var A = Array.from(N.removedNodes);
|
|
@@ -6584,18 +6587,18 @@ const an = ({
|
|
|
6584
6587
|
gtmContext: f = "Modal"
|
|
6585
6588
|
}) => {
|
|
6586
6589
|
const m = H(), [p, g] = X(e), v = (x) => {
|
|
6587
|
-
x.key === "Escape" &&
|
|
6590
|
+
x.key === "Escape" && _(!1);
|
|
6588
6591
|
};
|
|
6589
6592
|
ae(() => (window.addEventListener("keyup", v), () => {
|
|
6590
6593
|
window.removeEventListener("keyup", v);
|
|
6591
6594
|
}));
|
|
6592
|
-
const
|
|
6595
|
+
const _ = (x) => {
|
|
6593
6596
|
g(x), x ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
6594
6597
|
};
|
|
6595
6598
|
ae(() => {
|
|
6596
|
-
|
|
6599
|
+
_(e);
|
|
6597
6600
|
}, [e]);
|
|
6598
|
-
const
|
|
6601
|
+
const y = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
6599
6602
|
return /* @__PURE__ */ a.jsx("div", { className: S("overlay", { open: p }), role: "dialog", children: /* @__PURE__ */ a.jsx(
|
|
6600
6603
|
qa,
|
|
6601
6604
|
{
|
|
@@ -6604,7 +6607,7 @@ const an = ({
|
|
|
6604
6607
|
"has-max-width": r
|
|
6605
6608
|
}),
|
|
6606
6609
|
hidden: !p,
|
|
6607
|
-
style:
|
|
6610
|
+
style: y,
|
|
6608
6611
|
children: e && /* @__PURE__ */ a.jsx(Jo, { children: /* @__PURE__ */ a.jsxs("div", { className: "overlay-content", children: [
|
|
6609
6612
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
6610
6613
|
c && /* @__PURE__ */ a.jsx("h2", { className: "modal-title", children: c }),
|
|
@@ -6614,7 +6617,7 @@ const an = ({
|
|
|
6614
6617
|
variant: "tertiary",
|
|
6615
6618
|
size: "medium",
|
|
6616
6619
|
icon: { icon: "close" },
|
|
6617
|
-
onClick: () =>
|
|
6620
|
+
onClick: () => _(!1),
|
|
6618
6621
|
className: "gtm-trackable",
|
|
6619
6622
|
"data-gtm-event-type": "close-modal-click",
|
|
6620
6623
|
"data-gtm-event-context": f,
|
|
@@ -6835,13 +6838,13 @@ const Xl = ({ members: t }) => {
|
|
|
6835
6838
|
gtmEvent: "learning-hub"
|
|
6836
6839
|
}
|
|
6837
6840
|
}, tc = ({ data: t, cta: e, link: n, gtmContext: r }) => {
|
|
6838
|
-
var v;
|
|
6841
|
+
var v, _;
|
|
6839
6842
|
const s = H(), [i, o] = X({
|
|
6840
6843
|
loading: !1,
|
|
6841
6844
|
registered: t.registered || !1
|
|
6842
6845
|
});
|
|
6843
6846
|
ae(() => {
|
|
6844
|
-
t.registered && o((
|
|
6847
|
+
t.registered && o((y) => ({ ...y, registered: !0 }));
|
|
6845
6848
|
}, [t.registered]);
|
|
6846
6849
|
const { customLinkText: c, startDate: d, dateHasPassed: l, pill: u, slug: f } = t, m = t.contentType;
|
|
6847
6850
|
let p = "";
|
|
@@ -6869,32 +6872,32 @@ const Xl = ({ members: t }) => {
|
|
|
6869
6872
|
children: c || s.formatMessage({ id: "card_cta_people" })
|
|
6870
6873
|
}
|
|
6871
6874
|
) : null;
|
|
6872
|
-
const g = ["microcourse", "event"];
|
|
6875
|
+
const g = ["communityPage", "microcourse", "event"];
|
|
6873
6876
|
if (e && e.onClick && g.includes(m) && u !== "premium") {
|
|
6874
|
-
const
|
|
6875
|
-
if (
|
|
6876
|
-
o((
|
|
6877
|
+
const y = i.loading || i.registered || ((_ = t == null ? void 0 : t.members) == null ? void 0 : _.isMember), x = async (E) => {
|
|
6878
|
+
if (E.preventDefault(), E.stopPropagation(), !(y || !e || !e.onClick)) {
|
|
6879
|
+
o((w) => ({ ...w, loading: !0 }));
|
|
6877
6880
|
try {
|
|
6878
|
-
const
|
|
6879
|
-
o(
|
|
6881
|
+
const w = await e.onClick(t);
|
|
6882
|
+
o(w === "success" ? () => ({ registered: !0, loading: !1 }) : (b) => ({ ...b, loading: !1 }));
|
|
6880
6883
|
} catch {
|
|
6881
|
-
o((
|
|
6884
|
+
o((b) => ({ ...b, loading: !1 }));
|
|
6882
6885
|
}
|
|
6883
6886
|
}
|
|
6884
6887
|
};
|
|
6885
6888
|
return /* @__PURE__ */ a.jsx("p", { className: "cta-wrapper", children: /* @__PURE__ */ a.jsx(
|
|
6886
6889
|
se,
|
|
6887
6890
|
{
|
|
6888
|
-
onClick:
|
|
6891
|
+
onClick: x,
|
|
6889
6892
|
className: "gtm-trackable",
|
|
6890
6893
|
size: "small",
|
|
6891
6894
|
styling: { fullWidth: !0 },
|
|
6892
|
-
disabled:
|
|
6895
|
+
disabled: y,
|
|
6893
6896
|
"data-gtm-event-context": `${r}Page-${m}: ${f}`,
|
|
6894
6897
|
"data-gtm-event-type": `${r}-${m}-register-click`,
|
|
6895
6898
|
"data-testid": "in-card-button",
|
|
6896
6899
|
children: c || s.formatMessage({
|
|
6897
|
-
id: `card_cta_${m}${
|
|
6900
|
+
id: `card_cta_${m}${y ? `_${i.loading ? "loading" : "done"}` : ""}`
|
|
6898
6901
|
})
|
|
6899
6902
|
}
|
|
6900
6903
|
) });
|
|
@@ -6943,14 +6946,14 @@ const nc = {
|
|
|
6943
6946
|
if (!v || !Kt[v])
|
|
6944
6947
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "card-wrapper" });
|
|
6945
6948
|
const {
|
|
6946
|
-
basePath:
|
|
6947
|
-
className:
|
|
6949
|
+
basePath: _ = "",
|
|
6950
|
+
className: y,
|
|
6948
6951
|
length: x,
|
|
6949
6952
|
gtmEvent: E
|
|
6950
6953
|
} = Kt[v];
|
|
6951
|
-
let w = m.slug ? `${
|
|
6954
|
+
let w = m.slug ? `${_}${m.slug}` : !1;
|
|
6952
6955
|
m.slug && (m.slug.slice(0, 4) === "http" || m.slug.slice(0, 2) === "//" || m.slug.slice(0, 6) === "mailto" || m.slug.slice(0, 3) === "tel") && (w = m.slug);
|
|
6953
|
-
const
|
|
6956
|
+
const b = { ...nc, ...x };
|
|
6954
6957
|
let F = { className: "card" };
|
|
6955
6958
|
return w && (F = {
|
|
6956
6959
|
href: w,
|
|
@@ -6961,7 +6964,7 @@ const nc = {
|
|
|
6961
6964
|
}, m.openInNewTab && (F.target = "_blank")), /* @__PURE__ */ a.jsx(
|
|
6962
6965
|
"li",
|
|
6963
6966
|
{
|
|
6964
|
-
className: S("card-wrapper text-medium",
|
|
6967
|
+
className: S("card-wrapper text-medium", y, i, {
|
|
6965
6968
|
"has-link": w,
|
|
6966
6969
|
"no-link": !w,
|
|
6967
6970
|
"has-image": m.banner
|
|
@@ -6992,7 +6995,7 @@ const nc = {
|
|
|
6992
6995
|
m.banner ? /* @__PURE__ */ a.jsxs("p", { className: "img", children: [
|
|
6993
6996
|
m.registered && /* @__PURE__ */ a.jsx(ht, { size: "small", variant: "registered", children: c.formatMessage({ id: "card_registered" }) }),
|
|
6994
6997
|
/* @__PURE__ */ a.jsx(Tt, { image: m.banner })
|
|
6995
|
-
] }) :
|
|
6998
|
+
] }) : y === "people" ? /* @__PURE__ */ a.jsx(
|
|
6996
6999
|
Ye,
|
|
6997
7000
|
{
|
|
6998
7001
|
name: m.title || "",
|
|
@@ -7006,7 +7009,7 @@ const nc = {
|
|
|
7006
7009
|
contributors: { data: m.contributors },
|
|
7007
7010
|
styling: {
|
|
7008
7011
|
size: "small",
|
|
7009
|
-
showGap:
|
|
7012
|
+
showGap: y !== "question",
|
|
7010
7013
|
showText: !0
|
|
7011
7014
|
},
|
|
7012
7015
|
multipleText: ["event", "solutionArticle"].includes(v) ? c.formatMessage({ id: `card_contributors_${v}` }) : void 0,
|
|
@@ -7016,14 +7019,14 @@ const nc = {
|
|
|
7016
7019
|
m.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: m.partner.length > 1 ? c.formatMessage(
|
|
7017
7020
|
{ id: "card_partner" },
|
|
7018
7021
|
{ partner: m.partner[0], number: m.partner.length - 1 }
|
|
7019
|
-
) : et(m.partner[0],
|
|
7022
|
+
) : et(m.partner[0], b.partner) }),
|
|
7020
7023
|
/* Text */
|
|
7021
7024
|
["title", "text", "secondaryText"].map(($) => {
|
|
7022
7025
|
const C = m[$];
|
|
7023
7026
|
if (!C)
|
|
7024
7027
|
return null;
|
|
7025
7028
|
const k = Ws($);
|
|
7026
|
-
return /* @__PURE__ */ a.jsx("p", { className: k, "data-testid": k, children: et(C,
|
|
7029
|
+
return /* @__PURE__ */ a.jsx("p", { className: k, "data-testid": k, children: et(C, b[$]) }, $);
|
|
7027
7030
|
}),
|
|
7028
7031
|
(m == null ? void 0 : m.members) && /* @__PURE__ */ a.jsxs("span", { className: "member-information", children: [
|
|
7029
7032
|
((R = m == null ? void 0 : m.members) == null ? void 0 : R.isMember) && /* @__PURE__ */ a.jsx(
|
|
@@ -7043,7 +7046,7 @@ const nc = {
|
|
|
7043
7046
|
{ count: m == null ? void 0 : m.members.count }
|
|
7044
7047
|
) })
|
|
7045
7048
|
] }),
|
|
7046
|
-
/* @__PURE__ */ a.jsx(ec, { type:
|
|
7049
|
+
/* @__PURE__ */ a.jsx(ec, { type: y || "", data: m }),
|
|
7047
7050
|
/* @__PURE__ */ a.jsx(tc, { data: m, cta: r, link: w || "", gtmContext: s })
|
|
7048
7051
|
] })
|
|
7049
7052
|
)
|
|
@@ -7110,16 +7113,16 @@ const ic = ({
|
|
|
7110
7113
|
}), { cardsPerPage: f, isLoading: m } = l, [p, g] = X({
|
|
7111
7114
|
currentPage: 0,
|
|
7112
7115
|
loadedPages: [0]
|
|
7113
|
-
}), { currentPage: v, loadedPages:
|
|
7116
|
+
}), { currentPage: v, loadedPages: _ } = p, y = e.length, x = Math.ceil(y / f), E = pe(null), w = jt(!0, !0, E == null ? void 0 : E.current);
|
|
7114
7117
|
ae(() => {
|
|
7115
7118
|
let $ = 1;
|
|
7116
|
-
w && (w >= En.fourCards ? $ = 4 : w >= En.threeCards ? $ = 3 : w >= En.twoCards && ($ = 2), $ >
|
|
7119
|
+
w && (w >= En.fourCards ? $ = 4 : w >= En.threeCards ? $ = 3 : w >= En.twoCards && ($ = 2), $ > y && ($ = y)), u((C) => ({
|
|
7117
7120
|
...C,
|
|
7118
7121
|
cardsPerPage: $,
|
|
7119
7122
|
isLoading: !1
|
|
7120
7123
|
}));
|
|
7121
|
-
}, [w,
|
|
7122
|
-
const
|
|
7124
|
+
}, [w, y]);
|
|
7125
|
+
const b = ($ = "next") => {
|
|
7123
7126
|
let C = v;
|
|
7124
7127
|
if (typeof $ == "string")
|
|
7125
7128
|
if ($ === "next")
|
|
@@ -7136,7 +7139,7 @@ const ic = ({
|
|
|
7136
7139
|
g((k) => ({
|
|
7137
7140
|
...k,
|
|
7138
7141
|
currentPage: C,
|
|
7139
|
-
loadedPages: [.../* @__PURE__ */ new Set([...
|
|
7142
|
+
loadedPages: [.../* @__PURE__ */ new Set([..._, C])]
|
|
7140
7143
|
}));
|
|
7141
7144
|
}, F = ($) => {
|
|
7142
7145
|
Ft = $.touches[0].clientX;
|
|
@@ -7144,10 +7147,10 @@ const ic = ({
|
|
|
7144
7147
|
if (Ft === null)
|
|
7145
7148
|
return;
|
|
7146
7149
|
const C = $.touches[0].clientX, k = Ft - C;
|
|
7147
|
-
k > 5 ?
|
|
7150
|
+
k > 5 ? b("next") : k < -5 && b("previous"), Ft = null;
|
|
7148
7151
|
}, Q = {
|
|
7149
7152
|
"--width": `${w || 0}px`,
|
|
7150
|
-
"--total-cards":
|
|
7153
|
+
"--total-cards": y,
|
|
7151
7154
|
"--cards-per-page": f,
|
|
7152
7155
|
"--page": v
|
|
7153
7156
|
};
|
|
@@ -7176,7 +7179,7 @@ const ic = ({
|
|
|
7176
7179
|
"data-testid": "carousel-list",
|
|
7177
7180
|
children: e.map(($, C) => {
|
|
7178
7181
|
let k = B($, C);
|
|
7179
|
-
return k && ac(C, f, v,
|
|
7182
|
+
return k && ac(C, f, v, _) ? /* @__PURE__ */ a.jsx(
|
|
7180
7183
|
Ua,
|
|
7181
7184
|
{
|
|
7182
7185
|
id: k,
|
|
@@ -7206,7 +7209,7 @@ const ic = ({
|
|
|
7206
7209
|
size: "large",
|
|
7207
7210
|
icon: { icon: "chevron_left" },
|
|
7208
7211
|
onClick: ($) => {
|
|
7209
|
-
$.preventDefault(), $.stopPropagation(),
|
|
7212
|
+
$.preventDefault(), $.stopPropagation(), b("previous");
|
|
7210
7213
|
},
|
|
7211
7214
|
screenreaderText: d.formatMessage({
|
|
7212
7215
|
id: "carousel_pagination_previous"
|
|
@@ -7221,7 +7224,7 @@ const ic = ({
|
|
|
7221
7224
|
selected: C === v
|
|
7222
7225
|
}),
|
|
7223
7226
|
onClick: (k) => {
|
|
7224
|
-
k.preventDefault(), k.stopPropagation(),
|
|
7227
|
+
k.preventDefault(), k.stopPropagation(), b(C);
|
|
7225
7228
|
},
|
|
7226
7229
|
children: /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: d.formatMessage(
|
|
7227
7230
|
{ id: "carousel_pagination_page" },
|
|
@@ -7236,7 +7239,7 @@ const ic = ({
|
|
|
7236
7239
|
size: "large",
|
|
7237
7240
|
icon: { icon: "chevron_right" },
|
|
7238
7241
|
onClick: ($) => {
|
|
7239
|
-
$.preventDefault(), $.stopPropagation(),
|
|
7242
|
+
$.preventDefault(), $.stopPropagation(), b("next");
|
|
7240
7243
|
},
|
|
7241
7244
|
screenreaderText: d.formatMessage({ id: "carousel_pagination_next" }),
|
|
7242
7245
|
disabled: v >= x - 1
|
|
@@ -7446,38 +7449,38 @@ const Ot = "languageSwitcher_", au = ({
|
|
|
7446
7449
|
if (ae(() => {
|
|
7447
7450
|
t !== f && m(t);
|
|
7448
7451
|
}, [t]), !r || !Object.values(r).some(
|
|
7449
|
-
(
|
|
7452
|
+
(_) => _ && _.post_name
|
|
7450
7453
|
))
|
|
7451
7454
|
return null;
|
|
7452
7455
|
const g = Object.keys(r), v = f !== t;
|
|
7453
7456
|
return /* @__PURE__ */ a.jsxs("div", { className: S("language-switcher text-small", o, d), children: [
|
|
7454
7457
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
7455
7458
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Ot}label` }) }),
|
|
7456
|
-
/* @__PURE__ */ a.jsx("ul", { children: g.map((
|
|
7459
|
+
/* @__PURE__ */ a.jsx("ul", { children: g.map((_) => {
|
|
7457
7460
|
var E;
|
|
7458
|
-
if (!gn[
|
|
7461
|
+
if (!gn[_])
|
|
7459
7462
|
return null;
|
|
7460
|
-
const
|
|
7461
|
-
let x = { className:
|
|
7462
|
-
if (f ===
|
|
7463
|
+
const y = (E = r[_]) == null ? void 0 : E.post_name;
|
|
7464
|
+
let x = { className: _ };
|
|
7465
|
+
if (f === _)
|
|
7463
7466
|
x["aria-label"] = l.formatMessage(
|
|
7464
7467
|
{ id: `${Ot}selected` },
|
|
7465
|
-
{ language: gn[
|
|
7468
|
+
{ language: gn[_] }
|
|
7466
7469
|
);
|
|
7467
7470
|
else {
|
|
7468
|
-
const w = oc(
|
|
7471
|
+
const w = oc(_, y, i);
|
|
7469
7472
|
x = {
|
|
7470
7473
|
...x,
|
|
7471
7474
|
href: typeof w == "string" ? w : w.url,
|
|
7472
|
-
onClick: (
|
|
7473
|
-
m(
|
|
7474
|
-
|
|
7475
|
+
onClick: (b) => {
|
|
7476
|
+
m(_), u(_), typeof s < "u" && (b.preventDefault(), b.stopPropagation(), s(
|
|
7477
|
+
_,
|
|
7475
7478
|
typeof w == "string" ? w : w.urlForRouter
|
|
7476
7479
|
));
|
|
7477
7480
|
}
|
|
7478
7481
|
};
|
|
7479
7482
|
}
|
|
7480
|
-
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ...x, fallbackElement: "span", children: gn[
|
|
7483
|
+
return /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(at, { ...x, fallbackElement: "span", children: gn[_] }) }, _);
|
|
7481
7484
|
}) }),
|
|
7482
7485
|
o !== "short" && !v && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({
|
|
7483
7486
|
id: `${Ot}translation_${e ? "original" : n ? "human" : "machine"}`
|
|
@@ -7491,9 +7494,9 @@ const Ot = "languageSwitcher_", au = ({
|
|
|
7491
7494
|
{ id: `${Ot}disclaimer` },
|
|
7492
7495
|
{
|
|
7493
7496
|
email: ft.support,
|
|
7494
|
-
link: (
|
|
7495
|
-
const
|
|
7496
|
-
return /* @__PURE__ */ a.jsx("a", { href:
|
|
7497
|
+
link: (_) => {
|
|
7498
|
+
const y = `mailto:${_}`;
|
|
7499
|
+
return /* @__PURE__ */ a.jsx("a", { href: y, children: _ });
|
|
7497
7500
|
}
|
|
7498
7501
|
}
|
|
7499
7502
|
)
|
|
@@ -7590,8 +7593,8 @@ const cc = ({
|
|
|
7590
7593
|
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: u, text: f, icon: m, ...p }, g) => {
|
|
7591
7594
|
const v = {
|
|
7592
7595
|
...p,
|
|
7593
|
-
onClick: (
|
|
7594
|
-
c(!1), typeof u == "function" && u(
|
|
7596
|
+
onClick: (_) => {
|
|
7597
|
+
c(!1), typeof u == "function" && u(_);
|
|
7595
7598
|
},
|
|
7596
7599
|
onFocus: () => {
|
|
7597
7600
|
At && (clearTimeout(At), At = !1);
|
|
@@ -7784,18 +7787,18 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7784
7787
|
const c = [], d = [];
|
|
7785
7788
|
return t.forEach(({ id: u, text: f, content: m, href: p, hasCarousel: g }, v) => {
|
|
7786
7789
|
u = r(u, f, v);
|
|
7787
|
-
const
|
|
7788
|
-
p || (
|
|
7790
|
+
const _ = i === u, y = {};
|
|
7791
|
+
p || (y["aria-controls"] = u, y.onClick = (x) => {
|
|
7789
7792
|
x.preventDefault(), x.stopPropagation(), o(u), !n && (window.location.hash = `#${u}`);
|
|
7790
7793
|
}, d.push(
|
|
7791
7794
|
/* @__PURE__ */ a.jsx(
|
|
7792
7795
|
"section",
|
|
7793
7796
|
{
|
|
7794
7797
|
id: u,
|
|
7795
|
-
hidden: !
|
|
7798
|
+
hidden: !_,
|
|
7796
7799
|
role: "tabpanel",
|
|
7797
7800
|
"aria-labelledby": `tab-${u}`,
|
|
7798
|
-
"aria-live":
|
|
7801
|
+
"aria-live": _ ? "assertive" : "off",
|
|
7799
7802
|
children: typeof m == "string" ? /* @__PURE__ */ a.jsx("p", { children: m }) : m
|
|
7800
7803
|
},
|
|
7801
7804
|
`section-${u}`
|
|
@@ -7806,10 +7809,10 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7806
7809
|
{
|
|
7807
7810
|
href: p || `#${u}`,
|
|
7808
7811
|
id: `tab-${u}`,
|
|
7809
|
-
className: S({ selected:
|
|
7812
|
+
className: S({ selected: _ }),
|
|
7810
7813
|
role: "tab",
|
|
7811
|
-
"aria-selected":
|
|
7812
|
-
...
|
|
7814
|
+
"aria-selected": _,
|
|
7815
|
+
...y,
|
|
7813
7816
|
children: f
|
|
7814
7817
|
}
|
|
7815
7818
|
) }, `tab-${u}`)
|
|
@@ -8328,7 +8331,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8328
8331
|
});
|
|
8329
8332
|
}
|
|
8330
8333
|
const p = c.order && c.order[0] && c[c.order[0]], g = p && c[c.order[0]].order, v = m && window.location.pathname === c.href;
|
|
8331
|
-
let
|
|
8334
|
+
let _ = {}, y = {};
|
|
8332
8335
|
if (p) {
|
|
8333
8336
|
const x = c.menuId || t, E = {
|
|
8334
8337
|
onClick: (w) => fe.events.onClick(w, { id: x, callback: s, isOpen: r[x] }),
|
|
@@ -8337,7 +8340,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8337
8340
|
onMouseLeave: () => fe.events.onBlur({ id: x, callback: s }),
|
|
8338
8341
|
onMouseEnter: () => fe.events.onMouseEnter({ id: x, callback: s })
|
|
8339
8342
|
};
|
|
8340
|
-
n && (g && (
|
|
8343
|
+
n && (g && (_ = {
|
|
8341
8344
|
...E,
|
|
8342
8345
|
onKeyPress: (w) => {
|
|
8343
8346
|
w.key === "Enter" && fe.events.onClick(w, { id: x, callback: s, isOpen: r[x] });
|
|
@@ -8347,8 +8350,8 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8347
8350
|
"aria-haspopup": !0,
|
|
8348
8351
|
"aria-expanded": r[x],
|
|
8349
8352
|
"aria-controls": x
|
|
8350
|
-
}),
|
|
8351
|
-
...
|
|
8353
|
+
}), y = { hidden: x in r ? !r[x] : !0 }), g || (y = {
|
|
8354
|
+
...y,
|
|
8352
8355
|
...E
|
|
8353
8356
|
});
|
|
8354
8357
|
}
|
|
@@ -8362,14 +8365,14 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8362
8365
|
active: v
|
|
8363
8366
|
}),
|
|
8364
8367
|
role: "none",
|
|
8365
|
-
...
|
|
8368
|
+
..._,
|
|
8366
8369
|
children: [
|
|
8367
8370
|
m ? Y.createElement(
|
|
8368
8371
|
u ? se : "a",
|
|
8369
8372
|
m,
|
|
8370
8373
|
o.formatMessage({ id: f })
|
|
8371
8374
|
) : o.formatMessage({ id: f }),
|
|
8372
|
-
c.order && /* @__PURE__ */ a.jsx("ul", { ...
|
|
8375
|
+
c.order && /* @__PURE__ */ a.jsx("ul", { ...y, children: c.order.map((x) => {
|
|
8373
8376
|
if (!c[x])
|
|
8374
8377
|
return null;
|
|
8375
8378
|
const E = {
|
|
@@ -8619,9 +8622,9 @@ const bc = () => {
|
|
|
8619
8622
|
ae(() => {
|
|
8620
8623
|
window.scrollTo(0, 0);
|
|
8621
8624
|
}, [g]);
|
|
8622
|
-
const v = Bt(t, { locale: c }),
|
|
8625
|
+
const v = Bt(t, { locale: c }), _ = Bt(e, {
|
|
8623
8626
|
locale: c
|
|
8624
|
-
}),
|
|
8627
|
+
}), y = Bt(n, {
|
|
8625
8628
|
locale: c
|
|
8626
8629
|
}), x = {};
|
|
8627
8630
|
return u !== "default" && (x[u] = !0), f !== "default" && (x[f] = !0), m !== "default" && (x[m] = !0), /* @__PURE__ */ a.jsx(Ps, { onError: r, fallback: /* @__PURE__ */ a.jsx(bc, {}), children: /* @__PURE__ */ a.jsx(xs, { fallback: null, children: /* @__PURE__ */ a.jsxs(
|
|
@@ -8632,13 +8635,13 @@ const bc = () => {
|
|
|
8632
8635
|
children: [
|
|
8633
8636
|
/* @__PURE__ */ a.jsx(Ha, { showNavigation: d }),
|
|
8634
8637
|
/* @__PURE__ */ a.jsxs("section", { id: "content-wrapper", children: [
|
|
8635
|
-
|
|
8638
|
+
_ && /* @__PURE__ */ a.jsx(
|
|
8636
8639
|
"div",
|
|
8637
8640
|
{
|
|
8638
8641
|
className: S("additional-content prepended", {
|
|
8639
8642
|
"large-modal": p === "large"
|
|
8640
8643
|
}),
|
|
8641
|
-
children:
|
|
8644
|
+
children: _
|
|
8642
8645
|
}
|
|
8643
8646
|
),
|
|
8644
8647
|
Y.createElement(u === "bold" ? qa : "div", {
|
|
@@ -8647,7 +8650,7 @@ const bc = () => {
|
|
|
8647
8650
|
className: S({ "large-modal": p === "large" })
|
|
8648
8651
|
})
|
|
8649
8652
|
] }),
|
|
8650
|
-
|
|
8653
|
+
y && /* @__PURE__ */ a.jsx("div", { className: "additional-content appended", children: y }),
|
|
8651
8654
|
l && /* @__PURE__ */ a.jsx(Za, {}),
|
|
8652
8655
|
/* @__PURE__ */ a.jsx(gc, {})
|
|
8653
8656
|
]
|
|
@@ -8874,12 +8877,12 @@ const fu = ({
|
|
|
8874
8877
|
({
|
|
8875
8878
|
completed: g,
|
|
8876
8879
|
completionTime: v,
|
|
8877
|
-
contentType:
|
|
8878
|
-
icon:
|
|
8880
|
+
contentType: _,
|
|
8881
|
+
icon: y,
|
|
8879
8882
|
image: x,
|
|
8880
8883
|
isIntroduction: E,
|
|
8881
8884
|
optional: w,
|
|
8882
|
-
slug:
|
|
8885
|
+
slug: b,
|
|
8883
8886
|
subsectionId: F,
|
|
8884
8887
|
title: R,
|
|
8885
8888
|
type: Q
|
|
@@ -8889,17 +8892,17 @@ const fu = ({
|
|
|
8889
8892
|
"li",
|
|
8890
8893
|
{
|
|
8891
8894
|
className: S({
|
|
8892
|
-
article:
|
|
8893
|
-
discussion:
|
|
8894
|
-
quiz:
|
|
8895
|
-
completed: g &&
|
|
8895
|
+
article: _ === St.ARTICLE,
|
|
8896
|
+
discussion: _ === St.DISCUSSION,
|
|
8897
|
+
quiz: _ === St.QUIZ,
|
|
8898
|
+
completed: g && _ === St.ARTICLE,
|
|
8896
8899
|
locked: !B
|
|
8897
8900
|
}),
|
|
8898
8901
|
...$,
|
|
8899
8902
|
children: /* @__PURE__ */ a.jsx(
|
|
8900
8903
|
at,
|
|
8901
8904
|
{
|
|
8902
|
-
href: B ? `/microcourses/en/${c}/${
|
|
8905
|
+
href: B ? `/microcourses/en/${c}/${b}` : void 0,
|
|
8903
8906
|
fallbackElement: "span",
|
|
8904
8907
|
className: "inner",
|
|
8905
8908
|
gtmContext: `MicrocourseOutline${zs(R)}`,
|
|
@@ -8919,17 +8922,17 @@ const fu = ({
|
|
|
8919
8922
|
wc,
|
|
8920
8923
|
{
|
|
8921
8924
|
completionTime: v,
|
|
8922
|
-
icon:
|
|
8925
|
+
icon: y,
|
|
8923
8926
|
optional: w,
|
|
8924
8927
|
type: Q,
|
|
8925
|
-
children: u && u[
|
|
8928
|
+
children: u && u[b] && /* @__PURE__ */ a.jsx("span", { className: "quiz-score", children: `${u[b]}%` })
|
|
8926
8929
|
}
|
|
8927
8930
|
)
|
|
8928
8931
|
] })
|
|
8929
8932
|
}
|
|
8930
8933
|
)
|
|
8931
8934
|
},
|
|
8932
|
-
|
|
8935
|
+
b
|
|
8933
8936
|
);
|
|
8934
8937
|
}
|
|
8935
8938
|
) })
|
|
@@ -8999,7 +9002,7 @@ const we = "discussion_form_", ar = ({
|
|
|
8999
9002
|
var $, C, k;
|
|
9000
9003
|
const u = H(), f = Ee(De), [m, p] = X(
|
|
9001
9004
|
n.isEditing && n.isEditing.text || ""
|
|
9002
|
-
), [g, v] = X(c.error || !1), [
|
|
9005
|
+
), [g, v] = X(c.error || !1), [_, y] = X(!1), x = pe(null);
|
|
9003
9006
|
if (r || (r = x), n.isLoading)
|
|
9004
9007
|
return /* @__PURE__ */ a.jsx(
|
|
9005
9008
|
Se,
|
|
@@ -9029,11 +9032,11 @@ const we = "discussion_form_", ar = ({
|
|
|
9029
9032
|
const j = (($ = t.slugs) == null ? void 0 : $.reply) || ((C = t.slugs) == null ? void 0 : C.answer) || ((k = t.slugs) == null ? void 0 : k.question) || "";
|
|
9030
9033
|
j && (w = `${w}-${j.slice(-15)}`);
|
|
9031
9034
|
}
|
|
9032
|
-
const
|
|
9035
|
+
const b = async (j) => {
|
|
9033
9036
|
var A;
|
|
9034
9037
|
if (j.preventDefault(), j.stopPropagation(), !f || !f.id || !e || R)
|
|
9035
9038
|
return;
|
|
9036
|
-
Dt && clearTimeout(Dt),
|
|
9039
|
+
Dt && clearTimeout(Dt), y("submitting");
|
|
9037
9040
|
const N = window.location.pathname;
|
|
9038
9041
|
try {
|
|
9039
9042
|
let W;
|
|
@@ -9064,7 +9067,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9064
9067
|
break;
|
|
9065
9068
|
}
|
|
9066
9069
|
await Ks(1e3), d.callback && await d.callback(W), Dt = setTimeout(() => {
|
|
9067
|
-
p(""),
|
|
9070
|
+
p(""), y("submitted");
|
|
9068
9071
|
const Z = new Event("discussionFormSubmitted");
|
|
9069
9072
|
document.dispatchEvent(Z), F();
|
|
9070
9073
|
}, 500);
|
|
@@ -9085,9 +9088,9 @@ const we = "discussion_form_", ar = ({
|
|
|
9085
9088
|
}
|
|
9086
9089
|
}, F = () => {
|
|
9087
9090
|
Dt = setTimeout(() => {
|
|
9088
|
-
v(!1),
|
|
9091
|
+
v(!1), y(!1);
|
|
9089
9092
|
}, 5e3);
|
|
9090
|
-
}, R = !m || !ni(m), Q =
|
|
9093
|
+
}, R = !m || !ni(m), Q = _ === "submitting", B = [];
|
|
9091
9094
|
return (n.isEditing && !Q || c.cancel) && B.push({
|
|
9092
9095
|
variant: "secondary",
|
|
9093
9096
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -9102,12 +9105,12 @@ const we = "discussion_form_", ar = ({
|
|
|
9102
9105
|
size: { mobile: "small", 600: "medium" },
|
|
9103
9106
|
onClick: (j) => {
|
|
9104
9107
|
if (n.isEditing) {
|
|
9105
|
-
|
|
9108
|
+
y("submitting"), d.handleSaveEdit && d.handleSaveEdit(
|
|
9106
9109
|
x.current && "value" in x.current ? x.current.value : ""
|
|
9107
9110
|
);
|
|
9108
9111
|
return;
|
|
9109
9112
|
}
|
|
9110
|
-
|
|
9113
|
+
b(j);
|
|
9111
9114
|
},
|
|
9112
9115
|
className: "gtm-trackable",
|
|
9113
9116
|
"data-gtm-event-context": l,
|
|
@@ -9149,7 +9152,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9149
9152
|
"action"
|
|
9150
9153
|
),
|
|
9151
9154
|
onChange: E,
|
|
9152
|
-
value:
|
|
9155
|
+
value: _ === "submitting" && !g ? "" : m,
|
|
9153
9156
|
maxLength: i,
|
|
9154
9157
|
"aria-invalid": !!g,
|
|
9155
9158
|
"aria-errormessage": "error-message",
|
|
@@ -9172,7 +9175,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9172
9175
|
)
|
|
9173
9176
|
}) }),
|
|
9174
9177
|
/* @__PURE__ */ a.jsx(kt, { buttons: B }),
|
|
9175
|
-
|
|
9178
|
+
_ === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Wt, { className: "success", "data-testid": "success", children: $e(u.formatMessage, `${we}success`, t.type, "action") }),
|
|
9176
9179
|
g && /* @__PURE__ */ a.jsx(Wt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof g == "string" ? g.includes(" ") ? g : u.formatMessage(
|
|
9177
9180
|
{ id: g },
|
|
9178
9181
|
{
|
|
@@ -9246,11 +9249,11 @@ const An = () => {
|
|
|
9246
9249
|
ae(() => {
|
|
9247
9250
|
p(s);
|
|
9248
9251
|
}, [s]);
|
|
9249
|
-
const [u, f] = X(e), [m, p] = X(s), [g, v] = X(!1), [
|
|
9252
|
+
const [u, f] = X(e), [m, p] = X(s), [g, v] = X(!1), [_, y] = X(!1), x = wt(
|
|
9250
9253
|
() => Ec(n, Dn),
|
|
9251
9254
|
[n]
|
|
9252
|
-
), E = (
|
|
9253
|
-
if (
|
|
9255
|
+
), E = (b) => {
|
|
9256
|
+
if (b.preventDefault(), b.stopPropagation(), y(!1), bt)
|
|
9254
9257
|
return An(), !1;
|
|
9255
9258
|
if (An(), g || !o)
|
|
9256
9259
|
return !1;
|
|
@@ -9258,8 +9261,8 @@ const An = () => {
|
|
|
9258
9261
|
}, w = async () => {
|
|
9259
9262
|
if (An(), g || !o)
|
|
9260
9263
|
return !1;
|
|
9261
|
-
let
|
|
9262
|
-
|
|
9264
|
+
let b = m ? u - 1 : u + 1;
|
|
9265
|
+
b < 0 && (b = 0), v(!0), f(b), p(!m);
|
|
9263
9266
|
try {
|
|
9264
9267
|
if (i && i.slugs) {
|
|
9265
9268
|
const F = Tc(i.slugs);
|
|
@@ -9282,16 +9285,16 @@ const An = () => {
|
|
|
9282
9285
|
}),
|
|
9283
9286
|
onClick: E,
|
|
9284
9287
|
onMouseEnter: () => {
|
|
9285
|
-
|
|
9288
|
+
y(!0);
|
|
9286
9289
|
},
|
|
9287
9290
|
onMouseLeave: () => {
|
|
9288
|
-
|
|
9291
|
+
y(!1);
|
|
9289
9292
|
},
|
|
9290
9293
|
onFocus: () => {
|
|
9291
|
-
|
|
9294
|
+
y(!0);
|
|
9292
9295
|
},
|
|
9293
9296
|
onBlur: () => {
|
|
9294
|
-
|
|
9297
|
+
y(!1);
|
|
9295
9298
|
},
|
|
9296
9299
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
9297
9300
|
/* @__PURE__ */ a.jsx(
|
|
@@ -9330,17 +9333,17 @@ const An = () => {
|
|
|
9330
9333
|
)
|
|
9331
9334
|
}
|
|
9332
9335
|
),
|
|
9333
|
-
n && /* @__PURE__ */ a.jsx(_i, { isOpen:
|
|
9334
|
-
x.map((
|
|
9336
|
+
n && /* @__PURE__ */ a.jsx(_i, { isOpen: _, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
9337
|
+
x.map((b) => typeof b == "string" || !b.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
9335
9338
|
at,
|
|
9336
9339
|
{
|
|
9337
|
-
href:
|
|
9340
|
+
href: b.id ? `/profiles/${b.id}` : void 0,
|
|
9338
9341
|
gtmContext: "Likes",
|
|
9339
9342
|
gtmType: "liked-name-click",
|
|
9340
9343
|
onClick: (F) => F == null ? void 0 : F.stopPropagation(),
|
|
9341
|
-
children:
|
|
9344
|
+
children: b.name
|
|
9342
9345
|
}
|
|
9343
|
-
) },
|
|
9346
|
+
) }, b.id || window.btoa(b.name))),
|
|
9344
9347
|
e > Dn && /* @__PURE__ */ a.jsx("li", { children: l.formatMessage(
|
|
9345
9348
|
{ id: "discussion_likes_more" },
|
|
9346
9349
|
{ number: e - Dn }
|
|
@@ -9382,9 +9385,9 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9382
9385
|
className: p,
|
|
9383
9386
|
gtmContext: g = "DiscussionAnswer",
|
|
9384
9387
|
children: v,
|
|
9385
|
-
isTruncated:
|
|
9388
|
+
isTruncated: _ = !1
|
|
9386
9389
|
}) => {
|
|
9387
|
-
const
|
|
9390
|
+
const y = H(), x = Ee(De), E = Ee(sr), { author: w, canLike: b, createdAt: F, id: R, likes: Q = 0, userLiked: B, comments: $ = 0 } = e, C = x && x.id && typeof w != "string" && w.id && w.id === x.id || !1, k = typeof b == "boolean" ? b : n ? !C : !1, j = C && (!e.createdAt || Ys(e.createdAt, 10, "seconds")), N = pe(null), [A, W] = X({
|
|
9388
9391
|
body: e && e.body || "",
|
|
9389
9392
|
isEditing: !1,
|
|
9390
9393
|
didEdit: e && e.isEdited || !1
|
|
@@ -9417,7 +9420,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9417
9420
|
};
|
|
9418
9421
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
9419
9422
|
return /* @__PURE__ */ a.jsx(Se, { className: "discussion-card discussion-post" });
|
|
9420
|
-
const te =
|
|
9423
|
+
const te = _ ? et(A.body, Cc) : A.body, G = async (O) => {
|
|
9421
9424
|
O || (O = ""), q("");
|
|
9422
9425
|
try {
|
|
9423
9426
|
if (!Rs(O, A.body)) {
|
|
@@ -9443,14 +9446,14 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9443
9446
|
}
|
|
9444
9447
|
}, re = [
|
|
9445
9448
|
{
|
|
9446
|
-
text:
|
|
9449
|
+
text: y.formatMessage({ id: `${Me}moreMenu_report` }),
|
|
9447
9450
|
onClick: (O) => {
|
|
9448
9451
|
O.stopPropagation();
|
|
9449
9452
|
},
|
|
9450
9453
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
9451
|
-
|
|
9454
|
+
y.formatMessage({ id: `${Me}report_subject` })
|
|
9452
9455
|
)}&body=${encodeURI(
|
|
9453
|
-
|
|
9456
|
+
y.formatMessage(
|
|
9454
9457
|
{ id: `${Me}report_body` },
|
|
9455
9458
|
{
|
|
9456
9459
|
contentType: e.type || "",
|
|
@@ -9464,7 +9467,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9464
9467
|
];
|
|
9465
9468
|
return n && C && re.push(
|
|
9466
9469
|
{
|
|
9467
|
-
text:
|
|
9470
|
+
text: y.formatMessage({ id: `${Me}moreMenu_edit` }),
|
|
9468
9471
|
onClick: () => W({ ...A, isEditing: !0 }),
|
|
9469
9472
|
icon: "pencil-paper",
|
|
9470
9473
|
className: "gtm-trackable",
|
|
@@ -9472,7 +9475,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9472
9475
|
"data-gtm-event-type": `edit-${e.type}-click`
|
|
9473
9476
|
},
|
|
9474
9477
|
{
|
|
9475
|
-
text:
|
|
9478
|
+
text: y.formatMessage({ id: `${Me}moreMenu_delete` }),
|
|
9476
9479
|
onClick: (O) => {
|
|
9477
9480
|
O.preventDefault(), O.stopPropagation(), z(!0);
|
|
9478
9481
|
},
|
|
@@ -9523,10 +9526,10 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9523
9526
|
},
|
|
9524
9527
|
maxLength: e.type === "question" ? 250 : 5e4,
|
|
9525
9528
|
forceShow: {
|
|
9526
|
-
error: P !== "" && P !== "delete-error" ?
|
|
9529
|
+
error: P !== "" && P !== "delete-error" ? y.formatMessage(
|
|
9527
9530
|
{ id: P },
|
|
9528
9531
|
{
|
|
9529
|
-
action:
|
|
9532
|
+
action: y.formatMessage({
|
|
9530
9533
|
id: `discussion_action_${e.type}`
|
|
9531
9534
|
})
|
|
9532
9535
|
}
|
|
@@ -9604,13 +9607,13 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9604
9607
|
className: "gtm-trackable",
|
|
9605
9608
|
"data-gtm-event-context": g,
|
|
9606
9609
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9607
|
-
screenreaderText:
|
|
9610
|
+
screenreaderText: y.formatMessage(
|
|
9608
9611
|
{ id: `${Me}comments_screenReader` },
|
|
9609
9612
|
{ count: $ }
|
|
9610
9613
|
)
|
|
9611
9614
|
}
|
|
9612
9615
|
),
|
|
9613
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
9616
|
+
/* @__PURE__ */ a.jsx("span", { children: y.formatMessage(
|
|
9614
9617
|
{ id: `${Me}comments` },
|
|
9615
9618
|
{ count: $ }
|
|
9616
9619
|
) })
|
|
@@ -9624,7 +9627,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9624
9627
|
size: "medium",
|
|
9625
9628
|
styling: { muted: !0 },
|
|
9626
9629
|
onClick: V,
|
|
9627
|
-
children:
|
|
9630
|
+
children: y.formatMessage({ id: `${Me}reply` })
|
|
9628
9631
|
}
|
|
9629
9632
|
) }),
|
|
9630
9633
|
/* @__PURE__ */ a.jsx(
|
|
@@ -9650,30 +9653,30 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9650
9653
|
functions: { onOpen: () => {
|
|
9651
9654
|
}, onClose: () => z(!1) },
|
|
9652
9655
|
forceShow: {
|
|
9653
|
-
error: P === "delete-error" ?
|
|
9656
|
+
error: P === "delete-error" ? y.formatMessage(
|
|
9654
9657
|
{ id: "discussion_delete_error" },
|
|
9655
9658
|
{
|
|
9656
|
-
action:
|
|
9659
|
+
action: y.formatMessage({
|
|
9657
9660
|
id: `discussion_action_${e.type}`
|
|
9658
9661
|
})
|
|
9659
9662
|
}
|
|
9660
9663
|
) : !1
|
|
9661
9664
|
},
|
|
9662
|
-
title:
|
|
9665
|
+
title: y.formatMessage(
|
|
9663
9666
|
{ id: "discussion_delete_title" },
|
|
9664
|
-
{ action:
|
|
9667
|
+
{ action: y.formatMessage({ id: `discussion_action_${e.type}` }) }
|
|
9665
9668
|
),
|
|
9666
9669
|
buttons: [
|
|
9667
9670
|
{
|
|
9668
9671
|
variant: "secondary",
|
|
9669
9672
|
onClick: () => z(!1),
|
|
9670
|
-
children:
|
|
9673
|
+
children: y.formatMessage({ id: "discussion_delete_cancel" })
|
|
9671
9674
|
},
|
|
9672
9675
|
{
|
|
9673
9676
|
variant: "primary",
|
|
9674
9677
|
className: "destructive",
|
|
9675
9678
|
onClick: ee,
|
|
9676
|
-
children:
|
|
9679
|
+
children: y.formatMessage({ id: "discussion_delete_delete" })
|
|
9677
9680
|
}
|
|
9678
9681
|
],
|
|
9679
9682
|
gtmContext: `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}:${e.slug}`,
|
|
@@ -9683,7 +9686,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9683
9686
|
id: "discussion_delete_text",
|
|
9684
9687
|
values: {
|
|
9685
9688
|
p: (O) => /* @__PURE__ */ a.jsx("p", { children: O }),
|
|
9686
|
-
action:
|
|
9689
|
+
action: y.formatMessage({
|
|
9687
9690
|
id: `discussion_action_${e.type}`
|
|
9688
9691
|
})
|
|
9689
9692
|
}
|
|
@@ -10126,9 +10129,9 @@ function Wc({
|
|
|
10126
10129
|
},
|
|
10127
10130
|
user: d,
|
|
10128
10131
|
...l
|
|
10129
|
-
}, f = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }), g = Hc({ ...u, mutationFn: s }), v = Vc({ ...u, mutationFn: i }), { activities:
|
|
10132
|
+
}, f = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }), g = Hc({ ...u, mutationFn: s }), v = Vc({ ...u, mutationFn: i }), { activities: _, ...y } = Zc({ queryKey: o, queryFn: r });
|
|
10130
10133
|
return {
|
|
10131
|
-
activities:
|
|
10134
|
+
activities: _,
|
|
10132
10135
|
mutations: {
|
|
10133
10136
|
create: f,
|
|
10134
10137
|
edit: m,
|
|
@@ -10137,7 +10140,7 @@ function Wc({
|
|
|
10137
10140
|
unlike: v
|
|
10138
10141
|
},
|
|
10139
10142
|
user: d,
|
|
10140
|
-
...
|
|
10143
|
+
...y
|
|
10141
10144
|
};
|
|
10142
10145
|
}
|
|
10143
10146
|
function zc({
|
|
@@ -10259,8 +10262,8 @@ const pu = ({
|
|
|
10259
10262
|
fetchNextPage: l,
|
|
10260
10263
|
hasNextPage: u,
|
|
10261
10264
|
isLoading: f,
|
|
10262
|
-
mutations: { create: m, edit: p, remove: g, like: v, unlike:
|
|
10263
|
-
user:
|
|
10265
|
+
mutations: { create: m, edit: p, remove: g, like: v, unlike: _ },
|
|
10266
|
+
user: y
|
|
10264
10267
|
} = Wc({
|
|
10265
10268
|
queryKey: [t, e, "activities"],
|
|
10266
10269
|
queryFns: r
|
|
@@ -10289,7 +10292,7 @@ const pu = ({
|
|
|
10289
10292
|
c == null ? void 0 : c.map((E, w) => {
|
|
10290
10293
|
var A, W, Z, z, K, T, P, q;
|
|
10291
10294
|
const {
|
|
10292
|
-
id:
|
|
10295
|
+
id: b,
|
|
10293
10296
|
own_reactions: F,
|
|
10294
10297
|
latest_reactions: R,
|
|
10295
10298
|
reaction_counts: Q
|
|
@@ -10299,7 +10302,7 @@ const pu = ({
|
|
|
10299
10302
|
id: (U = L == null ? void 0 : L.user) == null ? void 0 : U.id,
|
|
10300
10303
|
name: (G = (te = L == null ? void 0 : L.user) == null ? void 0 : te.data) == null ? void 0 : G.name
|
|
10301
10304
|
};
|
|
10302
|
-
}) : !1, j = E == null ? void 0 : E.actor, N = (j == null ? void 0 : j.id) === (
|
|
10305
|
+
}) : !1, j = E == null ? void 0 : E.actor, N = (j == null ? void 0 : j.id) === (y == null ? void 0 : y.id);
|
|
10303
10306
|
return /* @__PURE__ */ a.jsxs(yt, { children: [
|
|
10304
10307
|
/* @__PURE__ */ a.jsx(
|
|
10305
10308
|
cn,
|
|
@@ -10311,9 +10314,9 @@ const pu = ({
|
|
|
10311
10314
|
createdAt: (E == null ? void 0 : E.time) || "",
|
|
10312
10315
|
slugs: {
|
|
10313
10316
|
question: `${t}/${e}`,
|
|
10314
|
-
answer:
|
|
10317
|
+
answer: b
|
|
10315
10318
|
},
|
|
10316
|
-
slug:
|
|
10319
|
+
slug: b,
|
|
10317
10320
|
author: {
|
|
10318
10321
|
id: j == null ? void 0 : j.id,
|
|
10319
10322
|
name: (z = j == null ? void 0 : j.data) == null ? void 0 : z.name,
|
|
@@ -10330,19 +10333,19 @@ const pu = ({
|
|
|
10330
10333
|
peopleWhoLiked: k
|
|
10331
10334
|
},
|
|
10332
10335
|
links: {
|
|
10333
|
-
post: `${t}/${e}/${
|
|
10334
|
-
comments: `${t}/${e}/${
|
|
10336
|
+
post: `${t}/${e}/${b}`,
|
|
10337
|
+
comments: `${t}/${e}/${b}`
|
|
10335
10338
|
},
|
|
10336
10339
|
functions: {
|
|
10337
10340
|
content: {
|
|
10338
10341
|
createContent: () => null,
|
|
10339
|
-
deleteContent: () => g({ activityId:
|
|
10342
|
+
deleteContent: () => g({ activityId: b }),
|
|
10340
10343
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10341
|
-
updateContent: (L, { body: U }) => p({ activityId:
|
|
10344
|
+
updateContent: (L, { body: U }) => p({ activityId: b, content: U })
|
|
10342
10345
|
},
|
|
10343
10346
|
likes: {
|
|
10344
|
-
createLike: () => v({ activityId:
|
|
10345
|
-
deleteLike: () =>
|
|
10347
|
+
createLike: () => v({ activityId: b }),
|
|
10348
|
+
deleteLike: () => _({ activityId: b, reactionId: C })
|
|
10346
10349
|
},
|
|
10347
10350
|
comments: {
|
|
10348
10351
|
openComments: () => null
|
|
@@ -10352,7 +10355,7 @@ const pu = ({
|
|
|
10352
10355
|
}
|
|
10353
10356
|
),
|
|
10354
10357
|
x > w + 1 && /* @__PURE__ */ a.jsx(Oe, {})
|
|
10355
|
-
] },
|
|
10358
|
+
] }, b);
|
|
10356
10359
|
}),
|
|
10357
10360
|
!f && /* @__PURE__ */ a.jsx(
|
|
10358
10361
|
sn,
|
|
@@ -10983,9 +10986,9 @@ function es({
|
|
|
10983
10986
|
},
|
|
10984
10987
|
user: d,
|
|
10985
10988
|
...l
|
|
10986
|
-
}, f = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }), g = el({ ...u, mutationFn: s }), v = tl({ ...u, mutationFn: i }), { replies:
|
|
10989
|
+
}, f = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }), g = el({ ...u, mutationFn: s }), v = tl({ ...u, mutationFn: i }), { replies: _, ...y } = Xc({ queryKey: o, queryFn: r });
|
|
10987
10990
|
return {
|
|
10988
|
-
replies:
|
|
10991
|
+
replies: _,
|
|
10989
10992
|
mutations: {
|
|
10990
10993
|
create: f,
|
|
10991
10994
|
edit: m,
|
|
@@ -10994,7 +10997,7 @@ function es({
|
|
|
10994
10997
|
unlike: v
|
|
10995
10998
|
},
|
|
10996
10999
|
user: d,
|
|
10997
|
-
...
|
|
11000
|
+
...y
|
|
10998
11001
|
};
|
|
10999
11002
|
}
|
|
11000
11003
|
function Jc({
|
|
@@ -11135,7 +11138,7 @@ const ol = ({
|
|
|
11135
11138
|
queryFns: {
|
|
11136
11139
|
...i,
|
|
11137
11140
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11138
|
-
list: (
|
|
11141
|
+
list: (_) => i.list({ ..._, reactionId: r })
|
|
11139
11142
|
}
|
|
11140
11143
|
});
|
|
11141
11144
|
return /* @__PURE__ */ a.jsx(
|
|
@@ -11153,18 +11156,18 @@ const ol = ({
|
|
|
11153
11156
|
},
|
|
11154
11157
|
functions: {
|
|
11155
11158
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11156
|
-
create: (
|
|
11159
|
+
create: (_, { body: y }) => u({ activityId: n, replyId: r, content: y })
|
|
11157
11160
|
},
|
|
11158
11161
|
meta: { isEditing: !1, showSuccessMessage: !1 }
|
|
11159
11162
|
},
|
|
11160
|
-
children: o && o.length > 0 ? o == null ? void 0 : o.map((
|
|
11163
|
+
children: o && o.length > 0 ? o == null ? void 0 : o.map((_) => {
|
|
11161
11164
|
var A, W, Z, z, K, T, P, q, L, U, te, G;
|
|
11162
11165
|
const {
|
|
11163
|
-
id:
|
|
11166
|
+
id: y,
|
|
11164
11167
|
own_children: x,
|
|
11165
11168
|
latest_children: E,
|
|
11166
11169
|
children_counts: w
|
|
11167
|
-
} =
|
|
11170
|
+
} = _, F = (((A = x == null ? void 0 : x.like) == null ? void 0 : A.length) || 0) > 0 ? (W = x == null ? void 0 : x.like) == null ? void 0 : W.find((V) => {
|
|
11168
11171
|
var ee;
|
|
11169
11172
|
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (v == null ? void 0 : v.id);
|
|
11170
11173
|
}) : !1, R = F ? F == null ? void 0 : F.id : "", Q = !!F, $ = (((Z = E == null ? void 0 : E.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = E == null ? void 0 : E.like) == null ? void 0 : z.map((V) => {
|
|
@@ -11173,25 +11176,25 @@ const ol = ({
|
|
|
11173
11176
|
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11174
11177
|
name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
|
|
11175
11178
|
};
|
|
11176
|
-
}) : !1, C =
|
|
11179
|
+
}) : !1, C = _ == null ? void 0 : _.user, k = (C == null ? void 0 : C.id) === (v == null ? void 0 : v.id), j = on(s, k), N = typeof _.data.content == "string" ? (K = _ == null ? void 0 : _.data) == null ? void 0 : K.content : (
|
|
11177
11180
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11178
|
-
((P = (T =
|
|
11181
|
+
((P = (T = _ == null ? void 0 : _.data) == null ? void 0 : T.content) == null ? void 0 : P.text) || ""
|
|
11179
11182
|
);
|
|
11180
11183
|
return /* @__PURE__ */ a.jsx(
|
|
11181
11184
|
cn,
|
|
11182
11185
|
{
|
|
11183
11186
|
content: {
|
|
11184
|
-
id:
|
|
11187
|
+
id: y,
|
|
11185
11188
|
type: "reply",
|
|
11186
11189
|
body: N,
|
|
11187
11190
|
canLike: j,
|
|
11188
|
-
createdAt:
|
|
11191
|
+
createdAt: _ == null ? void 0 : _.created_at,
|
|
11189
11192
|
slugs: {
|
|
11190
11193
|
question: `${t}/${e}`,
|
|
11191
11194
|
answer: n,
|
|
11192
11195
|
// Stop-gap solution to avoid having to change the DiscussionPost component
|
|
11193
11196
|
// The `reply` is currently used to define the form ID which handles the focus
|
|
11194
|
-
reply:
|
|
11197
|
+
reply: _ == null ? void 0 : _.parent
|
|
11195
11198
|
},
|
|
11196
11199
|
slug: "",
|
|
11197
11200
|
author: {
|
|
@@ -11211,18 +11214,18 @@ const ol = ({
|
|
|
11211
11214
|
functions: {
|
|
11212
11215
|
content: {
|
|
11213
11216
|
createContent: () => null,
|
|
11214
|
-
deleteContent: () => p({ replyId:
|
|
11217
|
+
deleteContent: () => p({ replyId: y }),
|
|
11215
11218
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11216
|
-
updateContent: (V, { body: ee }) => f({ replyId:
|
|
11219
|
+
updateContent: (V, { body: ee }) => f({ replyId: y, content: ee })
|
|
11217
11220
|
},
|
|
11218
11221
|
likes: {
|
|
11219
|
-
createLike: () => m({ replyId:
|
|
11220
|
-
deleteLike: () => g({ replyId:
|
|
11222
|
+
createLike: () => m({ replyId: y }),
|
|
11223
|
+
deleteLike: () => g({ replyId: y, reactionId: R })
|
|
11221
11224
|
},
|
|
11222
11225
|
comments: {}
|
|
11223
11226
|
}
|
|
11224
11227
|
},
|
|
11225
|
-
|
|
11228
|
+
y
|
|
11226
11229
|
);
|
|
11227
11230
|
}) : null
|
|
11228
11231
|
}
|
|
@@ -11240,7 +11243,7 @@ const ol = ({
|
|
|
11240
11243
|
fetchNextPage: u,
|
|
11241
11244
|
hasNextPage: f,
|
|
11242
11245
|
isLoading: m,
|
|
11243
|
-
mutations: { create: p, edit: g, like: v, remove:
|
|
11246
|
+
mutations: { create: p, edit: g, like: v, remove: _, unlike: y },
|
|
11244
11247
|
user: x
|
|
11245
11248
|
} = es({
|
|
11246
11249
|
queryKey: [t, e, n, "replies"],
|
|
@@ -11271,7 +11274,7 @@ const ol = ({
|
|
|
11271
11274
|
),
|
|
11272
11275
|
d == null ? void 0 : d.map((E) => {
|
|
11273
11276
|
var z, K, T, P, q, L, U, te, G, V, ee, re;
|
|
11274
|
-
const { id: w, own_children:
|
|
11277
|
+
const { id: w, own_children: b, latest_children: F, children_counts: R } = E, B = (((z = b == null ? void 0 : b.like) == null ? void 0 : z.length) || 0) > 0 ? (K = b == null ? void 0 : b.like) == null ? void 0 : K.find((O) => {
|
|
11275
11278
|
var oe;
|
|
11276
11279
|
return ((oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id) === (x == null ? void 0 : x.id);
|
|
11277
11280
|
}) : !1, $ = B ? B == null ? void 0 : B.id : "", C = !!B, j = (((T = F == null ? void 0 : F.like) == null ? void 0 : T.length) || 0) > 0 ? (P = F == null ? void 0 : F.like) == null ? void 0 : P.map((O) => {
|
|
@@ -11316,13 +11319,13 @@ const ol = ({
|
|
|
11316
11319
|
functions: {
|
|
11317
11320
|
content: {
|
|
11318
11321
|
createContent: () => null,
|
|
11319
|
-
deleteContent: () =>
|
|
11322
|
+
deleteContent: () => _({ replyId: w }),
|
|
11320
11323
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11321
11324
|
updateContent: (O, { body: oe }) => g({ replyId: w, content: oe })
|
|
11322
11325
|
},
|
|
11323
11326
|
likes: {
|
|
11324
11327
|
createLike: () => v({ replyId: w }),
|
|
11325
|
-
deleteLike: () =>
|
|
11328
|
+
deleteLike: () => y({ replyId: w, reactionId: $ })
|
|
11326
11329
|
},
|
|
11327
11330
|
comments: {}
|
|
11328
11331
|
},
|
|
@@ -11467,7 +11470,7 @@ const gu = ({
|
|
|
11467
11470
|
activity: f,
|
|
11468
11471
|
error: m,
|
|
11469
11472
|
isLoading: p,
|
|
11470
|
-
mutations: { edit: g, like: v, unlike:
|
|
11473
|
+
mutations: { edit: g, like: v, unlike: _ }
|
|
11471
11474
|
} = dl({
|
|
11472
11475
|
queryFns: i,
|
|
11473
11476
|
queryKey: [t, e, n]
|
|
@@ -11482,7 +11485,7 @@ const gu = ({
|
|
|
11482
11485
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
11483
11486
|
}
|
|
11484
11487
|
);
|
|
11485
|
-
const { own_reactions:
|
|
11488
|
+
const { own_reactions: y, latest_reactions: x } = f, E = (((B = x == null ? void 0 : x.like) == null ? void 0 : B.length) || 0) > 0, w = ((($ = y == null ? void 0 : y.like) == null ? void 0 : $.length) || 0) > 0, b = w ? y == null ? void 0 : y.like[0].id : "", F = E ? (C = x == null ? void 0 : x.like) == null ? void 0 : C.map((K) => {
|
|
11486
11489
|
var T, P, q;
|
|
11487
11490
|
return {
|
|
11488
11491
|
id: (T = K == null ? void 0 : K.user) == null ? void 0 : T.id,
|
|
@@ -11531,7 +11534,7 @@ const gu = ({
|
|
|
11531
11534
|
},
|
|
11532
11535
|
likes: {
|
|
11533
11536
|
createLike: () => v({ activityId: n }),
|
|
11534
|
-
deleteLike: () =>
|
|
11537
|
+
deleteLike: () => _({ activityId: n, reactionId: b })
|
|
11535
11538
|
},
|
|
11536
11539
|
comments: {
|
|
11537
11540
|
openComments: () => {
|