@apolitical/component-library 1.13.3-beta.0 → 1.13.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/communities/community-details/community-details.d.ts +8 -4
- package/index.js +8 -8
- package/index.mjs +213 -214
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -52,8 +52,8 @@ var dn = { exports: {} };
|
|
|
52
52
|
e.exports ? (n.default = n, e.exports = n) : window.classNames = n;
|
|
53
53
|
})();
|
|
54
54
|
})(dn);
|
|
55
|
-
var
|
|
56
|
-
const j = /* @__PURE__ */ xr(
|
|
55
|
+
var br = dn.exports;
|
|
56
|
+
const j = /* @__PURE__ */ xr(br), vr = ({ element: e = "span", showOnFocus: t = !0, children: n, ...s }) => A.createElement(e, { ...s, className: j("hidden", { "show-on-focus": t }), children: n }), ne = Ae(vr), wr = ({ element: e = "span", children: t = null, ...n }) => A.createElement(e, { ...n, "aria-hidden": !0 }, t), mn = Ae(wr);
|
|
57
57
|
var jt = { exports: {} }, De = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
@@ -95,29 +95,29 @@ var Pe = {};
|
|
|
95
95
|
var Kt;
|
|
96
96
|
function yr() {
|
|
97
97
|
return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
98
|
-
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), a = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator,
|
|
98
|
+
var e = A, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), s = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), m = Symbol.for("react.provider"), a = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), p = Symbol.for("react.lazy"), h = Symbol.for("react.offscreen"), _ = Symbol.iterator, b = "@@iterator";
|
|
99
99
|
function g(d) {
|
|
100
100
|
if (d === null || typeof d != "object")
|
|
101
101
|
return null;
|
|
102
|
-
var
|
|
103
|
-
return typeof
|
|
102
|
+
var v = _ && d[_] || d[b];
|
|
103
|
+
return typeof v == "function" ? v : null;
|
|
104
104
|
}
|
|
105
105
|
var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
106
106
|
function x(d) {
|
|
107
107
|
{
|
|
108
|
-
for (var
|
|
108
|
+
for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), S = 1; S < v; S++)
|
|
109
109
|
y[S - 1] = arguments[S];
|
|
110
110
|
$("error", d, y);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
function $(d,
|
|
113
|
+
function $(d, v, y) {
|
|
114
114
|
{
|
|
115
115
|
var S = E.ReactDebugCurrentFrame, O = S.getStackAddendum();
|
|
116
|
-
O !== "" && (
|
|
116
|
+
O !== "" && (v += "%s", y = y.concat([O]));
|
|
117
117
|
var H = y.map(function(N) {
|
|
118
118
|
return String(N);
|
|
119
119
|
});
|
|
120
|
-
H.unshift("Warning: " +
|
|
120
|
+
H.unshift("Warning: " + v), Function.prototype.apply.call(console[d], console, H);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
var T = !1, M = !1, Q = !1, V = !1, w = !1, F;
|
|
@@ -129,11 +129,11 @@ function yr() {
|
|
|
129
129
|
// with.
|
|
130
130
|
d.$$typeof === F || d.getModuleId !== void 0));
|
|
131
131
|
}
|
|
132
|
-
function k(d,
|
|
132
|
+
function k(d, v, y) {
|
|
133
133
|
var S = d.displayName;
|
|
134
134
|
if (S)
|
|
135
135
|
return S;
|
|
136
|
-
var O =
|
|
136
|
+
var O = v.displayName || v.name || "";
|
|
137
137
|
return O !== "" ? y + "(" + O + ")" : y;
|
|
138
138
|
}
|
|
139
139
|
function Y(d) {
|
|
@@ -163,8 +163,8 @@ function yr() {
|
|
|
163
163
|
if (typeof d == "object")
|
|
164
164
|
switch (d.$$typeof) {
|
|
165
165
|
case a:
|
|
166
|
-
var
|
|
167
|
-
return Y(
|
|
166
|
+
var v = d;
|
|
167
|
+
return Y(v) + ".Consumer";
|
|
168
168
|
case m:
|
|
169
169
|
var y = d;
|
|
170
170
|
return Y(y._context) + ".Provider";
|
|
@@ -247,7 +247,7 @@ function yr() {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
var ue = E.ReactCurrentDispatcher, me;
|
|
250
|
-
function pe(d,
|
|
250
|
+
function pe(d, v, y) {
|
|
251
251
|
{
|
|
252
252
|
if (me === void 0)
|
|
253
253
|
try {
|
|
@@ -265,7 +265,7 @@ function yr() {
|
|
|
265
265
|
var Pn = typeof WeakMap == "function" ? WeakMap : Map;
|
|
266
266
|
Se = new Pn();
|
|
267
267
|
}
|
|
268
|
-
function Ot(d,
|
|
268
|
+
function Ot(d, v) {
|
|
269
269
|
if (!d || ge)
|
|
270
270
|
return "";
|
|
271
271
|
{
|
|
@@ -280,7 +280,7 @@ function yr() {
|
|
|
280
280
|
var H;
|
|
281
281
|
H = ue.current, ue.current = null, ce();
|
|
282
282
|
try {
|
|
283
|
-
if (
|
|
283
|
+
if (v) {
|
|
284
284
|
var N = function() {
|
|
285
285
|
throw Error();
|
|
286
286
|
};
|
|
@@ -336,14 +336,14 @@ function yr() {
|
|
|
336
336
|
var Te = d ? d.displayName || d.name : "", Xt = Te ? pe(Te) : "";
|
|
337
337
|
return typeof d == "function" && Se.set(d, Xt), Xt;
|
|
338
338
|
}
|
|
339
|
-
function Fn(d,
|
|
339
|
+
function Fn(d, v, y) {
|
|
340
340
|
return Ot(d, !1);
|
|
341
341
|
}
|
|
342
342
|
function Rn(d) {
|
|
343
|
-
var
|
|
344
|
-
return !!(
|
|
343
|
+
var v = d.prototype;
|
|
344
|
+
return !!(v && v.isReactComponent);
|
|
345
345
|
}
|
|
346
|
-
function Be(d,
|
|
346
|
+
function Be(d, v, y) {
|
|
347
347
|
if (d == null)
|
|
348
348
|
return "";
|
|
349
349
|
if (typeof d == "function")
|
|
@@ -361,11 +361,11 @@ function yr() {
|
|
|
361
361
|
case i:
|
|
362
362
|
return Fn(d.render);
|
|
363
363
|
case f:
|
|
364
|
-
return Be(d.type,
|
|
364
|
+
return Be(d.type, v, y);
|
|
365
365
|
case p: {
|
|
366
366
|
var S = d, O = S._payload, H = S._init;
|
|
367
367
|
try {
|
|
368
|
-
return Be(H(O),
|
|
368
|
+
return Be(H(O), v, y);
|
|
369
369
|
} catch {
|
|
370
370
|
}
|
|
371
371
|
}
|
|
@@ -375,12 +375,12 @@ function yr() {
|
|
|
375
375
|
var Ie = Object.prototype.hasOwnProperty, Lt = {}, Bt = E.ReactDebugCurrentFrame;
|
|
376
376
|
function He(d) {
|
|
377
377
|
if (d) {
|
|
378
|
-
var
|
|
378
|
+
var v = d._owner, y = Be(d.type, d._source, v ? v.type : null);
|
|
379
379
|
Bt.setExtraStackFrame(y);
|
|
380
380
|
} else
|
|
381
381
|
Bt.setExtraStackFrame(null);
|
|
382
382
|
}
|
|
383
|
-
function On(d,
|
|
383
|
+
function On(d, v, y, S, O) {
|
|
384
384
|
{
|
|
385
385
|
var H = Function.call.bind(Ie);
|
|
386
386
|
for (var N in d)
|
|
@@ -391,7 +391,7 @@ function yr() {
|
|
|
391
391
|
var re = Error((S || "React class") + ": " + y + " type `" + N + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof d[N] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
392
392
|
throw re.name = "Invariant Violation", re;
|
|
393
393
|
}
|
|
394
|
-
C = d[N](
|
|
394
|
+
C = d[N](v, N, S, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
395
395
|
} catch (J) {
|
|
396
396
|
C = J;
|
|
397
397
|
}
|
|
@@ -405,7 +405,7 @@ function yr() {
|
|
|
405
405
|
}
|
|
406
406
|
function Bn(d) {
|
|
407
407
|
{
|
|
408
|
-
var
|
|
408
|
+
var v = typeof Symbol == "function" && Symbol.toStringTag, y = v && d[Symbol.toStringTag] || d.constructor.name || "Object";
|
|
409
409
|
return y;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
@@ -432,30 +432,30 @@ function yr() {
|
|
|
432
432
|
ot = {};
|
|
433
433
|
function Qn(d) {
|
|
434
434
|
if (Ie.call(d, "ref")) {
|
|
435
|
-
var
|
|
436
|
-
if (
|
|
435
|
+
var v = Object.getOwnPropertyDescriptor(d, "ref").get;
|
|
436
|
+
if (v && v.isReactWarning)
|
|
437
437
|
return !1;
|
|
438
438
|
}
|
|
439
439
|
return d.ref !== void 0;
|
|
440
440
|
}
|
|
441
441
|
function Un(d) {
|
|
442
442
|
if (Ie.call(d, "key")) {
|
|
443
|
-
var
|
|
444
|
-
if (
|
|
443
|
+
var v = Object.getOwnPropertyDescriptor(d, "key").get;
|
|
444
|
+
if (v && v.isReactWarning)
|
|
445
445
|
return !1;
|
|
446
446
|
}
|
|
447
447
|
return d.key !== void 0;
|
|
448
448
|
}
|
|
449
|
-
function Wn(d,
|
|
450
|
-
if (typeof d.ref == "string" && Ne.current &&
|
|
449
|
+
function Wn(d, v) {
|
|
450
|
+
if (typeof d.ref == "string" && Ne.current && v && Ne.current.stateNode !== v) {
|
|
451
451
|
var y = B(Ne.current.type);
|
|
452
452
|
ot[y] || (x('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', B(Ne.current.type), d.ref), ot[y] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
|
-
function zn(d,
|
|
455
|
+
function zn(d, v) {
|
|
456
456
|
{
|
|
457
457
|
var y = function() {
|
|
458
|
-
Qt || (Qt = !0, x("%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)",
|
|
458
|
+
Qt || (Qt = !0, x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
459
459
|
};
|
|
460
460
|
y.isReactWarning = !0, Object.defineProperty(d, "key", {
|
|
461
461
|
get: y,
|
|
@@ -463,10 +463,10 @@ function yr() {
|
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
function Vn(d,
|
|
466
|
+
function Vn(d, v) {
|
|
467
467
|
{
|
|
468
468
|
var y = function() {
|
|
469
|
-
Ut || (Ut = !0, x("%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)",
|
|
469
|
+
Ut || (Ut = !0, x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", v));
|
|
470
470
|
};
|
|
471
471
|
y.isReactWarning = !0, Object.defineProperty(d, "ref", {
|
|
472
472
|
get: y,
|
|
@@ -474,13 +474,13 @@ function yr() {
|
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
-
var Yn = function(d,
|
|
477
|
+
var Yn = function(d, v, y, S, O, H, N) {
|
|
478
478
|
var C = {
|
|
479
479
|
// This tag allows us to uniquely identify this as a React Element
|
|
480
480
|
$$typeof: t,
|
|
481
481
|
// Built-in properties that belong on the element
|
|
482
482
|
type: d,
|
|
483
|
-
key:
|
|
483
|
+
key: v,
|
|
484
484
|
ref: y,
|
|
485
485
|
props: N,
|
|
486
486
|
// Record the component responsible for creating this element.
|
|
@@ -503,12 +503,12 @@ function yr() {
|
|
|
503
503
|
value: O
|
|
504
504
|
}), Object.freeze && (Object.freeze(C.props), Object.freeze(C)), C;
|
|
505
505
|
};
|
|
506
|
-
function Gn(d,
|
|
506
|
+
function Gn(d, v, y, S, O) {
|
|
507
507
|
{
|
|
508
508
|
var H, N = {}, C = null, re = null;
|
|
509
|
-
y !== void 0 && (Ht(y), C = "" + y), Un(
|
|
510
|
-
for (H in
|
|
511
|
-
Ie.call(
|
|
509
|
+
y !== void 0 && (Ht(y), C = "" + y), Un(v) && (Ht(v.key), C = "" + v.key), Qn(v) && (re = v.ref, Wn(v, O));
|
|
510
|
+
for (H in v)
|
|
511
|
+
Ie.call(v, H) && !Hn.hasOwnProperty(H) && (N[H] = v[H]);
|
|
512
512
|
if (d && d.defaultProps) {
|
|
513
513
|
var J = d.defaultProps;
|
|
514
514
|
for (H in J)
|
|
@@ -524,7 +524,7 @@ function yr() {
|
|
|
524
524
|
var at = E.ReactCurrentOwner, Wt = E.ReactDebugCurrentFrame;
|
|
525
525
|
function $e(d) {
|
|
526
526
|
if (d) {
|
|
527
|
-
var
|
|
527
|
+
var v = d._owner, y = Be(d.type, d._source, v ? v.type : null);
|
|
528
528
|
Wt.setExtraStackFrame(y);
|
|
529
529
|
} else
|
|
530
530
|
Wt.setExtraStackFrame(null);
|
|
@@ -549,10 +549,10 @@ Check the render method of \`` + d + "`.";
|
|
|
549
549
|
function Jn(d) {
|
|
550
550
|
{
|
|
551
551
|
if (d !== void 0) {
|
|
552
|
-
var
|
|
552
|
+
var v = d.fileName.replace(/^.*[\\\/]/, ""), y = d.lineNumber;
|
|
553
553
|
return `
|
|
554
554
|
|
|
555
|
-
Check your code at ` +
|
|
555
|
+
Check your code at ` + v + ":" + y + ".";
|
|
556
556
|
}
|
|
557
557
|
return "";
|
|
558
558
|
}
|
|
@@ -560,22 +560,22 @@ Check your code at ` + b + ":" + y + ".";
|
|
|
560
560
|
var Vt = {};
|
|
561
561
|
function Xn(d) {
|
|
562
562
|
{
|
|
563
|
-
var
|
|
564
|
-
if (!
|
|
563
|
+
var v = zt();
|
|
564
|
+
if (!v) {
|
|
565
565
|
var y = typeof d == "string" ? d : d.displayName || d.name;
|
|
566
|
-
y && (
|
|
566
|
+
y && (v = `
|
|
567
567
|
|
|
568
568
|
Check the top-level render call using <` + y + ">.");
|
|
569
569
|
}
|
|
570
|
-
return
|
|
570
|
+
return v;
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
function Yt(d,
|
|
573
|
+
function Yt(d, v) {
|
|
574
574
|
{
|
|
575
575
|
if (!d._store || d._store.validated || d.key != null)
|
|
576
576
|
return;
|
|
577
577
|
d._store.validated = !0;
|
|
578
|
-
var y = Xn(
|
|
578
|
+
var y = Xn(v);
|
|
579
579
|
if (Vt[y])
|
|
580
580
|
return;
|
|
581
581
|
Vt[y] = !0;
|
|
@@ -583,14 +583,14 @@ Check the top-level render call using <` + y + ">.");
|
|
|
583
583
|
d && d._owner && d._owner !== at.current && (S = " It was passed a child from " + B(d._owner.type) + "."), $e(d), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, S), $e(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
function Gt(d,
|
|
586
|
+
function Gt(d, v) {
|
|
587
587
|
{
|
|
588
588
|
if (typeof d != "object")
|
|
589
589
|
return;
|
|
590
590
|
if (st(d))
|
|
591
591
|
for (var y = 0; y < d.length; y++) {
|
|
592
592
|
var S = d[y];
|
|
593
|
-
lt(S) && Yt(S,
|
|
593
|
+
lt(S) && Yt(S, v);
|
|
594
594
|
}
|
|
595
595
|
else if (lt(d))
|
|
596
596
|
d._store && (d._store.validated = !0);
|
|
@@ -598,39 +598,39 @@ Check the top-level render call using <` + y + ">.");
|
|
|
598
598
|
var O = g(d);
|
|
599
599
|
if (typeof O == "function" && O !== d.entries)
|
|
600
600
|
for (var H = O.call(d), N; !(N = H.next()).done; )
|
|
601
|
-
lt(N.value) && Yt(N.value,
|
|
601
|
+
lt(N.value) && Yt(N.value, v);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
function Zn(d) {
|
|
606
606
|
{
|
|
607
|
-
var
|
|
608
|
-
if (
|
|
607
|
+
var v = d.type;
|
|
608
|
+
if (v == null || typeof v == "string")
|
|
609
609
|
return;
|
|
610
610
|
var y;
|
|
611
|
-
if (typeof
|
|
612
|
-
y =
|
|
613
|
-
else if (typeof
|
|
611
|
+
if (typeof v == "function")
|
|
612
|
+
y = v.propTypes;
|
|
613
|
+
else if (typeof v == "object" && (v.$$typeof === i || // Note: Memo only checks outer props here.
|
|
614
614
|
// Inner props are checked in the reconciler.
|
|
615
|
-
|
|
616
|
-
y =
|
|
615
|
+
v.$$typeof === f))
|
|
616
|
+
y = v.propTypes;
|
|
617
617
|
else
|
|
618
618
|
return;
|
|
619
619
|
if (y) {
|
|
620
|
-
var S = B(
|
|
620
|
+
var S = B(v);
|
|
621
621
|
On(y, d.props, "prop", S, d);
|
|
622
|
-
} else if (
|
|
622
|
+
} else if (v.PropTypes !== void 0 && !it) {
|
|
623
623
|
it = !0;
|
|
624
|
-
var O = B(
|
|
624
|
+
var O = B(v);
|
|
625
625
|
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", O || "Unknown");
|
|
626
626
|
}
|
|
627
|
-
typeof
|
|
627
|
+
typeof v.getDefaultProps == "function" && !v.getDefaultProps.isReactClassApproved && x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
628
628
|
}
|
|
629
629
|
}
|
|
630
630
|
function qn(d) {
|
|
631
631
|
{
|
|
632
|
-
for (var
|
|
633
|
-
var S =
|
|
632
|
+
for (var v = Object.keys(d.props), y = 0; y < v.length; y++) {
|
|
633
|
+
var S = v[y];
|
|
634
634
|
if (S !== "children" && S !== "key") {
|
|
635
635
|
$e(d), x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), $e(null);
|
|
636
636
|
break;
|
|
@@ -639,7 +639,7 @@ Check the top-level render call using <` + y + ">.");
|
|
|
639
639
|
d.ref !== null && ($e(d), x("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
|
|
640
640
|
}
|
|
641
641
|
}
|
|
642
|
-
function Jt(d,
|
|
642
|
+
function Jt(d, v, y, S, O, H) {
|
|
643
643
|
{
|
|
644
644
|
var N = q(d);
|
|
645
645
|
if (!N) {
|
|
@@ -650,11 +650,11 @@ Check the top-level render call using <` + y + ">.");
|
|
|
650
650
|
var J;
|
|
651
651
|
d === null ? J = "null" : st(d) ? J = "array" : d !== void 0 && d.$$typeof === t ? (J = "<" + (B(d.type) || "Unknown") + " />", C = " Did you accidentally export a JSX literal instead of a component?") : J = typeof d, x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, C);
|
|
652
652
|
}
|
|
653
|
-
var X = Gn(d,
|
|
653
|
+
var X = Gn(d, v, y, O, H);
|
|
654
654
|
if (X == null)
|
|
655
655
|
return X;
|
|
656
656
|
if (N) {
|
|
657
|
-
var de =
|
|
657
|
+
var de = v.children;
|
|
658
658
|
if (de !== void 0)
|
|
659
659
|
if (S)
|
|
660
660
|
if (st(de)) {
|
|
@@ -669,11 +669,11 @@ Check the top-level render call using <` + y + ">.");
|
|
|
669
669
|
return d === s ? qn(X) : Zn(X), X;
|
|
670
670
|
}
|
|
671
671
|
}
|
|
672
|
-
function Kn(d,
|
|
673
|
-
return Jt(d,
|
|
672
|
+
function Kn(d, v, y) {
|
|
673
|
+
return Jt(d, v, y, !0);
|
|
674
674
|
}
|
|
675
|
-
function er(d,
|
|
676
|
-
return Jt(d,
|
|
675
|
+
function er(d, v, y) {
|
|
676
|
+
return Jt(d, v, y, !1);
|
|
677
677
|
}
|
|
678
678
|
var tr = er, nr = Kn;
|
|
679
679
|
Pe.Fragment = s, Pe.jsx = tr, Pe.jsxs = nr;
|
|
@@ -704,7 +704,7 @@ function Er(e, t, n) {
|
|
|
704
704
|
if (typeof e != "function")
|
|
705
705
|
throw new TypeError("Expected a function");
|
|
706
706
|
t = +t || 0;
|
|
707
|
-
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing,
|
|
707
|
+
var h = !!(n = n || {}).leading, _ = !("trailing" in n) || !!n.trailing, b = "maxWait" in n, g = b ? Math.max(+n.maxWait || 0, t) : null;
|
|
708
708
|
z(function() {
|
|
709
709
|
return f.current = !0, function() {
|
|
710
710
|
f.current = !1;
|
|
@@ -720,7 +720,7 @@ function Er(e, t, n) {
|
|
|
720
720
|
if (!f.current)
|
|
721
721
|
return !1;
|
|
722
722
|
var F = w - o.current;
|
|
723
|
-
return !o.current || F >= t || F < 0 ||
|
|
723
|
+
return !o.current || F >= t || F < 0 || b && w - l.current >= g;
|
|
724
724
|
}, M = function(w) {
|
|
725
725
|
return m.current = null, _ && a.current ? x(w) : (a.current = i.current = null, c.current);
|
|
726
726
|
}, Q = function w() {
|
|
@@ -728,7 +728,7 @@ function Er(e, t, n) {
|
|
|
728
728
|
if (T(F))
|
|
729
729
|
return M(F);
|
|
730
730
|
if (f.current) {
|
|
731
|
-
var q = t - (F - o.current), k =
|
|
731
|
+
var q = t - (F - o.current), k = b ? Math.min(q, g - (F - l.current)) : q;
|
|
732
732
|
$(w, k);
|
|
733
733
|
}
|
|
734
734
|
}, V = function() {
|
|
@@ -736,7 +736,7 @@ function Er(e, t, n) {
|
|
|
736
736
|
if (a.current = [].slice.call(arguments), i.current = s, o.current = w, F) {
|
|
737
737
|
if (!m.current && f.current)
|
|
738
738
|
return l.current = o.current, $(Q, t), h ? x(o.current) : c.current;
|
|
739
|
-
if (
|
|
739
|
+
if (b)
|
|
740
740
|
return $(Q, t), x(o.current);
|
|
741
741
|
}
|
|
742
742
|
return m.current || $(Q, t), c.current;
|
|
@@ -748,7 +748,7 @@ function Er(e, t, n) {
|
|
|
748
748
|
}, V.flush = function() {
|
|
749
749
|
return m.current ? M(Date.now()) : c.current;
|
|
750
750
|
}, V;
|
|
751
|
-
}, [h,
|
|
751
|
+
}, [h, b, t, g, _, p]);
|
|
752
752
|
return E;
|
|
753
753
|
}
|
|
754
754
|
function fn(e, t, n) {
|
|
@@ -1204,7 +1204,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1204
1204
|
}
|
|
1205
1205
|
const _ = [];
|
|
1206
1206
|
typeof t == "string" && _.push(t), s && (_.push("icon"), typeof s == "object" ? (_.push(s.icon), s.position ? _.push(s.position) : _.push("left"), s.hover && _.push(`hover_${s.hover}`), s.animate && (_.push("animate"), typeof s.animate == "string" && _.push(s.animate))) : (_.push(s), !s.includes("right") && !s.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
|
|
1207
|
-
const
|
|
1207
|
+
const b = {
|
|
1208
1208
|
...f,
|
|
1209
1209
|
className: j(e, a, _, {
|
|
1210
1210
|
"no-text": !u,
|
|
@@ -1216,9 +1216,9 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1216
1216
|
},
|
|
1217
1217
|
disabled: typeof i == "object" && "isClickable" in i ? !i.isClickable : i
|
|
1218
1218
|
};
|
|
1219
|
-
return o && (l = "a",
|
|
1219
|
+
return o && (l = "a", b.href = o), A.createElement(
|
|
1220
1220
|
l,
|
|
1221
|
-
|
|
1221
|
+
b,
|
|
1222
1222
|
u || (c ? /* @__PURE__ */ r.jsx(ne, { showOnFocus: !1, children: c }) : null)
|
|
1223
1223
|
);
|
|
1224
1224
|
}, tt = ({ buttons: e, className: t = "", ...n }) => {
|
|
@@ -1381,7 +1381,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1381
1381
|
loading: c,
|
|
1382
1382
|
decoding: u,
|
|
1383
1383
|
fetchPriority: f
|
|
1384
|
-
} = e, { range: p, sizes: h } = Or(e), _ = ut({ format: "avif", query: m, range: p, url: a }),
|
|
1384
|
+
} = e, { range: p, sizes: h } = Or(e), _ = ut({ format: "avif", query: m, range: p, url: a }), b = ut({ format: "webp", query: m, range: p, url: a }), g = ut({ format: "", query: m, range: p, url: a });
|
|
1385
1385
|
return /* @__PURE__ */ r.jsxs("picture", { className: t, children: [
|
|
1386
1386
|
l !== "image/gif" && /* @__PURE__ */ r.jsx(
|
|
1387
1387
|
"source",
|
|
@@ -1396,7 +1396,7 @@ const Br = ({ image: e, className: t, testId: n }) => {
|
|
|
1396
1396
|
"source",
|
|
1397
1397
|
{
|
|
1398
1398
|
type: "image/webp",
|
|
1399
|
-
srcSet:
|
|
1399
|
+
srcSet: b,
|
|
1400
1400
|
sizes: h,
|
|
1401
1401
|
"data-testid": "source"
|
|
1402
1402
|
}
|
|
@@ -1614,9 +1614,9 @@ const rt = ({ variant: e = "empty", text: t = !1, button: n = !1, className: s =
|
|
|
1614
1614
|
))
|
|
1615
1615
|
] }) });
|
|
1616
1616
|
};
|
|
1617
|
-
const St = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }),
|
|
1617
|
+
const St = ({ children: e, ...t }) => /* @__PURE__ */ r.jsx("p", { ...t, children: e }), bn = { q: St, blockquote: St };
|
|
1618
1618
|
for (let e = 1; e <= 6; e++)
|
|
1619
|
-
|
|
1619
|
+
bn[`h${e}`] = { component: St, props: { className: "title" } };
|
|
1620
1620
|
const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children: s }) => /* @__PURE__ */ r.jsxs("div", { className: j("helper-text-box text-small", e, t), children: [
|
|
1621
1621
|
n && /* @__PURE__ */ r.jsx("p", { className: "title", children: n }),
|
|
1622
1622
|
typeof s == "string" ? /* @__PURE__ */ r.jsx(
|
|
@@ -1625,7 +1625,7 @@ const Ur = ({ type: e = "default", className: t = "", heading: n = !1, children:
|
|
|
1625
1625
|
options: {
|
|
1626
1626
|
wrapper: A.Fragment,
|
|
1627
1627
|
forceBlock: !0,
|
|
1628
|
-
overrides:
|
|
1628
|
+
overrides: bn
|
|
1629
1629
|
},
|
|
1630
1630
|
children: s
|
|
1631
1631
|
}
|
|
@@ -1800,14 +1800,14 @@ const dt = "loadingBlock_", ts = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1800
1800
|
}
|
|
1801
1801
|
);
|
|
1802
1802
|
}, mo = Ae(ts);
|
|
1803
|
-
const
|
|
1803
|
+
const ve = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ r.jsx(mn, { element: e, className: j("loading-placeholder", t), ...n });
|
|
1804
1804
|
const Tt = {
|
|
1805
1805
|
header: ["logo", "link", "link", "search"],
|
|
1806
1806
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1807
1807
|
"cards-section": ["subtitle", "cards"],
|
|
1808
1808
|
cards: ["card", "card", "card", "card"],
|
|
1809
1809
|
"overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
|
|
1810
|
-
},
|
|
1810
|
+
}, vn = (e, t) => e in Tt ? /* @__PURE__ */ r.jsx("div", { className: e, children: Tt[e].map((n, s) => vn(n, s)) }, t) : /* @__PURE__ */ r.jsx(ve, { className: e }, t), ns = ({ layout: e = "overview-page" }) => /* @__PURE__ */ r.jsx("div", { className: j("loading-state", e), children: Tt[e].map((t, n) => vn(t, n)) }), wn = (e) => {
|
|
1811
1811
|
const t = e && e.toUpperCase().split(" ");
|
|
1812
1812
|
return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
|
|
1813
1813
|
}, Qe = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rs = (e) => {
|
|
@@ -1916,10 +1916,10 @@ const sn = {
|
|
|
1916
1916
|
/* @__PURE__ */ r.jsx("ul", { children: n.map((u, f) => {
|
|
1917
1917
|
let p, h = "";
|
|
1918
1918
|
if (f < a) {
|
|
1919
|
-
const { name: _ = "", image:
|
|
1919
|
+
const { name: _ = "", image: b = "" } = kn(u);
|
|
1920
1920
|
if (m)
|
|
1921
|
-
return /* @__PURE__ */ r.jsx(
|
|
1922
|
-
p = /* @__PURE__ */ r.jsx(Dt, { name: _, src:
|
|
1921
|
+
return /* @__PURE__ */ r.jsx(ve, { element: "li", className: "contributor" }, f);
|
|
1922
|
+
p = /* @__PURE__ */ r.jsx(Dt, { name: _, src: b, width: sn[o || "medium"], height: sn[o || "medium"] });
|
|
1923
1923
|
} else if (f === a) {
|
|
1924
1924
|
const _ = (t || n.length) - a;
|
|
1925
1925
|
p = /* @__PURE__ */ r.jsxs("small", { className: j({ "large-number": _ > 99 }), children: [
|
|
@@ -2010,42 +2010,41 @@ const mt = "joinCommunityButton", yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2010
2010
|
);
|
|
2011
2011
|
};
|
|
2012
2012
|
const ft = "communityDetails_", po = ({
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
onInviteClick: l,
|
|
2018
|
-
...m
|
|
2013
|
+
className: e = "",
|
|
2014
|
+
isMember: t = !1,
|
|
2015
|
+
slug: n,
|
|
2016
|
+
members: { number: s = 0, data: o = [] } = { number: 0, data: [] },
|
|
2017
|
+
functions: { onInviteClick: l, ...m }
|
|
2019
2018
|
}) => {
|
|
2020
|
-
const a = P(), i =
|
|
2021
|
-
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details",
|
|
2019
|
+
const a = P(), i = 5, c = s || o.length, u = o.length ? o : Array(i).fill({});
|
|
2020
|
+
return /* @__PURE__ */ r.jsxs("div", { className: j("community-details", e), children: [
|
|
2022
2021
|
/* @__PURE__ */ r.jsx(Le, {}),
|
|
2023
2022
|
/* @__PURE__ */ r.jsxs("div", { className: "member-details", children: [
|
|
2024
2023
|
/* @__PURE__ */ r.jsxs("div", { className: "top", children: [
|
|
2025
2024
|
/* @__PURE__ */ r.jsxs("h3", { children: [
|
|
2026
2025
|
a.formatMessage({ id: `${ft}members` }),
|
|
2027
|
-
/* @__PURE__ */ r.jsx("span", { className: "count", children:
|
|
2026
|
+
/* @__PURE__ */ r.jsx("span", { className: "count", children: c })
|
|
2028
2027
|
] }),
|
|
2029
|
-
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${
|
|
2028
|
+
/* @__PURE__ */ r.jsx("p", { className: "text-small", children: /* @__PURE__ */ r.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${ft}viewAll` }) }) })
|
|
2030
2029
|
] }),
|
|
2031
2030
|
/* @__PURE__ */ r.jsx(
|
|
2032
2031
|
os,
|
|
2033
2032
|
{
|
|
2034
2033
|
contributors: {
|
|
2035
|
-
total:
|
|
2036
|
-
data:
|
|
2034
|
+
total: s,
|
|
2035
|
+
data: u
|
|
2037
2036
|
},
|
|
2038
2037
|
styling: {
|
|
2039
2038
|
size: "medium",
|
|
2040
2039
|
showGap: !0,
|
|
2041
|
-
showPlaceholders:
|
|
2040
|
+
showPlaceholders: c === 0
|
|
2042
2041
|
},
|
|
2043
|
-
cutoff:
|
|
2042
|
+
cutoff: i
|
|
2044
2043
|
}
|
|
2045
2044
|
)
|
|
2046
2045
|
] }),
|
|
2047
|
-
/* @__PURE__ */ r.jsx(yn, { isMember:
|
|
2048
|
-
|
|
2046
|
+
/* @__PURE__ */ r.jsx(yn, { isMember: t, ...m }),
|
|
2047
|
+
t && /* @__PURE__ */ r.jsx(
|
|
2049
2048
|
W,
|
|
2050
2049
|
{
|
|
2051
2050
|
variant: "primary",
|
|
@@ -2090,8 +2089,8 @@ const go = ({
|
|
|
2090
2089
|
"button",
|
|
2091
2090
|
{
|
|
2092
2091
|
className: j(u, { selected: a.includes(u) }),
|
|
2093
|
-
onClick: (
|
|
2094
|
-
|
|
2092
|
+
onClick: (b) => {
|
|
2093
|
+
b.preventDefault(), b.stopPropagation(), c(u, h);
|
|
2095
2094
|
},
|
|
2096
2095
|
..._,
|
|
2097
2096
|
children: f
|
|
@@ -2122,23 +2121,23 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2122
2121
|
const c = P(), [u, f] = D(e);
|
|
2123
2122
|
if (z(() => {
|
|
2124
2123
|
e !== u && f(e);
|
|
2125
|
-
}, [e]), !s || !Object.values(s).some((
|
|
2124
|
+
}, [e]), !s || !Object.values(s).some((b) => b && b.post_name))
|
|
2126
2125
|
return null;
|
|
2127
2126
|
const h = Object.keys(s), _ = u !== e;
|
|
2128
2127
|
return /* @__PURE__ */ r.jsxs("div", { className: j("language-switcher text-small", m, i), children: [
|
|
2129
2128
|
/* @__PURE__ */ r.jsxs("nav", { children: [
|
|
2130
2129
|
m !== "short" && /* @__PURE__ */ r.jsx("p", { children: a || c.formatMessage({ id: `${Ue}label` }) }),
|
|
2131
|
-
/* @__PURE__ */ r.jsx("ul", { children: h.map((
|
|
2132
|
-
if (!pt[
|
|
2130
|
+
/* @__PURE__ */ r.jsx("ul", { children: h.map((b) => {
|
|
2131
|
+
if (!pt[b])
|
|
2133
2132
|
return null;
|
|
2134
|
-
let g = { className:
|
|
2135
|
-
return u ===
|
|
2133
|
+
let g = { className: b };
|
|
2134
|
+
return u === b ? g["aria-label"] = c.formatMessage({ id: `${Ue}selected` }, { language: pt[b] }) : g = {
|
|
2136
2135
|
...g,
|
|
2137
|
-
href: ms(
|
|
2136
|
+
href: ms(b, l),
|
|
2138
2137
|
onClick: (E) => {
|
|
2139
|
-
E.preventDefault(), E.stopPropagation(), f(
|
|
2138
|
+
E.preventDefault(), E.stopPropagation(), f(b), o(b);
|
|
2140
2139
|
}
|
|
2141
|
-
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { ...g, fallbackElement: "span", children: pt[
|
|
2140
|
+
}, /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(nt, { ...g, fallbackElement: "span", children: pt[b] }) }, b);
|
|
2142
2141
|
}) }),
|
|
2143
2142
|
m !== "short" && !_ && /* @__PURE__ */ r.jsx("p", { children: c.formatMessage({ id: `${Ue}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2144
2143
|
] }),
|
|
@@ -2148,9 +2147,9 @@ const pt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2148
2147
|
// `values` are throwing a type error: https://github.com/formatjs/formatjs/issues/3633
|
|
2149
2148
|
children: c.formatMessage({ id: `${Ue}disclaimer` }, {
|
|
2150
2149
|
email: Re.support,
|
|
2151
|
-
link: (
|
|
2152
|
-
const g = `mailto:${
|
|
2153
|
-
return /* @__PURE__ */ r.jsx("a", { href: g, children:
|
|
2150
|
+
link: (b) => {
|
|
2151
|
+
const g = `mailto:${b}`;
|
|
2152
|
+
return /* @__PURE__ */ r.jsx("a", { href: g, children: b });
|
|
2154
2153
|
}
|
|
2155
2154
|
})
|
|
2156
2155
|
})
|
|
@@ -2223,7 +2222,7 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2223
2222
|
}
|
|
2224
2223
|
),
|
|
2225
2224
|
/* @__PURE__ */ r.jsx("ul", { id: t, hidden: !m, children: n.map(({ href: c, onClick: u, text: f, icon: p, ...h }, _) => {
|
|
2226
|
-
const
|
|
2225
|
+
const b = {
|
|
2227
2226
|
...h,
|
|
2228
2227
|
onClick: (g) => {
|
|
2229
2228
|
a(!1), typeof u == "function" && u(g);
|
|
@@ -2237,13 +2236,13 @@ const ps = ({ element: e = "div", id: t = "more-menu", options: n, className: s
|
|
|
2237
2236
|
}, 100);
|
|
2238
2237
|
}
|
|
2239
2238
|
};
|
|
2240
|
-
return c && (
|
|
2239
|
+
return c && (b.href = c), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2241
2240
|
W,
|
|
2242
2241
|
{
|
|
2243
2242
|
variant: "tertiary",
|
|
2244
2243
|
size: "medium",
|
|
2245
2244
|
icon: p ? { icon: p, position: "left" } : !1,
|
|
2246
|
-
...
|
|
2245
|
+
...b,
|
|
2247
2246
|
children: f
|
|
2248
2247
|
}
|
|
2249
2248
|
) }, `${window.btoa(f)}_${_}`);
|
|
@@ -2305,7 +2304,7 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2305
2304
|
/* @__PURE__ */ r.jsx("p", { children: e.formatMessage({ id: `${gt}text` }) }),
|
|
2306
2305
|
/* @__PURE__ */ r.jsx(tt, { buttons: c })
|
|
2307
2306
|
] });
|
|
2308
|
-
},
|
|
2307
|
+
}, be = {
|
|
2309
2308
|
platform: {
|
|
2310
2309
|
order: ["events", "courses", "qanda", "articles"],
|
|
2311
2310
|
// An array guarantees the right order
|
|
@@ -2400,14 +2399,14 @@ const gt = "cookieBanner_", _t = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2400
2399
|
}
|
|
2401
2400
|
};
|
|
2402
2401
|
const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
2403
|
-
const t =
|
|
2402
|
+
const t = be[e].order || [];
|
|
2404
2403
|
let n = !1;
|
|
2405
|
-
return "text" in
|
|
2404
|
+
return "text" in be[e] && (n = be[e].text), /* @__PURE__ */ r.jsxs(Zt, { children: [
|
|
2406
2405
|
/* @__PURE__ */ r.jsx("p", { className: "pre-title", children: /* @__PURE__ */ r.jsx(we, { id: `${Me}${e}` }) }),
|
|
2407
2406
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ r.jsx("ul", { className: "text-medium", children: t.map((s) => {
|
|
2408
2407
|
if (["order", "child", "text"].includes(s))
|
|
2409
2408
|
return null;
|
|
2410
|
-
const { href: o, gtmType: l } =
|
|
2409
|
+
const { href: o, gtmType: l } = be[e][s], m = {};
|
|
2411
2410
|
return ["legal"].includes(e) && (m.target = "_blank", m.rel = "noopener"), /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
2412
2411
|
"a",
|
|
2413
2412
|
{
|
|
@@ -2451,12 +2450,12 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2451
2450
|
),
|
|
2452
2451
|
/* @__PURE__ */ r.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ r.jsxs("div", { className: "group", children: [
|
|
2453
2452
|
/* @__PURE__ */ r.jsx(on, { group: e }),
|
|
2454
|
-
Object.keys(
|
|
2453
|
+
Object.keys(be[e]).includes("child") && /* @__PURE__ */ r.jsx(on, { group: be[e].child })
|
|
2455
2454
|
] }, e)) }),
|
|
2456
2455
|
/* @__PURE__ */ r.jsx("hr", {}),
|
|
2457
2456
|
/* @__PURE__ */ r.jsxs("div", { className: "sub-footer", children: [
|
|
2458
|
-
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(
|
|
2459
|
-
const t =
|
|
2457
|
+
/* @__PURE__ */ r.jsx("ul", { children: Array.isArray(be.social.order) && be.social.order.map((e) => {
|
|
2458
|
+
const t = be.social[e];
|
|
2460
2459
|
return /* @__PURE__ */ r.jsx("li", { className: e, children: /* @__PURE__ */ r.jsx(
|
|
2461
2460
|
"a",
|
|
2462
2461
|
{
|
|
@@ -2473,11 +2472,11 @@ const Me = "footer_", Je = "SiteFooter", on = ({ group: e }) => {
|
|
|
2473
2472
|
/* @__PURE__ */ r.jsx("small", { children: /* @__PURE__ */ r.jsx(we, { id: `${Me}copyright`, values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() } }) })
|
|
2474
2473
|
] })
|
|
2475
2474
|
] }) });
|
|
2476
|
-
const ze = "emailHelperTextBox_",
|
|
2475
|
+
const ze = "emailHelperTextBox_", bo = ({ type: e, email: t, redirectPath: n, resendVerificationCode: s }) => {
|
|
2477
2476
|
const o = P(), [l, m] = D({ path: `${ze}default`, type: "default", link: {}, mail: {}, error: "" }), [a, i] = D(!1), c = Ee(
|
|
2478
2477
|
(h) => {
|
|
2479
2478
|
h.preventDefault(), h.stopPropagation();
|
|
2480
|
-
const _ = (
|
|
2479
|
+
const _ = (b) => {
|
|
2481
2480
|
m({
|
|
2482
2481
|
path: `${ze}error_verificationFailedToSend`,
|
|
2483
2482
|
type: "error",
|
|
@@ -2495,7 +2494,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2495
2494
|
"data-gtm-event-context": "ErrorVerifyingBox",
|
|
2496
2495
|
"data-gtm-event-type": "email-concierge-click"
|
|
2497
2496
|
},
|
|
2498
|
-
error:
|
|
2497
|
+
error: b
|
|
2499
2498
|
});
|
|
2500
2499
|
};
|
|
2501
2500
|
if (typeof s != "function") {
|
|
@@ -2504,8 +2503,8 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2504
2503
|
}
|
|
2505
2504
|
i(!0), s(t).then(() => {
|
|
2506
2505
|
localStorage.setItem("email", t), window.location.href = n || "/signup/verify-email";
|
|
2507
|
-
}).catch((
|
|
2508
|
-
_(
|
|
2506
|
+
}).catch((b) => {
|
|
2507
|
+
_(b.message);
|
|
2509
2508
|
}).finally(() => {
|
|
2510
2509
|
i(!1);
|
|
2511
2510
|
});
|
|
@@ -2515,13 +2514,13 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2515
2514
|
);
|
|
2516
2515
|
z(
|
|
2517
2516
|
() => {
|
|
2518
|
-
let h = ze, _ = "default",
|
|
2517
|
+
let h = ze, _ = "default", b = {}, g = {};
|
|
2519
2518
|
switch (e) {
|
|
2520
2519
|
case "gov":
|
|
2521
2520
|
h += "autoApproved", _ = "success";
|
|
2522
2521
|
break;
|
|
2523
2522
|
case "nonGov":
|
|
2524
|
-
h += "unrecognisedEmail", _ = "error",
|
|
2523
|
+
h += "unrecognisedEmail", _ = "error", b = {
|
|
2525
2524
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2526
2525
|
"data-gtm-event-context": "NonGovEmailHelperTextBox",
|
|
2527
2526
|
"data-gtm-event-type": "LearnMoreClick"
|
|
@@ -2536,7 +2535,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2536
2535
|
};
|
|
2537
2536
|
break;
|
|
2538
2537
|
case "verify":
|
|
2539
|
-
h += "emailUnverified", _ = "error",
|
|
2538
|
+
h += "emailUnverified", _ = "error", b = {
|
|
2540
2539
|
href: "#",
|
|
2541
2540
|
"data-gtm-event-context": "VerifyEmailBox",
|
|
2542
2541
|
"data-gtm-event-type": "SendEmailClick",
|
|
@@ -2546,7 +2545,7 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2546
2545
|
};
|
|
2547
2546
|
break;
|
|
2548
2547
|
case "exists":
|
|
2549
|
-
h += "emailAlreadyExists", _ = "error",
|
|
2548
|
+
h += "emailAlreadyExists", _ = "error", b = {
|
|
2550
2549
|
href: "/user-onboarding/login",
|
|
2551
2550
|
"data-gtm-event-context": "EmailExistsBox",
|
|
2552
2551
|
"data-gtm-event-type": "login-click"
|
|
@@ -2558,14 +2557,14 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2558
2557
|
};
|
|
2559
2558
|
break;
|
|
2560
2559
|
default:
|
|
2561
|
-
h += "default",
|
|
2560
|
+
h += "default", b = {
|
|
2562
2561
|
href: "https://about.apolitical.co/who-can-join-the-community",
|
|
2563
2562
|
"data-gtm-event-context": "DefaultEmailHelperTextBox",
|
|
2564
2563
|
"data-gtm-event-type": "LearnMoreClick"
|
|
2565
2564
|
};
|
|
2566
2565
|
break;
|
|
2567
2566
|
}
|
|
2568
|
-
m({ ...l, path: h, type: _, link:
|
|
2567
|
+
m({ ...l, path: h, type: _, link: b, mail: g });
|
|
2569
2568
|
},
|
|
2570
2569
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
2571
2570
|
[e]
|
|
@@ -2574,8 +2573,8 @@ const ze = "emailHelperTextBox_", vo = ({ type: e, email: t, redirectPath: n, re
|
|
|
2574
2573
|
return ["link", "mail"].forEach((h) => {
|
|
2575
2574
|
u[h] = Object.keys(l[h]).length ? (_) => /* @__PURE__ */ r.jsx("a", { ...l[h], children: _ }) : (_) => _;
|
|
2576
2575
|
}), /* @__PURE__ */ r.jsx(Ur, { type: l.type, heading: a ? !1 : o.formatMessage({ id: `${l.path}_title` }), children: a ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
2577
|
-
/* @__PURE__ */ r.jsx(
|
|
2578
|
-
/* @__PURE__ */ r.jsx(
|
|
2576
|
+
/* @__PURE__ */ r.jsx(ve, { element: "span" }),
|
|
2577
|
+
/* @__PURE__ */ r.jsx(ve, { element: "span" })
|
|
2579
2578
|
] }) : (
|
|
2580
2579
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2581
2580
|
// @ts-ignore
|
|
@@ -2616,7 +2615,7 @@ const Ve = "passwordRules_", Sn = "isMoreThanEightCharacters", $n = "includesNum
|
|
|
2616
2615
|
] })
|
|
2617
2616
|
] }, `rule-${s}`)) })
|
|
2618
2617
|
] });
|
|
2619
|
-
},
|
|
2618
|
+
}, vo = Ae(xs);
|
|
2620
2619
|
const wo = ({
|
|
2621
2620
|
text: e = {},
|
|
2622
2621
|
topRating: t = 5,
|
|
@@ -2637,8 +2636,8 @@ const wo = ({
|
|
|
2637
2636
|
if (z(() => {
|
|
2638
2637
|
m && !i.setUp && u();
|
|
2639
2638
|
}, [m]), !m)
|
|
2640
|
-
return /* @__PURE__ */ r.jsx(
|
|
2641
|
-
const { id: f, rating: p, disabled: h } = i, _ = "ratings_",
|
|
2639
|
+
return /* @__PURE__ */ r.jsx(ve, { className: "rating-placeholder" });
|
|
2640
|
+
const { id: f, rating: p, disabled: h } = i, _ = "ratings_", b = {
|
|
2642
2641
|
text: a.formatMessage({ id: `${_}text` }),
|
|
2643
2642
|
low: a.formatMessage({ id: `${_}low` }),
|
|
2644
2643
|
high: a.formatMessage({ id: `${_}high` }),
|
|
@@ -2655,7 +2654,7 @@ const wo = ({
|
|
|
2655
2654
|
}
|
|
2656
2655
|
};
|
|
2657
2656
|
return /* @__PURE__ */ r.jsxs("div", { className: j("rating", l), children: [
|
|
2658
|
-
/* @__PURE__ */ r.jsx("span", { className: "label", children:
|
|
2657
|
+
/* @__PURE__ */ r.jsx("span", { className: "label", children: b[p ? "success" : "text"] }),
|
|
2659
2658
|
/* @__PURE__ */ r.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
|
|
2660
2659
|
const x = E + 1;
|
|
2661
2660
|
return /* @__PURE__ */ r.jsx("li", { className: j({ selected: p && x <= p }), children: /* @__PURE__ */ r.jsx(
|
|
@@ -2667,7 +2666,7 @@ const wo = ({
|
|
|
2667
2666
|
screenreaderText: `${a.formatMessage(
|
|
2668
2667
|
{ id: `${_}stars` },
|
|
2669
2668
|
{ number: x, total: t }
|
|
2670
|
-
)}${x === 1 || x === t ? ` - ${
|
|
2669
|
+
)}${x === 1 || x === t ? ` - ${b[x === 1 ? "low" : "high"]}` : ""}`,
|
|
2671
2670
|
onClick: ($) => {
|
|
2672
2671
|
$.preventDefault(), $.stopPropagation(), g(x);
|
|
2673
2672
|
},
|
|
@@ -2677,7 +2676,7 @@ const wo = ({
|
|
|
2677
2676
|
}) })
|
|
2678
2677
|
] });
|
|
2679
2678
|
};
|
|
2680
|
-
const
|
|
2679
|
+
const bs = ({
|
|
2681
2680
|
id: e = "search",
|
|
2682
2681
|
className: t = "",
|
|
2683
2682
|
handleToggle: n = !1,
|
|
@@ -2730,7 +2729,7 @@ const vs = ({
|
|
|
2730
2729
|
}
|
|
2731
2730
|
);
|
|
2732
2731
|
};
|
|
2733
|
-
const
|
|
2732
|
+
const vs = ({
|
|
2734
2733
|
title: e,
|
|
2735
2734
|
label: t,
|
|
2736
2735
|
ctaMessage: n,
|
|
@@ -2743,26 +2742,26 @@ const bs = ({
|
|
|
2743
2742
|
initialFormStatus: c = "NOT_SUBMITTED"
|
|
2744
2743
|
/* NOT_SUBMITTED */
|
|
2745
2744
|
}) => {
|
|
2746
|
-
const [u, f] = D([]), [p, h] = D(!0), [_,
|
|
2745
|
+
const [u, f] = D([]), [p, h] = D(!0), [_, b] = D(c), { formatMessage: g } = P(), E = async (T) => {
|
|
2747
2746
|
T.preventDefault();
|
|
2748
2747
|
try {
|
|
2749
|
-
await i(u), f([]),
|
|
2748
|
+
await i(u), f([]), b(
|
|
2750
2749
|
"SUCCESS"
|
|
2751
2750
|
/* SUCCESS */
|
|
2752
2751
|
);
|
|
2753
2752
|
} catch (M) {
|
|
2754
|
-
|
|
2753
|
+
b(
|
|
2755
2754
|
"ERROR"
|
|
2756
2755
|
/* ERROR */
|
|
2757
2756
|
), a(M);
|
|
2758
2757
|
}
|
|
2759
2758
|
}, x = (T) => {
|
|
2760
|
-
T.preventDefault(),
|
|
2759
|
+
T.preventDefault(), b(
|
|
2761
2760
|
"NOT_SUBMITTED"
|
|
2762
2761
|
/* NOT_SUBMITTED */
|
|
2763
2762
|
), h(!0), f([]);
|
|
2764
2763
|
}, $ = (T) => {
|
|
2765
|
-
T.preventDefault(), m(),
|
|
2764
|
+
T.preventDefault(), m(), b(
|
|
2766
2765
|
"CLOSED"
|
|
2767
2766
|
/* CLOSED */
|
|
2768
2767
|
);
|
|
@@ -3035,7 +3034,7 @@ const bs = ({
|
|
|
3035
3034
|
...a.props || {}
|
|
3036
3035
|
});
|
|
3037
3036
|
}
|
|
3038
|
-
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order,
|
|
3037
|
+
const h = a.order && a.order[0] && a[a.order[0]], _ = h && a[a.order[0]].order, b = p && window.location.pathname === a.href;
|
|
3039
3038
|
let g = {}, E = {};
|
|
3040
3039
|
if (h) {
|
|
3041
3040
|
const x = a.menuId || e, $ = {
|
|
@@ -3060,7 +3059,7 @@ const bs = ({
|
|
|
3060
3059
|
...$
|
|
3061
3060
|
});
|
|
3062
3061
|
}
|
|
3063
|
-
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active:
|
|
3062
|
+
return /* @__PURE__ */ r.jsxs("li", { className: j({ [a.className]: a.className, "has-submenu": h, parent: _, active: b }), role: "none", ...g, children: [
|
|
3064
3063
|
p ? A.createElement(u ? W : "a", p, m.formatMessage({ id: f })) : m.formatMessage({ id: f }),
|
|
3065
3064
|
a.order && /* @__PURE__ */ r.jsx("ul", { ...E, children: a.order.map((x) => {
|
|
3066
3065
|
if (!a[x])
|
|
@@ -3175,7 +3174,7 @@ const ws = { height: 67, height_desktop: 83 }, Mn = () => {
|
|
|
3175
3174
|
}
|
|
3176
3175
|
),
|
|
3177
3176
|
/* @__PURE__ */ r.jsx(
|
|
3178
|
-
|
|
3177
|
+
bs,
|
|
3179
3178
|
{
|
|
3180
3179
|
id: "global-search",
|
|
3181
3180
|
handleToggle: { searchIsOpen: i.search, isDesktopVersion: o.search },
|
|
@@ -3231,7 +3230,7 @@ const ks = () => {
|
|
|
3231
3230
|
}, an = {
|
|
3232
3231
|
default: "tags_",
|
|
3233
3232
|
headerTopics: "header_topics_topics_"
|
|
3234
|
-
},
|
|
3233
|
+
}, bt = {
|
|
3235
3234
|
topic: {
|
|
3236
3235
|
Climate: "climate",
|
|
3237
3236
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3250,13 +3249,13 @@ const ks = () => {
|
|
|
3250
3249
|
}, ys = {
|
|
3251
3250
|
getTagDetails: (e) => {
|
|
3252
3251
|
if (e.includes("topic_")) {
|
|
3253
|
-
if (e =
|
|
3252
|
+
if (e = bt.topic[e.replace("topic_", "")], e) {
|
|
3254
3253
|
const t = Xe.topics.topics[e].href;
|
|
3255
3254
|
return t ? { id: e, href: t, text: `${an.headerTopics}${e}` } : null;
|
|
3256
3255
|
}
|
|
3257
3256
|
return null;
|
|
3258
3257
|
}
|
|
3259
|
-
return
|
|
3258
|
+
return bt[e] ? (e = bt[e], { id: e, text: `${an.default}${e}` }) : null;
|
|
3260
3259
|
}
|
|
3261
3260
|
};
|
|
3262
3261
|
const yo = ({
|
|
@@ -3353,10 +3352,10 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3353
3352
|
var F, q;
|
|
3354
3353
|
const c = P(), u = ye(je), [f, p] = D(
|
|
3355
3354
|
n.isEditing && n.isEditing.text || ""
|
|
3356
|
-
), [h, _] = D(m.error || !1), [
|
|
3355
|
+
), [h, _] = D(m.error || !1), [b, g] = D(!1), E = Z(null);
|
|
3357
3356
|
if (s || (s = E), n.isLoading)
|
|
3358
3357
|
return /* @__PURE__ */ r.jsx(
|
|
3359
|
-
|
|
3358
|
+
ve,
|
|
3360
3359
|
{
|
|
3361
3360
|
className: "discussion-card discussion-form",
|
|
3362
3361
|
"data-testid": "loading-placeholder"
|
|
@@ -3439,7 +3438,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3439
3438
|
Ye = setTimeout(() => {
|
|
3440
3439
|
_(!1), g(!1);
|
|
3441
3440
|
}, 5e3);
|
|
3442
|
-
}, Q = !f || !Rr(f), V =
|
|
3441
|
+
}, Q = !f || !Rr(f), V = b === "submitting", w = [];
|
|
3443
3442
|
return (n.isEditing && !V || m.cancel) && w.push({
|
|
3444
3443
|
variant: "secondary",
|
|
3445
3444
|
size: { mobile: "small", 600: "medium" },
|
|
@@ -3524,7 +3523,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3524
3523
|
)
|
|
3525
3524
|
}) }),
|
|
3526
3525
|
/* @__PURE__ */ r.jsx(tt, { buttons: w }),
|
|
3527
|
-
|
|
3526
|
+
b === "submitted" && /* @__PURE__ */ r.jsx($t, { className: "success", "data-testid": "success", children: he(c.formatMessage, `${ae}success`, e.type, "action") }),
|
|
3528
3527
|
h && /* @__PURE__ */ r.jsx($t, { id: "error-message", className: "error", "data-testid": "error", children: m.error ? m.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
3529
3528
|
{ id: h },
|
|
3530
3529
|
{
|
|
@@ -3576,7 +3575,7 @@ const ae = "discussion_form_", Cn = ({
|
|
|
3576
3575
|
...n && { replySlug: n }
|
|
3577
3576
|
}), Ss = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
3578
3577
|
let Oe = !1;
|
|
3579
|
-
const
|
|
3578
|
+
const vt = () => {
|
|
3580
3579
|
Oe !== !1 && (clearTimeout(Oe), Oe = !1);
|
|
3581
3580
|
}, wt = 10, $s = ({
|
|
3582
3581
|
element: e = "div",
|
|
@@ -3594,17 +3593,17 @@ const bt = () => {
|
|
|
3594
3593
|
z(() => {
|
|
3595
3594
|
h(o);
|
|
3596
3595
|
}, [o]);
|
|
3597
|
-
const [u, f] = D(t), [p, h] = D(o), [_,
|
|
3596
|
+
const [u, f] = D(t), [p, h] = D(o), [_, b] = D(!1), [g, E] = D(!1), x = qe(() => Ss(n, wt), [n]), $ = (M) => {
|
|
3598
3597
|
if (M.preventDefault(), M.stopPropagation(), E(!1), Oe)
|
|
3599
|
-
return
|
|
3600
|
-
if (
|
|
3598
|
+
return vt(), !1;
|
|
3599
|
+
if (vt(), _ || !m)
|
|
3601
3600
|
return !1;
|
|
3602
3601
|
Oe = setTimeout(T, 350);
|
|
3603
3602
|
}, T = async () => {
|
|
3604
|
-
if (
|
|
3603
|
+
if (vt(), _ || !m)
|
|
3605
3604
|
return !1;
|
|
3606
3605
|
let M = p ? u - 1 : u + 1;
|
|
3607
|
-
M < 0 && (M = 0),
|
|
3606
|
+
M < 0 && (M = 0), b(!0), f(M), h(!p);
|
|
3608
3607
|
try {
|
|
3609
3608
|
if (l && l.slugs) {
|
|
3610
3609
|
const Q = Es(l.slugs);
|
|
@@ -3613,7 +3612,7 @@ const bt = () => {
|
|
|
3613
3612
|
} catch {
|
|
3614
3613
|
f(t), h(o);
|
|
3615
3614
|
} finally {
|
|
3616
|
-
|
|
3615
|
+
b(!1);
|
|
3617
3616
|
}
|
|
3618
3617
|
};
|
|
3619
3618
|
return A.createElement(
|
|
@@ -3684,11 +3683,11 @@ const Dn = ({
|
|
|
3684
3683
|
className: u = "",
|
|
3685
3684
|
gtmContext: f = "Modal"
|
|
3686
3685
|
}) => {
|
|
3687
|
-
const p = P(), [h, _] = D(t),
|
|
3686
|
+
const p = P(), [h, _] = D(t), b = (E) => {
|
|
3688
3687
|
_(E), E ? (o(), document.body.classList.add("has-overlay")) : (l(), document.body.classList.remove("has-overlay"));
|
|
3689
3688
|
};
|
|
3690
3689
|
z(() => {
|
|
3691
|
-
|
|
3690
|
+
b(t);
|
|
3692
3691
|
}, [t]);
|
|
3693
3692
|
const g = s ? { "--max-width": `${s / 16}rem` } : {};
|
|
3694
3693
|
return /* @__PURE__ */ r.jsx("div", { className: j("overlay", { open: h }), children: /* @__PURE__ */ r.jsx(
|
|
@@ -3707,7 +3706,7 @@ const Dn = ({
|
|
|
3707
3706
|
variant: "tertiary",
|
|
3708
3707
|
size: "medium",
|
|
3709
3708
|
icon: { icon: "close" },
|
|
3710
|
-
onClick: () =>
|
|
3709
|
+
onClick: () => b(!1),
|
|
3711
3710
|
className: "gtm-trackable",
|
|
3712
3711
|
"data-gtm-event-type": "close-modal-click",
|
|
3713
3712
|
"data-gtm-event-context": f,
|
|
@@ -3752,7 +3751,7 @@ const So = ({
|
|
|
3752
3751
|
functions: { onClose: a },
|
|
3753
3752
|
className: j("invite-modal", e, { success: !!n }),
|
|
3754
3753
|
children: /* @__PURE__ */ r.jsx(
|
|
3755
|
-
|
|
3754
|
+
vs,
|
|
3756
3755
|
{
|
|
3757
3756
|
title: s,
|
|
3758
3757
|
label: o,
|
|
@@ -3789,7 +3788,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3789
3788
|
gtmContext: h = "DiscussionAnswer",
|
|
3790
3789
|
children: _
|
|
3791
3790
|
}) => {
|
|
3792
|
-
const
|
|
3791
|
+
const b = P(), g = ye(je), E = ye(Nn), [x, $] = D({
|
|
3793
3792
|
body: t && t.body || "",
|
|
3794
3793
|
isEditing: !1,
|
|
3795
3794
|
didEdit: t && t.isEdited || !1
|
|
@@ -3801,7 +3800,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3801
3800
|
didEdit: t && t.isEdited || !1
|
|
3802
3801
|
});
|
|
3803
3802
|
}, [t.isEdited]), s || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
|
|
3804
|
-
return /* @__PURE__ */ r.jsx(
|
|
3803
|
+
return /* @__PURE__ */ r.jsx(ve, { className: "discussion-card discussion-post" });
|
|
3805
3804
|
const { author: w, canLike: F, createdAt: q, id: k, likes: Y = 0, userLiked: B, comments: L = 0 } = t, U = g && g.id && typeof w != "string" && w.id && w.id === g.id || !1, G = typeof F == "boolean" ? F : n ? !U : !1, K = async (R) => {
|
|
3806
3805
|
R || (R = ""), V("");
|
|
3807
3806
|
try {
|
|
@@ -3825,9 +3824,9 @@ const xe = "discussion_", Rt = ({
|
|
|
3825
3824
|
V("delete-error");
|
|
3826
3825
|
}
|
|
3827
3826
|
}, se = [{
|
|
3828
|
-
text:
|
|
3829
|
-
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
3830
|
-
|
|
3827
|
+
text: b.formatMessage({ id: `${xe}moreMenu_report` }),
|
|
3828
|
+
href: `mailto:community@apolitical.co?subject=${encodeURI(b.formatMessage({ id: `${xe}report_subject` }))}&body=${encodeURI(
|
|
3829
|
+
b.formatMessage(
|
|
3831
3830
|
{ id: `${xe}report_body` },
|
|
3832
3831
|
{
|
|
3833
3832
|
contentType: t.type || "",
|
|
@@ -3840,7 +3839,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3840
3839
|
}];
|
|
3841
3840
|
return n && U && se.push(
|
|
3842
3841
|
{
|
|
3843
|
-
text:
|
|
3842
|
+
text: b.formatMessage({ id: `${xe}moreMenu_edit` }),
|
|
3844
3843
|
onClick: () => $({ ...x, isEditing: !0 }),
|
|
3845
3844
|
icon: "pencil-paper",
|
|
3846
3845
|
className: "gtm-trackable",
|
|
@@ -3848,7 +3847,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3848
3847
|
"data-gtm-event-type": `edit-${t.type}-click`
|
|
3849
3848
|
},
|
|
3850
3849
|
{
|
|
3851
|
-
text:
|
|
3850
|
+
text: b.formatMessage({ id: `${xe}moreMenu_delete` }),
|
|
3852
3851
|
onClick: (R) => {
|
|
3853
3852
|
R.preventDefault(), R.stopPropagation(), M(!0);
|
|
3854
3853
|
},
|
|
@@ -3888,8 +3887,8 @@ const xe = "discussion_", Rt = ({
|
|
|
3888
3887
|
userHasPermissions: n,
|
|
3889
3888
|
meta: { isLoading: s, isInWrapper: !0, isEditing: { text: x.body } },
|
|
3890
3889
|
maxLength: t.type === "question" ? 250 : 5e4,
|
|
3891
|
-
forceShow: { error: Q !== "" && Q !== "delete-error" ?
|
|
3892
|
-
action:
|
|
3890
|
+
forceShow: { error: Q !== "" && Q !== "delete-error" ? b.formatMessage({ id: Q }, {
|
|
3891
|
+
action: b.formatMessage({
|
|
3893
3892
|
id: `discussion_action_${t.type}`
|
|
3894
3893
|
})
|
|
3895
3894
|
}) : !1 },
|
|
@@ -3934,10 +3933,10 @@ const xe = "discussion_", Rt = ({
|
|
|
3934
3933
|
className: "gtm-trackable",
|
|
3935
3934
|
"data-gtm-event-context": h,
|
|
3936
3935
|
"data-gtm-event-type": `answer-${t.type}-click`,
|
|
3937
|
-
screenreaderText:
|
|
3936
|
+
screenreaderText: b.formatMessage({ id: `${xe}comments_screenReader` }, { count: L })
|
|
3938
3937
|
}
|
|
3939
3938
|
),
|
|
3940
|
-
/* @__PURE__ */ r.jsx("span", { children:
|
|
3939
|
+
/* @__PURE__ */ r.jsx("span", { children: b.formatMessage({ id: `${xe}comments` }, { count: L }) })
|
|
3941
3940
|
] }),
|
|
3942
3941
|
(t.type === "answer" || t.type === "reply") && /* @__PURE__ */ r.jsx("li", { children: /* @__PURE__ */ r.jsx(
|
|
3943
3942
|
W,
|
|
@@ -3946,7 +3945,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3946
3945
|
size: "medium",
|
|
3947
3946
|
styling: { muted: !0 },
|
|
3948
3947
|
onClick: ie,
|
|
3949
|
-
children:
|
|
3948
|
+
children: b.formatMessage({ id: `${xe}reply` })
|
|
3950
3949
|
}
|
|
3951
3950
|
) }),
|
|
3952
3951
|
/* @__PURE__ */ r.jsx(ps, { element: "li", id: `more-${t.slug}`, options: se })
|
|
@@ -3962,18 +3961,18 @@ const xe = "discussion_", Rt = ({
|
|
|
3962
3961
|
isOpen: T,
|
|
3963
3962
|
functions: { onOpen: () => {
|
|
3964
3963
|
}, onClose: () => M(!1) },
|
|
3965
|
-
forceShow: { error: Q === "delete-error" ?
|
|
3966
|
-
action:
|
|
3964
|
+
forceShow: { error: Q === "delete-error" ? b.formatMessage({ id: "discussion_delete_error" }, {
|
|
3965
|
+
action: b.formatMessage({
|
|
3967
3966
|
id: `discussion_action_${t.type}`
|
|
3968
3967
|
})
|
|
3969
3968
|
}) : !1 },
|
|
3970
|
-
title:
|
|
3969
|
+
title: b.formatMessage(
|
|
3971
3970
|
{ id: "discussion_delete_title" },
|
|
3972
|
-
{ action:
|
|
3971
|
+
{ action: b.formatMessage({ id: `discussion_action_${t.type}` }) }
|
|
3973
3972
|
),
|
|
3974
3973
|
buttons: [
|
|
3975
|
-
{ variant: "secondary", onClick: () => M(!1), children:
|
|
3976
|
-
{ variant: "primary", className: "destructive", onClick: le, children:
|
|
3974
|
+
{ variant: "secondary", onClick: () => M(!1), children: b.formatMessage({ id: "discussion_delete_cancel" }) },
|
|
3975
|
+
{ variant: "primary", className: "destructive", onClick: le, children: b.formatMessage({ id: "discussion_delete_delete" }) }
|
|
3977
3976
|
],
|
|
3978
3977
|
gtmContext: `${t.type.charAt(0).toUpperCase()}${t.type.slice(1)}:${t.slug}`,
|
|
3979
3978
|
children: /* @__PURE__ */ r.jsx(
|
|
@@ -3982,7 +3981,7 @@ const xe = "discussion_", Rt = ({
|
|
|
3982
3981
|
id: "discussion_delete_text",
|
|
3983
3982
|
values: {
|
|
3984
3983
|
p: (R) => /* @__PURE__ */ r.jsx("p", { children: R }),
|
|
3985
|
-
action:
|
|
3984
|
+
action: b.formatMessage({
|
|
3986
3985
|
id: `discussion_action_${t.type}`
|
|
3987
3986
|
})
|
|
3988
3987
|
}
|
|
@@ -4127,11 +4126,11 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4127
4126
|
e.setQueryData(t, u.previousActivities);
|
|
4128
4127
|
}, onSuccess: (i, { activityId: c }) => {
|
|
4129
4128
|
const u = e.getQueryData(t), f = u == null ? void 0 : u.map((p) => {
|
|
4130
|
-
var h, _,
|
|
4129
|
+
var h, _, b, g;
|
|
4131
4130
|
if (p.id === c) {
|
|
4132
|
-
const E = (
|
|
4131
|
+
const E = (b = (_ = (h = p.latest_reactions) == null ? void 0 : h.like) == null ? void 0 : _.find(
|
|
4133
4132
|
(x) => x.user_id === (n == null ? void 0 : n.id)
|
|
4134
|
-
)) == null ? void 0 :
|
|
4133
|
+
)) == null ? void 0 : b.id;
|
|
4135
4134
|
return p.latest_reactions.like = (g = p.latest_reactions.like) == null ? void 0 : g.filter(
|
|
4136
4135
|
(x) => x.id !== E
|
|
4137
4136
|
), p;
|
|
@@ -4152,7 +4151,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4152
4151
|
const u = P(), f = At(), p = ye(je), {
|
|
4153
4152
|
data: h,
|
|
4154
4153
|
error: _,
|
|
4155
|
-
isLoading:
|
|
4154
|
+
isLoading: b,
|
|
4156
4155
|
isFetching: g
|
|
4157
4156
|
} = cn({
|
|
4158
4157
|
queryKey: [e, t],
|
|
@@ -4196,7 +4195,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4196
4195
|
({ activityId: k }) => w({ activityId: k }),
|
|
4197
4196
|
[w]
|
|
4198
4197
|
);
|
|
4199
|
-
return _ ? /* @__PURE__ */ r.jsx(rt, { variant: "error", text: _.message }) :
|
|
4198
|
+
return _ ? /* @__PURE__ */ r.jsx(rt, { variant: "error", text: _.message }) : b ? /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } }) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
4200
4199
|
/* @__PURE__ */ r.jsx(
|
|
4201
4200
|
An,
|
|
4202
4201
|
{
|
|
@@ -4359,7 +4358,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4359
4358
|
const u = (f = c.latest_reactions.reply) == null ? void 0 : f.map((p) => {
|
|
4360
4359
|
var h;
|
|
4361
4360
|
return p.id === i ? (h = p.latest_children.reply) == null ? void 0 : h.filter(
|
|
4362
|
-
(
|
|
4361
|
+
(b) => b.user_id !== (n == null ? void 0 : n.id)
|
|
4363
4362
|
) : p;
|
|
4364
4363
|
});
|
|
4365
4364
|
return e.setQueryData(t, () => ({
|
|
@@ -4378,7 +4377,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4378
4377
|
queryClient: p,
|
|
4379
4378
|
queryKey: [e, t, n],
|
|
4380
4379
|
mutationFn: l
|
|
4381
|
-
}), { mutate:
|
|
4380
|
+
}), { mutate: b } = fe(_), g = Rs({
|
|
4382
4381
|
queryClient: p,
|
|
4383
4382
|
queryKey: [e, t, n],
|
|
4384
4383
|
mutationFn: async (w) => m(w)
|
|
@@ -4409,7 +4408,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4409
4408
|
An,
|
|
4410
4409
|
{
|
|
4411
4410
|
contentType: "post",
|
|
4412
|
-
createPost:
|
|
4411
|
+
createPost: b,
|
|
4413
4412
|
membershipRequiredToPost: {
|
|
4414
4413
|
isMember: o,
|
|
4415
4414
|
required: !0,
|
|
@@ -4564,7 +4563,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4564
4563
|
}
|
|
4565
4564
|
}) => {
|
|
4566
4565
|
var L, U, G, K, ie, le, se, R, ee, oe, ce;
|
|
4567
|
-
const _ = ye(je),
|
|
4566
|
+
const _ = ye(je), b = At(), {
|
|
4568
4567
|
data: g,
|
|
4569
4568
|
error: E,
|
|
4570
4569
|
isLoading: x,
|
|
@@ -4573,19 +4572,19 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4573
4572
|
queryKey: [e, t, n],
|
|
4574
4573
|
queryFn: o
|
|
4575
4574
|
}), T = Is({
|
|
4576
|
-
queryClient:
|
|
4575
|
+
queryClient: b,
|
|
4577
4576
|
queryKey: [e, t, n],
|
|
4578
4577
|
mutationFn: async (te) => await l(te)
|
|
4579
4578
|
}), {
|
|
4580
4579
|
mutate: M
|
|
4581
4580
|
} = fe(T), Q = Hs({
|
|
4582
|
-
queryClient:
|
|
4581
|
+
queryClient: b,
|
|
4583
4582
|
queryKey: [e, t, n],
|
|
4584
4583
|
mutationFn: m
|
|
4585
4584
|
}), {
|
|
4586
4585
|
mutate: V
|
|
4587
4586
|
} = fe(Q), w = Qs({
|
|
4588
|
-
queryClient:
|
|
4587
|
+
queryClient: b,
|
|
4589
4588
|
queryKey: [e, t, n],
|
|
4590
4589
|
user: _,
|
|
4591
4590
|
mutationFn: async () => {
|
|
@@ -4608,7 +4607,7 @@ const To = ({ isOpen: e = !1, count: t = 0, children: n }) => {
|
|
|
4608
4607
|
if (E)
|
|
4609
4608
|
return /* @__PURE__ */ r.jsx(rt, { variant: "error", text: E.message });
|
|
4610
4609
|
if (x || $)
|
|
4611
|
-
return /* @__PURE__ */ r.jsx(
|
|
4610
|
+
return /* @__PURE__ */ r.jsx(ve, { style: { height: "400px" } });
|
|
4612
4611
|
const Y = ((L = g == null ? void 0 : g.actor) == null ? void 0 : L.id) === (_ == null ? void 0 : _.id), B = Ft(s, Y);
|
|
4613
4612
|
return /* @__PURE__ */ r.jsx(
|
|
4614
4613
|
Rt,
|
|
@@ -4712,7 +4711,7 @@ export {
|
|
|
4712
4711
|
Le as Divider,
|
|
4713
4712
|
oo as DownloadSection,
|
|
4714
4713
|
Re as EMAILS,
|
|
4715
|
-
|
|
4714
|
+
bo as EmailHelperTextBox,
|
|
4716
4715
|
rt as EmptyStateBox,
|
|
4717
4716
|
go as Filters,
|
|
4718
4717
|
cs as FlagsProvider,
|
|
@@ -4725,14 +4724,14 @@ export {
|
|
|
4725
4724
|
uo as HideShowTextBox,
|
|
4726
4725
|
ke as HighlightedTextBox,
|
|
4727
4726
|
us as IntlProvider,
|
|
4728
|
-
|
|
4727
|
+
vs as InviteForm,
|
|
4729
4728
|
So as InviteModal,
|
|
4730
4729
|
yn as JoinButton,
|
|
4731
4730
|
_o as LanguageSwitcher,
|
|
4732
4731
|
nt as Link,
|
|
4733
4732
|
fs as LoadMore,
|
|
4734
4733
|
mo as LoadingBlock,
|
|
4735
|
-
|
|
4734
|
+
ve as LoadingPlaceholder,
|
|
4736
4735
|
ns as LoadingState,
|
|
4737
4736
|
jn as Logo,
|
|
4738
4737
|
ao as LogoSection,
|
|
@@ -4745,7 +4744,7 @@ export {
|
|
|
4745
4744
|
co as NUMBER_OF_USERS,
|
|
4746
4745
|
Dn as Overlay,
|
|
4747
4746
|
ko as PageLayout,
|
|
4748
|
-
|
|
4747
|
+
vo as PasswordRules,
|
|
4749
4748
|
qr as Pill,
|
|
4750
4749
|
Dt as ProfilePicture,
|
|
4751
4750
|
es as ProgressBar,
|
|
@@ -4753,7 +4752,7 @@ export {
|
|
|
4753
4752
|
Bs as RepliesFeed,
|
|
4754
4753
|
$o as ResponsesHeading,
|
|
4755
4754
|
Br as ResponsiveImage,
|
|
4756
|
-
|
|
4755
|
+
bs as SearchForm,
|
|
4757
4756
|
Zr as Span,
|
|
4758
4757
|
$t as StatusBanner,
|
|
4759
4758
|
yo as Tags,
|