@apolitical/component-library 1.13.7-beta.0 → 1.14.0
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/cards/card/card.d.ts +3 -0
- package/cards/card/card.data.d.ts +11 -0
- package/cards/card/card.helpers.d.ts +5 -0
- package/cards/card/components/details/details.d.ts +9 -0
- package/cards/card/components/details/index.d.ts +1 -0
- package/cards/card/components/index.d.ts +2 -0
- package/cards/card/components/links/index.d.ts +1 -0
- package/cards/card/components/links/links.d.ts +13 -0
- package/cards/card/index.d.ts +1 -0
- package/cards/card-block/card-block.d.ts +15 -0
- package/cards/card-block/index.d.ts +1 -0
- package/cards/cards.types.d.ts +133 -0
- package/cards/carousel/carousel.d.ts +3 -0
- package/cards/carousel/components/carousel/carousel.d.ts +8 -0
- package/cards/carousel/components/carousel/carousel.helpers.d.ts +1 -0
- package/cards/carousel/components/carousel/index.d.ts +1 -0
- package/cards/carousel/components/index.d.ts +2 -0
- package/cards/carousel/components/title/index.d.ts +1 -0
- package/cards/carousel/components/title/title.d.ts +13 -0
- package/cards/carousel/index.d.ts +1 -0
- package/cards/index.d.ts +3 -0
- package/cards/mocks/card.d.ts +235 -0
- package/cards/mocks/carousel.d.ts +58 -0
- package/cards/mocks/index.d.ts +3 -0
- package/cards/mocks/mocks.helpers.d.ts +500 -0
- package/helpers/cases.d.ts +1 -0
- package/helpers/dates.d.ts +1 -2
- package/helpers/index.d.ts +1 -0
- package/helpers/intl.d.ts +1 -0
- package/hooks/index.d.ts +1 -1
- package/hooks/{use-screen-width.d.ts → use-element-width.d.ts} +1 -1
- package/index.js +13 -13
- package/index.mjs +1299 -1172
- package/layout/content-layout/columns/columns.d.ts +1 -1
- package/loaders/loading-state/loading-state.d.ts +8 -2
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_text.scss +41 -15
- package/styles/base/_titles.scss +22 -0
- package/styles/mixins/_containers.scss +18 -0
- package/styles/mixins/_index.scss +1 -0
- package/styles/variables/colors/_theme.scss +33 -1
- package/text/empty-state-box/empty-state-box.d.ts +1 -1
- package/text/pill/pill.d.ts +6 -4
- package/user/contributors/contributors.d.ts +7 -1
- package/user/profile-picture/profile-picture.d.ts +2 -0
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import D, { memo as De, useState as F, useEffect as X, useRef as ne, useMemo as et, Children as Mt, createContext as Ft, useContext as ge, Fragment as Ct, useCallback as ke, useReducer as rs, Suspense as os } from "react";
|
|
2
2
|
import as from "lodash.clonedeep";
|
|
3
3
|
import is from "lodash.set";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as
|
|
4
|
+
import { useIntl as N, IntlProvider as ls, createIntl as cs, FormattedMessage as ye } from "react-intl";
|
|
5
|
+
import tt from "truncate";
|
|
6
|
+
import nt from "markdown-to-jsx";
|
|
7
|
+
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as st, useQuery as fn, useMutation as de } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as ms } from "@tanstack/react-query-devtools";
|
|
9
|
-
import
|
|
9
|
+
import Xe from "posthog-js";
|
|
10
10
|
import { useCookies as fs, CookiesProvider as hs } from "react-cookie";
|
|
11
11
|
import { ReactMultiEmail as ps } from "react-multi-email";
|
|
12
|
-
import
|
|
12
|
+
import hn from "lodash.get";
|
|
13
13
|
import { ErrorBoundary as gs } from "react-error-boundary";
|
|
14
14
|
import _s from "react-textarea-autosize";
|
|
15
15
|
import xs from "lodash.isequal";
|
|
16
16
|
function bs(e) {
|
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
18
18
|
}
|
|
19
|
-
var
|
|
19
|
+
var pn = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,10 +51,10 @@ var _n = { exports: {} };
|
|
|
51
51
|
}
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
|
-
})(
|
|
55
|
-
var vs =
|
|
56
|
-
const S = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) =>
|
|
57
|
-
var At = { exports: {} },
|
|
54
|
+
})(pn);
|
|
55
|
+
var vs = pn.exports;
|
|
56
|
+
const S = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => D.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }), le = De(ws), ks = ({ element: e = "span", children: t = null, ...n }) => D.createElement(e, { ...n, "aria-hidden": !0 }, t), gn = De(ks);
|
|
57
|
+
var At = { exports: {} }, Re = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -64,12 +64,12 @@ var At = { exports: {} }, Fe = {};
|
|
|
64
64
|
* This source code is licensed under the MIT license found in the
|
|
65
65
|
* LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
var
|
|
67
|
+
var tn;
|
|
68
68
|
function js() {
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
|
|
72
|
-
var e =
|
|
69
|
+
if (tn)
|
|
70
|
+
return Re;
|
|
71
|
+
tn = 1;
|
|
72
|
+
var e = D, 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, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
73
|
function d(o, a, u) {
|
|
74
74
|
var l, f = {}, h = null, p = null;
|
|
75
75
|
u !== void 0 && (h = "" + u), a.key !== void 0 && (h = "" + a.key), a.ref !== void 0 && (p = a.ref);
|
|
@@ -80,9 +80,9 @@ function js() {
|
|
|
80
80
|
f[l] === void 0 && (f[l] = a[l]);
|
|
81
81
|
return { $$typeof: t, type: o, key: h, ref: p, props: f, _owner: i.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Re.Fragment = n, Re.jsx = d, Re.jsxs = d, Re;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Fe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -92,54 +92,54 @@ var Le = {};
|
|
|
92
92
|
* This source code is licensed under the MIT license found in the
|
|
93
93
|
* LICENSE file in the root directory of this source tree.
|
|
94
94
|
*/
|
|
95
|
-
var
|
|
95
|
+
var nn;
|
|
96
96
|
function ys() {
|
|
97
|
-
return
|
|
98
|
-
var e =
|
|
97
|
+
return nn || (nn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
+
var e = D, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), o = Symbol.for("react.context"), a = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), l = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), h = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), _ = Symbol.iterator, j = "@@iterator";
|
|
99
99
|
function g(m) {
|
|
100
100
|
if (m === null || typeof m != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var v = _ && m[_] || m[j];
|
|
103
|
+
return typeof v == "function" ? v : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
106
|
function k(m) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
108
|
+
for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), $ = 1; $ < v; $++)
|
|
109
109
|
y[$ - 1] = arguments[$];
|
|
110
110
|
T("error", m, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function T(m,
|
|
113
|
+
function T(m, v, y) {
|
|
114
114
|
{
|
|
115
|
-
var $ = E.ReactDebugCurrentFrame,
|
|
116
|
-
|
|
115
|
+
var $ = E.ReactDebugCurrentFrame, B = $.getStackAddendum();
|
|
116
|
+
B !== "" && (v += "%s", y = y.concat([B]));
|
|
117
117
|
var z = y.map(function(R) {
|
|
118
118
|
return String(R);
|
|
119
119
|
});
|
|
120
|
-
z.unshift("Warning: " +
|
|
120
|
+
z.unshift("Warning: " + v), Function.prototype.apply.call(console[m], console, z);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var M = !1, C = !1,
|
|
123
|
+
var M = !1, C = !1, I = !1, V = !1, x = !1, b;
|
|
124
124
|
b = Symbol.for("react.module.reference");
|
|
125
|
-
function
|
|
126
|
-
return !!(typeof m == "string" || typeof m == "function" || m === r || m === c || x || m === i || m === u || m === l ||
|
|
125
|
+
function Q(m) {
|
|
126
|
+
return !!(typeof m == "string" || typeof m == "function" || m === r || m === c || x || m === i || m === u || m === l || V || m === p || M || C || I || typeof m == "object" && m !== null && (m.$$typeof === h || m.$$typeof === f || m.$$typeof === d || m.$$typeof === o || m.$$typeof === a || // 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
130
|
m.$$typeof === b || m.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function w(m, v, y) {
|
|
133
133
|
var $ = m.displayName;
|
|
134
134
|
if ($)
|
|
135
135
|
return $;
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var B = v.displayName || v.name || "";
|
|
137
|
+
return B !== "" ? y + "(" + B + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Y(m) {
|
|
140
140
|
return m.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function L(m) {
|
|
143
143
|
if (m == null)
|
|
144
144
|
return null;
|
|
145
145
|
if (typeof m.tag == "number" && k("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof m == "function")
|
|
@@ -163,20 +163,20 @@ function ys() {
|
|
|
163
163
|
if (typeof m == "object")
|
|
164
164
|
switch (m.$$typeof) {
|
|
165
165
|
case o:
|
|
166
|
-
var
|
|
167
|
-
return
|
|
166
|
+
var v = m;
|
|
167
|
+
return Y(v) + ".Consumer";
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
|
-
return
|
|
170
|
+
return Y(y._context) + ".Provider";
|
|
171
171
|
case a:
|
|
172
|
-
return
|
|
172
|
+
return w(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
174
|
var $ = m.displayName || null;
|
|
175
|
-
return $ !== null ? $ :
|
|
175
|
+
return $ !== null ? $ : L(m.type) || "Memo";
|
|
176
176
|
case h: {
|
|
177
|
-
var
|
|
177
|
+
var B = m, z = B._payload, R = B._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return L(R(z));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,14 +184,14 @@ function ys() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
187
|
+
var O = Object.assign, U = 0, W, Z, re, oe, ae, ie, se;
|
|
188
188
|
function P() {
|
|
189
189
|
}
|
|
190
190
|
P.__reactDisabledLog = !0;
|
|
191
191
|
function te() {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
194
|
-
|
|
193
|
+
if (U === 0) {
|
|
194
|
+
W = console.log, Z = console.info, re = console.warn, oe = console.error, ae = console.group, ie = console.groupCollapsed, se = console.groupEnd;
|
|
195
195
|
var m = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
@@ -208,79 +208,79 @@ function ys() {
|
|
|
208
208
|
groupEnd: m
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
|
-
|
|
211
|
+
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function G() {
|
|
215
215
|
{
|
|
216
|
-
if (
|
|
216
|
+
if (U--, U === 0) {
|
|
217
217
|
var m = {
|
|
218
218
|
configurable: !0,
|
|
219
219
|
enumerable: !0,
|
|
220
220
|
writable: !0
|
|
221
221
|
};
|
|
222
222
|
Object.defineProperties(console, {
|
|
223
|
-
log:
|
|
224
|
-
value:
|
|
223
|
+
log: O({}, m, {
|
|
224
|
+
value: W
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
227
|
-
value:
|
|
226
|
+
info: O({}, m, {
|
|
227
|
+
value: Z
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
229
|
+
warn: O({}, m, {
|
|
230
|
+
value: re
|
|
231
|
+
}),
|
|
232
|
+
error: O({}, m, {
|
|
230
233
|
value: oe
|
|
231
234
|
}),
|
|
232
|
-
|
|
235
|
+
group: O({}, m, {
|
|
233
236
|
value: ae
|
|
234
237
|
}),
|
|
235
|
-
|
|
238
|
+
groupCollapsed: O({}, m, {
|
|
236
239
|
value: ie
|
|
237
240
|
}),
|
|
238
|
-
|
|
239
|
-
value:
|
|
240
|
-
}),
|
|
241
|
-
groupEnd: B({}, m, {
|
|
242
|
-
value: re
|
|
241
|
+
groupEnd: O({}, m, {
|
|
242
|
+
value: se
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
U < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function
|
|
249
|
+
var K = E.ReactCurrentDispatcher, ue;
|
|
250
|
+
function fe(m, v, y) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (ue === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
var $ =
|
|
257
|
-
|
|
255
|
+
} catch (B) {
|
|
256
|
+
var $ = B.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
ue = $ && $[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + ue + m;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var _e = !1, xe;
|
|
264
264
|
{
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var Ie = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
+
xe = new Ie();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!m ||
|
|
268
|
+
function Ne(m, v) {
|
|
269
|
+
if (!m || _e)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y =
|
|
272
|
+
var y = xe.get(m);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
276
|
var $;
|
|
277
|
-
|
|
278
|
-
var
|
|
277
|
+
_e = !0;
|
|
278
|
+
var B = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var z;
|
|
281
|
-
z =
|
|
281
|
+
z = K.current, K.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
283
|
+
if (v) {
|
|
284
284
|
var R = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
@@ -291,171 +291,171 @@ function ys() {
|
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
293
|
Reflect.construct(R, []);
|
|
294
|
-
} catch (
|
|
295
|
-
$ =
|
|
294
|
+
} catch (be) {
|
|
295
|
+
$ = be;
|
|
296
296
|
}
|
|
297
297
|
Reflect.construct(m, [], R);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
300
|
R.call();
|
|
301
|
-
} catch (
|
|
302
|
-
$ =
|
|
301
|
+
} catch (be) {
|
|
302
|
+
$ = be;
|
|
303
303
|
}
|
|
304
304
|
m.call(R.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
|
-
} catch (
|
|
310
|
-
$ =
|
|
309
|
+
} catch (be) {
|
|
310
|
+
$ = be;
|
|
311
311
|
}
|
|
312
312
|
m();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var
|
|
317
|
-
`),
|
|
318
|
-
`), q =
|
|
314
|
+
} catch (be) {
|
|
315
|
+
if (be && $ && typeof be.stack == "string") {
|
|
316
|
+
for (var A = be.stack.split(`
|
|
317
|
+
`), ce = $.stack.split(`
|
|
318
|
+
`), q = A.length - 1, ee = ce.length - 1; q >= 1 && ee >= 0 && A[q] !== ce[ee]; )
|
|
319
319
|
ee--;
|
|
320
320
|
for (; q >= 1 && ee >= 0; q--, ee--)
|
|
321
|
-
if (
|
|
321
|
+
if (A[q] !== ce[ee]) {
|
|
322
322
|
if (q !== 1 || ee !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (q--, ee--, ee < 0 ||
|
|
325
|
-
var
|
|
326
|
-
` +
|
|
327
|
-
return m.displayName &&
|
|
324
|
+
if (q--, ee--, ee < 0 || A[q] !== ce[ee]) {
|
|
325
|
+
var he = `
|
|
326
|
+
` + A[q].replace(" at new ", " at ");
|
|
327
|
+
return m.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", m.displayName)), typeof m == "function" && xe.set(m, he), he;
|
|
328
328
|
}
|
|
329
329
|
while (q >= 1 && ee >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
_e = !1, K.current = z, G(), Error.prepareStackTrace = B;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
337
|
-
return typeof m == "function" &&
|
|
336
|
+
var $e = m ? m.displayName || m.name : "", en = $e ? fe($e) : "";
|
|
337
|
+
return typeof m == "function" && xe.set(m, en), en;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
339
|
+
function Fn(m, v, y) {
|
|
340
|
+
return Ne(m, !1);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
342
|
+
function Ln(m) {
|
|
343
|
+
var v = m.prototype;
|
|
344
|
+
return !!(v && v.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function He(m, v, y) {
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
350
|
-
return
|
|
350
|
+
return Ne(m, Ln(m));
|
|
351
351
|
if (typeof m == "string")
|
|
352
|
-
return
|
|
352
|
+
return fe(m);
|
|
353
353
|
switch (m) {
|
|
354
354
|
case u:
|
|
355
|
-
return
|
|
355
|
+
return fe("Suspense");
|
|
356
356
|
case l:
|
|
357
|
-
return
|
|
357
|
+
return fe("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof m == "object")
|
|
360
360
|
switch (m.$$typeof) {
|
|
361
361
|
case a:
|
|
362
|
-
return
|
|
362
|
+
return Fn(m.render);
|
|
363
363
|
case f:
|
|
364
|
-
return
|
|
364
|
+
return He(m.type, v, y);
|
|
365
365
|
case h: {
|
|
366
|
-
var $ = m,
|
|
366
|
+
var $ = m, B = $._payload, z = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return He(z(B), v, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var Qe = Object.prototype.hasOwnProperty, Qt = {}, Ut = E.ReactDebugCurrentFrame;
|
|
376
|
+
function Ue(m) {
|
|
377
377
|
if (m) {
|
|
378
|
-
var
|
|
379
|
-
|
|
378
|
+
var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
|
|
379
|
+
Ut.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
Ut.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(m,
|
|
383
|
+
function On(m, v, y, $, B) {
|
|
384
384
|
{
|
|
385
|
-
var z = Function.call.bind(
|
|
385
|
+
var z = Function.call.bind(Qe);
|
|
386
386
|
for (var R in m)
|
|
387
387
|
if (z(m, R)) {
|
|
388
|
-
var
|
|
388
|
+
var A = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof m[R] != "function") {
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
391
|
+
var ce = Error(($ || "React class") + ": " + y + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw ce.name = "Invariant Violation", ce;
|
|
393
393
|
}
|
|
394
|
-
|
|
394
|
+
A = m[R](v, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (q) {
|
|
396
|
-
|
|
396
|
+
A = q;
|
|
397
397
|
}
|
|
398
|
-
|
|
398
|
+
A && !(A instanceof Error) && (Ue(B), k("%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).", $ || "React class", y, R, typeof A), Ue(null)), A instanceof Error && !(A.message in Qt) && (Qt[A.message] = !0, Ue(B), k("Failed %s type: %s", y, A.message), Ue(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Bn = Array.isArray;
|
|
403
|
-
function
|
|
403
|
+
function dt(m) {
|
|
404
404
|
return Bn(m);
|
|
405
405
|
}
|
|
406
406
|
function In(m) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var v = typeof Symbol == "function" && Symbol.toStringTag, y = v && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function Hn(m) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return zt(m), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function zt(m) {
|
|
420
420
|
return "" + m;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Wt(m) {
|
|
423
423
|
if (Hn(m))
|
|
424
|
-
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", In(m)),
|
|
424
|
+
return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", In(m)), zt(m);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Pe = E.ReactCurrentOwner, Qn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, Vt, Yt, ut;
|
|
432
|
+
ut = {};
|
|
433
433
|
function Un(m) {
|
|
434
|
-
if (
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
434
|
+
if (Qe.call(m, "ref")) {
|
|
435
|
+
var v = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
|
+
if (v && v.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return m.ref !== void 0;
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
if (
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
441
|
+
function zn(m) {
|
|
442
|
+
if (Qe.call(m, "key")) {
|
|
443
|
+
var v = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
|
+
if (v && v.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return m.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
450
|
-
if (typeof m.ref == "string" &&
|
|
451
|
-
var y =
|
|
452
|
-
|
|
449
|
+
function Wn(m, v) {
|
|
450
|
+
if (typeof m.ref == "string" && Pe.current && v && Pe.current.stateNode !== v) {
|
|
451
|
+
var y = L(Pe.current.type);
|
|
452
|
+
ut[y] || (k('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', L(Pe.current.type), m.ref), ut[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function Vn(m,
|
|
455
|
+
function Vn(m, v) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Vt || (Vt = !0, k("%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)", v));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function ys() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Yn(m,
|
|
466
|
+
function Yn(m, v) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Yt || (Yt = !0, k("%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)", v));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,70 +474,70 @@ function ys() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Gn = function(m,
|
|
478
|
-
var
|
|
477
|
+
var Gn = function(m, v, y, $, B, z, R) {
|
|
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
|
|
482
482
|
type: m,
|
|
483
|
-
key:
|
|
483
|
+
key: v,
|
|
484
484
|
ref: y,
|
|
485
485
|
props: R,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
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: $
|
|
499
|
-
}), Object.defineProperty(
|
|
499
|
+
}), Object.defineProperty(A, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
|
-
value:
|
|
504
|
-
}), Object.freeze && (Object.freeze(
|
|
503
|
+
value: B
|
|
504
|
+
}), Object.freeze && (Object.freeze(A.props), Object.freeze(A)), A;
|
|
505
505
|
};
|
|
506
|
-
function Jn(m,
|
|
506
|
+
function Jn(m, v, y, $, B) {
|
|
507
507
|
{
|
|
508
|
-
var z, R = {},
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (z in
|
|
511
|
-
|
|
508
|
+
var z, R = {}, A = null, ce = null;
|
|
509
|
+
y !== void 0 && (Wt(y), A = "" + y), zn(v) && (Wt(v.key), A = "" + v.key), Un(v) && (ce = v.ref, Wn(v, B));
|
|
510
|
+
for (z in v)
|
|
511
|
+
Qe.call(v, z) && !Qn.hasOwnProperty(z) && (R[z] = v[z]);
|
|
512
512
|
if (m && m.defaultProps) {
|
|
513
513
|
var q = m.defaultProps;
|
|
514
514
|
for (z in q)
|
|
515
515
|
R[z] === void 0 && (R[z] = q[z]);
|
|
516
516
|
}
|
|
517
|
-
if (
|
|
517
|
+
if (A || ce) {
|
|
518
518
|
var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
-
|
|
519
|
+
A && Vn(R, ee), ce && Yn(R, ee);
|
|
520
520
|
}
|
|
521
|
-
return Gn(m,
|
|
521
|
+
return Gn(m, A, ce, B, $, Pe.current, R);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function
|
|
524
|
+
var mt = E.ReactCurrentOwner, Gt = E.ReactDebugCurrentFrame;
|
|
525
|
+
function Te(m) {
|
|
526
526
|
if (m) {
|
|
527
|
-
var
|
|
528
|
-
|
|
527
|
+
var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
|
|
528
|
+
Gt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
Gt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var ft;
|
|
533
|
+
ft = !1;
|
|
534
|
+
function ht(m) {
|
|
535
535
|
return typeof m == "object" && m !== null && m.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Jt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var m =
|
|
539
|
+
if (mt.current) {
|
|
540
|
+
var m = L(mt.current.type);
|
|
541
541
|
if (m)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -549,155 +549,155 @@ Check the render method of \`` + m + "`.";
|
|
|
549
549
|
function Xn(m) {
|
|
550
550
|
{
|
|
551
551
|
if (m !== void 0) {
|
|
552
|
-
var
|
|
552
|
+
var v = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + v + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var Xt = {};
|
|
561
561
|
function Zn(m) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var v = Jt();
|
|
564
|
+
if (!v) {
|
|
565
565
|
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (v = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Zt(m, v) {
|
|
574
574
|
{
|
|
575
575
|
if (!m._store || m._store.validated || m.key != null)
|
|
576
576
|
return;
|
|
577
577
|
m._store.validated = !0;
|
|
578
|
-
var y = Zn(
|
|
579
|
-
if (
|
|
578
|
+
var y = Zn(v);
|
|
579
|
+
if (Xt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
Xt[y] = !0;
|
|
582
582
|
var $ = "";
|
|
583
|
-
m && m._owner && m._owner !==
|
|
583
|
+
m && m._owner && m._owner !== mt.current && ($ = " It was passed a child from " + L(m._owner.type) + "."), Te(m), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, $), Te(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Kt(m, v) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
590
|
+
if (dt(m))
|
|
591
591
|
for (var y = 0; y < m.length; y++) {
|
|
592
592
|
var $ = m[y];
|
|
593
|
-
|
|
593
|
+
ht($) && Zt($, v);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (ht(m))
|
|
596
596
|
m._store && (m._store.validated = !0);
|
|
597
597
|
else if (m) {
|
|
598
|
-
var
|
|
599
|
-
if (typeof
|
|
600
|
-
for (var z =
|
|
601
|
-
|
|
598
|
+
var B = g(m);
|
|
599
|
+
if (typeof B == "function" && B !== m.entries)
|
|
600
|
+
for (var z = B.call(m), R; !(R = z.next()).done; )
|
|
601
|
+
ht(R.value) && Zt(R.value, v);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Kn(m) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var v = m.type;
|
|
608
|
+
if (v == null || typeof v == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof v == "function")
|
|
612
|
+
y = v.propTypes;
|
|
613
|
+
else if (typeof v == "object" && (v.$$typeof === a || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
v.$$typeof === f))
|
|
616
|
+
y = v.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var $ =
|
|
620
|
+
var $ = L(v);
|
|
621
621
|
On(y, m.props, "prop", $, m);
|
|
622
|
-
} else if (
|
|
623
|
-
|
|
624
|
-
var
|
|
625
|
-
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
622
|
+
} else if (v.PropTypes !== void 0 && !ft) {
|
|
623
|
+
ft = !0;
|
|
624
|
+
var B = L(v);
|
|
625
|
+
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", B || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && k("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function qn(m) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var $ =
|
|
632
|
+
for (var v = Object.keys(m.props), y = 0; y < v.length; y++) {
|
|
633
|
+
var $ = v[y];
|
|
634
634
|
if ($ !== "children" && $ !== "key") {
|
|
635
|
-
|
|
635
|
+
Te(m), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Te(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
m.ref !== null && (
|
|
639
|
+
m.ref !== null && (Te(m), k("Invalid attribute `ref` supplied to `React.Fragment`."), Te(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function qt(m, v, y, $, B, z) {
|
|
643
643
|
{
|
|
644
|
-
var R =
|
|
644
|
+
var R = Q(m);
|
|
645
645
|
if (!R) {
|
|
646
|
-
var
|
|
647
|
-
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (
|
|
648
|
-
var
|
|
649
|
-
|
|
646
|
+
var A = "";
|
|
647
|
+
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).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
|
+
var ce = Xn(B);
|
|
649
|
+
ce ? A += ce : A += Jt();
|
|
650
650
|
var q;
|
|
651
|
-
m === null ? q = "null" :
|
|
651
|
+
m === null ? q = "null" : dt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (L(m.type) || "Unknown") + " />", A = " Did you accidentally export a JSX literal instead of a component?") : q = typeof m, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, A);
|
|
652
652
|
}
|
|
653
|
-
var ee = Jn(m,
|
|
653
|
+
var ee = Jn(m, v, y, B, z);
|
|
654
654
|
if (ee == null)
|
|
655
655
|
return ee;
|
|
656
656
|
if (R) {
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
657
|
+
var he = v.children;
|
|
658
|
+
if (he !== void 0)
|
|
659
659
|
if ($)
|
|
660
|
-
if (
|
|
661
|
-
for (var
|
|
662
|
-
|
|
663
|
-
Object.freeze && Object.freeze(
|
|
660
|
+
if (dt(he)) {
|
|
661
|
+
for (var $e = 0; $e < he.length; $e++)
|
|
662
|
+
Kt(he[$e], m);
|
|
663
|
+
Object.freeze && Object.freeze(he);
|
|
664
664
|
} else
|
|
665
665
|
k("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
|
+
Kt(he, m);
|
|
668
668
|
}
|
|
669
669
|
return m === r ? qn(ee) : Kn(ee), ee;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function es(m,
|
|
673
|
-
return
|
|
672
|
+
function es(m, v, y) {
|
|
673
|
+
return qt(m, v, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function ts(m,
|
|
676
|
-
return
|
|
675
|
+
function ts(m, v, y) {
|
|
676
|
+
return qt(m, v, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var ns = ts, ss = es;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Fe.Fragment = r, Fe.jsx = ns, Fe.jsxs = ss;
|
|
680
|
+
}()), Fe;
|
|
681
681
|
}
|
|
682
682
|
process.env.NODE_ENV === "production" ? At.exports = js() : At.exports = ys();
|
|
683
683
|
var s = At.exports;
|
|
684
684
|
const Es = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = F(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return X(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
|
-
},
|
|
693
|
-
const n =
|
|
694
|
-
|
|
692
|
+
}, Ce = (e, t) => {
|
|
693
|
+
const n = ne(!1);
|
|
694
|
+
X(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Ss(e, t, n) {
|
|
699
|
-
var r = this, i =
|
|
700
|
-
|
|
699
|
+
var r = this, i = ne(null), c = ne(0), d = ne(null), o = ne([]), a = ne(), u = ne(), l = ne(e), f = ne(!0);
|
|
700
|
+
X(function() {
|
|
701
701
|
l.current = e;
|
|
702
702
|
}, [e]);
|
|
703
703
|
var h = !t && t !== 0 && typeof window < "u";
|
|
@@ -705,15 +705,15 @@ function Ss(e, t, n) {
|
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
707
|
var p = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, j = "maxWait" in n, g = j ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
|
-
|
|
708
|
+
X(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
|
-
var E =
|
|
713
|
+
var E = et(function() {
|
|
714
714
|
var k = function(x) {
|
|
715
|
-
var b = o.current,
|
|
716
|
-
return o.current = a.current = null, c.current = x, u.current = l.current.apply(
|
|
715
|
+
var b = o.current, Q = a.current;
|
|
716
|
+
return o.current = a.current = null, c.current = x, u.current = l.current.apply(Q, b);
|
|
717
717
|
}, T = function(x, b) {
|
|
718
718
|
h && cancelAnimationFrame(d.current), d.current = h ? requestAnimationFrame(x) : setTimeout(x, b);
|
|
719
719
|
}, M = function(x) {
|
|
@@ -723,59 +723,62 @@ function Ss(e, t, n) {
|
|
|
723
723
|
return !i.current || b >= t || b < 0 || j && x - c.current >= g;
|
|
724
724
|
}, C = function(x) {
|
|
725
725
|
return d.current = null, _ && o.current ? k(x) : (o.current = a.current = null, u.current);
|
|
726
|
-
},
|
|
726
|
+
}, I = function x() {
|
|
727
727
|
var b = Date.now();
|
|
728
728
|
if (M(b))
|
|
729
729
|
return C(b);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var
|
|
732
|
-
T(x,
|
|
731
|
+
var Q = t - (b - i.current), w = j ? Math.min(Q, g - (b - c.current)) : Q;
|
|
732
|
+
T(x, w);
|
|
733
733
|
}
|
|
734
|
-
},
|
|
734
|
+
}, V = function() {
|
|
735
735
|
var x = Date.now(), b = M(x);
|
|
736
736
|
if (o.current = [].slice.call(arguments), a.current = r, i.current = x, b) {
|
|
737
737
|
if (!d.current && f.current)
|
|
738
|
-
return c.current = i.current, T(
|
|
738
|
+
return c.current = i.current, T(I, t), p ? k(i.current) : u.current;
|
|
739
739
|
if (j)
|
|
740
|
-
return T(
|
|
740
|
+
return T(I, t), k(i.current);
|
|
741
741
|
}
|
|
742
|
-
return d.current || T(
|
|
742
|
+
return d.current || T(I, t), u.current;
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return V.cancel = function() {
|
|
745
745
|
d.current && (h ? cancelAnimationFrame(d.current) : clearTimeout(d.current)), c.current = 0, o.current = i.current = a.current = d.current = null;
|
|
746
|
-
},
|
|
746
|
+
}, V.isPending = function() {
|
|
747
747
|
return !!d.current;
|
|
748
|
-
},
|
|
748
|
+
}, V.flush = function() {
|
|
749
749
|
return d.current ? C(Date.now()) : u.current;
|
|
750
|
-
},
|
|
750
|
+
}, V;
|
|
751
751
|
}, [p, j, t, g, _, h]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function _n(e, t, n) {
|
|
755
755
|
var r = n === void 0 ? {} : n, i = r.leading, c = r.trailing;
|
|
756
756
|
return Ss(e, t, { maxWait: t, leading: i === void 0 || i, trailing: c === void 0 || c });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let pt;
|
|
759
|
+
const rt = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
|
-
const [
|
|
762
|
+
const [r, i] = D.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
765
|
-
clearTimeout(
|
|
766
|
-
}), []);
|
|
767
|
-
const
|
|
768
|
-
|
|
769
|
-
|
|
764
|
+
X(() => (o(), window.addEventListener("resize", a), () => {
|
|
765
|
+
clearTimeout(pt), a.flush(), window.removeEventListener("resize", a);
|
|
766
|
+
}), n === "window" ? [] : [n]);
|
|
767
|
+
const d = () => {
|
|
768
|
+
if (n)
|
|
769
|
+
return n === "window" ? window.innerWidth : n.offsetWidth;
|
|
770
|
+
}, o = () => {
|
|
771
|
+
i(d());
|
|
772
|
+
}, a = _n(
|
|
770
773
|
() => {
|
|
771
|
-
|
|
774
|
+
d() !== r && (t && (clearTimeout(pt), document.body.classList.add("is-resizing"), pt = setTimeout(() => {
|
|
772
775
|
document.body.classList.remove("is-resizing");
|
|
773
|
-
}, 550)),
|
|
776
|
+
}, 550)), o());
|
|
774
777
|
},
|
|
775
778
|
500,
|
|
776
779
|
{ leading: !0 }
|
|
777
780
|
);
|
|
778
|
-
return
|
|
781
|
+
return r;
|
|
779
782
|
}, Ts = ({
|
|
780
783
|
scrollPosition: e = 0,
|
|
781
784
|
// The position on the page to scroll past
|
|
@@ -787,10 +790,10 @@ const at = (e = !0, t = !1) => {
|
|
|
787
790
|
}) => {
|
|
788
791
|
if (!window)
|
|
789
792
|
return;
|
|
790
|
-
const [i, c] =
|
|
791
|
-
}], [d, o] =
|
|
793
|
+
const [i, c] = D.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
794
|
+
}], [d, o] = D.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
795
|
}];
|
|
793
|
-
|
|
796
|
+
X(() => (a(), window.addEventListener("scroll", u), () => {
|
|
794
797
|
u.flush(), window.removeEventListener("scroll", u);
|
|
795
798
|
}), []);
|
|
796
799
|
const a = () => {
|
|
@@ -800,14 +803,14 @@ const at = (e = !0, t = !1) => {
|
|
|
800
803
|
return;
|
|
801
804
|
}
|
|
802
805
|
Math.abs(h) >= t.up && !d.scrollUp && (r(), o({ scrollUp: !0, scrollDown: !1 }));
|
|
803
|
-
}, u =
|
|
806
|
+
}, u = _n(() => {
|
|
804
807
|
a();
|
|
805
808
|
}, 250);
|
|
806
809
|
return i;
|
|
807
|
-
},
|
|
810
|
+
}, fo = (e = [], t = !0) => {
|
|
808
811
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
810
|
-
|
|
812
|
+
const n = ne(!1);
|
|
813
|
+
Ce(() => {
|
|
811
814
|
if (window && window.location && window.location.hash) {
|
|
812
815
|
if (n.current)
|
|
813
816
|
return;
|
|
@@ -821,13 +824,13 @@ const at = (e = !0, t = !1) => {
|
|
|
821
824
|
return t.forEach(({ type: r, value: i }) => {
|
|
822
825
|
is(n, r, i);
|
|
823
826
|
}), n;
|
|
824
|
-
},
|
|
827
|
+
}, xn = (e) => {
|
|
825
828
|
const t = [];
|
|
826
829
|
return e.forEach((n) => {
|
|
827
830
|
const r = parseInt(n);
|
|
828
831
|
isNaN(r) || t.push(r);
|
|
829
832
|
}), t.sort((n, r) => n - r);
|
|
830
|
-
},
|
|
833
|
+
}, bn = (e, t, n) => {
|
|
831
834
|
let r = n.mobile;
|
|
832
835
|
for (const i in t) {
|
|
833
836
|
const c = parseInt(String(t[i]));
|
|
@@ -856,10 +859,17 @@ const at = (e = !0, t = !1) => {
|
|
|
856
859
|
return { path: "days", number: o };
|
|
857
860
|
const a = Math.floor(o / 7);
|
|
858
861
|
return a <= 52 ? { path: "weeks", number: a } : { path: "years", number: Math.floor(o / 365) };
|
|
859
|
-
},
|
|
862
|
+
}, As = (e) => new Promise((t) => setTimeout(t, e)), Lt = {
|
|
860
863
|
apolitical: "Apolitical",
|
|
861
864
|
breadcrumbs_label: "Go back to:",
|
|
862
865
|
breadcrumbs_currentPage: "Current page:",
|
|
866
|
+
card_carousel_viewAll: "View all",
|
|
867
|
+
card_label_event: "Event",
|
|
868
|
+
card_label_learningHub: "Programme",
|
|
869
|
+
card_label_listPage: "List",
|
|
870
|
+
card_label_microcourse: "Course",
|
|
871
|
+
card_label_qaQuestion: "Q&A",
|
|
872
|
+
card_label_solutionArticle: "Article",
|
|
863
873
|
card_bootcamp: "Email boot camp",
|
|
864
874
|
card_ended: "Ended",
|
|
865
875
|
card_registered: "Registered",
|
|
@@ -868,6 +878,15 @@ const at = (e = !0, t = !1) => {
|
|
|
868
878
|
card_time_read: "{time} min read",
|
|
869
879
|
card_watch: "Watch recording",
|
|
870
880
|
card_cta_people: "View profile",
|
|
881
|
+
card_cta_event: "Register now",
|
|
882
|
+
card_cta_microcourse: "Enrol now",
|
|
883
|
+
card_cta_event_loading: "Registering...",
|
|
884
|
+
card_cta_microcourse_loading: "Enrolling...",
|
|
885
|
+
card_cta_event_done: "Registered",
|
|
886
|
+
card_cta_microcourse_done: "Enrolled",
|
|
887
|
+
carousel_pagination_previous: "Previous",
|
|
888
|
+
carousel_pagination_next: "Next",
|
|
889
|
+
carousel_pagination_page: "Page {number} of {total}",
|
|
871
890
|
collapsibleSection_summary: "Find out more",
|
|
872
891
|
communityDetails_members: "Members",
|
|
873
892
|
communityDetails_viewAll: "View all",
|
|
@@ -1139,13 +1158,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1158
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1159
|
tags_community: "From the community",
|
|
1141
1160
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1161
|
+
}, Ds = {
|
|
1143
1162
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1163
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1164
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1165
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1166
|
languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
|
|
1148
|
-
},
|
|
1167
|
+
}, Ns = {
|
|
1149
1168
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1169
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1170
|
languageSwitcher_translation_original: "langue originale",
|
|
@@ -1160,14 +1179,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1160
1179
|
languageSwitcher_disclaimer: "Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"
|
|
1161
1180
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1181
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1182
|
+
en: Lt,
|
|
1183
|
+
es: Ds,
|
|
1184
|
+
fr: Ns,
|
|
1166
1185
|
pt: Ps
|
|
1167
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1186
|
+
}, Symbol.toStringTag, { value: "Module" })), Fs = (e) => e in Lt, pe = (e, t, n, r, i = {}) => {
|
|
1168
1187
|
let c = "";
|
|
1169
|
-
return `${t}_${n}`
|
|
1170
|
-
},
|
|
1188
|
+
return Fs(`${t}_${n}`) ? c = e({ id: `${t}_${n}` }, i) : c = e({ id: t }, { [r]: n, ...i }), c;
|
|
1189
|
+
}, Ls = (e, t, n) => {
|
|
1171
1190
|
if (!e || e === 0)
|
|
1172
1191
|
return "0";
|
|
1173
1192
|
t || (t = 0), n || (n = ["k", "m", "b", "t"]);
|
|
@@ -1181,9 +1200,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1200
|
}
|
|
1182
1201
|
}
|
|
1183
1202
|
return r;
|
|
1184
|
-
},
|
|
1203
|
+
}, vn = (e, t) => D.Children.map(e, (n) => D.cloneElement(n, {
|
|
1185
1204
|
...t
|
|
1186
|
-
})),
|
|
1205
|
+
})), Os = (e) => e.replace(/\s+/g, "").length > 0, J = ({
|
|
1187
1206
|
variant: e = "primary",
|
|
1188
1207
|
size: t = "medium",
|
|
1189
1208
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1197,10 +1216,10 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1197
1216
|
children: l = !1,
|
|
1198
1217
|
...f
|
|
1199
1218
|
}) => {
|
|
1200
|
-
const p =
|
|
1219
|
+
const p = rt(typeof t == "object");
|
|
1201
1220
|
if (typeof t == "object" && typeof p == "number") {
|
|
1202
|
-
const g = Object.assign({}, t), E =
|
|
1203
|
-
t =
|
|
1221
|
+
const g = Object.assign({}, t), E = xn(Object.keys(g));
|
|
1222
|
+
t = bn(p, E, g);
|
|
1204
1223
|
}
|
|
1205
1224
|
const _ = [];
|
|
1206
1225
|
typeof t == "string" && _.push(t), r && (_.push("icon"), typeof r == "object" ? (_.push(r.icon), r.position ? _.push(r.position) : _.push("left"), r.hover && _.push(`hover_${r.hover}`), r.animate && (_.push("animate"), typeof r.animate == "string" && _.push(r.animate))) : (_.push(r), !r.includes("right") && !r.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
@@ -1216,19 +1235,19 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1216
1235
|
},
|
|
1217
1236
|
disabled: typeof a == "object" && "isClickable" in a ? !a.isClickable : a
|
|
1218
1237
|
};
|
|
1219
|
-
return i && (c = "a", j.href = i),
|
|
1238
|
+
return i && (c = "a", j.href = i), D.createElement(
|
|
1220
1239
|
c,
|
|
1221
1240
|
j,
|
|
1222
|
-
l || (u ? /* @__PURE__ */ s.jsx(
|
|
1241
|
+
l || (u ? /* @__PURE__ */ s.jsx(le, { showOnFocus: !1, children: u }) : null)
|
|
1223
1242
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(
|
|
1226
|
-
return
|
|
1243
|
+
}, ot = ({ buttons: e, className: t = "", ...n }) => {
|
|
1244
|
+
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(J, { ...c }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(J, { ...c }) }, d));
|
|
1245
|
+
return D.createElement(r, { className: S("button-wrapper", t), ...n, children: i });
|
|
1227
1246
|
};
|
|
1228
1247
|
const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1229
1248
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1230
1249
|
return /* @__PURE__ */ s.jsx("hr", { className: S(e, { "has-max-width": t }), style: n });
|
|
1231
|
-
},
|
|
1250
|
+
}, at = ({
|
|
1232
1251
|
href: e,
|
|
1233
1252
|
children: t,
|
|
1234
1253
|
fallbackElement: n,
|
|
@@ -1250,8 +1269,8 @@ const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1250
1269
|
}
|
|
1251
1270
|
);
|
|
1252
1271
|
}
|
|
1253
|
-
return n ?
|
|
1254
|
-
},
|
|
1272
|
+
return n ? D.createElement(n, { children: t, className: r, ...o }) : t;
|
|
1273
|
+
}, sn = {
|
|
1255
1274
|
card: {
|
|
1256
1275
|
range: [
|
|
1257
1276
|
{
|
|
@@ -1354,23 +1373,23 @@ const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1354
1373
|
],
|
|
1355
1374
|
sizes: "(min-width: 1024px) 453px, 20vw"
|
|
1356
1375
|
}
|
|
1357
|
-
},
|
|
1376
|
+
}, Bs = ({
|
|
1358
1377
|
aspect: e,
|
|
1359
1378
|
range: t,
|
|
1360
1379
|
sizes: n
|
|
1361
1380
|
}) => {
|
|
1362
|
-
const { range: r, sizes: i } = e ?
|
|
1381
|
+
const { range: r, sizes: i } = e ? sn[e] : sn.fallback;
|
|
1363
1382
|
return { range: t && t.length > 0 ? t : r, sizes: n || i };
|
|
1364
|
-
},
|
|
1383
|
+
}, Is = ({ format: e, height: t, query: n, width: r }) => {
|
|
1365
1384
|
let i = `w=${r}&h=${t}`;
|
|
1366
1385
|
return i = e ? `${i}&fm=${e}` : i, i = n ? `${i}&${n}` : i, i;
|
|
1367
|
-
},
|
|
1386
|
+
}, gt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Is({
|
|
1368
1387
|
format: e,
|
|
1369
1388
|
height: i,
|
|
1370
1389
|
query: r,
|
|
1371
1390
|
width: c
|
|
1372
1391
|
})} ${c}w`).join(", ");
|
|
1373
|
-
const
|
|
1392
|
+
const Hs = ({ image: e, className: t, testId: n }) => {
|
|
1374
1393
|
const {
|
|
1375
1394
|
description: r,
|
|
1376
1395
|
height: i,
|
|
@@ -1381,7 +1400,7 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1400
|
loading: u,
|
|
1382
1401
|
decoding: l,
|
|
1383
1402
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: h, sizes: p } =
|
|
1403
|
+
} = e, { range: h, sizes: p } = Bs(e), _ = gt({ format: "avif", query: d, range: h, url: o }), j = gt({ format: "webp", query: d, range: h, url: o }), g = gt({ format: "", query: d, range: h, url: o });
|
|
1385
1404
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1386
1405
|
c !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1387
1406
|
"source",
|
|
@@ -1418,10 +1437,10 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1437
|
)
|
|
1419
1438
|
] });
|
|
1420
1439
|
};
|
|
1421
|
-
let
|
|
1422
|
-
const
|
|
1423
|
-
const r =
|
|
1424
|
-
|
|
1440
|
+
let Le = !1;
|
|
1441
|
+
const Qs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1442
|
+
const r = N(), i = ne(null), [c, d] = F("hidden");
|
|
1443
|
+
X(() => {
|
|
1425
1444
|
const a = i.current;
|
|
1426
1445
|
if (a)
|
|
1427
1446
|
return a.addEventListener("transitionend", o), () => {
|
|
@@ -1429,18 +1448,18 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1448
|
};
|
|
1430
1449
|
}, []);
|
|
1431
1450
|
const o = ({ propertyName: a }) => {
|
|
1432
|
-
a === "opacity" && (
|
|
1451
|
+
a === "opacity" && (Le !== !1 && clearTimeout(Le), d((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
|
|
1433
1452
|
};
|
|
1434
|
-
return
|
|
1435
|
-
|
|
1453
|
+
return Ce(() => {
|
|
1454
|
+
Le !== !1 && clearTimeout(Le);
|
|
1436
1455
|
let a = "open";
|
|
1437
|
-
e ? d("opening") : (d("closing"), a = "hidden"),
|
|
1456
|
+
e ? d("opening") : (d("closing"), a = "hidden"), Le = setTimeout(() => {
|
|
1438
1457
|
d(a);
|
|
1439
1458
|
}, 300);
|
|
1440
1459
|
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: i, className: S("tooltip text-medium", c, { loading: t }), hidden: c === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
|
|
1441
1460
|
};
|
|
1442
|
-
const
|
|
1443
|
-
const
|
|
1461
|
+
const wn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: S("full-width-section", t), ...n, children: e });
|
|
1462
|
+
const ho = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1463
|
const r = [];
|
|
1445
1464
|
return t.forEach((i) => {
|
|
1446
1465
|
r.push({
|
|
@@ -1453,12 +1472,12 @@ const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1453
1472
|
target: "_blank",
|
|
1454
1473
|
children: i.text
|
|
1455
1474
|
});
|
|
1456
|
-
}), /* @__PURE__ */ s.jsx(
|
|
1457
|
-
|
|
1458
|
-
/* @__PURE__ */ s.jsx(
|
|
1475
|
+
}), /* @__PURE__ */ s.jsx(wn, { className: S("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1476
|
+
D.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1477
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: r })
|
|
1459
1478
|
] }) });
|
|
1460
1479
|
};
|
|
1461
|
-
const
|
|
1480
|
+
const po = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1481
|
const r = t.length;
|
|
1463
1482
|
if (r === 0)
|
|
1464
1483
|
return null;
|
|
@@ -1467,7 +1486,7 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1467
1486
|
text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
|
|
1468
1487
|
};
|
|
1469
1488
|
return /* @__PURE__ */ s.jsxs("div", { className: S("logos", n), children: [
|
|
1470
|
-
e &&
|
|
1489
|
+
e && D.createElement(i.element, { className: "title" }, i.text),
|
|
1471
1490
|
/* @__PURE__ */ s.jsx(
|
|
1472
1491
|
"ul",
|
|
1473
1492
|
{
|
|
@@ -1503,7 +1522,7 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1503
1522
|
)
|
|
1504
1523
|
] });
|
|
1505
1524
|
};
|
|
1506
|
-
const
|
|
1525
|
+
const Us = [
|
|
1507
1526
|
"small",
|
|
1508
1527
|
"span",
|
|
1509
1528
|
"strong",
|
|
@@ -1517,7 +1536,7 @@ const Qs = [
|
|
|
1517
1536
|
"h6",
|
|
1518
1537
|
"blockquote",
|
|
1519
1538
|
"q"
|
|
1520
|
-
],
|
|
1539
|
+
], zs = ({
|
|
1521
1540
|
className: e = "",
|
|
1522
1541
|
content: t,
|
|
1523
1542
|
image: n,
|
|
@@ -1535,7 +1554,7 @@ const Qs = [
|
|
|
1535
1554
|
if (typeof t[l] == "object") {
|
|
1536
1555
|
u[l] = t[l];
|
|
1537
1556
|
const { text: f, element: h } = t[l];
|
|
1538
|
-
if (h &&
|
|
1557
|
+
if (h && Us.includes(h.toLowerCase()))
|
|
1539
1558
|
return;
|
|
1540
1559
|
u[l] = {
|
|
1541
1560
|
text: f,
|
|
@@ -1552,7 +1571,7 @@ const Qs = [
|
|
|
1552
1571
|
const f = document.getElementById(c.link.substring(1));
|
|
1553
1572
|
f && f.scrollIntoView({ behavior: "smooth" });
|
|
1554
1573
|
}), /* @__PURE__ */ s.jsx(
|
|
1555
|
-
|
|
1574
|
+
wn,
|
|
1556
1575
|
{
|
|
1557
1576
|
className: S("banner-section", r, i, e, {
|
|
1558
1577
|
"has-image": n,
|
|
@@ -1563,7 +1582,7 @@ const Qs = [
|
|
|
1563
1582
|
o.map((l) => {
|
|
1564
1583
|
if (u[l] && typeof u[l] == "object") {
|
|
1565
1584
|
const { text: f, element: h = "" } = u[l];
|
|
1566
|
-
return
|
|
1585
|
+
return D.createElement(
|
|
1567
1586
|
h.toLowerCase(),
|
|
1568
1587
|
{ key: l, className: l },
|
|
1569
1588
|
f
|
|
@@ -1573,7 +1592,7 @@ const Qs = [
|
|
|
1573
1592
|
}),
|
|
1574
1593
|
d,
|
|
1575
1594
|
c && c.text && c.link && /* @__PURE__ */ s.jsx(
|
|
1576
|
-
|
|
1595
|
+
J,
|
|
1577
1596
|
{
|
|
1578
1597
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1579
1598
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1583,12 +1602,12 @@ const Qs = [
|
|
|
1583
1602
|
}
|
|
1584
1603
|
)
|
|
1585
1604
|
] }),
|
|
1586
|
-
n && /* @__PURE__ */ s.jsx(
|
|
1605
|
+
n && /* @__PURE__ */ s.jsx(Hs, { image: { ...n, aspect: "banner" } })
|
|
1587
1606
|
] })
|
|
1588
1607
|
}
|
|
1589
1608
|
);
|
|
1590
|
-
},
|
|
1591
|
-
const
|
|
1609
|
+
}, go = De(zs);
|
|
1610
|
+
const _o = ({
|
|
1592
1611
|
variant: e = "primary",
|
|
1593
1612
|
button: t = null,
|
|
1594
1613
|
title: n,
|
|
@@ -1597,76 +1616,93 @@ const go = ({
|
|
|
1597
1616
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: S("marketing-block", e), children: [
|
|
1598
1617
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1599
1618
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1600
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1601
|
-
] }),
|
|
1619
|
+
t && /* @__PURE__ */ s.jsx(J, { 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 })
|
|
1620
|
+
] }), Dt = "https://storage.googleapis.com/apolitical-assets/", Oe = {
|
|
1602
1621
|
general: "hello@apolitical.co",
|
|
1603
1622
|
support: "concierge@apolitical.co",
|
|
1604
1623
|
"data-protection": {
|
|
1605
1624
|
default: "dpo@apolitical.co",
|
|
1606
1625
|
eu: "dpo.agl@apolitical.foundation"
|
|
1607
1626
|
}
|
|
1608
|
-
},
|
|
1609
|
-
const
|
|
1610
|
-
const r =
|
|
1627
|
+
}, xo = "200,000+";
|
|
1628
|
+
const kn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1629
|
+
const r = N();
|
|
1611
1630
|
return /* @__PURE__ */ s.jsxs("details", { className: S("collapsible-section", t), children: [
|
|
1612
1631
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1613
1632
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: n })
|
|
1614
1633
|
] });
|
|
1615
1634
|
};
|
|
1616
|
-
const
|
|
1617
|
-
const
|
|
1635
|
+
const Ee = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: S("highlighted-text-box", e, t), ...r, children: n });
|
|
1636
|
+
const it = ({
|
|
1637
|
+
variant: e = "empty",
|
|
1638
|
+
text: t = !1,
|
|
1639
|
+
button: n = !1,
|
|
1640
|
+
className: r = ""
|
|
1641
|
+
}) => {
|
|
1618
1642
|
let i = n && !!Object.keys(n).length;
|
|
1619
|
-
const c = typeof n == "object" && "breakpoints" in n, d =
|
|
1643
|
+
const c = typeof n == "object" && "breakpoints" in n, d = rt(c);
|
|
1620
1644
|
if (c && typeof n == "object" && typeof d == "number") {
|
|
1621
|
-
const f = Object.assign({}, n.breakpoints), h =
|
|
1622
|
-
i =
|
|
1645
|
+
const f = Object.assign({}, n.breakpoints), h = xn(Object.keys(f));
|
|
1646
|
+
i = bn(d, h, f);
|
|
1623
1647
|
}
|
|
1624
|
-
const {
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1648
|
+
const {
|
|
1649
|
+
breakpoints: o,
|
|
1650
|
+
text: a = "",
|
|
1651
|
+
component: u,
|
|
1652
|
+
...l
|
|
1653
|
+
} = n;
|
|
1654
|
+
return /* @__PURE__ */ s.jsx(
|
|
1655
|
+
Ee,
|
|
1656
|
+
{
|
|
1657
|
+
variant: "subtle",
|
|
1658
|
+
className: S("empty-state-box", e, r),
|
|
1659
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1660
|
+
t && /* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: t }),
|
|
1661
|
+
i && typeof n == "object" && (u || /* @__PURE__ */ s.jsx(
|
|
1662
|
+
J,
|
|
1663
|
+
{
|
|
1664
|
+
...l,
|
|
1665
|
+
variant: n.variant ? n.variant : "secondary",
|
|
1666
|
+
children: a
|
|
1667
|
+
}
|
|
1668
|
+
))
|
|
1669
|
+
] })
|
|
1670
|
+
}
|
|
1671
|
+
);
|
|
1636
1672
|
};
|
|
1637
|
-
const
|
|
1673
|
+
const Nt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), jn = { q: Nt, blockquote: Nt };
|
|
1638
1674
|
for (let e = 1; e <= 6; e++)
|
|
1639
|
-
|
|
1675
|
+
jn[`h${e}`] = { component: Nt, props: { className: "title" } };
|
|
1640
1676
|
const Ws = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: S("helper-text-box text-small", e, t), children: [
|
|
1641
1677
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1642
1678
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1643
|
-
|
|
1679
|
+
nt,
|
|
1644
1680
|
{
|
|
1645
1681
|
options: {
|
|
1646
|
-
wrapper:
|
|
1682
|
+
wrapper: D.Fragment,
|
|
1647
1683
|
forceBlock: !0,
|
|
1648
|
-
overrides:
|
|
1684
|
+
overrides: jn
|
|
1649
1685
|
},
|
|
1650
1686
|
children: r
|
|
1651
1687
|
}
|
|
1652
1688
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1653
1689
|
] });
|
|
1654
|
-
const
|
|
1655
|
-
const c =
|
|
1656
|
-
|
|
1690
|
+
const bo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: i }) => {
|
|
1691
|
+
const c = N(), d = ne(null), [o, a] = F(""), [u, l] = F("closed");
|
|
1692
|
+
X(() => {
|
|
1657
1693
|
const p = d.current;
|
|
1658
1694
|
if (p)
|
|
1659
1695
|
return p.addEventListener("transitionend", f), () => {
|
|
1660
1696
|
p.removeEventListener("transitionend", f);
|
|
1661
1697
|
};
|
|
1662
|
-
}, []),
|
|
1698
|
+
}, []), X(() => {
|
|
1663
1699
|
if (!r || typeof r != "string")
|
|
1664
1700
|
return;
|
|
1665
1701
|
const p = r.split(`
|
|
1666
1702
|
`);
|
|
1667
1703
|
a(p.length < 3 ? `${r.substring(0, 400)}...` : p.slice(0, 3).join(`
|
|
1668
1704
|
`));
|
|
1669
|
-
}, [r]),
|
|
1705
|
+
}, [r]), X(() => {
|
|
1670
1706
|
u === "ready-to-close" && l("closing");
|
|
1671
1707
|
}, [u]);
|
|
1672
1708
|
const f = ({ propertyName: p }) => {
|
|
@@ -1675,13 +1711,13 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1675
1711
|
if (!r)
|
|
1676
1712
|
return null;
|
|
1677
1713
|
const h = ["opening", "open"].includes(u);
|
|
1678
|
-
return /* @__PURE__ */ s.jsxs(
|
|
1714
|
+
return /* @__PURE__ */ s.jsxs(Ee, { variant: "subtle", className: S("hide-show-text-box", e), children: [
|
|
1679
1715
|
/* @__PURE__ */ s.jsxs("div", { ref: d, className: S("content", u), children: [
|
|
1680
|
-
/* @__PURE__ */ s.jsx(
|
|
1716
|
+
/* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: u === "closed" ? o : r }),
|
|
1681
1717
|
u !== "closed" && i
|
|
1682
1718
|
] }),
|
|
1683
1719
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1684
|
-
|
|
1720
|
+
J,
|
|
1685
1721
|
{
|
|
1686
1722
|
variant: "tertiary",
|
|
1687
1723
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1694,20 +1730,20 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1694
1730
|
}
|
|
1695
1731
|
) })
|
|
1696
1732
|
] });
|
|
1697
|
-
},
|
|
1698
|
-
const t =
|
|
1733
|
+
}, Vs = () => D.Fragment, Ys = ({ children: e }) => /* @__PURE__ */ s.jsx(Ee, { variant: "secondary", children: e }), Gs = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Js = ({ children: e }) => {
|
|
1734
|
+
const t = N();
|
|
1699
1735
|
if (!e)
|
|
1700
1736
|
return null;
|
|
1701
1737
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1702
1738
|
const r = [];
|
|
1703
|
-
for (const c of
|
|
1739
|
+
for (const c of Mt.toArray(e))
|
|
1704
1740
|
if (!(!c || typeof c == "string" || typeof c == "number"))
|
|
1705
|
-
if (
|
|
1741
|
+
if (D.isValidElement(c) && c.type === "summary") {
|
|
1706
1742
|
if (c.props && c.props.children) {
|
|
1707
|
-
for (const d of
|
|
1708
|
-
if (!(!d || typeof d == "string" || typeof d == "number") &&
|
|
1743
|
+
for (const d of Mt.toArray(c.props.children))
|
|
1744
|
+
if (!(!d || typeof d == "string" || typeof d == "number") && D.isValidElement(d)) {
|
|
1709
1745
|
const o = d.type;
|
|
1710
|
-
if (
|
|
1746
|
+
if (Gs.includes(o)) {
|
|
1711
1747
|
for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1712
1748
|
n = n[0].props.children[0];
|
|
1713
1749
|
break;
|
|
@@ -1718,130 +1754,155 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1718
1754
|
r.push(c);
|
|
1719
1755
|
const i = n ? n.toString() : "";
|
|
1720
1756
|
return /* @__PURE__ */ s.jsx(
|
|
1721
|
-
|
|
1757
|
+
kn,
|
|
1722
1758
|
{
|
|
1723
1759
|
label: i,
|
|
1724
1760
|
className: ["Sources", "Resources"].includes(i) ? "discrete-links" : "",
|
|
1725
1761
|
children: r.map((c) => c)
|
|
1726
1762
|
}
|
|
1727
1763
|
);
|
|
1728
|
-
},
|
|
1764
|
+
}, Xs = ({ children: e, ...t }) => {
|
|
1729
1765
|
if (t.class)
|
|
1730
1766
|
switch (t.class) {
|
|
1731
1767
|
case "casestudy":
|
|
1732
|
-
return /* @__PURE__ */ s.jsx(
|
|
1768
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "secondary", children: e });
|
|
1733
1769
|
case "general-textbox":
|
|
1734
1770
|
case "highlight-box":
|
|
1735
|
-
return /* @__PURE__ */ s.jsx(
|
|
1771
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "primary", children: e });
|
|
1736
1772
|
case "pink-textbox":
|
|
1737
|
-
return /* @__PURE__ */ s.jsx(
|
|
1773
|
+
return /* @__PURE__ */ s.jsx(Ee, { variant: "tertiary", children: e });
|
|
1738
1774
|
default:
|
|
1739
1775
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1740
1776
|
}
|
|
1741
1777
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1742
|
-
},
|
|
1743
|
-
const t =
|
|
1778
|
+
}, Zs = (e) => {
|
|
1779
|
+
const t = N(), n = Date.now().toString();
|
|
1744
1780
|
let r = "default";
|
|
1745
1781
|
const i = e.src;
|
|
1746
1782
|
return i.includes("youtube") || i.includes("vimeo") ? r = "video" : i.includes("riddle") || i.includes("sli.do") ? r = "poll" : i.includes("padlet") && (r = "padlet"), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1747
|
-
/* @__PURE__ */ s.jsx(
|
|
1783
|
+
/* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
|
|
1748
1784
|
/* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1749
1785
|
/* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1750
1786
|
] });
|
|
1751
|
-
},
|
|
1787
|
+
}, rn = (e) => {
|
|
1752
1788
|
let t = "";
|
|
1753
1789
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1754
|
-
},
|
|
1790
|
+
}, Ks = ({ children: e, ...t }) => {
|
|
1755
1791
|
let n = { ...t };
|
|
1756
1792
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1757
1793
|
let r = e, i = !1;
|
|
1758
|
-
for (const c of
|
|
1759
|
-
if (!(!c || typeof c == "string" || typeof c == "number") &&
|
|
1794
|
+
for (const c of Mt.toArray(e))
|
|
1795
|
+
if (!(!c || typeof c == "string" || typeof c == "number") && D.isValidElement(c)) {
|
|
1760
1796
|
const d = c.type;
|
|
1761
1797
|
if (["button", "center", "span", "strong"].includes(d) && c.props && c.props.children && c.props.children[0])
|
|
1762
|
-
for ((d === "button" ||
|
|
1798
|
+
for ((d === "button" || rn(c.props.children[0]) === "button") && (i = !0), r = c.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !D.isValidElement(r)); )
|
|
1763
1799
|
if (r.props && r.props.children && r.props.children[0])
|
|
1764
|
-
r = r.props.children[0], r &&
|
|
1800
|
+
r = r.props.children[0], r && rn(r) === "button" && (i = !0);
|
|
1765
1801
|
else
|
|
1766
1802
|
break;
|
|
1767
1803
|
}
|
|
1768
|
-
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(
|
|
1769
|
-
},
|
|
1770
|
-
const
|
|
1804
|
+
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(J, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1805
|
+
}, qs = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1806
|
+
const on = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1771
1807
|
n = n.replace(/^<br\/?>/, "");
|
|
1772
1808
|
const r = {
|
|
1773
|
-
wrapper:
|
|
1809
|
+
wrapper: D.Fragment,
|
|
1774
1810
|
forceBlock: !0,
|
|
1775
1811
|
overrides: {
|
|
1776
|
-
a:
|
|
1812
|
+
a: Ks,
|
|
1777
1813
|
// Override psuedo-code
|
|
1778
1814
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1779
|
-
CollapsibleSection:
|
|
1780
|
-
TextBox:
|
|
1781
|
-
CaseStudy:
|
|
1815
|
+
CollapsibleSection: kn,
|
|
1816
|
+
TextBox: Ee,
|
|
1817
|
+
CaseStudy: Ys,
|
|
1782
1818
|
// Override embedded HTML
|
|
1783
1819
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1784
|
-
style:
|
|
1785
|
-
details:
|
|
1786
|
-
div:
|
|
1787
|
-
iframe:
|
|
1820
|
+
style: Vs,
|
|
1821
|
+
details: Js,
|
|
1822
|
+
div: Xs,
|
|
1823
|
+
iframe: Zs
|
|
1788
1824
|
}
|
|
1789
1825
|
};
|
|
1790
|
-
return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(
|
|
1826
|
+
return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(nt, { options: { ...r, ...t }, children: n }) });
|
|
1791
1827
|
};
|
|
1792
|
-
const
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1828
|
+
const er = ({
|
|
1829
|
+
size: e = "medium",
|
|
1830
|
+
variant: t = "default",
|
|
1831
|
+
className: n = "",
|
|
1832
|
+
children: r,
|
|
1833
|
+
...i
|
|
1834
|
+
}) => /* @__PURE__ */ s.jsx("span", { className: S("pill", e, t, n), ...i, children: r });
|
|
1835
|
+
const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => D.createElement(e, { ...r, className: S("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1836
|
+
const tr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1837
|
+
const r = N(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
|
|
1838
|
+
return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(le, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1839
|
+
}, nr = De(tr);
|
|
1840
|
+
const _t = "loadingBlock_", sr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1841
|
+
const r = N();
|
|
1800
1842
|
t || (t = {
|
|
1801
|
-
0: { text: r.formatMessage({ id: `${
|
|
1802
|
-
75: { text: r.formatMessage({ id: `${
|
|
1803
|
-
100: { text: r.formatMessage({ id: `${
|
|
1843
|
+
0: { text: r.formatMessage({ id: `${_t}loading` }) },
|
|
1844
|
+
75: { text: r.formatMessage({ id: `${_t}almostDone` }) },
|
|
1845
|
+
100: { text: r.formatMessage({ id: `${_t}complete` }) }
|
|
1804
1846
|
});
|
|
1805
1847
|
let i = null;
|
|
1806
1848
|
const c = Object.keys(t);
|
|
1807
1849
|
for (let o = 0; o < c.length && !(e < parseInt(c[o])); o++)
|
|
1808
1850
|
i = c[o];
|
|
1809
|
-
const d = i && t[i].icon ? { "--icon": `url(${
|
|
1851
|
+
const d = i && t[i].icon ? { "--icon": `url(${Dt}icons/${t[i].icon}.svg)` } : {};
|
|
1810
1852
|
return /* @__PURE__ */ s.jsxs(
|
|
1811
|
-
|
|
1853
|
+
Ee,
|
|
1812
1854
|
{
|
|
1813
1855
|
className: S("loading-block", n, { "has-icon": i && t[i].icon }),
|
|
1814
1856
|
variant: "subtle",
|
|
1815
1857
|
style: d,
|
|
1816
1858
|
children: [
|
|
1817
1859
|
i && /* @__PURE__ */ s.jsx("span", { className: "step", children: t[i].text }),
|
|
1818
|
-
/* @__PURE__ */ s.jsx(
|
|
1860
|
+
/* @__PURE__ */ s.jsx(nr, { progress: e })
|
|
1819
1861
|
]
|
|
1820
1862
|
}
|
|
1821
1863
|
);
|
|
1822
|
-
},
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1864
|
+
}, vo = De(sr);
|
|
1865
|
+
const je = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(gn, { element: e, className: S("loading-placeholder", t), ...n });
|
|
1866
|
+
const Rt = {
|
|
1825
1867
|
header: ["logo", "link", "link", "search"],
|
|
1826
1868
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1827
1869
|
"cards-section": ["subtitle", "cards"],
|
|
1870
|
+
heading: ["title"],
|
|
1828
1871
|
cards: ["card", "card", "card", "card"],
|
|
1829
|
-
|
|
1830
|
-
|
|
1872
|
+
carousel: ["cards", "controls"],
|
|
1873
|
+
"carousel-with-title": ["title", "cards", "controls"],
|
|
1874
|
+
"overview-page": [
|
|
1875
|
+
"header",
|
|
1876
|
+
"sidebar",
|
|
1877
|
+
"title",
|
|
1878
|
+
"text",
|
|
1879
|
+
"cards-section",
|
|
1880
|
+
"cards-section",
|
|
1881
|
+
"footer"
|
|
1882
|
+
]
|
|
1883
|
+
}, yn = (e, t) => e in Rt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Rt[e].map((n, r) => yn(n, r)) }, t) : /* @__PURE__ */ s.jsx(je, { className: e }, t), rr = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: S("loading-state", e), ...t, children: Rt[e].map((n, r) => yn(n, r)) }), En = (e) => {
|
|
1831
1884
|
const t = e && e.toUpperCase().split(" ");
|
|
1832
1885
|
return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
|
|
1833
|
-
},
|
|
1834
|
-
const t = Math.ceil(26 /
|
|
1886
|
+
}, ze = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], or = (e) => {
|
|
1887
|
+
const t = Math.ceil(26 / ze.length), n = En(e).toLowerCase();
|
|
1835
1888
|
if (n === "")
|
|
1836
|
-
return
|
|
1889
|
+
return ze[0];
|
|
1837
1890
|
const r = n.charCodeAt(0) - 96;
|
|
1838
|
-
for (let i = 0; i <
|
|
1891
|
+
for (let i = 0; i < ze.length; i++)
|
|
1839
1892
|
if (r <= t * (i + 1))
|
|
1840
|
-
return
|
|
1893
|
+
return ze[i];
|
|
1841
1894
|
};
|
|
1842
|
-
const
|
|
1843
|
-
|
|
1844
|
-
|
|
1895
|
+
const an = 256, Ot = ({
|
|
1896
|
+
className: e = "",
|
|
1897
|
+
src: t = "",
|
|
1898
|
+
name: n,
|
|
1899
|
+
alt: r,
|
|
1900
|
+
width: i = an,
|
|
1901
|
+
height: c = an,
|
|
1902
|
+
...d
|
|
1903
|
+
}) => {
|
|
1904
|
+
const [o, a] = F(!1), u = ne(null);
|
|
1905
|
+
X(() => {
|
|
1845
1906
|
const f = u.current;
|
|
1846
1907
|
if (!f)
|
|
1847
1908
|
return;
|
|
@@ -1849,25 +1910,32 @@ const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1849
1910
|
if (!h)
|
|
1850
1911
|
return;
|
|
1851
1912
|
const p = i, _ = c;
|
|
1852
|
-
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle =
|
|
1913
|
+
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = or(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(En(n), p / 2, _ / 1.6);
|
|
1853
1914
|
}, [n]);
|
|
1854
1915
|
let l = !1;
|
|
1855
|
-
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx(
|
|
1856
|
-
"
|
|
1916
|
+
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx(
|
|
1917
|
+
"figure",
|
|
1857
1918
|
{
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1919
|
+
className: S("profile-picture", e, { error: o }),
|
|
1920
|
+
...d,
|
|
1921
|
+
children: l ? /* @__PURE__ */ s.jsx(
|
|
1922
|
+
"img",
|
|
1923
|
+
{
|
|
1924
|
+
src: t,
|
|
1925
|
+
alt: r || n,
|
|
1926
|
+
onError: () => {
|
|
1927
|
+
a(!0);
|
|
1928
|
+
},
|
|
1929
|
+
width: i,
|
|
1930
|
+
height: c
|
|
1931
|
+
}
|
|
1932
|
+
) : /* @__PURE__ */ s.jsx("canvas", { ref: u })
|
|
1865
1933
|
}
|
|
1866
|
-
)
|
|
1867
|
-
},
|
|
1868
|
-
image: `${
|
|
1934
|
+
);
|
|
1935
|
+
}, Sn = (e) => e === "apolitical" ? {
|
|
1936
|
+
image: `${Dt}logos/member_apolitical.svg`
|
|
1869
1937
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1870
|
-
image: `${
|
|
1938
|
+
image: `${Dt}logos/member_community.svg`
|
|
1871
1939
|
} : {
|
|
1872
1940
|
name: e.name,
|
|
1873
1941
|
role: e.jobTitle || "",
|
|
@@ -1875,7 +1943,7 @@ const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1875
1943
|
country: e.location && e.location.country || "",
|
|
1876
1944
|
url: `/profiles/${e.id}`,
|
|
1877
1945
|
image: e.image && e.image.thumbnail
|
|
1878
|
-
},
|
|
1946
|
+
}, ar = ({
|
|
1879
1947
|
role: e = "",
|
|
1880
1948
|
organisation: t = "",
|
|
1881
1949
|
country: n = "",
|
|
@@ -1886,9 +1954,9 @@ const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1886
1954
|
return "";
|
|
1887
1955
|
const o = `${e}${i && c ? ` — ${t}` : t}`;
|
|
1888
1956
|
let a = `${o}${(i || c) && d ? `, ${n}` : n}`;
|
|
1889
|
-
return a.length > r && (a = o), a.length > r && (a =
|
|
1957
|
+
return a.length > r && (a = o), a.length > r && (a = tt(a, r)), a;
|
|
1890
1958
|
};
|
|
1891
|
-
const
|
|
1959
|
+
const Bt = ({
|
|
1892
1960
|
element: e = "div",
|
|
1893
1961
|
member: t = "community",
|
|
1894
1962
|
additionalContent: n = !1,
|
|
@@ -1896,13 +1964,13 @@ const Ht = ({
|
|
|
1896
1964
|
gtmType: i = "member-click",
|
|
1897
1965
|
className: c = ""
|
|
1898
1966
|
}) => {
|
|
1899
|
-
const d =
|
|
1967
|
+
const d = N(), o = Sn(t);
|
|
1900
1968
|
o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1901
|
-
const { name: a, url: u, image: l } = o, f =
|
|
1902
|
-
return
|
|
1969
|
+
const { name: a, url: u, image: l } = o, f = ar(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
|
|
1970
|
+
return D.createElement(e, {
|
|
1903
1971
|
className: S("member text-medium", c),
|
|
1904
1972
|
children: /* @__PURE__ */ s.jsxs(
|
|
1905
|
-
|
|
1973
|
+
at,
|
|
1906
1974
|
{
|
|
1907
1975
|
href: u,
|
|
1908
1976
|
gtmType: i,
|
|
@@ -1911,7 +1979,7 @@ const Ht = ({
|
|
|
1911
1979
|
_ == null || _.stopPropagation();
|
|
1912
1980
|
},
|
|
1913
1981
|
children: [
|
|
1914
|
-
/* @__PURE__ */ s.jsx(
|
|
1982
|
+
/* @__PURE__ */ s.jsx(Ot, { name: a, src: l }),
|
|
1915
1983
|
/* @__PURE__ */ s.jsxs("p", { className: "details", children: [
|
|
1916
1984
|
/* @__PURE__ */ s.jsx("strong", { children: a }),
|
|
1917
1985
|
n && /* @__PURE__ */ s.jsxs("span", { className: "additional-content", children: [
|
|
@@ -1925,34 +1993,61 @@ const Ht = ({
|
|
|
1925
1993
|
)
|
|
1926
1994
|
});
|
|
1927
1995
|
};
|
|
1928
|
-
const
|
|
1996
|
+
const ln = {
|
|
1929
1997
|
small: 24,
|
|
1930
1998
|
medium: 48
|
|
1931
|
-
},
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1999
|
+
}, ir = ({
|
|
2000
|
+
element: e = "div",
|
|
2001
|
+
contributors: { total: t, data: n } = { total: void 0, data: [] },
|
|
2002
|
+
styling: { showText: r, size: i, showGap: c, showPlaceholders: d } = {
|
|
2003
|
+
showText: !0,
|
|
2004
|
+
size: "medium",
|
|
2005
|
+
showGap: !0,
|
|
2006
|
+
showPlaceholders: !1
|
|
2007
|
+
},
|
|
2008
|
+
cutoff: o = 2,
|
|
2009
|
+
className: a = "",
|
|
2010
|
+
...u
|
|
2011
|
+
}) => {
|
|
2012
|
+
const l = N();
|
|
2013
|
+
return !n || n.length === 0 ? null : D.createElement(e, {
|
|
2014
|
+
...u,
|
|
2015
|
+
className: S("contributors", a, i, { "has-gap": c }),
|
|
2016
|
+
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2017
|
+
/* @__PURE__ */ s.jsx("ul", { children: n.map((f, h) => {
|
|
2018
|
+
let p, _ = "";
|
|
2019
|
+
if (h < o) {
|
|
2020
|
+
const { name: j = "", image: g = "" } = Sn(f);
|
|
1940
2021
|
if (d)
|
|
1941
|
-
return /* @__PURE__ */ s.jsx(
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
2022
|
+
return /* @__PURE__ */ s.jsx(je, { element: "li", className: "contributor" }, h);
|
|
2023
|
+
p = /* @__PURE__ */ s.jsx(
|
|
2024
|
+
Ot,
|
|
2025
|
+
{
|
|
2026
|
+
name: j,
|
|
2027
|
+
src: g,
|
|
2028
|
+
width: ln[i || "medium"],
|
|
2029
|
+
height: ln[i || "medium"]
|
|
2030
|
+
}
|
|
2031
|
+
);
|
|
2032
|
+
} else if (h === o) {
|
|
2033
|
+
const j = (t || n.length) - o;
|
|
2034
|
+
p = /* @__PURE__ */ s.jsxs(
|
|
2035
|
+
"small",
|
|
2036
|
+
{
|
|
2037
|
+
className: S({ "large-number": j > 99 }),
|
|
2038
|
+
children: [
|
|
2039
|
+
"+",
|
|
2040
|
+
Ls(j, 0)
|
|
2041
|
+
]
|
|
2042
|
+
}
|
|
2043
|
+
), _ = "number-left";
|
|
1949
2044
|
}
|
|
1950
|
-
return
|
|
2045
|
+
return p ? /* @__PURE__ */ s.jsx("li", { className: S("contributor", _), children: p }, h) : null;
|
|
1951
2046
|
}) }),
|
|
1952
|
-
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ?
|
|
1953
|
-
] })
|
|
1954
|
-
);
|
|
1955
|
-
},
|
|
2047
|
+
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? l.formatMessage({ id: `member_${n[0]}` }) : tt(n[0].name || "", 20) : null })
|
|
2048
|
+
] })
|
|
2049
|
+
});
|
|
2050
|
+
}, lr = ({ showDevTools: e = !0, children: t }) => {
|
|
1956
2051
|
const n = new ds({
|
|
1957
2052
|
// default options we would like on all queries can be overridden individually
|
|
1958
2053
|
defaultOptions: {
|
|
@@ -1969,15 +2064,15 @@ const dn = {
|
|
|
1969
2064
|
e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
|
|
1970
2065
|
] });
|
|
1971
2066
|
};
|
|
1972
|
-
var
|
|
1973
|
-
function
|
|
1974
|
-
var t = e.children, n = e.client, r = e.apiKey, i = e.options, c =
|
|
1975
|
-
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 && (
|
|
2067
|
+
var cr = Ft({ client: Xe });
|
|
2068
|
+
function dr(e) {
|
|
2069
|
+
var t = e.children, n = e.client, r = e.apiKey, i = e.options, c = et(function() {
|
|
2070
|
+
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 && (Xe.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Xe.init(r, i)), Xe);
|
|
1976
2071
|
}, [n, r]);
|
|
1977
|
-
return
|
|
2072
|
+
return D.createElement(cr.Provider, { value: { client: c } }, t);
|
|
1978
2073
|
}
|
|
1979
|
-
const
|
|
1980
|
-
|
|
2074
|
+
const ur = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
|
|
2075
|
+
dr,
|
|
1981
2076
|
{
|
|
1982
2077
|
apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
|
|
1983
2078
|
options: {
|
|
@@ -1992,28 +2087,28 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
|
|
|
1992
2087
|
},
|
|
1993
2088
|
children: e
|
|
1994
2089
|
}
|
|
1995
|
-
) : e,
|
|
2090
|
+
) : e, mr = ({ children: e, locale: t, messages: n }) => {
|
|
1996
2091
|
const r = t || "en", i = {
|
|
1997
2092
|
...Rs[r],
|
|
1998
2093
|
...n || {}
|
|
1999
2094
|
};
|
|
2000
2095
|
return /* @__PURE__ */ s.jsx(ls, { locale: r, messages: i, children: e });
|
|
2001
|
-
},
|
|
2002
|
-
const [r, i] =
|
|
2003
|
-
return
|
|
2096
|
+
}, Se = Ft(null), fr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { value: t, children: e }), wo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
2097
|
+
const [r, i] = F({ isLoading: !0 });
|
|
2098
|
+
return X(() => {
|
|
2004
2099
|
e().then((c) => i({ ...c, isLoading: !1 })).catch(() => i({ isLoading: !1 }));
|
|
2005
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
2100
|
+
}, []), /* @__PURE__ */ s.jsx(mr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(fr, { user: r, children: /* @__PURE__ */ s.jsx(lr, { children: /* @__PURE__ */ s.jsx(ur, { user: r, children: t }) }) }) });
|
|
2006
2101
|
};
|
|
2007
|
-
const
|
|
2102
|
+
const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2008
2103
|
}, leave: () => {
|
|
2009
2104
|
} } }) => {
|
|
2010
|
-
const i =
|
|
2011
|
-
|
|
2105
|
+
const i = N(), c = ge(Se), d = c && typeof c.id == "string", [o, a] = F(e), [u, l] = F(e ? "joined" : "notJoined");
|
|
2106
|
+
X(() => {
|
|
2012
2107
|
u === "joining" ? l("joined") : u === "leaving" && l("notJoined");
|
|
2013
2108
|
}, [o]);
|
|
2014
2109
|
const f = {}, h = {};
|
|
2015
|
-
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${
|
|
2016
|
-
|
|
2110
|
+
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${xt}_leave` }), f["aria-label"] = i.formatMessage({ id: `${xt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2111
|
+
J,
|
|
2017
2112
|
{
|
|
2018
2113
|
variant: o ? "secondary" : "primary",
|
|
2019
2114
|
size: "medium",
|
|
@@ -2025,30 +2120,30 @@ const vt = "joinCommunityButton", Mn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2025
2120
|
className: S("join-community-button", u, { active: u === "joining" }),
|
|
2026
2121
|
disabled: !d,
|
|
2027
2122
|
...f,
|
|
2028
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${
|
|
2123
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${xt}${["joining", "leaving"].includes(u) ? `_${u}` : o ? "_member" : t ? "_short" : ""}` }) })
|
|
2029
2124
|
}
|
|
2030
2125
|
);
|
|
2031
2126
|
};
|
|
2032
|
-
const
|
|
2127
|
+
const bt = "communityDetails_", ko = ({
|
|
2033
2128
|
className: e = "",
|
|
2034
2129
|
isMember: t = !1,
|
|
2035
2130
|
slug: n,
|
|
2036
2131
|
members: { number: r = 0, data: i = [] } = { number: 0, data: [] },
|
|
2037
2132
|
functions: { invite: c, ...d }
|
|
2038
2133
|
}) => {
|
|
2039
|
-
const o =
|
|
2134
|
+
const o = N(), a = 5, u = r || i.length, l = i.length ? i : Array(a).fill({});
|
|
2040
2135
|
return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", e), children: [
|
|
2041
2136
|
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2042
2137
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2043
2138
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2044
2139
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2045
|
-
o.formatMessage({ id: `${
|
|
2140
|
+
o.formatMessage({ id: `${bt}members` }),
|
|
2046
2141
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: u })
|
|
2047
2142
|
] }),
|
|
2048
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${
|
|
2143
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${bt}viewAll` }) }) })
|
|
2049
2144
|
] }),
|
|
2050
2145
|
/* @__PURE__ */ s.jsx(
|
|
2051
|
-
|
|
2146
|
+
ir,
|
|
2052
2147
|
{
|
|
2053
2148
|
contributors: {
|
|
2054
2149
|
total: r,
|
|
@@ -2063,34 +2158,34 @@ const wt = "communityDetails_", wo = ({
|
|
|
2063
2158
|
}
|
|
2064
2159
|
)
|
|
2065
2160
|
] }),
|
|
2066
|
-
/* @__PURE__ */ s.jsx(
|
|
2161
|
+
/* @__PURE__ */ s.jsx(Tn, { isMember: t, functions: { ...d } }),
|
|
2067
2162
|
t && /* @__PURE__ */ s.jsx(
|
|
2068
|
-
|
|
2163
|
+
J,
|
|
2069
2164
|
{
|
|
2070
2165
|
variant: "primary",
|
|
2071
2166
|
onClick: c,
|
|
2072
2167
|
icon: { icon: "plus" },
|
|
2073
2168
|
styling: { fullWidth: !0 },
|
|
2074
|
-
children: o.formatMessage({ id: `${
|
|
2169
|
+
children: o.formatMessage({ id: `${bt}invite` })
|
|
2075
2170
|
}
|
|
2076
2171
|
)
|
|
2077
2172
|
] });
|
|
2078
2173
|
};
|
|
2079
|
-
const
|
|
2174
|
+
const jo = ({
|
|
2080
2175
|
breadcrumbs: e,
|
|
2081
2176
|
cutoff: t = 20,
|
|
2082
2177
|
className: n = ""
|
|
2083
2178
|
}) => {
|
|
2084
|
-
const r =
|
|
2179
|
+
const r = N();
|
|
2085
2180
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2086
|
-
/* @__PURE__ */ s.jsx(
|
|
2181
|
+
/* @__PURE__ */ s.jsx(le, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2087
2182
|
/* @__PURE__ */ s.jsx("ul", { className: S("breadcrumbs text-small", n), children: e.map(({ text: i, href: c, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
2088
|
-
d && /* @__PURE__ */ s.jsx(
|
|
2089
|
-
/* @__PURE__ */ s.jsx(
|
|
2183
|
+
d && /* @__PURE__ */ s.jsx(le, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2184
|
+
/* @__PURE__ */ s.jsx(at, { href: d ? void 0 : c, children: tt(i, t) })
|
|
2090
2185
|
] }, `${window.btoa(i)}_${o}`)) })
|
|
2091
2186
|
] });
|
|
2092
2187
|
};
|
|
2093
|
-
const
|
|
2188
|
+
const yo = ({
|
|
2094
2189
|
options: e,
|
|
2095
2190
|
allOption: t = !1,
|
|
2096
2191
|
allowMultiple: n = !0,
|
|
@@ -2098,7 +2193,7 @@ const jo = ({
|
|
|
2098
2193
|
},
|
|
2099
2194
|
className: i = ""
|
|
2100
2195
|
}) => {
|
|
2101
|
-
const c =
|
|
2196
|
+
const c = N(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || c.formatMessage({ id: "filters_all" }) }, ...e] : e, [o, a] = F(t ? ["all"] : []), u = (l, f) => {
|
|
2102
2197
|
let h = [];
|
|
2103
2198
|
o.includes(l) ? h = o.filter((p) => p !== l) : l === "all" ? h = ["all"] : n ? h = [...o.filter((p) => p !== "all"), l] : h = [l], a((p) => (r && typeof r == "function" && r({ current: h, previous: p }), h)), f && typeof f == "function" && f();
|
|
2104
2199
|
};
|
|
@@ -2117,7 +2212,7 @@ const jo = ({
|
|
|
2117
2212
|
}
|
|
2118
2213
|
) }, l);
|
|
2119
2214
|
}) });
|
|
2120
|
-
},
|
|
2215
|
+
}, hr = (e, t) => {
|
|
2121
2216
|
const n = String(e);
|
|
2122
2217
|
if (!t || !t.length)
|
|
2123
2218
|
return `/${n}`;
|
|
@@ -2126,7 +2221,7 @@ const jo = ({
|
|
|
2126
2221
|
c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
|
|
2127
2222
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2128
2223
|
};
|
|
2129
|
-
const
|
|
2224
|
+
const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, We = "languageSwitcher_", Eo = ({
|
|
2130
2225
|
currentLanguage: e,
|
|
2131
2226
|
isOriginalLanguage: t = !1,
|
|
2132
2227
|
isHumanTranslation: n = !1,
|
|
@@ -2138,35 +2233,35 @@ const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2138
2233
|
label: o,
|
|
2139
2234
|
className: a = ""
|
|
2140
2235
|
}) => {
|
|
2141
|
-
const u =
|
|
2142
|
-
if (
|
|
2236
|
+
const u = N(), [l, f] = F(e);
|
|
2237
|
+
if (X(() => {
|
|
2143
2238
|
e !== l && f(e);
|
|
2144
2239
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
2145
2240
|
return null;
|
|
2146
2241
|
const p = Object.keys(r), _ = l !== e;
|
|
2147
2242
|
return /* @__PURE__ */ s.jsxs("div", { className: S("language-switcher text-small", d, a), children: [
|
|
2148
2243
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2149
|
-
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${
|
|
2244
|
+
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${We}label` }) }),
|
|
2150
2245
|
/* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
|
|
2151
|
-
if (!
|
|
2246
|
+
if (!vt[j])
|
|
2152
2247
|
return null;
|
|
2153
2248
|
let g = { className: j };
|
|
2154
|
-
return l === j ? g["aria-label"] = u.formatMessage({ id: `${
|
|
2249
|
+
return l === j ? g["aria-label"] = u.formatMessage({ id: `${We}selected` }, { language: vt[j] }) : g = {
|
|
2155
2250
|
...g,
|
|
2156
|
-
href:
|
|
2251
|
+
href: hr(j, c),
|
|
2157
2252
|
onClick: (E) => {
|
|
2158
2253
|
E.preventDefault(), E.stopPropagation(), f(j), i(j);
|
|
2159
2254
|
}
|
|
2160
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2255
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { ...g, fallbackElement: "span", children: vt[j] }) }, j);
|
|
2161
2256
|
}) }),
|
|
2162
|
-
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: u.formatMessage({ id: `${
|
|
2257
|
+
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: u.formatMessage({ id: `${We}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2163
2258
|
] }),
|
|
2164
2259
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ s.jsx("small", {
|
|
2165
2260
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2166
2261
|
// @ts-ignore
|
|
2167
2262
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2168
|
-
children: u.formatMessage({ id: `${
|
|
2169
|
-
email:
|
|
2263
|
+
children: u.formatMessage({ id: `${We}disclaimer` }, {
|
|
2264
|
+
email: Oe.support,
|
|
2170
2265
|
link: (j) => {
|
|
2171
2266
|
const g = `mailto:${j}`;
|
|
2172
2267
|
return /* @__PURE__ */ s.jsx("a", { href: g, children: j });
|
|
@@ -2175,7 +2270,7 @@ const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2175
2270
|
})
|
|
2176
2271
|
] });
|
|
2177
2272
|
};
|
|
2178
|
-
const
|
|
2273
|
+
const wt = cs({ locale: "en", messages: Lt }), pr = ({
|
|
2179
2274
|
page: e = 1,
|
|
2180
2275
|
length: t = 0,
|
|
2181
2276
|
limit: n = 10,
|
|
@@ -2183,14 +2278,14 @@ const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
|
2183
2278
|
},
|
|
2184
2279
|
icon: i = !1,
|
|
2185
2280
|
messages: c = {
|
|
2186
|
-
button:
|
|
2187
|
-
endOfFeed:
|
|
2188
|
-
error:
|
|
2281
|
+
button: wt.formatMessage({ id: "loadMore_button" }),
|
|
2282
|
+
endOfFeed: wt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2283
|
+
error: wt.formatMessage({ id: "loadMore_error" })
|
|
2189
2284
|
},
|
|
2190
2285
|
className: d = "",
|
|
2191
2286
|
gtmContext: o = "LoadMore"
|
|
2192
2287
|
}) => {
|
|
2193
|
-
const [a, u] =
|
|
2288
|
+
const [a, u] = F(!1), [l, f] = F(!1);
|
|
2194
2289
|
if (t <= 0 || t < n * e)
|
|
2195
2290
|
return null;
|
|
2196
2291
|
const h = async (p) => {
|
|
@@ -2203,7 +2298,7 @@ const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
|
2203
2298
|
return /* @__PURE__ */ s.jsxs("footer", { className: S("load-more", d), children: [
|
|
2204
2299
|
a && /* @__PURE__ */ s.jsx("p", { className: "error", children: c.error }),
|
|
2205
2300
|
l ? /* @__PURE__ */ s.jsx("p", { children: c.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2206
|
-
|
|
2301
|
+
J,
|
|
2207
2302
|
{
|
|
2208
2303
|
variant: "secondary",
|
|
2209
2304
|
icon: i,
|
|
@@ -2217,19 +2312,19 @@ const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
|
2217
2312
|
)
|
|
2218
2313
|
] });
|
|
2219
2314
|
};
|
|
2220
|
-
let
|
|
2221
|
-
const
|
|
2222
|
-
const i =
|
|
2315
|
+
let Ve = !1;
|
|
2316
|
+
const gr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2317
|
+
const i = N(), c = ne(null), [d, o] = F(!1), a = (u) => {
|
|
2223
2318
|
c.current && u.target instanceof HTMLElement && !c.current.contains(u.target) && o(!1);
|
|
2224
2319
|
};
|
|
2225
|
-
return
|
|
2320
|
+
return X(() => (document.addEventListener("click", a, !0), () => {
|
|
2226
2321
|
document.removeEventListener("click", a, !0);
|
|
2227
|
-
})),
|
|
2322
|
+
})), D.createElement(e, {
|
|
2228
2323
|
ref: c,
|
|
2229
2324
|
className: S("more-menu text-medium", r),
|
|
2230
2325
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2231
2326
|
/* @__PURE__ */ s.jsx(
|
|
2232
|
-
|
|
2327
|
+
J,
|
|
2233
2328
|
{
|
|
2234
2329
|
variant: "tertiary",
|
|
2235
2330
|
size: "medium",
|
|
@@ -2248,16 +2343,16 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2248
2343
|
o(!1), typeof l == "function" && l(g);
|
|
2249
2344
|
},
|
|
2250
2345
|
onFocus: () => {
|
|
2251
|
-
|
|
2346
|
+
Ve && (clearTimeout(Ve), Ve = !1);
|
|
2252
2347
|
},
|
|
2253
2348
|
onBlur: () => {
|
|
2254
|
-
|
|
2349
|
+
Ve = setTimeout(() => {
|
|
2255
2350
|
o(!1);
|
|
2256
2351
|
}, 100);
|
|
2257
2352
|
}
|
|
2258
2353
|
};
|
|
2259
2354
|
return u && (j.href = u), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2260
|
-
|
|
2355
|
+
J,
|
|
2261
2356
|
{
|
|
2262
2357
|
variant: "tertiary",
|
|
2263
2358
|
size: "medium",
|
|
@@ -2270,32 +2365,37 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2270
2365
|
] })
|
|
2271
2366
|
});
|
|
2272
2367
|
};
|
|
2273
|
-
const
|
|
2274
|
-
const
|
|
2368
|
+
const $n = ({ 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(le, { children: /* @__PURE__ */ s.jsx(ye, { id: "apolitical" }) }) }) });
|
|
2369
|
+
const _r = {
|
|
2275
2370
|
"2-1": 901
|
|
2276
|
-
},
|
|
2277
|
-
|
|
2371
|
+
}, So = ({
|
|
2372
|
+
layout: e = "2-1",
|
|
2373
|
+
hideOnMobile: t = !1,
|
|
2374
|
+
className: n = "",
|
|
2375
|
+
children: r
|
|
2376
|
+
}) => {
|
|
2377
|
+
const i = rt(!0);
|
|
2278
2378
|
let c = r;
|
|
2279
|
-
return
|
|
2379
|
+
return D.Children.count(r) === 1 && (c = D.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: S("columns", `layout-${e}`, n), children: D.Children.map(c, (d, o) => t !== !1 && o === t && i && i < _r[e] ? null : d) });
|
|
2280
2380
|
};
|
|
2281
|
-
const
|
|
2282
|
-
const e =
|
|
2283
|
-
|
|
2381
|
+
const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], yt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), xr = () => {
|
|
2382
|
+
const e = N(), [t, n, r] = fs(jt), [i, c] = F(!t["apol-cookie-banner"]), d = () => {
|
|
2383
|
+
jt.forEach((l) => {
|
|
2284
2384
|
n(l, !0, {
|
|
2285
2385
|
path: "/",
|
|
2286
|
-
expires:
|
|
2386
|
+
expires: yt,
|
|
2287
2387
|
domain: l === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2288
2388
|
});
|
|
2289
2389
|
}), c(!1), window.location.reload();
|
|
2290
2390
|
}, o = () => {
|
|
2291
2391
|
n("apol-cookie-banner", !0, {
|
|
2292
2392
|
path: "/",
|
|
2293
|
-
expires:
|
|
2294
|
-
}),
|
|
2393
|
+
expires: yt
|
|
2394
|
+
}), jt.forEach((l) => {
|
|
2295
2395
|
if (l === "apol-cookie-banner") {
|
|
2296
2396
|
n(l, !0, {
|
|
2297
2397
|
path: "/",
|
|
2298
|
-
expires:
|
|
2398
|
+
expires: yt
|
|
2299
2399
|
});
|
|
2300
2400
|
return;
|
|
2301
2401
|
}
|
|
@@ -2317,14 +2417,14 @@ const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2317
2417
|
className: "gtm-trackable",
|
|
2318
2418
|
"data-gtm-event-context": "cookie-banner",
|
|
2319
2419
|
"data-gtm-event-type": `cookie-${l.gtmType}-click`,
|
|
2320
|
-
children: e.formatMessage({ id: `${
|
|
2420
|
+
children: e.formatMessage({ id: `${kt}buttons_${l.id}` })
|
|
2321
2421
|
});
|
|
2322
2422
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2323
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2324
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2325
|
-
/* @__PURE__ */ s.jsx(
|
|
2423
|
+
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${kt}title` }) }),
|
|
2424
|
+
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${kt}text` }) }),
|
|
2425
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: u })
|
|
2326
2426
|
] });
|
|
2327
|
-
},
|
|
2427
|
+
}, we = {
|
|
2328
2428
|
platform: {
|
|
2329
2429
|
order: ["events", "courses", "qanda", "articles"],
|
|
2330
2430
|
// An array guarantees the right order
|
|
@@ -2389,11 +2489,11 @@ const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2389
2489
|
text: {
|
|
2390
2490
|
order: ["dataProtection", "euDataProtection"],
|
|
2391
2491
|
dataProtection: {
|
|
2392
|
-
email:
|
|
2492
|
+
email: Oe["data-protection"].default,
|
|
2393
2493
|
gtmType: "email-dpo-link"
|
|
2394
2494
|
},
|
|
2395
2495
|
euDataProtection: {
|
|
2396
|
-
email:
|
|
2496
|
+
email: Oe["data-protection"].eu,
|
|
2397
2497
|
gtmType: "email-eu-dpo-link"
|
|
2398
2498
|
}
|
|
2399
2499
|
}
|
|
@@ -2405,10 +2505,10 @@ const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2405
2505
|
registered: { address: !0 },
|
|
2406
2506
|
berlin: { address: !0 },
|
|
2407
2507
|
support: {
|
|
2408
|
-
email:
|
|
2508
|
+
email: Oe.support,
|
|
2409
2509
|
gtmType: "concierge-email-click"
|
|
2410
2510
|
},
|
|
2411
|
-
business: { email:
|
|
2511
|
+
business: { email: Oe.general, gtmType: "hello-email-click" }
|
|
2412
2512
|
}
|
|
2413
2513
|
},
|
|
2414
2514
|
social: {
|
|
@@ -2418,37 +2518,37 @@ const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2418
2518
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2419
2519
|
}
|
|
2420
2520
|
};
|
|
2421
|
-
const
|
|
2422
|
-
const t =
|
|
2521
|
+
const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
2522
|
+
const t = we[e].order || [];
|
|
2423
2523
|
let n = !1;
|
|
2424
|
-
return "text" in
|
|
2425
|
-
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(
|
|
2524
|
+
return "text" in we[e] && (n = we[e].text), /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
2525
|
+
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}` }) }),
|
|
2426
2526
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2427
2527
|
if (["order", "child", "text"].includes(r))
|
|
2428
2528
|
return null;
|
|
2429
|
-
const { href: i, gtmType: c } =
|
|
2529
|
+
const { href: i, gtmType: c } = we[e][r], d = {};
|
|
2430
2530
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2431
2531
|
"a",
|
|
2432
2532
|
{
|
|
2433
2533
|
href: i,
|
|
2434
2534
|
className: "gtm-trackable",
|
|
2435
|
-
"data-gtm-event-context":
|
|
2535
|
+
"data-gtm-event-context": Ze,
|
|
2436
2536
|
"data-gtm-event-type": c,
|
|
2437
2537
|
...d,
|
|
2438
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2538
|
+
children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}` })
|
|
2439
2539
|
}
|
|
2440
2540
|
) }, `${e}_${r}`);
|
|
2441
2541
|
}) }),
|
|
2442
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(
|
|
2443
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(
|
|
2542
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
2543
|
+
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}` }) }),
|
|
2444
2544
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2445
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(
|
|
2545
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
2446
2546
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2447
2547
|
"a",
|
|
2448
2548
|
{
|
|
2449
2549
|
href: `mailto:${n[r].email}`,
|
|
2450
2550
|
className: "gtm-trackable",
|
|
2451
|
-
"data-gtm-event-context":
|
|
2551
|
+
"data-gtm-event-context": Ze,
|
|
2452
2552
|
"data-gtm-event-type": n[r].gtmType,
|
|
2453
2553
|
children: n[r].email
|
|
2454
2554
|
}
|
|
@@ -2456,26 +2556,26 @@ const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
|
2456
2556
|
] })
|
|
2457
2557
|
] }, `dl-${e}-${r}`)) })
|
|
2458
2558
|
] }, e);
|
|
2459
|
-
},
|
|
2460
|
-
/* @__PURE__ */ s.jsx(
|
|
2559
|
+
}, Mn = () => /* @__PURE__ */ s.jsx("div", { id: "footer", children: /* @__PURE__ */ s.jsxs("div", { className: "wrapper", children: [
|
|
2560
|
+
/* @__PURE__ */ s.jsx(gn, { element: "hr" }),
|
|
2461
2561
|
/* @__PURE__ */ s.jsx(
|
|
2462
|
-
|
|
2562
|
+
$n,
|
|
2463
2563
|
{
|
|
2464
2564
|
variant: "inverted",
|
|
2465
2565
|
version: "full",
|
|
2466
2566
|
className: "gtm-trackable",
|
|
2467
|
-
"data-gtm-event-context":
|
|
2567
|
+
"data-gtm-event-context": Ze,
|
|
2468
2568
|
"data-gtm-event-type": "logo-homepage-link"
|
|
2469
2569
|
}
|
|
2470
2570
|
),
|
|
2471
2571
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2472
|
-
/* @__PURE__ */ s.jsx(
|
|
2473
|
-
Object.keys(
|
|
2572
|
+
/* @__PURE__ */ s.jsx(cn, { group: e }),
|
|
2573
|
+
Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(cn, { group: we[e].child })
|
|
2474
2574
|
] }, e)) }),
|
|
2475
2575
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2476
2576
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
2477
|
-
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(
|
|
2478
|
-
const t =
|
|
2577
|
+
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(we.social.order) && we.social.order.map((e) => {
|
|
2578
|
+
const t = we.social[e];
|
|
2479
2579
|
return /* @__PURE__ */ s.jsx("li", { className: e, children: /* @__PURE__ */ s.jsx(
|
|
2480
2580
|
"a",
|
|
2481
2581
|
{
|
|
@@ -2483,22 +2583,22 @@ const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
|
2483
2583
|
target: "_blank",
|
|
2484
2584
|
rel: "noopener noreferrer",
|
|
2485
2585
|
className: "gtm-trackable",
|
|
2486
|
-
"data-gtm-event-context":
|
|
2586
|
+
"data-gtm-event-context": Ze,
|
|
2487
2587
|
"data-gtm-event-type": "social-click",
|
|
2488
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(
|
|
2588
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}social_${e}` }) })
|
|
2489
2589
|
}
|
|
2490
2590
|
) }, e);
|
|
2491
2591
|
}) }),
|
|
2492
|
-
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(
|
|
2592
|
+
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(ye, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2493
2593
|
] })
|
|
2494
2594
|
] }) });
|
|
2495
|
-
const
|
|
2496
|
-
const i =
|
|
2595
|
+
const Ye = "emailHelperTextBox_", To = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2596
|
+
const i = N(), [c, d] = F({ path: `${Ye}default`, type: "default", link: {}, mail: {}, error: "" }), [o, a] = F(!1), u = ke(
|
|
2497
2597
|
(p) => {
|
|
2498
2598
|
p.preventDefault(), p.stopPropagation();
|
|
2499
2599
|
const _ = (j) => {
|
|
2500
2600
|
d({
|
|
2501
|
-
path: `${
|
|
2601
|
+
path: `${Ye}error_verificationFailedToSend`,
|
|
2502
2602
|
type: "error",
|
|
2503
2603
|
link: {
|
|
2504
2604
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -2518,7 +2618,7 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2518
2618
|
});
|
|
2519
2619
|
};
|
|
2520
2620
|
if (typeof r != "function") {
|
|
2521
|
-
_(i.formatMessage({ id: `${
|
|
2621
|
+
_(i.formatMessage({ id: `${Ye}error_noFunction` }));
|
|
2522
2622
|
return;
|
|
2523
2623
|
}
|
|
2524
2624
|
a(!0), r(t).then(() => {
|
|
@@ -2532,9 +2632,9 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2532
2632
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2533
2633
|
[t, n, r]
|
|
2534
2634
|
);
|
|
2535
|
-
|
|
2635
|
+
X(
|
|
2536
2636
|
() => {
|
|
2537
|
-
let p =
|
|
2637
|
+
let p = Ye, _ = "default", j = {}, g = {};
|
|
2538
2638
|
switch (e) {
|
|
2539
2639
|
case "gov":
|
|
2540
2640
|
p += "autoApproved", _ = "success";
|
|
@@ -2593,8 +2693,8 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2593
2693
|
return ["link", "mail"].forEach((p) => {
|
|
2594
2694
|
l[p] = Object.keys(c[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: _ }) : (_) => _;
|
|
2595
2695
|
}), /* @__PURE__ */ s.jsx(Ws, { type: c.type, heading: o ? !1 : i.formatMessage({ id: `${c.path}_title` }), children: o ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2596
|
-
/* @__PURE__ */ s.jsx(
|
|
2597
|
-
/* @__PURE__ */ s.jsx(
|
|
2696
|
+
/* @__PURE__ */ s.jsx(je, { element: "span" }),
|
|
2697
|
+
/* @__PURE__ */ s.jsx(je, { element: "span" })
|
|
2598
2698
|
] }) : (
|
|
2599
2699
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2600
2700
|
// @ts-ignore
|
|
@@ -2614,29 +2714,29 @@ const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2614
2714
|
)
|
|
2615
2715
|
) });
|
|
2616
2716
|
};
|
|
2617
|
-
const
|
|
2618
|
-
[
|
|
2717
|
+
const Ge = "passwordRules_", Cn = "isMoreThanEightCharacters", An = "includesNumberAndSymbol", Dn = "includesLowerAndUppercase", br = {
|
|
2718
|
+
[Cn]: "8Characters",
|
|
2619
2719
|
[An]: "numberSymbol",
|
|
2620
|
-
[
|
|
2621
|
-
},
|
|
2622
|
-
const n =
|
|
2720
|
+
[Dn]: "lowercaseUppercase"
|
|
2721
|
+
}, vr = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2722
|
+
const n = N();
|
|
2623
2723
|
return /* @__PURE__ */ s.jsxs("aside", { className: S("password-rules", t), children: [
|
|
2624
|
-
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${
|
|
2625
|
-
/* @__PURE__ */ s.jsx("ul", { children: [
|
|
2626
|
-
/* @__PURE__ */ s.jsxs(
|
|
2627
|
-
n.formatMessage({ id: `${
|
|
2724
|
+
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Ge}intro` }) }),
|
|
2725
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Cn, An, Dn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: S({ matches: e[r] }), children: [
|
|
2726
|
+
/* @__PURE__ */ s.jsxs(le, { children: [
|
|
2727
|
+
n.formatMessage({ id: `${Ge}rule_label` }),
|
|
2628
2728
|
" "
|
|
2629
2729
|
] }),
|
|
2630
|
-
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${
|
|
2631
|
-
!e[r] && /* @__PURE__ */ s.jsxs(
|
|
2730
|
+
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Ge}rule_${br[r]}` }) }),
|
|
2731
|
+
!e[r] && /* @__PURE__ */ s.jsxs(le, { element: "strong", children: [
|
|
2632
2732
|
" ",
|
|
2633
2733
|
" ",
|
|
2634
|
-
n.formatMessage({ id: `${
|
|
2734
|
+
n.formatMessage({ id: `${Ge}notMet` })
|
|
2635
2735
|
] })
|
|
2636
2736
|
] }, `rule-${r}`)) })
|
|
2637
2737
|
] });
|
|
2638
|
-
},
|
|
2639
|
-
const
|
|
2738
|
+
}, $o = De(vr);
|
|
2739
|
+
const Mo = ({
|
|
2640
2740
|
text: e = {},
|
|
2641
2741
|
topRating: t = 5,
|
|
2642
2742
|
functions: { createRating: n = () => null, updateRating: r = () => {
|
|
@@ -2645,7 +2745,7 @@ const $o = ({
|
|
|
2645
2745
|
className: c = "",
|
|
2646
2746
|
hasLoaded: d = !1
|
|
2647
2747
|
}) => {
|
|
2648
|
-
const o =
|
|
2748
|
+
const o = N(), [a, u] = F({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
|
|
2649
2749
|
try {
|
|
2650
2750
|
const E = await n();
|
|
2651
2751
|
u((k) => ({ ...k, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
@@ -2653,10 +2753,10 @@ const $o = ({
|
|
|
2653
2753
|
u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(E);
|
|
2654
2754
|
}
|
|
2655
2755
|
};
|
|
2656
|
-
if (
|
|
2756
|
+
if (X(() => {
|
|
2657
2757
|
d && !a.setUp && l();
|
|
2658
2758
|
}, [d]), !d)
|
|
2659
|
-
return /* @__PURE__ */ s.jsx(
|
|
2759
|
+
return /* @__PURE__ */ s.jsx(je, { className: "rating-placeholder" });
|
|
2660
2760
|
const { id: f, rating: h, disabled: p } = a, _ = "ratings_", j = {
|
|
2661
2761
|
text: o.formatMessage({ id: `${_}text` }),
|
|
2662
2762
|
low: o.formatMessage({ id: `${_}low` }),
|
|
@@ -2678,7 +2778,7 @@ const $o = ({
|
|
|
2678
2778
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2679
2779
|
const k = E + 1;
|
|
2680
2780
|
return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
|
|
2681
|
-
|
|
2781
|
+
J,
|
|
2682
2782
|
{
|
|
2683
2783
|
variant: "tertiary",
|
|
2684
2784
|
size: "small",
|
|
@@ -2696,7 +2796,7 @@ const $o = ({
|
|
|
2696
2796
|
}) })
|
|
2697
2797
|
] });
|
|
2698
2798
|
};
|
|
2699
|
-
const
|
|
2799
|
+
const wr = ({
|
|
2700
2800
|
id: e = "search",
|
|
2701
2801
|
className: t = "",
|
|
2702
2802
|
handleToggle: n = !1,
|
|
@@ -2704,8 +2804,8 @@ const vr = ({
|
|
|
2704
2804
|
gtmContext: i = "search-bar",
|
|
2705
2805
|
gtmEvent: c = "form-submission"
|
|
2706
2806
|
}) => {
|
|
2707
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a =
|
|
2708
|
-
|
|
2807
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = N(), u = ne(null);
|
|
2808
|
+
Ce(() => {
|
|
2709
2809
|
!n || o || !d || u.current && u.current.focus();
|
|
2710
2810
|
}, [d]);
|
|
2711
2811
|
const l = (f) => {
|
|
@@ -2719,7 +2819,7 @@ const vr = ({
|
|
|
2719
2819
|
"data-gtm-event-context": i,
|
|
2720
2820
|
"data-gtm-event-type": c,
|
|
2721
2821
|
children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
|
|
2722
|
-
/* @__PURE__ */ s.jsx(
|
|
2822
|
+
/* @__PURE__ */ s.jsx(le, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
|
|
2723
2823
|
/* @__PURE__ */ s.jsx(
|
|
2724
2824
|
"input",
|
|
2725
2825
|
{
|
|
@@ -2741,15 +2841,15 @@ const vr = ({
|
|
|
2741
2841
|
onClick: (f) => {
|
|
2742
2842
|
f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
|
|
2743
2843
|
},
|
|
2744
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2844
|
+
children: /* @__PURE__ */ s.jsx(le, { children: a.formatMessage({ id: "search_clear" }) })
|
|
2745
2845
|
}
|
|
2746
2846
|
),
|
|
2747
|
-
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(
|
|
2847
|
+
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(le, { children: a.formatMessage({ id: "search_cta" }) }) })
|
|
2748
2848
|
] }) })
|
|
2749
2849
|
}
|
|
2750
2850
|
);
|
|
2751
2851
|
};
|
|
2752
|
-
const
|
|
2852
|
+
const kr = ({
|
|
2753
2853
|
title: e,
|
|
2754
2854
|
label: t,
|
|
2755
2855
|
ctaMessage: n,
|
|
@@ -2762,7 +2862,7 @@ const wr = ({
|
|
|
2762
2862
|
initialFormStatus: u = "NOT_SUBMITTED"
|
|
2763
2863
|
/* NOT_SUBMITTED */
|
|
2764
2864
|
}) => {
|
|
2765
|
-
const [l, f] =
|
|
2865
|
+
const [l, f] = F([]), [h, p] = F(!0), [_, j] = F(u), { formatMessage: g } = N(), E = async (M) => {
|
|
2766
2866
|
M.preventDefault();
|
|
2767
2867
|
try {
|
|
2768
2868
|
await a(l), f([]), j(
|
|
@@ -2793,9 +2893,9 @@ const wr = ({
|
|
|
2793
2893
|
] }) }),
|
|
2794
2894
|
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2795
2895
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2796
|
-
/* @__PURE__ */ s.jsx(
|
|
2797
|
-
/* @__PURE__ */ s.jsx(
|
|
2798
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
2896
|
+
/* @__PURE__ */ s.jsx(J, { variant: "secondary", onClick: k, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2897
|
+
/* @__PURE__ */ s.jsx(J, { onClick: T, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2898
|
+
] }) : /* @__PURE__ */ s.jsx(J, { onClick: k, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2799
2899
|
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
2800
2900
|
"form",
|
|
2801
2901
|
{
|
|
@@ -2817,16 +2917,16 @@ const wr = ({
|
|
|
2817
2917
|
f(M), p(!M.length);
|
|
2818
2918
|
},
|
|
2819
2919
|
autoFocus: !1,
|
|
2820
|
-
getLabel: (M, C,
|
|
2920
|
+
getLabel: (M, C, I) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
2821
2921
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: M }),
|
|
2822
2922
|
/* @__PURE__ */ s.jsx(
|
|
2823
|
-
|
|
2923
|
+
J,
|
|
2824
2924
|
{
|
|
2825
2925
|
variant: "tertiary",
|
|
2826
2926
|
size: "small",
|
|
2827
2927
|
icon: { icon: "close" },
|
|
2828
2928
|
onClick: () => {
|
|
2829
|
-
|
|
2929
|
+
I(C), p(!l.length);
|
|
2830
2930
|
},
|
|
2831
2931
|
className: "remove-email-button",
|
|
2832
2932
|
screenreaderText: g({ id: "overlay_close" })
|
|
@@ -2837,11 +2937,11 @@ const wr = ({
|
|
|
2837
2937
|
)
|
|
2838
2938
|
] }),
|
|
2839
2939
|
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2840
|
-
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(
|
|
2940
|
+
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(J, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
2841
2941
|
]
|
|
2842
2942
|
}
|
|
2843
2943
|
) });
|
|
2844
|
-
},
|
|
2944
|
+
}, H = {
|
|
2845
2945
|
timeouts: {},
|
|
2846
2946
|
handlerCalled: {},
|
|
2847
2947
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -2864,9 +2964,9 @@ const wr = ({
|
|
|
2864
2964
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
2865
2965
|
return;
|
|
2866
2966
|
const i = Date.now();
|
|
2867
|
-
if (!t &&
|
|
2967
|
+
if (!t && H.handlerCalled[e] && i - H.handlerCalled[e] < 500)
|
|
2868
2968
|
return;
|
|
2869
|
-
|
|
2969
|
+
H.handlerCalled[e] = i;
|
|
2870
2970
|
let c = [{ type: `menus.${e}`, value: t }];
|
|
2871
2971
|
t === !0 && Object.keys(n).forEach((d) => {
|
|
2872
2972
|
d === e || n[d] === !1 || c.push({ type: `menus.${d}`, value: !1 });
|
|
@@ -2887,11 +2987,11 @@ const wr = ({
|
|
|
2887
2987
|
return e[r];
|
|
2888
2988
|
if (!t.includes("."))
|
|
2889
2989
|
continue;
|
|
2890
|
-
const i =
|
|
2990
|
+
const i = hn(e[r], t);
|
|
2891
2991
|
if (!(typeof i > "u") && (!n || i[t] && i[t].includes(n) || i.value && i.value.includes(n) || i.toString().includes(n)))
|
|
2892
2992
|
return e[r];
|
|
2893
2993
|
}
|
|
2894
|
-
return e[0].children ?
|
|
2994
|
+
return e[0].children ? H.findFirstChild(e[0].children, t, n) : !1;
|
|
2895
2995
|
},
|
|
2896
2996
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: i }) => {
|
|
2897
2997
|
if (!t.current || !t.current.children)
|
|
@@ -2905,20 +3005,20 @@ const wr = ({
|
|
|
2905
3005
|
switch (e) {
|
|
2906
3006
|
case "navigation":
|
|
2907
3007
|
if (n) {
|
|
2908
|
-
const a =
|
|
3008
|
+
const a = H.findFirstChild(
|
|
2909
3009
|
t.current.children,
|
|
2910
3010
|
"attributes.aria-controls",
|
|
2911
3011
|
"navigation"
|
|
2912
3012
|
);
|
|
2913
|
-
d =
|
|
3013
|
+
d = H.findFirstChild(a.children, "href");
|
|
2914
3014
|
} else
|
|
2915
|
-
d =
|
|
3015
|
+
d = H.findFirstChild(t.current.children, "href");
|
|
2916
3016
|
d || (d = t.current);
|
|
2917
3017
|
break;
|
|
2918
3018
|
case "account":
|
|
2919
|
-
if (o =
|
|
3019
|
+
if (o = H.findFirstChild(t.current.children, "className", "account"), !o || !o.children)
|
|
2920
3020
|
return;
|
|
2921
|
-
d =
|
|
3021
|
+
d = H.findFirstChild(o.children, "href");
|
|
2922
3022
|
break;
|
|
2923
3023
|
default:
|
|
2924
3024
|
return;
|
|
@@ -2927,21 +3027,21 @@ const wr = ({
|
|
|
2927
3027
|
},
|
|
2928
3028
|
events: {
|
|
2929
3029
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
2930
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
3030
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(H.timeouts[t]), n(t, !r));
|
|
2931
3031
|
},
|
|
2932
3032
|
onFocus: ({ id: e }) => {
|
|
2933
|
-
clearTimeout(
|
|
3033
|
+
clearTimeout(H.timeouts[e]);
|
|
2934
3034
|
},
|
|
2935
3035
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
2936
|
-
clearTimeout(
|
|
3036
|
+
clearTimeout(H.timeouts[e]), t(e, !0);
|
|
2937
3037
|
},
|
|
2938
3038
|
onBlur: ({ id: e, callback: t }) => {
|
|
2939
|
-
|
|
3039
|
+
H.timeouts[e] = setTimeout(() => {
|
|
2940
3040
|
t(e, !1);
|
|
2941
3041
|
}, 250);
|
|
2942
3042
|
}
|
|
2943
3043
|
}
|
|
2944
|
-
},
|
|
3044
|
+
}, Ke = {
|
|
2945
3045
|
order: ["home", "topics", "partners", "account"],
|
|
2946
3046
|
home: {
|
|
2947
3047
|
href: "/home/",
|
|
@@ -3017,7 +3117,7 @@ const wr = ({
|
|
|
3017
3117
|
props: { variant: "primary" }
|
|
3018
3118
|
}
|
|
3019
3119
|
}
|
|
3020
|
-
},
|
|
3120
|
+
}, qe = ({
|
|
3021
3121
|
id: e,
|
|
3022
3122
|
isLoggedIn: t = !1,
|
|
3023
3123
|
isDesktopVersion: n = !1,
|
|
@@ -3026,7 +3126,7 @@ const wr = ({
|
|
|
3026
3126
|
},
|
|
3027
3127
|
doTrack: c = null
|
|
3028
3128
|
}) => {
|
|
3029
|
-
const d =
|
|
3129
|
+
const d = N(), o = hn(Ke, e);
|
|
3030
3130
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
3031
3131
|
return null;
|
|
3032
3132
|
const a = "doTrack" in o, u = c === null ? a ? o.doTrack : !0 : c, l = e.includes("buttons.");
|
|
@@ -3058,16 +3158,16 @@ const wr = ({
|
|
|
3058
3158
|
let g = {}, E = {};
|
|
3059
3159
|
if (p) {
|
|
3060
3160
|
const k = o.menuId || e, T = {
|
|
3061
|
-
onClick: (M) =>
|
|
3062
|
-
onFocus: () =>
|
|
3063
|
-
onBlur: () =>
|
|
3064
|
-
onMouseLeave: () =>
|
|
3065
|
-
onMouseEnter: () =>
|
|
3161
|
+
onClick: (M) => H.events.onClick(M, { id: k, callback: i, isOpen: r[k] }),
|
|
3162
|
+
onFocus: () => H.events.onFocus({ id: k }),
|
|
3163
|
+
onBlur: () => H.events.onBlur({ id: k, callback: i }),
|
|
3164
|
+
onMouseLeave: () => H.events.onBlur({ id: k, callback: i }),
|
|
3165
|
+
onMouseEnter: () => H.events.onMouseEnter({ id: k, callback: i })
|
|
3066
3166
|
};
|
|
3067
3167
|
n && (_ && (g = {
|
|
3068
3168
|
...T,
|
|
3069
3169
|
onKeyPress: (M) => {
|
|
3070
|
-
M.key === "Enter" &&
|
|
3170
|
+
M.key === "Enter" && H.events.onClick(M, { id: k, callback: i, isOpen: r[k] });
|
|
3071
3171
|
},
|
|
3072
3172
|
tabIndex: "0",
|
|
3073
3173
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
@@ -3080,7 +3180,7 @@ const wr = ({
|
|
|
3080
3180
|
});
|
|
3081
3181
|
}
|
|
3082
3182
|
return /* @__PURE__ */ s.jsxs("li", { className: S({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3083
|
-
h ?
|
|
3183
|
+
h ? D.createElement(l ? J : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3084
3184
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: o.order.map((k) => {
|
|
3085
3185
|
if (!o[k])
|
|
3086
3186
|
return null;
|
|
@@ -3093,14 +3193,14 @@ const wr = ({
|
|
|
3093
3193
|
};
|
|
3094
3194
|
return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: S({ [o[k].className]: o[k].className }), children: [
|
|
3095
3195
|
d.formatMessage({ id: `${f}_${k}` }),
|
|
3096
|
-
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(
|
|
3097
|
-
] }, k) : /* @__PURE__ */ s.jsx(
|
|
3196
|
+
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}.${M}`, ...T }, M)) })
|
|
3197
|
+
] }, k) : /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}`, ...T }, k);
|
|
3098
3198
|
}) })
|
|
3099
3199
|
] }, e);
|
|
3100
3200
|
};
|
|
3101
|
-
const
|
|
3102
|
-
const e =
|
|
3103
|
-
() =>
|
|
3201
|
+
const jr = { height: 67, height_desktop: 83 }, Nn = () => {
|
|
3202
|
+
const e = N(), t = ge(Se), n = rt(!0, !0), r = t && typeof t.id == "string", i = et(
|
|
3203
|
+
() => H.getIsDesktopVersion(r, n),
|
|
3104
3204
|
[r, n]
|
|
3105
3205
|
), [c, d] = rs($s, {
|
|
3106
3206
|
headerIsVisible: !0,
|
|
@@ -3111,29 +3211,29 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3111
3211
|
}
|
|
3112
3212
|
}), { headerIsVisible: o, menus: a, focusElements: u } = c;
|
|
3113
3213
|
Ts({
|
|
3114
|
-
scrollPosition:
|
|
3214
|
+
scrollPosition: jr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3115
3215
|
callbacks: {
|
|
3116
3216
|
scrollUp: () => {
|
|
3117
|
-
!i && a.navigation ||
|
|
3217
|
+
!i && a.navigation || H.shouldChangeHeaderIsVisible(!0, a, d);
|
|
3118
3218
|
},
|
|
3119
3219
|
scrollDown: () => {
|
|
3120
|
-
!i && a.navigation ||
|
|
3220
|
+
!i && a.navigation || H.shouldChangeHeaderIsVisible(!1, a, d);
|
|
3121
3221
|
}
|
|
3122
3222
|
}
|
|
3123
3223
|
});
|
|
3124
3224
|
const l = (h, p) => {
|
|
3125
|
-
|
|
3126
|
-
}, f =
|
|
3127
|
-
return
|
|
3128
|
-
a.navigation &&
|
|
3225
|
+
H.handleMenus({ id: h, value: p, menus: a, dispatch: d });
|
|
3226
|
+
}, f = ne(null);
|
|
3227
|
+
return Ce(() => {
|
|
3228
|
+
a.navigation && H.autoFocus({
|
|
3129
3229
|
menu: "navigation",
|
|
3130
3230
|
navigationRef: f,
|
|
3131
3231
|
isDesktopVersion: i.navigation,
|
|
3132
3232
|
focusElements: u,
|
|
3133
3233
|
dispatch: d
|
|
3134
3234
|
});
|
|
3135
|
-
}, [a.navigation]),
|
|
3136
|
-
a.account &&
|
|
3235
|
+
}, [a.navigation]), Ce(() => {
|
|
3236
|
+
a.account && H.autoFocus({
|
|
3137
3237
|
menu: "account",
|
|
3138
3238
|
navigationRef: f,
|
|
3139
3239
|
isDesktopVersion: i.navigation,
|
|
@@ -3141,116 +3241,160 @@ const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
|
3141
3241
|
dispatch: d
|
|
3142
3242
|
});
|
|
3143
3243
|
}, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3144
|
-
/* @__PURE__ */ s.jsxs(
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
"aria-haspopup": "true",
|
|
3157
|
-
"aria-expanded": a.navigation,
|
|
3158
|
-
"aria-controls": "navigation",
|
|
3159
|
-
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
|
|
3160
|
-
}
|
|
3161
|
-
),
|
|
3162
|
-
/* @__PURE__ */ s.jsx(
|
|
3163
|
-
"ul",
|
|
3164
|
-
{
|
|
3165
|
-
ref: f,
|
|
3166
|
-
id: "navigation",
|
|
3167
|
-
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3168
|
-
role: "menu",
|
|
3169
|
-
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3170
|
-
children: et.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3171
|
-
tt,
|
|
3244
|
+
/* @__PURE__ */ s.jsxs(
|
|
3245
|
+
"nav",
|
|
3246
|
+
{
|
|
3247
|
+
id: "header",
|
|
3248
|
+
className: S({
|
|
3249
|
+
"logged-in": r,
|
|
3250
|
+
"logged-out": !r,
|
|
3251
|
+
visible: o
|
|
3252
|
+
}),
|
|
3253
|
+
children: [
|
|
3254
|
+
/* @__PURE__ */ s.jsx(
|
|
3255
|
+
le,
|
|
3172
3256
|
{
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3257
|
+
element: "a",
|
|
3258
|
+
href: "#content-of-page",
|
|
3259
|
+
children: e.formatMessage({ id: "header_skip" })
|
|
3260
|
+
}
|
|
3261
|
+
),
|
|
3262
|
+
/* @__PURE__ */ s.jsx($n, {}),
|
|
3263
|
+
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3264
|
+
"button",
|
|
3265
|
+
{
|
|
3266
|
+
className: "menu-button gtm-trackable",
|
|
3267
|
+
onClick: (h) => {
|
|
3268
|
+
h.preventDefault(), h.stopPropagation(), l("navigation", !a.navigation);
|
|
3269
|
+
},
|
|
3270
|
+
"data-gtm-event-type": "open-tab-menu-click",
|
|
3271
|
+
"data-gtm-event-context": "HeaderLeft-Chevron",
|
|
3272
|
+
"aria-haspopup": "true",
|
|
3273
|
+
"aria-expanded": a.navigation,
|
|
3274
|
+
"aria-controls": "navigation",
|
|
3275
|
+
children: /* @__PURE__ */ s.jsx(le, { children: e.formatMessage({
|
|
3276
|
+
id: `header_menu_${a.navigation ? "hide" : "show"}`
|
|
3277
|
+
}) })
|
|
3278
|
+
}
|
|
3279
|
+
),
|
|
3280
|
+
/* @__PURE__ */ s.jsx(
|
|
3281
|
+
"ul",
|
|
3282
|
+
{
|
|
3283
|
+
ref: f,
|
|
3284
|
+
id: "navigation",
|
|
3285
|
+
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3286
|
+
role: "menu",
|
|
3287
|
+
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3288
|
+
children: Ke.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3289
|
+
qe,
|
|
3290
|
+
{
|
|
3291
|
+
id: h,
|
|
3292
|
+
isLoggedIn: r,
|
|
3293
|
+
isDesktopVersion: i.navigation,
|
|
3294
|
+
menus: { navigation: a.navigation, account: a.account },
|
|
3295
|
+
callback: l
|
|
3296
|
+
},
|
|
3297
|
+
h
|
|
3298
|
+
))
|
|
3299
|
+
}
|
|
3300
|
+
),
|
|
3301
|
+
!i.search && /* @__PURE__ */ s.jsx(
|
|
3302
|
+
"button",
|
|
3303
|
+
{
|
|
3304
|
+
className: "search toggle-search-button",
|
|
3305
|
+
onClick: (h) => {
|
|
3306
|
+
h.preventDefault(), h.stopPropagation(), l("search", !a.search);
|
|
3307
|
+
},
|
|
3308
|
+
"aria-haspopup": "true",
|
|
3309
|
+
"aria-expanded": a.search,
|
|
3310
|
+
"aria-controls": "search-form",
|
|
3311
|
+
children: /* @__PURE__ */ s.jsx(
|
|
3312
|
+
le,
|
|
3313
|
+
{
|
|
3314
|
+
children: e.formatMessage({
|
|
3315
|
+
id: `header_search_${a.search ? "hide" : "show"}`
|
|
3316
|
+
})
|
|
3317
|
+
}
|
|
3318
|
+
)
|
|
3319
|
+
}
|
|
3320
|
+
),
|
|
3321
|
+
/* @__PURE__ */ s.jsx(
|
|
3322
|
+
wr,
|
|
3323
|
+
{
|
|
3324
|
+
id: "global-search",
|
|
3325
|
+
handleToggle: {
|
|
3326
|
+
searchIsOpen: a.search,
|
|
3327
|
+
isDesktopVersion: i.search
|
|
3328
|
+
},
|
|
3329
|
+
gtmContext: "search-bar-header",
|
|
3330
|
+
gtmEvent: "form-submission"
|
|
3331
|
+
}
|
|
3332
|
+
),
|
|
3333
|
+
r ? /* @__PURE__ */ s.jsxs(
|
|
3334
|
+
"button",
|
|
3335
|
+
{
|
|
3336
|
+
className: "account-button",
|
|
3337
|
+
onClick: (h) => H.events.onClick(h, {
|
|
3338
|
+
id: "account",
|
|
3339
|
+
callback: l,
|
|
3340
|
+
isOpen: a.account
|
|
3341
|
+
}),
|
|
3342
|
+
onMouseEnter: () => H.events.onMouseEnter({ id: "account", callback: l }),
|
|
3343
|
+
onMouseLeave: () => H.events.onBlur({ id: "account", callback: l }),
|
|
3344
|
+
"aria-haspopup": "true",
|
|
3345
|
+
"aria-expanded": a.account,
|
|
3346
|
+
"aria-controls": "navigation",
|
|
3347
|
+
children: [
|
|
3348
|
+
/* @__PURE__ */ s.jsx(le, { children: e.formatMessage({
|
|
3349
|
+
id: `header_account_${a.account ? "hide" : "show"}`
|
|
3350
|
+
}) }),
|
|
3351
|
+
/* @__PURE__ */ s.jsx(
|
|
3352
|
+
Ot,
|
|
3353
|
+
{
|
|
3354
|
+
name: t && t.name || "",
|
|
3355
|
+
src: t && t.image && t.image.thumbnail || ""
|
|
3356
|
+
}
|
|
3357
|
+
)
|
|
3358
|
+
]
|
|
3359
|
+
}
|
|
3360
|
+
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children: Ke.buttons.order.map((h) => /* @__PURE__ */ s.jsx(qe, { id: `buttons.${h}` }, h)) })
|
|
3361
|
+
]
|
|
3362
|
+
}
|
|
3363
|
+
),
|
|
3222
3364
|
/* @__PURE__ */ s.jsx("hr", { id: "content-of-page" }),
|
|
3223
3365
|
/* @__PURE__ */ s.jsx(
|
|
3224
3366
|
"div",
|
|
3225
3367
|
{
|
|
3226
|
-
className: S("overlay", {
|
|
3368
|
+
className: S("overlay", {
|
|
3369
|
+
open: a.navigation || a.account || !i.search && a.search
|
|
3370
|
+
})
|
|
3227
3371
|
}
|
|
3228
3372
|
)
|
|
3229
3373
|
] });
|
|
3230
3374
|
};
|
|
3231
|
-
const
|
|
3232
|
-
const e =
|
|
3375
|
+
const yr = () => {
|
|
3376
|
+
const e = N();
|
|
3233
3377
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3234
|
-
/* @__PURE__ */ s.jsx(
|
|
3235
|
-
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(
|
|
3236
|
-
/* @__PURE__ */ s.jsx(
|
|
3378
|
+
/* @__PURE__ */ s.jsx(Nn, {}),
|
|
3379
|
+
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(it, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3380
|
+
/* @__PURE__ */ s.jsx(Mn, {})
|
|
3237
3381
|
] });
|
|
3238
|
-
},
|
|
3382
|
+
}, Co = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: i = "", locale: c = "en" }) => {
|
|
3239
3383
|
const d = Es();
|
|
3240
|
-
|
|
3384
|
+
X(() => {
|
|
3241
3385
|
window.scrollTo(0, 0);
|
|
3242
3386
|
}, [d]);
|
|
3243
|
-
const o =
|
|
3244
|
-
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(
|
|
3245
|
-
/* @__PURE__ */ s.jsx(
|
|
3387
|
+
const o = vn(e, { locale: c });
|
|
3388
|
+
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(yr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(rr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: S(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
|
|
3389
|
+
/* @__PURE__ */ s.jsx(Nn, {}),
|
|
3246
3390
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: o }),
|
|
3247
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3248
|
-
/* @__PURE__ */ s.jsx(
|
|
3391
|
+
n && /* @__PURE__ */ s.jsx(Mn, {}),
|
|
3392
|
+
/* @__PURE__ */ s.jsx(xr, {})
|
|
3249
3393
|
] }) }) }) });
|
|
3250
|
-
},
|
|
3394
|
+
}, dn = {
|
|
3251
3395
|
default: "tags_",
|
|
3252
3396
|
headerTopics: "header_topics_topics_"
|
|
3253
|
-
},
|
|
3397
|
+
}, Et = {
|
|
3254
3398
|
topic: {
|
|
3255
3399
|
Climate: "climate",
|
|
3256
3400
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3266,19 +3410,19 @@ const jr = () => {
|
|
|
3266
3410
|
WorkAndTheEconomy: "work-and-the-economy"
|
|
3267
3411
|
},
|
|
3268
3412
|
"from the community": "community"
|
|
3269
|
-
},
|
|
3413
|
+
}, Er = {
|
|
3270
3414
|
getTagDetails: (e) => {
|
|
3271
3415
|
if (e.includes("topic_")) {
|
|
3272
|
-
if (e =
|
|
3273
|
-
const t =
|
|
3274
|
-
return t ? { id: e, href: t, text: `${
|
|
3416
|
+
if (e = Et.topic[e.replace("topic_", "")], e) {
|
|
3417
|
+
const t = Ke.topics.topics[e].href;
|
|
3418
|
+
return t ? { id: e, href: t, text: `${dn.headerTopics}${e}` } : null;
|
|
3275
3419
|
}
|
|
3276
3420
|
return null;
|
|
3277
3421
|
}
|
|
3278
|
-
return
|
|
3422
|
+
return Et[e] ? (e = Et[e], { id: e, text: `${dn.default}${e}` }) : null;
|
|
3279
3423
|
}
|
|
3280
3424
|
};
|
|
3281
|
-
const
|
|
3425
|
+
const Ao = ({
|
|
3282
3426
|
tags: e = [],
|
|
3283
3427
|
color: t = "default",
|
|
3284
3428
|
forceOneLine: n = !1,
|
|
@@ -3287,14 +3431,14 @@ const Co = ({
|
|
|
3287
3431
|
gtmType: c = "tag-click",
|
|
3288
3432
|
gtmContext: d = "tags"
|
|
3289
3433
|
}) => {
|
|
3290
|
-
const o =
|
|
3434
|
+
const o = N();
|
|
3291
3435
|
if (!e || e.length < 1)
|
|
3292
3436
|
return null;
|
|
3293
3437
|
const a = [];
|
|
3294
3438
|
return e.forEach((u) => {
|
|
3295
3439
|
if (!u)
|
|
3296
3440
|
return;
|
|
3297
|
-
const l =
|
|
3441
|
+
const l = Er.getTagDetails(u);
|
|
3298
3442
|
l && a.push(l);
|
|
3299
3443
|
}), a.length < 1 ? null : /* @__PURE__ */ s.jsx("ul", { className: S("tags text-small", t, i, { "one-line": n }), children: a.map((u) => {
|
|
3300
3444
|
const l = o.formatMessage({ id: u.text });
|
|
@@ -3317,18 +3461,18 @@ const Do = ({
|
|
|
3317
3461
|
gtmType: i = "member-click",
|
|
3318
3462
|
className: c = ""
|
|
3319
3463
|
}) => {
|
|
3320
|
-
const d =
|
|
3464
|
+
const d = N();
|
|
3321
3465
|
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: S("members-list", c), children: [
|
|
3322
3466
|
/* @__PURE__ */ s.jsxs("h1", { children: [
|
|
3323
3467
|
d.formatMessage({ id: "membersList" }),
|
|
3324
3468
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: e })
|
|
3325
3469
|
] }),
|
|
3326
3470
|
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3327
|
-
/* @__PURE__ */ s.jsx(
|
|
3328
|
-
o.isAdmin && /* @__PURE__ */ s.jsx(
|
|
3471
|
+
/* @__PURE__ */ s.jsx(Bt, { member: o, gtmContext: r, gtmType: i }),
|
|
3472
|
+
o.isAdmin && /* @__PURE__ */ s.jsx(er, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3329
3473
|
] }, a)) }),
|
|
3330
3474
|
n && /* @__PURE__ */ s.jsx(
|
|
3331
|
-
|
|
3475
|
+
pr,
|
|
3332
3476
|
{
|
|
3333
3477
|
...n,
|
|
3334
3478
|
icon: { icon: "arrow-down", position: "right" },
|
|
@@ -3337,8 +3481,8 @@ const Do = ({
|
|
|
3337
3481
|
)
|
|
3338
3482
|
] }));
|
|
3339
3483
|
};
|
|
3340
|
-
let
|
|
3341
|
-
const
|
|
3484
|
+
let Je = null;
|
|
3485
|
+
const me = "discussion_form_", Pn = ({
|
|
3342
3486
|
content: e = { type: "response", slugs: {} },
|
|
3343
3487
|
userHasPermissions: t = !0,
|
|
3344
3488
|
meta: n = {
|
|
@@ -3369,97 +3513,97 @@ const he = "discussion_form_", Fn = ({
|
|
|
3369
3513
|
},
|
|
3370
3514
|
gtmContext: a = "DiscussionForm"
|
|
3371
3515
|
}) => {
|
|
3372
|
-
var b,
|
|
3373
|
-
const u =
|
|
3516
|
+
var b, Q;
|
|
3517
|
+
const u = N(), l = ge(Se), [f, h] = F(
|
|
3374
3518
|
n.isEditing && n.isEditing.text || ""
|
|
3375
|
-
), [p, _] =
|
|
3519
|
+
), [p, _] = F(d.error || !1), [j, g] = F(!1), E = ne(null);
|
|
3376
3520
|
if (r || (r = E), n.isLoading)
|
|
3377
3521
|
return /* @__PURE__ */ s.jsx(
|
|
3378
|
-
|
|
3522
|
+
je,
|
|
3379
3523
|
{
|
|
3380
3524
|
className: "discussion-card discussion-form",
|
|
3381
3525
|
"data-testid": "loading-placeholder"
|
|
3382
3526
|
}
|
|
3383
3527
|
);
|
|
3384
|
-
const k = (
|
|
3385
|
-
const
|
|
3386
|
-
h(
|
|
3387
|
-
let
|
|
3388
|
-
!l || !l.id ?
|
|
3528
|
+
const k = (w) => {
|
|
3529
|
+
const Y = w.target.value;
|
|
3530
|
+
h(Y);
|
|
3531
|
+
let L;
|
|
3532
|
+
!l || !l.id ? L = pe(
|
|
3389
3533
|
u.formatMessage,
|
|
3390
|
-
`${
|
|
3534
|
+
`${me}error_loggedOut`,
|
|
3391
3535
|
e.type,
|
|
3392
3536
|
"action"
|
|
3393
|
-
) : t ?
|
|
3537
|
+
) : t ? Y.length >= i && (L = `${me}error_tooLong`) : L = pe(
|
|
3394
3538
|
u.formatMessage,
|
|
3395
|
-
`${
|
|
3539
|
+
`${me}error_noPermission`,
|
|
3396
3540
|
e.type,
|
|
3397
3541
|
"action"
|
|
3398
|
-
),
|
|
3542
|
+
), L ? _(L) : p && _(!1);
|
|
3399
3543
|
};
|
|
3400
3544
|
let T = `${e.type}-form`;
|
|
3401
3545
|
if (e.type === "response" || e.type === "reply") {
|
|
3402
|
-
const
|
|
3403
|
-
|
|
3546
|
+
const w = e.type === "response" ? ((b = e.slugs) == null ? void 0 : b.question) || "" : ((Q = e.slugs) == null ? void 0 : Q.answer) || "";
|
|
3547
|
+
w && (T = `${T}-${w.slice(-15)}`);
|
|
3404
3548
|
}
|
|
3405
|
-
const M = async (
|
|
3406
|
-
var
|
|
3407
|
-
if (
|
|
3549
|
+
const M = async (w) => {
|
|
3550
|
+
var L;
|
|
3551
|
+
if (w.preventDefault(), w.stopPropagation(), !l || !l.id || !t || I)
|
|
3408
3552
|
return;
|
|
3409
|
-
|
|
3410
|
-
const
|
|
3553
|
+
Je && clearTimeout(Je), g("submitting");
|
|
3554
|
+
const Y = window.location.pathname;
|
|
3411
3555
|
try {
|
|
3412
|
-
let
|
|
3556
|
+
let O;
|
|
3413
3557
|
switch (e.type) {
|
|
3414
3558
|
case "post":
|
|
3415
|
-
|
|
3559
|
+
O = await o.create({ content: f });
|
|
3416
3560
|
break;
|
|
3417
3561
|
case "question":
|
|
3418
|
-
|
|
3562
|
+
O = await o.create({
|
|
3419
3563
|
title: f,
|
|
3420
3564
|
authorId: l && l.id,
|
|
3421
|
-
...(
|
|
3565
|
+
...(L = o.props) == null ? void 0 : L.create
|
|
3422
3566
|
});
|
|
3423
3567
|
break;
|
|
3424
3568
|
case "response":
|
|
3425
|
-
|
|
3569
|
+
O = await o.create(
|
|
3426
3570
|
{ question: e.slugs.question },
|
|
3427
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3571
|
+
{ body: f, authorId: l && l.id, contentPath: Y }
|
|
3428
3572
|
);
|
|
3429
3573
|
break;
|
|
3430
3574
|
case "reply":
|
|
3431
|
-
|
|
3575
|
+
O = await o.create(
|
|
3432
3576
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3433
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3577
|
+
{ body: f, authorId: l && l.id, contentPath: Y }
|
|
3434
3578
|
);
|
|
3435
3579
|
break;
|
|
3436
3580
|
default:
|
|
3437
3581
|
break;
|
|
3438
3582
|
}
|
|
3439
|
-
await
|
|
3583
|
+
await As(1e3), o.callback && await o.callback(O), Je = setTimeout(() => {
|
|
3440
3584
|
h(""), g("submitted"), C();
|
|
3441
3585
|
}, 500);
|
|
3442
|
-
} catch (
|
|
3443
|
-
const
|
|
3444
|
-
let
|
|
3445
|
-
|
|
3586
|
+
} catch (O) {
|
|
3587
|
+
const U = O;
|
|
3588
|
+
let W = `${me}error`;
|
|
3589
|
+
U.message.includes("entry already exists") && (W = pe(
|
|
3446
3590
|
u.formatMessage,
|
|
3447
|
-
`${
|
|
3591
|
+
`${me}error_alreadyExists`,
|
|
3448
3592
|
e.type,
|
|
3449
3593
|
"action"
|
|
3450
|
-
)),
|
|
3594
|
+
)), U.message.includes("429") ? W = pe(
|
|
3451
3595
|
u.formatMessage,
|
|
3452
|
-
`${
|
|
3596
|
+
`${me}error_tooMany`,
|
|
3453
3597
|
e.type,
|
|
3454
3598
|
"action"
|
|
3455
|
-
) :
|
|
3599
|
+
) : U.message.includes("400") && (W = `${me}error`), _(W), C();
|
|
3456
3600
|
}
|
|
3457
3601
|
}, C = () => {
|
|
3458
|
-
|
|
3602
|
+
Je = setTimeout(() => {
|
|
3459
3603
|
_(!1), g(!1);
|
|
3460
3604
|
}, 5e3);
|
|
3461
|
-
},
|
|
3462
|
-
return (n.isEditing && !
|
|
3605
|
+
}, I = !f || !Os(f), V = j === "submitting", x = [];
|
|
3606
|
+
return (n.isEditing && !V || d.cancel) && x.push({
|
|
3463
3607
|
variant: "secondary",
|
|
3464
3608
|
size: { mobile: "small", 600: "medium" },
|
|
3465
3609
|
onClick: o.handleCancel,
|
|
@@ -3467,26 +3611,26 @@ const he = "discussion_form_", Fn = ({
|
|
|
3467
3611
|
"data-gtm-event-context": a,
|
|
3468
3612
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3469
3613
|
disabled: !d.cancel && (!l || !l.id || !f),
|
|
3470
|
-
children: u.formatMessage({ id: `${
|
|
3614
|
+
children: u.formatMessage({ id: `${me}cancel` })
|
|
3471
3615
|
}), x.push({
|
|
3472
3616
|
variant: "primary",
|
|
3473
3617
|
size: { mobile: "small", 600: "medium" },
|
|
3474
|
-
onClick: (
|
|
3618
|
+
onClick: (w) => {
|
|
3475
3619
|
if (n.isEditing) {
|
|
3476
3620
|
g("submitting"), o.handleSaveEdit && o.handleSaveEdit(
|
|
3477
3621
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3478
3622
|
);
|
|
3479
3623
|
return;
|
|
3480
3624
|
}
|
|
3481
|
-
M(
|
|
3625
|
+
M(w);
|
|
3482
3626
|
},
|
|
3483
3627
|
className: "gtm-trackable",
|
|
3484
3628
|
"data-gtm-event-context": a,
|
|
3485
3629
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
3486
3630
|
"data-testid": "save-button",
|
|
3487
|
-
disabled: !l || !l.id || !t ||
|
|
3631
|
+
disabled: !l || !l.id || !t || I || V || n.isEditing && f === n.isEditing.text,
|
|
3488
3632
|
children: u.formatMessage({
|
|
3489
|
-
id: `${
|
|
3633
|
+
id: `${me}${V ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3490
3634
|
})
|
|
3491
3635
|
}), /* @__PURE__ */ s.jsxs(
|
|
3492
3636
|
"form",
|
|
@@ -3497,25 +3641,25 @@ const he = "discussion_form_", Fn = ({
|
|
|
3497
3641
|
}),
|
|
3498
3642
|
"data-testid": `discussion-${e.type}-form`,
|
|
3499
3643
|
children: [
|
|
3500
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children:
|
|
3644
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: pe(u.formatMessage, `${me}title`, e.type, "action") }),
|
|
3501
3645
|
/* @__PURE__ */ s.jsx(
|
|
3502
|
-
|
|
3646
|
+
Bt,
|
|
3503
3647
|
{
|
|
3504
3648
|
member: l || "community",
|
|
3505
3649
|
gtmContext: a,
|
|
3506
3650
|
gtmType: "profile-click"
|
|
3507
3651
|
}
|
|
3508
3652
|
),
|
|
3509
|
-
/* @__PURE__ */ s.jsx(
|
|
3653
|
+
/* @__PURE__ */ s.jsx(le, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(u.formatMessage, `${me}label`, e.type, "action") }),
|
|
3510
3654
|
/* @__PURE__ */ s.jsx(
|
|
3511
3655
|
_s,
|
|
3512
3656
|
{
|
|
3513
3657
|
ref: r,
|
|
3514
3658
|
id: `${T}-input`,
|
|
3515
3659
|
name: e.type,
|
|
3516
|
-
placeholder:
|
|
3660
|
+
placeholder: pe(
|
|
3517
3661
|
u.formatMessage,
|
|
3518
|
-
`${
|
|
3662
|
+
`${me}placeholder`,
|
|
3519
3663
|
e.type,
|
|
3520
3664
|
"action"
|
|
3521
3665
|
),
|
|
@@ -3528,8 +3672,8 @@ const he = "discussion_form_", Fn = ({
|
|
|
3528
3672
|
autoFocus: !!n.isEditing
|
|
3529
3673
|
}
|
|
3530
3674
|
),
|
|
3531
|
-
/* @__PURE__ */ s.jsx("small", { children:
|
|
3532
|
-
a: (
|
|
3675
|
+
/* @__PURE__ */ s.jsx("small", { children: pe(u.formatMessage, `${me}explainer`, e.type, "action", {
|
|
3676
|
+
a: (w) => /* @__PURE__ */ s.jsx(
|
|
3533
3677
|
"a",
|
|
3534
3678
|
{
|
|
3535
3679
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3538,13 +3682,13 @@ const he = "discussion_form_", Fn = ({
|
|
|
3538
3682
|
"data-gtm-event-context": a,
|
|
3539
3683
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3540
3684
|
rel: "noreferrer",
|
|
3541
|
-
children:
|
|
3685
|
+
children: w
|
|
3542
3686
|
}
|
|
3543
3687
|
)
|
|
3544
3688
|
}) }),
|
|
3545
|
-
/* @__PURE__ */ s.jsx(
|
|
3546
|
-
j === "submitted" && /* @__PURE__ */ s.jsx(
|
|
3547
|
-
p && /* @__PURE__ */ s.jsx(
|
|
3689
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: x }),
|
|
3690
|
+
j === "submitted" && /* @__PURE__ */ s.jsx(Pt, { className: "success", "data-testid": "success", children: pe(u.formatMessage, `${me}success`, e.type, "action") }),
|
|
3691
|
+
p && /* @__PURE__ */ s.jsx(Pt, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof p == "string" ? p.includes(" ") ? p : u.formatMessage(
|
|
3548
3692
|
{ id: p },
|
|
3549
3693
|
{
|
|
3550
3694
|
action: u.formatMessage({
|
|
@@ -3556,36 +3700,36 @@ const he = "discussion_form_", Fn = ({
|
|
|
3556
3700
|
]
|
|
3557
3701
|
}
|
|
3558
3702
|
);
|
|
3559
|
-
},
|
|
3703
|
+
}, It = ({
|
|
3560
3704
|
contentType: e,
|
|
3561
3705
|
createPost: t,
|
|
3562
3706
|
membershipRequiredToPost: { isMember: n, required: r, join: i, leave: c, notMemberStateText: d }
|
|
3563
3707
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
3564
|
-
|
|
3708
|
+
it,
|
|
3565
3709
|
{
|
|
3566
3710
|
text: d,
|
|
3567
3711
|
button: {
|
|
3568
|
-
component: /* @__PURE__ */ s.jsx(
|
|
3712
|
+
component: /* @__PURE__ */ s.jsx(Tn, { functions: { join: i, leave: c } })
|
|
3569
3713
|
}
|
|
3570
3714
|
}
|
|
3571
3715
|
) : /* @__PURE__ */ s.jsx(
|
|
3572
|
-
|
|
3716
|
+
Pn,
|
|
3573
3717
|
{
|
|
3574
3718
|
content: { type: e, slugs: {} },
|
|
3575
3719
|
functions: {
|
|
3576
3720
|
create: t
|
|
3577
3721
|
}
|
|
3578
3722
|
}
|
|
3579
|
-
),
|
|
3723
|
+
), Sr = {
|
|
3580
3724
|
showThread: !1,
|
|
3581
3725
|
showForm: !1
|
|
3582
|
-
},
|
|
3583
|
-
const [t, n] =
|
|
3726
|
+
}, lt = Ft(Sr), Tr = ({ children: e }) => {
|
|
3727
|
+
const [t, n] = F({
|
|
3584
3728
|
showThread: !1,
|
|
3585
3729
|
showForm: !1
|
|
3586
3730
|
});
|
|
3587
|
-
return /* @__PURE__ */ s.jsx(
|
|
3588
|
-
},
|
|
3731
|
+
return /* @__PURE__ */ s.jsx(lt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3732
|
+
}, $r = ({
|
|
3589
3733
|
question: e,
|
|
3590
3734
|
answer: t,
|
|
3591
3735
|
reply: n
|
|
@@ -3593,11 +3737,11 @@ const he = "discussion_form_", Fn = ({
|
|
|
3593
3737
|
...e && { questionSlug: e },
|
|
3594
3738
|
...t && { answerSlug: t },
|
|
3595
3739
|
...n && { replySlug: n }
|
|
3596
|
-
}),
|
|
3597
|
-
let
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3600
|
-
},
|
|
3740
|
+
}), Mr = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3741
|
+
let Be = !1;
|
|
3742
|
+
const St = () => {
|
|
3743
|
+
Be !== !1 && (clearTimeout(Be), Be = !1);
|
|
3744
|
+
}, Tt = 10, Cr = ({
|
|
3601
3745
|
element: e = "div",
|
|
3602
3746
|
likes: t = 0,
|
|
3603
3747
|
peopleWhoLiked: n = !1,
|
|
@@ -3609,25 +3753,25 @@ const $t = () => {
|
|
|
3609
3753
|
}, deleteLike: a = () => {
|
|
3610
3754
|
} } = {}
|
|
3611
3755
|
}) => {
|
|
3612
|
-
const u =
|
|
3613
|
-
|
|
3756
|
+
const u = N();
|
|
3757
|
+
X(() => {
|
|
3614
3758
|
p(i);
|
|
3615
3759
|
}, [i]);
|
|
3616
|
-
const [l, f] =
|
|
3617
|
-
if (C.preventDefault(), C.stopPropagation(), E(!1),
|
|
3618
|
-
return
|
|
3619
|
-
if (
|
|
3760
|
+
const [l, f] = F(t), [h, p] = F(i), [_, j] = F(!1), [g, E] = F(!1), k = et(() => Mr(n, Tt), [n]), T = (C) => {
|
|
3761
|
+
if (C.preventDefault(), C.stopPropagation(), E(!1), Be)
|
|
3762
|
+
return St(), !1;
|
|
3763
|
+
if (St(), _ || !d)
|
|
3620
3764
|
return !1;
|
|
3621
|
-
|
|
3765
|
+
Be = setTimeout(M, 350);
|
|
3622
3766
|
}, M = async () => {
|
|
3623
|
-
if (
|
|
3767
|
+
if (St(), _ || !d)
|
|
3624
3768
|
return !1;
|
|
3625
3769
|
let C = h ? l - 1 : l + 1;
|
|
3626
3770
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
3627
3771
|
try {
|
|
3628
3772
|
if (c && c.slugs) {
|
|
3629
|
-
const
|
|
3630
|
-
h ? await a(
|
|
3773
|
+
const I = $r(c.slugs);
|
|
3774
|
+
h ? await a(I) : await o(I, { contentPath: window.location.pathname });
|
|
3631
3775
|
}
|
|
3632
3776
|
} catch {
|
|
3633
3777
|
f(t), p(i);
|
|
@@ -3635,7 +3779,7 @@ const $t = () => {
|
|
|
3635
3779
|
j(!1);
|
|
3636
3780
|
}
|
|
3637
3781
|
};
|
|
3638
|
-
return
|
|
3782
|
+
return D.createElement(
|
|
3639
3783
|
e,
|
|
3640
3784
|
{
|
|
3641
3785
|
className: S("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": h, disabled: !d }),
|
|
@@ -3654,7 +3798,7 @@ const $t = () => {
|
|
|
3654
3798
|
},
|
|
3655
3799
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3656
3800
|
/* @__PURE__ */ s.jsx(
|
|
3657
|
-
|
|
3801
|
+
J,
|
|
3658
3802
|
{
|
|
3659
3803
|
variant: "tertiary",
|
|
3660
3804
|
size: "medium",
|
|
@@ -3672,15 +3816,15 @@ const $t = () => {
|
|
|
3672
3816
|
}
|
|
3673
3817
|
),
|
|
3674
3818
|
/* @__PURE__ */ s.jsx("span", { className: S("number-of-likes", { "no-likes": l === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: l }) }),
|
|
3675
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3676
|
-
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3677
|
-
n.length >
|
|
3819
|
+
n && /* @__PURE__ */ s.jsx(Qs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3820
|
+
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
|
|
3821
|
+
n.length > Tt && /* @__PURE__ */ s.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Tt }) })
|
|
3678
3822
|
] }) })
|
|
3679
3823
|
] })
|
|
3680
3824
|
}
|
|
3681
3825
|
);
|
|
3682
3826
|
};
|
|
3683
|
-
const
|
|
3827
|
+
const Ar = ({ element: e = "section", children: t, className: n, ...r }) => D.createElement(
|
|
3684
3828
|
e,
|
|
3685
3829
|
{
|
|
3686
3830
|
className: S("modal", n),
|
|
@@ -3688,7 +3832,7 @@ const Cr = ({ element: e = "section", children: t, className: n, ...r }) => N.cr
|
|
|
3688
3832
|
...r
|
|
3689
3833
|
}
|
|
3690
3834
|
);
|
|
3691
|
-
const
|
|
3835
|
+
const Rn = ({
|
|
3692
3836
|
id: e = "content-overlay",
|
|
3693
3837
|
isOpen: t = !1,
|
|
3694
3838
|
showDivider: n = !0,
|
|
@@ -3703,15 +3847,15 @@ const Ln = ({
|
|
|
3703
3847
|
className: l = "",
|
|
3704
3848
|
gtmContext: f = "Modal"
|
|
3705
3849
|
}) => {
|
|
3706
|
-
const h =
|
|
3850
|
+
const h = N(), [p, _] = F(t), j = (E) => {
|
|
3707
3851
|
_(E), E ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
|
|
3708
3852
|
};
|
|
3709
|
-
|
|
3853
|
+
X(() => {
|
|
3710
3854
|
j(t);
|
|
3711
3855
|
}, [t]);
|
|
3712
3856
|
const g = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
3713
3857
|
return /* @__PURE__ */ s.jsx("div", { className: S("overlay", { open: p }), children: /* @__PURE__ */ s.jsx(
|
|
3714
|
-
|
|
3858
|
+
Ar,
|
|
3715
3859
|
{
|
|
3716
3860
|
id: e,
|
|
3717
3861
|
className: S("overlay-modal", l, { "has-max-width": r }),
|
|
@@ -3721,7 +3865,7 @@ const Ln = ({
|
|
|
3721
3865
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3722
3866
|
o && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: o }),
|
|
3723
3867
|
/* @__PURE__ */ s.jsx(
|
|
3724
|
-
|
|
3868
|
+
J,
|
|
3725
3869
|
{
|
|
3726
3870
|
variant: "tertiary",
|
|
3727
3871
|
size: "medium",
|
|
@@ -3738,9 +3882,9 @@ const Ln = ({
|
|
|
3738
3882
|
a,
|
|
3739
3883
|
u && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3740
3884
|
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
3741
|
-
/* @__PURE__ */ s.jsx(
|
|
3885
|
+
/* @__PURE__ */ s.jsx(ot, { buttons: u })
|
|
3742
3886
|
] }),
|
|
3743
|
-
d && /* @__PURE__ */ s.jsx(
|
|
3887
|
+
d && /* @__PURE__ */ s.jsx(Pt, { className: "error", children: d })
|
|
3744
3888
|
] })
|
|
3745
3889
|
}
|
|
3746
3890
|
) });
|
|
@@ -3762,7 +3906,7 @@ const No = ({
|
|
|
3762
3906
|
},
|
|
3763
3907
|
sendInvites: u
|
|
3764
3908
|
}) => /* @__PURE__ */ s.jsx(
|
|
3765
|
-
|
|
3909
|
+
Rn,
|
|
3766
3910
|
{
|
|
3767
3911
|
title: n,
|
|
3768
3912
|
isOpen: t,
|
|
@@ -3771,7 +3915,7 @@ const No = ({
|
|
|
3771
3915
|
functions: { onClose: o },
|
|
3772
3916
|
className: S("invite-modal", e, { success: !!n }),
|
|
3773
3917
|
children: /* @__PURE__ */ s.jsx(
|
|
3774
|
-
|
|
3918
|
+
kr,
|
|
3775
3919
|
{
|
|
3776
3920
|
title: r,
|
|
3777
3921
|
label: i,
|
|
@@ -3782,11 +3926,11 @@ const No = ({
|
|
|
3782
3926
|
}
|
|
3783
3927
|
)
|
|
3784
3928
|
}
|
|
3785
|
-
),
|
|
3929
|
+
), un = (e) => {
|
|
3786
3930
|
const t = {};
|
|
3787
3931
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3788
|
-
},
|
|
3789
|
-
const
|
|
3932
|
+
}, Ht = (e, t) => e && !t;
|
|
3933
|
+
const ve = "discussion_", Nr = 280, ct = ({
|
|
3790
3934
|
element: e = "div",
|
|
3791
3935
|
content: t,
|
|
3792
3936
|
userHasPermissions: n = !0,
|
|
@@ -3813,49 +3957,49 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3813
3957
|
children: _,
|
|
3814
3958
|
isTruncated: j = !1
|
|
3815
3959
|
}) => {
|
|
3816
|
-
const g =
|
|
3960
|
+
const g = N(), E = ge(Se), k = ge(lt), [T, M] = F({
|
|
3817
3961
|
body: t && t.body || "",
|
|
3818
3962
|
isEditing: !1,
|
|
3819
3963
|
didEdit: t && t.isEdited || !1
|
|
3820
|
-
}), [C,
|
|
3821
|
-
if (
|
|
3964
|
+
}), [C, I] = F(!1), [V, x] = F("");
|
|
3965
|
+
if (X(() => {
|
|
3822
3966
|
M({
|
|
3823
3967
|
...T,
|
|
3824
3968
|
body: t && t.body || "",
|
|
3825
3969
|
didEdit: t && t.isEdited || !1
|
|
3826
3970
|
});
|
|
3827
3971
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3828
|
-
return /* @__PURE__ */ s.jsx(
|
|
3829
|
-
const { author: b, canLike:
|
|
3972
|
+
return /* @__PURE__ */ s.jsx(je, { className: "discussion-card discussion-post" });
|
|
3973
|
+
const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body, Nr) : T.body, Z = E && E.id && typeof b != "string" && b.id && b.id === E.id || !1, re = typeof Q == "boolean" ? Q : n ? !Z : !1, oe = async (P) => {
|
|
3830
3974
|
P || (P = ""), x("");
|
|
3831
3975
|
try {
|
|
3832
3976
|
if (!xs(P, T.body)) {
|
|
3833
3977
|
const te = t.type === "question" ? { title: P } : { body: P };
|
|
3834
|
-
await o(
|
|
3978
|
+
await o(un(t.slugs), te);
|
|
3835
3979
|
}
|
|
3836
3980
|
M({ body: P, isEditing: !1, didEdit: !0 });
|
|
3837
3981
|
} catch {
|
|
3838
|
-
x(`${
|
|
3982
|
+
x(`${ve}form_error`);
|
|
3839
3983
|
}
|
|
3840
|
-
},
|
|
3984
|
+
}, ae = () => {
|
|
3841
3985
|
k && k.updateConversation && k.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3842
|
-
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`,
|
|
3843
|
-
|
|
3986
|
+
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, G = document.getElementById(te), K = document.getElementById(`${te}-input`);
|
|
3987
|
+
K && K.focus(), G && G.scrollIntoView({ behavior: "smooth" });
|
|
3844
3988
|
}, 0);
|
|
3845
|
-
},
|
|
3989
|
+
}, ie = () => {
|
|
3846
3990
|
try {
|
|
3847
|
-
d(
|
|
3991
|
+
d(un(t.slugs));
|
|
3848
3992
|
} catch {
|
|
3849
3993
|
x("delete-error");
|
|
3850
3994
|
}
|
|
3851
|
-
},
|
|
3995
|
+
}, se = [
|
|
3852
3996
|
{
|
|
3853
|
-
text: g.formatMessage({ id: `${
|
|
3997
|
+
text: g.formatMessage({ id: `${ve}moreMenu_report` }),
|
|
3854
3998
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3855
|
-
g.formatMessage({ id: `${
|
|
3999
|
+
g.formatMessage({ id: `${ve}report_subject` })
|
|
3856
4000
|
)}&body=${encodeURI(
|
|
3857
4001
|
g.formatMessage(
|
|
3858
|
-
{ id: `${
|
|
4002
|
+
{ id: `${ve}report_body` },
|
|
3859
4003
|
{
|
|
3860
4004
|
contentType: t.type || "",
|
|
3861
4005
|
contentSlug: t.slug || "",
|
|
@@ -3866,9 +4010,9 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3866
4010
|
icon: "flag"
|
|
3867
4011
|
}
|
|
3868
4012
|
];
|
|
3869
|
-
return n &&
|
|
4013
|
+
return n && Z && se.push(
|
|
3870
4014
|
{
|
|
3871
|
-
text: g.formatMessage({ id: `${
|
|
4015
|
+
text: g.formatMessage({ id: `${ve}moreMenu_edit` }),
|
|
3872
4016
|
onClick: () => M({ ...T, isEditing: !0 }),
|
|
3873
4017
|
icon: "pencil-paper",
|
|
3874
4018
|
className: "gtm-trackable",
|
|
@@ -3876,9 +4020,9 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3876
4020
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3877
4021
|
},
|
|
3878
4022
|
{
|
|
3879
|
-
text: g.formatMessage({ id: `${
|
|
4023
|
+
text: g.formatMessage({ id: `${ve}moreMenu_delete` }),
|
|
3880
4024
|
onClick: (P) => {
|
|
3881
|
-
P.preventDefault(), P.stopPropagation(),
|
|
4025
|
+
P.preventDefault(), P.stopPropagation(), I(!0);
|
|
3882
4026
|
},
|
|
3883
4027
|
icon: "trash",
|
|
3884
4028
|
className: "gtm-trackable",
|
|
@@ -3886,14 +4030,14 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3886
4030
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3887
4031
|
...Dr(`delete-${t.slug}-modal`, C)
|
|
3888
4032
|
}
|
|
3889
|
-
),
|
|
4033
|
+
), D.createElement(e, {
|
|
3890
4034
|
className: S("discussion-post", h),
|
|
3891
4035
|
"data-testid": `discussion-${t.type}-thread`,
|
|
3892
4036
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3893
4037
|
/* @__PURE__ */ s.jsxs(
|
|
3894
4038
|
"div",
|
|
3895
4039
|
{
|
|
3896
|
-
id:
|
|
4040
|
+
id: Y || t.slug,
|
|
3897
4041
|
className: S("discussion-card", t.type, {
|
|
3898
4042
|
editing: T.isEditing,
|
|
3899
4043
|
"has-link": f.post && !T.isEditing
|
|
@@ -3903,17 +4047,17 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3903
4047
|
},
|
|
3904
4048
|
children: [
|
|
3905
4049
|
!T.isEditing && /* @__PURE__ */ s.jsx(
|
|
3906
|
-
|
|
4050
|
+
Bt,
|
|
3907
4051
|
{
|
|
3908
4052
|
member: b,
|
|
3909
|
-
additionalContent: { createdAt:
|
|
4053
|
+
additionalContent: { createdAt: w, didEdit: T.didEdit },
|
|
3910
4054
|
className: typeof b != "string" && b.id === i ? "highlighted" : "",
|
|
3911
4055
|
gtmContext: p,
|
|
3912
4056
|
gtmType: "profile-click"
|
|
3913
4057
|
}
|
|
3914
4058
|
),
|
|
3915
4059
|
T.isEditing ? /* @__PURE__ */ s.jsx(
|
|
3916
|
-
|
|
4060
|
+
Pn,
|
|
3917
4061
|
{
|
|
3918
4062
|
content: { type: t.type, slugs: t.slugs },
|
|
3919
4063
|
userHasPermissions: n,
|
|
@@ -3924,8 +4068,8 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3924
4068
|
},
|
|
3925
4069
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3926
4070
|
forceShow: {
|
|
3927
|
-
error:
|
|
3928
|
-
{ id:
|
|
4071
|
+
error: V !== "" && V !== "delete-error" ? g.formatMessage(
|
|
4072
|
+
{ id: V },
|
|
3929
4073
|
{
|
|
3930
4074
|
action: g.formatMessage({
|
|
3931
4075
|
id: `discussion_action_${t.type}`
|
|
@@ -3935,7 +4079,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3935
4079
|
},
|
|
3936
4080
|
functions: {
|
|
3937
4081
|
create: c,
|
|
3938
|
-
handleSaveEdit:
|
|
4082
|
+
handleSaveEdit: oe,
|
|
3939
4083
|
handleCancel: () => {
|
|
3940
4084
|
x(""), M({ ...T, isEditing: !1 });
|
|
3941
4085
|
}
|
|
@@ -3949,18 +4093,18 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3949
4093
|
className: "gtm-trackable",
|
|
3950
4094
|
"data-gtm-event-context": p,
|
|
3951
4095
|
"data-gtm-event-type": "title-click",
|
|
3952
|
-
children: /* @__PURE__ */ s.jsx(
|
|
4096
|
+
children: /* @__PURE__ */ s.jsx(on, { options: { overrides: { a: qs } }, children: W })
|
|
3953
4097
|
}
|
|
3954
4098
|
) : /* @__PURE__ */ s.jsx(
|
|
3955
|
-
|
|
4099
|
+
on,
|
|
3956
4100
|
{
|
|
3957
4101
|
options: {
|
|
3958
|
-
wrapper: t.type === "question" ? "h1" :
|
|
4102
|
+
wrapper: t.type === "question" ? "h1" : D.Fragment,
|
|
3959
4103
|
forceWrapper: t.type === "question",
|
|
3960
4104
|
forceInline: t.type === "question",
|
|
3961
4105
|
forceBlock: t.type !== "question"
|
|
3962
4106
|
},
|
|
3963
|
-
children:
|
|
4107
|
+
children: W
|
|
3964
4108
|
}
|
|
3965
4109
|
),
|
|
3966
4110
|
!T.isEditing && /* @__PURE__ */ s.jsxs(
|
|
@@ -3970,15 +4114,14 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3970
4114
|
"data-testid": `${t.type}-actions`,
|
|
3971
4115
|
children: [
|
|
3972
4116
|
/* @__PURE__ */ s.jsx(
|
|
3973
|
-
|
|
4117
|
+
Cr,
|
|
3974
4118
|
{
|
|
3975
4119
|
element: "li",
|
|
3976
|
-
likes:
|
|
4120
|
+
likes: L,
|
|
3977
4121
|
isShort: !1,
|
|
3978
|
-
userLiked:
|
|
4122
|
+
userLiked: O,
|
|
3979
4123
|
content: { type: t.type, slugs: t.slugs },
|
|
3980
|
-
canLike:
|
|
3981
|
-
peopleWhoLiked: t.peopleWhoLiked,
|
|
4124
|
+
canLike: re,
|
|
3982
4125
|
functions: {
|
|
3983
4126
|
createLike: a,
|
|
3984
4127
|
deleteLike: u
|
|
@@ -3994,7 +4137,7 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
3994
4137
|
},
|
|
3995
4138
|
children: [
|
|
3996
4139
|
/* @__PURE__ */ s.jsx(
|
|
3997
|
-
|
|
4140
|
+
J,
|
|
3998
4141
|
{
|
|
3999
4142
|
variant: "tertiary",
|
|
4000
4143
|
size: "medium",
|
|
@@ -4006,34 +4149,34 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4006
4149
|
"data-gtm-event-context": p,
|
|
4007
4150
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4008
4151
|
screenreaderText: g.formatMessage(
|
|
4009
|
-
{ id: `${
|
|
4010
|
-
{ count:
|
|
4152
|
+
{ id: `${ve}comments_screenReader` },
|
|
4153
|
+
{ count: U }
|
|
4011
4154
|
)
|
|
4012
4155
|
}
|
|
4013
4156
|
),
|
|
4014
4157
|
/* @__PURE__ */ s.jsx("span", { children: g.formatMessage(
|
|
4015
|
-
{ id: `${
|
|
4016
|
-
{ count:
|
|
4158
|
+
{ id: `${ve}comments` },
|
|
4159
|
+
{ count: U }
|
|
4017
4160
|
) })
|
|
4018
4161
|
]
|
|
4019
4162
|
}
|
|
4020
4163
|
),
|
|
4021
4164
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4022
|
-
|
|
4165
|
+
J,
|
|
4023
4166
|
{
|
|
4024
4167
|
variant: "tertiary",
|
|
4025
4168
|
size: "medium",
|
|
4026
4169
|
styling: { muted: !0 },
|
|
4027
|
-
onClick:
|
|
4028
|
-
children: g.formatMessage({ id: `${
|
|
4170
|
+
onClick: ae,
|
|
4171
|
+
children: g.formatMessage({ id: `${ve}reply` })
|
|
4029
4172
|
}
|
|
4030
4173
|
) }),
|
|
4031
4174
|
/* @__PURE__ */ s.jsx(
|
|
4032
|
-
|
|
4175
|
+
gr,
|
|
4033
4176
|
{
|
|
4034
4177
|
element: "li",
|
|
4035
4178
|
id: `more-${t.slug}`,
|
|
4036
|
-
options:
|
|
4179
|
+
options: se
|
|
4037
4180
|
}
|
|
4038
4181
|
)
|
|
4039
4182
|
]
|
|
@@ -4044,14 +4187,14 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4044
4187
|
),
|
|
4045
4188
|
_,
|
|
4046
4189
|
/* @__PURE__ */ s.jsx(
|
|
4047
|
-
|
|
4190
|
+
Rn,
|
|
4048
4191
|
{
|
|
4049
4192
|
id: `delete-${t.slug}-modal`,
|
|
4050
4193
|
isOpen: C,
|
|
4051
4194
|
functions: { onOpen: () => {
|
|
4052
|
-
}, onClose: () =>
|
|
4195
|
+
}, onClose: () => I(!1) },
|
|
4053
4196
|
forceShow: {
|
|
4054
|
-
error:
|
|
4197
|
+
error: V === "delete-error" ? g.formatMessage(
|
|
4055
4198
|
{ id: "discussion_delete_error" },
|
|
4056
4199
|
{
|
|
4057
4200
|
action: g.formatMessage({
|
|
@@ -4067,19 +4210,19 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4067
4210
|
buttons: [
|
|
4068
4211
|
{
|
|
4069
4212
|
variant: "secondary",
|
|
4070
|
-
onClick: () =>
|
|
4213
|
+
onClick: () => I(!1),
|
|
4071
4214
|
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4072
4215
|
},
|
|
4073
4216
|
{
|
|
4074
4217
|
variant: "primary",
|
|
4075
4218
|
className: "destructive",
|
|
4076
|
-
onClick:
|
|
4219
|
+
onClick: ie,
|
|
4077
4220
|
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4078
4221
|
}
|
|
4079
4222
|
],
|
|
4080
4223
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4081
4224
|
children: /* @__PURE__ */ s.jsx(
|
|
4082
|
-
|
|
4225
|
+
ye,
|
|
4083
4226
|
{
|
|
4084
4227
|
id: "discussion_delete_text",
|
|
4085
4228
|
values: {
|
|
@@ -4095,25 +4238,25 @@ const we = "discussion_", Nr = 280, ut = ({
|
|
|
4095
4238
|
] })
|
|
4096
4239
|
});
|
|
4097
4240
|
};
|
|
4098
|
-
const
|
|
4099
|
-
const n =
|
|
4241
|
+
const $t = "discussion_responses_", Po = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4242
|
+
const n = N();
|
|
4100
4243
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4101
|
-
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4102
|
-
t === 0 && /* @__PURE__ */ s.jsx("p", { children:
|
|
4244
|
+
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${$t}title` }, { action: n.formatMessage({ id: `${$t}${e}` }), count: t }) }),
|
|
4245
|
+
t === 0 && /* @__PURE__ */ s.jsx("p", { children: pe(n.formatMessage, `${$t}empty`, e, e) })
|
|
4103
4246
|
] });
|
|
4104
4247
|
};
|
|
4105
|
-
const
|
|
4106
|
-
const r =
|
|
4248
|
+
const Pr = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4249
|
+
const r = N(), i = ne(null), c = ge(lt), [d, o] = F(
|
|
4107
4250
|
"closed"
|
|
4108
4251
|
/* Closed */
|
|
4109
4252
|
);
|
|
4110
|
-
|
|
4253
|
+
X(() => {
|
|
4111
4254
|
const f = i.current;
|
|
4112
4255
|
if (f)
|
|
4113
4256
|
return f.addEventListener("transitionend", a), () => {
|
|
4114
4257
|
f.removeEventListener("transitionend", a);
|
|
4115
4258
|
};
|
|
4116
|
-
}, []),
|
|
4259
|
+
}, []), Ce(() => {
|
|
4117
4260
|
d === "closed" && !c.showThread || o(
|
|
4118
4261
|
[
|
|
4119
4262
|
"opening",
|
|
@@ -4122,7 +4265,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4122
4265
|
].includes(d) ? "ready-to-close" : "opening"
|
|
4123
4266
|
/* Opening */
|
|
4124
4267
|
);
|
|
4125
|
-
}, [c.showThread]),
|
|
4268
|
+
}, [c.showThread]), X(() => {
|
|
4126
4269
|
d === "ready-to-close" && o(
|
|
4127
4270
|
"closing"
|
|
4128
4271
|
/* Closing */
|
|
@@ -4134,12 +4277,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4134
4277
|
"opening",
|
|
4135
4278
|
"open"
|
|
4136
4279
|
/* Open */
|
|
4137
|
-
].includes(d), l =
|
|
4280
|
+
].includes(d), l = vn(n, {
|
|
4138
4281
|
element: "li"
|
|
4139
4282
|
});
|
|
4140
4283
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4141
4284
|
t && /* @__PURE__ */ s.jsx(
|
|
4142
|
-
|
|
4285
|
+
J,
|
|
4143
4286
|
{
|
|
4144
4287
|
variant: "secondary",
|
|
4145
4288
|
size: "small",
|
|
@@ -4168,7 +4311,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4168
4311
|
}
|
|
4169
4312
|
)
|
|
4170
4313
|
] });
|
|
4171
|
-
},
|
|
4314
|
+
}, Rr = ({
|
|
4172
4315
|
user: e,
|
|
4173
4316
|
content: t,
|
|
4174
4317
|
verb: n = "post"
|
|
@@ -4189,7 +4332,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4189
4332
|
like: 0
|
|
4190
4333
|
},
|
|
4191
4334
|
verb: n
|
|
4192
|
-
}),
|
|
4335
|
+
}), Fr = ({
|
|
4193
4336
|
queryClient: e,
|
|
4194
4337
|
queryKey: t,
|
|
4195
4338
|
user: n,
|
|
@@ -4197,7 +4340,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4197
4340
|
}) => ({ mutationFn: r, onMutate: async ({ content: o }) => {
|
|
4198
4341
|
if (!n)
|
|
4199
4342
|
return;
|
|
4200
|
-
const a =
|
|
4343
|
+
const a = Rr({ user: n, content: o, verb: "post" });
|
|
4201
4344
|
await e.cancelQueries({ queryKey: t });
|
|
4202
4345
|
const u = e.getQueryData(t);
|
|
4203
4346
|
return e.setQueryData(t, (l) => [...l, a]), { previousActivities: u };
|
|
@@ -4205,7 +4348,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4205
4348
|
e.setQueryData(t, u.previousActivities);
|
|
4206
4349
|
}, onSettled: () => {
|
|
4207
4350
|
e.invalidateQueries({ queryKey: t });
|
|
4208
|
-
} }),
|
|
4351
|
+
} }), Lr = ({
|
|
4209
4352
|
queryClient: e,
|
|
4210
4353
|
queryKey: t,
|
|
4211
4354
|
mutationFn: n
|
|
@@ -4227,7 +4370,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4227
4370
|
onSettled: () => {
|
|
4228
4371
|
e.invalidateQueries({ queryKey: t });
|
|
4229
4372
|
}
|
|
4230
|
-
}),
|
|
4373
|
+
}), Or = ({
|
|
4231
4374
|
queryClient: e,
|
|
4232
4375
|
queryKey: t,
|
|
4233
4376
|
mutationFn: n
|
|
@@ -4250,7 +4393,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4250
4393
|
e.invalidateQueries({
|
|
4251
4394
|
queryKey: [...t, u.activityId]
|
|
4252
4395
|
});
|
|
4253
|
-
} }),
|
|
4396
|
+
} }), Br = ({
|
|
4254
4397
|
queryClient: e,
|
|
4255
4398
|
queryKey: t,
|
|
4256
4399
|
user: n,
|
|
@@ -4284,62 +4427,62 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4284
4427
|
e.invalidateQueries({
|
|
4285
4428
|
queryKey: [...t, l.activityId]
|
|
4286
4429
|
});
|
|
4287
|
-
} }),
|
|
4430
|
+
} }), Ro = ({
|
|
4288
4431
|
basePath: e,
|
|
4289
4432
|
parentId: t,
|
|
4290
4433
|
isMember: n,
|
|
4291
4434
|
functions: { list: r, create: i, edit: c, like: d, unlike: o, join: a, leave: u }
|
|
4292
4435
|
}) => {
|
|
4293
|
-
const l =
|
|
4436
|
+
const l = N(), f = st(), h = ge(Se), {
|
|
4294
4437
|
data: p,
|
|
4295
4438
|
error: _,
|
|
4296
4439
|
isLoading: j,
|
|
4297
4440
|
isFetching: g
|
|
4298
|
-
} =
|
|
4441
|
+
} = fn({
|
|
4299
4442
|
queryKey: [e, t],
|
|
4300
4443
|
queryFn: r
|
|
4301
|
-
}), E =
|
|
4444
|
+
}), E = Fr({
|
|
4302
4445
|
queryClient: f,
|
|
4303
4446
|
queryKey: [e, t],
|
|
4304
4447
|
user: h,
|
|
4305
4448
|
mutationFn: i
|
|
4306
|
-
}), { mutate: k } =
|
|
4449
|
+
}), { mutate: k } = de(E), T = Lr({
|
|
4307
4450
|
queryClient: f,
|
|
4308
4451
|
queryKey: [e, t],
|
|
4309
|
-
mutationFn: async (
|
|
4452
|
+
mutationFn: async (w) => await c(w)
|
|
4310
4453
|
}), {
|
|
4311
4454
|
mutate: M
|
|
4312
|
-
} =
|
|
4455
|
+
} = de(T), C = Or({
|
|
4313
4456
|
queryClient: f,
|
|
4314
4457
|
queryKey: [e, t],
|
|
4315
4458
|
mutationFn: d
|
|
4316
4459
|
}), {
|
|
4317
|
-
mutate:
|
|
4318
|
-
} =
|
|
4460
|
+
mutate: I
|
|
4461
|
+
} = de(C), V = Br({
|
|
4319
4462
|
queryClient: f,
|
|
4320
4463
|
queryKey: [e, t],
|
|
4321
4464
|
user: h,
|
|
4322
|
-
mutationFn: async ({ activityId:
|
|
4323
|
-
var
|
|
4324
|
-
const
|
|
4325
|
-
(
|
|
4326
|
-
)),
|
|
4327
|
-
(
|
|
4328
|
-
)) == null ? void 0 :
|
|
4329
|
-
await o({ reactionId:
|
|
4465
|
+
mutationFn: async ({ activityId: w }) => {
|
|
4466
|
+
var O, U, W;
|
|
4467
|
+
const Y = p && (p == null ? void 0 : p.find(
|
|
4468
|
+
(Z) => Z.id === w
|
|
4469
|
+
)), L = (W = (U = (O = Y == null ? void 0 : Y.own_reactions) == null ? void 0 : O.like) == null ? void 0 : U.find(
|
|
4470
|
+
(Z) => Z.user_id === (h == null ? void 0 : h.id)
|
|
4471
|
+
)) == null ? void 0 : W.id;
|
|
4472
|
+
await o({ reactionId: L || "", activityId: w });
|
|
4330
4473
|
}
|
|
4331
4474
|
}), {
|
|
4332
4475
|
mutate: x
|
|
4333
|
-
} =
|
|
4334
|
-
({ activityId:
|
|
4335
|
-
[
|
|
4336
|
-
),
|
|
4337
|
-
({ activityId:
|
|
4476
|
+
} = de(V), b = ke(
|
|
4477
|
+
({ activityId: w }) => I({ activityId: w }),
|
|
4478
|
+
[I]
|
|
4479
|
+
), Q = ke(
|
|
4480
|
+
({ activityId: w }) => x({ activityId: w }),
|
|
4338
4481
|
[x]
|
|
4339
4482
|
);
|
|
4340
|
-
return _ ? /* @__PURE__ */ s.jsx(
|
|
4483
|
+
return _ ? /* @__PURE__ */ s.jsx(it, { variant: "error", text: _.message }) : j ? /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4341
4484
|
/* @__PURE__ */ s.jsx(
|
|
4342
|
-
|
|
4485
|
+
It,
|
|
4343
4486
|
{
|
|
4344
4487
|
contentType: "post",
|
|
4345
4488
|
createPost: k,
|
|
@@ -4352,53 +4495,49 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4352
4495
|
}
|
|
4353
4496
|
}
|
|
4354
4497
|
),
|
|
4355
|
-
!g && Array.isArray(p) && (p == null ? void 0 : p.map((
|
|
4356
|
-
var
|
|
4357
|
-
const
|
|
4358
|
-
return /* @__PURE__ */ s.jsxs(
|
|
4498
|
+
!g && Array.isArray(p) && (p == null ? void 0 : p.map((w) => {
|
|
4499
|
+
var O, U, W, Z, re, oe, ae, ie, se, P, te, G;
|
|
4500
|
+
const Y = ((O = w == null ? void 0 : w.actor) == null ? void 0 : O.id) === (h == null ? void 0 : h.id), L = Ht(n, Y);
|
|
4501
|
+
return /* @__PURE__ */ s.jsxs(Ct, { children: [
|
|
4359
4502
|
/* @__PURE__ */ s.jsx(
|
|
4360
|
-
|
|
4503
|
+
ct,
|
|
4361
4504
|
{
|
|
4362
4505
|
content: {
|
|
4363
4506
|
type: "post",
|
|
4364
|
-
body:
|
|
4365
|
-
canLike:
|
|
4366
|
-
createdAt: (
|
|
4367
|
-
slugs: { parentId: t, activityId:
|
|
4368
|
-
slug:
|
|
4507
|
+
body: w == null ? void 0 : w.content,
|
|
4508
|
+
canLike: L,
|
|
4509
|
+
createdAt: (w == null ? void 0 : w.time) || "",
|
|
4510
|
+
slugs: { parentId: t, activityId: w == null ? void 0 : w.id },
|
|
4511
|
+
slug: w == null ? void 0 : w.id,
|
|
4369
4512
|
author: {
|
|
4370
|
-
id: (
|
|
4371
|
-
name: `${(
|
|
4372
|
-
organization: (
|
|
4373
|
-
jobTitle: (
|
|
4513
|
+
id: (U = w == null ? void 0 : w.actor) == null ? void 0 : U.id,
|
|
4514
|
+
name: `${(Z = (W = w == null ? void 0 : w.actor) == null ? void 0 : W.data) == null ? void 0 : Z.name}`,
|
|
4515
|
+
organization: (oe = (re = w == null ? void 0 : w.actor) == null ? void 0 : re.data) == null ? void 0 : oe.organization,
|
|
4516
|
+
jobTitle: (ie = (ae = w == null ? void 0 : w.actor) == null ? void 0 : ae.data) == null ? void 0 : ie.jobTitle,
|
|
4374
4517
|
image: {
|
|
4375
|
-
thumbnail: ((P = (
|
|
4518
|
+
thumbnail: ((P = (se = w == null ? void 0 : w.actor) == null ? void 0 : se.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4376
4519
|
}
|
|
4377
4520
|
},
|
|
4378
|
-
userLiked: ((te =
|
|
4379
|
-
likes: (
|
|
4380
|
-
comments: (
|
|
4381
|
-
peopleWhoLiked: ((ne = v == null ? void 0 : v.latest_reactions) == null ? void 0 : ne.like) && ((F = v == null ? void 0 : v.latest_reactions) == null ? void 0 : F.like.map((J) => ({
|
|
4382
|
-
id: J == null ? void 0 : J.user_id,
|
|
4383
|
-
name: J.user.data.name
|
|
4384
|
-
})))
|
|
4521
|
+
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((G = w == null ? void 0 : w.own_reactions) == null ? void 0 : G.like.length) > 0,
|
|
4522
|
+
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4523
|
+
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0
|
|
4385
4524
|
},
|
|
4386
4525
|
links: {
|
|
4387
|
-
post: `${e}/${t}/${
|
|
4388
|
-
comments: `${e}/${t}/${
|
|
4526
|
+
post: `${e}/${t}/${w == null ? void 0 : w.id}`,
|
|
4527
|
+
comments: `${e}/${t}/${w == null ? void 0 : w.id}`
|
|
4389
4528
|
},
|
|
4390
4529
|
functions: {
|
|
4391
4530
|
content: {
|
|
4392
4531
|
createContent: () => null,
|
|
4393
4532
|
deleteContent: () => null,
|
|
4394
|
-
updateContent: (
|
|
4533
|
+
updateContent: (K, ue) => M({ activityInfo: K, content: ue })
|
|
4395
4534
|
},
|
|
4396
4535
|
likes: {
|
|
4397
4536
|
createLike: () => {
|
|
4398
|
-
b({ activityId:
|
|
4537
|
+
b({ activityId: w == null ? void 0 : w.id });
|
|
4399
4538
|
},
|
|
4400
4539
|
deleteLike: () => {
|
|
4401
|
-
|
|
4540
|
+
Q({ activityId: w == null ? void 0 : w.id });
|
|
4402
4541
|
}
|
|
4403
4542
|
},
|
|
4404
4543
|
comments: {
|
|
@@ -4409,10 +4548,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4409
4548
|
}
|
|
4410
4549
|
),
|
|
4411
4550
|
/* @__PURE__ */ s.jsx(Ae, {})
|
|
4412
|
-
] },
|
|
4551
|
+
] }, w == null ? void 0 : w.id);
|
|
4413
4552
|
}))
|
|
4414
4553
|
] });
|
|
4415
|
-
},
|
|
4554
|
+
}, Ir = ({
|
|
4416
4555
|
queryClient: e,
|
|
4417
4556
|
queryKey: t,
|
|
4418
4557
|
mutationFn: n
|
|
@@ -4431,7 +4570,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4431
4570
|
})), { previousActivity: a };
|
|
4432
4571
|
}, onSettled: () => {
|
|
4433
4572
|
e.invalidateQueries({ queryKey: t });
|
|
4434
|
-
} }),
|
|
4573
|
+
} }), Hr = ({
|
|
4435
4574
|
queryClient: e,
|
|
4436
4575
|
queryKey: t,
|
|
4437
4576
|
mutationFn: n
|
|
@@ -4457,7 +4596,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4457
4596
|
onError: (c, d, o) => {
|
|
4458
4597
|
e.setQueryData(t, o.previousActivity);
|
|
4459
4598
|
}
|
|
4460
|
-
}),
|
|
4599
|
+
}), Qr = ({
|
|
4461
4600
|
queryClient: e,
|
|
4462
4601
|
queryKey: t,
|
|
4463
4602
|
mutationFn: n
|
|
@@ -4484,7 +4623,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4484
4623
|
...o,
|
|
4485
4624
|
latest_reactions: { reply: a }
|
|
4486
4625
|
})), { previousActivity: o };
|
|
4487
|
-
} }),
|
|
4626
|
+
} }), Ur = ({
|
|
4488
4627
|
queryClient: e,
|
|
4489
4628
|
queryKey: t,
|
|
4490
4629
|
user: n,
|
|
@@ -4523,7 +4662,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4523
4662
|
...u,
|
|
4524
4663
|
latest_reactions: { reply: l }
|
|
4525
4664
|
})), { previousActivity: u };
|
|
4526
|
-
} }),
|
|
4665
|
+
} }), zr = ({
|
|
4527
4666
|
queryClient: e,
|
|
4528
4667
|
queryKey: t,
|
|
4529
4668
|
mutationFn: n
|
|
@@ -4571,7 +4710,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4571
4710
|
...o,
|
|
4572
4711
|
latest_reactions: { reply: a }
|
|
4573
4712
|
})), { previousActivity: o };
|
|
4574
|
-
} }),
|
|
4713
|
+
} }), mn = ({
|
|
4575
4714
|
queryClient: e,
|
|
4576
4715
|
queryKey: t,
|
|
4577
4716
|
mutationFn: n
|
|
@@ -4604,7 +4743,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4604
4743
|
...a,
|
|
4605
4744
|
latest_reactions: { reply: u }
|
|
4606
4745
|
})), { previousActivity: a };
|
|
4607
|
-
} }),
|
|
4746
|
+
} }), Vr = ({
|
|
4608
4747
|
basePath: e,
|
|
4609
4748
|
parentId: t,
|
|
4610
4749
|
replyParentId: n,
|
|
@@ -4613,46 +4752,46 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4613
4752
|
replies: c,
|
|
4614
4753
|
functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
|
|
4615
4754
|
}) => {
|
|
4616
|
-
const h =
|
|
4755
|
+
const h = N(), p = st(), _ = ge(lt), j = zr({
|
|
4617
4756
|
queryClient: p,
|
|
4618
4757
|
queryKey: [e, t, r],
|
|
4619
4758
|
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
4620
|
-
}), { mutate: g } =
|
|
4759
|
+
}), { mutate: g } = de(j), E = Wr({
|
|
4621
4760
|
queryClient: p,
|
|
4622
4761
|
queryKey: [e, t, r],
|
|
4623
4762
|
mutationFn: o
|
|
4624
4763
|
}), {
|
|
4625
4764
|
mutate: k
|
|
4626
|
-
} =
|
|
4765
|
+
} = de(E), T = mn({
|
|
4627
4766
|
queryClient: p,
|
|
4628
4767
|
queryKey: [e, t, r],
|
|
4629
4768
|
mutationFn: l
|
|
4630
4769
|
}), {
|
|
4631
4770
|
mutate: M
|
|
4632
|
-
} =
|
|
4771
|
+
} = de(T), C = mn({
|
|
4633
4772
|
queryClient: p,
|
|
4634
4773
|
queryKey: [e, t, r],
|
|
4635
4774
|
mutationFn: f
|
|
4636
4775
|
}), {
|
|
4637
|
-
mutate:
|
|
4638
|
-
} =
|
|
4639
|
-
({ replyId: b, replyParentId:
|
|
4776
|
+
mutate: I
|
|
4777
|
+
} = de(C), V = ke(
|
|
4778
|
+
({ replyId: b, replyParentId: Q }) => M({ replyId: b, replyParentId: Q }),
|
|
4640
4779
|
[M]
|
|
4641
|
-
), x =
|
|
4642
|
-
({ replyId: b, replyParentId:
|
|
4643
|
-
[
|
|
4780
|
+
), x = ke(
|
|
4781
|
+
({ replyId: b, replyParentId: Q }) => I({ replyId: b, replyParentId: Q }),
|
|
4782
|
+
[I]
|
|
4644
4783
|
);
|
|
4645
4784
|
return /* @__PURE__ */ s.jsx(
|
|
4646
|
-
|
|
4785
|
+
Pr,
|
|
4647
4786
|
{
|
|
4648
4787
|
count: i,
|
|
4649
4788
|
showRepliesButton: i > 0 || _.showForm,
|
|
4650
4789
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4651
4790
|
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4652
|
-
|
|
4791
|
+
It,
|
|
4653
4792
|
{
|
|
4654
4793
|
contentType: "reply",
|
|
4655
|
-
createPost: (b,
|
|
4794
|
+
createPost: (b, Q) => g(Q),
|
|
4656
4795
|
membershipRequiredToPost: {
|
|
4657
4796
|
isMember: !0,
|
|
4658
4797
|
required: !0,
|
|
@@ -4663,13 +4802,13 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4663
4802
|
}
|
|
4664
4803
|
),
|
|
4665
4804
|
(c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
|
|
4666
|
-
var
|
|
4805
|
+
var Q, w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te;
|
|
4667
4806
|
return /* @__PURE__ */ s.jsx(
|
|
4668
|
-
|
|
4807
|
+
ct,
|
|
4669
4808
|
{
|
|
4670
4809
|
content: {
|
|
4671
4810
|
type: "reply",
|
|
4672
|
-
body: typeof b.data.content == "string" ? (
|
|
4811
|
+
body: typeof b.data.content == "string" ? (Q = b == null ? void 0 : b.data) == null ? void 0 : Q.content : ((Y = (w = b == null ? void 0 : b.data) == null ? void 0 : w.content) == null ? void 0 : Y.text) || "",
|
|
4673
4812
|
createdAt: b == null ? void 0 : b.created_at,
|
|
4674
4813
|
slugs: {
|
|
4675
4814
|
parentId: t,
|
|
@@ -4679,37 +4818,33 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4679
4818
|
},
|
|
4680
4819
|
slug: "",
|
|
4681
4820
|
author: {
|
|
4682
|
-
id: (
|
|
4683
|
-
name: (
|
|
4684
|
-
organization: (
|
|
4685
|
-
jobTitle: (
|
|
4821
|
+
id: (L = b == null ? void 0 : b.user) == null ? void 0 : L.id,
|
|
4822
|
+
name: (U = (O = b == null ? void 0 : b.user) == null ? void 0 : O.data) == null ? void 0 : U.name,
|
|
4823
|
+
organization: (Z = (W = b == null ? void 0 : b.user) == null ? void 0 : W.data) == null ? void 0 : Z.organization,
|
|
4824
|
+
jobTitle: (oe = (re = b == null ? void 0 : b.user) == null ? void 0 : re.data) == null ? void 0 : oe.jobTitle,
|
|
4686
4825
|
image: {
|
|
4687
|
-
thumbnail: ((
|
|
4826
|
+
thumbnail: ((ie = (ae = b == null ? void 0 : b.user) == null ? void 0 : ae.data) == null ? void 0 : ie.thumbnail) || void 0
|
|
4688
4827
|
}
|
|
4689
4828
|
},
|
|
4690
|
-
userLiked: ((
|
|
4691
|
-
likes: ((te = b == null ? void 0 : b.children_counts) == null ? void 0 : te.like) || 0
|
|
4692
|
-
peopleWhoLiked: ((ce = b == null ? void 0 : b.latest_children) == null ? void 0 : ce.like) && ((ne = b == null ? void 0 : b.latest_children) == null ? void 0 : ne.like.map((F) => ({
|
|
4693
|
-
id: F == null ? void 0 : F.user_id,
|
|
4694
|
-
name: F.user.data.name
|
|
4695
|
-
})))
|
|
4829
|
+
userLiked: ((se = b == null ? void 0 : b.own_children) == null ? void 0 : se.like) && ((P = b == null ? void 0 : b.own_children) == null ? void 0 : P.like.length) > 0,
|
|
4830
|
+
likes: ((te = b == null ? void 0 : b.children_counts) == null ? void 0 : te.like) || 0
|
|
4696
4831
|
},
|
|
4697
4832
|
functions: {
|
|
4698
4833
|
content: {
|
|
4699
4834
|
createContent: () => console.log("create"),
|
|
4700
4835
|
deleteContent: () => console.log("delete"),
|
|
4701
|
-
updateContent: (
|
|
4836
|
+
updateContent: (G, K) => k({ replyInfo: G, content: K })
|
|
4702
4837
|
},
|
|
4703
4838
|
likes: {
|
|
4704
|
-
createLike: () =>
|
|
4839
|
+
createLike: () => V({
|
|
4705
4840
|
replyId: b == null ? void 0 : b.id,
|
|
4706
4841
|
replyParentId: b == null ? void 0 : b.parent
|
|
4707
4842
|
}),
|
|
4708
4843
|
deleteLike: () => {
|
|
4709
|
-
var
|
|
4710
|
-
const
|
|
4844
|
+
var K, ue, fe;
|
|
4845
|
+
const G = ((K = b == null ? void 0 : b.own_children) == null ? void 0 : K.like) && ((fe = (ue = b == null ? void 0 : b.own_children) == null ? void 0 : ue.like[0]) == null ? void 0 : fe.id);
|
|
4711
4846
|
return x({
|
|
4712
|
-
replyId:
|
|
4847
|
+
replyId: G || ""
|
|
4713
4848
|
});
|
|
4714
4849
|
}
|
|
4715
4850
|
},
|
|
@@ -4722,7 +4857,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4722
4857
|
] })
|
|
4723
4858
|
}
|
|
4724
4859
|
);
|
|
4725
|
-
},
|
|
4860
|
+
}, Yr = ({
|
|
4726
4861
|
basePath: e,
|
|
4727
4862
|
parentId: t,
|
|
4728
4863
|
activityId: n,
|
|
@@ -4730,39 +4865,39 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4730
4865
|
isMember: i,
|
|
4731
4866
|
functions: { createReply: c, editReply: d, like: o, unlike: a, join: u, leave: l }
|
|
4732
4867
|
}) => {
|
|
4733
|
-
const f =
|
|
4868
|
+
const f = N(), h = st(), p = ge(Se), _ = Ir({
|
|
4734
4869
|
queryClient: h,
|
|
4735
4870
|
queryKey: [e, t, n],
|
|
4736
4871
|
mutationFn: async (x) => c({ activityId: n, content: x.body })
|
|
4737
|
-
}), { mutate: j } =
|
|
4872
|
+
}), { mutate: j } = de(_), g = Hr({
|
|
4738
4873
|
queryClient: h,
|
|
4739
4874
|
queryKey: [e, t, n],
|
|
4740
4875
|
mutationFn: async (x) => d(x)
|
|
4741
4876
|
}), {
|
|
4742
4877
|
mutate: E
|
|
4743
|
-
} =
|
|
4878
|
+
} = de(g), k = Qr({
|
|
4744
4879
|
queryClient: h,
|
|
4745
4880
|
queryKey: [e, t, n],
|
|
4746
4881
|
mutationFn: o
|
|
4747
4882
|
}), {
|
|
4748
4883
|
mutate: T
|
|
4749
|
-
} =
|
|
4884
|
+
} = de(k), M = Ur({
|
|
4750
4885
|
queryClient: h,
|
|
4751
4886
|
queryKey: [e, t, n],
|
|
4752
4887
|
user: p,
|
|
4753
4888
|
mutationFn: a
|
|
4754
4889
|
}), {
|
|
4755
4890
|
mutate: C
|
|
4756
|
-
} =
|
|
4891
|
+
} = de(M), I = ke(
|
|
4757
4892
|
({ replyId: x }) => T({ replyId: x }),
|
|
4758
4893
|
[T]
|
|
4759
|
-
),
|
|
4894
|
+
), V = ke(
|
|
4760
4895
|
({ replyId: x }) => C({ replyId: x }),
|
|
4761
4896
|
[C]
|
|
4762
4897
|
);
|
|
4763
4898
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4764
4899
|
/* @__PURE__ */ s.jsx(
|
|
4765
|
-
|
|
4900
|
+
It,
|
|
4766
4901
|
{
|
|
4767
4902
|
contentType: "reply",
|
|
4768
4903
|
createPost: (x, b) => j(b),
|
|
@@ -4776,15 +4911,15 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4776
4911
|
}
|
|
4777
4912
|
),
|
|
4778
4913
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4779
|
-
var
|
|
4780
|
-
const b = ((
|
|
4781
|
-
return /* @__PURE__ */ s.jsx(
|
|
4782
|
-
|
|
4914
|
+
var w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te, G, K, ue, fe;
|
|
4915
|
+
const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), Q = Ht(i, b);
|
|
4916
|
+
return /* @__PURE__ */ s.jsx(Tr, { children: /* @__PURE__ */ s.jsx(
|
|
4917
|
+
ct,
|
|
4783
4918
|
{
|
|
4784
4919
|
content: {
|
|
4785
4920
|
type: "reply",
|
|
4786
|
-
body: typeof x.data.content == "string" ? (
|
|
4787
|
-
canLike:
|
|
4921
|
+
body: typeof x.data.content == "string" ? (Y = x == null ? void 0 : x.data) == null ? void 0 : Y.content : ((O = (L = x == null ? void 0 : x.data) == null ? void 0 : L.content) == null ? void 0 : O.text) || "",
|
|
4922
|
+
canLike: Q,
|
|
4788
4923
|
createdAt: x == null ? void 0 : x.created_at,
|
|
4789
4924
|
slugs: {
|
|
4790
4925
|
question: `${e}/${t}/${n}`,
|
|
@@ -4793,46 +4928,42 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4793
4928
|
},
|
|
4794
4929
|
slug: `${e}/${t}/${n}#${x == null ? void 0 : x.id}`,
|
|
4795
4930
|
author: {
|
|
4796
|
-
id: (
|
|
4797
|
-
name: (
|
|
4798
|
-
organization: (
|
|
4799
|
-
jobTitle: (
|
|
4931
|
+
id: (U = x == null ? void 0 : x.user) == null ? void 0 : U.id,
|
|
4932
|
+
name: (Z = (W = x == null ? void 0 : x.user) == null ? void 0 : W.data) == null ? void 0 : Z.name,
|
|
4933
|
+
organization: (oe = (re = x == null ? void 0 : x.user) == null ? void 0 : re.data) == null ? void 0 : oe.organization,
|
|
4934
|
+
jobTitle: (ie = (ae = x == null ? void 0 : x.user) == null ? void 0 : ae.data) == null ? void 0 : ie.jobTitle,
|
|
4800
4935
|
image: {
|
|
4801
|
-
thumbnail: ((P = (
|
|
4936
|
+
thumbnail: ((P = (se = x == null ? void 0 : x.user) == null ? void 0 : se.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4802
4937
|
}
|
|
4803
4938
|
},
|
|
4804
|
-
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((
|
|
4805
|
-
likes: ((
|
|
4806
|
-
peopleWhoLiked: ((F = x == null ? void 0 : x.latest_children) == null ? void 0 : F.like) && ((J = x == null ? void 0 : x.latest_children) == null ? void 0 : J.like.map((ge) => ({
|
|
4807
|
-
id: ge == null ? void 0 : ge.user_id,
|
|
4808
|
-
name: ge.user.data.name
|
|
4809
|
-
})))
|
|
4939
|
+
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((G = x == null ? void 0 : x.own_children) == null ? void 0 : G.like.length) > 0,
|
|
4940
|
+
likes: ((K = x == null ? void 0 : x.children_counts) == null ? void 0 : K.like) || 0
|
|
4810
4941
|
},
|
|
4811
4942
|
functions: {
|
|
4812
4943
|
content: {
|
|
4813
4944
|
createContent: () => console.log("create"),
|
|
4814
4945
|
deleteContent: () => console.log("delete"),
|
|
4815
|
-
updateContent: (
|
|
4946
|
+
updateContent: (_e, xe) => E({ replyInfo: _e, content: xe })
|
|
4816
4947
|
},
|
|
4817
4948
|
likes: {
|
|
4818
|
-
createLike: () =>
|
|
4949
|
+
createLike: () => I({ replyId: x == null ? void 0 : x.id }),
|
|
4819
4950
|
deleteLike: () => {
|
|
4820
|
-
var
|
|
4821
|
-
const
|
|
4822
|
-
return
|
|
4951
|
+
var xe, Ie, Ne;
|
|
4952
|
+
const _e = ((xe = x == null ? void 0 : x.own_children) == null ? void 0 : xe.like) && ((Ne = (Ie = x == null ? void 0 : x.own_children) == null ? void 0 : Ie.like[0]) == null ? void 0 : Ne.id);
|
|
4953
|
+
return V({ replyId: _e || "" });
|
|
4823
4954
|
}
|
|
4824
4955
|
},
|
|
4825
4956
|
comments: {}
|
|
4826
4957
|
},
|
|
4827
4958
|
children: /* @__PURE__ */ s.jsx(
|
|
4828
|
-
|
|
4959
|
+
Vr,
|
|
4829
4960
|
{
|
|
4830
4961
|
basePath: e,
|
|
4831
4962
|
parentId: t,
|
|
4832
4963
|
replyParentId: x == null ? void 0 : x.id,
|
|
4833
4964
|
activityId: n,
|
|
4834
|
-
replyCount: ((
|
|
4835
|
-
replies: (
|
|
4965
|
+
replyCount: ((ue = x == null ? void 0 : x.children_counts) == null ? void 0 : ue.reply) || 0,
|
|
4966
|
+
replies: (fe = x == null ? void 0 : x.latest_children) == null ? void 0 : fe.reply,
|
|
4836
4967
|
isMember: i,
|
|
4837
4968
|
functions: {
|
|
4838
4969
|
create: c,
|
|
@@ -4849,7 +4980,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4849
4980
|
) }, x == null ? void 0 : x.id);
|
|
4850
4981
|
}))
|
|
4851
4982
|
] });
|
|
4852
|
-
},
|
|
4983
|
+
}, Gr = ({
|
|
4853
4984
|
queryClient: e,
|
|
4854
4985
|
queryKey: t,
|
|
4855
4986
|
mutationFn: n
|
|
@@ -4873,7 +5004,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4873
5004
|
onSettled: () => {
|
|
4874
5005
|
e.invalidateQueries({ queryKey: t });
|
|
4875
5006
|
}
|
|
4876
|
-
}),
|
|
5007
|
+
}), Jr = ({
|
|
4877
5008
|
queryClient: e,
|
|
4878
5009
|
queryKey: t,
|
|
4879
5010
|
mutationFn: n
|
|
@@ -4893,7 +5024,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4893
5024
|
})), { previousActivity: a };
|
|
4894
5025
|
}, onSettled: () => {
|
|
4895
5026
|
e.invalidateQueries({ queryKey: t });
|
|
4896
|
-
} }),
|
|
5027
|
+
} }), Xr = ({
|
|
4897
5028
|
queryClient: e,
|
|
4898
5029
|
queryKey: t,
|
|
4899
5030
|
user: n,
|
|
@@ -4926,7 +5057,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4926
5057
|
}, onSettled: () => {
|
|
4927
5058
|
e.invalidateQueries({ queryKey: t });
|
|
4928
5059
|
} });
|
|
4929
|
-
const
|
|
5060
|
+
const Fo = ({
|
|
4930
5061
|
basePath: e,
|
|
4931
5062
|
parentId: t,
|
|
4932
5063
|
activityId: n,
|
|
@@ -4944,61 +5075,61 @@ const Ro = ({
|
|
|
4944
5075
|
leave: p
|
|
4945
5076
|
}
|
|
4946
5077
|
}) => {
|
|
4947
|
-
var
|
|
4948
|
-
const _ =
|
|
5078
|
+
var O, U, W, Z, re, oe, ae, ie, se, P, te;
|
|
5079
|
+
const _ = ge(Se), j = st(), {
|
|
4949
5080
|
data: g,
|
|
4950
5081
|
error: E,
|
|
4951
5082
|
isLoading: k,
|
|
4952
5083
|
isFetching: T
|
|
4953
|
-
} =
|
|
5084
|
+
} = fn({
|
|
4954
5085
|
queryKey: [e, t, n],
|
|
4955
5086
|
queryFn: i
|
|
4956
|
-
}), M =
|
|
5087
|
+
}), M = Gr({
|
|
4957
5088
|
queryClient: j,
|
|
4958
5089
|
queryKey: [e, t, n],
|
|
4959
|
-
mutationFn: async (
|
|
5090
|
+
mutationFn: async (G) => await c(G)
|
|
4960
5091
|
}), {
|
|
4961
5092
|
mutate: C
|
|
4962
|
-
} =
|
|
5093
|
+
} = de(M), I = Jr({
|
|
4963
5094
|
queryClient: j,
|
|
4964
5095
|
queryKey: [e, t, n],
|
|
4965
5096
|
mutationFn: d
|
|
4966
5097
|
}), {
|
|
4967
|
-
mutate:
|
|
4968
|
-
} =
|
|
5098
|
+
mutate: V
|
|
5099
|
+
} = de(I), x = Xr({
|
|
4969
5100
|
queryClient: j,
|
|
4970
5101
|
queryKey: [e, t, n],
|
|
4971
5102
|
user: _,
|
|
4972
5103
|
mutationFn: async () => {
|
|
4973
|
-
var
|
|
4974
|
-
const
|
|
4975
|
-
(
|
|
4976
|
-
)) == null ? void 0 :
|
|
4977
|
-
await o({ activityId: n, reactionId:
|
|
5104
|
+
var K, ue, fe;
|
|
5105
|
+
const G = (fe = (ue = (K = g == null ? void 0 : g.own_reactions) == null ? void 0 : K.like) == null ? void 0 : ue.find(
|
|
5106
|
+
(_e) => _e.user_id === (_ == null ? void 0 : _.id)
|
|
5107
|
+
)) == null ? void 0 : fe.id;
|
|
5108
|
+
await o({ activityId: n, reactionId: G });
|
|
4978
5109
|
},
|
|
4979
5110
|
activity: g
|
|
4980
5111
|
}), {
|
|
4981
5112
|
mutate: b
|
|
4982
|
-
} =
|
|
4983
|
-
({ activityId:
|
|
4984
|
-
[
|
|
4985
|
-
),
|
|
4986
|
-
async ({ activityId:
|
|
5113
|
+
} = de(x), Q = ke(
|
|
5114
|
+
({ activityId: G }) => V({ activityId: G }),
|
|
5115
|
+
[V]
|
|
5116
|
+
), w = ke(
|
|
5117
|
+
async ({ activityId: G }) => b({ activityId: G }),
|
|
4987
5118
|
[b]
|
|
4988
5119
|
);
|
|
4989
5120
|
if (E)
|
|
4990
|
-
return /* @__PURE__ */ s.jsx(
|
|
5121
|
+
return /* @__PURE__ */ s.jsx(it, { variant: "error", text: E.message });
|
|
4991
5122
|
if (k || T)
|
|
4992
|
-
return /* @__PURE__ */ s.jsx(
|
|
4993
|
-
const
|
|
5123
|
+
return /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } });
|
|
5124
|
+
const Y = ((O = g == null ? void 0 : g.actor) == null ? void 0 : O.id) === (_ == null ? void 0 : _.id), L = Ht(r, Y);
|
|
4994
5125
|
return /* @__PURE__ */ s.jsx(
|
|
4995
|
-
|
|
5126
|
+
ct,
|
|
4996
5127
|
{
|
|
4997
5128
|
className: "activity-section",
|
|
4998
5129
|
content: {
|
|
4999
5130
|
type: "post",
|
|
5000
5131
|
body: g == null ? void 0 : g.content,
|
|
5001
|
-
canLike:
|
|
5132
|
+
canLike: L,
|
|
5002
5133
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
5003
5134
|
slugs: {
|
|
5004
5135
|
question: `${t}/${n}`,
|
|
@@ -5007,32 +5138,28 @@ const Ro = ({
|
|
|
5007
5138
|
},
|
|
5008
5139
|
slug: n,
|
|
5009
5140
|
author: {
|
|
5010
|
-
id: (
|
|
5011
|
-
name: (
|
|
5012
|
-
organization: (
|
|
5013
|
-
jobTitle: (
|
|
5141
|
+
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
5142
|
+
name: (W = g == null ? void 0 : g.actor) == null ? void 0 : W.data.name,
|
|
5143
|
+
organization: (Z = g == null ? void 0 : g.actor) == null ? void 0 : Z.data.organization,
|
|
5144
|
+
jobTitle: (re = g == null ? void 0 : g.actor) == null ? void 0 : re.data.jobTitle,
|
|
5014
5145
|
image: {
|
|
5015
|
-
thumbnail: ((
|
|
5146
|
+
thumbnail: ((oe = g == null ? void 0 : g.actor) == null ? void 0 : oe.data.thumbnail) || void 0
|
|
5016
5147
|
}
|
|
5017
5148
|
},
|
|
5018
|
-
userLiked: ((
|
|
5149
|
+
userLiked: ((ae = g == null ? void 0 : g.own_reactions) == null ? void 0 : ae.like) && ((ie = g == null ? void 0 : g.own_reactions) == null ? void 0 : ie.like.length) > 0,
|
|
5019
5150
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
5020
|
-
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
5021
|
-
peopleWhoLiked: ((re = g == null ? void 0 : g.latest_reactions) == null ? void 0 : re.like) && ((P = g == null ? void 0 : g.latest_reactions) == null ? void 0 : P.like.map((F) => ({
|
|
5022
|
-
id: F == null ? void 0 : F.user_id,
|
|
5023
|
-
name: F.user.data.name
|
|
5024
|
-
})))
|
|
5151
|
+
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
5025
5152
|
},
|
|
5026
|
-
originalAuthorId: (
|
|
5153
|
+
originalAuthorId: (se = g == null ? void 0 : g.actor) == null ? void 0 : se.id,
|
|
5027
5154
|
functions: {
|
|
5028
5155
|
content: {
|
|
5029
5156
|
createContent: () => console.log("create"),
|
|
5030
5157
|
deleteContent: () => console.log("delete"),
|
|
5031
|
-
updateContent: (
|
|
5158
|
+
updateContent: (G, K) => C({ activityInfo: G, content: K })
|
|
5032
5159
|
},
|
|
5033
5160
|
likes: {
|
|
5034
|
-
createLike: () =>
|
|
5035
|
-
deleteLike: () =>
|
|
5161
|
+
createLike: () => Q({ activityId: n }),
|
|
5162
|
+
deleteLike: () => w({ activityId: n })
|
|
5036
5163
|
},
|
|
5037
5164
|
comments: {
|
|
5038
5165
|
openComments: () => {
|
|
@@ -5042,16 +5169,16 @@ const Ro = ({
|
|
|
5042
5169
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5043
5170
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
5044
5171
|
"Comments (",
|
|
5045
|
-
((
|
|
5172
|
+
((P = g == null ? void 0 : g.reaction_counts) == null ? void 0 : P.reply) || 0,
|
|
5046
5173
|
")"
|
|
5047
5174
|
] }),
|
|
5048
5175
|
/* @__PURE__ */ s.jsx(
|
|
5049
|
-
|
|
5176
|
+
Yr,
|
|
5050
5177
|
{
|
|
5051
5178
|
basePath: e,
|
|
5052
5179
|
parentId: t,
|
|
5053
5180
|
activityId: n,
|
|
5054
|
-
repliesList: (
|
|
5181
|
+
repliesList: (te = g == null ? void 0 : g.latest_reactions) == null ? void 0 : te.reply,
|
|
5055
5182
|
isMember: r,
|
|
5056
5183
|
functions: {
|
|
5057
5184
|
createReply: a,
|
|
@@ -5067,7 +5194,7 @@ const Ro = ({
|
|
|
5067
5194
|
},
|
|
5068
5195
|
n
|
|
5069
5196
|
);
|
|
5070
|
-
},
|
|
5197
|
+
}, Lo = ({ id: e, data: { jobTitle: t, name: n, organization: r, thumbnail: i } }) => ({
|
|
5071
5198
|
id: e,
|
|
5072
5199
|
name: n,
|
|
5073
5200
|
jobTitle: t,
|
|
@@ -5075,85 +5202,85 @@ const Ro = ({
|
|
|
5075
5202
|
image: { thumbnail: i }
|
|
5076
5203
|
});
|
|
5077
5204
|
export {
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5205
|
+
Dt as ASSETS_BUCKET,
|
|
5206
|
+
Ro as ActivitiesFeed,
|
|
5207
|
+
Fo as ActivitySection,
|
|
5208
|
+
It as AddPost,
|
|
5209
|
+
go as BannerSection,
|
|
5210
|
+
jo as Breadcrumbs,
|
|
5211
|
+
J as Button,
|
|
5212
|
+
ot as ButtonWrapper,
|
|
5213
|
+
lr as CacheProvider,
|
|
5214
|
+
kn as CollapsibleSection,
|
|
5215
|
+
So as Columns,
|
|
5216
|
+
ko as CommunityDetails,
|
|
5217
|
+
ir as Contributors,
|
|
5218
|
+
lt as ConversationContext,
|
|
5219
|
+
xr as CookieBanner,
|
|
5220
|
+
Tr as DiscussionConversation,
|
|
5221
|
+
Pn as DiscussionForm,
|
|
5222
|
+
Cr as DiscussionLikes,
|
|
5223
|
+
ct as DiscussionPost,
|
|
5224
|
+
Pr as DiscussionThread,
|
|
5098
5225
|
Ae as Divider,
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5226
|
+
ho as DownloadSection,
|
|
5227
|
+
Oe as EMAILS,
|
|
5228
|
+
To as EmailHelperTextBox,
|
|
5229
|
+
it as EmptyStateBox,
|
|
5230
|
+
yo as Filters,
|
|
5231
|
+
ur as FlagsProvider,
|
|
5232
|
+
Mn as Footer,
|
|
5233
|
+
wn as FullWidthSection,
|
|
5234
|
+
wo as GlobalProviders,
|
|
5235
|
+
Nn as Header,
|
|
5109
5236
|
Ws as HelperTextBox,
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5237
|
+
gn as HiddenFromScreenReaders,
|
|
5238
|
+
bo as HideShowTextBox,
|
|
5239
|
+
Ee as HighlightedTextBox,
|
|
5240
|
+
mr as IntlProvider,
|
|
5241
|
+
kr as InviteForm,
|
|
5115
5242
|
No as InviteModal,
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5243
|
+
Tn as JoinButton,
|
|
5244
|
+
Eo as LanguageSwitcher,
|
|
5245
|
+
at as Link,
|
|
5246
|
+
pr as LoadMore,
|
|
5247
|
+
vo as LoadingBlock,
|
|
5248
|
+
je as LoadingPlaceholder,
|
|
5249
|
+
rr as LoadingState,
|
|
5250
|
+
$n as Logo,
|
|
5251
|
+
po as LogoSection,
|
|
5252
|
+
on as MarkdownText,
|
|
5253
|
+
_o as MarketingBox,
|
|
5254
|
+
Bt as Member,
|
|
5128
5255
|
Do as MembersList,
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5140
|
-
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5256
|
+
Ar as Modal,
|
|
5257
|
+
gr as MoreMenu,
|
|
5258
|
+
xo as NUMBER_OF_USERS,
|
|
5259
|
+
Rn as Overlay,
|
|
5260
|
+
Co as PageLayout,
|
|
5261
|
+
$o as PasswordRules,
|
|
5262
|
+
er as Pill,
|
|
5263
|
+
Ot as ProfilePicture,
|
|
5264
|
+
nr as ProgressBar,
|
|
5265
|
+
Mo as Rating,
|
|
5266
|
+
Yr as RepliesFeed,
|
|
5267
|
+
Po as ResponsesHeading,
|
|
5268
|
+
Hs as ResponsiveImage,
|
|
5269
|
+
wr as SearchForm,
|
|
5270
|
+
qs as Span,
|
|
5271
|
+
Pt as StatusBanner,
|
|
5272
|
+
Ao as Tags,
|
|
5273
|
+
Qs as Tooltip,
|
|
5274
|
+
Se as UserContext,
|
|
5275
|
+
fr as UserProvider,
|
|
5276
|
+
le as VisuallyHidden,
|
|
5150
5277
|
Dr as addAriaProps,
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5278
|
+
Sn as getMember,
|
|
5279
|
+
Ke as headerData,
|
|
5280
|
+
Lo as mapGetStreamData,
|
|
5154
5281
|
Es as useCurrentPath,
|
|
5155
|
-
|
|
5156
|
-
|
|
5282
|
+
Ce as useEffectAfterMount,
|
|
5283
|
+
rt as useElementWidth,
|
|
5157
5284
|
Ts as useScrollListener,
|
|
5158
|
-
|
|
5285
|
+
fo as useScrollToHash
|
|
5159
5286
|
};
|