@apolitical/component-library 1.14.15 → 1.15.0-beta.3
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 +9 -9
- package/index.mjs +634 -634
- package/package.json +8 -7
- package/style.css +1 -1
- package/styles/base/_fonts.scss +1 -1
- package/styles/base/_overlays.scss +1 -2
- package/styles/base/buttons/_button-wrapper.scss +1 -2
- package/styles/base/buttons/_buttons.scss +1 -2
- package/styles/index.scss +1 -1
- package/fonts/Moderat-Black-Italic.woff2 +0 -0
- package/fonts/Moderat-Black.woff2 +0 -0
- package/fonts/Moderat-Bold-Italic.woff2 +0 -0
- package/fonts/Moderat-Bold.woff2 +0 -0
- package/fonts/Moderat-Medium-Italic.woff2 +0 -0
- package/fonts/Moderat-Medium.woff2 +0 -0
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import C, { memo as We, useState as P, useEffect as G, useRef as de, useMemo as xt, Children as zt, createContext as Kt, useContext as je, Fragment as Vt, useCallback as Me, useReducer as gs, Suspense as _s } from "react";
|
|
2
2
|
import xs from "lodash.clonedeep";
|
|
3
3
|
import bs from "lodash.set";
|
|
4
4
|
import { useIntl as D, IntlProvider as ws, createIntl as vs, FormattedMessage as Pe } from "react-intl";
|
|
@@ -53,7 +53,7 @@ var Nn = { exports: {} };
|
|
|
53
53
|
})();
|
|
54
54
|
})(Nn);
|
|
55
55
|
var Cs = Nn.exports;
|
|
56
|
-
const S = /* @__PURE__ */ Ds(Cs), As = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) =>
|
|
56
|
+
const S = /* @__PURE__ */ Ds(Cs), As = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => C.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }), _e = We(As), Ps = ({ element: e = "span", children: t = null, ...n }) => C.createElement(e, { ...n, "aria-hidden": !0 }, t), Dn = We(Ps);
|
|
57
57
|
var Yt = { exports: {} }, Ye = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
@@ -69,7 +69,7 @@ function Rs() {
|
|
|
69
69
|
if (pn)
|
|
70
70
|
return Ye;
|
|
71
71
|
pn = 1;
|
|
72
|
-
var e =
|
|
72
|
+
var e = C, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function u(a, d, o) {
|
|
74
74
|
var m, c = {}, h = null, p = null;
|
|
75
75
|
o !== void 0 && (h = "" + o), d.key !== void 0 && (h = "" + d.key), d.ref !== void 0 && (p = d.ref);
|
|
@@ -95,15 +95,15 @@ var Ge = {};
|
|
|
95
95
|
var gn;
|
|
96
96
|
function Fs() {
|
|
97
97
|
return gn || (gn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e =
|
|
98
|
+
var e = C, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), u = Symbol.for("react.provider"), a = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), o = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), g = Symbol.iterator, b = "@@iterator";
|
|
99
99
|
function v(f) {
|
|
100
100
|
if (f === null || typeof f != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var y = g && f[g] || f[
|
|
102
|
+
var y = g && f[g] || f[b];
|
|
103
103
|
return typeof y == "function" ? y : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function j(f) {
|
|
107
107
|
{
|
|
108
108
|
for (var y = arguments.length, $ = new Array(y > 1 ? y - 1 : 0), M = 1; M < y; M++)
|
|
109
109
|
$[M - 1] = arguments[M];
|
|
@@ -114,35 +114,35 @@ function Fs() {
|
|
|
114
114
|
{
|
|
115
115
|
var M = E.ReactDebugCurrentFrame, Q = M.getStackAddendum();
|
|
116
116
|
Q !== "" && (y += "%s", $ = $.concat([Q]));
|
|
117
|
-
var
|
|
117
|
+
var z = $.map(function(O) {
|
|
118
118
|
return String(O);
|
|
119
119
|
});
|
|
120
|
-
|
|
120
|
+
z.unshift("Warning: " + y), Function.prototype.apply.call(console[f], console, z);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var T = !1,
|
|
124
|
-
|
|
125
|
-
function
|
|
126
|
-
return !!(typeof f == "string" || typeof f == "function" || f === r || f === l ||
|
|
123
|
+
var T = !1, N = !1, R = !1, J = !1, I = !1, H;
|
|
124
|
+
H = Symbol.for("react.module.reference");
|
|
125
|
+
function F(f) {
|
|
126
|
+
return !!(typeof f == "string" || typeof f == "function" || f === r || f === l || I || f === i || f === o || f === m || J || f === p || T || N || R || typeof f == "object" && f !== null && (f.$$typeof === h || f.$$typeof === c || f.$$typeof === u || f.$$typeof === a || f.$$typeof === d || // 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
|
-
f.$$typeof ===
|
|
130
|
+
f.$$typeof === H || f.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function x(f, y, $) {
|
|
133
133
|
var M = f.displayName;
|
|
134
134
|
if (M)
|
|
135
135
|
return M;
|
|
136
136
|
var Q = y.displayName || y.name || "";
|
|
137
137
|
return Q !== "" ? $ + "(" + Q + ")" : $;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Y(f) {
|
|
140
140
|
return f.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function k(f) {
|
|
143
143
|
if (f == null)
|
|
144
144
|
return null;
|
|
145
|
-
if (typeof f.tag == "number" &&
|
|
145
|
+
if (typeof f.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof f == "function")
|
|
146
146
|
return f.displayName || f.name || null;
|
|
147
147
|
if (typeof f == "string")
|
|
148
148
|
return f;
|
|
@@ -164,19 +164,19 @@ function Fs() {
|
|
|
164
164
|
switch (f.$$typeof) {
|
|
165
165
|
case a:
|
|
166
166
|
var y = f;
|
|
167
|
-
return
|
|
167
|
+
return Y(y) + ".Consumer";
|
|
168
168
|
case u:
|
|
169
169
|
var $ = f;
|
|
170
|
-
return
|
|
170
|
+
return Y($._context) + ".Provider";
|
|
171
171
|
case d:
|
|
172
|
-
return
|
|
172
|
+
return x(f, f.render, "ForwardRef");
|
|
173
173
|
case c:
|
|
174
174
|
var M = f.displayName || null;
|
|
175
|
-
return M !== null ? M :
|
|
175
|
+
return M !== null ? M : k(f.type) || "Memo";
|
|
176
176
|
case h: {
|
|
177
|
-
var Q = f,
|
|
177
|
+
var Q = f, z = Q._payload, O = Q._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return k(O(z));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,18 +184,18 @@ function Fs() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var w = Object.assign,
|
|
188
|
-
function
|
|
187
|
+
var w = Object.assign, V = 0, Z, se, re, ae, q, fe, ue;
|
|
188
|
+
function L() {
|
|
189
189
|
}
|
|
190
|
-
|
|
190
|
+
L.__reactDisabledLog = !0;
|
|
191
191
|
function oe() {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
194
|
-
|
|
193
|
+
if (V === 0) {
|
|
194
|
+
Z = console.log, se = console.info, re = console.warn, ae = console.error, q = console.group, fe = console.groupCollapsed, ue = console.groupEnd;
|
|
195
195
|
var f = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: L,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
@@ -208,12 +208,12 @@ function Fs() {
|
|
|
208
208
|
groupEnd: f
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
V++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
214
|
function he() {
|
|
215
215
|
{
|
|
216
|
-
if (
|
|
216
|
+
if (V--, V === 0) {
|
|
217
217
|
var f = {
|
|
218
218
|
configurable: !0,
|
|
219
219
|
enumerable: !0,
|
|
@@ -221,7 +221,7 @@ function Fs() {
|
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
223
|
log: w({}, f, {
|
|
224
|
-
value:
|
|
224
|
+
value: Z
|
|
225
225
|
}),
|
|
226
226
|
info: w({}, f, {
|
|
227
227
|
value: se
|
|
@@ -243,7 +243,7 @@ function Fs() {
|
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
V < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
var ce = E.ReactCurrentDispatcher, xe;
|
|
@@ -265,7 +265,7 @@ function Fs() {
|
|
|
265
265
|
var B = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
ge = new B();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
268
|
+
function X(f, y) {
|
|
269
269
|
if (!f || be)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
@@ -277,8 +277,8 @@ function Fs() {
|
|
|
277
277
|
be = !0;
|
|
278
278
|
var Q = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
|
-
var
|
|
281
|
-
|
|
280
|
+
var z;
|
|
281
|
+
z = ce.current, ce.current = null, oe();
|
|
282
282
|
try {
|
|
283
283
|
if (y) {
|
|
284
284
|
var O = function() {
|
|
@@ -313,31 +313,31 @@ function Fs() {
|
|
|
313
313
|
}
|
|
314
314
|
} catch (Ne) {
|
|
315
315
|
if (Ne && M && typeof Ne.stack == "string") {
|
|
316
|
-
for (var
|
|
316
|
+
for (var A = Ne.stack.split(`
|
|
317
317
|
`), we = M.stack.split(`
|
|
318
|
-
`),
|
|
318
|
+
`), K = A.length - 1, ne = we.length - 1; K >= 1 && ne >= 0 && A[K] !== we[ne]; )
|
|
319
319
|
ne--;
|
|
320
|
-
for (;
|
|
321
|
-
if (
|
|
322
|
-
if (
|
|
320
|
+
for (; K >= 1 && ne >= 0; K--, ne--)
|
|
321
|
+
if (A[K] !== we[ne]) {
|
|
322
|
+
if (K !== 1 || ne !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (
|
|
324
|
+
if (K--, ne--, ne < 0 || A[K] !== we[ne]) {
|
|
325
325
|
var ye = `
|
|
326
|
-
` +
|
|
326
|
+
` + A[K].replace(" at new ", " at ");
|
|
327
327
|
return f.displayName && ye.includes("<anonymous>") && (ye = ye.replace("<anonymous>", f.displayName)), typeof f == "function" && ge.set(f, ye), ye;
|
|
328
328
|
}
|
|
329
|
-
while (
|
|
329
|
+
while (K >= 1 && ne >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
be = !1, ce.current =
|
|
334
|
+
be = !1, ce.current = z, he(), Error.prepareStackTrace = Q;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
336
|
+
var Ie = f ? f.displayName || f.name : "", hn = Ie ? pe(Ie) : "";
|
|
337
337
|
return typeof f == "function" && ge.set(f, hn), hn;
|
|
338
338
|
}
|
|
339
339
|
function le(f, y, $) {
|
|
340
|
-
return
|
|
340
|
+
return X(f, !1);
|
|
341
341
|
}
|
|
342
342
|
function ee(f) {
|
|
343
343
|
var y = f.prototype;
|
|
@@ -347,7 +347,7 @@ function Fs() {
|
|
|
347
347
|
if (f == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof f == "function")
|
|
350
|
-
return
|
|
350
|
+
return X(f, ee(f));
|
|
351
351
|
if (typeof f == "string")
|
|
352
352
|
return pe(f);
|
|
353
353
|
switch (f) {
|
|
@@ -363,9 +363,9 @@ function Fs() {
|
|
|
363
363
|
case c:
|
|
364
364
|
return me(f.type, y, $);
|
|
365
365
|
case h: {
|
|
366
|
-
var M = f, Q = M._payload,
|
|
366
|
+
var M = f, Q = M._payload, z = M._init;
|
|
367
367
|
try {
|
|
368
|
-
return me(
|
|
368
|
+
return me(z(Q), y, $);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -382,20 +382,20 @@ function Fs() {
|
|
|
382
382
|
}
|
|
383
383
|
function et(f, y, $, M, Q) {
|
|
384
384
|
{
|
|
385
|
-
var
|
|
385
|
+
var z = Function.call.bind(ke);
|
|
386
386
|
for (var O in f)
|
|
387
|
-
if (
|
|
388
|
-
var
|
|
387
|
+
if (z(f, O)) {
|
|
388
|
+
var A = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof f[O] != "function") {
|
|
391
391
|
var we = Error((M || "React class") + ": " + $ + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof f[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw we.name = "Invariant Violation", we;
|
|
393
393
|
}
|
|
394
|
-
|
|
395
|
-
} catch (
|
|
396
|
-
|
|
394
|
+
A = f[O](y, O, M, $, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
|
+
} catch (K) {
|
|
396
|
+
A = K;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
A && !(A instanceof Error) && (Fe(Q), j("%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).", M || "React class", $, O, typeof A), Fe(null)), A instanceof Error && !(A.message in Ae) && (Ae[A.message] = !0, Fe(Q), j("Failed %s type: %s", $, A.message), Fe(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
@@ -421,7 +421,7 @@ function Fs() {
|
|
|
421
421
|
}
|
|
422
422
|
function rn(f) {
|
|
423
423
|
if (tt(f))
|
|
424
|
-
return
|
|
424
|
+
return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Le(f)), nt(f);
|
|
425
425
|
}
|
|
426
426
|
var Ve = E.ReactCurrentOwner, es = {
|
|
427
427
|
key: !0,
|
|
@@ -448,14 +448,14 @@ function Fs() {
|
|
|
448
448
|
}
|
|
449
449
|
function ss(f, y) {
|
|
450
450
|
if (typeof f.ref == "string" && Ve.current && y && Ve.current.stateNode !== y) {
|
|
451
|
-
var $ =
|
|
452
|
-
$t[$] || (
|
|
451
|
+
var $ = k(Ve.current.type);
|
|
452
|
+
$t[$] || (j('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', k(Ve.current.type), f.ref), $t[$] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function rs(f, y) {
|
|
456
456
|
{
|
|
457
457
|
var $ = function() {
|
|
458
|
-
an || (an = !0,
|
|
458
|
+
an || (an = !0, j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
|
|
459
459
|
};
|
|
460
460
|
$.isReactWarning = !0, Object.defineProperty(f, "key", {
|
|
461
461
|
get: $,
|
|
@@ -466,7 +466,7 @@ function Fs() {
|
|
|
466
466
|
function as(f, y) {
|
|
467
467
|
{
|
|
468
468
|
var $ = function() {
|
|
469
|
-
on || (on = !0,
|
|
469
|
+
on || (on = !0, j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
|
|
470
470
|
};
|
|
471
471
|
$.isReactWarning = !0, Object.defineProperty(f, "ref", {
|
|
472
472
|
get: $,
|
|
@@ -474,8 +474,8 @@ function Fs() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var os = function(f, y, $, M, Q,
|
|
478
|
-
var
|
|
477
|
+
var os = function(f, y, $, M, Q, z, O) {
|
|
478
|
+
var A = {
|
|
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
|
|
@@ -484,45 +484,45 @@ function Fs() {
|
|
|
484
484
|
ref: $,
|
|
485
485
|
props: O,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
|
-
_owner:
|
|
487
|
+
_owner: z
|
|
488
488
|
};
|
|
489
|
-
return
|
|
489
|
+
return A._store = {}, Object.defineProperty(A._store, "validated", {
|
|
490
490
|
configurable: !1,
|
|
491
491
|
enumerable: !1,
|
|
492
492
|
writable: !0,
|
|
493
493
|
value: !1
|
|
494
|
-
}), Object.defineProperty(
|
|
494
|
+
}), Object.defineProperty(A, "_self", {
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
498
|
value: M
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(A, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
503
|
value: Q
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
504
|
+
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
|
|
505
505
|
};
|
|
506
506
|
function is(f, y, $, M, Q) {
|
|
507
507
|
{
|
|
508
|
-
var
|
|
509
|
-
$ !== void 0 && (rn($),
|
|
510
|
-
for (
|
|
511
|
-
ke.call(y,
|
|
508
|
+
var z, O = {}, A = null, we = null;
|
|
509
|
+
$ !== void 0 && (rn($), A = "" + $), ns(y) && (rn(y.key), A = "" + y.key), ts(y) && (we = y.ref, ss(y, Q));
|
|
510
|
+
for (z in y)
|
|
511
|
+
ke.call(y, z) && !es.hasOwnProperty(z) && (O[z] = y[z]);
|
|
512
512
|
if (f && f.defaultProps) {
|
|
513
|
-
var
|
|
514
|
-
for (
|
|
515
|
-
O[
|
|
513
|
+
var K = f.defaultProps;
|
|
514
|
+
for (z in K)
|
|
515
|
+
O[z] === void 0 && (O[z] = K[z]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
517
|
+
if (A || we) {
|
|
518
518
|
var ne = typeof f == "function" ? f.displayName || f.name || "Unknown" : f;
|
|
519
|
-
|
|
519
|
+
A && rs(O, ne), we && as(O, ne);
|
|
520
520
|
}
|
|
521
|
-
return os(f,
|
|
521
|
+
return os(f, A, we, Q, M, Ve.current, O);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
524
|
var Tt = E.ReactCurrentOwner, cn = E.ReactDebugCurrentFrame;
|
|
525
|
-
function
|
|
525
|
+
function Oe(f) {
|
|
526
526
|
if (f) {
|
|
527
527
|
var y = f._owner, $ = me(f.type, f._source, y ? y.type : null);
|
|
528
528
|
cn.setExtraStackFrame($);
|
|
@@ -537,7 +537,7 @@ function Fs() {
|
|
|
537
537
|
function ln() {
|
|
538
538
|
{
|
|
539
539
|
if (Tt.current) {
|
|
540
|
-
var f =
|
|
540
|
+
var f = k(Tt.current.type);
|
|
541
541
|
if (f)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
580
580
|
return;
|
|
581
581
|
dn[$] = !0;
|
|
582
582
|
var M = "";
|
|
583
|
-
f && f._owner && f._owner !== Tt.current && (M = " It was passed a child from " +
|
|
583
|
+
f && f._owner && f._owner !== Tt.current && (M = " It was passed a child from " + k(f._owner.type) + "."), Oe(f), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', $, M), Oe(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
function mn(f, y) {
|
|
@@ -597,7 +597,7 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
597
597
|
else if (f) {
|
|
598
598
|
var Q = v(f);
|
|
599
599
|
if (typeof Q == "function" && Q !== f.entries)
|
|
600
|
-
for (var
|
|
600
|
+
for (var z = Q.call(f), O; !(O = z.next()).done; )
|
|
601
601
|
Nt(O.value) && un(O.value, y);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
@@ -617,14 +617,14 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if ($) {
|
|
620
|
-
var M =
|
|
620
|
+
var M = k(y);
|
|
621
621
|
et($, f.props, "prop", M, f);
|
|
622
622
|
} else if (y.PropTypes !== void 0 && !Mt) {
|
|
623
623
|
Mt = !0;
|
|
624
|
-
var Q =
|
|
625
|
-
|
|
624
|
+
var Q = k(y);
|
|
625
|
+
j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", Q || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved &&
|
|
627
|
+
typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function us(f) {
|
|
@@ -632,25 +632,25 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
632
632
|
for (var y = Object.keys(f.props), $ = 0; $ < y.length; $++) {
|
|
633
633
|
var M = y[$];
|
|
634
634
|
if (M !== "children" && M !== "key") {
|
|
635
|
-
|
|
635
|
+
Oe(f), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", M), Oe(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
f.ref !== null && (
|
|
639
|
+
f.ref !== null && (Oe(f), j("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function fn(f, y, $, M, Q,
|
|
642
|
+
function fn(f, y, $, M, Q, z) {
|
|
643
643
|
{
|
|
644
|
-
var O =
|
|
644
|
+
var O = F(f);
|
|
645
645
|
if (!O) {
|
|
646
|
-
var
|
|
647
|
-
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (
|
|
646
|
+
var A = "";
|
|
647
|
+
(f === void 0 || typeof f == "object" && f !== null && Object.keys(f).length === 0) && (A += " 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
648
|
var we = cs(Q);
|
|
649
|
-
we ?
|
|
650
|
-
var
|
|
651
|
-
f === null ?
|
|
649
|
+
we ? A += we : A += ln();
|
|
650
|
+
var K;
|
|
651
|
+
f === null ? K = "null" : Ee(f) ? K = "array" : f !== void 0 && f.$$typeof === t ? (K = "<" + (k(f.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : K = typeof f, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", K, A);
|
|
652
652
|
}
|
|
653
|
-
var ne = is(f, y, $, Q,
|
|
653
|
+
var ne = is(f, y, $, Q, z);
|
|
654
654
|
if (ne == null)
|
|
655
655
|
return ne;
|
|
656
656
|
if (O) {
|
|
@@ -658,11 +658,11 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
658
658
|
if (ye !== void 0)
|
|
659
659
|
if (M)
|
|
660
660
|
if (Ee(ye)) {
|
|
661
|
-
for (var
|
|
662
|
-
mn(ye[
|
|
661
|
+
for (var Ie = 0; Ie < ye.length; Ie++)
|
|
662
|
+
mn(ye[Ie], f);
|
|
663
663
|
Object.freeze && Object.freeze(ye);
|
|
664
664
|
} else
|
|
665
|
-
|
|
665
|
+
j("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
667
|
mn(ye, f);
|
|
668
668
|
}
|
|
@@ -682,86 +682,86 @@ Check the top-level render call using <` + $ + ">.");
|
|
|
682
682
|
process.env.NODE_ENV === "production" ? Yt.exports = Rs() : Yt.exports = Fs();
|
|
683
683
|
var s = Yt.exports;
|
|
684
684
|
const Ls = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = P(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return G(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, He = (e, t) => {
|
|
693
693
|
const n = de(!1);
|
|
694
|
-
|
|
694
|
+
G(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
|
-
function
|
|
698
|
+
function Os(e, t, n) {
|
|
699
699
|
var r = this, i = de(null), l = de(0), u = de(null), a = de([]), d = de(), o = de(), m = de(e), c = de(!0);
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
}, [e]);
|
|
703
|
-
var h = !t && t !== 0 && typeof window < "u";
|
|
700
|
+
m.current = e;
|
|
701
|
+
var h = typeof window < "u", p = !t && t !== 0 && h;
|
|
704
702
|
if (typeof e != "function")
|
|
705
703
|
throw new TypeError("Expected a function");
|
|
706
704
|
t = +t || 0;
|
|
707
|
-
var
|
|
708
|
-
|
|
705
|
+
var g = !!(n = n || {}).leading, b = !("trailing" in n) || !!n.trailing, v = "maxWait" in n, E = "debounceOnServer" in n && !!n.debounceOnServer, j = v ? Math.max(+n.maxWait || 0, t) : null;
|
|
706
|
+
G(function() {
|
|
709
707
|
return c.current = !0, function() {
|
|
710
708
|
c.current = !1;
|
|
711
709
|
};
|
|
712
710
|
}, []);
|
|
713
|
-
var
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
return a.current = d.current = null, l.current =
|
|
717
|
-
},
|
|
718
|
-
|
|
719
|
-
},
|
|
711
|
+
var _ = xt(function() {
|
|
712
|
+
var T = function(F) {
|
|
713
|
+
var x = a.current, Y = d.current;
|
|
714
|
+
return a.current = d.current = null, l.current = F, o.current = m.current.apply(Y, x);
|
|
715
|
+
}, N = function(F, x) {
|
|
716
|
+
p && cancelAnimationFrame(u.current), u.current = p ? requestAnimationFrame(F) : setTimeout(F, x);
|
|
717
|
+
}, R = function(F) {
|
|
720
718
|
if (!c.current)
|
|
721
719
|
return !1;
|
|
722
|
-
var
|
|
723
|
-
return !i.current ||
|
|
724
|
-
},
|
|
725
|
-
return u.current = null,
|
|
726
|
-
},
|
|
727
|
-
var
|
|
728
|
-
if (
|
|
729
|
-
return
|
|
720
|
+
var x = F - i.current;
|
|
721
|
+
return !i.current || x >= t || x < 0 || v && F - l.current >= j;
|
|
722
|
+
}, J = function(F) {
|
|
723
|
+
return u.current = null, b && a.current ? T(F) : (a.current = d.current = null, o.current);
|
|
724
|
+
}, I = function F() {
|
|
725
|
+
var x = Date.now();
|
|
726
|
+
if (R(x))
|
|
727
|
+
return J(x);
|
|
730
728
|
if (c.current) {
|
|
731
|
-
var
|
|
732
|
-
|
|
729
|
+
var Y = t - (x - i.current), k = v ? Math.min(Y, j - (x - l.current)) : Y;
|
|
730
|
+
N(F, k);
|
|
733
731
|
}
|
|
734
|
-
},
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
if (
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
732
|
+
}, H = function() {
|
|
733
|
+
if (h || E) {
|
|
734
|
+
var F = Date.now(), x = R(F);
|
|
735
|
+
if (a.current = [].slice.call(arguments), d.current = r, i.current = F, x) {
|
|
736
|
+
if (!u.current && c.current)
|
|
737
|
+
return l.current = i.current, N(I, t), g ? T(i.current) : o.current;
|
|
738
|
+
if (v)
|
|
739
|
+
return N(I, t), T(i.current);
|
|
740
|
+
}
|
|
741
|
+
return u.current || N(I, t), o.current;
|
|
741
742
|
}
|
|
742
|
-
return u.current || _(R, t), o.current;
|
|
743
743
|
};
|
|
744
|
-
return
|
|
745
|
-
u.current && (
|
|
746
|
-
},
|
|
744
|
+
return H.cancel = function() {
|
|
745
|
+
u.current && (p ? cancelAnimationFrame(u.current) : clearTimeout(u.current)), l.current = 0, a.current = i.current = d.current = u.current = null;
|
|
746
|
+
}, H.isPending = function() {
|
|
747
747
|
return !!u.current;
|
|
748
|
-
},
|
|
749
|
-
return u.current ?
|
|
750
|
-
},
|
|
751
|
-
}, [
|
|
752
|
-
return
|
|
748
|
+
}, H.flush = function() {
|
|
749
|
+
return u.current ? J(Date.now()) : o.current;
|
|
750
|
+
}, H;
|
|
751
|
+
}, [g, v, t, j, b, p, h, E]);
|
|
752
|
+
return _;
|
|
753
753
|
}
|
|
754
754
|
function Cn(e, t, n) {
|
|
755
755
|
var r = n === void 0 ? {} : n, i = r.leading, l = r.trailing;
|
|
756
|
-
return
|
|
756
|
+
return Os(e, t, { maxWait: t, leading: i === void 0 || i, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
758
|
let Dt;
|
|
759
759
|
const vt = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [r, i] =
|
|
762
|
+
const [r, i] = C.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
764
|
+
G(() => (a(), window.addEventListener("resize", d), () => {
|
|
765
765
|
clearTimeout(Dt), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), n === "window" ? [] : [n]);
|
|
767
767
|
const u = () => {
|
|
@@ -779,7 +779,7 @@ const vt = (e = !0, t = !1, n = "window") => {
|
|
|
779
779
|
{ leading: !0 }
|
|
780
780
|
);
|
|
781
781
|
return r;
|
|
782
|
-
},
|
|
782
|
+
}, Is = ({
|
|
783
783
|
scrollPosition: e = 0,
|
|
784
784
|
// The position on the page to scroll past
|
|
785
785
|
offset: t = { down: 0, up: 10 },
|
|
@@ -790,10 +790,10 @@ const vt = (e = !0, t = !1, n = "window") => {
|
|
|
790
790
|
}) => {
|
|
791
791
|
if (!window)
|
|
792
792
|
return;
|
|
793
|
-
const [i, l] =
|
|
794
|
-
}], [u, a] =
|
|
793
|
+
const [i, l] = C.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
794
|
+
}], [u, a] = C.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
795
795
|
}];
|
|
796
|
-
|
|
796
|
+
G(() => (d(), window.addEventListener("scroll", o), () => {
|
|
797
797
|
o.flush(), window.removeEventListener("scroll", o);
|
|
798
798
|
}), []);
|
|
799
799
|
const d = () => {
|
|
@@ -807,7 +807,7 @@ const vt = (e = !0, t = !1, n = "window") => {
|
|
|
807
807
|
d();
|
|
808
808
|
}, 250);
|
|
809
809
|
return i;
|
|
810
|
-
},
|
|
810
|
+
}, Ia = (e = [], t = !0) => {
|
|
811
811
|
e = Array.isArray(e) ? e : [e];
|
|
812
812
|
const n = de(!1);
|
|
813
813
|
He(() => {
|
|
@@ -1227,9 +1227,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1227
1227
|
return t.forEach(({ type: r, value: i }) => {
|
|
1228
1228
|
bs(n, r, i);
|
|
1229
1229
|
}), n;
|
|
1230
|
-
}, Xs = (e) => new Promise((t) => setTimeout(t, e)), ut = (e, t) =>
|
|
1230
|
+
}, Xs = (e) => new Promise((t) => setTimeout(t, e)), ut = (e, t) => C.Children.map(e, (n) => C.cloneElement(n, {
|
|
1231
1231
|
...t
|
|
1232
|
-
})),
|
|
1232
|
+
})), W = ({
|
|
1233
1233
|
variant: e = "primary",
|
|
1234
1234
|
size: t = "medium",
|
|
1235
1235
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1250,7 +1250,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
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 b = {
|
|
1254
1254
|
...c,
|
|
1255
1255
|
className: S(e, a, g, {
|
|
1256
1256
|
"no-text": !m,
|
|
@@ -1262,14 +1262,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1262
1262
|
},
|
|
1263
1263
|
disabled: typeof d == "object" && "isClickable" in d ? !d.isClickable : d
|
|
1264
1264
|
};
|
|
1265
|
-
return i && (l = "a",
|
|
1265
|
+
return i && (l = "a", b.href = i), C.createElement(
|
|
1266
1266
|
l,
|
|
1267
|
-
|
|
1267
|
+
b,
|
|
1268
1268
|
m || (o ? /* @__PURE__ */ s.jsx(_e, { showOnFocus: !1, children: o }) : null)
|
|
1269
1269
|
);
|
|
1270
1270
|
}, kt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1271
|
-
const r = e.length > 1 ? "ul" : "p", i = e.map((l, u) => r === "p" ? /* @__PURE__ */ s.jsx(
|
|
1272
|
-
return
|
|
1271
|
+
const r = e.length > 1 ? "ul" : "p", i = e.map((l, u) => r === "p" ? /* @__PURE__ */ s.jsx(W, { ...l }, u) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(W, { ...l }) }, u));
|
|
1272
|
+
return C.createElement(r, { className: S("button-wrapper", t), ...n, children: i });
|
|
1273
1273
|
};
|
|
1274
1274
|
const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1275
1275
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
@@ -1296,7 +1296,7 @@ const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
);
|
|
1298
1298
|
}
|
|
1299
|
-
return n ?
|
|
1299
|
+
return n ? C.createElement(n, { children: t, className: r, ...a }) : t;
|
|
1300
1300
|
}, xn = {
|
|
1301
1301
|
card: {
|
|
1302
1302
|
range: [
|
|
@@ -1427,7 +1427,7 @@ const Ln = ({ image: e, className: t, testId: n }) => {
|
|
|
1427
1427
|
loading: o,
|
|
1428
1428
|
decoding: m,
|
|
1429
1429
|
fetchPriority: c
|
|
1430
|
-
} = e, { range: h, sizes: p } = Zs(e), g = Ct({ format: "avif", query: u, range: h, url: a }),
|
|
1430
|
+
} = e, { range: h, sizes: p } = Zs(e), g = Ct({ format: "avif", query: u, range: h, url: a }), b = Ct({ format: "webp", query: u, range: h, url: a }), v = Ct({ format: "", query: u, range: h, url: a });
|
|
1431
1431
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1432
1432
|
l !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1433
1433
|
"source",
|
|
@@ -1442,7 +1442,7 @@ const Ln = ({ image: e, className: t, testId: n }) => {
|
|
|
1442
1442
|
"source",
|
|
1443
1443
|
{
|
|
1444
1444
|
type: "image/webp",
|
|
1445
|
-
srcSet:
|
|
1445
|
+
srcSet: b,
|
|
1446
1446
|
sizes: p,
|
|
1447
1447
|
"data-testid": "source"
|
|
1448
1448
|
}
|
|
@@ -1466,8 +1466,8 @@ const Ln = ({ image: e, className: t, testId: n }) => {
|
|
|
1466
1466
|
};
|
|
1467
1467
|
let Je = !1;
|
|
1468
1468
|
const qs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1469
|
-
const r = D(), i = de(null), [l, u] =
|
|
1470
|
-
|
|
1469
|
+
const r = D(), i = de(null), [l, u] = P("hidden");
|
|
1470
|
+
G(() => {
|
|
1471
1471
|
const d = i.current;
|
|
1472
1472
|
if (d)
|
|
1473
1473
|
return d.addEventListener("transitionend", a), () => {
|
|
@@ -1500,7 +1500,7 @@ const Ba = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1500
1500
|
children: i.text
|
|
1501
1501
|
});
|
|
1502
1502
|
}), /* @__PURE__ */ s.jsx(en, { className: S("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1503
|
-
|
|
1503
|
+
C.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1504
1504
|
/* @__PURE__ */ s.jsx(kt, { buttons: r })
|
|
1505
1505
|
] }) });
|
|
1506
1506
|
};
|
|
@@ -1513,7 +1513,7 @@ const Qa = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1513
1513
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1514
1514
|
};
|
|
1515
1515
|
return /* @__PURE__ */ s.jsxs("div", { className: S("logos", n), children: [
|
|
1516
|
-
e &&
|
|
1516
|
+
e && C.createElement(i.element, { className: "title" }, i.text),
|
|
1517
1517
|
/* @__PURE__ */ s.jsx(
|
|
1518
1518
|
"ul",
|
|
1519
1519
|
{
|
|
@@ -1616,7 +1616,7 @@ const er = [
|
|
|
1616
1616
|
d.map((c) => {
|
|
1617
1617
|
if (m[c] && typeof m[c] == "object") {
|
|
1618
1618
|
const { text: h, element: p = "" } = m[c];
|
|
1619
|
-
return
|
|
1619
|
+
return C.createElement(
|
|
1620
1620
|
p.toLowerCase(),
|
|
1621
1621
|
{ key: c, className: c },
|
|
1622
1622
|
h
|
|
@@ -1626,7 +1626,7 @@ const er = [
|
|
|
1626
1626
|
}),
|
|
1627
1627
|
a,
|
|
1628
1628
|
u && u.text && u.link && /* @__PURE__ */ s.jsx(
|
|
1629
|
-
|
|
1629
|
+
W,
|
|
1630
1630
|
{
|
|
1631
1631
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1632
1632
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1650,7 +1650,7 @@ const Ua = ({
|
|
|
1650
1650
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: S("marketing-block", e), children: [
|
|
1651
1651
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1652
1652
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1653
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1653
|
+
t && /* @__PURE__ */ s.jsx(W, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": i, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1654
1654
|
] }), mt = "https://storage.googleapis.com/apolitical-assets/", Ze = {
|
|
1655
1655
|
general: "hello@apolitical.co",
|
|
1656
1656
|
support: "concierge@apolitical.co",
|
|
@@ -1659,7 +1659,7 @@ const Ua = ({
|
|
|
1659
1659
|
eu: "dpo.agl@apolitical.foundation"
|
|
1660
1660
|
}
|
|
1661
1661
|
}, Wa = "200,000+";
|
|
1662
|
-
const
|
|
1662
|
+
const On = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1663
1663
|
const r = D();
|
|
1664
1664
|
return /* @__PURE__ */ s.jsxs("details", { className: S("collapsible-section", t), children: [
|
|
1665
1665
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
@@ -1693,7 +1693,7 @@ const yt = ({
|
|
|
1693
1693
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1694
1694
|
t && /* @__PURE__ */ s.jsx(bt, { options: { forceBlock: !0 }, children: t }),
|
|
1695
1695
|
i && typeof n == "object" && (o || /* @__PURE__ */ s.jsx(
|
|
1696
|
-
|
|
1696
|
+
W,
|
|
1697
1697
|
{
|
|
1698
1698
|
...m,
|
|
1699
1699
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1704,39 +1704,39 @@ const yt = ({
|
|
|
1704
1704
|
}
|
|
1705
1705
|
);
|
|
1706
1706
|
};
|
|
1707
|
-
const Jt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }),
|
|
1707
|
+
const Jt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), In = { q: Jt, blockquote: Jt };
|
|
1708
1708
|
for (let e = 1; e <= 6; e++)
|
|
1709
|
-
|
|
1709
|
+
In[`h${e}`] = { component: Jt, props: { className: "title" } };
|
|
1710
1710
|
const nr = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: S("helper-text-box text-small", e, t), children: [
|
|
1711
1711
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1712
1712
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1713
1713
|
bt,
|
|
1714
1714
|
{
|
|
1715
1715
|
options: {
|
|
1716
|
-
wrapper:
|
|
1716
|
+
wrapper: C.Fragment,
|
|
1717
1717
|
forceBlock: !0,
|
|
1718
|
-
overrides:
|
|
1718
|
+
overrides: In
|
|
1719
1719
|
},
|
|
1720
1720
|
children: r
|
|
1721
1721
|
}
|
|
1722
1722
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1723
1723
|
] });
|
|
1724
1724
|
const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: i }) => {
|
|
1725
|
-
const l = D(), u = de(null), [a, d] =
|
|
1726
|
-
|
|
1725
|
+
const l = D(), u = de(null), [a, d] = P(""), [o, m] = P("closed");
|
|
1726
|
+
G(() => {
|
|
1727
1727
|
const p = u.current;
|
|
1728
1728
|
if (p)
|
|
1729
1729
|
return p.addEventListener("transitionend", c), () => {
|
|
1730
1730
|
p.removeEventListener("transitionend", c);
|
|
1731
1731
|
};
|
|
1732
|
-
}, []),
|
|
1732
|
+
}, []), G(() => {
|
|
1733
1733
|
if (!r || typeof r != "string")
|
|
1734
1734
|
return;
|
|
1735
1735
|
const p = r.split(`
|
|
1736
1736
|
`);
|
|
1737
1737
|
d(p.length < 3 ? `${r.substring(0, 400)}...` : p.slice(0, 3).join(`
|
|
1738
1738
|
`));
|
|
1739
|
-
}, [r]),
|
|
1739
|
+
}, [r]), G(() => {
|
|
1740
1740
|
o === "ready-to-close" && m("closing");
|
|
1741
1741
|
}, [o]);
|
|
1742
1742
|
const c = ({ propertyName: p }) => {
|
|
@@ -1751,7 +1751,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1751
1751
|
o !== "closed" && i
|
|
1752
1752
|
] }),
|
|
1753
1753
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1754
|
-
|
|
1754
|
+
W,
|
|
1755
1755
|
{
|
|
1756
1756
|
variant: "tertiary",
|
|
1757
1757
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1764,7 +1764,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1764
1764
|
}
|
|
1765
1765
|
) })
|
|
1766
1766
|
] });
|
|
1767
|
-
}, sr = () =>
|
|
1767
|
+
}, sr = () => C.Fragment, rr = ({ children: e }) => /* @__PURE__ */ s.jsx(Re, { variant: "secondary", children: e }), ar = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], or = ({ children: e }) => {
|
|
1768
1768
|
const t = D();
|
|
1769
1769
|
if (!e)
|
|
1770
1770
|
return null;
|
|
@@ -1772,10 +1772,10 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1772
1772
|
const r = [];
|
|
1773
1773
|
for (const l of zt.toArray(e))
|
|
1774
1774
|
if (!(!l || typeof l == "string" || typeof l == "number"))
|
|
1775
|
-
if (
|
|
1775
|
+
if (C.isValidElement(l) && l.type === "summary") {
|
|
1776
1776
|
if (l.props && l.props.children) {
|
|
1777
1777
|
for (const u of zt.toArray(l.props.children))
|
|
1778
|
-
if (!(!u || typeof u == "string" || typeof u == "number") &&
|
|
1778
|
+
if (!(!u || typeof u == "string" || typeof u == "number") && C.isValidElement(u)) {
|
|
1779
1779
|
const a = u.type;
|
|
1780
1780
|
if (ar.includes(a)) {
|
|
1781
1781
|
for (n = u.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
@@ -1788,7 +1788,7 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1788
1788
|
r.push(l);
|
|
1789
1789
|
const i = n ? n.toString() : "";
|
|
1790
1790
|
return /* @__PURE__ */ s.jsx(
|
|
1791
|
-
|
|
1791
|
+
On,
|
|
1792
1792
|
{
|
|
1793
1793
|
label: i,
|
|
1794
1794
|
className: ["Sources", "Resources"].includes(i) ? "discrete-links" : "",
|
|
@@ -1826,27 +1826,27 @@ const za = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1826
1826
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1827
1827
|
let r = e, i = !1;
|
|
1828
1828
|
for (const l of zt.toArray(e))
|
|
1829
|
-
if (!(!l || typeof l == "string" || typeof l == "number") &&
|
|
1829
|
+
if (!(!l || typeof l == "string" || typeof l == "number") && C.isValidElement(l)) {
|
|
1830
1830
|
const u = l.type;
|
|
1831
1831
|
if (["button", "center", "span", "strong"].includes(u) && l.props && l.props.children && l.props.children[0])
|
|
1832
|
-
for ((u === "button" || bn(l.props.children[0]) === "button") && (i = !0), r = l.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !
|
|
1832
|
+
for ((u === "button" || bn(l.props.children[0]) === "button") && (i = !0), r = l.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !C.isValidElement(r)); )
|
|
1833
1833
|
if (r.props && r.props.children && r.props.children[0])
|
|
1834
1834
|
r = r.props.children[0], r && bn(r) === "button" && (i = !0);
|
|
1835
1835
|
else
|
|
1836
1836
|
break;
|
|
1837
1837
|
}
|
|
1838
|
-
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(
|
|
1838
|
+
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(W, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1839
1839
|
}, dr = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1840
1840
|
const wn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1841
1841
|
n = n.replace(/^<br\/?>/, "");
|
|
1842
1842
|
const r = {
|
|
1843
|
-
wrapper:
|
|
1843
|
+
wrapper: C.Fragment,
|
|
1844
1844
|
forceBlock: !0,
|
|
1845
1845
|
overrides: {
|
|
1846
1846
|
a: lr,
|
|
1847
1847
|
// Override psuedo-code
|
|
1848
1848
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1849
|
-
CollapsibleSection:
|
|
1849
|
+
CollapsibleSection: On,
|
|
1850
1850
|
TextBox: Re,
|
|
1851
1851
|
CaseStudy: rr,
|
|
1852
1852
|
// Override embedded HTML
|
|
@@ -1869,8 +1869,8 @@ const ur = ({
|
|
|
1869
1869
|
const l = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1870
1870
|
return /* @__PURE__ */ s.jsxs("section", { className: S("page-heading", i), children: [
|
|
1871
1871
|
/* @__PURE__ */ s.jsxs("div", { className: S("content", { "has-max-width": e }), style: l, children: [
|
|
1872
|
-
t && t.text &&
|
|
1873
|
-
n && n.text &&
|
|
1872
|
+
t && t.text && C.createElement(t.element || "h1", { className: "title" }, t.text),
|
|
1873
|
+
n && n.text && C.createElement(
|
|
1874
1874
|
n.element || "h2",
|
|
1875
1875
|
{ className: "text-medium" },
|
|
1876
1876
|
n.text
|
|
@@ -1886,7 +1886,7 @@ const ft = ({
|
|
|
1886
1886
|
children: r,
|
|
1887
1887
|
...i
|
|
1888
1888
|
}) => /* @__PURE__ */ s.jsx("span", { className: S("pill", e, t, n), ...i, children: r });
|
|
1889
|
-
const Xt = ({ element: e = "p", children: t = null, className: n = "", ...r }) =>
|
|
1889
|
+
const Xt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => C.createElement(e, { ...r, className: S("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1890
1890
|
const mr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1891
1891
|
const r = D(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1892
1892
|
return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: l, children: /* @__PURE__ */ s.jsx(_e, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
@@ -1955,8 +1955,8 @@ const vn = 256, qe = ({
|
|
|
1955
1955
|
height: l = vn,
|
|
1956
1956
|
...u
|
|
1957
1957
|
}) => {
|
|
1958
|
-
const [a, d] =
|
|
1959
|
-
|
|
1958
|
+
const [a, d] = P(!1), o = de(null);
|
|
1959
|
+
G(() => {
|
|
1960
1960
|
const c = o.current;
|
|
1961
1961
|
if (!c)
|
|
1962
1962
|
return;
|
|
@@ -2021,7 +2021,7 @@ const tn = ({
|
|
|
2021
2021
|
const u = D(), a = Hn(t);
|
|
2022
2022
|
a.name || (a.name = u.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
2023
2023
|
const { name: d, url: o, image: m } = a, c = gr(a), h = n && n.createdAt ? Gt(n.createdAt) : !1, p = n && n.createdAt ? Rn(n.createdAt) : "";
|
|
2024
|
-
return
|
|
2024
|
+
return C.createElement(e, {
|
|
2025
2025
|
className: S("member text-medium", l),
|
|
2026
2026
|
children: /* @__PURE__ */ s.jsxs(
|
|
2027
2027
|
jt,
|
|
@@ -2064,34 +2064,34 @@ const kn = {
|
|
|
2064
2064
|
...o
|
|
2065
2065
|
}) => {
|
|
2066
2066
|
const m = D();
|
|
2067
|
-
return !n || n.length === 0 ? null :
|
|
2067
|
+
return !n || n.length === 0 ? null : C.createElement(e, {
|
|
2068
2068
|
...o,
|
|
2069
2069
|
className: S("contributors", d, i, { "has-gap": l }),
|
|
2070
2070
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2071
2071
|
/* @__PURE__ */ s.jsx("ul", { children: n.map((c, h) => {
|
|
2072
2072
|
let p, g = "";
|
|
2073
2073
|
if (h < a) {
|
|
2074
|
-
const { name:
|
|
2074
|
+
const { name: b = "", image: v = "" } = Hn(c);
|
|
2075
2075
|
if (u)
|
|
2076
2076
|
return /* @__PURE__ */ s.jsx(Se, { element: "li", className: "contributor" }, h);
|
|
2077
2077
|
p = /* @__PURE__ */ s.jsx(
|
|
2078
2078
|
qe,
|
|
2079
2079
|
{
|
|
2080
|
-
name:
|
|
2080
|
+
name: b,
|
|
2081
2081
|
src: v,
|
|
2082
2082
|
width: kn[i || "medium"],
|
|
2083
2083
|
height: kn[i || "medium"]
|
|
2084
2084
|
}
|
|
2085
2085
|
);
|
|
2086
2086
|
} else if (h === a) {
|
|
2087
|
-
const
|
|
2087
|
+
const b = (t || n.length) - a;
|
|
2088
2088
|
p = /* @__PURE__ */ s.jsxs(
|
|
2089
2089
|
"small",
|
|
2090
2090
|
{
|
|
2091
|
-
className: S({ "large-number":
|
|
2091
|
+
className: S({ "large-number": b > 99 }),
|
|
2092
2092
|
children: [
|
|
2093
2093
|
"+",
|
|
2094
|
-
Vs(
|
|
2094
|
+
Vs(b, 0)
|
|
2095
2095
|
]
|
|
2096
2096
|
}
|
|
2097
2097
|
), g = "number-left";
|
|
@@ -2123,7 +2123,7 @@ function br(e) {
|
|
|
2123
2123
|
var t = e.children, n = e.client, r = e.apiKey, i = e.options, l = xt(function() {
|
|
2124
2124
|
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 && i && 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 && (dt.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), dt.init(r, i)), dt);
|
|
2125
2125
|
}, [n, r]);
|
|
2126
|
-
return
|
|
2126
|
+
return C.createElement(xr.Provider, { value: { client: l } }, t);
|
|
2127
2127
|
}
|
|
2128
2128
|
const wr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
|
|
2129
2129
|
br,
|
|
@@ -2149,8 +2149,8 @@ const wr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
2149
2149
|
};
|
|
2150
2150
|
return /* @__PURE__ */ s.jsx(ws, { locale: r, messages: i, children: e });
|
|
2151
2151
|
}, $e = Kt(null), kr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx($e.Provider, { value: t, children: e }), Ga = ({ bootstrap: e, children: t, intl: n }) => {
|
|
2152
|
-
const [r, i] =
|
|
2153
|
-
return
|
|
2152
|
+
const [r, i] = P({ isLoading: !0 });
|
|
2153
|
+
return G(() => {
|
|
2154
2154
|
e().then((l) => {
|
|
2155
2155
|
i({ ...l, isLoading: !1 }), Ys(5e3);
|
|
2156
2156
|
}).catch(() => i({ isLoading: !1 }));
|
|
@@ -2159,13 +2159,13 @@ const wr = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
2159
2159
|
const Pt = "joinCommunityButton", Wn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2160
2160
|
}, leave: () => {
|
|
2161
2161
|
} } }) => {
|
|
2162
|
-
const i = D(), l = je($e), u = l && typeof l.id == "string", [a, d] =
|
|
2163
|
-
|
|
2162
|
+
const i = D(), l = je($e), u = l && typeof l.id == "string", [a, d] = P(e), [o, m] = P(e ? "joined" : "notJoined");
|
|
2163
|
+
G(() => {
|
|
2164
2164
|
o === "joining" ? m("joined") : o === "leaving" && m("notJoined");
|
|
2165
2165
|
}, [a]);
|
|
2166
2166
|
const c = {}, h = {};
|
|
2167
2167
|
return a && o !== "leaving" && (c["data-hover-text"] = i.formatMessage({ id: `${Pt}_leave` }), c["aria-label"] = i.formatMessage({ id: `${Pt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2168
|
-
|
|
2168
|
+
W,
|
|
2169
2169
|
{
|
|
2170
2170
|
variant: a ? "secondary" : "primary",
|
|
2171
2171
|
size: "medium",
|
|
@@ -2217,7 +2217,7 @@ const Rt = "communityDetails_", Ja = ({
|
|
|
2217
2217
|
] }),
|
|
2218
2218
|
/* @__PURE__ */ s.jsx(Wn, { isMember: t, functions: { ...u } }),
|
|
2219
2219
|
t && /* @__PURE__ */ s.jsx(
|
|
2220
|
-
|
|
2220
|
+
W,
|
|
2221
2221
|
{
|
|
2222
2222
|
variant: "primary",
|
|
2223
2223
|
onClick: l,
|
|
@@ -2250,7 +2250,7 @@ const Za = ({
|
|
|
2250
2250
|
},
|
|
2251
2251
|
className: i = ""
|
|
2252
2252
|
}) => {
|
|
2253
|
-
const l = D(), u = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, d] =
|
|
2253
|
+
const l = D(), u = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, d] = P(t ? ["all"] : []), o = (m, c) => {
|
|
2254
2254
|
let h = [];
|
|
2255
2255
|
a.includes(m) ? h = a.filter((p) => p !== m) : m === "all" ? h = ["all"] : n ? h = [...a.filter((p) => p !== "all"), m] : h = [m], d((p) => (r && typeof r == "function" && r({ current: h, previous: p }), h)), c && typeof c == "function" && c();
|
|
2256
2256
|
};
|
|
@@ -2261,8 +2261,8 @@ const Za = ({
|
|
|
2261
2261
|
"button",
|
|
2262
2262
|
{
|
|
2263
2263
|
className: S(m, { selected: a.includes(m) }),
|
|
2264
|
-
onClick: (
|
|
2265
|
-
|
|
2264
|
+
onClick: (b) => {
|
|
2265
|
+
b.preventDefault(), b.stopPropagation(), o(m, p);
|
|
2266
2266
|
},
|
|
2267
2267
|
...g,
|
|
2268
2268
|
children: c
|
|
@@ -2290,26 +2290,26 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2290
2290
|
label: a,
|
|
2291
2291
|
className: d = ""
|
|
2292
2292
|
}) => {
|
|
2293
|
-
const o = D(), [m, c] =
|
|
2294
|
-
if (
|
|
2293
|
+
const o = D(), [m, c] = P(e);
|
|
2294
|
+
if (G(() => {
|
|
2295
2295
|
e !== m && c(e);
|
|
2296
|
-
}, [e]), !r || !Object.values(r).some((
|
|
2296
|
+
}, [e]), !r || !Object.values(r).some((b) => b && b.post_name))
|
|
2297
2297
|
return null;
|
|
2298
2298
|
const p = Object.keys(r), g = m !== e;
|
|
2299
2299
|
return /* @__PURE__ */ s.jsxs("div", { className: S("language-switcher text-small", u, d), children: [
|
|
2300
2300
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2301
2301
|
u !== "short" && /* @__PURE__ */ s.jsx("p", { children: a || o.formatMessage({ id: `${rt}label` }) }),
|
|
2302
|
-
/* @__PURE__ */ s.jsx("ul", { children: p.map((
|
|
2303
|
-
if (!Ft[
|
|
2302
|
+
/* @__PURE__ */ s.jsx("ul", { children: p.map((b) => {
|
|
2303
|
+
if (!Ft[b])
|
|
2304
2304
|
return null;
|
|
2305
|
-
let v = { className:
|
|
2306
|
-
return m ===
|
|
2305
|
+
let v = { className: b };
|
|
2306
|
+
return m === b ? v["aria-label"] = o.formatMessage({ id: `${rt}selected` }, { language: Ft[b] }) : v = {
|
|
2307
2307
|
...v,
|
|
2308
|
-
href: jr(
|
|
2308
|
+
href: jr(b, l),
|
|
2309
2309
|
onClick: (E) => {
|
|
2310
|
-
E.preventDefault(), E.stopPropagation(), c(
|
|
2310
|
+
E.preventDefault(), E.stopPropagation(), c(b), i(b);
|
|
2311
2311
|
}
|
|
2312
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(jt, { ...v, fallbackElement: "span", children: Ft[
|
|
2312
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(jt, { ...v, fallbackElement: "span", children: Ft[b] }) }, b);
|
|
2313
2313
|
}) }),
|
|
2314
2314
|
u !== "short" && !g && /* @__PURE__ */ s.jsx("p", { children: o.formatMessage({ id: `${rt}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2315
2315
|
] }),
|
|
@@ -2319,9 +2319,9 @@ const Ft = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2319
2319
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2320
2320
|
children: o.formatMessage({ id: `${rt}disclaimer` }, {
|
|
2321
2321
|
email: Ze.support,
|
|
2322
|
-
link: (
|
|
2323
|
-
const v = `mailto:${
|
|
2324
|
-
return /* @__PURE__ */ s.jsx("a", { href: v, children:
|
|
2322
|
+
link: (b) => {
|
|
2323
|
+
const v = `mailto:${b}`;
|
|
2324
|
+
return /* @__PURE__ */ s.jsx("a", { href: v, children: b });
|
|
2325
2325
|
}
|
|
2326
2326
|
})
|
|
2327
2327
|
})
|
|
@@ -2342,7 +2342,7 @@ const Lt = vs({ locale: "en", messages: qt }), yr = ({
|
|
|
2342
2342
|
className: u = "",
|
|
2343
2343
|
gtmContext: a = "LoadMore"
|
|
2344
2344
|
}) => {
|
|
2345
|
-
const [d, o] =
|
|
2345
|
+
const [d, o] = P(!1), [m, c] = P(!1);
|
|
2346
2346
|
if (t <= 0 || t < n * e)
|
|
2347
2347
|
return null;
|
|
2348
2348
|
const h = async (p) => {
|
|
@@ -2355,7 +2355,7 @@ const Lt = vs({ locale: "en", messages: qt }), yr = ({
|
|
|
2355
2355
|
return /* @__PURE__ */ s.jsxs("footer", { className: S("load-more", u), children: [
|
|
2356
2356
|
d && /* @__PURE__ */ s.jsx("p", { className: "error", children: l.error }),
|
|
2357
2357
|
m ? /* @__PURE__ */ s.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2358
|
-
|
|
2358
|
+
W,
|
|
2359
2359
|
{
|
|
2360
2360
|
variant: "secondary",
|
|
2361
2361
|
icon: i,
|
|
@@ -2372,17 +2372,17 @@ const Lt = vs({ locale: "en", messages: qt }), yr = ({
|
|
|
2372
2372
|
const zn = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: S("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(_e, { children: /* @__PURE__ */ s.jsx(Pe, { id: "apolitical" }) }) }) });
|
|
2373
2373
|
let at = !1;
|
|
2374
2374
|
const Er = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2375
|
-
const i = D(), l = de(null), [u, a] =
|
|
2375
|
+
const i = D(), l = de(null), [u, a] = P(!1), d = (o) => {
|
|
2376
2376
|
l.current && o.target instanceof HTMLElement && !l.current.contains(o.target) && a(!1);
|
|
2377
2377
|
};
|
|
2378
|
-
return
|
|
2378
|
+
return G(() => (document.addEventListener("click", d, !0), () => {
|
|
2379
2379
|
document.removeEventListener("click", d, !0);
|
|
2380
|
-
})),
|
|
2380
|
+
})), C.createElement(e, {
|
|
2381
2381
|
ref: l,
|
|
2382
2382
|
className: S("more-menu text-medium", r),
|
|
2383
2383
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2384
2384
|
/* @__PURE__ */ s.jsx(
|
|
2385
|
-
|
|
2385
|
+
W,
|
|
2386
2386
|
{
|
|
2387
2387
|
variant: "tertiary",
|
|
2388
2388
|
size: "medium",
|
|
@@ -2395,7 +2395,7 @@ const Er = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2395
2395
|
}
|
|
2396
2396
|
),
|
|
2397
2397
|
/* @__PURE__ */ s.jsx("ul", { id: t, hidden: !u, children: n.map(({ href: o, onClick: m, text: c, icon: h, ...p }, g) => {
|
|
2398
|
-
const
|
|
2398
|
+
const b = {
|
|
2399
2399
|
...p,
|
|
2400
2400
|
onClick: (v) => {
|
|
2401
2401
|
a(!1), typeof m == "function" && m(v);
|
|
@@ -2409,13 +2409,13 @@ const Er = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2409
2409
|
}, 100);
|
|
2410
2410
|
}
|
|
2411
2411
|
};
|
|
2412
|
-
return o && (
|
|
2413
|
-
|
|
2412
|
+
return o && (b.href = o), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2413
|
+
W,
|
|
2414
2414
|
{
|
|
2415
2415
|
variant: "tertiary",
|
|
2416
2416
|
size: "medium",
|
|
2417
2417
|
icon: h ? { icon: h, position: "left" } : !1,
|
|
2418
|
-
...
|
|
2418
|
+
...b,
|
|
2419
2419
|
children: c
|
|
2420
2420
|
}
|
|
2421
2421
|
) }, `${window.btoa(c)}_${g}`);
|
|
@@ -2543,8 +2543,8 @@ const Nr = "shareLinks_", qa = ({
|
|
|
2543
2543
|
if (typeof h == "function" && !h())
|
|
2544
2544
|
return null;
|
|
2545
2545
|
const g = {};
|
|
2546
|
-
return p && (g.onClick = (
|
|
2547
|
-
|
|
2546
|
+
return p && (g.onClick = (b) => p(b, c)), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2547
|
+
W,
|
|
2548
2548
|
{
|
|
2549
2549
|
size: i,
|
|
2550
2550
|
variant: "tertiary",
|
|
@@ -2577,13 +2577,13 @@ const eo = ({ tabs: e, className: t = "" }) => {
|
|
|
2577
2577
|
}
|
|
2578
2578
|
}
|
|
2579
2579
|
}
|
|
2580
|
-
const [i, l] =
|
|
2580
|
+
const [i, l] = P(
|
|
2581
2581
|
(d = e[r]) != null && d.id ? e[r].id : n(e[r].id, e[r].text, r)
|
|
2582
2582
|
), u = [], a = [];
|
|
2583
2583
|
return e.forEach(({ id: o, text: m, content: c, href: h }, p) => {
|
|
2584
2584
|
o = n(o, m, p);
|
|
2585
|
-
const g = i === o,
|
|
2586
|
-
h || (
|
|
2585
|
+
const g = i === o, b = {};
|
|
2586
|
+
h || (b["aria-controls"] = o, b.onClick = (v) => {
|
|
2587
2587
|
v.preventDefault(), v.stopPropagation(), l(o), window.location.hash = `#${o}`;
|
|
2588
2588
|
}, a.push(
|
|
2589
2589
|
/* @__PURE__ */ s.jsx(
|
|
@@ -2607,7 +2607,7 @@ const eo = ({ tabs: e, className: t = "" }) => {
|
|
|
2607
2607
|
className: S({ selected: g }),
|
|
2608
2608
|
role: "tab",
|
|
2609
2609
|
"aria-selected": g,
|
|
2610
|
-
...
|
|
2610
|
+
...b,
|
|
2611
2611
|
children: m
|
|
2612
2612
|
}
|
|
2613
2613
|
) }, `tab-${o}`)
|
|
@@ -2628,14 +2628,14 @@ const Dr = {
|
|
|
2628
2628
|
}) => {
|
|
2629
2629
|
const i = vt(!0);
|
|
2630
2630
|
let l = r;
|
|
2631
|
-
return
|
|
2631
|
+
return C.Children.count(r) === 1 && (l = C.Children.toArray(r)[0], l.props && (l = l.props.children)), /* @__PURE__ */ s.jsx("section", { className: S("columns", `layout-${e}`, n), children: C.Children.map(l, (u, a) => t !== !1 && a === t && i && i < Dr[e] ? null : u) });
|
|
2632
2632
|
}, to = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Cr, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2633
2633
|
/* @__PURE__ */ s.jsx(Tr, { activeLink: e }),
|
|
2634
2634
|
/* @__PURE__ */ s.jsx(ur, { ...t })
|
|
2635
2635
|
] }) });
|
|
2636
|
-
const
|
|
2637
|
-
const e = D(), [t, n, r] = Ss(
|
|
2638
|
-
|
|
2636
|
+
const Ot = "cookieBanner_", It = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], Bt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), Ar = () => {
|
|
2637
|
+
const e = D(), [t, n, r] = Ss(It), [i, l] = P(!t["apol-cookie-banner"]), u = () => {
|
|
2638
|
+
It.forEach((m) => {
|
|
2639
2639
|
n(m, !0, {
|
|
2640
2640
|
path: "/",
|
|
2641
2641
|
expires: Bt,
|
|
@@ -2646,7 +2646,7 @@ const It = "cookieBanner_", Ot = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2646
2646
|
n("apol-cookie-banner", !0, {
|
|
2647
2647
|
path: "/",
|
|
2648
2648
|
expires: Bt
|
|
2649
|
-
}),
|
|
2649
|
+
}), It.forEach((m) => {
|
|
2650
2650
|
if (m === "apol-cookie-banner") {
|
|
2651
2651
|
n(m, !0, {
|
|
2652
2652
|
path: "/",
|
|
@@ -2672,11 +2672,11 @@ const It = "cookieBanner_", Ot = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2672
2672
|
className: "gtm-trackable",
|
|
2673
2673
|
"data-gtm-event-context": "cookie-banner",
|
|
2674
2674
|
"data-gtm-event-type": `cookie-${m.gtmType}-click`,
|
|
2675
|
-
children: e.formatMessage({ id: `${
|
|
2675
|
+
children: e.formatMessage({ id: `${Ot}buttons_${m.id}` })
|
|
2676
2676
|
});
|
|
2677
2677
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2678
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2679
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2678
|
+
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${Ot}title` }) }),
|
|
2679
|
+
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${Ot}text` }) }),
|
|
2680
2680
|
/* @__PURE__ */ s.jsx(kt, { buttons: o })
|
|
2681
2681
|
] });
|
|
2682
2682
|
}, Ce = {
|
|
@@ -2848,10 +2848,10 @@ const Be = "footer_", ht = "SiteFooter", jn = ({ group: e }) => {
|
|
|
2848
2848
|
] })
|
|
2849
2849
|
] }) });
|
|
2850
2850
|
const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2851
|
-
const i = D(), [l, u] =
|
|
2851
|
+
const i = D(), [l, u] = P({ path: `${ot}default`, type: "default", link: {}, mail: {}, error: "" }), [a, d] = P(!1), o = Me(
|
|
2852
2852
|
(p) => {
|
|
2853
2853
|
p.preventDefault(), p.stopPropagation();
|
|
2854
|
-
const g = (
|
|
2854
|
+
const g = (b) => {
|
|
2855
2855
|
u({
|
|
2856
2856
|
path: `${ot}error_verificationFailedToSend`,
|
|
2857
2857
|
type: "error",
|
|
@@ -2869,7 +2869,7 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2869
2869
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2870
2870
|
"data-gtm-event-type": "email-concierge-click"
|
|
2871
2871
|
},
|
|
2872
|
-
error:
|
|
2872
|
+
error: b
|
|
2873
2873
|
});
|
|
2874
2874
|
};
|
|
2875
2875
|
if (typeof r != "function") {
|
|
@@ -2878,8 +2878,8 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2878
2878
|
}
|
|
2879
2879
|
d(!0), r(t).then(() => {
|
|
2880
2880
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2881
|
-
}).catch((
|
|
2882
|
-
g(
|
|
2881
|
+
}).catch((b) => {
|
|
2882
|
+
g(b.message);
|
|
2883
2883
|
}).finally(() => {
|
|
2884
2884
|
d(!1);
|
|
2885
2885
|
});
|
|
@@ -2887,15 +2887,15 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2887
2887
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2888
2888
|
[t, n, r]
|
|
2889
2889
|
);
|
|
2890
|
-
|
|
2890
|
+
G(
|
|
2891
2891
|
() => {
|
|
2892
|
-
let p = ot, g = "default",
|
|
2892
|
+
let p = ot, g = "default", b = {}, v = {};
|
|
2893
2893
|
switch (e) {
|
|
2894
2894
|
case "gov":
|
|
2895
2895
|
p += "autoApproved", g = "success";
|
|
2896
2896
|
break;
|
|
2897
2897
|
case "nonGov":
|
|
2898
|
-
p += "unrecognisedEmail", g = "error",
|
|
2898
|
+
p += "unrecognisedEmail", g = "error", b = {
|
|
2899
2899
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2900
2900
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2901
2901
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -2910,7 +2910,7 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2910
2910
|
};
|
|
2911
2911
|
break;
|
|
2912
2912
|
case "verify":
|
|
2913
|
-
p += "emailUnverified", g = "error",
|
|
2913
|
+
p += "emailUnverified", g = "error", b = {
|
|
2914
2914
|
href: "#",
|
|
2915
2915
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2916
2916
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2920,7 +2920,7 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2920
2920
|
};
|
|
2921
2921
|
break;
|
|
2922
2922
|
case "exists":
|
|
2923
|
-
p += "emailAlreadyExists", g = "error",
|
|
2923
|
+
p += "emailAlreadyExists", g = "error", b = {
|
|
2924
2924
|
href: "/user-onboarding/login",
|
|
2925
2925
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2926
2926
|
"data-gtm-event-type": "login-click"
|
|
@@ -2932,14 +2932,14 @@ const ot = "emailHelperTextBox_", no = ({ type: e, email: t, redirectPath: n, re
|
|
|
2932
2932
|
};
|
|
2933
2933
|
break;
|
|
2934
2934
|
default:
|
|
2935
|
-
p += "default",
|
|
2935
|
+
p += "default", b = {
|
|
2936
2936
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2937
2937
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2938
2938
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2939
2939
|
};
|
|
2940
2940
|
break;
|
|
2941
2941
|
}
|
|
2942
|
-
u({ ...l, path: p, type: g, link:
|
|
2942
|
+
u({ ...l, path: p, type: g, link: b, mail: v });
|
|
2943
2943
|
},
|
|
2944
2944
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2945
2945
|
[e]
|
|
@@ -3000,19 +3000,19 @@ const ro = ({
|
|
|
3000
3000
|
className: l = "",
|
|
3001
3001
|
hasLoaded: u = !1
|
|
3002
3002
|
}) => {
|
|
3003
|
-
const a = D(), [d, o] =
|
|
3003
|
+
const a = D(), [d, o] = P({ setUp: !1, id: null, rating: null, disabled: !0 }), m = async () => {
|
|
3004
3004
|
try {
|
|
3005
3005
|
const E = await n();
|
|
3006
|
-
o((
|
|
3006
|
+
o((j) => ({ ...j, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
3007
3007
|
} catch (E) {
|
|
3008
|
-
o((
|
|
3008
|
+
o((j) => ({ ...j, setUp: !0, disabled: !0 })), i(E);
|
|
3009
3009
|
}
|
|
3010
3010
|
};
|
|
3011
|
-
if (
|
|
3011
|
+
if (G(() => {
|
|
3012
3012
|
u && !d.setUp && m();
|
|
3013
3013
|
}, [u]), !u)
|
|
3014
3014
|
return /* @__PURE__ */ s.jsx(Se, { className: "rating-placeholder" });
|
|
3015
|
-
const { id: c, rating: h, disabled: p } = d, g = "ratings_",
|
|
3015
|
+
const { id: c, rating: h, disabled: p } = d, g = "ratings_", b = {
|
|
3016
3016
|
text: a.formatMessage({ id: `${g}text` }),
|
|
3017
3017
|
low: a.formatMessage({ id: `${g}low` }),
|
|
3018
3018
|
high: a.formatMessage({ id: `${g}high` }),
|
|
@@ -3021,33 +3021,33 @@ const ro = ({
|
|
|
3021
3021
|
}, v = async (E) => {
|
|
3022
3022
|
if (!(!c || p))
|
|
3023
3023
|
try {
|
|
3024
|
-
o((
|
|
3025
|
-
} catch (
|
|
3026
|
-
o((_) => ({ ..._, rating: null })), i(
|
|
3024
|
+
o((j) => ({ ...j, rating: E, disabled: !0 })), await r({ id: c, value: E });
|
|
3025
|
+
} catch (j) {
|
|
3026
|
+
o((_) => ({ ..._, rating: null })), i(j);
|
|
3027
3027
|
} finally {
|
|
3028
|
-
o((
|
|
3028
|
+
o((j) => ({ ...j, disabled: !1 }));
|
|
3029
3029
|
}
|
|
3030
3030
|
};
|
|
3031
3031
|
return /* @__PURE__ */ s.jsxs("div", { className: S("rating", l), children: [
|
|
3032
|
-
/* @__PURE__ */ s.jsx("span", { className: "label", children:
|
|
3032
|
+
/* @__PURE__ */ s.jsx("span", { className: "label", children: b[h ? "success" : "text"] }),
|
|
3033
3033
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
3034
|
-
const
|
|
3035
|
-
return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h &&
|
|
3036
|
-
|
|
3034
|
+
const j = E + 1;
|
|
3035
|
+
return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h && j <= h }), children: /* @__PURE__ */ s.jsx(
|
|
3036
|
+
W,
|
|
3037
3037
|
{
|
|
3038
3038
|
variant: "tertiary",
|
|
3039
3039
|
size: "small",
|
|
3040
|
-
icon: { icon: `star${!h ||
|
|
3040
|
+
icon: { icon: `star${!h || j > h ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
3041
3041
|
screenreaderText: `${a.formatMessage(
|
|
3042
3042
|
{ id: `${g}stars` },
|
|
3043
|
-
{ number:
|
|
3044
|
-
)}${
|
|
3043
|
+
{ number: j, total: t }
|
|
3044
|
+
)}${j === 1 || j === t ? ` - ${b[j === 1 ? "low" : "high"]}` : ""}`,
|
|
3045
3045
|
onClick: (_) => {
|
|
3046
|
-
_.preventDefault(), _.stopPropagation(), v(
|
|
3046
|
+
_.preventDefault(), _.stopPropagation(), v(j);
|
|
3047
3047
|
},
|
|
3048
3048
|
disabled: p
|
|
3049
3049
|
}
|
|
3050
|
-
) }, `rating-${
|
|
3050
|
+
) }, `rating-${j}`);
|
|
3051
3051
|
}) })
|
|
3052
3052
|
] });
|
|
3053
3053
|
};
|
|
@@ -3117,26 +3117,26 @@ const Lr = ({
|
|
|
3117
3117
|
initialFormStatus: o = "NOT_SUBMITTED"
|
|
3118
3118
|
/* NOT_SUBMITTED */
|
|
3119
3119
|
}) => {
|
|
3120
|
-
const [m, c] =
|
|
3120
|
+
const [m, c] = P([]), [h, p] = P(!0), [g, b] = P(o), { formatMessage: v } = D(), E = async (T) => {
|
|
3121
3121
|
T.preventDefault();
|
|
3122
3122
|
try {
|
|
3123
|
-
await d(m), c([]),
|
|
3123
|
+
await d(m), c([]), b(
|
|
3124
3124
|
"SUCCESS"
|
|
3125
3125
|
/* SUCCESS */
|
|
3126
3126
|
);
|
|
3127
|
-
} catch (
|
|
3128
|
-
|
|
3127
|
+
} catch (N) {
|
|
3128
|
+
b(
|
|
3129
3129
|
"ERROR"
|
|
3130
3130
|
/* ERROR */
|
|
3131
|
-
), a(
|
|
3131
|
+
), a(N);
|
|
3132
3132
|
}
|
|
3133
|
-
},
|
|
3134
|
-
T.preventDefault(),
|
|
3133
|
+
}, j = (T) => {
|
|
3134
|
+
T.preventDefault(), b(
|
|
3135
3135
|
"NOT_SUBMITTED"
|
|
3136
3136
|
/* NOT_SUBMITTED */
|
|
3137
3137
|
), p(!0), c([]);
|
|
3138
3138
|
}, _ = (T) => {
|
|
3139
|
-
T.preventDefault(), u(),
|
|
3139
|
+
T.preventDefault(), u(), b(
|
|
3140
3140
|
"CLOSED"
|
|
3141
3141
|
/* CLOSED */
|
|
3142
3142
|
);
|
|
@@ -3148,9 +3148,9 @@ const Lr = ({
|
|
|
3148
3148
|
] }) }),
|
|
3149
3149
|
/* @__PURE__ */ s.jsx(Ue, {}),
|
|
3150
3150
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3151
|
-
/* @__PURE__ */ s.jsx(
|
|
3152
|
-
/* @__PURE__ */ s.jsx(
|
|
3153
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
3151
|
+
/* @__PURE__ */ s.jsx(W, { variant: "secondary", onClick: j, children: v({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
3152
|
+
/* @__PURE__ */ s.jsx(W, { onClick: _, children: v({ id: "inviteForm_ctaDone" }) })
|
|
3153
|
+
] }) : /* @__PURE__ */ s.jsx(W, { onClick: j, children: v({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
3154
3154
|
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
3155
3155
|
"form",
|
|
3156
3156
|
{
|
|
@@ -3172,31 +3172,31 @@ const Lr = ({
|
|
|
3172
3172
|
c(T), p(!T.length);
|
|
3173
3173
|
},
|
|
3174
3174
|
autoFocus: !1,
|
|
3175
|
-
getLabel: (T,
|
|
3175
|
+
getLabel: (T, N, R) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
3176
3176
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: T }),
|
|
3177
3177
|
/* @__PURE__ */ s.jsx(
|
|
3178
|
-
|
|
3178
|
+
W,
|
|
3179
3179
|
{
|
|
3180
3180
|
variant: "tertiary",
|
|
3181
3181
|
size: "small",
|
|
3182
3182
|
icon: { icon: "close" },
|
|
3183
3183
|
onClick: () => {
|
|
3184
|
-
R(
|
|
3184
|
+
R(N), p(!m.length);
|
|
3185
3185
|
},
|
|
3186
3186
|
className: "remove-email-button",
|
|
3187
3187
|
screenreaderText: v({ id: "overlay_close" })
|
|
3188
3188
|
}
|
|
3189
3189
|
)
|
|
3190
|
-
] },
|
|
3190
|
+
] }, N)
|
|
3191
3191
|
}
|
|
3192
3192
|
)
|
|
3193
3193
|
] }),
|
|
3194
3194
|
/* @__PURE__ */ s.jsx(Ue, {}),
|
|
3195
|
-
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(
|
|
3195
|
+
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(W, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
3196
3196
|
]
|
|
3197
3197
|
}
|
|
3198
3198
|
) });
|
|
3199
|
-
},
|
|
3199
|
+
}, U = {
|
|
3200
3200
|
timeouts: {},
|
|
3201
3201
|
handlerCalled: {},
|
|
3202
3202
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -3219,9 +3219,9 @@ const Lr = ({
|
|
|
3219
3219
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
3220
3220
|
return;
|
|
3221
3221
|
const i = Date.now();
|
|
3222
|
-
if (!t &&
|
|
3222
|
+
if (!t && U.handlerCalled[e] && i - U.handlerCalled[e] < 500)
|
|
3223
3223
|
return;
|
|
3224
|
-
|
|
3224
|
+
U.handlerCalled[e] = i;
|
|
3225
3225
|
let l = [{ type: `menus.${e}`, value: t }];
|
|
3226
3226
|
t === !0 && Object.keys(n).forEach((u) => {
|
|
3227
3227
|
u === e || n[u] === !1 || l.push({ type: `menus.${u}`, value: !1 });
|
|
@@ -3246,7 +3246,7 @@ const Lr = ({
|
|
|
3246
3246
|
if (!(typeof i > "u") && (!n || i[t] && i[t].includes(n) || i.value && i.value.includes(n) || i.toString().includes(n)))
|
|
3247
3247
|
return e[r];
|
|
3248
3248
|
}
|
|
3249
|
-
return e[0].children ?
|
|
3249
|
+
return e[0].children ? U.findFirstChild(e[0].children, t, n) : !1;
|
|
3250
3250
|
},
|
|
3251
3251
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: i }) => {
|
|
3252
3252
|
if (!t.current || !t.current.children)
|
|
@@ -3260,20 +3260,20 @@ const Lr = ({
|
|
|
3260
3260
|
switch (e) {
|
|
3261
3261
|
case "navigation":
|
|
3262
3262
|
if (n) {
|
|
3263
|
-
const d =
|
|
3263
|
+
const d = U.findFirstChild(
|
|
3264
3264
|
t.current.children,
|
|
3265
3265
|
"attributes.aria-controls",
|
|
3266
3266
|
"navigation"
|
|
3267
3267
|
);
|
|
3268
|
-
u =
|
|
3268
|
+
u = U.findFirstChild(d.children, "href");
|
|
3269
3269
|
} else
|
|
3270
|
-
u =
|
|
3270
|
+
u = U.findFirstChild(t.current.children, "href");
|
|
3271
3271
|
u || (u = t.current);
|
|
3272
3272
|
break;
|
|
3273
3273
|
case "account":
|
|
3274
|
-
if (a =
|
|
3274
|
+
if (a = U.findFirstChild(t.current.children, "className", "account"), !a || !a.children)
|
|
3275
3275
|
return;
|
|
3276
|
-
u =
|
|
3276
|
+
u = U.findFirstChild(a.children, "href");
|
|
3277
3277
|
break;
|
|
3278
3278
|
default:
|
|
3279
3279
|
return;
|
|
@@ -3282,16 +3282,16 @@ const Lr = ({
|
|
|
3282
3282
|
},
|
|
3283
3283
|
events: {
|
|
3284
3284
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
3285
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
3285
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(U.timeouts[t]), n(t, !r));
|
|
3286
3286
|
},
|
|
3287
3287
|
onFocus: ({ id: e }) => {
|
|
3288
|
-
clearTimeout(
|
|
3288
|
+
clearTimeout(U.timeouts[e]);
|
|
3289
3289
|
},
|
|
3290
3290
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
3291
|
-
clearTimeout(
|
|
3291
|
+
clearTimeout(U.timeouts[e]), t(e, !0);
|
|
3292
3292
|
},
|
|
3293
3293
|
onBlur: ({ id: e, callback: t }) => {
|
|
3294
|
-
|
|
3294
|
+
U.timeouts[e] = setTimeout(() => {
|
|
3295
3295
|
t(e, !1);
|
|
3296
3296
|
}, 250);
|
|
3297
3297
|
}
|
|
@@ -3389,10 +3389,10 @@ const Lr = ({
|
|
|
3389
3389
|
a.hasVariantText && (c += `_logged${t ? "In" : "Out"}`);
|
|
3390
3390
|
let h = !1;
|
|
3391
3391
|
if (a.href) {
|
|
3392
|
-
let
|
|
3393
|
-
if (
|
|
3394
|
-
const _ =
|
|
3395
|
-
|
|
3392
|
+
let j = a.gtmType || `${e}-click`;
|
|
3393
|
+
if (j.includes(".")) {
|
|
3394
|
+
const _ = j.split("."), T = _[_.length - 2];
|
|
3395
|
+
j = `${T === "topics" ? `${T}-` : ""}${_[_.length - 1]}`;
|
|
3396
3396
|
}
|
|
3397
3397
|
h = {
|
|
3398
3398
|
href: a.href,
|
|
@@ -3400,7 +3400,7 @@ const Lr = ({
|
|
|
3400
3400
|
}, o && (h = {
|
|
3401
3401
|
...h,
|
|
3402
3402
|
className: "gtm-trackable",
|
|
3403
|
-
"data-gtm-event-type":
|
|
3403
|
+
"data-gtm-event-type": j,
|
|
3404
3404
|
"data-gtm-event-context": "HeaderButtons"
|
|
3405
3405
|
}), m && (h = {
|
|
3406
3406
|
...h,
|
|
@@ -3409,35 +3409,35 @@ const Lr = ({
|
|
|
3409
3409
|
...a.props || {}
|
|
3410
3410
|
});
|
|
3411
3411
|
}
|
|
3412
|
-
const p = a.order && a.order[0] && a[a.order[0]], g = p && a[a.order[0]].order,
|
|
3412
|
+
const p = a.order && a.order[0] && a[a.order[0]], g = p && a[a.order[0]].order, b = h && window.location.pathname === a.href;
|
|
3413
3413
|
let v = {}, E = {};
|
|
3414
3414
|
if (p) {
|
|
3415
|
-
const
|
|
3416
|
-
onClick: (T) =>
|
|
3417
|
-
onFocus: () =>
|
|
3418
|
-
onBlur: () =>
|
|
3419
|
-
onMouseLeave: () =>
|
|
3420
|
-
onMouseEnter: () =>
|
|
3415
|
+
const j = a.menuId || e, _ = {
|
|
3416
|
+
onClick: (T) => U.events.onClick(T, { id: j, callback: i, isOpen: r[j] }),
|
|
3417
|
+
onFocus: () => U.events.onFocus({ id: j }),
|
|
3418
|
+
onBlur: () => U.events.onBlur({ id: j, callback: i }),
|
|
3419
|
+
onMouseLeave: () => U.events.onBlur({ id: j, callback: i }),
|
|
3420
|
+
onMouseEnter: () => U.events.onMouseEnter({ id: j, callback: i })
|
|
3421
3421
|
};
|
|
3422
3422
|
n && (g && (v = {
|
|
3423
3423
|
..._,
|
|
3424
3424
|
onKeyPress: (T) => {
|
|
3425
|
-
T.key === "Enter" &&
|
|
3425
|
+
T.key === "Enter" && U.events.onClick(T, { id: j, callback: i, isOpen: r[j] });
|
|
3426
3426
|
},
|
|
3427
3427
|
tabIndex: "0",
|
|
3428
3428
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3429
3429
|
"aria-haspopup": !0,
|
|
3430
|
-
"aria-expanded": r[
|
|
3431
|
-
"aria-controls":
|
|
3432
|
-
}), E = { hidden:
|
|
3430
|
+
"aria-expanded": r[j],
|
|
3431
|
+
"aria-controls": j
|
|
3432
|
+
}), E = { hidden: j in r ? !r[j] : !0 }), g || (E = {
|
|
3433
3433
|
...E,
|
|
3434
3434
|
..._
|
|
3435
3435
|
});
|
|
3436
3436
|
}
|
|
3437
|
-
return /* @__PURE__ */ s.jsxs("li", { className: S({ [a.className]: a.className, "has-submenu": p, parent: g, active:
|
|
3438
|
-
h ?
|
|
3439
|
-
a.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: a.order.map((
|
|
3440
|
-
if (!a[
|
|
3437
|
+
return /* @__PURE__ */ s.jsxs("li", { className: S({ [a.className]: a.className, "has-submenu": p, parent: g, active: b }), role: "none", ...v, children: [
|
|
3438
|
+
h ? C.createElement(m ? W : "a", h, u.formatMessage({ id: c })) : u.formatMessage({ id: c }),
|
|
3439
|
+
a.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: a.order.map((j) => {
|
|
3440
|
+
if (!a[j])
|
|
3441
3441
|
return null;
|
|
3442
3442
|
const _ = {
|
|
3443
3443
|
isLoggedIn: t,
|
|
@@ -3446,16 +3446,16 @@ const Lr = ({
|
|
|
3446
3446
|
callback: i,
|
|
3447
3447
|
doTrack: d ? o : null
|
|
3448
3448
|
};
|
|
3449
|
-
return a[
|
|
3450
|
-
u.formatMessage({ id: `${c}_${
|
|
3451
|
-
/* @__PURE__ */ s.jsx("ul", { children: a[
|
|
3452
|
-
] },
|
|
3449
|
+
return a[j].order ? /* @__PURE__ */ s.jsxs("li", { className: S({ [a[j].className]: a[j].className }), children: [
|
|
3450
|
+
u.formatMessage({ id: `${c}_${j}` }),
|
|
3451
|
+
/* @__PURE__ */ s.jsx("ul", { children: a[j].order.map((T) => /* @__PURE__ */ s.jsx(gt, { id: `${e}.${j}.${T}`, ..._ }, T)) })
|
|
3452
|
+
] }, j) : /* @__PURE__ */ s.jsx(gt, { id: `${e}.${j}`, ..._ }, j);
|
|
3453
3453
|
}) })
|
|
3454
3454
|
] }, e);
|
|
3455
3455
|
};
|
|
3456
|
-
const
|
|
3456
|
+
const Or = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 }) => {
|
|
3457
3457
|
const t = D(), n = je($e), r = vt(!0, !0), i = n && typeof n.id == "string", l = xt(
|
|
3458
|
-
() =>
|
|
3458
|
+
() => U.getIsDesktopVersion(i, r),
|
|
3459
3459
|
[i, r]
|
|
3460
3460
|
), [u, a] = gs(Js, {
|
|
3461
3461
|
headerIsVisible: !0,
|
|
@@ -3465,22 +3465,22 @@ const Ir = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 })
|
|
|
3465
3465
|
account: { desktop: !1, default: !1 }
|
|
3466
3466
|
}
|
|
3467
3467
|
}), { headerIsVisible: d, menus: o, focusElements: m } = u;
|
|
3468
|
-
|
|
3469
|
-
scrollPosition:
|
|
3468
|
+
Is({
|
|
3469
|
+
scrollPosition: Or[`height${l.navigation ? "_desktop" : ""}`],
|
|
3470
3470
|
callbacks: {
|
|
3471
3471
|
scrollUp: () => {
|
|
3472
|
-
!l && o.navigation ||
|
|
3472
|
+
!l && o.navigation || U.shouldChangeHeaderIsVisible(!0, o, a);
|
|
3473
3473
|
},
|
|
3474
3474
|
scrollDown: () => {
|
|
3475
|
-
!l && o.navigation ||
|
|
3475
|
+
!l && o.navigation || U.shouldChangeHeaderIsVisible(!1, o, a);
|
|
3476
3476
|
}
|
|
3477
3477
|
}
|
|
3478
3478
|
});
|
|
3479
3479
|
const c = (p, g) => {
|
|
3480
|
-
|
|
3480
|
+
U.handleMenus({ id: p, value: g, menus: o, dispatch: a });
|
|
3481
3481
|
}, h = de(null);
|
|
3482
3482
|
return He(() => {
|
|
3483
|
-
o.navigation &&
|
|
3483
|
+
o.navigation && U.autoFocus({
|
|
3484
3484
|
menu: "navigation",
|
|
3485
3485
|
navigationRef: h,
|
|
3486
3486
|
isDesktopVersion: l.navigation,
|
|
@@ -3488,7 +3488,7 @@ const Ir = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 })
|
|
|
3488
3488
|
dispatch: a
|
|
3489
3489
|
});
|
|
3490
3490
|
}, [o.navigation]), He(() => {
|
|
3491
|
-
o.account &&
|
|
3491
|
+
o.account && U.autoFocus({
|
|
3492
3492
|
menu: "account",
|
|
3493
3493
|
navigationRef: h,
|
|
3494
3494
|
isDesktopVersion: l.navigation,
|
|
@@ -3590,13 +3590,13 @@ const Ir = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 })
|
|
|
3590
3590
|
"button",
|
|
3591
3591
|
{
|
|
3592
3592
|
className: "account-button",
|
|
3593
|
-
onClick: (p) =>
|
|
3593
|
+
onClick: (p) => U.events.onClick(p, {
|
|
3594
3594
|
id: "account",
|
|
3595
3595
|
callback: c,
|
|
3596
3596
|
isOpen: o.account
|
|
3597
3597
|
}),
|
|
3598
|
-
onMouseEnter: () =>
|
|
3599
|
-
onMouseLeave: () =>
|
|
3598
|
+
onMouseEnter: () => U.events.onMouseEnter({ id: "account", callback: c }),
|
|
3599
|
+
onMouseLeave: () => U.events.onBlur({ id: "account", callback: c }),
|
|
3600
3600
|
"aria-haspopup": "true",
|
|
3601
3601
|
"aria-expanded": o.account,
|
|
3602
3602
|
"aria-controls": "navigation",
|
|
@@ -3629,7 +3629,7 @@ const Ir = { height: 67, height_desktop: 83 }, Xn = ({ showNavigation: e = !0 })
|
|
|
3629
3629
|
)
|
|
3630
3630
|
] });
|
|
3631
3631
|
};
|
|
3632
|
-
const Zn = ({ element: e = "section", children: t, className: n, ...r }) =>
|
|
3632
|
+
const Zn = ({ element: e = "section", children: t, className: n, ...r }) => C.createElement(
|
|
3633
3633
|
e,
|
|
3634
3634
|
{
|
|
3635
3635
|
className: S("modal", n),
|
|
@@ -3652,11 +3652,11 @@ const Kn = ({
|
|
|
3652
3652
|
className: m = "",
|
|
3653
3653
|
gtmContext: c = "Modal"
|
|
3654
3654
|
}) => {
|
|
3655
|
-
const h = D(), [p, g] =
|
|
3655
|
+
const h = D(), [p, g] = P(t), b = (E) => {
|
|
3656
3656
|
g(E), E ? (i(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3657
3657
|
};
|
|
3658
|
-
|
|
3659
|
-
|
|
3658
|
+
G(() => {
|
|
3659
|
+
b(t);
|
|
3660
3660
|
}, [t]);
|
|
3661
3661
|
const v = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
3662
3662
|
return /* @__PURE__ */ s.jsx("div", { className: S("overlay", { open: p }), children: /* @__PURE__ */ s.jsx(
|
|
@@ -3670,12 +3670,12 @@ const Kn = ({
|
|
|
3670
3670
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3671
3671
|
a && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: a }),
|
|
3672
3672
|
/* @__PURE__ */ s.jsx(
|
|
3673
|
-
|
|
3673
|
+
W,
|
|
3674
3674
|
{
|
|
3675
3675
|
variant: "tertiary",
|
|
3676
3676
|
size: "medium",
|
|
3677
3677
|
icon: { icon: "close" },
|
|
3678
|
-
onClick: () =>
|
|
3678
|
+
onClick: () => b(!1),
|
|
3679
3679
|
className: "gtm-trackable",
|
|
3680
3680
|
"data-gtm-event-type": "close-modal-click",
|
|
3681
3681
|
"data-gtm-event-context": c,
|
|
@@ -3693,7 +3693,7 @@ const Kn = ({
|
|
|
3693
3693
|
] })
|
|
3694
3694
|
}
|
|
3695
3695
|
) });
|
|
3696
|
-
},
|
|
3696
|
+
}, Ir = (e, t) => ({
|
|
3697
3697
|
"aria-haspopup": !0,
|
|
3698
3698
|
"aria-expanded": t,
|
|
3699
3699
|
"aria-controls": e
|
|
@@ -3755,10 +3755,10 @@ const Br = () => {
|
|
|
3755
3755
|
locale: a = "en"
|
|
3756
3756
|
}) => {
|
|
3757
3757
|
const { navigation: d = !0, footer: o = !0 } = i, { background: m = "default", variant: c = "default", circle: h = "default" } = l, p = Ls();
|
|
3758
|
-
|
|
3758
|
+
G(() => {
|
|
3759
3759
|
window.scrollTo(0, 0);
|
|
3760
3760
|
}, [p]);
|
|
3761
|
-
const g = ut(e, { locale: a }),
|
|
3761
|
+
const g = ut(e, { locale: a }), b = ut(t, {
|
|
3762
3762
|
locale: a
|
|
3763
3763
|
}), v = ut(n, {
|
|
3764
3764
|
locale: a
|
|
@@ -3771,8 +3771,8 @@ const Br = () => {
|
|
|
3771
3771
|
children: [
|
|
3772
3772
|
/* @__PURE__ */ s.jsx(Xn, { showNavigation: d }),
|
|
3773
3773
|
/* @__PURE__ */ s.jsxs("section", { id: "content-wrapper", children: [
|
|
3774
|
-
|
|
3775
|
-
|
|
3774
|
+
b && /* @__PURE__ */ s.jsx("div", { className: "additional-content prepended", children: b }),
|
|
3775
|
+
C.createElement(m === "bold" ? Zn : "div", {
|
|
3776
3776
|
id: "content",
|
|
3777
3777
|
children: g
|
|
3778
3778
|
})
|
|
@@ -3905,10 +3905,10 @@ const ve = "discussion_form_", qn = ({
|
|
|
3905
3905
|
},
|
|
3906
3906
|
gtmContext: d = "DiscussionForm"
|
|
3907
3907
|
}) => {
|
|
3908
|
-
var
|
|
3909
|
-
const o = D(), m = je($e), [c, h] =
|
|
3908
|
+
var H, F;
|
|
3909
|
+
const o = D(), m = je($e), [c, h] = P(
|
|
3910
3910
|
n.isEditing && n.isEditing.text || ""
|
|
3911
|
-
), [p, g] =
|
|
3911
|
+
), [p, g] = P(u.error || !1), [b, v] = P(!1), E = de(null);
|
|
3912
3912
|
if (r || (r = E), n.isLoading)
|
|
3913
3913
|
return /* @__PURE__ */ s.jsx(
|
|
3914
3914
|
Se,
|
|
@@ -3917,33 +3917,33 @@ const ve = "discussion_form_", qn = ({
|
|
|
3917
3917
|
"data-testid": "loading-placeholder"
|
|
3918
3918
|
}
|
|
3919
3919
|
);
|
|
3920
|
-
const
|
|
3921
|
-
const
|
|
3922
|
-
h(
|
|
3923
|
-
let
|
|
3924
|
-
!m || !m.id ?
|
|
3920
|
+
const j = (x) => {
|
|
3921
|
+
const Y = x.target.value;
|
|
3922
|
+
h(Y);
|
|
3923
|
+
let k;
|
|
3924
|
+
!m || !m.id ? k = Te(
|
|
3925
3925
|
o.formatMessage,
|
|
3926
3926
|
`${ve}error_loggedOut`,
|
|
3927
3927
|
e.type,
|
|
3928
3928
|
"action"
|
|
3929
|
-
) : t ?
|
|
3929
|
+
) : t ? Y.length >= i && (k = `${ve}error_tooLong`) : k = Te(
|
|
3930
3930
|
o.formatMessage,
|
|
3931
3931
|
`${ve}error_noPermission`,
|
|
3932
3932
|
e.type,
|
|
3933
3933
|
"action"
|
|
3934
|
-
),
|
|
3934
|
+
), k ? g(k) : p && g(!1);
|
|
3935
3935
|
};
|
|
3936
3936
|
let _ = `${e.type}-form`;
|
|
3937
3937
|
if (e.type === "response" || e.type === "reply") {
|
|
3938
|
-
const
|
|
3939
|
-
|
|
3938
|
+
const x = e.type === "response" ? ((H = e.slugs) == null ? void 0 : H.question) || "" : ((F = e.slugs) == null ? void 0 : F.answer) || "";
|
|
3939
|
+
x && (_ = `${_}-${x.slice(-15)}`);
|
|
3940
3940
|
}
|
|
3941
|
-
const T = async (
|
|
3942
|
-
var
|
|
3943
|
-
if (
|
|
3941
|
+
const T = async (x) => {
|
|
3942
|
+
var k;
|
|
3943
|
+
if (x.preventDefault(), x.stopPropagation(), !m || !m.id || !t || R)
|
|
3944
3944
|
return;
|
|
3945
3945
|
ct && clearTimeout(ct), v("submitting");
|
|
3946
|
-
const
|
|
3946
|
+
const Y = window.location.pathname;
|
|
3947
3947
|
try {
|
|
3948
3948
|
let w;
|
|
3949
3949
|
switch (e.type) {
|
|
@@ -3954,48 +3954,48 @@ const ve = "discussion_form_", qn = ({
|
|
|
3954
3954
|
w = await a.create({
|
|
3955
3955
|
title: c,
|
|
3956
3956
|
authorId: m && m.id,
|
|
3957
|
-
...(
|
|
3957
|
+
...(k = a.props) == null ? void 0 : k.create
|
|
3958
3958
|
});
|
|
3959
3959
|
break;
|
|
3960
3960
|
case "response":
|
|
3961
3961
|
w = await a.create(
|
|
3962
3962
|
{ question: e.slugs.question },
|
|
3963
|
-
{ body: c, authorId: m && m.id, contentPath:
|
|
3963
|
+
{ body: c, authorId: m && m.id, contentPath: Y }
|
|
3964
3964
|
);
|
|
3965
3965
|
break;
|
|
3966
3966
|
case "reply":
|
|
3967
3967
|
w = await a.create(
|
|
3968
3968
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3969
|
-
{ body: c, authorId: m && m.id, contentPath:
|
|
3969
|
+
{ body: c, authorId: m && m.id, contentPath: Y }
|
|
3970
3970
|
);
|
|
3971
3971
|
break;
|
|
3972
3972
|
default:
|
|
3973
3973
|
break;
|
|
3974
3974
|
}
|
|
3975
3975
|
await Xs(1e3), a.callback && await a.callback(w), ct = setTimeout(() => {
|
|
3976
|
-
h(""), v("submitted"),
|
|
3976
|
+
h(""), v("submitted"), N();
|
|
3977
3977
|
}, 500);
|
|
3978
3978
|
} catch (w) {
|
|
3979
|
-
const
|
|
3980
|
-
let
|
|
3981
|
-
|
|
3979
|
+
const V = w;
|
|
3980
|
+
let Z = `${ve}error`;
|
|
3981
|
+
V.message.includes("entry already exists") && (Z = Te(
|
|
3982
3982
|
o.formatMessage,
|
|
3983
3983
|
`${ve}error_alreadyExists`,
|
|
3984
3984
|
e.type,
|
|
3985
3985
|
"action"
|
|
3986
|
-
)),
|
|
3986
|
+
)), V.message.includes("429") ? Z = Te(
|
|
3987
3987
|
o.formatMessage,
|
|
3988
3988
|
`${ve}error_tooMany`,
|
|
3989
3989
|
e.type,
|
|
3990
3990
|
"action"
|
|
3991
|
-
) :
|
|
3991
|
+
) : V.message.includes("400") && (Z = `${ve}error`), g(Z), N();
|
|
3992
3992
|
}
|
|
3993
|
-
},
|
|
3993
|
+
}, N = () => {
|
|
3994
3994
|
ct = setTimeout(() => {
|
|
3995
3995
|
g(!1), v(!1);
|
|
3996
3996
|
}, 5e3);
|
|
3997
|
-
}, R = !c || !Gs(c),
|
|
3998
|
-
return (n.isEditing && !
|
|
3997
|
+
}, R = !c || !Gs(c), J = b === "submitting", I = [];
|
|
3998
|
+
return (n.isEditing && !J || u.cancel) && I.push({
|
|
3999
3999
|
variant: "secondary",
|
|
4000
4000
|
size: { mobile: "small", 600: "medium" },
|
|
4001
4001
|
onClick: a.handleCancel,
|
|
@@ -4004,25 +4004,25 @@ const ve = "discussion_form_", qn = ({
|
|
|
4004
4004
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
4005
4005
|
disabled: !u.cancel && (!m || !m.id || !c),
|
|
4006
4006
|
children: o.formatMessage({ id: `${ve}cancel` })
|
|
4007
|
-
}),
|
|
4007
|
+
}), I.push({
|
|
4008
4008
|
variant: "primary",
|
|
4009
4009
|
size: { mobile: "small", 600: "medium" },
|
|
4010
|
-
onClick: (
|
|
4010
|
+
onClick: (x) => {
|
|
4011
4011
|
if (n.isEditing) {
|
|
4012
4012
|
v("submitting"), a.handleSaveEdit && a.handleSaveEdit(
|
|
4013
4013
|
E.current && "value" in E.current ? E.current.value : ""
|
|
4014
4014
|
);
|
|
4015
4015
|
return;
|
|
4016
4016
|
}
|
|
4017
|
-
T(
|
|
4017
|
+
T(x);
|
|
4018
4018
|
},
|
|
4019
4019
|
className: "gtm-trackable",
|
|
4020
4020
|
"data-gtm-event-context": d,
|
|
4021
4021
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
4022
4022
|
"data-testid": "save-button",
|
|
4023
|
-
disabled: !m || !m.id || !t || R ||
|
|
4023
|
+
disabled: !m || !m.id || !t || R || J || n.isEditing && c === n.isEditing.text,
|
|
4024
4024
|
children: o.formatMessage({
|
|
4025
|
-
id: `${ve}${
|
|
4025
|
+
id: `${ve}${J ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
4026
4026
|
})
|
|
4027
4027
|
}), /* @__PURE__ */ s.jsxs(
|
|
4028
4028
|
"form",
|
|
@@ -4055,7 +4055,7 @@ const ve = "discussion_form_", qn = ({
|
|
|
4055
4055
|
e.type,
|
|
4056
4056
|
"action"
|
|
4057
4057
|
),
|
|
4058
|
-
onChange:
|
|
4058
|
+
onChange: j,
|
|
4059
4059
|
value: c,
|
|
4060
4060
|
maxLength: i,
|
|
4061
4061
|
"aria-invalid": !!p,
|
|
@@ -4065,7 +4065,7 @@ const ve = "discussion_form_", qn = ({
|
|
|
4065
4065
|
}
|
|
4066
4066
|
),
|
|
4067
4067
|
/* @__PURE__ */ s.jsx("small", { children: Te(o.formatMessage, `${ve}explainer`, e.type, "action", {
|
|
4068
|
-
a: (
|
|
4068
|
+
a: (x) => /* @__PURE__ */ s.jsx(
|
|
4069
4069
|
"a",
|
|
4070
4070
|
{
|
|
4071
4071
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -4074,12 +4074,12 @@ const ve = "discussion_form_", qn = ({
|
|
|
4074
4074
|
"data-gtm-event-context": d,
|
|
4075
4075
|
"data-gtm-event-type": "community-guidelines-link",
|
|
4076
4076
|
rel: "noreferrer",
|
|
4077
|
-
children:
|
|
4077
|
+
children: x
|
|
4078
4078
|
}
|
|
4079
4079
|
)
|
|
4080
4080
|
}) }),
|
|
4081
|
-
/* @__PURE__ */ s.jsx(kt, { buttons:
|
|
4082
|
-
|
|
4081
|
+
/* @__PURE__ */ s.jsx(kt, { buttons: I }),
|
|
4082
|
+
b === "submitted" && /* @__PURE__ */ s.jsx(Xt, { className: "success", "data-testid": "success", children: Te(o.formatMessage, `${ve}success`, e.type, "action") }),
|
|
4083
4083
|
p && /* @__PURE__ */ s.jsx(Xt, { id: "error-message", className: "error", "data-testid": "error", children: u.error ? u.error : typeof p == "string" ? p.includes(" ") ? p : o.formatMessage(
|
|
4084
4084
|
{ id: p },
|
|
4085
4085
|
{
|
|
@@ -4117,7 +4117,7 @@ const ve = "discussion_form_", qn = ({
|
|
|
4117
4117
|
showThread: !1,
|
|
4118
4118
|
showForm: !1
|
|
4119
4119
|
}, Et = Kt(Ur), Wr = ({ children: e }) => {
|
|
4120
|
-
const [t, n] =
|
|
4120
|
+
const [t, n] = P({
|
|
4121
4121
|
showThread: !1,
|
|
4122
4122
|
showForm: !1
|
|
4123
4123
|
});
|
|
@@ -4147,11 +4147,11 @@ const Ht = () => {
|
|
|
4147
4147
|
} } = {}
|
|
4148
4148
|
}) => {
|
|
4149
4149
|
const o = D();
|
|
4150
|
-
|
|
4150
|
+
G(() => {
|
|
4151
4151
|
p(i);
|
|
4152
4152
|
}, [i]);
|
|
4153
|
-
const [m, c] =
|
|
4154
|
-
if (
|
|
4153
|
+
const [m, c] = P(t), [h, p] = P(i), [g, b] = P(!1), [v, E] = P(!1), j = xt(() => Vr(n, Ut), [n]), _ = (N) => {
|
|
4154
|
+
if (N.preventDefault(), N.stopPropagation(), E(!1), Ke)
|
|
4155
4155
|
return Ht(), !1;
|
|
4156
4156
|
if (Ht(), g || !u)
|
|
4157
4157
|
return !1;
|
|
@@ -4159,8 +4159,8 @@ const Ht = () => {
|
|
|
4159
4159
|
}, T = async () => {
|
|
4160
4160
|
if (Ht(), g || !u)
|
|
4161
4161
|
return !1;
|
|
4162
|
-
let
|
|
4163
|
-
|
|
4162
|
+
let N = h ? m - 1 : m + 1;
|
|
4163
|
+
N < 0 && (N = 0), b(!0), c(N), p(!h);
|
|
4164
4164
|
try {
|
|
4165
4165
|
if (l && l.slugs) {
|
|
4166
4166
|
const R = zr(l.slugs);
|
|
@@ -4169,10 +4169,10 @@ const Ht = () => {
|
|
|
4169
4169
|
} catch {
|
|
4170
4170
|
c(t), p(i);
|
|
4171
4171
|
} finally {
|
|
4172
|
-
|
|
4172
|
+
b(!1);
|
|
4173
4173
|
}
|
|
4174
4174
|
};
|
|
4175
|
-
return
|
|
4175
|
+
return C.createElement(
|
|
4176
4176
|
e,
|
|
4177
4177
|
{
|
|
4178
4178
|
className: S("likes-wrapper text-medium action-button", { "show-spinner": g, "is-liked": h, disabled: !u }),
|
|
@@ -4191,7 +4191,7 @@ const Ht = () => {
|
|
|
4191
4191
|
},
|
|
4192
4192
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4193
4193
|
/* @__PURE__ */ s.jsx(
|
|
4194
|
-
|
|
4194
|
+
W,
|
|
4195
4195
|
{
|
|
4196
4196
|
variant: "tertiary",
|
|
4197
4197
|
size: "medium",
|
|
@@ -4210,16 +4210,16 @@ const Ht = () => {
|
|
|
4210
4210
|
),
|
|
4211
4211
|
/* @__PURE__ */ s.jsx("span", { className: S("number-of-likes", { "no-likes": m === 0 }), "data-testid": "number-of-likes", children: o.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: m }) }),
|
|
4212
4212
|
n && /* @__PURE__ */ s.jsx(qs, { isOpen: v, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
4213
|
-
|
|
4213
|
+
j.map((N) => typeof N == "string" || !N.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4214
4214
|
jt,
|
|
4215
4215
|
{
|
|
4216
|
-
href:
|
|
4216
|
+
href: N.id ? `/profiles/${N.id}` : void 0,
|
|
4217
4217
|
gtmContext: "Likes",
|
|
4218
4218
|
gtmType: "liked-name-click",
|
|
4219
4219
|
onClick: (R) => R == null ? void 0 : R.stopPropagation(),
|
|
4220
|
-
children:
|
|
4220
|
+
children: N.name
|
|
4221
4221
|
}
|
|
4222
|
-
) },
|
|
4222
|
+
) }, N.id || window.btoa(N.name))),
|
|
4223
4223
|
n.length > Ut && /* @__PURE__ */ s.jsx("li", { children: o.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Ut }) })
|
|
4224
4224
|
] }) })
|
|
4225
4225
|
] })
|
|
@@ -4254,14 +4254,14 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4254
4254
|
className: h,
|
|
4255
4255
|
gtmContext: p = "DiscussionAnswer",
|
|
4256
4256
|
children: g,
|
|
4257
|
-
isTruncated:
|
|
4257
|
+
isTruncated: b = !1
|
|
4258
4258
|
}) => {
|
|
4259
|
-
const v = D(), E = je($e),
|
|
4259
|
+
const v = D(), E = je($e), j = je(Et), [_, T] = P({
|
|
4260
4260
|
body: t && t.body || "",
|
|
4261
4261
|
isEditing: !1,
|
|
4262
4262
|
didEdit: t && t.isEdited || !1
|
|
4263
|
-
}), [
|
|
4264
|
-
if (
|
|
4263
|
+
}), [N, R] = P(!1), [J, I] = P("");
|
|
4264
|
+
if (G(() => {
|
|
4265
4265
|
T({
|
|
4266
4266
|
..._,
|
|
4267
4267
|
body: t && t.body || "",
|
|
@@ -4269,19 +4269,19 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4269
4269
|
});
|
|
4270
4270
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
4271
4271
|
return /* @__PURE__ */ s.jsx(Se, { className: "discussion-card discussion-post" });
|
|
4272
|
-
const { author:
|
|
4273
|
-
|
|
4272
|
+
const { author: H, canLike: F, createdAt: x, id: Y, likes: k = 0, userLiked: w, comments: V = 0 } = t, Z = b ? Qe(_.body, Gr) : _.body, se = E && E.id && typeof H != "string" && H.id && H.id === E.id || !1, re = typeof F == "boolean" ? F : n ? !se : !1, ae = async (L) => {
|
|
4273
|
+
L || (L = ""), I("");
|
|
4274
4274
|
try {
|
|
4275
|
-
if (!Ns(
|
|
4276
|
-
const oe = t.type === "question" ? { title:
|
|
4275
|
+
if (!Ns(L, _.body)) {
|
|
4276
|
+
const oe = t.type === "question" ? { title: L } : { body: L };
|
|
4277
4277
|
await a(En(t.slugs), oe);
|
|
4278
4278
|
}
|
|
4279
|
-
T({ body:
|
|
4279
|
+
T({ body: L, isEditing: !1, didEdit: !0 });
|
|
4280
4280
|
} catch {
|
|
4281
|
-
|
|
4281
|
+
I(`${De}form_error`);
|
|
4282
4282
|
}
|
|
4283
4283
|
}, q = () => {
|
|
4284
|
-
|
|
4284
|
+
j && j.updateConversation && j.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
4285
4285
|
const oe = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, he = document.getElementById(oe), ce = document.getElementById(`${oe}-input`);
|
|
4286
4286
|
ce && ce.focus(), he && he.scrollIntoView({ behavior: "smooth" });
|
|
4287
4287
|
}, 0);
|
|
@@ -4290,7 +4290,7 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4290
4290
|
try {
|
|
4291
4291
|
u(En(t.slugs));
|
|
4292
4292
|
} catch {
|
|
4293
|
-
|
|
4293
|
+
I("delete-error");
|
|
4294
4294
|
}
|
|
4295
4295
|
}, ue = [
|
|
4296
4296
|
{
|
|
@@ -4321,37 +4321,37 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4321
4321
|
},
|
|
4322
4322
|
{
|
|
4323
4323
|
text: v.formatMessage({ id: `${De}moreMenu_delete` }),
|
|
4324
|
-
onClick: (
|
|
4325
|
-
|
|
4324
|
+
onClick: (L) => {
|
|
4325
|
+
L.preventDefault(), L.stopPropagation(), R(!0);
|
|
4326
4326
|
},
|
|
4327
4327
|
icon: "trash",
|
|
4328
4328
|
className: "gtm-trackable",
|
|
4329
4329
|
"data-gtm-event-context": p,
|
|
4330
4330
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
4331
|
-
...
|
|
4331
|
+
...Ir(`delete-${t.slug}-modal`, N)
|
|
4332
4332
|
}
|
|
4333
|
-
),
|
|
4333
|
+
), C.createElement(e, {
|
|
4334
4334
|
className: S("discussion-post", h),
|
|
4335
4335
|
"data-testid": `discussion-${t.type}-thread`,
|
|
4336
4336
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4337
4337
|
/* @__PURE__ */ s.jsxs(
|
|
4338
4338
|
"div",
|
|
4339
4339
|
{
|
|
4340
|
-
id:
|
|
4340
|
+
id: Y || t.slug,
|
|
4341
4341
|
className: S("discussion-card", t.type, {
|
|
4342
4342
|
editing: _.isEditing,
|
|
4343
4343
|
"has-link": c.post && !_.isEditing
|
|
4344
4344
|
}),
|
|
4345
|
-
onClick: (
|
|
4346
|
-
!c.post || _.isEditing || (
|
|
4345
|
+
onClick: (L) => {
|
|
4346
|
+
!c.post || _.isEditing || (L.preventDefault(), L.stopPropagation(), window.location.href = c.post);
|
|
4347
4347
|
},
|
|
4348
4348
|
children: [
|
|
4349
4349
|
!_.isEditing && /* @__PURE__ */ s.jsx(
|
|
4350
4350
|
tn,
|
|
4351
4351
|
{
|
|
4352
|
-
member:
|
|
4353
|
-
additionalContent: { createdAt:
|
|
4354
|
-
className: typeof
|
|
4352
|
+
member: H,
|
|
4353
|
+
additionalContent: { createdAt: x, didEdit: _.didEdit },
|
|
4354
|
+
className: typeof H != "string" && H.id === i ? "highlighted" : "",
|
|
4355
4355
|
gtmContext: p,
|
|
4356
4356
|
gtmType: "profile-click"
|
|
4357
4357
|
}
|
|
@@ -4368,8 +4368,8 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4368
4368
|
},
|
|
4369
4369
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
4370
4370
|
forceShow: {
|
|
4371
|
-
error:
|
|
4372
|
-
{ id:
|
|
4371
|
+
error: J !== "" && J !== "delete-error" ? v.formatMessage(
|
|
4372
|
+
{ id: J },
|
|
4373
4373
|
{
|
|
4374
4374
|
action: v.formatMessage({
|
|
4375
4375
|
id: `discussion_action_${t.type}`
|
|
@@ -4381,7 +4381,7 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4381
4381
|
create: l,
|
|
4382
4382
|
handleSaveEdit: ae,
|
|
4383
4383
|
handleCancel: () => {
|
|
4384
|
-
|
|
4384
|
+
I(""), T({ ..._, isEditing: !1 });
|
|
4385
4385
|
}
|
|
4386
4386
|
},
|
|
4387
4387
|
gtmContext: `${p}Form`
|
|
@@ -4393,18 +4393,18 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4393
4393
|
className: "gtm-trackable",
|
|
4394
4394
|
"data-gtm-event-context": p,
|
|
4395
4395
|
"data-gtm-event-type": "title-click",
|
|
4396
|
-
children: /* @__PURE__ */ s.jsx(wn, { options: { overrides: { a: dr } }, children:
|
|
4396
|
+
children: /* @__PURE__ */ s.jsx(wn, { options: { overrides: { a: dr } }, children: Z })
|
|
4397
4397
|
}
|
|
4398
4398
|
) : /* @__PURE__ */ s.jsx(
|
|
4399
4399
|
wn,
|
|
4400
4400
|
{
|
|
4401
4401
|
options: {
|
|
4402
|
-
wrapper: t.type === "question" ? "h1" :
|
|
4402
|
+
wrapper: t.type === "question" ? "h1" : C.Fragment,
|
|
4403
4403
|
forceWrapper: t.type === "question",
|
|
4404
4404
|
forceInline: t.type === "question",
|
|
4405
4405
|
forceBlock: t.type !== "question"
|
|
4406
4406
|
},
|
|
4407
|
-
children:
|
|
4407
|
+
children: Z
|
|
4408
4408
|
}
|
|
4409
4409
|
),
|
|
4410
4410
|
!_.isEditing && /* @__PURE__ */ s.jsxs(
|
|
@@ -4417,7 +4417,7 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4417
4417
|
Yr,
|
|
4418
4418
|
{
|
|
4419
4419
|
element: "li",
|
|
4420
|
-
likes:
|
|
4420
|
+
likes: k,
|
|
4421
4421
|
isShort: !1,
|
|
4422
4422
|
userLiked: w,
|
|
4423
4423
|
content: { type: t.type, slugs: t.slugs },
|
|
@@ -4433,12 +4433,12 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4433
4433
|
"li",
|
|
4434
4434
|
{
|
|
4435
4435
|
className: "action-button",
|
|
4436
|
-
onClick: (
|
|
4437
|
-
|
|
4436
|
+
onClick: (L) => {
|
|
4437
|
+
L.preventDefault(), L.stopPropagation(), c.comments && (window.location.href = c.comments), typeof m == "function" && m();
|
|
4438
4438
|
},
|
|
4439
4439
|
children: [
|
|
4440
4440
|
/* @__PURE__ */ s.jsx(
|
|
4441
|
-
|
|
4441
|
+
W,
|
|
4442
4442
|
{
|
|
4443
4443
|
variant: "tertiary",
|
|
4444
4444
|
size: "medium",
|
|
@@ -4451,19 +4451,19 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4451
4451
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4452
4452
|
screenreaderText: v.formatMessage(
|
|
4453
4453
|
{ id: `${De}comments_screenReader` },
|
|
4454
|
-
{ count:
|
|
4454
|
+
{ count: V }
|
|
4455
4455
|
)
|
|
4456
4456
|
}
|
|
4457
4457
|
),
|
|
4458
4458
|
/* @__PURE__ */ s.jsx("span", { children: v.formatMessage(
|
|
4459
4459
|
{ id: `${De}comments` },
|
|
4460
|
-
{ count:
|
|
4460
|
+
{ count: V }
|
|
4461
4461
|
) })
|
|
4462
4462
|
]
|
|
4463
4463
|
}
|
|
4464
4464
|
),
|
|
4465
4465
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4466
|
-
|
|
4466
|
+
W,
|
|
4467
4467
|
{
|
|
4468
4468
|
variant: "tertiary",
|
|
4469
4469
|
size: "medium",
|
|
@@ -4491,11 +4491,11 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4491
4491
|
Kn,
|
|
4492
4492
|
{
|
|
4493
4493
|
id: `delete-${t.slug}-modal`,
|
|
4494
|
-
isOpen:
|
|
4494
|
+
isOpen: N,
|
|
4495
4495
|
functions: { onOpen: () => {
|
|
4496
4496
|
}, onClose: () => R(!1) },
|
|
4497
4497
|
forceShow: {
|
|
4498
|
-
error:
|
|
4498
|
+
error: J === "delete-error" ? v.formatMessage(
|
|
4499
4499
|
{ id: "discussion_delete_error" },
|
|
4500
4500
|
{
|
|
4501
4501
|
action: v.formatMessage({
|
|
@@ -4527,7 +4527,7 @@ const De = "discussion_", Gr = 280, St = ({
|
|
|
4527
4527
|
{
|
|
4528
4528
|
id: "discussion_delete_text",
|
|
4529
4529
|
values: {
|
|
4530
|
-
p: (
|
|
4530
|
+
p: (L) => /* @__PURE__ */ s.jsx("p", { children: L }),
|
|
4531
4531
|
action: v.formatMessage({
|
|
4532
4532
|
id: `discussion_action_${t.type}`
|
|
4533
4533
|
})
|
|
@@ -4547,11 +4547,11 @@ const Wt = "discussion_responses_", co = ({ type: e = "answer", responses: t = 0
|
|
|
4547
4547
|
] });
|
|
4548
4548
|
};
|
|
4549
4549
|
const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4550
|
-
const r = D(), i = de(null), l = je(Et), [u, a] =
|
|
4550
|
+
const r = D(), i = de(null), l = je(Et), [u, a] = P(
|
|
4551
4551
|
"closed"
|
|
4552
4552
|
/* Closed */
|
|
4553
4553
|
);
|
|
4554
|
-
|
|
4554
|
+
G(() => {
|
|
4555
4555
|
const c = i.current;
|
|
4556
4556
|
if (c)
|
|
4557
4557
|
return c.addEventListener("transitionend", d), () => {
|
|
@@ -4566,7 +4566,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4566
4566
|
].includes(u) ? "ready-to-close" : "opening"
|
|
4567
4567
|
/* Opening */
|
|
4568
4568
|
);
|
|
4569
|
-
}, [l.showThread]),
|
|
4569
|
+
}, [l.showThread]), G(() => {
|
|
4570
4570
|
u === "ready-to-close" && a(
|
|
4571
4571
|
"closing"
|
|
4572
4572
|
/* Closing */
|
|
@@ -4583,7 +4583,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4583
4583
|
});
|
|
4584
4584
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4585
4585
|
t && /* @__PURE__ */ s.jsx(
|
|
4586
|
-
|
|
4586
|
+
W,
|
|
4587
4587
|
{
|
|
4588
4588
|
variant: "secondary",
|
|
4589
4589
|
size: "small",
|
|
@@ -4726,15 +4726,15 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4726
4726
|
e.setQueryData(t, m.previousActivities);
|
|
4727
4727
|
}, onSuccess: (d, { activityId: o }) => {
|
|
4728
4728
|
const m = e.getQueryData(t), c = m == null ? void 0 : m.map((h) => {
|
|
4729
|
-
var p, g,
|
|
4729
|
+
var p, g, b, v, E;
|
|
4730
4730
|
if (h.id === o) {
|
|
4731
|
-
const
|
|
4731
|
+
const j = (b = (g = (p = h.own_reactions) == null ? void 0 : p.like) == null ? void 0 : g.find(
|
|
4732
4732
|
(_) => _.user_id === (n == null ? void 0 : n.id)
|
|
4733
|
-
)) == null ? void 0 :
|
|
4733
|
+
)) == null ? void 0 : b.id;
|
|
4734
4734
|
return h.own_reactions.like = (v = h.own_reactions.like) == null ? void 0 : v.filter(
|
|
4735
|
-
(_) => _.id !==
|
|
4735
|
+
(_) => _.id !== j
|
|
4736
4736
|
), h.latest_reactions.like = (E = h.latest_reactions.like) == null ? void 0 : E.filter(
|
|
4737
|
-
(_) => _.id !==
|
|
4737
|
+
(_) => _.id !== j
|
|
4738
4738
|
), h;
|
|
4739
4739
|
} else
|
|
4740
4740
|
return h;
|
|
@@ -4752,58 +4752,58 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4752
4752
|
}) => {
|
|
4753
4753
|
const c = D(), h = wt(), p = je($e), {
|
|
4754
4754
|
data: g,
|
|
4755
|
-
error:
|
|
4755
|
+
error: b,
|
|
4756
4756
|
isLoading: v,
|
|
4757
4757
|
isFetching: E
|
|
4758
4758
|
} = Tn({
|
|
4759
4759
|
queryKey: [e, t],
|
|
4760
4760
|
queryFn: r
|
|
4761
|
-
}),
|
|
4761
|
+
}), j = Zr({
|
|
4762
4762
|
queryClient: h,
|
|
4763
4763
|
queryKey: [e, t],
|
|
4764
4764
|
user: p,
|
|
4765
4765
|
mutationFn: i
|
|
4766
|
-
}), { mutate: _ } = ie(
|
|
4766
|
+
}), { mutate: _ } = ie(j), T = Kr({
|
|
4767
4767
|
queryClient: h,
|
|
4768
4768
|
queryKey: [e, t],
|
|
4769
4769
|
mutationFn: async (w) => await l(w)
|
|
4770
4770
|
}), {
|
|
4771
|
-
mutate:
|
|
4771
|
+
mutate: N
|
|
4772
4772
|
} = ie(T), R = qr({
|
|
4773
4773
|
queryClient: h,
|
|
4774
4774
|
queryKey: [e, t],
|
|
4775
4775
|
mutationFn: async ({ activityId: w }) => await u({ activityId: w })
|
|
4776
4776
|
}), {
|
|
4777
|
-
mutate:
|
|
4778
|
-
} = ie(R),
|
|
4777
|
+
mutate: J
|
|
4778
|
+
} = ie(R), I = ea({
|
|
4779
4779
|
queryClient: h,
|
|
4780
4780
|
queryKey: [e, t],
|
|
4781
4781
|
mutationFn: a
|
|
4782
4782
|
}), {
|
|
4783
|
-
mutate:
|
|
4784
|
-
} = ie(
|
|
4783
|
+
mutate: H
|
|
4784
|
+
} = ie(I), F = ta({
|
|
4785
4785
|
queryClient: h,
|
|
4786
4786
|
queryKey: [e, t],
|
|
4787
4787
|
user: p,
|
|
4788
4788
|
mutationFn: async ({ activityId: w }) => {
|
|
4789
4789
|
var se, re, ae;
|
|
4790
|
-
const
|
|
4790
|
+
const V = g && (g == null ? void 0 : g.find(
|
|
4791
4791
|
(q) => q.id === w
|
|
4792
|
-
)),
|
|
4792
|
+
)), Z = (ae = (re = (se = V == null ? void 0 : V.own_reactions) == null ? void 0 : se.like) == null ? void 0 : re.find(
|
|
4793
4793
|
(q) => q.user_id === (p == null ? void 0 : p.id)
|
|
4794
4794
|
)) == null ? void 0 : ae.id;
|
|
4795
|
-
await d({ reactionId:
|
|
4795
|
+
await d({ reactionId: Z || "", activityId: w });
|
|
4796
4796
|
}
|
|
4797
4797
|
}), {
|
|
4798
|
-
mutate:
|
|
4799
|
-
} = ie(
|
|
4800
|
-
({ activityId: w }) =>
|
|
4801
|
-
[
|
|
4802
|
-
),
|
|
4803
|
-
({ activityId: w }) =>
|
|
4804
|
-
[
|
|
4798
|
+
mutate: x
|
|
4799
|
+
} = ie(F), Y = Me(
|
|
4800
|
+
({ activityId: w }) => H({ activityId: w }),
|
|
4801
|
+
[H]
|
|
4802
|
+
), k = Me(
|
|
4803
|
+
({ activityId: w }) => x({ activityId: w }),
|
|
4804
|
+
[x]
|
|
4805
4805
|
);
|
|
4806
|
-
return
|
|
4806
|
+
return b ? /* @__PURE__ */ s.jsx(yt, { variant: "error", text: b.message }) : v ? /* @__PURE__ */ s.jsx(Se, { style: { height: "400px" } }) : /* @__PURE__ */ s.jsxs("section", { children: [
|
|
4807
4807
|
/* @__PURE__ */ s.jsx(
|
|
4808
4808
|
nn,
|
|
4809
4809
|
{
|
|
@@ -4819,8 +4819,8 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4819
4819
|
}
|
|
4820
4820
|
),
|
|
4821
4821
|
!E && Array.isArray(g) && (g == null ? void 0 : g.map((w) => {
|
|
4822
|
-
var se, re, ae, q, fe, ue,
|
|
4823
|
-
const
|
|
4822
|
+
var se, re, ae, q, fe, ue, L, oe, he, ce, xe, pe, be, ge;
|
|
4823
|
+
const V = ((se = w == null ? void 0 : w.actor) == null ? void 0 : se.id) === (p == null ? void 0 : p.id), Z = sn(n, V);
|
|
4824
4824
|
return /* @__PURE__ */ s.jsxs(Vt, { children: [
|
|
4825
4825
|
/* @__PURE__ */ s.jsx(
|
|
4826
4826
|
St,
|
|
@@ -4828,7 +4828,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4828
4828
|
content: {
|
|
4829
4829
|
type: "post",
|
|
4830
4830
|
body: w == null ? void 0 : w.content,
|
|
4831
|
-
canLike:
|
|
4831
|
+
canLike: Z,
|
|
4832
4832
|
createdAt: (w == null ? void 0 : w.time) || "",
|
|
4833
4833
|
slugs: { parentId: t, activityId: w == null ? void 0 : w.id },
|
|
4834
4834
|
slug: w == null ? void 0 : w.id,
|
|
@@ -4836,7 +4836,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4836
4836
|
id: (re = w == null ? void 0 : w.actor) == null ? void 0 : re.id,
|
|
4837
4837
|
name: `${(q = (ae = w == null ? void 0 : w.actor) == null ? void 0 : ae.data) == null ? void 0 : q.name}`,
|
|
4838
4838
|
organization: (ue = (fe = w == null ? void 0 : w.actor) == null ? void 0 : fe.data) == null ? void 0 : ue.organization,
|
|
4839
|
-
jobTitle: (oe = (
|
|
4839
|
+
jobTitle: (oe = (L = w == null ? void 0 : w.actor) == null ? void 0 : L.data) == null ? void 0 : oe.jobTitle,
|
|
4840
4840
|
image: {
|
|
4841
4841
|
thumbnail: ((ce = (he = w == null ? void 0 : w.actor) == null ? void 0 : he.data) == null ? void 0 : ce.thumbnail) || void 0
|
|
4842
4842
|
}
|
|
@@ -4845,10 +4845,10 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4845
4845
|
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4846
4846
|
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0,
|
|
4847
4847
|
peopleWhoLiked: ((be = w == null ? void 0 : w.latest_reactions) == null ? void 0 : be.like) && ((ge = w == null ? void 0 : w.latest_reactions) == null ? void 0 : ge.like.map((B) => {
|
|
4848
|
-
var
|
|
4848
|
+
var X, le;
|
|
4849
4849
|
return {
|
|
4850
4850
|
id: B == null ? void 0 : B.user_id,
|
|
4851
|
-
name: (le = (
|
|
4851
|
+
name: (le = (X = B == null ? void 0 : B.user) == null ? void 0 : X.data) == null ? void 0 : le.name
|
|
4852
4852
|
};
|
|
4853
4853
|
}))
|
|
4854
4854
|
},
|
|
@@ -4859,15 +4859,15 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4859
4859
|
functions: {
|
|
4860
4860
|
content: {
|
|
4861
4861
|
createContent: () => null,
|
|
4862
|
-
deleteContent: (B) =>
|
|
4863
|
-
updateContent: (B,
|
|
4862
|
+
deleteContent: (B) => J(B),
|
|
4863
|
+
updateContent: (B, X) => N({ activityInfo: B, content: X })
|
|
4864
4864
|
},
|
|
4865
4865
|
likes: {
|
|
4866
4866
|
createLike: () => {
|
|
4867
|
-
|
|
4867
|
+
Y({ activityId: w == null ? void 0 : w.id });
|
|
4868
4868
|
},
|
|
4869
4869
|
deleteLike: () => {
|
|
4870
|
-
|
|
4870
|
+
k({ activityId: w == null ? void 0 : w.id });
|
|
4871
4871
|
}
|
|
4872
4872
|
},
|
|
4873
4873
|
comments: {
|
|
@@ -4996,12 +4996,12 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4996
4996
|
if (!o)
|
|
4997
4997
|
return;
|
|
4998
4998
|
const m = (c = o.latest_reactions.reply) == null ? void 0 : c.map((h) => {
|
|
4999
|
-
var p, g,
|
|
4999
|
+
var p, g, b;
|
|
5000
5000
|
if (h.id === d) {
|
|
5001
5001
|
let v = (p = h.latest_children.reply) == null ? void 0 : p.filter(
|
|
5002
5002
|
(E) => E.user_id !== (n == null ? void 0 : n.id)
|
|
5003
5003
|
);
|
|
5004
|
-
return v = (
|
|
5004
|
+
return v = (b = (g = h == null ? void 0 : h.own_children) == null ? void 0 : g.reply) == null ? void 0 : b.filter(
|
|
5005
5005
|
(E) => E.user_id !== (n == null ? void 0 : n.id)
|
|
5006
5006
|
), v;
|
|
5007
5007
|
}
|
|
@@ -5077,7 +5077,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5077
5077
|
const d = (c = (m = a == null ? void 0 : a.latest_reactions) == null ? void 0 : m.reply) == null ? void 0 : c.map((h) => {
|
|
5078
5078
|
var p, g;
|
|
5079
5079
|
return h.id === u && (h.latest_children.reply = (p = h.latest_children.reply) == null ? void 0 : p.filter(
|
|
5080
|
-
(
|
|
5080
|
+
(b) => b.id !== l
|
|
5081
5081
|
), (g = h.children_counts) != null && g.reply && (h.children_counts.reply -= 1)), h;
|
|
5082
5082
|
});
|
|
5083
5083
|
return e.setQueryData(t, () => ({
|
|
@@ -5131,8 +5131,8 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5131
5131
|
const o = e.getQueryData(t), m = (c = o == null ? void 0 : o.latest_reactions.reply) == null ? void 0 : c.map((h) => {
|
|
5132
5132
|
var p;
|
|
5133
5133
|
return h.id === d && ((p = h.latest_children.reply) == null || p.map((g) => {
|
|
5134
|
-
var
|
|
5135
|
-
return g.id === a && ((
|
|
5134
|
+
var b;
|
|
5135
|
+
return g.id === a && ((b = g.children_counts) != null && b.like ? g.children_counts.like -= 1 : g.children_counts = { like: 0 }), g;
|
|
5136
5136
|
})), h;
|
|
5137
5137
|
});
|
|
5138
5138
|
return e.setQueryData(t, () => ({
|
|
@@ -5146,8 +5146,8 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5146
5146
|
const o = e.getQueryData(t), m = (c = o == null ? void 0 : o.latest_reactions.reply) == null ? void 0 : c.map((h) => {
|
|
5147
5147
|
var p;
|
|
5148
5148
|
return h.id === d.replyParentId && ((p = h.latest_children.reply) == null || p.map((g) => {
|
|
5149
|
-
var
|
|
5150
|
-
return g.id === d.replyId && ((
|
|
5149
|
+
var b, v;
|
|
5150
|
+
return g.id === d.replyId && ((b = g.own_children) != null && b.like && (g.own_children.like = g.own_children.like.filter(
|
|
5151
5151
|
(E) => E.user_id !== (r == null ? void 0 : r.id)
|
|
5152
5152
|
)), (v = g.latest_children) != null && v.like && (g.latest_children.like = g.latest_children.like.filter(
|
|
5153
5153
|
(E) => E.user_id !== (r == null ? void 0 : r.id)
|
|
@@ -5167,41 +5167,41 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5167
5167
|
replies: l,
|
|
5168
5168
|
functions: { create: u, edit: a, remove: d, join: o, leave: m, like: c, unlike: h }
|
|
5169
5169
|
}) => {
|
|
5170
|
-
const p = D(), g = wt(),
|
|
5170
|
+
const p = D(), g = wt(), b = je($e), v = je(Et), E = ia({
|
|
5171
5171
|
queryClient: g,
|
|
5172
5172
|
queryKey: [e, t, r],
|
|
5173
|
-
mutationFn: async (
|
|
5174
|
-
}), { mutate:
|
|
5173
|
+
mutationFn: async (k) => u({ replyId: n, content: k.body })
|
|
5174
|
+
}), { mutate: j } = ie(E), _ = ca({
|
|
5175
5175
|
queryClient: g,
|
|
5176
5176
|
queryKey: [e, t, r],
|
|
5177
5177
|
mutationFn: a
|
|
5178
5178
|
}), {
|
|
5179
5179
|
mutate: T
|
|
5180
|
-
} = ie(_),
|
|
5180
|
+
} = ie(_), N = la({
|
|
5181
5181
|
queryClient: g,
|
|
5182
5182
|
queryKey: [e, t, r],
|
|
5183
|
-
mutationFn: async ({ replyId:
|
|
5183
|
+
mutationFn: async ({ replyId: k }) => d({ replyId: k })
|
|
5184
5184
|
}), {
|
|
5185
5185
|
mutate: R
|
|
5186
|
-
} = ie(
|
|
5186
|
+
} = ie(N), J = da({
|
|
5187
5187
|
queryClient: g,
|
|
5188
5188
|
queryKey: [e, t, r],
|
|
5189
5189
|
mutationFn: c
|
|
5190
5190
|
}), {
|
|
5191
|
-
mutate:
|
|
5192
|
-
} = ie(
|
|
5191
|
+
mutate: I
|
|
5192
|
+
} = ie(J), H = ua({
|
|
5193
5193
|
queryClient: g,
|
|
5194
5194
|
queryKey: [e, t, r],
|
|
5195
|
-
user:
|
|
5195
|
+
user: b,
|
|
5196
5196
|
mutationFn: h
|
|
5197
5197
|
}), {
|
|
5198
|
-
mutate:
|
|
5199
|
-
} = ie(
|
|
5200
|
-
({ replyId:
|
|
5201
|
-
[
|
|
5202
|
-
),
|
|
5203
|
-
({ replyId:
|
|
5204
|
-
[
|
|
5198
|
+
mutate: F
|
|
5199
|
+
} = ie(H), x = Me(
|
|
5200
|
+
({ replyId: k, replyParentId: w }) => I({ replyId: k, replyParentId: w }),
|
|
5201
|
+
[I]
|
|
5202
|
+
), Y = Me(
|
|
5203
|
+
({ replyId: k, replyParentId: w }) => F({ replyId: k, replyParentId: w }),
|
|
5204
|
+
[F]
|
|
5205
5205
|
);
|
|
5206
5206
|
return /* @__PURE__ */ s.jsx(
|
|
5207
5207
|
Jr,
|
|
@@ -5213,7 +5213,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5213
5213
|
nn,
|
|
5214
5214
|
{
|
|
5215
5215
|
contentType: "reply",
|
|
5216
|
-
createPost: (
|
|
5216
|
+
createPost: (k, w) => j(w),
|
|
5217
5217
|
membershipRequiredToPost: {
|
|
5218
5218
|
isMember: !0,
|
|
5219
5219
|
required: !0,
|
|
@@ -5223,38 +5223,38 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5223
5223
|
}
|
|
5224
5224
|
}
|
|
5225
5225
|
),
|
|
5226
|
-
(l == null ? void 0 : l.length) === 0 || (l == null ? void 0 : l.map((
|
|
5227
|
-
var w,
|
|
5226
|
+
(l == null ? void 0 : l.length) === 0 || (l == null ? void 0 : l.map((k) => {
|
|
5227
|
+
var w, V, Z, se, re, ae, q, fe, ue, L, oe, he, ce, xe, pe, be, ge;
|
|
5228
5228
|
return /* @__PURE__ */ s.jsx(
|
|
5229
5229
|
St,
|
|
5230
5230
|
{
|
|
5231
5231
|
content: {
|
|
5232
5232
|
type: "reply",
|
|
5233
|
-
body: typeof
|
|
5234
|
-
createdAt:
|
|
5233
|
+
body: typeof k.data.content == "string" ? (w = k == null ? void 0 : k.data) == null ? void 0 : w.content : ((Z = (V = k == null ? void 0 : k.data) == null ? void 0 : V.content) == null ? void 0 : Z.text) || "",
|
|
5234
|
+
createdAt: k == null ? void 0 : k.created_at,
|
|
5235
5235
|
slugs: {
|
|
5236
5236
|
parentId: t,
|
|
5237
5237
|
activityId: r,
|
|
5238
|
-
replyParentId:
|
|
5239
|
-
reply:
|
|
5238
|
+
replyParentId: k == null ? void 0 : k.parent,
|
|
5239
|
+
reply: k == null ? void 0 : k.id
|
|
5240
5240
|
},
|
|
5241
5241
|
slug: "",
|
|
5242
5242
|
author: {
|
|
5243
|
-
id: (se =
|
|
5244
|
-
name: (ae = (re =
|
|
5245
|
-
organization: (fe = (q =
|
|
5246
|
-
jobTitle: (
|
|
5243
|
+
id: (se = k == null ? void 0 : k.user) == null ? void 0 : se.id,
|
|
5244
|
+
name: (ae = (re = k == null ? void 0 : k.user) == null ? void 0 : re.data) == null ? void 0 : ae.name,
|
|
5245
|
+
organization: (fe = (q = k == null ? void 0 : k.user) == null ? void 0 : q.data) == null ? void 0 : fe.organization,
|
|
5246
|
+
jobTitle: (L = (ue = k == null ? void 0 : k.user) == null ? void 0 : ue.data) == null ? void 0 : L.jobTitle,
|
|
5247
5247
|
image: {
|
|
5248
|
-
thumbnail: ((he = (oe =
|
|
5248
|
+
thumbnail: ((he = (oe = k == null ? void 0 : k.user) == null ? void 0 : oe.data) == null ? void 0 : he.thumbnail) || void 0
|
|
5249
5249
|
}
|
|
5250
5250
|
},
|
|
5251
|
-
userLiked: ((ce =
|
|
5252
|
-
likes: ((pe =
|
|
5253
|
-
peopleWhoLiked: ((be =
|
|
5254
|
-
var
|
|
5251
|
+
userLiked: ((ce = k == null ? void 0 : k.own_children) == null ? void 0 : ce.like) && ((xe = k == null ? void 0 : k.own_children) == null ? void 0 : xe.like.length) > 0,
|
|
5252
|
+
likes: ((pe = k == null ? void 0 : k.children_counts) == null ? void 0 : pe.like) || 0,
|
|
5253
|
+
peopleWhoLiked: ((be = k == null ? void 0 : k.latest_children) == null ? void 0 : be.like) && ((ge = k == null ? void 0 : k.latest_children) == null ? void 0 : ge.like.map((B) => {
|
|
5254
|
+
var X, le;
|
|
5255
5255
|
return {
|
|
5256
5256
|
id: B == null ? void 0 : B.user_id,
|
|
5257
|
-
name: (le = (
|
|
5257
|
+
name: (le = (X = B == null ? void 0 : B.user) == null ? void 0 : X.data) == null ? void 0 : le.name
|
|
5258
5258
|
};
|
|
5259
5259
|
}))
|
|
5260
5260
|
},
|
|
@@ -5262,20 +5262,20 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5262
5262
|
content: {
|
|
5263
5263
|
createContent: () => console.log("create"),
|
|
5264
5264
|
deleteContent: (B) => {
|
|
5265
|
-
const { replySlug:
|
|
5266
|
-
return R({ replyId:
|
|
5265
|
+
const { replySlug: X, replyParentId: le } = B;
|
|
5266
|
+
return R({ replyId: X, replyParentId: le });
|
|
5267
5267
|
},
|
|
5268
|
-
updateContent: (B,
|
|
5268
|
+
updateContent: (B, X) => T({ replyInfo: B, content: X })
|
|
5269
5269
|
},
|
|
5270
5270
|
likes: {
|
|
5271
|
-
createLike: () =>
|
|
5272
|
-
replyId:
|
|
5273
|
-
replyParentId:
|
|
5271
|
+
createLike: () => x({
|
|
5272
|
+
replyId: k == null ? void 0 : k.id,
|
|
5273
|
+
replyParentId: k == null ? void 0 : k.parent
|
|
5274
5274
|
}),
|
|
5275
5275
|
deleteLike: () => {
|
|
5276
|
-
var
|
|
5277
|
-
const B = ((
|
|
5278
|
-
return
|
|
5276
|
+
var X, le, ee;
|
|
5277
|
+
const B = ((X = k == null ? void 0 : k.own_children) == null ? void 0 : X.like) && ((ee = (le = k == null ? void 0 : k.own_children) == null ? void 0 : le.like[0]) == null ? void 0 : ee.id);
|
|
5278
|
+
return Y({
|
|
5279
5279
|
replyId: B || ""
|
|
5280
5280
|
});
|
|
5281
5281
|
}
|
|
@@ -5283,7 +5283,7 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5283
5283
|
comments: {}
|
|
5284
5284
|
}
|
|
5285
5285
|
},
|
|
5286
|
-
|
|
5286
|
+
k == null ? void 0 : k.id
|
|
5287
5287
|
);
|
|
5288
5288
|
}))
|
|
5289
5289
|
] })
|
|
@@ -5297,48 +5297,48 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5297
5297
|
isMember: i,
|
|
5298
5298
|
functions: { create: l, edit: u, remove: a, like: d, unlike: o, join: m, leave: c }
|
|
5299
5299
|
}) => {
|
|
5300
|
-
const h = D(), p = wt(), g = je($e),
|
|
5300
|
+
const h = D(), p = wt(), g = je($e), b = na({
|
|
5301
5301
|
queryClient: p,
|
|
5302
5302
|
queryKey: [e, t, n],
|
|
5303
|
-
mutationFn: async (
|
|
5304
|
-
}), { mutate: v } = ie(
|
|
5303
|
+
mutationFn: async (x) => l({ activityId: n, content: x.body })
|
|
5304
|
+
}), { mutate: v } = ie(b), E = sa({
|
|
5305
5305
|
queryClient: p,
|
|
5306
5306
|
queryKey: [e, t, n],
|
|
5307
|
-
mutationFn: async (
|
|
5307
|
+
mutationFn: async (x) => u(x)
|
|
5308
5308
|
}), {
|
|
5309
|
-
mutate:
|
|
5309
|
+
mutate: j
|
|
5310
5310
|
} = ie(E), _ = ra({
|
|
5311
5311
|
queryClient: p,
|
|
5312
5312
|
queryKey: [e, t, n],
|
|
5313
|
-
mutationFn: async ({ replyId:
|
|
5313
|
+
mutationFn: async ({ replyId: x }) => a({ replyId: x })
|
|
5314
5314
|
}), {
|
|
5315
5315
|
mutate: T
|
|
5316
|
-
} = ie(_),
|
|
5316
|
+
} = ie(_), N = aa({
|
|
5317
5317
|
queryClient: p,
|
|
5318
5318
|
queryKey: [e, t, n],
|
|
5319
5319
|
mutationFn: d
|
|
5320
5320
|
}), {
|
|
5321
5321
|
mutate: R
|
|
5322
|
-
} = ie(
|
|
5322
|
+
} = ie(N), J = oa({
|
|
5323
5323
|
queryClient: p,
|
|
5324
5324
|
queryKey: [e, t, n],
|
|
5325
5325
|
user: g,
|
|
5326
5326
|
mutationFn: o
|
|
5327
5327
|
}), {
|
|
5328
|
-
mutate:
|
|
5329
|
-
} = ie(
|
|
5330
|
-
({ replyId:
|
|
5328
|
+
mutate: I
|
|
5329
|
+
} = ie(J), H = Me(
|
|
5330
|
+
({ replyId: x }) => R({ replyId: x }),
|
|
5331
5331
|
[R]
|
|
5332
|
-
),
|
|
5333
|
-
({ replyId:
|
|
5334
|
-
[
|
|
5332
|
+
), F = Me(
|
|
5333
|
+
({ replyId: x }) => I({ replyId: x }),
|
|
5334
|
+
[I]
|
|
5335
5335
|
);
|
|
5336
5336
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5337
5337
|
/* @__PURE__ */ s.jsx(
|
|
5338
5338
|
nn,
|
|
5339
5339
|
{
|
|
5340
5340
|
contentType: "reply",
|
|
5341
|
-
createPost: (
|
|
5341
|
+
createPost: (x, Y) => v(Y),
|
|
5342
5342
|
membershipRequiredToPost: {
|
|
5343
5343
|
isMember: i,
|
|
5344
5344
|
required: !0,
|
|
@@ -5348,35 +5348,35 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5348
5348
|
}
|
|
5349
5349
|
}
|
|
5350
5350
|
),
|
|
5351
|
-
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((
|
|
5352
|
-
var w,
|
|
5353
|
-
const
|
|
5351
|
+
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
5352
|
+
var w, V, Z, se, re, ae, q, fe, ue, L, oe, he, ce, xe, pe, be, ge, B, X, le;
|
|
5353
|
+
const Y = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (g == null ? void 0 : g.id), k = sn(i, Y);
|
|
5354
5354
|
return /* @__PURE__ */ s.jsx(Wr, { children: /* @__PURE__ */ s.jsx(
|
|
5355
5355
|
St,
|
|
5356
5356
|
{
|
|
5357
5357
|
content: {
|
|
5358
5358
|
type: "reply",
|
|
5359
|
-
body: typeof
|
|
5360
|
-
canLike:
|
|
5361
|
-
createdAt:
|
|
5359
|
+
body: typeof x.data.content == "string" ? (V = x == null ? void 0 : x.data) == null ? void 0 : V.content : ((se = (Z = x == null ? void 0 : x.data) == null ? void 0 : Z.content) == null ? void 0 : se.text) || "",
|
|
5360
|
+
canLike: k,
|
|
5361
|
+
createdAt: x == null ? void 0 : x.created_at,
|
|
5362
5362
|
slugs: {
|
|
5363
5363
|
question: `${e}/${t}/${n}`,
|
|
5364
5364
|
parentId: t,
|
|
5365
|
-
reply:
|
|
5365
|
+
reply: x == null ? void 0 : x.id
|
|
5366
5366
|
},
|
|
5367
|
-
slug: `${e}/${t}/${n}#${
|
|
5367
|
+
slug: `${e}/${t}/${n}#${x == null ? void 0 : x.id}`,
|
|
5368
5368
|
author: {
|
|
5369
|
-
id: (re =
|
|
5370
|
-
name: (q = (ae =
|
|
5371
|
-
organization: (ue = (fe =
|
|
5372
|
-
jobTitle: (oe = (
|
|
5369
|
+
id: (re = x == null ? void 0 : x.user) == null ? void 0 : re.id,
|
|
5370
|
+
name: (q = (ae = x == null ? void 0 : x.user) == null ? void 0 : ae.data) == null ? void 0 : q.name,
|
|
5371
|
+
organization: (ue = (fe = x == null ? void 0 : x.user) == null ? void 0 : fe.data) == null ? void 0 : ue.organization,
|
|
5372
|
+
jobTitle: (oe = (L = x == null ? void 0 : x.user) == null ? void 0 : L.data) == null ? void 0 : oe.jobTitle,
|
|
5373
5373
|
image: {
|
|
5374
|
-
thumbnail: ((ce = (he =
|
|
5374
|
+
thumbnail: ((ce = (he = x == null ? void 0 : x.user) == null ? void 0 : he.data) == null ? void 0 : ce.thumbnail) || void 0
|
|
5375
5375
|
}
|
|
5376
5376
|
},
|
|
5377
|
-
userLiked: ((xe =
|
|
5378
|
-
likes: ((be =
|
|
5379
|
-
peopleWhoLiked: ((ge =
|
|
5377
|
+
userLiked: ((xe = x == null ? void 0 : x.own_children) == null ? void 0 : xe.like) && ((pe = x == null ? void 0 : x.own_children) == null ? void 0 : pe.like.length) > 0,
|
|
5378
|
+
likes: ((be = x == null ? void 0 : x.children_counts) == null ? void 0 : be.like) || 0,
|
|
5379
|
+
peopleWhoLiked: ((ge = x == null ? void 0 : x.latest_children) == null ? void 0 : ge.like) && ((B = x == null ? void 0 : x.latest_children) == null ? void 0 : B.like.map((ee) => {
|
|
5380
5380
|
var me, ke;
|
|
5381
5381
|
return {
|
|
5382
5382
|
id: ee == null ? void 0 : ee.user_id,
|
|
@@ -5391,14 +5391,14 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5391
5391
|
const { replySlug: me } = ee;
|
|
5392
5392
|
return T({ replyId: me });
|
|
5393
5393
|
},
|
|
5394
|
-
updateContent: (ee, me) =>
|
|
5394
|
+
updateContent: (ee, me) => j({ replyInfo: ee, content: me })
|
|
5395
5395
|
},
|
|
5396
5396
|
likes: {
|
|
5397
|
-
createLike: () =>
|
|
5397
|
+
createLike: () => H({ replyId: x == null ? void 0 : x.id }),
|
|
5398
5398
|
deleteLike: () => {
|
|
5399
5399
|
var me, ke, Ae;
|
|
5400
|
-
const ee = ((me =
|
|
5401
|
-
return
|
|
5400
|
+
const ee = ((me = x == null ? void 0 : x.own_children) == null ? void 0 : me.like) && ((Ae = (ke = x == null ? void 0 : x.own_children) == null ? void 0 : ke.like[0]) == null ? void 0 : Ae.id);
|
|
5401
|
+
return F({ replyId: ee || "" });
|
|
5402
5402
|
}
|
|
5403
5403
|
},
|
|
5404
5404
|
comments: {}
|
|
@@ -5408,10 +5408,10 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5408
5408
|
{
|
|
5409
5409
|
basePath: e,
|
|
5410
5410
|
parentId: t,
|
|
5411
|
-
replyParentId:
|
|
5411
|
+
replyParentId: x == null ? void 0 : x.id,
|
|
5412
5412
|
activityId: n,
|
|
5413
|
-
replyCount: ((
|
|
5414
|
-
replies: (le =
|
|
5413
|
+
replyCount: ((X = x == null ? void 0 : x.children_counts) == null ? void 0 : X.reply) || 0,
|
|
5414
|
+
replies: (le = x == null ? void 0 : x.latest_children) == null ? void 0 : le.reply,
|
|
5415
5415
|
isMember: i,
|
|
5416
5416
|
functions: {
|
|
5417
5417
|
create: l,
|
|
@@ -5425,8 +5425,8 @@ const Jr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
5425
5425
|
}
|
|
5426
5426
|
)
|
|
5427
5427
|
},
|
|
5428
|
-
|
|
5429
|
-
) },
|
|
5428
|
+
x == null ? void 0 : x.id
|
|
5429
|
+
) }, x == null ? void 0 : x.id);
|
|
5430
5430
|
}))
|
|
5431
5431
|
] });
|
|
5432
5432
|
}, ha = ({
|
|
@@ -5530,36 +5530,36 @@ const uo = ({
|
|
|
5530
5530
|
likeReply: h,
|
|
5531
5531
|
unlikeReply: p,
|
|
5532
5532
|
join: g,
|
|
5533
|
-
leave:
|
|
5533
|
+
leave: b
|
|
5534
5534
|
}
|
|
5535
5535
|
}) => {
|
|
5536
|
-
var re, ae, q, fe, ue,
|
|
5537
|
-
const v = D(), E = je($e),
|
|
5536
|
+
var re, ae, q, fe, ue, L, oe, he, ce, xe, pe, be, ge, B, X, le, ee, me, ke, Ae, ze, Fe, et;
|
|
5537
|
+
const v = D(), E = je($e), j = wt(), {
|
|
5538
5538
|
data: _,
|
|
5539
5539
|
isLoading: T,
|
|
5540
|
-
isFetching:
|
|
5540
|
+
isFetching: N
|
|
5541
5541
|
} = Tn({
|
|
5542
5542
|
queryKey: [e, t, n],
|
|
5543
5543
|
queryFn: i
|
|
5544
5544
|
}), R = ha({
|
|
5545
|
-
queryClient:
|
|
5545
|
+
queryClient: j,
|
|
5546
5546
|
queryKey: [e, t, n],
|
|
5547
5547
|
mutationFn: async (te) => await l(te)
|
|
5548
5548
|
}), {
|
|
5549
|
-
mutate:
|
|
5550
|
-
} = ie(R),
|
|
5551
|
-
queryClient:
|
|
5549
|
+
mutate: J
|
|
5550
|
+
} = ie(R), I = pa({
|
|
5551
|
+
queryClient: j,
|
|
5552
5552
|
queryKey: [e, t, n],
|
|
5553
5553
|
mutationFn: async ({ activityId: te }) => u({ activityId: te }),
|
|
5554
5554
|
redirectUrl: `${e}/${t}`
|
|
5555
|
-
}), { mutate:
|
|
5556
|
-
queryClient:
|
|
5555
|
+
}), { mutate: H } = ie(I), F = ga({
|
|
5556
|
+
queryClient: j,
|
|
5557
5557
|
queryKey: [e, t, n],
|
|
5558
5558
|
mutationFn: a
|
|
5559
5559
|
}), {
|
|
5560
|
-
mutate:
|
|
5561
|
-
} = ie(
|
|
5562
|
-
queryClient:
|
|
5560
|
+
mutate: x
|
|
5561
|
+
} = ie(F), Y = _a({
|
|
5562
|
+
queryClient: j,
|
|
5563
5563
|
queryKey: [e, t, n],
|
|
5564
5564
|
user: E,
|
|
5565
5565
|
mutationFn: async () => {
|
|
@@ -5571,15 +5571,15 @@ const uo = ({
|
|
|
5571
5571
|
},
|
|
5572
5572
|
activity: _
|
|
5573
5573
|
}), {
|
|
5574
|
-
mutate:
|
|
5575
|
-
} = ie(
|
|
5576
|
-
({ activityId: te }) =>
|
|
5577
|
-
[
|
|
5578
|
-
),
|
|
5579
|
-
async ({ activityId: te }) =>
|
|
5580
|
-
[
|
|
5574
|
+
mutate: k
|
|
5575
|
+
} = ie(Y), w = Me(
|
|
5576
|
+
({ activityId: te }) => x({ activityId: te }),
|
|
5577
|
+
[x]
|
|
5578
|
+
), V = Me(
|
|
5579
|
+
async ({ activityId: te }) => k({ activityId: te }),
|
|
5580
|
+
[k]
|
|
5581
5581
|
);
|
|
5582
|
-
if (T ||
|
|
5582
|
+
if (T || N)
|
|
5583
5583
|
return /* @__PURE__ */ s.jsx(Se, { style: { height: "400px" } });
|
|
5584
5584
|
if (!_)
|
|
5585
5585
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -5589,7 +5589,7 @@ const uo = ({
|
|
|
5589
5589
|
text: v.formatMessage({ id: "activitySection_notFoundError" })
|
|
5590
5590
|
}
|
|
5591
5591
|
);
|
|
5592
|
-
const
|
|
5592
|
+
const Z = ((re = _ == null ? void 0 : _.actor) == null ? void 0 : re.id) === (E == null ? void 0 : E.id), se = sn(r, Z);
|
|
5593
5593
|
return /* @__PURE__ */ s.jsx(
|
|
5594
5594
|
St,
|
|
5595
5595
|
{
|
|
@@ -5608,13 +5608,13 @@ const uo = ({
|
|
|
5608
5608
|
author: {
|
|
5609
5609
|
id: (ae = _ == null ? void 0 : _.actor) == null ? void 0 : ae.id,
|
|
5610
5610
|
name: ((q = _ == null ? void 0 : _.actor) == null ? void 0 : q.data) && ((ue = (fe = _ == null ? void 0 : _.actor) == null ? void 0 : fe.data) == null ? void 0 : ue.name),
|
|
5611
|
-
organization: ((
|
|
5611
|
+
organization: ((L = _ == null ? void 0 : _.actor) == null ? void 0 : L.data) && ((he = (oe = _ == null ? void 0 : _.actor) == null ? void 0 : oe.data) == null ? void 0 : he.organization),
|
|
5612
5612
|
jobTitle: ((ce = _ == null ? void 0 : _.actor) == null ? void 0 : ce.data) && ((pe = (xe = _ == null ? void 0 : _.actor) == null ? void 0 : xe.data) == null ? void 0 : pe.jobTitle),
|
|
5613
5613
|
image: {
|
|
5614
5614
|
thumbnail: ((be = _ == null ? void 0 : _.actor) == null ? void 0 : be.data) && ((B = (ge = _ == null ? void 0 : _.actor) == null ? void 0 : ge.data) == null ? void 0 : B.thumbnail) || void 0
|
|
5615
5615
|
}
|
|
5616
5616
|
},
|
|
5617
|
-
userLiked: ((
|
|
5617
|
+
userLiked: ((X = _ == null ? void 0 : _.own_reactions) == null ? void 0 : X.like) && ((le = _ == null ? void 0 : _.own_reactions) == null ? void 0 : le.like.length) > 0,
|
|
5618
5618
|
likes: _ && ((ee = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : ee.like),
|
|
5619
5619
|
comments: _ && ((me = _ == null ? void 0 : _.reaction_counts) == null ? void 0 : me.reply),
|
|
5620
5620
|
peopleWhoLiked: ((ke = _ == null ? void 0 : _.latest_reactions) == null ? void 0 : ke.like) && ((Ae = _ == null ? void 0 : _.latest_reactions) == null ? void 0 : Ae.like.map((te) => {
|
|
@@ -5629,12 +5629,12 @@ const uo = ({
|
|
|
5629
5629
|
functions: {
|
|
5630
5630
|
content: {
|
|
5631
5631
|
createContent: () => console.log("create"),
|
|
5632
|
-
deleteContent: () =>
|
|
5633
|
-
updateContent: (te, Ee) =>
|
|
5632
|
+
deleteContent: () => H({ activityId: n }),
|
|
5633
|
+
updateContent: (te, Ee) => J({ activityInfo: te, content: Ee })
|
|
5634
5634
|
},
|
|
5635
5635
|
likes: {
|
|
5636
5636
|
createLike: () => w({ activityId: n }),
|
|
5637
|
-
deleteLike: () =>
|
|
5637
|
+
deleteLike: () => V({ activityId: n })
|
|
5638
5638
|
},
|
|
5639
5639
|
comments: {
|
|
5640
5640
|
openComments: () => {
|
|
@@ -5662,7 +5662,7 @@ const uo = ({
|
|
|
5662
5662
|
like: h,
|
|
5663
5663
|
unlike: p,
|
|
5664
5664
|
join: g,
|
|
5665
|
-
leave:
|
|
5665
|
+
leave: b
|
|
5666
5666
|
}
|
|
5667
5667
|
}
|
|
5668
5668
|
)
|
|
@@ -5794,12 +5794,12 @@ const uo = ({
|
|
|
5794
5794
|
}
|
|
5795
5795
|
}, ba = ({ data: e, cta: t, link: n, gtmContext: r }) => {
|
|
5796
5796
|
var g;
|
|
5797
|
-
const i = D(), [l, u] =
|
|
5797
|
+
const i = D(), [l, u] = P({
|
|
5798
5798
|
loading: !1,
|
|
5799
5799
|
registered: e.registered || !1
|
|
5800
5800
|
});
|
|
5801
|
-
|
|
5802
|
-
e.registered && u((
|
|
5801
|
+
G(() => {
|
|
5802
|
+
e.registered && u((b) => ({ ...b, registered: !0 }));
|
|
5803
5803
|
}, [e.registered]);
|
|
5804
5804
|
const { startDate: a, dateHasPassed: d, pill: o, slug: m } = e, c = e.contentType;
|
|
5805
5805
|
let h = "";
|
|
@@ -5816,7 +5816,7 @@ const uo = ({
|
|
|
5816
5816
|
);
|
|
5817
5817
|
if (c === "people")
|
|
5818
5818
|
return /* @__PURE__ */ s.jsx(
|
|
5819
|
-
|
|
5819
|
+
W,
|
|
5820
5820
|
{
|
|
5821
5821
|
variant: "tertiary",
|
|
5822
5822
|
size: "small",
|
|
@@ -5829,30 +5829,30 @@ const uo = ({
|
|
|
5829
5829
|
);
|
|
5830
5830
|
const p = ["microcourse", "event"];
|
|
5831
5831
|
if (t && t.onClick && p.includes(c) && o !== "premium") {
|
|
5832
|
-
const
|
|
5833
|
-
if (E.preventDefault(), E.stopPropagation(), !(
|
|
5834
|
-
u((
|
|
5832
|
+
const b = l.loading || l.registered, v = async (E) => {
|
|
5833
|
+
if (E.preventDefault(), E.stopPropagation(), !(b || !t || !t.onClick)) {
|
|
5834
|
+
u((j) => ({ ...j, loading: !0 }));
|
|
5835
5835
|
try {
|
|
5836
|
-
const
|
|
5837
|
-
u(
|
|
5836
|
+
const j = await t.onClick(e);
|
|
5837
|
+
u(j === "success" ? () => ({ registered: !0, loading: !1 }) : (_) => ({ ..._, loading: !1 }));
|
|
5838
5838
|
} catch {
|
|
5839
5839
|
u((_) => ({ ..._, loading: !1 }));
|
|
5840
5840
|
}
|
|
5841
5841
|
}
|
|
5842
5842
|
};
|
|
5843
5843
|
return /* @__PURE__ */ s.jsx(
|
|
5844
|
-
|
|
5844
|
+
W,
|
|
5845
5845
|
{
|
|
5846
5846
|
onClick: v,
|
|
5847
5847
|
className: "gtm-trackable",
|
|
5848
5848
|
size: "small",
|
|
5849
5849
|
styling: { fullWidth: !0 },
|
|
5850
|
-
disabled:
|
|
5850
|
+
disabled: b,
|
|
5851
5851
|
"data-gtm-event-context": `${r}Page-${c}: ${m}`,
|
|
5852
5852
|
"data-gtm-event-type": `${r}-${c}-register-click`,
|
|
5853
5853
|
"data-testid": "in-card-button",
|
|
5854
5854
|
children: i.formatMessage({
|
|
5855
|
-
id: `card_cta_${c}${
|
|
5855
|
+
id: `card_cta_${c}${b ? `_${l.loading ? "loading" : "done"}` : ""}`
|
|
5856
5856
|
})
|
|
5857
5857
|
}
|
|
5858
5858
|
);
|
|
@@ -5881,15 +5881,15 @@ const va = {
|
|
|
5881
5881
|
gtmContext: i = "Carousel",
|
|
5882
5882
|
className: l = ""
|
|
5883
5883
|
}) => {
|
|
5884
|
-
const u = D(), a = je($e), d = a && typeof a.id == "string", [o, m] =
|
|
5884
|
+
const u = D(), a = je($e), d = a && typeof a.id == "string", [o, m] = P({
|
|
5885
5885
|
data: null,
|
|
5886
5886
|
isLoading: !0
|
|
5887
5887
|
}), { data: c, isLoading: h } = o, p = Me(() => {
|
|
5888
|
-
n(t, d).then((
|
|
5889
|
-
m(() => ({ data:
|
|
5890
|
-
}).catch(() => m((
|
|
5888
|
+
n(t, d).then((I) => {
|
|
5889
|
+
m(() => ({ data: I, isLoading: !1 }));
|
|
5890
|
+
}).catch(() => m((I) => ({ ...I, isLoading: !1 })));
|
|
5891
5891
|
}, [e]);
|
|
5892
|
-
if (
|
|
5892
|
+
if (G(() => {
|
|
5893
5893
|
p();
|
|
5894
5894
|
}, []), h || !c)
|
|
5895
5895
|
return /* @__PURE__ */ s.jsx(
|
|
@@ -5904,20 +5904,20 @@ const va = {
|
|
|
5904
5904
|
if (!g || !_t[g])
|
|
5905
5905
|
return /* @__PURE__ */ s.jsx(Se, { element: "li", className: "card-wrapper" });
|
|
5906
5906
|
const {
|
|
5907
|
-
basePath:
|
|
5907
|
+
basePath: b = "",
|
|
5908
5908
|
className: v,
|
|
5909
5909
|
length: E,
|
|
5910
|
-
gtmEvent:
|
|
5911
|
-
} = _t[g], _ = Fn(`card_label_${g}`) ? u.formatMessage({ id: `card_label_${g}` }) : !1, T = c.slug ? `${
|
|
5910
|
+
gtmEvent: j
|
|
5911
|
+
} = _t[g], _ = Fn(`card_label_${g}`) ? u.formatMessage({ id: `card_label_${g}` }) : !1, T = c.slug ? `${b}${c.slug}` : !1, N = { ...va, ...E };
|
|
5912
5912
|
let R = { className: "card" };
|
|
5913
5913
|
T && (R = {
|
|
5914
5914
|
href: T,
|
|
5915
5915
|
className: "card gtm-trackable",
|
|
5916
5916
|
"data-gtm-event-context": `${i}-CarouselCard`,
|
|
5917
|
-
"data-gtm-event-type": `${
|
|
5917
|
+
"data-gtm-event-type": `${j}-click`,
|
|
5918
5918
|
"data-testid": "link"
|
|
5919
5919
|
}, c.openInNewTab && (R.target = "_blank"));
|
|
5920
|
-
const
|
|
5920
|
+
const J = c.customIcon ? { "--custom-icon": wa(c.customIcon) } : {};
|
|
5921
5921
|
return /* @__PURE__ */ s.jsx(
|
|
5922
5922
|
"li",
|
|
5923
5923
|
{
|
|
@@ -5927,9 +5927,9 @@ const va = {
|
|
|
5927
5927
|
"has-custom-icon": c.customIcon,
|
|
5928
5928
|
"has-image": c.banner
|
|
5929
5929
|
}),
|
|
5930
|
-
style:
|
|
5930
|
+
style: J,
|
|
5931
5931
|
"data-testid": `${g}-card`,
|
|
5932
|
-
children:
|
|
5932
|
+
children: C.createElement(
|
|
5933
5933
|
T ? "a" : "div",
|
|
5934
5934
|
R,
|
|
5935
5935
|
/* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
@@ -5966,14 +5966,14 @@ const va = {
|
|
|
5966
5966
|
"data-testid": "contributors"
|
|
5967
5967
|
}
|
|
5968
5968
|
),
|
|
5969
|
-
c.partner && /* @__PURE__ */ s.jsx("p", { className: "partners", "data-testid": "partners", children: Qe(c.partner.title,
|
|
5969
|
+
c.partner && /* @__PURE__ */ s.jsx("p", { className: "partners", "data-testid": "partners", children: Qe(c.partner.title, N.partner) }),
|
|
5970
5970
|
/* Text */
|
|
5971
|
-
["title", "text", "secondaryText"].map((
|
|
5972
|
-
const
|
|
5973
|
-
if (!
|
|
5971
|
+
["title", "text", "secondaryText"].map((I) => {
|
|
5972
|
+
const H = c[I];
|
|
5973
|
+
if (!H)
|
|
5974
5974
|
return null;
|
|
5975
|
-
const
|
|
5976
|
-
return /* @__PURE__ */ s.jsx("p", { className:
|
|
5975
|
+
const F = Bs(I);
|
|
5976
|
+
return /* @__PURE__ */ s.jsx("p", { className: F, "data-testid": F, children: Qe(H, N[I]) }, I);
|
|
5977
5977
|
}),
|
|
5978
5978
|
/* @__PURE__ */ s.jsx(xa, { type: v || "", data: c }),
|
|
5979
5979
|
/* @__PURE__ */ s.jsx(ba, { data: c, cta: r, link: T || "", gtmContext: i })
|
|
@@ -6058,7 +6058,7 @@ const lt = "notFoundError_", fo = () => {
|
|
|
6058
6058
|
})
|
|
6059
6059
|
}
|
|
6060
6060
|
),
|
|
6061
|
-
/* @__PURE__ */ s.jsx(
|
|
6061
|
+
/* @__PURE__ */ s.jsx(W, { href: "/solution-articles/", children: e.formatMessage({ id: `${lt}cta` }) })
|
|
6062
6062
|
] })
|
|
6063
6063
|
},
|
|
6064
6064
|
reportError: () => {
|
|
@@ -6078,10 +6078,10 @@ export {
|
|
|
6078
6078
|
nn as AddPost,
|
|
6079
6079
|
Ha as BannerSection,
|
|
6080
6080
|
Xa as Breadcrumbs,
|
|
6081
|
-
|
|
6081
|
+
W as Button,
|
|
6082
6082
|
kt as ButtonWrapper,
|
|
6083
6083
|
_r as CacheProvider,
|
|
6084
|
-
|
|
6084
|
+
On as CollapsibleSection,
|
|
6085
6085
|
Cr as Columns,
|
|
6086
6086
|
Ja as CommunityDetails,
|
|
6087
6087
|
Un as Contributors,
|
|
@@ -6150,7 +6150,7 @@ export {
|
|
|
6150
6150
|
$e as UserContext,
|
|
6151
6151
|
kr as UserProvider,
|
|
6152
6152
|
_e as VisuallyHidden,
|
|
6153
|
-
|
|
6153
|
+
Ir as addAriaProps,
|
|
6154
6154
|
Hn as getMember,
|
|
6155
6155
|
pt as headerData,
|
|
6156
6156
|
mo as mapGetStreamData,
|
|
@@ -6158,6 +6158,6 @@ export {
|
|
|
6158
6158
|
Ls as useCurrentPath,
|
|
6159
6159
|
He as useEffectAfterMount,
|
|
6160
6160
|
vt as useElementWidth,
|
|
6161
|
-
|
|
6162
|
-
|
|
6161
|
+
Is as useScrollListener,
|
|
6162
|
+
Ia as useScrollToHash
|
|
6163
6163
|
};
|