@apolitical/component-library 1.18.0 → 1.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +11 -11
- package/index.mjs +813 -788
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/_colors.scss +52 -62
- package/styles/variables/colors/_theme.scss +2 -0
- package/text/highlighted-text-box/highlighted-text-box.d.ts +4 -2
package/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import F, { memo as Fe, useState as
|
|
1
|
+
import F, { memo as Fe, useState as R, useEffect as G, useRef as ae, useMemo as ft, createContext as Gt, useContext as _e, Children as Ht, useCallback as Rn, Fragment as qe, useReducer as Oa, Suspense as Ba } from "react";
|
|
2
2
|
import Za from "lodash.clonedeep";
|
|
3
3
|
import qa from "lodash.set";
|
|
4
|
-
import { useIntl as A, IntlProvider as Ha, createIntl as Ua, FormattedMessage as
|
|
4
|
+
import { useIntl as A, IntlProvider as Ha, createIntl as Ua, FormattedMessage as we } from "react-intl";
|
|
5
5
|
import Ne from "truncate";
|
|
6
|
-
import { QueryClient as za, QueryClientProvider as Wa, useMutation as fe, useQueryClient as Kt, useInfiniteQuery as
|
|
6
|
+
import { QueryClient as za, QueryClientProvider as Wa, useMutation as fe, useQueryClient as Kt, useInfiniteQuery as Ln, useQuery as Va } from "@tanstack/react-query";
|
|
7
7
|
import { ReactQueryDevtools as Ya } from "@tanstack/react-query-devtools";
|
|
8
|
-
import
|
|
8
|
+
import at from "posthog-js";
|
|
9
9
|
import { CookiesProvider as Ga, useCookies as Ka } from "react-cookie";
|
|
10
10
|
import pt from "markdown-to-jsx";
|
|
11
11
|
import { ReactMultiEmail as Qa } from "react-multi-email";
|
|
@@ -53,8 +53,8 @@ var On = { exports: {} };
|
|
|
53
53
|
})();
|
|
54
54
|
})(On);
|
|
55
55
|
var nr = On.exports;
|
|
56
|
-
const w = /* @__PURE__ */ tr(nr), ar = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => F.createElement(e, { ...r, className: w("hidden", { "show-on-focus": t }), children: n }),
|
|
57
|
-
var Ut = { exports: {} },
|
|
56
|
+
const w = /* @__PURE__ */ tr(nr), ar = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => F.createElement(e, { ...r, className: w("hidden", { "show-on-focus": t }), children: n }), ie = Fe(ar), rr = ({ element: e = "span", children: t = null, ...n }) => F.createElement(e, { ...n, "aria-hidden": !0 }, t), Bn = Fe(rr);
|
|
57
|
+
var Ut = { exports: {} }, Re = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -67,7 +67,7 @@ var Ut = { exports: {} }, Le = {};
|
|
|
67
67
|
var bn;
|
|
68
68
|
function sr() {
|
|
69
69
|
if (bn)
|
|
70
|
-
return
|
|
70
|
+
return Re;
|
|
71
71
|
bn = 1;
|
|
72
72
|
var e = F, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function o(c, m, l) {
|
|
@@ -80,9 +80,9 @@ function sr() {
|
|
|
80
80
|
d[f] === void 0 && (d[f] = m[f]);
|
|
81
81
|
return { $$typeof: t, type: c, key: p, ref: h, props: d, _owner: s.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Re.Fragment = n, Re.jsx = o, Re.jsxs = o, Re;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Le = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -95,14 +95,14 @@ var Re = {};
|
|
|
95
95
|
var yn;
|
|
96
96
|
function ir() {
|
|
97
97
|
return yn || (yn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e = F, t = 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"), m = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator,
|
|
98
|
+
var e = F, t = 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"), m = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), g = Symbol.iterator, y = "@@iterator";
|
|
99
99
|
function k(u) {
|
|
100
100
|
if (u === null || typeof u != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var x = g && u[g] || u[
|
|
102
|
+
var x = g && u[g] || u[y];
|
|
103
103
|
return typeof x == "function" ? x : null;
|
|
104
104
|
}
|
|
105
|
-
var
|
|
105
|
+
var b = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
106
|
function _(u) {
|
|
107
107
|
{
|
|
108
108
|
for (var x = arguments.length, T = new Array(x > 1 ? x - 1 : 0), P = 1; P < x; P++)
|
|
@@ -112,34 +112,34 @@ function ir() {
|
|
|
112
112
|
}
|
|
113
113
|
function v(u, x, T) {
|
|
114
114
|
{
|
|
115
|
-
var P =
|
|
116
|
-
|
|
117
|
-
var V = T.map(function(
|
|
118
|
-
return String(
|
|
115
|
+
var P = b.ReactDebugCurrentFrame, B = P.getStackAddendum();
|
|
116
|
+
B !== "" && (x += "%s", T = T.concat([B]));
|
|
117
|
+
var V = T.map(function(O) {
|
|
118
|
+
return String(O);
|
|
119
119
|
});
|
|
120
120
|
V.unshift("Warning: " + x), Function.prototype.apply.call(console[u], console, V);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var j = !1,
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i ||
|
|
123
|
+
var j = !1, S = !1, M = !1, D = !1, I = !1, $;
|
|
124
|
+
$ = Symbol.for("react.module.reference");
|
|
125
|
+
function C(u) {
|
|
126
|
+
return !!(typeof u == "string" || typeof u == "function" || u === r || u === i || I || u === s || u === l || u === f || D || u === h || j || S || M || typeof u == "object" && u !== null && (u.$$typeof === p || u.$$typeof === d || u.$$typeof === o || u.$$typeof === c || u.$$typeof === m || // This needs to include all possible module reference object
|
|
127
127
|
// types supported by any Flight configuration anywhere since
|
|
128
128
|
// we don't know which Flight build this will end up being used
|
|
129
129
|
// with.
|
|
130
|
-
u.$$typeof ===
|
|
130
|
+
u.$$typeof === $ || u.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
132
|
function E(u, x, T) {
|
|
133
133
|
var P = u.displayName;
|
|
134
134
|
if (P)
|
|
135
135
|
return P;
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var B = x.displayName || x.name || "";
|
|
137
|
+
return B !== "" ? T + "(" + B + ")" : T;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Z(u) {
|
|
140
140
|
return u.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function N(u) {
|
|
143
143
|
if (u == null)
|
|
144
144
|
return null;
|
|
145
145
|
if (typeof u.tag == "number" && _("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof u == "function")
|
|
@@ -164,19 +164,19 @@ function ir() {
|
|
|
164
164
|
switch (u.$$typeof) {
|
|
165
165
|
case c:
|
|
166
166
|
var x = u;
|
|
167
|
-
return
|
|
167
|
+
return Z(x) + ".Consumer";
|
|
168
168
|
case o:
|
|
169
169
|
var T = u;
|
|
170
|
-
return
|
|
170
|
+
return Z(T._context) + ".Provider";
|
|
171
171
|
case m:
|
|
172
172
|
return E(u, u.render, "ForwardRef");
|
|
173
173
|
case d:
|
|
174
174
|
var P = u.displayName || null;
|
|
175
|
-
return P !== null ? P :
|
|
175
|
+
return P !== null ? P : N(u.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var
|
|
177
|
+
var B = u, V = B._payload, O = B._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return N(O(V));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,14 +184,14 @@ function ir() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var U = Object.assign, Y = 0, ne, Q, J, re, X, se, de;
|
|
188
188
|
function ce() {
|
|
189
189
|
}
|
|
190
190
|
ce.__reactDisabledLog = !0;
|
|
191
191
|
function W() {
|
|
192
192
|
{
|
|
193
193
|
if (Y === 0) {
|
|
194
|
-
|
|
194
|
+
ne = console.log, Q = console.info, J = console.warn, re = console.error, X = console.group, se = console.groupCollapsed, de = console.groupEnd;
|
|
195
195
|
var u = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
@@ -220,25 +220,25 @@ function ir() {
|
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
224
|
-
value:
|
|
223
|
+
log: U({}, u, {
|
|
224
|
+
value: ne
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
227
|
-
value:
|
|
226
|
+
info: U({}, u, {
|
|
227
|
+
value: Q
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
230
|
-
value:
|
|
229
|
+
warn: U({}, u, {
|
|
230
|
+
value: J
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: U({}, u, {
|
|
233
233
|
value: re
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: U({}, u, {
|
|
236
|
+
value: X
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
239
|
-
value:
|
|
238
|
+
groupCollapsed: U({}, u, {
|
|
239
|
+
value: se
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
241
|
+
groupEnd: U({}, u, {
|
|
242
242
|
value: de
|
|
243
243
|
})
|
|
244
244
|
});
|
|
@@ -246,95 +246,95 @@ function ir() {
|
|
|
246
246
|
Y < 0 && _("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
249
|
+
var pe = b.ReactCurrentDispatcher, q;
|
|
250
|
+
function K(u, x, T) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (q === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
var P =
|
|
257
|
-
|
|
255
|
+
} catch (B) {
|
|
256
|
+
var P = B.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
q = P && P[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + q + u;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var he = !1, me;
|
|
264
264
|
{
|
|
265
265
|
var ga = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
-
|
|
266
|
+
me = new ga();
|
|
267
267
|
}
|
|
268
268
|
function an(u, x) {
|
|
269
|
-
if (!u ||
|
|
269
|
+
if (!u || he)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var T =
|
|
272
|
+
var T = me.get(u);
|
|
273
273
|
if (T !== void 0)
|
|
274
274
|
return T;
|
|
275
275
|
}
|
|
276
276
|
var P;
|
|
277
|
-
|
|
278
|
-
var
|
|
277
|
+
he = !0;
|
|
278
|
+
var B = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var V;
|
|
281
|
-
V =
|
|
281
|
+
V = pe.current, pe.current = null, W();
|
|
282
282
|
try {
|
|
283
283
|
if (x) {
|
|
284
|
-
var
|
|
284
|
+
var O = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(O.prototype, "props", {
|
|
288
288
|
set: function() {
|
|
289
289
|
throw Error();
|
|
290
290
|
}
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
|
-
Reflect.construct(
|
|
294
|
-
} catch (
|
|
295
|
-
P =
|
|
293
|
+
Reflect.construct(O, []);
|
|
294
|
+
} catch (ve) {
|
|
295
|
+
P = ve;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(u, [],
|
|
297
|
+
Reflect.construct(u, [], O);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
301
|
-
} catch (
|
|
302
|
-
P =
|
|
300
|
+
O.call();
|
|
301
|
+
} catch (ve) {
|
|
302
|
+
P = ve;
|
|
303
303
|
}
|
|
304
|
-
u.call(
|
|
304
|
+
u.call(O.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
|
-
} catch (
|
|
310
|
-
P =
|
|
309
|
+
} catch (ve) {
|
|
310
|
+
P = ve;
|
|
311
311
|
}
|
|
312
312
|
u();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var
|
|
314
|
+
} catch (ve) {
|
|
315
|
+
if (ve && P && typeof ve.stack == "string") {
|
|
316
|
+
for (var L = ve.stack.split(`
|
|
317
317
|
`), oe = P.stack.split(`
|
|
318
|
-
`),
|
|
319
|
-
|
|
320
|
-
for (;
|
|
321
|
-
if (
|
|
322
|
-
if (
|
|
318
|
+
`), ee = L.length - 1, te = oe.length - 1; ee >= 1 && te >= 0 && L[ee] !== oe[te]; )
|
|
319
|
+
te--;
|
|
320
|
+
for (; ee >= 1 && te >= 0; ee--, te--)
|
|
321
|
+
if (L[ee] !== oe[te]) {
|
|
322
|
+
if (ee !== 1 || te !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
325
|
-
var
|
|
326
|
-
` +
|
|
327
|
-
return u.displayName &&
|
|
324
|
+
if (ee--, te--, te < 0 || L[ee] !== oe[te]) {
|
|
325
|
+
var ge = `
|
|
326
|
+
` + L[ee].replace(" at new ", " at ");
|
|
327
|
+
return u.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", u.displayName)), typeof u == "function" && me.set(u, ge), ge;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (ee >= 1 && te >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
he = !1, pe.current = V, ue(), Error.prepareStackTrace = B;
|
|
335
335
|
}
|
|
336
|
-
var Se = u ? u.displayName || u.name : "", _n = Se ?
|
|
337
|
-
return typeof u == "function" &&
|
|
336
|
+
var Se = u ? u.displayName || u.name : "", _n = Se ? K(Se) : "";
|
|
337
|
+
return typeof u == "function" && me.set(u, _n), _n;
|
|
338
338
|
}
|
|
339
339
|
function _a(u, x, T) {
|
|
340
340
|
return an(u, !1);
|
|
@@ -343,59 +343,59 @@ function ir() {
|
|
|
343
343
|
var x = u.prototype;
|
|
344
344
|
return !!(x && x.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function We(u, x, T) {
|
|
347
347
|
if (u == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof u == "function")
|
|
350
350
|
return an(u, ba(u));
|
|
351
351
|
if (typeof u == "string")
|
|
352
|
-
return
|
|
352
|
+
return K(u);
|
|
353
353
|
switch (u) {
|
|
354
354
|
case l:
|
|
355
|
-
return
|
|
355
|
+
return K("Suspense");
|
|
356
356
|
case f:
|
|
357
|
-
return
|
|
357
|
+
return K("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof u == "object")
|
|
360
360
|
switch (u.$$typeof) {
|
|
361
361
|
case m:
|
|
362
362
|
return _a(u.render);
|
|
363
363
|
case d:
|
|
364
|
-
return
|
|
364
|
+
return We(u.type, x, T);
|
|
365
365
|
case p: {
|
|
366
|
-
var P = u,
|
|
366
|
+
var P = u, B = P._payload, V = P._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return We(V(B), x, T);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var Ve = Object.prototype.hasOwnProperty, rn = {}, sn = b.ReactDebugCurrentFrame;
|
|
376
|
+
function Ye(u) {
|
|
377
377
|
if (u) {
|
|
378
|
-
var x = u._owner, T =
|
|
378
|
+
var x = u._owner, T = We(u.type, u._source, x ? x.type : null);
|
|
379
379
|
sn.setExtraStackFrame(T);
|
|
380
380
|
} else
|
|
381
381
|
sn.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function ya(u, x, T, P,
|
|
383
|
+
function ya(u, x, T, P, B) {
|
|
384
384
|
{
|
|
385
|
-
var V = Function.call.bind(
|
|
386
|
-
for (var
|
|
387
|
-
if (V(u,
|
|
388
|
-
var
|
|
385
|
+
var V = Function.call.bind(Ve);
|
|
386
|
+
for (var O in u)
|
|
387
|
+
if (V(u, O)) {
|
|
388
|
+
var L = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof u[
|
|
391
|
-
var oe = Error((P || "React class") + ": " + T + " type `" +
|
|
390
|
+
if (typeof u[O] != "function") {
|
|
391
|
+
var oe = Error((P || "React class") + ": " + T + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof u[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw oe.name = "Invariant Violation", oe;
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
} catch (
|
|
396
|
-
|
|
394
|
+
L = u[O](x, O, P, T, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
+
} catch (ee) {
|
|
396
|
+
L = ee;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
L && !(L instanceof Error) && (Ye(B), _("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", P || "React class", T, O, typeof L), Ye(null)), L instanceof Error && !(L.message in rn) && (rn[L.message] = !0, Ye(B), _("Failed %s type: %s", T, L.message), Ye(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -423,7 +423,7 @@ function ir() {
|
|
|
423
423
|
if (ka(u))
|
|
424
424
|
return _("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xa(u)), on(u);
|
|
425
425
|
}
|
|
426
|
-
var De =
|
|
426
|
+
var De = b.ReactCurrentOwner, ja = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
@@ -431,7 +431,7 @@ function ir() {
|
|
|
431
431
|
}, ln, dn, wt;
|
|
432
432
|
wt = {};
|
|
433
433
|
function wa(u) {
|
|
434
|
-
if (
|
|
434
|
+
if (Ve.call(u, "ref")) {
|
|
435
435
|
var x = Object.getOwnPropertyDescriptor(u, "ref").get;
|
|
436
436
|
if (x && x.isReactWarning)
|
|
437
437
|
return !1;
|
|
@@ -439,7 +439,7 @@ function ir() {
|
|
|
439
439
|
return u.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function Ta(u) {
|
|
442
|
-
if (
|
|
442
|
+
if (Ve.call(u, "key")) {
|
|
443
443
|
var x = Object.getOwnPropertyDescriptor(u, "key").get;
|
|
444
444
|
if (x && x.isReactWarning)
|
|
445
445
|
return !1;
|
|
@@ -448,8 +448,8 @@ function ir() {
|
|
|
448
448
|
}
|
|
449
449
|
function $a(u, x) {
|
|
450
450
|
if (typeof u.ref == "string" && De.current && x && De.current.stateNode !== x) {
|
|
451
|
-
var T =
|
|
452
|
-
wt[T] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',
|
|
451
|
+
var T = N(De.current.type);
|
|
452
|
+
wt[T] || (_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', N(De.current.type), u.ref), wt[T] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function Ea(u, x) {
|
|
@@ -474,57 +474,57 @@ function ir() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Sa = function(u, x, T, P,
|
|
478
|
-
var
|
|
477
|
+
var Sa = function(u, x, T, P, B, V, O) {
|
|
478
|
+
var L = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: u,
|
|
483
483
|
key: x,
|
|
484
484
|
ref: T,
|
|
485
|
-
props:
|
|
485
|
+
props: O,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: V
|
|
488
488
|
};
|
|
489
|
-
return
|
|
489
|
+
return L._store = {}, Object.defineProperty(L._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
491
491
|
enumerable: !1,
|
|
492
492
|
writable: !0,
|
|
493
493
|
value: !1
|
|
494
|
-
}), Object.defineProperty(
|
|
494
|
+
}), Object.defineProperty(L, "_self", {
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
498
|
value: P
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(L, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
|
-
value:
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
503
|
+
value: B
|
|
504
|
+
}), Object.freeze && (Object.freeze(L.props), Object.freeze(L)), L;
|
|
505
505
|
};
|
|
506
|
-
function Ma(u, x, T, P,
|
|
506
|
+
function Ma(u, x, T, P, B) {
|
|
507
507
|
{
|
|
508
|
-
var V,
|
|
509
|
-
T !== void 0 && (cn(T),
|
|
508
|
+
var V, O = {}, L = null, oe = null;
|
|
509
|
+
T !== void 0 && (cn(T), L = "" + T), Ta(x) && (cn(x.key), L = "" + x.key), wa(x) && (oe = x.ref, $a(x, B));
|
|
510
510
|
for (V in x)
|
|
511
|
-
|
|
511
|
+
Ve.call(x, V) && !ja.hasOwnProperty(V) && (O[V] = x[V]);
|
|
512
512
|
if (u && u.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (V in
|
|
515
|
-
|
|
513
|
+
var ee = u.defaultProps;
|
|
514
|
+
for (V in ee)
|
|
515
|
+
O[V] === void 0 && (O[V] = ee[V]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
518
|
-
var
|
|
519
|
-
|
|
517
|
+
if (L || oe) {
|
|
518
|
+
var te = typeof u == "function" ? u.displayName || u.name || "Unknown" : u;
|
|
519
|
+
L && Ea(O, te), oe && Ca(O, te);
|
|
520
520
|
}
|
|
521
|
-
return Sa(u,
|
|
521
|
+
return Sa(u, L, oe, B, P, De.current, O);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var Tt =
|
|
524
|
+
var Tt = b.ReactCurrentOwner, un = b.ReactDebugCurrentFrame;
|
|
525
525
|
function Ce(u) {
|
|
526
526
|
if (u) {
|
|
527
|
-
var x = u._owner, T =
|
|
527
|
+
var x = u._owner, T = We(u.type, u._source, x ? x.type : null);
|
|
528
528
|
un.setExtraStackFrame(T);
|
|
529
529
|
} else
|
|
530
530
|
un.setExtraStackFrame(null);
|
|
@@ -537,7 +537,7 @@ function ir() {
|
|
|
537
537
|
function mn() {
|
|
538
538
|
{
|
|
539
539
|
if (Tt.current) {
|
|
540
|
-
var u =
|
|
540
|
+
var u = N(Tt.current.type);
|
|
541
541
|
if (u)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + T + ">.");
|
|
|
580
580
|
return;
|
|
581
581
|
fn[T] = !0;
|
|
582
582
|
var P = "";
|
|
583
|
-
u && u._owner && u._owner !== Tt.current && (P = " It was passed a child from " +
|
|
583
|
+
u && u._owner && u._owner !== Tt.current && (P = " It was passed a child from " + N(u._owner.type) + "."), Ce(u), _('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', T, P), Ce(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
function hn(u, x) {
|
|
@@ -595,10 +595,10 @@ Check the top-level render call using <` + T + ">.");
|
|
|
595
595
|
else if (Et(u))
|
|
596
596
|
u._store && (u._store.validated = !0);
|
|
597
597
|
else if (u) {
|
|
598
|
-
var
|
|
599
|
-
if (typeof
|
|
600
|
-
for (var V =
|
|
601
|
-
Et(
|
|
598
|
+
var B = k(u);
|
|
599
|
+
if (typeof B == "function" && B !== u.entries)
|
|
600
|
+
for (var V = B.call(u), O; !(O = V.next()).done; )
|
|
601
|
+
Et(O.value) && pn(O.value, x);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
@@ -617,12 +617,12 @@ Check the top-level render call using <` + T + ">.");
|
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (T) {
|
|
620
|
-
var P =
|
|
620
|
+
var P = N(x);
|
|
621
621
|
ya(T, u.props, "prop", P, u);
|
|
622
622
|
} else if (x.PropTypes !== void 0 && !$t) {
|
|
623
623
|
$t = !0;
|
|
624
|
-
var
|
|
625
|
-
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
624
|
+
var B = N(x);
|
|
625
|
+
_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
626
626
|
}
|
|
627
627
|
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && _("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
@@ -639,50 +639,50 @@ Check the top-level render call using <` + T + ">.");
|
|
|
639
639
|
u.ref !== null && (Ce(u), _("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function gn(u, x, T, P,
|
|
642
|
+
function gn(u, x, T, P, B, V) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
646
|
-
var
|
|
647
|
-
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (
|
|
648
|
-
var oe = Na(
|
|
649
|
-
oe ?
|
|
650
|
-
var
|
|
651
|
-
u === null ?
|
|
644
|
+
var O = C(u);
|
|
645
|
+
if (!O) {
|
|
646
|
+
var L = "";
|
|
647
|
+
(u === void 0 || typeof u == "object" && u !== null && Object.keys(u).length === 0) && (L += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
648
|
+
var oe = Na(B);
|
|
649
|
+
oe ? L += oe : L += mn();
|
|
650
|
+
var ee;
|
|
651
|
+
u === null ? ee = "null" : jt(u) ? ee = "array" : u !== void 0 && u.$$typeof === t ? (ee = "<" + (N(u.type) || "Unknown") + " />", L = " Did you accidentally export a JSX literal instead of a component?") : ee = typeof u, _("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", ee, L);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
if (
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
653
|
+
var te = Ma(u, x, T, B, V);
|
|
654
|
+
if (te == null)
|
|
655
|
+
return te;
|
|
656
|
+
if (O) {
|
|
657
|
+
var ge = x.children;
|
|
658
|
+
if (ge !== void 0)
|
|
659
659
|
if (P)
|
|
660
|
-
if (jt(
|
|
661
|
-
for (var Se = 0; Se <
|
|
662
|
-
hn(
|
|
663
|
-
Object.freeze && Object.freeze(
|
|
660
|
+
if (jt(ge)) {
|
|
661
|
+
for (var Se = 0; Se < ge.length; Se++)
|
|
662
|
+
hn(ge[Se], u);
|
|
663
|
+
Object.freeze && Object.freeze(ge);
|
|
664
664
|
} else
|
|
665
665
|
_("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
666
666
|
else
|
|
667
|
-
hn(
|
|
667
|
+
hn(ge, u);
|
|
668
668
|
}
|
|
669
|
-
return u === r ? Fa(
|
|
669
|
+
return u === r ? Fa(te) : Aa(te), te;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
672
|
function Da(u, x, T) {
|
|
673
673
|
return gn(u, x, T, !0);
|
|
674
674
|
}
|
|
675
|
-
function
|
|
675
|
+
function Ra(u, x, T) {
|
|
676
676
|
return gn(u, x, T, !1);
|
|
677
677
|
}
|
|
678
|
-
var
|
|
679
|
-
|
|
680
|
-
}()),
|
|
678
|
+
var La = Ra, Ia = Da;
|
|
679
|
+
Le.Fragment = r, Le.jsx = La, Le.jsxs = Ia;
|
|
680
|
+
}()), Le;
|
|
681
681
|
}
|
|
682
682
|
process.env.NODE_ENV === "production" ? Ut.exports = sr() : Ut.exports = ir();
|
|
683
683
|
var a = Ut.exports;
|
|
684
684
|
const or = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = R(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
@@ -690,65 +690,65 @@ const or = () => {
|
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Pe = (e, t) => {
|
|
693
|
-
const n =
|
|
693
|
+
const n = ae(!1);
|
|
694
694
|
G(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function cr(e, t, n) {
|
|
699
|
-
var r = this, s =
|
|
699
|
+
var r = this, s = ae(null), i = ae(0), o = ae(null), c = ae([]), m = ae(), l = ae(), f = ae(e), d = ae(!0);
|
|
700
700
|
f.current = e;
|
|
701
701
|
var p = typeof window < "u", h = !t && t !== 0 && p;
|
|
702
702
|
if (typeof e != "function")
|
|
703
703
|
throw new TypeError("Expected a function");
|
|
704
704
|
t = +t || 0;
|
|
705
|
-
var g = !!(n = n || {}).leading,
|
|
705
|
+
var g = !!(n = n || {}).leading, y = !("trailing" in n) || !!n.trailing, k = "maxWait" in n, b = "debounceOnServer" in n && !!n.debounceOnServer, _ = k ? Math.max(+n.maxWait || 0, t) : null;
|
|
706
706
|
G(function() {
|
|
707
707
|
return d.current = !0, function() {
|
|
708
708
|
d.current = !1;
|
|
709
709
|
};
|
|
710
710
|
}, []);
|
|
711
711
|
var v = ft(function() {
|
|
712
|
-
var j = function(
|
|
713
|
-
var E = c.current,
|
|
714
|
-
return c.current = m.current = null, i.current =
|
|
715
|
-
},
|
|
716
|
-
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(
|
|
717
|
-
},
|
|
712
|
+
var j = function(C) {
|
|
713
|
+
var E = c.current, Z = m.current;
|
|
714
|
+
return c.current = m.current = null, i.current = C, l.current = f.current.apply(Z, E);
|
|
715
|
+
}, S = function(C, E) {
|
|
716
|
+
h && cancelAnimationFrame(o.current), o.current = h ? requestAnimationFrame(C) : setTimeout(C, E);
|
|
717
|
+
}, M = function(C) {
|
|
718
718
|
if (!d.current)
|
|
719
719
|
return !1;
|
|
720
|
-
var E =
|
|
721
|
-
return !s.current || E >= t || E < 0 || k &&
|
|
722
|
-
},
|
|
723
|
-
return o.current = null,
|
|
724
|
-
},
|
|
720
|
+
var E = C - s.current;
|
|
721
|
+
return !s.current || E >= t || E < 0 || k && C - i.current >= _;
|
|
722
|
+
}, D = function(C) {
|
|
723
|
+
return o.current = null, y && c.current ? j(C) : (c.current = m.current = null, l.current);
|
|
724
|
+
}, I = function C() {
|
|
725
725
|
var E = Date.now();
|
|
726
|
-
if (
|
|
727
|
-
return
|
|
726
|
+
if (M(E))
|
|
727
|
+
return D(E);
|
|
728
728
|
if (d.current) {
|
|
729
|
-
var
|
|
730
|
-
|
|
729
|
+
var Z = t - (E - s.current), N = k ? Math.min(Z, _ - (E - i.current)) : Z;
|
|
730
|
+
S(C, N);
|
|
731
731
|
}
|
|
732
|
-
},
|
|
733
|
-
if (p ||
|
|
734
|
-
var
|
|
735
|
-
if (c.current = [].slice.call(arguments), m.current = r, s.current =
|
|
732
|
+
}, $ = function() {
|
|
733
|
+
if (p || b) {
|
|
734
|
+
var C = Date.now(), E = M(C);
|
|
735
|
+
if (c.current = [].slice.call(arguments), m.current = r, s.current = C, E) {
|
|
736
736
|
if (!o.current && d.current)
|
|
737
|
-
return i.current = s.current,
|
|
737
|
+
return i.current = s.current, S(I, t), g ? j(s.current) : l.current;
|
|
738
738
|
if (k)
|
|
739
|
-
return
|
|
739
|
+
return S(I, t), j(s.current);
|
|
740
740
|
}
|
|
741
|
-
return o.current ||
|
|
741
|
+
return o.current || S(I, t), l.current;
|
|
742
742
|
}
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return $.cancel = function() {
|
|
745
745
|
o.current && (h ? cancelAnimationFrame(o.current) : clearTimeout(o.current)), i.current = 0, c.current = s.current = m.current = o.current = null;
|
|
746
|
-
},
|
|
746
|
+
}, $.isPending = function() {
|
|
747
747
|
return !!o.current;
|
|
748
|
-
},
|
|
749
|
-
return o.current ?
|
|
750
|
-
},
|
|
751
|
-
}, [g, k, t, _,
|
|
748
|
+
}, $.flush = function() {
|
|
749
|
+
return o.current ? D(Date.now()) : l.current;
|
|
750
|
+
}, $;
|
|
751
|
+
}, [g, k, t, _, y, h, p, b]);
|
|
752
752
|
return v;
|
|
753
753
|
}
|
|
754
754
|
function Zn(e, t, n) {
|
|
@@ -756,7 +756,7 @@ function Zn(e, t, n) {
|
|
|
756
756
|
return cr(e, t, { maxWait: t, leading: s === void 0 || s, trailing: i === void 0 || i });
|
|
757
757
|
}
|
|
758
758
|
let Ct;
|
|
759
|
-
const
|
|
759
|
+
const Ue = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [r, s] = F.useState(0) || [!1, () => {
|
|
@@ -809,7 +809,7 @@ const He = (e = !0, t = !1, n = "window") => {
|
|
|
809
809
|
return s;
|
|
810
810
|
}, dr = (e = [], t = !0) => {
|
|
811
811
|
e = Array.isArray(e) ? e : [e];
|
|
812
|
-
const n =
|
|
812
|
+
const n = ae(!1);
|
|
813
813
|
Pe(() => {
|
|
814
814
|
if (window && window.location && window.location.hash) {
|
|
815
815
|
if (n.current)
|
|
@@ -1199,7 +1199,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1199
1199
|
es: fr,
|
|
1200
1200
|
fr: pr,
|
|
1201
1201
|
pt: hr
|
|
1202
|
-
}, Symbol.toStringTag, { value: "Module" })), zn = (e) => e in Qt,
|
|
1202
|
+
}, Symbol.toStringTag, { value: "Module" })), zn = (e) => e in Qt, ye = (e, t, n, r, s = {}) => {
|
|
1203
1203
|
let i = "";
|
|
1204
1204
|
return zn(`${t}_${n}`) ? i = e({ id: `${t}_${n}` }, s) : i = e({ id: t }, { [r]: n, ...s }), i;
|
|
1205
1205
|
}, _r = (e, t, n) => {
|
|
@@ -1227,9 +1227,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1227
1227
|
return t.forEach(({ type: r, value: s }) => {
|
|
1228
1228
|
qa(n, r, s);
|
|
1229
1229
|
}), n;
|
|
1230
|
-
}, xr = (e) => new Promise((t) => setTimeout(t, e)),
|
|
1230
|
+
}, xr = (e) => new Promise((t) => setTimeout(t, e)), rt = (e, t) => F.Children.map(e, (n) => F.cloneElement(n, {
|
|
1231
1231
|
...t
|
|
1232
|
-
})),
|
|
1232
|
+
})), H = ({
|
|
1233
1233
|
variant: e = "primary",
|
|
1234
1234
|
size: t = "medium",
|
|
1235
1235
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1243,14 +1243,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1243
1243
|
children: f = !1,
|
|
1244
1244
|
...d
|
|
1245
1245
|
}) => {
|
|
1246
|
-
const h =
|
|
1246
|
+
const h = Ue(typeof t == "object");
|
|
1247
1247
|
if (typeof t == "object" && typeof h == "number") {
|
|
1248
|
-
const k = Object.assign({}, t),
|
|
1249
|
-
t = Hn(h,
|
|
1248
|
+
const k = Object.assign({}, t), b = qn(Object.keys(k));
|
|
1249
|
+
t = Hn(h, b, k);
|
|
1250
1250
|
}
|
|
1251
1251
|
const g = [];
|
|
1252
1252
|
typeof t == "string" && g.push(t), 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");
|
|
1253
|
-
const
|
|
1253
|
+
const y = {
|
|
1254
1254
|
...d,
|
|
1255
1255
|
className: w(e, c, g, {
|
|
1256
1256
|
"no-text": !f,
|
|
@@ -1262,16 +1262,16 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1262
1262
|
},
|
|
1263
1263
|
disabled: typeof m == "object" && "isClickable" in m ? !m.isClickable : m
|
|
1264
1264
|
};
|
|
1265
|
-
return s && (i = "a",
|
|
1265
|
+
return s && (i = "a", y.href = s), F.createElement(
|
|
1266
1266
|
i,
|
|
1267
|
-
|
|
1268
|
-
f || (l ? /* @__PURE__ */ a.jsx(
|
|
1267
|
+
y,
|
|
1268
|
+
f || (l ? /* @__PURE__ */ a.jsx(ie, { showOnFocus: !1, children: l }) : null)
|
|
1269
1269
|
);
|
|
1270
1270
|
}, ht = ({ buttons: e, className: t = "", ...n }) => {
|
|
1271
|
-
const r = e.length > 1 ? "ul" : "p", s = e.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(
|
|
1271
|
+
const r = e.length > 1 ? "ul" : "p", s = e.map((i, o) => r === "p" ? /* @__PURE__ */ a.jsx(H, { ...i }, o) : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(H, { ...i }) }, o));
|
|
1272
1272
|
return F.createElement(r, { className: w("button-wrapper", t), ...n, children: s });
|
|
1273
1273
|
};
|
|
1274
|
-
const
|
|
1274
|
+
const $e = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1275
1275
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1276
1276
|
return /* @__PURE__ */ a.jsx("hr", { className: w(e, { "has-max-width": t }), style: n });
|
|
1277
1277
|
}, gt = ({
|
|
@@ -1427,7 +1427,7 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1427
1427
|
loading: l,
|
|
1428
1428
|
decoding: f,
|
|
1429
1429
|
fetchPriority: d
|
|
1430
|
-
} = e, { range: p, sizes: h } = kr(e), g = St({ format: "avif", query: o, range: p, url: c }),
|
|
1430
|
+
} = e, { range: p, sizes: h } = kr(e), g = St({ format: "avif", query: o, range: p, url: c }), y = St({ format: "webp", query: o, range: p, url: c }), k = St({ format: "", query: o, range: p, url: c });
|
|
1431
1431
|
return /* @__PURE__ */ a.jsxs("picture", { className: t, children: [
|
|
1432
1432
|
i !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1433
1433
|
"source",
|
|
@@ -1442,7 +1442,7 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1442
1442
|
"source",
|
|
1443
1443
|
{
|
|
1444
1444
|
type: "image/webp",
|
|
1445
|
-
srcSet:
|
|
1445
|
+
srcSet: y,
|
|
1446
1446
|
sizes: h,
|
|
1447
1447
|
"data-testid": "source"
|
|
1448
1448
|
}
|
|
@@ -1466,7 +1466,7 @@ const Wn = ({ image: e, className: t, testId: n }) => {
|
|
|
1466
1466
|
};
|
|
1467
1467
|
let Ie = !1;
|
|
1468
1468
|
const wr = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1469
|
-
const r = A(), s =
|
|
1469
|
+
const r = A(), s = ae(null), [i, o] = R("hidden");
|
|
1470
1470
|
G(() => {
|
|
1471
1471
|
const m = s.current;
|
|
1472
1472
|
if (m)
|
|
@@ -1626,7 +1626,7 @@ const Tr = [
|
|
|
1626
1626
|
}),
|
|
1627
1627
|
c,
|
|
1628
1628
|
o && o.text && o.link && /* @__PURE__ */ a.jsx(
|
|
1629
|
-
|
|
1629
|
+
H,
|
|
1630
1630
|
{
|
|
1631
1631
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1632
1632
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1650,7 +1650,7 @@ const Si = ({
|
|
|
1650
1650
|
}) => !n && !r ? null : /* @__PURE__ */ a.jsxs("aside", { className: w("marketing-block", e), children: [
|
|
1651
1651
|
n && /* @__PURE__ */ a.jsx("p", { className: "title", children: n }),
|
|
1652
1652
|
r && /* @__PURE__ */ a.jsx("p", { children: r }),
|
|
1653
|
-
t && /* @__PURE__ */ a.jsx(
|
|
1653
|
+
t && /* @__PURE__ */ a.jsx(H, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": s, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1654
1654
|
] }), Er = ({ showDevTools: e = !0, children: t }) => {
|
|
1655
1655
|
const n = new za({
|
|
1656
1656
|
// default options we would like on all queries can be overridden individually
|
|
@@ -1668,10 +1668,10 @@ const Si = ({
|
|
|
1668
1668
|
e && /* @__PURE__ */ a.jsx(Ya, { initialIsOpen: !1 })
|
|
1669
1669
|
] });
|
|
1670
1670
|
};
|
|
1671
|
-
var Cr = Gt({ client:
|
|
1671
|
+
var Cr = Gt({ client: at });
|
|
1672
1672
|
function Sr(e) {
|
|
1673
1673
|
var t = e.children, n = e.client, r = e.apiKey, s = e.options, i = ft(function() {
|
|
1674
|
-
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && s && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (
|
|
1674
|
+
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && s && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (at.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), at.init(r, s)), at);
|
|
1675
1675
|
}, [n, r]);
|
|
1676
1676
|
return F.createElement(Cr.Provider, { value: { client: i } }, t);
|
|
1677
1677
|
}
|
|
@@ -1700,18 +1700,18 @@ const Mr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
1700
1700
|
...n || {}
|
|
1701
1701
|
};
|
|
1702
1702
|
return /* @__PURE__ */ a.jsx(Ha, { locale: r, messages: s, children: e });
|
|
1703
|
-
},
|
|
1703
|
+
}, je = Gt({ isLoading: !0 });
|
|
1704
1704
|
function Jt() {
|
|
1705
|
-
return
|
|
1705
|
+
return _e(je);
|
|
1706
1706
|
}
|
|
1707
|
-
const Pr = ({ children: e, user: t }) => /* @__PURE__ */ a.jsx(
|
|
1708
|
-
const [r, s] =
|
|
1707
|
+
const Pr = ({ children: e, user: t }) => /* @__PURE__ */ a.jsx(je.Provider, { value: t, children: e }), Mi = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1708
|
+
const [r, s] = R({ isLoading: !0 });
|
|
1709
1709
|
return G(() => {
|
|
1710
1710
|
e().then((i) => {
|
|
1711
1711
|
s({ ...i, isLoading: !1 }), br(5e3);
|
|
1712
1712
|
}).catch(() => s({ isLoading: !1 }));
|
|
1713
1713
|
}, []), /* @__PURE__ */ a.jsx(Nr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ a.jsx(Ga, { children: /* @__PURE__ */ a.jsx(Pr, { user: r, children: /* @__PURE__ */ a.jsx(Er, { children: /* @__PURE__ */ a.jsx(Mr, { user: r, children: t }) }) }) }) });
|
|
1714
|
-
},
|
|
1714
|
+
}, He = "https://storage.googleapis.com/apolitical-assets/", Be = {
|
|
1715
1715
|
general: "hello@apolitical.co",
|
|
1716
1716
|
support: "concierge@apolitical.co",
|
|
1717
1717
|
"data-protection": {
|
|
@@ -1726,7 +1726,26 @@ const Vn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
|
1726
1726
|
/* @__PURE__ */ a.jsx("div", { className: "content", children: n })
|
|
1727
1727
|
] });
|
|
1728
1728
|
};
|
|
1729
|
-
const
|
|
1729
|
+
const Te = ({
|
|
1730
|
+
variant: e = "primary",
|
|
1731
|
+
icon: t,
|
|
1732
|
+
className: n = "",
|
|
1733
|
+
children: r,
|
|
1734
|
+
...s
|
|
1735
|
+
}) => {
|
|
1736
|
+
const i = t ? { "--icon": `url(${He}icons/${t}.svg)` } : {};
|
|
1737
|
+
return /* @__PURE__ */ a.jsx(
|
|
1738
|
+
"div",
|
|
1739
|
+
{
|
|
1740
|
+
className: w("highlighted-text-box", e, n, {
|
|
1741
|
+
"has-icon": t
|
|
1742
|
+
}),
|
|
1743
|
+
style: i,
|
|
1744
|
+
...s,
|
|
1745
|
+
children: r
|
|
1746
|
+
}
|
|
1747
|
+
);
|
|
1748
|
+
};
|
|
1730
1749
|
const bt = ({
|
|
1731
1750
|
variant: e = "empty",
|
|
1732
1751
|
text: t = !1,
|
|
@@ -1734,7 +1753,7 @@ const bt = ({
|
|
|
1734
1753
|
className: r = ""
|
|
1735
1754
|
}) => {
|
|
1736
1755
|
let s = n && !!Object.keys(n).length;
|
|
1737
|
-
const i = typeof n == "object" && "breakpoints" in n, o =
|
|
1756
|
+
const i = typeof n == "object" && "breakpoints" in n, o = Ue(i);
|
|
1738
1757
|
if (i && typeof n == "object" && typeof o == "number") {
|
|
1739
1758
|
const d = Object.assign({}, n.breakpoints), p = qn(Object.keys(d));
|
|
1740
1759
|
s = Hn(o, p, d);
|
|
@@ -1746,14 +1765,14 @@ const bt = ({
|
|
|
1746
1765
|
...f
|
|
1747
1766
|
} = n;
|
|
1748
1767
|
return /* @__PURE__ */ a.jsx(
|
|
1749
|
-
|
|
1768
|
+
Te,
|
|
1750
1769
|
{
|
|
1751
1770
|
variant: "subtle",
|
|
1752
1771
|
className: w("empty-state-box", e, r),
|
|
1753
1772
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1754
1773
|
t && /* @__PURE__ */ a.jsx(pt, { options: { forceBlock: !0 }, children: t }),
|
|
1755
1774
|
s && typeof n == "object" && (l || /* @__PURE__ */ a.jsx(
|
|
1756
|
-
|
|
1775
|
+
H,
|
|
1757
1776
|
{
|
|
1758
1777
|
...f,
|
|
1759
1778
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1782,7 +1801,7 @@ const Ar = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1782
1801
|
) : /* @__PURE__ */ a.jsx("p", { children: r })
|
|
1783
1802
|
] });
|
|
1784
1803
|
const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: s }) => {
|
|
1785
|
-
const i = A(), o =
|
|
1804
|
+
const i = A(), o = ae(null), [c, m] = R(""), [l, f] = R("closed");
|
|
1786
1805
|
G(() => {
|
|
1787
1806
|
const h = o.current;
|
|
1788
1807
|
if (h)
|
|
@@ -1805,13 +1824,13 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1805
1824
|
if (!r)
|
|
1806
1825
|
return null;
|
|
1807
1826
|
const p = ["opening", "open"].includes(l);
|
|
1808
|
-
return /* @__PURE__ */ a.jsxs(
|
|
1827
|
+
return /* @__PURE__ */ a.jsxs(Te, { variant: "subtle", className: w("hide-show-text-box", e), children: [
|
|
1809
1828
|
/* @__PURE__ */ a.jsxs("div", { ref: o, className: w("content", l), children: [
|
|
1810
1829
|
/* @__PURE__ */ a.jsx(pt, { options: { forceBlock: !0 }, children: l === "closed" ? c : r }),
|
|
1811
1830
|
l !== "closed" && s
|
|
1812
1831
|
] }),
|
|
1813
1832
|
/* @__PURE__ */ a.jsx("p", { className: "cta", children: /* @__PURE__ */ a.jsx(
|
|
1814
|
-
|
|
1833
|
+
H,
|
|
1815
1834
|
{
|
|
1816
1835
|
variant: "tertiary",
|
|
1817
1836
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1824,7 +1843,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1824
1843
|
}
|
|
1825
1844
|
) })
|
|
1826
1845
|
] });
|
|
1827
|
-
}, Fr = () => F.Fragment, Dr = ({ children: e }) => /* @__PURE__ */ a.jsx(
|
|
1846
|
+
}, Fr = () => F.Fragment, Dr = ({ children: e }) => /* @__PURE__ */ a.jsx(Te, { variant: "secondary", children: e }), Rr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Lr = ({ children: e }) => {
|
|
1828
1847
|
const t = A();
|
|
1829
1848
|
if (!e)
|
|
1830
1849
|
return null;
|
|
@@ -1837,7 +1856,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1837
1856
|
for (const o of Ht.toArray(i.props.children))
|
|
1838
1857
|
if (!(!o || typeof o == "string" || typeof o == "number") && F.isValidElement(o)) {
|
|
1839
1858
|
const c = o.type;
|
|
1840
|
-
if (
|
|
1859
|
+
if (Rr.includes(c)) {
|
|
1841
1860
|
for (n = o.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1842
1861
|
n = n[0].props.children[0];
|
|
1843
1862
|
break;
|
|
@@ -1859,12 +1878,12 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1859
1878
|
if (t.class)
|
|
1860
1879
|
switch (t.class) {
|
|
1861
1880
|
case "casestudy":
|
|
1862
|
-
return /* @__PURE__ */ a.jsx(
|
|
1881
|
+
return /* @__PURE__ */ a.jsx(Te, { variant: "secondary", children: e });
|
|
1863
1882
|
case "general-textbox":
|
|
1864
1883
|
case "highlight-box":
|
|
1865
|
-
return /* @__PURE__ */ a.jsx(
|
|
1884
|
+
return /* @__PURE__ */ a.jsx(Te, { variant: "primary", children: e });
|
|
1866
1885
|
case "pink-textbox":
|
|
1867
|
-
return /* @__PURE__ */ a.jsx(
|
|
1886
|
+
return /* @__PURE__ */ a.jsx(Te, { variant: "tertiary", children: e });
|
|
1868
1887
|
default:
|
|
1869
1888
|
return /* @__PURE__ */ a.jsx("div", { ...t, children: e });
|
|
1870
1889
|
}
|
|
@@ -1874,7 +1893,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1874
1893
|
let r = "default";
|
|
1875
1894
|
const s = e.src;
|
|
1876
1895
|
return s.includes("youtube") || s.includes("vimeo") ? r = "video" : s.includes("riddle") || s.includes("sli.do") ? r = "poll" : s.includes("padlet") && (r = "padlet"), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1877
|
-
/* @__PURE__ */ a.jsx(
|
|
1896
|
+
/* @__PURE__ */ a.jsx(ie, { children: /* @__PURE__ */ a.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
|
|
1878
1897
|
/* @__PURE__ */ a.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1879
1898
|
/* @__PURE__ */ a.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1880
1899
|
] });
|
|
@@ -1895,7 +1914,7 @@ const Pi = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1895
1914
|
else
|
|
1896
1915
|
break;
|
|
1897
1916
|
}
|
|
1898
|
-
return s ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(
|
|
1917
|
+
return s ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ a.jsx("p", { className: "center", children: /* @__PURE__ */ a.jsx(H, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ a.jsx("a", { ...n, children: r });
|
|
1899
1918
|
}, Zr = ({ children: e }) => /* @__PURE__ */ a.jsx("span", { children: e });
|
|
1900
1919
|
const jn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1901
1920
|
n = n.replace(/^<br\/?>/, "");
|
|
@@ -1907,12 +1926,12 @@ const jn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1907
1926
|
// Override psuedo-code
|
|
1908
1927
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1909
1928
|
CollapsibleSection: Vn,
|
|
1910
|
-
TextBox:
|
|
1929
|
+
TextBox: Te,
|
|
1911
1930
|
CaseStudy: Dr,
|
|
1912
1931
|
// Override embedded HTML
|
|
1913
1932
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1914
1933
|
style: Fr,
|
|
1915
|
-
details:
|
|
1934
|
+
details: Lr,
|
|
1916
1935
|
div: Ir,
|
|
1917
1936
|
iframe: Or
|
|
1918
1937
|
}
|
|
@@ -1949,7 +1968,7 @@ const st = ({
|
|
|
1949
1968
|
const Vt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => F.createElement(e, { ...r, className: w("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1950
1969
|
const Hr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1951
1970
|
const r = A(), s = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, i = { "--progress": `${e}%` };
|
|
1952
|
-
return /* @__PURE__ */ a.jsx("span", { className: w(`progress-bar section-${s}`, n), style: i, children: /* @__PURE__ */ a.jsx(
|
|
1971
|
+
return /* @__PURE__ */ a.jsx("span", { className: w(`progress-bar section-${s}`, n), style: i, children: /* @__PURE__ */ a.jsx(ie, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1953
1972
|
}, Ur = Fe(Hr);
|
|
1954
1973
|
const Mt = "loadingBlock_", zr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1955
1974
|
const r = A();
|
|
@@ -1962,9 +1981,9 @@ const Mt = "loadingBlock_", zr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1962
1981
|
const i = Object.keys(t);
|
|
1963
1982
|
for (let c = 0; c < i.length && !(e < parseInt(i[c])); c++)
|
|
1964
1983
|
s = i[c];
|
|
1965
|
-
const o = s && t[s].icon ? { "--icon": `url(${
|
|
1984
|
+
const o = s && t[s].icon ? { "--icon": `url(${He}icons/${t[s].icon}.svg)` } : {};
|
|
1966
1985
|
return /* @__PURE__ */ a.jsxs(
|
|
1967
|
-
|
|
1986
|
+
Te,
|
|
1968
1987
|
{
|
|
1969
1988
|
className: w("loading-block", n, { "has-icon": s && t[s].icon }),
|
|
1970
1989
|
variant: "subtle",
|
|
@@ -1976,7 +1995,7 @@ const Mt = "loadingBlock_", zr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1976
1995
|
}
|
|
1977
1996
|
);
|
|
1978
1997
|
}, Ai = Fe(zr);
|
|
1979
|
-
const
|
|
1998
|
+
const be = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ a.jsx(Bn, { element: e, className: w("loading-placeholder", t), ...n });
|
|
1980
1999
|
const Yt = {
|
|
1981
2000
|
header: ["logo", "link", "link", "search"],
|
|
1982
2001
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
@@ -1994,19 +2013,19 @@ const Yt = {
|
|
|
1994
2013
|
"cards-section",
|
|
1995
2014
|
"footer"
|
|
1996
2015
|
]
|
|
1997
|
-
}, Gn = (e, t) => e in Yt ? /* @__PURE__ */ a.jsx("div", { className: e, children: Yt[e].map((n, r) => Gn(n, r)) }, t) : /* @__PURE__ */ a.jsx(
|
|
2016
|
+
}, Gn = (e, t) => e in Yt ? /* @__PURE__ */ a.jsx("div", { className: e, children: Yt[e].map((n, r) => Gn(n, r)) }, t) : /* @__PURE__ */ a.jsx(be, { className: e }, t), Kn = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ a.jsx("div", { className: w("loading-state", e), ...t, children: Yt[e].map((n, r) => Gn(n, r)) }), Qn = (e) => {
|
|
1998
2017
|
const t = e && e.toUpperCase().split(" ");
|
|
1999
2018
|
return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
|
|
2000
|
-
},
|
|
2001
|
-
const t = Math.ceil(26 /
|
|
2019
|
+
}, Ge = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], Wr = (e) => {
|
|
2020
|
+
const t = Math.ceil(26 / Ge.length), n = Qn(e).toLowerCase();
|
|
2002
2021
|
if (n === "")
|
|
2003
|
-
return
|
|
2022
|
+
return Ge[0];
|
|
2004
2023
|
const r = n.charCodeAt(0) - 96;
|
|
2005
|
-
for (let s = 0; s <
|
|
2024
|
+
for (let s = 0; s < Ge.length; s++)
|
|
2006
2025
|
if (r <= t * (s + 1))
|
|
2007
|
-
return
|
|
2026
|
+
return Ge[s];
|
|
2008
2027
|
};
|
|
2009
|
-
const wn = 256,
|
|
2028
|
+
const wn = 256, ze = ({
|
|
2010
2029
|
className: e = "",
|
|
2011
2030
|
src: t = "",
|
|
2012
2031
|
name: n,
|
|
@@ -2015,7 +2034,7 @@ const wn = 256, Ue = ({
|
|
|
2015
2034
|
height: i = wn,
|
|
2016
2035
|
...o
|
|
2017
2036
|
}) => {
|
|
2018
|
-
const [c, m] =
|
|
2037
|
+
const [c, m] = R(!1), l = ae(null);
|
|
2019
2038
|
G(() => {
|
|
2020
2039
|
const d = l.current;
|
|
2021
2040
|
if (!d)
|
|
@@ -2047,9 +2066,9 @@ const wn = 256, Ue = ({
|
|
|
2047
2066
|
}
|
|
2048
2067
|
);
|
|
2049
2068
|
}, Jn = (e) => e === "apolitical" ? {
|
|
2050
|
-
image: `${
|
|
2069
|
+
image: `${He}logos/member_apolitical.svg`
|
|
2051
2070
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
2052
|
-
image: `${
|
|
2071
|
+
image: `${He}logos/member_community.svg`
|
|
2053
2072
|
} : {
|
|
2054
2073
|
name: e.name,
|
|
2055
2074
|
role: e.jobTitle || "",
|
|
@@ -2093,7 +2112,7 @@ const Xt = ({
|
|
|
2093
2112
|
g == null || g.stopPropagation();
|
|
2094
2113
|
},
|
|
2095
2114
|
children: [
|
|
2096
|
-
/* @__PURE__ */ a.jsx(
|
|
2115
|
+
/* @__PURE__ */ a.jsx(ze, { name: m, src: f }),
|
|
2097
2116
|
/* @__PURE__ */ a.jsxs("p", { className: "details", children: [
|
|
2098
2117
|
/* @__PURE__ */ a.jsx("strong", { children: m }),
|
|
2099
2118
|
n && /* @__PURE__ */ a.jsxs("span", { className: "additional-content", children: [
|
|
@@ -2131,27 +2150,27 @@ const Tn = {
|
|
|
2131
2150
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((d, p) => {
|
|
2132
2151
|
let h, g = "";
|
|
2133
2152
|
if (p < c) {
|
|
2134
|
-
const { name:
|
|
2153
|
+
const { name: y = "", image: k = "" } = Jn(d);
|
|
2135
2154
|
if (o)
|
|
2136
|
-
return /* @__PURE__ */ a.jsx(
|
|
2155
|
+
return /* @__PURE__ */ a.jsx(be, { element: "li", className: "contributor" }, p);
|
|
2137
2156
|
h = /* @__PURE__ */ a.jsx(
|
|
2138
|
-
|
|
2157
|
+
ze,
|
|
2139
2158
|
{
|
|
2140
|
-
name:
|
|
2159
|
+
name: y,
|
|
2141
2160
|
src: k,
|
|
2142
2161
|
width: Tn[s || "medium"],
|
|
2143
2162
|
height: Tn[s || "medium"]
|
|
2144
2163
|
}
|
|
2145
2164
|
);
|
|
2146
2165
|
} else if (p === c) {
|
|
2147
|
-
const
|
|
2166
|
+
const y = (t || n.length) - c;
|
|
2148
2167
|
h = /* @__PURE__ */ a.jsxs(
|
|
2149
2168
|
"small",
|
|
2150
2169
|
{
|
|
2151
|
-
className: w({ "large-number":
|
|
2170
|
+
className: w({ "large-number": y > 99 }),
|
|
2152
2171
|
children: [
|
|
2153
2172
|
"+",
|
|
2154
|
-
_r(
|
|
2173
|
+
_r(y, 0)
|
|
2155
2174
|
]
|
|
2156
2175
|
}
|
|
2157
2176
|
), g = "number-left";
|
|
@@ -2279,12 +2298,12 @@ const Tn = {
|
|
|
2279
2298
|
}
|
|
2280
2299
|
}, Gr = ({ data: e, cta: t, link: n, gtmContext: r }) => {
|
|
2281
2300
|
var g;
|
|
2282
|
-
const s = A(), [i, o] =
|
|
2301
|
+
const s = A(), [i, o] = R({
|
|
2283
2302
|
loading: !1,
|
|
2284
2303
|
registered: e.registered || !1
|
|
2285
2304
|
});
|
|
2286
2305
|
G(() => {
|
|
2287
|
-
e.registered && o((
|
|
2306
|
+
e.registered && o((y) => ({ ...y, registered: !0 }));
|
|
2288
2307
|
}, [e.registered]);
|
|
2289
2308
|
const { startDate: c, dateHasPassed: m, pill: l, slug: f } = e, d = e.contentType;
|
|
2290
2309
|
let p = "";
|
|
@@ -2301,7 +2320,7 @@ const Tn = {
|
|
|
2301
2320
|
);
|
|
2302
2321
|
if (d === "people")
|
|
2303
2322
|
return /* @__PURE__ */ a.jsx(
|
|
2304
|
-
|
|
2323
|
+
H,
|
|
2305
2324
|
{
|
|
2306
2325
|
variant: "tertiary",
|
|
2307
2326
|
size: "small",
|
|
@@ -2314,8 +2333,8 @@ const Tn = {
|
|
|
2314
2333
|
);
|
|
2315
2334
|
const h = ["microcourse", "event"];
|
|
2316
2335
|
if (t && t.onClick && h.includes(d) && l !== "premium") {
|
|
2317
|
-
const
|
|
2318
|
-
if (
|
|
2336
|
+
const y = i.loading || i.registered, k = async (b) => {
|
|
2337
|
+
if (b.preventDefault(), b.stopPropagation(), !(y || !t || !t.onClick)) {
|
|
2319
2338
|
o((_) => ({ ..._, loading: !0 }));
|
|
2320
2339
|
try {
|
|
2321
2340
|
const _ = await t.onClick(e);
|
|
@@ -2326,18 +2345,18 @@ const Tn = {
|
|
|
2326
2345
|
}
|
|
2327
2346
|
};
|
|
2328
2347
|
return /* @__PURE__ */ a.jsx(
|
|
2329
|
-
|
|
2348
|
+
H,
|
|
2330
2349
|
{
|
|
2331
2350
|
onClick: k,
|
|
2332
2351
|
className: "gtm-trackable",
|
|
2333
2352
|
size: "small",
|
|
2334
2353
|
styling: { fullWidth: !0 },
|
|
2335
|
-
disabled:
|
|
2354
|
+
disabled: y,
|
|
2336
2355
|
"data-gtm-event-context": `${r}Page-${d}: ${f}`,
|
|
2337
2356
|
"data-gtm-event-type": `${r}-${d}-register-click`,
|
|
2338
2357
|
"data-testid": "in-card-button",
|
|
2339
2358
|
children: s.formatMessage({
|
|
2340
|
-
id: `card_cta_${d}${
|
|
2359
|
+
id: `card_cta_${d}${y ? `_${i.loading ? "loading" : "done"}` : ""}`
|
|
2341
2360
|
})
|
|
2342
2361
|
}
|
|
2343
2362
|
);
|
|
@@ -2351,7 +2370,7 @@ const Tn = {
|
|
|
2351
2370
|
star: "star_empty_thin"
|
|
2352
2371
|
}, Kr = (e) => {
|
|
2353
2372
|
let t = e;
|
|
2354
|
-
return Object.keys($n).includes(e) && (t = $n[e]), `url(${
|
|
2373
|
+
return Object.keys($n).includes(e) && (t = $n[e]), `url(${He}icons/${t}.svg)`;
|
|
2355
2374
|
};
|
|
2356
2375
|
const Qr = {
|
|
2357
2376
|
title: 66,
|
|
@@ -2366,19 +2385,19 @@ const Qr = {
|
|
|
2366
2385
|
gtmContext: s = "Carousel",
|
|
2367
2386
|
className: i = ""
|
|
2368
2387
|
}) => {
|
|
2369
|
-
const o = A(), c =
|
|
2388
|
+
const o = A(), c = _e(je), m = c && typeof c.id == "string", [l, f] = R({
|
|
2370
2389
|
data: null,
|
|
2371
2390
|
isLoading: !0
|
|
2372
|
-
}), { data: d, isLoading: p } = l, h =
|
|
2373
|
-
n(t, m).then((
|
|
2374
|
-
f(() => ({ data:
|
|
2375
|
-
}).catch(() => f((
|
|
2391
|
+
}), { data: d, isLoading: p } = l, h = Rn(() => {
|
|
2392
|
+
n(t, m).then((I) => {
|
|
2393
|
+
f(() => ({ data: I, isLoading: !1 }));
|
|
2394
|
+
}).catch(() => f((I) => ({ ...I, isLoading: !1 })));
|
|
2376
2395
|
}, [e]);
|
|
2377
2396
|
if (G(() => {
|
|
2378
2397
|
h();
|
|
2379
2398
|
}, []), p || !d)
|
|
2380
2399
|
return /* @__PURE__ */ a.jsx(
|
|
2381
|
-
|
|
2400
|
+
be,
|
|
2382
2401
|
{
|
|
2383
2402
|
element: "li",
|
|
2384
2403
|
className: "card-wrapper",
|
|
@@ -2387,22 +2406,22 @@ const Qr = {
|
|
|
2387
2406
|
);
|
|
2388
2407
|
const { contentType: g } = d;
|
|
2389
2408
|
if (!g || !it[g])
|
|
2390
|
-
return /* @__PURE__ */ a.jsx(
|
|
2409
|
+
return /* @__PURE__ */ a.jsx(be, { element: "li", className: "card-wrapper" });
|
|
2391
2410
|
const {
|
|
2392
|
-
basePath:
|
|
2411
|
+
basePath: y = "",
|
|
2393
2412
|
className: k,
|
|
2394
|
-
length:
|
|
2413
|
+
length: b,
|
|
2395
2414
|
gtmEvent: _
|
|
2396
|
-
} = it[g], v = zn(`card_label_${g}`) ? o.formatMessage({ id: `card_label_${g}` }) : !1, j = d.slug ? `${
|
|
2397
|
-
let
|
|
2398
|
-
j && (
|
|
2415
|
+
} = it[g], v = zn(`card_label_${g}`) ? o.formatMessage({ id: `card_label_${g}` }) : !1, j = d.slug ? `${y}${d.slug}` : !1, S = { ...Qr, ...b };
|
|
2416
|
+
let M = { className: "card" };
|
|
2417
|
+
j && (M = {
|
|
2399
2418
|
href: j,
|
|
2400
2419
|
className: "card gtm-trackable",
|
|
2401
2420
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
2402
2421
|
"data-gtm-event-type": `${_}-click`,
|
|
2403
2422
|
"data-testid": "link"
|
|
2404
|
-
}, d.openInNewTab && (
|
|
2405
|
-
const
|
|
2423
|
+
}, d.openInNewTab && (M.target = "_blank"));
|
|
2424
|
+
const D = d.customIcon ? { "--custom-icon": Kr(d.customIcon) } : {};
|
|
2406
2425
|
return /* @__PURE__ */ a.jsx(
|
|
2407
2426
|
"li",
|
|
2408
2427
|
{
|
|
@@ -2412,11 +2431,11 @@ const Qr = {
|
|
|
2412
2431
|
"has-custom-icon": d.customIcon,
|
|
2413
2432
|
"has-image": d.banner
|
|
2414
2433
|
}),
|
|
2415
|
-
style:
|
|
2434
|
+
style: D,
|
|
2416
2435
|
"data-testid": `${g}-card`,
|
|
2417
2436
|
children: F.createElement(
|
|
2418
2437
|
j ? "a" : "div",
|
|
2419
|
-
|
|
2438
|
+
M,
|
|
2420
2439
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2421
2440
|
(d.customLabel || v) && /* @__PURE__ */ a.jsx("small", { className: w("card-label text-small", k), children: d.customLabel || v }),
|
|
2422
2441
|
d.startDate && !d.isOngoingEvent && /* @__PURE__ */ a.jsx(
|
|
@@ -2432,7 +2451,7 @@ const Qr = {
|
|
|
2432
2451
|
d.registered && /* @__PURE__ */ a.jsx(st, { size: "small", variant: "registered", children: o.formatMessage({ id: "card_registered" }) }),
|
|
2433
2452
|
/* @__PURE__ */ a.jsx(Wn, { image: d.banner })
|
|
2434
2453
|
] }) : k === "people" ? /* @__PURE__ */ a.jsx(
|
|
2435
|
-
|
|
2454
|
+
ze,
|
|
2436
2455
|
{
|
|
2437
2456
|
name: d.title || "",
|
|
2438
2457
|
src: d.profile,
|
|
@@ -2451,14 +2470,14 @@ const Qr = {
|
|
|
2451
2470
|
"data-testid": "contributors"
|
|
2452
2471
|
}
|
|
2453
2472
|
),
|
|
2454
|
-
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: Ne(d.partner.title,
|
|
2473
|
+
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: Ne(d.partner.title, S.partner) }),
|
|
2455
2474
|
/* Text */
|
|
2456
|
-
["title", "text", "secondaryText"].map((
|
|
2457
|
-
const
|
|
2458
|
-
if (
|
|
2475
|
+
["title", "text", "secondaryText"].map((I) => {
|
|
2476
|
+
const $ = d[I];
|
|
2477
|
+
if (!$)
|
|
2459
2478
|
return null;
|
|
2460
|
-
const
|
|
2461
|
-
return /* @__PURE__ */ a.jsx("p", { className:
|
|
2479
|
+
const C = ur(I);
|
|
2480
|
+
return /* @__PURE__ */ a.jsx("p", { className: C, "data-testid": C, children: Ne($, S[I]) }, I);
|
|
2462
2481
|
}),
|
|
2463
2482
|
/* @__PURE__ */ a.jsx(Yr, { type: k || "", data: d }),
|
|
2464
2483
|
/* @__PURE__ */ a.jsx(Gr, { data: d, cta: r, link: j || "", gtmContext: s })
|
|
@@ -2510,7 +2529,7 @@ const Nt = {
|
|
|
2510
2529
|
threeCards: 769,
|
|
2511
2530
|
twoCards: 480
|
|
2512
2531
|
};
|
|
2513
|
-
let
|
|
2532
|
+
let Ke = null;
|
|
2514
2533
|
const ts = ({
|
|
2515
2534
|
id: e,
|
|
2516
2535
|
cards: t,
|
|
@@ -2520,50 +2539,50 @@ const ts = ({
|
|
|
2520
2539
|
className: i,
|
|
2521
2540
|
gtmContext: o
|
|
2522
2541
|
}) => {
|
|
2523
|
-
var
|
|
2524
|
-
const c = A(), [m, l] =
|
|
2542
|
+
var I;
|
|
2543
|
+
const c = A(), [m, l] = R({
|
|
2525
2544
|
cardsPerPage: 4,
|
|
2526
2545
|
isLoading: !0
|
|
2527
|
-
}), { cardsPerPage: f, isLoading: d } = m, [p, h] =
|
|
2546
|
+
}), { cardsPerPage: f, isLoading: d } = m, [p, h] = R({
|
|
2528
2547
|
currentPage: 0,
|
|
2529
2548
|
loadedPages: [0]
|
|
2530
|
-
}), { currentPage: g, loadedPages:
|
|
2549
|
+
}), { currentPage: g, loadedPages: y } = p, k = t.length, b = Math.ceil(k / f), _ = ae(null), v = Ue(!0, !0, _ == null ? void 0 : _.current);
|
|
2531
2550
|
G(() => {
|
|
2532
|
-
let
|
|
2533
|
-
v && (v >= Nt.fourCards ?
|
|
2534
|
-
...
|
|
2535
|
-
cardsPerPage:
|
|
2551
|
+
let $ = 1;
|
|
2552
|
+
v && (v >= Nt.fourCards ? $ = 4 : v >= Nt.threeCards ? $ = 3 : v >= Nt.twoCards && ($ = 2), $ > k && ($ = k)), l((C) => ({
|
|
2553
|
+
...C,
|
|
2554
|
+
cardsPerPage: $,
|
|
2536
2555
|
isLoading: !1
|
|
2537
2556
|
}));
|
|
2538
2557
|
}, [v, k]);
|
|
2539
|
-
const j = (
|
|
2540
|
-
let
|
|
2541
|
-
if (typeof
|
|
2542
|
-
if (
|
|
2543
|
-
if (g <
|
|
2544
|
-
|
|
2558
|
+
const j = ($ = "next") => {
|
|
2559
|
+
let C = g;
|
|
2560
|
+
if (typeof $ == "string")
|
|
2561
|
+
if ($ === "next")
|
|
2562
|
+
if (g < b - 1)
|
|
2563
|
+
C = g + 1;
|
|
2545
2564
|
else
|
|
2546
2565
|
return;
|
|
2547
2566
|
else if (g > 0)
|
|
2548
|
-
|
|
2567
|
+
C = g - 1;
|
|
2549
2568
|
else
|
|
2550
2569
|
return;
|
|
2551
2570
|
else
|
|
2552
|
-
|
|
2571
|
+
C = $;
|
|
2553
2572
|
h((E) => ({
|
|
2554
2573
|
...E,
|
|
2555
|
-
currentPage:
|
|
2556
|
-
loadedPages: [.../* @__PURE__ */ new Set([...
|
|
2574
|
+
currentPage: C,
|
|
2575
|
+
loadedPages: [.../* @__PURE__ */ new Set([...y, C])]
|
|
2557
2576
|
}));
|
|
2558
|
-
},
|
|
2559
|
-
|
|
2560
|
-
},
|
|
2561
|
-
if (
|
|
2577
|
+
}, S = ($) => {
|
|
2578
|
+
Ke = $.touches[0].clientX;
|
|
2579
|
+
}, M = ($) => {
|
|
2580
|
+
if (Ke === null)
|
|
2562
2581
|
return;
|
|
2563
|
-
const
|
|
2564
|
-
E > 5 ? j("next") : E < -5 && j("previous"),
|
|
2565
|
-
},
|
|
2566
|
-
"--width": `${((
|
|
2582
|
+
const C = $.touches[0].clientX, E = Ke - C;
|
|
2583
|
+
E > 5 ? j("next") : E < -5 && j("previous"), Ke = null;
|
|
2584
|
+
}, D = {
|
|
2585
|
+
"--width": `${((I = _ == null ? void 0 : _.current) == null ? void 0 : I.offsetWidth) || 0}px`,
|
|
2567
2586
|
"--total-cards": k,
|
|
2568
2587
|
"--cards-per-page": f,
|
|
2569
2588
|
"--page": g
|
|
@@ -2580,23 +2599,23 @@ const ts = ({
|
|
|
2580
2599
|
"ul",
|
|
2581
2600
|
{
|
|
2582
2601
|
className: "carousel",
|
|
2583
|
-
onTouchStart:
|
|
2584
|
-
onTouchMove:
|
|
2585
|
-
style:
|
|
2602
|
+
onTouchStart: S,
|
|
2603
|
+
onTouchMove: M,
|
|
2604
|
+
style: D,
|
|
2586
2605
|
"data-testid": "carousel-list",
|
|
2587
|
-
children: t.map((
|
|
2588
|
-
let E =
|
|
2589
|
-
return E && Xr(
|
|
2606
|
+
children: t.map(($, C) => {
|
|
2607
|
+
let E = $ && $.sys && $.sys.id ? `${e}-card-${$.sys.id}` : null;
|
|
2608
|
+
return E && Xr(C, f, g, y) ? /* @__PURE__ */ a.jsx(
|
|
2590
2609
|
ea,
|
|
2591
2610
|
{
|
|
2592
2611
|
id: E,
|
|
2593
|
-
card: {
|
|
2612
|
+
card: { ...$, contentType: n[C] },
|
|
2594
2613
|
buildCardData: r,
|
|
2595
2614
|
gtmContext: o
|
|
2596
2615
|
},
|
|
2597
2616
|
E
|
|
2598
|
-
) : (E = E || `${e}-card-${
|
|
2599
|
-
|
|
2617
|
+
) : (E = E || `${e}-card-${C}`, /* @__PURE__ */ a.jsx(
|
|
2618
|
+
be,
|
|
2600
2619
|
{
|
|
2601
2620
|
element: "li",
|
|
2602
2621
|
className: "card-wrapper",
|
|
@@ -2607,15 +2626,15 @@ const ts = ({
|
|
|
2607
2626
|
})
|
|
2608
2627
|
}
|
|
2609
2628
|
),
|
|
2610
|
-
|
|
2629
|
+
b <= 1 ? null : /* @__PURE__ */ a.jsxs("ul", { className: "controls", "data-testid": "carousel-controls", children: [
|
|
2611
2630
|
/* @__PURE__ */ a.jsx("li", { className: "arrow previous", children: /* @__PURE__ */ a.jsx(
|
|
2612
|
-
|
|
2631
|
+
H,
|
|
2613
2632
|
{
|
|
2614
2633
|
variant: "secondary",
|
|
2615
2634
|
size: "large",
|
|
2616
2635
|
icon: { icon: "chevron_left" },
|
|
2617
|
-
onClick: (
|
|
2618
|
-
|
|
2636
|
+
onClick: ($) => {
|
|
2637
|
+
$.preventDefault(), $.stopPropagation(), j("previous");
|
|
2619
2638
|
},
|
|
2620
2639
|
screenreaderText: c.formatMessage({
|
|
2621
2640
|
id: "carousel_pagination_previous"
|
|
@@ -2623,32 +2642,32 @@ const ts = ({
|
|
|
2623
2642
|
disabled: g <= 0
|
|
2624
2643
|
}
|
|
2625
2644
|
) }),
|
|
2626
|
-
[...Array(
|
|
2645
|
+
[...Array(b)].map(($, C) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
2627
2646
|
"button",
|
|
2628
2647
|
{
|
|
2629
2648
|
className: w("page-indicator", {
|
|
2630
|
-
selected:
|
|
2649
|
+
selected: C === g
|
|
2631
2650
|
}),
|
|
2632
2651
|
onClick: (E) => {
|
|
2633
|
-
E.preventDefault(), E.stopPropagation(), j(
|
|
2652
|
+
E.preventDefault(), E.stopPropagation(), j(C);
|
|
2634
2653
|
},
|
|
2635
|
-
children: /* @__PURE__ */ a.jsx(
|
|
2654
|
+
children: /* @__PURE__ */ a.jsx(ie, { showOnFocus: !1, children: c.formatMessage(
|
|
2636
2655
|
{ id: "carousel_pagination_page" },
|
|
2637
|
-
{ number:
|
|
2656
|
+
{ number: C + 1, total: b }
|
|
2638
2657
|
) })
|
|
2639
2658
|
}
|
|
2640
|
-
) }, `page-indicator-${
|
|
2659
|
+
) }, `page-indicator-${C}`)),
|
|
2641
2660
|
/* @__PURE__ */ a.jsx("li", { className: "arrow next", children: /* @__PURE__ */ a.jsx(
|
|
2642
|
-
|
|
2661
|
+
H,
|
|
2643
2662
|
{
|
|
2644
2663
|
variant: "secondary",
|
|
2645
2664
|
size: "large",
|
|
2646
2665
|
icon: { icon: "chevron_right" },
|
|
2647
|
-
onClick: (
|
|
2648
|
-
|
|
2666
|
+
onClick: ($) => {
|
|
2667
|
+
$.preventDefault(), $.stopPropagation(), j("next");
|
|
2649
2668
|
},
|
|
2650
2669
|
screenreaderText: c.formatMessage({ id: "carousel_pagination_next" }),
|
|
2651
|
-
disabled: g >=
|
|
2670
|
+
disabled: g >= b - 1
|
|
2652
2671
|
}
|
|
2653
2672
|
) })
|
|
2654
2673
|
] })
|
|
@@ -2672,7 +2691,7 @@ const ts = ({
|
|
|
2672
2691
|
"data-testid": "carousel-placeholder"
|
|
2673
2692
|
}
|
|
2674
2693
|
),
|
|
2675
|
-
d ? null : /* @__PURE__ */ a.jsx(
|
|
2694
|
+
d ? null : /* @__PURE__ */ a.jsx($e, {})
|
|
2676
2695
|
] }, `placeholder-${f}`) : /* @__PURE__ */ a.jsxs(qe, { children: [
|
|
2677
2696
|
/* @__PURE__ */ a.jsx(
|
|
2678
2697
|
ts,
|
|
@@ -2683,20 +2702,20 @@ const ts = ({
|
|
|
2683
2702
|
...s
|
|
2684
2703
|
}
|
|
2685
2704
|
),
|
|
2686
|
-
d ? null : /* @__PURE__ */ a.jsx(
|
|
2705
|
+
d ? null : /* @__PURE__ */ a.jsx($e, {})
|
|
2687
2706
|
] }, `carousel-${f}`);
|
|
2688
2707
|
}
|
|
2689
2708
|
);
|
|
2690
2709
|
const Pt = "joinCommunityButton", ta = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2691
2710
|
}, leave: () => {
|
|
2692
2711
|
} } }) => {
|
|
2693
|
-
const s = A(), i =
|
|
2712
|
+
const s = A(), i = _e(je), o = i && typeof i.id == "string", [c, m] = R(e), [l, f] = R(e ? "joined" : "notJoined");
|
|
2694
2713
|
G(() => {
|
|
2695
2714
|
l === "joining" ? f("joined") : l === "leaving" && f("notJoined");
|
|
2696
2715
|
}, [c]);
|
|
2697
2716
|
const d = {}, p = {};
|
|
2698
2717
|
return c && l !== "leaving" && (d["data-hover-text"] = s.formatMessage({ id: `${Pt}_leave` }), d["aria-label"] = s.formatMessage({ id: `${Pt}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ a.jsx(
|
|
2699
|
-
|
|
2718
|
+
H,
|
|
2700
2719
|
{
|
|
2701
2720
|
variant: c ? "secondary" : "primary",
|
|
2702
2721
|
size: "medium",
|
|
@@ -2721,7 +2740,7 @@ const At = "communityDetails_", Di = ({
|
|
|
2721
2740
|
}) => {
|
|
2722
2741
|
const c = A(), m = 5, l = r || s.length, f = s.length ? s : Array(m).fill({}), d = `/communities/${n}/members` === window.location.pathname;
|
|
2723
2742
|
return /* @__PURE__ */ a.jsxs("div", { className: w("community-details", e), children: [
|
|
2724
|
-
/* @__PURE__ */ a.jsx(
|
|
2743
|
+
/* @__PURE__ */ a.jsx($e, {}),
|
|
2725
2744
|
/* @__PURE__ */ a.jsxs("div", { className: "member-details", children: [
|
|
2726
2745
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
2727
2746
|
/* @__PURE__ */ a.jsxs("h3", { children: [
|
|
@@ -2748,7 +2767,7 @@ const At = "communityDetails_", Di = ({
|
|
|
2748
2767
|
] }),
|
|
2749
2768
|
/* @__PURE__ */ a.jsx(ta, { isMember: t, functions: { ...o } }),
|
|
2750
2769
|
t && /* @__PURE__ */ a.jsx(
|
|
2751
|
-
|
|
2770
|
+
H,
|
|
2752
2771
|
{
|
|
2753
2772
|
variant: "primary",
|
|
2754
2773
|
onClick: i,
|
|
@@ -2759,21 +2778,21 @@ const At = "communityDetails_", Di = ({
|
|
|
2759
2778
|
)
|
|
2760
2779
|
] });
|
|
2761
2780
|
};
|
|
2762
|
-
const
|
|
2781
|
+
const Ri = ({
|
|
2763
2782
|
breadcrumbs: e,
|
|
2764
2783
|
cutoff: t = 20,
|
|
2765
2784
|
className: n = ""
|
|
2766
2785
|
}) => {
|
|
2767
2786
|
const r = A();
|
|
2768
2787
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2769
|
-
/* @__PURE__ */ a.jsx(
|
|
2788
|
+
/* @__PURE__ */ a.jsx(ie, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2770
2789
|
/* @__PURE__ */ a.jsx("ul", { className: w("breadcrumbs text-small", n), children: e.map(({ text: s, href: i, current: o = !1 }, c) => /* @__PURE__ */ a.jsxs("li", { children: [
|
|
2771
|
-
o && /* @__PURE__ */ a.jsx(
|
|
2790
|
+
o && /* @__PURE__ */ a.jsx(ie, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2772
2791
|
/* @__PURE__ */ a.jsx(gt, { href: o ? void 0 : i, children: Ne(s, t) })
|
|
2773
2792
|
] }, `${window.btoa(s)}_${c}`)) })
|
|
2774
2793
|
] });
|
|
2775
2794
|
};
|
|
2776
|
-
const
|
|
2795
|
+
const Li = ({
|
|
2777
2796
|
options: e,
|
|
2778
2797
|
allOption: t = !1,
|
|
2779
2798
|
allowMultiple: n = !0,
|
|
@@ -2781,7 +2800,7 @@ const Ri = ({
|
|
|
2781
2800
|
},
|
|
2782
2801
|
className: s = ""
|
|
2783
2802
|
}) => {
|
|
2784
|
-
const i = A(), o = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [c, m] =
|
|
2803
|
+
const i = A(), o = t ? [{ id: "all", text: typeof t != "boolean" && t.text || i.formatMessage({ id: "filters_all" }) }, ...e] : e, [c, m] = R(t ? ["all"] : []), l = (f, d) => {
|
|
2785
2804
|
let p = [];
|
|
2786
2805
|
c.includes(f) ? p = c.filter((h) => h !== f) : f === "all" ? p = ["all"] : n ? p = [...c.filter((h) => h !== "all"), f] : p = [f], m((h) => (r && typeof r == "function" && r({ current: p, previous: h }), p)), d && typeof d == "function" && d();
|
|
2787
2806
|
};
|
|
@@ -2792,8 +2811,8 @@ const Ri = ({
|
|
|
2792
2811
|
"button",
|
|
2793
2812
|
{
|
|
2794
2813
|
className: w(f, { selected: c.includes(f) }),
|
|
2795
|
-
onClick: (
|
|
2796
|
-
|
|
2814
|
+
onClick: (y) => {
|
|
2815
|
+
y.preventDefault(), y.stopPropagation(), l(f, h);
|
|
2797
2816
|
},
|
|
2798
2817
|
...g,
|
|
2799
2818
|
children: d
|
|
@@ -2809,7 +2828,7 @@ const Ri = ({
|
|
|
2809
2828
|
i === "before-lang" ? r += `/${s}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${s}`);
|
|
2810
2829
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2811
2830
|
};
|
|
2812
|
-
const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
2831
|
+
const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Qe = "languageSwitcher_", Ii = ({
|
|
2813
2832
|
currentLanguage: e,
|
|
2814
2833
|
isOriginalLanguage: t = !1,
|
|
2815
2834
|
isHumanTranslation: n = !1,
|
|
@@ -2821,38 +2840,38 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2821
2840
|
label: c,
|
|
2822
2841
|
className: m = ""
|
|
2823
2842
|
}) => {
|
|
2824
|
-
const l = A(), [f, d] =
|
|
2843
|
+
const l = A(), [f, d] = R(e);
|
|
2825
2844
|
if (G(() => {
|
|
2826
2845
|
e !== f && d(e);
|
|
2827
|
-
}, [e]), !r || !Object.values(r).some((
|
|
2846
|
+
}, [e]), !r || !Object.values(r).some((y) => y && y.post_name))
|
|
2828
2847
|
return null;
|
|
2829
2848
|
const h = Object.keys(r), g = f !== e;
|
|
2830
2849
|
return /* @__PURE__ */ a.jsxs("div", { className: w("language-switcher text-small", o, m), children: [
|
|
2831
2850
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
2832
|
-
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${
|
|
2833
|
-
/* @__PURE__ */ a.jsx("ul", { children: h.map((
|
|
2834
|
-
if (!Ft[
|
|
2851
|
+
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Qe}label` }) }),
|
|
2852
|
+
/* @__PURE__ */ a.jsx("ul", { children: h.map((y) => {
|
|
2853
|
+
if (!Ft[y])
|
|
2835
2854
|
return null;
|
|
2836
|
-
let k = { className:
|
|
2837
|
-
return f ===
|
|
2855
|
+
let k = { className: y };
|
|
2856
|
+
return f === y ? k["aria-label"] = l.formatMessage({ id: `${Qe}selected` }, { language: Ft[y] }) : k = {
|
|
2838
2857
|
...k,
|
|
2839
|
-
href: ns(
|
|
2840
|
-
onClick: (
|
|
2841
|
-
|
|
2858
|
+
href: ns(y, i),
|
|
2859
|
+
onClick: (b) => {
|
|
2860
|
+
b.preventDefault(), b.stopPropagation(), d(y), s(y);
|
|
2842
2861
|
}
|
|
2843
|
-
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(gt, { ...k, fallbackElement: "span", children: Ft[
|
|
2862
|
+
}, /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(gt, { ...k, fallbackElement: "span", children: Ft[y] }) }, y);
|
|
2844
2863
|
}) }),
|
|
2845
|
-
o !== "short" && !g && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({ id: `${
|
|
2864
|
+
o !== "short" && !g && /* @__PURE__ */ a.jsx("p", { children: l.formatMessage({ id: `${Qe}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2846
2865
|
] }),
|
|
2847
2866
|
o !== "short" && !g && !t && !n && /* @__PURE__ */ a.jsx("small", {
|
|
2848
2867
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2849
2868
|
// @ts-ignore
|
|
2850
2869
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2851
|
-
children: l.formatMessage({ id: `${
|
|
2870
|
+
children: l.formatMessage({ id: `${Qe}disclaimer` }, {
|
|
2852
2871
|
email: Be.support,
|
|
2853
|
-
link: (
|
|
2854
|
-
const k = `mailto:${
|
|
2855
|
-
return /* @__PURE__ */ a.jsx("a", { href: k, children:
|
|
2872
|
+
link: (y) => {
|
|
2873
|
+
const k = `mailto:${y}`;
|
|
2874
|
+
return /* @__PURE__ */ a.jsx("a", { href: k, children: y });
|
|
2856
2875
|
}
|
|
2857
2876
|
})
|
|
2858
2877
|
})
|
|
@@ -2871,7 +2890,7 @@ const Dt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2871
2890
|
className: s = "",
|
|
2872
2891
|
gtmContext: i = "LoadMore"
|
|
2873
2892
|
}) => {
|
|
2874
|
-
const [o, c] =
|
|
2893
|
+
const [o, c] = R(""), m = async (l) => {
|
|
2875
2894
|
try {
|
|
2876
2895
|
await t(l);
|
|
2877
2896
|
} catch (f) {
|
|
@@ -2879,7 +2898,7 @@ const Dt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2879
2898
|
}
|
|
2880
2899
|
};
|
|
2881
2900
|
return /* @__PURE__ */ a.jsx("footer", { className: w("load-more", s), children: !o && e ? /* @__PURE__ */ a.jsx(
|
|
2882
|
-
|
|
2901
|
+
H,
|
|
2883
2902
|
{
|
|
2884
2903
|
variant: "secondary",
|
|
2885
2904
|
icon: n,
|
|
@@ -2892,10 +2911,10 @@ const Dt = Ua({ locale: "en", messages: Qt }), yt = ({
|
|
|
2892
2911
|
}
|
|
2893
2912
|
) : r.endOfFeed && (!o || o != null && o.includes("Cannot read items")) ? /* @__PURE__ */ a.jsx("p", { children: r.endOfFeed }) : o && /* @__PURE__ */ a.jsx("p", { className: "error", children: r.error }) });
|
|
2894
2913
|
};
|
|
2895
|
-
const na = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ a.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ a.jsx("a", { href: "/home/", className: w("logo", e, t, n), ...r, children: /* @__PURE__ */ a.jsx(
|
|
2896
|
-
let
|
|
2914
|
+
const na = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ a.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ a.jsx("a", { href: "/home/", className: w("logo", e, t, n), ...r, children: /* @__PURE__ */ a.jsx(ie, { children: /* @__PURE__ */ a.jsx(we, { id: "apolitical" }) }) }) });
|
|
2915
|
+
let Je = !1;
|
|
2897
2916
|
const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2898
|
-
const s = A(), i =
|
|
2917
|
+
const s = A(), i = ae(null), [o, c] = R(!1), m = (l) => {
|
|
2899
2918
|
i.current && l.target instanceof HTMLElement && !i.current.contains(l.target) && c(!1);
|
|
2900
2919
|
};
|
|
2901
2920
|
return G(() => (document.addEventListener("click", m, !0), () => {
|
|
@@ -2905,7 +2924,7 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2905
2924
|
className: w("more-menu text-medium", r),
|
|
2906
2925
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2907
2926
|
/* @__PURE__ */ a.jsx(
|
|
2908
|
-
|
|
2927
|
+
H,
|
|
2909
2928
|
{
|
|
2910
2929
|
variant: "tertiary",
|
|
2911
2930
|
size: "medium",
|
|
@@ -2918,27 +2937,27 @@ const as = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2918
2937
|
}
|
|
2919
2938
|
),
|
|
2920
2939
|
/* @__PURE__ */ a.jsx("ul", { id: t, hidden: !o, children: n.map(({ href: l, onClick: f, text: d, icon: p, ...h }, g) => {
|
|
2921
|
-
const
|
|
2940
|
+
const y = {
|
|
2922
2941
|
...h,
|
|
2923
2942
|
onClick: (k) => {
|
|
2924
2943
|
c(!1), typeof f == "function" && f(k);
|
|
2925
2944
|
},
|
|
2926
2945
|
onFocus: () => {
|
|
2927
|
-
|
|
2946
|
+
Je && (clearTimeout(Je), Je = !1);
|
|
2928
2947
|
},
|
|
2929
2948
|
onBlur: () => {
|
|
2930
|
-
|
|
2949
|
+
Je = setTimeout(() => {
|
|
2931
2950
|
c(!1);
|
|
2932
2951
|
}, 100);
|
|
2933
2952
|
}
|
|
2934
2953
|
};
|
|
2935
|
-
return l && (
|
|
2936
|
-
|
|
2954
|
+
return l && (y.href = l), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
2955
|
+
H,
|
|
2937
2956
|
{
|
|
2938
2957
|
variant: "tertiary",
|
|
2939
2958
|
size: "medium",
|
|
2940
2959
|
icon: p ? { icon: p, position: "left" } : !1,
|
|
2941
|
-
...
|
|
2960
|
+
...y,
|
|
2942
2961
|
children: d
|
|
2943
2962
|
}
|
|
2944
2963
|
) }, `${window.btoa(d)}_${g}`);
|
|
@@ -2964,7 +2983,7 @@ const ss = [
|
|
|
2964
2983
|
href: "/solution-articles/"
|
|
2965
2984
|
}
|
|
2966
2985
|
], is = ({ activeLink: e }) => {
|
|
2967
|
-
const t = A(), n =
|
|
2986
|
+
const t = A(), n = _e(je), r = n && typeof n.id == "string";
|
|
2968
2987
|
return /* @__PURE__ */ a.jsxs("ul", { id: "navigation-menu", className: "text-medium", children: [
|
|
2969
2988
|
ss.map(({ key: s, href: i }) => /* @__PURE__ */ a.jsx(
|
|
2970
2989
|
"li",
|
|
@@ -2992,7 +3011,7 @@ const ss = [
|
|
|
2992
3011
|
className: "gtm-trackable",
|
|
2993
3012
|
children: [
|
|
2994
3013
|
/* @__PURE__ */ a.jsx(
|
|
2995
|
-
|
|
3014
|
+
ze,
|
|
2996
3015
|
{
|
|
2997
3016
|
name: (n == null ? void 0 : n.name) || "",
|
|
2998
3017
|
src: n != null && n.image ? n.image.thumbnail : ""
|
|
@@ -3062,8 +3081,8 @@ const cs = "shareLinks_", Oi = ({
|
|
|
3062
3081
|
if (typeof p == "function" && !p())
|
|
3063
3082
|
return null;
|
|
3064
3083
|
const g = {};
|
|
3065
|
-
return h && (g.onClick = (
|
|
3066
|
-
|
|
3084
|
+
return h && (g.onClick = (y) => h(y, d)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
3085
|
+
H,
|
|
3067
3086
|
{
|
|
3068
3087
|
size: s,
|
|
3069
3088
|
variant: "tertiary",
|
|
@@ -3096,13 +3115,13 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3096
3115
|
}
|
|
3097
3116
|
}
|
|
3098
3117
|
}
|
|
3099
|
-
const [s, i] =
|
|
3118
|
+
const [s, i] = R(
|
|
3100
3119
|
(m = e[r]) != null && m.id ? e[r].id : n(e[r].id, e[r].text, r)
|
|
3101
3120
|
), o = [], c = [];
|
|
3102
3121
|
return e.forEach(({ id: l, text: f, content: d, href: p }, h) => {
|
|
3103
3122
|
l = n(l, f, h);
|
|
3104
|
-
const g = s === l,
|
|
3105
|
-
p || (
|
|
3123
|
+
const g = s === l, y = {};
|
|
3124
|
+
p || (y["aria-controls"] = l, y.onClick = (k) => {
|
|
3106
3125
|
k.preventDefault(), k.stopPropagation(), i(l), window.location.hash = `#${l}`;
|
|
3107
3126
|
}, c.push(
|
|
3108
3127
|
/* @__PURE__ */ a.jsx(
|
|
@@ -3126,7 +3145,7 @@ const Bi = ({ tabs: e, className: t = "" }) => {
|
|
|
3126
3145
|
className: w({ selected: g }),
|
|
3127
3146
|
role: "tab",
|
|
3128
3147
|
"aria-selected": g,
|
|
3129
|
-
...
|
|
3148
|
+
...y,
|
|
3130
3149
|
children: f
|
|
3131
3150
|
}
|
|
3132
3151
|
) }, `tab-${l}`)
|
|
@@ -3145,16 +3164,16 @@ const ls = {
|
|
|
3145
3164
|
className: n = "",
|
|
3146
3165
|
children: r
|
|
3147
3166
|
}) => {
|
|
3148
|
-
const s =
|
|
3167
|
+
const s = Ue(!0);
|
|
3149
3168
|
let i = r;
|
|
3150
3169
|
return F.Children.count(r) === 1 && (i = F.Children.toArray(r)[0], i.props && (i = i.props.children)), /* @__PURE__ */ a.jsx("section", { className: w("columns", `layout-${e}`, n), children: F.Children.map(i, (o, c) => t !== !1 && c === t && s && s < ls[e] ? null : o) });
|
|
3151
3170
|
}, Zi = ({ activeLink: e, ...t }) => /* @__PURE__ */ a.jsx(_t, { children: /* @__PURE__ */ a.jsx(ds, { layout: "1-3", children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3152
3171
|
/* @__PURE__ */ a.jsx(is, { activeLink: e }),
|
|
3153
3172
|
/* @__PURE__ */ a.jsx(qr, { ...t })
|
|
3154
3173
|
] }) }) });
|
|
3155
|
-
const
|
|
3156
|
-
const e = A(), [t, n, r] = Ka(
|
|
3157
|
-
|
|
3174
|
+
const Rt = "cookieBanner_", Lt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], It = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), us = () => {
|
|
3175
|
+
const e = A(), [t, n, r] = Ka(Lt), [s, i] = R(!t["apol-cookie-banner"]), o = () => {
|
|
3176
|
+
Lt.forEach((f) => {
|
|
3158
3177
|
n(f, !0, {
|
|
3159
3178
|
path: "/",
|
|
3160
3179
|
expires: It,
|
|
@@ -3165,7 +3184,7 @@ const Lt = "cookieBanner_", Rt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3165
3184
|
n("apol-cookie-banner", !0, {
|
|
3166
3185
|
path: "/",
|
|
3167
3186
|
expires: It
|
|
3168
|
-
}),
|
|
3187
|
+
}), Lt.forEach((f) => {
|
|
3169
3188
|
if (f === "apol-cookie-banner") {
|
|
3170
3189
|
n(f, !0, {
|
|
3171
3190
|
path: "/",
|
|
@@ -3191,14 +3210,14 @@ const Lt = "cookieBanner_", Rt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3191
3210
|
className: "gtm-trackable",
|
|
3192
3211
|
"data-gtm-event-context": "cookie-banner",
|
|
3193
3212
|
"data-gtm-event-type": `cookie-${f.gtmType}-click`,
|
|
3194
|
-
children: e.formatMessage({ id: `${
|
|
3213
|
+
children: e.formatMessage({ id: `${Rt}buttons_${f.id}` })
|
|
3195
3214
|
});
|
|
3196
3215
|
}), /* @__PURE__ */ a.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
3197
|
-
/* @__PURE__ */ a.jsx("h6", { children: e.formatMessage({ id: `${
|
|
3198
|
-
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${
|
|
3216
|
+
/* @__PURE__ */ a.jsx("h6", { children: e.formatMessage({ id: `${Rt}title` }) }),
|
|
3217
|
+
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${Rt}text` }) }),
|
|
3199
3218
|
/* @__PURE__ */ a.jsx(ht, { buttons: l })
|
|
3200
3219
|
] });
|
|
3201
|
-
},
|
|
3220
|
+
}, ke = {
|
|
3202
3221
|
platform: {
|
|
3203
3222
|
order: ["events", "courses", "articles"],
|
|
3204
3223
|
// An array guarantees the right order
|
|
@@ -3292,14 +3311,14 @@ const Lt = "cookieBanner_", Rt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
3292
3311
|
}
|
|
3293
3312
|
};
|
|
3294
3313
|
const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
3295
|
-
const t =
|
|
3314
|
+
const t = ke[e].order || [];
|
|
3296
3315
|
let n = !1;
|
|
3297
|
-
return "text" in
|
|
3298
|
-
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(
|
|
3316
|
+
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ a.jsxs(qe, { children: [
|
|
3317
|
+
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(we, { id: `${Me}${e}` }) }),
|
|
3299
3318
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ a.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
3300
3319
|
if (["order", "child", "text"].includes(r))
|
|
3301
3320
|
return null;
|
|
3302
|
-
const { href: s, gtmType: i } =
|
|
3321
|
+
const { href: s, gtmType: i } = ke[e][r], o = {};
|
|
3303
3322
|
return ["legal"].includes(e) && (o.target = "_blank", o.rel = "noopener"), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
3304
3323
|
"a",
|
|
3305
3324
|
{
|
|
@@ -3308,14 +3327,14 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3308
3327
|
"data-gtm-event-context": ot,
|
|
3309
3328
|
"data-gtm-event-type": i,
|
|
3310
3329
|
...o,
|
|
3311
|
-
children: /* @__PURE__ */ a.jsx(
|
|
3330
|
+
children: /* @__PURE__ */ a.jsx(we, { id: `${Me}${e}_${r}` })
|
|
3312
3331
|
}
|
|
3313
3332
|
) }, `${e}_${r}`);
|
|
3314
3333
|
}) }),
|
|
3315
3334
|
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ a.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ a.jsxs(qe, { children: [
|
|
3316
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(
|
|
3335
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(we, { id: `${Me}${e}_${r}` }) }),
|
|
3317
3336
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3318
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ a.jsx("address", { children: /* @__PURE__ */ a.jsx(
|
|
3337
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ a.jsx("address", { children: /* @__PURE__ */ a.jsx(we, { id: `${Me}${e}_${r}_address`, values: { br: /* @__PURE__ */ a.jsx("br", {}) } }) }),
|
|
3319
3338
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ a.jsx(
|
|
3320
3339
|
"a",
|
|
3321
3340
|
{
|
|
@@ -3343,12 +3362,12 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3343
3362
|
),
|
|
3344
3363
|
/* @__PURE__ */ a.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ a.jsxs("div", { className: "group", children: [
|
|
3345
3364
|
/* @__PURE__ */ a.jsx(En, { group: e }),
|
|
3346
|
-
Object.keys(
|
|
3365
|
+
Object.keys(ke[e]).includes("child") && /* @__PURE__ */ a.jsx(En, { group: ke[e].child })
|
|
3347
3366
|
] }, e)) }),
|
|
3348
3367
|
/* @__PURE__ */ a.jsx("hr", {}),
|
|
3349
3368
|
/* @__PURE__ */ a.jsxs("div", { className: "sub-footer", children: [
|
|
3350
|
-
/* @__PURE__ */ a.jsx("ul", { children: Array.isArray(
|
|
3351
|
-
const t =
|
|
3369
|
+
/* @__PURE__ */ a.jsx("ul", { children: Array.isArray(ke.social.order) && ke.social.order.map((e) => {
|
|
3370
|
+
const t = ke.social[e];
|
|
3352
3371
|
return /* @__PURE__ */ a.jsx("li", { className: e, children: /* @__PURE__ */ a.jsx(
|
|
3353
3372
|
"a",
|
|
3354
3373
|
{
|
|
@@ -3358,20 +3377,20 @@ const Me = "footer_", ot = "SiteFooter", En = ({ group: e }) => {
|
|
|
3358
3377
|
className: "gtm-trackable",
|
|
3359
3378
|
"data-gtm-event-context": ot,
|
|
3360
3379
|
"data-gtm-event-type": "social-click",
|
|
3361
|
-
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(
|
|
3380
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(we, { id: `${Me}social_${e}` }) })
|
|
3362
3381
|
}
|
|
3363
3382
|
) }, e);
|
|
3364
3383
|
}) }),
|
|
3365
|
-
/* @__PURE__ */ a.jsx("small", { children: /* @__PURE__ */ a.jsx(
|
|
3384
|
+
/* @__PURE__ */ a.jsx("small", { children: /* @__PURE__ */ a.jsx(we, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
3366
3385
|
] })
|
|
3367
3386
|
] }) });
|
|
3368
|
-
const
|
|
3369
|
-
const s = A(), [i, o] =
|
|
3387
|
+
const Xe = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
3388
|
+
const s = A(), [i, o] = R({ path: `${Xe}default`, type: "default", link: {}, mail: {}, error: "" }), [c, m] = R(!1), l = Rn(
|
|
3370
3389
|
(h) => {
|
|
3371
3390
|
h.preventDefault(), h.stopPropagation();
|
|
3372
|
-
const g = (
|
|
3391
|
+
const g = (y) => {
|
|
3373
3392
|
o({
|
|
3374
|
-
path: `${
|
|
3393
|
+
path: `${Xe}error_verificationFailedToSend`,
|
|
3375
3394
|
type: "error",
|
|
3376
3395
|
link: {
|
|
3377
3396
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -3387,17 +3406,17 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3387
3406
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
3388
3407
|
"data-gtm-event-type": "email-concierge-click"
|
|
3389
3408
|
},
|
|
3390
|
-
error:
|
|
3409
|
+
error: y
|
|
3391
3410
|
});
|
|
3392
3411
|
};
|
|
3393
3412
|
if (typeof r != "function") {
|
|
3394
|
-
g(s.formatMessage({ id: `${
|
|
3413
|
+
g(s.formatMessage({ id: `${Xe}error_noFunction` }));
|
|
3395
3414
|
return;
|
|
3396
3415
|
}
|
|
3397
3416
|
m(!0), r(t).then(() => {
|
|
3398
3417
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
3399
|
-
}).catch((
|
|
3400
|
-
g(
|
|
3418
|
+
}).catch((y) => {
|
|
3419
|
+
g(y.message);
|
|
3401
3420
|
}).finally(() => {
|
|
3402
3421
|
m(!1);
|
|
3403
3422
|
});
|
|
@@ -3407,13 +3426,13 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3407
3426
|
);
|
|
3408
3427
|
G(
|
|
3409
3428
|
() => {
|
|
3410
|
-
let h =
|
|
3429
|
+
let h = Xe, g = "default", y = {}, k = {};
|
|
3411
3430
|
switch (e) {
|
|
3412
3431
|
case "gov":
|
|
3413
3432
|
h += "autoApproved", g = "success";
|
|
3414
3433
|
break;
|
|
3415
3434
|
case "nonGov":
|
|
3416
|
-
h += "unrecognisedEmail", g = "error",
|
|
3435
|
+
h += "unrecognisedEmail", g = "error", y = {
|
|
3417
3436
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3418
3437
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
3419
3438
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -3428,17 +3447,17 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3428
3447
|
};
|
|
3429
3448
|
break;
|
|
3430
3449
|
case "verify":
|
|
3431
|
-
h += "emailUnverified", g = "error",
|
|
3450
|
+
h += "emailUnverified", g = "error", y = {
|
|
3432
3451
|
href: "#",
|
|
3433
3452
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3434
3453
|
"data-gtm-event-type": "SendEmailClick",
|
|
3435
3454
|
className: "gtm-trackable",
|
|
3436
|
-
onClick: (
|
|
3455
|
+
onClick: (b) => l(b),
|
|
3437
3456
|
"data-testid": "send-verify-email-click"
|
|
3438
3457
|
};
|
|
3439
3458
|
break;
|
|
3440
3459
|
case "exists":
|
|
3441
|
-
h += "emailAlreadyExists", g = "error",
|
|
3460
|
+
h += "emailAlreadyExists", g = "error", y = {
|
|
3442
3461
|
href: "/user-onboarding/login",
|
|
3443
3462
|
"data-gtm-event-context": "EmailExistsBox",
|
|
3444
3463
|
"data-gtm-event-type": "login-click"
|
|
@@ -3450,14 +3469,14 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3450
3469
|
};
|
|
3451
3470
|
break;
|
|
3452
3471
|
default:
|
|
3453
|
-
h += "default",
|
|
3472
|
+
h += "default", y = {
|
|
3454
3473
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3455
3474
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
3456
3475
|
"data-gtm-event-type": "LearnMoreClick"
|
|
3457
3476
|
};
|
|
3458
3477
|
break;
|
|
3459
3478
|
}
|
|
3460
|
-
o({ ...i, path: h, type: g, link:
|
|
3479
|
+
o({ ...i, path: h, type: g, link: y, mail: k });
|
|
3461
3480
|
},
|
|
3462
3481
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3463
3482
|
[e]
|
|
@@ -3466,8 +3485,8 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3466
3485
|
return ["link", "mail"].forEach((h) => {
|
|
3467
3486
|
f[h] = Object.keys(i[h]).length ? (g) => /* @__PURE__ */ a.jsx("a", { ...i[h], children: g }) : (g) => g;
|
|
3468
3487
|
}), /* @__PURE__ */ a.jsx(Ar, { type: i.type, heading: c ? !1 : s.formatMessage({ id: `${i.path}_title` }), children: c ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3469
|
-
/* @__PURE__ */ a.jsx(
|
|
3470
|
-
/* @__PURE__ */ a.jsx(
|
|
3488
|
+
/* @__PURE__ */ a.jsx(be, { element: "span" }),
|
|
3489
|
+
/* @__PURE__ */ a.jsx(be, { element: "span" })
|
|
3471
3490
|
] }) : (
|
|
3472
3491
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
3473
3492
|
// @ts-ignore
|
|
@@ -3487,24 +3506,24 @@ const Je = "emailHelperTextBox_", qi = ({ type: e, email: t, redirectPath: n, re
|
|
|
3487
3506
|
)
|
|
3488
3507
|
) });
|
|
3489
3508
|
};
|
|
3490
|
-
const
|
|
3509
|
+
const et = "passwordRules_", ra = "isMoreThanEightCharacters", sa = "includesNumberAndSymbol", ia = "includesLowerAndUppercase", ms = {
|
|
3491
3510
|
[ra]: "8Characters",
|
|
3492
3511
|
[sa]: "numberSymbol",
|
|
3493
3512
|
[ia]: "lowercaseUppercase"
|
|
3494
3513
|
}, fs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
3495
3514
|
const n = A();
|
|
3496
3515
|
return /* @__PURE__ */ a.jsxs("aside", { className: w("password-rules", t), children: [
|
|
3497
|
-
/* @__PURE__ */ a.jsx("small", { children: n.formatMessage({ id: `${
|
|
3516
|
+
/* @__PURE__ */ a.jsx("small", { children: n.formatMessage({ id: `${et}intro` }) }),
|
|
3498
3517
|
/* @__PURE__ */ a.jsx("ul", { children: [ra, sa, ia].map((r) => /* @__PURE__ */ a.jsxs("li", { className: w({ matches: e[r] }), children: [
|
|
3499
|
-
/* @__PURE__ */ a.jsxs(
|
|
3500
|
-
n.formatMessage({ id: `${
|
|
3518
|
+
/* @__PURE__ */ a.jsxs(ie, { children: [
|
|
3519
|
+
n.formatMessage({ id: `${et}rule_label` }),
|
|
3501
3520
|
" "
|
|
3502
3521
|
] }),
|
|
3503
|
-
/* @__PURE__ */ a.jsx("span", { children: n.formatMessage({ id: `${
|
|
3504
|
-
!e[r] && /* @__PURE__ */ a.jsxs(
|
|
3522
|
+
/* @__PURE__ */ a.jsx("span", { children: n.formatMessage({ id: `${et}rule_${ms[r]}` }) }),
|
|
3523
|
+
!e[r] && /* @__PURE__ */ a.jsxs(ie, { element: "strong", children: [
|
|
3505
3524
|
" ",
|
|
3506
3525
|
" ",
|
|
3507
|
-
n.formatMessage({ id: `${
|
|
3526
|
+
n.formatMessage({ id: `${et}notMet` })
|
|
3508
3527
|
] })
|
|
3509
3528
|
] }, `rule-${r}`)) })
|
|
3510
3529
|
] });
|
|
@@ -3518,28 +3537,28 @@ const Ui = ({
|
|
|
3518
3537
|
className: i = "",
|
|
3519
3538
|
hasLoaded: o = !1
|
|
3520
3539
|
}) => {
|
|
3521
|
-
const c = A(), [m, l] =
|
|
3540
|
+
const c = A(), [m, l] = R({ setUp: !1, id: null, rating: null, disabled: !0 }), f = async () => {
|
|
3522
3541
|
try {
|
|
3523
|
-
const
|
|
3524
|
-
l((_) => ({ ..._, setUp: !0, id:
|
|
3525
|
-
} catch (
|
|
3526
|
-
l((_) => ({ ..._, setUp: !0, disabled: !0 })), s(
|
|
3542
|
+
const b = await n();
|
|
3543
|
+
l((_) => ({ ..._, setUp: !0, id: b && b.id, disabled: !1 }));
|
|
3544
|
+
} catch (b) {
|
|
3545
|
+
l((_) => ({ ..._, setUp: !0, disabled: !0 })), s(b);
|
|
3527
3546
|
}
|
|
3528
3547
|
};
|
|
3529
3548
|
if (G(() => {
|
|
3530
3549
|
o && !m.setUp && f();
|
|
3531
3550
|
}, [o]), !o)
|
|
3532
|
-
return /* @__PURE__ */ a.jsx(
|
|
3533
|
-
const { id: d, rating: p, disabled: h } = m, g = "ratings_",
|
|
3551
|
+
return /* @__PURE__ */ a.jsx(be, { className: "rating-placeholder" });
|
|
3552
|
+
const { id: d, rating: p, disabled: h } = m, g = "ratings_", y = {
|
|
3534
3553
|
text: c.formatMessage({ id: `${g}text` }),
|
|
3535
3554
|
low: c.formatMessage({ id: `${g}low` }),
|
|
3536
3555
|
high: c.formatMessage({ id: `${g}high` }),
|
|
3537
3556
|
success: c.formatMessage({ id: `${g}success` }),
|
|
3538
3557
|
...e
|
|
3539
|
-
}, k = async (
|
|
3558
|
+
}, k = async (b) => {
|
|
3540
3559
|
if (!(!d || h))
|
|
3541
3560
|
try {
|
|
3542
|
-
l((_) => ({ ..._, rating:
|
|
3561
|
+
l((_) => ({ ..._, rating: b, disabled: !0 })), await r({ id: d, value: b });
|
|
3543
3562
|
} catch (_) {
|
|
3544
3563
|
l((v) => ({ ...v, rating: null })), s(_);
|
|
3545
3564
|
} finally {
|
|
@@ -3547,11 +3566,11 @@ const Ui = ({
|
|
|
3547
3566
|
}
|
|
3548
3567
|
};
|
|
3549
3568
|
return /* @__PURE__ */ a.jsxs("div", { className: w("rating", i), children: [
|
|
3550
|
-
/* @__PURE__ */ a.jsx("span", { className: "label", children:
|
|
3551
|
-
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(t).keys()).map((
|
|
3552
|
-
const _ =
|
|
3569
|
+
/* @__PURE__ */ a.jsx("span", { className: "label", children: y[p ? "success" : "text"] }),
|
|
3570
|
+
/* @__PURE__ */ a.jsx("ol", { children: Array.from(new Array(t).keys()).map((b) => {
|
|
3571
|
+
const _ = b + 1;
|
|
3553
3572
|
return /* @__PURE__ */ a.jsx("li", { className: w({ selected: p && _ <= p }), children: /* @__PURE__ */ a.jsx(
|
|
3554
|
-
|
|
3573
|
+
H,
|
|
3555
3574
|
{
|
|
3556
3575
|
variant: "tertiary",
|
|
3557
3576
|
size: "small",
|
|
@@ -3559,7 +3578,7 @@ const Ui = ({
|
|
|
3559
3578
|
screenreaderText: `${c.formatMessage(
|
|
3560
3579
|
{ id: `${g}stars` },
|
|
3561
3580
|
{ number: _, total: t }
|
|
3562
|
-
)}${_ === 1 || _ === t ? ` - ${
|
|
3581
|
+
)}${_ === 1 || _ === t ? ` - ${y[_ === 1 ? "low" : "high"]}` : ""}`,
|
|
3563
3582
|
onClick: (v) => {
|
|
3564
3583
|
v.preventDefault(), v.stopPropagation(), k(_);
|
|
3565
3584
|
},
|
|
@@ -3577,7 +3596,7 @@ const ps = ({
|
|
|
3577
3596
|
gtmContext: s = "search-bar",
|
|
3578
3597
|
gtmEvent: i = "form-submission"
|
|
3579
3598
|
}) => {
|
|
3580
|
-
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, m = A(), l =
|
|
3599
|
+
const { searchIsOpen: o = !0, isDesktopVersion: c = !1 } = n || {}, m = A(), l = ae(null);
|
|
3581
3600
|
Pe(() => {
|
|
3582
3601
|
!n || c || !o || l.current && l.current.focus();
|
|
3583
3602
|
}, [o]);
|
|
@@ -3592,7 +3611,7 @@ const ps = ({
|
|
|
3592
3611
|
"data-gtm-event-context": s,
|
|
3593
3612
|
"data-gtm-event-type": i,
|
|
3594
3613
|
children: /* @__PURE__ */ a.jsx("fieldset", { id: `${e}-form`, hidden: n ? !o : !1, role: "search", children: /* @__PURE__ */ a.jsxs("p", { children: [
|
|
3595
|
-
/* @__PURE__ */ a.jsx(
|
|
3614
|
+
/* @__PURE__ */ a.jsx(ie, { element: "label", htmlFor: e, children: m.formatMessage({ id: "search_label" }) }),
|
|
3596
3615
|
/* @__PURE__ */ a.jsx(
|
|
3597
3616
|
"input",
|
|
3598
3617
|
{
|
|
@@ -3614,10 +3633,10 @@ const ps = ({
|
|
|
3614
3633
|
onClick: (d) => {
|
|
3615
3634
|
d.preventDefault(), d.stopPropagation(), l.current && l.current.value && (l.current.value = "");
|
|
3616
3635
|
},
|
|
3617
|
-
children: /* @__PURE__ */ a.jsx(
|
|
3636
|
+
children: /* @__PURE__ */ a.jsx(ie, { children: m.formatMessage({ id: "search_clear" }) })
|
|
3618
3637
|
}
|
|
3619
3638
|
),
|
|
3620
|
-
/* @__PURE__ */ a.jsx("button", { className: "search", onClick: f, children: /* @__PURE__ */ a.jsx(
|
|
3639
|
+
/* @__PURE__ */ a.jsx("button", { className: "search", onClick: f, children: /* @__PURE__ */ a.jsx(ie, { children: m.formatMessage({ id: "search_cta" }) }) })
|
|
3621
3640
|
] }) })
|
|
3622
3641
|
}
|
|
3623
3642
|
);
|
|
@@ -3635,26 +3654,26 @@ const hs = ({
|
|
|
3635
3654
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
3636
3655
|
/* NOT_SUBMITTED */
|
|
3637
3656
|
}) => {
|
|
3638
|
-
const [f, d] =
|
|
3657
|
+
const [f, d] = R([]), [p, h] = R(!0), [g, y] = R(l), { formatMessage: k } = A(), b = async (j) => {
|
|
3639
3658
|
j.preventDefault();
|
|
3640
3659
|
try {
|
|
3641
|
-
await m(f), d([]),
|
|
3660
|
+
await m(f), d([]), y(
|
|
3642
3661
|
"SUCCESS"
|
|
3643
3662
|
/* SUCCESS */
|
|
3644
3663
|
);
|
|
3645
|
-
} catch (
|
|
3646
|
-
|
|
3664
|
+
} catch (S) {
|
|
3665
|
+
y(
|
|
3647
3666
|
"ERROR"
|
|
3648
3667
|
/* ERROR */
|
|
3649
|
-
), c(
|
|
3668
|
+
), c(S);
|
|
3650
3669
|
}
|
|
3651
3670
|
}, _ = (j) => {
|
|
3652
|
-
j.preventDefault(),
|
|
3671
|
+
j.preventDefault(), y(
|
|
3653
3672
|
"NOT_SUBMITTED"
|
|
3654
3673
|
/* NOT_SUBMITTED */
|
|
3655
3674
|
), h(!0), d([]);
|
|
3656
3675
|
}, v = (j) => {
|
|
3657
|
-
j.preventDefault(), o(),
|
|
3676
|
+
j.preventDefault(), o(), y(
|
|
3658
3677
|
"CLOSED"
|
|
3659
3678
|
/* CLOSED */
|
|
3660
3679
|
);
|
|
@@ -3664,16 +3683,16 @@ const hs = ({
|
|
|
3664
3683
|
" ",
|
|
3665
3684
|
k({ id: "inviteForm_error" })
|
|
3666
3685
|
] }) }),
|
|
3667
|
-
/* @__PURE__ */ a.jsx(
|
|
3686
|
+
/* @__PURE__ */ a.jsx($e, {}),
|
|
3668
3687
|
/* @__PURE__ */ a.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3669
|
-
/* @__PURE__ */ a.jsx(
|
|
3670
|
-
/* @__PURE__ */ a.jsx(
|
|
3671
|
-
] }) : /* @__PURE__ */ a.jsx(
|
|
3688
|
+
/* @__PURE__ */ a.jsx(H, { variant: "secondary", onClick: _, children: k({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3689
|
+
/* @__PURE__ */ a.jsx(H, { onClick: v, children: k({ id: "inviteForm_ctaDone" }) })
|
|
3690
|
+
] }) : /* @__PURE__ */ a.jsx(H, { onClick: _, children: k({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3672
3691
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
3673
3692
|
"form",
|
|
3674
3693
|
{
|
|
3675
3694
|
style: { backgroundColor: i },
|
|
3676
|
-
onSubmit:
|
|
3695
|
+
onSubmit: b,
|
|
3677
3696
|
className: w("invite-form gtm-trackable"),
|
|
3678
3697
|
children: [
|
|
3679
3698
|
/* @__PURE__ */ a.jsxs("fieldset", { className: "content", children: [
|
|
@@ -3690,31 +3709,31 @@ const hs = ({
|
|
|
3690
3709
|
d(j), h(!j.length);
|
|
3691
3710
|
},
|
|
3692
3711
|
autoFocus: !1,
|
|
3693
|
-
getLabel: (j,
|
|
3712
|
+
getLabel: (j, S, M) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
3694
3713
|
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: j }),
|
|
3695
3714
|
/* @__PURE__ */ a.jsx(
|
|
3696
|
-
|
|
3715
|
+
H,
|
|
3697
3716
|
{
|
|
3698
3717
|
variant: "tertiary",
|
|
3699
3718
|
size: "small",
|
|
3700
3719
|
icon: { icon: "close" },
|
|
3701
3720
|
onClick: () => {
|
|
3702
|
-
|
|
3721
|
+
M(S), h(!f.length);
|
|
3703
3722
|
},
|
|
3704
3723
|
className: "remove-email-button",
|
|
3705
3724
|
screenreaderText: k({ id: "overlay_close" })
|
|
3706
3725
|
}
|
|
3707
3726
|
)
|
|
3708
|
-
] },
|
|
3727
|
+
] }, S)
|
|
3709
3728
|
}
|
|
3710
3729
|
)
|
|
3711
3730
|
] }),
|
|
3712
|
-
/* @__PURE__ */ a.jsx(
|
|
3713
|
-
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(
|
|
3731
|
+
/* @__PURE__ */ a.jsx($e, {}),
|
|
3732
|
+
/* @__PURE__ */ a.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ a.jsx(H, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
3714
3733
|
]
|
|
3715
3734
|
}
|
|
3716
3735
|
) });
|
|
3717
|
-
},
|
|
3736
|
+
}, z = {
|
|
3718
3737
|
timeouts: {},
|
|
3719
3738
|
handlerCalled: {},
|
|
3720
3739
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -3737,9 +3756,9 @@ const hs = ({
|
|
|
3737
3756
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
3738
3757
|
return;
|
|
3739
3758
|
const s = Date.now();
|
|
3740
|
-
if (!t &&
|
|
3759
|
+
if (!t && z.handlerCalled[e] && s - z.handlerCalled[e] < 500)
|
|
3741
3760
|
return;
|
|
3742
|
-
|
|
3761
|
+
z.handlerCalled[e] = s;
|
|
3743
3762
|
let i = [{ type: `menus.${e}`, value: t }];
|
|
3744
3763
|
t === !0 && Object.keys(n).forEach((o) => {
|
|
3745
3764
|
o === e || n[o] === !1 || i.push({ type: `menus.${o}`, value: !1 });
|
|
@@ -3764,7 +3783,7 @@ const hs = ({
|
|
|
3764
3783
|
if (!(typeof s > "u") && (!n || s[t] && s[t].includes(n) || s.value && s.value.includes(n) || s.toString().includes(n)))
|
|
3765
3784
|
return e[r];
|
|
3766
3785
|
}
|
|
3767
|
-
return e[0].children ?
|
|
3786
|
+
return e[0].children ? z.findFirstChild(e[0].children, t, n) : !1;
|
|
3768
3787
|
},
|
|
3769
3788
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: s }) => {
|
|
3770
3789
|
if (!t.current || !t.current.children)
|
|
@@ -3778,20 +3797,20 @@ const hs = ({
|
|
|
3778
3797
|
switch (e) {
|
|
3779
3798
|
case "navigation":
|
|
3780
3799
|
if (n) {
|
|
3781
|
-
const m =
|
|
3800
|
+
const m = z.findFirstChild(
|
|
3782
3801
|
t.current.children,
|
|
3783
3802
|
"attributes.aria-controls",
|
|
3784
3803
|
"navigation"
|
|
3785
3804
|
);
|
|
3786
|
-
o =
|
|
3805
|
+
o = z.findFirstChild(m.children, "href");
|
|
3787
3806
|
} else
|
|
3788
|
-
o =
|
|
3807
|
+
o = z.findFirstChild(t.current.children, "href");
|
|
3789
3808
|
o || (o = t.current);
|
|
3790
3809
|
break;
|
|
3791
3810
|
case "account":
|
|
3792
|
-
if (c =
|
|
3811
|
+
if (c = z.findFirstChild(t.current.children, "className", "account"), !c || !c.children)
|
|
3793
3812
|
return;
|
|
3794
|
-
o =
|
|
3813
|
+
o = z.findFirstChild(c.children, "href");
|
|
3795
3814
|
break;
|
|
3796
3815
|
default:
|
|
3797
3816
|
return;
|
|
@@ -3800,16 +3819,16 @@ const hs = ({
|
|
|
3800
3819
|
},
|
|
3801
3820
|
events: {
|
|
3802
3821
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
3803
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
3822
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(z.timeouts[t]), n(t, !r));
|
|
3804
3823
|
},
|
|
3805
3824
|
onFocus: ({ id: e }) => {
|
|
3806
|
-
clearTimeout(
|
|
3825
|
+
clearTimeout(z.timeouts[e]);
|
|
3807
3826
|
},
|
|
3808
3827
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
3809
|
-
clearTimeout(
|
|
3828
|
+
clearTimeout(z.timeouts[e]), t(e, !0);
|
|
3810
3829
|
},
|
|
3811
3830
|
onBlur: ({ id: e, callback: t }) => {
|
|
3812
|
-
|
|
3831
|
+
z.timeouts[e] = setTimeout(() => {
|
|
3813
3832
|
t(e, !1);
|
|
3814
3833
|
}, 250);
|
|
3815
3834
|
}
|
|
@@ -3926,34 +3945,34 @@ const hs = ({
|
|
|
3926
3945
|
...c.props || {}
|
|
3927
3946
|
});
|
|
3928
3947
|
}
|
|
3929
|
-
const h = c.order && c.order[0] && c[c.order[0]], g = h && c[c.order[0]].order,
|
|
3930
|
-
let k = {},
|
|
3948
|
+
const h = c.order && c.order[0] && c[c.order[0]], g = h && c[c.order[0]].order, y = p && window.location.pathname === c.href;
|
|
3949
|
+
let k = {}, b = {};
|
|
3931
3950
|
if (h) {
|
|
3932
3951
|
const _ = c.menuId || e, v = {
|
|
3933
|
-
onClick: (j) =>
|
|
3934
|
-
onFocus: () =>
|
|
3935
|
-
onBlur: () =>
|
|
3936
|
-
onMouseLeave: () =>
|
|
3937
|
-
onMouseEnter: () =>
|
|
3952
|
+
onClick: (j) => z.events.onClick(j, { id: _, callback: s, isOpen: r[_] }),
|
|
3953
|
+
onFocus: () => z.events.onFocus({ id: _ }),
|
|
3954
|
+
onBlur: () => z.events.onBlur({ id: _, callback: s }),
|
|
3955
|
+
onMouseLeave: () => z.events.onBlur({ id: _, callback: s }),
|
|
3956
|
+
onMouseEnter: () => z.events.onMouseEnter({ id: _, callback: s })
|
|
3938
3957
|
};
|
|
3939
3958
|
n && (g && (k = {
|
|
3940
3959
|
...v,
|
|
3941
3960
|
onKeyPress: (j) => {
|
|
3942
|
-
j.key === "Enter" &&
|
|
3961
|
+
j.key === "Enter" && z.events.onClick(j, { id: _, callback: s, isOpen: r[_] });
|
|
3943
3962
|
},
|
|
3944
3963
|
tabIndex: "0",
|
|
3945
3964
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3946
3965
|
"aria-haspopup": !0,
|
|
3947
3966
|
"aria-expanded": r[_],
|
|
3948
3967
|
"aria-controls": _
|
|
3949
|
-
}),
|
|
3950
|
-
...
|
|
3968
|
+
}), b = { hidden: _ in r ? !r[_] : !0 }), g || (b = {
|
|
3969
|
+
...b,
|
|
3951
3970
|
...v
|
|
3952
3971
|
});
|
|
3953
3972
|
}
|
|
3954
|
-
return /* @__PURE__ */ a.jsxs("li", { className: w({ [c.className]: c.className, "has-submenu": h, parent: g, active:
|
|
3955
|
-
p ? F.createElement(f ?
|
|
3956
|
-
c.order && /* @__PURE__ */ a.jsx("ul", { ...
|
|
3973
|
+
return /* @__PURE__ */ a.jsxs("li", { className: w({ [c.className]: c.className, "has-submenu": h, parent: g, active: y }), role: "none", ...k, children: [
|
|
3974
|
+
p ? F.createElement(f ? H : "a", p, o.formatMessage({ id: d })) : o.formatMessage({ id: d }),
|
|
3975
|
+
c.order && /* @__PURE__ */ a.jsx("ul", { ...b, children: c.order.map((_) => {
|
|
3957
3976
|
if (!c[_])
|
|
3958
3977
|
return null;
|
|
3959
3978
|
const v = {
|
|
@@ -3971,8 +3990,8 @@ const hs = ({
|
|
|
3971
3990
|
] }, e);
|
|
3972
3991
|
};
|
|
3973
3992
|
const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 }) => {
|
|
3974
|
-
const t = A(), n =
|
|
3975
|
-
() =>
|
|
3993
|
+
const t = A(), n = _e(je), r = Ue(!0, !0), s = n && typeof n.id == "string", i = ft(
|
|
3994
|
+
() => z.getIsDesktopVersion(s, r),
|
|
3976
3995
|
[s, r]
|
|
3977
3996
|
), [o, c] = Oa(vr, {
|
|
3978
3997
|
headerIsVisible: !0,
|
|
@@ -3986,18 +4005,18 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
3986
4005
|
scrollPosition: gs[`height${i.navigation ? "_desktop" : ""}`],
|
|
3987
4006
|
callbacks: {
|
|
3988
4007
|
scrollUp: () => {
|
|
3989
|
-
!i && l.navigation ||
|
|
4008
|
+
!i && l.navigation || z.shouldChangeHeaderIsVisible(!0, l, c);
|
|
3990
4009
|
},
|
|
3991
4010
|
scrollDown: () => {
|
|
3992
|
-
!i && l.navigation ||
|
|
4011
|
+
!i && l.navigation || z.shouldChangeHeaderIsVisible(!1, l, c);
|
|
3993
4012
|
}
|
|
3994
4013
|
}
|
|
3995
4014
|
});
|
|
3996
4015
|
const d = (h, g) => {
|
|
3997
|
-
|
|
3998
|
-
}, p =
|
|
4016
|
+
z.handleMenus({ id: h, value: g, menus: l, dispatch: c });
|
|
4017
|
+
}, p = ae(null);
|
|
3999
4018
|
return Pe(() => {
|
|
4000
|
-
l.navigation &&
|
|
4019
|
+
l.navigation && z.autoFocus({
|
|
4001
4020
|
menu: "navigation",
|
|
4002
4021
|
navigationRef: p,
|
|
4003
4022
|
isDesktopVersion: i.navigation,
|
|
@@ -4005,7 +4024,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4005
4024
|
dispatch: c
|
|
4006
4025
|
});
|
|
4007
4026
|
}, [l.navigation]), Pe(() => {
|
|
4008
|
-
l.account &&
|
|
4027
|
+
l.account && z.autoFocus({
|
|
4009
4028
|
menu: "account",
|
|
4010
4029
|
navigationRef: p,
|
|
4011
4030
|
isDesktopVersion: i.navigation,
|
|
@@ -4024,7 +4043,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4024
4043
|
}),
|
|
4025
4044
|
children: [
|
|
4026
4045
|
/* @__PURE__ */ a.jsx(
|
|
4027
|
-
|
|
4046
|
+
ie,
|
|
4028
4047
|
{
|
|
4029
4048
|
element: "a",
|
|
4030
4049
|
href: "#content-of-page",
|
|
@@ -4045,7 +4064,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4045
4064
|
"aria-haspopup": "true",
|
|
4046
4065
|
"aria-expanded": l.navigation,
|
|
4047
4066
|
"aria-controls": "navigation",
|
|
4048
|
-
children: /* @__PURE__ */ a.jsx(
|
|
4067
|
+
children: /* @__PURE__ */ a.jsx(ie, { children: t.formatMessage({
|
|
4049
4068
|
id: `header_menu_${l.navigation ? "hide" : "show"}`
|
|
4050
4069
|
}) })
|
|
4051
4070
|
}
|
|
@@ -4082,7 +4101,7 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4082
4101
|
"aria-expanded": l.search,
|
|
4083
4102
|
"aria-controls": "search-form",
|
|
4084
4103
|
children: /* @__PURE__ */ a.jsx(
|
|
4085
|
-
|
|
4104
|
+
ie,
|
|
4086
4105
|
{
|
|
4087
4106
|
children: t.formatMessage({
|
|
4088
4107
|
id: `header_search_${l.search ? "hide" : "show"}`
|
|
@@ -4107,22 +4126,22 @@ const gs = { height: 67, height_desktop: 83 }, oa = ({ showNavigation: e = !0 })
|
|
|
4107
4126
|
"button",
|
|
4108
4127
|
{
|
|
4109
4128
|
className: "account-button",
|
|
4110
|
-
onClick: (h) =>
|
|
4129
|
+
onClick: (h) => z.events.onClick(h, {
|
|
4111
4130
|
id: "account",
|
|
4112
4131
|
callback: d,
|
|
4113
4132
|
isOpen: l.account
|
|
4114
4133
|
}),
|
|
4115
|
-
onMouseEnter: () =>
|
|
4116
|
-
onMouseLeave: () =>
|
|
4134
|
+
onMouseEnter: () => z.events.onMouseEnter({ id: "account", callback: d }),
|
|
4135
|
+
onMouseLeave: () => z.events.onBlur({ id: "account", callback: d }),
|
|
4117
4136
|
"aria-haspopup": "true",
|
|
4118
4137
|
"aria-expanded": l.account,
|
|
4119
4138
|
"aria-controls": "navigation",
|
|
4120
4139
|
children: [
|
|
4121
|
-
/* @__PURE__ */ a.jsx(
|
|
4140
|
+
/* @__PURE__ */ a.jsx(ie, { children: t.formatMessage({
|
|
4122
4141
|
id: `header_account_${l.account ? "hide" : "show"}`
|
|
4123
4142
|
}) }),
|
|
4124
4143
|
/* @__PURE__ */ a.jsx(
|
|
4125
|
-
|
|
4144
|
+
ze,
|
|
4126
4145
|
{
|
|
4127
4146
|
name: n && n.name || "",
|
|
4128
4147
|
src: n && n.image && n.image.thumbnail || ""
|
|
@@ -4169,11 +4188,11 @@ const la = ({
|
|
|
4169
4188
|
className: f = "",
|
|
4170
4189
|
gtmContext: d = "Modal"
|
|
4171
4190
|
}) => {
|
|
4172
|
-
const p = A(), [h, g] =
|
|
4173
|
-
g(
|
|
4191
|
+
const p = A(), [h, g] = R(t), y = (b) => {
|
|
4192
|
+
g(b), b ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
4174
4193
|
};
|
|
4175
4194
|
G(() => {
|
|
4176
|
-
|
|
4195
|
+
y(t);
|
|
4177
4196
|
}, [t]);
|
|
4178
4197
|
const k = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
4179
4198
|
return /* @__PURE__ */ a.jsx("div", { className: w("overlay", { open: h }), children: /* @__PURE__ */ a.jsx(
|
|
@@ -4187,12 +4206,12 @@ const la = ({
|
|
|
4187
4206
|
/* @__PURE__ */ a.jsxs("div", { className: "top", children: [
|
|
4188
4207
|
c && /* @__PURE__ */ a.jsx("h2", { className: "modal-title", children: c }),
|
|
4189
4208
|
/* @__PURE__ */ a.jsx(
|
|
4190
|
-
|
|
4209
|
+
H,
|
|
4191
4210
|
{
|
|
4192
4211
|
variant: "tertiary",
|
|
4193
4212
|
size: "medium",
|
|
4194
4213
|
icon: { icon: "close" },
|
|
4195
|
-
onClick: () =>
|
|
4214
|
+
onClick: () => y(!1),
|
|
4196
4215
|
className: "gtm-trackable",
|
|
4197
4216
|
"data-gtm-event-type": "close-modal-click",
|
|
4198
4217
|
"data-gtm-event-context": d,
|
|
@@ -4200,10 +4219,10 @@ const la = ({
|
|
|
4200
4219
|
}
|
|
4201
4220
|
)
|
|
4202
4221
|
] }),
|
|
4203
|
-
n && /* @__PURE__ */ a.jsx(
|
|
4222
|
+
n && /* @__PURE__ */ a.jsx($e, {}),
|
|
4204
4223
|
m,
|
|
4205
4224
|
l && /* @__PURE__ */ a.jsxs("div", { className: "bottom", children: [
|
|
4206
|
-
/* @__PURE__ */ a.jsx(
|
|
4225
|
+
/* @__PURE__ */ a.jsx($e, {}),
|
|
4207
4226
|
/* @__PURE__ */ a.jsx(ht, { buttons: l })
|
|
4208
4227
|
] }),
|
|
4209
4228
|
o && /* @__PURE__ */ a.jsx(Vt, { className: "error", children: o })
|
|
@@ -4275,20 +4294,20 @@ const bs = () => {
|
|
|
4275
4294
|
G(() => {
|
|
4276
4295
|
window.scrollTo(0, 0);
|
|
4277
4296
|
}, [h]);
|
|
4278
|
-
const g =
|
|
4297
|
+
const g = rt(e, { locale: c }), y = rt(t, {
|
|
4279
4298
|
locale: c
|
|
4280
|
-
}), k =
|
|
4299
|
+
}), k = rt(n, {
|
|
4281
4300
|
locale: c
|
|
4282
|
-
}),
|
|
4283
|
-
return f !== "default" && (
|
|
4301
|
+
}), b = {};
|
|
4302
|
+
return f !== "default" && (b[f] = !0), d !== "default" && (b[d] = !0), p !== "default" && (b[p] = !0), /* @__PURE__ */ a.jsx(Ja, { onError: r, fallback: /* @__PURE__ */ a.jsx(bs, {}), children: /* @__PURE__ */ a.jsx(Ba, { fallback: null, children: /* @__PURE__ */ a.jsxs(
|
|
4284
4303
|
"div",
|
|
4285
4304
|
{
|
|
4286
4305
|
id: "wrapper",
|
|
4287
|
-
className: w(o,
|
|
4306
|
+
className: w(o, b, { "has-footer": l }),
|
|
4288
4307
|
children: [
|
|
4289
4308
|
/* @__PURE__ */ a.jsx(oa, { showNavigation: m }),
|
|
4290
4309
|
/* @__PURE__ */ a.jsxs("section", { id: "content-wrapper", children: [
|
|
4291
|
-
|
|
4310
|
+
y && /* @__PURE__ */ a.jsx("div", { className: "additional-content prepended", children: y }),
|
|
4292
4311
|
F.createElement(f === "bold" ? ca : "div", {
|
|
4293
4312
|
id: "content",
|
|
4294
4313
|
children: g
|
|
@@ -4393,7 +4412,7 @@ const Vi = ({
|
|
|
4393
4412
|
)
|
|
4394
4413
|
] });
|
|
4395
4414
|
};
|
|
4396
|
-
let
|
|
4415
|
+
let tt = null;
|
|
4397
4416
|
const le = "discussion_form_", en = ({
|
|
4398
4417
|
content: e = { type: "response", slugs: {} },
|
|
4399
4418
|
userHasPermissions: t = !0,
|
|
@@ -4425,45 +4444,45 @@ const le = "discussion_form_", en = ({
|
|
|
4425
4444
|
},
|
|
4426
4445
|
gtmContext: m = "DiscussionForm"
|
|
4427
4446
|
}) => {
|
|
4428
|
-
var
|
|
4429
|
-
const l = A(), f =
|
|
4447
|
+
var $, C, E;
|
|
4448
|
+
const l = A(), f = _e(je), [d, p] = R(
|
|
4430
4449
|
n.isEditing && n.isEditing.text || ""
|
|
4431
|
-
), [h, g] =
|
|
4432
|
-
if (r || (r =
|
|
4450
|
+
), [h, g] = R(o.error || !1), [y, k] = R(!1), b = ae(null);
|
|
4451
|
+
if (r || (r = b), n.isLoading)
|
|
4433
4452
|
return /* @__PURE__ */ a.jsx(
|
|
4434
|
-
|
|
4453
|
+
be,
|
|
4435
4454
|
{
|
|
4436
4455
|
className: "discussion-card discussion-form",
|
|
4437
4456
|
"data-testid": "loading-placeholder"
|
|
4438
4457
|
}
|
|
4439
4458
|
);
|
|
4440
|
-
const _ = (
|
|
4441
|
-
const
|
|
4442
|
-
p(
|
|
4443
|
-
let
|
|
4444
|
-
!f || !f.id ?
|
|
4459
|
+
const _ = (Z) => {
|
|
4460
|
+
const N = Z.target.value;
|
|
4461
|
+
p(N);
|
|
4462
|
+
let U;
|
|
4463
|
+
!f || !f.id ? U = ye(
|
|
4445
4464
|
l.formatMessage,
|
|
4446
4465
|
`${le}error_loggedOut`,
|
|
4447
4466
|
e.type,
|
|
4448
4467
|
"action"
|
|
4449
|
-
) : t ?
|
|
4468
|
+
) : t ? N.length >= s && (U = `${le}error_tooLong`) : U = ye(
|
|
4450
4469
|
l.formatMessage,
|
|
4451
4470
|
`${le}error_noPermission`,
|
|
4452
4471
|
e.type,
|
|
4453
4472
|
"action"
|
|
4454
|
-
),
|
|
4473
|
+
), U ? g(U) : h && g(!1);
|
|
4455
4474
|
};
|
|
4456
4475
|
let v = `${e.type}-form`;
|
|
4457
4476
|
if (e.type === "response" || e.type === "reply") {
|
|
4458
|
-
const
|
|
4459
|
-
|
|
4477
|
+
const Z = (($ = e.slugs) == null ? void 0 : $.reply) || ((C = e.slugs) == null ? void 0 : C.answer) || ((E = e.slugs) == null ? void 0 : E.question) || "";
|
|
4478
|
+
Z && (v = `${v}-${Z.slice(-15)}`);
|
|
4460
4479
|
}
|
|
4461
|
-
const j = async (
|
|
4462
|
-
var
|
|
4463
|
-
if (
|
|
4480
|
+
const j = async (Z) => {
|
|
4481
|
+
var U;
|
|
4482
|
+
if (Z.preventDefault(), Z.stopPropagation(), !f || !f.id || !t || M)
|
|
4464
4483
|
return;
|
|
4465
|
-
|
|
4466
|
-
const
|
|
4484
|
+
tt && clearTimeout(tt), k("submitting");
|
|
4485
|
+
const N = window.location.pathname;
|
|
4467
4486
|
try {
|
|
4468
4487
|
let Y;
|
|
4469
4488
|
switch (e.type) {
|
|
@@ -4474,48 +4493,48 @@ const le = "discussion_form_", en = ({
|
|
|
4474
4493
|
Y = await c.create({
|
|
4475
4494
|
title: d,
|
|
4476
4495
|
authorId: f && f.id,
|
|
4477
|
-
...(
|
|
4496
|
+
...(U = c.props) == null ? void 0 : U.create
|
|
4478
4497
|
});
|
|
4479
4498
|
break;
|
|
4480
4499
|
case "response":
|
|
4481
4500
|
Y = await c.create(
|
|
4482
4501
|
{ question: e.slugs.question },
|
|
4483
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4502
|
+
{ body: d, authorId: f && f.id, contentPath: N }
|
|
4484
4503
|
);
|
|
4485
4504
|
break;
|
|
4486
4505
|
case "reply":
|
|
4487
4506
|
Y = await c.create(
|
|
4488
4507
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
4489
|
-
{ body: d, authorId: f && f.id, contentPath:
|
|
4508
|
+
{ body: d, authorId: f && f.id, contentPath: N }
|
|
4490
4509
|
);
|
|
4491
4510
|
break;
|
|
4492
4511
|
default:
|
|
4493
4512
|
break;
|
|
4494
4513
|
}
|
|
4495
|
-
await xr(1e3), c.callback && await c.callback(Y),
|
|
4496
|
-
p(""), k("submitted"),
|
|
4514
|
+
await xr(1e3), c.callback && await c.callback(Y), tt = setTimeout(() => {
|
|
4515
|
+
p(""), k("submitted"), S();
|
|
4497
4516
|
}, 500);
|
|
4498
4517
|
} catch (Y) {
|
|
4499
|
-
const
|
|
4500
|
-
let
|
|
4501
|
-
|
|
4518
|
+
const ne = Y;
|
|
4519
|
+
let Q = `${le}error`;
|
|
4520
|
+
ne.message.includes("entry already exists") && (Q = ye(
|
|
4502
4521
|
l.formatMessage,
|
|
4503
4522
|
`${le}error_alreadyExists`,
|
|
4504
4523
|
e.type,
|
|
4505
4524
|
"action"
|
|
4506
|
-
)),
|
|
4525
|
+
)), ne.message.includes("429") ? Q = ye(
|
|
4507
4526
|
l.formatMessage,
|
|
4508
4527
|
`${le}error_tooMany`,
|
|
4509
4528
|
e.type,
|
|
4510
4529
|
"action"
|
|
4511
|
-
) :
|
|
4530
|
+
) : ne.message.includes("400") && (Q = `${le}error`), g(Q), S();
|
|
4512
4531
|
}
|
|
4513
|
-
},
|
|
4514
|
-
|
|
4532
|
+
}, S = () => {
|
|
4533
|
+
tt = setTimeout(() => {
|
|
4515
4534
|
g(!1), k(!1);
|
|
4516
4535
|
}, 5e3);
|
|
4517
|
-
},
|
|
4518
|
-
return (n.isEditing && !
|
|
4536
|
+
}, M = !d || !yr(d), D = y === "submitting", I = [];
|
|
4537
|
+
return (n.isEditing && !D || o.cancel) && I.push({
|
|
4519
4538
|
variant: "secondary",
|
|
4520
4539
|
size: { mobile: "small", 600: "medium" },
|
|
4521
4540
|
onClick: c.handleCancel,
|
|
@@ -4524,25 +4543,25 @@ const le = "discussion_form_", en = ({
|
|
|
4524
4543
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
4525
4544
|
disabled: !o.cancel && (!f || !f.id || !d),
|
|
4526
4545
|
children: l.formatMessage({ id: `${le}cancel` })
|
|
4527
|
-
}),
|
|
4546
|
+
}), I.push({
|
|
4528
4547
|
variant: "primary",
|
|
4529
4548
|
size: { mobile: "small", 600: "medium" },
|
|
4530
|
-
onClick: (
|
|
4549
|
+
onClick: (Z) => {
|
|
4531
4550
|
if (n.isEditing) {
|
|
4532
4551
|
k("submitting"), c.handleSaveEdit && c.handleSaveEdit(
|
|
4533
|
-
|
|
4552
|
+
b.current && "value" in b.current ? b.current.value : ""
|
|
4534
4553
|
);
|
|
4535
4554
|
return;
|
|
4536
4555
|
}
|
|
4537
|
-
j(
|
|
4556
|
+
j(Z);
|
|
4538
4557
|
},
|
|
4539
4558
|
className: "gtm-trackable",
|
|
4540
4559
|
"data-gtm-event-context": m,
|
|
4541
4560
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
4542
4561
|
"data-testid": "save-button",
|
|
4543
|
-
disabled: !f || !f.id || !t ||
|
|
4562
|
+
disabled: !f || !f.id || !t || M || D || n.isEditing && d === n.isEditing.text,
|
|
4544
4563
|
children: l.formatMessage({
|
|
4545
|
-
id: `${le}${
|
|
4564
|
+
id: `${le}${D ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
4546
4565
|
})
|
|
4547
4566
|
}), /* @__PURE__ */ a.jsxs(
|
|
4548
4567
|
"form",
|
|
@@ -4553,7 +4572,7 @@ const le = "discussion_form_", en = ({
|
|
|
4553
4572
|
}),
|
|
4554
4573
|
"data-testid": `discussion-${e.type}-form`,
|
|
4555
4574
|
children: [
|
|
4556
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ a.jsx("h2", { children:
|
|
4575
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ a.jsx("h2", { children: ye(l.formatMessage, `${le}title`, e.type, "action") }),
|
|
4557
4576
|
/* @__PURE__ */ a.jsx(
|
|
4558
4577
|
Xt,
|
|
4559
4578
|
{
|
|
@@ -4562,14 +4581,14 @@ const le = "discussion_form_", en = ({
|
|
|
4562
4581
|
gtmType: "profile-click"
|
|
4563
4582
|
}
|
|
4564
4583
|
),
|
|
4565
|
-
/* @__PURE__ */ a.jsx(
|
|
4584
|
+
/* @__PURE__ */ a.jsx(ie, { element: "label", showOnFocus: !1, htmlFor: `${v}-input`, children: ye(l.formatMessage, `${le}label`, e.type, "action") }),
|
|
4566
4585
|
/* @__PURE__ */ a.jsx(
|
|
4567
4586
|
Xa,
|
|
4568
4587
|
{
|
|
4569
4588
|
ref: r,
|
|
4570
4589
|
id: `${v}-input`,
|
|
4571
4590
|
name: e.type,
|
|
4572
|
-
placeholder:
|
|
4591
|
+
placeholder: ye(
|
|
4573
4592
|
l.formatMessage,
|
|
4574
4593
|
`${le}placeholder`,
|
|
4575
4594
|
e.type,
|
|
@@ -4584,8 +4603,8 @@ const le = "discussion_form_", en = ({
|
|
|
4584
4603
|
autoFocus: !!n.isEditing
|
|
4585
4604
|
}
|
|
4586
4605
|
),
|
|
4587
|
-
/* @__PURE__ */ a.jsx("small", { children:
|
|
4588
|
-
a: (
|
|
4606
|
+
/* @__PURE__ */ a.jsx("small", { children: ye(l.formatMessage, `${le}explainer`, e.type, "action", {
|
|
4607
|
+
a: (Z) => /* @__PURE__ */ a.jsx(
|
|
4589
4608
|
"a",
|
|
4590
4609
|
{
|
|
4591
4610
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -4594,12 +4613,12 @@ const le = "discussion_form_", en = ({
|
|
|
4594
4613
|
"data-gtm-event-context": m,
|
|
4595
4614
|
"data-gtm-event-type": "community-guidelines-link",
|
|
4596
4615
|
rel: "noreferrer",
|
|
4597
|
-
children:
|
|
4616
|
+
children: Z
|
|
4598
4617
|
}
|
|
4599
4618
|
)
|
|
4600
4619
|
}) }),
|
|
4601
|
-
/* @__PURE__ */ a.jsx(ht, { buttons:
|
|
4602
|
-
|
|
4620
|
+
/* @__PURE__ */ a.jsx(ht, { buttons: I }),
|
|
4621
|
+
y === "submitted" && /* @__PURE__ */ a.jsx(Vt, { className: "success", "data-testid": "success", children: ye(l.formatMessage, `${le}success`, e.type, "action") }),
|
|
4603
4622
|
h && /* @__PURE__ */ a.jsx(Vt, { id: "error-message", className: "error", "data-testid": "error", children: o.error ? o.error : typeof h == "string" ? h.includes(" ") ? h : l.formatMessage(
|
|
4604
4623
|
{ id: h },
|
|
4605
4624
|
{
|
|
@@ -4637,7 +4656,7 @@ const le = "discussion_form_", en = ({
|
|
|
4637
4656
|
showThread: !0,
|
|
4638
4657
|
showForm: !1
|
|
4639
4658
|
}, vt = Gt(xs), ks = ({ children: e }) => {
|
|
4640
|
-
const [t, n] =
|
|
4659
|
+
const [t, n] = R({
|
|
4641
4660
|
showThread: !0,
|
|
4642
4661
|
showForm: !1
|
|
4643
4662
|
});
|
|
@@ -4670,8 +4689,8 @@ const Bt = () => {
|
|
|
4670
4689
|
G(() => {
|
|
4671
4690
|
h(s);
|
|
4672
4691
|
}, [s]);
|
|
4673
|
-
const [f, d] =
|
|
4674
|
-
if (
|
|
4692
|
+
const [f, d] = R(t), [p, h] = R(s), [g, y] = R(!1), [k, b] = R(!1), _ = ft(() => ws(n, Zt), [n]), v = (S) => {
|
|
4693
|
+
if (S.preventDefault(), S.stopPropagation(), b(!1), Ze)
|
|
4675
4694
|
return Bt(), !1;
|
|
4676
4695
|
if (Bt(), g || !o)
|
|
4677
4696
|
return !1;
|
|
@@ -4679,17 +4698,17 @@ const Bt = () => {
|
|
|
4679
4698
|
}, j = async () => {
|
|
4680
4699
|
if (Bt(), g || !o)
|
|
4681
4700
|
return !1;
|
|
4682
|
-
let
|
|
4683
|
-
|
|
4701
|
+
let S = p ? f - 1 : f + 1;
|
|
4702
|
+
S < 0 && (S = 0), y(!0), d(S), h(!p);
|
|
4684
4703
|
try {
|
|
4685
4704
|
if (i && i.slugs) {
|
|
4686
|
-
const
|
|
4687
|
-
p ? await m(
|
|
4705
|
+
const M = js(i.slugs);
|
|
4706
|
+
p ? await m(M) : await c(M, { contentPath: window.location.pathname });
|
|
4688
4707
|
}
|
|
4689
4708
|
} catch {
|
|
4690
4709
|
d(t), h(s);
|
|
4691
4710
|
} finally {
|
|
4692
|
-
|
|
4711
|
+
y(!1);
|
|
4693
4712
|
}
|
|
4694
4713
|
};
|
|
4695
4714
|
return F.createElement(
|
|
@@ -4698,20 +4717,20 @@ const Bt = () => {
|
|
|
4698
4717
|
className: w("likes-wrapper text-medium action-button", { "show-spinner": g, "is-liked": p, disabled: !o }),
|
|
4699
4718
|
onClick: v,
|
|
4700
4719
|
onMouseEnter: () => {
|
|
4701
|
-
|
|
4720
|
+
b(!0);
|
|
4702
4721
|
},
|
|
4703
4722
|
onMouseLeave: () => {
|
|
4704
|
-
|
|
4723
|
+
b(!1);
|
|
4705
4724
|
},
|
|
4706
4725
|
onFocus: () => {
|
|
4707
|
-
|
|
4726
|
+
b(!0);
|
|
4708
4727
|
},
|
|
4709
4728
|
onBlur: () => {
|
|
4710
|
-
|
|
4729
|
+
b(!1);
|
|
4711
4730
|
},
|
|
4712
4731
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4713
4732
|
/* @__PURE__ */ a.jsx(
|
|
4714
|
-
|
|
4733
|
+
H,
|
|
4715
4734
|
{
|
|
4716
4735
|
variant: "tertiary",
|
|
4717
4736
|
size: "medium",
|
|
@@ -4730,16 +4749,16 @@ const Bt = () => {
|
|
|
4730
4749
|
),
|
|
4731
4750
|
/* @__PURE__ */ a.jsx("span", { className: w("number-of-likes", { "no-likes": f === 0 }), "data-testid": "number-of-likes", children: l.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: f }) }),
|
|
4732
4751
|
n && /* @__PURE__ */ a.jsx(wr, { isOpen: k, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ a.jsxs("ul", { children: [
|
|
4733
|
-
_.map((
|
|
4752
|
+
_.map((S) => typeof S == "string" || !S.name ? null : /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
4734
4753
|
gt,
|
|
4735
4754
|
{
|
|
4736
|
-
href:
|
|
4755
|
+
href: S.id ? `/profiles/${S.id}` : void 0,
|
|
4737
4756
|
gtmContext: "Likes",
|
|
4738
4757
|
gtmType: "liked-name-click",
|
|
4739
|
-
onClick: (
|
|
4740
|
-
children:
|
|
4758
|
+
onClick: (M) => M == null ? void 0 : M.stopPropagation(),
|
|
4759
|
+
children: S.name
|
|
4741
4760
|
}
|
|
4742
|
-
) },
|
|
4761
|
+
) }, S.id || window.btoa(S.name))),
|
|
4743
4762
|
n.length > Zt && /* @__PURE__ */ a.jsx("li", { children: l.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Zt }) })
|
|
4744
4763
|
] }) })
|
|
4745
4764
|
] })
|
|
@@ -4749,7 +4768,7 @@ const Bt = () => {
|
|
|
4749
4768
|
const t = {};
|
|
4750
4769
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
4751
4770
|
}, xt = (e, t) => e && !t;
|
|
4752
|
-
const
|
|
4771
|
+
const xe = "discussion_", $s = 280, kt = ({
|
|
4753
4772
|
element: e = "div",
|
|
4754
4773
|
content: t,
|
|
4755
4774
|
userHasPermissions: n = !0,
|
|
@@ -4776,54 +4795,54 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4776
4795
|
links: p = {},
|
|
4777
4796
|
className: h,
|
|
4778
4797
|
gtmContext: g = "DiscussionAnswer",
|
|
4779
|
-
children:
|
|
4798
|
+
children: y,
|
|
4780
4799
|
isTruncated: k = !1
|
|
4781
4800
|
}) => {
|
|
4782
|
-
const
|
|
4801
|
+
const b = A(), _ = _e(je), v = _e(vt), [j, S] = R({
|
|
4783
4802
|
body: t && t.body || "",
|
|
4784
4803
|
isEditing: !1,
|
|
4785
4804
|
didEdit: t && t.isEdited || !1
|
|
4786
|
-
}), [
|
|
4805
|
+
}), [M, D] = R(!1), [I, $] = R("");
|
|
4787
4806
|
if (G(() => {
|
|
4788
|
-
|
|
4807
|
+
S({
|
|
4789
4808
|
...j,
|
|
4790
4809
|
body: t && t.body || "",
|
|
4791
4810
|
didEdit: t && t.isEdited || !1
|
|
4792
4811
|
});
|
|
4793
4812
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
4794
|
-
return /* @__PURE__ */ a.jsx(
|
|
4795
|
-
const { author:
|
|
4796
|
-
W || (W = ""),
|
|
4813
|
+
return /* @__PURE__ */ a.jsx(be, { className: "discussion-card discussion-post" });
|
|
4814
|
+
const { author: C, canLike: E, createdAt: Z, id: N, likes: U = 0, userLiked: Y, comments: ne = 0 } = t, Q = k ? Ne(j.body, $s) : j.body, J = _ && _.id && typeof C != "string" && C.id && C.id === _.id || !1, re = typeof E == "boolean" ? E : n ? !J : !1, X = async (W) => {
|
|
4815
|
+
W || (W = ""), $("");
|
|
4797
4816
|
try {
|
|
4798
4817
|
if (!er(W, j.body)) {
|
|
4799
4818
|
const ue = t.type === "question" ? { title: W } : { body: W };
|
|
4800
4819
|
await m(Sn(t.slugs), ue);
|
|
4801
4820
|
}
|
|
4802
|
-
|
|
4821
|
+
S({ body: W, isEditing: !1, didEdit: !0 });
|
|
4803
4822
|
} catch {
|
|
4804
|
-
|
|
4823
|
+
$(`${xe}form_error`);
|
|
4805
4824
|
}
|
|
4806
|
-
},
|
|
4825
|
+
}, se = () => {
|
|
4807
4826
|
v && v.updateConversation && v.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
4808
|
-
var
|
|
4809
|
-
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((
|
|
4810
|
-
|
|
4827
|
+
var K, he, me;
|
|
4828
|
+
const ue = `reply-form-${(t.type === "answer" ? t.slug : ((K = t.slugs) == null ? void 0 : K.reply) || ((he = t.slugs) == null ? void 0 : he.answer) || ((me = t.slugs) == null ? void 0 : me.question) || "").toLowerCase().slice(-15)}`, pe = document.getElementById(ue), q = document.getElementById(`${ue}-input`);
|
|
4829
|
+
q && q.focus(), pe && pe.scrollIntoView({ behavior: "smooth" });
|
|
4811
4830
|
}, 0);
|
|
4812
4831
|
}, de = () => {
|
|
4813
|
-
|
|
4832
|
+
D(!1);
|
|
4814
4833
|
try {
|
|
4815
4834
|
c(Sn(t.slugs));
|
|
4816
4835
|
} catch {
|
|
4817
|
-
|
|
4836
|
+
$("delete-error");
|
|
4818
4837
|
}
|
|
4819
4838
|
}, ce = [
|
|
4820
4839
|
{
|
|
4821
|
-
text:
|
|
4840
|
+
text: b.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
4822
4841
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
4823
|
-
|
|
4842
|
+
b.formatMessage({ id: `${xe}report_subject` })
|
|
4824
4843
|
)}&body=${encodeURI(
|
|
4825
|
-
|
|
4826
|
-
{ id: `${
|
|
4844
|
+
b.formatMessage(
|
|
4845
|
+
{ id: `${xe}report_body` },
|
|
4827
4846
|
{
|
|
4828
4847
|
contentType: t.type || "",
|
|
4829
4848
|
contentSlug: t.slug || "",
|
|
@@ -4834,25 +4853,25 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4834
4853
|
icon: "flag"
|
|
4835
4854
|
}
|
|
4836
4855
|
];
|
|
4837
|
-
return n &&
|
|
4856
|
+
return n && J && ce.push(
|
|
4838
4857
|
{
|
|
4839
|
-
text:
|
|
4840
|
-
onClick: () =>
|
|
4858
|
+
text: b.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
4859
|
+
onClick: () => S({ ...j, isEditing: !0 }),
|
|
4841
4860
|
icon: "pencil-paper",
|
|
4842
4861
|
className: "gtm-trackable",
|
|
4843
4862
|
"data-gtm-event-context": g,
|
|
4844
4863
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
4845
4864
|
},
|
|
4846
4865
|
{
|
|
4847
|
-
text:
|
|
4866
|
+
text: b.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
4848
4867
|
onClick: (W) => {
|
|
4849
|
-
W.preventDefault(), W.stopPropagation(),
|
|
4868
|
+
W.preventDefault(), W.stopPropagation(), D(!0);
|
|
4850
4869
|
},
|
|
4851
4870
|
icon: "trash",
|
|
4852
4871
|
className: "gtm-trackable",
|
|
4853
4872
|
"data-gtm-event-context": g,
|
|
4854
4873
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
4855
|
-
..._s(`delete-${t.slug}-modal`,
|
|
4874
|
+
..._s(`delete-${t.slug}-modal`, M)
|
|
4856
4875
|
}
|
|
4857
4876
|
), F.createElement(e, {
|
|
4858
4877
|
className: w("discussion-post", h),
|
|
@@ -4861,7 +4880,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4861
4880
|
/* @__PURE__ */ a.jsxs(
|
|
4862
4881
|
"div",
|
|
4863
4882
|
{
|
|
4864
|
-
id:
|
|
4883
|
+
id: N || t.slug,
|
|
4865
4884
|
className: w("discussion-card", t.type, {
|
|
4866
4885
|
editing: j.isEditing,
|
|
4867
4886
|
"has-link": p.post && !j.isEditing
|
|
@@ -4873,9 +4892,9 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4873
4892
|
!j.isEditing && /* @__PURE__ */ a.jsx(
|
|
4874
4893
|
Xt,
|
|
4875
4894
|
{
|
|
4876
|
-
member:
|
|
4877
|
-
additionalContent: { createdAt:
|
|
4878
|
-
className: typeof
|
|
4895
|
+
member: C,
|
|
4896
|
+
additionalContent: { createdAt: Z, didEdit: j.didEdit },
|
|
4897
|
+
className: typeof C != "string" && C.id === s ? "highlighted" : "",
|
|
4879
4898
|
gtmContext: g,
|
|
4880
4899
|
gtmType: "profile-click"
|
|
4881
4900
|
}
|
|
@@ -4892,10 +4911,10 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4892
4911
|
},
|
|
4893
4912
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
4894
4913
|
forceShow: {
|
|
4895
|
-
error:
|
|
4896
|
-
{ id:
|
|
4914
|
+
error: I !== "" && I !== "delete-error" ? b.formatMessage(
|
|
4915
|
+
{ id: I },
|
|
4897
4916
|
{
|
|
4898
|
-
action:
|
|
4917
|
+
action: b.formatMessage({
|
|
4899
4918
|
id: `discussion_action_${t.type}`
|
|
4900
4919
|
})
|
|
4901
4920
|
}
|
|
@@ -4903,9 +4922,9 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4903
4922
|
},
|
|
4904
4923
|
functions: {
|
|
4905
4924
|
create: o,
|
|
4906
|
-
handleSaveEdit:
|
|
4925
|
+
handleSaveEdit: X,
|
|
4907
4926
|
handleCancel: () => {
|
|
4908
|
-
|
|
4927
|
+
$(""), S({ ...j, isEditing: !1 });
|
|
4909
4928
|
}
|
|
4910
4929
|
},
|
|
4911
4930
|
gtmContext: `${g}Form`
|
|
@@ -4917,7 +4936,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4917
4936
|
className: "gtm-trackable",
|
|
4918
4937
|
"data-gtm-event-context": g,
|
|
4919
4938
|
"data-gtm-event-type": "title-click",
|
|
4920
|
-
children: /* @__PURE__ */ a.jsx(jn, { options: { overrides: { a: Zr } }, children:
|
|
4939
|
+
children: /* @__PURE__ */ a.jsx(jn, { options: { overrides: { a: Zr } }, children: Q })
|
|
4921
4940
|
}
|
|
4922
4941
|
) : /* @__PURE__ */ a.jsx(
|
|
4923
4942
|
jn,
|
|
@@ -4928,7 +4947,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4928
4947
|
forceInline: t.type === "question",
|
|
4929
4948
|
forceBlock: t.type !== "question"
|
|
4930
4949
|
},
|
|
4931
|
-
children:
|
|
4950
|
+
children: Q
|
|
4932
4951
|
}
|
|
4933
4952
|
),
|
|
4934
4953
|
!j.isEditing && /* @__PURE__ */ a.jsxs(
|
|
@@ -4941,7 +4960,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4941
4960
|
Ts,
|
|
4942
4961
|
{
|
|
4943
4962
|
element: "li",
|
|
4944
|
-
likes:
|
|
4963
|
+
likes: U,
|
|
4945
4964
|
isShort: !1,
|
|
4946
4965
|
userLiked: Y,
|
|
4947
4966
|
content: { type: t.type, slugs: t.slugs },
|
|
@@ -4962,7 +4981,7 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4962
4981
|
},
|
|
4963
4982
|
children: [
|
|
4964
4983
|
/* @__PURE__ */ a.jsx(
|
|
4965
|
-
|
|
4984
|
+
H,
|
|
4966
4985
|
{
|
|
4967
4986
|
variant: "tertiary",
|
|
4968
4987
|
size: "medium",
|
|
@@ -4973,27 +4992,27 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
4973
4992
|
className: "gtm-trackable",
|
|
4974
4993
|
"data-gtm-event-context": g,
|
|
4975
4994
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4976
|
-
screenreaderText:
|
|
4977
|
-
{ id: `${
|
|
4978
|
-
{ count:
|
|
4995
|
+
screenreaderText: b.formatMessage(
|
|
4996
|
+
{ id: `${xe}comments_screenReader` },
|
|
4997
|
+
{ count: ne }
|
|
4979
4998
|
)
|
|
4980
4999
|
}
|
|
4981
5000
|
),
|
|
4982
|
-
/* @__PURE__ */ a.jsx("span", { children:
|
|
4983
|
-
{ id: `${
|
|
4984
|
-
{ count:
|
|
5001
|
+
/* @__PURE__ */ a.jsx("span", { children: b.formatMessage(
|
|
5002
|
+
{ id: `${xe}comments` },
|
|
5003
|
+
{ count: ne }
|
|
4985
5004
|
) })
|
|
4986
5005
|
]
|
|
4987
5006
|
}
|
|
4988
5007
|
),
|
|
4989
5008
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
4990
|
-
|
|
5009
|
+
H,
|
|
4991
5010
|
{
|
|
4992
5011
|
variant: "tertiary",
|
|
4993
5012
|
size: "medium",
|
|
4994
5013
|
styling: { muted: !0 },
|
|
4995
|
-
onClick:
|
|
4996
|
-
children:
|
|
5014
|
+
onClick: se,
|
|
5015
|
+
children: b.formatMessage({ id: `${xe}reply` })
|
|
4997
5016
|
}
|
|
4998
5017
|
) }),
|
|
4999
5018
|
/* @__PURE__ */ a.jsx(
|
|
@@ -5010,49 +5029,49 @@ const ve = "discussion_", $s = 280, kt = ({
|
|
|
5010
5029
|
]
|
|
5011
5030
|
}
|
|
5012
5031
|
),
|
|
5013
|
-
|
|
5032
|
+
y,
|
|
5014
5033
|
/* @__PURE__ */ a.jsx(
|
|
5015
5034
|
la,
|
|
5016
5035
|
{
|
|
5017
5036
|
id: `delete-${t.slug}-modal`,
|
|
5018
|
-
isOpen:
|
|
5037
|
+
isOpen: M,
|
|
5019
5038
|
functions: { onOpen: () => {
|
|
5020
|
-
}, onClose: () =>
|
|
5039
|
+
}, onClose: () => D(!1) },
|
|
5021
5040
|
forceShow: {
|
|
5022
|
-
error:
|
|
5041
|
+
error: I === "delete-error" ? b.formatMessage(
|
|
5023
5042
|
{ id: "discussion_delete_error" },
|
|
5024
5043
|
{
|
|
5025
|
-
action:
|
|
5044
|
+
action: b.formatMessage({
|
|
5026
5045
|
id: `discussion_action_${t.type}`
|
|
5027
5046
|
})
|
|
5028
5047
|
}
|
|
5029
5048
|
) : !1
|
|
5030
5049
|
},
|
|
5031
|
-
title:
|
|
5050
|
+
title: b.formatMessage(
|
|
5032
5051
|
{ id: "discussion_delete_title" },
|
|
5033
|
-
{ action:
|
|
5052
|
+
{ action: b.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
5034
5053
|
),
|
|
5035
5054
|
buttons: [
|
|
5036
5055
|
{
|
|
5037
5056
|
variant: "secondary",
|
|
5038
|
-
onClick: () =>
|
|
5039
|
-
children:
|
|
5057
|
+
onClick: () => D(!1),
|
|
5058
|
+
children: b.formatMessage({ id: "discussion_delete_cancel" })
|
|
5040
5059
|
},
|
|
5041
5060
|
{
|
|
5042
5061
|
variant: "primary",
|
|
5043
5062
|
className: "destructive",
|
|
5044
5063
|
onClick: de,
|
|
5045
|
-
children:
|
|
5064
|
+
children: b.formatMessage({ id: "discussion_delete_delete" })
|
|
5046
5065
|
}
|
|
5047
5066
|
],
|
|
5048
5067
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
5049
5068
|
children: /* @__PURE__ */ a.jsx(
|
|
5050
|
-
|
|
5069
|
+
we,
|
|
5051
5070
|
{
|
|
5052
5071
|
id: "discussion_delete_text",
|
|
5053
5072
|
values: {
|
|
5054
5073
|
p: (W) => /* @__PURE__ */ a.jsx("p", { children: W }),
|
|
5055
|
-
action:
|
|
5074
|
+
action: b.formatMessage({
|
|
5056
5075
|
id: `discussion_action_${t.type}`
|
|
5057
5076
|
})
|
|
5058
5077
|
}
|
|
@@ -5067,11 +5086,11 @@ const qt = "discussion_responses_", Yi = ({ type: e = "answer", responses: t = 0
|
|
|
5067
5086
|
const n = A();
|
|
5068
5087
|
return /* @__PURE__ */ a.jsxs("div", { className: "responses-heading", children: [
|
|
5069
5088
|
/* @__PURE__ */ a.jsx("h3", { children: n.formatMessage({ id: `${qt}title` }, { action: n.formatMessage({ id: `${qt}${e}` }), count: t }) }),
|
|
5070
|
-
t === 0 && /* @__PURE__ */ a.jsx("p", { children:
|
|
5089
|
+
t === 0 && /* @__PURE__ */ a.jsx("p", { children: ye(n.formatMessage, `${qt}empty`, e, e) })
|
|
5071
5090
|
] });
|
|
5072
5091
|
};
|
|
5073
5092
|
const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
5074
|
-
const r = A(), s =
|
|
5093
|
+
const r = A(), s = ae(null), i = _e(vt), [o, c] = R(
|
|
5075
5094
|
"open"
|
|
5076
5095
|
/* Open */
|
|
5077
5096
|
);
|
|
@@ -5102,12 +5121,12 @@ const Es = ({ count: e = "", showRepliesButton: t = !0, children: n }) => {
|
|
|
5102
5121
|
"opening",
|
|
5103
5122
|
"open"
|
|
5104
5123
|
/* Open */
|
|
5105
|
-
].includes(o), f =
|
|
5124
|
+
].includes(o), f = rt(n, {
|
|
5106
5125
|
element: "li"
|
|
5107
5126
|
});
|
|
5108
5127
|
return /* @__PURE__ */ a.jsxs("div", { className: "thread-wrapper", children: [
|
|
5109
5128
|
t && /* @__PURE__ */ a.jsx(
|
|
5110
|
-
|
|
5129
|
+
H,
|
|
5111
5130
|
{
|
|
5112
5131
|
variant: "secondary",
|
|
5113
5132
|
size: "small",
|
|
@@ -5255,7 +5274,7 @@ const Ae = Object.freeze({
|
|
|
5255
5274
|
thumbnail: "https://some-user-thumbnail.com/avatar1.png"
|
|
5256
5275
|
},
|
|
5257
5276
|
isLoading: !1
|
|
5258
|
-
}),
|
|
5277
|
+
}), Ee = Object.freeze({
|
|
5259
5278
|
id: "some-user-id-2",
|
|
5260
5279
|
name: "some user name 2",
|
|
5261
5280
|
organization: "some user organization 2",
|
|
@@ -5275,7 +5294,7 @@ const Ae = Object.freeze({
|
|
|
5275
5294
|
time: "2023-11-24T17:52:36.162000",
|
|
5276
5295
|
verb: "post"
|
|
5277
5296
|
}), Ds = Object.freeze({
|
|
5278
|
-
actor: `SU:${
|
|
5297
|
+
actor: `SU:${Ee.id}`,
|
|
5279
5298
|
content: "some content 2",
|
|
5280
5299
|
duration: "5.53ms",
|
|
5281
5300
|
feed_id: "some-feed-id-2",
|
|
@@ -5284,7 +5303,7 @@ const Ae = Object.freeze({
|
|
|
5284
5303
|
object: "comment",
|
|
5285
5304
|
time: "2023-11-24T17:54:36.162000",
|
|
5286
5305
|
verb: "post"
|
|
5287
|
-
}),
|
|
5306
|
+
}), Rs = Object.freeze({
|
|
5288
5307
|
actor: `SU:${Ae.id}`,
|
|
5289
5308
|
content: "some content 3",
|
|
5290
5309
|
duration: "5.53ms",
|
|
@@ -5294,8 +5313,8 @@ const Ae = Object.freeze({
|
|
|
5294
5313
|
object: "comment",
|
|
5295
5314
|
time: "2023-11-24T17:56:36.162000",
|
|
5296
5315
|
verb: "post"
|
|
5297
|
-
}),
|
|
5298
|
-
actor: `SU:${
|
|
5316
|
+
}), Ls = Object.freeze({
|
|
5317
|
+
actor: `SU:${Ee.id}`,
|
|
5299
5318
|
content: "some content 4",
|
|
5300
5319
|
duration: "5.53ms",
|
|
5301
5320
|
feed_id: "some-feed-id-4",
|
|
@@ -5313,13 +5332,13 @@ Object.freeze({
|
|
|
5313
5332
|
data: {},
|
|
5314
5333
|
parent: "",
|
|
5315
5334
|
updated_at: "2023-11-24T17:58:36.162000",
|
|
5316
|
-
user_id:
|
|
5335
|
+
user_id: Ee.id,
|
|
5317
5336
|
children_counts: {},
|
|
5318
5337
|
latest_children: {},
|
|
5319
5338
|
latest_children_extra: {},
|
|
5320
5339
|
own_children: {},
|
|
5321
5340
|
user: {
|
|
5322
|
-
id:
|
|
5341
|
+
id: Ee.id,
|
|
5323
5342
|
data: {},
|
|
5324
5343
|
created_at: "2023-11-24T17:58:36.162000",
|
|
5325
5344
|
updated_at: "2023-11-24T17:58:36.162000"
|
|
@@ -5329,9 +5348,9 @@ Object.freeze({
|
|
|
5329
5348
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5330
5349
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5331
5350
|
id: "some-reply-id-1",
|
|
5332
|
-
user_id:
|
|
5351
|
+
user_id: Ee.id,
|
|
5333
5352
|
user: {
|
|
5334
|
-
id:
|
|
5353
|
+
id: Ee.id,
|
|
5335
5354
|
data: {},
|
|
5336
5355
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5337
5356
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
@@ -5369,15 +5388,15 @@ Object.freeze({
|
|
|
5369
5388
|
created_at: "2023-12-03T21:53:45.999851Z",
|
|
5370
5389
|
updated_at: "2023-12-03T21:53:45.999851Z",
|
|
5371
5390
|
id: "some-reply-id-3",
|
|
5372
|
-
user_id:
|
|
5391
|
+
user_id: Ee.id,
|
|
5373
5392
|
user: {
|
|
5374
|
-
id:
|
|
5393
|
+
id: Ee.id,
|
|
5375
5394
|
data: {},
|
|
5376
5395
|
created_at: "2023-08-31T07:11:38.677184Z",
|
|
5377
5396
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5378
5397
|
},
|
|
5379
5398
|
kind: "reply",
|
|
5380
|
-
activity_id:
|
|
5399
|
+
activity_id: Rs.id,
|
|
5381
5400
|
data: {
|
|
5382
5401
|
content: "Some content 3..."
|
|
5383
5402
|
},
|
|
@@ -5397,7 +5416,7 @@ Object.freeze({
|
|
|
5397
5416
|
updated_at: "2023-08-31T07:11:38.677184Z"
|
|
5398
5417
|
},
|
|
5399
5418
|
kind: "reply",
|
|
5400
|
-
activity_id:
|
|
5419
|
+
activity_id: Ls.id,
|
|
5401
5420
|
data: {
|
|
5402
5421
|
content: "Some content 4..."
|
|
5403
5422
|
},
|
|
@@ -5464,7 +5483,7 @@ function Bs({
|
|
|
5464
5483
|
},
|
|
5465
5484
|
user: m,
|
|
5466
5485
|
...l
|
|
5467
|
-
}, d = Is({ ...f, mutationFn: e }), p = Os({ ...f, mutationFn: t }), h = Zs({ ...f, mutationFn: n }), g = Hs({ ...f, mutationFn: s }),
|
|
5486
|
+
}, d = Is({ ...f, mutationFn: e }), p = Os({ ...f, mutationFn: t }), h = Zs({ ...f, mutationFn: n }), g = Hs({ ...f, mutationFn: s }), y = Us({ ...f, mutationFn: i }), { activities: k, ...b } = qs({ queryKey: o, queryFn: r });
|
|
5468
5487
|
return {
|
|
5469
5488
|
activities: k,
|
|
5470
5489
|
mutations: {
|
|
@@ -5472,10 +5491,10 @@ function Bs({
|
|
|
5472
5491
|
edit: p,
|
|
5473
5492
|
remove: g,
|
|
5474
5493
|
like: h,
|
|
5475
|
-
unlike:
|
|
5494
|
+
unlike: y
|
|
5476
5495
|
},
|
|
5477
5496
|
user: m,
|
|
5478
|
-
...
|
|
5497
|
+
...b
|
|
5479
5498
|
};
|
|
5480
5499
|
}
|
|
5481
5500
|
function Zs({
|
|
@@ -5508,7 +5527,7 @@ function qs({ queryFn: e, queryKey: t }) {
|
|
|
5508
5527
|
isLoading: s,
|
|
5509
5528
|
hasNextPage: i,
|
|
5510
5529
|
fetchNextPage: o
|
|
5511
|
-
} =
|
|
5530
|
+
} = Ln({
|
|
5512
5531
|
queryKey: t,
|
|
5513
5532
|
queryFn: e,
|
|
5514
5533
|
initialPageParam: { next: null },
|
|
@@ -5605,10 +5624,10 @@ const Gi = ({
|
|
|
5605
5624
|
create: p,
|
|
5606
5625
|
edit: h,
|
|
5607
5626
|
remove: g,
|
|
5608
|
-
like:
|
|
5627
|
+
like: y,
|
|
5609
5628
|
unlike: k
|
|
5610
5629
|
},
|
|
5611
|
-
user:
|
|
5630
|
+
user: b
|
|
5612
5631
|
} = Bs({
|
|
5613
5632
|
queryKey: [e, t, "activities"],
|
|
5614
5633
|
queryFns: r
|
|
@@ -5629,19 +5648,19 @@ const Gi = ({
|
|
|
5629
5648
|
}
|
|
5630
5649
|
),
|
|
5631
5650
|
c == null ? void 0 : c.map((_) => {
|
|
5632
|
-
var
|
|
5651
|
+
var N, U, Y, ne, Q, J, re;
|
|
5633
5652
|
const {
|
|
5634
5653
|
id: v,
|
|
5635
5654
|
own_reactions: j,
|
|
5636
|
-
latest_reactions:
|
|
5637
|
-
reaction_counts:
|
|
5638
|
-
} = _,
|
|
5639
|
-
var
|
|
5655
|
+
latest_reactions: S,
|
|
5656
|
+
reaction_counts: M
|
|
5657
|
+
} = _, D = (((N = S == null ? void 0 : S.like) == null ? void 0 : N.length) || 0) > 0, I = (((U = j == null ? void 0 : j.like) == null ? void 0 : U.length) || 0) > 0, $ = I ? j == null ? void 0 : j.like[0].id : "", C = D ? (Y = S == null ? void 0 : S.like) == null ? void 0 : Y.map((X) => {
|
|
5658
|
+
var se, de, ce;
|
|
5640
5659
|
return {
|
|
5641
|
-
id: (
|
|
5642
|
-
name: (ce = (de =
|
|
5660
|
+
id: (se = X == null ? void 0 : X.user) == null ? void 0 : se.id,
|
|
5661
|
+
name: (ce = (de = X == null ? void 0 : X.user) == null ? void 0 : de.data) == null ? void 0 : ce.name
|
|
5643
5662
|
};
|
|
5644
|
-
}) : !1, E = _ == null ? void 0 : _.actor,
|
|
5663
|
+
}) : !1, E = _ == null ? void 0 : _.actor, Z = (E == null ? void 0 : E.id) === (b == null ? void 0 : b.id);
|
|
5645
5664
|
return /* @__PURE__ */ a.jsxs(qe, { children: [
|
|
5646
5665
|
/* @__PURE__ */ a.jsx(
|
|
5647
5666
|
kt,
|
|
@@ -5649,7 +5668,7 @@ const Gi = ({
|
|
|
5649
5668
|
content: {
|
|
5650
5669
|
type: "post",
|
|
5651
5670
|
body: _ == null ? void 0 : _.content,
|
|
5652
|
-
canLike: xt(n,
|
|
5671
|
+
canLike: xt(n, Z),
|
|
5653
5672
|
createdAt: (_ == null ? void 0 : _.time) || "",
|
|
5654
5673
|
slugs: {
|
|
5655
5674
|
question: `${e}/${t}`,
|
|
@@ -5658,17 +5677,17 @@ const Gi = ({
|
|
|
5658
5677
|
slug: v,
|
|
5659
5678
|
author: {
|
|
5660
5679
|
id: E == null ? void 0 : E.id,
|
|
5661
|
-
name: (
|
|
5662
|
-
organization: (
|
|
5663
|
-
jobTitle: (
|
|
5680
|
+
name: (ne = E == null ? void 0 : E.data) == null ? void 0 : ne.name,
|
|
5681
|
+
organization: (Q = E == null ? void 0 : E.data) == null ? void 0 : Q.organization,
|
|
5682
|
+
jobTitle: (J = E == null ? void 0 : E.data) == null ? void 0 : J.jobTitle,
|
|
5664
5683
|
image: {
|
|
5665
5684
|
thumbnail: ((re = E == null ? void 0 : E.data) == null ? void 0 : re.thumbnail) || void 0
|
|
5666
5685
|
}
|
|
5667
5686
|
},
|
|
5668
|
-
userLiked:
|
|
5669
|
-
likes: (
|
|
5670
|
-
comments: (
|
|
5671
|
-
peopleWhoLiked:
|
|
5687
|
+
userLiked: I,
|
|
5688
|
+
likes: (M == null ? void 0 : M.like) || 0,
|
|
5689
|
+
comments: (M == null ? void 0 : M.reply) || 0,
|
|
5690
|
+
peopleWhoLiked: C
|
|
5672
5691
|
},
|
|
5673
5692
|
links: {
|
|
5674
5693
|
post: `${e}/${t}/${v}`,
|
|
@@ -5679,11 +5698,11 @@ const Gi = ({
|
|
|
5679
5698
|
createContent: () => null,
|
|
5680
5699
|
deleteContent: () => g({ activityId: v }),
|
|
5681
5700
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5682
|
-
updateContent: (
|
|
5701
|
+
updateContent: (X, { body: se }) => h({ activityId: v, content: se })
|
|
5683
5702
|
},
|
|
5684
5703
|
likes: {
|
|
5685
|
-
createLike: () =>
|
|
5686
|
-
deleteLike: () => k({ activityId: v, reactionId:
|
|
5704
|
+
createLike: () => y({ activityId: v }),
|
|
5705
|
+
deleteLike: () => k({ activityId: v, reactionId: $ })
|
|
5687
5706
|
},
|
|
5688
5707
|
comments: {
|
|
5689
5708
|
openComments: () => null
|
|
@@ -5692,7 +5711,7 @@ const Gi = ({
|
|
|
5692
5711
|
isTruncated: !0
|
|
5693
5712
|
}
|
|
5694
5713
|
),
|
|
5695
|
-
/* @__PURE__ */ a.jsx(
|
|
5714
|
+
/* @__PURE__ */ a.jsx($e, {})
|
|
5696
5715
|
] }, v);
|
|
5697
5716
|
}),
|
|
5698
5717
|
!d && /* @__PURE__ */ a.jsx(
|
|
@@ -6316,7 +6335,7 @@ function ha({
|
|
|
6316
6335
|
},
|
|
6317
6336
|
user: m,
|
|
6318
6337
|
...l
|
|
6319
|
-
}, d = Vs({ ...f, mutationFn: e }), p = Ys({ ...f, mutationFn: t }), h = Gs({ ...f, mutationFn: n }), g = Qs({ ...f, mutationFn: s }),
|
|
6338
|
+
}, d = Vs({ ...f, mutationFn: e }), p = Ys({ ...f, mutationFn: t }), h = Gs({ ...f, mutationFn: n }), g = Qs({ ...f, mutationFn: s }), y = Js({ ...f, mutationFn: i }), { replies: k, ...b } = Ks({ queryKey: o, queryFn: r });
|
|
6320
6339
|
return {
|
|
6321
6340
|
replies: k,
|
|
6322
6341
|
mutations: {
|
|
@@ -6324,10 +6343,10 @@ function ha({
|
|
|
6324
6343
|
edit: p,
|
|
6325
6344
|
remove: g,
|
|
6326
6345
|
like: h,
|
|
6327
|
-
unlike:
|
|
6346
|
+
unlike: y
|
|
6328
6347
|
},
|
|
6329
6348
|
user: m,
|
|
6330
|
-
...
|
|
6349
|
+
...b
|
|
6331
6350
|
};
|
|
6332
6351
|
}
|
|
6333
6352
|
function Gs({
|
|
@@ -6360,7 +6379,7 @@ function Ks({ queryFn: e, queryKey: t }) {
|
|
|
6360
6379
|
isLoading: s,
|
|
6361
6380
|
hasNextPage: i,
|
|
6362
6381
|
fetchNextPage: o
|
|
6363
|
-
} =
|
|
6382
|
+
} = Ln({
|
|
6364
6383
|
queryKey: t,
|
|
6365
6384
|
queryFn: e,
|
|
6366
6385
|
initialPageParam: { next: "" },
|
|
@@ -6466,10 +6485,10 @@ const ri = ({
|
|
|
6466
6485
|
create: p,
|
|
6467
6486
|
edit: h,
|
|
6468
6487
|
like: g,
|
|
6469
|
-
remove:
|
|
6488
|
+
remove: y,
|
|
6470
6489
|
unlike: k
|
|
6471
6490
|
},
|
|
6472
|
-
user:
|
|
6491
|
+
user: b
|
|
6473
6492
|
} = ha({
|
|
6474
6493
|
queryKey: [e, t, n, r, "replies"],
|
|
6475
6494
|
queryFns: {
|
|
@@ -6477,7 +6496,7 @@ const ri = ({
|
|
|
6477
6496
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6478
6497
|
list: (v) => i.list({ ...v, reactionId: r })
|
|
6479
6498
|
}
|
|
6480
|
-
}), _ =
|
|
6499
|
+
}), _ = _e(vt);
|
|
6481
6500
|
return /* @__PURE__ */ a.jsx(
|
|
6482
6501
|
Es,
|
|
6483
6502
|
{
|
|
@@ -6485,26 +6504,29 @@ const ri = ({
|
|
|
6485
6504
|
showRepliesButton: !1,
|
|
6486
6505
|
children: /* @__PURE__ */ a.jsxs("section", { children: [
|
|
6487
6506
|
c == null ? void 0 : c.map((v) => {
|
|
6488
|
-
var Q,
|
|
6507
|
+
var Q, J, re, X, se, de, ce, W, ue, pe;
|
|
6489
6508
|
const {
|
|
6490
6509
|
id: j,
|
|
6491
|
-
own_children:
|
|
6492
|
-
latest_children:
|
|
6493
|
-
children_counts:
|
|
6494
|
-
} = v,
|
|
6495
|
-
var
|
|
6510
|
+
own_children: S,
|
|
6511
|
+
latest_children: M,
|
|
6512
|
+
children_counts: D
|
|
6513
|
+
} = v, I = (((Q = M == null ? void 0 : M.like) == null ? void 0 : Q.length) || 0) > 0, $ = (J = S == null ? void 0 : S.like) == null ? void 0 : J.find((q) => {
|
|
6514
|
+
var K;
|
|
6515
|
+
return ((K = q == null ? void 0 : q.user) == null ? void 0 : K.id) === (b == null ? void 0 : b.id);
|
|
6516
|
+
}), C = $ ? $ == null ? void 0 : $.id : "", E = !!$, Z = I ? (re = M == null ? void 0 : M.like) == null ? void 0 : re.map((q) => {
|
|
6517
|
+
var K, he, me;
|
|
6496
6518
|
return {
|
|
6497
|
-
id: (
|
|
6498
|
-
name: (
|
|
6519
|
+
id: (K = q == null ? void 0 : q.user) == null ? void 0 : K.id,
|
|
6520
|
+
name: (me = (he = q == null ? void 0 : q.user) == null ? void 0 : he.data) == null ? void 0 : me.name
|
|
6499
6521
|
};
|
|
6500
|
-
}) : !1, N = v == null ? void 0 : v.user,
|
|
6522
|
+
}) : !1, N = v == null ? void 0 : v.user, U = (N == null ? void 0 : N.id) === (b == null ? void 0 : b.id), Y = xt(s, U), ne = typeof v.data.content == "string" ? (X = v == null ? void 0 : v.data) == null ? void 0 : X.content : ((de = (se = v == null ? void 0 : v.data) == null ? void 0 : se.content) == null ? void 0 : de.text) || "";
|
|
6501
6523
|
return /* @__PURE__ */ a.jsx(
|
|
6502
6524
|
kt,
|
|
6503
6525
|
{
|
|
6504
6526
|
content: {
|
|
6505
6527
|
type: "reply",
|
|
6506
|
-
body:
|
|
6507
|
-
canLike:
|
|
6528
|
+
body: ne,
|
|
6529
|
+
canLike: Y,
|
|
6508
6530
|
createdAt: v == null ? void 0 : v.created_at,
|
|
6509
6531
|
slugs: {
|
|
6510
6532
|
question: `${e}/${t}`,
|
|
@@ -6516,27 +6538,27 @@ const ri = ({
|
|
|
6516
6538
|
slug: "",
|
|
6517
6539
|
author: {
|
|
6518
6540
|
id: N == null ? void 0 : N.id,
|
|
6519
|
-
name: (
|
|
6520
|
-
organization: (
|
|
6521
|
-
jobTitle: (
|
|
6541
|
+
name: (ce = N.data) == null ? void 0 : ce.name,
|
|
6542
|
+
organization: (W = N.data) == null ? void 0 : W.organization,
|
|
6543
|
+
jobTitle: (ue = N.data) == null ? void 0 : ue.jobTitle,
|
|
6522
6544
|
image: {
|
|
6523
|
-
thumbnail: ((
|
|
6545
|
+
thumbnail: ((pe = N.data) == null ? void 0 : pe.thumbnail) || void 0
|
|
6524
6546
|
}
|
|
6525
6547
|
},
|
|
6526
|
-
userLiked:
|
|
6527
|
-
likes: (
|
|
6528
|
-
peopleWhoLiked:
|
|
6548
|
+
userLiked: E,
|
|
6549
|
+
likes: (D == null ? void 0 : D.like) || 0,
|
|
6550
|
+
peopleWhoLiked: Z
|
|
6529
6551
|
},
|
|
6530
6552
|
functions: {
|
|
6531
6553
|
content: {
|
|
6532
6554
|
createContent: () => null,
|
|
6533
|
-
deleteContent: () =>
|
|
6555
|
+
deleteContent: () => y({ replyId: j }),
|
|
6534
6556
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6535
|
-
updateContent: (
|
|
6557
|
+
updateContent: (q, { body: K }) => h({ replyId: j, content: K })
|
|
6536
6558
|
},
|
|
6537
6559
|
likes: {
|
|
6538
6560
|
createLike: () => g({ replyId: j }),
|
|
6539
|
-
deleteLike: () => k({ replyId: j, reactionId:
|
|
6561
|
+
deleteLike: () => k({ replyId: j, reactionId: C })
|
|
6540
6562
|
},
|
|
6541
6563
|
comments: {}
|
|
6542
6564
|
}
|
|
@@ -6597,9 +6619,9 @@ const ri = ({
|
|
|
6597
6619
|
mutations: {
|
|
6598
6620
|
create: h,
|
|
6599
6621
|
edit: g,
|
|
6600
|
-
like:
|
|
6622
|
+
like: y,
|
|
6601
6623
|
remove: k,
|
|
6602
|
-
unlike:
|
|
6624
|
+
unlike: b
|
|
6603
6625
|
},
|
|
6604
6626
|
user: _
|
|
6605
6627
|
} = ha({
|
|
@@ -6628,26 +6650,29 @@ const ri = ({
|
|
|
6628
6650
|
}
|
|
6629
6651
|
),
|
|
6630
6652
|
m == null ? void 0 : m.map((v) => {
|
|
6631
|
-
var Q,
|
|
6653
|
+
var Q, J, re, X, se, de, ce, W, ue, pe;
|
|
6632
6654
|
const {
|
|
6633
6655
|
id: j,
|
|
6634
|
-
own_children:
|
|
6635
|
-
latest_children:
|
|
6636
|
-
children_counts:
|
|
6637
|
-
} = v,
|
|
6638
|
-
var
|
|
6656
|
+
own_children: S,
|
|
6657
|
+
latest_children: M,
|
|
6658
|
+
children_counts: D
|
|
6659
|
+
} = v, I = (((Q = M == null ? void 0 : M.like) == null ? void 0 : Q.length) || 0) > 0, $ = (J = S == null ? void 0 : S.like) == null ? void 0 : J.find((q) => {
|
|
6660
|
+
var K;
|
|
6661
|
+
return ((K = q == null ? void 0 : q.user) == null ? void 0 : K.id) === (_ == null ? void 0 : _.id);
|
|
6662
|
+
}), C = $ ? $ == null ? void 0 : $.id : "", E = !!$, Z = I ? (re = M == null ? void 0 : M.like) == null ? void 0 : re.map((q) => {
|
|
6663
|
+
var K, he, me;
|
|
6639
6664
|
return {
|
|
6640
|
-
id: (
|
|
6641
|
-
name: (
|
|
6665
|
+
id: (K = q == null ? void 0 : q.user) == null ? void 0 : K.id,
|
|
6666
|
+
name: (me = (he = q == null ? void 0 : q.user) == null ? void 0 : he.data) == null ? void 0 : me.name
|
|
6642
6667
|
};
|
|
6643
|
-
}) : !1, N = v == null ? void 0 : v.user,
|
|
6668
|
+
}) : !1, N = v == null ? void 0 : v.user, U = (N == null ? void 0 : N.id) === (_ == null ? void 0 : _.id), Y = xt(r, U), ne = typeof v.data.content == "string" ? (X = v == null ? void 0 : v.data) == null ? void 0 : X.content : ((de = (se = v == null ? void 0 : v.data) == null ? void 0 : se.content) == null ? void 0 : de.text) || "";
|
|
6644
6669
|
return /* @__PURE__ */ a.jsx(ks, { children: /* @__PURE__ */ a.jsx(
|
|
6645
6670
|
kt,
|
|
6646
6671
|
{
|
|
6647
6672
|
content: {
|
|
6648
6673
|
type: "reply",
|
|
6649
|
-
body:
|
|
6650
|
-
canLike:
|
|
6674
|
+
body: ne,
|
|
6675
|
+
canLike: Y,
|
|
6651
6676
|
createdAt: v == null ? void 0 : v.created_at,
|
|
6652
6677
|
slugs: {
|
|
6653
6678
|
question: `${e}/${t}`,
|
|
@@ -6657,27 +6682,27 @@ const ri = ({
|
|
|
6657
6682
|
slug: j,
|
|
6658
6683
|
author: {
|
|
6659
6684
|
id: N == null ? void 0 : N.id,
|
|
6660
|
-
name: (
|
|
6661
|
-
organization: (
|
|
6662
|
-
jobTitle: (
|
|
6685
|
+
name: (ce = N.data) == null ? void 0 : ce.name,
|
|
6686
|
+
organization: (W = N.data) == null ? void 0 : W.organization,
|
|
6687
|
+
jobTitle: (ue = N.data) == null ? void 0 : ue.jobTitle,
|
|
6663
6688
|
image: {
|
|
6664
|
-
thumbnail: ((
|
|
6689
|
+
thumbnail: ((pe = N.data) == null ? void 0 : pe.thumbnail) || void 0
|
|
6665
6690
|
}
|
|
6666
6691
|
},
|
|
6667
|
-
userLiked:
|
|
6668
|
-
likes: (
|
|
6669
|
-
peopleWhoLiked:
|
|
6692
|
+
userLiked: E,
|
|
6693
|
+
likes: (D == null ? void 0 : D.like) || 0,
|
|
6694
|
+
peopleWhoLiked: Z
|
|
6670
6695
|
},
|
|
6671
6696
|
functions: {
|
|
6672
6697
|
content: {
|
|
6673
6698
|
createContent: () => null,
|
|
6674
6699
|
deleteContent: () => k({ replyId: j }),
|
|
6675
6700
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6676
|
-
updateContent: (
|
|
6701
|
+
updateContent: (q, { body: K }) => g({ replyId: j, content: K })
|
|
6677
6702
|
},
|
|
6678
6703
|
likes: {
|
|
6679
|
-
createLike: () =>
|
|
6680
|
-
deleteLike: () =>
|
|
6704
|
+
createLike: () => y({ replyId: j }),
|
|
6705
|
+
deleteLike: () => b({ replyId: j, reactionId: C })
|
|
6681
6706
|
},
|
|
6682
6707
|
comments: {}
|
|
6683
6708
|
},
|
|
@@ -6817,14 +6842,14 @@ const Qi = ({
|
|
|
6817
6842
|
leave: m
|
|
6818
6843
|
}
|
|
6819
6844
|
}) => {
|
|
6820
|
-
var
|
|
6821
|
-
const l = A(), f =
|
|
6845
|
+
var $, C, E, Z, N, U, Y, ne, Q;
|
|
6846
|
+
const l = A(), f = _e(je), {
|
|
6822
6847
|
activity: d,
|
|
6823
6848
|
error: p,
|
|
6824
6849
|
isLoading: h,
|
|
6825
6850
|
mutations: {
|
|
6826
6851
|
edit: g,
|
|
6827
|
-
like:
|
|
6852
|
+
like: y,
|
|
6828
6853
|
unlike: k
|
|
6829
6854
|
}
|
|
6830
6855
|
} = ci({
|
|
@@ -6832,7 +6857,7 @@ const Qi = ({
|
|
|
6832
6857
|
queryKey: [e, t, n]
|
|
6833
6858
|
});
|
|
6834
6859
|
if (h)
|
|
6835
|
-
return /* @__PURE__ */ a.jsx(
|
|
6860
|
+
return /* @__PURE__ */ a.jsx(be, { style: { height: "400px" } });
|
|
6836
6861
|
if (p || !d)
|
|
6837
6862
|
return /* @__PURE__ */ a.jsx(
|
|
6838
6863
|
bt,
|
|
@@ -6841,13 +6866,13 @@ const Qi = ({
|
|
|
6841
6866
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
6842
6867
|
}
|
|
6843
6868
|
);
|
|
6844
|
-
const { own_reactions:
|
|
6845
|
-
var
|
|
6869
|
+
const { own_reactions: b, latest_reactions: _ } = d, v = ((($ = _ == null ? void 0 : _.like) == null ? void 0 : $.length) || 0) > 0, j = (((C = b == null ? void 0 : b.like) == null ? void 0 : C.length) || 0) > 0, S = j ? b == null ? void 0 : b.like[0].id : "", M = v ? (E = _ == null ? void 0 : _.like) == null ? void 0 : E.map((J) => {
|
|
6870
|
+
var re, X, se;
|
|
6846
6871
|
return {
|
|
6847
|
-
id: (
|
|
6848
|
-
name: (
|
|
6872
|
+
id: (re = J == null ? void 0 : J.user) == null ? void 0 : re.id,
|
|
6873
|
+
name: (se = (X = J == null ? void 0 : J.user) == null ? void 0 : X.data) == null ? void 0 : se.name
|
|
6849
6874
|
};
|
|
6850
|
-
}) : !1,
|
|
6875
|
+
}) : !1, D = d == null ? void 0 : d.actor, I = (D == null ? void 0 : D.id) === (f == null ? void 0 : f.id);
|
|
6851
6876
|
return /* @__PURE__ */ a.jsx(
|
|
6852
6877
|
kt,
|
|
6853
6878
|
{
|
|
@@ -6855,7 +6880,7 @@ const Qi = ({
|
|
|
6855
6880
|
content: {
|
|
6856
6881
|
type: "post",
|
|
6857
6882
|
body: d == null ? void 0 : d.content,
|
|
6858
|
-
canLike: xt(r,
|
|
6883
|
+
canLike: xt(r, I),
|
|
6859
6884
|
createdAt: (d == null ? void 0 : d.time) || "",
|
|
6860
6885
|
slugs: {
|
|
6861
6886
|
question: `${e}/${t}`,
|
|
@@ -6863,31 +6888,31 @@ const Qi = ({
|
|
|
6863
6888
|
},
|
|
6864
6889
|
slug: n,
|
|
6865
6890
|
author: {
|
|
6866
|
-
id:
|
|
6867
|
-
name: (
|
|
6868
|
-
organization: (N =
|
|
6869
|
-
jobTitle: (
|
|
6891
|
+
id: D.id,
|
|
6892
|
+
name: (Z = D.data) == null ? void 0 : Z.name,
|
|
6893
|
+
organization: (N = D.data) == null ? void 0 : N.organization,
|
|
6894
|
+
jobTitle: (U = D.data) == null ? void 0 : U.jobTitle,
|
|
6870
6895
|
image: {
|
|
6871
|
-
thumbnail: ((
|
|
6896
|
+
thumbnail: ((Y = D.data) == null ? void 0 : Y.thumbnail) || void 0
|
|
6872
6897
|
}
|
|
6873
6898
|
},
|
|
6874
6899
|
userLiked: j,
|
|
6875
|
-
likes: ((
|
|
6900
|
+
likes: ((ne = d == null ? void 0 : d.reaction_counts) == null ? void 0 : ne.like) || 0,
|
|
6876
6901
|
comments: ((Q = d == null ? void 0 : d.reaction_counts) == null ? void 0 : Q.reply) || 0,
|
|
6877
|
-
peopleWhoLiked:
|
|
6902
|
+
peopleWhoLiked: M
|
|
6878
6903
|
},
|
|
6879
|
-
originalAuthorId:
|
|
6904
|
+
originalAuthorId: D == null ? void 0 : D.id,
|
|
6880
6905
|
forceHide: { comments: !0 },
|
|
6881
6906
|
functions: {
|
|
6882
6907
|
content: {
|
|
6883
6908
|
createContent: () => null,
|
|
6884
6909
|
deleteContent: s,
|
|
6885
6910
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6886
|
-
updateContent: (
|
|
6911
|
+
updateContent: (J, { body: re }) => g({ content: re })
|
|
6887
6912
|
},
|
|
6888
6913
|
likes: {
|
|
6889
|
-
createLike: () =>
|
|
6890
|
-
deleteLike: () => k({ activityId: n })
|
|
6914
|
+
createLike: () => y({ activityId: n }),
|
|
6915
|
+
deleteLike: () => k({ activityId: n, reactionId: S })
|
|
6891
6916
|
},
|
|
6892
6917
|
comments: {
|
|
6893
6918
|
openComments: () => {
|
|
@@ -6961,10 +6986,10 @@ const Qi = ({
|
|
|
6961
6986
|
contributors: ["community"]
|
|
6962
6987
|
}
|
|
6963
6988
|
];
|
|
6964
|
-
const
|
|
6989
|
+
const nt = "notFoundError_", Xi = () => {
|
|
6965
6990
|
const e = A(), t = [];
|
|
6966
6991
|
return Dn.forEach((n, r) => {
|
|
6967
|
-
n.title = e.formatMessage({ id: `${
|
|
6992
|
+
n.title = e.formatMessage({ id: `${nt}post_${r + 1}` }), t.push("solutionArticle");
|
|
6968
6993
|
}), /* @__PURE__ */ a.jsxs(
|
|
6969
6994
|
ys,
|
|
6970
6995
|
{
|
|
@@ -6981,27 +7006,27 @@ const tt = "notFoundError_", Xi = () => {
|
|
|
6981
7006
|
})
|
|
6982
7007
|
}
|
|
6983
7008
|
),
|
|
6984
|
-
/* @__PURE__ */ a.jsx(
|
|
7009
|
+
/* @__PURE__ */ a.jsx(H, { href: "/solution-articles/", children: e.formatMessage({ id: `${nt}cta` }) })
|
|
6985
7010
|
] })
|
|
6986
7011
|
},
|
|
6987
7012
|
reportError: () => {
|
|
6988
7013
|
},
|
|
6989
7014
|
className: "not-found-error",
|
|
6990
7015
|
children: [
|
|
6991
|
-
/* @__PURE__ */ a.jsx("h1", { children: e.formatMessage({ id: `${
|
|
6992
|
-
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${
|
|
7016
|
+
/* @__PURE__ */ a.jsx("h1", { children: e.formatMessage({ id: `${nt}title` }) }),
|
|
7017
|
+
/* @__PURE__ */ a.jsx("p", { children: e.formatMessage({ id: `${nt}text` }) })
|
|
6993
7018
|
]
|
|
6994
7019
|
}
|
|
6995
7020
|
);
|
|
6996
7021
|
};
|
|
6997
7022
|
export {
|
|
6998
|
-
|
|
7023
|
+
He as ASSETS_BUCKET,
|
|
6999
7024
|
Gi as ActivitiesFeed,
|
|
7000
7025
|
Qi as ActivitySection,
|
|
7001
7026
|
da as AddPost,
|
|
7002
7027
|
Ci as BannerSection,
|
|
7003
|
-
|
|
7004
|
-
|
|
7028
|
+
Ri as Breadcrumbs,
|
|
7029
|
+
H as Button,
|
|
7005
7030
|
ht as ButtonWrapper,
|
|
7006
7031
|
Er as CacheProvider,
|
|
7007
7032
|
ea as Card,
|
|
@@ -7018,12 +7043,12 @@ export {
|
|
|
7018
7043
|
Ts as DiscussionLikes,
|
|
7019
7044
|
kt as DiscussionPost,
|
|
7020
7045
|
Es as DiscussionThread,
|
|
7021
|
-
|
|
7046
|
+
$e as Divider,
|
|
7022
7047
|
$i as DownloadSection,
|
|
7023
7048
|
Be as EMAILS,
|
|
7024
7049
|
qi as EmailHelperTextBox,
|
|
7025
7050
|
bt as EmptyStateBox,
|
|
7026
|
-
|
|
7051
|
+
Li as Filters,
|
|
7027
7052
|
Mr as FlagsProvider,
|
|
7028
7053
|
aa as Footer,
|
|
7029
7054
|
_t as FullWidthSection,
|
|
@@ -7032,7 +7057,7 @@ export {
|
|
|
7032
7057
|
Ar as HelperTextBox,
|
|
7033
7058
|
Bn as HiddenFromScreenReaders,
|
|
7034
7059
|
Pi as HideShowTextBox,
|
|
7035
|
-
|
|
7060
|
+
Te as HighlightedTextBox,
|
|
7036
7061
|
Nr as IntlProvider,
|
|
7037
7062
|
hs as InviteForm,
|
|
7038
7063
|
zi as InviteModal,
|
|
@@ -7041,7 +7066,7 @@ export {
|
|
|
7041
7066
|
gt as Link,
|
|
7042
7067
|
yt as LoadMore,
|
|
7043
7068
|
Ai as LoadingBlock,
|
|
7044
|
-
|
|
7069
|
+
be as LoadingPlaceholder,
|
|
7045
7070
|
Kn as LoadingState,
|
|
7046
7071
|
na as Logo,
|
|
7047
7072
|
Ei as LogoSection,
|
|
@@ -7059,7 +7084,7 @@ export {
|
|
|
7059
7084
|
ys as PageLayout,
|
|
7060
7085
|
Hi as PasswordRules,
|
|
7061
7086
|
st as Pill,
|
|
7062
|
-
|
|
7087
|
+
ze as ProfilePicture,
|
|
7063
7088
|
Ur as ProgressBar,
|
|
7064
7089
|
Ui as Rating,
|
|
7065
7090
|
si as RepliesFeed,
|
|
@@ -7073,9 +7098,9 @@ export {
|
|
|
7073
7098
|
Wi as Tags,
|
|
7074
7099
|
wr as Tooltip,
|
|
7075
7100
|
Zi as TopLevelPage,
|
|
7076
|
-
|
|
7101
|
+
je as UserContext,
|
|
7077
7102
|
Pr as UserProvider,
|
|
7078
|
-
|
|
7103
|
+
ie as VisuallyHidden,
|
|
7079
7104
|
_s as addAriaProps,
|
|
7080
7105
|
Jn as getMember,
|
|
7081
7106
|
ct as headerData,
|
|
@@ -7084,7 +7109,7 @@ export {
|
|
|
7084
7109
|
Ki as repliesFeedMock,
|
|
7085
7110
|
or as useCurrentPath,
|
|
7086
7111
|
Pe as useEffectAfterMount,
|
|
7087
|
-
|
|
7112
|
+
Ue as useElementWidth,
|
|
7088
7113
|
lr as useScrollListener,
|
|
7089
7114
|
dr as useScrollToHash,
|
|
7090
7115
|
Jt as useUser
|