@apolitical/component-library 1.13.6 → 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/index.js +13 -13
- package/index.mjs +894 -877
- package/package.json +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,11 +2025,11 @@ 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
|
|
2032
|
+
const wt = "communityDetails_", wo = ({
|
|
2033
2033
|
className: e = "",
|
|
2034
2034
|
isMember: t = !1,
|
|
2035
2035
|
slug: n,
|
|
@@ -2038,14 +2038,14 @@ const bt = "communityDetails_", wo = ({
|
|
|
2038
2038
|
}) => {
|
|
2039
2039
|
const o = A(), a = 5, u = r || i.length, l = i.length ? i : Array(a).fill({});
|
|
2040
2040
|
return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", e), children: [
|
|
2041
|
-
/* @__PURE__ */ s.jsx(
|
|
2041
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2042
2042
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2043
2043
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2044
2044
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2045
|
-
o.formatMessage({ id: `${
|
|
2045
|
+
o.formatMessage({ id: `${wt}members` }),
|
|
2046
2046
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: u })
|
|
2047
2047
|
] }),
|
|
2048
|
-
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${
|
|
2048
|
+
/* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: o.formatMessage({ id: `${wt}viewAll` }) }) })
|
|
2049
2049
|
] }),
|
|
2050
2050
|
/* @__PURE__ */ s.jsx(
|
|
2051
2051
|
ar,
|
|
@@ -2063,15 +2063,15 @@ const bt = "communityDetails_", wo = ({
|
|
|
2063
2063
|
}
|
|
2064
2064
|
)
|
|
2065
2065
|
] }),
|
|
2066
|
-
/* @__PURE__ */ s.jsx(
|
|
2066
|
+
/* @__PURE__ */ s.jsx(Mn, { isMember: t, functions: { ...d } }),
|
|
2067
2067
|
t && /* @__PURE__ */ s.jsx(
|
|
2068
|
-
|
|
2068
|
+
X,
|
|
2069
2069
|
{
|
|
2070
2070
|
variant: "primary",
|
|
2071
2071
|
onClick: c,
|
|
2072
2072
|
icon: { icon: "plus" },
|
|
2073
2073
|
styling: { fullWidth: !0 },
|
|
2074
|
-
children: o.formatMessage({ id: `${
|
|
2074
|
+
children: o.formatMessage({ id: `${wt}invite` })
|
|
2075
2075
|
}
|
|
2076
2076
|
)
|
|
2077
2077
|
] });
|
|
@@ -2083,10 +2083,10 @@ const ko = ({
|
|
|
2083
2083
|
}) => {
|
|
2084
2084
|
const r = A();
|
|
2085
2085
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2086
|
-
/* @__PURE__ */ s.jsx(
|
|
2086
|
+
/* @__PURE__ */ s.jsx(de, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2087
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: [
|
|
2088
|
-
d && /* @__PURE__ */ s.jsx(
|
|
2089
|
-
/* @__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) })
|
|
2090
2090
|
] }, `${window.btoa(i)}_${o}`)) })
|
|
2091
2091
|
] });
|
|
2092
2092
|
};
|
|
@@ -2098,7 +2098,7 @@ const jo = ({
|
|
|
2098
2098
|
},
|
|
2099
2099
|
className: i = ""
|
|
2100
2100
|
}) => {
|
|
2101
|
-
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) => {
|
|
2102
2102
|
let h = [];
|
|
2103
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();
|
|
2104
2104
|
};
|
|
@@ -2126,7 +2126,7 @@ const jo = ({
|
|
|
2126
2126
|
c === "before-lang" ? r += `/${i}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${i}`);
|
|
2127
2127
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2128
2128
|
};
|
|
2129
|
-
const
|
|
2129
|
+
const kt = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ye = "languageSwitcher_", yo = ({
|
|
2130
2130
|
currentLanguage: e,
|
|
2131
2131
|
isOriginalLanguage: t = !1,
|
|
2132
2132
|
isHumanTranslation: n = !1,
|
|
@@ -2138,35 +2138,35 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2138
2138
|
label: o,
|
|
2139
2139
|
className: a = ""
|
|
2140
2140
|
}) => {
|
|
2141
|
-
const u = A(), [l, f] =
|
|
2142
|
-
if (
|
|
2141
|
+
const u = A(), [l, f] = L(e);
|
|
2142
|
+
if (Z(() => {
|
|
2143
2143
|
e !== l && f(e);
|
|
2144
2144
|
}, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
|
|
2145
2145
|
return null;
|
|
2146
2146
|
const p = Object.keys(r), _ = l !== e;
|
|
2147
2147
|
return /* @__PURE__ */ s.jsxs("div", { className: S("language-switcher text-small", d, a), children: [
|
|
2148
2148
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2149
|
-
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` }) }),
|
|
2150
2150
|
/* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
|
|
2151
|
-
if (!
|
|
2151
|
+
if (!kt[j])
|
|
2152
2152
|
return null;
|
|
2153
2153
|
let g = { className: j };
|
|
2154
|
-
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 = {
|
|
2155
2155
|
...g,
|
|
2156
2156
|
href: fr(j, c),
|
|
2157
2157
|
onClick: (E) => {
|
|
2158
2158
|
E.preventDefault(), E.stopPropagation(), f(j), i(j);
|
|
2159
2159
|
}
|
|
2160
|
-
}, /* @__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);
|
|
2161
2161
|
}) }),
|
|
2162
|
-
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"}` }) })
|
|
2163
2163
|
] }),
|
|
2164
2164
|
d !== "short" && !_ && !t && !n && /* @__PURE__ */ s.jsx("small", {
|
|
2165
2165
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2166
2166
|
// @ts-ignore
|
|
2167
2167
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2168
|
-
children: u.formatMessage({ id: `${
|
|
2169
|
-
email:
|
|
2168
|
+
children: u.formatMessage({ id: `${Ye}disclaimer` }, {
|
|
2169
|
+
email: Be.support,
|
|
2170
2170
|
link: (j) => {
|
|
2171
2171
|
const g = `mailto:${j}`;
|
|
2172
2172
|
return /* @__PURE__ */ s.jsx("a", { href: g, children: j });
|
|
@@ -2175,7 +2175,7 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2175
2175
|
})
|
|
2176
2176
|
] });
|
|
2177
2177
|
};
|
|
2178
|
-
const
|
|
2178
|
+
const jt = cs({ locale: "en", messages: Bt }), hr = ({
|
|
2179
2179
|
page: e = 1,
|
|
2180
2180
|
length: t = 0,
|
|
2181
2181
|
limit: n = 10,
|
|
@@ -2183,14 +2183,14 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2183
2183
|
},
|
|
2184
2184
|
icon: i = !1,
|
|
2185
2185
|
messages: c = {
|
|
2186
|
-
button:
|
|
2187
|
-
endOfFeed:
|
|
2188
|
-
error:
|
|
2186
|
+
button: jt.formatMessage({ id: "loadMore_button" }),
|
|
2187
|
+
endOfFeed: jt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2188
|
+
error: jt.formatMessage({ id: "loadMore_error" })
|
|
2189
2189
|
},
|
|
2190
2190
|
className: d = "",
|
|
2191
2191
|
gtmContext: o = "LoadMore"
|
|
2192
2192
|
}) => {
|
|
2193
|
-
const [a, u] =
|
|
2193
|
+
const [a, u] = L(!1), [l, f] = L(!1);
|
|
2194
2194
|
if (t <= 0 || t < n * e)
|
|
2195
2195
|
return null;
|
|
2196
2196
|
const h = async (p) => {
|
|
@@ -2203,7 +2203,7 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2203
2203
|
return /* @__PURE__ */ s.jsxs("footer", { className: S("load-more", d), children: [
|
|
2204
2204
|
a && /* @__PURE__ */ s.jsx("p", { className: "error", children: c.error }),
|
|
2205
2205
|
l ? /* @__PURE__ */ s.jsx("p", { children: c.endOfFeed }) : /* @__PURE__ */ s.jsx(
|
|
2206
|
-
|
|
2206
|
+
X,
|
|
2207
2207
|
{
|
|
2208
2208
|
variant: "secondary",
|
|
2209
2209
|
icon: i,
|
|
@@ -2217,19 +2217,19 @@ const wt = cs({ locale: "en", messages: Lt }), hr = ({
|
|
|
2217
2217
|
)
|
|
2218
2218
|
] });
|
|
2219
2219
|
};
|
|
2220
|
-
let
|
|
2220
|
+
let Ge = !1;
|
|
2221
2221
|
const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r = "" }) => {
|
|
2222
|
-
const i = A(), c =
|
|
2222
|
+
const i = A(), c = se(null), [d, o] = L(!1), a = (u) => {
|
|
2223
2223
|
c.current && u.target instanceof HTMLElement && !c.current.contains(u.target) && o(!1);
|
|
2224
2224
|
};
|
|
2225
|
-
return
|
|
2225
|
+
return Z(() => (document.addEventListener("click", a, !0), () => {
|
|
2226
2226
|
document.removeEventListener("click", a, !0);
|
|
2227
2227
|
})), N.createElement(e, {
|
|
2228
2228
|
ref: c,
|
|
2229
2229
|
className: S("more-menu text-medium", r),
|
|
2230
2230
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2231
2231
|
/* @__PURE__ */ s.jsx(
|
|
2232
|
-
|
|
2232
|
+
X,
|
|
2233
2233
|
{
|
|
2234
2234
|
variant: "tertiary",
|
|
2235
2235
|
size: "medium",
|
|
@@ -2248,16 +2248,16 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2248
2248
|
o(!1), typeof l == "function" && l(g);
|
|
2249
2249
|
},
|
|
2250
2250
|
onFocus: () => {
|
|
2251
|
-
|
|
2251
|
+
Ge && (clearTimeout(Ge), Ge = !1);
|
|
2252
2252
|
},
|
|
2253
2253
|
onBlur: () => {
|
|
2254
|
-
|
|
2254
|
+
Ge = setTimeout(() => {
|
|
2255
2255
|
o(!1);
|
|
2256
2256
|
}, 100);
|
|
2257
2257
|
}
|
|
2258
2258
|
};
|
|
2259
2259
|
return u && (j.href = u), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2260
|
-
|
|
2260
|
+
X,
|
|
2261
2261
|
{
|
|
2262
2262
|
variant: "tertiary",
|
|
2263
2263
|
size: "medium",
|
|
@@ -2270,32 +2270,32 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
|
|
|
2270
2270
|
] })
|
|
2271
2271
|
});
|
|
2272
2272
|
};
|
|
2273
|
-
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" }) }) }) });
|
|
2274
2274
|
const gr = {
|
|
2275
2275
|
"2-1": 901
|
|
2276
2276
|
}, Eo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: r }) => {
|
|
2277
|
-
const i =
|
|
2277
|
+
const i = at(!0);
|
|
2278
2278
|
let c = r;
|
|
2279
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) });
|
|
2280
2280
|
};
|
|
2281
|
-
const
|
|
2282
|
-
const e = A(), [t, n, r] = fs(
|
|
2283
|
-
|
|
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) => {
|
|
2284
2284
|
n(l, !0, {
|
|
2285
2285
|
path: "/",
|
|
2286
|
-
expires:
|
|
2286
|
+
expires: St,
|
|
2287
2287
|
domain: l === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2288
2288
|
});
|
|
2289
2289
|
}), c(!1), window.location.reload();
|
|
2290
2290
|
}, o = () => {
|
|
2291
2291
|
n("apol-cookie-banner", !0, {
|
|
2292
2292
|
path: "/",
|
|
2293
|
-
expires:
|
|
2294
|
-
}),
|
|
2293
|
+
expires: St
|
|
2294
|
+
}), Et.forEach((l) => {
|
|
2295
2295
|
if (l === "apol-cookie-banner") {
|
|
2296
2296
|
n(l, !0, {
|
|
2297
2297
|
path: "/",
|
|
2298
|
-
expires:
|
|
2298
|
+
expires: St
|
|
2299
2299
|
});
|
|
2300
2300
|
return;
|
|
2301
2301
|
}
|
|
@@ -2317,14 +2317,14 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2317
2317
|
className: "gtm-trackable",
|
|
2318
2318
|
"data-gtm-event-context": "cookie-banner",
|
|
2319
2319
|
"data-gtm-event-type": `cookie-${l.gtmType}-click`,
|
|
2320
|
-
children: e.formatMessage({ id: `${
|
|
2320
|
+
children: e.formatMessage({ id: `${yt}buttons_${l.id}` })
|
|
2321
2321
|
});
|
|
2322
2322
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2323
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2324
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2325
|
-
/* @__PURE__ */ s.jsx(
|
|
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 })
|
|
2326
2326
|
] });
|
|
2327
|
-
},
|
|
2327
|
+
}, ke = {
|
|
2328
2328
|
platform: {
|
|
2329
2329
|
order: ["events", "courses", "qanda", "articles"],
|
|
2330
2330
|
// An array guarantees the right order
|
|
@@ -2389,11 +2389,11 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2389
2389
|
text: {
|
|
2390
2390
|
order: ["dataProtection", "euDataProtection"],
|
|
2391
2391
|
dataProtection: {
|
|
2392
|
-
email:
|
|
2392
|
+
email: Be["data-protection"].default,
|
|
2393
2393
|
gtmType: "email-dpo-link"
|
|
2394
2394
|
},
|
|
2395
2395
|
euDataProtection: {
|
|
2396
|
-
email:
|
|
2396
|
+
email: Be["data-protection"].eu,
|
|
2397
2397
|
gtmType: "email-eu-dpo-link"
|
|
2398
2398
|
}
|
|
2399
2399
|
}
|
|
@@ -2405,10 +2405,10 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2405
2405
|
registered: { address: !0 },
|
|
2406
2406
|
berlin: { address: !0 },
|
|
2407
2407
|
support: {
|
|
2408
|
-
email:
|
|
2408
|
+
email: Be.support,
|
|
2409
2409
|
gtmType: "concierge-email-click"
|
|
2410
2410
|
},
|
|
2411
|
-
business: { email:
|
|
2411
|
+
business: { email: Be.general, gtmType: "hello-email-click" }
|
|
2412
2412
|
}
|
|
2413
2413
|
},
|
|
2414
2414
|
social: {
|
|
@@ -2418,37 +2418,37 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2418
2418
|
facebook: { href: "https://www.facebook.com/apoliticalco" }
|
|
2419
2419
|
}
|
|
2420
2420
|
};
|
|
2421
|
-
const
|
|
2422
|
-
const t =
|
|
2421
|
+
const De = "footer_", qe = "SiteFooter", un = ({ group: e }) => {
|
|
2422
|
+
const t = ke[e].order || [];
|
|
2423
2423
|
let n = !1;
|
|
2424
|
-
return "text" in
|
|
2425
|
-
/* @__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}` }) }),
|
|
2426
2426
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2427
2427
|
if (["order", "child", "text"].includes(r))
|
|
2428
2428
|
return null;
|
|
2429
|
-
const { href: i, gtmType: c } =
|
|
2429
|
+
const { href: i, gtmType: c } = ke[e][r], d = {};
|
|
2430
2430
|
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
2431
2431
|
"a",
|
|
2432
2432
|
{
|
|
2433
2433
|
href: i,
|
|
2434
2434
|
className: "gtm-trackable",
|
|
2435
|
-
"data-gtm-event-context":
|
|
2435
|
+
"data-gtm-event-context": qe,
|
|
2436
2436
|
"data-gtm-event-type": c,
|
|
2437
2437
|
...d,
|
|
2438
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2438
|
+
children: /* @__PURE__ */ s.jsx(Ee, { id: `${De}${e}_${r}` })
|
|
2439
2439
|
}
|
|
2440
2440
|
) }, `${e}_${r}`);
|
|
2441
2441
|
}) }),
|
|
2442
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(
|
|
2443
|
-
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(
|
|
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}` }) }),
|
|
2444
2444
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2445
|
-
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", {}) } }) }),
|
|
2446
2446
|
typeof n != "boolean" && n[r].email && /* @__PURE__ */ s.jsx(
|
|
2447
2447
|
"a",
|
|
2448
2448
|
{
|
|
2449
2449
|
href: `mailto:${n[r].email}`,
|
|
2450
2450
|
className: "gtm-trackable",
|
|
2451
|
-
"data-gtm-event-context":
|
|
2451
|
+
"data-gtm-event-context": qe,
|
|
2452
2452
|
"data-gtm-event-type": n[r].gtmType,
|
|
2453
2453
|
children: n[r].email
|
|
2454
2454
|
}
|
|
@@ -2456,26 +2456,26 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2456
2456
|
] })
|
|
2457
2457
|
] }, `dl-${e}-${r}`)) })
|
|
2458
2458
|
] }, e);
|
|
2459
|
-
},
|
|
2460
|
-
/* @__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" }),
|
|
2461
2461
|
/* @__PURE__ */ s.jsx(
|
|
2462
|
-
|
|
2462
|
+
Cn,
|
|
2463
2463
|
{
|
|
2464
2464
|
variant: "inverted",
|
|
2465
2465
|
version: "full",
|
|
2466
2466
|
className: "gtm-trackable",
|
|
2467
|
-
"data-gtm-event-context":
|
|
2467
|
+
"data-gtm-event-context": qe,
|
|
2468
2468
|
"data-gtm-event-type": "logo-homepage-link"
|
|
2469
2469
|
}
|
|
2470
2470
|
),
|
|
2471
2471
|
/* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
|
|
2472
|
-
/* @__PURE__ */ s.jsx(
|
|
2473
|
-
Object.keys(
|
|
2472
|
+
/* @__PURE__ */ s.jsx(un, { group: e }),
|
|
2473
|
+
Object.keys(ke[e]).includes("child") && /* @__PURE__ */ s.jsx(un, { group: ke[e].child })
|
|
2474
2474
|
] }, e)) }),
|
|
2475
2475
|
/* @__PURE__ */ s.jsx("hr", {}),
|
|
2476
2476
|
/* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
|
|
2477
|
-
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(
|
|
2478
|
-
const t =
|
|
2477
|
+
/* @__PURE__ */ s.jsx("ul", { children: Array.isArray(ke.social.order) && ke.social.order.map((e) => {
|
|
2478
|
+
const t = ke.social[e];
|
|
2479
2479
|
return /* @__PURE__ */ s.jsx("li", { className: e, children: /* @__PURE__ */ s.jsx(
|
|
2480
2480
|
"a",
|
|
2481
2481
|
{
|
|
@@ -2483,22 +2483,22 @@ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
|
|
|
2483
2483
|
target: "_blank",
|
|
2484
2484
|
rel: "noopener noreferrer",
|
|
2485
2485
|
className: "gtm-trackable",
|
|
2486
|
-
"data-gtm-event-context":
|
|
2486
|
+
"data-gtm-event-context": qe,
|
|
2487
2487
|
"data-gtm-event-type": "social-click",
|
|
2488
|
-
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}` }) })
|
|
2489
2489
|
}
|
|
2490
2490
|
) }, e);
|
|
2491
2491
|
}) }),
|
|
2492
|
-
/* @__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() } }) })
|
|
2493
2493
|
] })
|
|
2494
2494
|
] }) });
|
|
2495
|
-
const
|
|
2496
|
-
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(
|
|
2497
2497
|
(p) => {
|
|
2498
2498
|
p.preventDefault(), p.stopPropagation();
|
|
2499
2499
|
const _ = (j) => {
|
|
2500
2500
|
d({
|
|
2501
|
-
path: `${
|
|
2501
|
+
path: `${Je}error_verificationFailedToSend`,
|
|
2502
2502
|
type: "error",
|
|
2503
2503
|
link: {
|
|
2504
2504
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
@@ -2518,7 +2518,7 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2518
2518
|
});
|
|
2519
2519
|
};
|
|
2520
2520
|
if (typeof r != "function") {
|
|
2521
|
-
_(i.formatMessage({ id: `${
|
|
2521
|
+
_(i.formatMessage({ id: `${Je}error_noFunction` }));
|
|
2522
2522
|
return;
|
|
2523
2523
|
}
|
|
2524
2524
|
a(!0), r(t).then(() => {
|
|
@@ -2532,9 +2532,9 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2532
2532
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2533
2533
|
[t, n, r]
|
|
2534
2534
|
);
|
|
2535
|
-
|
|
2535
|
+
Z(
|
|
2536
2536
|
() => {
|
|
2537
|
-
let p =
|
|
2537
|
+
let p = Je, _ = "default", j = {}, g = {};
|
|
2538
2538
|
switch (e) {
|
|
2539
2539
|
case "gov":
|
|
2540
2540
|
p += "autoApproved", _ = "success";
|
|
@@ -2592,9 +2592,9 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2592
2592
|
const l = {};
|
|
2593
2593
|
return ["link", "mail"].forEach((p) => {
|
|
2594
2594
|
l[p] = Object.keys(c[p]).length ? (_) => /* @__PURE__ */ s.jsx("a", { ...c[p], children: _ }) : (_) => _;
|
|
2595
|
-
}), /* @__PURE__ */ s.jsx(
|
|
2596
|
-
/* @__PURE__ */ s.jsx(
|
|
2597
|
-
/* @__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" })
|
|
2598
2598
|
] }) : (
|
|
2599
2599
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2600
2600
|
// @ts-ignore
|
|
@@ -2614,28 +2614,28 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
|
|
|
2614
2614
|
)
|
|
2615
2615
|
) });
|
|
2616
2616
|
};
|
|
2617
|
-
const
|
|
2618
|
-
[
|
|
2619
|
-
[
|
|
2620
|
-
[
|
|
2617
|
+
const Xe = "passwordRules_", Nn = "isMoreThanEightCharacters", An = "includesNumberAndSymbol", Pn = "includesLowerAndUppercase", xr = {
|
|
2618
|
+
[Nn]: "8Characters",
|
|
2619
|
+
[An]: "numberSymbol",
|
|
2620
|
+
[Pn]: "lowercaseUppercase"
|
|
2621
2621
|
}, br = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2622
2622
|
const n = A();
|
|
2623
2623
|
return /* @__PURE__ */ s.jsxs("aside", { className: S("password-rules", t), children: [
|
|
2624
|
-
/* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${
|
|
2625
|
-
/* @__PURE__ */ s.jsx("ul", { children: [
|
|
2626
|
-
/* @__PURE__ */ s.jsxs(
|
|
2627
|
-
n.formatMessage({ id: `${
|
|
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` }),
|
|
2628
2628
|
" "
|
|
2629
2629
|
] }),
|
|
2630
|
-
/* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${
|
|
2631
|
-
!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: [
|
|
2632
2632
|
" ",
|
|
2633
2633
|
" ",
|
|
2634
|
-
n.formatMessage({ id: `${
|
|
2634
|
+
n.formatMessage({ id: `${Xe}notMet` })
|
|
2635
2635
|
] })
|
|
2636
2636
|
] }, `rule-${r}`)) })
|
|
2637
2637
|
] });
|
|
2638
|
-
}, To =
|
|
2638
|
+
}, To = Pe(br);
|
|
2639
2639
|
const $o = ({
|
|
2640
2640
|
text: e = {},
|
|
2641
2641
|
topRating: t = 5,
|
|
@@ -2645,7 +2645,7 @@ const $o = ({
|
|
|
2645
2645
|
className: c = "",
|
|
2646
2646
|
hasLoaded: d = !1
|
|
2647
2647
|
}) => {
|
|
2648
|
-
const o = A(), [a, u] =
|
|
2648
|
+
const o = A(), [a, u] = L({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
|
|
2649
2649
|
try {
|
|
2650
2650
|
const E = await n();
|
|
2651
2651
|
u((k) => ({ ...k, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
@@ -2653,10 +2653,10 @@ const $o = ({
|
|
|
2653
2653
|
u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(E);
|
|
2654
2654
|
}
|
|
2655
2655
|
};
|
|
2656
|
-
if (
|
|
2656
|
+
if (Z(() => {
|
|
2657
2657
|
d && !a.setUp && l();
|
|
2658
2658
|
}, [d]), !d)
|
|
2659
|
-
return /* @__PURE__ */ s.jsx(
|
|
2659
|
+
return /* @__PURE__ */ s.jsx(ye, { className: "rating-placeholder" });
|
|
2660
2660
|
const { id: f, rating: h, disabled: p } = a, _ = "ratings_", j = {
|
|
2661
2661
|
text: o.formatMessage({ id: `${_}text` }),
|
|
2662
2662
|
low: o.formatMessage({ id: `${_}low` }),
|
|
@@ -2678,7 +2678,7 @@ const $o = ({
|
|
|
2678
2678
|
/* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2679
2679
|
const k = E + 1;
|
|
2680
2680
|
return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
|
|
2681
|
-
|
|
2681
|
+
X,
|
|
2682
2682
|
{
|
|
2683
2683
|
variant: "tertiary",
|
|
2684
2684
|
size: "small",
|
|
@@ -2704,8 +2704,8 @@ const vr = ({
|
|
|
2704
2704
|
gtmContext: i = "search-bar",
|
|
2705
2705
|
gtmEvent: c = "form-submission"
|
|
2706
2706
|
}) => {
|
|
2707
|
-
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = A(), u =
|
|
2708
|
-
|
|
2707
|
+
const { searchIsOpen: d = !0, isDesktopVersion: o = !1 } = n || {}, a = A(), u = se(null);
|
|
2708
|
+
Ne(() => {
|
|
2709
2709
|
!n || o || !d || u.current && u.current.focus();
|
|
2710
2710
|
}, [d]);
|
|
2711
2711
|
const l = (f) => {
|
|
@@ -2719,7 +2719,7 @@ const vr = ({
|
|
|
2719
2719
|
"data-gtm-event-context": i,
|
|
2720
2720
|
"data-gtm-event-type": c,
|
|
2721
2721
|
children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
|
|
2722
|
-
/* @__PURE__ */ s.jsx(
|
|
2722
|
+
/* @__PURE__ */ s.jsx(de, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
|
|
2723
2723
|
/* @__PURE__ */ s.jsx(
|
|
2724
2724
|
"input",
|
|
2725
2725
|
{
|
|
@@ -2741,10 +2741,10 @@ const vr = ({
|
|
|
2741
2741
|
onClick: (f) => {
|
|
2742
2742
|
f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
|
|
2743
2743
|
},
|
|
2744
|
-
children: /* @__PURE__ */ s.jsx(
|
|
2744
|
+
children: /* @__PURE__ */ s.jsx(de, { children: a.formatMessage({ id: "search_clear" }) })
|
|
2745
2745
|
}
|
|
2746
2746
|
),
|
|
2747
|
-
/* @__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" }) }) })
|
|
2748
2748
|
] }) })
|
|
2749
2749
|
}
|
|
2750
2750
|
);
|
|
@@ -2762,7 +2762,7 @@ const wr = ({
|
|
|
2762
2762
|
initialFormStatus: u = "NOT_SUBMITTED"
|
|
2763
2763
|
/* NOT_SUBMITTED */
|
|
2764
2764
|
}) => {
|
|
2765
|
-
const [l, f] =
|
|
2765
|
+
const [l, f] = L([]), [h, p] = L(!0), [_, j] = L(u), { formatMessage: g } = A(), E = async (M) => {
|
|
2766
2766
|
M.preventDefault();
|
|
2767
2767
|
try {
|
|
2768
2768
|
await a(l), f([]), j(
|
|
@@ -2791,11 +2791,11 @@ const wr = ({
|
|
|
2791
2791
|
" ",
|
|
2792
2792
|
g({ id: "inviteForm_error" })
|
|
2793
2793
|
] }) }),
|
|
2794
|
-
/* @__PURE__ */ s.jsx(
|
|
2794
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
2795
2795
|
/* @__PURE__ */ s.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2796
|
-
/* @__PURE__ */ s.jsx(
|
|
2797
|
-
/* @__PURE__ */ s.jsx(
|
|
2798
|
-
] }) : /* @__PURE__ */ s.jsx(
|
|
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" }) }) })
|
|
2799
2799
|
] }) : /* @__PURE__ */ s.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ s.jsxs(
|
|
2800
2800
|
"form",
|
|
2801
2801
|
{
|
|
@@ -2817,16 +2817,16 @@ const wr = ({
|
|
|
2817
2817
|
f(M), p(!M.length);
|
|
2818
2818
|
},
|
|
2819
2819
|
autoFocus: !1,
|
|
2820
|
-
getLabel: (M, C,
|
|
2820
|
+
getLabel: (M, C, H) => /* @__PURE__ */ s.jsxs("div", { className: "email text-medium", children: [
|
|
2821
2821
|
/* @__PURE__ */ s.jsx("div", { "data-tag-item": !0, children: M }),
|
|
2822
2822
|
/* @__PURE__ */ s.jsx(
|
|
2823
|
-
|
|
2823
|
+
X,
|
|
2824
2824
|
{
|
|
2825
2825
|
variant: "tertiary",
|
|
2826
2826
|
size: "small",
|
|
2827
2827
|
icon: { icon: "close" },
|
|
2828
2828
|
onClick: () => {
|
|
2829
|
-
|
|
2829
|
+
H(C), p(!l.length);
|
|
2830
2830
|
},
|
|
2831
2831
|
className: "remove-email-button",
|
|
2832
2832
|
screenreaderText: g({ id: "overlay_close" })
|
|
@@ -2836,12 +2836,12 @@ const wr = ({
|
|
|
2836
2836
|
}
|
|
2837
2837
|
)
|
|
2838
2838
|
] }),
|
|
2839
|
-
/* @__PURE__ */ s.jsx(
|
|
2840
|
-
/* @__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 }) })
|
|
2841
2841
|
]
|
|
2842
2842
|
}
|
|
2843
2843
|
) });
|
|
2844
|
-
},
|
|
2844
|
+
}, Q = {
|
|
2845
2845
|
timeouts: {},
|
|
2846
2846
|
handlerCalled: {},
|
|
2847
2847
|
getIsDesktopVersion: (e, t) => {
|
|
@@ -2864,9 +2864,9 @@ const wr = ({
|
|
|
2864
2864
|
if (n[e] === t || e === "account" && t === !1 && n.navigation === !0)
|
|
2865
2865
|
return;
|
|
2866
2866
|
const i = Date.now();
|
|
2867
|
-
if (!t &&
|
|
2867
|
+
if (!t && Q.handlerCalled[e] && i - Q.handlerCalled[e] < 500)
|
|
2868
2868
|
return;
|
|
2869
|
-
|
|
2869
|
+
Q.handlerCalled[e] = i;
|
|
2870
2870
|
let c = [{ type: `menus.${e}`, value: t }];
|
|
2871
2871
|
t === !0 && Object.keys(n).forEach((d) => {
|
|
2872
2872
|
d === e || n[d] === !1 || c.push({ type: `menus.${d}`, value: !1 });
|
|
@@ -2887,11 +2887,11 @@ const wr = ({
|
|
|
2887
2887
|
return e[r];
|
|
2888
2888
|
if (!t.includes("."))
|
|
2889
2889
|
continue;
|
|
2890
|
-
const i =
|
|
2890
|
+
const i = gn(e[r], t);
|
|
2891
2891
|
if (!(typeof i > "u") && (!n || i[t] && i[t].includes(n) || i.value && i.value.includes(n) || i.toString().includes(n)))
|
|
2892
2892
|
return e[r];
|
|
2893
2893
|
}
|
|
2894
|
-
return e[0].children ?
|
|
2894
|
+
return e[0].children ? Q.findFirstChild(e[0].children, t, n) : !1;
|
|
2895
2895
|
},
|
|
2896
2896
|
autoFocus: ({ menu: e, navigationRef: t, isDesktopVersion: n, focusElements: r, dispatch: i }) => {
|
|
2897
2897
|
if (!t.current || !t.current.children)
|
|
@@ -2905,20 +2905,20 @@ const wr = ({
|
|
|
2905
2905
|
switch (e) {
|
|
2906
2906
|
case "navigation":
|
|
2907
2907
|
if (n) {
|
|
2908
|
-
const a =
|
|
2908
|
+
const a = Q.findFirstChild(
|
|
2909
2909
|
t.current.children,
|
|
2910
2910
|
"attributes.aria-controls",
|
|
2911
2911
|
"navigation"
|
|
2912
2912
|
);
|
|
2913
|
-
d =
|
|
2913
|
+
d = Q.findFirstChild(a.children, "href");
|
|
2914
2914
|
} else
|
|
2915
|
-
d =
|
|
2915
|
+
d = Q.findFirstChild(t.current.children, "href");
|
|
2916
2916
|
d || (d = t.current);
|
|
2917
2917
|
break;
|
|
2918
2918
|
case "account":
|
|
2919
|
-
if (o =
|
|
2919
|
+
if (o = Q.findFirstChild(t.current.children, "className", "account"), !o || !o.children)
|
|
2920
2920
|
return;
|
|
2921
|
-
d =
|
|
2921
|
+
d = Q.findFirstChild(o.children, "href");
|
|
2922
2922
|
break;
|
|
2923
2923
|
default:
|
|
2924
2924
|
return;
|
|
@@ -2927,21 +2927,21 @@ const wr = ({
|
|
|
2927
2927
|
},
|
|
2928
2928
|
events: {
|
|
2929
2929
|
onClick: (e, { id: t, callback: n, isOpen: r }) => {
|
|
2930
|
-
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));
|
|
2931
2931
|
},
|
|
2932
2932
|
onFocus: ({ id: e }) => {
|
|
2933
|
-
clearTimeout(
|
|
2933
|
+
clearTimeout(Q.timeouts[e]);
|
|
2934
2934
|
},
|
|
2935
2935
|
onMouseEnter: ({ id: e, callback: t }) => {
|
|
2936
|
-
clearTimeout(
|
|
2936
|
+
clearTimeout(Q.timeouts[e]), t(e, !0);
|
|
2937
2937
|
},
|
|
2938
2938
|
onBlur: ({ id: e, callback: t }) => {
|
|
2939
|
-
|
|
2939
|
+
Q.timeouts[e] = setTimeout(() => {
|
|
2940
2940
|
t(e, !1);
|
|
2941
2941
|
}, 250);
|
|
2942
2942
|
}
|
|
2943
2943
|
}
|
|
2944
|
-
},
|
|
2944
|
+
}, et = {
|
|
2945
2945
|
order: ["home", "topics", "partners", "account"],
|
|
2946
2946
|
home: {
|
|
2947
2947
|
href: "/home/",
|
|
@@ -3017,7 +3017,7 @@ const wr = ({
|
|
|
3017
3017
|
props: { variant: "primary" }
|
|
3018
3018
|
}
|
|
3019
3019
|
}
|
|
3020
|
-
},
|
|
3020
|
+
}, tt = ({
|
|
3021
3021
|
id: e,
|
|
3022
3022
|
isLoggedIn: t = !1,
|
|
3023
3023
|
isDesktopVersion: n = !1,
|
|
@@ -3026,7 +3026,7 @@ const wr = ({
|
|
|
3026
3026
|
},
|
|
3027
3027
|
doTrack: c = null
|
|
3028
3028
|
}) => {
|
|
3029
|
-
const d = A(), o =
|
|
3029
|
+
const d = A(), o = gn(et, e);
|
|
3030
3030
|
if (!o || o.onlyShow && (o.onlyShow === "logged-in" && !t || o.onlyShow === "logged-out" && t))
|
|
3031
3031
|
return null;
|
|
3032
3032
|
const a = "doTrack" in o, u = c === null ? a ? o.doTrack : !0 : c, l = e.includes("buttons.");
|
|
@@ -3058,16 +3058,16 @@ const wr = ({
|
|
|
3058
3058
|
let g = {}, E = {};
|
|
3059
3059
|
if (p) {
|
|
3060
3060
|
const k = o.menuId || e, T = {
|
|
3061
|
-
onClick: (M) =>
|
|
3062
|
-
onFocus: () =>
|
|
3063
|
-
onBlur: () =>
|
|
3064
|
-
onMouseLeave: () =>
|
|
3065
|
-
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 })
|
|
3066
3066
|
};
|
|
3067
3067
|
n && (_ && (g = {
|
|
3068
3068
|
...T,
|
|
3069
3069
|
onKeyPress: (M) => {
|
|
3070
|
-
M.key === "Enter" &&
|
|
3070
|
+
M.key === "Enter" && Q.events.onClick(M, { id: k, callback: i, isOpen: r[k] });
|
|
3071
3071
|
},
|
|
3072
3072
|
tabIndex: "0",
|
|
3073
3073
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
@@ -3080,7 +3080,7 @@ const wr = ({
|
|
|
3080
3080
|
});
|
|
3081
3081
|
}
|
|
3082
3082
|
return /* @__PURE__ */ s.jsxs("li", { className: S({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
|
|
3083
|
-
h ? N.createElement(l ?
|
|
3083
|
+
h ? N.createElement(l ? X : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3084
3084
|
o.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: o.order.map((k) => {
|
|
3085
3085
|
if (!o[k])
|
|
3086
3086
|
return null;
|
|
@@ -3093,14 +3093,14 @@ const wr = ({
|
|
|
3093
3093
|
};
|
|
3094
3094
|
return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: S({ [o[k].className]: o[k].className }), children: [
|
|
3095
3095
|
d.formatMessage({ id: `${f}_${k}` }),
|
|
3096
|
-
/* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(
|
|
3097
|
-
] }, 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);
|
|
3098
3098
|
}) })
|
|
3099
3099
|
] }, e);
|
|
3100
3100
|
};
|
|
3101
|
-
const kr = { height: 67, height_desktop: 83 },
|
|
3102
|
-
const e = A(), t =
|
|
3103
|
-
() =>
|
|
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),
|
|
3104
3104
|
[r, n]
|
|
3105
3105
|
), [c, d] = rs($s, {
|
|
3106
3106
|
headerIsVisible: !0,
|
|
@@ -3114,26 +3114,26 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3114
3114
|
scrollPosition: kr[`height${i.navigation ? "_desktop" : ""}`],
|
|
3115
3115
|
callbacks: {
|
|
3116
3116
|
scrollUp: () => {
|
|
3117
|
-
!i && a.navigation ||
|
|
3117
|
+
!i && a.navigation || Q.shouldChangeHeaderIsVisible(!0, a, d);
|
|
3118
3118
|
},
|
|
3119
3119
|
scrollDown: () => {
|
|
3120
|
-
!i && a.navigation ||
|
|
3120
|
+
!i && a.navigation || Q.shouldChangeHeaderIsVisible(!1, a, d);
|
|
3121
3121
|
}
|
|
3122
3122
|
}
|
|
3123
3123
|
});
|
|
3124
3124
|
const l = (h, p) => {
|
|
3125
|
-
|
|
3126
|
-
}, f =
|
|
3127
|
-
return
|
|
3128
|
-
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({
|
|
3129
3129
|
menu: "navigation",
|
|
3130
3130
|
navigationRef: f,
|
|
3131
3131
|
isDesktopVersion: i.navigation,
|
|
3132
3132
|
focusElements: u,
|
|
3133
3133
|
dispatch: d
|
|
3134
3134
|
});
|
|
3135
|
-
}, [a.navigation]),
|
|
3136
|
-
a.account &&
|
|
3135
|
+
}, [a.navigation]), Ne(() => {
|
|
3136
|
+
a.account && Q.autoFocus({
|
|
3137
3137
|
menu: "account",
|
|
3138
3138
|
navigationRef: f,
|
|
3139
3139
|
isDesktopVersion: i.navigation,
|
|
@@ -3142,8 +3142,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3142
3142
|
});
|
|
3143
3143
|
}, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3144
3144
|
/* @__PURE__ */ s.jsxs("nav", { id: "header", className: S({ "logged-in": r, "logged-out": !r, visible: o }), children: [
|
|
3145
|
-
/* @__PURE__ */ s.jsx(
|
|
3146
|
-
/* @__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, {}),
|
|
3147
3147
|
!i.navigation && /* @__PURE__ */ s.jsx(
|
|
3148
3148
|
"button",
|
|
3149
3149
|
{
|
|
@@ -3156,7 +3156,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3156
3156
|
"aria-haspopup": "true",
|
|
3157
3157
|
"aria-expanded": a.navigation,
|
|
3158
3158
|
"aria-controls": "navigation",
|
|
3159
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3159
|
+
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
|
|
3160
3160
|
}
|
|
3161
3161
|
),
|
|
3162
3162
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3167,8 +3167,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3167
3167
|
hidden: i.navigation || a.account ? !1 : !a.navigation,
|
|
3168
3168
|
role: "menu",
|
|
3169
3169
|
"data-showing": !i.navigation && a.account ? "account" : "default",
|
|
3170
|
-
children:
|
|
3171
|
-
|
|
3170
|
+
children: et.order.map((h) => /* @__PURE__ */ s.jsx(
|
|
3171
|
+
tt,
|
|
3172
3172
|
{
|
|
3173
3173
|
id: h,
|
|
3174
3174
|
isLoggedIn: r,
|
|
@@ -3190,7 +3190,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3190
3190
|
"aria-haspopup": "true",
|
|
3191
3191
|
"aria-expanded": a.search,
|
|
3192
3192
|
"aria-controls": "search-form",
|
|
3193
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3193
|
+
children: /* @__PURE__ */ s.jsx(de, { children: e.formatMessage({ id: `header_search_${a.search ? "hide" : "show"}` }) })
|
|
3194
3194
|
}
|
|
3195
3195
|
),
|
|
3196
3196
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3206,18 +3206,18 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3206
3206
|
"button",
|
|
3207
3207
|
{
|
|
3208
3208
|
className: "account-button",
|
|
3209
|
-
onClick: (h) =>
|
|
3210
|
-
onMouseEnter: () =>
|
|
3211
|
-
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 }),
|
|
3212
3212
|
"aria-haspopup": "true",
|
|
3213
3213
|
"aria-expanded": a.account,
|
|
3214
3214
|
"aria-controls": "navigation",
|
|
3215
3215
|
children: [
|
|
3216
|
-
/* @__PURE__ */ s.jsx(
|
|
3217
|
-
/* @__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 || "" })
|
|
3218
3218
|
]
|
|
3219
3219
|
}
|
|
3220
|
-
) : /* @__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)) })
|
|
3221
3221
|
] }),
|
|
3222
3222
|
/* @__PURE__ */ s.jsx("hr", { id: "content-of-page" }),
|
|
3223
3223
|
/* @__PURE__ */ s.jsx(
|
|
@@ -3231,26 +3231,26 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
|
|
|
3231
3231
|
const jr = () => {
|
|
3232
3232
|
const e = A();
|
|
3233
3233
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3234
|
-
/* @__PURE__ */ s.jsx(
|
|
3235
|
-
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(
|
|
3236
|
-
/* @__PURE__ */ s.jsx(
|
|
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, {})
|
|
3237
3237
|
] });
|
|
3238
3238
|
}, Mo = ({ children: e, reportError: t, showFooter: n = !0, background: r = "default", className: i = "", locale: c = "en" }) => {
|
|
3239
3239
|
const d = Es();
|
|
3240
|
-
|
|
3240
|
+
Z(() => {
|
|
3241
3241
|
window.scrollTo(0, 0);
|
|
3242
3242
|
}, [d]);
|
|
3243
|
-
const o =
|
|
3243
|
+
const o = kn(e, { locale: c });
|
|
3244
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: [
|
|
3245
|
-
/* @__PURE__ */ s.jsx(
|
|
3245
|
+
/* @__PURE__ */ s.jsx(Rn, {}),
|
|
3246
3246
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: o }),
|
|
3247
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3247
|
+
n && /* @__PURE__ */ s.jsx(Dn, {}),
|
|
3248
3248
|
/* @__PURE__ */ s.jsx(_r, {})
|
|
3249
3249
|
] }) }) }) });
|
|
3250
|
-
},
|
|
3250
|
+
}, mn = {
|
|
3251
3251
|
default: "tags_",
|
|
3252
3252
|
headerTopics: "header_topics_topics_"
|
|
3253
|
-
},
|
|
3253
|
+
}, Tt = {
|
|
3254
3254
|
topic: {
|
|
3255
3255
|
Climate: "climate",
|
|
3256
3256
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3269,13 +3269,13 @@ const jr = () => {
|
|
|
3269
3269
|
}, yr = {
|
|
3270
3270
|
getTagDetails: (e) => {
|
|
3271
3271
|
if (e.includes("topic_")) {
|
|
3272
|
-
if (e =
|
|
3273
|
-
const t =
|
|
3274
|
-
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;
|
|
3275
3275
|
}
|
|
3276
3276
|
return null;
|
|
3277
3277
|
}
|
|
3278
|
-
return
|
|
3278
|
+
return Tt[e] ? (e = Tt[e], { id: e, text: `${mn.default}${e}` }) : null;
|
|
3279
3279
|
}
|
|
3280
3280
|
};
|
|
3281
3281
|
const Co = ({
|
|
@@ -3324,7 +3324,7 @@ const Do = ({
|
|
|
3324
3324
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: e })
|
|
3325
3325
|
] }),
|
|
3326
3326
|
/* @__PURE__ */ s.jsx("ul", { children: t.map((o, a) => /* @__PURE__ */ s.jsxs("li", { children: [
|
|
3327
|
-
/* @__PURE__ */ s.jsx(
|
|
3327
|
+
/* @__PURE__ */ s.jsx(Ht, { member: o, gtmContext: r, gtmType: i }),
|
|
3328
3328
|
o.isAdmin && /* @__PURE__ */ s.jsx(qs, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3329
3329
|
] }, a)) }),
|
|
3330
3330
|
n && /* @__PURE__ */ s.jsx(
|
|
@@ -3337,8 +3337,8 @@ const Do = ({
|
|
|
3337
3337
|
)
|
|
3338
3338
|
] }));
|
|
3339
3339
|
};
|
|
3340
|
-
let
|
|
3341
|
-
const
|
|
3340
|
+
let Ze = null;
|
|
3341
|
+
const he = "discussion_form_", Fn = ({
|
|
3342
3342
|
content: e = { type: "response", slugs: {} },
|
|
3343
3343
|
userHasPermissions: t = !0,
|
|
3344
3344
|
meta: n = {
|
|
@@ -3369,97 +3369,97 @@ const me = "discussion_form_", Pn = ({
|
|
|
3369
3369
|
},
|
|
3370
3370
|
gtmContext: a = "DiscussionForm"
|
|
3371
3371
|
}) => {
|
|
3372
|
-
var b,
|
|
3373
|
-
const u = A(), l =
|
|
3372
|
+
var b, U;
|
|
3373
|
+
const u = A(), l = be(Te), [f, h] = L(
|
|
3374
3374
|
n.isEditing && n.isEditing.text || ""
|
|
3375
|
-
), [p, _] =
|
|
3375
|
+
), [p, _] = L(d.error || !1), [j, g] = L(!1), E = se(null);
|
|
3376
3376
|
if (r || (r = E), n.isLoading)
|
|
3377
3377
|
return /* @__PURE__ */ s.jsx(
|
|
3378
|
-
|
|
3378
|
+
ye,
|
|
3379
3379
|
{
|
|
3380
3380
|
className: "discussion-card discussion-form",
|
|
3381
3381
|
"data-testid": "loading-placeholder"
|
|
3382
3382
|
}
|
|
3383
3383
|
);
|
|
3384
|
-
const k = (
|
|
3385
|
-
const
|
|
3386
|
-
h(
|
|
3387
|
-
let
|
|
3388
|
-
!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(
|
|
3389
3389
|
u.formatMessage,
|
|
3390
|
-
`${
|
|
3390
|
+
`${he}error_loggedOut`,
|
|
3391
3391
|
e.type,
|
|
3392
3392
|
"action"
|
|
3393
|
-
) : t ?
|
|
3393
|
+
) : t ? G.length >= i && (O = `${he}error_tooLong`) : O = xe(
|
|
3394
3394
|
u.formatMessage,
|
|
3395
|
-
`${
|
|
3395
|
+
`${he}error_noPermission`,
|
|
3396
3396
|
e.type,
|
|
3397
3397
|
"action"
|
|
3398
|
-
),
|
|
3398
|
+
), O ? _(O) : p && _(!1);
|
|
3399
3399
|
};
|
|
3400
3400
|
let T = `${e.type}-form`;
|
|
3401
3401
|
if (e.type === "response" || e.type === "reply") {
|
|
3402
|
-
const
|
|
3403
|
-
|
|
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)}`);
|
|
3404
3404
|
}
|
|
3405
|
-
const M = async (
|
|
3406
|
-
var
|
|
3407
|
-
if (
|
|
3405
|
+
const M = async (v) => {
|
|
3406
|
+
var O;
|
|
3407
|
+
if (v.preventDefault(), v.stopPropagation(), !l || !l.id || !t || H)
|
|
3408
3408
|
return;
|
|
3409
|
-
|
|
3410
|
-
const
|
|
3409
|
+
Ze && clearTimeout(Ze), g("submitting");
|
|
3410
|
+
const G = window.location.pathname;
|
|
3411
3411
|
try {
|
|
3412
|
-
let
|
|
3412
|
+
let B;
|
|
3413
3413
|
switch (e.type) {
|
|
3414
3414
|
case "post":
|
|
3415
|
-
|
|
3415
|
+
B = await o.create({ content: f });
|
|
3416
3416
|
break;
|
|
3417
3417
|
case "question":
|
|
3418
|
-
|
|
3418
|
+
B = await o.create({
|
|
3419
3419
|
title: f,
|
|
3420
3420
|
authorId: l && l.id,
|
|
3421
|
-
...(
|
|
3421
|
+
...(O = o.props) == null ? void 0 : O.create
|
|
3422
3422
|
});
|
|
3423
3423
|
break;
|
|
3424
3424
|
case "response":
|
|
3425
|
-
|
|
3425
|
+
B = await o.create(
|
|
3426
3426
|
{ question: e.slugs.question },
|
|
3427
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3427
|
+
{ body: f, authorId: l && l.id, contentPath: G }
|
|
3428
3428
|
);
|
|
3429
3429
|
break;
|
|
3430
3430
|
case "reply":
|
|
3431
|
-
|
|
3431
|
+
B = await o.create(
|
|
3432
3432
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3433
|
-
{ body: f, authorId: l && l.id, contentPath:
|
|
3433
|
+
{ body: f, authorId: l && l.id, contentPath: G }
|
|
3434
3434
|
);
|
|
3435
3435
|
break;
|
|
3436
3436
|
default:
|
|
3437
3437
|
break;
|
|
3438
3438
|
}
|
|
3439
|
-
await Ds(1e3), o.callback && await o.callback(
|
|
3439
|
+
await Ds(1e3), o.callback && await o.callback(B), Ze = setTimeout(() => {
|
|
3440
3440
|
h(""), g("submitted"), C();
|
|
3441
3441
|
}, 500);
|
|
3442
|
-
} catch (
|
|
3443
|
-
const
|
|
3444
|
-
let
|
|
3445
|
-
|
|
3442
|
+
} catch (B) {
|
|
3443
|
+
const W = B;
|
|
3444
|
+
let V = `${he}error`;
|
|
3445
|
+
W.message.includes("entry already exists") && (V = xe(
|
|
3446
3446
|
u.formatMessage,
|
|
3447
|
-
`${
|
|
3447
|
+
`${he}error_alreadyExists`,
|
|
3448
3448
|
e.type,
|
|
3449
3449
|
"action"
|
|
3450
|
-
)),
|
|
3450
|
+
)), W.message.includes("429") ? V = xe(
|
|
3451
3451
|
u.formatMessage,
|
|
3452
|
-
`${
|
|
3452
|
+
`${he}error_tooMany`,
|
|
3453
3453
|
e.type,
|
|
3454
3454
|
"action"
|
|
3455
|
-
) :
|
|
3455
|
+
) : W.message.includes("400") && (V = `${he}error`), _(V), C();
|
|
3456
3456
|
}
|
|
3457
3457
|
}, C = () => {
|
|
3458
|
-
|
|
3458
|
+
Ze = setTimeout(() => {
|
|
3459
3459
|
_(!1), g(!1);
|
|
3460
3460
|
}, 5e3);
|
|
3461
|
-
},
|
|
3462
|
-
return (n.isEditing && !
|
|
3461
|
+
}, H = !f || !Ls(f), Y = j === "submitting", x = [];
|
|
3462
|
+
return (n.isEditing && !Y || d.cancel) && x.push({
|
|
3463
3463
|
variant: "secondary",
|
|
3464
3464
|
size: { mobile: "small", 600: "medium" },
|
|
3465
3465
|
onClick: o.handleCancel,
|
|
@@ -3467,26 +3467,26 @@ const me = "discussion_form_", Pn = ({
|
|
|
3467
3467
|
"data-gtm-event-context": a,
|
|
3468
3468
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3469
3469
|
disabled: !d.cancel && (!l || !l.id || !f),
|
|
3470
|
-
children: u.formatMessage({ id: `${
|
|
3470
|
+
children: u.formatMessage({ id: `${he}cancel` })
|
|
3471
3471
|
}), x.push({
|
|
3472
3472
|
variant: "primary",
|
|
3473
3473
|
size: { mobile: "small", 600: "medium" },
|
|
3474
|
-
onClick: (
|
|
3474
|
+
onClick: (v) => {
|
|
3475
3475
|
if (n.isEditing) {
|
|
3476
3476
|
g("submitting"), o.handleSaveEdit && o.handleSaveEdit(
|
|
3477
3477
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3478
3478
|
);
|
|
3479
3479
|
return;
|
|
3480
3480
|
}
|
|
3481
|
-
M(
|
|
3481
|
+
M(v);
|
|
3482
3482
|
},
|
|
3483
3483
|
className: "gtm-trackable",
|
|
3484
3484
|
"data-gtm-event-context": a,
|
|
3485
3485
|
"data-gtm-event-type": `${n.isEditing ? "save" : "submit"}-${e.type}-click`,
|
|
3486
3486
|
"data-testid": "save-button",
|
|
3487
|
-
disabled: !l || !l.id || !t ||
|
|
3487
|
+
disabled: !l || !l.id || !t || H || Y || n.isEditing && f === n.isEditing.text,
|
|
3488
3488
|
children: u.formatMessage({
|
|
3489
|
-
id: `${
|
|
3489
|
+
id: `${he}${Y ? n.isEditing ? "saving" : "posting" : n.isEditing ? "save" : "post"}`
|
|
3490
3490
|
})
|
|
3491
3491
|
}), /* @__PURE__ */ s.jsxs(
|
|
3492
3492
|
"form",
|
|
@@ -3497,25 +3497,25 @@ const me = "discussion_form_", Pn = ({
|
|
|
3497
3497
|
}),
|
|
3498
3498
|
"data-testid": `discussion-${e.type}-form`,
|
|
3499
3499
|
children: [
|
|
3500
|
-
(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") }),
|
|
3501
3501
|
/* @__PURE__ */ s.jsx(
|
|
3502
|
-
|
|
3502
|
+
Ht,
|
|
3503
3503
|
{
|
|
3504
3504
|
member: l || "community",
|
|
3505
3505
|
gtmContext: a,
|
|
3506
3506
|
gtmType: "profile-click"
|
|
3507
3507
|
}
|
|
3508
3508
|
),
|
|
3509
|
-
/* @__PURE__ */ s.jsx(
|
|
3509
|
+
/* @__PURE__ */ s.jsx(de, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: xe(u.formatMessage, `${he}label`, e.type, "action") }),
|
|
3510
3510
|
/* @__PURE__ */ s.jsx(
|
|
3511
3511
|
_s,
|
|
3512
3512
|
{
|
|
3513
3513
|
ref: r,
|
|
3514
3514
|
id: `${T}-input`,
|
|
3515
3515
|
name: e.type,
|
|
3516
|
-
placeholder:
|
|
3516
|
+
placeholder: xe(
|
|
3517
3517
|
u.formatMessage,
|
|
3518
|
-
`${
|
|
3518
|
+
`${he}placeholder`,
|
|
3519
3519
|
e.type,
|
|
3520
3520
|
"action"
|
|
3521
3521
|
),
|
|
@@ -3528,8 +3528,8 @@ const me = "discussion_form_", Pn = ({
|
|
|
3528
3528
|
autoFocus: !!n.isEditing
|
|
3529
3529
|
}
|
|
3530
3530
|
),
|
|
3531
|
-
/* @__PURE__ */ s.jsx("small", { children:
|
|
3532
|
-
a: (
|
|
3531
|
+
/* @__PURE__ */ s.jsx("small", { children: xe(u.formatMessage, `${he}explainer`, e.type, "action", {
|
|
3532
|
+
a: (v) => /* @__PURE__ */ s.jsx(
|
|
3533
3533
|
"a",
|
|
3534
3534
|
{
|
|
3535
3535
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3538,13 +3538,13 @@ const me = "discussion_form_", Pn = ({
|
|
|
3538
3538
|
"data-gtm-event-context": a,
|
|
3539
3539
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3540
3540
|
rel: "noreferrer",
|
|
3541
|
-
children:
|
|
3541
|
+
children: v
|
|
3542
3542
|
}
|
|
3543
3543
|
)
|
|
3544
3544
|
}) }),
|
|
3545
|
-
/* @__PURE__ */ s.jsx(
|
|
3546
|
-
j === "submitted" && /* @__PURE__ */ s.jsx(
|
|
3547
|
-
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(
|
|
3548
3548
|
{ id: p },
|
|
3549
3549
|
{
|
|
3550
3550
|
action: u.formatMessage({
|
|
@@ -3556,20 +3556,20 @@ const me = "discussion_form_", Pn = ({
|
|
|
3556
3556
|
]
|
|
3557
3557
|
}
|
|
3558
3558
|
);
|
|
3559
|
-
},
|
|
3559
|
+
}, Qt = ({
|
|
3560
3560
|
contentType: e,
|
|
3561
3561
|
createPost: t,
|
|
3562
3562
|
membershipRequiredToPost: { isMember: n, required: r, join: i, leave: c, notMemberStateText: d }
|
|
3563
3563
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
3564
|
-
|
|
3564
|
+
ct,
|
|
3565
3565
|
{
|
|
3566
3566
|
text: d,
|
|
3567
3567
|
button: {
|
|
3568
|
-
component: /* @__PURE__ */ s.jsx(
|
|
3568
|
+
component: /* @__PURE__ */ s.jsx(Mn, { functions: { join: i, leave: c } })
|
|
3569
3569
|
}
|
|
3570
3570
|
}
|
|
3571
3571
|
) : /* @__PURE__ */ s.jsx(
|
|
3572
|
-
|
|
3572
|
+
Fn,
|
|
3573
3573
|
{
|
|
3574
3574
|
content: { type: e, slugs: {} },
|
|
3575
3575
|
functions: {
|
|
@@ -3579,12 +3579,12 @@ const me = "discussion_form_", Pn = ({
|
|
|
3579
3579
|
), Er = {
|
|
3580
3580
|
showThread: !1,
|
|
3581
3581
|
showForm: !1
|
|
3582
|
-
},
|
|
3583
|
-
const [t, n] =
|
|
3582
|
+
}, dt = Ot(Er), Sr = ({ children: e }) => {
|
|
3583
|
+
const [t, n] = L({
|
|
3584
3584
|
showThread: !1,
|
|
3585
3585
|
showForm: !1
|
|
3586
3586
|
});
|
|
3587
|
-
return /* @__PURE__ */ s.jsx(
|
|
3587
|
+
return /* @__PURE__ */ s.jsx(dt.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3588
3588
|
}, Tr = ({
|
|
3589
3589
|
question: e,
|
|
3590
3590
|
answer: t,
|
|
@@ -3594,10 +3594,10 @@ const me = "discussion_form_", Pn = ({
|
|
|
3594
3594
|
...t && { answerSlug: t },
|
|
3595
3595
|
...n && { replySlug: n }
|
|
3596
3596
|
}), $r = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3597
|
-
let
|
|
3598
|
-
const
|
|
3599
|
-
|
|
3600
|
-
},
|
|
3597
|
+
let Ie = !1;
|
|
3598
|
+
const $t = () => {
|
|
3599
|
+
Ie !== !1 && (clearTimeout(Ie), Ie = !1);
|
|
3600
|
+
}, Mt = 10, Mr = ({
|
|
3601
3601
|
element: e = "div",
|
|
3602
3602
|
likes: t = 0,
|
|
3603
3603
|
peopleWhoLiked: n = !1,
|
|
@@ -3610,24 +3610,24 @@ const St = () => {
|
|
|
3610
3610
|
} } = {}
|
|
3611
3611
|
}) => {
|
|
3612
3612
|
const u = A();
|
|
3613
|
-
|
|
3613
|
+
Z(() => {
|
|
3614
3614
|
p(i);
|
|
3615
3615
|
}, [i]);
|
|
3616
|
-
const [l, f] =
|
|
3617
|
-
if (C.preventDefault(), C.stopPropagation(), E(!1),
|
|
3618
|
-
return
|
|
3619
|
-
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)
|
|
3620
3620
|
return !1;
|
|
3621
|
-
|
|
3621
|
+
Ie = setTimeout(M, 350);
|
|
3622
3622
|
}, M = async () => {
|
|
3623
|
-
if (
|
|
3623
|
+
if ($t(), _ || !d)
|
|
3624
3624
|
return !1;
|
|
3625
3625
|
let C = h ? l - 1 : l + 1;
|
|
3626
3626
|
C < 0 && (C = 0), j(!0), f(C), p(!h);
|
|
3627
3627
|
try {
|
|
3628
3628
|
if (c && c.slugs) {
|
|
3629
|
-
const
|
|
3630
|
-
h ? await a(
|
|
3629
|
+
const H = Tr(c.slugs);
|
|
3630
|
+
h ? await a(H) : await o(H, { contentPath: window.location.pathname });
|
|
3631
3631
|
}
|
|
3632
3632
|
} catch {
|
|
3633
3633
|
f(t), p(i);
|
|
@@ -3654,7 +3654,7 @@ const St = () => {
|
|
|
3654
3654
|
},
|
|
3655
3655
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3656
3656
|
/* @__PURE__ */ s.jsx(
|
|
3657
|
-
|
|
3657
|
+
X,
|
|
3658
3658
|
{
|
|
3659
3659
|
variant: "tertiary",
|
|
3660
3660
|
size: "medium",
|
|
@@ -3673,8 +3673,8 @@ const St = () => {
|
|
|
3673
3673
|
),
|
|
3674
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 }) }),
|
|
3675
3675
|
n && /* @__PURE__ */ s.jsx(Hs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
|
|
3676
|
-
k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
3677
|
-
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 }) })
|
|
3678
3678
|
] }) })
|
|
3679
3679
|
] })
|
|
3680
3680
|
}
|
|
@@ -3688,7 +3688,7 @@ const Cr = ({ element: e = "section", children: t, className: n, ...r }) => N.cr
|
|
|
3688
3688
|
...r
|
|
3689
3689
|
}
|
|
3690
3690
|
);
|
|
3691
|
-
const
|
|
3691
|
+
const Ln = ({
|
|
3692
3692
|
id: e = "content-overlay",
|
|
3693
3693
|
isOpen: t = !1,
|
|
3694
3694
|
showDivider: n = !0,
|
|
@@ -3703,10 +3703,10 @@ const Rn = ({
|
|
|
3703
3703
|
className: l = "",
|
|
3704
3704
|
gtmContext: f = "Modal"
|
|
3705
3705
|
}) => {
|
|
3706
|
-
const h = A(), [p, _] =
|
|
3706
|
+
const h = A(), [p, _] = L(t), j = (E) => {
|
|
3707
3707
|
_(E), E ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
|
|
3708
3708
|
};
|
|
3709
|
-
|
|
3709
|
+
Z(() => {
|
|
3710
3710
|
j(t);
|
|
3711
3711
|
}, [t]);
|
|
3712
3712
|
const g = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
@@ -3721,7 +3721,7 @@ const Rn = ({
|
|
|
3721
3721
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
3722
3722
|
o && /* @__PURE__ */ s.jsx("h2", { className: "modal-title", children: o }),
|
|
3723
3723
|
/* @__PURE__ */ s.jsx(
|
|
3724
|
-
|
|
3724
|
+
X,
|
|
3725
3725
|
{
|
|
3726
3726
|
variant: "tertiary",
|
|
3727
3727
|
size: "medium",
|
|
@@ -3734,13 +3734,13 @@ const Rn = ({
|
|
|
3734
3734
|
}
|
|
3735
3735
|
)
|
|
3736
3736
|
] }),
|
|
3737
|
-
n && /* @__PURE__ */ s.jsx(
|
|
3737
|
+
n && /* @__PURE__ */ s.jsx(Ae, {}),
|
|
3738
3738
|
a,
|
|
3739
3739
|
u && /* @__PURE__ */ s.jsxs("div", { className: "bottom", children: [
|
|
3740
|
-
/* @__PURE__ */ s.jsx(
|
|
3741
|
-
/* @__PURE__ */ s.jsx(
|
|
3740
|
+
/* @__PURE__ */ s.jsx(Ae, {}),
|
|
3741
|
+
/* @__PURE__ */ s.jsx(it, { buttons: u })
|
|
3742
3742
|
] }),
|
|
3743
|
-
d && /* @__PURE__ */ s.jsx(
|
|
3743
|
+
d && /* @__PURE__ */ s.jsx(Ft, { className: "error", children: d })
|
|
3744
3744
|
] })
|
|
3745
3745
|
}
|
|
3746
3746
|
) });
|
|
@@ -3762,7 +3762,7 @@ const No = ({
|
|
|
3762
3762
|
},
|
|
3763
3763
|
sendInvites: u
|
|
3764
3764
|
}) => /* @__PURE__ */ s.jsx(
|
|
3765
|
-
|
|
3765
|
+
Ln,
|
|
3766
3766
|
{
|
|
3767
3767
|
title: n,
|
|
3768
3768
|
isOpen: t,
|
|
@@ -3782,11 +3782,11 @@ const No = ({
|
|
|
3782
3782
|
}
|
|
3783
3783
|
)
|
|
3784
3784
|
}
|
|
3785
|
-
),
|
|
3785
|
+
), fn = (e) => {
|
|
3786
3786
|
const t = {};
|
|
3787
3787
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3788
|
-
},
|
|
3789
|
-
const
|
|
3788
|
+
}, Ut = (e, t) => e && !t;
|
|
3789
|
+
const we = "discussion_", Nr = 280, ut = ({
|
|
3790
3790
|
element: e = "div",
|
|
3791
3791
|
content: t,
|
|
3792
3792
|
userHasPermissions: n = !0,
|
|
@@ -3813,49 +3813,49 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3813
3813
|
children: _,
|
|
3814
3814
|
isTruncated: j = !1
|
|
3815
3815
|
}) => {
|
|
3816
|
-
const g = A(), E =
|
|
3816
|
+
const g = A(), E = be(Te), k = be(dt), [T, M] = L({
|
|
3817
3817
|
body: t && t.body || "",
|
|
3818
3818
|
isEditing: !1,
|
|
3819
3819
|
didEdit: t && t.isEdited || !1
|
|
3820
|
-
}), [C,
|
|
3821
|
-
if (
|
|
3820
|
+
}), [C, H] = L(!1), [Y, x] = L("");
|
|
3821
|
+
if (Z(() => {
|
|
3822
3822
|
M({
|
|
3823
3823
|
...T,
|
|
3824
3824
|
body: t && t.body || "",
|
|
3825
3825
|
didEdit: t && t.isEdited || !1
|
|
3826
3826
|
});
|
|
3827
3827
|
}, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3828
|
-
return /* @__PURE__ */ s.jsx(
|
|
3829
|
-
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) => {
|
|
3830
3830
|
P || (P = ""), x("");
|
|
3831
3831
|
try {
|
|
3832
3832
|
if (!xs(P, T.body)) {
|
|
3833
3833
|
const te = t.type === "question" ? { title: P } : { body: P };
|
|
3834
|
-
await o(
|
|
3834
|
+
await o(fn(t.slugs), te);
|
|
3835
3835
|
}
|
|
3836
3836
|
M({ body: P, isEditing: !1, didEdit: !0 });
|
|
3837
3837
|
} catch {
|
|
3838
|
-
x(`${
|
|
3838
|
+
x(`${we}form_error`);
|
|
3839
3839
|
}
|
|
3840
|
-
},
|
|
3840
|
+
}, ie = () => {
|
|
3841
3841
|
k && k.updateConversation && k.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3842
|
-
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`,
|
|
3843
|
-
|
|
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" });
|
|
3844
3844
|
}, 0);
|
|
3845
|
-
},
|
|
3845
|
+
}, le = () => {
|
|
3846
3846
|
try {
|
|
3847
|
-
d(
|
|
3847
|
+
d(fn(t.slugs));
|
|
3848
3848
|
} catch {
|
|
3849
3849
|
x("delete-error");
|
|
3850
3850
|
}
|
|
3851
|
-
},
|
|
3851
|
+
}, re = [
|
|
3852
3852
|
{
|
|
3853
|
-
text: g.formatMessage({ id: `${
|
|
3853
|
+
text: g.formatMessage({ id: `${we}moreMenu_report` }),
|
|
3854
3854
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3855
|
-
g.formatMessage({ id: `${
|
|
3855
|
+
g.formatMessage({ id: `${we}report_subject` })
|
|
3856
3856
|
)}&body=${encodeURI(
|
|
3857
3857
|
g.formatMessage(
|
|
3858
|
-
{ id: `${
|
|
3858
|
+
{ id: `${we}report_body` },
|
|
3859
3859
|
{
|
|
3860
3860
|
contentType: t.type || "",
|
|
3861
3861
|
contentSlug: t.slug || "",
|
|
@@ -3866,9 +3866,9 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3866
3866
|
icon: "flag"
|
|
3867
3867
|
}
|
|
3868
3868
|
];
|
|
3869
|
-
return n &&
|
|
3869
|
+
return n && K && re.push(
|
|
3870
3870
|
{
|
|
3871
|
-
text: g.formatMessage({ id: `${
|
|
3871
|
+
text: g.formatMessage({ id: `${we}moreMenu_edit` }),
|
|
3872
3872
|
onClick: () => M({ ...T, isEditing: !0 }),
|
|
3873
3873
|
icon: "pencil-paper",
|
|
3874
3874
|
className: "gtm-trackable",
|
|
@@ -3876,9 +3876,9 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3876
3876
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3877
3877
|
},
|
|
3878
3878
|
{
|
|
3879
|
-
text: g.formatMessage({ id: `${
|
|
3879
|
+
text: g.formatMessage({ id: `${we}moreMenu_delete` }),
|
|
3880
3880
|
onClick: (P) => {
|
|
3881
|
-
P.preventDefault(), P.stopPropagation(),
|
|
3881
|
+
P.preventDefault(), P.stopPropagation(), H(!0);
|
|
3882
3882
|
},
|
|
3883
3883
|
icon: "trash",
|
|
3884
3884
|
className: "gtm-trackable",
|
|
@@ -3893,7 +3893,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3893
3893
|
/* @__PURE__ */ s.jsxs(
|
|
3894
3894
|
"div",
|
|
3895
3895
|
{
|
|
3896
|
-
id:
|
|
3896
|
+
id: G || t.slug,
|
|
3897
3897
|
className: S("discussion-card", t.type, {
|
|
3898
3898
|
editing: T.isEditing,
|
|
3899
3899
|
"has-link": f.post && !T.isEditing
|
|
@@ -3903,17 +3903,17 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3903
3903
|
},
|
|
3904
3904
|
children: [
|
|
3905
3905
|
!T.isEditing && /* @__PURE__ */ s.jsx(
|
|
3906
|
-
|
|
3906
|
+
Ht,
|
|
3907
3907
|
{
|
|
3908
3908
|
member: b,
|
|
3909
|
-
additionalContent: { createdAt:
|
|
3909
|
+
additionalContent: { createdAt: v, didEdit: T.didEdit },
|
|
3910
3910
|
className: typeof b != "string" && b.id === i ? "highlighted" : "",
|
|
3911
3911
|
gtmContext: p,
|
|
3912
3912
|
gtmType: "profile-click"
|
|
3913
3913
|
}
|
|
3914
3914
|
),
|
|
3915
3915
|
T.isEditing ? /* @__PURE__ */ s.jsx(
|
|
3916
|
-
|
|
3916
|
+
Fn,
|
|
3917
3917
|
{
|
|
3918
3918
|
content: { type: t.type, slugs: t.slugs },
|
|
3919
3919
|
userHasPermissions: n,
|
|
@@ -3924,8 +3924,8 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3924
3924
|
},
|
|
3925
3925
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3926
3926
|
forceShow: {
|
|
3927
|
-
error:
|
|
3928
|
-
{ id:
|
|
3927
|
+
error: Y !== "" && Y !== "delete-error" ? g.formatMessage(
|
|
3928
|
+
{ id: Y },
|
|
3929
3929
|
{
|
|
3930
3930
|
action: g.formatMessage({
|
|
3931
3931
|
id: `discussion_action_${t.type}`
|
|
@@ -3935,7 +3935,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3935
3935
|
},
|
|
3936
3936
|
functions: {
|
|
3937
3937
|
create: c,
|
|
3938
|
-
handleSaveEdit:
|
|
3938
|
+
handleSaveEdit: ae,
|
|
3939
3939
|
handleCancel: () => {
|
|
3940
3940
|
x(""), M({ ...T, isEditing: !1 });
|
|
3941
3941
|
}
|
|
@@ -3949,10 +3949,10 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3949
3949
|
className: "gtm-trackable",
|
|
3950
3950
|
"data-gtm-event-context": p,
|
|
3951
3951
|
"data-gtm-event-type": "title-click",
|
|
3952
|
-
children: /* @__PURE__ */ s.jsx(
|
|
3952
|
+
children: /* @__PURE__ */ s.jsx(ln, { options: { overrides: { a: Ks } }, children: V })
|
|
3953
3953
|
}
|
|
3954
3954
|
) : /* @__PURE__ */ s.jsx(
|
|
3955
|
-
|
|
3955
|
+
ln,
|
|
3956
3956
|
{
|
|
3957
3957
|
options: {
|
|
3958
3958
|
wrapper: t.type === "question" ? "h1" : N.Fragment,
|
|
@@ -3960,7 +3960,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3960
3960
|
forceInline: t.type === "question",
|
|
3961
3961
|
forceBlock: t.type !== "question"
|
|
3962
3962
|
},
|
|
3963
|
-
children:
|
|
3963
|
+
children: V
|
|
3964
3964
|
}
|
|
3965
3965
|
),
|
|
3966
3966
|
!T.isEditing && /* @__PURE__ */ s.jsxs(
|
|
@@ -3973,11 +3973,12 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3973
3973
|
Mr,
|
|
3974
3974
|
{
|
|
3975
3975
|
element: "li",
|
|
3976
|
-
likes:
|
|
3976
|
+
likes: O,
|
|
3977
3977
|
isShort: !1,
|
|
3978
|
-
userLiked:
|
|
3978
|
+
userLiked: B,
|
|
3979
3979
|
content: { type: t.type, slugs: t.slugs },
|
|
3980
|
-
canLike:
|
|
3980
|
+
canLike: oe,
|
|
3981
|
+
peopleWhoLiked: t.peopleWhoLiked,
|
|
3981
3982
|
functions: {
|
|
3982
3983
|
createLike: a,
|
|
3983
3984
|
deleteLike: u
|
|
@@ -3993,7 +3994,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
3993
3994
|
},
|
|
3994
3995
|
children: [
|
|
3995
3996
|
/* @__PURE__ */ s.jsx(
|
|
3996
|
-
|
|
3997
|
+
X,
|
|
3997
3998
|
{
|
|
3998
3999
|
variant: "tertiary",
|
|
3999
4000
|
size: "medium",
|
|
@@ -4005,26 +4006,26 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4005
4006
|
"data-gtm-event-context": p,
|
|
4006
4007
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
4007
4008
|
screenreaderText: g.formatMessage(
|
|
4008
|
-
{ id: `${
|
|
4009
|
-
{ count:
|
|
4009
|
+
{ id: `${we}comments_screenReader` },
|
|
4010
|
+
{ count: W }
|
|
4010
4011
|
)
|
|
4011
4012
|
}
|
|
4012
4013
|
),
|
|
4013
4014
|
/* @__PURE__ */ s.jsx("span", { children: g.formatMessage(
|
|
4014
|
-
{ id: `${
|
|
4015
|
-
{ count:
|
|
4015
|
+
{ id: `${we}comments` },
|
|
4016
|
+
{ count: W }
|
|
4016
4017
|
) })
|
|
4017
4018
|
]
|
|
4018
4019
|
}
|
|
4019
4020
|
),
|
|
4020
4021
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
|
|
4021
|
-
|
|
4022
|
+
X,
|
|
4022
4023
|
{
|
|
4023
4024
|
variant: "tertiary",
|
|
4024
4025
|
size: "medium",
|
|
4025
4026
|
styling: { muted: !0 },
|
|
4026
|
-
onClick:
|
|
4027
|
-
children: g.formatMessage({ id: `${
|
|
4027
|
+
onClick: ie,
|
|
4028
|
+
children: g.formatMessage({ id: `${we}reply` })
|
|
4028
4029
|
}
|
|
4029
4030
|
) }),
|
|
4030
4031
|
/* @__PURE__ */ s.jsx(
|
|
@@ -4032,7 +4033,7 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4032
4033
|
{
|
|
4033
4034
|
element: "li",
|
|
4034
4035
|
id: `more-${t.slug}`,
|
|
4035
|
-
options:
|
|
4036
|
+
options: re
|
|
4036
4037
|
}
|
|
4037
4038
|
)
|
|
4038
4039
|
]
|
|
@@ -4043,14 +4044,14 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4043
4044
|
),
|
|
4044
4045
|
_,
|
|
4045
4046
|
/* @__PURE__ */ s.jsx(
|
|
4046
|
-
|
|
4047
|
+
Ln,
|
|
4047
4048
|
{
|
|
4048
4049
|
id: `delete-${t.slug}-modal`,
|
|
4049
4050
|
isOpen: C,
|
|
4050
4051
|
functions: { onOpen: () => {
|
|
4051
|
-
}, onClose: () =>
|
|
4052
|
+
}, onClose: () => H(!1) },
|
|
4052
4053
|
forceShow: {
|
|
4053
|
-
error:
|
|
4054
|
+
error: Y === "delete-error" ? g.formatMessage(
|
|
4054
4055
|
{ id: "discussion_delete_error" },
|
|
4055
4056
|
{
|
|
4056
4057
|
action: g.formatMessage({
|
|
@@ -4066,19 +4067,19 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4066
4067
|
buttons: [
|
|
4067
4068
|
{
|
|
4068
4069
|
variant: "secondary",
|
|
4069
|
-
onClick: () =>
|
|
4070
|
+
onClick: () => H(!1),
|
|
4070
4071
|
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4071
4072
|
},
|
|
4072
4073
|
{
|
|
4073
4074
|
variant: "primary",
|
|
4074
4075
|
className: "destructive",
|
|
4075
|
-
onClick:
|
|
4076
|
+
onClick: le,
|
|
4076
4077
|
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4077
4078
|
}
|
|
4078
4079
|
],
|
|
4079
4080
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
4080
4081
|
children: /* @__PURE__ */ s.jsx(
|
|
4081
|
-
|
|
4082
|
+
Ee,
|
|
4082
4083
|
{
|
|
4083
4084
|
id: "discussion_delete_text",
|
|
4084
4085
|
values: {
|
|
@@ -4094,25 +4095,25 @@ const ve = "discussion_", Nr = 280, ct = ({
|
|
|
4094
4095
|
] })
|
|
4095
4096
|
});
|
|
4096
4097
|
};
|
|
4097
|
-
const
|
|
4098
|
+
const Ct = "discussion_responses_", Ao = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4098
4099
|
const n = A();
|
|
4099
4100
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4100
|
-
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4101
|
-
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) })
|
|
4102
4103
|
] });
|
|
4103
4104
|
};
|
|
4104
4105
|
const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4105
|
-
const r = A(), i =
|
|
4106
|
+
const r = A(), i = se(null), c = be(dt), [d, o] = L(
|
|
4106
4107
|
"closed"
|
|
4107
4108
|
/* Closed */
|
|
4108
4109
|
);
|
|
4109
|
-
|
|
4110
|
+
Z(() => {
|
|
4110
4111
|
const f = i.current;
|
|
4111
4112
|
if (f)
|
|
4112
4113
|
return f.addEventListener("transitionend", a), () => {
|
|
4113
4114
|
f.removeEventListener("transitionend", a);
|
|
4114
4115
|
};
|
|
4115
|
-
}, []),
|
|
4116
|
+
}, []), Ne(() => {
|
|
4116
4117
|
d === "closed" && !c.showThread || o(
|
|
4117
4118
|
[
|
|
4118
4119
|
"opening",
|
|
@@ -4121,7 +4122,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4121
4122
|
].includes(d) ? "ready-to-close" : "opening"
|
|
4122
4123
|
/* Opening */
|
|
4123
4124
|
);
|
|
4124
|
-
}, [c.showThread]),
|
|
4125
|
+
}, [c.showThread]), Z(() => {
|
|
4125
4126
|
d === "ready-to-close" && o(
|
|
4126
4127
|
"closing"
|
|
4127
4128
|
/* Closing */
|
|
@@ -4133,12 +4134,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4133
4134
|
"opening",
|
|
4134
4135
|
"open"
|
|
4135
4136
|
/* Open */
|
|
4136
|
-
].includes(d), l =
|
|
4137
|
+
].includes(d), l = kn(n, {
|
|
4137
4138
|
element: "li"
|
|
4138
4139
|
});
|
|
4139
4140
|
return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
|
|
4140
4141
|
t && /* @__PURE__ */ s.jsx(
|
|
4141
|
-
|
|
4142
|
+
X,
|
|
4142
4143
|
{
|
|
4143
4144
|
variant: "secondary",
|
|
4144
4145
|
size: "small",
|
|
@@ -4289,12 +4290,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4289
4290
|
isMember: n,
|
|
4290
4291
|
functions: { list: r, create: i, edit: c, like: d, unlike: o, join: a, leave: u }
|
|
4291
4292
|
}) => {
|
|
4292
|
-
const l = A(), f =
|
|
4293
|
+
const l = A(), f = ot(), h = be(Te), {
|
|
4293
4294
|
data: p,
|
|
4294
4295
|
error: _,
|
|
4295
4296
|
isLoading: j,
|
|
4296
4297
|
isFetching: g
|
|
4297
|
-
} =
|
|
4298
|
+
} = pn({
|
|
4298
4299
|
queryKey: [e, t],
|
|
4299
4300
|
queryFn: r
|
|
4300
4301
|
}), E = Rr({
|
|
@@ -4302,43 +4303,43 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4302
4303
|
queryKey: [e, t],
|
|
4303
4304
|
user: h,
|
|
4304
4305
|
mutationFn: i
|
|
4305
|
-
}), { mutate: k } =
|
|
4306
|
+
}), { mutate: k } = me(E), T = Fr({
|
|
4306
4307
|
queryClient: f,
|
|
4307
4308
|
queryKey: [e, t],
|
|
4308
|
-
mutationFn: async (
|
|
4309
|
+
mutationFn: async (v) => await c(v)
|
|
4309
4310
|
}), {
|
|
4310
4311
|
mutate: M
|
|
4311
|
-
} =
|
|
4312
|
+
} = me(T), C = Lr({
|
|
4312
4313
|
queryClient: f,
|
|
4313
4314
|
queryKey: [e, t],
|
|
4314
4315
|
mutationFn: d
|
|
4315
4316
|
}), {
|
|
4316
|
-
mutate:
|
|
4317
|
-
} =
|
|
4317
|
+
mutate: H
|
|
4318
|
+
} = me(C), Y = Or({
|
|
4318
4319
|
queryClient: f,
|
|
4319
4320
|
queryKey: [e, t],
|
|
4320
4321
|
user: h,
|
|
4321
|
-
mutationFn: async ({ activityId:
|
|
4322
|
-
var
|
|
4323
|
-
const
|
|
4324
|
-
(
|
|
4325
|
-
)),
|
|
4326
|
-
(
|
|
4327
|
-
)) == null ? void 0 :
|
|
4328
|
-
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 });
|
|
4329
4330
|
}
|
|
4330
4331
|
}), {
|
|
4331
4332
|
mutate: x
|
|
4332
|
-
} =
|
|
4333
|
-
({ activityId:
|
|
4334
|
-
[
|
|
4335
|
-
),
|
|
4336
|
-
({ activityId:
|
|
4333
|
+
} = me(Y), b = je(
|
|
4334
|
+
({ activityId: v }) => H({ activityId: v }),
|
|
4335
|
+
[H]
|
|
4336
|
+
), U = je(
|
|
4337
|
+
({ activityId: v }) => x({ activityId: v }),
|
|
4337
4338
|
[x]
|
|
4338
4339
|
);
|
|
4339
|
-
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: [
|
|
4340
4341
|
/* @__PURE__ */ s.jsx(
|
|
4341
|
-
|
|
4342
|
+
Qt,
|
|
4342
4343
|
{
|
|
4343
4344
|
contentType: "post",
|
|
4344
4345
|
createPost: k,
|
|
@@ -4351,49 +4352,53 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4351
4352
|
}
|
|
4352
4353
|
}
|
|
4353
4354
|
),
|
|
4354
|
-
!g && Array.isArray(p) && (p == null ? void 0 : p.map((
|
|
4355
|
-
var
|
|
4356
|
-
const
|
|
4357
|
-
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: [
|
|
4358
4359
|
/* @__PURE__ */ s.jsx(
|
|
4359
|
-
|
|
4360
|
+
ut,
|
|
4360
4361
|
{
|
|
4361
4362
|
content: {
|
|
4362
4363
|
type: "post",
|
|
4363
|
-
body:
|
|
4364
|
-
canLike:
|
|
4365
|
-
createdAt: (
|
|
4366
|
-
slugs: { parentId: t, activityId:
|
|
4367
|
-
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,
|
|
4368
4369
|
author: {
|
|
4369
|
-
id: (
|
|
4370
|
-
name: `${(
|
|
4371
|
-
organization: (
|
|
4372
|
-
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,
|
|
4373
4374
|
image: {
|
|
4374
|
-
thumbnail: ((P = (
|
|
4375
|
+
thumbnail: ((P = (re = v == null ? void 0 : v.actor) == null ? void 0 : re.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4375
4376
|
}
|
|
4376
4377
|
},
|
|
4377
|
-
userLiked: ((te =
|
|
4378
|
-
likes: (
|
|
4379
|
-
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
|
+
})))
|
|
4380
4385
|
},
|
|
4381
4386
|
links: {
|
|
4382
|
-
post: `${e}/${t}/${
|
|
4383
|
-
comments: `${e}/${t}/${
|
|
4387
|
+
post: `${e}/${t}/${v == null ? void 0 : v.id}`,
|
|
4388
|
+
comments: `${e}/${t}/${v == null ? void 0 : v.id}`
|
|
4384
4389
|
},
|
|
4385
4390
|
functions: {
|
|
4386
4391
|
content: {
|
|
4387
4392
|
createContent: () => null,
|
|
4388
4393
|
deleteContent: () => null,
|
|
4389
|
-
updateContent: (
|
|
4394
|
+
updateContent: (J, fe) => M({ activityInfo: J, content: fe })
|
|
4390
4395
|
},
|
|
4391
4396
|
likes: {
|
|
4392
4397
|
createLike: () => {
|
|
4393
|
-
b({ activityId:
|
|
4398
|
+
b({ activityId: v == null ? void 0 : v.id });
|
|
4394
4399
|
},
|
|
4395
4400
|
deleteLike: () => {
|
|
4396
|
-
|
|
4401
|
+
U({ activityId: v == null ? void 0 : v.id });
|
|
4397
4402
|
}
|
|
4398
4403
|
},
|
|
4399
4404
|
comments: {
|
|
@@ -4403,8 +4408,8 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4403
4408
|
isTruncated: !0
|
|
4404
4409
|
}
|
|
4405
4410
|
),
|
|
4406
|
-
/* @__PURE__ */ s.jsx(
|
|
4407
|
-
] },
|
|
4411
|
+
/* @__PURE__ */ s.jsx(Ae, {})
|
|
4412
|
+
] }, v == null ? void 0 : v.id);
|
|
4408
4413
|
}))
|
|
4409
4414
|
] });
|
|
4410
4415
|
}, Br = ({
|
|
@@ -4541,7 +4546,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4541
4546
|
onSettled: () => {
|
|
4542
4547
|
e.invalidateQueries({ queryKey: t });
|
|
4543
4548
|
}
|
|
4544
|
-
}),
|
|
4549
|
+
}), Wr = ({
|
|
4545
4550
|
queryClient: e,
|
|
4546
4551
|
queryKey: t,
|
|
4547
4552
|
mutationFn: n
|
|
@@ -4566,7 +4571,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4566
4571
|
...o,
|
|
4567
4572
|
latest_reactions: { reply: a }
|
|
4568
4573
|
})), { previousActivity: o };
|
|
4569
|
-
} }),
|
|
4574
|
+
} }), hn = ({
|
|
4570
4575
|
queryClient: e,
|
|
4571
4576
|
queryKey: t,
|
|
4572
4577
|
mutationFn: n
|
|
@@ -4599,7 +4604,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4599
4604
|
...a,
|
|
4600
4605
|
latest_reactions: { reply: u }
|
|
4601
4606
|
})), { previousActivity: a };
|
|
4602
|
-
} }),
|
|
4607
|
+
} }), zr = ({
|
|
4603
4608
|
basePath: e,
|
|
4604
4609
|
parentId: t,
|
|
4605
4610
|
replyParentId: n,
|
|
@@ -4608,34 +4613,34 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4608
4613
|
replies: c,
|
|
4609
4614
|
functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
|
|
4610
4615
|
}) => {
|
|
4611
|
-
const h = A(), p =
|
|
4616
|
+
const h = A(), p = ot(), _ = be(dt), j = Ur({
|
|
4612
4617
|
queryClient: p,
|
|
4613
4618
|
queryKey: [e, t, r],
|
|
4614
4619
|
mutationFn: async (b) => d({ replyId: n, content: b.body })
|
|
4615
|
-
}), { mutate: g } =
|
|
4620
|
+
}), { mutate: g } = me(j), E = Wr({
|
|
4616
4621
|
queryClient: p,
|
|
4617
4622
|
queryKey: [e, t, r],
|
|
4618
4623
|
mutationFn: o
|
|
4619
4624
|
}), {
|
|
4620
4625
|
mutate: k
|
|
4621
|
-
} =
|
|
4626
|
+
} = me(E), T = hn({
|
|
4622
4627
|
queryClient: p,
|
|
4623
4628
|
queryKey: [e, t, r],
|
|
4624
4629
|
mutationFn: l
|
|
4625
4630
|
}), {
|
|
4626
4631
|
mutate: M
|
|
4627
|
-
} =
|
|
4632
|
+
} = me(T), C = hn({
|
|
4628
4633
|
queryClient: p,
|
|
4629
4634
|
queryKey: [e, t, r],
|
|
4630
4635
|
mutationFn: f
|
|
4631
4636
|
}), {
|
|
4632
|
-
mutate:
|
|
4633
|
-
} =
|
|
4634
|
-
({ replyId: b, replyParentId:
|
|
4637
|
+
mutate: H
|
|
4638
|
+
} = me(C), Y = je(
|
|
4639
|
+
({ replyId: b, replyParentId: U }) => M({ replyId: b, replyParentId: U }),
|
|
4635
4640
|
[M]
|
|
4636
|
-
), x =
|
|
4637
|
-
({ replyId: b, replyParentId:
|
|
4638
|
-
[
|
|
4641
|
+
), x = je(
|
|
4642
|
+
({ replyId: b, replyParentId: U }) => H({ replyId: b, replyParentId: U }),
|
|
4643
|
+
[H]
|
|
4639
4644
|
);
|
|
4640
4645
|
return /* @__PURE__ */ s.jsx(
|
|
4641
4646
|
Ar,
|
|
@@ -4644,10 +4649,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4644
4649
|
showRepliesButton: i > 0 || _.showForm,
|
|
4645
4650
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4646
4651
|
_.showForm && /* @__PURE__ */ s.jsx(
|
|
4647
|
-
|
|
4652
|
+
Qt,
|
|
4648
4653
|
{
|
|
4649
4654
|
contentType: "reply",
|
|
4650
|
-
createPost: (b,
|
|
4655
|
+
createPost: (b, U) => g(U),
|
|
4651
4656
|
membershipRequiredToPost: {
|
|
4652
4657
|
isMember: !0,
|
|
4653
4658
|
required: !0,
|
|
@@ -4658,13 +4663,13 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4658
4663
|
}
|
|
4659
4664
|
),
|
|
4660
4665
|
(c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
|
|
4661
|
-
var
|
|
4666
|
+
var U, v, G, O, B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne;
|
|
4662
4667
|
return /* @__PURE__ */ s.jsx(
|
|
4663
|
-
|
|
4668
|
+
ut,
|
|
4664
4669
|
{
|
|
4665
4670
|
content: {
|
|
4666
4671
|
type: "reply",
|
|
4667
|
-
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) || "",
|
|
4668
4673
|
createdAt: b == null ? void 0 : b.created_at,
|
|
4669
4674
|
slugs: {
|
|
4670
4675
|
parentId: t,
|
|
@@ -4674,33 +4679,37 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4674
4679
|
},
|
|
4675
4680
|
slug: "",
|
|
4676
4681
|
author: {
|
|
4677
|
-
id: (
|
|
4678
|
-
name: (
|
|
4679
|
-
organization: (
|
|
4680
|
-
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,
|
|
4681
4686
|
image: {
|
|
4682
|
-
thumbnail: ((
|
|
4687
|
+
thumbnail: ((le = (ie = b == null ? void 0 : b.user) == null ? void 0 : ie.data) == null ? void 0 : le.thumbnail) || void 0
|
|
4683
4688
|
}
|
|
4684
4689
|
},
|
|
4685
|
-
userLiked: ((
|
|
4686
|
-
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
|
+
})))
|
|
4687
4696
|
},
|
|
4688
4697
|
functions: {
|
|
4689
4698
|
content: {
|
|
4690
4699
|
createContent: () => console.log("create"),
|
|
4691
4700
|
deleteContent: () => console.log("delete"),
|
|
4692
|
-
updateContent: (
|
|
4701
|
+
updateContent: (F, J) => k({ replyInfo: F, content: J })
|
|
4693
4702
|
},
|
|
4694
4703
|
likes: {
|
|
4695
|
-
createLike: () =>
|
|
4704
|
+
createLike: () => Y({
|
|
4696
4705
|
replyId: b == null ? void 0 : b.id,
|
|
4697
4706
|
replyParentId: b == null ? void 0 : b.parent
|
|
4698
4707
|
}),
|
|
4699
4708
|
deleteLike: () => {
|
|
4700
|
-
var
|
|
4701
|
-
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);
|
|
4702
4711
|
return x({
|
|
4703
|
-
replyId:
|
|
4712
|
+
replyId: F || ""
|
|
4704
4713
|
});
|
|
4705
4714
|
}
|
|
4706
4715
|
},
|
|
@@ -4721,39 +4730,39 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4721
4730
|
isMember: i,
|
|
4722
4731
|
functions: { createReply: c, editReply: d, like: o, unlike: a, join: u, leave: l }
|
|
4723
4732
|
}) => {
|
|
4724
|
-
const f = A(), h =
|
|
4733
|
+
const f = A(), h = ot(), p = be(Te), _ = Br({
|
|
4725
4734
|
queryClient: h,
|
|
4726
4735
|
queryKey: [e, t, n],
|
|
4727
4736
|
mutationFn: async (x) => c({ activityId: n, content: x.body })
|
|
4728
|
-
}), { mutate: j } =
|
|
4737
|
+
}), { mutate: j } = me(_), g = Ir({
|
|
4729
4738
|
queryClient: h,
|
|
4730
4739
|
queryKey: [e, t, n],
|
|
4731
4740
|
mutationFn: async (x) => d(x)
|
|
4732
4741
|
}), {
|
|
4733
4742
|
mutate: E
|
|
4734
|
-
} =
|
|
4743
|
+
} = me(g), k = Hr({
|
|
4735
4744
|
queryClient: h,
|
|
4736
4745
|
queryKey: [e, t, n],
|
|
4737
4746
|
mutationFn: o
|
|
4738
4747
|
}), {
|
|
4739
4748
|
mutate: T
|
|
4740
|
-
} =
|
|
4749
|
+
} = me(k), M = Qr({
|
|
4741
4750
|
queryClient: h,
|
|
4742
4751
|
queryKey: [e, t, n],
|
|
4743
4752
|
user: p,
|
|
4744
4753
|
mutationFn: a
|
|
4745
4754
|
}), {
|
|
4746
4755
|
mutate: C
|
|
4747
|
-
} =
|
|
4756
|
+
} = me(M), H = je(
|
|
4748
4757
|
({ replyId: x }) => T({ replyId: x }),
|
|
4749
4758
|
[T]
|
|
4750
|
-
),
|
|
4759
|
+
), Y = je(
|
|
4751
4760
|
({ replyId: x }) => C({ replyId: x }),
|
|
4752
4761
|
[C]
|
|
4753
4762
|
);
|
|
4754
4763
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
4755
4764
|
/* @__PURE__ */ s.jsx(
|
|
4756
|
-
|
|
4765
|
+
Qt,
|
|
4757
4766
|
{
|
|
4758
4767
|
contentType: "reply",
|
|
4759
4768
|
createPost: (x, b) => j(b),
|
|
@@ -4767,15 +4776,15 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4767
4776
|
}
|
|
4768
4777
|
),
|
|
4769
4778
|
(r == null ? void 0 : r.length) === 0 || (r == null ? void 0 : r.map((x) => {
|
|
4770
|
-
var
|
|
4771
|
-
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);
|
|
4772
4781
|
return /* @__PURE__ */ s.jsx(Sr, { children: /* @__PURE__ */ s.jsx(
|
|
4773
|
-
|
|
4782
|
+
ut,
|
|
4774
4783
|
{
|
|
4775
4784
|
content: {
|
|
4776
4785
|
type: "reply",
|
|
4777
|
-
body: typeof x.data.content == "string" ? (
|
|
4778
|
-
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,
|
|
4779
4788
|
createdAt: x == null ? void 0 : x.created_at,
|
|
4780
4789
|
slugs: {
|
|
4781
4790
|
question: `${e}/${t}/${n}`,
|
|
@@ -4784,42 +4793,46 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
|
4784
4793
|
},
|
|
4785
4794
|
slug: `${e}/${t}/${n}#${x == null ? void 0 : x.id}`,
|
|
4786
4795
|
author: {
|
|
4787
|
-
id: (
|
|
4788
|
-
name: (
|
|
4789
|
-
organization: (
|
|
4790
|
-
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,
|
|
4791
4800
|
image: {
|
|
4792
|
-
thumbnail: ((P = (
|
|
4801
|
+
thumbnail: ((P = (re = x == null ? void 0 : x.user) == null ? void 0 : re.data) == null ? void 0 : P.thumbnail) || void 0
|
|
4793
4802
|
}
|
|
4794
4803
|
},
|
|
4795
|
-
userLiked: ((te = x == null ? void 0 : x.own_children) == null ? void 0 : te.like) && ((
|
|
4796
|
-
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
|
+
})))
|
|
4797
4810
|
},
|
|
4798
4811
|
functions: {
|
|
4799
4812
|
content: {
|
|
4800
4813
|
createContent: () => console.log("create"),
|
|
4801
4814
|
deleteContent: () => console.log("delete"),
|
|
4802
|
-
updateContent: (
|
|
4815
|
+
updateContent: (ge, $e) => E({ replyInfo: ge, content: $e })
|
|
4803
4816
|
},
|
|
4804
4817
|
likes: {
|
|
4805
|
-
createLike: () =>
|
|
4818
|
+
createLike: () => H({ replyId: x == null ? void 0 : x.id }),
|
|
4806
4819
|
deleteLike: () => {
|
|
4807
|
-
var
|
|
4808
|
-
const
|
|
4809
|
-
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 || "" });
|
|
4810
4823
|
}
|
|
4811
4824
|
},
|
|
4812
4825
|
comments: {}
|
|
4813
4826
|
},
|
|
4814
4827
|
children: /* @__PURE__ */ s.jsx(
|
|
4815
|
-
|
|
4828
|
+
zr,
|
|
4816
4829
|
{
|
|
4817
4830
|
basePath: e,
|
|
4818
4831
|
parentId: t,
|
|
4819
4832
|
replyParentId: x == null ? void 0 : x.id,
|
|
4820
4833
|
activityId: n,
|
|
4821
|
-
replyCount: ((
|
|
4822
|
-
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,
|
|
4823
4836
|
isMember: i,
|
|
4824
4837
|
functions: {
|
|
4825
4838
|
create: c,
|
|
@@ -4931,61 +4944,61 @@ const Ro = ({
|
|
|
4931
4944
|
leave: p
|
|
4932
4945
|
}
|
|
4933
4946
|
}) => {
|
|
4934
|
-
var
|
|
4935
|
-
const _ =
|
|
4947
|
+
var B, W, V, K, oe, ae, ie, le, re, P, te, ce, ne;
|
|
4948
|
+
const _ = be(Te), j = ot(), {
|
|
4936
4949
|
data: g,
|
|
4937
4950
|
error: E,
|
|
4938
4951
|
isLoading: k,
|
|
4939
4952
|
isFetching: T
|
|
4940
|
-
} =
|
|
4953
|
+
} = pn({
|
|
4941
4954
|
queryKey: [e, t, n],
|
|
4942
4955
|
queryFn: i
|
|
4943
4956
|
}), M = Yr({
|
|
4944
4957
|
queryClient: j,
|
|
4945
4958
|
queryKey: [e, t, n],
|
|
4946
|
-
mutationFn: async (
|
|
4959
|
+
mutationFn: async (F) => await c(F)
|
|
4947
4960
|
}), {
|
|
4948
4961
|
mutate: C
|
|
4949
|
-
} =
|
|
4962
|
+
} = me(M), H = Gr({
|
|
4950
4963
|
queryClient: j,
|
|
4951
4964
|
queryKey: [e, t, n],
|
|
4952
4965
|
mutationFn: d
|
|
4953
4966
|
}), {
|
|
4954
|
-
mutate:
|
|
4955
|
-
} =
|
|
4967
|
+
mutate: Y
|
|
4968
|
+
} = me(H), x = Jr({
|
|
4956
4969
|
queryClient: j,
|
|
4957
4970
|
queryKey: [e, t, n],
|
|
4958
4971
|
user: _,
|
|
4959
4972
|
mutationFn: async () => {
|
|
4960
|
-
var
|
|
4961
|
-
const
|
|
4962
|
-
(
|
|
4963
|
-
)) == null ? void 0 :
|
|
4964
|
-
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 });
|
|
4965
4978
|
},
|
|
4966
4979
|
activity: g
|
|
4967
4980
|
}), {
|
|
4968
4981
|
mutate: b
|
|
4969
|
-
} =
|
|
4970
|
-
({ activityId:
|
|
4971
|
-
[
|
|
4972
|
-
),
|
|
4973
|
-
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 }),
|
|
4974
4987
|
[b]
|
|
4975
4988
|
);
|
|
4976
4989
|
if (E)
|
|
4977
|
-
return /* @__PURE__ */ s.jsx(
|
|
4990
|
+
return /* @__PURE__ */ s.jsx(ct, { variant: "error", text: E.message });
|
|
4978
4991
|
if (k || T)
|
|
4979
|
-
return /* @__PURE__ */ s.jsx(
|
|
4980
|
-
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);
|
|
4981
4994
|
return /* @__PURE__ */ s.jsx(
|
|
4982
|
-
|
|
4995
|
+
ut,
|
|
4983
4996
|
{
|
|
4984
4997
|
className: "activity-section",
|
|
4985
4998
|
content: {
|
|
4986
4999
|
type: "post",
|
|
4987
5000
|
body: g == null ? void 0 : g.content,
|
|
4988
|
-
canLike:
|
|
5001
|
+
canLike: O,
|
|
4989
5002
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4990
5003
|
slugs: {
|
|
4991
5004
|
question: `${t}/${n}`,
|
|
@@ -4994,28 +5007,32 @@ const Ro = ({
|
|
|
4994
5007
|
},
|
|
4995
5008
|
slug: n,
|
|
4996
5009
|
author: {
|
|
4997
|
-
id: (
|
|
4998
|
-
name: (
|
|
4999
|
-
organization: (
|
|
5000
|
-
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,
|
|
5001
5014
|
image: {
|
|
5002
|
-
thumbnail: ((
|
|
5015
|
+
thumbnail: ((ae = g == null ? void 0 : g.actor) == null ? void 0 : ae.data.thumbnail) || void 0
|
|
5003
5016
|
}
|
|
5004
5017
|
},
|
|
5005
|
-
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,
|
|
5006
5019
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
5007
|
-
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
|
+
})))
|
|
5008
5025
|
},
|
|
5009
|
-
originalAuthorId: (
|
|
5026
|
+
originalAuthorId: (te = g == null ? void 0 : g.actor) == null ? void 0 : te.id,
|
|
5010
5027
|
functions: {
|
|
5011
5028
|
content: {
|
|
5012
5029
|
createContent: () => console.log("create"),
|
|
5013
5030
|
deleteContent: () => console.log("delete"),
|
|
5014
|
-
updateContent: (
|
|
5031
|
+
updateContent: (F, J) => C({ activityInfo: F, content: J })
|
|
5015
5032
|
},
|
|
5016
5033
|
likes: {
|
|
5017
|
-
createLike: () =>
|
|
5018
|
-
deleteLike: () =>
|
|
5034
|
+
createLike: () => U({ activityId: n }),
|
|
5035
|
+
deleteLike: () => v({ activityId: n })
|
|
5019
5036
|
},
|
|
5020
5037
|
comments: {
|
|
5021
5038
|
openComments: () => {
|
|
@@ -5025,7 +5042,7 @@ const Ro = ({
|
|
|
5025
5042
|
children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
5026
5043
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
5027
5044
|
"Comments (",
|
|
5028
|
-
((
|
|
5045
|
+
((ce = g == null ? void 0 : g.reaction_counts) == null ? void 0 : ce.reply) || 0,
|
|
5029
5046
|
")"
|
|
5030
5047
|
] }),
|
|
5031
5048
|
/* @__PURE__ */ s.jsx(
|
|
@@ -5034,7 +5051,7 @@ const Ro = ({
|
|
|
5034
5051
|
basePath: e,
|
|
5035
5052
|
parentId: t,
|
|
5036
5053
|
activityId: n,
|
|
5037
|
-
repliesList: (
|
|
5054
|
+
repliesList: (ne = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ne.reply,
|
|
5038
5055
|
isMember: r,
|
|
5039
5056
|
functions: {
|
|
5040
5057
|
createReply: a,
|
|
@@ -5058,65 +5075,65 @@ const Ro = ({
|
|
|
5058
5075
|
image: { thumbnail: i }
|
|
5059
5076
|
});
|
|
5060
5077
|
export {
|
|
5061
|
-
|
|
5078
|
+
Pt as ASSETS_BUCKET,
|
|
5062
5079
|
Po as ActivitiesFeed,
|
|
5063
5080
|
Ro as ActivitySection,
|
|
5064
|
-
|
|
5081
|
+
Qt as AddPost,
|
|
5065
5082
|
po as BannerSection,
|
|
5066
5083
|
ko as Breadcrumbs,
|
|
5067
|
-
|
|
5068
|
-
|
|
5084
|
+
X as Button,
|
|
5085
|
+
it as ButtonWrapper,
|
|
5069
5086
|
ir as CacheProvider,
|
|
5070
|
-
|
|
5087
|
+
yn as CollapsibleSection,
|
|
5071
5088
|
Eo as Columns,
|
|
5072
5089
|
wo as CommunityDetails,
|
|
5073
5090
|
ar as Contributors,
|
|
5074
|
-
|
|
5091
|
+
dt as ConversationContext,
|
|
5075
5092
|
_r as CookieBanner,
|
|
5076
5093
|
Sr as DiscussionConversation,
|
|
5077
|
-
|
|
5094
|
+
Fn as DiscussionForm,
|
|
5078
5095
|
Mr as DiscussionLikes,
|
|
5079
|
-
|
|
5096
|
+
ut as DiscussionPost,
|
|
5080
5097
|
Ar as DiscussionThread,
|
|
5081
|
-
|
|
5098
|
+
Ae as Divider,
|
|
5082
5099
|
fo as DownloadSection,
|
|
5083
|
-
|
|
5100
|
+
Be as EMAILS,
|
|
5084
5101
|
So as EmailHelperTextBox,
|
|
5085
|
-
|
|
5102
|
+
ct as EmptyStateBox,
|
|
5086
5103
|
jo as Filters,
|
|
5087
5104
|
dr as FlagsProvider,
|
|
5088
|
-
|
|
5089
|
-
|
|
5105
|
+
Dn as Footer,
|
|
5106
|
+
jn as FullWidthSection,
|
|
5090
5107
|
vo as GlobalProviders,
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5108
|
+
Rn as Header,
|
|
5109
|
+
Ws as HelperTextBox,
|
|
5110
|
+
xn as HiddenFromScreenReaders,
|
|
5094
5111
|
xo as HideShowTextBox,
|
|
5095
|
-
|
|
5112
|
+
Se as HighlightedTextBox,
|
|
5096
5113
|
ur as IntlProvider,
|
|
5097
5114
|
wr as InviteForm,
|
|
5098
5115
|
No as InviteModal,
|
|
5099
|
-
|
|
5116
|
+
Mn as JoinButton,
|
|
5100
5117
|
yo as LanguageSwitcher,
|
|
5101
|
-
|
|
5118
|
+
lt as Link,
|
|
5102
5119
|
hr as LoadMore,
|
|
5103
5120
|
bo as LoadingBlock,
|
|
5104
|
-
|
|
5121
|
+
ye as LoadingPlaceholder,
|
|
5105
5122
|
sr as LoadingState,
|
|
5106
|
-
|
|
5123
|
+
Cn as Logo,
|
|
5107
5124
|
ho as LogoSection,
|
|
5108
|
-
|
|
5125
|
+
ln as MarkdownText,
|
|
5109
5126
|
go as MarketingBox,
|
|
5110
|
-
|
|
5127
|
+
Ht as Member,
|
|
5111
5128
|
Do as MembersList,
|
|
5112
5129
|
Cr as Modal,
|
|
5113
5130
|
pr as MoreMenu,
|
|
5114
5131
|
_o as NUMBER_OF_USERS,
|
|
5115
|
-
|
|
5132
|
+
Ln as Overlay,
|
|
5116
5133
|
Mo as PageLayout,
|
|
5117
5134
|
To as PasswordRules,
|
|
5118
5135
|
qs as Pill,
|
|
5119
|
-
|
|
5136
|
+
It as ProfilePicture,
|
|
5120
5137
|
tr as ProgressBar,
|
|
5121
5138
|
$o as Rating,
|
|
5122
5139
|
Vr as RepliesFeed,
|
|
@@ -5124,19 +5141,19 @@ export {
|
|
|
5124
5141
|
Is as ResponsiveImage,
|
|
5125
5142
|
vr as SearchForm,
|
|
5126
5143
|
Ks as Span,
|
|
5127
|
-
|
|
5144
|
+
Ft as StatusBanner,
|
|
5128
5145
|
Co as Tags,
|
|
5129
5146
|
Hs as Tooltip,
|
|
5130
|
-
|
|
5147
|
+
Te as UserContext,
|
|
5131
5148
|
mr as UserProvider,
|
|
5132
|
-
|
|
5149
|
+
de as VisuallyHidden,
|
|
5133
5150
|
Dr as addAriaProps,
|
|
5134
|
-
|
|
5135
|
-
|
|
5151
|
+
$n as getMember,
|
|
5152
|
+
et as headerData,
|
|
5136
5153
|
Fo as mapGetStreamData,
|
|
5137
5154
|
Es as useCurrentPath,
|
|
5138
|
-
|
|
5139
|
-
|
|
5155
|
+
Ne as useEffectAfterMount,
|
|
5156
|
+
at as useScreenWidth,
|
|
5140
5157
|
Ts as useScrollListener,
|
|
5141
5158
|
mo as useScrollToHash
|
|
5142
5159
|
};
|