@apolitical/component-library 3.4.1 → 3.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/form/types/signup-form/signup-form.d.ts +7 -1
- package/form/types/signup-form/signup-form.helpers.get-fields.d.ts +7 -1
- package/index.js +16 -16
- package/index.mjs +708 -702
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_lists.scss +5 -0
- package/styles/variables/colors/theme/_base.scss +2 -0
package/index.mjs
CHANGED
|
@@ -130,58 +130,58 @@ var ot = {};
|
|
|
130
130
|
var wr;
|
|
131
131
|
function Is() {
|
|
132
132
|
return wr || (wr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
133
|
-
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"),
|
|
134
|
-
function y(
|
|
135
|
-
if (
|
|
133
|
+
var t = Y, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), o = Symbol.for("react.provider"), c = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), h = Symbol.iterator, _ = "@@iterator";
|
|
134
|
+
function y(g) {
|
|
135
|
+
if (g === null || typeof g != "object")
|
|
136
136
|
return null;
|
|
137
|
-
var M =
|
|
137
|
+
var M = h && g[h] || g[_];
|
|
138
138
|
return typeof M == "function" ? M : null;
|
|
139
139
|
}
|
|
140
140
|
var v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
141
|
-
function b(
|
|
141
|
+
function b(g) {
|
|
142
142
|
{
|
|
143
143
|
for (var M = arguments.length, L = new Array(M > 1 ? M - 1 : 0), ne = 1; ne < M; ne++)
|
|
144
144
|
L[ne - 1] = arguments[ne];
|
|
145
|
-
|
|
145
|
+
T("error", g, L);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function T(g, M, L) {
|
|
149
149
|
{
|
|
150
150
|
var ne = v.ReactDebugCurrentFrame, le = ne.getStackAddendum();
|
|
151
151
|
le !== "" && (M += "%s", L = L.concat([le]));
|
|
152
152
|
var me = L.map(function(ce) {
|
|
153
153
|
return String(ce);
|
|
154
154
|
});
|
|
155
|
-
me.unshift("Warning: " + M), Function.prototype.apply.call(console[
|
|
155
|
+
me.unshift("Warning: " + M), Function.prototype.apply.call(console[g], console, me);
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
var
|
|
158
|
+
var k = !1, w = !1, I = !1, R = !1, Q = !1, C;
|
|
159
159
|
C = Symbol.for("react.module.reference");
|
|
160
|
-
function F(
|
|
161
|
-
return !!(typeof
|
|
160
|
+
function F(g) {
|
|
161
|
+
return !!(typeof g == "string" || typeof g == "function" || g === r || g === i || Q || g === s || g === l || g === u || R || g === p || k || w || I || typeof g == "object" && g !== null && (g.$$typeof === m || g.$$typeof === d || g.$$typeof === o || g.$$typeof === c || g.$$typeof === f || // This needs to include all possible module reference object
|
|
162
162
|
// types supported by any Flight configuration anywhere since
|
|
163
163
|
// we don't know which Flight build this will end up being used
|
|
164
164
|
// with.
|
|
165
|
-
|
|
165
|
+
g.$$typeof === C || g.getModuleId !== void 0));
|
|
166
166
|
}
|
|
167
|
-
function $(
|
|
168
|
-
var ne =
|
|
167
|
+
function $(g, M, L) {
|
|
168
|
+
var ne = g.displayName;
|
|
169
169
|
if (ne)
|
|
170
170
|
return ne;
|
|
171
171
|
var le = M.displayName || M.name || "";
|
|
172
172
|
return le !== "" ? L + "(" + le + ")" : L;
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
return
|
|
174
|
+
function j(g) {
|
|
175
|
+
return g.displayName || "Context";
|
|
176
176
|
}
|
|
177
|
-
function x(
|
|
178
|
-
if (
|
|
177
|
+
function x(g) {
|
|
178
|
+
if (g == null)
|
|
179
179
|
return null;
|
|
180
|
-
if (typeof
|
|
181
|
-
return
|
|
182
|
-
if (typeof
|
|
183
|
-
return
|
|
184
|
-
switch (
|
|
180
|
+
if (typeof g.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof g == "function")
|
|
181
|
+
return g.displayName || g.name || null;
|
|
182
|
+
if (typeof g == "string")
|
|
183
|
+
return g;
|
|
184
|
+
switch (g) {
|
|
185
185
|
case r:
|
|
186
186
|
return "Fragment";
|
|
187
187
|
case n:
|
|
@@ -195,21 +195,21 @@ function Is() {
|
|
|
195
195
|
case u:
|
|
196
196
|
return "SuspenseList";
|
|
197
197
|
}
|
|
198
|
-
if (typeof
|
|
199
|
-
switch (
|
|
198
|
+
if (typeof g == "object")
|
|
199
|
+
switch (g.$$typeof) {
|
|
200
200
|
case c:
|
|
201
|
-
var M =
|
|
202
|
-
return
|
|
201
|
+
var M = g;
|
|
202
|
+
return j(M) + ".Consumer";
|
|
203
203
|
case o:
|
|
204
|
-
var L =
|
|
205
|
-
return
|
|
204
|
+
var L = g;
|
|
205
|
+
return j(L._context) + ".Provider";
|
|
206
206
|
case f:
|
|
207
|
-
return $(
|
|
207
|
+
return $(g, g.render, "ForwardRef");
|
|
208
208
|
case d:
|
|
209
|
-
var ne =
|
|
210
|
-
return ne !== null ? ne : x(
|
|
209
|
+
var ne = g.displayName || null;
|
|
210
|
+
return ne !== null ? ne : x(g.type) || "Memo";
|
|
211
211
|
case m: {
|
|
212
|
-
var le =
|
|
212
|
+
var le = g, me = le._payload, ce = le._init;
|
|
213
213
|
try {
|
|
214
214
|
return x(ce(me));
|
|
215
215
|
} catch {
|
|
@@ -227,20 +227,20 @@ function Is() {
|
|
|
227
227
|
{
|
|
228
228
|
if (A === 0) {
|
|
229
229
|
W = console.log, Z = console.info, z = console.warn, K = console.error, E = console.group, P = console.groupCollapsed, q = console.groupEnd;
|
|
230
|
-
var
|
|
230
|
+
var g = {
|
|
231
231
|
configurable: !0,
|
|
232
232
|
enumerable: !0,
|
|
233
233
|
value: B,
|
|
234
234
|
writable: !0
|
|
235
235
|
};
|
|
236
236
|
Object.defineProperties(console, {
|
|
237
|
-
info:
|
|
238
|
-
log:
|
|
239
|
-
warn:
|
|
240
|
-
error:
|
|
241
|
-
group:
|
|
242
|
-
groupCollapsed:
|
|
243
|
-
groupEnd:
|
|
237
|
+
info: g,
|
|
238
|
+
log: g,
|
|
239
|
+
warn: g,
|
|
240
|
+
error: g,
|
|
241
|
+
group: g,
|
|
242
|
+
groupCollapsed: g,
|
|
243
|
+
groupEnd: g
|
|
244
244
|
});
|
|
245
245
|
}
|
|
246
246
|
A++;
|
|
@@ -249,31 +249,31 @@ function Is() {
|
|
|
249
249
|
function te() {
|
|
250
250
|
{
|
|
251
251
|
if (A--, A === 0) {
|
|
252
|
-
var
|
|
252
|
+
var g = {
|
|
253
253
|
configurable: !0,
|
|
254
254
|
enumerable: !0,
|
|
255
255
|
writable: !0
|
|
256
256
|
};
|
|
257
257
|
Object.defineProperties(console, {
|
|
258
|
-
log: N({},
|
|
258
|
+
log: N({}, g, {
|
|
259
259
|
value: W
|
|
260
260
|
}),
|
|
261
|
-
info: N({},
|
|
261
|
+
info: N({}, g, {
|
|
262
262
|
value: Z
|
|
263
263
|
}),
|
|
264
|
-
warn: N({},
|
|
264
|
+
warn: N({}, g, {
|
|
265
265
|
value: z
|
|
266
266
|
}),
|
|
267
|
-
error: N({},
|
|
267
|
+
error: N({}, g, {
|
|
268
268
|
value: K
|
|
269
269
|
}),
|
|
270
|
-
group: N({},
|
|
270
|
+
group: N({}, g, {
|
|
271
271
|
value: E
|
|
272
272
|
}),
|
|
273
|
-
groupCollapsed: N({},
|
|
273
|
+
groupCollapsed: N({}, g, {
|
|
274
274
|
value: P
|
|
275
275
|
}),
|
|
276
|
-
groupEnd: N({},
|
|
276
|
+
groupEnd: N({}, g, {
|
|
277
277
|
value: q
|
|
278
278
|
})
|
|
279
279
|
});
|
|
@@ -282,7 +282,7 @@ function Is() {
|
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
var G = v.ReactCurrentDispatcher, V;
|
|
285
|
-
function ee(
|
|
285
|
+
function ee(g, M, L) {
|
|
286
286
|
{
|
|
287
287
|
if (V === void 0)
|
|
288
288
|
try {
|
|
@@ -292,7 +292,7 @@ function Is() {
|
|
|
292
292
|
V = ne && ne[1] || "";
|
|
293
293
|
}
|
|
294
294
|
return `
|
|
295
|
-
` + V +
|
|
295
|
+
` + V + g;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
298
|
var re = !1, O;
|
|
@@ -300,11 +300,11 @@ function Is() {
|
|
|
300
300
|
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
301
301
|
O = new oe();
|
|
302
302
|
}
|
|
303
|
-
function D(
|
|
304
|
-
if (!
|
|
303
|
+
function D(g, M) {
|
|
304
|
+
if (!g || re)
|
|
305
305
|
return "";
|
|
306
306
|
{
|
|
307
|
-
var L = O.get(
|
|
307
|
+
var L = O.get(g);
|
|
308
308
|
if (L !== void 0)
|
|
309
309
|
return L;
|
|
310
310
|
}
|
|
@@ -329,14 +329,14 @@ function Is() {
|
|
|
329
329
|
} catch (Pe) {
|
|
330
330
|
ne = Pe;
|
|
331
331
|
}
|
|
332
|
-
Reflect.construct(
|
|
332
|
+
Reflect.construct(g, [], ce);
|
|
333
333
|
} else {
|
|
334
334
|
try {
|
|
335
335
|
ce.call();
|
|
336
336
|
} catch (Pe) {
|
|
337
337
|
ne = Pe;
|
|
338
338
|
}
|
|
339
|
-
|
|
339
|
+
g.call(ce.prototype);
|
|
340
340
|
}
|
|
341
341
|
} else {
|
|
342
342
|
try {
|
|
@@ -344,7 +344,7 @@ function Is() {
|
|
|
344
344
|
} catch (Pe) {
|
|
345
345
|
ne = Pe;
|
|
346
346
|
}
|
|
347
|
-
|
|
347
|
+
g();
|
|
348
348
|
}
|
|
349
349
|
} catch (Pe) {
|
|
350
350
|
if (Pe && ne && typeof Pe.stack == "string") {
|
|
@@ -359,7 +359,7 @@ function Is() {
|
|
|
359
359
|
if (he--, ge--, ge < 0 || ie[he] !== xe[ge]) {
|
|
360
360
|
var ke = `
|
|
361
361
|
` + ie[he].replace(" at new ", " at ");
|
|
362
|
-
return
|
|
362
|
+
return g.displayName && ke.includes("<anonymous>") && (ke = ke.replace("<anonymous>", g.displayName)), typeof g == "function" && O.set(g, ke), ke;
|
|
363
363
|
}
|
|
364
364
|
while (he >= 1 && ge >= 0);
|
|
365
365
|
break;
|
|
@@ -368,37 +368,37 @@ function Is() {
|
|
|
368
368
|
} finally {
|
|
369
369
|
re = !1, G.current = me, te(), Error.prepareStackTrace = le;
|
|
370
370
|
}
|
|
371
|
-
var Ge =
|
|
372
|
-
return typeof
|
|
371
|
+
var Ge = g ? g.displayName || g.name : "", _r = Ge ? ee(Ge) : "";
|
|
372
|
+
return typeof g == "function" && O.set(g, _r), _r;
|
|
373
373
|
}
|
|
374
|
-
function ve(
|
|
375
|
-
return D(
|
|
374
|
+
function ve(g, M, L) {
|
|
375
|
+
return D(g, !1);
|
|
376
376
|
}
|
|
377
|
-
function Ne(
|
|
378
|
-
var M =
|
|
377
|
+
function Ne(g) {
|
|
378
|
+
var M = g.prototype;
|
|
379
379
|
return !!(M && M.isReactComponent);
|
|
380
380
|
}
|
|
381
|
-
function Ce(
|
|
382
|
-
if (
|
|
381
|
+
function Ce(g, M, L) {
|
|
382
|
+
if (g == null)
|
|
383
383
|
return "";
|
|
384
|
-
if (typeof
|
|
385
|
-
return D(
|
|
386
|
-
if (typeof
|
|
387
|
-
return ee(
|
|
388
|
-
switch (
|
|
384
|
+
if (typeof g == "function")
|
|
385
|
+
return D(g, Ne(g));
|
|
386
|
+
if (typeof g == "string")
|
|
387
|
+
return ee(g);
|
|
388
|
+
switch (g) {
|
|
389
389
|
case l:
|
|
390
390
|
return ee("Suspense");
|
|
391
391
|
case u:
|
|
392
392
|
return ee("SuspenseList");
|
|
393
393
|
}
|
|
394
|
-
if (typeof
|
|
395
|
-
switch (
|
|
394
|
+
if (typeof g == "object")
|
|
395
|
+
switch (g.$$typeof) {
|
|
396
396
|
case f:
|
|
397
|
-
return ve(
|
|
397
|
+
return ve(g.render);
|
|
398
398
|
case d:
|
|
399
|
-
return Ce(
|
|
399
|
+
return Ce(g.type, M, L);
|
|
400
400
|
case m: {
|
|
401
|
-
var ne =
|
|
401
|
+
var ne = g, le = ne._payload, me = ne._init;
|
|
402
402
|
try {
|
|
403
403
|
return Ce(me(le), M, L);
|
|
404
404
|
} catch {
|
|
@@ -408,25 +408,25 @@ function Is() {
|
|
|
408
408
|
return "";
|
|
409
409
|
}
|
|
410
410
|
var Ue = Object.prototype.hasOwnProperty, cr = {}, lr = v.ReactDebugCurrentFrame;
|
|
411
|
-
function Tt(
|
|
412
|
-
if (
|
|
413
|
-
var M =
|
|
411
|
+
function Tt(g) {
|
|
412
|
+
if (g) {
|
|
413
|
+
var M = g._owner, L = Ce(g.type, g._source, M ? M.type : null);
|
|
414
414
|
lr.setExtraStackFrame(L);
|
|
415
415
|
} else
|
|
416
416
|
lr.setExtraStackFrame(null);
|
|
417
417
|
}
|
|
418
|
-
function ts(
|
|
418
|
+
function ts(g, M, L, ne, le) {
|
|
419
419
|
{
|
|
420
420
|
var me = Function.call.bind(Ue);
|
|
421
|
-
for (var ce in
|
|
422
|
-
if (me(
|
|
421
|
+
for (var ce in g)
|
|
422
|
+
if (me(g, ce)) {
|
|
423
423
|
var ie = void 0;
|
|
424
424
|
try {
|
|
425
|
-
if (typeof
|
|
426
|
-
var xe = Error((ne || "React class") + ": " + L + " type `" + ce + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof
|
|
425
|
+
if (typeof g[ce] != "function") {
|
|
426
|
+
var xe = Error((ne || "React class") + ": " + L + " type `" + ce + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof g[ce] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
427
427
|
throw xe.name = "Invariant Violation", xe;
|
|
428
428
|
}
|
|
429
|
-
ie =
|
|
429
|
+
ie = g[ce](M, ce, ne, L, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
430
430
|
} catch (he) {
|
|
431
431
|
ie = he;
|
|
432
432
|
}
|
|
@@ -435,28 +435,28 @@ function Is() {
|
|
|
435
435
|
}
|
|
436
436
|
}
|
|
437
437
|
var ns = Array.isArray;
|
|
438
|
-
function ln(
|
|
439
|
-
return ns(
|
|
438
|
+
function ln(g) {
|
|
439
|
+
return ns(g);
|
|
440
440
|
}
|
|
441
|
-
function rs(
|
|
441
|
+
function rs(g) {
|
|
442
442
|
{
|
|
443
|
-
var M = typeof Symbol == "function" && Symbol.toStringTag, L = M &&
|
|
443
|
+
var M = typeof Symbol == "function" && Symbol.toStringTag, L = M && g[Symbol.toStringTag] || g.constructor.name || "Object";
|
|
444
444
|
return L;
|
|
445
445
|
}
|
|
446
446
|
}
|
|
447
|
-
function as(
|
|
447
|
+
function as(g) {
|
|
448
448
|
try {
|
|
449
|
-
return ur(
|
|
449
|
+
return ur(g), !1;
|
|
450
450
|
} catch {
|
|
451
451
|
return !0;
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
function ur(
|
|
455
|
-
return "" +
|
|
454
|
+
function ur(g) {
|
|
455
|
+
return "" + g;
|
|
456
456
|
}
|
|
457
|
-
function dr(
|
|
458
|
-
if (as(
|
|
459
|
-
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rs(
|
|
457
|
+
function dr(g) {
|
|
458
|
+
if (as(g))
|
|
459
|
+
return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rs(g)), ur(g);
|
|
460
460
|
}
|
|
461
461
|
var st = v.ReactCurrentOwner, ss = {
|
|
462
462
|
key: !0,
|
|
@@ -465,56 +465,56 @@ function Is() {
|
|
|
465
465
|
__source: !0
|
|
466
466
|
}, fr, mr, un;
|
|
467
467
|
un = {};
|
|
468
|
-
function is(
|
|
469
|
-
if (Ue.call(
|
|
470
|
-
var M = Object.getOwnPropertyDescriptor(
|
|
468
|
+
function is(g) {
|
|
469
|
+
if (Ue.call(g, "ref")) {
|
|
470
|
+
var M = Object.getOwnPropertyDescriptor(g, "ref").get;
|
|
471
471
|
if (M && M.isReactWarning)
|
|
472
472
|
return !1;
|
|
473
473
|
}
|
|
474
|
-
return
|
|
474
|
+
return g.ref !== void 0;
|
|
475
475
|
}
|
|
476
|
-
function os(
|
|
477
|
-
if (Ue.call(
|
|
478
|
-
var M = Object.getOwnPropertyDescriptor(
|
|
476
|
+
function os(g) {
|
|
477
|
+
if (Ue.call(g, "key")) {
|
|
478
|
+
var M = Object.getOwnPropertyDescriptor(g, "key").get;
|
|
479
479
|
if (M && M.isReactWarning)
|
|
480
480
|
return !1;
|
|
481
481
|
}
|
|
482
|
-
return
|
|
482
|
+
return g.key !== void 0;
|
|
483
483
|
}
|
|
484
|
-
function cs(
|
|
485
|
-
if (typeof
|
|
484
|
+
function cs(g, M) {
|
|
485
|
+
if (typeof g.ref == "string" && st.current && M && st.current.stateNode !== M) {
|
|
486
486
|
var L = x(st.current.type);
|
|
487
|
-
un[L] || (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', x(st.current.type),
|
|
487
|
+
un[L] || (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', x(st.current.type), g.ref), un[L] = !0);
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function ls(
|
|
490
|
+
function ls(g, M) {
|
|
491
491
|
{
|
|
492
492
|
var L = function() {
|
|
493
493
|
fr || (fr = !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)", M));
|
|
494
494
|
};
|
|
495
|
-
L.isReactWarning = !0, Object.defineProperty(
|
|
495
|
+
L.isReactWarning = !0, Object.defineProperty(g, "key", {
|
|
496
496
|
get: L,
|
|
497
497
|
configurable: !0
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
}
|
|
501
|
-
function us(
|
|
501
|
+
function us(g, M) {
|
|
502
502
|
{
|
|
503
503
|
var L = function() {
|
|
504
504
|
mr || (mr = !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)", M));
|
|
505
505
|
};
|
|
506
|
-
L.isReactWarning = !0, Object.defineProperty(
|
|
506
|
+
L.isReactWarning = !0, Object.defineProperty(g, "ref", {
|
|
507
507
|
get: L,
|
|
508
508
|
configurable: !0
|
|
509
509
|
});
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
var ds = function(
|
|
512
|
+
var ds = function(g, M, L, ne, le, me, ce) {
|
|
513
513
|
var ie = {
|
|
514
514
|
// This tag allows us to uniquely identify this as a React Element
|
|
515
515
|
$$typeof: e,
|
|
516
516
|
// Built-in properties that belong on the element
|
|
517
|
-
type:
|
|
517
|
+
type: g,
|
|
518
518
|
key: M,
|
|
519
519
|
ref: L,
|
|
520
520
|
props: ce,
|
|
@@ -538,53 +538,53 @@ function Is() {
|
|
|
538
538
|
value: le
|
|
539
539
|
}), Object.freeze && (Object.freeze(ie.props), Object.freeze(ie)), ie;
|
|
540
540
|
};
|
|
541
|
-
function fs(
|
|
541
|
+
function fs(g, M, L, ne, le) {
|
|
542
542
|
{
|
|
543
543
|
var me, ce = {}, ie = null, xe = null;
|
|
544
544
|
L !== void 0 && (dr(L), ie = "" + L), os(M) && (dr(M.key), ie = "" + M.key), is(M) && (xe = M.ref, cs(M, le));
|
|
545
545
|
for (me in M)
|
|
546
546
|
Ue.call(M, me) && !ss.hasOwnProperty(me) && (ce[me] = M[me]);
|
|
547
|
-
if (
|
|
548
|
-
var he =
|
|
547
|
+
if (g && g.defaultProps) {
|
|
548
|
+
var he = g.defaultProps;
|
|
549
549
|
for (me in he)
|
|
550
550
|
ce[me] === void 0 && (ce[me] = he[me]);
|
|
551
551
|
}
|
|
552
552
|
if (ie || xe) {
|
|
553
|
-
var ge = typeof
|
|
553
|
+
var ge = typeof g == "function" ? g.displayName || g.name || "Unknown" : g;
|
|
554
554
|
ie && ls(ce, ge), xe && us(ce, ge);
|
|
555
555
|
}
|
|
556
|
-
return ds(
|
|
556
|
+
return ds(g, ie, xe, le, ne, st.current, ce);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
559
|
var dn = v.ReactCurrentOwner, pr = v.ReactDebugCurrentFrame;
|
|
560
|
-
function Ke(
|
|
561
|
-
if (
|
|
562
|
-
var M =
|
|
560
|
+
function Ke(g) {
|
|
561
|
+
if (g) {
|
|
562
|
+
var M = g._owner, L = Ce(g.type, g._source, M ? M.type : null);
|
|
563
563
|
pr.setExtraStackFrame(L);
|
|
564
564
|
} else
|
|
565
565
|
pr.setExtraStackFrame(null);
|
|
566
566
|
}
|
|
567
567
|
var fn;
|
|
568
568
|
fn = !1;
|
|
569
|
-
function mn(
|
|
570
|
-
return typeof
|
|
569
|
+
function mn(g) {
|
|
570
|
+
return typeof g == "object" && g !== null && g.$$typeof === e;
|
|
571
571
|
}
|
|
572
572
|
function hr() {
|
|
573
573
|
{
|
|
574
574
|
if (dn.current) {
|
|
575
|
-
var
|
|
576
|
-
if (
|
|
575
|
+
var g = x(dn.current.type);
|
|
576
|
+
if (g)
|
|
577
577
|
return `
|
|
578
578
|
|
|
579
|
-
Check the render method of \`` +
|
|
579
|
+
Check the render method of \`` + g + "`.";
|
|
580
580
|
}
|
|
581
581
|
return "";
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
|
-
function ms(
|
|
584
|
+
function ms(g) {
|
|
585
585
|
{
|
|
586
|
-
if (
|
|
587
|
-
var M =
|
|
586
|
+
if (g !== void 0) {
|
|
587
|
+
var M = g.fileName.replace(/^.*[\\\/]/, ""), L = g.lineNumber;
|
|
588
588
|
return `
|
|
589
589
|
|
|
590
590
|
Check your code at ` + M + ":" + L + ".";
|
|
@@ -593,11 +593,11 @@ Check your code at ` + M + ":" + L + ".";
|
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
595
|
var gr = {};
|
|
596
|
-
function ps(
|
|
596
|
+
function ps(g) {
|
|
597
597
|
{
|
|
598
598
|
var M = hr();
|
|
599
599
|
if (!M) {
|
|
600
|
-
var L = typeof
|
|
600
|
+
var L = typeof g == "string" ? g : g.displayName || g.name;
|
|
601
601
|
L && (M = `
|
|
602
602
|
|
|
603
603
|
Check the top-level render call using <` + L + ">.");
|
|
@@ -605,41 +605,41 @@ Check the top-level render call using <` + L + ">.");
|
|
|
605
605
|
return M;
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
|
-
function vr(
|
|
608
|
+
function vr(g, M) {
|
|
609
609
|
{
|
|
610
|
-
if (!
|
|
610
|
+
if (!g._store || g._store.validated || g.key != null)
|
|
611
611
|
return;
|
|
612
|
-
|
|
612
|
+
g._store.validated = !0;
|
|
613
613
|
var L = ps(M);
|
|
614
614
|
if (gr[L])
|
|
615
615
|
return;
|
|
616
616
|
gr[L] = !0;
|
|
617
617
|
var ne = "";
|
|
618
|
-
|
|
618
|
+
g && g._owner && g._owner !== dn.current && (ne = " It was passed a child from " + x(g._owner.type) + "."), Ke(g), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', L, ne), Ke(null);
|
|
619
619
|
}
|
|
620
620
|
}
|
|
621
|
-
function br(
|
|
621
|
+
function br(g, M) {
|
|
622
622
|
{
|
|
623
|
-
if (typeof
|
|
623
|
+
if (typeof g != "object")
|
|
624
624
|
return;
|
|
625
|
-
if (ln(
|
|
626
|
-
for (var L = 0; L <
|
|
627
|
-
var ne =
|
|
625
|
+
if (ln(g))
|
|
626
|
+
for (var L = 0; L < g.length; L++) {
|
|
627
|
+
var ne = g[L];
|
|
628
628
|
mn(ne) && vr(ne, M);
|
|
629
629
|
}
|
|
630
|
-
else if (mn(
|
|
631
|
-
|
|
632
|
-
else if (
|
|
633
|
-
var le = y(
|
|
634
|
-
if (typeof le == "function" && le !==
|
|
635
|
-
for (var me = le.call(
|
|
630
|
+
else if (mn(g))
|
|
631
|
+
g._store && (g._store.validated = !0);
|
|
632
|
+
else if (g) {
|
|
633
|
+
var le = y(g);
|
|
634
|
+
if (typeof le == "function" && le !== g.entries)
|
|
635
|
+
for (var me = le.call(g), ce; !(ce = me.next()).done; )
|
|
636
636
|
mn(ce.value) && vr(ce.value, M);
|
|
637
637
|
}
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
function hs(
|
|
640
|
+
function hs(g) {
|
|
641
641
|
{
|
|
642
|
-
var M =
|
|
642
|
+
var M = g.type;
|
|
643
643
|
if (M == null || typeof M == "string")
|
|
644
644
|
return;
|
|
645
645
|
var L;
|
|
@@ -653,7 +653,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
653
653
|
return;
|
|
654
654
|
if (L) {
|
|
655
655
|
var ne = x(M);
|
|
656
|
-
ts(L,
|
|
656
|
+
ts(L, g.props, "prop", ne, g);
|
|
657
657
|
} else if (M.PropTypes !== void 0 && !fn) {
|
|
658
658
|
fn = !0;
|
|
659
659
|
var le = x(M);
|
|
@@ -662,30 +662,30 @@ Check the top-level render call using <` + L + ">.");
|
|
|
662
662
|
typeof M.getDefaultProps == "function" && !M.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
function gs(
|
|
665
|
+
function gs(g) {
|
|
666
666
|
{
|
|
667
|
-
for (var M = Object.keys(
|
|
667
|
+
for (var M = Object.keys(g.props), L = 0; L < M.length; L++) {
|
|
668
668
|
var ne = M[L];
|
|
669
669
|
if (ne !== "children" && ne !== "key") {
|
|
670
|
-
Ke(
|
|
670
|
+
Ke(g), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", ne), Ke(null);
|
|
671
671
|
break;
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
|
-
|
|
674
|
+
g.ref !== null && (Ke(g), b("Invalid attribute `ref` supplied to `React.Fragment`."), Ke(null));
|
|
675
675
|
}
|
|
676
676
|
}
|
|
677
|
-
function yr(
|
|
677
|
+
function yr(g, M, L, ne, le, me) {
|
|
678
678
|
{
|
|
679
|
-
var ce = F(
|
|
679
|
+
var ce = F(g);
|
|
680
680
|
if (!ce) {
|
|
681
681
|
var ie = "";
|
|
682
|
-
(
|
|
682
|
+
(g === void 0 || typeof g == "object" && g !== null && Object.keys(g).length === 0) && (ie += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
683
683
|
var xe = ms(le);
|
|
684
684
|
xe ? ie += xe : ie += hr();
|
|
685
685
|
var he;
|
|
686
|
-
|
|
686
|
+
g === null ? he = "null" : ln(g) ? he = "array" : g !== void 0 && g.$$typeof === e ? (he = "<" + (x(g.type) || "Unknown") + " />", ie = " Did you accidentally export a JSX literal instead of a component?") : he = typeof g, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", he, ie);
|
|
687
687
|
}
|
|
688
|
-
var ge = fs(
|
|
688
|
+
var ge = fs(g, M, L, le, me);
|
|
689
689
|
if (ge == null)
|
|
690
690
|
return ge;
|
|
691
691
|
if (ce) {
|
|
@@ -694,21 +694,21 @@ Check the top-level render call using <` + L + ">.");
|
|
|
694
694
|
if (ne)
|
|
695
695
|
if (ln(ke)) {
|
|
696
696
|
for (var Ge = 0; Ge < ke.length; Ge++)
|
|
697
|
-
br(ke[Ge],
|
|
697
|
+
br(ke[Ge], g);
|
|
698
698
|
Object.freeze && Object.freeze(ke);
|
|
699
699
|
} else
|
|
700
700
|
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.");
|
|
701
701
|
else
|
|
702
|
-
br(ke,
|
|
702
|
+
br(ke, g);
|
|
703
703
|
}
|
|
704
|
-
return
|
|
704
|
+
return g === r ? gs(ge) : hs(ge), ge;
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
|
-
function vs(
|
|
708
|
-
return yr(
|
|
707
|
+
function vs(g, M, L) {
|
|
708
|
+
return yr(g, M, L, !0);
|
|
709
709
|
}
|
|
710
|
-
function bs(
|
|
711
|
-
return yr(
|
|
710
|
+
function bs(g, M, L) {
|
|
711
|
+
return yr(g, M, L, !1);
|
|
712
712
|
}
|
|
713
713
|
var ys = bs, _s = vs;
|
|
714
714
|
ot.Fragment = r, ot.jsx = ys, ot.jsxs = _s;
|
|
@@ -737,16 +737,16 @@ function Bs(t, e, n) {
|
|
|
737
737
|
if (typeof t != "function")
|
|
738
738
|
throw new TypeError("Expected a function");
|
|
739
739
|
e = +e || 0;
|
|
740
|
-
var
|
|
740
|
+
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, y = "maxWait" in n, v = "debounceOnServer" in n && !!n.debounceOnServer, b = y ? Math.max(+n.maxWait || 0, e) : null;
|
|
741
741
|
ae(function() {
|
|
742
742
|
return d.current = !0, function() {
|
|
743
743
|
d.current = !1;
|
|
744
744
|
};
|
|
745
745
|
}, []);
|
|
746
|
-
var
|
|
747
|
-
var
|
|
748
|
-
var $ = c.current,
|
|
749
|
-
return c.current = f.current = null, i.current = F, l.current = u.current.apply(
|
|
746
|
+
var T = xt(function() {
|
|
747
|
+
var k = function(F) {
|
|
748
|
+
var $ = c.current, j = f.current;
|
|
749
|
+
return c.current = f.current = null, i.current = F, l.current = u.current.apply(j, $);
|
|
750
750
|
}, w = function(F, $) {
|
|
751
751
|
p && cancelAnimationFrame(o.current), o.current = p ? requestAnimationFrame(F) : setTimeout(F, $);
|
|
752
752
|
}, I = function(F) {
|
|
@@ -755,13 +755,13 @@ function Bs(t, e, n) {
|
|
|
755
755
|
var $ = F - s.current;
|
|
756
756
|
return !s.current || $ >= e || $ < 0 || y && F - i.current >= b;
|
|
757
757
|
}, R = function(F) {
|
|
758
|
-
return o.current = null, _ && c.current ?
|
|
758
|
+
return o.current = null, _ && c.current ? k(F) : (c.current = f.current = null, l.current);
|
|
759
759
|
}, Q = function F() {
|
|
760
760
|
var $ = Date.now();
|
|
761
761
|
if (I($))
|
|
762
762
|
return R($);
|
|
763
763
|
if (d.current) {
|
|
764
|
-
var
|
|
764
|
+
var j = e - ($ - s.current), x = y ? Math.min(j, b - ($ - i.current)) : j;
|
|
765
765
|
w(F, x);
|
|
766
766
|
}
|
|
767
767
|
}, C = function() {
|
|
@@ -769,9 +769,9 @@ function Bs(t, e, n) {
|
|
|
769
769
|
var F = Date.now(), $ = I(F);
|
|
770
770
|
if (c.current = [].slice.call(arguments), f.current = r, s.current = F, $) {
|
|
771
771
|
if (!o.current && d.current)
|
|
772
|
-
return i.current = s.current, w(Q, e),
|
|
772
|
+
return i.current = s.current, w(Q, e), h ? k(s.current) : l.current;
|
|
773
773
|
if (y)
|
|
774
|
-
return w(Q, e),
|
|
774
|
+
return w(Q, e), k(s.current);
|
|
775
775
|
}
|
|
776
776
|
return o.current || w(Q, e), l.current;
|
|
777
777
|
}
|
|
@@ -783,8 +783,8 @@ function Bs(t, e, n) {
|
|
|
783
783
|
}, C.flush = function() {
|
|
784
784
|
return o.current ? R(Date.now()) : l.current;
|
|
785
785
|
}, C;
|
|
786
|
-
}, [
|
|
787
|
-
return
|
|
786
|
+
}, [h, y, e, b, _, p, m, v]);
|
|
787
|
+
return T;
|
|
788
788
|
}
|
|
789
789
|
function fa(t, e, n) {
|
|
790
790
|
var r = n === void 0 ? {} : n, s = r.leading, i = r.trailing;
|
|
@@ -1453,11 +1453,11 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1453
1453
|
const y = Object.assign({}, e), v = pa(Object.keys(y));
|
|
1454
1454
|
e = ha(p, v, y);
|
|
1455
1455
|
}
|
|
1456
|
-
const
|
|
1457
|
-
typeof e == "string" &&
|
|
1456
|
+
const h = [];
|
|
1457
|
+
typeof e == "string" && h.push(e), r && (h.push("icon"), typeof r == "object" ? (h.push(r.icon), r.position ? h.push(r.position) : h.push("left"), r.hover && h.push(`hover_${r.hover}`), r.animate && (h.push("animate"), typeof r.animate == "string" && h.push(r.animate))) : (h.push(r), !r.includes("right") && !r.includes("left") && h.push("left"))), n.muted && h.push("muted"), n.fullWidth && h.push("full-width");
|
|
1458
1458
|
const _ = {
|
|
1459
1459
|
...d,
|
|
1460
|
-
className: S(t, c,
|
|
1460
|
+
className: S(t, c, h, {
|
|
1461
1461
|
"no-text": !u,
|
|
1462
1462
|
disabled: f,
|
|
1463
1463
|
button: s
|
|
@@ -1613,13 +1613,13 @@ const kt = ({ image: t, className: e, testId: n }) => {
|
|
|
1613
1613
|
loading: l,
|
|
1614
1614
|
decoding: u,
|
|
1615
1615
|
fetchPriority: d
|
|
1616
|
-
} = t, { range: m, sizes: p } = ri(t),
|
|
1616
|
+
} = t, { range: m, sizes: p } = ri(t), h = hn({ format: "avif", query: o, range: m, url: c }), _ = hn({ format: "webp", query: o, range: m, url: c }), y = hn({ format: "", query: o, range: m, url: c });
|
|
1617
1617
|
return /* @__PURE__ */ a.jsxs("picture", { className: e, children: [
|
|
1618
1618
|
i !== "image/gif" && /* @__PURE__ */ a.jsx(
|
|
1619
1619
|
"source",
|
|
1620
1620
|
{
|
|
1621
1621
|
type: "image/avif",
|
|
1622
|
-
srcSet:
|
|
1622
|
+
srcSet: h,
|
|
1623
1623
|
sizes: p,
|
|
1624
1624
|
"data-testid": "source"
|
|
1625
1625
|
}
|
|
@@ -1937,7 +1937,7 @@ const Rl = ({
|
|
|
1937
1937
|
l === "ready-to-close" && u("closing");
|
|
1938
1938
|
}, [l]);
|
|
1939
1939
|
const d = ({ propertyName: p }) => {
|
|
1940
|
-
p === "max-height" && u((
|
|
1940
|
+
p === "max-height" && u((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
|
|
1941
1941
|
};
|
|
1942
1942
|
if (!r)
|
|
1943
1943
|
return null;
|
|
@@ -2249,17 +2249,17 @@ const Xn = ({
|
|
|
2249
2249
|
if (!t || typeof t != "number")
|
|
2250
2250
|
return null;
|
|
2251
2251
|
const c = (u) => {
|
|
2252
|
-
const d = u / 60, m = Math.floor(d), p = (d - m) * 60,
|
|
2252
|
+
const d = u / 60, m = Math.floor(d), p = (d - m) * 60, h = Math.round(p), _ = `${i.formatMessage(
|
|
2253
2253
|
{ id: `${o}hours` },
|
|
2254
2254
|
{ time: m }
|
|
2255
|
-
)}${m > 0 &&
|
|
2255
|
+
)}${m > 0 && h > 0 ? ", " : ""}${i.formatMessage(
|
|
2256
2256
|
{ id: `${o}minutes` },
|
|
2257
|
-
{ time:
|
|
2257
|
+
{ time: h }
|
|
2258
2258
|
)}`;
|
|
2259
2259
|
return { text: `${m > 0 ? `${i.formatMessage(
|
|
2260
2260
|
{ id: `${o}hours_short` },
|
|
2261
2261
|
{ time: m }
|
|
2262
|
-
)} ` : ""}${
|
|
2262
|
+
)} ` : ""}${h > 0 ? i.formatMessage({ id: `${o}minutes_short` }, { time: h }) : ""}`, ariaText: _ };
|
|
2263
2263
|
};
|
|
2264
2264
|
let { text: f, ariaText: l } = c(t);
|
|
2265
2265
|
if (e) {
|
|
@@ -2398,8 +2398,8 @@ const xi = ({ icon: t, description: e, ctaMessage: n, href: r, showEditButton: s
|
|
|
2398
2398
|
}, functions: {
|
|
2399
2399
|
...n == null ? void 0 : n.functions,
|
|
2400
2400
|
onSuccess: async (m) => {
|
|
2401
|
-
var p,
|
|
2402
|
-
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((
|
|
2401
|
+
var p, h;
|
|
2402
|
+
(p = n == null ? void 0 : n.functions) != null && p.onSuccess && await ((h = n == null ? void 0 : n.functions) == null ? void 0 : h.onSuccess(m)), l(!1);
|
|
2403
2403
|
},
|
|
2404
2404
|
onCancel: d
|
|
2405
2405
|
} })
|
|
@@ -2450,7 +2450,7 @@ const Bl = ({
|
|
|
2450
2450
|
children: e.map(({ logo: l, nameOfBusiness: u, link: d = !1, description: m = !1 }, p) => {
|
|
2451
2451
|
if (!l || !l.url)
|
|
2452
2452
|
return null;
|
|
2453
|
-
const
|
|
2453
|
+
const h = /* @__PURE__ */ a.jsx(
|
|
2454
2454
|
"img",
|
|
2455
2455
|
{
|
|
2456
2456
|
src: l.url,
|
|
@@ -2460,7 +2460,7 @@ const Bl = ({
|
|
|
2460
2460
|
}
|
|
2461
2461
|
);
|
|
2462
2462
|
return /* @__PURE__ */ a.jsxs("li", { children: [
|
|
2463
|
-
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: d ? /* @__PURE__ */ a.jsx("a", { href: d, target: "_blank", rel: "nofollow noreferrer noopener", children:
|
|
2463
|
+
/* @__PURE__ */ a.jsx("p", { className: "img-wrapper", children: d ? /* @__PURE__ */ a.jsx("a", { href: d, target: "_blank", rel: "nofollow noreferrer noopener", children: h }) : h }),
|
|
2464
2464
|
m && /* @__PURE__ */ a.jsx("small", { children: m })
|
|
2465
2465
|
] }, window.btoa(`${l.url}_${p}`));
|
|
2466
2466
|
})
|
|
@@ -2850,8 +2850,8 @@ const Nr = 256, Ye = ({
|
|
|
2850
2850
|
const m = d.getContext("2d");
|
|
2851
2851
|
if (!m)
|
|
2852
2852
|
return;
|
|
2853
|
-
const p = s,
|
|
2854
|
-
typeof window < "u" && window.devicePixelRatio && (d.width = p * window.devicePixelRatio, d.height =
|
|
2853
|
+
const p = s, h = i;
|
|
2854
|
+
typeof window < "u" && window.devicePixelRatio && (d.width = p * window.devicePixelRatio, d.height = h * window.devicePixelRatio, m.scale(window.devicePixelRatio, window.devicePixelRatio)), m.fillStyle = Ri(n), m.fillRect(0, 0, p, h), m.font = `${p / 3}px Arial`, m.textAlign = "center", m.fillStyle = "white", m.fillText(ja(n), p / 2, h / 1.6);
|
|
2855
2855
|
}, [n]);
|
|
2856
2856
|
let u = !1;
|
|
2857
2857
|
return e && e !== "" && !c && (e.includes("http") || e.includes("//")) && (u = !0), /* @__PURE__ */ a.jsx(
|
|
@@ -2918,8 +2918,8 @@ const tr = ({
|
|
|
2918
2918
|
href: l,
|
|
2919
2919
|
gtmType: s,
|
|
2920
2920
|
gtmContext: r,
|
|
2921
|
-
onClick: (
|
|
2922
|
-
|
|
2921
|
+
onClick: (h) => {
|
|
2922
|
+
h == null || h.stopPropagation();
|
|
2923
2923
|
},
|
|
2924
2924
|
children: [
|
|
2925
2925
|
/* @__PURE__ */ a.jsx(Ye, { name: f, src: u }),
|
|
@@ -2962,12 +2962,12 @@ const Pr = {
|
|
|
2962
2962
|
className: S("contributors", l, s, { "has-gap": i }),
|
|
2963
2963
|
children: /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
2964
2964
|
/* @__PURE__ */ a.jsx("ul", { children: n.map((m, p) => {
|
|
2965
|
-
let
|
|
2965
|
+
let h, _ = "";
|
|
2966
2966
|
if (p < c) {
|
|
2967
2967
|
const { name: y = "", image: v = "" } = ka(m);
|
|
2968
2968
|
if (o)
|
|
2969
2969
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "contributor" }, p);
|
|
2970
|
-
|
|
2970
|
+
h = /* @__PURE__ */ a.jsx(
|
|
2971
2971
|
Ye,
|
|
2972
2972
|
{
|
|
2973
2973
|
name: y,
|
|
@@ -2978,7 +2978,7 @@ const Pr = {
|
|
|
2978
2978
|
);
|
|
2979
2979
|
} else if (p === c) {
|
|
2980
2980
|
const y = (e || n.length) - c;
|
|
2981
|
-
|
|
2981
|
+
h = /* @__PURE__ */ a.jsxs(
|
|
2982
2982
|
"small",
|
|
2983
2983
|
{
|
|
2984
2984
|
className: S({ "large-number": y > 99 }),
|
|
@@ -2989,7 +2989,7 @@ const Pr = {
|
|
|
2989
2989
|
}
|
|
2990
2990
|
), _ = "number-left";
|
|
2991
2991
|
}
|
|
2992
|
-
return
|
|
2992
|
+
return h ? /* @__PURE__ */ a.jsx("li", { className: S("contributor", _), children: h }, p) : null;
|
|
2993
2993
|
}) }),
|
|
2994
2994
|
r && /* @__PURE__ */ a.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? d.formatMessage({ id: `member_${n[0]}` }) : et(n[0].name || "", 20) : f || null })
|
|
2995
2995
|
] })
|
|
@@ -3010,7 +3010,7 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3010
3010
|
}), [c, f] = X(!1), l = sa(
|
|
3011
3011
|
(p) => {
|
|
3012
3012
|
p.preventDefault(), p.stopPropagation();
|
|
3013
|
-
const
|
|
3013
|
+
const h = (_) => {
|
|
3014
3014
|
o({
|
|
3015
3015
|
path: `${Ct}error_verificationFailedToSend`,
|
|
3016
3016
|
type: "error",
|
|
@@ -3032,13 +3032,13 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3032
3032
|
});
|
|
3033
3033
|
};
|
|
3034
3034
|
if (typeof r != "function") {
|
|
3035
|
-
|
|
3035
|
+
h(s.formatMessage({ id: `${Ct}error_noFunction` }));
|
|
3036
3036
|
return;
|
|
3037
3037
|
}
|
|
3038
3038
|
f(!0), r(e).then(() => {
|
|
3039
3039
|
localStorage.setItem("email", e), window.location.href = n || "/signup/verify-email";
|
|
3040
3040
|
}).catch((_) => {
|
|
3041
|
-
|
|
3041
|
+
h(_.message);
|
|
3042
3042
|
}).finally(() => {
|
|
3043
3043
|
f(!1);
|
|
3044
3044
|
});
|
|
@@ -3048,20 +3048,20 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3048
3048
|
);
|
|
3049
3049
|
ae(
|
|
3050
3050
|
() => {
|
|
3051
|
-
let p = Ct,
|
|
3051
|
+
let p = Ct, h = "default", _ = {}, y = {};
|
|
3052
3052
|
switch (t) {
|
|
3053
3053
|
case "gov":
|
|
3054
|
-
p += "autoApproved",
|
|
3054
|
+
p += "autoApproved", h = "success";
|
|
3055
3055
|
break;
|
|
3056
3056
|
case "nonGov":
|
|
3057
|
-
p += "unrecognisedEmail",
|
|
3057
|
+
p += "unrecognisedEmail", h = "error", _ = {
|
|
3058
3058
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
3059
3059
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
3060
3060
|
"data-gtm-event-type": "LearnMoreClick"
|
|
3061
3061
|
};
|
|
3062
3062
|
break;
|
|
3063
3063
|
case "pending":
|
|
3064
|
-
p += "pendingApproval",
|
|
3064
|
+
p += "pendingApproval", h = "error", y = {
|
|
3065
3065
|
href: "mailto:concierge@apolitical.co",
|
|
3066
3066
|
className: "gtm-trackable",
|
|
3067
3067
|
"data-gtm-event-context": "EmailExistsBox",
|
|
@@ -3069,7 +3069,7 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3069
3069
|
};
|
|
3070
3070
|
break;
|
|
3071
3071
|
case "verify":
|
|
3072
|
-
p += "emailUnverified",
|
|
3072
|
+
p += "emailUnverified", h = "error", _ = {
|
|
3073
3073
|
href: "#",
|
|
3074
3074
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
3075
3075
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -3079,7 +3079,7 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3079
3079
|
};
|
|
3080
3080
|
break;
|
|
3081
3081
|
case "exists":
|
|
3082
|
-
p += "emailAlreadyExists",
|
|
3082
|
+
p += "emailAlreadyExists", h = "error", _ = {
|
|
3083
3083
|
href: "/user-onboarding/login",
|
|
3084
3084
|
"data-gtm-event-context": "EmailExistsBox",
|
|
3085
3085
|
"data-gtm-event-type": "login-click"
|
|
@@ -3098,14 +3098,14 @@ const Ct = "emailHelperTextBox_", Oi = ({
|
|
|
3098
3098
|
};
|
|
3099
3099
|
break;
|
|
3100
3100
|
}
|
|
3101
|
-
o({ ...i, path: p, type:
|
|
3101
|
+
o({ ...i, path: p, type: h, link: _, mail: y });
|
|
3102
3102
|
},
|
|
3103
3103
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
3104
3104
|
[t]
|
|
3105
3105
|
);
|
|
3106
3106
|
const u = {};
|
|
3107
3107
|
return ["link", "mail"].forEach((p) => {
|
|
3108
|
-
u[p] = Object.keys(i[p]).length ? (
|
|
3108
|
+
u[p] = Object.keys(i[p]).length ? (h) => /* @__PURE__ */ a.jsx("a", { ...i[p], children: h }) : (h) => h;
|
|
3109
3109
|
}), /* @__PURE__ */ a.jsx(
|
|
3110
3110
|
ci,
|
|
3111
3111
|
{
|
|
@@ -3202,15 +3202,15 @@ const Qe = {
|
|
|
3202
3202
|
c && !d ? (async () => {
|
|
3203
3203
|
try {
|
|
3204
3204
|
const b = await s(c) || [];
|
|
3205
|
-
m((
|
|
3205
|
+
m((T) => ({ ...T, predictions: b }));
|
|
3206
3206
|
} catch (b) {
|
|
3207
|
-
console.error("Error fetching predictions:", b), m((
|
|
3207
|
+
console.error("Error fetching predictions:", b), m((T) => ({ ...T, predictions: [] }));
|
|
3208
3208
|
}
|
|
3209
3209
|
})() : m((v) => ({ ...v, predictions: [] }));
|
|
3210
3210
|
}, [c, d]), ae(() => {
|
|
3211
3211
|
u >= 0 && l[u] && f((v) => ({ ...v, displayInput: l[u].description }));
|
|
3212
3212
|
}, [u, l]);
|
|
3213
|
-
const
|
|
3213
|
+
const h = (v) => {
|
|
3214
3214
|
[Qe.DOWN, Qe.UP, Qe.ENTER].includes(v.key) && (v.preventDefault(), v.key === Qe.DOWN && u < l.length - 1 ? m((b) => ({ ...b, activePredictionIndex: u + 1 })) : v.key === Qe.UP && u > 0 ? m((b) => ({ ...b, activePredictionIndex: u - 1 })) : v.key === Qe.ENTER && u > -1 && (r(l[u].description), f((b) => ({ ...b, input: l[u].description })), m((b) => ({ ...b, predictions: [], isPredictionSelected: !0 }))));
|
|
3215
3215
|
}, _ = (v) => {
|
|
3216
3216
|
r(v.target.value), f((b) => ({ ...b, input: v.target.value, displayInput: v.target.value })), m((b) => ({ ...b, activePredictionIndex: -1, isPredictionSelected: !1 }));
|
|
@@ -3224,7 +3224,7 @@ const Qe = {
|
|
|
3224
3224
|
type: "text",
|
|
3225
3225
|
value: o,
|
|
3226
3226
|
onChange: _,
|
|
3227
|
-
onKeyDown:
|
|
3227
|
+
onKeyDown: h,
|
|
3228
3228
|
placeholder: e
|
|
3229
3229
|
}
|
|
3230
3230
|
),
|
|
@@ -3232,7 +3232,7 @@ const Qe = {
|
|
|
3232
3232
|
"li",
|
|
3233
3233
|
{
|
|
3234
3234
|
onClick: () => y(v),
|
|
3235
|
-
onMouseEnter: () => m((
|
|
3235
|
+
onMouseEnter: () => m((T) => ({ ...T, activePredictionIndex: b })),
|
|
3236
3236
|
className: S("predictions-list-item", { active: b === u }),
|
|
3237
3237
|
children: v.description
|
|
3238
3238
|
},
|
|
@@ -3255,7 +3255,7 @@ const Ea = ({
|
|
|
3255
3255
|
value: u,
|
|
3256
3256
|
...d
|
|
3257
3257
|
}) => {
|
|
3258
|
-
const m = H(), { onChange: p, ...
|
|
3258
|
+
const m = H(), { onChange: p, ...h } = r, _ = () => {
|
|
3259
3259
|
e || p(u ? null : f);
|
|
3260
3260
|
}, y = /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3261
3261
|
/* @__PURE__ */ a.jsx(
|
|
@@ -3288,7 +3288,7 @@ const Ea = ({
|
|
|
3288
3288
|
},
|
|
3289
3289
|
className: S("checkbox-wrapper", t),
|
|
3290
3290
|
...d,
|
|
3291
|
-
...
|
|
3291
|
+
...h
|
|
3292
3292
|
},
|
|
3293
3293
|
y
|
|
3294
3294
|
);
|
|
@@ -3317,12 +3317,12 @@ const Li = ({
|
|
|
3317
3317
|
multiSelectOptions: f,
|
|
3318
3318
|
id: l
|
|
3319
3319
|
}) => {
|
|
3320
|
-
const u = H(), [d, m] = X(!1), p = r || n,
|
|
3320
|
+
const u = H(), [d, m] = X(!1), p = r || n, h = Array.isArray(p) ? [...p] : p ? [p] : [], [_, y] = X(h);
|
|
3321
3321
|
let v;
|
|
3322
3322
|
Array.isArray(_) && _.length === 1 && typeof _[0] == "string" ? v = e && _ ? e.find((R) => R.id === _[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(_) && _.length === 1 && typeof _[0] != "string" ? v = _[0] : v = { id: "", label: "" }, ae(() => {
|
|
3323
|
-
y(
|
|
3323
|
+
y(h);
|
|
3324
3324
|
}, [r, n]);
|
|
3325
|
-
const { onChange: b, onMultiSelectSubmit:
|
|
3325
|
+
const { onChange: b, onMultiSelectSubmit: T, ...k } = s, w = (R) => {
|
|
3326
3326
|
if (c) {
|
|
3327
3327
|
let Q = [];
|
|
3328
3328
|
_ != null && _.includes(R.id) ? Q = _.filter((C) => C !== R.id) : Q = [..._, R.id], y([...Q]), b && b([...Q]);
|
|
@@ -3347,7 +3347,7 @@ const Li = ({
|
|
|
3347
3347
|
R.preventDefault(), R.stopPropagation(), m(!d);
|
|
3348
3348
|
},
|
|
3349
3349
|
"data-testid": "dropdown-selector",
|
|
3350
|
-
...
|
|
3350
|
+
...k,
|
|
3351
3351
|
children: [
|
|
3352
3352
|
c ? `${o} · ${_.length}` : v.label,
|
|
3353
3353
|
/* @__PURE__ */ a.jsx(Ii, { direction: d ? "up" : "down" })
|
|
@@ -3364,7 +3364,7 @@ const Li = ({
|
|
|
3364
3364
|
w(Q);
|
|
3365
3365
|
},
|
|
3366
3366
|
hidden: !d,
|
|
3367
|
-
...
|
|
3367
|
+
...k,
|
|
3368
3368
|
children: e == null ? void 0 : e.map((R) => /* @__PURE__ */ a.jsx("option", { value: R.id, children: R.label }, R.id))
|
|
3369
3369
|
}
|
|
3370
3370
|
),
|
|
@@ -3431,7 +3431,7 @@ const Li = ({
|
|
|
3431
3431
|
{
|
|
3432
3432
|
variant: "secondary",
|
|
3433
3433
|
onClick: () => {
|
|
3434
|
-
|
|
3434
|
+
T && T(_), document.dispatchEvent(
|
|
3435
3435
|
new CustomEvent("dropdownMultiSelectSubmit", {
|
|
3436
3436
|
detail: {
|
|
3437
3437
|
id: l || "dropdown-multi-select",
|
|
@@ -3463,7 +3463,7 @@ const Bi = ({
|
|
|
3463
3463
|
value: u,
|
|
3464
3464
|
...d
|
|
3465
3465
|
}) => {
|
|
3466
|
-
const m = H(), p = i ? u : [],
|
|
3466
|
+
const m = H(), p = i ? u : [], h = u;
|
|
3467
3467
|
return /* @__PURE__ */ a.jsx(
|
|
3468
3468
|
"ul",
|
|
3469
3469
|
{
|
|
@@ -3477,7 +3477,7 @@ const Bi = ({
|
|
|
3477
3477
|
value: v = _,
|
|
3478
3478
|
disabled: b = !1
|
|
3479
3479
|
}) => {
|
|
3480
|
-
const
|
|
3480
|
+
const T = `${r}_${_}`, k = () => {
|
|
3481
3481
|
if (b)
|
|
3482
3482
|
return;
|
|
3483
3483
|
let w;
|
|
@@ -3485,20 +3485,20 @@ const Bi = ({
|
|
|
3485
3485
|
const I = p == null ? void 0 : p.indexOf(v);
|
|
3486
3486
|
Array.isArray(p) && I >= 0 ? (w = p, w.splice(I, 1)) : (!p || p.length === 0 ? w = [] : w = p, w.push(v));
|
|
3487
3487
|
} else
|
|
3488
|
-
w =
|
|
3488
|
+
w = h === v ? void 0 : v;
|
|
3489
3489
|
e.onChange(w);
|
|
3490
3490
|
};
|
|
3491
3491
|
return /* @__PURE__ */ a.jsx(
|
|
3492
3492
|
Ea,
|
|
3493
3493
|
{
|
|
3494
3494
|
element: "li",
|
|
3495
|
-
id:
|
|
3495
|
+
id: T,
|
|
3496
3496
|
type: l === "checkboxes" ? "checkbox" : "radio",
|
|
3497
3497
|
shownValue: v,
|
|
3498
|
-
value: i ? p == null ? void 0 : p.includes(v) :
|
|
3498
|
+
value: i ? p == null ? void 0 : p.includes(v) : h === v,
|
|
3499
3499
|
functions: {
|
|
3500
3500
|
...e,
|
|
3501
|
-
onChange:
|
|
3501
|
+
onChange: k
|
|
3502
3502
|
},
|
|
3503
3503
|
intlPath: n,
|
|
3504
3504
|
label: y || m.formatMessage({
|
|
@@ -3506,7 +3506,7 @@ const Bi = ({
|
|
|
3506
3506
|
}),
|
|
3507
3507
|
disabled: b
|
|
3508
3508
|
},
|
|
3509
|
-
|
|
3509
|
+
T
|
|
3510
3510
|
);
|
|
3511
3511
|
}
|
|
3512
3512
|
)
|
|
@@ -3568,7 +3568,7 @@ const Je = {
|
|
|
3568
3568
|
value: l,
|
|
3569
3569
|
...u
|
|
3570
3570
|
}) => {
|
|
3571
|
-
const d = H(), m = f && f.some(({ condition:
|
|
3571
|
+
const d = H(), m = f && f.some(({ condition: k }) => k === "required"), p = (l == null ? void 0 : l.toString().length) || 0, h = c && Je[c] && Je[c].component ? Je[c].component : gt, _ = {};
|
|
3572
3572
|
c && ["checkboxes"].includes(c) ? _.element = "span" : _.htmlFor = t;
|
|
3573
3573
|
let y = {
|
|
3574
3574
|
...u,
|
|
@@ -3581,24 +3581,24 @@ const Je = {
|
|
|
3581
3581
|
functions: pt(s),
|
|
3582
3582
|
value: l
|
|
3583
3583
|
};
|
|
3584
|
-
i > 0 && (y["data-character-limit"] = i, y.functions && (y.functions.onChange = (
|
|
3585
|
-
((
|
|
3584
|
+
i > 0 && (y["data-character-limit"] = i, y.functions && (y.functions.onChange = (k) => {
|
|
3585
|
+
((k == null ? void 0 : k.toString().length) || 0) > i && (k = k == null ? void 0 : k.toString().slice(0, i)), s.onChange(k);
|
|
3586
3586
|
})), c && Je[c] && Je[c].props && (y = { ...y, ...Je[c].props }), c && ["checkboxes"].includes(c) && (y.intlPath = `${e}_${t}`), r && (y["aria-invalid"] = !0, y["aria-describedby"] = `error-${t}`);
|
|
3587
|
-
const v = u.label || d.formatMessage({ id: e ? `${e}_${t}` : t }), b = ({ ...
|
|
3588
|
-
|
|
3587
|
+
const v = u.label || d.formatMessage({ id: e ? `${e}_${t}` : t }), b = ({ ...k }) => r ? Y.createElement(
|
|
3588
|
+
k.as || "dd",
|
|
3589
3589
|
{
|
|
3590
3590
|
id: `error-${t}`,
|
|
3591
3591
|
className: "error text-small",
|
|
3592
3592
|
role: "alert",
|
|
3593
3593
|
"aria-live": "assertive",
|
|
3594
|
-
...
|
|
3594
|
+
...k
|
|
3595
3595
|
},
|
|
3596
3596
|
r
|
|
3597
3597
|
) : null;
|
|
3598
3598
|
if (c && ["checkbox"].includes(c))
|
|
3599
3599
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3600
3600
|
/* @__PURE__ */ a.jsx(
|
|
3601
|
-
|
|
3601
|
+
h,
|
|
3602
3602
|
{
|
|
3603
3603
|
...y,
|
|
3604
3604
|
label: v,
|
|
@@ -3607,13 +3607,13 @@ const Je = {
|
|
|
3607
3607
|
),
|
|
3608
3608
|
/* @__PURE__ */ a.jsx(b, { as: "p" })
|
|
3609
3609
|
] });
|
|
3610
|
-
const
|
|
3611
|
-
...
|
|
3610
|
+
const T = (k) => Y.createElement(k.element || "label", {
|
|
3611
|
+
...k,
|
|
3612
3612
|
className: "checkboxes-label text-small",
|
|
3613
3613
|
"data-testid": `label-${t}`
|
|
3614
3614
|
});
|
|
3615
3615
|
return /* @__PURE__ */ a.jsxs("dl", { className: S("field-wrapper text-medium", n), children: [
|
|
3616
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(
|
|
3616
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsxs(T, { ..._, children: [
|
|
3617
3617
|
v,
|
|
3618
3618
|
m && o && /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
3619
3619
|
" ",
|
|
@@ -3625,7 +3625,7 @@ const Je = {
|
|
|
3625
3625
|
] })
|
|
3626
3626
|
] }) }),
|
|
3627
3627
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
3628
|
-
/* @__PURE__ */ a.jsx(
|
|
3628
|
+
/* @__PURE__ */ a.jsx(h, { ...y }),
|
|
3629
3629
|
i > 0 ? /* @__PURE__ */ a.jsxs(
|
|
3630
3630
|
"small",
|
|
3631
3631
|
{
|
|
@@ -3685,14 +3685,14 @@ const Je = {
|
|
|
3685
3685
|
for (const m of o)
|
|
3686
3686
|
if (m.validation)
|
|
3687
3687
|
for (let p = 0; p < m.validation.length; p++) {
|
|
3688
|
-
const { condition:
|
|
3688
|
+
const { condition: h = "required", error: _ = !1 } = m.validation[p];
|
|
3689
3689
|
let y = !1;
|
|
3690
|
-
if (typeof
|
|
3691
|
-
const v =
|
|
3690
|
+
if (typeof h == "function") {
|
|
3691
|
+
const v = h(i);
|
|
3692
3692
|
v && (y = _ || v);
|
|
3693
3693
|
} else {
|
|
3694
3694
|
const v = i[m.id];
|
|
3695
|
-
switch (
|
|
3695
|
+
switch (h) {
|
|
3696
3696
|
case "required":
|
|
3697
3697
|
(!v || typeof v == "string" && v.trim().length === 0) && (y = _ || (u == null ? void 0 : u.formatMessage({ id: "form_error_required" })));
|
|
3698
3698
|
break;
|
|
@@ -3781,10 +3781,10 @@ const rn = ({
|
|
|
3781
3781
|
},
|
|
3782
3782
|
...p
|
|
3783
3783
|
}) => {
|
|
3784
|
-
const { customOnSubmit:
|
|
3784
|
+
const { customOnSubmit: h, hideButton: _, ...y } = i, v = 40, {
|
|
3785
3785
|
shouldShowCancelButton: b = !1,
|
|
3786
|
-
shouldReset:
|
|
3787
|
-
showRequiredLabels:
|
|
3786
|
+
shouldReset: T = !0,
|
|
3787
|
+
showRequiredLabels: k = !0,
|
|
3788
3788
|
showSuccessMessage: w = !1
|
|
3789
3789
|
} = c || {}, I = H(), R = {};
|
|
3790
3790
|
t.length && t.forEach((z) => {
|
|
@@ -3796,15 +3796,15 @@ const rn = ({
|
|
|
3796
3796
|
formSubmitted: !1,
|
|
3797
3797
|
errors: {},
|
|
3798
3798
|
values: R
|
|
3799
|
-
}), { errors: F, isSubmitting: $, formSubmitted:
|
|
3799
|
+
}), { errors: F, isSubmitting: $, formSubmitted: j, values: x } = Q;
|
|
3800
3800
|
ae(() => {
|
|
3801
|
-
|
|
3801
|
+
T && j && (bn = setTimeout(() => {
|
|
3802
3802
|
C({
|
|
3803
3803
|
type: "updateValue",
|
|
3804
3804
|
payload: { key: "formSubmitted", value: !1 }
|
|
3805
3805
|
});
|
|
3806
3806
|
}, 3e3));
|
|
3807
|
-
}, [
|
|
3807
|
+
}, [j]), ae(() => () => {
|
|
3808
3808
|
bn && clearTimeout(bn);
|
|
3809
3809
|
}, []), ae(() => {
|
|
3810
3810
|
const z = (K) => {
|
|
@@ -3830,7 +3830,7 @@ const rn = ({
|
|
|
3830
3830
|
const Z = [
|
|
3831
3831
|
{
|
|
3832
3832
|
...y,
|
|
3833
|
-
icon:
|
|
3833
|
+
icon: j ? { icon: "tick", position: "left" } : !1,
|
|
3834
3834
|
className: "gtm-trackable",
|
|
3835
3835
|
onClick: (z) => {
|
|
3836
3836
|
var P;
|
|
@@ -3860,7 +3860,7 @@ const rn = ({
|
|
|
3860
3860
|
dispatch: C,
|
|
3861
3861
|
onSuccess: async (q) => {
|
|
3862
3862
|
try {
|
|
3863
|
-
await l(q), C({ type:
|
|
3863
|
+
await l(q), C({ type: T ? "formSubmittedAndReset" : "formSubmitted" });
|
|
3864
3864
|
} catch (B) {
|
|
3865
3865
|
d(B), C({
|
|
3866
3866
|
type: "updateValue",
|
|
@@ -3878,10 +3878,10 @@ const rn = ({
|
|
|
3878
3878
|
}
|
|
3879
3879
|
});
|
|
3880
3880
|
},
|
|
3881
|
-
disabled: $ ||
|
|
3881
|
+
disabled: $ || j || i.disabled,
|
|
3882
3882
|
"data-gtm-event-context": f.context,
|
|
3883
3883
|
"data-gtm-event-type": f.event,
|
|
3884
|
-
children: $ ||
|
|
3884
|
+
children: $ || j ? I.formatMessage({
|
|
3885
3885
|
id: `form_${$ ? "submitting" : "submitted"}`
|
|
3886
3886
|
}) : i.text
|
|
3887
3887
|
}
|
|
@@ -3891,7 +3891,7 @@ const rn = ({
|
|
|
3891
3891
|
className: "gtm-trackable",
|
|
3892
3892
|
"data-gtm-event-context": f.context,
|
|
3893
3893
|
"data-gtm-event-type": f.event,
|
|
3894
|
-
disabled: $ ||
|
|
3894
|
+
disabled: $ || j,
|
|
3895
3895
|
onClick: u,
|
|
3896
3896
|
children: o.text || I.formatMessage({ id: "form_cancel" })
|
|
3897
3897
|
}), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
@@ -3910,7 +3910,7 @@ const rn = ({
|
|
|
3910
3910
|
text: I.formatMessage({ id: "form_error_generalError" })
|
|
3911
3911
|
}
|
|
3912
3912
|
) : null,
|
|
3913
|
-
(!
|
|
3913
|
+
(!T || !$ && !j || h) && t.map((z, K) => {
|
|
3914
3914
|
const {
|
|
3915
3915
|
id: E = z.name || K,
|
|
3916
3916
|
component: P,
|
|
@@ -3925,7 +3925,7 @@ const rn = ({
|
|
|
3925
3925
|
{
|
|
3926
3926
|
intlPath: s,
|
|
3927
3927
|
...z,
|
|
3928
|
-
showRequiredLabels:
|
|
3928
|
+
showRequiredLabels: k,
|
|
3929
3929
|
value: B,
|
|
3930
3930
|
error: F == null ? void 0 : F[E],
|
|
3931
3931
|
functions: {
|
|
@@ -3938,12 +3938,12 @@ const rn = ({
|
|
|
3938
3938
|
E
|
|
3939
3939
|
);
|
|
3940
3940
|
}),
|
|
3941
|
-
_ ? null : ($ ||
|
|
3941
|
+
_ ? null : ($ || j) && h ? h : /* @__PURE__ */ a.jsx(
|
|
3942
3942
|
jt,
|
|
3943
3943
|
{
|
|
3944
3944
|
className: S("cta", {
|
|
3945
|
-
center: $ ||
|
|
3946
|
-
submitted:
|
|
3945
|
+
center: $ || j,
|
|
3946
|
+
submitted: j
|
|
3947
3947
|
}),
|
|
3948
3948
|
buttons: Z
|
|
3949
3949
|
}
|
|
@@ -3951,7 +3951,7 @@ const rn = ({
|
|
|
3951
3951
|
]
|
|
3952
3952
|
}
|
|
3953
3953
|
),
|
|
3954
|
-
w &&
|
|
3954
|
+
w && j && /* @__PURE__ */ a.jsx(Wt, { className: "success", children: typeof w == "string" ? w : I.formatMessage({ id: "form_success" }) })
|
|
3955
3955
|
] });
|
|
3956
3956
|
};
|
|
3957
3957
|
const $t = "passwordRules_", Sa = "isMoreThanEightCharacters", Ca = "includesNumberAndSymbol", $a = "includesLowerAndUppercase", zi = {
|
|
@@ -4026,18 +4026,18 @@ const Vl = ({
|
|
|
4026
4026
|
o && !f.setUp && u();
|
|
4027
4027
|
}, [o]), !o)
|
|
4028
4028
|
return /* @__PURE__ */ a.jsx(Se, { className: "rating-placeholder" });
|
|
4029
|
-
const { id: d, rating: m, disabled: p } = f,
|
|
4030
|
-
text: c.formatMessage({ id: `${
|
|
4031
|
-
low: c.formatMessage({ id: `${
|
|
4032
|
-
high: c.formatMessage({ id: `${
|
|
4033
|
-
success: c.formatMessage({ id: `${
|
|
4029
|
+
const { id: d, rating: m, disabled: p } = f, h = "ratings_", _ = {
|
|
4030
|
+
text: c.formatMessage({ id: `${h}text` }),
|
|
4031
|
+
low: c.formatMessage({ id: `${h}low` }),
|
|
4032
|
+
high: c.formatMessage({ id: `${h}high` }),
|
|
4033
|
+
success: c.formatMessage({ id: `${h}success` }),
|
|
4034
4034
|
...t
|
|
4035
4035
|
}, y = async (v) => {
|
|
4036
4036
|
if (!(!d || p))
|
|
4037
4037
|
try {
|
|
4038
4038
|
l((b) => ({ ...b, rating: v, disabled: !0 })), await r({ id: d, value: v });
|
|
4039
4039
|
} catch (b) {
|
|
4040
|
-
l((
|
|
4040
|
+
l((T) => ({ ...T, rating: null })), s(b);
|
|
4041
4041
|
} finally {
|
|
4042
4042
|
l((b) => ({ ...b, disabled: !1 }));
|
|
4043
4043
|
}
|
|
@@ -4061,11 +4061,11 @@ const Vl = ({
|
|
|
4061
4061
|
hover: "star"
|
|
4062
4062
|
},
|
|
4063
4063
|
screenreaderText: `${c.formatMessage(
|
|
4064
|
-
{ id: `${
|
|
4064
|
+
{ id: `${h}stars` },
|
|
4065
4065
|
{ number: b, total: e }
|
|
4066
4066
|
)}${b === 1 || b === e ? ` - ${_[b === 1 ? "low" : "high"]}` : ""}`,
|
|
4067
|
-
onClick: (
|
|
4068
|
-
|
|
4067
|
+
onClick: (T) => {
|
|
4068
|
+
T.preventDefault(), T.stopPropagation(), y(b);
|
|
4069
4069
|
},
|
|
4070
4070
|
disabled: p
|
|
4071
4071
|
}
|
|
@@ -4142,12 +4142,12 @@ function Kl({ className: t = "", userId: e, userName: n, src: r, setUserImage: s
|
|
|
4142
4142
|
const p = m.target.files && m.target.files[0];
|
|
4143
4143
|
if (!p || !e)
|
|
4144
4144
|
throw c(!1), new Error("Image file or userID is missing");
|
|
4145
|
-
const
|
|
4145
|
+
const h = await i({ fileObject: p, userId: e });
|
|
4146
4146
|
s((_) => ({
|
|
4147
4147
|
..._,
|
|
4148
4148
|
image: {
|
|
4149
|
-
thumbnail:
|
|
4150
|
-
full:
|
|
4149
|
+
thumbnail: h.thumbnailURL,
|
|
4150
|
+
full: h.originalURL
|
|
4151
4151
|
}
|
|
4152
4152
|
}));
|
|
4153
4153
|
} catch {
|
|
@@ -4247,8 +4247,8 @@ const Yi = ({
|
|
|
4247
4247
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
4248
4248
|
/* NOT_SUBMITTED */
|
|
4249
4249
|
}) => {
|
|
4250
|
-
const [u, d] = X([]), [m, p] = X(!0), [
|
|
4251
|
-
|
|
4250
|
+
const [u, d] = X([]), [m, p] = X(!0), [h, _] = X(l), { formatMessage: y } = H(), v = async (k) => {
|
|
4251
|
+
k.preventDefault();
|
|
4252
4252
|
try {
|
|
4253
4253
|
await f(u), d([]), _(
|
|
4254
4254
|
"SUCCESS"
|
|
@@ -4260,26 +4260,26 @@ const Yi = ({
|
|
|
4260
4260
|
/* ERROR */
|
|
4261
4261
|
), c(w);
|
|
4262
4262
|
}
|
|
4263
|
-
}, b = (
|
|
4264
|
-
|
|
4263
|
+
}, b = (k) => {
|
|
4264
|
+
k.preventDefault(), _(
|
|
4265
4265
|
"NOT_SUBMITTED"
|
|
4266
4266
|
/* NOT_SUBMITTED */
|
|
4267
4267
|
), p(!0), d([]);
|
|
4268
|
-
},
|
|
4269
|
-
|
|
4268
|
+
}, T = (k) => {
|
|
4269
|
+
k.preventDefault(), o(), _(
|
|
4270
4270
|
"CLOSED"
|
|
4271
4271
|
/* CLOSED */
|
|
4272
4272
|
);
|
|
4273
4273
|
};
|
|
4274
|
-
return
|
|
4275
|
-
/* @__PURE__ */ a.jsx("div", { className: "content centred", children:
|
|
4274
|
+
return h === "CLOSED" ? null : h === "ERROR" || h === "SUCCESS" ? /* @__PURE__ */ a.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
4275
|
+
/* @__PURE__ */ a.jsx("div", { className: "content centred", children: h === "SUCCESS" ? /* @__PURE__ */ a.jsx("h2", { className: "success-title", children: y({ id: "inviteForm_success" }) }) : /* @__PURE__ */ a.jsxs("h2", { className: "error-title", children: [
|
|
4276
4276
|
" ",
|
|
4277
4277
|
y({ id: "inviteForm_error" })
|
|
4278
4278
|
] }) }),
|
|
4279
4279
|
/* @__PURE__ */ a.jsx(Ae, {}),
|
|
4280
|
-
/* @__PURE__ */ a.jsx("div", { className: "footer", children:
|
|
4280
|
+
/* @__PURE__ */ a.jsx("div", { className: "footer", children: h === "SUCCESS" ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
4281
4281
|
/* @__PURE__ */ a.jsx(se, { variant: "secondary", onClick: b, children: y({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
4282
|
-
/* @__PURE__ */ a.jsx(se, { onClick:
|
|
4282
|
+
/* @__PURE__ */ a.jsx(se, { onClick: T, children: y({ id: "inviteForm_ctaDone" }) })
|
|
4283
4283
|
] }) : /* @__PURE__ */ a.jsx(se, { onClick: b, children: y({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
4284
4284
|
] }) : /* @__PURE__ */ a.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ a.jsxs(
|
|
4285
4285
|
"form",
|
|
@@ -4298,12 +4298,12 @@ const Yi = ({
|
|
|
4298
4298
|
inputClassName: "email-input input",
|
|
4299
4299
|
placeholder: y({ id: "inviteForm_email_placeholder" }),
|
|
4300
4300
|
emails: u,
|
|
4301
|
-
onChange: (
|
|
4302
|
-
d(
|
|
4301
|
+
onChange: (k) => {
|
|
4302
|
+
d(k), p(!k.length);
|
|
4303
4303
|
},
|
|
4304
4304
|
autoFocus: !1,
|
|
4305
|
-
getLabel: (
|
|
4306
|
-
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children:
|
|
4305
|
+
getLabel: (k, w, I) => /* @__PURE__ */ a.jsxs("div", { className: "email text-medium", children: [
|
|
4306
|
+
/* @__PURE__ */ a.jsx("div", { "data-tag-item": !0, children: k }),
|
|
4307
4307
|
/* @__PURE__ */ a.jsx(
|
|
4308
4308
|
se,
|
|
4309
4309
|
{
|
|
@@ -4381,8 +4381,8 @@ const Yi = ({
|
|
|
4381
4381
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4382
4382
|
onCatch: (p) => s(p == null ? void 0 : p.statusCode),
|
|
4383
4383
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4384
|
-
onFailure: (p,
|
|
4385
|
-
(
|
|
4384
|
+
onFailure: (p, h) => {
|
|
4385
|
+
(h.includes(Te.NEW_PASSWORD) || h.includes(Te.CONFIRMED_PASSWORD)) && o(!0);
|
|
4386
4386
|
}
|
|
4387
4387
|
},
|
|
4388
4388
|
meta: {
|
|
@@ -4542,25 +4542,27 @@ const Ki = ({
|
|
|
4542
4542
|
await n(c), localStorage.setItem("email", o.email), r && r({ ...o, ...i.values }), s([{ type: "showSuccessMessage", value: !0 }]);
|
|
4543
4543
|
}, Ji = ({
|
|
4544
4544
|
shouldShow: t,
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4545
|
+
placeholders: e,
|
|
4546
|
+
labels: n,
|
|
4547
|
+
functions: { validateEmail: r, resendVerificationCode: s },
|
|
4548
|
+
refs: i,
|
|
4549
|
+
state: o,
|
|
4550
|
+
dispatch: c,
|
|
4551
|
+
dataToSubmit: f,
|
|
4552
|
+
intl: l
|
|
4551
4553
|
// We need to pass `intl` in as it's being used in a hook
|
|
4552
4554
|
}) => {
|
|
4553
|
-
const { emailDetails:
|
|
4554
|
-
|
|
4555
|
-
},
|
|
4555
|
+
const { emailDetails: u } = o, d = (p, h) => {
|
|
4556
|
+
p.current && o.validFields[h] !== p.current.validity.valid && c([{ type: `validFields.${h}`, value: p.current.validity.valid }]);
|
|
4557
|
+
}, m = [
|
|
4556
4558
|
{
|
|
4557
4559
|
id: "full_name",
|
|
4558
4560
|
type: "text",
|
|
4559
|
-
inputRef:
|
|
4560
|
-
placeholder:
|
|
4561
|
+
inputRef: i.name,
|
|
4562
|
+
placeholder: l.formatMessage({ id: "signup_full_name_placeholder" }),
|
|
4561
4563
|
functions: {
|
|
4562
|
-
onChange: () =>
|
|
4563
|
-
onFocus: () =>
|
|
4564
|
+
onChange: () => d(i.name, "name"),
|
|
4565
|
+
onFocus: () => c([{ type: "loadRecaptcha", value: !0 }])
|
|
4564
4566
|
},
|
|
4565
4567
|
autoComplete: "name",
|
|
4566
4568
|
validation: [{ condition: "required" }, { condition: "no-numbers" }],
|
|
@@ -4569,21 +4571,21 @@ const Ki = ({
|
|
|
4569
4571
|
{
|
|
4570
4572
|
id: "email_address",
|
|
4571
4573
|
type: "email",
|
|
4572
|
-
inputRef:
|
|
4573
|
-
placeholder:
|
|
4574
|
+
inputRef: i.email,
|
|
4575
|
+
placeholder: l.formatMessage({
|
|
4574
4576
|
id: "signup_email_address_placeholder"
|
|
4575
4577
|
}),
|
|
4576
4578
|
functions: {
|
|
4577
4579
|
onBlur: () => {
|
|
4578
|
-
Mr({ ref:
|
|
4580
|
+
Mr({ ref: i.email, validateEmail: r, dispatch: c });
|
|
4579
4581
|
},
|
|
4580
|
-
onChange: (
|
|
4581
|
-
|
|
4582
|
+
onChange: (p, h) => {
|
|
4583
|
+
c([{ type: "shouldDisableButton", value: !0 }]), h && h({
|
|
4582
4584
|
type: "updateValue",
|
|
4583
4585
|
payload: { key: "terms", value: !1 }
|
|
4584
4586
|
});
|
|
4585
4587
|
},
|
|
4586
|
-
onFocus: () =>
|
|
4588
|
+
onFocus: () => c([{ type: "loadRecaptcha", value: !0 }])
|
|
4587
4589
|
},
|
|
4588
4590
|
autoComplete: "email",
|
|
4589
4591
|
validation: [{ condition: "required" }, { condition: "valid-email" }],
|
|
@@ -4592,20 +4594,20 @@ const Ki = ({
|
|
|
4592
4594
|
{
|
|
4593
4595
|
component: Oi,
|
|
4594
4596
|
props: {
|
|
4595
|
-
email:
|
|
4596
|
-
type:
|
|
4597
|
-
resendVerificationCode:
|
|
4597
|
+
email: u.email,
|
|
4598
|
+
type: u.boxType,
|
|
4599
|
+
resendVerificationCode: s
|
|
4598
4600
|
}
|
|
4599
4601
|
}
|
|
4600
4602
|
];
|
|
4601
|
-
return
|
|
4603
|
+
return o.shouldManuallyApprove && (m.push(
|
|
4602
4604
|
{
|
|
4603
4605
|
id: "job_title",
|
|
4604
4606
|
type: "text",
|
|
4605
|
-
inputRef:
|
|
4606
|
-
placeholder:
|
|
4607
|
+
inputRef: i.jobTitle,
|
|
4608
|
+
placeholder: l.formatMessage({ id: "signup_job_title_placeholder" }),
|
|
4607
4609
|
functions: {
|
|
4608
|
-
onChange: () =>
|
|
4610
|
+
onChange: () => d(i.jobTitle, "jobTitle")
|
|
4609
4611
|
},
|
|
4610
4612
|
validation: [{ condition: "required" }],
|
|
4611
4613
|
"data-testid": "signup-job-input"
|
|
@@ -4613,89 +4615,89 @@ const Ki = ({
|
|
|
4613
4615
|
{
|
|
4614
4616
|
id: "organization",
|
|
4615
4617
|
type: "text",
|
|
4616
|
-
inputRef:
|
|
4617
|
-
placeholder:
|
|
4618
|
+
inputRef: i.organisation,
|
|
4619
|
+
placeholder: l.formatMessage({
|
|
4618
4620
|
id: "signup_organization_placeholder"
|
|
4619
4621
|
}),
|
|
4620
4622
|
functions: {
|
|
4621
4623
|
onChange: () => {
|
|
4622
|
-
|
|
4624
|
+
d(i.organisation, "organisation");
|
|
4623
4625
|
}
|
|
4624
4626
|
},
|
|
4625
4627
|
validation: [{ condition: "required" }],
|
|
4626
4628
|
"data-testid": "signup-org-input"
|
|
4627
4629
|
}
|
|
4628
|
-
), t.url &&
|
|
4630
|
+
), t.url && m.push({
|
|
4629
4631
|
id: "url",
|
|
4630
4632
|
type: "text",
|
|
4631
|
-
label:
|
|
4633
|
+
label: l.formatMessage(
|
|
4632
4634
|
{ id: "signup_url" },
|
|
4633
4635
|
{
|
|
4634
|
-
small: (
|
|
4636
|
+
small: (p) => /* @__PURE__ */ a.jsx("small", { children: p })
|
|
4635
4637
|
}
|
|
4636
4638
|
),
|
|
4637
|
-
placeholder:
|
|
4639
|
+
placeholder: l.formatMessage({ id: "signup_url_placeholder" }),
|
|
4638
4640
|
validation: [{ condition: "valid-url" }],
|
|
4639
4641
|
"data-testid": "signup-url-input"
|
|
4640
|
-
})), t.expectation &&
|
|
4642
|
+
})), t.expectation && m.push({
|
|
4641
4643
|
id: "expectation",
|
|
4642
4644
|
className: "expectation",
|
|
4643
4645
|
type: "text",
|
|
4644
|
-
label:
|
|
4646
|
+
label: (n == null ? void 0 : n.expectation) || l.formatMessage(
|
|
4645
4647
|
{ id: "signup_expectation" },
|
|
4646
4648
|
{
|
|
4647
|
-
small: (
|
|
4649
|
+
small: (p) => /* @__PURE__ */ a.jsx("small", { className: "notes text-small", children: p })
|
|
4648
4650
|
}
|
|
4649
4651
|
),
|
|
4650
|
-
placeholder:
|
|
4652
|
+
placeholder: (e == null ? void 0 : e.expectation) || l.formatMessage({ id: "signup_expectation_placeholder" }),
|
|
4651
4653
|
"data-testid": "signup-events-question"
|
|
4652
|
-
}),
|
|
4654
|
+
}), m.push({
|
|
4653
4655
|
id: "terms",
|
|
4654
4656
|
className: "text-small",
|
|
4655
4657
|
type: "checkbox",
|
|
4656
|
-
inputRef:
|
|
4657
|
-
label:
|
|
4658
|
+
inputRef: i.tc,
|
|
4659
|
+
label: l.formatMessage(
|
|
4658
4660
|
{ id: "signup_terms" },
|
|
4659
4661
|
{
|
|
4660
|
-
terms: (
|
|
4662
|
+
terms: (p) => /* @__PURE__ */ a.jsx(
|
|
4661
4663
|
"a",
|
|
4662
4664
|
{
|
|
4663
4665
|
href: "https://about.apolitical.co/terms-and-conditions",
|
|
4664
4666
|
"data-gtm-event-context": "SignupForm",
|
|
4665
4667
|
"data-gtm-event-type": "terms-of-service-click",
|
|
4666
4668
|
className: "gtm-trackable",
|
|
4667
|
-
children:
|
|
4669
|
+
children: p
|
|
4668
4670
|
}
|
|
4669
4671
|
),
|
|
4670
|
-
privacy: (
|
|
4672
|
+
privacy: (p) => /* @__PURE__ */ a.jsx(
|
|
4671
4673
|
"a",
|
|
4672
4674
|
{
|
|
4673
4675
|
href: "https://about.apolitical.co/privacy-policy",
|
|
4674
4676
|
"data-gtm-event-context": "SignupForm",
|
|
4675
4677
|
"data-gtm-event-type": "privacy-policy-click",
|
|
4676
4678
|
className: "gtm-trackable",
|
|
4677
|
-
children:
|
|
4679
|
+
children: p
|
|
4678
4680
|
}
|
|
4679
4681
|
)
|
|
4680
4682
|
}
|
|
4681
4683
|
),
|
|
4682
4684
|
shownValue: "accepted",
|
|
4683
4685
|
functions: {
|
|
4684
|
-
onChange: (
|
|
4685
|
-
if (!
|
|
4686
|
+
onChange: (p) => {
|
|
4687
|
+
if (!p)
|
|
4686
4688
|
return;
|
|
4687
|
-
const
|
|
4688
|
-
["name", "email"].forEach((
|
|
4689
|
-
|
|
4690
|
-
type: `validFields.${
|
|
4691
|
-
value:
|
|
4692
|
-
}),
|
|
4693
|
-
}),
|
|
4689
|
+
const h = [];
|
|
4690
|
+
["name", "email"].forEach((_) => {
|
|
4691
|
+
o.validFields[_] !== i[_].current.validity.valid && (h.push({
|
|
4692
|
+
type: `validFields.${_}`,
|
|
4693
|
+
value: i[_].current.validity.valid
|
|
4694
|
+
}), _ === "email" && Mr({ ref: i.email, validateEmail: r, dispatch: c }));
|
|
4695
|
+
}), h.length && c(h);
|
|
4694
4696
|
}
|
|
4695
4697
|
},
|
|
4696
4698
|
validation: [{ condition: "required" }],
|
|
4697
4699
|
"data-testid": "signup-terms-checkbox"
|
|
4698
|
-
}),
|
|
4700
|
+
}), m;
|
|
4699
4701
|
};
|
|
4700
4702
|
const Xi = ({ className: t = "" }) => /* @__PURE__ */ a.jsxs(
|
|
4701
4703
|
"div",
|
|
@@ -4731,7 +4733,9 @@ const eo = {
|
|
|
4731
4733
|
showError: !1
|
|
4732
4734
|
}, Ql = ({
|
|
4733
4735
|
className: t = "",
|
|
4734
|
-
|
|
4736
|
+
labels: e = {},
|
|
4737
|
+
placeholders: n = {},
|
|
4738
|
+
functions: r = {
|
|
4735
4739
|
validateEmail: () => Promise.resolve(),
|
|
4736
4740
|
createAccount: () => Promise.resolve(),
|
|
4737
4741
|
handleError: () => {
|
|
@@ -4739,34 +4743,34 @@ const eo = {
|
|
|
4739
4743
|
resendVerificationCode: () => {
|
|
4740
4744
|
}
|
|
4741
4745
|
},
|
|
4742
|
-
shouldShow:
|
|
4743
|
-
submitButton:
|
|
4744
|
-
dataToSubmit:
|
|
4745
|
-
...
|
|
4746
|
+
shouldShow: s = {},
|
|
4747
|
+
submitButton: i,
|
|
4748
|
+
dataToSubmit: o = { ref: "sign-up-form" },
|
|
4749
|
+
...c
|
|
4746
4750
|
}) => {
|
|
4747
|
-
const
|
|
4748
|
-
title:
|
|
4749
|
-
expectation:
|
|
4750
|
-
url:
|
|
4751
|
-
logInButton:
|
|
4752
|
-
successMessage:
|
|
4753
|
-
} =
|
|
4754
|
-
title:
|
|
4755
|
-
expectation:
|
|
4756
|
-
url:
|
|
4757
|
-
logInButton:
|
|
4758
|
-
successMessage:
|
|
4759
|
-
}, [
|
|
4760
|
-
validFields:
|
|
4761
|
-
emailDetails:
|
|
4762
|
-
shouldManuallyApprove:
|
|
4763
|
-
shouldDisableButton:
|
|
4764
|
-
showSuccessMessage:
|
|
4765
|
-
showError:
|
|
4766
|
-
} =
|
|
4751
|
+
const f = H(), {
|
|
4752
|
+
title: l = !0,
|
|
4753
|
+
expectation: u = !1,
|
|
4754
|
+
url: d = !0,
|
|
4755
|
+
logInButton: m = !0,
|
|
4756
|
+
successMessage: p = !0
|
|
4757
|
+
} = s, h = {
|
|
4758
|
+
title: l,
|
|
4759
|
+
expectation: u,
|
|
4760
|
+
url: d,
|
|
4761
|
+
logInButton: m,
|
|
4762
|
+
successMessage: p
|
|
4763
|
+
}, [_, y] = Yn(ma, eo), {
|
|
4764
|
+
validFields: v,
|
|
4765
|
+
emailDetails: b,
|
|
4766
|
+
shouldManuallyApprove: T,
|
|
4767
|
+
shouldDisableButton: k,
|
|
4768
|
+
showSuccessMessage: w,
|
|
4769
|
+
showError: I
|
|
4770
|
+
} = _, [R, Q] = oa([
|
|
4767
4771
|
"signup-this-session",
|
|
4768
4772
|
"functional-cookie-consent"
|
|
4769
|
-
]),
|
|
4773
|
+
]), C = {
|
|
4770
4774
|
form: Y.createRef(),
|
|
4771
4775
|
name: Y.createRef(),
|
|
4772
4776
|
email: Y.createRef(),
|
|
@@ -4776,51 +4780,53 @@ const eo = {
|
|
|
4776
4780
|
hiddenValidation: Y.createRef()
|
|
4777
4781
|
};
|
|
4778
4782
|
ae(() => {
|
|
4779
|
-
|
|
4780
|
-
}, [
|
|
4781
|
-
|
|
4782
|
-
}, [
|
|
4783
|
-
|
|
4783
|
+
T === !0 && C.jobTitle.current && C.jobTitle.current.focus();
|
|
4784
|
+
}, [T]), ae(() => {
|
|
4785
|
+
R["signup-this-session"] && y([{ type: "showSuccessMessage", value: !0 }]);
|
|
4786
|
+
}, [R]), ae(() => {
|
|
4787
|
+
w && R["functional-cookie-consent"] && Q("signup-this-session", "true", {
|
|
4784
4788
|
path: "/",
|
|
4785
4789
|
maxAge: 3600
|
|
4786
4790
|
});
|
|
4787
|
-
}, [
|
|
4788
|
-
const
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4794
|
-
|
|
4795
|
-
|
|
4796
|
-
|
|
4797
|
-
|
|
4791
|
+
}, [w]);
|
|
4792
|
+
const F = xt(() => Ji({
|
|
4793
|
+
placeholders: n,
|
|
4794
|
+
labels: e,
|
|
4795
|
+
shouldShow: h,
|
|
4796
|
+
functions: r,
|
|
4797
|
+
refs: C,
|
|
4798
|
+
state: _,
|
|
4799
|
+
dispatch: y,
|
|
4800
|
+
dataToSubmit: o,
|
|
4801
|
+
intl: f
|
|
4802
|
+
}), [o, r, f, C, h, _]), $ = k ? !0 : T ? !Object.values(v).every((j) => j === !0) : !v.name || !v.email || ["exists", "pending", "verify"].includes(b.boxType);
|
|
4803
|
+
return h.successMessage && w ? /* @__PURE__ */ a.jsx(Xi, { className: t }) : /* @__PURE__ */ a.jsxs(
|
|
4798
4804
|
"fieldset",
|
|
4799
4805
|
{
|
|
4800
4806
|
className: S("signup-form-fieldset", t),
|
|
4801
4807
|
"data-testid": "signup-form",
|
|
4802
4808
|
children: [
|
|
4803
|
-
|
|
4804
|
-
|
|
4809
|
+
h.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_title" }) }),
|
|
4810
|
+
I && /* @__PURE__ */ a.jsx(
|
|
4805
4811
|
He,
|
|
4806
4812
|
{
|
|
4807
4813
|
variant: "error",
|
|
4808
|
-
text:
|
|
4814
|
+
text: f.formatMessage({ id: "signup_error" })
|
|
4809
4815
|
}
|
|
4810
4816
|
),
|
|
4811
4817
|
/* @__PURE__ */ a.jsx(
|
|
4812
4818
|
rn,
|
|
4813
4819
|
{
|
|
4814
4820
|
className: "signup-form",
|
|
4815
|
-
formRef:
|
|
4821
|
+
formRef: C.form,
|
|
4816
4822
|
id: "sign-up-form",
|
|
4817
|
-
fields:
|
|
4823
|
+
fields: F,
|
|
4818
4824
|
intlPath: "signup",
|
|
4819
4825
|
button: {
|
|
4820
4826
|
variant: "primary",
|
|
4821
4827
|
size: "medium",
|
|
4822
|
-
text:
|
|
4823
|
-
disabled:
|
|
4828
|
+
text: i || f.formatMessage({ id: "signup_button_join" }),
|
|
4829
|
+
disabled: $ ? { isClickable: !0 } : !1,
|
|
4824
4830
|
styling: { fullWidth: !0 },
|
|
4825
4831
|
"data-testid": "signup-button"
|
|
4826
4832
|
},
|
|
@@ -4832,12 +4838,12 @@ const eo = {
|
|
|
4832
4838
|
href: "/user-onboarding/login",
|
|
4833
4839
|
"data-gtm-event-context": "SignupForm",
|
|
4834
4840
|
"data-gtm-event-type": "login-click",
|
|
4835
|
-
text:
|
|
4841
|
+
text: f.formatMessage({ id: "signup_button_login" })
|
|
4836
4842
|
},
|
|
4837
4843
|
meta: {
|
|
4838
4844
|
shouldReset: !1,
|
|
4839
4845
|
showRequiredLabels: !1,
|
|
4840
|
-
shouldShowCancelButton:
|
|
4846
|
+
shouldShowCancelButton: h.logInButton
|
|
4841
4847
|
},
|
|
4842
4848
|
gtm: {
|
|
4843
4849
|
context: "SignupForm",
|
|
@@ -4845,17 +4851,17 @@ const eo = {
|
|
|
4845
4851
|
},
|
|
4846
4852
|
functions: {
|
|
4847
4853
|
onSuccess: async () => {
|
|
4848
|
-
Qi({
|
|
4849
|
-
refs:
|
|
4850
|
-
dataToSubmit:
|
|
4851
|
-
createAccount:
|
|
4852
|
-
onSuccess:
|
|
4853
|
-
dispatch:
|
|
4854
|
-
state:
|
|
4854
|
+
await Qi({
|
|
4855
|
+
refs: C,
|
|
4856
|
+
dataToSubmit: o,
|
|
4857
|
+
createAccount: r.createAccount,
|
|
4858
|
+
onSuccess: r.onSuccess,
|
|
4859
|
+
dispatch: y,
|
|
4860
|
+
state: _
|
|
4855
4861
|
});
|
|
4856
4862
|
},
|
|
4857
|
-
onCatch: (
|
|
4858
|
-
|
|
4863
|
+
onCatch: (j) => {
|
|
4864
|
+
r.handleError(j), y([
|
|
4859
4865
|
{ type: "showSuccessMessage", value: !1 },
|
|
4860
4866
|
{ type: "showError", value: !0 }
|
|
4861
4867
|
]);
|
|
@@ -4863,7 +4869,7 @@ const eo = {
|
|
|
4863
4869
|
}
|
|
4864
4870
|
}
|
|
4865
4871
|
),
|
|
4866
|
-
/* @__PURE__ */ a.jsx("button", { className: "validation-button", ref:
|
|
4872
|
+
/* @__PURE__ */ a.jsx("button", { className: "validation-button", ref: C.hiddenValidation })
|
|
4867
4873
|
]
|
|
4868
4874
|
}
|
|
4869
4875
|
);
|
|
@@ -4882,8 +4888,8 @@ function to() {
|
|
|
4882
4888
|
if (Rr)
|
|
4883
4889
|
return ue;
|
|
4884
4890
|
Rr = 1;
|
|
4885
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115,
|
|
4886
|
-
function
|
|
4891
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, _ = t ? Symbol.for("react.block") : 60121, y = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
4892
|
+
function T(w) {
|
|
4887
4893
|
if (typeof w == "object" && w !== null) {
|
|
4888
4894
|
var I = w.$$typeof;
|
|
4889
4895
|
switch (I) {
|
|
@@ -4900,7 +4906,7 @@ function to() {
|
|
|
4900
4906
|
switch (w = w && w.$$typeof, w) {
|
|
4901
4907
|
case c:
|
|
4902
4908
|
case u:
|
|
4903
|
-
case
|
|
4909
|
+
case h:
|
|
4904
4910
|
case p:
|
|
4905
4911
|
case o:
|
|
4906
4912
|
return w;
|
|
@@ -4913,36 +4919,36 @@ function to() {
|
|
|
4913
4919
|
}
|
|
4914
4920
|
}
|
|
4915
4921
|
}
|
|
4916
|
-
function
|
|
4917
|
-
return
|
|
4922
|
+
function k(w) {
|
|
4923
|
+
return T(w) === l;
|
|
4918
4924
|
}
|
|
4919
|
-
return ue.AsyncMode = f, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy =
|
|
4920
|
-
return
|
|
4921
|
-
}, ue.isConcurrentMode =
|
|
4922
|
-
return
|
|
4925
|
+
return ue.AsyncMode = f, ue.ConcurrentMode = l, ue.ContextConsumer = c, ue.ContextProvider = o, ue.Element = e, ue.ForwardRef = u, ue.Fragment = r, ue.Lazy = h, ue.Memo = p, ue.Portal = n, ue.Profiler = i, ue.StrictMode = s, ue.Suspense = d, ue.isAsyncMode = function(w) {
|
|
4926
|
+
return k(w) || T(w) === f;
|
|
4927
|
+
}, ue.isConcurrentMode = k, ue.isContextConsumer = function(w) {
|
|
4928
|
+
return T(w) === c;
|
|
4923
4929
|
}, ue.isContextProvider = function(w) {
|
|
4924
|
-
return
|
|
4930
|
+
return T(w) === o;
|
|
4925
4931
|
}, ue.isElement = function(w) {
|
|
4926
4932
|
return typeof w == "object" && w !== null && w.$$typeof === e;
|
|
4927
4933
|
}, ue.isForwardRef = function(w) {
|
|
4928
|
-
return
|
|
4934
|
+
return T(w) === u;
|
|
4929
4935
|
}, ue.isFragment = function(w) {
|
|
4930
|
-
return
|
|
4936
|
+
return T(w) === r;
|
|
4931
4937
|
}, ue.isLazy = function(w) {
|
|
4932
|
-
return
|
|
4938
|
+
return T(w) === h;
|
|
4933
4939
|
}, ue.isMemo = function(w) {
|
|
4934
|
-
return
|
|
4940
|
+
return T(w) === p;
|
|
4935
4941
|
}, ue.isPortal = function(w) {
|
|
4936
|
-
return
|
|
4942
|
+
return T(w) === n;
|
|
4937
4943
|
}, ue.isProfiler = function(w) {
|
|
4938
|
-
return
|
|
4944
|
+
return T(w) === i;
|
|
4939
4945
|
}, ue.isStrictMode = function(w) {
|
|
4940
|
-
return
|
|
4946
|
+
return T(w) === s;
|
|
4941
4947
|
}, ue.isSuspense = function(w) {
|
|
4942
|
-
return
|
|
4948
|
+
return T(w) === d;
|
|
4943
4949
|
}, ue.isValidElementType = function(w) {
|
|
4944
|
-
return typeof w == "string" || typeof w == "function" || w === r || w === l || w === i || w === s || w === d || w === m || typeof w == "object" && w !== null && (w.$$typeof ===
|
|
4945
|
-
}, ue.typeOf =
|
|
4950
|
+
return typeof w == "string" || typeof w == "function" || w === r || w === l || w === i || w === s || w === d || w === m || typeof w == "object" && w !== null && (w.$$typeof === h || w.$$typeof === p || w.$$typeof === o || w.$$typeof === c || w.$$typeof === u || w.$$typeof === y || w.$$typeof === v || w.$$typeof === b || w.$$typeof === _);
|
|
4951
|
+
}, ue.typeOf = T, ue;
|
|
4946
4952
|
}
|
|
4947
4953
|
var de = {};
|
|
4948
4954
|
/** @license React v16.13.1
|
|
@@ -4956,12 +4962,12 @@ var de = {};
|
|
|
4956
4962
|
var Fr;
|
|
4957
4963
|
function no() {
|
|
4958
4964
|
return Fr || (Fr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
4959
|
-
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115,
|
|
4960
|
-
function
|
|
4965
|
+
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, s = t ? Symbol.for("react.strict_mode") : 60108, i = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, f = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, u = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, h = t ? Symbol.for("react.lazy") : 60116, _ = t ? Symbol.for("react.block") : 60121, y = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, b = t ? Symbol.for("react.scope") : 60119;
|
|
4966
|
+
function T(D) {
|
|
4961
4967
|
return typeof D == "string" || typeof D == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
4962
|
-
D === r || D === l || D === i || D === s || D === d || D === m || typeof D == "object" && D !== null && (D.$$typeof ===
|
|
4968
|
+
D === r || D === l || D === i || D === s || D === d || D === m || typeof D == "object" && D !== null && (D.$$typeof === h || D.$$typeof === p || D.$$typeof === o || D.$$typeof === c || D.$$typeof === u || D.$$typeof === y || D.$$typeof === v || D.$$typeof === b || D.$$typeof === _);
|
|
4963
4969
|
}
|
|
4964
|
-
function
|
|
4970
|
+
function k(D) {
|
|
4965
4971
|
if (typeof D == "object" && D !== null) {
|
|
4966
4972
|
var ve = D.$$typeof;
|
|
4967
4973
|
switch (ve) {
|
|
@@ -4980,7 +4986,7 @@ function no() {
|
|
|
4980
4986
|
switch (Ce) {
|
|
4981
4987
|
case c:
|
|
4982
4988
|
case u:
|
|
4983
|
-
case
|
|
4989
|
+
case h:
|
|
4984
4990
|
case p:
|
|
4985
4991
|
case o:
|
|
4986
4992
|
return Ce;
|
|
@@ -4993,47 +4999,47 @@ function no() {
|
|
|
4993
4999
|
}
|
|
4994
5000
|
}
|
|
4995
5001
|
}
|
|
4996
|
-
var w = f, I = l, R = c, Q = o, C = e, F = u, $ = r,
|
|
5002
|
+
var w = f, I = l, R = c, Q = o, C = e, F = u, $ = r, j = h, x = p, N = n, A = i, W = s, Z = d, z = !1;
|
|
4997
5003
|
function K(D) {
|
|
4998
|
-
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), E(D) ||
|
|
5004
|
+
return z || (z = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), E(D) || k(D) === f;
|
|
4999
5005
|
}
|
|
5000
5006
|
function E(D) {
|
|
5001
|
-
return
|
|
5007
|
+
return k(D) === l;
|
|
5002
5008
|
}
|
|
5003
5009
|
function P(D) {
|
|
5004
|
-
return
|
|
5010
|
+
return k(D) === c;
|
|
5005
5011
|
}
|
|
5006
5012
|
function q(D) {
|
|
5007
|
-
return
|
|
5013
|
+
return k(D) === o;
|
|
5008
5014
|
}
|
|
5009
5015
|
function B(D) {
|
|
5010
5016
|
return typeof D == "object" && D !== null && D.$$typeof === e;
|
|
5011
5017
|
}
|
|
5012
5018
|
function U(D) {
|
|
5013
|
-
return
|
|
5019
|
+
return k(D) === u;
|
|
5014
5020
|
}
|
|
5015
5021
|
function te(D) {
|
|
5016
|
-
return
|
|
5022
|
+
return k(D) === r;
|
|
5017
5023
|
}
|
|
5018
5024
|
function G(D) {
|
|
5019
|
-
return
|
|
5025
|
+
return k(D) === h;
|
|
5020
5026
|
}
|
|
5021
5027
|
function V(D) {
|
|
5022
|
-
return
|
|
5028
|
+
return k(D) === p;
|
|
5023
5029
|
}
|
|
5024
5030
|
function ee(D) {
|
|
5025
|
-
return
|
|
5031
|
+
return k(D) === n;
|
|
5026
5032
|
}
|
|
5027
5033
|
function re(D) {
|
|
5028
|
-
return
|
|
5034
|
+
return k(D) === i;
|
|
5029
5035
|
}
|
|
5030
5036
|
function O(D) {
|
|
5031
|
-
return
|
|
5037
|
+
return k(D) === s;
|
|
5032
5038
|
}
|
|
5033
5039
|
function oe(D) {
|
|
5034
|
-
return
|
|
5040
|
+
return k(D) === d;
|
|
5035
5041
|
}
|
|
5036
|
-
de.AsyncMode = w, de.ConcurrentMode = I, de.ContextConsumer = R, de.ContextProvider = Q, de.Element = C, de.ForwardRef = F, de.Fragment = $, de.Lazy =
|
|
5042
|
+
de.AsyncMode = w, de.ConcurrentMode = I, de.ContextConsumer = R, de.ContextProvider = Q, de.Element = C, de.ForwardRef = F, de.Fragment = $, de.Lazy = j, de.Memo = x, de.Portal = N, de.Profiler = A, de.StrictMode = W, de.Suspense = Z, de.isAsyncMode = K, de.isConcurrentMode = E, de.isContextConsumer = P, de.isContextProvider = q, de.isElement = B, de.isForwardRef = U, de.isFragment = te, de.isLazy = G, de.isMemo = V, de.isPortal = ee, de.isProfiler = re, de.isStrictMode = O, de.isSuspense = oe, de.isValidElementType = T, de.typeOf = k;
|
|
5037
5043
|
}()), de;
|
|
5038
5044
|
}
|
|
5039
5045
|
var Or;
|
|
@@ -5135,8 +5141,8 @@ function ao() {
|
|
|
5135
5141
|
throw m.name = "Invariant Violation", m;
|
|
5136
5142
|
}
|
|
5137
5143
|
d = i[u](o, u, f, c, null, e);
|
|
5138
|
-
} catch (
|
|
5139
|
-
d =
|
|
5144
|
+
} catch (h) {
|
|
5145
|
+
d = h;
|
|
5140
5146
|
}
|
|
5141
5147
|
if (d && !(d instanceof Error) && t(
|
|
5142
5148
|
(f || "React class") + ": type specification of " + c + " `" + u + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof d + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
@@ -5189,18 +5195,18 @@ function so() {
|
|
|
5189
5195
|
string: v("string"),
|
|
5190
5196
|
symbol: v("symbol"),
|
|
5191
5197
|
any: b(),
|
|
5192
|
-
arrayOf:
|
|
5193
|
-
element:
|
|
5198
|
+
arrayOf: T,
|
|
5199
|
+
element: k(),
|
|
5194
5200
|
elementType: w(),
|
|
5195
5201
|
instanceOf: I,
|
|
5196
5202
|
node: F(),
|
|
5197
5203
|
objectOf: Q,
|
|
5198
5204
|
oneOf: R,
|
|
5199
5205
|
oneOfType: C,
|
|
5200
|
-
shape:
|
|
5206
|
+
shape: j,
|
|
5201
5207
|
exact: x
|
|
5202
5208
|
};
|
|
5203
|
-
function
|
|
5209
|
+
function h(E, P) {
|
|
5204
5210
|
return E === P ? E !== 0 || 1 / E === 1 / P : E !== E && P !== P;
|
|
5205
5211
|
}
|
|
5206
5212
|
function _(E, P) {
|
|
@@ -5247,7 +5253,7 @@ function so() {
|
|
|
5247
5253
|
function b() {
|
|
5248
5254
|
return y(o);
|
|
5249
5255
|
}
|
|
5250
|
-
function
|
|
5256
|
+
function T(E) {
|
|
5251
5257
|
function P(q, B, U, te, G) {
|
|
5252
5258
|
if (typeof E != "function")
|
|
5253
5259
|
return new _("Property `" + G + "` of component `" + U + "` has invalid PropType notation inside arrayOf.");
|
|
@@ -5265,7 +5271,7 @@ function so() {
|
|
|
5265
5271
|
}
|
|
5266
5272
|
return y(P);
|
|
5267
5273
|
}
|
|
5268
|
-
function
|
|
5274
|
+
function k() {
|
|
5269
5275
|
function E(P, q, B, U, te) {
|
|
5270
5276
|
var G = P[q];
|
|
5271
5277
|
if (!c(G)) {
|
|
@@ -5304,7 +5310,7 @@ function so() {
|
|
|
5304
5310
|
) : i("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
5305
5311
|
function P(q, B, U, te, G) {
|
|
5306
5312
|
for (var V = q[B], ee = 0; ee < E.length; ee++)
|
|
5307
|
-
if (
|
|
5313
|
+
if (h(V, E[ee]))
|
|
5308
5314
|
return null;
|
|
5309
5315
|
var re = JSON.stringify(E, function(oe, D) {
|
|
5310
5316
|
var ve = Z(D);
|
|
@@ -5364,7 +5370,7 @@ function so() {
|
|
|
5364
5370
|
(E || "React class") + ": " + P + " type `" + q + "." + B + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + U + "`."
|
|
5365
5371
|
);
|
|
5366
5372
|
}
|
|
5367
|
-
function
|
|
5373
|
+
function j(E) {
|
|
5368
5374
|
function P(q, B, U, te, G) {
|
|
5369
5375
|
var V = q[B], ee = W(V);
|
|
5370
5376
|
if (ee !== "object")
|
|
@@ -5862,22 +5868,22 @@ var Zr = {
|
|
|
5862
5868
|
delayInitialFocusTimer: void 0,
|
|
5863
5869
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
5864
5870
|
recentNavEvent: void 0
|
|
5865
|
-
}, c, f = function(
|
|
5866
|
-
return
|
|
5867
|
-
}, l = function(
|
|
5871
|
+
}, c, f = function(j, x, N) {
|
|
5872
|
+
return j && j[x] !== void 0 ? j[x] : i[N || x];
|
|
5873
|
+
}, l = function(j, x) {
|
|
5868
5874
|
var N = typeof (x == null ? void 0 : x.composedPath) == "function" ? x.composedPath() : void 0;
|
|
5869
5875
|
return o.containerGroups.findIndex(function(A) {
|
|
5870
5876
|
var W = A.container, Z = A.tabbableNodes;
|
|
5871
|
-
return W.contains(
|
|
5877
|
+
return W.contains(j) || // fall back to explicit tabbable search which will take into consideration any
|
|
5872
5878
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
5873
5879
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
5874
5880
|
// look inside web components even if open)
|
|
5875
5881
|
(N == null ? void 0 : N.includes(W)) || Z.find(function(z) {
|
|
5876
|
-
return z ===
|
|
5882
|
+
return z === j;
|
|
5877
5883
|
});
|
|
5878
5884
|
});
|
|
5879
|
-
}, u = function(
|
|
5880
|
-
var x = i[
|
|
5885
|
+
}, u = function(j) {
|
|
5886
|
+
var x = i[j];
|
|
5881
5887
|
if (typeof x == "function") {
|
|
5882
5888
|
for (var N = arguments.length, A = new Array(N > 1 ? N - 1 : 0), W = 1; W < N; W++)
|
|
5883
5889
|
A[W - 1] = arguments[W];
|
|
@@ -5886,29 +5892,29 @@ var Zr = {
|
|
|
5886
5892
|
if (x === !0 && (x = void 0), !x) {
|
|
5887
5893
|
if (x === void 0 || x === !1)
|
|
5888
5894
|
return x;
|
|
5889
|
-
throw new Error("`".concat(
|
|
5895
|
+
throw new Error("`".concat(j, "` was specified but was not a node, or did not return a node"));
|
|
5890
5896
|
}
|
|
5891
5897
|
var Z = x;
|
|
5892
5898
|
if (typeof x == "string" && (Z = r.querySelector(x), !Z))
|
|
5893
|
-
throw new Error("`".concat(
|
|
5899
|
+
throw new Error("`".concat(j, "` as selector refers to no known node"));
|
|
5894
5900
|
return Z;
|
|
5895
5901
|
}, d = function() {
|
|
5896
|
-
var
|
|
5897
|
-
if (
|
|
5902
|
+
var j = u("initialFocus");
|
|
5903
|
+
if (j === !1)
|
|
5898
5904
|
return !1;
|
|
5899
|
-
if (
|
|
5905
|
+
if (j === void 0 || !Bt(j, i.tabbableOptions))
|
|
5900
5906
|
if (l(r.activeElement) >= 0)
|
|
5901
|
-
|
|
5907
|
+
j = r.activeElement;
|
|
5902
5908
|
else {
|
|
5903
5909
|
var x = o.tabbableGroups[0], N = x && x.firstTabbableNode;
|
|
5904
|
-
|
|
5910
|
+
j = N || u("fallbackFocus");
|
|
5905
5911
|
}
|
|
5906
|
-
if (!
|
|
5912
|
+
if (!j)
|
|
5907
5913
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
5908
|
-
return
|
|
5914
|
+
return j;
|
|
5909
5915
|
}, m = function() {
|
|
5910
|
-
if (o.containerGroups = o.containers.map(function(
|
|
5911
|
-
var x = Ia(
|
|
5916
|
+
if (o.containerGroups = o.containers.map(function(j) {
|
|
5917
|
+
var x = Ia(j, i.tabbableOptions), N = La(j, i.tabbableOptions), A = x.length > 0 ? x[0] : void 0, W = x.length > 0 ? x[x.length - 1] : void 0, Z = N.find(function(E) {
|
|
5912
5918
|
return We(E);
|
|
5913
5919
|
}), z = N.slice().reverse().find(function(E) {
|
|
5914
5920
|
return We(E);
|
|
@@ -5916,7 +5922,7 @@ var Zr = {
|
|
|
5916
5922
|
return Le(E) > 0;
|
|
5917
5923
|
});
|
|
5918
5924
|
return {
|
|
5919
|
-
container:
|
|
5925
|
+
container: j,
|
|
5920
5926
|
tabbableNodes: x,
|
|
5921
5927
|
focusableNodes: N,
|
|
5922
5928
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
@@ -5953,33 +5959,33 @@ var Zr = {
|
|
|
5953
5959
|
}) : x[B + (q ? 1 : -1)];
|
|
5954
5960
|
}
|
|
5955
5961
|
};
|
|
5956
|
-
}), o.tabbableGroups = o.containerGroups.filter(function(
|
|
5957
|
-
return
|
|
5962
|
+
}), o.tabbableGroups = o.containerGroups.filter(function(j) {
|
|
5963
|
+
return j.tabbableNodes.length > 0;
|
|
5958
5964
|
}), o.tabbableGroups.length <= 0 && !u("fallbackFocus"))
|
|
5959
5965
|
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
5960
|
-
if (o.containerGroups.find(function(
|
|
5961
|
-
return
|
|
5966
|
+
if (o.containerGroups.find(function(j) {
|
|
5967
|
+
return j.posTabIndexesFound;
|
|
5962
5968
|
}) && o.containerGroups.length > 1)
|
|
5963
5969
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
5964
|
-
}, p = function $(
|
|
5965
|
-
var x =
|
|
5970
|
+
}, p = function $(j) {
|
|
5971
|
+
var x = j.activeElement;
|
|
5966
5972
|
if (x)
|
|
5967
5973
|
return x.shadowRoot && x.shadowRoot.activeElement !== null ? $(x.shadowRoot) : x;
|
|
5968
|
-
},
|
|
5969
|
-
if (
|
|
5970
|
-
if (!
|
|
5974
|
+
}, h = function $(j) {
|
|
5975
|
+
if (j !== !1 && j !== p(document)) {
|
|
5976
|
+
if (!j || !j.focus) {
|
|
5971
5977
|
$(d());
|
|
5972
5978
|
return;
|
|
5973
5979
|
}
|
|
5974
|
-
|
|
5980
|
+
j.focus({
|
|
5975
5981
|
preventScroll: !!i.preventScroll
|
|
5976
|
-
}), o.mostRecentlyFocusedNode =
|
|
5982
|
+
}), o.mostRecentlyFocusedNode = j, No(j) && j.select();
|
|
5977
5983
|
}
|
|
5978
|
-
}, _ = function(
|
|
5979
|
-
var x = u("setReturnFocus",
|
|
5980
|
-
return x || (x === !1 ? !1 :
|
|
5981
|
-
}, y = function(
|
|
5982
|
-
var x =
|
|
5984
|
+
}, _ = function(j) {
|
|
5985
|
+
var x = u("setReturnFocus", j);
|
|
5986
|
+
return x || (x === !1 ? !1 : j);
|
|
5987
|
+
}, y = function(j) {
|
|
5988
|
+
var x = j.target, N = j.event, A = j.isBackward, W = A === void 0 ? !1 : A;
|
|
5983
5989
|
x = x || Pt(N), m();
|
|
5984
5990
|
var Z = null;
|
|
5985
5991
|
if (o.tabbableGroups.length > 0) {
|
|
@@ -6010,10 +6016,10 @@ var Zr = {
|
|
|
6010
6016
|
} else
|
|
6011
6017
|
Z = u("fallbackFocus");
|
|
6012
6018
|
return Z;
|
|
6013
|
-
}, v = function(
|
|
6014
|
-
var x = Pt(
|
|
6015
|
-
if (!(l(x,
|
|
6016
|
-
if (lt(i.clickOutsideDeactivates,
|
|
6019
|
+
}, v = function(j) {
|
|
6020
|
+
var x = Pt(j);
|
|
6021
|
+
if (!(l(x, j) >= 0)) {
|
|
6022
|
+
if (lt(i.clickOutsideDeactivates, j)) {
|
|
6017
6023
|
c.deactivate({
|
|
6018
6024
|
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
6019
6025
|
// which will result in the outside click setting focus to the node
|
|
@@ -6025,14 +6031,14 @@ var Zr = {
|
|
|
6025
6031
|
});
|
|
6026
6032
|
return;
|
|
6027
6033
|
}
|
|
6028
|
-
lt(i.allowOutsideClick,
|
|
6034
|
+
lt(i.allowOutsideClick, j) || j.preventDefault();
|
|
6029
6035
|
}
|
|
6030
|
-
}, b = function(
|
|
6031
|
-
var x = Pt(
|
|
6036
|
+
}, b = function(j) {
|
|
6037
|
+
var x = Pt(j), N = l(x, j) >= 0;
|
|
6032
6038
|
if (N || x instanceof Document)
|
|
6033
6039
|
N && (o.mostRecentlyFocusedNode = x);
|
|
6034
6040
|
else {
|
|
6035
|
-
|
|
6041
|
+
j.stopImmediatePropagation();
|
|
6036
6042
|
var A, W = !0;
|
|
6037
6043
|
if (o.mostRecentlyFocusedNode)
|
|
6038
6044
|
if (Le(o.mostRecentlyFocusedNode) > 0) {
|
|
@@ -6056,31 +6062,31 @@ var Zr = {
|
|
|
6056
6062
|
// outside the trap causing the focus escape we're trying to fix)
|
|
6057
6063
|
target: o.mostRecentlyFocusedNode,
|
|
6058
6064
|
isBackward: i.isKeyBackward(o.recentNavEvent)
|
|
6059
|
-
})),
|
|
6065
|
+
})), h(A || o.mostRecentlyFocusedNode || d());
|
|
6060
6066
|
}
|
|
6061
6067
|
o.recentNavEvent = void 0;
|
|
6062
|
-
},
|
|
6068
|
+
}, T = function(j) {
|
|
6063
6069
|
var x = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
6064
|
-
o.recentNavEvent =
|
|
6070
|
+
o.recentNavEvent = j;
|
|
6065
6071
|
var N = y({
|
|
6066
|
-
event:
|
|
6072
|
+
event: j,
|
|
6067
6073
|
isBackward: x
|
|
6068
6074
|
});
|
|
6069
|
-
N && (vt(
|
|
6070
|
-
},
|
|
6071
|
-
if (Po(
|
|
6072
|
-
|
|
6075
|
+
N && (vt(j) && j.preventDefault(), h(N));
|
|
6076
|
+
}, k = function(j) {
|
|
6077
|
+
if (Po(j) && lt(i.escapeDeactivates, j) !== !1) {
|
|
6078
|
+
j.preventDefault(), c.deactivate();
|
|
6073
6079
|
return;
|
|
6074
6080
|
}
|
|
6075
|
-
(i.isKeyForward(
|
|
6076
|
-
}, w = function(
|
|
6077
|
-
var x = Pt(
|
|
6078
|
-
l(x,
|
|
6081
|
+
(i.isKeyForward(j) || i.isKeyBackward(j)) && T(j, i.isKeyBackward(j));
|
|
6082
|
+
}, w = function(j) {
|
|
6083
|
+
var x = Pt(j);
|
|
6084
|
+
l(x, j) >= 0 || lt(i.clickOutsideDeactivates, j) || lt(i.allowOutsideClick, j) || (j.preventDefault(), j.stopImmediatePropagation());
|
|
6079
6085
|
}, I = function() {
|
|
6080
6086
|
if (o.active)
|
|
6081
6087
|
return Zr.activateTrap(s, c), o.delayInitialFocusTimer = i.delayInitialFocus ? Hr(function() {
|
|
6082
|
-
|
|
6083
|
-
}) :
|
|
6088
|
+
h(d());
|
|
6089
|
+
}) : h(d()), r.addEventListener("focusin", b, !0), r.addEventListener("mousedown", v, {
|
|
6084
6090
|
capture: !0,
|
|
6085
6091
|
passive: !1
|
|
6086
6092
|
}), r.addEventListener("touchstart", v, {
|
|
@@ -6089,24 +6095,24 @@ var Zr = {
|
|
|
6089
6095
|
}), r.addEventListener("click", w, {
|
|
6090
6096
|
capture: !0,
|
|
6091
6097
|
passive: !1
|
|
6092
|
-
}), r.addEventListener("keydown",
|
|
6098
|
+
}), r.addEventListener("keydown", k, {
|
|
6093
6099
|
capture: !0,
|
|
6094
6100
|
passive: !1
|
|
6095
6101
|
}), c;
|
|
6096
6102
|
}, R = function() {
|
|
6097
6103
|
if (o.active)
|
|
6098
|
-
return r.removeEventListener("focusin", b, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", w, !0), r.removeEventListener("keydown",
|
|
6099
|
-
}, Q = function(
|
|
6100
|
-
var x =
|
|
6104
|
+
return r.removeEventListener("focusin", b, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", w, !0), r.removeEventListener("keydown", k, !0), c;
|
|
6105
|
+
}, Q = function(j) {
|
|
6106
|
+
var x = j.some(function(N) {
|
|
6101
6107
|
var A = Array.from(N.removedNodes);
|
|
6102
6108
|
return A.some(function(W) {
|
|
6103
6109
|
return W === o.mostRecentlyFocusedNode;
|
|
6104
6110
|
});
|
|
6105
6111
|
});
|
|
6106
|
-
x &&
|
|
6112
|
+
x && h(d());
|
|
6107
6113
|
}, C = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(Q) : void 0, F = function() {
|
|
6108
|
-
C && (C.disconnect(), o.active && !o.paused && o.containers.map(function(
|
|
6109
|
-
C.observe(
|
|
6114
|
+
C && (C.disconnect(), o.active && !o.paused && o.containers.map(function(j) {
|
|
6115
|
+
C.observe(j, {
|
|
6110
6116
|
subtree: !0,
|
|
6111
6117
|
childList: !0
|
|
6112
6118
|
});
|
|
@@ -6119,48 +6125,48 @@ var Zr = {
|
|
|
6119
6125
|
get paused() {
|
|
6120
6126
|
return o.paused;
|
|
6121
6127
|
},
|
|
6122
|
-
activate: function(
|
|
6128
|
+
activate: function(j) {
|
|
6123
6129
|
if (o.active)
|
|
6124
6130
|
return this;
|
|
6125
|
-
var x = f(
|
|
6131
|
+
var x = f(j, "onActivate"), N = f(j, "onPostActivate"), A = f(j, "checkCanFocusTrap");
|
|
6126
6132
|
A || m(), o.active = !0, o.paused = !1, o.nodeFocusedBeforeActivation = r.activeElement, x == null || x();
|
|
6127
6133
|
var W = function() {
|
|
6128
6134
|
A && m(), I(), F(), N == null || N();
|
|
6129
6135
|
};
|
|
6130
6136
|
return A ? (A(o.containers.concat()).then(W, W), this) : (W(), this);
|
|
6131
6137
|
},
|
|
6132
|
-
deactivate: function(
|
|
6138
|
+
deactivate: function(j) {
|
|
6133
6139
|
if (!o.active)
|
|
6134
6140
|
return this;
|
|
6135
6141
|
var x = zr({
|
|
6136
6142
|
onDeactivate: i.onDeactivate,
|
|
6137
6143
|
onPostDeactivate: i.onPostDeactivate,
|
|
6138
6144
|
checkCanReturnFocus: i.checkCanReturnFocus
|
|
6139
|
-
},
|
|
6145
|
+
}, j);
|
|
6140
6146
|
clearTimeout(o.delayInitialFocusTimer), o.delayInitialFocusTimer = void 0, R(), o.active = !1, o.paused = !1, F(), Zr.deactivateTrap(s, c);
|
|
6141
6147
|
var N = f(x, "onDeactivate"), A = f(x, "onPostDeactivate"), W = f(x, "checkCanReturnFocus"), Z = f(x, "returnFocus", "returnFocusOnDeactivate");
|
|
6142
6148
|
N == null || N();
|
|
6143
6149
|
var z = function() {
|
|
6144
6150
|
Hr(function() {
|
|
6145
|
-
Z &&
|
|
6151
|
+
Z && h(_(o.nodeFocusedBeforeActivation)), A == null || A();
|
|
6146
6152
|
});
|
|
6147
6153
|
};
|
|
6148
6154
|
return Z && W ? (W(_(o.nodeFocusedBeforeActivation)).then(z, z), this) : (z(), this);
|
|
6149
6155
|
},
|
|
6150
|
-
pause: function(
|
|
6156
|
+
pause: function(j) {
|
|
6151
6157
|
if (o.paused || !o.active)
|
|
6152
6158
|
return this;
|
|
6153
|
-
var x = f(
|
|
6159
|
+
var x = f(j, "onPause"), N = f(j, "onPostPause");
|
|
6154
6160
|
return o.paused = !0, x == null || x(), R(), F(), N == null || N(), this;
|
|
6155
6161
|
},
|
|
6156
|
-
unpause: function(
|
|
6162
|
+
unpause: function(j) {
|
|
6157
6163
|
if (!o.paused || !o.active)
|
|
6158
6164
|
return this;
|
|
6159
|
-
var x = f(
|
|
6165
|
+
var x = f(j, "onUnpause"), N = f(j, "onPostUnpause");
|
|
6160
6166
|
return o.paused = !1, x == null || x(), m(), I(), F(), N == null || N(), this;
|
|
6161
6167
|
},
|
|
6162
|
-
updateContainerElements: function(
|
|
6163
|
-
var x = [].concat(
|
|
6168
|
+
updateContainerElements: function(j) {
|
|
6169
|
+
var x = [].concat(j).filter(Boolean);
|
|
6164
6170
|
return o.containers = x.map(function(N) {
|
|
6165
6171
|
return typeof N == "string" ? r.querySelector(N) : N;
|
|
6166
6172
|
}), o.active && m(), F(), this;
|
|
@@ -6281,8 +6287,8 @@ var Mt = Y, J = lo, Vo = Do, Yo = Vo.createFocusTrap, Ko = Io, Go = Ko.isFocusab
|
|
|
6281
6287
|
}
|
|
6282
6288
|
var p = l;
|
|
6283
6289
|
if (typeof l == "string") {
|
|
6284
|
-
var
|
|
6285
|
-
if (p = (
|
|
6290
|
+
var h;
|
|
6291
|
+
if (p = (h = this.getDocument()) === null || h === void 0 ? void 0 : h.querySelector(l), !p)
|
|
6286
6292
|
throw new Error("`".concat(c, "` as selector refers to no known node"));
|
|
6287
6293
|
}
|
|
6288
6294
|
return p;
|
|
@@ -6526,14 +6532,14 @@ const an = ({
|
|
|
6526
6532
|
className: u = "",
|
|
6527
6533
|
gtmContext: d = "Modal"
|
|
6528
6534
|
}) => {
|
|
6529
|
-
const m = H(), [p,
|
|
6535
|
+
const m = H(), [p, h] = X(e), _ = (b) => {
|
|
6530
6536
|
b.key === "Escape" && y(!1);
|
|
6531
6537
|
};
|
|
6532
6538
|
ae(() => (window.addEventListener("keyup", _), () => {
|
|
6533
6539
|
window.removeEventListener("keyup", _);
|
|
6534
6540
|
}));
|
|
6535
6541
|
const y = (b) => {
|
|
6536
|
-
|
|
6542
|
+
h(b), b ? (s(), document.body.classList.add("has-overlay")) : (i(), document.body.classList.remove("has-overlay"));
|
|
6537
6543
|
};
|
|
6538
6544
|
ae(() => {
|
|
6539
6545
|
y(e);
|
|
@@ -6812,16 +6818,16 @@ const Xl = ({ members: t }) => {
|
|
|
6812
6818
|
children: c || s.formatMessage({ id: "card_cta_people" })
|
|
6813
6819
|
}
|
|
6814
6820
|
) : null;
|
|
6815
|
-
const
|
|
6816
|
-
if (e && e.onClick &&
|
|
6821
|
+
const h = ["microcourse", "event"];
|
|
6822
|
+
if (e && e.onClick && h.includes(m) && u !== "premium") {
|
|
6817
6823
|
const y = i.loading || i.registered, v = async (b) => {
|
|
6818
6824
|
if (b.preventDefault(), b.stopPropagation(), !(y || !e || !e.onClick)) {
|
|
6819
|
-
o((
|
|
6825
|
+
o((T) => ({ ...T, loading: !0 }));
|
|
6820
6826
|
try {
|
|
6821
|
-
const
|
|
6822
|
-
o(
|
|
6827
|
+
const T = await e.onClick(t);
|
|
6828
|
+
o(T === "success" ? () => ({ registered: !0, loading: !1 }) : (k) => ({ ...k, loading: !1 }));
|
|
6823
6829
|
} catch {
|
|
6824
|
-
o((
|
|
6830
|
+
o((k) => ({ ...k, loading: !1 }));
|
|
6825
6831
|
}
|
|
6826
6832
|
}
|
|
6827
6833
|
};
|
|
@@ -6877,21 +6883,21 @@ const nc = {
|
|
|
6877
6883
|
"data-testid": "card-placeholder"
|
|
6878
6884
|
}
|
|
6879
6885
|
);
|
|
6880
|
-
const { contentType:
|
|
6881
|
-
if (!
|
|
6886
|
+
const { contentType: h } = d;
|
|
6887
|
+
if (!h || !Kt[h])
|
|
6882
6888
|
return /* @__PURE__ */ a.jsx(Se, { element: "li", className: "card-wrapper" });
|
|
6883
6889
|
const {
|
|
6884
6890
|
basePath: _ = "",
|
|
6885
6891
|
className: y,
|
|
6886
6892
|
length: v,
|
|
6887
6893
|
gtmEvent: b
|
|
6888
|
-
} = Kt[
|
|
6889
|
-
let
|
|
6890
|
-
d.slug && (d.slug.slice(0, 4) === "http" || d.slug.slice(0, 2) === "//" || d.slug.slice(0, 6) === "mailto" || d.slug.slice(0, 3) === "tel") && (
|
|
6891
|
-
const
|
|
6894
|
+
} = Kt[h];
|
|
6895
|
+
let T = d.slug ? `${_}${d.slug}` : !1;
|
|
6896
|
+
d.slug && (d.slug.slice(0, 4) === "http" || d.slug.slice(0, 2) === "//" || d.slug.slice(0, 6) === "mailto" || d.slug.slice(0, 3) === "tel") && (T = d.slug);
|
|
6897
|
+
const k = { ...nc, ...v };
|
|
6892
6898
|
let w = { className: "card" };
|
|
6893
|
-
return
|
|
6894
|
-
href:
|
|
6899
|
+
return T && (w = {
|
|
6900
|
+
href: T,
|
|
6895
6901
|
className: "card gtm-trackable",
|
|
6896
6902
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
6897
6903
|
"data-gtm-event-type": `${b}-click`,
|
|
@@ -6900,20 +6906,20 @@ const nc = {
|
|
|
6900
6906
|
"li",
|
|
6901
6907
|
{
|
|
6902
6908
|
className: S("card-wrapper text-medium", y, i, {
|
|
6903
|
-
"has-link":
|
|
6904
|
-
"no-link": !
|
|
6909
|
+
"has-link": T,
|
|
6910
|
+
"no-link": !T,
|
|
6905
6911
|
"has-image": d.banner
|
|
6906
6912
|
}),
|
|
6907
|
-
"data-testid": `${
|
|
6913
|
+
"data-testid": `${h}-card`,
|
|
6908
6914
|
children: Y.createElement(
|
|
6909
|
-
|
|
6915
|
+
T ? "a" : "div",
|
|
6910
6916
|
w,
|
|
6911
6917
|
/* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6912
6918
|
/* @__PURE__ */ a.jsx(
|
|
6913
6919
|
oi,
|
|
6914
6920
|
{
|
|
6915
6921
|
className: "card-label",
|
|
6916
|
-
contentType:
|
|
6922
|
+
contentType: h,
|
|
6917
6923
|
customIcon: d.customIcon,
|
|
6918
6924
|
customLabel: d.customLabel
|
|
6919
6925
|
}
|
|
@@ -6947,21 +6953,21 @@ const nc = {
|
|
|
6947
6953
|
showGap: y !== "question",
|
|
6948
6954
|
showText: !0
|
|
6949
6955
|
},
|
|
6950
|
-
multipleText: ["event", "solutionArticle"].includes(
|
|
6956
|
+
multipleText: ["event", "solutionArticle"].includes(h) ? o.formatMessage({ id: `card_contributors_${h}` }) : void 0,
|
|
6951
6957
|
"data-testid": "contributors"
|
|
6952
6958
|
}
|
|
6953
6959
|
),
|
|
6954
6960
|
d.partner && /* @__PURE__ */ a.jsx("p", { className: "partners", "data-testid": "partners", children: d.partner.length > 1 ? o.formatMessage(
|
|
6955
6961
|
{ id: "card_partner" },
|
|
6956
6962
|
{ partner: d.partner[0], number: d.partner.length - 1 }
|
|
6957
|
-
) : et(d.partner[0],
|
|
6963
|
+
) : et(d.partner[0], k.partner) }),
|
|
6958
6964
|
/* Text */
|
|
6959
6965
|
["title", "text", "secondaryText"].map((C) => {
|
|
6960
6966
|
const F = d[C];
|
|
6961
6967
|
if (!F)
|
|
6962
6968
|
return null;
|
|
6963
6969
|
const $ = Ws(C);
|
|
6964
|
-
return /* @__PURE__ */ a.jsx("p", { className: $, "data-testid": $, children: et(F,
|
|
6970
|
+
return /* @__PURE__ */ a.jsx("p", { className: $, "data-testid": $, children: et(F, k[C]) }, C);
|
|
6965
6971
|
}),
|
|
6966
6972
|
(d == null ? void 0 : d.members) && /* @__PURE__ */ a.jsxs("span", { className: "member-information", children: [
|
|
6967
6973
|
((I = d == null ? void 0 : d.members) == null ? void 0 : I.isMember) && /* @__PURE__ */ a.jsx(
|
|
@@ -6982,7 +6988,7 @@ const nc = {
|
|
|
6982
6988
|
) })
|
|
6983
6989
|
] }),
|
|
6984
6990
|
/* @__PURE__ */ a.jsx(ec, { type: y || "", data: d }),
|
|
6985
|
-
/* @__PURE__ */ a.jsx(tc, { data: d, cta: r, link:
|
|
6991
|
+
/* @__PURE__ */ a.jsx(tc, { data: d, cta: r, link: T || "", gtmContext: s })
|
|
6986
6992
|
] })
|
|
6987
6993
|
)
|
|
6988
6994
|
}
|
|
@@ -7047,25 +7053,25 @@ const ic = ({
|
|
|
7047
7053
|
}), { cardsPerPage: u, isLoading: d } = f, [m, p] = X({
|
|
7048
7054
|
currentPage: 0,
|
|
7049
7055
|
loadedPages: [0]
|
|
7050
|
-
}), { currentPage:
|
|
7056
|
+
}), { currentPage: h, loadedPages: _ } = m, y = e.length, v = Math.ceil(y / u), b = pe(null), T = wt(!0, !0, b == null ? void 0 : b.current);
|
|
7051
7057
|
ae(() => {
|
|
7052
7058
|
let C = 1;
|
|
7053
|
-
|
|
7059
|
+
T && (T >= En.fourCards ? C = 4 : T >= En.threeCards ? C = 3 : T >= En.twoCards && (C = 2), C > y && (C = y)), l((F) => ({
|
|
7054
7060
|
...F,
|
|
7055
7061
|
cardsPerPage: C,
|
|
7056
7062
|
isLoading: !1
|
|
7057
7063
|
}));
|
|
7058
|
-
}, [
|
|
7059
|
-
const
|
|
7060
|
-
let F =
|
|
7064
|
+
}, [T, y]);
|
|
7065
|
+
const k = (C = "next") => {
|
|
7066
|
+
let F = h;
|
|
7061
7067
|
if (typeof C == "string")
|
|
7062
7068
|
if (C === "next")
|
|
7063
|
-
if (
|
|
7064
|
-
F =
|
|
7069
|
+
if (h < v - 1)
|
|
7070
|
+
F = h + 1;
|
|
7065
7071
|
else
|
|
7066
7072
|
return;
|
|
7067
|
-
else if (
|
|
7068
|
-
F =
|
|
7073
|
+
else if (h > 0)
|
|
7074
|
+
F = h - 1;
|
|
7069
7075
|
else
|
|
7070
7076
|
return;
|
|
7071
7077
|
else
|
|
@@ -7081,19 +7087,19 @@ const ic = ({
|
|
|
7081
7087
|
if (Rt === null)
|
|
7082
7088
|
return;
|
|
7083
7089
|
const F = C.touches[0].clientX, $ = Rt - F;
|
|
7084
|
-
$ > 5 ?
|
|
7090
|
+
$ > 5 ? k("next") : $ < -5 && k("previous"), Rt = null;
|
|
7085
7091
|
}, R = {
|
|
7086
|
-
"--width": `${
|
|
7092
|
+
"--width": `${T || 0}px`,
|
|
7087
7093
|
"--total-cards": y,
|
|
7088
7094
|
"--cards-per-page": u,
|
|
7089
|
-
"--page":
|
|
7095
|
+
"--page": h
|
|
7090
7096
|
};
|
|
7091
7097
|
if (d)
|
|
7092
7098
|
return /* @__PURE__ */ a.jsx(wa, { layout: `carousel${s ? "-with-title" : ""}` });
|
|
7093
7099
|
const Q = (C, F) => {
|
|
7094
|
-
var
|
|
7100
|
+
var j;
|
|
7095
7101
|
let $ = null;
|
|
7096
|
-
return (
|
|
7102
|
+
return (j = C == null ? void 0 : C.sys) != null && j.id ? $ = `card-${C.sys.id}` : C != null && C.slug ? $ = `card-${C.slug}` : [n[F], C.contentType].includes("customCard") && ($ = `card-${window.btoa(`${C.title} ${C.createdAt}`)}-${F}`), $;
|
|
7097
7103
|
};
|
|
7098
7104
|
return /* @__PURE__ */ a.jsxs(
|
|
7099
7105
|
"section",
|
|
@@ -7113,7 +7119,7 @@ const ic = ({
|
|
|
7113
7119
|
"data-testid": "carousel-list",
|
|
7114
7120
|
children: e.map((C, F) => {
|
|
7115
7121
|
let $ = Q(C, F);
|
|
7116
|
-
return $ && ac(F, u,
|
|
7122
|
+
return $ && ac(F, u, h, _) ? /* @__PURE__ */ a.jsx(
|
|
7117
7123
|
Ua,
|
|
7118
7124
|
{
|
|
7119
7125
|
id: $,
|
|
@@ -7142,22 +7148,22 @@ const ic = ({
|
|
|
7142
7148
|
size: "large",
|
|
7143
7149
|
icon: { icon: "chevron_left" },
|
|
7144
7150
|
onClick: (C) => {
|
|
7145
|
-
C.preventDefault(), C.stopPropagation(),
|
|
7151
|
+
C.preventDefault(), C.stopPropagation(), k("previous");
|
|
7146
7152
|
},
|
|
7147
7153
|
screenreaderText: c.formatMessage({
|
|
7148
7154
|
id: "carousel_pagination_previous"
|
|
7149
7155
|
}),
|
|
7150
|
-
disabled:
|
|
7156
|
+
disabled: h <= 0
|
|
7151
7157
|
}
|
|
7152
7158
|
) }),
|
|
7153
7159
|
[...Array(v)].map((C, F) => /* @__PURE__ */ a.jsx("li", { "data-testid": "carousel-controls-button", children: /* @__PURE__ */ a.jsx(
|
|
7154
7160
|
"button",
|
|
7155
7161
|
{
|
|
7156
7162
|
className: S("page-indicator", {
|
|
7157
|
-
selected: F ===
|
|
7163
|
+
selected: F === h
|
|
7158
7164
|
}),
|
|
7159
7165
|
onClick: ($) => {
|
|
7160
|
-
$.preventDefault(), $.stopPropagation(),
|
|
7166
|
+
$.preventDefault(), $.stopPropagation(), k(F);
|
|
7161
7167
|
},
|
|
7162
7168
|
children: /* @__PURE__ */ a.jsx(be, { showOnFocus: !1, children: c.formatMessage(
|
|
7163
7169
|
{ id: "carousel_pagination_page" },
|
|
@@ -7172,10 +7178,10 @@ const ic = ({
|
|
|
7172
7178
|
size: "large",
|
|
7173
7179
|
icon: { icon: "chevron_right" },
|
|
7174
7180
|
onClick: (C) => {
|
|
7175
|
-
C.preventDefault(), C.stopPropagation(),
|
|
7181
|
+
C.preventDefault(), C.stopPropagation(), k("next");
|
|
7176
7182
|
},
|
|
7177
7183
|
screenreaderText: c.formatMessage({ id: "carousel_pagination_next" }),
|
|
7178
|
-
disabled:
|
|
7184
|
+
disabled: h >= v - 1
|
|
7179
7185
|
}
|
|
7180
7186
|
) })
|
|
7181
7187
|
] })
|
|
@@ -7338,8 +7344,8 @@ const ru = ({
|
|
|
7338
7344
|
};
|
|
7339
7345
|
return /* @__PURE__ */ a.jsx("ul", { className: S("filters", s), children: o.map(({ id: u, text: d, disabled: m = !1, callback: p = () => {
|
|
7340
7346
|
} }) => {
|
|
7341
|
-
let
|
|
7342
|
-
return m && (
|
|
7347
|
+
let h = {};
|
|
7348
|
+
return m && (h = {
|
|
7343
7349
|
disabled: !0,
|
|
7344
7350
|
"aria-label": i.formatMessage({ id: "filters_disabled" }, { name: d })
|
|
7345
7351
|
}), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
@@ -7349,7 +7355,7 @@ const ru = ({
|
|
|
7349
7355
|
onClick: (_) => {
|
|
7350
7356
|
_.preventDefault(), _.stopPropagation(), l(u, p);
|
|
7351
7357
|
},
|
|
7352
|
-
...
|
|
7358
|
+
...h,
|
|
7353
7359
|
children: d
|
|
7354
7360
|
}
|
|
7355
7361
|
) }, u);
|
|
@@ -7385,15 +7391,15 @@ const Ft = "languageSwitcher_", au = ({
|
|
|
7385
7391
|
(y) => y && y.post_name
|
|
7386
7392
|
))
|
|
7387
7393
|
return null;
|
|
7388
|
-
const
|
|
7394
|
+
const h = Object.keys(r), _ = d !== t;
|
|
7389
7395
|
return /* @__PURE__ */ a.jsxs("div", { className: S("language-switcher text-small", o, f), children: [
|
|
7390
7396
|
/* @__PURE__ */ a.jsxs("nav", { children: [
|
|
7391
7397
|
o !== "short" && /* @__PURE__ */ a.jsx("p", { children: c || l.formatMessage({ id: `${Ft}label` }) }),
|
|
7392
|
-
/* @__PURE__ */ a.jsx("ul", { children:
|
|
7393
|
-
var
|
|
7398
|
+
/* @__PURE__ */ a.jsx("ul", { children: h.map((y) => {
|
|
7399
|
+
var T;
|
|
7394
7400
|
if (!gn[y])
|
|
7395
7401
|
return null;
|
|
7396
|
-
const v = (
|
|
7402
|
+
const v = (T = r[y]) == null ? void 0 : T.post_name;
|
|
7397
7403
|
let b = { className: y };
|
|
7398
7404
|
if (d === y)
|
|
7399
7405
|
b["aria-label"] = l.formatMessage(
|
|
@@ -7401,14 +7407,14 @@ const Ft = "languageSwitcher_", au = ({
|
|
|
7401
7407
|
{ language: gn[y] }
|
|
7402
7408
|
);
|
|
7403
7409
|
else {
|
|
7404
|
-
const
|
|
7410
|
+
const k = oc(y, v, i);
|
|
7405
7411
|
b = {
|
|
7406
7412
|
...b,
|
|
7407
|
-
href: typeof
|
|
7413
|
+
href: typeof k == "string" ? k : k.url,
|
|
7408
7414
|
onClick: (w) => {
|
|
7409
7415
|
m(y), u(y), typeof s < "u" && (w.preventDefault(), w.stopPropagation(), s(
|
|
7410
7416
|
y,
|
|
7411
|
-
typeof
|
|
7417
|
+
typeof k == "string" ? k : k.urlForRouter
|
|
7412
7418
|
));
|
|
7413
7419
|
}
|
|
7414
7420
|
};
|
|
@@ -7457,8 +7463,8 @@ const $n = ks({ locale: "en", messages: rt }), sn = ({
|
|
|
7457
7463
|
if (!n)
|
|
7458
7464
|
try {
|
|
7459
7465
|
await e(p);
|
|
7460
|
-
} catch (
|
|
7461
|
-
|
|
7466
|
+
} catch (h) {
|
|
7467
|
+
h instanceof Error ? d(h.message) : d("Unknown error");
|
|
7462
7468
|
}
|
|
7463
7469
|
};
|
|
7464
7470
|
return !u && !t && !c.endOfFeed ? null : /* @__PURE__ */ a.jsx("footer", { className: S("load-more", f), children: !u && t ? /* @__PURE__ */ a.jsx(
|
|
@@ -7523,7 +7529,7 @@ const cc = ({
|
|
|
7523
7529
|
screenreaderText: s.formatMessage({ id: "moreMenu" })
|
|
7524
7530
|
}
|
|
7525
7531
|
),
|
|
7526
|
-
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: u, text: d, icon: m, ...p },
|
|
7532
|
+
/* @__PURE__ */ a.jsx("ul", { id: e, hidden: !o, children: n.map(({ href: l, onClick: u, text: d, icon: m, ...p }, h) => {
|
|
7527
7533
|
const _ = {
|
|
7528
7534
|
...p,
|
|
7529
7535
|
onClick: (y) => {
|
|
@@ -7547,7 +7553,7 @@ const cc = ({
|
|
|
7547
7553
|
..._,
|
|
7548
7554
|
children: d
|
|
7549
7555
|
}
|
|
7550
|
-
) }, `${window.btoa(d)}_${
|
|
7556
|
+
) }, `${window.btoa(d)}_${h}`);
|
|
7551
7557
|
}) })
|
|
7552
7558
|
] })
|
|
7553
7559
|
});
|
|
@@ -7671,8 +7677,8 @@ const mc = "shareLinks_", su = ({
|
|
|
7671
7677
|
/* @__PURE__ */ a.jsx("ul", { children: f.map(({ key: l, icon: u, url: d, shouldRender: m = !0, onClick: p }) => {
|
|
7672
7678
|
if (typeof m == "function" && !m())
|
|
7673
7679
|
return null;
|
|
7674
|
-
const
|
|
7675
|
-
return p && (
|
|
7680
|
+
const h = {};
|
|
7681
|
+
return p && (h.onClick = (_) => p(_, d)), /* @__PURE__ */ a.jsx("li", { children: /* @__PURE__ */ a.jsx(
|
|
7676
7682
|
se,
|
|
7677
7683
|
{
|
|
7678
7684
|
size: s,
|
|
@@ -7686,7 +7692,7 @@ const mc = "shareLinks_", su = ({
|
|
|
7686
7692
|
"data-gtm-event-type": `${l}-click`,
|
|
7687
7693
|
"data-testid": "link",
|
|
7688
7694
|
screenreaderText: c.formatMessage({ id: `${mc}link_${l}` }),
|
|
7689
|
-
...
|
|
7695
|
+
...h
|
|
7690
7696
|
}
|
|
7691
7697
|
) }, l);
|
|
7692
7698
|
}) })
|
|
@@ -7718,7 +7724,7 @@ const iu = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7718
7724
|
}
|
|
7719
7725
|
}, [i]);
|
|
7720
7726
|
const c = [], f = [];
|
|
7721
|
-
return t.forEach(({ id: u, text: d, content: m, href: p, hasCarousel:
|
|
7727
|
+
return t.forEach(({ id: u, text: d, content: m, href: p, hasCarousel: h }, _) => {
|
|
7722
7728
|
u = r(u, d, _);
|
|
7723
7729
|
const y = i === u, v = {};
|
|
7724
7730
|
p || (v["aria-controls"] = u, v.onClick = (b) => {
|
|
@@ -8245,8 +8251,8 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8245
8251
|
if (c.href) {
|
|
8246
8252
|
let b = c.gtmType || `${t}-click`;
|
|
8247
8253
|
if (b.includes(".")) {
|
|
8248
|
-
const
|
|
8249
|
-
b = `${
|
|
8254
|
+
const T = b.split("."), k = T[T.length - 2];
|
|
8255
|
+
b = `${k === "topics" ? `${k}-` : ""}${T[T.length - 1]}`;
|
|
8250
8256
|
}
|
|
8251
8257
|
m = {
|
|
8252
8258
|
href: c.href,
|
|
@@ -8263,29 +8269,29 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8263
8269
|
...c.props || {}
|
|
8264
8270
|
});
|
|
8265
8271
|
}
|
|
8266
|
-
const p = c.order && c.order[0] && c[c.order[0]],
|
|
8272
|
+
const p = c.order && c.order[0] && c[c.order[0]], h = p && c[c.order[0]].order, _ = m && window.location.pathname === c.href;
|
|
8267
8273
|
let y = {}, v = {};
|
|
8268
8274
|
if (p) {
|
|
8269
|
-
const b = c.menuId || t,
|
|
8270
|
-
onClick: (
|
|
8275
|
+
const b = c.menuId || t, T = {
|
|
8276
|
+
onClick: (k) => fe.events.onClick(k, { id: b, callback: s, isOpen: r[b] }),
|
|
8271
8277
|
onFocus: () => fe.events.onFocus({ id: b }),
|
|
8272
8278
|
onBlur: () => fe.events.onBlur({ id: b, callback: s }),
|
|
8273
8279
|
onMouseLeave: () => fe.events.onBlur({ id: b, callback: s }),
|
|
8274
8280
|
onMouseEnter: () => fe.events.onMouseEnter({ id: b, callback: s })
|
|
8275
8281
|
};
|
|
8276
|
-
n && (
|
|
8277
|
-
...
|
|
8278
|
-
onKeyPress: (
|
|
8279
|
-
|
|
8282
|
+
n && (h && (y = {
|
|
8283
|
+
...T,
|
|
8284
|
+
onKeyPress: (k) => {
|
|
8285
|
+
k.key === "Enter" && fe.events.onClick(k, { id: b, callback: s, isOpen: r[b] });
|
|
8280
8286
|
},
|
|
8281
8287
|
tabIndex: "0",
|
|
8282
8288
|
// Add a `tabIndex` so keyboard users can focus on the `li`
|
|
8283
8289
|
"aria-haspopup": !0,
|
|
8284
8290
|
"aria-expanded": r[b],
|
|
8285
8291
|
"aria-controls": b
|
|
8286
|
-
}), v = { hidden: b in r ? !r[b] : !0 }),
|
|
8292
|
+
}), v = { hidden: b in r ? !r[b] : !0 }), h || (v = {
|
|
8287
8293
|
...v,
|
|
8288
|
-
...
|
|
8294
|
+
...T
|
|
8289
8295
|
});
|
|
8290
8296
|
}
|
|
8291
8297
|
return /* @__PURE__ */ a.jsxs(
|
|
@@ -8294,7 +8300,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8294
8300
|
className: S({
|
|
8295
8301
|
[c.className]: c.className,
|
|
8296
8302
|
"has-submenu": p,
|
|
8297
|
-
parent:
|
|
8303
|
+
parent: h,
|
|
8298
8304
|
active: _
|
|
8299
8305
|
}),
|
|
8300
8306
|
role: "none",
|
|
@@ -8308,7 +8314,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8308
8314
|
c.order && /* @__PURE__ */ a.jsx("ul", { ...v, children: c.order.map((b) => {
|
|
8309
8315
|
if (!c[b])
|
|
8310
8316
|
return null;
|
|
8311
|
-
const
|
|
8317
|
+
const T = {
|
|
8312
8318
|
isLoggedIn: e,
|
|
8313
8319
|
isDesktopVersion: n,
|
|
8314
8320
|
menus: r,
|
|
@@ -8323,13 +8329,13 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8323
8329
|
}),
|
|
8324
8330
|
children: [
|
|
8325
8331
|
o.formatMessage({ id: `${d}_${b}` }),
|
|
8326
|
-
/* @__PURE__ */ a.jsx("ul", { children: c[b].order.map((
|
|
8332
|
+
/* @__PURE__ */ a.jsx("ul", { children: c[b].order.map((k) => /* @__PURE__ */ a.jsx(
|
|
8327
8333
|
Jt,
|
|
8328
8334
|
{
|
|
8329
|
-
id: `${t}.${b}.${
|
|
8330
|
-
...
|
|
8335
|
+
id: `${t}.${b}.${k}`,
|
|
8336
|
+
...T
|
|
8331
8337
|
},
|
|
8332
|
-
|
|
8338
|
+
k
|
|
8333
8339
|
)) })
|
|
8334
8340
|
]
|
|
8335
8341
|
},
|
|
@@ -8338,7 +8344,7 @@ const Xe = "footer_", Gt = "SiteFooter", Kr = ({ group: t }) => {
|
|
|
8338
8344
|
Jt,
|
|
8339
8345
|
{
|
|
8340
8346
|
id: `${t}.${b}`,
|
|
8341
|
-
...
|
|
8347
|
+
...T
|
|
8342
8348
|
},
|
|
8343
8349
|
b
|
|
8344
8350
|
);
|
|
@@ -8371,8 +8377,8 @@ const vc = { height: 67, height_desktop: 83 }, Ha = ({ showNavigation: t = !0 })
|
|
|
8371
8377
|
}
|
|
8372
8378
|
}
|
|
8373
8379
|
});
|
|
8374
|
-
const d = (p,
|
|
8375
|
-
fe.handleMenus({ id: p, value:
|
|
8380
|
+
const d = (p, h) => {
|
|
8381
|
+
fe.handleMenus({ id: p, value: h, menus: l, dispatch: c });
|
|
8376
8382
|
}, m = pe(null);
|
|
8377
8383
|
return _t(() => {
|
|
8378
8384
|
l.navigation && fe.autoFocus({
|
|
@@ -8551,10 +8557,10 @@ const bc = () => {
|
|
|
8551
8557
|
variant: d = "default",
|
|
8552
8558
|
circle: m = "default",
|
|
8553
8559
|
modal: p = "default"
|
|
8554
|
-
} = i,
|
|
8560
|
+
} = i, h = Ls();
|
|
8555
8561
|
ae(() => {
|
|
8556
8562
|
window.scrollTo(0, 0);
|
|
8557
|
-
}, [
|
|
8563
|
+
}, [h]);
|
|
8558
8564
|
const _ = Lt(t, { locale: c }), y = Lt(e, {
|
|
8559
8565
|
locale: c
|
|
8560
8566
|
}), v = Lt(n, {
|
|
@@ -8808,19 +8814,19 @@ const fu = ({
|
|
|
8808
8814
|
/* @__PURE__ */ a.jsx("p", { children: n }),
|
|
8809
8815
|
/* @__PURE__ */ a.jsx("ol", { children: t && t.length > 0 && t.map(
|
|
8810
8816
|
({
|
|
8811
|
-
completed:
|
|
8817
|
+
completed: h,
|
|
8812
8818
|
completionTime: _,
|
|
8813
8819
|
contentType: y,
|
|
8814
8820
|
icon: v,
|
|
8815
8821
|
image: b,
|
|
8816
|
-
isIntroduction:
|
|
8817
|
-
optional:
|
|
8822
|
+
isIntroduction: T,
|
|
8823
|
+
optional: k,
|
|
8818
8824
|
slug: w,
|
|
8819
8825
|
subsectionId: I,
|
|
8820
8826
|
title: R,
|
|
8821
8827
|
type: Q
|
|
8822
8828
|
}) => {
|
|
8823
|
-
const C = s && e ||
|
|
8829
|
+
const C = s && e || T, F = {};
|
|
8824
8830
|
return b && (F.style = { "--image": `url(${b})` }), /* @__PURE__ */ a.jsx(
|
|
8825
8831
|
"li",
|
|
8826
8832
|
{
|
|
@@ -8828,7 +8834,7 @@ const fu = ({
|
|
|
8828
8834
|
article: y === Et.ARTICLE,
|
|
8829
8835
|
discussion: y === Et.DISCUSSION,
|
|
8830
8836
|
quiz: y === Et.QUIZ,
|
|
8831
|
-
completed:
|
|
8837
|
+
completed: h && y === Et.ARTICLE,
|
|
8832
8838
|
locked: !C
|
|
8833
8839
|
}),
|
|
8834
8840
|
...F,
|
|
@@ -8856,7 +8862,7 @@ const fu = ({
|
|
|
8856
8862
|
{
|
|
8857
8863
|
completionTime: _,
|
|
8858
8864
|
icon: v,
|
|
8859
|
-
optional:
|
|
8865
|
+
optional: k,
|
|
8860
8866
|
type: Q,
|
|
8861
8867
|
children: u && u[w] && /* @__PURE__ */ a.jsx("span", { className: "quiz-score", children: `${u[w]}%` })
|
|
8862
8868
|
}
|
|
@@ -8932,10 +8938,10 @@ const we = "discussion_form_", ar = ({
|
|
|
8932
8938
|
},
|
|
8933
8939
|
gtmContext: l = "DiscussionForm"
|
|
8934
8940
|
}) => {
|
|
8935
|
-
var F, $,
|
|
8941
|
+
var F, $, j;
|
|
8936
8942
|
const u = H(), d = Ee(Ie), [m, p] = X(
|
|
8937
8943
|
n.isEditing && n.isEditing.text || ""
|
|
8938
|
-
), [
|
|
8944
|
+
), [h, _] = X(c.error || !1), [y, v] = X(!1), b = pe(null);
|
|
8939
8945
|
if (r || (r = b), n.isLoading)
|
|
8940
8946
|
return /* @__PURE__ */ a.jsx(
|
|
8941
8947
|
Se,
|
|
@@ -8944,7 +8950,7 @@ const we = "discussion_form_", ar = ({
|
|
|
8944
8950
|
"data-testid": "loading-placeholder"
|
|
8945
8951
|
}
|
|
8946
8952
|
);
|
|
8947
|
-
const
|
|
8953
|
+
const T = (x) => {
|
|
8948
8954
|
const N = x.target.value;
|
|
8949
8955
|
p(N);
|
|
8950
8956
|
let A;
|
|
@@ -8958,12 +8964,12 @@ const we = "discussion_form_", ar = ({
|
|
|
8958
8964
|
`${we}error_noPermission`,
|
|
8959
8965
|
t.type,
|
|
8960
8966
|
"action"
|
|
8961
|
-
), A ? _(A) :
|
|
8967
|
+
), A ? _(A) : h && _(!1);
|
|
8962
8968
|
};
|
|
8963
|
-
let
|
|
8969
|
+
let k = `${t.type}-form`;
|
|
8964
8970
|
if (t.type === "response" || t.type === "reply") {
|
|
8965
|
-
const x = ((F = t.slugs) == null ? void 0 : F.reply) || (($ = t.slugs) == null ? void 0 : $.answer) || ((
|
|
8966
|
-
x && (
|
|
8971
|
+
const x = ((F = t.slugs) == null ? void 0 : F.reply) || (($ = t.slugs) == null ? void 0 : $.answer) || ((j = t.slugs) == null ? void 0 : j.question) || "";
|
|
8972
|
+
x && (k = `${k}-${x.slice(-15)}`);
|
|
8967
8973
|
}
|
|
8968
8974
|
const w = async (x) => {
|
|
8969
8975
|
var A;
|
|
@@ -9056,7 +9062,7 @@ const we = "discussion_form_", ar = ({
|
|
|
9056
9062
|
}), /* @__PURE__ */ a.jsxs(
|
|
9057
9063
|
"form",
|
|
9058
9064
|
{
|
|
9059
|
-
id:
|
|
9065
|
+
id: k,
|
|
9060
9066
|
className: S("discussion-card discussion-form", {
|
|
9061
9067
|
"no-styling": n.isInWrapper && n.isEditing
|
|
9062
9068
|
}),
|
|
@@ -9071,12 +9077,12 @@ const we = "discussion_form_", ar = ({
|
|
|
9071
9077
|
gtmType: "profile-click"
|
|
9072
9078
|
}
|
|
9073
9079
|
),
|
|
9074
|
-
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${
|
|
9080
|
+
/* @__PURE__ */ a.jsx(be, { element: "label", showOnFocus: !1, htmlFor: `${k}-input`, children: $e(u.formatMessage, `${we}label`, t.type, "action") }),
|
|
9075
9081
|
/* @__PURE__ */ a.jsx(
|
|
9076
9082
|
Ms,
|
|
9077
9083
|
{
|
|
9078
9084
|
ref: r,
|
|
9079
|
-
id: `${
|
|
9085
|
+
id: `${k}-input`,
|
|
9080
9086
|
name: t.type,
|
|
9081
9087
|
placeholder: s || $e(
|
|
9082
9088
|
u.formatMessage,
|
|
@@ -9084,10 +9090,10 @@ const we = "discussion_form_", ar = ({
|
|
|
9084
9090
|
t.type,
|
|
9085
9091
|
"action"
|
|
9086
9092
|
),
|
|
9087
|
-
onChange:
|
|
9088
|
-
value: y === "submitting" && !
|
|
9093
|
+
onChange: T,
|
|
9094
|
+
value: y === "submitting" && !h ? "" : m,
|
|
9089
9095
|
maxLength: i,
|
|
9090
|
-
"aria-invalid": !!
|
|
9096
|
+
"aria-invalid": !!h,
|
|
9091
9097
|
"aria-errormessage": "error-message",
|
|
9092
9098
|
minRows: o,
|
|
9093
9099
|
autoFocus: !!n.isEditing
|
|
@@ -9109,15 +9115,15 @@ const we = "discussion_form_", ar = ({
|
|
|
9109
9115
|
}) }),
|
|
9110
9116
|
/* @__PURE__ */ a.jsx(jt, { buttons: C }),
|
|
9111
9117
|
y === "submitted" && n.showSuccessMessage && /* @__PURE__ */ a.jsx(Wt, { className: "success", "data-testid": "success", children: $e(u.formatMessage, `${we}success`, t.type, "action") }),
|
|
9112
|
-
|
|
9113
|
-
{ id:
|
|
9118
|
+
h && /* @__PURE__ */ a.jsx(Wt, { id: "error-message", className: "error", "data-testid": "error", children: c.error ? c.error : typeof h == "string" ? h.includes(" ") ? h : u.formatMessage(
|
|
9119
|
+
{ id: h },
|
|
9114
9120
|
{
|
|
9115
9121
|
action: u.formatMessage({
|
|
9116
9122
|
id: `discussion_action_${t.type}`
|
|
9117
9123
|
}),
|
|
9118
9124
|
maxLength: i
|
|
9119
9125
|
}
|
|
9120
|
-
) :
|
|
9126
|
+
) : h })
|
|
9121
9127
|
]
|
|
9122
9128
|
}
|
|
9123
9129
|
);
|
|
@@ -9182,17 +9188,17 @@ const An = () => {
|
|
|
9182
9188
|
ae(() => {
|
|
9183
9189
|
p(s);
|
|
9184
9190
|
}, [s]);
|
|
9185
|
-
const [u, d] = X(e), [m, p] = X(s), [
|
|
9191
|
+
const [u, d] = X(e), [m, p] = X(s), [h, _] = X(!1), [y, v] = X(!1), b = xt(
|
|
9186
9192
|
() => Ec(n, Dn),
|
|
9187
9193
|
[n]
|
|
9188
|
-
),
|
|
9194
|
+
), T = (w) => {
|
|
9189
9195
|
if (w.preventDefault(), w.stopPropagation(), v(!1), bt)
|
|
9190
9196
|
return An(), !1;
|
|
9191
|
-
if (An(),
|
|
9197
|
+
if (An(), h || !o)
|
|
9192
9198
|
return !1;
|
|
9193
|
-
bt = setTimeout(
|
|
9194
|
-
},
|
|
9195
|
-
if (An(),
|
|
9199
|
+
bt = setTimeout(k, 350);
|
|
9200
|
+
}, k = async () => {
|
|
9201
|
+
if (An(), h || !o)
|
|
9196
9202
|
return !1;
|
|
9197
9203
|
let w = m ? u - 1 : u + 1;
|
|
9198
9204
|
w < 0 && (w = 0), _(!0), d(w), p(!m);
|
|
@@ -9212,11 +9218,11 @@ const An = () => {
|
|
|
9212
9218
|
};
|
|
9213
9219
|
return Y.createElement(t, {
|
|
9214
9220
|
className: S("likes-wrapper text-medium action-button", {
|
|
9215
|
-
"show-spinner":
|
|
9221
|
+
"show-spinner": h,
|
|
9216
9222
|
"is-liked": m,
|
|
9217
9223
|
disabled: !o
|
|
9218
9224
|
}),
|
|
9219
|
-
onClick:
|
|
9225
|
+
onClick: T,
|
|
9220
9226
|
onMouseEnter: () => {
|
|
9221
9227
|
v(!0);
|
|
9222
9228
|
},
|
|
@@ -9247,7 +9253,7 @@ const An = () => {
|
|
|
9247
9253
|
})
|
|
9248
9254
|
}
|
|
9249
9255
|
) : !1,
|
|
9250
|
-
onClick:
|
|
9256
|
+
onClick: T,
|
|
9251
9257
|
disabled: !o,
|
|
9252
9258
|
"aria-hidden": !o,
|
|
9253
9259
|
"data-testid": "like-button",
|
|
@@ -9316,11 +9322,11 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9316
9322
|
},
|
|
9317
9323
|
links: m = {},
|
|
9318
9324
|
className: p,
|
|
9319
|
-
gtmContext:
|
|
9325
|
+
gtmContext: h = "DiscussionAnswer",
|
|
9320
9326
|
children: _,
|
|
9321
9327
|
isTruncated: y = !1
|
|
9322
9328
|
}) => {
|
|
9323
|
-
const v = H(), b = Ee(Ie),
|
|
9329
|
+
const v = H(), b = Ee(Ie), T = Ee(sr), { author: k, canLike: w, createdAt: I, id: R, likes: Q = 0, userLiked: C, comments: F = 0 } = e, $ = b && b.id && typeof k != "string" && k.id && k.id === b.id || !1, j = typeof w == "boolean" ? w : n ? !$ : !1, x = $ && (!e.createdAt || Ys(e.createdAt, 10, "seconds")), N = pe(null), [A, W] = X({
|
|
9324
9330
|
body: e && e.body || "",
|
|
9325
9331
|
isEditing: !1,
|
|
9326
9332
|
didEdit: e && e.isEdited || !1
|
|
@@ -9365,7 +9371,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9365
9371
|
q(`${Me}form_error`);
|
|
9366
9372
|
}
|
|
9367
9373
|
}, V = () => {
|
|
9368
|
-
|
|
9374
|
+
T && T.updateConversation && T.updateConversation({ showForm: !0 }), setTimeout(() => {
|
|
9369
9375
|
var Ne, Ce, Ue;
|
|
9370
9376
|
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Ne = e.slugs) == null ? void 0 : Ne.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((Ue = e.slugs) == null ? void 0 : Ue.question) || "").toLowerCase().slice(-15)}`, D = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
9371
9377
|
ve && ve.focus(), D && D.scrollIntoView({ behavior: "smooth" });
|
|
@@ -9404,7 +9410,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9404
9410
|
onClick: () => W({ ...A, isEditing: !0 }),
|
|
9405
9411
|
icon: "pencil-paper",
|
|
9406
9412
|
className: "gtm-trackable",
|
|
9407
|
-
"data-gtm-event-context":
|
|
9413
|
+
"data-gtm-event-context": h,
|
|
9408
9414
|
"data-gtm-event-type": `edit-${e.type}-click`
|
|
9409
9415
|
},
|
|
9410
9416
|
{
|
|
@@ -9414,7 +9420,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9414
9420
|
},
|
|
9415
9421
|
icon: "trash",
|
|
9416
9422
|
className: "gtm-trackable",
|
|
9417
|
-
"data-gtm-event-context":
|
|
9423
|
+
"data-gtm-event-context": h,
|
|
9418
9424
|
"data-gtm-event-type": `delete-${e.type}-click`,
|
|
9419
9425
|
...Xo(`delete-${e.slug}-modal`, Z)
|
|
9420
9426
|
}
|
|
@@ -9440,10 +9446,10 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9440
9446
|
!A.isEditing && /* @__PURE__ */ a.jsx(
|
|
9441
9447
|
tr,
|
|
9442
9448
|
{
|
|
9443
|
-
member:
|
|
9449
|
+
member: k,
|
|
9444
9450
|
additionalContent: { createdAt: I, didEdit: A.didEdit },
|
|
9445
|
-
className: typeof
|
|
9446
|
-
gtmContext:
|
|
9451
|
+
className: typeof k != "string" && k.id === s ? "highlighted" : "",
|
|
9452
|
+
gtmContext: h,
|
|
9447
9453
|
gtmType: "profile-click"
|
|
9448
9454
|
}
|
|
9449
9455
|
),
|
|
@@ -9475,14 +9481,14 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9475
9481
|
q(""), W({ ...A, isEditing: !1 });
|
|
9476
9482
|
}
|
|
9477
9483
|
},
|
|
9478
|
-
gtmContext: `${
|
|
9484
|
+
gtmContext: `${h}Form`
|
|
9479
9485
|
}
|
|
9480
9486
|
) : m.post ? /* @__PURE__ */ a.jsx(
|
|
9481
9487
|
"a",
|
|
9482
9488
|
{
|
|
9483
9489
|
href: m.post,
|
|
9484
9490
|
className: "gtm-trackable",
|
|
9485
|
-
"data-gtm-event-context":
|
|
9491
|
+
"data-gtm-event-context": h,
|
|
9486
9492
|
"data-gtm-event-type": "title-click",
|
|
9487
9493
|
children: /* @__PURE__ */ a.jsx(Ut, { options: { overrides: { a: gi } }, children: te })
|
|
9488
9494
|
}
|
|
@@ -9512,7 +9518,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9512
9518
|
isShort: !1,
|
|
9513
9519
|
userLiked: C,
|
|
9514
9520
|
content: { type: e.type, slugs: e.slugs },
|
|
9515
|
-
canLike:
|
|
9521
|
+
canLike: j,
|
|
9516
9522
|
peopleWhoLiked: e.peopleWhoLiked,
|
|
9517
9523
|
functions: {
|
|
9518
9524
|
createLike: l,
|
|
@@ -9538,7 +9544,7 @@ const Me = "discussion_", Cc = 280, cn = ({
|
|
|
9538
9544
|
href: m.comments ? m.comments : !1,
|
|
9539
9545
|
onClick: m.comments || typeof d != "function" ? !1 : d,
|
|
9540
9546
|
className: "gtm-trackable",
|
|
9541
|
-
"data-gtm-event-context":
|
|
9547
|
+
"data-gtm-event-context": h,
|
|
9542
9548
|
"data-gtm-event-type": `answer-${e.type}-click`,
|
|
9543
9549
|
screenreaderText: v.formatMessage(
|
|
9544
9550
|
{ id: `${Me}comments_screenReader` },
|
|
@@ -10062,13 +10068,13 @@ function Wc({
|
|
|
10062
10068
|
},
|
|
10063
10069
|
user: f,
|
|
10064
10070
|
...l
|
|
10065
|
-
}, d = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }),
|
|
10071
|
+
}, d = qc({ ...u, mutationFn: t }), m = Uc({ ...u, mutationFn: e }), p = zc({ ...u, mutationFn: n }), h = Hc({ ...u, mutationFn: s }), _ = Vc({ ...u, mutationFn: i }), { activities: y, ...v } = Zc({ queryKey: o, queryFn: r });
|
|
10066
10072
|
return {
|
|
10067
10073
|
activities: y,
|
|
10068
10074
|
mutations: {
|
|
10069
10075
|
create: d,
|
|
10070
10076
|
edit: m,
|
|
10071
|
-
remove:
|
|
10077
|
+
remove: h,
|
|
10072
10078
|
like: p,
|
|
10073
10079
|
unlike: _
|
|
10074
10080
|
},
|
|
@@ -10195,7 +10201,7 @@ const pu = ({
|
|
|
10195
10201
|
fetchNextPage: l,
|
|
10196
10202
|
hasNextPage: u,
|
|
10197
10203
|
isLoading: d,
|
|
10198
|
-
mutations: { create: m, edit: p, remove:
|
|
10204
|
+
mutations: { create: m, edit: p, remove: h, like: _, unlike: y },
|
|
10199
10205
|
user: v
|
|
10200
10206
|
} = Wc({
|
|
10201
10207
|
queryKey: [t, e, "activities"],
|
|
@@ -10222,29 +10228,29 @@ const pu = ({
|
|
|
10222
10228
|
}
|
|
10223
10229
|
}
|
|
10224
10230
|
),
|
|
10225
|
-
c == null ? void 0 : c.map((
|
|
10231
|
+
c == null ? void 0 : c.map((T, k) => {
|
|
10226
10232
|
var A, W, Z, z, K, E, P, q;
|
|
10227
10233
|
const {
|
|
10228
10234
|
id: w,
|
|
10229
10235
|
own_reactions: I,
|
|
10230
10236
|
latest_reactions: R,
|
|
10231
10237
|
reaction_counts: Q
|
|
10232
|
-
} =
|
|
10238
|
+
} = T, C = (((A = R == null ? void 0 : R.like) == null ? void 0 : A.length) || 0) > 0, F = (((W = I == null ? void 0 : I.like) == null ? void 0 : W.length) || 0) > 0, $ = F ? I == null ? void 0 : I.like[0].id : "", j = C ? (Z = R == null ? void 0 : R.like) == null ? void 0 : Z.map((B) => {
|
|
10233
10239
|
var U, te, G;
|
|
10234
10240
|
return {
|
|
10235
10241
|
id: (U = B == null ? void 0 : B.user) == null ? void 0 : U.id,
|
|
10236
10242
|
name: (G = (te = B == null ? void 0 : B.user) == null ? void 0 : te.data) == null ? void 0 : G.name
|
|
10237
10243
|
};
|
|
10238
|
-
}) : !1, x =
|
|
10244
|
+
}) : !1, x = T == null ? void 0 : T.actor, N = (x == null ? void 0 : x.id) === (v == null ? void 0 : v.id);
|
|
10239
10245
|
return /* @__PURE__ */ a.jsxs(yt, { children: [
|
|
10240
10246
|
/* @__PURE__ */ a.jsx(
|
|
10241
10247
|
cn,
|
|
10242
10248
|
{
|
|
10243
10249
|
content: {
|
|
10244
10250
|
type: "post",
|
|
10245
|
-
body:
|
|
10251
|
+
body: T == null ? void 0 : T.content,
|
|
10246
10252
|
canLike: on(n, N),
|
|
10247
|
-
createdAt: (
|
|
10253
|
+
createdAt: (T == null ? void 0 : T.time) || "",
|
|
10248
10254
|
slugs: {
|
|
10249
10255
|
question: `${t}/${e}`,
|
|
10250
10256
|
answer: w
|
|
@@ -10263,7 +10269,7 @@ const pu = ({
|
|
|
10263
10269
|
userLiked: F,
|
|
10264
10270
|
likes: (Q == null ? void 0 : Q.like) || 0,
|
|
10265
10271
|
comments: (Q == null ? void 0 : Q.reply) || 0,
|
|
10266
|
-
peopleWhoLiked:
|
|
10272
|
+
peopleWhoLiked: j
|
|
10267
10273
|
},
|
|
10268
10274
|
links: {
|
|
10269
10275
|
post: `${t}/${e}/${w}`,
|
|
@@ -10272,7 +10278,7 @@ const pu = ({
|
|
|
10272
10278
|
functions: {
|
|
10273
10279
|
content: {
|
|
10274
10280
|
createContent: () => null,
|
|
10275
|
-
deleteContent: () =>
|
|
10281
|
+
deleteContent: () => h({ activityId: w }),
|
|
10276
10282
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10277
10283
|
updateContent: (B, { body: U }) => p({ activityId: w, content: U })
|
|
10278
10284
|
},
|
|
@@ -10287,7 +10293,7 @@ const pu = ({
|
|
|
10287
10293
|
isTruncated: !0
|
|
10288
10294
|
}
|
|
10289
10295
|
),
|
|
10290
|
-
b >
|
|
10296
|
+
b > k + 1 && /* @__PURE__ */ a.jsx(Ae, {})
|
|
10291
10297
|
] }, w);
|
|
10292
10298
|
}),
|
|
10293
10299
|
!d && /* @__PURE__ */ a.jsx(
|
|
@@ -10919,13 +10925,13 @@ function es({
|
|
|
10919
10925
|
},
|
|
10920
10926
|
user: f,
|
|
10921
10927
|
...l
|
|
10922
|
-
}, d = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }),
|
|
10928
|
+
}, d = Gc({ ...u, mutationFn: t }), m = Qc({ ...u, mutationFn: e }), p = Jc({ ...u, mutationFn: n }), h = el({ ...u, mutationFn: s }), _ = tl({ ...u, mutationFn: i }), { replies: y, ...v } = Xc({ queryKey: o, queryFn: r });
|
|
10923
10929
|
return {
|
|
10924
10930
|
replies: y,
|
|
10925
10931
|
mutations: {
|
|
10926
10932
|
create: d,
|
|
10927
10933
|
edit: m,
|
|
10928
|
-
remove:
|
|
10934
|
+
remove: h,
|
|
10929
10935
|
like: p,
|
|
10930
10936
|
unlike: _
|
|
10931
10937
|
},
|
|
@@ -11064,7 +11070,7 @@ const ol = ({
|
|
|
11064
11070
|
fetchNextPage: c,
|
|
11065
11071
|
hasNextPage: f,
|
|
11066
11072
|
isLoading: l,
|
|
11067
|
-
mutations: { create: u, edit: d, like: m, remove: p, unlike:
|
|
11073
|
+
mutations: { create: u, edit: d, like: m, remove: p, unlike: h },
|
|
11068
11074
|
user: _
|
|
11069
11075
|
} = es({
|
|
11070
11076
|
queryKey: [t, e, n, r, "replies"],
|
|
@@ -11098,18 +11104,18 @@ const ol = ({
|
|
|
11098
11104
|
const {
|
|
11099
11105
|
id: v,
|
|
11100
11106
|
own_children: b,
|
|
11101
|
-
latest_children:
|
|
11102
|
-
children_counts:
|
|
11107
|
+
latest_children: T,
|
|
11108
|
+
children_counts: k
|
|
11103
11109
|
} = y, I = (((A = b == null ? void 0 : b.like) == null ? void 0 : A.length) || 0) > 0 ? (W = b == null ? void 0 : b.like) == null ? void 0 : W.find((V) => {
|
|
11104
11110
|
var ee;
|
|
11105
11111
|
return ((ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id) === (_ == null ? void 0 : _.id);
|
|
11106
|
-
}) : !1, R = I ? I == null ? void 0 : I.id : "", Q = !!I, F = (((Z =
|
|
11112
|
+
}) : !1, R = I ? I == null ? void 0 : I.id : "", Q = !!I, F = (((Z = T == null ? void 0 : T.like) == null ? void 0 : Z.length) || 0) > 0 ? (z = T == null ? void 0 : T.like) == null ? void 0 : z.map((V) => {
|
|
11107
11113
|
var ee, re, O;
|
|
11108
11114
|
return {
|
|
11109
11115
|
id: (ee = V == null ? void 0 : V.user) == null ? void 0 : ee.id,
|
|
11110
11116
|
name: (O = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : O.name
|
|
11111
11117
|
};
|
|
11112
|
-
}) : !1, $ = y == null ? void 0 : y.user,
|
|
11118
|
+
}) : !1, $ = y == null ? void 0 : y.user, j = ($ == null ? void 0 : $.id) === (_ == null ? void 0 : _.id), x = on(s, j), N = typeof y.data.content == "string" ? (K = y == null ? void 0 : y.data) == null ? void 0 : K.content : (
|
|
11113
11119
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11114
11120
|
((P = (E = y == null ? void 0 : y.data) == null ? void 0 : E.content) == null ? void 0 : P.text) || ""
|
|
11115
11121
|
);
|
|
@@ -11141,7 +11147,7 @@ const ol = ({
|
|
|
11141
11147
|
}
|
|
11142
11148
|
},
|
|
11143
11149
|
userLiked: Q,
|
|
11144
|
-
likes: (
|
|
11150
|
+
likes: (k == null ? void 0 : k.like) || 0,
|
|
11145
11151
|
peopleWhoLiked: F
|
|
11146
11152
|
},
|
|
11147
11153
|
functions: {
|
|
@@ -11153,7 +11159,7 @@ const ol = ({
|
|
|
11153
11159
|
},
|
|
11154
11160
|
likes: {
|
|
11155
11161
|
createLike: () => m({ replyId: v }),
|
|
11156
|
-
deleteLike: () =>
|
|
11162
|
+
deleteLike: () => h({ replyId: v, reactionId: R })
|
|
11157
11163
|
},
|
|
11158
11164
|
comments: {}
|
|
11159
11165
|
}
|
|
@@ -11176,7 +11182,7 @@ const ol = ({
|
|
|
11176
11182
|
fetchNextPage: u,
|
|
11177
11183
|
hasNextPage: d,
|
|
11178
11184
|
isLoading: m,
|
|
11179
|
-
mutations: { create: p, edit:
|
|
11185
|
+
mutations: { create: p, edit: h, like: _, remove: y, unlike: v },
|
|
11180
11186
|
user: b
|
|
11181
11187
|
} = es({
|
|
11182
11188
|
queryKey: [t, e, n, "replies"],
|
|
@@ -11191,7 +11197,7 @@ const ol = ({
|
|
|
11191
11197
|
content: { type: "reply", slugs: {} },
|
|
11192
11198
|
functions: {
|
|
11193
11199
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11194
|
-
create: (
|
|
11200
|
+
create: (T, { body: k }) => p({ activityId: n, content: k })
|
|
11195
11201
|
},
|
|
11196
11202
|
meta: { isEditing: !1, showSuccessMessage: !1 },
|
|
11197
11203
|
placeholder: c.formatMessage({ id: "discussion_responses_placeholder" })
|
|
@@ -11205,9 +11211,9 @@ const ol = ({
|
|
|
11205
11211
|
}
|
|
11206
11212
|
}
|
|
11207
11213
|
),
|
|
11208
|
-
f == null ? void 0 : f.map((
|
|
11214
|
+
f == null ? void 0 : f.map((T) => {
|
|
11209
11215
|
var z, K, E, P, q, B, U, te, G, V, ee, re;
|
|
11210
|
-
const { id:
|
|
11216
|
+
const { id: k, own_children: w, latest_children: I, children_counts: R } = T, C = (((z = w == null ? void 0 : w.like) == null ? void 0 : z.length) || 0) > 0 ? (K = w == null ? void 0 : w.like) == null ? void 0 : K.find((O) => {
|
|
11211
11217
|
var oe;
|
|
11212
11218
|
return ((oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id) === (b == null ? void 0 : b.id);
|
|
11213
11219
|
}) : !1, F = C ? C == null ? void 0 : C.id : "", $ = !!C, x = (((E = I == null ? void 0 : I.like) == null ? void 0 : E.length) || 0) > 0 ? (P = I == null ? void 0 : I.like) == null ? void 0 : P.map((O) => {
|
|
@@ -11216,25 +11222,25 @@ const ol = ({
|
|
|
11216
11222
|
id: (oe = O == null ? void 0 : O.user) == null ? void 0 : oe.id,
|
|
11217
11223
|
name: (ve = (D = O == null ? void 0 : O.user) == null ? void 0 : D.data) == null ? void 0 : ve.name
|
|
11218
11224
|
};
|
|
11219
|
-
}) : !1, N =
|
|
11225
|
+
}) : !1, N = T == null ? void 0 : T.user, A = (N == null ? void 0 : N.id) === (b == null ? void 0 : b.id), W = on(r, A), Z = typeof T.data.content == "string" ? (q = T == null ? void 0 : T.data) == null ? void 0 : q.content : (
|
|
11220
11226
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11221
|
-
((U = (B =
|
|
11227
|
+
((U = (B = T == null ? void 0 : T.data) == null ? void 0 : B.content) == null ? void 0 : U.text) || ""
|
|
11222
11228
|
);
|
|
11223
11229
|
return /* @__PURE__ */ a.jsx(kc, { children: /* @__PURE__ */ a.jsx(
|
|
11224
11230
|
cn,
|
|
11225
11231
|
{
|
|
11226
11232
|
content: {
|
|
11227
|
-
id:
|
|
11233
|
+
id: k,
|
|
11228
11234
|
type: "reply",
|
|
11229
11235
|
body: Z,
|
|
11230
11236
|
canLike: W,
|
|
11231
|
-
createdAt:
|
|
11237
|
+
createdAt: T == null ? void 0 : T.created_at,
|
|
11232
11238
|
slugs: {
|
|
11233
11239
|
question: `${t}/${e}`,
|
|
11234
11240
|
answer: n,
|
|
11235
|
-
reply:
|
|
11241
|
+
reply: k
|
|
11236
11242
|
},
|
|
11237
|
-
slug:
|
|
11243
|
+
slug: k,
|
|
11238
11244
|
author: {
|
|
11239
11245
|
id: N == null ? void 0 : N.id,
|
|
11240
11246
|
name: (te = N.data) == null ? void 0 : te.name,
|
|
@@ -11252,13 +11258,13 @@ const ol = ({
|
|
|
11252
11258
|
functions: {
|
|
11253
11259
|
content: {
|
|
11254
11260
|
createContent: () => null,
|
|
11255
|
-
deleteContent: () => y({ replyId:
|
|
11261
|
+
deleteContent: () => y({ replyId: k }),
|
|
11256
11262
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11257
|
-
updateContent: (O, { body: oe }) =>
|
|
11263
|
+
updateContent: (O, { body: oe }) => h({ replyId: k, content: oe })
|
|
11258
11264
|
},
|
|
11259
11265
|
likes: {
|
|
11260
|
-
createLike: () => _({ replyId:
|
|
11261
|
-
deleteLike: () => v({ replyId:
|
|
11266
|
+
createLike: () => _({ replyId: k }),
|
|
11267
|
+
deleteLike: () => v({ replyId: k, reactionId: F })
|
|
11262
11268
|
},
|
|
11263
11269
|
comments: {}
|
|
11264
11270
|
},
|
|
@@ -11268,7 +11274,7 @@ const ol = ({
|
|
|
11268
11274
|
basePath: t,
|
|
11269
11275
|
parentId: e,
|
|
11270
11276
|
activityId: n,
|
|
11271
|
-
replyId:
|
|
11277
|
+
replyId: k,
|
|
11272
11278
|
isMember: r,
|
|
11273
11279
|
functions: {
|
|
11274
11280
|
...s
|
|
@@ -11276,8 +11282,8 @@ const ol = ({
|
|
|
11276
11282
|
}
|
|
11277
11283
|
)
|
|
11278
11284
|
},
|
|
11279
|
-
|
|
11280
|
-
) },
|
|
11285
|
+
k
|
|
11286
|
+
) }, k);
|
|
11281
11287
|
}),
|
|
11282
11288
|
!m && /* @__PURE__ */ a.jsx(
|
|
11283
11289
|
sn,
|
|
@@ -11398,12 +11404,12 @@ const gu = ({
|
|
|
11398
11404
|
leave: f
|
|
11399
11405
|
}
|
|
11400
11406
|
}) => {
|
|
11401
|
-
var C, F, $,
|
|
11407
|
+
var C, F, $, j, x, N, A, W, Z, z;
|
|
11402
11408
|
const l = H(), u = Ee(Ie), {
|
|
11403
11409
|
activity: d,
|
|
11404
11410
|
error: m,
|
|
11405
11411
|
isLoading: p,
|
|
11406
|
-
mutations: { edit:
|
|
11412
|
+
mutations: { edit: h, like: _, unlike: y }
|
|
11407
11413
|
} = dl({
|
|
11408
11414
|
queryFns: i,
|
|
11409
11415
|
queryKey: [t, e, n]
|
|
@@ -11418,7 +11424,7 @@ const gu = ({
|
|
|
11418
11424
|
text: l.formatMessage({ id: "activitySection_notFoundError" })
|
|
11419
11425
|
}
|
|
11420
11426
|
);
|
|
11421
|
-
const { own_reactions: v, latest_reactions: b } = d,
|
|
11427
|
+
const { own_reactions: v, latest_reactions: b } = d, T = (((C = b == null ? void 0 : b.like) == null ? void 0 : C.length) || 0) > 0, k = (((F = v == null ? void 0 : v.like) == null ? void 0 : F.length) || 0) > 0, w = k ? v == null ? void 0 : v.like[0].id : "", I = T ? ($ = b == null ? void 0 : b.like) == null ? void 0 : $.map((K) => {
|
|
11422
11428
|
var E, P, q;
|
|
11423
11429
|
return {
|
|
11424
11430
|
id: (E = K == null ? void 0 : K.user) == null ? void 0 : E.id,
|
|
@@ -11443,7 +11449,7 @@ const gu = ({
|
|
|
11443
11449
|
slug: n,
|
|
11444
11450
|
author: {
|
|
11445
11451
|
id: R.id,
|
|
11446
|
-
name: (
|
|
11452
|
+
name: (j = R.data) == null ? void 0 : j.name,
|
|
11447
11453
|
organization: (x = R.data) == null ? void 0 : x.organization,
|
|
11448
11454
|
jobTitle: (N = R.data) == null ? void 0 : N.jobTitle,
|
|
11449
11455
|
location: (A = R.data) == null ? void 0 : A.location,
|
|
@@ -11451,7 +11457,7 @@ const gu = ({
|
|
|
11451
11457
|
thumbnail: ((W = R.data) == null ? void 0 : W.thumbnail) || void 0
|
|
11452
11458
|
}
|
|
11453
11459
|
},
|
|
11454
|
-
userLiked:
|
|
11460
|
+
userLiked: k,
|
|
11455
11461
|
likes: ((Z = d == null ? void 0 : d.reaction_counts) == null ? void 0 : Z.like) || 0,
|
|
11456
11462
|
comments: ((z = d == null ? void 0 : d.reaction_counts) == null ? void 0 : z.reply) || 0,
|
|
11457
11463
|
peopleWhoLiked: I
|
|
@@ -11463,7 +11469,7 @@ const gu = ({
|
|
|
11463
11469
|
createContent: () => null,
|
|
11464
11470
|
deleteContent: s,
|
|
11465
11471
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
11466
|
-
updateContent: (K, { body: E }) =>
|
|
11472
|
+
updateContent: (K, { body: E }) => h({ content: E })
|
|
11467
11473
|
},
|
|
11468
11474
|
likes: {
|
|
11469
11475
|
createLike: () => _({ activityId: n }),
|