@apolitical/component-library 1.13.1 → 1.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/communities/community-details/community-details.d.ts +1 -3
- package/discussion/components/post/post.d.ts +3 -1
- package/index.js +13 -13
- package/index.mjs +1177 -1123
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import A, { memo as Ae, useState as
|
|
1
|
+
import A, { memo as Ae, useState as P, useEffect as z, useRef as ee, useMemo as qe, Children as jt, createContext as Nt, useContext as ye, Fragment as Et, useCallback as Ee, useReducer as rr, Suspense as sr } from "react";
|
|
2
2
|
import or from "lodash.clonedeep";
|
|
3
3
|
import ar from "lodash.set";
|
|
4
|
-
import { useIntl as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
4
|
+
import { useIntl as F, IntlProvider as ir, createIntl as lr, FormattedMessage as we } from "react-intl";
|
|
5
|
+
import Ke from "truncate";
|
|
6
|
+
import et from "markdown-to-jsx";
|
|
7
7
|
import { QueryClient as cr, QueryClientProvider as ur, useQueryClient as At, useQuery as cn, useMutation as fe } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as dr } from "@tanstack/react-query-devtools";
|
|
9
9
|
import Ge from "posthog-js";
|
|
@@ -29,15 +29,15 @@ var dn = { exports: {} };
|
|
|
29
29
|
for (var s = [], o = 0; o < arguments.length; o++) {
|
|
30
30
|
var l = arguments[o];
|
|
31
31
|
if (l) {
|
|
32
|
-
var
|
|
33
|
-
if (
|
|
32
|
+
var d = typeof l;
|
|
33
|
+
if (d === "string" || d === "number")
|
|
34
34
|
s.push(l);
|
|
35
35
|
else if (Array.isArray(l)) {
|
|
36
36
|
if (l.length) {
|
|
37
37
|
var a = n.apply(null, l);
|
|
38
38
|
a && s.push(a);
|
|
39
39
|
}
|
|
40
|
-
} else if (
|
|
40
|
+
} else if (d === "object") {
|
|
41
41
|
if (l.toString !== Object.prototype.toString && !l.toString.toString().includes("[native code]")) {
|
|
42
42
|
s.push(l.toString());
|
|
43
43
|
continue;
|
|
@@ -53,8 +53,8 @@ var dn = { exports: {} };
|
|
|
53
53
|
})();
|
|
54
54
|
})(dn);
|
|
55
55
|
var vr = dn.exports;
|
|
56
|
-
const j = /* @__PURE__ */ xr(vr), br = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => A.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }),
|
|
57
|
-
var
|
|
56
|
+
const j = /* @__PURE__ */ xr(vr), br = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => A.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }), re = Ae(br), wr = ({ element: e = "span", children: t = null, ...n }) => A.createElement(e, { ...n, "aria-hidden": !0 }, t), mn = Ae(wr);
|
|
57
|
+
var St = { exports: {} }, Pe = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -67,10 +67,10 @@ var jt = { exports: {} }, De = {};
|
|
|
67
67
|
var qt;
|
|
68
68
|
function kr() {
|
|
69
69
|
if (qt)
|
|
70
|
-
return
|
|
70
|
+
return Pe;
|
|
71
71
|
qt = 1;
|
|
72
72
|
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
73
|
-
function
|
|
73
|
+
function d(a, i, c) {
|
|
74
74
|
var u, f = {}, p = null, h = null;
|
|
75
75
|
c !== void 0 && (p = "" + c), i.key !== void 0 && (p = "" + i.key), i.ref !== void 0 && (h = i.ref);
|
|
76
76
|
for (u in i)
|
|
@@ -80,9 +80,9 @@ function kr() {
|
|
|
80
80
|
f[u] === void 0 && (f[u] = i[u]);
|
|
81
81
|
return { $$typeof: t, type: a, key: p, ref: h, props: f, _owner: o.current };
|
|
82
82
|
}
|
|
83
|
-
return
|
|
83
|
+
return Pe.Fragment = n, Pe.jsx = d, Pe.jsxs = d, Pe;
|
|
84
84
|
}
|
|
85
|
-
var
|
|
85
|
+
var Fe = {};
|
|
86
86
|
/**
|
|
87
87
|
* @license React
|
|
88
88
|
* react-jsx-runtime.development.js
|
|
@@ -95,58 +95,58 @@ var Pe = {};
|
|
|
95
95
|
var Kt;
|
|
96
96
|
function yr() {
|
|
97
97
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"),
|
|
99
|
-
function g(
|
|
100
|
-
if (
|
|
98
|
+
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), a = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator, k = "@@iterator";
|
|
99
|
+
function g(m) {
|
|
100
|
+
if (m === null || typeof m != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var x = _ && m[_] || m[k];
|
|
103
|
+
return typeof x == "function" ? x : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
|
-
function
|
|
106
|
+
function b(m) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
109
|
-
y[
|
|
110
|
-
|
|
108
|
+
for (var x = arguments.length, y = new Array(x > 1 ? x - 1 : 0), $ = 1; $ < x; $++)
|
|
109
|
+
y[$ - 1] = arguments[$];
|
|
110
|
+
S("error", m, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function
|
|
113
|
+
function S(m, x, y) {
|
|
114
114
|
{
|
|
115
|
-
var
|
|
116
|
-
O !== "" && (
|
|
117
|
-
var H = y.map(function(
|
|
118
|
-
return String(
|
|
115
|
+
var $ = E.ReactDebugCurrentFrame, O = $.getStackAddendum();
|
|
116
|
+
O !== "" && (x += "%s", y = y.concat([O]));
|
|
117
|
+
var H = y.map(function(D) {
|
|
118
|
+
return String(D);
|
|
119
119
|
});
|
|
120
|
-
H.unshift("Warning: " +
|
|
120
|
+
H.unshift("Warning: " + x), Function.prototype.apply.call(console[m], console, H);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
var T = !1, M = !1, Q = !1, V = !1,
|
|
124
|
-
|
|
125
|
-
function q(
|
|
126
|
-
return !!(typeof
|
|
123
|
+
var T = !1, M = !1, Q = !1, V = !1, v = !1, N;
|
|
124
|
+
N = Symbol.for("react.module.reference");
|
|
125
|
+
function q(m) {
|
|
126
|
+
return !!(typeof m == "string" || typeof m == "function" || m === s || m === l || v || m === o || m === c || m === u || V || m === h || T || M || Q || typeof m == "object" && m !== null && (m.$$typeof === p || m.$$typeof === f || m.$$typeof === d || m.$$typeof === a || m.$$typeof === i || // 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 === N || m.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
135
|
-
return
|
|
136
|
-
var O =
|
|
132
|
+
function w(m, x, y) {
|
|
133
|
+
var $ = m.displayName;
|
|
134
|
+
if ($)
|
|
135
|
+
return $;
|
|
136
|
+
var O = x.displayName || x.name || "";
|
|
137
137
|
return O !== "" ? y + "(" + O + ")" : y;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
140
|
-
return
|
|
139
|
+
function G(m) {
|
|
140
|
+
return m.displayName || "Context";
|
|
141
141
|
}
|
|
142
|
-
function
|
|
143
|
-
if (
|
|
142
|
+
function L(m) {
|
|
143
|
+
if (m == null)
|
|
144
144
|
return null;
|
|
145
|
-
if (typeof
|
|
146
|
-
return
|
|
147
|
-
if (typeof
|
|
148
|
-
return
|
|
149
|
-
switch (
|
|
145
|
+
if (typeof m.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof m == "function")
|
|
146
|
+
return m.displayName || m.name || null;
|
|
147
|
+
if (typeof m == "string")
|
|
148
|
+
return m;
|
|
149
|
+
switch (m) {
|
|
150
150
|
case s:
|
|
151
151
|
return "Fragment";
|
|
152
152
|
case n:
|
|
@@ -160,23 +160,23 @@ function yr() {
|
|
|
160
160
|
case u:
|
|
161
161
|
return "SuspenseList";
|
|
162
162
|
}
|
|
163
|
-
if (typeof
|
|
164
|
-
switch (
|
|
163
|
+
if (typeof m == "object")
|
|
164
|
+
switch (m.$$typeof) {
|
|
165
165
|
case a:
|
|
166
|
-
var
|
|
167
|
-
return
|
|
168
|
-
case
|
|
169
|
-
var y =
|
|
170
|
-
return
|
|
166
|
+
var x = m;
|
|
167
|
+
return G(x) + ".Consumer";
|
|
168
|
+
case d:
|
|
169
|
+
var y = m;
|
|
170
|
+
return G(y._context) + ".Provider";
|
|
171
171
|
case i:
|
|
172
|
-
return
|
|
172
|
+
return w(m, m.render, "ForwardRef");
|
|
173
173
|
case f:
|
|
174
|
-
var
|
|
175
|
-
return
|
|
174
|
+
var $ = m.displayName || null;
|
|
175
|
+
return $ !== null ? $ : L(m.type) || "Memo";
|
|
176
176
|
case p: {
|
|
177
|
-
var O =
|
|
177
|
+
var O = m, H = O._payload, D = O._init;
|
|
178
178
|
try {
|
|
179
|
-
return
|
|
179
|
+
return L(D(H));
|
|
180
180
|
} catch {
|
|
181
181
|
return null;
|
|
182
182
|
}
|
|
@@ -184,80 +184,80 @@ function yr() {
|
|
|
184
184
|
}
|
|
185
185
|
return null;
|
|
186
186
|
}
|
|
187
|
-
var
|
|
188
|
-
function
|
|
187
|
+
var B = Object.assign, U = 0, Y, K, ie, le, ce, ue, oe;
|
|
188
|
+
function R() {
|
|
189
189
|
}
|
|
190
|
-
|
|
191
|
-
function
|
|
190
|
+
R.__reactDisabledLog = !0;
|
|
191
|
+
function te() {
|
|
192
192
|
{
|
|
193
193
|
if (U === 0) {
|
|
194
|
-
|
|
195
|
-
var
|
|
194
|
+
Y = console.log, K = console.info, ie = console.warn, le = console.error, ce = console.group, ue = console.groupCollapsed, oe = console.groupEnd;
|
|
195
|
+
var m = {
|
|
196
196
|
configurable: !0,
|
|
197
197
|
enumerable: !0,
|
|
198
|
-
value:
|
|
198
|
+
value: R,
|
|
199
199
|
writable: !0
|
|
200
200
|
};
|
|
201
201
|
Object.defineProperties(console, {
|
|
202
|
-
info:
|
|
203
|
-
log:
|
|
204
|
-
warn:
|
|
205
|
-
error:
|
|
206
|
-
group:
|
|
207
|
-
groupCollapsed:
|
|
208
|
-
groupEnd:
|
|
202
|
+
info: m,
|
|
203
|
+
log: m,
|
|
204
|
+
warn: m,
|
|
205
|
+
error: m,
|
|
206
|
+
group: m,
|
|
207
|
+
groupCollapsed: m,
|
|
208
|
+
groupEnd: m
|
|
209
209
|
});
|
|
210
210
|
}
|
|
211
211
|
U++;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function X() {
|
|
215
215
|
{
|
|
216
216
|
if (U--, U === 0) {
|
|
217
|
-
var
|
|
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: Y
|
|
225
225
|
}),
|
|
226
|
-
info:
|
|
226
|
+
info: B({}, m, {
|
|
227
227
|
value: K
|
|
228
228
|
}),
|
|
229
|
-
warn:
|
|
229
|
+
warn: B({}, m, {
|
|
230
230
|
value: ie
|
|
231
231
|
}),
|
|
232
|
-
error:
|
|
232
|
+
error: B({}, m, {
|
|
233
233
|
value: le
|
|
234
234
|
}),
|
|
235
|
-
group:
|
|
236
|
-
value:
|
|
235
|
+
group: B({}, m, {
|
|
236
|
+
value: ce
|
|
237
237
|
}),
|
|
238
|
-
groupCollapsed:
|
|
239
|
-
value:
|
|
238
|
+
groupCollapsed: B({}, m, {
|
|
239
|
+
value: ue
|
|
240
240
|
}),
|
|
241
|
-
groupEnd:
|
|
242
|
-
value:
|
|
241
|
+
groupEnd: B({}, m, {
|
|
242
|
+
value: oe
|
|
243
243
|
})
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
|
-
U < 0 &&
|
|
246
|
+
U < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
|
-
var
|
|
250
|
-
function pe(
|
|
249
|
+
var ne = E.ReactCurrentDispatcher, me;
|
|
250
|
+
function pe(m, x, y) {
|
|
251
251
|
{
|
|
252
252
|
if (me === void 0)
|
|
253
253
|
try {
|
|
254
254
|
throw Error();
|
|
255
255
|
} catch (O) {
|
|
256
|
-
var
|
|
257
|
-
me =
|
|
256
|
+
var $ = O.stack.trim().match(/\n( *(at )?)/);
|
|
257
|
+
me = $ && $[1] || "";
|
|
258
258
|
}
|
|
259
259
|
return `
|
|
260
|
-
` + me +
|
|
260
|
+
` + me + m;
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
var ge = !1, Se;
|
|
@@ -265,224 +265,224 @@ function yr() {
|
|
|
265
265
|
var Pn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
Se = new Pn();
|
|
267
267
|
}
|
|
268
|
-
function
|
|
269
|
-
if (!
|
|
268
|
+
function Lt(m, x) {
|
|
269
|
+
if (!m || ge)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
272
|
-
var y = Se.get(
|
|
272
|
+
var y = Se.get(m);
|
|
273
273
|
if (y !== void 0)
|
|
274
274
|
return y;
|
|
275
275
|
}
|
|
276
|
-
var
|
|
276
|
+
var $;
|
|
277
277
|
ge = !0;
|
|
278
278
|
var O = Error.prepareStackTrace;
|
|
279
279
|
Error.prepareStackTrace = void 0;
|
|
280
280
|
var H;
|
|
281
|
-
H =
|
|
281
|
+
H = ne.current, ne.current = null, te();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
284
|
-
var
|
|
283
|
+
if (x) {
|
|
284
|
+
var D = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
287
|
-
if (Object.defineProperty(
|
|
287
|
+
if (Object.defineProperty(D.prototype, "props", {
|
|
288
288
|
set: function() {
|
|
289
289
|
throw Error();
|
|
290
290
|
}
|
|
291
291
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
292
292
|
try {
|
|
293
|
-
Reflect.construct(
|
|
293
|
+
Reflect.construct(D, []);
|
|
294
294
|
} catch (_e) {
|
|
295
|
-
|
|
295
|
+
$ = _e;
|
|
296
296
|
}
|
|
297
|
-
Reflect.construct(
|
|
297
|
+
Reflect.construct(m, [], D);
|
|
298
298
|
} else {
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
D.call();
|
|
301
301
|
} catch (_e) {
|
|
302
|
-
|
|
302
|
+
$ = _e;
|
|
303
303
|
}
|
|
304
|
-
|
|
304
|
+
m.call(D.prototype);
|
|
305
305
|
}
|
|
306
306
|
} else {
|
|
307
307
|
try {
|
|
308
308
|
throw Error();
|
|
309
309
|
} catch (_e) {
|
|
310
|
-
|
|
310
|
+
$ = _e;
|
|
311
311
|
}
|
|
312
|
-
|
|
312
|
+
m();
|
|
313
313
|
}
|
|
314
314
|
} catch (_e) {
|
|
315
|
-
if (_e &&
|
|
315
|
+
if (_e && $ && typeof _e.stack == "string") {
|
|
316
316
|
for (var C = _e.stack.split(`
|
|
317
|
-
`),
|
|
318
|
-
`), J = C.length - 1,
|
|
319
|
-
|
|
320
|
-
for (; J >= 1 &&
|
|
321
|
-
if (C[J] !==
|
|
322
|
-
if (J !== 1 ||
|
|
317
|
+
`), se = $.stack.split(`
|
|
318
|
+
`), J = C.length - 1, Z = se.length - 1; J >= 1 && Z >= 0 && C[J] !== se[Z]; )
|
|
319
|
+
Z--;
|
|
320
|
+
for (; J >= 1 && Z >= 0; J--, Z--)
|
|
321
|
+
if (C[J] !== se[Z]) {
|
|
322
|
+
if (J !== 1 || Z !== 1)
|
|
323
323
|
do
|
|
324
|
-
if (J--,
|
|
324
|
+
if (J--, Z--, Z < 0 || C[J] !== se[Z]) {
|
|
325
325
|
var de = `
|
|
326
326
|
` + C[J].replace(" at new ", " at ");
|
|
327
|
-
return
|
|
327
|
+
return m.displayName && de.includes("<anonymous>") && (de = de.replace("<anonymous>", m.displayName)), typeof m == "function" && Se.set(m, de), de;
|
|
328
328
|
}
|
|
329
|
-
while (J >= 1 &&
|
|
329
|
+
while (J >= 1 && Z >= 0);
|
|
330
330
|
break;
|
|
331
331
|
}
|
|
332
332
|
}
|
|
333
333
|
} finally {
|
|
334
|
-
ge = !1,
|
|
334
|
+
ge = !1, ne.current = H, X(), Error.prepareStackTrace = O;
|
|
335
335
|
}
|
|
336
|
-
var Te =
|
|
337
|
-
return typeof
|
|
336
|
+
var Te = m ? m.displayName || m.name : "", Zt = Te ? pe(Te) : "";
|
|
337
|
+
return typeof m == "function" && Se.set(m, Zt), Zt;
|
|
338
338
|
}
|
|
339
|
-
function Fn(
|
|
340
|
-
return
|
|
339
|
+
function Fn(m, x, y) {
|
|
340
|
+
return Lt(m, !1);
|
|
341
341
|
}
|
|
342
|
-
function Rn(
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
342
|
+
function Rn(m) {
|
|
343
|
+
var x = m.prototype;
|
|
344
|
+
return !!(x && x.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function Be(
|
|
347
|
-
if (
|
|
346
|
+
function Be(m, x, y) {
|
|
347
|
+
if (m == null)
|
|
348
348
|
return "";
|
|
349
|
-
if (typeof
|
|
350
|
-
return
|
|
351
|
-
if (typeof
|
|
352
|
-
return pe(
|
|
353
|
-
switch (
|
|
349
|
+
if (typeof m == "function")
|
|
350
|
+
return Lt(m, Rn(m));
|
|
351
|
+
if (typeof m == "string")
|
|
352
|
+
return pe(m);
|
|
353
|
+
switch (m) {
|
|
354
354
|
case c:
|
|
355
355
|
return pe("Suspense");
|
|
356
356
|
case u:
|
|
357
357
|
return pe("SuspenseList");
|
|
358
358
|
}
|
|
359
|
-
if (typeof
|
|
360
|
-
switch (
|
|
359
|
+
if (typeof m == "object")
|
|
360
|
+
switch (m.$$typeof) {
|
|
361
361
|
case i:
|
|
362
|
-
return Fn(
|
|
362
|
+
return Fn(m.render);
|
|
363
363
|
case f:
|
|
364
|
-
return Be(
|
|
364
|
+
return Be(m.type, x, y);
|
|
365
365
|
case p: {
|
|
366
|
-
var
|
|
366
|
+
var $ = m, O = $._payload, H = $._init;
|
|
367
367
|
try {
|
|
368
|
-
return Be(H(O),
|
|
368
|
+
return Be(H(O), x, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
372
|
}
|
|
373
373
|
return "";
|
|
374
374
|
}
|
|
375
|
-
var Ie = Object.prototype.hasOwnProperty,
|
|
376
|
-
function He(
|
|
377
|
-
if (
|
|
378
|
-
var
|
|
379
|
-
|
|
375
|
+
var Ie = Object.prototype.hasOwnProperty, Bt = {}, It = E.ReactDebugCurrentFrame;
|
|
376
|
+
function He(m) {
|
|
377
|
+
if (m) {
|
|
378
|
+
var x = m._owner, y = Be(m.type, m._source, x ? x.type : null);
|
|
379
|
+
It.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
|
-
|
|
381
|
+
It.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(
|
|
383
|
+
function On(m, x, y, $, O) {
|
|
384
384
|
{
|
|
385
385
|
var H = Function.call.bind(Ie);
|
|
386
|
-
for (var
|
|
387
|
-
if (H(
|
|
386
|
+
for (var D in m)
|
|
387
|
+
if (H(m, D)) {
|
|
388
388
|
var C = void 0;
|
|
389
389
|
try {
|
|
390
|
-
if (typeof
|
|
391
|
-
var
|
|
392
|
-
throw
|
|
390
|
+
if (typeof m[D] != "function") {
|
|
391
|
+
var se = Error(($ || "React class") + ": " + y + " type `" + D + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[D] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
|
+
throw se.name = "Invariant Violation", se;
|
|
393
393
|
}
|
|
394
|
-
C =
|
|
394
|
+
C = m[D](x, D, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (J) {
|
|
396
396
|
C = J;
|
|
397
397
|
}
|
|
398
|
-
C && !(C instanceof Error) && (He(O),
|
|
398
|
+
C && !(C instanceof Error) && (He(O), b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", $ || "React class", y, D, typeof C), He(null)), C instanceof Error && !(C.message in Bt) && (Bt[C.message] = !0, He(O), b("Failed %s type: %s", y, C.message), He(null));
|
|
399
399
|
}
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
402
|
var Ln = Array.isArray;
|
|
403
|
-
function
|
|
404
|
-
return Ln(
|
|
403
|
+
function ot(m) {
|
|
404
|
+
return Ln(m);
|
|
405
405
|
}
|
|
406
|
-
function Bn(
|
|
406
|
+
function Bn(m) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var x = typeof Symbol == "function" && Symbol.toStringTag, y = x && m[Symbol.toStringTag] || m.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function In(
|
|
412
|
+
function In(m) {
|
|
413
413
|
try {
|
|
414
|
-
return
|
|
414
|
+
return Ht(m), !1;
|
|
415
415
|
} catch {
|
|
416
416
|
return !0;
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
|
-
function
|
|
420
|
-
return "" +
|
|
419
|
+
function Ht(m) {
|
|
420
|
+
return "" + m;
|
|
421
421
|
}
|
|
422
|
-
function
|
|
423
|
-
if (In(
|
|
424
|
-
return
|
|
422
|
+
function Qt(m) {
|
|
423
|
+
if (In(m))
|
|
424
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Bn(m)), Ht(m);
|
|
425
425
|
}
|
|
426
|
-
var
|
|
426
|
+
var De = E.ReactCurrentOwner, Hn = {
|
|
427
427
|
key: !0,
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
},
|
|
432
|
-
|
|
433
|
-
function Qn(
|
|
434
|
-
if (Ie.call(
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
431
|
+
}, Ut, Wt, at;
|
|
432
|
+
at = {};
|
|
433
|
+
function Qn(m) {
|
|
434
|
+
if (Ie.call(m, "ref")) {
|
|
435
|
+
var x = Object.getOwnPropertyDescriptor(m, "ref").get;
|
|
436
|
+
if (x && x.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
|
-
return
|
|
439
|
+
return m.ref !== void 0;
|
|
440
440
|
}
|
|
441
|
-
function Un(
|
|
442
|
-
if (Ie.call(
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
441
|
+
function Un(m) {
|
|
442
|
+
if (Ie.call(m, "key")) {
|
|
443
|
+
var x = Object.getOwnPropertyDescriptor(m, "key").get;
|
|
444
|
+
if (x && x.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
|
-
return
|
|
447
|
+
return m.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function Wn(
|
|
450
|
-
if (typeof
|
|
451
|
-
var y =
|
|
452
|
-
|
|
449
|
+
function Wn(m, x) {
|
|
450
|
+
if (typeof m.ref == "string" && De.current && x && De.current.stateNode !== x) {
|
|
451
|
+
var y = L(De.current.type);
|
|
452
|
+
at[y] || (b('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(De.current.type), m.ref), at[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function zn(
|
|
455
|
+
function zn(m, x) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
|
|
458
|
+
Ut || (Ut = !0, b("%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)", x));
|
|
459
459
|
};
|
|
460
|
-
y.isReactWarning = !0, Object.defineProperty(
|
|
460
|
+
y.isReactWarning = !0, Object.defineProperty(m, "key", {
|
|
461
461
|
get: y,
|
|
462
462
|
configurable: !0
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Vn(
|
|
466
|
+
function Vn(m, x) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
|
|
469
|
+
Wt || (Wt = !0, b("%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)", x));
|
|
470
470
|
};
|
|
471
|
-
y.isReactWarning = !0, Object.defineProperty(
|
|
471
|
+
y.isReactWarning = !0, Object.defineProperty(m, "ref", {
|
|
472
472
|
get: y,
|
|
473
473
|
configurable: !0
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Yn = function(
|
|
477
|
+
var Yn = function(m, x, y, $, O, H, D) {
|
|
478
478
|
var C = {
|
|
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
|
-
type:
|
|
483
|
-
key:
|
|
482
|
+
type: m,
|
|
483
|
+
key: x,
|
|
484
484
|
ref: y,
|
|
485
|
-
props:
|
|
485
|
+
props: D,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
487
487
|
_owner: H
|
|
488
488
|
};
|
|
@@ -495,7 +495,7 @@ function yr() {
|
|
|
495
495
|
configurable: !1,
|
|
496
496
|
enumerable: !1,
|
|
497
497
|
writable: !1,
|
|
498
|
-
value:
|
|
498
|
+
value: $
|
|
499
499
|
}), Object.defineProperty(C, "_source", {
|
|
500
500
|
configurable: !1,
|
|
501
501
|
enumerable: !1,
|
|
@@ -503,186 +503,186 @@ function yr() {
|
|
|
503
503
|
value: O
|
|
504
504
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
505
505
|
};
|
|
506
|
-
function Gn(
|
|
506
|
+
function Gn(m, x, y, $, O) {
|
|
507
507
|
{
|
|
508
|
-
var H,
|
|
509
|
-
y !== void 0 && (
|
|
510
|
-
for (H in
|
|
511
|
-
Ie.call(
|
|
512
|
-
if (
|
|
513
|
-
var J =
|
|
508
|
+
var H, D = {}, C = null, se = null;
|
|
509
|
+
y !== void 0 && (Qt(y), C = "" + y), Un(x) && (Qt(x.key), C = "" + x.key), Qn(x) && (se = x.ref, Wn(x, O));
|
|
510
|
+
for (H in x)
|
|
511
|
+
Ie.call(x, H) && !Hn.hasOwnProperty(H) && (D[H] = x[H]);
|
|
512
|
+
if (m && m.defaultProps) {
|
|
513
|
+
var J = m.defaultProps;
|
|
514
514
|
for (H in J)
|
|
515
|
-
|
|
515
|
+
D[H] === void 0 && (D[H] = J[H]);
|
|
516
516
|
}
|
|
517
|
-
if (C ||
|
|
518
|
-
var
|
|
519
|
-
C && zn(
|
|
517
|
+
if (C || se) {
|
|
518
|
+
var Z = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
|
|
519
|
+
C && zn(D, Z), se && Vn(D, Z);
|
|
520
520
|
}
|
|
521
|
-
return Yn(
|
|
521
|
+
return Yn(m, C, se, O, $, De.current, D);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
525
|
-
function $e(
|
|
526
|
-
if (
|
|
527
|
-
var
|
|
528
|
-
|
|
524
|
+
var it = E.ReactCurrentOwner, zt = E.ReactDebugCurrentFrame;
|
|
525
|
+
function $e(m) {
|
|
526
|
+
if (m) {
|
|
527
|
+
var x = m._owner, y = Be(m.type, m._source, x ? x.type : null);
|
|
528
|
+
zt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
|
-
|
|
530
|
+
zt.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
535
|
-
return typeof
|
|
532
|
+
var lt;
|
|
533
|
+
lt = !1;
|
|
534
|
+
function ct(m) {
|
|
535
|
+
return typeof m == "object" && m !== null && m.$$typeof === t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Vt() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var
|
|
541
|
-
if (
|
|
539
|
+
if (it.current) {
|
|
540
|
+
var m = L(it.current.type);
|
|
541
|
+
if (m)
|
|
542
542
|
return `
|
|
543
543
|
|
|
544
|
-
Check the render method of \`` +
|
|
544
|
+
Check the render method of \`` + m + "`.";
|
|
545
545
|
}
|
|
546
546
|
return "";
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
function Jn(
|
|
549
|
+
function Jn(m) {
|
|
550
550
|
{
|
|
551
|
-
if (
|
|
552
|
-
var
|
|
551
|
+
if (m !== void 0) {
|
|
552
|
+
var x = m.fileName.replace(/^.*[\\\/]/, ""), y = m.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + x + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function Xn(
|
|
560
|
+
var Yt = {};
|
|
561
|
+
function Xn(m) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
565
|
-
var y = typeof
|
|
566
|
-
y && (
|
|
563
|
+
var x = Vt();
|
|
564
|
+
if (!x) {
|
|
565
|
+
var y = typeof m == "string" ? m : m.displayName || m.name;
|
|
566
|
+
y && (x = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return x;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Gt(m, x) {
|
|
574
574
|
{
|
|
575
|
-
if (!
|
|
575
|
+
if (!m._store || m._store.validated || m.key != null)
|
|
576
576
|
return;
|
|
577
|
-
|
|
578
|
-
var y = Xn(
|
|
579
|
-
if (
|
|
577
|
+
m._store.validated = !0;
|
|
578
|
+
var y = Xn(x);
|
|
579
|
+
if (Yt[y])
|
|
580
580
|
return;
|
|
581
|
-
|
|
582
|
-
var
|
|
583
|
-
|
|
581
|
+
Yt[y] = !0;
|
|
582
|
+
var $ = "";
|
|
583
|
+
m && m._owner && m._owner !== it.current && ($ = " It was passed a child from " + L(m._owner.type) + "."), $e(m), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, $), $e(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function
|
|
586
|
+
function Jt(m, x) {
|
|
587
587
|
{
|
|
588
|
-
if (typeof
|
|
588
|
+
if (typeof m != "object")
|
|
589
589
|
return;
|
|
590
|
-
if (
|
|
591
|
-
for (var y = 0; y <
|
|
592
|
-
var
|
|
593
|
-
|
|
590
|
+
if (ot(m))
|
|
591
|
+
for (var y = 0; y < m.length; y++) {
|
|
592
|
+
var $ = m[y];
|
|
593
|
+
ct($) && Gt($, x);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
596
|
-
|
|
597
|
-
else if (
|
|
598
|
-
var O = g(
|
|
599
|
-
if (typeof O == "function" && O !==
|
|
600
|
-
for (var H = O.call(
|
|
601
|
-
|
|
595
|
+
else if (ct(m))
|
|
596
|
+
m._store && (m._store.validated = !0);
|
|
597
|
+
else if (m) {
|
|
598
|
+
var O = g(m);
|
|
599
|
+
if (typeof O == "function" && O !== m.entries)
|
|
600
|
+
for (var H = O.call(m), D; !(D = H.next()).done; )
|
|
601
|
+
ct(D.value) && Gt(D.value, x);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function Zn(
|
|
605
|
+
function Zn(m) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var x = m.type;
|
|
608
|
+
if (x == null || typeof x == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof x == "function")
|
|
612
|
+
y = x.propTypes;
|
|
613
|
+
else if (typeof x == "object" && (x.$$typeof === i || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
x.$$typeof === f))
|
|
616
|
+
y = x.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var
|
|
621
|
-
On(y,
|
|
622
|
-
} else if (
|
|
623
|
-
|
|
624
|
-
var O =
|
|
625
|
-
|
|
620
|
+
var $ = L(x);
|
|
621
|
+
On(y, m.props, "prop", $, m);
|
|
622
|
+
} else if (x.PropTypes !== void 0 && !lt) {
|
|
623
|
+
lt = !0;
|
|
624
|
+
var O = L(x);
|
|
625
|
+
b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof x.getDefaultProps == "function" && !x.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
|
-
function qn(
|
|
630
|
+
function qn(m) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var
|
|
634
|
-
if (
|
|
635
|
-
$e(
|
|
632
|
+
for (var x = Object.keys(m.props), y = 0; y < x.length; y++) {
|
|
633
|
+
var $ = x[y];
|
|
634
|
+
if ($ !== "children" && $ !== "key") {
|
|
635
|
+
$e(m), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", $), $e(null);
|
|
636
636
|
break;
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
|
-
|
|
639
|
+
m.ref !== null && ($e(m), b("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Xt(m, x, y, $, O, H) {
|
|
643
643
|
{
|
|
644
|
-
var
|
|
645
|
-
if (!
|
|
644
|
+
var D = q(m);
|
|
645
|
+
if (!D) {
|
|
646
646
|
var C = "";
|
|
647
|
-
(
|
|
648
|
-
var
|
|
649
|
-
|
|
647
|
+
(m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (C += " 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 se = Jn(O);
|
|
649
|
+
se ? C += se : C += Vt();
|
|
650
650
|
var J;
|
|
651
|
-
|
|
651
|
+
m === null ? J = "null" : ot(m) ? J = "array" : m !== void 0 && m.$$typeof === t ? (J = "<" + (L(m.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : J = typeof m, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, C);
|
|
652
652
|
}
|
|
653
|
-
var
|
|
654
|
-
if (
|
|
655
|
-
return
|
|
656
|
-
if (
|
|
657
|
-
var de =
|
|
653
|
+
var Z = Gn(m, x, y, O, H);
|
|
654
|
+
if (Z == null)
|
|
655
|
+
return Z;
|
|
656
|
+
if (D) {
|
|
657
|
+
var de = x.children;
|
|
658
658
|
if (de !== void 0)
|
|
659
|
-
if (
|
|
660
|
-
if (
|
|
659
|
+
if ($)
|
|
660
|
+
if (ot(de)) {
|
|
661
661
|
for (var Te = 0; Te < de.length; Te++)
|
|
662
|
-
|
|
662
|
+
Jt(de[Te], m);
|
|
663
663
|
Object.freeze && Object.freeze(de);
|
|
664
664
|
} else
|
|
665
|
-
|
|
665
|
+
b("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
|
+
Jt(de, m);
|
|
668
668
|
}
|
|
669
|
-
return
|
|
669
|
+
return m === s ? qn(Z) : Zn(Z), Z;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function Kn(
|
|
673
|
-
return
|
|
672
|
+
function Kn(m, x, y) {
|
|
673
|
+
return Xt(m, x, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function er(
|
|
676
|
-
return
|
|
675
|
+
function er(m, x, y) {
|
|
676
|
+
return Xt(m, x, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var tr = er, nr = Kn;
|
|
679
|
-
|
|
680
|
-
}()),
|
|
679
|
+
Fe.Fragment = s, Fe.jsx = tr, Fe.jsxs = nr;
|
|
680
|
+
}()), Fe;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var r =
|
|
682
|
+
process.env.NODE_ENV === "production" ? St.exports = kr() : St.exports = yr();
|
|
683
|
+
var r = St.exports;
|
|
684
684
|
const jr = () => {
|
|
685
|
-
const [e, t] =
|
|
685
|
+
const [e, t] = P(window.location.pathname), n = () => {
|
|
686
686
|
const s = window.location.pathname;
|
|
687
687
|
t(s);
|
|
688
688
|
};
|
|
@@ -690,13 +690,13 @@ const jr = () => {
|
|
|
690
690
|
window.removeEventListener("popstate", n);
|
|
691
691
|
}), []), e;
|
|
692
692
|
}, Ce = (e, t) => {
|
|
693
|
-
const n =
|
|
693
|
+
const n = ee(!1);
|
|
694
694
|
z(() => {
|
|
695
695
|
n.current ? e() : n.current = !0;
|
|
696
696
|
}, t);
|
|
697
697
|
};
|
|
698
698
|
function Er(e, t, n) {
|
|
699
|
-
var s = this, o =
|
|
699
|
+
var s = this, o = ee(null), l = ee(0), d = ee(null), a = ee([]), i = ee(), c = ee(), u = ee(e), f = ee(!0);
|
|
700
700
|
z(function() {
|
|
701
701
|
u.current = e;
|
|
702
702
|
}, [e]);
|
|
@@ -704,71 +704,71 @@ function Er(e, t, n) {
|
|
|
704
704
|
if (typeof e != "function")
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
|
-
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing,
|
|
707
|
+
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, k = "maxWait" in n, g = k ? 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
713
|
var E = qe(function() {
|
|
714
|
-
var
|
|
715
|
-
var
|
|
716
|
-
return a.current = i.current = null, l.current =
|
|
717
|
-
},
|
|
718
|
-
p && cancelAnimationFrame(
|
|
719
|
-
}, T = function(
|
|
714
|
+
var b = function(v) {
|
|
715
|
+
var N = a.current, q = i.current;
|
|
716
|
+
return a.current = i.current = null, l.current = v, c.current = u.current.apply(q, N);
|
|
717
|
+
}, S = function(v, N) {
|
|
718
|
+
p && cancelAnimationFrame(d.current), d.current = p ? requestAnimationFrame(v) : setTimeout(v, N);
|
|
719
|
+
}, T = function(v) {
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
|
-
var
|
|
723
|
-
return !o.current ||
|
|
724
|
-
}, M = function(
|
|
725
|
-
return
|
|
726
|
-
}, Q = function
|
|
727
|
-
var
|
|
728
|
-
if (T(
|
|
729
|
-
return M(
|
|
722
|
+
var N = v - o.current;
|
|
723
|
+
return !o.current || N >= t || N < 0 || k && v - l.current >= g;
|
|
724
|
+
}, M = function(v) {
|
|
725
|
+
return d.current = null, _ && a.current ? b(v) : (a.current = i.current = null, c.current);
|
|
726
|
+
}, Q = function v() {
|
|
727
|
+
var N = Date.now();
|
|
728
|
+
if (T(N))
|
|
729
|
+
return M(N);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var q = t - (
|
|
732
|
-
|
|
731
|
+
var q = t - (N - o.current), w = k ? Math.min(q, g - (N - l.current)) : q;
|
|
732
|
+
S(v, w);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
735
|
-
var
|
|
736
|
-
if (a.current = [].slice.call(arguments), i.current = s, o.current =
|
|
737
|
-
if (!
|
|
738
|
-
return l.current = o.current,
|
|
739
|
-
if (
|
|
740
|
-
return
|
|
735
|
+
var v = Date.now(), N = T(v);
|
|
736
|
+
if (a.current = [].slice.call(arguments), i.current = s, o.current = v, N) {
|
|
737
|
+
if (!d.current && f.current)
|
|
738
|
+
return l.current = o.current, S(Q, t), h ? b(o.current) : c.current;
|
|
739
|
+
if (k)
|
|
740
|
+
return S(Q, t), b(o.current);
|
|
741
741
|
}
|
|
742
|
-
return
|
|
742
|
+
return d.current || S(Q, t), c.current;
|
|
743
743
|
};
|
|
744
744
|
return V.cancel = function() {
|
|
745
|
-
|
|
745
|
+
d.current && (p ? cancelAnimationFrame(d.current) : clearTimeout(d.current)), l.current = 0, a.current = o.current = i.current = d.current = null;
|
|
746
746
|
}, V.isPending = function() {
|
|
747
|
-
return !!
|
|
747
|
+
return !!d.current;
|
|
748
748
|
}, V.flush = function() {
|
|
749
|
-
return
|
|
749
|
+
return d.current ? M(Date.now()) : c.current;
|
|
750
750
|
}, V;
|
|
751
|
-
}, [h,
|
|
751
|
+
}, [h, k, t, g, _, p]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
754
|
function fn(e, t, n) {
|
|
755
755
|
var s = n === void 0 ? {} : n, o = s.leading, l = s.trailing;
|
|
756
756
|
return Er(e, t, { maxWait: t, leading: o === void 0 || o, trailing: l === void 0 || l });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
759
|
-
const
|
|
758
|
+
let ut;
|
|
759
|
+
const tt = (e = !0, t = !1) => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [n, s] = A.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
|
-
z(() => (l(), window.addEventListener("resize",
|
|
765
|
-
clearTimeout(
|
|
764
|
+
z(() => (l(), window.addEventListener("resize", d), () => {
|
|
765
|
+
clearTimeout(ut), d.flush(), window.removeEventListener("resize", d);
|
|
766
766
|
}), []);
|
|
767
767
|
const o = () => window.innerWidth, l = () => {
|
|
768
768
|
s(o());
|
|
769
|
-
},
|
|
769
|
+
}, d = fn(
|
|
770
770
|
() => {
|
|
771
|
-
o() !== n && (t && (clearTimeout(
|
|
771
|
+
o() !== n && (t && (clearTimeout(ut), document.body.classList.add("is-resizing"), ut = setTimeout(() => {
|
|
772
772
|
document.body.classList.remove("is-resizing");
|
|
773
773
|
}, 550)), l());
|
|
774
774
|
},
|
|
@@ -788,7 +788,7 @@ const et = (e = !0, t = !1) => {
|
|
|
788
788
|
if (!window)
|
|
789
789
|
return;
|
|
790
790
|
const [o, l] = A.useState({ current: 0, past: 0 }) || [!1, () => {
|
|
791
|
-
}], [
|
|
791
|
+
}], [d, a] = A.useState({ scrollDown: !1, scrollUp: !1 }) || [!1, () => {
|
|
792
792
|
}];
|
|
793
793
|
z(() => (i(), window.addEventListener("scroll", c), () => {
|
|
794
794
|
c.flush(), window.removeEventListener("scroll", c);
|
|
@@ -796,17 +796,17 @@ const et = (e = !0, t = !1) => {
|
|
|
796
796
|
const i = () => {
|
|
797
797
|
const u = window.scrollY, f = o.current, p = u - f, h = p > 0 ? "down" : "up";
|
|
798
798
|
if (l({ current: u, past: f }), h === "down") {
|
|
799
|
-
u >= e + t.down && !
|
|
799
|
+
u >= e + t.down && !d.scrollDown && (!d.scrollUp || p > t.up) && (n(), a({ scrollUp: !1, scrollDown: !0 }));
|
|
800
800
|
return;
|
|
801
801
|
}
|
|
802
|
-
Math.abs(p) >= t.up && !
|
|
802
|
+
Math.abs(p) >= t.up && !d.scrollUp && (s(), a({ scrollUp: !0, scrollDown: !1 }));
|
|
803
803
|
}, c = fn(() => {
|
|
804
804
|
i();
|
|
805
805
|
}, 250);
|
|
806
806
|
return o;
|
|
807
|
-
},
|
|
807
|
+
}, oo = (e = [], t = !0) => {
|
|
808
808
|
e = Array.isArray(e) ? e : [e];
|
|
809
|
-
const n =
|
|
809
|
+
const n = ee(!1);
|
|
810
810
|
Ce(() => {
|
|
811
811
|
if (window && window.location && window.location.hash) {
|
|
812
812
|
if (n.current)
|
|
@@ -849,14 +849,14 @@ const et = (e = !0, t = !1) => {
|
|
|
849
849
|
} catch {
|
|
850
850
|
return "";
|
|
851
851
|
}
|
|
852
|
-
const
|
|
852
|
+
const d = l / 36e5, a = Math.floor(l / 864e5);
|
|
853
853
|
if (a < 1)
|
|
854
|
-
return
|
|
854
|
+
return d < 1 ? { path: "now" } : { path: "hours", number: Math.floor(d) };
|
|
855
855
|
if (a < 7)
|
|
856
856
|
return { path: "days", number: a };
|
|
857
857
|
const i = Math.floor(a / 7);
|
|
858
858
|
return i <= 52 ? { path: "weeks", number: i } : { path: "years", number: Math.floor(a / 365) };
|
|
859
|
-
}, Cr = (e) => new Promise((t) => setTimeout(t, e)),
|
|
859
|
+
}, Cr = (e) => new Promise((t) => setTimeout(t, e)), Dt = {
|
|
860
860
|
apolitical: "Apolitical",
|
|
861
861
|
breadcrumbs_label: "Go back to:",
|
|
862
862
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1139,13 +1139,13 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1139
1139
|
sharedLinks_copy_text: "Copy link",
|
|
1140
1140
|
tags_community: "From the community",
|
|
1141
1141
|
tooltip_loading: "Loading..."
|
|
1142
|
-
},
|
|
1142
|
+
}, Nr = {
|
|
1143
1143
|
languageSwitcher_label: "Me gustaría leer este artículo en...",
|
|
1144
1144
|
languageSwitcher_translation_original: "idioma original",
|
|
1145
1145
|
languageSwitcher_translation_human: "traducido por un humano",
|
|
1146
1146
|
languageSwitcher_translation_machine: "traducido por máquina",
|
|
1147
1147
|
languageSwitcher_disclaimer: "Este contenido fue traducido automáticamente y ocasionalmente tendrá errores de género u otras traducciones directas. Estamos intentando resolver este problema, pero mientras tanto, si notas algún error grave, escríbenos a <link>{email}</link>"
|
|
1148
|
-
},
|
|
1148
|
+
}, Ar = {
|
|
1149
1149
|
collapsibleSection_summary: "En savoir plus",
|
|
1150
1150
|
languageSwitcher_label: "Je voudrais lire cet article dans...",
|
|
1151
1151
|
languageSwitcher_translation_original: "langue originale",
|
|
@@ -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
|
}, Pr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1162
1162
|
__proto__: null,
|
|
1163
|
-
en:
|
|
1164
|
-
es:
|
|
1165
|
-
fr:
|
|
1163
|
+
en: Dt,
|
|
1164
|
+
es: Nr,
|
|
1165
|
+
fr: Ar,
|
|
1166
1166
|
pt: Dr
|
|
1167
1167
|
}, Symbol.toStringTag, { value: "Module" })), he = (e, t, n, s, o = {}) => {
|
|
1168
1168
|
let l = "";
|
|
1169
|
-
return `${t}_${n}` in
|
|
1169
|
+
return `${t}_${n}` in Dt ? l = e({ id: `${t}_${n}` }, o) : l = e({ id: t }, { [s]: n, ...o }), l;
|
|
1170
1170
|
}, Fr = (e, t, n) => {
|
|
1171
1171
|
if (!e || e === 0)
|
|
1172
1172
|
return "0";
|
|
@@ -1190,21 +1190,21 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1190
1190
|
icon: s = !1,
|
|
1191
1191
|
href: o = !1,
|
|
1192
1192
|
element: l = "button",
|
|
1193
|
-
onClick:
|
|
1193
|
+
onClick: d = !1,
|
|
1194
1194
|
className: a = "",
|
|
1195
1195
|
disabled: i = !1,
|
|
1196
1196
|
screenreaderText: c = !1,
|
|
1197
1197
|
children: u = !1,
|
|
1198
1198
|
...f
|
|
1199
1199
|
}) => {
|
|
1200
|
-
const h =
|
|
1200
|
+
const h = tt(typeof t == "object");
|
|
1201
1201
|
if (typeof t == "object" && typeof h == "number") {
|
|
1202
1202
|
const g = Object.assign({}, t), E = pn(Object.keys(g));
|
|
1203
1203
|
t = hn(h, E, g);
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), s && (_.push("icon"), typeof s == "object" ? (_.push(s.icon), s.position ? _.push(s.position) : _.push("left"), s.hover && _.push(`hover_${s.hover}`), s.animate && (_.push("animate"), typeof s.animate == "string" && _.push(s.animate))) : (_.push(s), !s.includes("right") && !s.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
1207
|
-
const
|
|
1207
|
+
const k = {
|
|
1208
1208
|
...f,
|
|
1209
1209
|
className: j(e, a, _, {
|
|
1210
1210
|
"no-text": !u,
|
|
@@ -1212,35 +1212,35 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1212
1212
|
button: o
|
|
1213
1213
|
}),
|
|
1214
1214
|
onClick: (g) => {
|
|
1215
|
-
(!o || o[0] === "#") &&
|
|
1215
|
+
(!o || o[0] === "#") && d && (g.preventDefault(), g.stopPropagation()), d && d(g);
|
|
1216
1216
|
},
|
|
1217
1217
|
disabled: typeof i == "object" && "isClickable" in i ? !i.isClickable : i
|
|
1218
1218
|
};
|
|
1219
|
-
return o && (l = "a",
|
|
1219
|
+
return o && (l = "a", k.href = o), A.createElement(
|
|
1220
1220
|
l,
|
|
1221
|
-
|
|
1222
|
-
u || (c ? /* @__PURE__ */ r.jsx(
|
|
1221
|
+
k,
|
|
1222
|
+
u || (c ? /* @__PURE__ */ r.jsx(re, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
|
-
},
|
|
1225
|
-
const s = e.length > 1 ? "ul" : "p", o = e.map((l,
|
|
1224
|
+
}, nt = ({ buttons: e, className: t = "", ...n }) => {
|
|
1225
|
+
const s = e.length > 1 ? "ul" : "p", o = e.map((l, d) => s === "p" ? /* @__PURE__ */ r.jsx(W, { ...l }, d) : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(W, { ...l }) }, d));
|
|
1226
1226
|
return A.createElement(s, { className: j("button-wrapper", t), ...n, children: o });
|
|
1227
1227
|
};
|
|
1228
|
-
const
|
|
1228
|
+
const Ne = ({ maxWidth: e = !1 }) => {
|
|
1229
1229
|
const t = e ? { "--max-width": `${e / 16}rem` } : {};
|
|
1230
1230
|
return /* @__PURE__ */ r.jsx("hr", { className: j({ "has-max-width": e }), style: t });
|
|
1231
|
-
},
|
|
1231
|
+
}, rt = ({
|
|
1232
1232
|
href: e,
|
|
1233
1233
|
children: t,
|
|
1234
1234
|
fallbackElement: n,
|
|
1235
1235
|
className: s = "",
|
|
1236
1236
|
onClick: o,
|
|
1237
1237
|
gtmContext: l,
|
|
1238
|
-
gtmType:
|
|
1238
|
+
gtmType: d,
|
|
1239
1239
|
...a
|
|
1240
1240
|
}) => {
|
|
1241
1241
|
if (e) {
|
|
1242
1242
|
const i = { ...a };
|
|
1243
|
-
return o && (i.onClick = o), l && (i["data-gtm-event-context"] = l),
|
|
1243
|
+
return o && (i.onClick = o), l && (i["data-gtm-event-context"] = l), d && (i["data-gtm-event-type"] = d), /* @__PURE__ */ r.jsx(
|
|
1244
1244
|
"a",
|
|
1245
1245
|
{
|
|
1246
1246
|
href: e,
|
|
@@ -1364,7 +1364,7 @@ const Le = ({ maxWidth: e = !1 }) => {
|
|
|
1364
1364
|
}, Lr = ({ format: e, height: t, query: n, width: s }) => {
|
|
1365
1365
|
let o = `w=${s}&h=${t}`;
|
|
1366
1366
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1367
|
-
},
|
|
1367
|
+
}, dt = ({ format: e, range: t, url: n, query: s }) => t.map(({ height: o, width: l }) => `${n}?${Lr({
|
|
1368
1368
|
format: e,
|
|
1369
1369
|
height: o,
|
|
1370
1370
|
query: s,
|
|
@@ -1375,13 +1375,13 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1375
1375
|
description: s,
|
|
1376
1376
|
height: o,
|
|
1377
1377
|
type: l,
|
|
1378
|
-
query:
|
|
1378
|
+
query: d,
|
|
1379
1379
|
url: a,
|
|
1380
1380
|
width: i,
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: p, sizes: h } = Or(e), _ =
|
|
1384
|
+
} = e, { range: p, sizes: h } = Or(e), _ = dt({ format: "avif", query: d, range: p, url: a }), k = dt({ format: "webp", query: d, range: p, url: a }), g = dt({ format: "", query: d, range: p, url: a });
|
|
1385
1385
|
return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ r.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1396,7 +1396,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1396
1396
|
"source",
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "image/webp",
|
|
1399
|
-
srcSet:
|
|
1399
|
+
srcSet: k,
|
|
1400
1400
|
sizes: h,
|
|
1401
1401
|
"data-testid": "source"
|
|
1402
1402
|
}
|
|
@@ -1418,9 +1418,9 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1418
1418
|
)
|
|
1419
1419
|
] });
|
|
1420
1420
|
};
|
|
1421
|
-
let
|
|
1421
|
+
let Re = !1;
|
|
1422
1422
|
const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
1423
|
-
const s =
|
|
1423
|
+
const s = F(), o = ee(null), [l, d] = P("hidden");
|
|
1424
1424
|
z(() => {
|
|
1425
1425
|
const i = o.current;
|
|
1426
1426
|
if (i)
|
|
@@ -1429,18 +1429,18 @@ const Ir = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1429
1429
|
};
|
|
1430
1430
|
}, []);
|
|
1431
1431
|
const a = ({ propertyName: i }) => {
|
|
1432
|
-
i === "opacity" && (
|
|
1432
|
+
i === "opacity" && (Re !== !1 && clearTimeout(Re), d((c) => c === "opening" ? "open" : c === "closing" ? "closed" : c === "closed" ? "hidden" : c));
|
|
1433
1433
|
};
|
|
1434
1434
|
return Ce(() => {
|
|
1435
|
-
|
|
1435
|
+
Re !== !1 && clearTimeout(Re);
|
|
1436
1436
|
let i = "open";
|
|
1437
|
-
e ?
|
|
1438
|
-
|
|
1437
|
+
e ? d("opening") : (d("closing"), i = "hidden"), Re = setTimeout(() => {
|
|
1438
|
+
d(i);
|
|
1439
1439
|
}, 300);
|
|
1440
1440
|
}, [e]), /* @__PURE__ */ r.jsx("aside", { ref: o, className: j("tooltip text-medium", l, { loading: t }), hidden: l === "hidden", children: t ? /* @__PURE__ */ r.jsx("p", { children: s.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ r.jsx("p", { children: n }) : n });
|
|
1441
1441
|
};
|
|
1442
1442
|
const _n = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ r.jsx("section", { className: j("full-width-section", t), ...n, children: e });
|
|
1443
|
-
const
|
|
1443
|
+
const ao = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1444
1444
|
const s = [];
|
|
1445
1445
|
return t.forEach((o) => {
|
|
1446
1446
|
s.push({
|
|
@@ -1455,10 +1455,10 @@ const oo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1455
1455
|
});
|
|
1456
1456
|
}), /* @__PURE__ */ r.jsx(_n, { className: j("download-section", n), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1457
1457
|
A.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1458
|
-
/* @__PURE__ */ r.jsx(
|
|
1458
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: s })
|
|
1459
1459
|
] }) });
|
|
1460
1460
|
};
|
|
1461
|
-
const
|
|
1461
|
+
const io = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
1462
1462
|
const s = t.length;
|
|
1463
1463
|
if (s === 0)
|
|
1464
1464
|
return null;
|
|
@@ -1473,7 +1473,7 @@ const ao = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1473
1473
|
{
|
|
1474
1474
|
className: j({ "two-col": s === 2 || s === 4, "three-col": s === 5 || s <= 10 && s % 3 === 0 }),
|
|
1475
1475
|
children: t.map(
|
|
1476
|
-
({ logo: l, nameOfBusiness:
|
|
1476
|
+
({ logo: l, nameOfBusiness: d, link: a = !1, description: i = !1 }, c) => {
|
|
1477
1477
|
if (!l || !l.url)
|
|
1478
1478
|
return null;
|
|
1479
1479
|
const u = /* @__PURE__ */ r.jsx(
|
|
@@ -1482,7 +1482,7 @@ const ao = ({ title: e = !1, logos: t = [], className: n = "" }) => {
|
|
|
1482
1482
|
src: l.url,
|
|
1483
1483
|
width: l.width || "auto",
|
|
1484
1484
|
height: l.height || "auto",
|
|
1485
|
-
alt:
|
|
1485
|
+
alt: d
|
|
1486
1486
|
}
|
|
1487
1487
|
);
|
|
1488
1488
|
return /* @__PURE__ */ r.jsxs("li", { children: [
|
|
@@ -1518,8 +1518,8 @@ const Hr = [
|
|
|
1518
1518
|
"blockquote",
|
|
1519
1519
|
"q"
|
|
1520
1520
|
], Qr = ({ content: e, image: t, variant: n = "default", spacing: s = "normal", cta: o, children: l }) => {
|
|
1521
|
-
const
|
|
1522
|
-
return
|
|
1521
|
+
const d = ["eyebrow", "title", "text"], a = { eyebrow: "small", title: "h1", text: "p" }, i = {};
|
|
1522
|
+
return d.forEach((c) => {
|
|
1523
1523
|
if (!e[c]) {
|
|
1524
1524
|
i[c] = !1;
|
|
1525
1525
|
return;
|
|
@@ -1542,7 +1542,7 @@ const Hr = [
|
|
|
1542
1542
|
u && u.scrollIntoView({ behavior: "smooth" });
|
|
1543
1543
|
}), /* @__PURE__ */ r.jsx(_n, { className: j("banner-section", n, s, { "has-image": t, "has-extra-spacing": s === "normal" && i.eyebrow && i.title }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1544
1544
|
/* @__PURE__ */ r.jsxs("div", { className: "content-wrapper", children: [
|
|
1545
|
-
|
|
1545
|
+
d.map((c) => {
|
|
1546
1546
|
if (i[c] && typeof i[c] == "object") {
|
|
1547
1547
|
const { text: u, element: f = "" } = i[c];
|
|
1548
1548
|
return A.createElement(
|
|
@@ -1567,8 +1567,8 @@ const Hr = [
|
|
|
1567
1567
|
] }),
|
|
1568
1568
|
t && /* @__PURE__ */ r.jsx(Br, { image: { ...t, aspect: "banner" } })
|
|
1569
1569
|
] }) });
|
|
1570
|
-
},
|
|
1571
|
-
const
|
|
1570
|
+
}, lo = Ae(Qr);
|
|
1571
|
+
const co = ({
|
|
1572
1572
|
variant: e = "primary",
|
|
1573
1573
|
button: t = null,
|
|
1574
1574
|
title: n,
|
|
@@ -1578,32 +1578,32 @@ const lo = ({
|
|
|
1578
1578
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1579
1579
|
s && /* @__PURE__ */ r.jsx("p", { children: s }),
|
|
1580
1580
|
t && /* @__PURE__ */ r.jsx(W, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": o, "data-gtm-event-type": "learn-more-click", children: t.text })
|
|
1581
|
-
] }),
|
|
1581
|
+
] }), $t = "https://storage.googleapis.com/apolitical-assets/", Oe = {
|
|
1582
1582
|
general: "hello@apolitical.co",
|
|
1583
1583
|
support: "concierge@apolitical.co",
|
|
1584
1584
|
"data-protection": {
|
|
1585
1585
|
default: "dpo@apolitical.co",
|
|
1586
1586
|
eu: "dpo.agl@apolitical.foundation"
|
|
1587
1587
|
}
|
|
1588
|
-
},
|
|
1588
|
+
}, uo = "200,000+";
|
|
1589
1589
|
const xn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
1590
|
-
const s =
|
|
1590
|
+
const s = F();
|
|
1591
1591
|
return /* @__PURE__ */ r.jsxs("details", { className: j("collapsible-section", t), children: [
|
|
1592
1592
|
/* @__PURE__ */ r.jsx("summary", { children: e || s.formatMessage({ id: "collapsibleSection_summary" }) }),
|
|
1593
1593
|
/* @__PURE__ */ r.jsx("div", { className: "content", children: n })
|
|
1594
1594
|
] });
|
|
1595
1595
|
};
|
|
1596
1596
|
const ke = ({ variant: e = "primary", className: t = "", children: n, ...s }) => /* @__PURE__ */ r.jsx("div", { className: j("highlighted-text-box", e, t), ...s, children: n });
|
|
1597
|
-
const
|
|
1597
|
+
const st = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s = "" }) => {
|
|
1598
1598
|
let o = n && !!Object.keys(n).length;
|
|
1599
|
-
const l = typeof n == "object" && "breakpoints" in n,
|
|
1600
|
-
if (l && typeof n == "object" && typeof
|
|
1599
|
+
const l = typeof n == "object" && "breakpoints" in n, d = tt(l);
|
|
1600
|
+
if (l && typeof n == "object" && typeof d == "number") {
|
|
1601
1601
|
const f = Object.assign({}, n.breakpoints), p = pn(Object.keys(f));
|
|
1602
|
-
o = hn(
|
|
1602
|
+
o = hn(d, p, f);
|
|
1603
1603
|
}
|
|
1604
1604
|
const { breakpoints: a, text: i = "", component: c, ...u } = n;
|
|
1605
1605
|
return /* @__PURE__ */ r.jsx(ke, { variant: "subtle", className: j("empty-state-box", e, s), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1606
|
-
t && /* @__PURE__ */ r.jsx(
|
|
1606
|
+
t && /* @__PURE__ */ r.jsx(et, { options: { forceBlock: !0 }, children: t }),
|
|
1607
1607
|
o && typeof n == "object" && (c || /* @__PURE__ */ r.jsx(
|
|
1608
1608
|
W,
|
|
1609
1609
|
{
|
|
@@ -1614,13 +1614,13 @@ const rt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const
|
|
1617
|
+
const Tt = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), vn = { q: Tt, blockquote: Tt };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
vn[`h${e}`] = { component:
|
|
1619
|
+
vn[`h${e}`] = { component: Tt, props: { className: "title" } };
|
|
1620
1620
|
const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof s == "string" ? /* @__PURE__ */ r.jsx(
|
|
1623
|
-
|
|
1623
|
+
et,
|
|
1624
1624
|
{
|
|
1625
1625
|
options: {
|
|
1626
1626
|
wrapper: A.Fragment,
|
|
@@ -1631,10 +1631,10 @@ const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1631
1631
|
}
|
|
1632
1632
|
) : /* @__PURE__ */ r.jsx("p", { children: s })
|
|
1633
1633
|
] });
|
|
1634
|
-
const
|
|
1635
|
-
const l =
|
|
1634
|
+
const mo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children: o }) => {
|
|
1635
|
+
const l = F(), d = ee(null), [a, i] = P(""), [c, u] = P("closed");
|
|
1636
1636
|
z(() => {
|
|
1637
|
-
const h =
|
|
1637
|
+
const h = d.current;
|
|
1638
1638
|
if (h)
|
|
1639
1639
|
return h.addEventListener("transitionend", f), () => {
|
|
1640
1640
|
h.removeEventListener("transitionend", f);
|
|
@@ -1656,8 +1656,8 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1656
1656
|
return null;
|
|
1657
1657
|
const p = ["opening", "open"].includes(c);
|
|
1658
1658
|
return /* @__PURE__ */ r.jsxs(ke, { variant: "subtle", className: j("hide-show-text-box", e), children: [
|
|
1659
|
-
/* @__PURE__ */ r.jsxs("div", { ref:
|
|
1660
|
-
/* @__PURE__ */ r.jsx(
|
|
1659
|
+
/* @__PURE__ */ r.jsxs("div", { ref: d, className: j("content", c), children: [
|
|
1660
|
+
/* @__PURE__ */ r.jsx(et, { options: { forceBlock: !0 }, children: c === "closed" ? a : s }),
|
|
1661
1661
|
c !== "closed" && o
|
|
1662
1662
|
] }),
|
|
1663
1663
|
/* @__PURE__ */ r.jsx("p", { className: "cta", children: /* @__PURE__ */ r.jsx(
|
|
@@ -1675,20 +1675,20 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1675
1675
|
) })
|
|
1676
1676
|
] });
|
|
1677
1677
|
}, Wr = () => A.Fragment, zr = ({ children: e }) => /* @__PURE__ */ r.jsx(ke, { variant: "secondary", children: e }), Vr = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], Yr = ({ children: e }) => {
|
|
1678
|
-
const t =
|
|
1678
|
+
const t = F();
|
|
1679
1679
|
if (!e)
|
|
1680
1680
|
return null;
|
|
1681
1681
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1682
1682
|
const s = [];
|
|
1683
|
-
for (const l of
|
|
1683
|
+
for (const l of jt.toArray(e))
|
|
1684
1684
|
if (!(!l || typeof l == "string" || typeof l == "number"))
|
|
1685
1685
|
if (A.isValidElement(l) && l.type === "summary") {
|
|
1686
1686
|
if (l.props && l.props.children) {
|
|
1687
|
-
for (const
|
|
1688
|
-
if (!(!
|
|
1689
|
-
const a =
|
|
1687
|
+
for (const d of jt.toArray(l.props.children))
|
|
1688
|
+
if (!(!d || typeof d == "string" || typeof d == "number") && A.isValidElement(d)) {
|
|
1689
|
+
const a = d.type;
|
|
1690
1690
|
if (Vr.includes(a)) {
|
|
1691
|
-
for (n =
|
|
1691
|
+
for (n = d.props.children; typeof n != "string" && (Array.isArray(n) && n[0].props && n[0].props.children && n[0].props.children[0]); )
|
|
1692
1692
|
n = n[0].props.children[0];
|
|
1693
1693
|
break;
|
|
1694
1694
|
}
|
|
@@ -1720,11 +1720,11 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1720
1720
|
}
|
|
1721
1721
|
return /* @__PURE__ */ r.jsx("div", { ...t, children: e });
|
|
1722
1722
|
}, Jr = (e) => {
|
|
1723
|
-
const t =
|
|
1723
|
+
const t = F(), n = Date.now().toString();
|
|
1724
1724
|
let s = "default";
|
|
1725
1725
|
const o = e.src;
|
|
1726
1726
|
return o.includes("youtube") || o.includes("vimeo") ? s = "video" : o.includes("riddle") || o.includes("sli.do") ? s = "poll" : o.includes("padlet") && (s = "padlet"), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1727
|
-
/* @__PURE__ */ r.jsx(
|
|
1727
|
+
/* @__PURE__ */ r.jsx(re, { children: /* @__PURE__ */ r.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${s === "default" ? "" : `_${s}`}` }) }) }),
|
|
1728
1728
|
/* @__PURE__ */ r.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${s === "default" ? "" : `_${s}`}` }) }),
|
|
1729
1729
|
/* @__PURE__ */ r.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
|
|
1730
1730
|
] });
|
|
@@ -1735,11 +1735,11 @@ const uo = ({ className: e = "", show: t = !1, hide: n = !1, text: s, children:
|
|
|
1735
1735
|
let n = { ...t };
|
|
1736
1736
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1737
1737
|
let s = e, o = !1;
|
|
1738
|
-
for (const l of
|
|
1738
|
+
for (const l of jt.toArray(e))
|
|
1739
1739
|
if (!(!l || typeof l == "string" || typeof l == "number") && A.isValidElement(l)) {
|
|
1740
|
-
const
|
|
1741
|
-
if (["button", "center", "span", "strong"].includes(
|
|
1742
|
-
for ((
|
|
1740
|
+
const d = l.type;
|
|
1741
|
+
if (["button", "center", "span", "strong"].includes(d) && l.props && l.props.children && l.props.children[0])
|
|
1742
|
+
for ((d === "button" || tn(l.props.children[0]) === "button") && (o = !0), s = l.props.children[0]; s && typeof s != "string" && !(typeof s == "boolean" || typeof s == "number" || !A.isValidElement(s)); )
|
|
1743
1743
|
if (s.props && s.props.children && s.props.children[0])
|
|
1744
1744
|
s = s.props.children[0], s && tn(s) === "button" && (o = !0);
|
|
1745
1745
|
else
|
|
@@ -1767,47 +1767,47 @@ const nn = ({ className: e = "", options: t = {}, children: n }) => {
|
|
|
1767
1767
|
iframe: Jr
|
|
1768
1768
|
}
|
|
1769
1769
|
};
|
|
1770
|
-
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(
|
|
1770
|
+
return /* @__PURE__ */ r.jsx("div", { className: j("markdown-text", e), children: /* @__PURE__ */ r.jsx(et, { options: { ...s, ...t }, children: n }) });
|
|
1771
1771
|
};
|
|
1772
1772
|
const qr = ({ size: e = "medium", variant: t = "default", className: n = "", children: s }) => /* @__PURE__ */ r.jsx("span", { className: j("pill", e, t, n), children: s });
|
|
1773
|
-
const
|
|
1773
|
+
const Mt = ({ element: e = "p", children: t = null, className: n = "", ...s }) => A.createElement(e, { ...s, className: j("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1774
1774
|
const Kr = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1775
|
-
const s =
|
|
1776
|
-
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(
|
|
1775
|
+
const s = F(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, l = { "--progress": `${e}%` };
|
|
1776
|
+
return /* @__PURE__ */ r.jsx("span", { className: j(`progress-bar section-${o}`, n), style: l, children: /* @__PURE__ */ r.jsx(re, { children: t ? `${e} ${t}` : s.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1777
1777
|
}, es = Ae(Kr);
|
|
1778
|
-
const
|
|
1779
|
-
const s =
|
|
1778
|
+
const mt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1779
|
+
const s = F();
|
|
1780
1780
|
t || (t = {
|
|
1781
|
-
0: { text: s.formatMessage({ id: `${
|
|
1782
|
-
75: { text: s.formatMessage({ id: `${
|
|
1783
|
-
100: { text: s.formatMessage({ id: `${
|
|
1781
|
+
0: { text: s.formatMessage({ id: `${mt}loading` }) },
|
|
1782
|
+
75: { text: s.formatMessage({ id: `${mt}almostDone` }) },
|
|
1783
|
+
100: { text: s.formatMessage({ id: `${mt}complete` }) }
|
|
1784
1784
|
});
|
|
1785
1785
|
let o = null;
|
|
1786
1786
|
const l = Object.keys(t);
|
|
1787
1787
|
for (let a = 0; a < l.length && !(e < parseInt(l[a])); a++)
|
|
1788
1788
|
o = l[a];
|
|
1789
|
-
const
|
|
1789
|
+
const d = o && t[o].icon ? { "--icon": `url(${$t}icons/${t[o].icon}.svg)` } : {};
|
|
1790
1790
|
return /* @__PURE__ */ r.jsxs(
|
|
1791
1791
|
ke,
|
|
1792
1792
|
{
|
|
1793
1793
|
className: j("loading-block", n, { "has-icon": o && t[o].icon }),
|
|
1794
1794
|
variant: "subtle",
|
|
1795
|
-
style:
|
|
1795
|
+
style: d,
|
|
1796
1796
|
children: [
|
|
1797
1797
|
o && /* @__PURE__ */ r.jsx("span", { className: "step", children: t[o].text }),
|
|
1798
1798
|
/* @__PURE__ */ r.jsx(es, { progress: e })
|
|
1799
1799
|
]
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
|
-
},
|
|
1802
|
+
}, fo = Ae(ts);
|
|
1803
1803
|
const be = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(mn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1804
|
-
const
|
|
1804
|
+
const Ct = {
|
|
1805
1805
|
header: ["logo", "link", "link", "search"],
|
|
1806
1806
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1807
1807
|
"cards-section": ["subtitle", "cards"],
|
|
1808
1808
|
cards: ["card", "card", "card", "card"],
|
|
1809
1809
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1810
|
-
}, bn = (e, t) => e in
|
|
1810
|
+
}, bn = (e, t) => e in Ct ? /* @__PURE__ */ r.jsx("div", { className: e, children: Ct[e].map((n, s) => bn(n, s)) }, t) : /* @__PURE__ */ r.jsx(be, { className: e }, t), ns = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: j("loading-state", e), children: Ct[e].map((t, n) => bn(t, n)) }), wn = (e) => {
|
|
1811
1811
|
const t = e && e.toUpperCase().split(" ");
|
|
1812
1812
|
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) : "";
|
|
1813
1813
|
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rs = (e) => {
|
|
@@ -1819,8 +1819,8 @@ const Tt = {
|
|
|
1819
1819
|
if (s <= t * (o + 1))
|
|
1820
1820
|
return Qe[o];
|
|
1821
1821
|
};
|
|
1822
|
-
const rn = 256,
|
|
1823
|
-
const [a, i] =
|
|
1822
|
+
const rn = 256, Pt = ({ className: e = "", src: t = "", name: n, alt: s, width: o = rn, height: l = rn, ...d }) => {
|
|
1823
|
+
const [a, i] = P(!1), c = ee(null);
|
|
1824
1824
|
z(() => {
|
|
1825
1825
|
const f = c.current;
|
|
1826
1826
|
if (!f)
|
|
@@ -1832,7 +1832,7 @@ const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1832
1832
|
typeof window < "u" && window.devicePixelRatio && (f.width = h * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, p.scale(window.devicePixelRatio, window.devicePixelRatio)), p.fillStyle = rs(n), p.fillRect(0, 0, h, _), p.font = `${h / 3}px Arial`, p.textAlign = "center", p.fillStyle = "white", p.fillText(wn(n), h / 2, _ / 1.6);
|
|
1833
1833
|
}, [n]);
|
|
1834
1834
|
let u = !1;
|
|
1835
|
-
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ r.jsx("figure", { className: j("profile-picture", e, { error: a }), ...
|
|
1835
|
+
return t && t !== "" && !a && (t.includes("http") || t.includes("//")) && (u = !0), /* @__PURE__ */ r.jsx("figure", { className: j("profile-picture", e, { error: a }), ...d, children: u ? /* @__PURE__ */ r.jsx(
|
|
1836
1836
|
"img",
|
|
1837
1837
|
{
|
|
1838
1838
|
src: t,
|
|
@@ -1845,9 +1845,9 @@ const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1845
1845
|
}
|
|
1846
1846
|
) : /* @__PURE__ */ r.jsx("canvas", { ref: c }) });
|
|
1847
1847
|
}, kn = (e) => e === "apolitical" ? {
|
|
1848
|
-
image: `${
|
|
1848
|
+
image: `${$t}logos/member_apolitical.svg`
|
|
1849
1849
|
} : e === "community" || typeof e == "object" && !e.name ? {
|
|
1850
|
-
image: `${
|
|
1850
|
+
image: `${$t}logos/member_community.svg`
|
|
1851
1851
|
} : {
|
|
1852
1852
|
name: e.name,
|
|
1853
1853
|
role: e.jobTitle || "",
|
|
@@ -1861,14 +1861,14 @@ const rn = 256, Dt = ({ className: e = "", src: t = "", name: n, alt: s, width:
|
|
|
1861
1861
|
country: n = "",
|
|
1862
1862
|
maximumCharacters: s = 80
|
|
1863
1863
|
}) => {
|
|
1864
|
-
const o = e !== "", l = t !== "",
|
|
1865
|
-
if (!o && !l && !
|
|
1864
|
+
const o = e !== "", l = t !== "", d = n !== "";
|
|
1865
|
+
if (!o && !l && !d)
|
|
1866
1866
|
return "";
|
|
1867
1867
|
const a = `${e}${o && l ? ` — ${t}` : t}`;
|
|
1868
|
-
let i = `${a}${(o || l) &&
|
|
1869
|
-
return i.length > s && (i = a), i.length > s && (i =
|
|
1868
|
+
let i = `${a}${(o || l) && d ? `, ${n}` : n}`;
|
|
1869
|
+
return i.length > s && (i = a), i.length > s && (i = Ke(i, s)), i;
|
|
1870
1870
|
};
|
|
1871
|
-
const
|
|
1871
|
+
const Ft = ({
|
|
1872
1872
|
element: e = "div",
|
|
1873
1873
|
member: t = "community",
|
|
1874
1874
|
additionalContent: n = !1,
|
|
@@ -1876,13 +1876,13 @@ const Pt = ({
|
|
|
1876
1876
|
gtmType: o = "member-click",
|
|
1877
1877
|
className: l = ""
|
|
1878
1878
|
}) => {
|
|
1879
|
-
const
|
|
1880
|
-
a.name || (a.name =
|
|
1879
|
+
const d = F(), a = kn(t);
|
|
1880
|
+
a.name || (a.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
1881
1881
|
const { name: i, url: c, image: u } = a, f = ss(a), p = n && n.createdAt ? Mr(n.createdAt) : !1, h = n && n.createdAt ? Tr(n.createdAt) : "";
|
|
1882
1882
|
return A.createElement(e, {
|
|
1883
1883
|
className: j("member text-medium", l),
|
|
1884
1884
|
children: /* @__PURE__ */ r.jsxs(
|
|
1885
|
-
|
|
1885
|
+
rt,
|
|
1886
1886
|
{
|
|
1887
1887
|
href: c,
|
|
1888
1888
|
gtmType: o,
|
|
@@ -1891,12 +1891,12 @@ const Pt = ({
|
|
|
1891
1891
|
_ == null || _.stopPropagation();
|
|
1892
1892
|
},
|
|
1893
1893
|
children: [
|
|
1894
|
-
/* @__PURE__ */ r.jsx(
|
|
1894
|
+
/* @__PURE__ */ r.jsx(Pt, { name: i, src: u }),
|
|
1895
1895
|
/* @__PURE__ */ r.jsxs("p", { className: "details", children: [
|
|
1896
1896
|
/* @__PURE__ */ r.jsx("strong", { children: i }),
|
|
1897
1897
|
n && /* @__PURE__ */ r.jsxs("span", { className: "additional-content", children: [
|
|
1898
|
-
n.createdAt && p && /* @__PURE__ */ r.jsx("span", { className: "date", title: h, "aria-label": h, children:
|
|
1899
|
-
n.didEdit && /* @__PURE__ */ r.jsx("em", { children:
|
|
1898
|
+
n.createdAt && p && /* @__PURE__ */ r.jsx("span", { className: "date", title: h, "aria-label": h, children: d.formatMessage({ id: `dates_${p.path}` }, { number: p.number }) }),
|
|
1899
|
+
n.didEdit && /* @__PURE__ */ r.jsx("em", { children: d.formatMessage({ id: "discussion_edited" }) })
|
|
1900
1900
|
] }),
|
|
1901
1901
|
f && /* @__PURE__ */ r.jsx("small", { children: f })
|
|
1902
1902
|
] })
|
|
@@ -1908,18 +1908,18 @@ const Pt = ({
|
|
|
1908
1908
|
const sn = {
|
|
1909
1909
|
small: 24,
|
|
1910
1910
|
medium: 48
|
|
1911
|
-
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders:
|
|
1912
|
-
const c =
|
|
1911
|
+
}, os = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: s, size: o, showGap: l, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: a = 2, className: i = "" }) => {
|
|
1912
|
+
const c = F();
|
|
1913
1913
|
return !n || n.length === 0 ? null : A.createElement(
|
|
1914
1914
|
e,
|
|
1915
1915
|
{ className: j("contributors", i, o, { "has-gap": l }), children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
1916
1916
|
/* @__PURE__ */ r.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let p, h = "";
|
|
1918
1918
|
if (f < a) {
|
|
1919
|
-
const { name: _ = "", image:
|
|
1920
|
-
if (
|
|
1919
|
+
const { name: _ = "", image: k = "" } = kn(u);
|
|
1920
|
+
if (d)
|
|
1921
1921
|
return /* @__PURE__ */ r.jsx(be, { element: "li", className: "contributor" }, f);
|
|
1922
|
-
p = /* @__PURE__ */ r.jsx(
|
|
1922
|
+
p = /* @__PURE__ */ r.jsx(Pt, { name: _, src: k, width: sn[o || "medium"], height: sn[o || "medium"] });
|
|
1923
1923
|
} else if (f === a) {
|
|
1924
1924
|
const _ = (t || n.length) - a;
|
|
1925
1925
|
p = /* @__PURE__ */ r.jsxs("small", { className: j({ "large-number": _ > 99 }), children: [
|
|
@@ -1929,7 +1929,7 @@ const sn = {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
return p ? /* @__PURE__ */ r.jsx("li", { className: j("contributor", h), children: p }, f) : null;
|
|
1931
1931
|
}) }),
|
|
1932
|
-
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) :
|
|
1932
|
+
s && /* @__PURE__ */ r.jsx("span", { className: "label", children: typeof s == "string" ? s : n.length === 1 ? typeof n[0] == "string" ? c.formatMessage({ id: `member_${n[0]}` }) : Ke(n[0].name || "", 20) : null })
|
|
1933
1933
|
] }) }
|
|
1934
1934
|
);
|
|
1935
1935
|
}, as = ({ showDevTools: e = !0, children: t }) => {
|
|
@@ -1949,7 +1949,7 @@ const sn = {
|
|
|
1949
1949
|
e && /* @__PURE__ */ r.jsx(dr, { initialIsOpen: !1 })
|
|
1950
1950
|
] });
|
|
1951
1951
|
};
|
|
1952
|
-
var is =
|
|
1952
|
+
var is = Nt({ client: Ge });
|
|
1953
1953
|
function ls(e) {
|
|
1954
1954
|
var t = e.children, n = e.client, s = e.apiKey, o = e.options, l = qe(function() {
|
|
1955
1955
|
return n && s && 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 && o && 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 || (s && (Ge.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Ge.init(s, o)), Ge);
|
|
@@ -1978,21 +1978,21 @@ const cs = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ r.jsx(r.F
|
|
|
1978
1978
|
...n || {}
|
|
1979
1979
|
};
|
|
1980
1980
|
return /* @__PURE__ */ r.jsx(ir, { locale: s, messages: o, children: e });
|
|
1981
|
-
}, je =
|
|
1982
|
-
const [s, o] =
|
|
1981
|
+
}, je = Nt(null), ds = ({ children: e, user: t }) => /* @__PURE__ */ r.jsx(je.Provider, { value: t, children: e }), po = ({ bootstrap: e, children: t, intl: n }) => {
|
|
1982
|
+
const [s, o] = P({ isLoading: !0 });
|
|
1983
1983
|
return z(() => {
|
|
1984
1984
|
e().then((l) => o({ ...l, isLoading: !1 })).catch(() => o({ isLoading: !1 }));
|
|
1985
1985
|
}, []), /* @__PURE__ */ r.jsx(us, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ r.jsx(ds, { user: s, children: /* @__PURE__ */ r.jsx(as, { children: /* @__PURE__ */ r.jsx(cs, { user: s, children: t }) }) }) });
|
|
1986
1986
|
};
|
|
1987
|
-
const
|
|
1987
|
+
const ft = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: s } = { join: () => {
|
|
1988
1988
|
}, leave: () => {
|
|
1989
1989
|
} } }) => {
|
|
1990
|
-
const o =
|
|
1990
|
+
const o = F(), l = ye(je), d = l && typeof l.id == "string", [a, i] = P(e), [c, u] = P(e ? "joined" : "notJoined");
|
|
1991
1991
|
z(() => {
|
|
1992
1992
|
c === "joining" ? u("joined") : c === "leaving" && u("notJoined");
|
|
1993
1993
|
}, [a]);
|
|
1994
1994
|
const f = {}, p = {};
|
|
1995
|
-
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${
|
|
1995
|
+
return a && c !== "leaving" && (f["data-hover-text"] = o.formatMessage({ id: `${ft}_leave` }), f["aria-label"] = o.formatMessage({ id: `${ft}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ r.jsx(
|
|
1996
1996
|
W,
|
|
1997
1997
|
{
|
|
1998
1998
|
variant: a ? "secondary" : "primary",
|
|
@@ -2000,78 +2000,48 @@ const mt = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2000
2000
|
styling: { fullWidth: !0 },
|
|
2001
2001
|
icon: a && c !== "leaving" ? { icon: "tick", position: "left" } : !1,
|
|
2002
2002
|
onClick: async (h) => {
|
|
2003
|
-
|
|
2003
|
+
d && (h.currentTarget.blur(), a ? (u("leaving"), typeof s == "function" && await s()) : (u("joining"), typeof n == "function" && await n()), i(!a));
|
|
2004
2004
|
},
|
|
2005
2005
|
className: j("join-community-button", c, { active: c === "joining" }),
|
|
2006
|
-
disabled: !
|
|
2006
|
+
disabled: !d,
|
|
2007
2007
|
...f,
|
|
2008
|
-
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${
|
|
2008
|
+
children: /* @__PURE__ */ r.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${ft}${["joining", "leaving"].includes(c) ? `_${c}` : a ? "_member" : t ? "_short" : ""}` }) })
|
|
2009
2009
|
}
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
|
-
const
|
|
2013
|
-
|
|
2014
|
-
slug: t,
|
|
2015
|
-
members: { number: n, data: s } = { number: void 0, data: [] },
|
|
2016
|
-
className: o = "",
|
|
2017
|
-
onInviteClick: l,
|
|
2018
|
-
...m
|
|
2019
|
-
}) => {
|
|
2020
|
-
const a = P(), i = n || (s == null ? void 0 : s.length) || 0;
|
|
2012
|
+
const pt = "communityDetails_", ho = ({ isMember: e = !1, slug: t, members: { number: n, data: s } = { number: void 0, data: [] }, className: o = "", ...l }) => {
|
|
2013
|
+
const d = F(), a = n || (s == null ? void 0 : s.length) || 0;
|
|
2021
2014
|
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details", o), children: [
|
|
2022
|
-
/* @__PURE__ */ r.jsx(
|
|
2015
|
+
/* @__PURE__ */ r.jsx(Ne, {}),
|
|
2023
2016
|
/* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
|
|
2024
2017
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
2025
2018
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
2026
|
-
|
|
2027
|
-
/* @__PURE__ */ r.jsx("span", { className: "count", children:
|
|
2019
|
+
d.formatMessage({ id: `${pt}members` }),
|
|
2020
|
+
/* @__PURE__ */ r.jsx("span", { className: "count", children: a })
|
|
2028
2021
|
] }),
|
|
2029
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${t}/members`, children:
|
|
2022
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${t}/members`, children: d.formatMessage({ id: `${pt}viewAll` }) }) })
|
|
2030
2023
|
] }),
|
|
2031
|
-
/* @__PURE__ */ r.jsx(
|
|
2032
|
-
os,
|
|
2033
|
-
{
|
|
2034
|
-
contributors: {
|
|
2035
|
-
total: n,
|
|
2036
|
-
data: s != null && s.length ? s : [{}, {}, {}, {}, {}]
|
|
2037
|
-
},
|
|
2038
|
-
styling: {
|
|
2039
|
-
size: "medium",
|
|
2040
|
-
showGap: !0,
|
|
2041
|
-
showPlaceholders: i === 0
|
|
2042
|
-
},
|
|
2043
|
-
cutoff: 5
|
|
2044
|
-
}
|
|
2045
|
-
)
|
|
2024
|
+
/* @__PURE__ */ r.jsx(os, { contributors: { total: n, data: s != null && s.length ? s : [{}, {}, {}, {}, {}] }, styling: { size: "medium", showGap: !0, showPlaceholders: a === 0 }, cutoff: 5 })
|
|
2046
2025
|
] }),
|
|
2047
|
-
/* @__PURE__ */ r.jsx(yn, { isMember: e, ...
|
|
2048
|
-
e && /* @__PURE__ */ r.jsx(
|
|
2049
|
-
W,
|
|
2050
|
-
{
|
|
2051
|
-
variant: "primary",
|
|
2052
|
-
onClick: () => l(),
|
|
2053
|
-
icon: { icon: "plus" },
|
|
2054
|
-
styling: { fullWidth: !0 },
|
|
2055
|
-
children: a.formatMessage({ id: `${ft}invite` })
|
|
2056
|
-
}
|
|
2057
|
-
)
|
|
2026
|
+
/* @__PURE__ */ r.jsx(yn, { isMember: e, ...l }),
|
|
2027
|
+
e && /* @__PURE__ */ r.jsx(W, { variant: "primary", icon: { icon: "plus" }, styling: { fullWidth: !0 }, children: d.formatMessage({ id: `${pt}invite` }) })
|
|
2058
2028
|
] });
|
|
2059
2029
|
};
|
|
2060
|
-
const
|
|
2030
|
+
const go = ({
|
|
2061
2031
|
breadcrumbs: e,
|
|
2062
2032
|
cutoff: t = 20,
|
|
2063
2033
|
className: n = ""
|
|
2064
2034
|
}) => {
|
|
2065
|
-
const s =
|
|
2035
|
+
const s = F();
|
|
2066
2036
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2067
|
-
/* @__PURE__ */ r.jsx(
|
|
2068
|
-
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current:
|
|
2069
|
-
|
|
2070
|
-
/* @__PURE__ */ r.jsx(
|
|
2037
|
+
/* @__PURE__ */ r.jsx(re, { element: "p", children: s.formatMessage({ id: "breadcrumbs_label" }) }),
|
|
2038
|
+
/* @__PURE__ */ r.jsx("ul", { className: j("breadcrumbs text-small", n), children: e.map(({ text: o, href: l, current: d = !1 }, a) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
2039
|
+
d && /* @__PURE__ */ r.jsx(re, { element: "span", children: s.formatMessage({ id: "breadcrumbs_currentPage" }) }),
|
|
2040
|
+
/* @__PURE__ */ r.jsx(rt, { href: d ? void 0 : l, children: Ke(o, t) })
|
|
2071
2041
|
] }, `${window.btoa(o)}_${a}`)) })
|
|
2072
2042
|
] });
|
|
2073
2043
|
};
|
|
2074
|
-
const
|
|
2044
|
+
const _o = ({
|
|
2075
2045
|
options: e,
|
|
2076
2046
|
allOption: t = !1,
|
|
2077
2047
|
allowMultiple: n = !0,
|
|
@@ -2079,19 +2049,19 @@ const go = ({
|
|
|
2079
2049
|
},
|
|
2080
2050
|
className: o = ""
|
|
2081
2051
|
}) => {
|
|
2082
|
-
const l =
|
|
2052
|
+
const l = F(), d = t ? [{ id: "all", text: typeof t != "boolean" && t.text || l.formatMessage({ id: "filters_all" }) }, ...e] : e, [a, i] = P(t ? ["all"] : []), c = (u, f) => {
|
|
2083
2053
|
let p = [];
|
|
2084
2054
|
a.includes(u) ? p = a.filter((h) => h !== u) : u === "all" ? p = ["all"] : n ? p = [...a.filter((h) => h !== "all"), u] : p = [u], i((h) => (s && typeof s == "function" && s({ current: p, previous: h }), p)), f && typeof f == "function" && f();
|
|
2085
2055
|
};
|
|
2086
|
-
return /* @__PURE__ */ r.jsx("ul", { className: j("filters", o), children:
|
|
2056
|
+
return /* @__PURE__ */ r.jsx("ul", { className: j("filters", o), children: d.map(({ id: u, text: f, disabled: p = !1, callback: h = () => {
|
|
2087
2057
|
} }) => {
|
|
2088
2058
|
let _ = {};
|
|
2089
2059
|
return p && (_ = { disabled: !0, "aria-label": l.formatMessage({ id: "filters_disabled" }, { name: f }) }), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2090
2060
|
"button",
|
|
2091
2061
|
{
|
|
2092
2062
|
className: j(u, { selected: a.includes(u) }),
|
|
2093
|
-
onClick: (
|
|
2094
|
-
|
|
2063
|
+
onClick: (k) => {
|
|
2064
|
+
k.preventDefault(), k.stopPropagation(), c(u, h);
|
|
2095
2065
|
},
|
|
2096
2066
|
..._,
|
|
2097
2067
|
children: f
|
|
@@ -2107,7 +2077,7 @@ const go = ({
|
|
|
2107
2077
|
l === "before-lang" ? s += `/${o}` : (s.includes(`/${n}/`) || (s += `/${n}`), s += `/${o}`);
|
|
2108
2078
|
}), s.includes(`/${n}/`) || (s += `/${n}`), s;
|
|
2109
2079
|
};
|
|
2110
|
-
const
|
|
2080
|
+
const ht = { en: "English", es: "Español", fr: "Français", pt: "Português" }, Ue = "languageSwitcher_", xo = ({
|
|
2111
2081
|
currentLanguage: e,
|
|
2112
2082
|
isOriginalLanguage: t = !1,
|
|
2113
2083
|
isHumanTranslation: n = !1,
|
|
@@ -2115,48 +2085,48 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2115
2085
|
onChange: o = () => {
|
|
2116
2086
|
},
|
|
2117
2087
|
urlParts: l,
|
|
2118
|
-
variant:
|
|
2088
|
+
variant: d = "default",
|
|
2119
2089
|
label: a,
|
|
2120
2090
|
className: i = ""
|
|
2121
2091
|
}) => {
|
|
2122
|
-
const c =
|
|
2092
|
+
const c = F(), [u, f] = P(e);
|
|
2123
2093
|
if (z(() => {
|
|
2124
2094
|
e !== u && f(e);
|
|
2125
|
-
}, [e]), !s || !Object.values(s).some((
|
|
2095
|
+
}, [e]), !s || !Object.values(s).some((k) => k && k.post_name))
|
|
2126
2096
|
return null;
|
|
2127
2097
|
const h = Object.keys(s), _ = u !== e;
|
|
2128
|
-
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small",
|
|
2098
|
+
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small", d, i), children: [
|
|
2129
2099
|
/* @__PURE__ */ r.jsxs("nav", { children: [
|
|
2130
|
-
|
|
2131
|
-
/* @__PURE__ */ r.jsx("ul", { children: h.map((
|
|
2132
|
-
if (!
|
|
2100
|
+
d !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${Ue}label` }) }),
|
|
2101
|
+
/* @__PURE__ */ r.jsx("ul", { children: h.map((k) => {
|
|
2102
|
+
if (!ht[k])
|
|
2133
2103
|
return null;
|
|
2134
|
-
let g = { className:
|
|
2135
|
-
return u ===
|
|
2104
|
+
let g = { className: k };
|
|
2105
|
+
return u === k ? g["aria-label"] = c.formatMessage({ id: `${Ue}selected` }, { language: ht[k] }) : g = {
|
|
2136
2106
|
...g,
|
|
2137
|
-
href: ms(
|
|
2107
|
+
href: ms(k, l),
|
|
2138
2108
|
onClick: (E) => {
|
|
2139
|
-
E.preventDefault(), E.stopPropagation(), f(
|
|
2109
|
+
E.preventDefault(), E.stopPropagation(), f(k), o(k);
|
|
2140
2110
|
}
|
|
2141
|
-
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2111
|
+
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(rt, { ...g, fallbackElement: "span", children: ht[k] }) }, k);
|
|
2142
2112
|
}) }),
|
|
2143
|
-
|
|
2113
|
+
d !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${Ue}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2144
2114
|
] }),
|
|
2145
|
-
|
|
2115
|
+
d !== "short" && !_ && !t && !n && /* @__PURE__ */ r.jsx("small", {
|
|
2146
2116
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2147
2117
|
// @ts-ignore
|
|
2148
2118
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2149
2119
|
children: c.formatMessage({ id: `${Ue}disclaimer` }, {
|
|
2150
|
-
email:
|
|
2151
|
-
link: (
|
|
2152
|
-
const g = `mailto:${
|
|
2153
|
-
return /* @__PURE__ */ r.jsx("a", { href: g, children:
|
|
2120
|
+
email: Oe.support,
|
|
2121
|
+
link: (k) => {
|
|
2122
|
+
const g = `mailto:${k}`;
|
|
2123
|
+
return /* @__PURE__ */ r.jsx("a", { href: g, children: k });
|
|
2154
2124
|
}
|
|
2155
2125
|
})
|
|
2156
2126
|
})
|
|
2157
2127
|
] });
|
|
2158
2128
|
};
|
|
2159
|
-
const
|
|
2129
|
+
const gt = lr({ locale: "en", messages: Dt }), fs = ({
|
|
2160
2130
|
page: e = 1,
|
|
2161
2131
|
length: t = 0,
|
|
2162
2132
|
limit: n = 10,
|
|
@@ -2164,14 +2134,14 @@ const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
|
2164
2134
|
},
|
|
2165
2135
|
icon: o = !1,
|
|
2166
2136
|
messages: l = {
|
|
2167
|
-
button:
|
|
2168
|
-
endOfFeed:
|
|
2169
|
-
error:
|
|
2137
|
+
button: gt.formatMessage({ id: "loadMore_button" }),
|
|
2138
|
+
endOfFeed: gt.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2139
|
+
error: gt.formatMessage({ id: "loadMore_error" })
|
|
2170
2140
|
},
|
|
2171
|
-
className:
|
|
2141
|
+
className: d = "",
|
|
2172
2142
|
gtmContext: a = "LoadMore"
|
|
2173
2143
|
}) => {
|
|
2174
|
-
const [i, c] =
|
|
2144
|
+
const [i, c] = P(!1), [u, f] = P(!1);
|
|
2175
2145
|
if (t <= 0 || t < n * e)
|
|
2176
2146
|
return null;
|
|
2177
2147
|
const p = async (h) => {
|
|
@@ -2181,7 +2151,7 @@ const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
|
2181
2151
|
_ instanceof Error && _.message && _.message.includes("Cannot read items") ? f(!0) : c(!0);
|
|
2182
2152
|
}
|
|
2183
2153
|
};
|
|
2184
|
-
return /* @__PURE__ */ r.jsxs("footer", { className: j("load-more",
|
|
2154
|
+
return /* @__PURE__ */ r.jsxs("footer", { className: j("load-more", d), children: [
|
|
2185
2155
|
i && /* @__PURE__ */ r.jsx("p", { className: "error", children: l.error }),
|
|
2186
2156
|
u ? /* @__PURE__ */ r.jsx("p", { children: l.endOfFeed }) : /* @__PURE__ */ r.jsx(
|
|
2187
2157
|
W,
|
|
@@ -2200,7 +2170,7 @@ const ht = lr({ locale: "en", messages: Nt }), fs = ({
|
|
|
2200
2170
|
};
|
|
2201
2171
|
let We = !1;
|
|
2202
2172
|
const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s = "" }) => {
|
|
2203
|
-
const o =
|
|
2173
|
+
const o = F(), l = ee(null), [d, a] = P(!1), i = (c) => {
|
|
2204
2174
|
l.current && c.target instanceof HTMLElement && !l.current.contains(c.target) && a(!1);
|
|
2205
2175
|
};
|
|
2206
2176
|
return z(() => (document.addEventListener("click", i, !0), () => {
|
|
@@ -2215,15 +2185,15 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2215
2185
|
variant: "tertiary",
|
|
2216
2186
|
size: "medium",
|
|
2217
2187
|
icon: { icon: "ellipsis" },
|
|
2218
|
-
onClick: () => a(!
|
|
2188
|
+
onClick: () => a(!d),
|
|
2219
2189
|
"aria-haspopup": "true",
|
|
2220
|
-
"aria-expanded":
|
|
2190
|
+
"aria-expanded": d,
|
|
2221
2191
|
"aria-controls": t,
|
|
2222
2192
|
screenreaderText: o.formatMessage({ id: "moreMenu" })
|
|
2223
2193
|
}
|
|
2224
2194
|
),
|
|
2225
|
-
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !
|
|
2226
|
-
const
|
|
2195
|
+
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !d, children: n.map(({ href: c, onClick: u, text: f, icon: p, ...h }, _) => {
|
|
2196
|
+
const k = {
|
|
2227
2197
|
...h,
|
|
2228
2198
|
onClick: (g) => {
|
|
2229
2199
|
a(!1), typeof u == "function" && u(g);
|
|
@@ -2237,13 +2207,13 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2237
2207
|
}, 100);
|
|
2238
2208
|
}
|
|
2239
2209
|
};
|
|
2240
|
-
return c && (
|
|
2210
|
+
return c && (k.href = c), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2241
2211
|
W,
|
|
2242
2212
|
{
|
|
2243
2213
|
variant: "tertiary",
|
|
2244
2214
|
size: "medium",
|
|
2245
2215
|
icon: p ? { icon: p, position: "left" } : !1,
|
|
2246
|
-
...
|
|
2216
|
+
...k,
|
|
2247
2217
|
children: f
|
|
2248
2218
|
}
|
|
2249
2219
|
) }, `${window.btoa(f)}_${_}`);
|
|
@@ -2251,32 +2221,32 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2251
2221
|
] })
|
|
2252
2222
|
});
|
|
2253
2223
|
};
|
|
2254
|
-
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(
|
|
2224
|
+
const jn = ({ variant: e = "default", version: t = "default", className: n = "", ...s }) => /* @__PURE__ */ r.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ r.jsx("a", { href: "/home/", className: j("logo", e, t, n), ...s, children: /* @__PURE__ */ r.jsx(re, { children: /* @__PURE__ */ r.jsx(we, { id: "apolitical" }) }) }) });
|
|
2255
2225
|
const hs = {
|
|
2256
2226
|
"2-1": 901
|
|
2257
|
-
},
|
|
2258
|
-
const o =
|
|
2227
|
+
}, vo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: s }) => {
|
|
2228
|
+
const o = tt(!0);
|
|
2259
2229
|
let l = s;
|
|
2260
|
-
return A.Children.count(s) === 1 && (l = A.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: A.Children.map(l, (
|
|
2230
|
+
return A.Children.count(s) === 1 && (l = A.Children.toArray(s)[0], l.props && (l = l.props.children)), /* @__PURE__ */ r.jsx("section", { className: j("columns", `layout-${e}`, n), children: A.Children.map(l, (d, a) => t !== !1 && a === t && o && o < hs[e] ? null : d) });
|
|
2261
2231
|
};
|
|
2262
|
-
const
|
|
2263
|
-
const e =
|
|
2264
|
-
|
|
2232
|
+
const _t = "cookieBanner_", xt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], vt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), gs = () => {
|
|
2233
|
+
const e = F(), [t, n, s] = mr(xt), [o, l] = P(!t["apol-cookie-banner"]), d = () => {
|
|
2234
|
+
xt.forEach((u) => {
|
|
2265
2235
|
n(u, !0, {
|
|
2266
2236
|
path: "/",
|
|
2267
|
-
expires:
|
|
2237
|
+
expires: vt,
|
|
2268
2238
|
domain: u === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2269
2239
|
});
|
|
2270
2240
|
}), l(!1), window.location.reload();
|
|
2271
2241
|
}, a = () => {
|
|
2272
2242
|
n("apol-cookie-banner", !0, {
|
|
2273
2243
|
path: "/",
|
|
2274
|
-
expires:
|
|
2275
|
-
}),
|
|
2244
|
+
expires: vt
|
|
2245
|
+
}), xt.forEach((u) => {
|
|
2276
2246
|
if (u === "apol-cookie-banner") {
|
|
2277
2247
|
n(u, !0, {
|
|
2278
2248
|
path: "/",
|
|
2279
|
-
expires:
|
|
2249
|
+
expires: vt
|
|
2280
2250
|
});
|
|
2281
2251
|
return;
|
|
2282
2252
|
}
|
|
@@ -2288,7 +2258,7 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2288
2258
|
const i = [
|
|
2289
2259
|
{ id: "settings", href: "/pages/cookie-policy", gtmType: "policy-page" },
|
|
2290
2260
|
{ id: "reject", onClick: a, gtmType: "reject-all" },
|
|
2291
|
-
{ id: "accept", onClick:
|
|
2261
|
+
{ id: "accept", onClick: d, gtmType: "accepted-all" }
|
|
2292
2262
|
], c = [];
|
|
2293
2263
|
return i.forEach((u) => {
|
|
2294
2264
|
c.push({
|
|
@@ -2298,12 +2268,12 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2298
2268
|
className: "gtm-trackable",
|
|
2299
2269
|
"data-gtm-event-context": "cookie-banner",
|
|
2300
2270
|
"data-gtm-event-type": `cookie-${u.gtmType}-click`,
|
|
2301
|
-
children: e.formatMessage({ id: `${
|
|
2271
|
+
children: e.formatMessage({ id: `${_t}buttons_${u.id}` })
|
|
2302
2272
|
});
|
|
2303
2273
|
}), /* @__PURE__ */ r.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2304
|
-
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2305
|
-
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${
|
|
2306
|
-
/* @__PURE__ */ r.jsx(
|
|
2274
|
+
/* @__PURE__ */ r.jsx("h6", { children: e.formatMessage({ id: `${_t}title` }) }),
|
|
2275
|
+
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${_t}text` }) }),
|
|
2276
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: c })
|
|
2307
2277
|
] });
|
|
2308
2278
|
}, ve = {
|
|
2309
2279
|
platform: {
|
|
@@ -2370,11 +2340,11 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2370
2340
|
text: {
|
|
2371
2341
|
order: ["dataProtection", "euDataProtection"],
|
|
2372
2342
|
dataProtection: {
|
|
2373
|
-
email:
|
|
2343
|
+
email: Oe["data-protection"].default,
|
|
2374
2344
|
gtmType: "email-dpo-link"
|
|
2375
2345
|
},
|
|
2376
2346
|
euDataProtection: {
|
|
2377
|
-
email:
|
|
2347
|
+
email: Oe["data-protection"].eu,
|
|
2378
2348
|
gtmType: "email-eu-dpo-link"
|
|
2379
2349
|
}
|
|
2380
2350
|
}
|
|
@@ -2386,10 +2356,10 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2386
2356
|
registered: { address: !0 },
|
|
2387
2357
|
berlin: { address: !0 },
|
|
2388
2358
|
support: {
|
|
2389
|
-
email:
|
|
2359
|
+
email: Oe.support,
|
|
2390
2360
|
gtmType: "concierge-email-click"
|
|
2391
2361
|
},
|
|
2392
|
-
business: { email:
|
|
2362
|
+
business: { email: Oe.general, gtmType: "hello-email-click" }
|
|
2393
2363
|
}
|
|
2394
2364
|
},
|
|
2395
2365
|
social: {
|
|
@@ -2402,25 +2372,25 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2402
2372
|
const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
2403
2373
|
const t = ve[e].order || [];
|
|
2404
2374
|
let n = !1;
|
|
2405
|
-
return "text" in ve[e] && (n = ve[e].text), /* @__PURE__ */ r.jsxs(
|
|
2375
|
+
return "text" in ve[e] && (n = ve[e].text), /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
2406
2376
|
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}` }) }),
|
|
2407
2377
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
|
|
2408
2378
|
if (["order", "child", "text"].includes(s))
|
|
2409
2379
|
return null;
|
|
2410
|
-
const { href: o, gtmType: l } = ve[e][s],
|
|
2411
|
-
return ["legal"].includes(e) && (
|
|
2380
|
+
const { href: o, gtmType: l } = ve[e][s], d = {};
|
|
2381
|
+
return ["legal"].includes(e) && (d.target = "_blank", d.rel = "noopener"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2412
2382
|
"a",
|
|
2413
2383
|
{
|
|
2414
2384
|
href: o,
|
|
2415
2385
|
className: "gtm-trackable",
|
|
2416
2386
|
"data-gtm-event-context": Je,
|
|
2417
2387
|
"data-gtm-event-type": l,
|
|
2418
|
-
...
|
|
2388
|
+
...d,
|
|
2419
2389
|
children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` })
|
|
2420
2390
|
}
|
|
2421
2391
|
) }, `${e}_${s}`);
|
|
2422
2392
|
}) }),
|
|
2423
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(
|
|
2393
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ r.jsx("dl", { className: "text-medium", children: n.order.map((s) => /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
2424
2394
|
/* @__PURE__ */ r.jsx("dt", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}` }) }),
|
|
2425
2395
|
/* @__PURE__ */ r.jsxs("dd", { children: [
|
|
2426
2396
|
typeof n != "boolean" && n[s].address && /* @__PURE__ */ r.jsx("address", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}_${s}_address`, values: { br: /* @__PURE__ */ r.jsx("br", {}) } }) }),
|
|
@@ -2473,12 +2443,12 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2473
2443
|
/* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2474
2444
|
] })
|
|
2475
2445
|
] }) });
|
|
2476
|
-
const ze = "emailHelperTextBox_",
|
|
2477
|
-
const o =
|
|
2446
|
+
const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
|
|
2447
|
+
const o = F(), [l, d] = P({ path: `${ze}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = P(!1), c = Ee(
|
|
2478
2448
|
(h) => {
|
|
2479
2449
|
h.preventDefault(), h.stopPropagation();
|
|
2480
|
-
const _ = (
|
|
2481
|
-
|
|
2450
|
+
const _ = (k) => {
|
|
2451
|
+
d({
|
|
2482
2452
|
path: `${ze}error_verificationFailedToSend`,
|
|
2483
2453
|
type: "error",
|
|
2484
2454
|
link: {
|
|
@@ -2495,7 +2465,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2495
2465
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2496
2466
|
"data-gtm-event-type": "email-concierge-click"
|
|
2497
2467
|
},
|
|
2498
|
-
error:
|
|
2468
|
+
error: k
|
|
2499
2469
|
});
|
|
2500
2470
|
};
|
|
2501
2471
|
if (typeof s != "function") {
|
|
@@ -2504,8 +2474,8 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2504
2474
|
}
|
|
2505
2475
|
i(!0), s(t).then(() => {
|
|
2506
2476
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2507
|
-
}).catch((
|
|
2508
|
-
_(
|
|
2477
|
+
}).catch((k) => {
|
|
2478
|
+
_(k.message);
|
|
2509
2479
|
}).finally(() => {
|
|
2510
2480
|
i(!1);
|
|
2511
2481
|
});
|
|
@@ -2515,13 +2485,13 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2515
2485
|
);
|
|
2516
2486
|
z(
|
|
2517
2487
|
() => {
|
|
2518
|
-
let h = ze, _ = "default",
|
|
2488
|
+
let h = ze, _ = "default", k = {}, g = {};
|
|
2519
2489
|
switch (e) {
|
|
2520
2490
|
case "gov":
|
|
2521
2491
|
h += "autoApproved", _ = "success";
|
|
2522
2492
|
break;
|
|
2523
2493
|
case "nonGov":
|
|
2524
|
-
h += "unrecognisedEmail", _ = "error",
|
|
2494
|
+
h += "unrecognisedEmail", _ = "error", k = {
|
|
2525
2495
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2526
2496
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2527
2497
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -2536,7 +2506,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2536
2506
|
};
|
|
2537
2507
|
break;
|
|
2538
2508
|
case "verify":
|
|
2539
|
-
h += "emailUnverified", _ = "error",
|
|
2509
|
+
h += "emailUnverified", _ = "error", k = {
|
|
2540
2510
|
href: "#",
|
|
2541
2511
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2542
2512
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2546,7 +2516,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2546
2516
|
};
|
|
2547
2517
|
break;
|
|
2548
2518
|
case "exists":
|
|
2549
|
-
h += "emailAlreadyExists", _ = "error",
|
|
2519
|
+
h += "emailAlreadyExists", _ = "error", k = {
|
|
2550
2520
|
href: "/user-onboarding/login",
|
|
2551
2521
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2552
2522
|
"data-gtm-event-type": "login-click"
|
|
@@ -2558,14 +2528,14 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2558
2528
|
};
|
|
2559
2529
|
break;
|
|
2560
2530
|
default:
|
|
2561
|
-
h += "default",
|
|
2531
|
+
h += "default", k = {
|
|
2562
2532
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2563
2533
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2564
2534
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2565
2535
|
};
|
|
2566
2536
|
break;
|
|
2567
2537
|
}
|
|
2568
|
-
|
|
2538
|
+
d({ ...l, path: h, type: _, link: k, mail: g });
|
|
2569
2539
|
},
|
|
2570
2540
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2571
2541
|
[e]
|
|
@@ -2600,45 +2570,45 @@ const Ve = "passwordRules_", Sn = "isMoreThanEightCharacters", $n = "includesNum
|
|
|
2600
2570
|
[$n]: "numberSymbol",
|
|
2601
2571
|
[Tn]: "lowercaseUppercase"
|
|
2602
2572
|
}, xs = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
|
|
2603
|
-
const n =
|
|
2573
|
+
const n = F();
|
|
2604
2574
|
return /* @__PURE__ */ r.jsxs("aside", { className: j("password-rules", t), children: [
|
|
2605
2575
|
/* @__PURE__ */ r.jsx("small", { children: n.formatMessage({ id: `${Ve}intro` }) }),
|
|
2606
2576
|
/* @__PURE__ */ r.jsx("ul", { children: [Sn, $n, Tn].map((s) => /* @__PURE__ */ r.jsxs("li", { className: j({ matches: e[s] }), children: [
|
|
2607
|
-
/* @__PURE__ */ r.jsxs(
|
|
2577
|
+
/* @__PURE__ */ r.jsxs(re, { children: [
|
|
2608
2578
|
n.formatMessage({ id: `${Ve}rule_label` }),
|
|
2609
2579
|
" "
|
|
2610
2580
|
] }),
|
|
2611
2581
|
/* @__PURE__ */ r.jsx("span", { children: n.formatMessage({ id: `${Ve}rule_${_s[s]}` }) }),
|
|
2612
|
-
!e[s] && /* @__PURE__ */ r.jsxs(
|
|
2582
|
+
!e[s] && /* @__PURE__ */ r.jsxs(re, { element: "strong", children: [
|
|
2613
2583
|
" ",
|
|
2614
2584
|
" ",
|
|
2615
2585
|
n.formatMessage({ id: `${Ve}notMet` })
|
|
2616
2586
|
] })
|
|
2617
2587
|
] }, `rule-${s}`)) })
|
|
2618
2588
|
] });
|
|
2619
|
-
},
|
|
2620
|
-
const
|
|
2589
|
+
}, wo = Ae(xs);
|
|
2590
|
+
const ko = ({
|
|
2621
2591
|
text: e = {},
|
|
2622
2592
|
topRating: t = 5,
|
|
2623
2593
|
functions: { createRating: n = () => null, updateRating: s = () => {
|
|
2624
2594
|
}, reportError: o = () => {
|
|
2625
2595
|
} },
|
|
2626
2596
|
className: l = "",
|
|
2627
|
-
hasLoaded:
|
|
2597
|
+
hasLoaded: d = !1
|
|
2628
2598
|
}) => {
|
|
2629
|
-
const a =
|
|
2599
|
+
const a = F(), [i, c] = P({ setUp: !1, id: null, rating: null, disabled: !0 }), u = async () => {
|
|
2630
2600
|
try {
|
|
2631
2601
|
const E = await n();
|
|
2632
|
-
c((
|
|
2602
|
+
c((b) => ({ ...b, setUp: !0, id: E && E.id, disabled: !1 }));
|
|
2633
2603
|
} catch (E) {
|
|
2634
|
-
c((
|
|
2604
|
+
c((b) => ({ ...b, setUp: !0, disabled: !0 })), o(E);
|
|
2635
2605
|
}
|
|
2636
2606
|
};
|
|
2637
2607
|
if (z(() => {
|
|
2638
|
-
|
|
2639
|
-
}, [
|
|
2608
|
+
d && !i.setUp && u();
|
|
2609
|
+
}, [d]), !d)
|
|
2640
2610
|
return /* @__PURE__ */ r.jsx(be, { className: "rating-placeholder" });
|
|
2641
|
-
const { id: f, rating: p, disabled: h } = i, _ = "ratings_",
|
|
2611
|
+
const { id: f, rating: p, disabled: h } = i, _ = "ratings_", k = {
|
|
2642
2612
|
text: a.formatMessage({ id: `${_}text` }),
|
|
2643
2613
|
low: a.formatMessage({ id: `${_}low` }),
|
|
2644
2614
|
high: a.formatMessage({ id: `${_}high` }),
|
|
@@ -2647,33 +2617,33 @@ const wo = ({
|
|
|
2647
2617
|
}, g = async (E) => {
|
|
2648
2618
|
if (!(!f || h))
|
|
2649
2619
|
try {
|
|
2650
|
-
c((
|
|
2651
|
-
} catch (
|
|
2652
|
-
c((
|
|
2620
|
+
c((b) => ({ ...b, rating: E, disabled: !0 })), await s({ id: f, value: E });
|
|
2621
|
+
} catch (b) {
|
|
2622
|
+
c((S) => ({ ...S, rating: null })), o(b);
|
|
2653
2623
|
} finally {
|
|
2654
|
-
c((
|
|
2624
|
+
c((b) => ({ ...b, disabled: !1 }));
|
|
2655
2625
|
}
|
|
2656
2626
|
};
|
|
2657
2627
|
return /* @__PURE__ */ r.jsxs("div", { className: j("rating", l), children: [
|
|
2658
|
-
/* @__PURE__ */ r.jsx("span", { className: "label", children:
|
|
2628
|
+
/* @__PURE__ */ r.jsx("span", { className: "label", children: k[p ? "success" : "text"] }),
|
|
2659
2629
|
/* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2660
|
-
const
|
|
2661
|
-
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p &&
|
|
2630
|
+
const b = E + 1;
|
|
2631
|
+
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p && b <= p }), children: /* @__PURE__ */ r.jsx(
|
|
2662
2632
|
W,
|
|
2663
2633
|
{
|
|
2664
2634
|
variant: "tertiary",
|
|
2665
2635
|
size: "small",
|
|
2666
|
-
icon: { icon: `star${!p ||
|
|
2636
|
+
icon: { icon: `star${!p || b > p ? "_empty" : ""}`, position: "left", hover: "star" },
|
|
2667
2637
|
screenreaderText: `${a.formatMessage(
|
|
2668
2638
|
{ id: `${_}stars` },
|
|
2669
|
-
{ number:
|
|
2670
|
-
)}${
|
|
2671
|
-
onClick: (
|
|
2672
|
-
|
|
2639
|
+
{ number: b, total: t }
|
|
2640
|
+
)}${b === 1 || b === t ? ` - ${k[b === 1 ? "low" : "high"]}` : ""}`,
|
|
2641
|
+
onClick: (S) => {
|
|
2642
|
+
S.preventDefault(), S.stopPropagation(), g(b);
|
|
2673
2643
|
},
|
|
2674
2644
|
disabled: h
|
|
2675
2645
|
}
|
|
2676
|
-
) }, `rating-${
|
|
2646
|
+
) }, `rating-${b}`);
|
|
2677
2647
|
}) })
|
|
2678
2648
|
] });
|
|
2679
2649
|
};
|
|
@@ -2685,10 +2655,10 @@ const vs = ({
|
|
|
2685
2655
|
gtmContext: o = "search-bar",
|
|
2686
2656
|
gtmEvent: l = "form-submission"
|
|
2687
2657
|
}) => {
|
|
2688
|
-
const { searchIsOpen:
|
|
2658
|
+
const { searchIsOpen: d = !0, isDesktopVersion: a = !1 } = n || {}, i = F(), c = ee(null);
|
|
2689
2659
|
Ce(() => {
|
|
2690
|
-
!n || a || !
|
|
2691
|
-
}, [
|
|
2660
|
+
!n || a || !d || c.current && c.current.focus();
|
|
2661
|
+
}, [d]);
|
|
2692
2662
|
const u = (f) => {
|
|
2693
2663
|
f.preventDefault(), f.stopPropagation(), !(!c.current || !c.current.value || c.current.value.length < 1) && (window.location.href = `/search?search=${encodeURIComponent(c.current.value)}`);
|
|
2694
2664
|
};
|
|
@@ -2699,8 +2669,8 @@ const vs = ({
|
|
|
2699
2669
|
className: j("search-form gtm-trackable", t),
|
|
2700
2670
|
"data-gtm-event-context": o,
|
|
2701
2671
|
"data-gtm-event-type": l,
|
|
2702
|
-
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !
|
|
2703
|
-
/* @__PURE__ */ r.jsx(
|
|
2672
|
+
children: /* @__PURE__ */ r.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ r.jsxs("p", { children: [
|
|
2673
|
+
/* @__PURE__ */ r.jsx(re, { element: "label", htmlFor: e, children: i.formatMessage({ id: "search_label" }) }),
|
|
2704
2674
|
/* @__PURE__ */ r.jsx(
|
|
2705
2675
|
"input",
|
|
2706
2676
|
{
|
|
@@ -2722,10 +2692,10 @@ const vs = ({
|
|
|
2722
2692
|
onClick: (f) => {
|
|
2723
2693
|
f.preventDefault(), f.stopPropagation(), c.current && c.current.value && (c.current.value = "");
|
|
2724
2694
|
},
|
|
2725
|
-
children: /* @__PURE__ */ r.jsx(
|
|
2695
|
+
children: /* @__PURE__ */ r.jsx(re, { children: i.formatMessage({ id: "search_clear" }) })
|
|
2726
2696
|
}
|
|
2727
2697
|
),
|
|
2728
|
-
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(
|
|
2698
|
+
/* @__PURE__ */ r.jsx("button", { className: "search", onClick: u, children: /* @__PURE__ */ r.jsx(re, { children: i.formatMessage({ id: "search_cta" }) }) })
|
|
2729
2699
|
] }) })
|
|
2730
2700
|
}
|
|
2731
2701
|
);
|
|
@@ -2737,32 +2707,32 @@ const bs = ({
|
|
|
2737
2707
|
titleColor: s,
|
|
2738
2708
|
labelColor: o,
|
|
2739
2709
|
backgroundColor: l,
|
|
2740
|
-
onClose:
|
|
2710
|
+
onClose: d,
|
|
2741
2711
|
reportError: a,
|
|
2742
2712
|
sendInvites: i,
|
|
2743
2713
|
initialFormStatus: c = "NOT_SUBMITTED"
|
|
2744
2714
|
/* NOT_SUBMITTED */
|
|
2745
2715
|
}) => {
|
|
2746
|
-
const [u, f] =
|
|
2716
|
+
const [u, f] = P([]), [p, h] = P(!0), [_, k] = P(c), { formatMessage: g } = F(), E = async (T) => {
|
|
2747
2717
|
T.preventDefault();
|
|
2748
2718
|
try {
|
|
2749
|
-
await i(u), f([]),
|
|
2719
|
+
await i(u), f([]), k(
|
|
2750
2720
|
"SUCCESS"
|
|
2751
2721
|
/* SUCCESS */
|
|
2752
2722
|
);
|
|
2753
2723
|
} catch (M) {
|
|
2754
|
-
|
|
2724
|
+
k(
|
|
2755
2725
|
"ERROR"
|
|
2756
2726
|
/* ERROR */
|
|
2757
2727
|
), a(M);
|
|
2758
2728
|
}
|
|
2759
|
-
},
|
|
2760
|
-
T.preventDefault(),
|
|
2729
|
+
}, b = (T) => {
|
|
2730
|
+
T.preventDefault(), k(
|
|
2761
2731
|
"NOT_SUBMITTED"
|
|
2762
2732
|
/* NOT_SUBMITTED */
|
|
2763
2733
|
), h(!0), f([]);
|
|
2764
|
-
},
|
|
2765
|
-
T.preventDefault(),
|
|
2734
|
+
}, S = (T) => {
|
|
2735
|
+
T.preventDefault(), d(), k(
|
|
2766
2736
|
"CLOSED"
|
|
2767
2737
|
/* CLOSED */
|
|
2768
2738
|
);
|
|
@@ -2772,11 +2742,11 @@ const bs = ({
|
|
|
2772
2742
|
" ",
|
|
2773
2743
|
g({ id: "inviteForm_error" })
|
|
2774
2744
|
] }) }),
|
|
2775
|
-
/* @__PURE__ */ r.jsx(
|
|
2745
|
+
/* @__PURE__ */ r.jsx(Ne, {}),
|
|
2776
2746
|
/* @__PURE__ */ r.jsx("div", { className: "footer", children: _ === "SUCCESS" ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2777
|
-
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick:
|
|
2778
|
-
/* @__PURE__ */ r.jsx(W, { onClick:
|
|
2779
|
-
] }) : /* @__PURE__ */ r.jsx(W, { onClick:
|
|
2747
|
+
/* @__PURE__ */ r.jsx(W, { variant: "secondary", onClick: b, children: g({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
2748
|
+
/* @__PURE__ */ r.jsx(W, { onClick: S, children: g({ id: "inviteForm_ctaDone" }) })
|
|
2749
|
+
] }) : /* @__PURE__ */ r.jsx(W, { onClick: b, children: g({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
2780
2750
|
] }) : /* @__PURE__ */ r.jsxs(
|
|
2781
2751
|
"form",
|
|
2782
2752
|
{
|
|
@@ -2817,7 +2787,7 @@ const bs = ({
|
|
|
2817
2787
|
}
|
|
2818
2788
|
)
|
|
2819
2789
|
] }),
|
|
2820
|
-
/* @__PURE__ */ r.jsx(
|
|
2790
|
+
/* @__PURE__ */ r.jsx(Ne, {}),
|
|
2821
2791
|
/* @__PURE__ */ r.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ r.jsx(W, { className: "sendEmailsButton", disabled: p, children: n }) })
|
|
2822
2792
|
]
|
|
2823
2793
|
}
|
|
@@ -2830,8 +2800,8 @@ const bs = ({
|
|
|
2830
2800
|
navigation: { loggedIn: 769, loggedOut: 881 },
|
|
2831
2801
|
search: { loggedIn: 961, loggedOut: 1121 }
|
|
2832
2802
|
}, s = (l) => {
|
|
2833
|
-
const
|
|
2834
|
-
return t >= n[l][
|
|
2803
|
+
const d = `logged${e ? "In" : "Out"}`;
|
|
2804
|
+
return t >= n[l][d];
|
|
2835
2805
|
};
|
|
2836
2806
|
let o = {};
|
|
2837
2807
|
return ["navigation", "search"].forEach((l) => {
|
|
@@ -2849,8 +2819,8 @@ const bs = ({
|
|
|
2849
2819
|
return;
|
|
2850
2820
|
I.handlerCalled[e] = o;
|
|
2851
2821
|
let l = [{ type: `menus.${e}`, value: t }];
|
|
2852
|
-
t === !0 && Object.keys(n).forEach((
|
|
2853
|
-
|
|
2822
|
+
t === !0 && Object.keys(n).forEach((d) => {
|
|
2823
|
+
d === e || n[d] === !1 || l.push({ type: `menus.${d}`, value: !1 });
|
|
2854
2824
|
}), s(l);
|
|
2855
2825
|
},
|
|
2856
2826
|
// Find the first child inside a ref that matches the `key` (and optional `value`) we're looking for,
|
|
@@ -2882,7 +2852,7 @@ const bs = ({
|
|
|
2882
2852
|
s[e][l].focus();
|
|
2883
2853
|
return;
|
|
2884
2854
|
}
|
|
2885
|
-
let
|
|
2855
|
+
let d, a;
|
|
2886
2856
|
switch (e) {
|
|
2887
2857
|
case "navigation":
|
|
2888
2858
|
if (n) {
|
|
@@ -2891,20 +2861,20 @@ const bs = ({
|
|
|
2891
2861
|
"attributes.aria-controls",
|
|
2892
2862
|
"navigation"
|
|
2893
2863
|
);
|
|
2894
|
-
|
|
2864
|
+
d = I.findFirstChild(i.children, "href");
|
|
2895
2865
|
} else
|
|
2896
|
-
|
|
2897
|
-
|
|
2866
|
+
d = I.findFirstChild(t.current.children, "href");
|
|
2867
|
+
d || (d = t.current);
|
|
2898
2868
|
break;
|
|
2899
2869
|
case "account":
|
|
2900
2870
|
if (a = I.findFirstChild(t.current.children, "className", "account"), !a || !a.children)
|
|
2901
2871
|
return;
|
|
2902
|
-
|
|
2872
|
+
d = I.findFirstChild(a.children, "href");
|
|
2903
2873
|
break;
|
|
2904
2874
|
default:
|
|
2905
2875
|
return;
|
|
2906
2876
|
}
|
|
2907
|
-
|
|
2877
|
+
d && (o([{ type: `focusElements.${e}.${l}`, value: d }]), d.focus());
|
|
2908
2878
|
},
|
|
2909
2879
|
events: {
|
|
2910
2880
|
onClick: (e, { id: t, callback: n, isOpen: s }) => {
|
|
@@ -3007,7 +2977,7 @@ const bs = ({
|
|
|
3007
2977
|
},
|
|
3008
2978
|
doTrack: l = null
|
|
3009
2979
|
}) => {
|
|
3010
|
-
const
|
|
2980
|
+
const d = F(), a = un(Xe, e);
|
|
3011
2981
|
if (!a || a.onlyShow && (a.onlyShow === "logged-in" && !t || a.onlyShow === "logged-out" && t))
|
|
3012
2982
|
return null;
|
|
3013
2983
|
const i = "doTrack" in a, c = l === null ? i ? a.doTrack : !0 : l, u = e.includes("buttons.");
|
|
@@ -3015,10 +2985,10 @@ const bs = ({
|
|
|
3015
2985
|
a.hasVariantText && (f += `_logged${t ? "In" : "Out"}`);
|
|
3016
2986
|
let p = !1;
|
|
3017
2987
|
if (a.href) {
|
|
3018
|
-
let
|
|
3019
|
-
if (
|
|
3020
|
-
const
|
|
3021
|
-
|
|
2988
|
+
let b = a.gtmType || `${e}-click`;
|
|
2989
|
+
if (b.includes(".")) {
|
|
2990
|
+
const S = b.split("."), T = S[S.length - 2];
|
|
2991
|
+
b = `${T === "topics" ? `${T}-` : ""}${S[S.length - 1]}`;
|
|
3022
2992
|
}
|
|
3023
2993
|
p = {
|
|
3024
2994
|
href: a.href,
|
|
@@ -3026,7 +2996,7 @@ const bs = ({
|
|
|
3026
2996
|
}, c && (p = {
|
|
3027
2997
|
...p,
|
|
3028
2998
|
className: "gtm-trackable",
|
|
3029
|
-
"data-gtm-event-type":
|
|
2999
|
+
"data-gtm-event-type": b,
|
|
3030
3000
|
"data-gtm-event-context": "HeaderButtons"
|
|
3031
3001
|
}), u && (p = {
|
|
3032
3002
|
...p,
|
|
@@ -3035,55 +3005,55 @@ const bs = ({
|
|
|
3035
3005
|
...a.props || {}
|
|
3036
3006
|
});
|
|
3037
3007
|
}
|
|
3038
|
-
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order,
|
|
3008
|
+
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order, k = p && window.location.pathname === a.href;
|
|
3039
3009
|
let g = {}, E = {};
|
|
3040
3010
|
if (h) {
|
|
3041
|
-
const
|
|
3042
|
-
onClick: (T) => I.events.onClick(T, { id:
|
|
3043
|
-
onFocus: () => I.events.onFocus({ id:
|
|
3044
|
-
onBlur: () => I.events.onBlur({ id:
|
|
3045
|
-
onMouseLeave: () => I.events.onBlur({ id:
|
|
3046
|
-
onMouseEnter: () => I.events.onMouseEnter({ id:
|
|
3011
|
+
const b = a.menuId || e, S = {
|
|
3012
|
+
onClick: (T) => I.events.onClick(T, { id: b, callback: o, isOpen: s[b] }),
|
|
3013
|
+
onFocus: () => I.events.onFocus({ id: b }),
|
|
3014
|
+
onBlur: () => I.events.onBlur({ id: b, callback: o }),
|
|
3015
|
+
onMouseLeave: () => I.events.onBlur({ id: b, callback: o }),
|
|
3016
|
+
onMouseEnter: () => I.events.onMouseEnter({ id: b, callback: o })
|
|
3047
3017
|
};
|
|
3048
3018
|
n && (_ && (g = {
|
|
3049
|
-
|
|
3019
|
+
...S,
|
|
3050
3020
|
onKeyPress: (T) => {
|
|
3051
|
-
T.key === "Enter" && I.events.onClick(T, { id:
|
|
3021
|
+
T.key === "Enter" && I.events.onClick(T, { id: b, callback: o, isOpen: s[b] });
|
|
3052
3022
|
},
|
|
3053
3023
|
tabIndex: "0",
|
|
3054
3024
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
3055
3025
|
"aria-haspopup": !0,
|
|
3056
|
-
"aria-expanded": s[
|
|
3057
|
-
"aria-controls":
|
|
3058
|
-
}), E = { hidden:
|
|
3026
|
+
"aria-expanded": s[b],
|
|
3027
|
+
"aria-controls": b
|
|
3028
|
+
}), E = { hidden: b in s ? !s[b] : !0 }), _ || (E = {
|
|
3059
3029
|
...E,
|
|
3060
|
-
|
|
3030
|
+
...S
|
|
3061
3031
|
});
|
|
3062
3032
|
}
|
|
3063
|
-
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active:
|
|
3064
|
-
p ? A.createElement(u ? W : "a", p,
|
|
3065
|
-
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((
|
|
3066
|
-
if (!a[
|
|
3033
|
+
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active: k }), role: "none", ...g, children: [
|
|
3034
|
+
p ? A.createElement(u ? W : "a", p, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
|
|
3035
|
+
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((b) => {
|
|
3036
|
+
if (!a[b])
|
|
3067
3037
|
return null;
|
|
3068
|
-
const
|
|
3038
|
+
const S = {
|
|
3069
3039
|
isLoggedIn: t,
|
|
3070
3040
|
isDesktopVersion: n,
|
|
3071
3041
|
menus: s,
|
|
3072
3042
|
callback: o,
|
|
3073
3043
|
doTrack: i ? c : null
|
|
3074
3044
|
};
|
|
3075
|
-
return a[
|
|
3076
|
-
|
|
3077
|
-
/* @__PURE__ */ r.jsx("ul", { children: a[
|
|
3078
|
-
] },
|
|
3045
|
+
return a[b].order ? /* @__PURE__ */ r.jsxs("li", { className: j({ [a[b].className]: a[b].className }), children: [
|
|
3046
|
+
d.formatMessage({ id: `${f}_${b}` }),
|
|
3047
|
+
/* @__PURE__ */ r.jsx("ul", { children: a[b].order.map((T) => /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${b}.${T}`, ...S }, T)) })
|
|
3048
|
+
] }, b) : /* @__PURE__ */ r.jsx(Ze, { id: `${e}.${b}`, ...S }, b);
|
|
3079
3049
|
}) })
|
|
3080
3050
|
] }, e);
|
|
3081
3051
|
};
|
|
3082
3052
|
const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
3083
|
-
const e =
|
|
3053
|
+
const e = F(), t = ye(je), n = tt(!0, !0), s = t && typeof t.id == "string", o = qe(
|
|
3084
3054
|
() => I.getIsDesktopVersion(s, n),
|
|
3085
3055
|
[s, n]
|
|
3086
|
-
), [l,
|
|
3056
|
+
), [l, d] = rr($r, {
|
|
3087
3057
|
headerIsVisible: !0,
|
|
3088
3058
|
menus: { navigation: !1, search: !1, account: !1 },
|
|
3089
3059
|
focusElements: {
|
|
@@ -3095,23 +3065,23 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3095
3065
|
scrollPosition: ws[`height${o.navigation ? "_desktop" : ""}`],
|
|
3096
3066
|
callbacks: {
|
|
3097
3067
|
scrollUp: () => {
|
|
3098
|
-
!o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i,
|
|
3068
|
+
!o && i.navigation || I.shouldChangeHeaderIsVisible(!0, i, d);
|
|
3099
3069
|
},
|
|
3100
3070
|
scrollDown: () => {
|
|
3101
|
-
!o && i.navigation || I.shouldChangeHeaderIsVisible(!1, i,
|
|
3071
|
+
!o && i.navigation || I.shouldChangeHeaderIsVisible(!1, i, d);
|
|
3102
3072
|
}
|
|
3103
3073
|
}
|
|
3104
3074
|
});
|
|
3105
3075
|
const u = (p, h) => {
|
|
3106
|
-
I.handleMenus({ id: p, value: h, menus: i, dispatch:
|
|
3107
|
-
}, f =
|
|
3076
|
+
I.handleMenus({ id: p, value: h, menus: i, dispatch: d });
|
|
3077
|
+
}, f = ee(null);
|
|
3108
3078
|
return Ce(() => {
|
|
3109
3079
|
i.navigation && I.autoFocus({
|
|
3110
3080
|
menu: "navigation",
|
|
3111
3081
|
navigationRef: f,
|
|
3112
3082
|
isDesktopVersion: o.navigation,
|
|
3113
3083
|
focusElements: c,
|
|
3114
|
-
dispatch:
|
|
3084
|
+
dispatch: d
|
|
3115
3085
|
});
|
|
3116
3086
|
}, [i.navigation]), Ce(() => {
|
|
3117
3087
|
i.account && I.autoFocus({
|
|
@@ -3119,11 +3089,11 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3119
3089
|
navigationRef: f,
|
|
3120
3090
|
isDesktopVersion: o.navigation,
|
|
3121
3091
|
focusElements: c,
|
|
3122
|
-
dispatch:
|
|
3092
|
+
dispatch: d
|
|
3123
3093
|
});
|
|
3124
3094
|
}, [i.account]), t && t.isLoading ? null : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3125
3095
|
/* @__PURE__ */ r.jsxs("nav", { id: "header", className: j({ "logged-in": s, "logged-out": !s, visible: a }), children: [
|
|
3126
|
-
/* @__PURE__ */ r.jsx(
|
|
3096
|
+
/* @__PURE__ */ r.jsx(re, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
|
|
3127
3097
|
/* @__PURE__ */ r.jsx(jn, {}),
|
|
3128
3098
|
!o.navigation && /* @__PURE__ */ r.jsx(
|
|
3129
3099
|
"button",
|
|
@@ -3137,7 +3107,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3137
3107
|
"aria-haspopup": "true",
|
|
3138
3108
|
"aria-expanded": i.navigation,
|
|
3139
3109
|
"aria-controls": "navigation",
|
|
3140
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3110
|
+
children: /* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_menu_${i.navigation ? "hide" : "show"}` }) })
|
|
3141
3111
|
}
|
|
3142
3112
|
),
|
|
3143
3113
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3171,7 +3141,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3171
3141
|
"aria-haspopup": "true",
|
|
3172
3142
|
"aria-expanded": i.search,
|
|
3173
3143
|
"aria-controls": "search-form",
|
|
3174
|
-
children: /* @__PURE__ */ r.jsx(
|
|
3144
|
+
children: /* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_search_${i.search ? "hide" : "show"}` }) })
|
|
3175
3145
|
}
|
|
3176
3146
|
),
|
|
3177
3147
|
/* @__PURE__ */ r.jsx(
|
|
@@ -3194,8 +3164,8 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3194
3164
|
"aria-expanded": i.account,
|
|
3195
3165
|
"aria-controls": "navigation",
|
|
3196
3166
|
children: [
|
|
3197
|
-
/* @__PURE__ */ r.jsx(
|
|
3198
|
-
/* @__PURE__ */ r.jsx(
|
|
3167
|
+
/* @__PURE__ */ r.jsx(re, { children: e.formatMessage({ id: `header_account_${i.account ? "hide" : "show"}` }) }),
|
|
3168
|
+
/* @__PURE__ */ r.jsx(Pt, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
|
|
3199
3169
|
]
|
|
3200
3170
|
}
|
|
3201
3171
|
) : /* @__PURE__ */ r.jsx("ul", { className: "sign-in-buttons", children: Xe.buttons.order.map((p) => /* @__PURE__ */ r.jsx(Ze, { id: `buttons.${p}` }, p)) })
|
|
@@ -3210,28 +3180,28 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3210
3180
|
] });
|
|
3211
3181
|
};
|
|
3212
3182
|
const ks = () => {
|
|
3213
|
-
const e =
|
|
3183
|
+
const e = F();
|
|
3214
3184
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
3215
3185
|
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3216
|
-
/* @__PURE__ */ r.jsx("div", {
|
|
3186
|
+
/* @__PURE__ */ r.jsx("div", { className: "content", children: /* @__PURE__ */ r.jsx(st, { variant: "error", text: e.formatMessage({ id: "pageLayout_error" }) }) }),
|
|
3217
3187
|
/* @__PURE__ */ r.jsx(En, {})
|
|
3218
3188
|
] });
|
|
3219
|
-
},
|
|
3220
|
-
const
|
|
3189
|
+
}, yo = ({ children: e, reportError: t, showFooter: n = !0, background: s = "default", className: o = "", locale: l = "en" }) => {
|
|
3190
|
+
const d = jr();
|
|
3221
3191
|
z(() => {
|
|
3222
3192
|
window.scrollTo(0, 0);
|
|
3223
|
-
}, [
|
|
3193
|
+
}, [d]);
|
|
3224
3194
|
const a = gn(e, { locale: l });
|
|
3225
3195
|
return /* @__PURE__ */ r.jsx(hr, { onError: t, fallback: /* @__PURE__ */ r.jsx(ks, {}), children: /* @__PURE__ */ r.jsx(sr, { fallback: /* @__PURE__ */ r.jsx(ns, { layout: "overview-page" }), children: /* @__PURE__ */ r.jsx("div", { id: "wrapper", className: j(o, { [s]: s !== "default" }), children: /* @__PURE__ */ r.jsxs(fr, { children: [
|
|
3226
3196
|
/* @__PURE__ */ r.jsx(Mn, {}),
|
|
3227
|
-
/* @__PURE__ */ r.jsx("div", {
|
|
3197
|
+
/* @__PURE__ */ r.jsx("div", { className: "content", children: a }),
|
|
3228
3198
|
n && /* @__PURE__ */ r.jsx(En, {}),
|
|
3229
3199
|
/* @__PURE__ */ r.jsx(gs, {})
|
|
3230
3200
|
] }) }) }) });
|
|
3231
3201
|
}, an = {
|
|
3232
3202
|
default: "tags_",
|
|
3233
3203
|
headerTopics: "header_topics_topics_"
|
|
3234
|
-
},
|
|
3204
|
+
}, bt = {
|
|
3235
3205
|
topic: {
|
|
3236
3206
|
Climate: "climate",
|
|
3237
3207
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3250,25 +3220,25 @@ const ks = () => {
|
|
|
3250
3220
|
}, ys = {
|
|
3251
3221
|
getTagDetails: (e) => {
|
|
3252
3222
|
if (e.includes("topic_")) {
|
|
3253
|
-
if (e =
|
|
3223
|
+
if (e = bt.topic[e.replace("topic_", "")], e) {
|
|
3254
3224
|
const t = Xe.topics.topics[e].href;
|
|
3255
3225
|
return t ? { id: e, href: t, text: `${an.headerTopics}${e}` } : null;
|
|
3256
3226
|
}
|
|
3257
3227
|
return null;
|
|
3258
3228
|
}
|
|
3259
|
-
return
|
|
3229
|
+
return bt[e] ? (e = bt[e], { id: e, text: `${an.default}${e}` }) : null;
|
|
3260
3230
|
}
|
|
3261
3231
|
};
|
|
3262
|
-
const
|
|
3232
|
+
const jo = ({
|
|
3263
3233
|
tags: e = [],
|
|
3264
3234
|
color: t = "default",
|
|
3265
3235
|
forceOneLine: n = !1,
|
|
3266
3236
|
canHaveLinks: s = !0,
|
|
3267
3237
|
className: o = "",
|
|
3268
3238
|
gtmType: l = "tag-click",
|
|
3269
|
-
gtmContext:
|
|
3239
|
+
gtmContext: d = "tags"
|
|
3270
3240
|
}) => {
|
|
3271
|
-
const a =
|
|
3241
|
+
const a = F();
|
|
3272
3242
|
if (!e || e.length < 1)
|
|
3273
3243
|
return null;
|
|
3274
3244
|
const i = [];
|
|
@@ -3285,28 +3255,28 @@ const yo = ({
|
|
|
3285
3255
|
href: c.href,
|
|
3286
3256
|
className: "gtm-trackable",
|
|
3287
3257
|
"data-gtm-event-type": l,
|
|
3288
|
-
"data-gtm-event-context":
|
|
3258
|
+
"data-gtm-event-context": d,
|
|
3289
3259
|
children: u
|
|
3290
3260
|
}
|
|
3291
3261
|
) : u }, c.id);
|
|
3292
3262
|
}) });
|
|
3293
3263
|
};
|
|
3294
|
-
const
|
|
3264
|
+
const Eo = ({
|
|
3295
3265
|
members: { total: e, data: t = [] },
|
|
3296
3266
|
pagination: n,
|
|
3297
3267
|
gtmContext: s = "member",
|
|
3298
3268
|
gtmType: o = "member-click",
|
|
3299
3269
|
className: l = ""
|
|
3300
3270
|
}) => {
|
|
3301
|
-
const
|
|
3271
|
+
const d = F();
|
|
3302
3272
|
return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ r.jsxs("div", { className: j("members-list", l), children: [
|
|
3303
3273
|
/* @__PURE__ */ r.jsxs("h1", { children: [
|
|
3304
|
-
|
|
3274
|
+
d.formatMessage({ id: "membersList" }),
|
|
3305
3275
|
/* @__PURE__ */ r.jsx("span", { className: "count", children: e })
|
|
3306
3276
|
] }),
|
|
3307
3277
|
/* @__PURE__ */ r.jsx("ul", { children: t.map((a, i) => /* @__PURE__ */ r.jsxs("li", { children: [
|
|
3308
|
-
/* @__PURE__ */ r.jsx(
|
|
3309
|
-
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children:
|
|
3278
|
+
/* @__PURE__ */ r.jsx(Ft, { member: a, gtmContext: s, gtmType: o }),
|
|
3279
|
+
a.isAdmin && /* @__PURE__ */ r.jsx(qr, { children: d.formatMessage({ id: "membersList_admin" }) })
|
|
3310
3280
|
] }, i)) }),
|
|
3311
3281
|
n && /* @__PURE__ */ r.jsx(
|
|
3312
3282
|
fs,
|
|
@@ -3331,7 +3301,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3331
3301
|
inputRef: s,
|
|
3332
3302
|
maxLength: o = 5e4,
|
|
3333
3303
|
minRows: l = 4,
|
|
3334
|
-
forceShow:
|
|
3304
|
+
forceShow: d = {
|
|
3335
3305
|
cancel: !1,
|
|
3336
3306
|
error: !1
|
|
3337
3307
|
},
|
|
@@ -3350,10 +3320,10 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3350
3320
|
},
|
|
3351
3321
|
gtmContext: i = "DiscussionForm"
|
|
3352
3322
|
}) => {
|
|
3353
|
-
var
|
|
3354
|
-
const c =
|
|
3323
|
+
var N, q;
|
|
3324
|
+
const c = F(), u = ye(je), [f, p] = P(
|
|
3355
3325
|
n.isEditing && n.isEditing.text || ""
|
|
3356
|
-
), [h, _] =
|
|
3326
|
+
), [h, _] = P(d.error || !1), [k, g] = P(!1), E = ee(null);
|
|
3357
3327
|
if (s || (s = E), n.isLoading)
|
|
3358
3328
|
return /* @__PURE__ */ r.jsx(
|
|
3359
3329
|
be,
|
|
@@ -3362,104 +3332,104 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3362
3332
|
"data-testid": "loading-placeholder"
|
|
3363
3333
|
}
|
|
3364
3334
|
);
|
|
3365
|
-
const
|
|
3366
|
-
const
|
|
3367
|
-
p(
|
|
3368
|
-
let
|
|
3369
|
-
!u || !u.id ?
|
|
3335
|
+
const b = (w) => {
|
|
3336
|
+
const G = w.target.value;
|
|
3337
|
+
p(G);
|
|
3338
|
+
let L;
|
|
3339
|
+
!u || !u.id ? L = he(
|
|
3370
3340
|
c.formatMessage,
|
|
3371
3341
|
`${ae}error_loggedOut`,
|
|
3372
3342
|
e.type,
|
|
3373
3343
|
"action"
|
|
3374
|
-
) : t ?
|
|
3344
|
+
) : t ? G.length >= o && (L = `${ae}error_tooLong`) : L = he(
|
|
3375
3345
|
c.formatMessage,
|
|
3376
3346
|
`${ae}error_noPermission`,
|
|
3377
3347
|
e.type,
|
|
3378
3348
|
"action"
|
|
3379
|
-
),
|
|
3349
|
+
), L ? _(L) : h && _(!1);
|
|
3380
3350
|
};
|
|
3381
|
-
let
|
|
3351
|
+
let S = `${e.type}-form`;
|
|
3382
3352
|
if (e.type === "response" || e.type === "reply") {
|
|
3383
|
-
const
|
|
3384
|
-
|
|
3353
|
+
const w = e.type === "response" ? ((N = e.slugs) == null ? void 0 : N.question) || "" : ((q = e.slugs) == null ? void 0 : q.answer) || "";
|
|
3354
|
+
w && (S = `${S}-${w.slice(-15)}`);
|
|
3385
3355
|
}
|
|
3386
|
-
const T = async (
|
|
3387
|
-
var
|
|
3388
|
-
if (
|
|
3356
|
+
const T = async (w) => {
|
|
3357
|
+
var L;
|
|
3358
|
+
if (w.preventDefault(), w.stopPropagation(), !u || !u.id || !t || Q)
|
|
3389
3359
|
return;
|
|
3390
3360
|
Ye && clearTimeout(Ye), g("submitting");
|
|
3391
|
-
const
|
|
3361
|
+
const G = window.location.pathname;
|
|
3392
3362
|
try {
|
|
3393
|
-
let
|
|
3363
|
+
let B;
|
|
3394
3364
|
switch (e.type) {
|
|
3395
3365
|
case "post":
|
|
3396
|
-
|
|
3366
|
+
B = await a.create({ content: f });
|
|
3397
3367
|
break;
|
|
3398
3368
|
case "question":
|
|
3399
|
-
|
|
3369
|
+
B = await a.create({
|
|
3400
3370
|
title: f,
|
|
3401
3371
|
authorId: u && u.id,
|
|
3402
|
-
...(
|
|
3372
|
+
...(L = a.props) == null ? void 0 : L.create
|
|
3403
3373
|
});
|
|
3404
3374
|
break;
|
|
3405
3375
|
case "response":
|
|
3406
|
-
|
|
3376
|
+
B = await a.create(
|
|
3407
3377
|
{ question: e.slugs.question },
|
|
3408
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3378
|
+
{ body: f, authorId: u && u.id, contentPath: G }
|
|
3409
3379
|
);
|
|
3410
3380
|
break;
|
|
3411
3381
|
case "reply":
|
|
3412
|
-
|
|
3382
|
+
B = await a.create(
|
|
3413
3383
|
{ question: e.slugs.question, answer: e.slugs.answer },
|
|
3414
|
-
{ body: f, authorId: u && u.id, contentPath:
|
|
3384
|
+
{ body: f, authorId: u && u.id, contentPath: G }
|
|
3415
3385
|
);
|
|
3416
3386
|
break;
|
|
3417
3387
|
default:
|
|
3418
3388
|
break;
|
|
3419
3389
|
}
|
|
3420
|
-
await Cr(1e3), a.callback && await a.callback(
|
|
3390
|
+
await Cr(1e3), a.callback && await a.callback(B), Ye = setTimeout(() => {
|
|
3421
3391
|
p(""), g("submitted"), M();
|
|
3422
3392
|
}, 500);
|
|
3423
|
-
} catch (
|
|
3424
|
-
const U =
|
|
3425
|
-
let
|
|
3426
|
-
U.message.includes("entry already exists") && (
|
|
3393
|
+
} catch (B) {
|
|
3394
|
+
const U = B;
|
|
3395
|
+
let Y = `${ae}error`;
|
|
3396
|
+
U.message.includes("entry already exists") && (Y = he(
|
|
3427
3397
|
c.formatMessage,
|
|
3428
3398
|
`${ae}error_alreadyExists`,
|
|
3429
3399
|
e.type,
|
|
3430
3400
|
"action"
|
|
3431
|
-
)), U.message.includes("429") ?
|
|
3401
|
+
)), U.message.includes("429") ? Y = he(
|
|
3432
3402
|
c.formatMessage,
|
|
3433
3403
|
`${ae}error_tooMany`,
|
|
3434
3404
|
e.type,
|
|
3435
3405
|
"action"
|
|
3436
|
-
) : U.message.includes("400") && (
|
|
3406
|
+
) : U.message.includes("400") && (Y = `${ae}error`), _(Y), M();
|
|
3437
3407
|
}
|
|
3438
3408
|
}, M = () => {
|
|
3439
3409
|
Ye = setTimeout(() => {
|
|
3440
3410
|
_(!1), g(!1);
|
|
3441
3411
|
}, 5e3);
|
|
3442
|
-
}, Q = !f || !Rr(f), V =
|
|
3443
|
-
return (n.isEditing && !V ||
|
|
3412
|
+
}, Q = !f || !Rr(f), V = k === "submitting", v = [];
|
|
3413
|
+
return (n.isEditing && !V || d.cancel) && v.push({
|
|
3444
3414
|
variant: "secondary",
|
|
3445
3415
|
size: { mobile: "small", 600: "medium" },
|
|
3446
3416
|
onClick: a.handleCancel,
|
|
3447
3417
|
className: "gtm-trackable",
|
|
3448
3418
|
"data-gtm-event-context": i,
|
|
3449
3419
|
"data-gtm-event-type": `cancel-${e.type}-click`,
|
|
3450
|
-
disabled: !
|
|
3420
|
+
disabled: !d.cancel && (!u || !u.id || !f),
|
|
3451
3421
|
children: c.formatMessage({ id: `${ae}cancel` })
|
|
3452
|
-
}),
|
|
3422
|
+
}), v.push({
|
|
3453
3423
|
variant: "primary",
|
|
3454
3424
|
size: { mobile: "small", 600: "medium" },
|
|
3455
|
-
onClick: (
|
|
3425
|
+
onClick: (w) => {
|
|
3456
3426
|
if (n.isEditing) {
|
|
3457
3427
|
g("submitting"), a.handleSaveEdit && a.handleSaveEdit(
|
|
3458
3428
|
E.current && "value" in E.current ? E.current.value : ""
|
|
3459
3429
|
);
|
|
3460
3430
|
return;
|
|
3461
3431
|
}
|
|
3462
|
-
T(
|
|
3432
|
+
T(w);
|
|
3463
3433
|
},
|
|
3464
3434
|
className: "gtm-trackable",
|
|
3465
3435
|
"data-gtm-event-context": i,
|
|
@@ -3472,7 +3442,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3472
3442
|
}), /* @__PURE__ */ r.jsxs(
|
|
3473
3443
|
"form",
|
|
3474
3444
|
{
|
|
3475
|
-
id:
|
|
3445
|
+
id: S,
|
|
3476
3446
|
className: j("discussion-card discussion-form", {
|
|
3477
3447
|
"no-styling": n.isInWrapper && n.isEditing
|
|
3478
3448
|
}),
|
|
@@ -3480,19 +3450,19 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3480
3450
|
children: [
|
|
3481
3451
|
(n == null ? void 0 : n.showTitle) && !n.isEditing && ["question"].includes(e.type) && /* @__PURE__ */ r.jsx("h2", { children: he(c.formatMessage, `${ae}title`, e.type, "action") }),
|
|
3482
3452
|
/* @__PURE__ */ r.jsx(
|
|
3483
|
-
|
|
3453
|
+
Ft,
|
|
3484
3454
|
{
|
|
3485
3455
|
member: u || "community",
|
|
3486
3456
|
gtmContext: i,
|
|
3487
3457
|
gtmType: "profile-click"
|
|
3488
3458
|
}
|
|
3489
3459
|
),
|
|
3490
|
-
/* @__PURE__ */ r.jsx(
|
|
3460
|
+
/* @__PURE__ */ r.jsx(re, { element: "label", showOnFocus: !1, htmlFor: `${S}-input`, children: he(c.formatMessage, `${ae}label`, e.type, "action") }),
|
|
3491
3461
|
/* @__PURE__ */ r.jsx(
|
|
3492
3462
|
gr,
|
|
3493
3463
|
{
|
|
3494
3464
|
ref: s,
|
|
3495
|
-
id: `${
|
|
3465
|
+
id: `${S}-input`,
|
|
3496
3466
|
name: e.type,
|
|
3497
3467
|
placeholder: he(
|
|
3498
3468
|
c.formatMessage,
|
|
@@ -3500,7 +3470,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3500
3470
|
e.type,
|
|
3501
3471
|
"action"
|
|
3502
3472
|
),
|
|
3503
|
-
onChange:
|
|
3473
|
+
onChange: b,
|
|
3504
3474
|
value: f,
|
|
3505
3475
|
maxLength: o,
|
|
3506
3476
|
"aria-invalid": !!h,
|
|
@@ -3510,7 +3480,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3510
3480
|
}
|
|
3511
3481
|
),
|
|
3512
3482
|
/* @__PURE__ */ r.jsx("small", { children: he(c.formatMessage, `${ae}explainer`, e.type, "action", {
|
|
3513
|
-
a: (
|
|
3483
|
+
a: (w) => /* @__PURE__ */ r.jsx(
|
|
3514
3484
|
"a",
|
|
3515
3485
|
{
|
|
3516
3486
|
href: "https://about.apolitical.co/q-and-a-community-guidelines",
|
|
@@ -3519,13 +3489,13 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3519
3489
|
"data-gtm-event-context": i,
|
|
3520
3490
|
"data-gtm-event-type": "community-guidelines-link",
|
|
3521
3491
|
rel: "noreferrer",
|
|
3522
|
-
children:
|
|
3492
|
+
children: w
|
|
3523
3493
|
}
|
|
3524
3494
|
)
|
|
3525
3495
|
}) }),
|
|
3526
|
-
/* @__PURE__ */ r.jsx(
|
|
3527
|
-
|
|
3528
|
-
h && /* @__PURE__ */ r.jsx(
|
|
3496
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: v }),
|
|
3497
|
+
k === "submitted" && /* @__PURE__ */ r.jsx(Mt, { className: "success", "data-testid": "success", children: he(c.formatMessage, `${ae}success`, e.type, "action") }),
|
|
3498
|
+
h && /* @__PURE__ */ r.jsx(Mt, { id: "error-message", className: "error", "data-testid": "error", children: d.error ? d.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
3529
3499
|
{ id: h },
|
|
3530
3500
|
{
|
|
3531
3501
|
action: c.formatMessage({
|
|
@@ -3537,14 +3507,14 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3537
3507
|
]
|
|
3538
3508
|
}
|
|
3539
3509
|
);
|
|
3540
|
-
},
|
|
3510
|
+
}, Nn = ({
|
|
3541
3511
|
contentType: e,
|
|
3542
3512
|
createPost: t,
|
|
3543
|
-
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText:
|
|
3513
|
+
membershipRequiredToPost: { isMember: n, required: s, join: o, leave: l, notMemberStateText: d }
|
|
3544
3514
|
}) => s && !n ? /* @__PURE__ */ r.jsx(
|
|
3545
|
-
|
|
3515
|
+
st,
|
|
3546
3516
|
{
|
|
3547
|
-
text:
|
|
3517
|
+
text: d,
|
|
3548
3518
|
button: {
|
|
3549
3519
|
component: /* @__PURE__ */ r.jsx(yn, { functions: { join: o, leave: l } })
|
|
3550
3520
|
}
|
|
@@ -3560,12 +3530,12 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3560
3530
|
), js = {
|
|
3561
3531
|
showThread: !1,
|
|
3562
3532
|
showForm: !1
|
|
3563
|
-
},
|
|
3564
|
-
const [t, n] =
|
|
3533
|
+
}, An = Nt(js), So = ({ children: e }) => {
|
|
3534
|
+
const [t, n] = P({
|
|
3565
3535
|
showThread: !1,
|
|
3566
3536
|
showForm: !1
|
|
3567
3537
|
});
|
|
3568
|
-
return /* @__PURE__ */ r.jsx(
|
|
3538
|
+
return /* @__PURE__ */ r.jsx(An.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
3569
3539
|
}, Es = ({
|
|
3570
3540
|
question: e,
|
|
3571
3541
|
answer: t,
|
|
@@ -3575,36 +3545,36 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3575
3545
|
...t && { answerSlug: t },
|
|
3576
3546
|
...n && { replySlug: n }
|
|
3577
3547
|
}), Ss = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3578
|
-
let
|
|
3579
|
-
const
|
|
3580
|
-
|
|
3581
|
-
},
|
|
3548
|
+
let Le = !1;
|
|
3549
|
+
const wt = () => {
|
|
3550
|
+
Le !== !1 && (clearTimeout(Le), Le = !1);
|
|
3551
|
+
}, kt = 10, $s = ({
|
|
3582
3552
|
element: e = "div",
|
|
3583
3553
|
likes: t = 0,
|
|
3584
3554
|
peopleWhoLiked: n = !1,
|
|
3585
3555
|
isShort: s = !0,
|
|
3586
3556
|
userLiked: o = !1,
|
|
3587
3557
|
content: l = { type: "reply", slugs: {} },
|
|
3588
|
-
canLike:
|
|
3558
|
+
canLike: d = !0,
|
|
3589
3559
|
functions: { createLike: a = () => {
|
|
3590
3560
|
}, deleteLike: i = () => {
|
|
3591
3561
|
} } = {}
|
|
3592
3562
|
}) => {
|
|
3593
|
-
const c =
|
|
3563
|
+
const c = F();
|
|
3594
3564
|
z(() => {
|
|
3595
3565
|
h(o);
|
|
3596
3566
|
}, [o]);
|
|
3597
|
-
const [u, f] =
|
|
3598
|
-
if (M.preventDefault(), M.stopPropagation(), E(!1),
|
|
3599
|
-
return
|
|
3600
|
-
if (
|
|
3567
|
+
const [u, f] = P(t), [p, h] = P(o), [_, k] = P(!1), [g, E] = P(!1), b = qe(() => Ss(n, kt), [n]), S = (M) => {
|
|
3568
|
+
if (M.preventDefault(), M.stopPropagation(), E(!1), Le)
|
|
3569
|
+
return wt(), !1;
|
|
3570
|
+
if (wt(), _ || !d)
|
|
3601
3571
|
return !1;
|
|
3602
|
-
|
|
3572
|
+
Le = setTimeout(T, 350);
|
|
3603
3573
|
}, T = async () => {
|
|
3604
|
-
if (
|
|
3574
|
+
if (wt(), _ || !d)
|
|
3605
3575
|
return !1;
|
|
3606
3576
|
let M = p ? u - 1 : u + 1;
|
|
3607
|
-
M < 0 && (M = 0),
|
|
3577
|
+
M < 0 && (M = 0), k(!0), f(M), h(!p);
|
|
3608
3578
|
try {
|
|
3609
3579
|
if (l && l.slugs) {
|
|
3610
3580
|
const Q = Es(l.slugs);
|
|
@@ -3613,14 +3583,14 @@ const bt = () => {
|
|
|
3613
3583
|
} catch {
|
|
3614
3584
|
f(t), h(o);
|
|
3615
3585
|
} finally {
|
|
3616
|
-
|
|
3586
|
+
k(!1);
|
|
3617
3587
|
}
|
|
3618
3588
|
};
|
|
3619
3589
|
return A.createElement(
|
|
3620
3590
|
e,
|
|
3621
3591
|
{
|
|
3622
|
-
className: j("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": p, disabled: !
|
|
3623
|
-
onClick:
|
|
3592
|
+
className: j("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": p, disabled: !d }),
|
|
3593
|
+
onClick: S,
|
|
3624
3594
|
onMouseEnter: () => {
|
|
3625
3595
|
E(!0);
|
|
3626
3596
|
},
|
|
@@ -3641,12 +3611,12 @@ const bt = () => {
|
|
|
3641
3611
|
size: "medium",
|
|
3642
3612
|
icon: { icon: p ? "heart" : "heart_empty", animate: "bounce" },
|
|
3643
3613
|
className: j({ "do-animation": p && !o }),
|
|
3644
|
-
screenreaderText:
|
|
3614
|
+
screenreaderText: d ? c.formatMessage({
|
|
3645
3615
|
id: `discussion_likes_${p ? "unlike" : "like"}`
|
|
3646
3616
|
}, { action: c.formatMessage({ id: `discussion_action_${l.type}` }) }) : !1,
|
|
3647
|
-
onClick:
|
|
3648
|
-
disabled: !
|
|
3649
|
-
"aria-hidden": !
|
|
3617
|
+
onClick: S,
|
|
3618
|
+
disabled: !d,
|
|
3619
|
+
"aria-hidden": !d,
|
|
3650
3620
|
"data-testid": "like-button",
|
|
3651
3621
|
"data-gtm-event-context": "Likes",
|
|
3652
3622
|
"data-gtm-event-type": `like-${l.type}-click`
|
|
@@ -3654,8 +3624,8 @@ const bt = () => {
|
|
|
3654
3624
|
),
|
|
3655
3625
|
/* @__PURE__ */ r.jsx("span", { className: j("number-of-likes", { "no-likes": u === 0 }), "data-testid": "number-of-likes", children: c.formatMessage({ id: `discussion_likes${s ? "_short" : ""}` }, { number: u }) }),
|
|
3656
3626
|
n && /* @__PURE__ */ r.jsx(Ir, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ r.jsxs("ul", { children: [
|
|
3657
|
-
|
|
3658
|
-
n.length >
|
|
3627
|
+
b.map((M) => typeof M == "string" || !M.name ? null : /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(rt, { href: M.id ? `/profiles/${M.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: M.name }) }, M.id || window.btoa(M.name))),
|
|
3628
|
+
n.length > kt && /* @__PURE__ */ r.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - kt }) })
|
|
3659
3629
|
] }) })
|
|
3660
3630
|
] })
|
|
3661
3631
|
}
|
|
@@ -3677,18 +3647,18 @@ const Dn = ({
|
|
|
3677
3647
|
functions: { onOpen: o = () => {
|
|
3678
3648
|
}, onClose: l = () => {
|
|
3679
3649
|
} } = {},
|
|
3680
|
-
forceShow: { error:
|
|
3650
|
+
forceShow: { error: d = !1 } = {},
|
|
3681
3651
|
title: a,
|
|
3682
3652
|
children: i,
|
|
3683
3653
|
buttons: c,
|
|
3684
3654
|
className: u = "",
|
|
3685
3655
|
gtmContext: f = "Modal"
|
|
3686
3656
|
}) => {
|
|
3687
|
-
const p =
|
|
3657
|
+
const p = F(), [h, _] = P(t), k = (E) => {
|
|
3688
3658
|
_(E), E ? (o(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3689
3659
|
};
|
|
3690
3660
|
z(() => {
|
|
3691
|
-
|
|
3661
|
+
k(t);
|
|
3692
3662
|
}, [t]);
|
|
3693
3663
|
const g = s ? { "--max-width": `${s / 16}rem` } : {};
|
|
3694
3664
|
return /* @__PURE__ */ r.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ r.jsx(
|
|
@@ -3707,7 +3677,7 @@ const Dn = ({
|
|
|
3707
3677
|
variant: "tertiary",
|
|
3708
3678
|
size: "medium",
|
|
3709
3679
|
icon: { icon: "close" },
|
|
3710
|
-
onClick: () =>
|
|
3680
|
+
onClick: () => k(!1),
|
|
3711
3681
|
className: "gtm-trackable",
|
|
3712
3682
|
"data-gtm-event-type": "close-modal-click",
|
|
3713
3683
|
"data-gtm-event-context": f,
|
|
@@ -3715,13 +3685,13 @@ const Dn = ({
|
|
|
3715
3685
|
}
|
|
3716
3686
|
)
|
|
3717
3687
|
] }),
|
|
3718
|
-
n && /* @__PURE__ */ r.jsx(
|
|
3688
|
+
n && /* @__PURE__ */ r.jsx(Ne, {}),
|
|
3719
3689
|
i,
|
|
3720
3690
|
c && /* @__PURE__ */ r.jsxs("div", { className: "bottom", children: [
|
|
3721
|
-
/* @__PURE__ */ r.jsx(
|
|
3722
|
-
/* @__PURE__ */ r.jsx(
|
|
3691
|
+
/* @__PURE__ */ r.jsx(Ne, {}),
|
|
3692
|
+
/* @__PURE__ */ r.jsx(nt, { buttons: c })
|
|
3723
3693
|
] }),
|
|
3724
|
-
|
|
3694
|
+
d && /* @__PURE__ */ r.jsx(Mt, { className: "error", children: d })
|
|
3725
3695
|
] })
|
|
3726
3696
|
}
|
|
3727
3697
|
) });
|
|
@@ -3730,14 +3700,14 @@ const Dn = ({
|
|
|
3730
3700
|
"aria-expanded": t,
|
|
3731
3701
|
"aria-controls": e
|
|
3732
3702
|
});
|
|
3733
|
-
const
|
|
3703
|
+
const $o = ({
|
|
3734
3704
|
className: e,
|
|
3735
3705
|
showModal: t = !0,
|
|
3736
3706
|
title: n,
|
|
3737
3707
|
formTitle: s = "Know someone who might like to join this workshop?",
|
|
3738
3708
|
formLabel: o = "Send an invitation to your colleagues below",
|
|
3739
3709
|
ctaMessage: l = "Send invites",
|
|
3740
|
-
showIcon:
|
|
3710
|
+
showIcon: d,
|
|
3741
3711
|
onClose: a,
|
|
3742
3712
|
reportError: i = () => {
|
|
3743
3713
|
},
|
|
@@ -3748,8 +3718,7 @@ const So = ({
|
|
|
3748
3718
|
title: n,
|
|
3749
3719
|
isOpen: t,
|
|
3750
3720
|
showDivider: !1,
|
|
3751
|
-
showIcon:
|
|
3752
|
-
functions: { onClose: a },
|
|
3721
|
+
showIcon: d,
|
|
3753
3722
|
className: j("invite-modal", e, { success: !!n }),
|
|
3754
3723
|
children: /* @__PURE__ */ r.jsx(
|
|
3755
3724
|
bs,
|
|
@@ -3766,18 +3735,22 @@ const So = ({
|
|
|
3766
3735
|
), ln = (e) => {
|
|
3767
3736
|
const t = {};
|
|
3768
3737
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
3769
|
-
},
|
|
3770
|
-
const xe = "discussion_",
|
|
3738
|
+
}, Rt = (e, t) => e && !t;
|
|
3739
|
+
const xe = "discussion_", Cs = 280, Ot = ({
|
|
3771
3740
|
element: e = "div",
|
|
3772
3741
|
content: t,
|
|
3773
3742
|
userHasPermissions: n = !0,
|
|
3774
3743
|
isLoading: s = !1,
|
|
3775
3744
|
originalAuthorId: o,
|
|
3776
3745
|
functions: {
|
|
3777
|
-
content: { createContent: l, deleteContent:
|
|
3778
|
-
|
|
3779
|
-
|
|
3780
|
-
|
|
3746
|
+
content: { createContent: l, deleteContent: d, updateContent: a } = {
|
|
3747
|
+
createContent: () => {
|
|
3748
|
+
},
|
|
3749
|
+
deleteContent: () => {
|
|
3750
|
+
},
|
|
3751
|
+
updateContent: () => {
|
|
3752
|
+
}
|
|
3753
|
+
},
|
|
3781
3754
|
likes: { createLike: i, deleteLike: c } = { createLike: () => {
|
|
3782
3755
|
}, deleteLike: () => {
|
|
3783
3756
|
} },
|
|
@@ -3787,76 +3760,81 @@ const xe = "discussion_", Rt = ({
|
|
|
3787
3760
|
links: f = {},
|
|
3788
3761
|
className: p,
|
|
3789
3762
|
gtmContext: h = "DiscussionAnswer",
|
|
3790
|
-
children: _
|
|
3763
|
+
children: _,
|
|
3764
|
+
isTruncated: k = !1
|
|
3791
3765
|
}) => {
|
|
3792
|
-
const
|
|
3766
|
+
const g = F(), E = ye(je), b = ye(An), [S, T] = P({
|
|
3793
3767
|
body: t && t.body || "",
|
|
3794
3768
|
isEditing: !1,
|
|
3795
3769
|
didEdit: t && t.isEdited || !1
|
|
3796
|
-
}), [
|
|
3770
|
+
}), [M, Q] = P(!1), [V, v] = P("");
|
|
3797
3771
|
if (z(() => {
|
|
3798
|
-
|
|
3799
|
-
...
|
|
3772
|
+
T({
|
|
3773
|
+
...S,
|
|
3800
3774
|
body: t && t.body || "",
|
|
3801
3775
|
didEdit: t && t.isEdited || !1
|
|
3802
3776
|
});
|
|
3803
3777
|
}, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3804
3778
|
return /* @__PURE__ */ r.jsx(be, { className: "discussion-card discussion-post" });
|
|
3805
|
-
const { author:
|
|
3806
|
-
R || (R = ""),
|
|
3779
|
+
const { author: N, canLike: q, createdAt: w, id: G, likes: L = 0, userLiked: B, comments: U = 0 } = t, Y = k ? Ke(S.body, Cs) : S.body, K = E && E.id && typeof N != "string" && N.id && N.id === E.id || !1, ie = typeof q == "boolean" ? q : n ? !K : !1, le = async (R) => {
|
|
3780
|
+
R || (R = ""), v("");
|
|
3807
3781
|
try {
|
|
3808
|
-
if (!_r(R,
|
|
3809
|
-
const
|
|
3810
|
-
await a(ln(t.slugs),
|
|
3782
|
+
if (!_r(R, S.body)) {
|
|
3783
|
+
const te = t.type === "question" ? { title: R } : { body: R };
|
|
3784
|
+
await a(ln(t.slugs), te);
|
|
3811
3785
|
}
|
|
3812
|
-
|
|
3786
|
+
T({ body: R, isEditing: !1, didEdit: !0 });
|
|
3813
3787
|
} catch {
|
|
3814
|
-
|
|
3788
|
+
v(`${xe}form_error`);
|
|
3815
3789
|
}
|
|
3816
|
-
},
|
|
3817
|
-
|
|
3818
|
-
const
|
|
3819
|
-
|
|
3790
|
+
}, ce = () => {
|
|
3791
|
+
b && b.updateConversation && b.updateConversation({ showThread: !0, showForm: !0 }), setTimeout(() => {
|
|
3792
|
+
const te = `reply-form-${(t.type === "answer" ? t.slug : t.slugs.answer || "").toLowerCase().slice(-15)}`, X = document.getElementById(te), ne = document.getElementById(`${te}-input`);
|
|
3793
|
+
ne && ne.focus(), X && X.scrollIntoView({ behavior: "smooth" });
|
|
3820
3794
|
}, 0);
|
|
3821
|
-
},
|
|
3795
|
+
}, ue = () => {
|
|
3822
3796
|
try {
|
|
3823
|
-
|
|
3797
|
+
d(ln(t.slugs));
|
|
3824
3798
|
} catch {
|
|
3825
|
-
|
|
3799
|
+
v("delete-error");
|
|
3826
3800
|
}
|
|
3827
|
-
},
|
|
3828
|
-
text: v.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3829
|
-
href: `mailto:community@apolitical.co?subject=${encodeURI(v.formatMessage({ id: `${xe}report_subject` }))}&body=${encodeURI(
|
|
3830
|
-
v.formatMessage(
|
|
3831
|
-
{ id: `${xe}report_body` },
|
|
3832
|
-
{
|
|
3833
|
-
contentType: t.type || "",
|
|
3834
|
-
contentSlug: t.slug || "",
|
|
3835
|
-
contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
|
|
3836
|
-
}
|
|
3837
|
-
)
|
|
3838
|
-
)}`,
|
|
3839
|
-
icon: "flag"
|
|
3840
|
-
}];
|
|
3841
|
-
return n && U && se.push(
|
|
3801
|
+
}, oe = [
|
|
3842
3802
|
{
|
|
3843
|
-
text:
|
|
3844
|
-
|
|
3803
|
+
text: g.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3804
|
+
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3805
|
+
g.formatMessage({ id: `${xe}report_subject` })
|
|
3806
|
+
)}&body=${encodeURI(
|
|
3807
|
+
g.formatMessage(
|
|
3808
|
+
{ id: `${xe}report_body` },
|
|
3809
|
+
{
|
|
3810
|
+
contentType: t.type || "",
|
|
3811
|
+
contentSlug: t.slug || "",
|
|
3812
|
+
contentUrl: `${window.origin}${typeof process < "u" && process.env.PUBLIC_URL || ""}/${t.slugs.question || ""}`
|
|
3813
|
+
}
|
|
3814
|
+
)
|
|
3815
|
+
)}`,
|
|
3816
|
+
icon: "flag"
|
|
3817
|
+
}
|
|
3818
|
+
];
|
|
3819
|
+
return n && K && oe.push(
|
|
3820
|
+
{
|
|
3821
|
+
text: g.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
3822
|
+
onClick: () => T({ ...S, isEditing: !0 }),
|
|
3845
3823
|
icon: "pencil-paper",
|
|
3846
3824
|
className: "gtm-trackable",
|
|
3847
3825
|
"data-gtm-event-context": h,
|
|
3848
3826
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3849
3827
|
},
|
|
3850
3828
|
{
|
|
3851
|
-
text:
|
|
3829
|
+
text: g.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
3852
3830
|
onClick: (R) => {
|
|
3853
|
-
R.preventDefault(), R.stopPropagation(),
|
|
3831
|
+
R.preventDefault(), R.stopPropagation(), Q(!0);
|
|
3854
3832
|
},
|
|
3855
3833
|
icon: "trash",
|
|
3856
3834
|
className: "gtm-trackable",
|
|
3857
3835
|
"data-gtm-event-context": h,
|
|
3858
3836
|
"data-gtm-event-type": `delete-${t.type}-click`,
|
|
3859
|
-
...Ms(`delete-${t.slug}-modal`,
|
|
3837
|
+
...Ms(`delete-${t.slug}-modal`, M)
|
|
3860
3838
|
}
|
|
3861
3839
|
), A.createElement(e, {
|
|
3862
3840
|
className: j("discussion-post", p),
|
|
@@ -3865,92 +3843,151 @@ const xe = "discussion_", Rt = ({
|
|
|
3865
3843
|
/* @__PURE__ */ r.jsxs(
|
|
3866
3844
|
"div",
|
|
3867
3845
|
{
|
|
3868
|
-
id:
|
|
3869
|
-
className: j("discussion-card", t.type, {
|
|
3846
|
+
id: G || t.slug,
|
|
3847
|
+
className: j("discussion-card", t.type, {
|
|
3848
|
+
editing: S.isEditing,
|
|
3849
|
+
"has-link": f.post && !S.isEditing
|
|
3850
|
+
}),
|
|
3870
3851
|
onClick: (R) => {
|
|
3871
|
-
!f.post ||
|
|
3852
|
+
!f.post || S.isEditing || (R.preventDefault(), R.stopPropagation(), window.location.href = f.post);
|
|
3872
3853
|
},
|
|
3873
3854
|
children: [
|
|
3874
|
-
!
|
|
3875
|
-
|
|
3855
|
+
!S.isEditing && /* @__PURE__ */ r.jsx(
|
|
3856
|
+
Ft,
|
|
3876
3857
|
{
|
|
3877
|
-
member:
|
|
3878
|
-
additionalContent: { createdAt:
|
|
3879
|
-
className: typeof
|
|
3858
|
+
member: N,
|
|
3859
|
+
additionalContent: { createdAt: w, didEdit: S.didEdit },
|
|
3860
|
+
className: typeof N != "string" && N.id === o ? "highlighted" : "",
|
|
3880
3861
|
gtmContext: h,
|
|
3881
3862
|
gtmType: "profile-click"
|
|
3882
3863
|
}
|
|
3883
3864
|
),
|
|
3884
|
-
|
|
3865
|
+
S.isEditing ? /* @__PURE__ */ r.jsx(
|
|
3885
3866
|
Cn,
|
|
3886
3867
|
{
|
|
3887
3868
|
content: { type: t.type, slugs: t.slugs },
|
|
3888
3869
|
userHasPermissions: n,
|
|
3889
|
-
meta: {
|
|
3870
|
+
meta: {
|
|
3871
|
+
isLoading: s,
|
|
3872
|
+
isInWrapper: !0,
|
|
3873
|
+
isEditing: { text: S.body }
|
|
3874
|
+
},
|
|
3890
3875
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3891
|
-
forceShow: {
|
|
3892
|
-
|
|
3893
|
-
id:
|
|
3894
|
-
|
|
3895
|
-
|
|
3876
|
+
forceShow: {
|
|
3877
|
+
error: V !== "" && V !== "delete-error" ? g.formatMessage(
|
|
3878
|
+
{ id: V },
|
|
3879
|
+
{
|
|
3880
|
+
action: g.formatMessage({
|
|
3881
|
+
id: `discussion_action_${t.type}`
|
|
3882
|
+
})
|
|
3883
|
+
}
|
|
3884
|
+
) : !1
|
|
3885
|
+
},
|
|
3896
3886
|
functions: {
|
|
3897
3887
|
create: l,
|
|
3898
|
-
handleSaveEdit:
|
|
3888
|
+
handleSaveEdit: le,
|
|
3899
3889
|
handleCancel: () => {
|
|
3900
|
-
|
|
3890
|
+
v(""), T({ ...S, isEditing: !1 });
|
|
3901
3891
|
}
|
|
3902
3892
|
},
|
|
3903
3893
|
gtmContext: `${h}Form`
|
|
3904
3894
|
}
|
|
3905
|
-
) : f.post ? /* @__PURE__ */ r.jsx(
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3924
|
-
}
|
|
3925
|
-
|
|
3926
|
-
|
|
3927
|
-
|
|
3928
|
-
|
|
3929
|
-
|
|
3930
|
-
|
|
3931
|
-
|
|
3932
|
-
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
3947
|
-
|
|
3948
|
-
|
|
3949
|
-
|
|
3950
|
-
|
|
3951
|
-
|
|
3952
|
-
|
|
3953
|
-
|
|
3895
|
+
) : f.post ? /* @__PURE__ */ r.jsx(
|
|
3896
|
+
"a",
|
|
3897
|
+
{
|
|
3898
|
+
href: f.post,
|
|
3899
|
+
className: "gtm-trackable",
|
|
3900
|
+
"data-gtm-event-context": h,
|
|
3901
|
+
"data-gtm-event-type": "title-click",
|
|
3902
|
+
children: /* @__PURE__ */ r.jsx(nn, { options: { overrides: { a: Zr } }, children: Y })
|
|
3903
|
+
}
|
|
3904
|
+
) : /* @__PURE__ */ r.jsx(
|
|
3905
|
+
nn,
|
|
3906
|
+
{
|
|
3907
|
+
options: {
|
|
3908
|
+
wrapper: t.type === "question" ? "h1" : A.Fragment,
|
|
3909
|
+
forceWrapper: t.type === "question",
|
|
3910
|
+
forceInline: t.type === "question",
|
|
3911
|
+
forceBlock: t.type !== "question"
|
|
3912
|
+
},
|
|
3913
|
+
children: Y
|
|
3914
|
+
}
|
|
3915
|
+
),
|
|
3916
|
+
!S.isEditing && /* @__PURE__ */ r.jsxs(
|
|
3917
|
+
"ul",
|
|
3918
|
+
{
|
|
3919
|
+
className: j("actions text-medium", t.type),
|
|
3920
|
+
"data-testid": `${t.type}-actions`,
|
|
3921
|
+
children: [
|
|
3922
|
+
/* @__PURE__ */ r.jsx(
|
|
3923
|
+
$s,
|
|
3924
|
+
{
|
|
3925
|
+
element: "li",
|
|
3926
|
+
likes: L,
|
|
3927
|
+
isShort: !1,
|
|
3928
|
+
userLiked: B,
|
|
3929
|
+
content: { type: t.type, slugs: t.slugs },
|
|
3930
|
+
canLike: ie,
|
|
3931
|
+
functions: {
|
|
3932
|
+
createLike: i,
|
|
3933
|
+
deleteLike: c
|
|
3934
|
+
}
|
|
3935
|
+
}
|
|
3936
|
+
),
|
|
3937
|
+
(["question", "post"].includes(t.type) || f.comments || typeof u == "function") && /* @__PURE__ */ r.jsxs(
|
|
3938
|
+
"li",
|
|
3939
|
+
{
|
|
3940
|
+
className: "action-button",
|
|
3941
|
+
onClick: (R) => {
|
|
3942
|
+
R.preventDefault(), R.stopPropagation(), f.comments && (window.location.href = f.comments), typeof u == "function" && u();
|
|
3943
|
+
},
|
|
3944
|
+
children: [
|
|
3945
|
+
/* @__PURE__ */ r.jsx(
|
|
3946
|
+
W,
|
|
3947
|
+
{
|
|
3948
|
+
variant: "tertiary",
|
|
3949
|
+
size: "medium",
|
|
3950
|
+
styling: { muted: !0 },
|
|
3951
|
+
icon: { icon: "speech-bubble_square_thick" },
|
|
3952
|
+
href: f.comments ? f.comments : !1,
|
|
3953
|
+
onClick: f.comments || typeof u != "function" ? !1 : u,
|
|
3954
|
+
className: "gtm-trackable",
|
|
3955
|
+
"data-gtm-event-context": h,
|
|
3956
|
+
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3957
|
+
screenreaderText: g.formatMessage(
|
|
3958
|
+
{ id: `${xe}comments_screenReader` },
|
|
3959
|
+
{ count: U }
|
|
3960
|
+
)
|
|
3961
|
+
}
|
|
3962
|
+
),
|
|
3963
|
+
/* @__PURE__ */ r.jsx("span", { children: g.formatMessage(
|
|
3964
|
+
{ id: `${xe}comments` },
|
|
3965
|
+
{ count: U }
|
|
3966
|
+
) })
|
|
3967
|
+
]
|
|
3968
|
+
}
|
|
3969
|
+
),
|
|
3970
|
+
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3971
|
+
W,
|
|
3972
|
+
{
|
|
3973
|
+
variant: "tertiary",
|
|
3974
|
+
size: "medium",
|
|
3975
|
+
styling: { muted: !0 },
|
|
3976
|
+
onClick: ce,
|
|
3977
|
+
children: g.formatMessage({ id: `${xe}reply` })
|
|
3978
|
+
}
|
|
3979
|
+
) }),
|
|
3980
|
+
/* @__PURE__ */ r.jsx(
|
|
3981
|
+
ps,
|
|
3982
|
+
{
|
|
3983
|
+
element: "li",
|
|
3984
|
+
id: `more-${t.slug}`,
|
|
3985
|
+
options: oe
|
|
3986
|
+
}
|
|
3987
|
+
)
|
|
3988
|
+
]
|
|
3989
|
+
}
|
|
3990
|
+
)
|
|
3954
3991
|
]
|
|
3955
3992
|
}
|
|
3956
3993
|
),
|
|
@@ -3959,21 +3996,35 @@ const xe = "discussion_", Rt = ({
|
|
|
3959
3996
|
Dn,
|
|
3960
3997
|
{
|
|
3961
3998
|
id: `delete-${t.slug}-modal`,
|
|
3962
|
-
isOpen:
|
|
3999
|
+
isOpen: M,
|
|
3963
4000
|
functions: { onOpen: () => {
|
|
3964
|
-
}, onClose: () =>
|
|
3965
|
-
forceShow: {
|
|
3966
|
-
|
|
3967
|
-
id:
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
4001
|
+
}, onClose: () => Q(!1) },
|
|
4002
|
+
forceShow: {
|
|
4003
|
+
error: V === "delete-error" ? g.formatMessage(
|
|
4004
|
+
{ id: "discussion_delete_error" },
|
|
4005
|
+
{
|
|
4006
|
+
action: g.formatMessage({
|
|
4007
|
+
id: `discussion_action_${t.type}`
|
|
4008
|
+
})
|
|
4009
|
+
}
|
|
4010
|
+
) : !1
|
|
4011
|
+
},
|
|
4012
|
+
title: g.formatMessage(
|
|
3971
4013
|
{ id: "discussion_delete_title" },
|
|
3972
|
-
{ action:
|
|
4014
|
+
{ action: g.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
3973
4015
|
),
|
|
3974
4016
|
buttons: [
|
|
3975
|
-
{
|
|
3976
|
-
|
|
4017
|
+
{
|
|
4018
|
+
variant: "secondary",
|
|
4019
|
+
onClick: () => Q(!1),
|
|
4020
|
+
children: g.formatMessage({ id: "discussion_delete_cancel" })
|
|
4021
|
+
},
|
|
4022
|
+
{
|
|
4023
|
+
variant: "primary",
|
|
4024
|
+
className: "destructive",
|
|
4025
|
+
onClick: ue,
|
|
4026
|
+
children: g.formatMessage({ id: "discussion_delete_delete" })
|
|
4027
|
+
}
|
|
3977
4028
|
],
|
|
3978
4029
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
3979
4030
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -3982,7 +4033,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3982
4033
|
id: "discussion_delete_text",
|
|
3983
4034
|
values: {
|
|
3984
4035
|
p: (R) => /* @__PURE__ */ r.jsx("p", { children: R }),
|
|
3985
|
-
action:
|
|
4036
|
+
action: g.formatMessage({
|
|
3986
4037
|
id: `discussion_action_${t.type}`
|
|
3987
4038
|
})
|
|
3988
4039
|
}
|
|
@@ -3993,15 +4044,15 @@ const xe = "discussion_", Rt = ({
|
|
|
3993
4044
|
] })
|
|
3994
4045
|
});
|
|
3995
4046
|
};
|
|
3996
|
-
const
|
|
3997
|
-
const n =
|
|
4047
|
+
const yt = "discussion_responses_", To = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4048
|
+
const n = F();
|
|
3998
4049
|
return /* @__PURE__ */ r.jsxs("div", { className: "responses-heading", children: [
|
|
3999
|
-
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4000
|
-
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${
|
|
4050
|
+
/* @__PURE__ */ r.jsx("h3", { children: n.formatMessage({ id: `${yt}title` }, { action: n.formatMessage({ id: `${yt}${e}` }), count: t }) }),
|
|
4051
|
+
t === 0 && /* @__PURE__ */ r.jsx("p", { children: he(n.formatMessage, `${yt}empty`, e, e) })
|
|
4001
4052
|
] });
|
|
4002
4053
|
};
|
|
4003
|
-
const
|
|
4004
|
-
const s =
|
|
4054
|
+
const Mo = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
4055
|
+
const s = F(), o = ee(null), [l, d] = P(e), [a, i] = P("closed");
|
|
4005
4056
|
z(() => {
|
|
4006
4057
|
const p = o.current;
|
|
4007
4058
|
if (p)
|
|
@@ -4025,14 +4076,14 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4025
4076
|
styling: { muted: !0 },
|
|
4026
4077
|
icon: { icon: `arrow_corner-down_${u ? "left" : "right"}` },
|
|
4027
4078
|
onClick: () => {
|
|
4028
|
-
|
|
4079
|
+
d(!l);
|
|
4029
4080
|
},
|
|
4030
4081
|
children: s.formatMessage({ id: `discussion_thread_${u ? "hide" : "show"}` }, { count: t })
|
|
4031
4082
|
}
|
|
4032
4083
|
),
|
|
4033
4084
|
/* @__PURE__ */ r.jsx("ul", { ref: o, className: j("thread", a), hidden: !l, children: f })
|
|
4034
4085
|
] });
|
|
4035
|
-
},
|
|
4086
|
+
}, Ns = ({
|
|
4036
4087
|
user: e,
|
|
4037
4088
|
content: t,
|
|
4038
4089
|
verb: n = "post"
|
|
@@ -4061,7 +4112,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4061
4112
|
}) => ({ mutationFn: s, onMutate: async ({ content: a }) => {
|
|
4062
4113
|
if (!n)
|
|
4063
4114
|
return;
|
|
4064
|
-
const i =
|
|
4115
|
+
const i = Ns({ user: n, content: a, verb: "post" });
|
|
4065
4116
|
await e.cancelQueries({ queryKey: t });
|
|
4066
4117
|
const c = e.getQueryData(t);
|
|
4067
4118
|
return e.setQueryData(t, (u) => [...u, i]), { previousActivities: c };
|
|
@@ -4069,29 +4120,29 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4069
4120
|
e.setQueryData(t, c.previousActivities);
|
|
4070
4121
|
}, onSettled: () => {
|
|
4071
4122
|
e.invalidateQueries({ queryKey: t });
|
|
4072
|
-
} }),
|
|
4123
|
+
} }), Ds = ({
|
|
4073
4124
|
queryClient: e,
|
|
4074
4125
|
queryKey: t,
|
|
4075
4126
|
mutationFn: n
|
|
4076
4127
|
}) => ({
|
|
4077
4128
|
mutationFn: n,
|
|
4078
4129
|
onMutate: async ({
|
|
4079
|
-
activityInfo:
|
|
4130
|
+
activityInfo: d,
|
|
4080
4131
|
content: { body: a }
|
|
4081
4132
|
}) => {
|
|
4082
4133
|
if (a.length === 0)
|
|
4083
4134
|
return;
|
|
4084
4135
|
await e.cancelQueries({ queryKey: t });
|
|
4085
|
-
const i = e.getQueryData(t), c = i == null ? void 0 : i.map((u) => ((u == null ? void 0 : u.id) === (
|
|
4136
|
+
const i = e.getQueryData(t), c = i == null ? void 0 : i.map((u) => ((u == null ? void 0 : u.id) === (d == null ? void 0 : d.activityId) && (u.content = a), u));
|
|
4086
4137
|
return e.setQueryData(t, () => c && [...c]), { previousActivities: c };
|
|
4087
4138
|
},
|
|
4088
|
-
onError: (
|
|
4139
|
+
onError: (d, a, i) => {
|
|
4089
4140
|
e.setQueryData(t, i.previousActivities);
|
|
4090
4141
|
},
|
|
4091
4142
|
onSettled: () => {
|
|
4092
4143
|
e.invalidateQueries({ queryKey: t });
|
|
4093
4144
|
}
|
|
4094
|
-
}),
|
|
4145
|
+
}), Ps = ({
|
|
4095
4146
|
queryClient: e,
|
|
4096
4147
|
queryKey: t,
|
|
4097
4148
|
mutationFn: n
|
|
@@ -4111,7 +4162,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4111
4162
|
e.invalidateQueries({
|
|
4112
4163
|
queryKey: [...t, c.activityId]
|
|
4113
4164
|
});
|
|
4114
|
-
} }),
|
|
4165
|
+
} }), Fs = ({
|
|
4115
4166
|
queryClient: e,
|
|
4116
4167
|
queryKey: t,
|
|
4117
4168
|
user: n,
|
|
@@ -4127,13 +4178,13 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4127
4178
|
e.setQueryData(t, u.previousActivities);
|
|
4128
4179
|
}, onSuccess: (i, { activityId: c }) => {
|
|
4129
4180
|
const u = e.getQueryData(t), f = u == null ? void 0 : u.map((p) => {
|
|
4130
|
-
var h, _,
|
|
4181
|
+
var h, _, k, g;
|
|
4131
4182
|
if (p.id === c) {
|
|
4132
|
-
const E = (
|
|
4133
|
-
(
|
|
4134
|
-
)) == null ? void 0 :
|
|
4183
|
+
const E = (k = (_ = (h = p.latest_reactions) == null ? void 0 : h.like) == null ? void 0 : _.find(
|
|
4184
|
+
(b) => b.user_id === (n == null ? void 0 : n.id)
|
|
4185
|
+
)) == null ? void 0 : k.id;
|
|
4135
4186
|
return p.latest_reactions.like = (g = p.latest_reactions.like) == null ? void 0 : g.filter(
|
|
4136
|
-
(
|
|
4187
|
+
(b) => b.id !== E
|
|
4137
4188
|
), p;
|
|
4138
4189
|
} else
|
|
4139
4190
|
return p;
|
|
@@ -4143,16 +4194,16 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4143
4194
|
e.invalidateQueries({
|
|
4144
4195
|
queryKey: [...t, u.activityId]
|
|
4145
4196
|
});
|
|
4146
|
-
} }),
|
|
4197
|
+
} }), Co = ({
|
|
4147
4198
|
basePath: e,
|
|
4148
4199
|
parentId: t,
|
|
4149
4200
|
isMember: n,
|
|
4150
|
-
functions: { list: s, create: o, edit: l, like:
|
|
4201
|
+
functions: { list: s, create: o, edit: l, like: d, unlike: a, join: i, leave: c }
|
|
4151
4202
|
}) => {
|
|
4152
|
-
const u =
|
|
4203
|
+
const u = F(), f = At(), p = ye(je), {
|
|
4153
4204
|
data: h,
|
|
4154
4205
|
error: _,
|
|
4155
|
-
isLoading:
|
|
4206
|
+
isLoading: k,
|
|
4156
4207
|
isFetching: g
|
|
4157
4208
|
} = cn({
|
|
4158
4209
|
queryKey: [e, t],
|
|
@@ -4162,46 +4213,46 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4162
4213
|
queryKey: [e, t],
|
|
4163
4214
|
user: p,
|
|
4164
4215
|
mutationFn: o
|
|
4165
|
-
}), { mutate:
|
|
4216
|
+
}), { mutate: b } = fe(E), S = Ds({
|
|
4166
4217
|
queryClient: f,
|
|
4167
4218
|
queryKey: [e, t],
|
|
4168
|
-
mutationFn: async (
|
|
4219
|
+
mutationFn: async (w) => await l(w)
|
|
4169
4220
|
}), {
|
|
4170
4221
|
mutate: T
|
|
4171
|
-
} = fe(
|
|
4222
|
+
} = fe(S), M = Ps({
|
|
4172
4223
|
queryClient: f,
|
|
4173
4224
|
queryKey: [e, t],
|
|
4174
|
-
mutationFn:
|
|
4225
|
+
mutationFn: d
|
|
4175
4226
|
}), {
|
|
4176
4227
|
mutate: Q
|
|
4177
|
-
} = fe(M), V =
|
|
4228
|
+
} = fe(M), V = Fs({
|
|
4178
4229
|
queryClient: f,
|
|
4179
4230
|
queryKey: [e, t],
|
|
4180
4231
|
user: p,
|
|
4181
|
-
mutationFn: async ({ activityId:
|
|
4182
|
-
var
|
|
4183
|
-
const
|
|
4184
|
-
(K) => K.id ===
|
|
4185
|
-
)),
|
|
4232
|
+
mutationFn: async ({ activityId: w }) => {
|
|
4233
|
+
var B, U, Y;
|
|
4234
|
+
const G = h && (h == null ? void 0 : h.find(
|
|
4235
|
+
(K) => K.id === w
|
|
4236
|
+
)), L = (Y = (U = (B = G == null ? void 0 : G.latest_reactions) == null ? void 0 : B.like) == null ? void 0 : U.find(
|
|
4186
4237
|
(K) => K.user_id === (p == null ? void 0 : p.id)
|
|
4187
|
-
)) == null ? void 0 :
|
|
4188
|
-
await a({ reactionId:
|
|
4238
|
+
)) == null ? void 0 : Y.id;
|
|
4239
|
+
await a({ reactionId: L || "", activityId: w });
|
|
4189
4240
|
}
|
|
4190
4241
|
}), {
|
|
4191
|
-
mutate:
|
|
4192
|
-
} = fe(V),
|
|
4193
|
-
({ activityId:
|
|
4242
|
+
mutate: v
|
|
4243
|
+
} = fe(V), N = Ee(
|
|
4244
|
+
({ activityId: w }) => Q({ activityId: w }),
|
|
4194
4245
|
[Q]
|
|
4195
4246
|
), q = Ee(
|
|
4196
|
-
({ activityId:
|
|
4197
|
-
[
|
|
4247
|
+
({ activityId: w }) => v({ activityId: w }),
|
|
4248
|
+
[v]
|
|
4198
4249
|
);
|
|
4199
|
-
return _ ? /* @__PURE__ */ r.jsx(
|
|
4250
|
+
return _ ? /* @__PURE__ */ r.jsx(st, { variant: "error", text: _.message }) : k ? /* @__PURE__ */ r.jsx(be, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4200
4251
|
/* @__PURE__ */ r.jsx(
|
|
4201
|
-
|
|
4252
|
+
Nn,
|
|
4202
4253
|
{
|
|
4203
4254
|
contentType: "post",
|
|
4204
|
-
createPost:
|
|
4255
|
+
createPost: b,
|
|
4205
4256
|
membershipRequiredToPost: {
|
|
4206
4257
|
isMember: n,
|
|
4207
4258
|
required: !0,
|
|
@@ -4211,60 +4262,63 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4211
4262
|
}
|
|
4212
4263
|
}
|
|
4213
4264
|
),
|
|
4214
|
-
!g && Array.isArray(h) && (h == null ? void 0 : h.map((
|
|
4215
|
-
var
|
|
4216
|
-
const
|
|
4217
|
-
return /* @__PURE__ */ r.
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
type: "post",
|
|
4222
|
-
body: k == null ? void 0 : k.content,
|
|
4223
|
-
canLike: B,
|
|
4224
|
-
createdAt: (k == null ? void 0 : k.time) || "",
|
|
4225
|
-
slugs: { parentId: t, activityId: k == null ? void 0 : k.id },
|
|
4226
|
-
slug: k == null ? void 0 : k.id,
|
|
4227
|
-
author: {
|
|
4228
|
-
id: (U = k == null ? void 0 : k.actor) == null ? void 0 : U.id,
|
|
4229
|
-
name: `${(K = (G = k == null ? void 0 : k.actor) == null ? void 0 : G.data) == null ? void 0 : K.name}`,
|
|
4230
|
-
organization: (le = (ie = k == null ? void 0 : k.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4231
|
-
jobTitle: (R = (se = k == null ? void 0 : k.actor) == null ? void 0 : se.data) == null ? void 0 : R.jobTitle,
|
|
4232
|
-
image: {
|
|
4233
|
-
thumbnail: ((oe = (ee = k == null ? void 0 : k.actor) == null ? void 0 : ee.data) == null ? void 0 : oe.thumbnail) || void 0
|
|
4234
|
-
}
|
|
4235
|
-
},
|
|
4236
|
-
userLiked: ((ce = k == null ? void 0 : k.own_reactions) == null ? void 0 : ce.like) && ((te = k == null ? void 0 : k.own_reactions) == null ? void 0 : te.like.length) > 0,
|
|
4237
|
-
likes: (k == null ? void 0 : k.reaction_counts.like) || 0,
|
|
4238
|
-
comments: (k == null ? void 0 : k.reaction_counts.reply) || 0
|
|
4239
|
-
},
|
|
4240
|
-
links: {
|
|
4241
|
-
post: `${e}/${t}/${k == null ? void 0 : k.id}`,
|
|
4242
|
-
comments: `${e}/${t}/${k == null ? void 0 : k.id}`
|
|
4243
|
-
},
|
|
4244
|
-
functions: {
|
|
4265
|
+
!g && Array.isArray(h) && (h == null ? void 0 : h.map((w) => {
|
|
4266
|
+
var B, U, Y, K, ie, le, ce, ue, oe, R, te, X;
|
|
4267
|
+
const G = ((B = w == null ? void 0 : w.actor) == null ? void 0 : B.id) === (p == null ? void 0 : p.id), L = Rt(n, G);
|
|
4268
|
+
return /* @__PURE__ */ r.jsxs(Et, { children: [
|
|
4269
|
+
/* @__PURE__ */ r.jsx(
|
|
4270
|
+
Ot,
|
|
4271
|
+
{
|
|
4245
4272
|
content: {
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4273
|
+
type: "post",
|
|
4274
|
+
body: w == null ? void 0 : w.content,
|
|
4275
|
+
canLike: L,
|
|
4276
|
+
createdAt: (w == null ? void 0 : w.time) || "",
|
|
4277
|
+
slugs: { parentId: t, activityId: w == null ? void 0 : w.id },
|
|
4278
|
+
slug: w == null ? void 0 : w.id,
|
|
4279
|
+
author: {
|
|
4280
|
+
id: (U = w == null ? void 0 : w.actor) == null ? void 0 : U.id,
|
|
4281
|
+
name: `${(K = (Y = w == null ? void 0 : w.actor) == null ? void 0 : Y.data) == null ? void 0 : K.name}`,
|
|
4282
|
+
organization: (le = (ie = w == null ? void 0 : w.actor) == null ? void 0 : ie.data) == null ? void 0 : le.organization,
|
|
4283
|
+
jobTitle: (ue = (ce = w == null ? void 0 : w.actor) == null ? void 0 : ce.data) == null ? void 0 : ue.jobTitle,
|
|
4284
|
+
image: {
|
|
4285
|
+
thumbnail: ((R = (oe = w == null ? void 0 : w.actor) == null ? void 0 : oe.data) == null ? void 0 : R.thumbnail) || void 0
|
|
4286
|
+
}
|
|
4287
|
+
},
|
|
4288
|
+
userLiked: ((te = w == null ? void 0 : w.own_reactions) == null ? void 0 : te.like) && ((X = w == null ? void 0 : w.own_reactions) == null ? void 0 : X.like.length) > 0,
|
|
4289
|
+
likes: (w == null ? void 0 : w.reaction_counts.like) || 0,
|
|
4290
|
+
comments: (w == null ? void 0 : w.reaction_counts.reply) || 0
|
|
4249
4291
|
},
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
|
|
4292
|
+
links: {
|
|
4293
|
+
post: `${e}/${t}/${w == null ? void 0 : w.id}`,
|
|
4294
|
+
comments: `${e}/${t}/${w == null ? void 0 : w.id}`
|
|
4295
|
+
},
|
|
4296
|
+
functions: {
|
|
4297
|
+
content: {
|
|
4298
|
+
createContent: () => null,
|
|
4299
|
+
deleteContent: () => null,
|
|
4300
|
+
updateContent: (ne, me) => T({ activityInfo: ne, content: me })
|
|
4301
|
+
},
|
|
4302
|
+
likes: {
|
|
4303
|
+
createLike: () => {
|
|
4304
|
+
N({ activityId: w == null ? void 0 : w.id });
|
|
4305
|
+
},
|
|
4306
|
+
deleteLike: () => {
|
|
4307
|
+
q({ activityId: w == null ? void 0 : w.id });
|
|
4308
|
+
}
|
|
4253
4309
|
},
|
|
4254
|
-
|
|
4255
|
-
|
|
4310
|
+
comments: {
|
|
4311
|
+
openComments: () => null
|
|
4256
4312
|
}
|
|
4257
4313
|
},
|
|
4258
|
-
|
|
4259
|
-
openComments: () => null
|
|
4260
|
-
}
|
|
4314
|
+
isTruncated: !0
|
|
4261
4315
|
}
|
|
4262
|
-
|
|
4263
|
-
|
|
4264
|
-
);
|
|
4316
|
+
),
|
|
4317
|
+
/* @__PURE__ */ r.jsx(Ne, {})
|
|
4318
|
+
] }, w == null ? void 0 : w.id);
|
|
4265
4319
|
}))
|
|
4266
4320
|
] });
|
|
4267
|
-
},
|
|
4321
|
+
}, Rs = ({
|
|
4268
4322
|
queryClient: e,
|
|
4269
4323
|
queryKey: t,
|
|
4270
4324
|
mutationFn: n
|
|
@@ -4283,7 +4337,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4283
4337
|
})), { previousActivity: i };
|
|
4284
4338
|
}, onSettled: () => {
|
|
4285
4339
|
e.invalidateQueries({ queryKey: t });
|
|
4286
|
-
} }),
|
|
4340
|
+
} }), Os = ({
|
|
4287
4341
|
queryClient: e,
|
|
4288
4342
|
queryKey: t,
|
|
4289
4343
|
mutationFn: n
|
|
@@ -4291,49 +4345,49 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4291
4345
|
mutationFn: n,
|
|
4292
4346
|
onMutate: async ({
|
|
4293
4347
|
replyInfo: l,
|
|
4294
|
-
content: { body:
|
|
4348
|
+
content: { body: d }
|
|
4295
4349
|
}) => {
|
|
4296
4350
|
var c, u, f;
|
|
4297
|
-
if (
|
|
4351
|
+
if (d.length === 0)
|
|
4298
4352
|
return;
|
|
4299
4353
|
await e.cancelQueries({ queryKey: t });
|
|
4300
4354
|
const a = e.getQueryData(t);
|
|
4301
4355
|
if (!a || !((c = a == null ? void 0 : a.latest_reactions) != null && c.reply))
|
|
4302
4356
|
return;
|
|
4303
|
-
const i = (f = (u = a == null ? void 0 : a.latest_reactions) == null ? void 0 : u.reply) == null ? void 0 : f.map((p) => (p.id === l.replySlug && (p.data.content =
|
|
4357
|
+
const i = (f = (u = a == null ? void 0 : a.latest_reactions) == null ? void 0 : u.reply) == null ? void 0 : f.map((p) => (p.id === l.replySlug && (p.data.content = d), p));
|
|
4304
4358
|
return e.setQueryData(t, () => ({
|
|
4305
4359
|
...a,
|
|
4306
4360
|
latest_reactions: { reply: i }
|
|
4307
4361
|
})), { previousActivity: a };
|
|
4308
4362
|
},
|
|
4309
|
-
onError: (l,
|
|
4363
|
+
onError: (l, d, a) => {
|
|
4310
4364
|
e.setQueryData(t, a.previousActivity);
|
|
4311
4365
|
}
|
|
4312
|
-
}),
|
|
4366
|
+
}), Ls = ({
|
|
4313
4367
|
queryClient: e,
|
|
4314
4368
|
queryKey: t,
|
|
4315
4369
|
mutationFn: n
|
|
4316
|
-
}) => ({ mutationFn: n, onMutate: async ({ replyId:
|
|
4370
|
+
}) => ({ mutationFn: n, onMutate: async ({ replyId: d }) => {
|
|
4317
4371
|
var c, u;
|
|
4318
4372
|
await e.cancelQueries({ queryKey: t });
|
|
4319
4373
|
const a = e.getQueryData(t), i = (u = (c = a == null ? void 0 : a.latest_reactions) == null ? void 0 : c.reply) == null ? void 0 : u.map((f) => {
|
|
4320
4374
|
var p;
|
|
4321
|
-
return f.id ===
|
|
4375
|
+
return f.id === d && ((p = f.children_counts) != null && p.like ? f.children_counts.like += 1 : f.children_counts = { like: 1 }), f;
|
|
4322
4376
|
});
|
|
4323
4377
|
return e.setQueryData(t, () => ({
|
|
4324
4378
|
...a,
|
|
4325
4379
|
latest_reactions: { reply: i }
|
|
4326
4380
|
})), { previousActivity: a };
|
|
4327
|
-
}, onError: (
|
|
4381
|
+
}, onError: (d, a, i) => {
|
|
4328
4382
|
e.setQueryData(t, i.previousActivity);
|
|
4329
|
-
}, onSuccess: (
|
|
4383
|
+
}, onSuccess: (d) => {
|
|
4330
4384
|
var c;
|
|
4331
|
-
const a = e.getQueryData(t), i = (c = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : c.map((u) => (u.id ===
|
|
4385
|
+
const a = e.getQueryData(t), i = (c = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : c.map((u) => (u.id === d.id && (u.latest_children.like ? u.latest_children.like.push(d) : u.latest_children.like = [d]), u));
|
|
4332
4386
|
return e.setQueryData(t, () => ({
|
|
4333
4387
|
...a,
|
|
4334
4388
|
latest_reactions: { reply: i }
|
|
4335
4389
|
})), { previousActivity: a };
|
|
4336
|
-
} }),
|
|
4390
|
+
} }), Bs = ({
|
|
4337
4391
|
queryClient: e,
|
|
4338
4392
|
queryKey: t,
|
|
4339
4393
|
user: n,
|
|
@@ -4359,38 +4413,38 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4359
4413
|
const u = (f = c.latest_reactions.reply) == null ? void 0 : f.map((p) => {
|
|
4360
4414
|
var h;
|
|
4361
4415
|
return p.id === i ? (h = p.latest_children.reply) == null ? void 0 : h.filter(
|
|
4362
|
-
(
|
|
4416
|
+
(k) => k.user_id !== (n == null ? void 0 : n.id)
|
|
4363
4417
|
) : p;
|
|
4364
4418
|
});
|
|
4365
4419
|
return e.setQueryData(t, () => ({
|
|
4366
4420
|
...c,
|
|
4367
4421
|
latest_reactions: { reply: u }
|
|
4368
4422
|
})), { previousActivity: c };
|
|
4369
|
-
} }),
|
|
4423
|
+
} }), Is = ({
|
|
4370
4424
|
basePath: e,
|
|
4371
4425
|
parentId: t,
|
|
4372
4426
|
activityId: n,
|
|
4373
4427
|
repliesList: s,
|
|
4374
4428
|
isMember: o,
|
|
4375
|
-
functions: { createReply: l, editReply:
|
|
4429
|
+
functions: { createReply: l, editReply: d, like: a, unlike: i, join: c, leave: u }
|
|
4376
4430
|
}) => {
|
|
4377
|
-
const f =
|
|
4431
|
+
const f = F(), p = At(), h = ye(je), _ = Rs({
|
|
4378
4432
|
queryClient: p,
|
|
4379
4433
|
queryKey: [e, t, n],
|
|
4380
4434
|
mutationFn: l
|
|
4381
|
-
}), { mutate:
|
|
4435
|
+
}), { mutate: k } = fe(_), g = Os({
|
|
4382
4436
|
queryClient: p,
|
|
4383
4437
|
queryKey: [e, t, n],
|
|
4384
|
-
mutationFn: async (
|
|
4438
|
+
mutationFn: async (v) => d(v)
|
|
4385
4439
|
}), {
|
|
4386
4440
|
mutate: E
|
|
4387
|
-
} = fe(g),
|
|
4441
|
+
} = fe(g), b = Ls({
|
|
4388
4442
|
queryClient: p,
|
|
4389
4443
|
queryKey: [e, t, n],
|
|
4390
4444
|
mutationFn: a
|
|
4391
4445
|
}), {
|
|
4392
|
-
mutate:
|
|
4393
|
-
} = fe(
|
|
4446
|
+
mutate: S
|
|
4447
|
+
} = fe(b), T = Bs({
|
|
4394
4448
|
queryClient: p,
|
|
4395
4449
|
queryKey: [e, t, n],
|
|
4396
4450
|
user: h,
|
|
@@ -4398,18 +4452,18 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4398
4452
|
}), {
|
|
4399
4453
|
mutate: M
|
|
4400
4454
|
} = fe(T), Q = Ee(
|
|
4401
|
-
({ replyId:
|
|
4402
|
-
[
|
|
4455
|
+
({ replyId: v }) => S({ replyId: v }),
|
|
4456
|
+
[S]
|
|
4403
4457
|
), V = Ee(
|
|
4404
|
-
({ replyId:
|
|
4458
|
+
({ replyId: v }) => M({ replyId: v }),
|
|
4405
4459
|
[M]
|
|
4406
4460
|
);
|
|
4407
4461
|
return /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4408
4462
|
/* @__PURE__ */ r.jsx(
|
|
4409
|
-
|
|
4463
|
+
Nn,
|
|
4410
4464
|
{
|
|
4411
4465
|
contentType: "post",
|
|
4412
|
-
createPost:
|
|
4466
|
+
createPost: k,
|
|
4413
4467
|
membershipRequiredToPost: {
|
|
4414
4468
|
isMember: o,
|
|
4415
4469
|
required: !0,
|
|
@@ -4419,37 +4473,37 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4419
4473
|
}
|
|
4420
4474
|
}
|
|
4421
4475
|
),
|
|
4422
|
-
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((
|
|
4423
|
-
var
|
|
4424
|
-
const
|
|
4476
|
+
(s == null ? void 0 : s.length) === 0 || (s == null ? void 0 : s.map((v) => {
|
|
4477
|
+
var G, L, B, U, Y, K, ie, le, ce, ue, oe, R, te, X, ne, me, pe;
|
|
4478
|
+
const N = ((G = v == null ? void 0 : v.latest_children) == null ? void 0 : G.like) && ((L = v == null ? void 0 : v.latest_children) == null ? void 0 : L.like.filter(
|
|
4425
4479
|
(ge) => ge.user_id === (h == null ? void 0 : h.id)
|
|
4426
|
-
)), q = ((
|
|
4480
|
+
)), q = ((B = v == null ? void 0 : v.user) == null ? void 0 : B.id) === (h == null ? void 0 : h.id), w = Rt(o, q);
|
|
4427
4481
|
return /* @__PURE__ */ r.jsx(
|
|
4428
|
-
|
|
4482
|
+
Ot,
|
|
4429
4483
|
{
|
|
4430
4484
|
content: {
|
|
4431
4485
|
type: "post",
|
|
4432
|
-
body: typeof
|
|
4433
|
-
canLike:
|
|
4434
|
-
createdAt:
|
|
4486
|
+
body: typeof v.data.content == "string" ? (U = v == null ? void 0 : v.data) == null ? void 0 : U.content : ((K = (Y = v == null ? void 0 : v.data) == null ? void 0 : Y.content) == null ? void 0 : K.text) || "",
|
|
4487
|
+
canLike: w,
|
|
4488
|
+
createdAt: v == null ? void 0 : v.created_at,
|
|
4435
4489
|
slugs: {
|
|
4436
4490
|
question: `${e}/${t}/${n}`,
|
|
4437
4491
|
parentId: t,
|
|
4438
|
-
reply:
|
|
4492
|
+
reply: v == null ? void 0 : v.id
|
|
4439
4493
|
},
|
|
4440
|
-
slug: `${e}/${t}/${n}#${
|
|
4494
|
+
slug: `${e}/${t}/${n}#${v == null ? void 0 : v.id}`,
|
|
4441
4495
|
author: {
|
|
4442
|
-
id: (ie =
|
|
4443
|
-
name: (
|
|
4444
|
-
organization: (
|
|
4445
|
-
jobTitle: (
|
|
4496
|
+
id: (ie = v == null ? void 0 : v.user) == null ? void 0 : ie.id,
|
|
4497
|
+
name: (ce = (le = v == null ? void 0 : v.user) == null ? void 0 : le.data) == null ? void 0 : ce.name,
|
|
4498
|
+
organization: (oe = (ue = v == null ? void 0 : v.user) == null ? void 0 : ue.data) == null ? void 0 : oe.organization,
|
|
4499
|
+
jobTitle: (te = (R = v == null ? void 0 : v.user) == null ? void 0 : R.data) == null ? void 0 : te.jobTitle,
|
|
4446
4500
|
image: {
|
|
4447
|
-
thumbnail: ((
|
|
4501
|
+
thumbnail: ((ne = (X = v == null ? void 0 : v.user) == null ? void 0 : X.data) == null ? void 0 : ne.thumbnail) || void 0
|
|
4448
4502
|
}
|
|
4449
4503
|
},
|
|
4450
|
-
userLiked: !!(
|
|
4451
|
-
likes: ((me =
|
|
4452
|
-
comments: ((pe =
|
|
4504
|
+
userLiked: !!(N != null && N.length),
|
|
4505
|
+
likes: ((me = v == null ? void 0 : v.children_counts) == null ? void 0 : me.like) || 0,
|
|
4506
|
+
comments: ((pe = v == null ? void 0 : v.children_counts) == null ? void 0 : pe.reply) || 0
|
|
4453
4507
|
},
|
|
4454
4508
|
functions: {
|
|
4455
4509
|
content: {
|
|
@@ -4458,8 +4512,8 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4458
4512
|
updateContent: (ge, Se) => E({ replyInfo: ge, content: Se })
|
|
4459
4513
|
},
|
|
4460
4514
|
likes: {
|
|
4461
|
-
createLike: () => Q({ replyId:
|
|
4462
|
-
deleteLike: () => V({ replyId:
|
|
4515
|
+
createLike: () => Q({ replyId: v == null ? void 0 : v.id }),
|
|
4516
|
+
deleteLike: () => V({ replyId: v == null ? void 0 : v.id })
|
|
4463
4517
|
},
|
|
4464
4518
|
comments: {
|
|
4465
4519
|
openComments: () => {
|
|
@@ -4467,35 +4521,35 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4467
4521
|
}
|
|
4468
4522
|
}
|
|
4469
4523
|
},
|
|
4470
|
-
|
|
4524
|
+
v == null ? void 0 : v.id
|
|
4471
4525
|
);
|
|
4472
4526
|
}))
|
|
4473
4527
|
] });
|
|
4474
|
-
},
|
|
4528
|
+
}, Hs = ({
|
|
4475
4529
|
queryClient: e,
|
|
4476
4530
|
queryKey: t,
|
|
4477
4531
|
mutationFn: n
|
|
4478
4532
|
}) => ({
|
|
4479
4533
|
mutationFn: n,
|
|
4480
4534
|
onMutate: async ({
|
|
4481
|
-
activityInfo:
|
|
4535
|
+
activityInfo: d,
|
|
4482
4536
|
content: { body: a }
|
|
4483
4537
|
}) => {
|
|
4484
4538
|
if (a.length === 0)
|
|
4485
4539
|
return;
|
|
4486
4540
|
await e.cancelQueries({ queryKey: t });
|
|
4487
4541
|
const i = e.getQueryData(t);
|
|
4488
|
-
return i && i.id === (
|
|
4542
|
+
return i && i.id === (d == null ? void 0 : d.activityId) && (i.content = a), e.setQueryData(t, () => ({
|
|
4489
4543
|
...i
|
|
4490
4544
|
})), { previousActivity: i };
|
|
4491
4545
|
},
|
|
4492
|
-
onError: (
|
|
4546
|
+
onError: (d, a, i) => {
|
|
4493
4547
|
e.setQueryData(t, i.previousActivity);
|
|
4494
4548
|
},
|
|
4495
4549
|
onSettled: () => {
|
|
4496
4550
|
e.invalidateQueries({ queryKey: t });
|
|
4497
4551
|
}
|
|
4498
|
-
}),
|
|
4552
|
+
}), Qs = ({
|
|
4499
4553
|
queryClient: e,
|
|
4500
4554
|
queryKey: t,
|
|
4501
4555
|
mutationFn: n
|
|
@@ -4515,7 +4569,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4515
4569
|
})), { previousActivity: i };
|
|
4516
4570
|
}, onSettled: () => {
|
|
4517
4571
|
e.invalidateQueries({ queryKey: t });
|
|
4518
|
-
} }),
|
|
4572
|
+
} }), Us = ({
|
|
4519
4573
|
queryClient: e,
|
|
4520
4574
|
queryKey: t,
|
|
4521
4575
|
user: n,
|
|
@@ -4545,7 +4599,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4545
4599
|
})), { previousActivity: u };
|
|
4546
4600
|
}, onSettled: () => {
|
|
4547
4601
|
e.invalidateQueries({ queryKey: t });
|
|
4548
|
-
} }),
|
|
4602
|
+
} }), No = ({
|
|
4549
4603
|
basePath: e,
|
|
4550
4604
|
parentId: t,
|
|
4551
4605
|
activityId: n,
|
|
@@ -4553,7 +4607,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4553
4607
|
functions: {
|
|
4554
4608
|
get: o,
|
|
4555
4609
|
editActivity: l,
|
|
4556
|
-
likeActivity:
|
|
4610
|
+
likeActivity: d,
|
|
4557
4611
|
unlikeActivity: a,
|
|
4558
4612
|
createReply: i,
|
|
4559
4613
|
editReply: c,
|
|
@@ -4563,60 +4617,60 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4563
4617
|
leave: h
|
|
4564
4618
|
}
|
|
4565
4619
|
}) => {
|
|
4566
|
-
var
|
|
4567
|
-
const _ = ye(je),
|
|
4620
|
+
var B, U, Y, K, ie, le, ce, ue, oe, R, te;
|
|
4621
|
+
const _ = ye(je), k = At(), {
|
|
4568
4622
|
data: g,
|
|
4569
4623
|
error: E,
|
|
4570
|
-
isLoading:
|
|
4571
|
-
isFetching:
|
|
4624
|
+
isLoading: b,
|
|
4625
|
+
isFetching: S
|
|
4572
4626
|
} = cn({
|
|
4573
4627
|
queryKey: [e, t, n],
|
|
4574
4628
|
queryFn: o
|
|
4575
|
-
}), T =
|
|
4576
|
-
queryClient:
|
|
4629
|
+
}), T = Hs({
|
|
4630
|
+
queryClient: k,
|
|
4577
4631
|
queryKey: [e, t, n],
|
|
4578
|
-
mutationFn: async (
|
|
4632
|
+
mutationFn: async (X) => await l(X)
|
|
4579
4633
|
}), {
|
|
4580
4634
|
mutate: M
|
|
4581
|
-
} = fe(T), Q =
|
|
4582
|
-
queryClient:
|
|
4635
|
+
} = fe(T), Q = Qs({
|
|
4636
|
+
queryClient: k,
|
|
4583
4637
|
queryKey: [e, t, n],
|
|
4584
|
-
mutationFn:
|
|
4638
|
+
mutationFn: d
|
|
4585
4639
|
}), {
|
|
4586
4640
|
mutate: V
|
|
4587
|
-
} = fe(Q),
|
|
4588
|
-
queryClient:
|
|
4641
|
+
} = fe(Q), v = Us({
|
|
4642
|
+
queryClient: k,
|
|
4589
4643
|
queryKey: [e, t, n],
|
|
4590
4644
|
user: _,
|
|
4591
4645
|
mutationFn: async () => {
|
|
4592
|
-
var
|
|
4593
|
-
const
|
|
4646
|
+
var ne, me, pe;
|
|
4647
|
+
const X = (pe = (me = (ne = g == null ? void 0 : g.latest_reactions) == null ? void 0 : ne.like) == null ? void 0 : me.find(
|
|
4594
4648
|
(ge) => ge.user_id === (_ == null ? void 0 : _.id)
|
|
4595
4649
|
)) == null ? void 0 : pe.id;
|
|
4596
|
-
await a({ activityId: n, reactionId:
|
|
4650
|
+
await a({ activityId: n, reactionId: X });
|
|
4597
4651
|
},
|
|
4598
4652
|
activity: g
|
|
4599
4653
|
}), {
|
|
4600
|
-
mutate:
|
|
4601
|
-
} = fe(
|
|
4602
|
-
({ activityId:
|
|
4654
|
+
mutate: N
|
|
4655
|
+
} = fe(v), q = Ee(
|
|
4656
|
+
({ activityId: X }) => V({ activityId: X }),
|
|
4603
4657
|
[V]
|
|
4604
|
-
),
|
|
4605
|
-
async ({ activityId:
|
|
4606
|
-
[
|
|
4658
|
+
), w = Ee(
|
|
4659
|
+
async ({ activityId: X }) => N({ activityId: X }),
|
|
4660
|
+
[N]
|
|
4607
4661
|
);
|
|
4608
4662
|
if (E)
|
|
4609
|
-
return /* @__PURE__ */ r.jsx(
|
|
4610
|
-
if (
|
|
4663
|
+
return /* @__PURE__ */ r.jsx(st, { variant: "error", text: E.message });
|
|
4664
|
+
if (b || S)
|
|
4611
4665
|
return /* @__PURE__ */ r.jsx(be, { style: { height: "400px" } });
|
|
4612
|
-
const
|
|
4666
|
+
const G = ((B = g == null ? void 0 : g.actor) == null ? void 0 : B.id) === (_ == null ? void 0 : _.id), L = Rt(s, G);
|
|
4613
4667
|
return /* @__PURE__ */ r.jsx(
|
|
4614
|
-
|
|
4668
|
+
Ot,
|
|
4615
4669
|
{
|
|
4616
4670
|
content: {
|
|
4617
4671
|
type: "post",
|
|
4618
4672
|
body: g == null ? void 0 : g.content,
|
|
4619
|
-
canLike:
|
|
4673
|
+
canLike: L,
|
|
4620
4674
|
createdAt: (g == null ? void 0 : g.time) || "",
|
|
4621
4675
|
slugs: {
|
|
4622
4676
|
question: `${t}/${n}`,
|
|
@@ -4626,27 +4680,27 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4626
4680
|
slug: n,
|
|
4627
4681
|
author: {
|
|
4628
4682
|
id: (U = g == null ? void 0 : g.actor) == null ? void 0 : U.id,
|
|
4629
|
-
name: (
|
|
4683
|
+
name: (Y = g == null ? void 0 : g.actor) == null ? void 0 : Y.data.name,
|
|
4630
4684
|
organization: (K = g == null ? void 0 : g.actor) == null ? void 0 : K.data.organization,
|
|
4631
4685
|
jobTitle: (ie = g == null ? void 0 : g.actor) == null ? void 0 : ie.data.jobTitle,
|
|
4632
4686
|
image: {
|
|
4633
4687
|
thumbnail: ((le = g == null ? void 0 : g.actor) == null ? void 0 : le.data.thumbnail) || void 0
|
|
4634
4688
|
}
|
|
4635
4689
|
},
|
|
4636
|
-
userLiked: ((
|
|
4690
|
+
userLiked: ((ce = g == null ? void 0 : g.own_reactions) == null ? void 0 : ce.like) && ((ue = g == null ? void 0 : g.own_reactions) == null ? void 0 : ue.like.length) > 0,
|
|
4637
4691
|
likes: g && (g == null ? void 0 : g.reaction_counts.like),
|
|
4638
4692
|
comments: g && (g == null ? void 0 : g.reaction_counts.reply)
|
|
4639
4693
|
},
|
|
4640
|
-
originalAuthorId: (
|
|
4694
|
+
originalAuthorId: (oe = g == null ? void 0 : g.actor) == null ? void 0 : oe.id,
|
|
4641
4695
|
functions: {
|
|
4642
4696
|
content: {
|
|
4643
4697
|
createContent: () => console.log("create"),
|
|
4644
4698
|
deleteContent: () => console.log("delete"),
|
|
4645
|
-
updateContent: (
|
|
4699
|
+
updateContent: (X, ne) => M({ activityInfo: X, content: ne })
|
|
4646
4700
|
},
|
|
4647
4701
|
likes: {
|
|
4648
4702
|
createLike: () => q({ activityId: n }),
|
|
4649
|
-
deleteLike: () =>
|
|
4703
|
+
deleteLike: () => w({ activityId: n })
|
|
4650
4704
|
},
|
|
4651
4705
|
comments: {
|
|
4652
4706
|
openComments: () => {
|
|
@@ -4656,16 +4710,16 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4656
4710
|
children: /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4657
4711
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
4658
4712
|
"Comments (",
|
|
4659
|
-
((
|
|
4713
|
+
((R = g == null ? void 0 : g.reaction_counts) == null ? void 0 : R.reply) || 0,
|
|
4660
4714
|
")"
|
|
4661
4715
|
] }),
|
|
4662
4716
|
/* @__PURE__ */ r.jsx(
|
|
4663
|
-
|
|
4717
|
+
Is,
|
|
4664
4718
|
{
|
|
4665
4719
|
basePath: e,
|
|
4666
4720
|
parentId: t,
|
|
4667
4721
|
activityId: n,
|
|
4668
|
-
repliesList: (
|
|
4722
|
+
repliesList: (te = g == null ? void 0 : g.latest_reactions) == null ? void 0 : te.reply,
|
|
4669
4723
|
isMember: s,
|
|
4670
4724
|
functions: {
|
|
4671
4725
|
createReply: i,
|
|
@@ -4689,85 +4743,85 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4689
4743
|
image: { thumbnail: o }
|
|
4690
4744
|
});
|
|
4691
4745
|
export {
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4746
|
+
$t as ASSETS_BUCKET,
|
|
4747
|
+
Co as ActivitiesFeed,
|
|
4748
|
+
No as ActivitySection,
|
|
4749
|
+
Nn as AddPost,
|
|
4750
|
+
lo as BannerSection,
|
|
4751
|
+
go as Breadcrumbs,
|
|
4698
4752
|
W as Button,
|
|
4699
|
-
|
|
4753
|
+
nt as ButtonWrapper,
|
|
4700
4754
|
as as CacheProvider,
|
|
4701
4755
|
xn as CollapsibleSection,
|
|
4702
|
-
|
|
4703
|
-
|
|
4756
|
+
vo as Columns,
|
|
4757
|
+
ho as CommunityDetails,
|
|
4704
4758
|
os as Contributors,
|
|
4705
|
-
|
|
4759
|
+
An as ConversationContext,
|
|
4706
4760
|
gs as CookieBanner,
|
|
4707
|
-
|
|
4761
|
+
So as DiscussionConversation,
|
|
4708
4762
|
Cn as DiscussionForm,
|
|
4709
4763
|
$s as DiscussionLikes,
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4764
|
+
Ot as DiscussionPost,
|
|
4765
|
+
Mo as DiscussionThread,
|
|
4766
|
+
Ne as Divider,
|
|
4767
|
+
ao as DownloadSection,
|
|
4768
|
+
Oe as EMAILS,
|
|
4769
|
+
bo as EmailHelperTextBox,
|
|
4770
|
+
st as EmptyStateBox,
|
|
4771
|
+
_o as Filters,
|
|
4718
4772
|
cs as FlagsProvider,
|
|
4719
4773
|
En as Footer,
|
|
4720
4774
|
_n as FullWidthSection,
|
|
4721
|
-
|
|
4775
|
+
po as GlobalProviders,
|
|
4722
4776
|
Mn as Header,
|
|
4723
4777
|
Ur as HelperTextBox,
|
|
4724
4778
|
mn as HiddenFromScreenReaders,
|
|
4725
|
-
|
|
4779
|
+
mo as HideShowTextBox,
|
|
4726
4780
|
ke as HighlightedTextBox,
|
|
4727
4781
|
us as IntlProvider,
|
|
4728
4782
|
bs as InviteForm,
|
|
4729
|
-
|
|
4783
|
+
$o as InviteModal,
|
|
4730
4784
|
yn as JoinButton,
|
|
4731
|
-
|
|
4732
|
-
|
|
4785
|
+
xo as LanguageSwitcher,
|
|
4786
|
+
rt as Link,
|
|
4733
4787
|
fs as LoadMore,
|
|
4734
|
-
|
|
4788
|
+
fo as LoadingBlock,
|
|
4735
4789
|
be as LoadingPlaceholder,
|
|
4736
4790
|
ns as LoadingState,
|
|
4737
4791
|
jn as Logo,
|
|
4738
|
-
|
|
4792
|
+
io as LogoSection,
|
|
4739
4793
|
nn as MarkdownText,
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4794
|
+
co as MarketingBox,
|
|
4795
|
+
Ft as Member,
|
|
4796
|
+
Eo as MembersList,
|
|
4743
4797
|
Ts as Modal,
|
|
4744
4798
|
ps as MoreMenu,
|
|
4745
|
-
|
|
4799
|
+
uo as NUMBER_OF_USERS,
|
|
4746
4800
|
Dn as Overlay,
|
|
4747
|
-
|
|
4748
|
-
|
|
4801
|
+
yo as PageLayout,
|
|
4802
|
+
wo as PasswordRules,
|
|
4749
4803
|
qr as Pill,
|
|
4750
|
-
|
|
4804
|
+
Pt as ProfilePicture,
|
|
4751
4805
|
es as ProgressBar,
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4806
|
+
ko as Rating,
|
|
4807
|
+
Is as RepliesFeed,
|
|
4808
|
+
To as ResponsesHeading,
|
|
4755
4809
|
Br as ResponsiveImage,
|
|
4756
4810
|
vs as SearchForm,
|
|
4757
4811
|
Zr as Span,
|
|
4758
|
-
|
|
4759
|
-
|
|
4812
|
+
Mt as StatusBanner,
|
|
4813
|
+
jo as Tags,
|
|
4760
4814
|
Ir as Tooltip,
|
|
4761
4815
|
je as UserContext,
|
|
4762
4816
|
ds as UserProvider,
|
|
4763
|
-
|
|
4817
|
+
re as VisuallyHidden,
|
|
4764
4818
|
Ms as addAriaProps,
|
|
4765
4819
|
kn as getMember,
|
|
4766
4820
|
Xe as headerData,
|
|
4767
4821
|
Ao as mapGetStreamData,
|
|
4768
4822
|
jr as useCurrentPath,
|
|
4769
4823
|
Ce as useEffectAfterMount,
|
|
4770
|
-
|
|
4824
|
+
tt as useScreenWidth,
|
|
4771
4825
|
Sr as useScrollListener,
|
|
4772
|
-
|
|
4826
|
+
oo as useScrollToHash
|
|
4773
4827
|
};
|