@apolitical/component-library 1.13.5 → 1.13.7-beta.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/communities/community-details/community-details.d.ts +8 -2
- package/index.js +13 -13
- package/index.mjs +932 -885
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import N, { memo as
|
|
1
|
+
import N, { memo as Pe, useState as L, useEffect as Z, useRef as se, useMemo as nt, Children as Dt, createContext as Ot, useContext as be, Fragment as Nt, useCallback as je, 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 A, IntlProvider as ls, createIntl as cs, FormattedMessage as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as
|
|
4
|
+
import { useIntl as A, IntlProvider as ls, createIntl as cs, FormattedMessage as Ee } from "react-intl";
|
|
5
|
+
import st from "truncate";
|
|
6
|
+
import rt from "markdown-to-jsx";
|
|
7
|
+
import { QueryClient as ds, QueryClientProvider as us, useQueryClient as ot, useQuery as pn, useMutation as me } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as ms } from "@tanstack/react-query-devtools";
|
|
9
|
-
import
|
|
9
|
+
import Ke 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 gn 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 _n = { exports: {} };
|
|
20
20
|
/*!
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
@@ -51,10 +51,10 @@ var pn = { 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 }) => N.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }),
|
|
57
|
-
var
|
|
54
|
+
})(_n);
|
|
55
|
+
var vs = _n.exports;
|
|
56
|
+
const S = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => N.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }), de = Pe(ws), ks = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), xn = Pe(ks);
|
|
57
|
+
var At = { exports: {} }, Fe = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -64,11 +64,11 @@ var Dt = { exports: {} }, Re = {};
|
|
|
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 sn;
|
|
68
68
|
function js() {
|
|
69
|
-
if (
|
|
70
|
-
return
|
|
71
|
-
|
|
69
|
+
if (sn)
|
|
70
|
+
return Fe;
|
|
71
|
+
sn = 1;
|
|
72
72
|
var e = N, 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;
|
|
@@ -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 Fe.Fragment = n, Fe.jsx = d, Fe.jsxs = d, Fe;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Le = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -92,54 +92,54 @@ var Fe = {};
|
|
|
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 rn;
|
|
96
96
|
function ys() {
|
|
97
|
-
return
|
|
97
|
+
return rn || (rn = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
98
|
var e = N, 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 w = _ && m[_] || m[j];
|
|
103
|
+
return typeof w == "function" ? w : 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 w = arguments.length, y = new Array(w > 1 ? w - 1 : 0), $ = 1; $ < w; $++)
|
|
109
109
|
y[$ - 1] = arguments[$];
|
|
110
110
|
T("error", m, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function T(m,
|
|
113
|
+
function T(m, w, y) {
|
|
114
114
|
{
|
|
115
|
-
var $ = E.ReactDebugCurrentFrame,
|
|
116
|
-
|
|
115
|
+
var $ = E.ReactDebugCurrentFrame, I = $.getStackAddendum();
|
|
116
|
+
I !== "" && (w += "%s", y = y.concat([I]));
|
|
117
117
|
var z = y.map(function(R) {
|
|
118
118
|
return String(R);
|
|
119
119
|
});
|
|
120
|
-
z.unshift("Warning: " +
|
|
120
|
+
z.unshift("Warning: " + w), Function.prototype.apply.call(console[m], console, z);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var M = !1, C = !1,
|
|
123
|
+
var M = !1, C = !1, H = !1, Y = !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 U(m) {
|
|
126
|
+
return !!(typeof m == "string" || typeof m == "function" || m === r || m === c || x || m === i || m === u || m === l || Y || m === p || M || C || H || 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 v(m, w, y) {
|
|
133
133
|
var $ = m.displayName;
|
|
134
134
|
if ($)
|
|
135
135
|
return $;
|
|
136
|
-
var
|
|
137
|
-
return
|
|
136
|
+
var I = w.displayName || w.name || "";
|
|
137
|
+
return I !== "" ? y + "(" + I + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function G(m) {
|
|
140
140
|
return m.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function O(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 w = m;
|
|
167
|
+
return G(w) + ".Consumer";
|
|
168
168
|
case d:
|
|
169
169
|
var y = m;
|
|
170
|
-
return
|
|
170
|
+
return G(y._context) + ".Provider";
|
|
171
171
|
case a:
|
|
172
|
-
return
|
|
172
|
+
return v(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
174
|
var $ = m.displayName || null;
|
|
175
|
-
return $ !== null ? $ :
|
|
175
|
+
return $ !== null ? $ : O(m.type) || "Memo";
|
|
176
176
|
case h: {
|
|
177
|
-
var
|
|
177
|
+
var I = m, z = I._payload, R = I._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return O(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 B = Object.assign, W = 0, V, K, oe, ae, ie, le, re;
|
|
188
188
|
function P() {
|
|
189
189
|
}
|
|
190
190
|
P.__reactDisabledLog = !0;
|
|
191
191
|
function te() {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
194
|
-
|
|
193
|
+
if (W === 0) {
|
|
194
|
+
V = console.log, K = console.info, oe = console.warn, ae = console.error, ie = console.group, le = console.groupCollapsed, re = 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
|
+
W++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function ce() {
|
|
215
215
|
{
|
|
216
|
-
if (
|
|
216
|
+
if (W--, W === 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: B({}, m, {
|
|
224
|
+
value: V
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
227
|
-
value:
|
|
226
|
+
info: B({}, m, {
|
|
227
|
+
value: K
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
230
|
-
value: re
|
|
231
|
-
}),
|
|
232
|
-
error: O({}, m, {
|
|
229
|
+
warn: B({}, m, {
|
|
233
230
|
value: oe
|
|
234
231
|
}),
|
|
235
|
-
|
|
232
|
+
error: B({}, m, {
|
|
236
233
|
value: ae
|
|
237
234
|
}),
|
|
238
|
-
|
|
235
|
+
group: B({}, m, {
|
|
239
236
|
value: ie
|
|
240
237
|
}),
|
|
241
|
-
|
|
242
|
-
value:
|
|
238
|
+
groupCollapsed: B({}, m, {
|
|
239
|
+
value: le
|
|
240
|
+
}),
|
|
241
|
+
groupEnd: B({}, m, {
|
|
242
|
+
value: re
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
|
|
246
|
+
W < 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 ne = E.ReactCurrentDispatcher, F;
|
|
250
|
+
function J(m, w, y) {
|
|
251
251
|
{
|
|
252
|
-
if (
|
|
252
|
+
if (F === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
|
-
} catch (
|
|
256
|
-
var $ =
|
|
257
|
-
|
|
255
|
+
} catch (I) {
|
|
256
|
+
var $ = I.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
F = $ && $[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` +
|
|
260
|
+
` + F + m;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
|
-
var
|
|
263
|
+
var fe = !1, pe;
|
|
264
264
|
{
|
|
265
|
-
var
|
|
266
|
-
|
|
265
|
+
var ge = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
|
+
pe = new ge();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!m ||
|
|
268
|
+
function $e(m, w) {
|
|
269
|
+
if (!m || fe)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y =
|
|
272
|
+
var y = pe.get(m);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
276
|
var $;
|
|
277
|
-
|
|
278
|
-
var
|
|
277
|
+
fe = !0;
|
|
278
|
+
var I = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var z;
|
|
281
|
-
z =
|
|
281
|
+
z = ne.current, ne.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
283
|
+
if (w) {
|
|
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 (ve) {
|
|
295
|
+
$ = ve;
|
|
296
296
|
}
|
|
297
297
|
Reflect.construct(m, [], R);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
300
|
R.call();
|
|
301
|
-
} catch (
|
|
302
|
-
$ =
|
|
301
|
+
} catch (ve) {
|
|
302
|
+
$ = ve;
|
|
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 (ve) {
|
|
310
|
+
$ = ve;
|
|
311
311
|
}
|
|
312
312
|
m();
|
|
313
313
|
}
|
|
314
|
-
} catch (
|
|
315
|
-
if (
|
|
316
|
-
for (var D =
|
|
317
|
-
`),
|
|
318
|
-
`), q = D.length - 1, ee =
|
|
314
|
+
} catch (ve) {
|
|
315
|
+
if (ve && $ && typeof ve.stack == "string") {
|
|
316
|
+
for (var D = ve.stack.split(`
|
|
317
|
+
`), ue = $.stack.split(`
|
|
318
|
+
`), q = D.length - 1, ee = ue.length - 1; q >= 1 && ee >= 0 && D[q] !== ue[ee]; )
|
|
319
319
|
ee--;
|
|
320
320
|
for (; q >= 1 && ee >= 0; q--, ee--)
|
|
321
|
-
if (D[q] !==
|
|
321
|
+
if (D[q] !== ue[ee]) {
|
|
322
322
|
if (q !== 1 || ee !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (q--, ee--, ee < 0 || D[q] !==
|
|
325
|
-
var
|
|
324
|
+
if (q--, ee--, ee < 0 || D[q] !== ue[ee]) {
|
|
325
|
+
var _e = `
|
|
326
326
|
` + D[q].replace(" at new ", " at ");
|
|
327
|
-
return m.displayName &&
|
|
327
|
+
return m.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", m.displayName)), typeof m == "function" && pe.set(m, _e), _e;
|
|
328
328
|
}
|
|
329
329
|
while (q >= 1 && ee >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
|
|
334
|
+
fe = !1, ne.current = z, ce(), Error.prepareStackTrace = I;
|
|
335
335
|
}
|
|
336
|
-
var
|
|
337
|
-
return typeof m == "function" &&
|
|
336
|
+
var Ce = m ? m.displayName || m.name : "", nn = Ce ? J(Ce) : "";
|
|
337
|
+
return typeof m == "function" && pe.set(m, nn), nn;
|
|
338
338
|
}
|
|
339
|
-
function
|
|
340
|
-
return
|
|
339
|
+
function He(m, w, y) {
|
|
340
|
+
return $e(m, !1);
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
342
|
+
function Qe(m) {
|
|
343
|
+
var w = m.prototype;
|
|
344
|
+
return !!(w && w.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function Ue(m, w, y) {
|
|
347
347
|
if (m == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof m == "function")
|
|
350
|
-
return
|
|
350
|
+
return $e(m, Qe(m));
|
|
351
351
|
if (typeof m == "string")
|
|
352
|
-
return
|
|
352
|
+
return J(m);
|
|
353
353
|
switch (m) {
|
|
354
354
|
case u:
|
|
355
|
-
return
|
|
355
|
+
return J("Suspense");
|
|
356
356
|
case l:
|
|
357
|
-
return
|
|
357
|
+
return J("SuspenseList");
|
|
358
358
|
}
|
|
359
359
|
if (typeof m == "object")
|
|
360
360
|
switch (m.$$typeof) {
|
|
361
361
|
case a:
|
|
362
|
-
return
|
|
362
|
+
return He(m.render);
|
|
363
363
|
case f:
|
|
364
|
-
return
|
|
364
|
+
return Ue(m.type, w, y);
|
|
365
365
|
case h: {
|
|
366
|
-
var $ = m,
|
|
366
|
+
var $ = m, I = $._payload, z = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return
|
|
368
|
+
return Ue(z(I), w, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var
|
|
376
|
-
function
|
|
375
|
+
var We = Object.prototype.hasOwnProperty, Wt = {}, zt = E.ReactDebugCurrentFrame;
|
|
376
|
+
function ze(m) {
|
|
377
377
|
if (m) {
|
|
378
|
-
var
|
|
379
|
-
|
|
378
|
+
var w = m._owner, y = Ue(m.type, m._source, w ? w.type : null);
|
|
379
|
+
zt.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
zt.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(m,
|
|
383
|
+
function On(m, w, y, $, I) {
|
|
384
384
|
{
|
|
385
|
-
var z = Function.call.bind(
|
|
385
|
+
var z = Function.call.bind(We);
|
|
386
386
|
for (var R in m)
|
|
387
387
|
if (z(m, R)) {
|
|
388
388
|
var D = void 0;
|
|
389
389
|
try {
|
|
390
390
|
if (typeof m[R] != "function") {
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
391
|
+
var ue = 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 ue.name = "Invariant Violation", ue;
|
|
393
393
|
}
|
|
394
|
-
D = m[R](
|
|
394
|
+
D = m[R](w, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (q) {
|
|
396
396
|
D = q;
|
|
397
397
|
}
|
|
398
|
-
D && !(D instanceof Error) && (
|
|
398
|
+
D && !(D instanceof Error) && (ze(I), 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 D), ze(null)), D instanceof Error && !(D.message in Wt) && (Wt[D.message] = !0, ze(I), k("Failed %s type: %s", y, D.message), ze(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Bn = Array.isArray;
|
|
403
|
-
function
|
|
403
|
+
function mt(m) {
|
|
404
404
|
return Bn(m);
|
|
405
405
|
}
|
|
406
406
|
function In(m) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var w = typeof Symbol == "function" && Symbol.toStringTag, y = w && 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 Vt(m), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Vt(m) {
|
|
420
420
|
return "" + m;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function Yt(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)), Vt(m);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var Re = E.ReactCurrentOwner, Qn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
431
|
+
}, Gt, Jt, ft;
|
|
432
|
+
ft = {};
|
|
433
433
|
function Un(m) {
|
|
434
|
-
if (
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
434
|
+
if (We.call(m, "ref")) {
|
|
435
|
+
var w = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
|
+
if (w && w.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 Wn(m) {
|
|
442
|
+
if (We.call(m, "key")) {
|
|
443
|
+
var w = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
|
+
if (w && w.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 zn(m, w) {
|
|
450
|
+
if (typeof m.ref == "string" && Re.current && w && Re.current.stateNode !== w) {
|
|
451
|
+
var y = O(Re.current.type);
|
|
452
|
+
ft[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', O(Re.current.type), m.ref), ft[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function Vn(m,
|
|
455
|
+
function Vn(m, w) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Gt || (Gt = !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)", w));
|
|
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, w) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Jt || (Jt = !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)", w));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,13 +474,13 @@ function ys() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Gn = function(m,
|
|
477
|
+
var Gn = function(m, w, y, $, I, z, R) {
|
|
478
478
|
var D = {
|
|
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: w,
|
|
484
484
|
ref: y,
|
|
485
485
|
props: R,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
@@ -500,44 +500,44 @@ function ys() {
|
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
502
502
|
writable: !1,
|
|
503
|
-
value:
|
|
503
|
+
value: I
|
|
504
504
|
}), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D;
|
|
505
505
|
};
|
|
506
|
-
function Jn(m,
|
|
506
|
+
function Jn(m, w, y, $, I) {
|
|
507
507
|
{
|
|
508
|
-
var z, R = {}, D = null,
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (z in
|
|
511
|
-
|
|
508
|
+
var z, R = {}, D = null, ue = null;
|
|
509
|
+
y !== void 0 && (Yt(y), D = "" + y), Wn(w) && (Yt(w.key), D = "" + w.key), Un(w) && (ue = w.ref, zn(w, I));
|
|
510
|
+
for (z in w)
|
|
511
|
+
We.call(w, z) && !Qn.hasOwnProperty(z) && (R[z] = w[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 (D ||
|
|
517
|
+
if (D || ue) {
|
|
518
518
|
var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
-
D && Vn(R, ee),
|
|
519
|
+
D && Vn(R, ee), ue && Yn(R, ee);
|
|
520
520
|
}
|
|
521
|
-
return Gn(m, D,
|
|
521
|
+
return Gn(m, D, ue, I, $, Re.current, R);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function
|
|
524
|
+
var ht = E.ReactCurrentOwner, Xt = E.ReactDebugCurrentFrame;
|
|
525
|
+
function Me(m) {
|
|
526
526
|
if (m) {
|
|
527
|
-
var
|
|
528
|
-
|
|
527
|
+
var w = m._owner, y = Ue(m.type, m._source, w ? w.type : null);
|
|
528
|
+
Xt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
Xt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var pt;
|
|
533
|
+
pt = !1;
|
|
534
|
+
function gt(m) {
|
|
535
535
|
return typeof m == "object" && m !== null && m.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Zt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var m =
|
|
539
|
+
if (ht.current) {
|
|
540
|
+
var m = O(ht.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 w = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + w + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
560
|
+
var Kt = {};
|
|
561
561
|
function Zn(m) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var w = Zt();
|
|
564
|
+
if (!w) {
|
|
565
565
|
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (w = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return w;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function qt(m, w) {
|
|
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(w);
|
|
579
|
+
if (Kt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
581
|
+
Kt[y] = !0;
|
|
582
582
|
var $ = "";
|
|
583
|
-
m && m._owner && m._owner !==
|
|
583
|
+
m && m._owner && m._owner !== ht.current && ($ = " It was passed a child from " + O(m._owner.type) + "."), Me(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, $), Me(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function en(m, w) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
590
|
+
if (mt(m))
|
|
591
591
|
for (var y = 0; y < m.length; y++) {
|
|
592
592
|
var $ = m[y];
|
|
593
|
-
|
|
593
|
+
gt($) && qt($, w);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (gt(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 I = g(m);
|
|
599
|
+
if (typeof I == "function" && I !== m.entries)
|
|
600
|
+
for (var z = I.call(m), R; !(R = z.next()).done; )
|
|
601
|
+
gt(R.value) && qt(R.value, w);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Kn(m) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var w = m.type;
|
|
608
|
+
if (w == null || typeof w == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof w == "function")
|
|
612
|
+
y = w.propTypes;
|
|
613
|
+
else if (typeof w == "object" && (w.$$typeof === a || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
w.$$typeof === f))
|
|
616
|
+
y = w.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var $ =
|
|
620
|
+
var $ = O(w);
|
|
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 (w.PropTypes !== void 0 && !pt) {
|
|
623
|
+
pt = !0;
|
|
624
|
+
var I = O(w);
|
|
625
|
+
k("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", I || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof w.getDefaultProps == "function" && !w.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 w = Object.keys(m.props), y = 0; y < w.length; y++) {
|
|
633
|
+
var $ = w[y];
|
|
634
634
|
if ($ !== "children" && $ !== "key") {
|
|
635
|
-
|
|
635
|
+
Me(m), k("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), Me(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
m.ref !== null && (
|
|
639
|
+
m.ref !== null && (Me(m), k("Invalid attribute `ref` supplied to `React.Fragment`."), Me(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function tn(m, w, y, $, I, z) {
|
|
643
643
|
{
|
|
644
|
-
var R =
|
|
644
|
+
var R = U(m);
|
|
645
645
|
if (!R) {
|
|
646
646
|
var D = "";
|
|
647
647
|
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (D += " 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
|
|
649
|
-
|
|
648
|
+
var ue = Xn(I);
|
|
649
|
+
ue ? D += ue : D += Zt();
|
|
650
650
|
var q;
|
|
651
|
-
m === null ? q = "null" :
|
|
651
|
+
m === null ? q = "null" : mt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (O(m.type) || "Unknown") + " />", D = " 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, D);
|
|
652
652
|
}
|
|
653
|
-
var ee = Jn(m,
|
|
653
|
+
var ee = Jn(m, w, y, I, z);
|
|
654
654
|
if (ee == null)
|
|
655
655
|
return ee;
|
|
656
656
|
if (R) {
|
|
657
|
-
var
|
|
658
|
-
if (
|
|
657
|
+
var _e = w.children;
|
|
658
|
+
if (_e !== void 0)
|
|
659
659
|
if ($)
|
|
660
|
-
if (
|
|
661
|
-
for (var
|
|
662
|
-
|
|
663
|
-
Object.freeze && Object.freeze(
|
|
660
|
+
if (mt(_e)) {
|
|
661
|
+
for (var Ce = 0; Ce < _e.length; Ce++)
|
|
662
|
+
en(_e[Ce], m);
|
|
663
|
+
Object.freeze && Object.freeze(_e);
|
|
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
|
+
en(_e, 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, w, y) {
|
|
673
|
+
return tn(m, w, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function ts(m,
|
|
676
|
-
return
|
|
675
|
+
function ts(m, w, y) {
|
|
676
|
+
return tn(m, w, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var ns = ts, ss = es;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Le.Fragment = r, Le.jsx = ns, Le.jsxs = ss;
|
|
680
|
+
}()), Le;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var s =
|
|
682
|
+
process.env.NODE_ENV === "production" ? At.exports = js() : At.exports = ys();
|
|
683
|
+
var s = At.exports;
|
|
684
684
|
const Es = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = L(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
687
687
|
t(r);
|
|
688
688
|
};
|
|
689
|
-
return
|
|
689
|
+
return Z(() => (window.addEventListener("popstate", n), () => {
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
|
-
},
|
|
693
|
-
const n =
|
|
694
|
-
|
|
692
|
+
}, Ne = (e, t) => {
|
|
693
|
+
const n = se(!1);
|
|
694
|
+
Z(() => {
|
|
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 = se(null), c = se(0), d = se(null), o = se([]), a = se(), u = se(), l = se(e), f = se(!0);
|
|
700
|
+
Z(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
|
+
Z(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
711
711
|
};
|
|
712
712
|
}, []);
|
|
713
|
-
var E =
|
|
713
|
+
var E = nt(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, U = a.current;
|
|
716
|
+
return o.current = a.current = null, c.current = x, u.current = l.current.apply(U, 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,52 +723,52 @@ 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
|
+
}, H = 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 U = t - (b - i.current), v = j ? Math.min(U, g - (b - c.current)) : U;
|
|
732
|
+
T(x, v);
|
|
733
733
|
}
|
|
734
|
-
},
|
|
734
|
+
}, Y = 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(H, t), p ? k(i.current) : u.current;
|
|
739
739
|
if (j)
|
|
740
|
-
return T(
|
|
740
|
+
return T(H, t), k(i.current);
|
|
741
741
|
}
|
|
742
|
-
return d.current || T(
|
|
742
|
+
return d.current || T(H, t), u.current;
|
|
743
743
|
};
|
|
744
|
-
return
|
|
744
|
+
return Y.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
|
+
}, Y.isPending = function() {
|
|
747
747
|
return !!d.current;
|
|
748
|
-
},
|
|
748
|
+
}, Y.flush = function() {
|
|
749
749
|
return d.current ? C(Date.now()) : u.current;
|
|
750
|
-
},
|
|
750
|
+
}, Y;
|
|
751
751
|
}, [p, j, t, g, _, h]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
754
|
+
function bn(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 _t;
|
|
759
|
+
const at = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [n, r] = N.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
|
|
765
|
-
clearTimeout(
|
|
764
|
+
Z(() => (c(), window.addEventListener("resize", d), () => {
|
|
765
|
+
clearTimeout(_t), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), []);
|
|
767
767
|
const i = () => window.innerWidth, c = () => {
|
|
768
768
|
r(i());
|
|
769
|
-
}, d =
|
|
769
|
+
}, d = bn(
|
|
770
770
|
() => {
|
|
771
|
-
i() !== n && (t && (clearTimeout(
|
|
771
|
+
i() !== n && (t && (clearTimeout(_t), document.body.classList.add("is-resizing"), _t = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
773
|
}, 550)), c());
|
|
774
774
|
},
|
|
@@ -790,7 +790,7 @@ const rt = (e = !0, t = !1) => {
|
|
|
790
790
|
const [i, c] = N.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
791
|
}], [d, o] = N.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
|
-
|
|
793
|
+
Z(() => (a(), window.addEventListener("scroll", u), () => {
|
|
794
794
|
u.flush(), window.removeEventListener("scroll", u);
|
|
795
795
|
}), []);
|
|
796
796
|
const a = () => {
|
|
@@ -800,14 +800,14 @@ const rt = (e = !0, t = !1) => {
|
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
802
|
Math.abs(h) >= t.up && !d.scrollUp && (r(), o({ scrollUp: !0, scrollDown: !1 }));
|
|
803
|
-
}, u =
|
|
803
|
+
}, u = bn(() => {
|
|
804
804
|
a();
|
|
805
805
|
}, 250);
|
|
806
806
|
return i;
|
|
807
807
|
}, mo = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
810
|
-
|
|
809
|
+
const n = se(!1);
|
|
810
|
+
Ne(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
813
813
|
return;
|
|
@@ -821,13 +821,13 @@ const rt = (e = !0, t = !1) => {
|
|
|
821
821
|
return t.forEach(({ type: r, value: i }) => {
|
|
822
822
|
is(n, r, i);
|
|
823
823
|
}), n;
|
|
824
|
-
},
|
|
824
|
+
}, vn = (e) => {
|
|
825
825
|
const t = [];
|
|
826
826
|
return e.forEach((n) => {
|
|
827
827
|
const r = parseInt(n);
|
|
828
828
|
isNaN(r) || t.push(r);
|
|
829
829
|
}), t.sort((n, r) => n - r);
|
|
830
|
-
},
|
|
830
|
+
}, wn = (e, t, n) => {
|
|
831
831
|
let r = n.mobile;
|
|
832
832
|
for (const i in t) {
|
|
833
833
|
const c = parseInt(String(t[i]));
|
|
@@ -856,7 +856,7 @@ const rt = (e = !0, t = !1) => {
|
|
|
856
856
|
return { path: "days", number: o };
|
|
857
857
|
const a = Math.floor(o / 7);
|
|
858
858
|
return a <= 52 ? { path: "weeks", number: a } : { path: "years", number: Math.floor(o / 365) };
|
|
859
|
-
}, Ds = (e) => new Promise((t) => setTimeout(t, e)),
|
|
859
|
+
}, Ds = (e) => new Promise((t) => setTimeout(t, e)), Bt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1160,13 +1160,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1160
1160
|
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
1161
|
}, Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1163
|
+
en: Bt,
|
|
1164
1164
|
es: Ns,
|
|
1165
1165
|
fr: As,
|
|
1166
1166
|
pt: Ps
|
|
1167
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1167
|
+
}, Symbol.toStringTag, { value: "Module" })), xe = (e, t, n, r, i = {}) => {
|
|
1168
1168
|
let c = "";
|
|
1169
|
-
return `${t}_${n}` in
|
|
1169
|
+
return `${t}_${n}` in Bt ? c = e({ id: `${t}_${n}` }, i) : c = e({ id: t }, { [r]: n, ...i }), c;
|
|
1170
1170
|
}, Fs = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
@@ -1181,9 +1181,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
return r;
|
|
1184
|
-
},
|
|
1184
|
+
}, kn = (e, t) => N.Children.map(e, (n) => N.cloneElement(n, {
|
|
1185
1185
|
...t
|
|
1186
|
-
})), Ls = (e) => e.replace(/\s+/g, "").length > 0,
|
|
1186
|
+
})), Ls = (e) => e.replace(/\s+/g, "").length > 0, X = ({
|
|
1187
1187
|
variant: e = "primary",
|
|
1188
1188
|
size: t = "medium",
|
|
1189
1189
|
styling: n = { muted: !1, fullWidth: !1 },
|
|
@@ -1197,10 +1197,10 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1197
1197
|
children: l = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const p =
|
|
1200
|
+
const p = at(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof p == "number") {
|
|
1202
|
-
const g = Object.assign({}, t), E =
|
|
1203
|
-
t =
|
|
1202
|
+
const g = Object.assign({}, t), E = vn(Object.keys(g));
|
|
1203
|
+
t = wn(p, E, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
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");
|
|
@@ -1219,16 +1219,16 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1219
1219
|
return i && (c = "a", j.href = i), N.createElement(
|
|
1220
1220
|
c,
|
|
1221
1221
|
j,
|
|
1222
|
-
l || (u ? /* @__PURE__ */ s.jsx(
|
|
1222
|
+
l || (u ? /* @__PURE__ */ s.jsx(de, { showOnFocus: !1, children: u }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(
|
|
1224
|
+
}, it = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
+
const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(X, { ...c }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(X, { ...c }) }, d));
|
|
1226
1226
|
return N.createElement(r, { className: S("button-wrapper", t), ...n, children: i });
|
|
1227
1227
|
};
|
|
1228
|
-
const
|
|
1228
|
+
const Ae = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
1229
1229
|
const n = t ? { "--max-width": `${t / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ s.jsx("hr", { className: S(e, { "has-max-width": t }), style: n });
|
|
1231
|
-
},
|
|
1231
|
+
}, lt = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
@@ -1251,7 +1251,7 @@ const De = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
1253
|
return n ? N.createElement(n, { children: t, className: r, ...o }) : t;
|
|
1254
|
-
},
|
|
1254
|
+
}, on = {
|
|
1255
1255
|
card: {
|
|
1256
1256
|
range: [
|
|
1257
1257
|
{
|
|
@@ -1359,12 +1359,12 @@ const De = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1359
1359
|
range: t,
|
|
1360
1360
|
sizes: n
|
|
1361
1361
|
}) => {
|
|
1362
|
-
const { range: r, sizes: i } = e ?
|
|
1362
|
+
const { range: r, sizes: i } = e ? on[e] : on.fallback;
|
|
1363
1363
|
return { range: t && t.length > 0 ? t : r, sizes: n || i };
|
|
1364
1364
|
}, Bs = ({ format: e, height: t, query: n, width: r }) => {
|
|
1365
1365
|
let i = `w=${r}&h=${t}`;
|
|
1366
1366
|
return i = e ? `${i}&fm=${e}` : i, i = n ? `${i}&${n}` : i, i;
|
|
1367
|
-
},
|
|
1367
|
+
}, xt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: i, width: c }) => `${n}?${Bs({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: i,
|
|
1370
1370
|
query: r,
|
|
@@ -1381,7 +1381,7 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1381
|
loading: u,
|
|
1382
1382
|
decoding: l,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: h, sizes: p } = Os(e), _ =
|
|
1384
|
+
} = e, { range: h, sizes: p } = Os(e), _ = xt({ format: "avif", query: d, range: h, url: o }), j = xt({ format: "webp", query: d, range: h, url: o }), g = xt({ format: "", query: d, range: h, url: o });
|
|
1385
1385
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
c !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1418,10 +1418,10 @@ const Is = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1421
|
+
let Oe = !1;
|
|
1422
1422
|
const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const r = A(), i =
|
|
1424
|
-
|
|
1423
|
+
const r = A(), i = se(null), [c, d] = L("hidden");
|
|
1424
|
+
Z(() => {
|
|
1425
1425
|
const a = i.current;
|
|
1426
1426
|
if (a)
|
|
1427
1427
|
return a.addEventListener("transitionend", o), () => {
|
|
@@ -1429,17 +1429,17 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const o = ({ propertyName: a }) => {
|
|
1432
|
-
a === "opacity" && (
|
|
1432
|
+
a === "opacity" && (Oe !== !1 && clearTimeout(Oe), d((u) => u === "opening" ? "open" : u === "closing" ? "closed" : u === "closed" ? "hidden" : u));
|
|
1433
1433
|
};
|
|
1434
|
-
return
|
|
1435
|
-
|
|
1434
|
+
return Ne(() => {
|
|
1435
|
+
Oe !== !1 && clearTimeout(Oe);
|
|
1436
1436
|
let a = "open";
|
|
1437
|
-
e ? d("opening") : (d("closing"), a = "hidden"),
|
|
1437
|
+
e ? d("opening") : (d("closing"), a = "hidden"), Oe = setTimeout(() => {
|
|
1438
1438
|
d(a);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [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
1441
|
};
|
|
1442
|
-
const
|
|
1442
|
+
const jn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: S("full-width-section", t), ...n, children: e });
|
|
1443
1443
|
const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const r = [];
|
|
1445
1445
|
return t.forEach((i) => {
|
|
@@ -1453,9 +1453,9 @@ const fo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1453
1453
|
target: "_blank",
|
|
1454
1454
|
children: i.text
|
|
1455
1455
|
});
|
|
1456
|
-
}), /* @__PURE__ */ s.jsx(
|
|
1456
|
+
}), /* @__PURE__ */ s.jsx(jn, { className: S("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1457
1457
|
N.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
-
/* @__PURE__ */ s.jsx(
|
|
1458
|
+
/* @__PURE__ */ s.jsx(it, { buttons: r })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
1461
|
const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
@@ -1552,7 +1552,7 @@ const Qs = [
|
|
|
1552
1552
|
const f = document.getElementById(c.link.substring(1));
|
|
1553
1553
|
f && f.scrollIntoView({ behavior: "smooth" });
|
|
1554
1554
|
}), /* @__PURE__ */ s.jsx(
|
|
1555
|
-
|
|
1555
|
+
jn,
|
|
1556
1556
|
{
|
|
1557
1557
|
className: S("banner-section", r, i, e, {
|
|
1558
1558
|
"has-image": n,
|
|
@@ -1573,7 +1573,7 @@ const Qs = [
|
|
|
1573
1573
|
}),
|
|
1574
1574
|
d,
|
|
1575
1575
|
c && c.text && c.link && /* @__PURE__ */ s.jsx(
|
|
1576
|
-
|
|
1576
|
+
X,
|
|
1577
1577
|
{
|
|
1578
1578
|
variant: n || r === "light" ? "primary" : "secondary",
|
|
1579
1579
|
size: { mobile: "medium", 768: "large" },
|
|
@@ -1587,7 +1587,7 @@ const Qs = [
|
|
|
1587
1587
|
] })
|
|
1588
1588
|
}
|
|
1589
1589
|
);
|
|
1590
|
-
}, po =
|
|
1590
|
+
}, po = Pe(Us);
|
|
1591
1591
|
const go = ({
|
|
1592
1592
|
variant: e = "primary",
|
|
1593
1593
|
button: t = null,
|
|
@@ -1597,8 +1597,8 @@ const go = ({
|
|
|
1597
1597
|
}) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: S("marketing-block", e), children: [
|
|
1598
1598
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1599
1599
|
r && /* @__PURE__ */ s.jsx("p", { children: r }),
|
|
1600
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1601
|
-
] }),
|
|
1600
|
+
t && /* @__PURE__ */ s.jsx(X, { 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 })
|
|
1601
|
+
] }), Pt = "https://storage.googleapis.com/apolitical-assets/", Be = {
|
|
1602
1602
|
general: "hello@apolitical.co",
|
|
1603
1603
|
support: "concierge@apolitical.co",
|
|
1604
1604
|
"data-protection": {
|
|
@@ -1606,26 +1606,26 @@ const go = ({
|
|
|
1606
1606
|
eu: "dpo.agl@apolitical.foundation"
|
|
1607
1607
|
}
|
|
1608
1608
|
}, _o = "200,000+";
|
|
1609
|
-
const
|
|
1609
|
+
const yn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1610
1610
|
const r = A();
|
|
1611
1611
|
return /* @__PURE__ */ s.jsxs("details", { className: S("collapsible-section", t), children: [
|
|
1612
1612
|
/* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1613
1613
|
/* @__PURE__ */ s.jsx("div", { className: "content", children: n })
|
|
1614
1614
|
] });
|
|
1615
1615
|
};
|
|
1616
|
-
const
|
|
1617
|
-
const
|
|
1616
|
+
const Se = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: S("highlighted-text-box", e, t), ...r, children: n });
|
|
1617
|
+
const ct = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r = "" }) => {
|
|
1618
1618
|
let i = n && !!Object.keys(n).length;
|
|
1619
|
-
const c = typeof n == "object" && "breakpoints" in n, d =
|
|
1619
|
+
const c = typeof n == "object" && "breakpoints" in n, d = at(c);
|
|
1620
1620
|
if (c && typeof n == "object" && typeof d == "number") {
|
|
1621
|
-
const f = Object.assign({}, n.breakpoints), h =
|
|
1622
|
-
i =
|
|
1621
|
+
const f = Object.assign({}, n.breakpoints), h = vn(Object.keys(f));
|
|
1622
|
+
i = wn(d, h, f);
|
|
1623
1623
|
}
|
|
1624
1624
|
const { breakpoints: o, text: a = "", component: u, ...l } = n;
|
|
1625
|
-
return /* @__PURE__ */ s.jsx(
|
|
1626
|
-
t && /* @__PURE__ */ s.jsx(
|
|
1625
|
+
return /* @__PURE__ */ s.jsx(Se, { variant: "subtle", className: S("empty-state-box", e, r), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1626
|
+
t && /* @__PURE__ */ s.jsx(rt, { options: { forceBlock: !0 }, children: t }),
|
|
1627
1627
|
i && typeof n == "object" && (u || /* @__PURE__ */ s.jsx(
|
|
1628
|
-
|
|
1628
|
+
X,
|
|
1629
1629
|
{
|
|
1630
1630
|
...l,
|
|
1631
1631
|
variant: n.variant ? n.variant : "secondary",
|
|
@@ -1634,39 +1634,39 @@ const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r =
|
|
|
1634
1634
|
))
|
|
1635
1635
|
] }) });
|
|
1636
1636
|
};
|
|
1637
|
-
const
|
|
1637
|
+
const Rt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), En = { q: Rt, blockquote: Rt };
|
|
1638
1638
|
for (let e = 1; e <= 6; e++)
|
|
1639
|
-
|
|
1640
|
-
const
|
|
1639
|
+
En[`h${e}`] = { component: Rt, props: { className: "title" } };
|
|
1640
|
+
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
1641
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1642
1642
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
1643
|
-
|
|
1643
|
+
rt,
|
|
1644
1644
|
{
|
|
1645
1645
|
options: {
|
|
1646
1646
|
wrapper: N.Fragment,
|
|
1647
1647
|
forceBlock: !0,
|
|
1648
|
-
overrides:
|
|
1648
|
+
overrides: En
|
|
1649
1649
|
},
|
|
1650
1650
|
children: r
|
|
1651
1651
|
}
|
|
1652
1652
|
) : /* @__PURE__ */ s.jsx("p", { children: r })
|
|
1653
1653
|
] });
|
|
1654
1654
|
const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children: i }) => {
|
|
1655
|
-
const c = A(), d =
|
|
1656
|
-
|
|
1655
|
+
const c = A(), d = se(null), [o, a] = L(""), [u, l] = L("closed");
|
|
1656
|
+
Z(() => {
|
|
1657
1657
|
const p = d.current;
|
|
1658
1658
|
if (p)
|
|
1659
1659
|
return p.addEventListener("transitionend", f), () => {
|
|
1660
1660
|
p.removeEventListener("transitionend", f);
|
|
1661
1661
|
};
|
|
1662
|
-
}, []),
|
|
1662
|
+
}, []), Z(() => {
|
|
1663
1663
|
if (!r || typeof r != "string")
|
|
1664
1664
|
return;
|
|
1665
1665
|
const p = r.split(`
|
|
1666
1666
|
`);
|
|
1667
1667
|
a(p.length < 3 ? `${r.substring(0, 400)}...` : p.slice(0, 3).join(`
|
|
1668
1668
|
`));
|
|
1669
|
-
}, [r]),
|
|
1669
|
+
}, [r]), Z(() => {
|
|
1670
1670
|
u === "ready-to-close" && l("closing");
|
|
1671
1671
|
}, [u]);
|
|
1672
1672
|
const f = ({ propertyName: p }) => {
|
|
@@ -1675,13 +1675,13 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1675
1675
|
if (!r)
|
|
1676
1676
|
return null;
|
|
1677
1677
|
const h = ["opening", "open"].includes(u);
|
|
1678
|
-
return /* @__PURE__ */ s.jsxs(
|
|
1678
|
+
return /* @__PURE__ */ s.jsxs(Se, { variant: "subtle", className: S("hide-show-text-box", e), children: [
|
|
1679
1679
|
/* @__PURE__ */ s.jsxs("div", { ref: d, className: S("content", u), children: [
|
|
1680
|
-
/* @__PURE__ */ s.jsx(
|
|
1680
|
+
/* @__PURE__ */ s.jsx(rt, { options: { forceBlock: !0 }, children: u === "closed" ? o : r }),
|
|
1681
1681
|
u !== "closed" && i
|
|
1682
1682
|
] }),
|
|
1683
1683
|
/* @__PURE__ */ s.jsx("p", { className: "cta", children: /* @__PURE__ */ s.jsx(
|
|
1684
|
-
|
|
1684
|
+
X,
|
|
1685
1685
|
{
|
|
1686
1686
|
variant: "tertiary",
|
|
1687
1687
|
icon: { icon: "navigation_arrow", position: "left", animate: !0 },
|
|
@@ -1694,17 +1694,17 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1694
1694
|
}
|
|
1695
1695
|
) })
|
|
1696
1696
|
] });
|
|
1697
|
-
},
|
|
1697
|
+
}, zs = () => N.Fragment, Vs = ({ children: e }) => /* @__PURE__ */ s.jsx(Se, { variant: "secondary", children: e }), Ys = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Gs = ({ children: e }) => {
|
|
1698
1698
|
const t = A();
|
|
1699
1699
|
if (!e)
|
|
1700
1700
|
return null;
|
|
1701
1701
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1702
1702
|
const r = [];
|
|
1703
|
-
for (const c of
|
|
1703
|
+
for (const c of Dt.toArray(e))
|
|
1704
1704
|
if (!(!c || typeof c == "string" || typeof c == "number"))
|
|
1705
1705
|
if (N.isValidElement(c) && c.type === "summary") {
|
|
1706
1706
|
if (c.props && c.props.children) {
|
|
1707
|
-
for (const d of
|
|
1707
|
+
for (const d of Dt.toArray(c.props.children))
|
|
1708
1708
|
if (!(!d || typeof d == "string" || typeof d == "number") && N.isValidElement(d)) {
|
|
1709
1709
|
const o = d.type;
|
|
1710
1710
|
if (Ys.includes(o)) {
|
|
@@ -1718,7 +1718,7 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1718
1718
|
r.push(c);
|
|
1719
1719
|
const i = n ? n.toString() : "";
|
|
1720
1720
|
return /* @__PURE__ */ s.jsx(
|
|
1721
|
-
|
|
1721
|
+
yn,
|
|
1722
1722
|
{
|
|
1723
1723
|
label: i,
|
|
1724
1724
|
className: ["Sources", "Resources"].includes(i) ? "discrete-links" : "",
|
|
@@ -1729,12 +1729,12 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1729
1729
|
if (t.class)
|
|
1730
1730
|
switch (t.class) {
|
|
1731
1731
|
case "casestudy":
|
|
1732
|
-
return /* @__PURE__ */ s.jsx(
|
|
1732
|
+
return /* @__PURE__ */ s.jsx(Se, { variant: "secondary", children: e });
|
|
1733
1733
|
case "general-textbox":
|
|
1734
1734
|
case "highlight-box":
|
|
1735
|
-
return /* @__PURE__ */ s.jsx(
|
|
1735
|
+
return /* @__PURE__ */ s.jsx(Se, { variant: "primary", children: e });
|
|
1736
1736
|
case "pink-textbox":
|
|
1737
|
-
return /* @__PURE__ */ s.jsx(
|
|
1737
|
+
return /* @__PURE__ */ s.jsx(Se, { variant: "tertiary", children: e });
|
|
1738
1738
|
default:
|
|
1739
1739
|
return /* @__PURE__ */ s.jsx("div", { ...t, children: e });
|
|
1740
1740
|
}
|
|
@@ -1744,30 +1744,30 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1744
1744
|
let r = "default";
|
|
1745
1745
|
const i = e.src;
|
|
1746
1746
|
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(
|
|
1747
|
+
/* @__PURE__ */ s.jsx(de, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
|
|
1748
1748
|
/* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
|
|
1749
1749
|
/* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1750
1750
|
] });
|
|
1751
|
-
},
|
|
1751
|
+
}, an = (e) => {
|
|
1752
1752
|
let t = "";
|
|
1753
1753
|
return e && typeof e != "string" && typeof e != "number" && typeof e != "boolean" && "type" in e && (t = e.type), t;
|
|
1754
1754
|
}, Zs = ({ children: e, ...t }) => {
|
|
1755
1755
|
let n = { ...t };
|
|
1756
1756
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1757
1757
|
let r = e, i = !1;
|
|
1758
|
-
for (const c of
|
|
1758
|
+
for (const c of Dt.toArray(e))
|
|
1759
1759
|
if (!(!c || typeof c == "string" || typeof c == "number") && N.isValidElement(c)) {
|
|
1760
1760
|
const d = c.type;
|
|
1761
1761
|
if (["button", "center", "span", "strong"].includes(d) && c.props && c.props.children && c.props.children[0])
|
|
1762
|
-
for ((d === "button" ||
|
|
1762
|
+
for ((d === "button" || an(c.props.children[0]) === "button") && (i = !0), r = c.props.children[0]; r && typeof r != "string" && !(typeof r == "boolean" || typeof r == "number" || !N.isValidElement(r)); )
|
|
1763
1763
|
if (r.props && r.props.children && r.props.children[0])
|
|
1764
|
-
r = r.props.children[0], r &&
|
|
1764
|
+
r = r.props.children[0], r && an(r) === "button" && (i = !0);
|
|
1765
1765
|
else
|
|
1766
1766
|
break;
|
|
1767
1767
|
}
|
|
1768
|
-
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(
|
|
1768
|
+
return i ? (n = { ...n, className: "button primary medium" }, /* @__PURE__ */ s.jsx("p", { className: "center", children: /* @__PURE__ */ s.jsx(X, { variant: "primary", size: "medium", ...n, children: r }) })) : /* @__PURE__ */ s.jsx("a", { ...n, children: r });
|
|
1769
1769
|
}, Ks = ({ children: e }) => /* @__PURE__ */ s.jsx("span", { children: e });
|
|
1770
|
-
const
|
|
1770
|
+
const ln = ({ className: e = "", options: t = {}, children: n }) => {
|
|
1771
1771
|
n = n.replace(/^<br\/?>/, "");
|
|
1772
1772
|
const r = {
|
|
1773
1773
|
wrapper: N.Fragment,
|
|
@@ -1776,39 +1776,39 @@ const on = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1776
1776
|
a: Zs,
|
|
1777
1777
|
// Override psuedo-code
|
|
1778
1778
|
// We give the content team psuedo-code short cuts to use in Contentful
|
|
1779
|
-
CollapsibleSection:
|
|
1780
|
-
TextBox:
|
|
1779
|
+
CollapsibleSection: yn,
|
|
1780
|
+
TextBox: Se,
|
|
1781
1781
|
CaseStudy: Vs,
|
|
1782
1782
|
// Override embedded HTML
|
|
1783
1783
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
1784
|
-
style:
|
|
1784
|
+
style: zs,
|
|
1785
1785
|
details: Gs,
|
|
1786
1786
|
div: Js,
|
|
1787
1787
|
iframe: Xs
|
|
1788
1788
|
}
|
|
1789
1789
|
};
|
|
1790
|
-
return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(
|
|
1790
|
+
return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(rt, { options: { ...r, ...t }, children: n }) });
|
|
1791
1791
|
};
|
|
1792
1792
|
const qs = ({ size: e = "medium", variant: t = "default", className: n = "", children: r }) => /* @__PURE__ */ s.jsx("span", { className: S("pill", e, t, n), children: r });
|
|
1793
|
-
const
|
|
1793
|
+
const Ft = ({ element: e = "p", children: t = null, className: n = "", ...r }) => N.createElement(e, { ...r, className: S("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1794
1794
|
const er = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1795
1795
|
const r = A(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
|
|
1796
|
-
return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(
|
|
1797
|
-
}, tr =
|
|
1798
|
-
const
|
|
1796
|
+
return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(de, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1797
|
+
}, tr = Pe(er);
|
|
1798
|
+
const bt = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1799
1799
|
const r = A();
|
|
1800
1800
|
t || (t = {
|
|
1801
|
-
0: { text: r.formatMessage({ id: `${
|
|
1802
|
-
75: { text: r.formatMessage({ id: `${
|
|
1803
|
-
100: { text: r.formatMessage({ id: `${
|
|
1801
|
+
0: { text: r.formatMessage({ id: `${bt}loading` }) },
|
|
1802
|
+
75: { text: r.formatMessage({ id: `${bt}almostDone` }) },
|
|
1803
|
+
100: { text: r.formatMessage({ id: `${bt}complete` }) }
|
|
1804
1804
|
});
|
|
1805
1805
|
let i = null;
|
|
1806
1806
|
const c = Object.keys(t);
|
|
1807
1807
|
for (let o = 0; o < c.length && !(e < parseInt(c[o])); o++)
|
|
1808
1808
|
i = c[o];
|
|
1809
|
-
const d = i && t[i].icon ? { "--icon": `url(${
|
|
1809
|
+
const d = i && t[i].icon ? { "--icon": `url(${Pt}icons/${t[i].icon}.svg)` } : {};
|
|
1810
1810
|
return /* @__PURE__ */ s.jsxs(
|
|
1811
|
-
|
|
1811
|
+
Se,
|
|
1812
1812
|
{
|
|
1813
1813
|
className: S("loading-block", n, { "has-icon": i && t[i].icon }),
|
|
1814
1814
|
variant: "subtle",
|
|
@@ -1819,29 +1819,29 @@ const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1819
1819
|
]
|
|
1820
1820
|
}
|
|
1821
1821
|
);
|
|
1822
|
-
}, bo =
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1822
|
+
}, bo = Pe(nr);
|
|
1823
|
+
const ye = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(xn, { element: e, className: S("loading-placeholder", t), ...n });
|
|
1824
|
+
const Lt = {
|
|
1825
1825
|
header: ["logo", "link", "link", "search"],
|
|
1826
1826
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1827
1827
|
"cards-section": ["subtitle", "cards"],
|
|
1828
1828
|
cards: ["card", "card", "card", "card"],
|
|
1829
1829
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1830
|
-
},
|
|
1830
|
+
}, Sn = (e, t) => e in Lt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Lt[e].map((n, r) => Sn(n, r)) }, t) : /* @__PURE__ */ s.jsx(ye, { className: e }, t), sr = ({ layout: e = "overview-page" }) => /* @__PURE__ */ s.jsx("div", { className: S("loading-state", e), children: Lt[e].map((t, n) => Sn(t, n)) }), Tn = (e) => {
|
|
1831
1831
|
const t = e && e.toUpperCase().split(" ");
|
|
1832
1832
|
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 /
|
|
1833
|
+
}, Ve = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rr = (e) => {
|
|
1834
|
+
const t = Math.ceil(26 / Ve.length), n = Tn(e).toLowerCase();
|
|
1835
1835
|
if (n === "")
|
|
1836
|
-
return
|
|
1836
|
+
return Ve[0];
|
|
1837
1837
|
const r = n.charCodeAt(0) - 96;
|
|
1838
|
-
for (let i = 0; i <
|
|
1838
|
+
for (let i = 0; i < Ve.length; i++)
|
|
1839
1839
|
if (r <= t * (i + 1))
|
|
1840
|
-
return
|
|
1840
|
+
return Ve[i];
|
|
1841
1841
|
};
|
|
1842
|
-
const
|
|
1843
|
-
const [o, a] =
|
|
1844
|
-
|
|
1842
|
+
const cn = 256, It = ({ className: e = "", src: t = "", name: n, alt: r, width: i = cn, height: c = cn, ...d }) => {
|
|
1843
|
+
const [o, a] = L(!1), u = se(null);
|
|
1844
|
+
Z(() => {
|
|
1845
1845
|
const f = u.current;
|
|
1846
1846
|
if (!f)
|
|
1847
1847
|
return;
|
|
@@ -1849,7 +1849,7 @@ const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1849
1849
|
if (!h)
|
|
1850
1850
|
return;
|
|
1851
1851
|
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 = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(
|
|
1852
|
+
typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(Tn(n), p / 2, _ / 1.6);
|
|
1853
1853
|
}, [n]);
|
|
1854
1854
|
let l = !1;
|
|
1855
1855
|
return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx("figure", { className: S("profile-picture", e, { error: o }), ...d, children: l ? /* @__PURE__ */ s.jsx(
|
|
@@ -1864,10 +1864,10 @@ const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1864
1864
|
height: c
|
|
1865
1865
|
}
|
|
1866
1866
|
) : /* @__PURE__ */ s.jsx("canvas", { ref: u }) });
|
|
1867
|
-
},
|
|
1868
|
-
image: `${
|
|
1867
|
+
}, $n = (e) => e === "apolitical" ? {
|
|
1868
|
+
image: `${Pt}logos/member_apolitical.svg`
|
|
1869
1869
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1870
|
-
image: `${
|
|
1870
|
+
image: `${Pt}logos/member_community.svg`
|
|
1871
1871
|
} : {
|
|
1872
1872
|
name: e.name,
|
|
1873
1873
|
role: e.jobTitle || "",
|
|
@@ -1886,9 +1886,9 @@ const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
|
|
|
1886
1886
|
return "";
|
|
1887
1887
|
const o = `${e}${i && c ? ` — ${t}` : t}`;
|
|
1888
1888
|
let a = `${o}${(i || c) && d ? `, ${n}` : n}`;
|
|
1889
|
-
return a.length > r && (a = o), a.length > r && (a =
|
|
1889
|
+
return a.length > r && (a = o), a.length > r && (a = st(a, r)), a;
|
|
1890
1890
|
};
|
|
1891
|
-
const
|
|
1891
|
+
const Ht = ({
|
|
1892
1892
|
element: e = "div",
|
|
1893
1893
|
member: t = "community",
|
|
1894
1894
|
additionalContent: n = !1,
|
|
@@ -1896,13 +1896,13 @@ const Bt = ({
|
|
|
1896
1896
|
gtmType: i = "member-click",
|
|
1897
1897
|
className: c = ""
|
|
1898
1898
|
}) => {
|
|
1899
|
-
const d = A(), o =
|
|
1899
|
+
const d = A(), o = $n(t);
|
|
1900
1900
|
o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1901
1901
|
const { name: a, url: u, image: l } = o, f = or(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
|
|
1902
1902
|
return N.createElement(e, {
|
|
1903
1903
|
className: S("member text-medium", c),
|
|
1904
1904
|
children: /* @__PURE__ */ s.jsxs(
|
|
1905
|
-
|
|
1905
|
+
lt,
|
|
1906
1906
|
{
|
|
1907
1907
|
href: u,
|
|
1908
1908
|
gtmType: i,
|
|
@@ -1911,7 +1911,7 @@ const Bt = ({
|
|
|
1911
1911
|
_ == null || _.stopPropagation();
|
|
1912
1912
|
},
|
|
1913
1913
|
children: [
|
|
1914
|
-
/* @__PURE__ */ s.jsx(
|
|
1914
|
+
/* @__PURE__ */ s.jsx(It, { name: a, src: l }),
|
|
1915
1915
|
/* @__PURE__ */ s.jsxs("p", { className: "details", children: [
|
|
1916
1916
|
/* @__PURE__ */ s.jsx("strong", { children: a }),
|
|
1917
1917
|
n && /* @__PURE__ */ s.jsxs("span", { className: "additional-content", children: [
|
|
@@ -1925,7 +1925,7 @@ const Bt = ({
|
|
|
1925
1925
|
)
|
|
1926
1926
|
});
|
|
1927
1927
|
};
|
|
1928
|
-
const
|
|
1928
|
+
const dn = {
|
|
1929
1929
|
small: 24,
|
|
1930
1930
|
medium: 48
|
|
1931
1931
|
}, ar = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: r, size: i, showGap: c, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: o = 2, className: a = "" }) => {
|
|
@@ -1936,10 +1936,10 @@ const ln = {
|
|
|
1936
1936
|
/* @__PURE__ */ s.jsx("ul", { children: n.map((l, f) => {
|
|
1937
1937
|
let h, p = "";
|
|
1938
1938
|
if (f < o) {
|
|
1939
|
-
const { name: _ = "", image: j = "" } =
|
|
1939
|
+
const { name: _ = "", image: j = "" } = $n(l);
|
|
1940
1940
|
if (d)
|
|
1941
|
-
return /* @__PURE__ */ s.jsx(
|
|
1942
|
-
h = /* @__PURE__ */ s.jsx(
|
|
1941
|
+
return /* @__PURE__ */ s.jsx(ye, { element: "li", className: "contributor" }, f);
|
|
1942
|
+
h = /* @__PURE__ */ s.jsx(It, { name: _, src: j, width: dn[i || "medium"], height: dn[i || "medium"] });
|
|
1943
1943
|
} else if (f === o) {
|
|
1944
1944
|
const _ = (t || n.length) - o;
|
|
1945
1945
|
h = /* @__PURE__ */ s.jsxs("small", { className: S({ "large-number": _ > 99 }), children: [
|
|
@@ -1949,7 +1949,7 @@ const ln = {
|
|
|
1949
1949
|
}
|
|
1950
1950
|
return h ? /* @__PURE__ */ s.jsx("li", { className: S("contributor", p), children: h }, f) : null;
|
|
1951
1951
|
}) }),
|
|
1952
|
-
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? u.formatMessage({ id: `member_${n[0]}` }) :
|
|
1952
|
+
r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? u.formatMessage({ id: `member_${n[0]}` }) : st(n[0].name || "", 20) : null })
|
|
1953
1953
|
] }) }
|
|
1954
1954
|
);
|
|
1955
1955
|
}, ir = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1969,10 +1969,10 @@ const ln = {
|
|
|
1969
1969
|
e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
|
|
1970
1970
|
] });
|
|
1971
1971
|
};
|
|
1972
|
-
var lr =
|
|
1972
|
+
var lr = Ot({ client: Ke });
|
|
1973
1973
|
function cr(e) {
|
|
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 && (
|
|
1974
|
+
var t = e.children, n = e.client, r = e.apiKey, i = e.options, c = nt(function() {
|
|
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 && (Ke.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ke.init(r, i)), Ke);
|
|
1976
1976
|
}, [n, r]);
|
|
1977
1977
|
return N.createElement(lr.Provider, { value: { client: c } }, t);
|
|
1978
1978
|
}
|
|
@@ -1998,22 +1998,22 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
|
|
|
1998
1998
|
...n || {}
|
|
1999
1999
|
};
|
|
2000
2000
|
return /* @__PURE__ */ s.jsx(ls, { locale: r, messages: i, children: e });
|
|
2001
|
-
},
|
|
2002
|
-
const [r, i] =
|
|
2003
|
-
return
|
|
2001
|
+
}, Te = Ot(null), mr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Te.Provider, { value: t, children: e }), vo = ({ bootstrap: e, children: t, intl: n }) => {
|
|
2002
|
+
const [r, i] = L({ isLoading: !0 });
|
|
2003
|
+
return Z(() => {
|
|
2004
2004
|
e().then((c) => i({ ...c, isLoading: !1 })).catch(() => i({ isLoading: !1 }));
|
|
2005
2005
|
}, []), /* @__PURE__ */ s.jsx(ur, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(mr, { user: r, children: /* @__PURE__ */ s.jsx(ir, { children: /* @__PURE__ */ s.jsx(dr, { user: r, children: t }) }) }) });
|
|
2006
2006
|
};
|
|
2007
|
-
const
|
|
2007
|
+
const vt = "joinCommunityButton", Mn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2008
2008
|
}, leave: () => {
|
|
2009
2009
|
} } }) => {
|
|
2010
|
-
const i = A(), c =
|
|
2011
|
-
|
|
2010
|
+
const i = A(), c = be(Te), d = c && typeof c.id == "string", [o, a] = L(e), [u, l] = L(e ? "joined" : "notJoined");
|
|
2011
|
+
Z(() => {
|
|
2012
2012
|
u === "joining" ? l("joined") : u === "leaving" && l("notJoined");
|
|
2013
2013
|
}, [o]);
|
|
2014
2014
|
const f = {}, h = {};
|
|
2015
|
-
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${
|
|
2016
|
-
|
|
2015
|
+
return o && u !== "leaving" && (f["data-hover-text"] = i.formatMessage({ id: `${vt}_leave` }), f["aria-label"] = i.formatMessage({ id: `${vt}_member_aria` }), h["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2016
|
+
X,
|
|
2017
2017
|
{
|
|
2018
2018
|
variant: o ? "secondary" : "primary",
|
|
2019
2019
|
size: "medium",
|
|
@@ -2025,26 +2025,55 @@ const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2025
2025
|
className: S("join-community-button", u, { active: u === "joining" }),
|
|
2026
2026
|
disabled: !d,
|
|
2027
2027
|
...f,
|
|
2028
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${
|
|
2028
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${vt}${["joining", "leaving"].includes(u) ? `_${u}` : o ? "_member" : t ? "_short" : ""}` }) })
|
|
2029
2029
|
}
|
|
2030
2030
|
);
|
|
2031
2031
|
};
|
|
2032
|
-
const
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2032
|
+
const wt = "communityDetails_", wo = ({
|
|
2033
|
+
className: e = "",
|
|
2034
|
+
isMember: t = !1,
|
|
2035
|
+
slug: n,
|
|
2036
|
+
members: { number: r = 0, data: i = [] } = { number: 0, data: [] },
|
|
2037
|
+
functions: { invite: c, ...d }
|
|
2038
|
+
}) => {
|
|
2039
|
+
const o = A(), a = 5, u = r || i.length, l = i.length ? i : Array(a).fill({});
|
|
2040
|
+
return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", e), children: [
|
|
2041
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2036
2042
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2037
2043
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2038
2044
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2039
|
-
|
|
2040
|
-
/* @__PURE__ */ s.jsx("span", { className: "count", children:
|
|
2045
|
+
o.formatMessage({ id: `${wt}members` }),
|
|
2046
|
+
/* @__PURE__ */ s.jsx("span", { className: "count", children: u })
|
|
2041
2047
|
] }),
|
|
2042
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${
|
|
2048
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${wt}viewAll` }) }) })
|
|
2043
2049
|
] }),
|
|
2044
|
-
/* @__PURE__ */ s.jsx(
|
|
2050
|
+
/* @__PURE__ */ s.jsx(
|
|
2051
|
+
ar,
|
|
2052
|
+
{
|
|
2053
|
+
contributors: {
|
|
2054
|
+
total: r,
|
|
2055
|
+
data: l
|
|
2056
|
+
},
|
|
2057
|
+
styling: {
|
|
2058
|
+
size: "medium",
|
|
2059
|
+
showGap: !0,
|
|
2060
|
+
showPlaceholders: u === 0
|
|
2061
|
+
},
|
|
2062
|
+
cutoff: a
|
|
2063
|
+
}
|
|
2064
|
+
)
|
|
2045
2065
|
] }),
|
|
2046
|
-
/* @__PURE__ */ s.jsx(
|
|
2047
|
-
|
|
2066
|
+
/* @__PURE__ */ s.jsx(Mn, { isMember: t, functions: { ...d } }),
|
|
2067
|
+
t && /* @__PURE__ */ s.jsx(
|
|
2068
|
+
X,
|
|
2069
|
+
{
|
|
2070
|
+
variant: "primary",
|
|
2071
|
+
onClick: c,
|
|
2072
|
+
icon: { icon: "plus" },
|
|
2073
|
+
styling: { fullWidth: !0 },
|
|
2074
|
+
children: o.formatMessage({ id: `${wt}invite` })
|
|
2075
|
+
}
|
|
2076
|
+
)
|
|
2048
2077
|
] });
|
|
2049
2078
|
};
|
|
2050
2079
|
const ko = ({
|
|
@@ -2054,10 +2083,10 @@ const ko = ({
|
|
|
2054
2083
|
}) => {
|
|
2055
2084
|
const r = A();
|
|
2056
2085
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2057
|
-
/* @__PURE__ */ s.jsx(
|
|
2086
|
+
/* @__PURE__ */ s.jsx(de, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2058
2087
|
/* @__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: [
|
|
2059
|
-
d && /* @__PURE__ */ s.jsx(
|
|
2060
|
-
/* @__PURE__ */ s.jsx(
|
|
2088
|
+
d && /* @__PURE__ */ s.jsx(de, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2089
|
+
/* @__PURE__ */ s.jsx(lt, { href: d ? void 0 : c, children: st(i, t) })
|
|
2061
2090
|
] }, `${window.btoa(i)}_${o}`)) })
|
|
2062
2091
|
] });
|
|
2063
2092
|
};
|
|
@@ -2069,7 +2098,7 @@ const jo = ({
|
|
|
2069
2098
|
},
|
|
2070
2099
|
className: i = ""
|
|
2071
2100
|
}) => {
|
|
2072
|
-
const c = A(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || c.formatMessage({ id: "filters_all" }) }, ...e] : e, [o, a] =
|
|
2101
|
+
const c = A(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || c.formatMessage({ id: "filters_all" }) }, ...e] : e, [o, a] = L(t ? ["all"] : []), u = (l, f) => {
|
|
2073
2102
|
let h = [];
|
|
2074
2103
|
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();
|
|
2075
2104
|
};
|
|
@@ -2097,7 +2126,7 @@ const jo = ({
|
|
|
2097
2126
|
c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
|
|
2098
2127
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2099
2128
|
};
|
|
2100
|
-
const
|
|
2129
|
+
const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ye = "languageSwitcher_", yo = ({
|
|
2101
2130
|
currentLanguage: e,
|
|
2102
2131
|
isOriginalLanguage: t = !1,
|
|
2103
2132
|
isHumanTranslation: n = !1,
|
|
@@ -2109,35 +2138,35 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2109
2138
|
label: o,
|
|
2110
2139
|
className: a = ""
|
|
2111
2140
|
}) => {
|
|
2112
|
-
const u = A(), [l, f] =
|
|
2113
|
-
if (
|
|
2141
|
+
const u = A(), [l, f] = L(e);
|
|
2142
|
+
if (Z(() => {
|
|
2114
2143
|
e !== l && f(e);
|
|
2115
2144
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
2116
2145
|
return null;
|
|
2117
2146
|
const p = Object.keys(r), _ = l !== e;
|
|
2118
2147
|
return /* @__PURE__ */ s.jsxs("div", { className: S("language-switcher text-small", d, a), children: [
|
|
2119
2148
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2120
|
-
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${
|
|
2149
|
+
d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${Ye}label` }) }),
|
|
2121
2150
|
/* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
|
|
2122
|
-
if (!
|
|
2151
|
+
if (!kt[j])
|
|
2123
2152
|
return null;
|
|
2124
2153
|
let g = { className: j };
|
|
2125
|
-
return l === j ? g["aria-label"] = u.formatMessage({ id: `${
|
|
2154
|
+
return l === j ? g["aria-label"] = u.formatMessage({ id: `${Ye}selected` }, { language: kt[j] }) : g = {
|
|
2126
2155
|
...g,
|
|
2127
2156
|
href: fr(j, c),
|
|
2128
2157
|
onClick: (E) => {
|
|
2129
2158
|
E.preventDefault(), E.stopPropagation(), f(j), i(j);
|
|
2130
2159
|
}
|
|
2131
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2160
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(lt, { ...g, fallbackElement: "span", children: kt[j] }) }, j);
|
|
2132
2161
|
}) }),
|
|
2133
|
-
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: u.formatMessage({ id: `${
|
|
2162
|
+
d !== "short" && !_ && /* @__PURE__ */ s.jsx("p", { children: u.formatMessage({ id: `${Ye}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2134
2163
|
] }),
|
|
2135
2164
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ s.jsx("small", {
|
|
2136
2165
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2137
2166
|
// @ts-ignore
|
|
2138
2167
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2139
|
-
children: u.formatMessage({ id: `${
|
|
2140
|
-
email:
|
|
2168
|
+
children: u.formatMessage({ id: `${Ye}disclaimer` }, {
|
|
2169
|
+
email: Be.support,
|
|
2141
2170
|
link: (j) => {
|
|
2142
2171
|
const g = `mailto:${j}`;
|
|
2143
2172
|
return /* @__PURE__ */ s.jsx("a", { href: g, children: j });
|
|
@@ -2146,7 +2175,7 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2146
2175
|
})
|
|
2147
2176
|
] });
|
|
2148
2177
|
};
|
|
2149
|
-
const
|
|
2178
|
+
const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
2150
2179
|
page: e = 1,
|
|
2151
2180
|
length: t = 0,
|
|
2152
2181
|
limit: n = 10,
|
|
@@ -2154,14 +2183,14 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2154
2183
|
},
|
|
2155
2184
|
icon: i = !1,
|
|
2156
2185
|
messages: c = {
|
|
2157
|
-
button:
|
|
2158
|
-
endOfFeed:
|
|
2159
|
-
error:
|
|
2186
|
+
button: jt.formatMessage({ id: "loadMore_button" }),
|
|
2187
|
+
endOfFeed: jt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2188
|
+
error: jt.formatMessage({ id: "loadMore_error" })
|
|
2160
2189
|
},
|
|
2161
2190
|
className: d = "",
|
|
2162
2191
|
gtmContext: o = "LoadMore"
|
|
2163
2192
|
}) => {
|
|
2164
|
-
const [a, u] =
|
|
2193
|
+
const [a, u] = L(!1), [l, f] = L(!1);
|
|
2165
2194
|
if (t <= 0 || t < n * e)
|
|
2166
2195
|
return null;
|
|
2167
2196
|
const h = async (p) => {
|
|
@@ -2174,7 +2203,7 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2174
2203
|
return /* @__PURE__ */ s.jsxs("footer", { className: S("load-more", d), children: [
|
|
2175
2204
|
a && /* @__PURE__ */ s.jsx("p", { className: "error", children: c.error }),
|
|
2176
2205
|
l ? /* @__PURE__ */ s.jsx("p", { children: c.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2177
|
-
|
|
2206
|
+
X,
|
|
2178
2207
|
{
|
|
2179
2208
|
variant: "secondary",
|
|
2180
2209
|
icon: i,
|
|
@@ -2188,19 +2217,19 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2188
2217
|
)
|
|
2189
2218
|
] });
|
|
2190
2219
|
};
|
|
2191
|
-
let
|
|
2220
|
+
let Ge = !1;
|
|
2192
2221
|
const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2193
|
-
const i = A(), c =
|
|
2222
|
+
const i = A(), c = se(null), [d, o] = L(!1), a = (u) => {
|
|
2194
2223
|
c.current && u.target instanceof HTMLElement && !c.current.contains(u.target) && o(!1);
|
|
2195
2224
|
};
|
|
2196
|
-
return
|
|
2225
|
+
return Z(() => (document.addEventListener("click", a, !0), () => {
|
|
2197
2226
|
document.removeEventListener("click", a, !0);
|
|
2198
2227
|
})), N.createElement(e, {
|
|
2199
2228
|
ref: c,
|
|
2200
2229
|
className: S("more-menu text-medium", r),
|
|
2201
2230
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2202
2231
|
/* @__PURE__ */ s.jsx(
|
|
2203
|
-
|
|
2232
|
+
X,
|
|
2204
2233
|
{
|
|
2205
2234
|
variant: "tertiary",
|
|
2206
2235
|
size: "medium",
|
|
@@ -2219,16 +2248,16 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2219
2248
|
o(!1), typeof l == "function" && l(g);
|
|
2220
2249
|
},
|
|
2221
2250
|
onFocus: () => {
|
|
2222
|
-
|
|
2251
|
+
Ge && (clearTimeout(Ge), Ge = !1);
|
|
2223
2252
|
},
|
|
2224
2253
|
onBlur: () => {
|
|
2225
|
-
|
|
2254
|
+
Ge = setTimeout(() => {
|
|
2226
2255
|
o(!1);
|
|
2227
2256
|
}, 100);
|
|
2228
2257
|
}
|
|
2229
2258
|
};
|
|
2230
2259
|
return u && (j.href = u), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2231
|
-
|
|
2260
|
+
X,
|
|
2232
2261
|
{
|
|
2233
2262
|
variant: "tertiary",
|
|
2234
2263
|
size: "medium",
|
|
@@ -2241,32 +2270,32 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2241
2270
|
] })
|
|
2242
2271
|
});
|
|
2243
2272
|
};
|
|
2244
|
-
const
|
|
2273
|
+
const Cn = ({ 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(de, { children: /* @__PURE__ */ s.jsx(Ee, { id: "apolitical" }) }) }) });
|
|
2245
2274
|
const gr = {
|
|
2246
2275
|
"2-1": 901
|
|
2247
2276
|
}, Eo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: r }) => {
|
|
2248
|
-
const i =
|
|
2277
|
+
const i = at(!0);
|
|
2249
2278
|
let c = r;
|
|
2250
2279
|
return N.Children.count(r) === 1 && (c = N.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: S("columns", `layout-${e}`, n), children: N.Children.map(c, (d, o) => t !== !1 && o === t && i && i < gr[e] ? null : d) });
|
|
2251
2280
|
};
|
|
2252
|
-
const
|
|
2253
|
-
const e = A(), [t, n, r] = fs(
|
|
2254
|
-
|
|
2281
|
+
const yt = "cookieBanner_", Et = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], St = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), _r = () => {
|
|
2282
|
+
const e = A(), [t, n, r] = fs(Et), [i, c] = L(!t["apol-cookie-banner"]), d = () => {
|
|
2283
|
+
Et.forEach((l) => {
|
|
2255
2284
|
n(l, !0, {
|
|
2256
2285
|
path: "/",
|
|
2257
|
-
expires:
|
|
2286
|
+
expires: St,
|
|
2258
2287
|
domain: l === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2259
2288
|
});
|
|
2260
2289
|
}), c(!1), window.location.reload();
|
|
2261
2290
|
}, o = () => {
|
|
2262
2291
|
n("apol-cookie-banner", !0, {
|
|
2263
2292
|
path: "/",
|
|
2264
|
-
expires:
|
|
2265
|
-
}),
|
|
2293
|
+
expires: St
|
|
2294
|
+
}), Et.forEach((l) => {
|
|
2266
2295
|
if (l === "apol-cookie-banner") {
|
|
2267
2296
|
n(l, !0, {
|
|
2268
2297
|
path: "/",
|
|
2269
|
-
expires:
|
|
2298
|
+
expires: St
|
|
2270
2299
|
});
|
|
2271
2300
|
return;
|
|
2272
2301
|
}
|
|
@@ -2288,14 +2317,14 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2288
2317
|
className: "gtm-trackable",
|
|
2289
2318
|
"data-gtm-event-context": "cookie-banner",
|
|
2290
2319
|
"data-gtm-event-type": `cookie-${l.gtmType}-click`,
|
|
2291
|
-
children: e.formatMessage({ id: `${
|
|
2320
|
+
children: e.formatMessage({ id: `${yt}buttons_${l.id}` })
|
|
2292
2321
|
});
|
|
2293
2322
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2294
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2295
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2296
|
-
/* @__PURE__ */ s.jsx(
|
|
2323
|
+
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${yt}title` }) }),
|
|
2324
|
+
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${yt}text` }) }),
|
|
2325
|
+
/* @__PURE__ */ s.jsx(it, { buttons: u })
|
|
2297
2326
|
] });
|
|
2298
|
-
},
|
|
2327
|
+
}, ke = {
|
|
2299
2328
|
platform: {
|
|
2300
2329
|
order: ["events", "courses", "qanda", "articles"],
|
|
2301
2330
|
// An array guarantees the right order
|
|
@@ -2360,11 +2389,11 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2360
2389
|
text: {
|
|
2361
2390
|
order: ["dataProtection", "euDataProtection"],
|
|
2362
2391
|
dataProtection: {
|
|
2363
|
-
email:
|
|
2392
|
+
email: Be["data-protection"].default,
|
|
2364
2393
|
gtmType: "email-dpo-link"
|
|
2365
2394
|
},
|
|
2366
2395
|
euDataProtection: {
|
|
2367
|
-
email:
|
|
2396
|
+
email: Be["data-protection"].eu,
|
|
2368
2397
|
gtmType: "email-eu-dpo-link"
|
|
2369
2398
|
}
|
|
2370
2399
|
}
|
|
@@ -2376,10 +2405,10 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2376
2405
|
registered: { address: !0 },
|
|
2377
2406
|
berlin: { address: !0 },
|
|
2378
2407
|
support: {
|
|
2379
|
-
email:
|
|
2408
|
+
email: Be.support,
|
|
2380
2409
|
gtmType: "concierge-email-click"
|
|
2381
2410
|
},
|
|
2382
|
-
business: { email:
|
|
2411
|
+
business: { email: Be.general, gtmType: "hello-email-click" }
|
|
2383
2412
|
}
|
|
2384
2413
|
},
|
|
2385
2414
|
social: {
|
|
@@ -2389,37 +2418,37 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2389
2418
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2390
2419
|
}
|
|
2391
2420
|
};
|
|
2392
|
-
const
|
|
2393
|
-
const t =
|
|
2421
|
+
const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
2422
|
+
const t = ke[e].order || [];
|
|
2394
2423
|
let n = !1;
|
|
2395
|
-
return "text" in
|
|
2396
|
-
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(
|
|
2424
|
+
return "text" in ke[e] && (n = ke[e].text), /* @__PURE__ */ s.jsxs(Nt, { children: [
|
|
2425
|
+
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}${e}` }) }),
|
|
2397
2426
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2398
2427
|
if (["order", "child", "text"].includes(r))
|
|
2399
2428
|
return null;
|
|
2400
|
-
const { href: i, gtmType: c } =
|
|
2429
|
+
const { href: i, gtmType: c } = ke[e][r], d = {};
|
|
2401
2430
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2402
2431
|
"a",
|
|
2403
2432
|
{
|
|
2404
2433
|
href: i,
|
|
2405
2434
|
className: "gtm-trackable",
|
|
2406
|
-
"data-gtm-event-context":
|
|
2435
|
+
"data-gtm-event-context": qe,
|
|
2407
2436
|
"data-gtm-event-type": c,
|
|
2408
2437
|
...d,
|
|
2409
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2438
|
+
children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}${e}_${r}` })
|
|
2410
2439
|
}
|
|
2411
2440
|
) }, `${e}_${r}`);
|
|
2412
2441
|
}) }),
|
|
2413
|
-
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(
|
|
2414
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(
|
|
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(Nt, { children: [
|
|
2443
|
+
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}${e}_${r}` }) }),
|
|
2415
2444
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2416
|
-
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(
|
|
2445
|
+
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
2417
2446
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2418
2447
|
"a",
|
|
2419
2448
|
{
|
|
2420
2449
|
href: `mailto:${n[r].email}`,
|
|
2421
2450
|
className: "gtm-trackable",
|
|
2422
|
-
"data-gtm-event-context":
|
|
2451
|
+
"data-gtm-event-context": qe,
|
|
2423
2452
|
"data-gtm-event-type": n[r].gtmType,
|
|
2424
2453
|
children: n[r].email
|
|
2425
2454
|
}
|
|
@@ -2427,26 +2456,26 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2427
2456
|
] })
|
|
2428
2457
|
] }, `dl-${e}-${r}`)) })
|
|
2429
2458
|
] }, e);
|
|
2430
|
-
},
|
|
2431
|
-
/* @__PURE__ */ s.jsx(
|
|
2459
|
+
}, Dn = () => /* @__PURE__ */ s.jsx("div", { id: "footer", children: /* @__PURE__ */ s.jsxs("div", { className: "wrapper", children: [
|
|
2460
|
+
/* @__PURE__ */ s.jsx(xn, { element: "hr" }),
|
|
2432
2461
|
/* @__PURE__ */ s.jsx(
|
|
2433
|
-
|
|
2462
|
+
Cn,
|
|
2434
2463
|
{
|
|
2435
2464
|
variant: "inverted",
|
|
2436
2465
|
version: "full",
|
|
2437
2466
|
className: "gtm-trackable",
|
|
2438
|
-
"data-gtm-event-context":
|
|
2467
|
+
"data-gtm-event-context": qe,
|
|
2439
2468
|
"data-gtm-event-type": "logo-homepage-link"
|
|
2440
2469
|
}
|
|
2441
2470
|
),
|
|
2442
2471
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2443
|
-
/* @__PURE__ */ s.jsx(
|
|
2444
|
-
Object.keys(
|
|
2472
|
+
/* @__PURE__ */ s.jsx(un, { group: e }),
|
|
2473
|
+
Object.keys(ke[e]).includes("child") && /* @__PURE__ */ s.jsx(un, { group: ke[e].child })
|
|
2445
2474
|
] }, e)) }),
|
|
2446
2475
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2447
2476
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
2448
|
-
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(
|
|
2449
|
-
const t =
|
|
2477
|
+
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(ke.social.order) && ke.social.order.map((e) => {
|
|
2478
|
+
const t = ke.social[e];
|
|
2450
2479
|
return /* @__PURE__ */ s.jsx("li", { className: e, children: /* @__PURE__ */ s.jsx(
|
|
2451
2480
|
"a",
|
|
2452
2481
|
{
|
|
@@ -2454,22 +2483,22 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2454
2483
|
target: "_blank",
|
|
2455
2484
|
rel: "noopener noreferrer",
|
|
2456
2485
|
className: "gtm-trackable",
|
|
2457
|
-
"data-gtm-event-context":
|
|
2486
|
+
"data-gtm-event-context": qe,
|
|
2458
2487
|
"data-gtm-event-type": "social-click",
|
|
2459
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(
|
|
2488
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "hidden", children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}social_${e}` }) })
|
|
2460
2489
|
}
|
|
2461
2490
|
) }, e);
|
|
2462
2491
|
}) }),
|
|
2463
|
-
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(
|
|
2492
|
+
/* @__PURE__ */ s.jsx("small", { children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2464
2493
|
] })
|
|
2465
2494
|
] }) });
|
|
2466
|
-
const
|
|
2467
|
-
const i = A(), [c, d] =
|
|
2495
|
+
const Je = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, resendVerificationCode: r }) => {
|
|
2496
|
+
const i = A(), [c, d] = L({ path: `${Je}default`, type: "default", link: {}, mail: {}, error: "" }), [o, a] = L(!1), u = je(
|
|
2468
2497
|
(p) => {
|
|
2469
2498
|
p.preventDefault(), p.stopPropagation();
|
|
2470
2499
|
const _ = (j) => {
|
|
2471
2500
|
d({
|
|
2472
|
-
path: `${
|
|
2501
|
+
path: `${Je}error_verificationFailedToSend`,
|
|
2473
2502
|
type: "error",
|
|
2474
2503
|
link: {
|
|
2475
2504
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -2489,7 +2518,7 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2489
2518
|
});
|
|
2490
2519
|
};
|
|
2491
2520
|
if (typeof r != "function") {
|
|
2492
|
-
_(i.formatMessage({ id: `${
|
|
2521
|
+
_(i.formatMessage({ id: `${Je}error_noFunction` }));
|
|
2493
2522
|
return;
|
|
2494
2523
|
}
|
|
2495
2524
|
a(!0), r(t).then(() => {
|
|
@@ -2503,9 +2532,9 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2503
2532
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2504
2533
|
[t, n, r]
|
|
2505
2534
|
);
|
|
2506
|
-
|
|
2535
|
+
Z(
|
|
2507
2536
|
() => {
|
|
2508
|
-
let p =
|
|
2537
|
+
let p = Je, _ = "default", j = {}, g = {};
|
|
2509
2538
|
switch (e) {
|
|
2510
2539
|
case "gov":
|
|
2511
2540
|
p += "autoApproved", _ = "success";
|
|
@@ -2563,9 +2592,9 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2563
2592
|
const l = {};
|
|
2564
2593
|
return ["link", "mail"].forEach((p) => {
|
|
2565
2594
|
l[p] = Object.keys(c[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: _ }) : (_) => _;
|
|
2566
|
-
}), /* @__PURE__ */ s.jsx(
|
|
2567
|
-
/* @__PURE__ */ s.jsx(
|
|
2568
|
-
/* @__PURE__ */ s.jsx(
|
|
2595
|
+
}), /* @__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(ye, { element: "span" }),
|
|
2597
|
+
/* @__PURE__ */ s.jsx(ye, { element: "span" })
|
|
2569
2598
|
] }) : (
|
|
2570
2599
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2571
2600
|
// @ts-ignore
|
|
@@ -2585,28 +2614,28 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2585
2614
|
)
|
|
2586
2615
|
) });
|
|
2587
2616
|
};
|
|
2588
|
-
const
|
|
2589
|
-
[
|
|
2590
|
-
[
|
|
2591
|
-
[
|
|
2617
|
+
const Xe = "passwordRules_", Nn = "isMoreThanEightCharacters", An = "includesNumberAndSymbol", Pn = "includesLowerAndUppercase", xr = {
|
|
2618
|
+
[Nn]: "8Characters",
|
|
2619
|
+
[An]: "numberSymbol",
|
|
2620
|
+
[Pn]: "lowercaseUppercase"
|
|
2592
2621
|
}, br = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2593
2622
|
const n = A();
|
|
2594
2623
|
return /* @__PURE__ */ s.jsxs("aside", { className: S("password-rules", t), children: [
|
|
2595
|
-
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${
|
|
2596
|
-
/* @__PURE__ */ s.jsx("ul", { children: [
|
|
2597
|
-
/* @__PURE__ */ s.jsxs(
|
|
2598
|
-
n.formatMessage({ id: `${
|
|
2624
|
+
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Xe}intro` }) }),
|
|
2625
|
+
/* @__PURE__ */ s.jsx("ul", { children: [Nn, An, Pn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: S({ matches: e[r] }), children: [
|
|
2626
|
+
/* @__PURE__ */ s.jsxs(de, { children: [
|
|
2627
|
+
n.formatMessage({ id: `${Xe}rule_label` }),
|
|
2599
2628
|
" "
|
|
2600
2629
|
] }),
|
|
2601
|
-
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${
|
|
2602
|
-
!e[r] && /* @__PURE__ */ s.jsxs(
|
|
2630
|
+
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Xe}rule_${xr[r]}` }) }),
|
|
2631
|
+
!e[r] && /* @__PURE__ */ s.jsxs(de, { element: "strong", children: [
|
|
2603
2632
|
" ",
|
|
2604
2633
|
" ",
|
|
2605
|
-
n.formatMessage({ id: `${
|
|
2634
|
+
n.formatMessage({ id: `${Xe}notMet` })
|
|
2606
2635
|
] })
|
|
2607
2636
|
] }, `rule-${r}`)) })
|
|
2608
2637
|
] });
|
|
2609
|
-
}, To =
|
|
2638
|
+
}, To = Pe(br);
|
|
2610
2639
|
const $o = ({
|
|
2611
2640
|
text: e = {},
|
|
2612
2641
|
topRating: t = 5,
|
|
@@ -2616,7 +2645,7 @@ const $o = ({
|
|
|
2616
2645
|
className: c = "",
|
|
2617
2646
|
hasLoaded: d = !1
|
|
2618
2647
|
}) => {
|
|
2619
|
-
const o = A(), [a, u] =
|
|
2648
|
+
const o = A(), [a, u] = L({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
|
|
2620
2649
|
try {
|
|
2621
2650
|
const E = await n();
|
|
2622
2651
|
u((k) => ({ ...k, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
@@ -2624,10 +2653,10 @@ const $o = ({
|
|
|
2624
2653
|
u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(E);
|
|
2625
2654
|
}
|
|
2626
2655
|
};
|
|
2627
|
-
if (
|
|
2656
|
+
if (Z(() => {
|
|
2628
2657
|
d && !a.setUp && l();
|
|
2629
2658
|
}, [d]), !d)
|
|
2630
|
-
return /* @__PURE__ */ s.jsx(
|
|
2659
|
+
return /* @__PURE__ */ s.jsx(ye, { className: "rating-placeholder" });
|
|
2631
2660
|
const { id: f, rating: h, disabled: p } = a, _ = "ratings_", j = {
|
|
2632
2661
|
text: o.formatMessage({ id: `${_}text` }),
|
|
2633
2662
|
low: o.formatMessage({ id: `${_}low` }),
|
|
@@ -2649,7 +2678,7 @@ const $o = ({
|
|
|
2649
2678
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2650
2679
|
const k = E + 1;
|
|
2651
2680
|
return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
|
|
2652
|
-
|
|
2681
|
+
X,
|
|
2653
2682
|
{
|
|
2654
2683
|
variant: "tertiary",
|
|
2655
2684
|
size: "small",
|
|
@@ -2675,8 +2704,8 @@ const vr = ({
|
|
|
2675
2704
|
gtmContext: i = "search-bar",
|
|
2676
2705
|
gtmEvent: c = "form-submission"
|
|
2677
2706
|
}) => {
|
|
2678
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = A(), u =
|
|
2679
|
-
|
|
2707
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = A(), u = se(null);
|
|
2708
|
+
Ne(() => {
|
|
2680
2709
|
!n || o || !d || u.current && u.current.focus();
|
|
2681
2710
|
}, [d]);
|
|
2682
2711
|
const l = (f) => {
|
|
@@ -2690,7 +2719,7 @@ const vr = ({
|
|
|
2690
2719
|
"data-gtm-event-context": i,
|
|
2691
2720
|
"data-gtm-event-type": c,
|
|
2692
2721
|
children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
|
|
2693
|
-
/* @__PURE__ */ s.jsx(
|
|
2722
|
+
/* @__PURE__ */ s.jsx(de, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
|
|
2694
2723
|
/* @__PURE__ */ s.jsx(
|
|
2695
2724
|
"input",
|
|
2696
2725
|
{
|
|
@@ -2712,10 +2741,10 @@ const vr = ({
|
|
|
2712
2741
|
onClick: (f) => {
|
|
2713
2742
|
f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
|
|
2714
2743
|
},
|
|
2715
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2744
|
+
children: /* @__PURE__ */ s.jsx(de, { children: a.formatMessage({ id: "search_clear" }) })
|
|
2716
2745
|
}
|
|
2717
2746
|
),
|
|
2718
|
-
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(
|
|
2747
|
+
/* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(de, { children: a.formatMessage({ id: "search_cta" }) }) })
|
|
2719
2748
|
] }) })
|
|
2720
2749
|
}
|
|
2721
2750
|
);
|
|
@@ -2733,7 +2762,7 @@ const wr = ({
|
|
|
2733
2762
|
initialFormStatus: u = "NOT_SUBMITTED"
|
|
2734
2763
|
/* NOT_SUBMITTED */
|
|
2735
2764
|
}) => {
|
|
2736
|
-
const [l, f] =
|
|
2765
|
+
const [l, f] = L([]), [h, p] = L(!0), [_, j] = L(u), { formatMessage: g } = A(), E = async (M) => {
|
|
2737
2766
|
M.preventDefault();
|
|
2738
2767
|
try {
|
|
2739
2768
|
await a(l), f([]), j(
|
|
@@ -2762,11 +2791,11 @@ const wr = ({
|
|
|
2762
2791
|
" ",
|
|
2763
2792
|
g({ id: "inviteForm_error" })
|
|
2764
2793
|
] }) }),
|
|
2765
|
-
/* @__PURE__ */ s.jsx(
|
|
2794
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2766
2795
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2767
|
-
/* @__PURE__ */ s.jsx(
|
|
2768
|
-
/* @__PURE__ */ s.jsx(
|
|
2769
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
2796
|
+
/* @__PURE__ */ s.jsx(X, { variant: "secondary", onClick: k, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2797
|
+
/* @__PURE__ */ s.jsx(X, { onClick: T, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2798
|
+
] }) : /* @__PURE__ */ s.jsx(X, { onClick: k, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2770
2799
|
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
2771
2800
|
"form",
|
|
2772
2801
|
{
|
|
@@ -2788,16 +2817,16 @@ const wr = ({
|
|
|
2788
2817
|
f(M), p(!M.length);
|
|
2789
2818
|
},
|
|
2790
2819
|
autoFocus: !1,
|
|
2791
|
-
getLabel: (M, C,
|
|
2820
|
+
getLabel: (M, C, H) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
2792
2821
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: M }),
|
|
2793
2822
|
/* @__PURE__ */ s.jsx(
|
|
2794
|
-
|
|
2823
|
+
X,
|
|
2795
2824
|
{
|
|
2796
2825
|
variant: "tertiary",
|
|
2797
2826
|
size: "small",
|
|
2798
2827
|
icon: { icon: "close" },
|
|
2799
2828
|
onClick: () => {
|
|
2800
|
-
|
|
2829
|
+
H(C), p(!l.length);
|
|
2801
2830
|
},
|
|
2802
2831
|
className: "remove-email-button",
|
|
2803
2832
|
screenreaderText: g({ id: "overlay_close" })
|
|
@@ -2807,12 +2836,12 @@ const wr = ({
|
|
|
2807
2836
|
}
|
|
2808
2837
|
)
|
|
2809
2838
|
] }),
|
|
2810
|
-
/* @__PURE__ */ s.jsx(
|
|
2811
|
-
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(
|
|
2839
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2840
|
+
/* @__PURE__ */ s.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ s.jsx(X, { className: "sendEmailsButton", disabled: h, children: n }) })
|
|
2812
2841
|
]
|
|
2813
2842
|
}
|
|
2814
2843
|
) });
|
|
2815
|
-
},
|
|
2844
|
+
}, Q = {
|
|
2816
2845
|
timeouts: {},
|
|
2817
2846
|
handlerCalled: {},
|
|
2818
2847
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -2835,9 +2864,9 @@ const wr = ({
|
|
|
2835
2864
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
2836
2865
|
return;
|
|
2837
2866
|
const i = Date.now();
|
|
2838
|
-
if (!t &&
|
|
2867
|
+
if (!t && Q.handlerCalled[e] && i - Q.handlerCalled[e] < 500)
|
|
2839
2868
|
return;
|
|
2840
|
-
|
|
2869
|
+
Q.handlerCalled[e] = i;
|
|
2841
2870
|
let c = [{ type: `menus.${e}`, value: t }];
|
|
2842
2871
|
t === !0 && Object.keys(n).forEach((d) => {
|
|
2843
2872
|
d === e || n[d] === !1 || c.push({ type: `menus.${d}`, value: !1 });
|
|
@@ -2858,11 +2887,11 @@ const wr = ({
|
|
|
2858
2887
|
return e[r];
|
|
2859
2888
|
if (!t.includes("."))
|
|
2860
2889
|
continue;
|
|
2861
|
-
const i =
|
|
2890
|
+
const i = gn(e[r], t);
|
|
2862
2891
|
if (!(typeof i > "u") && (!n || i[t] && i[t].includes(n) || i.value && i.value.includes(n) || i.toString().includes(n)))
|
|
2863
2892
|
return e[r];
|
|
2864
2893
|
}
|
|
2865
|
-
return e[0].children ?
|
|
2894
|
+
return e[0].children ? Q.findFirstChild(e[0].children, t, n) : !1;
|
|
2866
2895
|
},
|
|
2867
2896
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: i }) => {
|
|
2868
2897
|
if (!t.current || !t.current.children)
|
|
@@ -2876,20 +2905,20 @@ const wr = ({
|
|
|
2876
2905
|
switch (e) {
|
|
2877
2906
|
case "navigation":
|
|
2878
2907
|
if (n) {
|
|
2879
|
-
const a =
|
|
2908
|
+
const a = Q.findFirstChild(
|
|
2880
2909
|
t.current.children,
|
|
2881
2910
|
"attributes.aria-controls",
|
|
2882
2911
|
"navigation"
|
|
2883
2912
|
);
|
|
2884
|
-
d =
|
|
2913
|
+
d = Q.findFirstChild(a.children, "href");
|
|
2885
2914
|
} else
|
|
2886
|
-
d =
|
|
2915
|
+
d = Q.findFirstChild(t.current.children, "href");
|
|
2887
2916
|
d || (d = t.current);
|
|
2888
2917
|
break;
|
|
2889
2918
|
case "account":
|
|
2890
|
-
if (o =
|
|
2919
|
+
if (o = Q.findFirstChild(t.current.children, "className", "account"), !o || !o.children)
|
|
2891
2920
|
return;
|
|
2892
|
-
d =
|
|
2921
|
+
d = Q.findFirstChild(o.children, "href");
|
|
2893
2922
|
break;
|
|
2894
2923
|
default:
|
|
2895
2924
|
return;
|
|
@@ -2898,21 +2927,21 @@ const wr = ({
|
|
|
2898
2927
|
},
|
|
2899
2928
|
events: {
|
|
2900
2929
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
2901
|
-
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(
|
|
2930
|
+
e.target && e.target.attributes && e.target.attributes.href || (e.preventDefault(), e.stopPropagation(), clearTimeout(Q.timeouts[t]), n(t, !r));
|
|
2902
2931
|
},
|
|
2903
2932
|
onFocus: ({ id: e }) => {
|
|
2904
|
-
clearTimeout(
|
|
2933
|
+
clearTimeout(Q.timeouts[e]);
|
|
2905
2934
|
},
|
|
2906
2935
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
2907
|
-
clearTimeout(
|
|
2936
|
+
clearTimeout(Q.timeouts[e]), t(e, !0);
|
|
2908
2937
|
},
|
|
2909
2938
|
onBlur: ({ id: e, callback: t }) => {
|
|
2910
|
-
|
|
2939
|
+
Q.timeouts[e] = setTimeout(() => {
|
|
2911
2940
|
t(e, !1);
|
|
2912
2941
|
}, 250);
|
|
2913
2942
|
}
|
|
2914
2943
|
}
|
|
2915
|
-
},
|
|
2944
|
+
}, et = {
|
|
2916
2945
|
order: ["home", "topics", "partners", "account"],
|
|
2917
2946
|
home: {
|
|
2918
2947
|
href: "/home/",
|
|
@@ -2988,7 +3017,7 @@ const wr = ({
|
|
|
2988
3017
|
props: { variant: "primary" }
|
|
2989
3018
|
}
|
|
2990
3019
|
}
|
|
2991
|
-
},
|
|
3020
|
+
}, tt = ({
|
|
2992
3021
|
id: e,
|
|
2993
3022
|
isLoggedIn: t = !1,
|
|
2994
3023
|
isDesktopVersion: n = !1,
|
|
@@ -2997,7 +3026,7 @@ const wr = ({
|
|
|
2997
3026
|
},
|
|
2998
3027
|
doTrack: c = null
|
|
2999
3028
|
}) => {
|
|
3000
|
-
const d = A(), o =
|
|
3029
|
+
const d = A(), o = gn(et, e);
|
|
3001
3030
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
3002
3031
|
return null;
|
|
3003
3032
|
const a = "doTrack" in o, u = c === null ? a ? o.doTrack : !0 : c, l = e.includes("buttons.");
|
|
@@ -3029,16 +3058,16 @@ const wr = ({
|
|
|
3029
3058
|
let g = {}, E = {};
|
|
3030
3059
|
if (p) {
|
|
3031
3060
|
const k = o.menuId || e, T = {
|
|
3032
|
-
onClick: (M) =>
|
|
3033
|
-
onFocus: () =>
|
|
3034
|
-
onBlur: () =>
|
|
3035
|
-
onMouseLeave: () =>
|
|
3036
|
-
onMouseEnter: () =>
|
|
3061
|
+
onClick: (M) => Q.events.onClick(M, { id: k, callback: i, isOpen: r[k] }),
|
|
3062
|
+
onFocus: () => Q.events.onFocus({ id: k }),
|
|
3063
|
+
onBlur: () => Q.events.onBlur({ id: k, callback: i }),
|
|
3064
|
+
onMouseLeave: () => Q.events.onBlur({ id: k, callback: i }),
|
|
3065
|
+
onMouseEnter: () => Q.events.onMouseEnter({ id: k, callback: i })
|
|
3037
3066
|
};
|
|
3038
3067
|
n && (_ && (g = {
|
|
3039
3068
|
...T,
|
|
3040
3069
|
onKeyPress: (M) => {
|
|
3041
|
-
M.key === "Enter" &&
|
|
3070
|
+
M.key === "Enter" && Q.events.onClick(M, { id: k, callback: i, isOpen: r[k] });
|
|
3042
3071
|
},
|
|
3043
3072
|
tabIndex: "0",
|
|
3044
3073
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
@@ -3051,7 +3080,7 @@ const wr = ({
|
|
|
3051
3080
|
});
|
|
3052
3081
|
}
|
|
3053
3082
|
return /* @__PURE__ */ s.jsxs("li", { className: S({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3054
|
-
h ? N.createElement(l ?
|
|
3083
|
+
h ? N.createElement(l ? X : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3055
3084
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: o.order.map((k) => {
|
|
3056
3085
|
if (!o[k])
|
|
3057
3086
|
return null;
|
|
@@ -3064,14 +3093,14 @@ const wr = ({
|
|
|
3064
3093
|
};
|
|
3065
3094
|
return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: S({ [o[k].className]: o[k].className }), children: [
|
|
3066
3095
|
d.formatMessage({ id: `${f}_${k}` }),
|
|
3067
|
-
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(
|
|
3068
|
-
] }, k) : /* @__PURE__ */ s.jsx(
|
|
3096
|
+
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(tt, { id: `${e}.${k}.${M}`, ...T }, M)) })
|
|
3097
|
+
] }, k) : /* @__PURE__ */ s.jsx(tt, { id: `${e}.${k}`, ...T }, k);
|
|
3069
3098
|
}) })
|
|
3070
3099
|
] }, e);
|
|
3071
3100
|
};
|
|
3072
|
-
const kr = { height: 67, height_desktop: 83 },
|
|
3073
|
-
const e = A(), t =
|
|
3074
|
-
() =>
|
|
3101
|
+
const kr = { height: 67, height_desktop: 83 }, Rn = () => {
|
|
3102
|
+
const e = A(), t = be(Te), n = at(!0, !0), r = t && typeof t.id == "string", i = nt(
|
|
3103
|
+
() => Q.getIsDesktopVersion(r, n),
|
|
3075
3104
|
[r, n]
|
|
3076
3105
|
), [c, d] = rs($s, {
|
|
3077
3106
|
headerIsVisible: !0,
|
|
@@ -3085,26 +3114,26 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3085
3114
|
scrollPosition: kr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3086
3115
|
callbacks: {
|
|
3087
3116
|
scrollUp: () => {
|
|
3088
|
-
!i && a.navigation ||
|
|
3117
|
+
!i && a.navigation || Q.shouldChangeHeaderIsVisible(!0, a, d);
|
|
3089
3118
|
},
|
|
3090
3119
|
scrollDown: () => {
|
|
3091
|
-
!i && a.navigation ||
|
|
3120
|
+
!i && a.navigation || Q.shouldChangeHeaderIsVisible(!1, a, d);
|
|
3092
3121
|
}
|
|
3093
3122
|
}
|
|
3094
3123
|
});
|
|
3095
3124
|
const l = (h, p) => {
|
|
3096
|
-
|
|
3097
|
-
}, f =
|
|
3098
|
-
return
|
|
3099
|
-
a.navigation &&
|
|
3125
|
+
Q.handleMenus({ id: h, value: p, menus: a, dispatch: d });
|
|
3126
|
+
}, f = se(null);
|
|
3127
|
+
return Ne(() => {
|
|
3128
|
+
a.navigation && Q.autoFocus({
|
|
3100
3129
|
menu: "navigation",
|
|
3101
3130
|
navigationRef: f,
|
|
3102
3131
|
isDesktopVersion: i.navigation,
|
|
3103
3132
|
focusElements: u,
|
|
3104
3133
|
dispatch: d
|
|
3105
3134
|
});
|
|
3106
|
-
}, [a.navigation]),
|
|
3107
|
-
a.account &&
|
|
3135
|
+
}, [a.navigation]), Ne(() => {
|
|
3136
|
+
a.account && Q.autoFocus({
|
|
3108
3137
|
menu: "account",
|
|
3109
3138
|
navigationRef: f,
|
|
3110
3139
|
isDesktopVersion: i.navigation,
|
|
@@ -3113,8 +3142,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3113
3142
|
});
|
|
3114
3143
|
}, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3115
3144
|
/* @__PURE__ */ s.jsxs("nav", { id: "header", className: S({ "logged-in": r, "logged-out": !r, visible: o }), children: [
|
|
3116
|
-
/* @__PURE__ */ s.jsx(
|
|
3117
|
-
/* @__PURE__ */ s.jsx(
|
|
3145
|
+
/* @__PURE__ */ s.jsx(de, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3146
|
+
/* @__PURE__ */ s.jsx(Cn, {}),
|
|
3118
3147
|
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3119
3148
|
"button",
|
|
3120
3149
|
{
|
|
@@ -3127,7 +3156,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3127
3156
|
"aria-haspopup": "true",
|
|
3128
3157
|
"aria-expanded": a.navigation,
|
|
3129
3158
|
"aria-controls": "navigation",
|
|
3130
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3159
|
+
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
|
|
3131
3160
|
}
|
|
3132
3161
|
),
|
|
3133
3162
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3138,8 +3167,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3138
3167
|
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3139
3168
|
role: "menu",
|
|
3140
3169
|
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3141
|
-
children:
|
|
3142
|
-
|
|
3170
|
+
children: et.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3171
|
+
tt,
|
|
3143
3172
|
{
|
|
3144
3173
|
id: h,
|
|
3145
3174
|
isLoggedIn: r,
|
|
@@ -3161,7 +3190,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3161
3190
|
"aria-haspopup": "true",
|
|
3162
3191
|
"aria-expanded": a.search,
|
|
3163
3192
|
"aria-controls": "search-form",
|
|
3164
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3193
|
+
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_search_${a.search ? "hide" : "show"}` }) })
|
|
3165
3194
|
}
|
|
3166
3195
|
),
|
|
3167
3196
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3177,18 +3206,18 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3177
3206
|
"button",
|
|
3178
3207
|
{
|
|
3179
3208
|
className: "account-button",
|
|
3180
|
-
onClick: (h) =>
|
|
3181
|
-
onMouseEnter: () =>
|
|
3182
|
-
onMouseLeave: () =>
|
|
3209
|
+
onClick: (h) => Q.events.onClick(h, { id: "account", callback: l, isOpen: a.account }),
|
|
3210
|
+
onMouseEnter: () => Q.events.onMouseEnter({ id: "account", callback: l }),
|
|
3211
|
+
onMouseLeave: () => Q.events.onBlur({ id: "account", callback: l }),
|
|
3183
3212
|
"aria-haspopup": "true",
|
|
3184
3213
|
"aria-expanded": a.account,
|
|
3185
3214
|
"aria-controls": "navigation",
|
|
3186
3215
|
children: [
|
|
3187
|
-
/* @__PURE__ */ s.jsx(
|
|
3188
|
-
/* @__PURE__ */ s.jsx(
|
|
3216
|
+
/* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_account_${a.account ? "hide" : "show"}` }) }),
|
|
3217
|
+
/* @__PURE__ */ s.jsx(It, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3189
3218
|
]
|
|
3190
3219
|
}
|
|
3191
|
-
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children:
|
|
3220
|
+
) : /* @__PURE__ */ s.jsx("ul", { className: "sign-in-buttons", children: et.buttons.order.map((h) => /* @__PURE__ */ s.jsx(tt, { id: `buttons.${h}` }, h)) })
|
|
3192
3221
|
] }),
|
|
3193
3222
|
/* @__PURE__ */ s.jsx("hr", { id: "content-of-page" }),
|
|
3194
3223
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3202,26 +3231,26 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3202
3231
|
const jr = () => {
|
|
3203
3232
|
const e = A();
|
|
3204
3233
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3205
|
-
/* @__PURE__ */ s.jsx(
|
|
3206
|
-
/* @__PURE__ */ s.jsx("div", {
|
|
3207
|
-
/* @__PURE__ */ s.jsx(
|
|
3234
|
+
/* @__PURE__ */ s.jsx(Rn, {}),
|
|
3235
|
+
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(ct, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3236
|
+
/* @__PURE__ */ s.jsx(Dn, {})
|
|
3208
3237
|
] });
|
|
3209
3238
|
}, Mo = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: i = "", locale: c = "en" }) => {
|
|
3210
3239
|
const d = Es();
|
|
3211
|
-
|
|
3240
|
+
Z(() => {
|
|
3212
3241
|
window.scrollTo(0, 0);
|
|
3213
3242
|
}, [d]);
|
|
3214
|
-
const o =
|
|
3243
|
+
const o = kn(e, { locale: c });
|
|
3215
3244
|
return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: S(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
|
|
3216
|
-
/* @__PURE__ */ s.jsx(
|
|
3217
|
-
/* @__PURE__ */ s.jsx("div", {
|
|
3218
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3245
|
+
/* @__PURE__ */ s.jsx(Rn, {}),
|
|
3246
|
+
/* @__PURE__ */ s.jsx("div", { id: "content", children: o }),
|
|
3247
|
+
n && /* @__PURE__ */ s.jsx(Dn, {}),
|
|
3219
3248
|
/* @__PURE__ */ s.jsx(_r, {})
|
|
3220
3249
|
] }) }) }) });
|
|
3221
|
-
},
|
|
3250
|
+
}, mn = {
|
|
3222
3251
|
default: "tags_",
|
|
3223
3252
|
headerTopics: "header_topics_topics_"
|
|
3224
|
-
},
|
|
3253
|
+
}, Tt = {
|
|
3225
3254
|
topic: {
|
|
3226
3255
|
Climate: "climate",
|
|
3227
3256
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3240,13 +3269,13 @@ const jr = () => {
|
|
|
3240
3269
|
}, yr = {
|
|
3241
3270
|
getTagDetails: (e) => {
|
|
3242
3271
|
if (e.includes("topic_")) {
|
|
3243
|
-
if (e =
|
|
3244
|
-
const t =
|
|
3245
|
-
return t ? { id: e, href: t, text: `${
|
|
3272
|
+
if (e = Tt.topic[e.replace("topic_", "")], e) {
|
|
3273
|
+
const t = et.topics.topics[e].href;
|
|
3274
|
+
return t ? { id: e, href: t, text: `${mn.headerTopics}${e}` } : null;
|
|
3246
3275
|
}
|
|
3247
3276
|
return null;
|
|
3248
3277
|
}
|
|
3249
|
-
return
|
|
3278
|
+
return Tt[e] ? (e = Tt[e], { id: e, text: `${mn.default}${e}` }) : null;
|
|
3250
3279
|
}
|
|
3251
3280
|
};
|
|
3252
3281
|
const Co = ({
|
|
@@ -3295,7 +3324,7 @@ const Do = ({
|
|
|
3295
3324
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: e })
|
|
3296
3325
|
] }),
|
|
3297
3326
|
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3298
|
-
/* @__PURE__ */ s.jsx(
|
|
3327
|
+
/* @__PURE__ */ s.jsx(Ht, { member: o, gtmContext: r, gtmType: i }),
|
|
3299
3328
|
o.isAdmin && /* @__PURE__ */ s.jsx(qs, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3300
3329
|
] }, a)) }),
|
|
3301
3330
|
n && /* @__PURE__ */ s.jsx(
|
|
@@ -3308,8 +3337,8 @@ const Do = ({
|
|
|
3308
3337
|
)
|
|
3309
3338
|
] }));
|
|
3310
3339
|
};
|
|
3311
|
-
let
|
|
3312
|
-
const
|
|
3340
|
+
let Ze = null;
|
|
3341
|
+
const he = "discussion_form_", Fn = ({
|
|
3313
3342
|
content: e = { type: "response", slugs: {} },
|
|
3314
3343
|
userHasPermissions: t = !0,
|
|
3315
3344
|
meta: n = {
|
|
@@ -3340,97 +3369,97 @@ const me = "discussion_form_", Pn = ({
|
|
|
3340
3369
|
},
|
|
3341
3370
|
gtmContext: a = "DiscussionForm"
|
|
3342
3371
|
}) => {
|
|
3343
|
-
var b,
|
|
3344
|
-
const u = A(), l =
|
|
3372
|
+
var b, U;
|
|
3373
|
+
const u = A(), l = be(Te), [f, h] = L(
|
|
3345
3374
|
n.isEditing && n.isEditing.text || ""
|
|
3346
|
-
), [p, _] =
|
|
3375
|
+
), [p, _] = L(d.error || !1), [j, g] = L(!1), E = se(null);
|
|
3347
3376
|
if (r || (r = E), n.isLoading)
|
|
3348
3377
|
return /* @__PURE__ */ s.jsx(
|
|
3349
|
-
|
|
3378
|
+
ye,
|
|
3350
3379
|
{
|
|
3351
3380
|
className: "discussion-card discussion-form",
|
|
3352
3381
|
"data-testid": "loading-placeholder"
|
|
3353
3382
|
}
|
|
3354
3383
|
);
|
|
3355
|
-
const k = (
|
|
3356
|
-
const
|
|
3357
|
-
h(
|
|
3358
|
-
let
|
|
3359
|
-
!l || !l.id ?
|
|
3384
|
+
const k = (v) => {
|
|
3385
|
+
const G = v.target.value;
|
|
3386
|
+
h(G);
|
|
3387
|
+
let O;
|
|
3388
|
+
!l || !l.id ? O = xe(
|
|
3360
3389
|
u.formatMessage,
|
|
3361
|
-
`${
|
|
3390
|
+
`${he}error_loggedOut`,
|
|
3362
3391
|
e.type,
|
|
3363
3392
|
"action"
|
|
3364
|
-
) : t ?
|
|
3393
|
+
) : t ? G.length >= i && (O = `${he}error_tooLong`) : O = xe(
|
|
3365
3394
|
u.formatMessage,
|
|
3366
|
-
`${
|
|
3395
|
+
`${he}error_noPermission`,
|
|
3367
3396
|
e.type,
|
|
3368
3397
|
"action"
|
|
3369
|
-
),
|
|
3398
|
+
), O ? _(O) : p && _(!1);
|
|
3370
3399
|
};
|
|
3371
3400
|
let T = `${e.type}-form`;
|
|
3372
3401
|
if (e.type === "response" || e.type === "reply") {
|
|
3373
|
-
const
|
|
3374
|
-
|
|
3402
|
+
const v = e.type === "response" ? ((b = e.slugs) == null ? void 0 : b.question) || "" : ((U = e.slugs) == null ? void 0 : U.answer) || "";
|
|
3403
|
+
v && (T = `${T}-${v.slice(-15)}`);
|
|
3375
3404
|
}
|
|
3376
|
-
const M = async (
|
|
3377
|
-
var
|
|
3378
|
-
if (
|
|
3405
|
+
const M = async (v) => {
|
|
3406
|
+
var O;
|
|
3407
|
+
if (v.preventDefault(), v.stopPropagation(), !l || !l.id || !t || H)
|
|
3379
3408
|
return;
|
|
3380
|
-
|
|
3381
|
-
const
|
|
3409
|
+
Ze && clearTimeout(Ze), g("submitting");
|
|
3410
|
+
const G = window.location.pathname;
|
|
3382
3411
|
try {
|
|
3383
|
-
let
|
|
3412
|
+
let B;
|
|
3384
3413
|
switch (e.type) {
|
|
3385
3414
|
case "post":
|
|
3386
|
-
|
|
3415
|
+
B = await o.create({ content: f });
|
|
3387
3416
|
break;
|
|
3388
3417
|
case "question":
|
|
3389
|
-
|
|
3418
|
+
B = await o.create({
|
|
3390
3419
|
title: f,
|
|
3391
3420
|
authorId: l && l.id,
|
|
3392
|
-
...(
|
|
3421
|
+
...(O = o.props) == null ? void 0 : O.create
|
|
3393
3422
|
});
|
|
3394
3423
|
break;
|
|
3395
3424
|
case "response":
|
|
3396
|
-
|
|
3425
|
+
B = await o.create(
|
|
3397
3426
|
{ question: e.slugs.question },
|
|
3398
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3427
|
+
{ body: f, authorId: l && l.id, contentPath: G }
|
|
3399
3428
|
);
|
|
3400
3429
|
break;
|
|
3401
3430
|
case "reply":
|
|
3402
|
-
|
|
3431
|
+
B = await o.create(
|
|
3403
3432
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3404
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3433
|
+
{ body: f, authorId: l && l.id, contentPath: G }
|
|
3405
3434
|
);
|
|
3406
3435
|
break;
|
|
3407
3436
|
default:
|
|
3408
3437
|
break;
|
|
3409
3438
|
}
|
|
3410
|
-
await Ds(1e3), o.callback && await o.callback(
|
|
3439
|
+
await Ds(1e3), o.callback && await o.callback(B), Ze = setTimeout(() => {
|
|
3411
3440
|
h(""), g("submitted"), C();
|
|
3412
3441
|
}, 500);
|
|
3413
|
-
} catch (
|
|
3414
|
-
const
|
|
3415
|
-
let
|
|
3416
|
-
|
|
3442
|
+
} catch (B) {
|
|
3443
|
+
const W = B;
|
|
3444
|
+
let V = `${he}error`;
|
|
3445
|
+
W.message.includes("entry already exists") && (V = xe(
|
|
3417
3446
|
u.formatMessage,
|
|
3418
|
-
`${
|
|
3447
|
+
`${he}error_alreadyExists`,
|
|
3419
3448
|
e.type,
|
|
3420
3449
|
"action"
|
|
3421
|
-
)),
|
|
3450
|
+
)), W.message.includes("429") ? V = xe(
|
|
3422
3451
|
u.formatMessage,
|
|
3423
|
-
`${
|
|
3452
|
+
`${he}error_tooMany`,
|
|
3424
3453
|
e.type,
|
|
3425
3454
|
"action"
|
|
3426
|
-
) :
|
|
3455
|
+
) : W.message.includes("400") && (V = `${he}error`), _(V), C();
|
|
3427
3456
|
}
|
|
3428
3457
|
}, C = () => {
|
|
3429
|
-
|
|
3458
|
+
Ze = setTimeout(() => {
|
|
3430
3459
|
_(!1), g(!1);
|
|
3431
3460
|
}, 5e3);
|
|
3432
|
-
},
|
|
3433
|
-
return (n.isEditing && !
|
|
3461
|
+
}, H = !f || !Ls(f), Y = j === "submitting", x = [];
|
|
3462
|
+
return (n.isEditing && !Y || d.cancel) && x.push({
|
|
3434
3463
|
variant: "secondary",
|
|
3435
3464
|
size: { mobile: "small", 600: "medium" },
|
|
3436
3465
|
onClick: o.handleCancel,
|
|
@@ -3438,26 +3467,26 @@ const me = "discussion_form_", Pn = ({
|
|
|
3438
3467
|
"data-gtm-event-context": a,
|
|
3439
3468
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3440
3469
|
disabled: !d.cancel && (!l || !l.id || !f),
|
|
3441
|
-
children: u.formatMessage({ id: `${
|
|
3470
|
+
children: u.formatMessage({ id: `${he}cancel` })
|
|
3442
3471
|
}), x.push({
|
|
3443
3472
|
variant: "primary",
|
|
3444
3473
|
size: { mobile: "small", 600: "medium" },
|
|
3445
|
-
onClick: (
|
|
3474
|
+
onClick: (v) => {
|
|
3446
3475
|
if (n.isEditing) {
|
|
3447
3476
|
g("submitting"), o.handleSaveEdit && o.handleSaveEdit(
|
|
3448
3477
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3449
3478
|
);
|
|
3450
3479
|
return;
|
|
3451
3480
|
}
|
|
3452
|
-
M(
|
|
3481
|
+
M(v);
|
|
3453
3482
|
},
|
|
3454
3483
|
className: "gtm-trackable",
|
|
3455
3484
|
"data-gtm-event-context": a,
|
|
3456
3485
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
3457
3486
|
"data-testid": "save-button",
|
|
3458
|
-
disabled: !l || !l.id || !t ||
|
|
3487
|
+
disabled: !l || !l.id || !t || H || Y || n.isEditing && f === n.isEditing.text,
|
|
3459
3488
|
children: u.formatMessage({
|
|
3460
|
-
id: `${
|
|
3489
|
+
id: `${he}${Y ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3461
3490
|
})
|
|
3462
3491
|
}), /* @__PURE__ */ s.jsxs(
|
|
3463
3492
|
"form",
|
|
@@ -3468,25 +3497,25 @@ const me = "discussion_form_", Pn = ({
|
|
|
3468
3497
|
}),
|
|
3469
3498
|
"data-testid": `discussion-${e.type}-form`,
|
|
3470
3499
|
children: [
|
|
3471
|
-
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children:
|
|
3500
|
+
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ s.jsx("h2", { children: xe(u.formatMessage, `${he}title`, e.type, "action") }),
|
|
3472
3501
|
/* @__PURE__ */ s.jsx(
|
|
3473
|
-
|
|
3502
|
+
Ht,
|
|
3474
3503
|
{
|
|
3475
3504
|
member: l || "community",
|
|
3476
3505
|
gtmContext: a,
|
|
3477
3506
|
gtmType: "profile-click"
|
|
3478
3507
|
}
|
|
3479
3508
|
),
|
|
3480
|
-
/* @__PURE__ */ s.jsx(
|
|
3509
|
+
/* @__PURE__ */ s.jsx(de, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: xe(u.formatMessage, `${he}label`, e.type, "action") }),
|
|
3481
3510
|
/* @__PURE__ */ s.jsx(
|
|
3482
3511
|
_s,
|
|
3483
3512
|
{
|
|
3484
3513
|
ref: r,
|
|
3485
3514
|
id: `${T}-input`,
|
|
3486
3515
|
name: e.type,
|
|
3487
|
-
placeholder:
|
|
3516
|
+
placeholder: xe(
|
|
3488
3517
|
u.formatMessage,
|
|
3489
|
-
`${
|
|
3518
|
+
`${he}placeholder`,
|
|
3490
3519
|
e.type,
|
|
3491
3520
|
"action"
|
|
3492
3521
|
),
|
|
@@ -3499,8 +3528,8 @@ const me = "discussion_form_", Pn = ({
|
|
|
3499
3528
|
autoFocus: !!n.isEditing
|
|
3500
3529
|
}
|
|
3501
3530
|
),
|
|
3502
|
-
/* @__PURE__ */ s.jsx("small", { children:
|
|
3503
|
-
a: (
|
|
3531
|
+
/* @__PURE__ */ s.jsx("small", { children: xe(u.formatMessage, `${he}explainer`, e.type, "action", {
|
|
3532
|
+
a: (v) => /* @__PURE__ */ s.jsx(
|
|
3504
3533
|
"a",
|
|
3505
3534
|
{
|
|
3506
3535
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3509,13 +3538,13 @@ const me = "discussion_form_", Pn = ({
|
|
|
3509
3538
|
"data-gtm-event-context": a,
|
|
3510
3539
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3511
3540
|
rel: "noreferrer",
|
|
3512
|
-
children:
|
|
3541
|
+
children: v
|
|
3513
3542
|
}
|
|
3514
3543
|
)
|
|
3515
3544
|
}) }),
|
|
3516
|
-
/* @__PURE__ */ s.jsx(
|
|
3517
|
-
j === "submitted" && /* @__PURE__ */ s.jsx(
|
|
3518
|
-
p && /* @__PURE__ */ s.jsx(
|
|
3545
|
+
/* @__PURE__ */ s.jsx(it, { buttons: x }),
|
|
3546
|
+
j === "submitted" && /* @__PURE__ */ s.jsx(Ft, { className: "success", "data-testid": "success", children: xe(u.formatMessage, `${he}success`, e.type, "action") }),
|
|
3547
|
+
p && /* @__PURE__ */ s.jsx(Ft, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof p == "string" ? p.includes(" ") ? p : u.formatMessage(
|
|
3519
3548
|
{ id: p },
|
|
3520
3549
|
{
|
|
3521
3550
|
action: u.formatMessage({
|
|
@@ -3527,20 +3556,20 @@ const me = "discussion_form_", Pn = ({
|
|
|
3527
3556
|
]
|
|
3528
3557
|
}
|
|
3529
3558
|
);
|
|
3530
|
-
},
|
|
3559
|
+
}, Qt = ({
|
|
3531
3560
|
contentType: e,
|
|
3532
3561
|
createPost: t,
|
|
3533
3562
|
membershipRequiredToPost: { isMember: n, required: r, join: i, leave: c, notMemberStateText: d }
|
|
3534
3563
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
3535
|
-
|
|
3564
|
+
ct,
|
|
3536
3565
|
{
|
|
3537
3566
|
text: d,
|
|
3538
3567
|
button: {
|
|
3539
|
-
component: /* @__PURE__ */ s.jsx(
|
|
3568
|
+
component: /* @__PURE__ */ s.jsx(Mn, { functions: { join: i, leave: c } })
|
|
3540
3569
|
}
|
|
3541
3570
|
}
|
|
3542
3571
|
) : /* @__PURE__ */ s.jsx(
|
|
3543
|
-
|
|
3572
|
+
Fn,
|
|
3544
3573
|
{
|
|
3545
3574
|
content: { type: e, slugs: {} },
|
|
3546
3575
|
functions: {
|
|
@@ -3550,12 +3579,12 @@ const me = "discussion_form_", Pn = ({
|
|
|
3550
3579
|
), Er = {
|
|
3551
3580
|
showThread: !1,
|
|
3552
3581
|
showForm: !1
|
|
3553
|
-
},
|
|
3554
|
-
const [t, n] =
|
|
3582
|
+
}, dt = Ot(Er), Sr = ({ children: e }) => {
|
|
3583
|
+
const [t, n] = L({
|
|
3555
3584
|
showThread: !1,
|
|
3556
3585
|
showForm: !1
|
|
3557
3586
|
});
|
|
3558
|
-
return /* @__PURE__ */ s.jsx(
|
|
3587
|
+
return /* @__PURE__ */ s.jsx(dt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3559
3588
|
}, Tr = ({
|
|
3560
3589
|
question: e,
|
|
3561
3590
|
answer: t,
|
|
@@ -3565,10 +3594,10 @@ const me = "discussion_form_", Pn = ({
|
|
|
3565
3594
|
...t && { answerSlug: t },
|
|
3566
3595
|
...n && { replySlug: n }
|
|
3567
3596
|
}), $r = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3568
|
-
let
|
|
3569
|
-
const
|
|
3570
|
-
|
|
3571
|
-
},
|
|
3597
|
+
let Ie = !1;
|
|
3598
|
+
const $t = () => {
|
|
3599
|
+
Ie !== !1 && (clearTimeout(Ie), Ie = !1);
|
|
3600
|
+
}, Mt = 10, Mr = ({
|
|
3572
3601
|
element: e = "div",
|
|
3573
3602
|
likes: t = 0,
|
|
3574
3603
|
peopleWhoLiked: n = !1,
|
|
@@ -3581,24 +3610,24 @@ const St = () => {
|
|
|
3581
3610
|
} } = {}
|
|
3582
3611
|
}) => {
|
|
3583
3612
|
const u = A();
|
|
3584
|
-
|
|
3613
|
+
Z(() => {
|
|
3585
3614
|
p(i);
|
|
3586
3615
|
}, [i]);
|
|
3587
|
-
const [l, f] =
|
|
3588
|
-
if (C.preventDefault(), C.stopPropagation(), E(!1),
|
|
3589
|
-
return
|
|
3590
|
-
if (
|
|
3616
|
+
const [l, f] = L(t), [h, p] = L(i), [_, j] = L(!1), [g, E] = L(!1), k = nt(() => $r(n, Mt), [n]), T = (C) => {
|
|
3617
|
+
if (C.preventDefault(), C.stopPropagation(), E(!1), Ie)
|
|
3618
|
+
return $t(), !1;
|
|
3619
|
+
if ($t(), _ || !d)
|
|
3591
3620
|
return !1;
|
|
3592
|
-
|
|
3621
|
+
Ie = setTimeout(M, 350);
|
|
3593
3622
|
}, M = async () => {
|
|
3594
|
-
if (
|
|
3623
|
+
if ($t(), _ || !d)
|
|
3595
3624
|
return !1;
|
|
3596
3625
|
let C = h ? l - 1 : l + 1;
|
|
3597
3626
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
3598
3627
|
try {
|
|
3599
3628
|
if (c && c.slugs) {
|
|
3600
|
-
const
|
|
3601
|
-
h ? await a(
|
|
3629
|
+
const H = Tr(c.slugs);
|
|
3630
|
+
h ? await a(H) : await o(H, { contentPath: window.location.pathname });
|
|
3602
3631
|
}
|
|
3603
3632
|
} catch {
|
|
3604
3633
|
f(t), p(i);
|
|
@@ -3625,7 +3654,7 @@ const St = () => {
|
|
|
3625
3654
|
},
|
|
3626
3655
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3627
3656
|
/* @__PURE__ */ s.jsx(
|
|
3628
|
-
|
|
3657
|
+
X,
|
|
3629
3658
|
{
|
|
3630
3659
|
variant: "tertiary",
|
|
3631
3660
|
size: "medium",
|
|
@@ -3644,8 +3673,8 @@ const St = () => {
|
|
|
3644
3673
|
),
|
|
3645
3674
|
/* @__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 }) }),
|
|
3646
3675
|
n && /* @__PURE__ */ s.jsx(Hs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3647
|
-
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3648
|
-
n.length >
|
|
3676
|
+
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(lt, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
|
|
3677
|
+
n.length > Mt && /* @__PURE__ */ s.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Mt }) })
|
|
3649
3678
|
] }) })
|
|
3650
3679
|
] })
|
|
3651
3680
|
}
|
|
@@ -3659,7 +3688,7 @@ const Cr = ({ element: e = "section", children: t, className: n, ...r }) => N.cr
|
|
|
3659
3688
|
...r
|
|
3660
3689
|
}
|
|
3661
3690
|
);
|
|
3662
|
-
const
|
|
3691
|
+
const Ln = ({
|
|
3663
3692
|
id: e = "content-overlay",
|
|
3664
3693
|
isOpen: t = !1,
|
|
3665
3694
|
showDivider: n = !0,
|
|
@@ -3674,10 +3703,10 @@ const Rn = ({
|
|
|
3674
3703
|
className: l = "",
|
|
3675
3704
|
gtmContext: f = "Modal"
|
|
3676
3705
|
}) => {
|
|
3677
|
-
const h = A(), [p, _] =
|
|
3706
|
+
const h = A(), [p, _] = L(t), j = (E) => {
|
|
3678
3707
|
_(E), E ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
|
|
3679
3708
|
};
|
|
3680
|
-
|
|
3709
|
+
Z(() => {
|
|
3681
3710
|
j(t);
|
|
3682
3711
|
}, [t]);
|
|
3683
3712
|
const g = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
@@ -3692,7 +3721,7 @@ const Rn = ({
|
|
|
3692
3721
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3693
3722
|
o && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: o }),
|
|
3694
3723
|
/* @__PURE__ */ s.jsx(
|
|
3695
|
-
|
|
3724
|
+
X,
|
|
3696
3725
|
{
|
|
3697
3726
|
variant: "tertiary",
|
|
3698
3727
|
size: "medium",
|
|
@@ -3705,13 +3734,13 @@ const Rn = ({
|
|
|
3705
3734
|
}
|
|
3706
3735
|
)
|
|
3707
3736
|
] }),
|
|
3708
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3737
|
+
n && /* @__PURE__ */ s.jsx(Ae, {}),
|
|
3709
3738
|
a,
|
|
3710
3739
|
u && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3711
|
-
/* @__PURE__ */ s.jsx(
|
|
3712
|
-
/* @__PURE__ */ s.jsx(
|
|
3740
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
3741
|
+
/* @__PURE__ */ s.jsx(it, { buttons: u })
|
|
3713
3742
|
] }),
|
|
3714
|
-
d && /* @__PURE__ */ s.jsx(
|
|
3743
|
+
d && /* @__PURE__ */ s.jsx(Ft, { className: "error", children: d })
|
|
3715
3744
|
] })
|
|
3716
3745
|
}
|
|
3717
3746
|
) });
|
|
@@ -3725,20 +3754,21 @@ const No = ({
|
|
|
3725
3754
|
showModal: t = !0,
|
|
3726
3755
|
title: n,
|
|
3727
3756
|
formTitle: r = "Know someone who might like to join this workshop?",
|
|
3728
|
-
formLabel: i = "
|
|
3729
|
-
ctaMessage: c = "Send
|
|
3757
|
+
formLabel: i = "Invite your colleagues by typing or pasting their emails below.",
|
|
3758
|
+
ctaMessage: c = "Send",
|
|
3730
3759
|
showIcon: d,
|
|
3731
3760
|
onClose: o,
|
|
3732
3761
|
reportError: a = () => {
|
|
3733
3762
|
},
|
|
3734
3763
|
sendInvites: u
|
|
3735
3764
|
}) => /* @__PURE__ */ s.jsx(
|
|
3736
|
-
|
|
3765
|
+
Ln,
|
|
3737
3766
|
{
|
|
3738
3767
|
title: n,
|
|
3739
3768
|
isOpen: t,
|
|
3740
3769
|
showDivider: !1,
|
|
3741
3770
|
showIcon: d,
|
|
3771
|
+
functions: { onClose: o },
|
|
3742
3772
|
className: S("invite-modal", e, { success: !!n }),
|
|
3743
3773
|
children: /* @__PURE__ */ s.jsx(
|
|
3744
3774
|
wr,
|
|
@@ -3752,11 +3782,11 @@ const No = ({
|
|
|
3752
3782
|
}
|
|
3753
3783
|
)
|
|
3754
3784
|
}
|
|
3755
|
-
),
|
|
3785
|
+
), fn = (e) => {
|
|
3756
3786
|
const t = {};
|
|
3757
3787
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3758
|
-
},
|
|
3759
|
-
const
|
|
3788
|
+
}, Ut = (e, t) => e && !t;
|
|
3789
|
+
const we = "discussion_", Nr = 280, ut = ({
|
|
3760
3790
|
element: e = "div",
|
|
3761
3791
|
content: t,
|
|
3762
3792
|
userHasPermissions: n = !0,
|
|
@@ -3783,49 +3813,49 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3783
3813
|
children: _,
|
|
3784
3814
|
isTruncated: j = !1
|
|
3785
3815
|
}) => {
|
|
3786
|
-
const g = A(), E =
|
|
3816
|
+
const g = A(), E = be(Te), k = be(dt), [T, M] = L({
|
|
3787
3817
|
body: t && t.body || "",
|
|
3788
3818
|
isEditing: !1,
|
|
3789
3819
|
didEdit: t && t.isEdited || !1
|
|
3790
|
-
}), [C,
|
|
3791
|
-
if (
|
|
3820
|
+
}), [C, H] = L(!1), [Y, x] = L("");
|
|
3821
|
+
if (Z(() => {
|
|
3792
3822
|
M({
|
|
3793
3823
|
...T,
|
|
3794
3824
|
body: t && t.body || "",
|
|
3795
3825
|
didEdit: t && t.isEdited || !1
|
|
3796
3826
|
});
|
|
3797
3827
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3798
|
-
return /* @__PURE__ */ s.jsx(
|
|
3799
|
-
const { author: b, canLike:
|
|
3828
|
+
return /* @__PURE__ */ s.jsx(ye, { className: "discussion-card discussion-post" });
|
|
3829
|
+
const { author: b, canLike: U, createdAt: v, id: G, likes: O = 0, userLiked: B, comments: W = 0 } = t, V = j ? st(T.body, Nr) : T.body, K = E && E.id && typeof b != "string" && b.id && b.id === E.id || !1, oe = typeof U == "boolean" ? U : n ? !K : !1, ae = async (P) => {
|
|
3800
3830
|
P || (P = ""), x("");
|
|
3801
3831
|
try {
|
|
3802
3832
|
if (!xs(P, T.body)) {
|
|
3803
3833
|
const te = t.type === "question" ? { title: P } : { body: P };
|
|
3804
|
-
await o(
|
|
3834
|
+
await o(fn(t.slugs), te);
|
|
3805
3835
|
}
|
|
3806
3836
|
M({ body: P, isEditing: !1, didEdit: !0 });
|
|
3807
3837
|
} catch {
|
|
3808
|
-
x(`${
|
|
3838
|
+
x(`${we}form_error`);
|
|
3809
3839
|
}
|
|
3810
|
-
},
|
|
3840
|
+
}, ie = () => {
|
|
3811
3841
|
k && k.updateConversation && k.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3812
|
-
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`,
|
|
3813
|
-
|
|
3842
|
+
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, ce = document.getElementById(te), ne = document.getElementById(`${te}-input`);
|
|
3843
|
+
ne && ne.focus(), ce && ce.scrollIntoView({ behavior: "smooth" });
|
|
3814
3844
|
}, 0);
|
|
3815
|
-
},
|
|
3845
|
+
}, le = () => {
|
|
3816
3846
|
try {
|
|
3817
|
-
d(
|
|
3847
|
+
d(fn(t.slugs));
|
|
3818
3848
|
} catch {
|
|
3819
3849
|
x("delete-error");
|
|
3820
3850
|
}
|
|
3821
|
-
},
|
|
3851
|
+
}, re = [
|
|
3822
3852
|
{
|
|
3823
|
-
text: g.formatMessage({ id: `${
|
|
3853
|
+
text: g.formatMessage({ id: `${we}moreMenu_report` }),
|
|
3824
3854
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3825
|
-
g.formatMessage({ id: `${
|
|
3855
|
+
g.formatMessage({ id: `${we}report_subject` })
|
|
3826
3856
|
)}&body=${encodeURI(
|
|
3827
3857
|
g.formatMessage(
|
|
3828
|
-
{ id: `${
|
|
3858
|
+
{ id: `${we}report_body` },
|
|
3829
3859
|
{
|
|
3830
3860
|
contentType: t.type || "",
|
|
3831
3861
|
contentSlug: t.slug || "",
|
|
@@ -3836,9 +3866,9 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3836
3866
|
icon: "flag"
|
|
3837
3867
|
}
|
|
3838
3868
|
];
|
|
3839
|
-
return n &&
|
|
3869
|
+
return n && K && re.push(
|
|
3840
3870
|
{
|
|
3841
|
-
text: g.formatMessage({ id: `${
|
|
3871
|
+
text: g.formatMessage({ id: `${we}moreMenu_edit` }),
|
|
3842
3872
|
onClick: () => M({ ...T, isEditing: !0 }),
|
|
3843
3873
|
icon: "pencil-paper",
|
|
3844
3874
|
className: "gtm-trackable",
|
|
@@ -3846,9 +3876,9 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3846
3876
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3847
3877
|
},
|
|
3848
3878
|
{
|
|
3849
|
-
text: g.formatMessage({ id: `${
|
|
3879
|
+
text: g.formatMessage({ id: `${we}moreMenu_delete` }),
|
|
3850
3880
|
onClick: (P) => {
|
|
3851
|
-
P.preventDefault(), P.stopPropagation(),
|
|
3881
|
+
P.preventDefault(), P.stopPropagation(), H(!0);
|
|
3852
3882
|
},
|
|
3853
3883
|
icon: "trash",
|
|
3854
3884
|
className: "gtm-trackable",
|
|
@@ -3863,7 +3893,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3863
3893
|
/* @__PURE__ */ s.jsxs(
|
|
3864
3894
|
"div",
|
|
3865
3895
|
{
|
|
3866
|
-
id:
|
|
3896
|
+
id: G || t.slug,
|
|
3867
3897
|
className: S("discussion-card", t.type, {
|
|
3868
3898
|
editing: T.isEditing,
|
|
3869
3899
|
"has-link": f.post && !T.isEditing
|
|
@@ -3873,17 +3903,17 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3873
3903
|
},
|
|
3874
3904
|
children: [
|
|
3875
3905
|
!T.isEditing && /* @__PURE__ */ s.jsx(
|
|
3876
|
-
|
|
3906
|
+
Ht,
|
|
3877
3907
|
{
|
|
3878
3908
|
member: b,
|
|
3879
|
-
additionalContent: { createdAt:
|
|
3909
|
+
additionalContent: { createdAt: v, didEdit: T.didEdit },
|
|
3880
3910
|
className: typeof b != "string" && b.id === i ? "highlighted" : "",
|
|
3881
3911
|
gtmContext: p,
|
|
3882
3912
|
gtmType: "profile-click"
|
|
3883
3913
|
}
|
|
3884
3914
|
),
|
|
3885
3915
|
T.isEditing ? /* @__PURE__ */ s.jsx(
|
|
3886
|
-
|
|
3916
|
+
Fn,
|
|
3887
3917
|
{
|
|
3888
3918
|
content: { type: t.type, slugs: t.slugs },
|
|
3889
3919
|
userHasPermissions: n,
|
|
@@ -3894,8 +3924,8 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3894
3924
|
},
|
|
3895
3925
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3896
3926
|
forceShow: {
|
|
3897
|
-
error:
|
|
3898
|
-
{ id:
|
|
3927
|
+
error: Y !== "" && Y !== "delete-error" ? g.formatMessage(
|
|
3928
|
+
{ id: Y },
|
|
3899
3929
|
{
|
|
3900
3930
|
action: g.formatMessage({
|
|
3901
3931
|
id: `discussion_action_${t.type}`
|
|
@@ -3905,7 +3935,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3905
3935
|
},
|
|
3906
3936
|
functions: {
|
|
3907
3937
|
create: c,
|
|
3908
|
-
handleSaveEdit:
|
|
3938
|
+
handleSaveEdit: ae,
|
|
3909
3939
|
handleCancel: () => {
|
|
3910
3940
|
x(""), M({ ...T, isEditing: !1 });
|
|
3911
3941
|
}
|
|
@@ -3919,10 +3949,10 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3919
3949
|
className: "gtm-trackable",
|
|
3920
3950
|
"data-gtm-event-context": p,
|
|
3921
3951
|
"data-gtm-event-type": "title-click",
|
|
3922
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3952
|
+
children: /* @__PURE__ */ s.jsx(ln, { options: { overrides: { a: Ks } }, children: V })
|
|
3923
3953
|
}
|
|
3924
3954
|
) : /* @__PURE__ */ s.jsx(
|
|
3925
|
-
|
|
3955
|
+
ln,
|
|
3926
3956
|
{
|
|
3927
3957
|
options: {
|
|
3928
3958
|
wrapper: t.type === "question" ? "h1" : N.Fragment,
|
|
@@ -3930,7 +3960,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3930
3960
|
forceInline: t.type === "question",
|
|
3931
3961
|
forceBlock: t.type !== "question"
|
|
3932
3962
|
},
|
|
3933
|
-
children:
|
|
3963
|
+
children: V
|
|
3934
3964
|
}
|
|
3935
3965
|
),
|
|
3936
3966
|
!T.isEditing && /* @__PURE__ */ s.jsxs(
|
|
@@ -3943,11 +3973,12 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3943
3973
|
Mr,
|
|
3944
3974
|
{
|
|
3945
3975
|
element: "li",
|
|
3946
|
-
likes:
|
|
3976
|
+
likes: O,
|
|
3947
3977
|
isShort: !1,
|
|
3948
|
-
userLiked:
|
|
3978
|
+
userLiked: B,
|
|
3949
3979
|
content: { type: t.type, slugs: t.slugs },
|
|
3950
|
-
canLike:
|
|
3980
|
+
canLike: oe,
|
|
3981
|
+
peopleWhoLiked: t.peopleWhoLiked,
|
|
3951
3982
|
functions: {
|
|
3952
3983
|
createLike: a,
|
|
3953
3984
|
deleteLike: u
|
|
@@ -3963,7 +3994,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3963
3994
|
},
|
|
3964
3995
|
children: [
|
|
3965
3996
|
/* @__PURE__ */ s.jsx(
|
|
3966
|
-
|
|
3997
|
+
X,
|
|
3967
3998
|
{
|
|
3968
3999
|
variant: "tertiary",
|
|
3969
4000
|
size: "medium",
|
|
@@ -3975,26 +4006,26 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3975
4006
|
"data-gtm-event-context": p,
|
|
3976
4007
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3977
4008
|
screenreaderText: g.formatMessage(
|
|
3978
|
-
{ id: `${
|
|
3979
|
-
{ count:
|
|
4009
|
+
{ id: `${we}comments_screenReader` },
|
|
4010
|
+
{ count: W }
|
|
3980
4011
|
)
|
|
3981
4012
|
}
|
|
3982
4013
|
),
|
|
3983
4014
|
/* @__PURE__ */ s.jsx("span", { children: g.formatMessage(
|
|
3984
|
-
{ id: `${
|
|
3985
|
-
{ count:
|
|
4015
|
+
{ id: `${we}comments` },
|
|
4016
|
+
{ count: W }
|
|
3986
4017
|
) })
|
|
3987
4018
|
]
|
|
3988
4019
|
}
|
|
3989
4020
|
),
|
|
3990
4021
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3991
|
-
|
|
4022
|
+
X,
|
|
3992
4023
|
{
|
|
3993
4024
|
variant: "tertiary",
|
|
3994
4025
|
size: "medium",
|
|
3995
4026
|
styling: { muted: !0 },
|
|
3996
|
-
onClick:
|
|
3997
|
-
children: g.formatMessage({ id: `${
|
|
4027
|
+
onClick: ie,
|
|
4028
|
+
children: g.formatMessage({ id: `${we}reply` })
|
|
3998
4029
|
}
|
|
3999
4030
|
) }),
|
|
4000
4031
|
/* @__PURE__ */ s.jsx(
|
|
@@ -4002,7 +4033,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4002
4033
|
{
|
|
4003
4034
|
element: "li",
|
|
4004
4035
|
id: `more-${t.slug}`,
|
|
4005
|
-
options:
|
|
4036
|
+
options: re
|
|
4006
4037
|
}
|
|
4007
4038
|
)
|
|
4008
4039
|
]
|
|
@@ -4013,14 +4044,14 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4013
4044
|
),
|
|
4014
4045
|
_,
|
|
4015
4046
|
/* @__PURE__ */ s.jsx(
|
|
4016
|
-
|
|
4047
|
+
Ln,
|
|
4017
4048
|
{
|
|
4018
4049
|
id: `delete-${t.slug}-modal`,
|
|
4019
4050
|
isOpen: C,
|
|
4020
4051
|
functions: { onOpen: () => {
|
|
4021
|
-
}, onClose: () =>
|
|
4052
|
+
}, onClose: () => H(!1) },
|
|
4022
4053
|
forceShow: {
|
|
4023
|
-
error:
|
|
4054
|
+
error: Y === "delete-error" ? g.formatMessage(
|
|
4024
4055
|
{ id: "discussion_delete_error" },
|
|
4025
4056
|
{
|
|
4026
4057
|
action: g.formatMessage({
|
|
@@ -4036,19 +4067,19 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4036
4067
|
buttons: [
|
|
4037
4068
|
{
|
|
4038
4069
|
variant: "secondary",
|
|
4039
|
-
onClick: () =>
|
|
4070
|
+
onClick: () => H(!1),
|
|
4040
4071
|
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4041
4072
|
},
|
|
4042
4073
|
{
|
|
4043
4074
|
variant: "primary",
|
|
4044
4075
|
className: "destructive",
|
|
4045
|
-
onClick:
|
|
4076
|
+
onClick: le,
|
|
4046
4077
|
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4047
4078
|
}
|
|
4048
4079
|
],
|
|
4049
4080
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4050
4081
|
children: /* @__PURE__ */ s.jsx(
|
|
4051
|
-
|
|
4082
|
+
Ee,
|
|
4052
4083
|
{
|
|
4053
4084
|
id: "discussion_delete_text",
|
|
4054
4085
|
values: {
|
|
@@ -4064,25 +4095,25 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4064
4095
|
] })
|
|
4065
4096
|
});
|
|
4066
4097
|
};
|
|
4067
|
-
const
|
|
4098
|
+
const Ct = "discussion_responses_", Ao = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4068
4099
|
const n = A();
|
|
4069
4100
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4070
|
-
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4071
|
-
t === 0 && /* @__PURE__ */ s.jsx("p", { children:
|
|
4101
|
+
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${Ct}title` }, { action: n.formatMessage({ id: `${Ct}${e}` }), count: t }) }),
|
|
4102
|
+
t === 0 && /* @__PURE__ */ s.jsx("p", { children: xe(n.formatMessage, `${Ct}empty`, e, e) })
|
|
4072
4103
|
] });
|
|
4073
4104
|
};
|
|
4074
4105
|
const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4075
|
-
const r = A(), i =
|
|
4106
|
+
const r = A(), i = se(null), c = be(dt), [d, o] = L(
|
|
4076
4107
|
"closed"
|
|
4077
4108
|
/* Closed */
|
|
4078
4109
|
);
|
|
4079
|
-
|
|
4110
|
+
Z(() => {
|
|
4080
4111
|
const f = i.current;
|
|
4081
4112
|
if (f)
|
|
4082
4113
|
return f.addEventListener("transitionend", a), () => {
|
|
4083
4114
|
f.removeEventListener("transitionend", a);
|
|
4084
4115
|
};
|
|
4085
|
-
}, []),
|
|
4116
|
+
}, []), Ne(() => {
|
|
4086
4117
|
d === "closed" && !c.showThread || o(
|
|
4087
4118
|
[
|
|
4088
4119
|
"opening",
|
|
@@ -4091,7 +4122,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4091
4122
|
].includes(d) ? "ready-to-close" : "opening"
|
|
4092
4123
|
/* Opening */
|
|
4093
4124
|
);
|
|
4094
|
-
}, [c.showThread]),
|
|
4125
|
+
}, [c.showThread]), Z(() => {
|
|
4095
4126
|
d === "ready-to-close" && o(
|
|
4096
4127
|
"closing"
|
|
4097
4128
|
/* Closing */
|
|
@@ -4103,12 +4134,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4103
4134
|
"opening",
|
|
4104
4135
|
"open"
|
|
4105
4136
|
/* Open */
|
|
4106
|
-
].includes(d), l =
|
|
4137
|
+
].includes(d), l = kn(n, {
|
|
4107
4138
|
element: "li"
|
|
4108
4139
|
});
|
|
4109
4140
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4110
4141
|
t && /* @__PURE__ */ s.jsx(
|
|
4111
|
-
|
|
4142
|
+
X,
|
|
4112
4143
|
{
|
|
4113
4144
|
variant: "secondary",
|
|
4114
4145
|
size: "small",
|
|
@@ -4212,7 +4243,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4212
4243
|
}, onSuccess: (o) => {
|
|
4213
4244
|
const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => {
|
|
4214
4245
|
var f, h;
|
|
4215
|
-
return (l == null ? void 0 : l.id) === (o == null ? void 0 : o.activity_id) && ((f = l.own_reactions) != null && f.like ? l.own_reactions.like.push(o) : l.own_reactions.like = [o], (h = l.latest_reactions) != null && h.like ? l.latest_reactions.like.push(o) : l.
|
|
4246
|
+
return (l == null ? void 0 : l.id) === (o == null ? void 0 : o.activity_id) && ((f = l.own_reactions) != null && f.like ? l.own_reactions.like.push(o) : l.own_reactions.like = [o], (h = l.latest_reactions) != null && h.like ? l.latest_reactions.like.push(o) : l.own_reactions.like = [o]), l;
|
|
4216
4247
|
});
|
|
4217
4248
|
return e.setQueryData(t, () => u && [...u]), { previousActivities: a };
|
|
4218
4249
|
}, onSettled: (o, a, u) => {
|
|
@@ -4259,12 +4290,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4259
4290
|
isMember: n,
|
|
4260
4291
|
functions: { list: r, create: i, edit: c, like: d, unlike: o, join: a, leave: u }
|
|
4261
4292
|
}) => {
|
|
4262
|
-
const l = A(), f =
|
|
4293
|
+
const l = A(), f = ot(), h = be(Te), {
|
|
4263
4294
|
data: p,
|
|
4264
4295
|
error: _,
|
|
4265
4296
|
isLoading: j,
|
|
4266
4297
|
isFetching: g
|
|
4267
|
-
} =
|
|
4298
|
+
} = pn({
|
|
4268
4299
|
queryKey: [e, t],
|
|
4269
4300
|
queryFn: r
|
|
4270
4301
|
}), E = Rr({
|
|
@@ -4272,43 +4303,43 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4272
4303
|
queryKey: [e, t],
|
|
4273
4304
|
user: h,
|
|
4274
4305
|
mutationFn: i
|
|
4275
|
-
}), { mutate: k } =
|
|
4306
|
+
}), { mutate: k } = me(E), T = Fr({
|
|
4276
4307
|
queryClient: f,
|
|
4277
4308
|
queryKey: [e, t],
|
|
4278
|
-
mutationFn: async (
|
|
4309
|
+
mutationFn: async (v) => await c(v)
|
|
4279
4310
|
}), {
|
|
4280
4311
|
mutate: M
|
|
4281
|
-
} =
|
|
4312
|
+
} = me(T), C = Lr({
|
|
4282
4313
|
queryClient: f,
|
|
4283
4314
|
queryKey: [e, t],
|
|
4284
4315
|
mutationFn: d
|
|
4285
4316
|
}), {
|
|
4286
|
-
mutate:
|
|
4287
|
-
} =
|
|
4317
|
+
mutate: H
|
|
4318
|
+
} = me(C), Y = Or({
|
|
4288
4319
|
queryClient: f,
|
|
4289
4320
|
queryKey: [e, t],
|
|
4290
4321
|
user: h,
|
|
4291
|
-
mutationFn: async ({ activityId:
|
|
4292
|
-
var
|
|
4293
|
-
const
|
|
4294
|
-
(
|
|
4295
|
-
)),
|
|
4296
|
-
(
|
|
4297
|
-
)) == null ? void 0 :
|
|
4298
|
-
await o({ reactionId:
|
|
4322
|
+
mutationFn: async ({ activityId: v }) => {
|
|
4323
|
+
var B, W, V;
|
|
4324
|
+
const G = p && (p == null ? void 0 : p.find(
|
|
4325
|
+
(K) => K.id === v
|
|
4326
|
+
)), O = (V = (W = (B = G == null ? void 0 : G.own_reactions) == null ? void 0 : B.like) == null ? void 0 : W.find(
|
|
4327
|
+
(K) => K.user_id === (h == null ? void 0 : h.id)
|
|
4328
|
+
)) == null ? void 0 : V.id;
|
|
4329
|
+
await o({ reactionId: O || "", activityId: v });
|
|
4299
4330
|
}
|
|
4300
4331
|
}), {
|
|
4301
4332
|
mutate: x
|
|
4302
|
-
} =
|
|
4303
|
-
({ activityId:
|
|
4304
|
-
[
|
|
4305
|
-
),
|
|
4306
|
-
({ activityId:
|
|
4333
|
+
} = me(Y), b = je(
|
|
4334
|
+
({ activityId: v }) => H({ activityId: v }),
|
|
4335
|
+
[H]
|
|
4336
|
+
), U = je(
|
|
4337
|
+
({ activityId: v }) => x({ activityId: v }),
|
|
4307
4338
|
[x]
|
|
4308
4339
|
);
|
|
4309
|
-
return _ ? /* @__PURE__ */ s.jsx(
|
|
4340
|
+
return _ ? /* @__PURE__ */ s.jsx(ct, { variant: "error", text: _.message }) : j ? /* @__PURE__ */ s.jsx(ye, { style: { height: "400px" } }) : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4310
4341
|
/* @__PURE__ */ s.jsx(
|
|
4311
|
-
|
|
4342
|
+
Qt,
|
|
4312
4343
|
{
|
|
4313
4344
|
contentType: "post",
|
|
4314
4345
|
createPost: k,
|
|
@@ -4321,49 +4352,53 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4321
4352
|
}
|
|
4322
4353
|
}
|
|
4323
4354
|
),
|
|
4324
|
-
!g && Array.isArray(p) && (p == null ? void 0 : p.map((
|
|
4325
|
-
var
|
|
4326
|
-
const
|
|
4327
|
-
return /* @__PURE__ */ s.jsxs(
|
|
4355
|
+
!g && Array.isArray(p) && (p == null ? void 0 : p.map((v) => {
|
|
4356
|
+
var B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne, F;
|
|
4357
|
+
const G = ((B = v == null ? void 0 : v.actor) == null ? void 0 : B.id) === (h == null ? void 0 : h.id), O = Ut(n, G);
|
|
4358
|
+
return /* @__PURE__ */ s.jsxs(Nt, { children: [
|
|
4328
4359
|
/* @__PURE__ */ s.jsx(
|
|
4329
|
-
|
|
4360
|
+
ut,
|
|
4330
4361
|
{
|
|
4331
4362
|
content: {
|
|
4332
4363
|
type: "post",
|
|
4333
|
-
body:
|
|
4334
|
-
canLike:
|
|
4335
|
-
createdAt: (
|
|
4336
|
-
slugs: { parentId: t, activityId:
|
|
4337
|
-
slug:
|
|
4364
|
+
body: v == null ? void 0 : v.content,
|
|
4365
|
+
canLike: O,
|
|
4366
|
+
createdAt: (v == null ? void 0 : v.time) || "",
|
|
4367
|
+
slugs: { parentId: t, activityId: v == null ? void 0 : v.id },
|
|
4368
|
+
slug: v == null ? void 0 : v.id,
|
|
4338
4369
|
author: {
|
|
4339
|
-
id: (
|
|
4340
|
-
name: `${(
|
|
4341
|
-
organization: (
|
|
4342
|
-
jobTitle: (
|
|
4370
|
+
id: (W = v == null ? void 0 : v.actor) == null ? void 0 : W.id,
|
|
4371
|
+
name: `${(K = (V = v == null ? void 0 : v.actor) == null ? void 0 : V.data) == null ? void 0 : K.name}`,
|
|
4372
|
+
organization: (ae = (oe = v == null ? void 0 : v.actor) == null ? void 0 : oe.data) == null ? void 0 : ae.organization,
|
|
4373
|
+
jobTitle: (le = (ie = v == null ? void 0 : v.actor) == null ? void 0 : ie.data) == null ? void 0 : le.jobTitle,
|
|
4343
4374
|
image: {
|
|
4344
|
-
thumbnail: ((P = (
|
|
4375
|
+
thumbnail: ((P = (re = v == null ? void 0 : v.actor) == null ? void 0 : re.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4345
4376
|
}
|
|
4346
4377
|
},
|
|
4347
|
-
userLiked: ((te =
|
|
4348
|
-
likes: (
|
|
4349
|
-
comments: (
|
|
4378
|
+
userLiked: ((te = v == null ? void 0 : v.own_reactions) == null ? void 0 : te.like) && ((ce = v == null ? void 0 : v.own_reactions) == null ? void 0 : ce.like.length) > 0,
|
|
4379
|
+
likes: (v == null ? void 0 : v.reaction_counts.like) || 0,
|
|
4380
|
+
comments: (v == null ? void 0 : v.reaction_counts.reply) || 0,
|
|
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
|
+
})))
|
|
4350
4385
|
},
|
|
4351
4386
|
links: {
|
|
4352
|
-
post: `${e}/${t}/${
|
|
4353
|
-
comments: `${e}/${t}/${
|
|
4387
|
+
post: `${e}/${t}/${v == null ? void 0 : v.id}`,
|
|
4388
|
+
comments: `${e}/${t}/${v == null ? void 0 : v.id}`
|
|
4354
4389
|
},
|
|
4355
4390
|
functions: {
|
|
4356
4391
|
content: {
|
|
4357
4392
|
createContent: () => null,
|
|
4358
4393
|
deleteContent: () => null,
|
|
4359
|
-
updateContent: (
|
|
4394
|
+
updateContent: (J, fe) => M({ activityInfo: J, content: fe })
|
|
4360
4395
|
},
|
|
4361
4396
|
likes: {
|
|
4362
4397
|
createLike: () => {
|
|
4363
|
-
b({ activityId:
|
|
4398
|
+
b({ activityId: v == null ? void 0 : v.id });
|
|
4364
4399
|
},
|
|
4365
4400
|
deleteLike: () => {
|
|
4366
|
-
|
|
4401
|
+
U({ activityId: v == null ? void 0 : v.id });
|
|
4367
4402
|
}
|
|
4368
4403
|
},
|
|
4369
4404
|
comments: {
|
|
@@ -4373,8 +4408,8 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4373
4408
|
isTruncated: !0
|
|
4374
4409
|
}
|
|
4375
4410
|
),
|
|
4376
|
-
/* @__PURE__ */ s.jsx(
|
|
4377
|
-
] },
|
|
4411
|
+
/* @__PURE__ */ s.jsx(Ae, {})
|
|
4412
|
+
] }, v == null ? void 0 : v.id);
|
|
4378
4413
|
}))
|
|
4379
4414
|
] });
|
|
4380
4415
|
}, Br = ({
|
|
@@ -4511,7 +4546,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4511
4546
|
onSettled: () => {
|
|
4512
4547
|
e.invalidateQueries({ queryKey: t });
|
|
4513
4548
|
}
|
|
4514
|
-
}),
|
|
4549
|
+
}), Wr = ({
|
|
4515
4550
|
queryClient: e,
|
|
4516
4551
|
queryKey: t,
|
|
4517
4552
|
mutationFn: n
|
|
@@ -4536,7 +4571,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4536
4571
|
...o,
|
|
4537
4572
|
latest_reactions: { reply: a }
|
|
4538
4573
|
})), { previousActivity: o };
|
|
4539
|
-
} }),
|
|
4574
|
+
} }), hn = ({
|
|
4540
4575
|
queryClient: e,
|
|
4541
4576
|
queryKey: t,
|
|
4542
4577
|
mutationFn: n
|
|
@@ -4569,7 +4604,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4569
4604
|
...a,
|
|
4570
4605
|
latest_reactions: { reply: u }
|
|
4571
4606
|
})), { previousActivity: a };
|
|
4572
|
-
} }),
|
|
4607
|
+
} }), zr = ({
|
|
4573
4608
|
basePath: e,
|
|
4574
4609
|
parentId: t,
|
|
4575
4610
|
replyParentId: n,
|
|
@@ -4578,34 +4613,34 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4578
4613
|
replies: c,
|
|
4579
4614
|
functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
|
|
4580
4615
|
}) => {
|
|
4581
|
-
const h = A(), p =
|
|
4616
|
+
const h = A(), p = ot(), _ = be(dt), j = Ur({
|
|
4582
4617
|
queryClient: p,
|
|
4583
4618
|
queryKey: [e, t, r],
|
|
4584
4619
|
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
4585
|
-
}), { mutate: g } =
|
|
4620
|
+
}), { mutate: g } = me(j), E = Wr({
|
|
4586
4621
|
queryClient: p,
|
|
4587
4622
|
queryKey: [e, t, r],
|
|
4588
4623
|
mutationFn: o
|
|
4589
4624
|
}), {
|
|
4590
4625
|
mutate: k
|
|
4591
|
-
} =
|
|
4626
|
+
} = me(E), T = hn({
|
|
4592
4627
|
queryClient: p,
|
|
4593
4628
|
queryKey: [e, t, r],
|
|
4594
4629
|
mutationFn: l
|
|
4595
4630
|
}), {
|
|
4596
4631
|
mutate: M
|
|
4597
|
-
} =
|
|
4632
|
+
} = me(T), C = hn({
|
|
4598
4633
|
queryClient: p,
|
|
4599
4634
|
queryKey: [e, t, r],
|
|
4600
4635
|
mutationFn: f
|
|
4601
4636
|
}), {
|
|
4602
|
-
mutate:
|
|
4603
|
-
} =
|
|
4604
|
-
({ replyId: b, replyParentId:
|
|
4637
|
+
mutate: H
|
|
4638
|
+
} = me(C), Y = je(
|
|
4639
|
+
({ replyId: b, replyParentId: U }) => M({ replyId: b, replyParentId: U }),
|
|
4605
4640
|
[M]
|
|
4606
|
-
), x =
|
|
4607
|
-
({ replyId: b, replyParentId:
|
|
4608
|
-
[
|
|
4641
|
+
), x = je(
|
|
4642
|
+
({ replyId: b, replyParentId: U }) => H({ replyId: b, replyParentId: U }),
|
|
4643
|
+
[H]
|
|
4609
4644
|
);
|
|
4610
4645
|
return /* @__PURE__ */ s.jsx(
|
|
4611
4646
|
Ar,
|
|
@@ -4614,10 +4649,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4614
4649
|
showRepliesButton: i > 0 || _.showForm,
|
|
4615
4650
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4616
4651
|
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4617
|
-
|
|
4652
|
+
Qt,
|
|
4618
4653
|
{
|
|
4619
4654
|
contentType: "reply",
|
|
4620
|
-
createPost: (b,
|
|
4655
|
+
createPost: (b, U) => g(U),
|
|
4621
4656
|
membershipRequiredToPost: {
|
|
4622
4657
|
isMember: !0,
|
|
4623
4658
|
required: !0,
|
|
@@ -4628,13 +4663,13 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4628
4663
|
}
|
|
4629
4664
|
),
|
|
4630
4665
|
(c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
|
|
4631
|
-
var
|
|
4666
|
+
var U, v, G, O, B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne;
|
|
4632
4667
|
return /* @__PURE__ */ s.jsx(
|
|
4633
|
-
|
|
4668
|
+
ut,
|
|
4634
4669
|
{
|
|
4635
4670
|
content: {
|
|
4636
4671
|
type: "reply",
|
|
4637
|
-
body: typeof b.data.content == "string" ? (
|
|
4672
|
+
body: typeof b.data.content == "string" ? (U = b == null ? void 0 : b.data) == null ? void 0 : U.content : ((G = (v = b == null ? void 0 : b.data) == null ? void 0 : v.content) == null ? void 0 : G.text) || "",
|
|
4638
4673
|
createdAt: b == null ? void 0 : b.created_at,
|
|
4639
4674
|
slugs: {
|
|
4640
4675
|
parentId: t,
|
|
@@ -4644,33 +4679,37 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4644
4679
|
},
|
|
4645
4680
|
slug: "",
|
|
4646
4681
|
author: {
|
|
4647
|
-
id: (
|
|
4648
|
-
name: (
|
|
4649
|
-
organization: (
|
|
4650
|
-
jobTitle: (
|
|
4682
|
+
id: (O = b == null ? void 0 : b.user) == null ? void 0 : O.id,
|
|
4683
|
+
name: (W = (B = b == null ? void 0 : b.user) == null ? void 0 : B.data) == null ? void 0 : W.name,
|
|
4684
|
+
organization: (K = (V = b == null ? void 0 : b.user) == null ? void 0 : V.data) == null ? void 0 : K.organization,
|
|
4685
|
+
jobTitle: (ae = (oe = b == null ? void 0 : b.user) == null ? void 0 : oe.data) == null ? void 0 : ae.jobTitle,
|
|
4651
4686
|
image: {
|
|
4652
|
-
thumbnail: ((
|
|
4687
|
+
thumbnail: ((le = (ie = b == null ? void 0 : b.user) == null ? void 0 : ie.data) == null ? void 0 : le.thumbnail) || void 0
|
|
4653
4688
|
}
|
|
4654
4689
|
},
|
|
4655
|
-
userLiked: ((
|
|
4656
|
-
likes: ((te = b == null ? void 0 : b.children_counts) == null ? void 0 : te.like) || 0
|
|
4690
|
+
userLiked: ((re = b == null ? void 0 : b.own_children) == null ? void 0 : re.like) && ((P = b == null ? void 0 : b.own_children) == null ? void 0 : P.like.length) > 0,
|
|
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
|
+
})))
|
|
4657
4696
|
},
|
|
4658
4697
|
functions: {
|
|
4659
4698
|
content: {
|
|
4660
4699
|
createContent: () => console.log("create"),
|
|
4661
4700
|
deleteContent: () => console.log("delete"),
|
|
4662
|
-
updateContent: (
|
|
4701
|
+
updateContent: (F, J) => k({ replyInfo: F, content: J })
|
|
4663
4702
|
},
|
|
4664
4703
|
likes: {
|
|
4665
|
-
createLike: () =>
|
|
4704
|
+
createLike: () => Y({
|
|
4666
4705
|
replyId: b == null ? void 0 : b.id,
|
|
4667
4706
|
replyParentId: b == null ? void 0 : b.parent
|
|
4668
4707
|
}),
|
|
4669
4708
|
deleteLike: () => {
|
|
4670
|
-
var
|
|
4671
|
-
const
|
|
4709
|
+
var J, fe, pe;
|
|
4710
|
+
const F = ((J = b == null ? void 0 : b.own_children) == null ? void 0 : J.like) && ((pe = (fe = b == null ? void 0 : b.own_children) == null ? void 0 : fe.like[0]) == null ? void 0 : pe.id);
|
|
4672
4711
|
return x({
|
|
4673
|
-
replyId:
|
|
4712
|
+
replyId: F || ""
|
|
4674
4713
|
});
|
|
4675
4714
|
}
|
|
4676
4715
|
},
|
|
@@ -4691,39 +4730,39 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4691
4730
|
isMember: i,
|
|
4692
4731
|
functions: { createReply: c, editReply: d, like: o, unlike: a, join: u, leave: l }
|
|
4693
4732
|
}) => {
|
|
4694
|
-
const f = A(), h =
|
|
4733
|
+
const f = A(), h = ot(), p = be(Te), _ = Br({
|
|
4695
4734
|
queryClient: h,
|
|
4696
4735
|
queryKey: [e, t, n],
|
|
4697
4736
|
mutationFn: async (x) => c({ activityId: n, content: x.body })
|
|
4698
|
-
}), { mutate: j } =
|
|
4737
|
+
}), { mutate: j } = me(_), g = Ir({
|
|
4699
4738
|
queryClient: h,
|
|
4700
4739
|
queryKey: [e, t, n],
|
|
4701
4740
|
mutationFn: async (x) => d(x)
|
|
4702
4741
|
}), {
|
|
4703
4742
|
mutate: E
|
|
4704
|
-
} =
|
|
4743
|
+
} = me(g), k = Hr({
|
|
4705
4744
|
queryClient: h,
|
|
4706
4745
|
queryKey: [e, t, n],
|
|
4707
4746
|
mutationFn: o
|
|
4708
4747
|
}), {
|
|
4709
4748
|
mutate: T
|
|
4710
|
-
} =
|
|
4749
|
+
} = me(k), M = Qr({
|
|
4711
4750
|
queryClient: h,
|
|
4712
4751
|
queryKey: [e, t, n],
|
|
4713
4752
|
user: p,
|
|
4714
4753
|
mutationFn: a
|
|
4715
4754
|
}), {
|
|
4716
4755
|
mutate: C
|
|
4717
|
-
} =
|
|
4756
|
+
} = me(M), H = je(
|
|
4718
4757
|
({ replyId: x }) => T({ replyId: x }),
|
|
4719
4758
|
[T]
|
|
4720
|
-
),
|
|
4759
|
+
), Y = je(
|
|
4721
4760
|
({ replyId: x }) => C({ replyId: x }),
|
|
4722
4761
|
[C]
|
|
4723
4762
|
);
|
|
4724
4763
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4725
4764
|
/* @__PURE__ */ s.jsx(
|
|
4726
|
-
|
|
4765
|
+
Qt,
|
|
4727
4766
|
{
|
|
4728
4767
|
contentType: "reply",
|
|
4729
4768
|
createPost: (x, b) => j(b),
|
|
@@ -4737,15 +4776,15 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4737
4776
|
}
|
|
4738
4777
|
),
|
|
4739
4778
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4740
|
-
var
|
|
4741
|
-
const b = ((
|
|
4779
|
+
var v, G, O, B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne, F, J, fe, pe;
|
|
4780
|
+
const b = ((v = x == null ? void 0 : x.user) == null ? void 0 : v.id) === (p == null ? void 0 : p.id), U = Ut(i, b);
|
|
4742
4781
|
return /* @__PURE__ */ s.jsx(Sr, { children: /* @__PURE__ */ s.jsx(
|
|
4743
|
-
|
|
4782
|
+
ut,
|
|
4744
4783
|
{
|
|
4745
4784
|
content: {
|
|
4746
4785
|
type: "reply",
|
|
4747
|
-
body: typeof x.data.content == "string" ? (
|
|
4748
|
-
canLike:
|
|
4786
|
+
body: typeof x.data.content == "string" ? (G = x == null ? void 0 : x.data) == null ? void 0 : G.content : ((B = (O = x == null ? void 0 : x.data) == null ? void 0 : O.content) == null ? void 0 : B.text) || "",
|
|
4787
|
+
canLike: U,
|
|
4749
4788
|
createdAt: x == null ? void 0 : x.created_at,
|
|
4750
4789
|
slugs: {
|
|
4751
4790
|
question: `${e}/${t}/${n}`,
|
|
@@ -4754,42 +4793,46 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4754
4793
|
},
|
|
4755
4794
|
slug: `${e}/${t}/${n}#${x == null ? void 0 : x.id}`,
|
|
4756
4795
|
author: {
|
|
4757
|
-
id: (
|
|
4758
|
-
name: (
|
|
4759
|
-
organization: (
|
|
4760
|
-
jobTitle: (
|
|
4796
|
+
id: (W = x == null ? void 0 : x.user) == null ? void 0 : W.id,
|
|
4797
|
+
name: (K = (V = x == null ? void 0 : x.user) == null ? void 0 : V.data) == null ? void 0 : K.name,
|
|
4798
|
+
organization: (ae = (oe = x == null ? void 0 : x.user) == null ? void 0 : oe.data) == null ? void 0 : ae.organization,
|
|
4799
|
+
jobTitle: (le = (ie = x == null ? void 0 : x.user) == null ? void 0 : ie.data) == null ? void 0 : le.jobTitle,
|
|
4761
4800
|
image: {
|
|
4762
|
-
thumbnail: ((P = (
|
|
4801
|
+
thumbnail: ((P = (re = x == null ? void 0 : x.user) == null ? void 0 : re.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4763
4802
|
}
|
|
4764
4803
|
},
|
|
4765
|
-
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((
|
|
4766
|
-
likes: ((
|
|
4804
|
+
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((ce = x == null ? void 0 : x.own_children) == null ? void 0 : ce.like.length) > 0,
|
|
4805
|
+
likes: ((ne = x == null ? void 0 : x.children_counts) == null ? void 0 : ne.like) || 0,
|
|
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
|
+
})))
|
|
4767
4810
|
},
|
|
4768
4811
|
functions: {
|
|
4769
4812
|
content: {
|
|
4770
4813
|
createContent: () => console.log("create"),
|
|
4771
4814
|
deleteContent: () => console.log("delete"),
|
|
4772
|
-
updateContent: (
|
|
4815
|
+
updateContent: (ge, $e) => E({ replyInfo: ge, content: $e })
|
|
4773
4816
|
},
|
|
4774
4817
|
likes: {
|
|
4775
|
-
createLike: () =>
|
|
4818
|
+
createLike: () => H({ replyId: x == null ? void 0 : x.id }),
|
|
4776
4819
|
deleteLike: () => {
|
|
4777
|
-
var
|
|
4778
|
-
const
|
|
4779
|
-
return
|
|
4820
|
+
var $e, He, Qe;
|
|
4821
|
+
const ge = (($e = x == null ? void 0 : x.own_children) == null ? void 0 : $e.like) && ((Qe = (He = x == null ? void 0 : x.own_children) == null ? void 0 : He.like[0]) == null ? void 0 : Qe.id);
|
|
4822
|
+
return Y({ replyId: ge || "" });
|
|
4780
4823
|
}
|
|
4781
4824
|
},
|
|
4782
4825
|
comments: {}
|
|
4783
4826
|
},
|
|
4784
4827
|
children: /* @__PURE__ */ s.jsx(
|
|
4785
|
-
|
|
4828
|
+
zr,
|
|
4786
4829
|
{
|
|
4787
4830
|
basePath: e,
|
|
4788
4831
|
parentId: t,
|
|
4789
4832
|
replyParentId: x == null ? void 0 : x.id,
|
|
4790
4833
|
activityId: n,
|
|
4791
|
-
replyCount: ((
|
|
4792
|
-
replies: (
|
|
4834
|
+
replyCount: ((fe = x == null ? void 0 : x.children_counts) == null ? void 0 : fe.reply) || 0,
|
|
4835
|
+
replies: (pe = x == null ? void 0 : x.latest_children) == null ? void 0 : pe.reply,
|
|
4793
4836
|
isMember: i,
|
|
4794
4837
|
functions: {
|
|
4795
4838
|
create: c,
|
|
@@ -4845,7 +4888,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4845
4888
|
e.setQueryData(t, u.previousActivity);
|
|
4846
4889
|
}, onSuccess: (o) => {
|
|
4847
4890
|
const a = e.getQueryData(t);
|
|
4848
|
-
return a != null && a.own_reactions.like ? a.own_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), a != null && a.latest_reactions.like ? a.latest_reactions.like.push(o) : a && (a.
|
|
4891
|
+
return a != null && a.own_reactions.like ? a.own_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), a != null && a.latest_reactions.like ? a.latest_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), e.setQueryData(t, () => ({
|
|
4849
4892
|
...a
|
|
4850
4893
|
})), { previousActivity: a };
|
|
4851
4894
|
}, onSettled: () => {
|
|
@@ -4901,61 +4944,61 @@ const Ro = ({
|
|
|
4901
4944
|
leave: p
|
|
4902
4945
|
}
|
|
4903
4946
|
}) => {
|
|
4904
|
-
var
|
|
4905
|
-
const _ =
|
|
4947
|
+
var B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne;
|
|
4948
|
+
const _ = be(Te), j = ot(), {
|
|
4906
4949
|
data: g,
|
|
4907
4950
|
error: E,
|
|
4908
4951
|
isLoading: k,
|
|
4909
4952
|
isFetching: T
|
|
4910
|
-
} =
|
|
4953
|
+
} = pn({
|
|
4911
4954
|
queryKey: [e, t, n],
|
|
4912
4955
|
queryFn: i
|
|
4913
4956
|
}), M = Yr({
|
|
4914
4957
|
queryClient: j,
|
|
4915
4958
|
queryKey: [e, t, n],
|
|
4916
|
-
mutationFn: async (
|
|
4959
|
+
mutationFn: async (F) => await c(F)
|
|
4917
4960
|
}), {
|
|
4918
4961
|
mutate: C
|
|
4919
|
-
} =
|
|
4962
|
+
} = me(M), H = Gr({
|
|
4920
4963
|
queryClient: j,
|
|
4921
4964
|
queryKey: [e, t, n],
|
|
4922
4965
|
mutationFn: d
|
|
4923
4966
|
}), {
|
|
4924
|
-
mutate:
|
|
4925
|
-
} =
|
|
4967
|
+
mutate: Y
|
|
4968
|
+
} = me(H), x = Jr({
|
|
4926
4969
|
queryClient: j,
|
|
4927
4970
|
queryKey: [e, t, n],
|
|
4928
4971
|
user: _,
|
|
4929
4972
|
mutationFn: async () => {
|
|
4930
|
-
var
|
|
4931
|
-
const
|
|
4932
|
-
(
|
|
4933
|
-
)) == null ? void 0 :
|
|
4934
|
-
await o({ activityId: n, reactionId:
|
|
4973
|
+
var J, fe, pe;
|
|
4974
|
+
const F = (pe = (fe = (J = g == null ? void 0 : g.own_reactions) == null ? void 0 : J.like) == null ? void 0 : fe.find(
|
|
4975
|
+
(ge) => ge.user_id === (_ == null ? void 0 : _.id)
|
|
4976
|
+
)) == null ? void 0 : pe.id;
|
|
4977
|
+
await o({ activityId: n, reactionId: F });
|
|
4935
4978
|
},
|
|
4936
4979
|
activity: g
|
|
4937
4980
|
}), {
|
|
4938
4981
|
mutate: b
|
|
4939
|
-
} =
|
|
4940
|
-
({ activityId:
|
|
4941
|
-
[
|
|
4942
|
-
),
|
|
4943
|
-
async ({ activityId:
|
|
4982
|
+
} = me(x), U = je(
|
|
4983
|
+
({ activityId: F }) => Y({ activityId: F }),
|
|
4984
|
+
[Y]
|
|
4985
|
+
), v = je(
|
|
4986
|
+
async ({ activityId: F }) => b({ activityId: F }),
|
|
4944
4987
|
[b]
|
|
4945
4988
|
);
|
|
4946
4989
|
if (E)
|
|
4947
|
-
return /* @__PURE__ */ s.jsx(
|
|
4990
|
+
return /* @__PURE__ */ s.jsx(ct, { variant: "error", text: E.message });
|
|
4948
4991
|
if (k || T)
|
|
4949
|
-
return /* @__PURE__ */ s.jsx(
|
|
4950
|
-
const
|
|
4992
|
+
return /* @__PURE__ */ s.jsx(ye, { style: { height: "400px" } });
|
|
4993
|
+
const G = ((B = g == null ? void 0 : g.actor) == null ? void 0 : B.id) === (_ == null ? void 0 : _.id), O = Ut(r, G);
|
|
4951
4994
|
return /* @__PURE__ */ s.jsx(
|
|
4952
|
-
|
|
4995
|
+
ut,
|
|
4953
4996
|
{
|
|
4954
4997
|
className: "activity-section",
|
|
4955
4998
|
content: {
|
|
4956
4999
|
type: "post",
|
|
4957
5000
|
body: g == null ? void 0 : g.content,
|
|
4958
|
-
canLike:
|
|
5001
|
+
canLike: O,
|
|
4959
5002
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4960
5003
|
slugs: {
|
|
4961
5004
|
question: `${t}/${n}`,
|
|
@@ -4964,28 +5007,32 @@ const Ro = ({
|
|
|
4964
5007
|
},
|
|
4965
5008
|
slug: n,
|
|
4966
5009
|
author: {
|
|
4967
|
-
id: (
|
|
4968
|
-
name: (
|
|
4969
|
-
organization: (
|
|
4970
|
-
jobTitle: (
|
|
5010
|
+
id: (W = g == null ? void 0 : g.actor) == null ? void 0 : W.id,
|
|
5011
|
+
name: (V = g == null ? void 0 : g.actor) == null ? void 0 : V.data.name,
|
|
5012
|
+
organization: (K = g == null ? void 0 : g.actor) == null ? void 0 : K.data.organization,
|
|
5013
|
+
jobTitle: (oe = g == null ? void 0 : g.actor) == null ? void 0 : oe.data.jobTitle,
|
|
4971
5014
|
image: {
|
|
4972
|
-
thumbnail: ((
|
|
5015
|
+
thumbnail: ((ae = g == null ? void 0 : g.actor) == null ? void 0 : ae.data.thumbnail) || void 0
|
|
4973
5016
|
}
|
|
4974
5017
|
},
|
|
4975
|
-
userLiked: ((
|
|
5018
|
+
userLiked: ((ie = g == null ? void 0 : g.own_reactions) == null ? void 0 : ie.like) && ((le = g == null ? void 0 : g.own_reactions) == null ? void 0 : le.like.length) > 0,
|
|
4976
5019
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4977
|
-
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
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
|
+
})))
|
|
4978
5025
|
},
|
|
4979
|
-
originalAuthorId: (
|
|
5026
|
+
originalAuthorId: (te = g == null ? void 0 : g.actor) == null ? void 0 : te.id,
|
|
4980
5027
|
functions: {
|
|
4981
5028
|
content: {
|
|
4982
5029
|
createContent: () => console.log("create"),
|
|
4983
5030
|
deleteContent: () => console.log("delete"),
|
|
4984
|
-
updateContent: (
|
|
5031
|
+
updateContent: (F, J) => C({ activityInfo: F, content: J })
|
|
4985
5032
|
},
|
|
4986
5033
|
likes: {
|
|
4987
|
-
createLike: () =>
|
|
4988
|
-
deleteLike: () =>
|
|
5034
|
+
createLike: () => U({ activityId: n }),
|
|
5035
|
+
deleteLike: () => v({ activityId: n })
|
|
4989
5036
|
},
|
|
4990
5037
|
comments: {
|
|
4991
5038
|
openComments: () => {
|
|
@@ -4995,7 +5042,7 @@ const Ro = ({
|
|
|
4995
5042
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4996
5043
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
4997
5044
|
"Comments (",
|
|
4998
|
-
((
|
|
5045
|
+
((ce = g == null ? void 0 : g.reaction_counts) == null ? void 0 : ce.reply) || 0,
|
|
4999
5046
|
")"
|
|
5000
5047
|
] }),
|
|
5001
5048
|
/* @__PURE__ */ s.jsx(
|
|
@@ -5004,7 +5051,7 @@ const Ro = ({
|
|
|
5004
5051
|
basePath: e,
|
|
5005
5052
|
parentId: t,
|
|
5006
5053
|
activityId: n,
|
|
5007
|
-
repliesList: (
|
|
5054
|
+
repliesList: (ne = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ne.reply,
|
|
5008
5055
|
isMember: r,
|
|
5009
5056
|
functions: {
|
|
5010
5057
|
createReply: a,
|
|
@@ -5028,65 +5075,65 @@ const Ro = ({
|
|
|
5028
5075
|
image: { thumbnail: i }
|
|
5029
5076
|
});
|
|
5030
5077
|
export {
|
|
5031
|
-
|
|
5078
|
+
Pt as ASSETS_BUCKET,
|
|
5032
5079
|
Po as ActivitiesFeed,
|
|
5033
5080
|
Ro as ActivitySection,
|
|
5034
|
-
|
|
5081
|
+
Qt as AddPost,
|
|
5035
5082
|
po as BannerSection,
|
|
5036
5083
|
ko as Breadcrumbs,
|
|
5037
|
-
|
|
5038
|
-
|
|
5084
|
+
X as Button,
|
|
5085
|
+
it as ButtonWrapper,
|
|
5039
5086
|
ir as CacheProvider,
|
|
5040
|
-
|
|
5087
|
+
yn as CollapsibleSection,
|
|
5041
5088
|
Eo as Columns,
|
|
5042
5089
|
wo as CommunityDetails,
|
|
5043
5090
|
ar as Contributors,
|
|
5044
|
-
|
|
5091
|
+
dt as ConversationContext,
|
|
5045
5092
|
_r as CookieBanner,
|
|
5046
5093
|
Sr as DiscussionConversation,
|
|
5047
|
-
|
|
5094
|
+
Fn as DiscussionForm,
|
|
5048
5095
|
Mr as DiscussionLikes,
|
|
5049
|
-
|
|
5096
|
+
ut as DiscussionPost,
|
|
5050
5097
|
Ar as DiscussionThread,
|
|
5051
|
-
|
|
5098
|
+
Ae as Divider,
|
|
5052
5099
|
fo as DownloadSection,
|
|
5053
|
-
|
|
5100
|
+
Be as EMAILS,
|
|
5054
5101
|
So as EmailHelperTextBox,
|
|
5055
|
-
|
|
5102
|
+
ct as EmptyStateBox,
|
|
5056
5103
|
jo as Filters,
|
|
5057
5104
|
dr as FlagsProvider,
|
|
5058
|
-
|
|
5059
|
-
|
|
5105
|
+
Dn as Footer,
|
|
5106
|
+
jn as FullWidthSection,
|
|
5060
5107
|
vo as GlobalProviders,
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5108
|
+
Rn as Header,
|
|
5109
|
+
Ws as HelperTextBox,
|
|
5110
|
+
xn as HiddenFromScreenReaders,
|
|
5064
5111
|
xo as HideShowTextBox,
|
|
5065
|
-
|
|
5112
|
+
Se as HighlightedTextBox,
|
|
5066
5113
|
ur as IntlProvider,
|
|
5067
5114
|
wr as InviteForm,
|
|
5068
5115
|
No as InviteModal,
|
|
5069
|
-
|
|
5116
|
+
Mn as JoinButton,
|
|
5070
5117
|
yo as LanguageSwitcher,
|
|
5071
|
-
|
|
5118
|
+
lt as Link,
|
|
5072
5119
|
hr as LoadMore,
|
|
5073
5120
|
bo as LoadingBlock,
|
|
5074
|
-
|
|
5121
|
+
ye as LoadingPlaceholder,
|
|
5075
5122
|
sr as LoadingState,
|
|
5076
|
-
|
|
5123
|
+
Cn as Logo,
|
|
5077
5124
|
ho as LogoSection,
|
|
5078
|
-
|
|
5125
|
+
ln as MarkdownText,
|
|
5079
5126
|
go as MarketingBox,
|
|
5080
|
-
|
|
5127
|
+
Ht as Member,
|
|
5081
5128
|
Do as MembersList,
|
|
5082
5129
|
Cr as Modal,
|
|
5083
5130
|
pr as MoreMenu,
|
|
5084
5131
|
_o as NUMBER_OF_USERS,
|
|
5085
|
-
|
|
5132
|
+
Ln as Overlay,
|
|
5086
5133
|
Mo as PageLayout,
|
|
5087
5134
|
To as PasswordRules,
|
|
5088
5135
|
qs as Pill,
|
|
5089
|
-
|
|
5136
|
+
It as ProfilePicture,
|
|
5090
5137
|
tr as ProgressBar,
|
|
5091
5138
|
$o as Rating,
|
|
5092
5139
|
Vr as RepliesFeed,
|
|
@@ -5094,19 +5141,19 @@ export {
|
|
|
5094
5141
|
Is as ResponsiveImage,
|
|
5095
5142
|
vr as SearchForm,
|
|
5096
5143
|
Ks as Span,
|
|
5097
|
-
|
|
5144
|
+
Ft as StatusBanner,
|
|
5098
5145
|
Co as Tags,
|
|
5099
5146
|
Hs as Tooltip,
|
|
5100
|
-
|
|
5147
|
+
Te as UserContext,
|
|
5101
5148
|
mr as UserProvider,
|
|
5102
|
-
|
|
5149
|
+
de as VisuallyHidden,
|
|
5103
5150
|
Dr as addAriaProps,
|
|
5104
|
-
|
|
5105
|
-
|
|
5151
|
+
$n as getMember,
|
|
5152
|
+
et as headerData,
|
|
5106
5153
|
Fo as mapGetStreamData,
|
|
5107
5154
|
Es as useCurrentPath,
|
|
5108
|
-
|
|
5109
|
-
|
|
5155
|
+
Ne as useEffectAfterMount,
|
|
5156
|
+
at as useScreenWidth,
|
|
5110
5157
|
Ts as useScrollListener,
|
|
5111
5158
|
mo as useScrollToHash
|
|
5112
5159
|
};
|