@apolitical/component-library 1.17.0 → 1.17.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +6 -6
- package/index.mjs +115 -115
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import P, { memo as We, useState as A, useEffect as Y, useRef as ae, useMemo as bt, Children as
|
|
1
|
+
import P, { memo as We, useState as A, useEffect as Y, useRef as ae, useMemo as bt, Children as Yt, createContext as en, useContext as we, Fragment as Gt, useCallback as Ae, useReducer as vs, Suspense as ws } from "react";
|
|
2
2
|
import ks from "lodash.clonedeep";
|
|
3
3
|
import js from "lodash.set";
|
|
4
4
|
import { useIntl as C, IntlProvider as ys, createIntl as Es, FormattedMessage as De } from "react-intl";
|
|
@@ -54,7 +54,7 @@ var Dn = { exports: {} };
|
|
|
54
54
|
})(Dn);
|
|
55
55
|
var Is = Dn.exports;
|
|
56
56
|
const E = /* @__PURE__ */ Ls(Is), Os = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => P.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), me = We(Os), Bs = ({ element: e = "span", children: t = null, ...n }) => P.createElement(e, { ...n, "aria-hidden": !0 }, t), Rn = We(Bs);
|
|
57
|
-
var
|
|
57
|
+
var Jt = { exports: {} }, Ye = {};
|
|
58
58
|
/**
|
|
59
59
|
* @license React
|
|
60
60
|
* react-jsx-runtime.production.min.js
|
|
@@ -428,8 +428,8 @@ function Qs() {
|
|
|
428
428
|
ref: !0,
|
|
429
429
|
__self: !0,
|
|
430
430
|
__source: !0
|
|
431
|
-
}, on, cn,
|
|
432
|
-
|
|
431
|
+
}, on, cn, Mt;
|
|
432
|
+
Mt = {};
|
|
433
433
|
function as(f) {
|
|
434
434
|
if (ve.call(f, "ref")) {
|
|
435
435
|
var j = Object.getOwnPropertyDescriptor(f, "ref").get;
|
|
@@ -449,7 +449,7 @@ function Qs() {
|
|
|
449
449
|
function is(f, j) {
|
|
450
450
|
if (typeof f.ref == "string" && Ve.current && j && Ve.current.stateNode !== j) {
|
|
451
451
|
var S = k(Ve.current.type);
|
|
452
|
-
|
|
452
|
+
Mt[S] || (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', k(Ve.current.type), f.ref), Mt[S] = !0);
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
function cs(f, j) {
|
|
@@ -521,7 +521,7 @@ function Qs() {
|
|
|
521
521
|
return ds(f, R, pe, H, T, Ve.current, O);
|
|
522
522
|
}
|
|
523
523
|
}
|
|
524
|
-
var
|
|
524
|
+
var Nt = y.ReactCurrentOwner, ln = y.ReactDebugCurrentFrame;
|
|
525
525
|
function Ie(f) {
|
|
526
526
|
if (f) {
|
|
527
527
|
var j = f._owner, S = ie(f.type, f._source, j ? j.type : null);
|
|
@@ -529,15 +529,15 @@ function Qs() {
|
|
|
529
529
|
} else
|
|
530
530
|
ln.setExtraStackFrame(null);
|
|
531
531
|
}
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
function
|
|
532
|
+
var Ct;
|
|
533
|
+
Ct = !1;
|
|
534
|
+
function Pt(f) {
|
|
535
535
|
return typeof f == "object" && f !== null && f.$$typeof === t;
|
|
536
536
|
}
|
|
537
537
|
function dn() {
|
|
538
538
|
{
|
|
539
|
-
if (
|
|
540
|
-
var f = k(
|
|
539
|
+
if (Nt.current) {
|
|
540
|
+
var f = k(Nt.current.type);
|
|
541
541
|
if (f)
|
|
542
542
|
return `
|
|
543
543
|
|
|
@@ -580,7 +580,7 @@ Check the top-level render call using <` + S + ">.");
|
|
|
580
580
|
return;
|
|
581
581
|
un[S] = !0;
|
|
582
582
|
var T = "";
|
|
583
|
-
f && f._owner && f._owner !==
|
|
583
|
+
f && f._owner && f._owner !== Nt.current && (T = " It was passed a child from " + k(f._owner.type) + "."), Ie(f), x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', S, T), Ie(null);
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
586
|
function fn(f, j) {
|
|
@@ -590,15 +590,15 @@ Check the top-level render call using <` + S + ">.");
|
|
|
590
590
|
if (Ee(f))
|
|
591
591
|
for (var S = 0; S < f.length; S++) {
|
|
592
592
|
var T = f[S];
|
|
593
|
-
|
|
593
|
+
Pt(T) && mn(T, j);
|
|
594
594
|
}
|
|
595
|
-
else if (
|
|
595
|
+
else if (Pt(f))
|
|
596
596
|
f._store && (f._store.validated = !0);
|
|
597
597
|
else if (f) {
|
|
598
598
|
var H = w(f);
|
|
599
599
|
if (typeof H == "function" && H !== f.entries)
|
|
600
600
|
for (var W = H.call(f), O; !(O = W.next()).done; )
|
|
601
|
-
|
|
601
|
+
Pt(O.value) && mn(O.value, j);
|
|
602
602
|
}
|
|
603
603
|
}
|
|
604
604
|
}
|
|
@@ -619,8 +619,8 @@ Check the top-level render call using <` + S + ">.");
|
|
|
619
619
|
if (S) {
|
|
620
620
|
var T = k(j);
|
|
621
621
|
et(S, f.props, "prop", T, f);
|
|
622
|
-
} else if (j.PropTypes !== void 0 && !
|
|
623
|
-
|
|
622
|
+
} else if (j.PropTypes !== void 0 && !Ct) {
|
|
623
|
+
Ct = !0;
|
|
624
624
|
var H = k(j);
|
|
625
625
|
x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", H || "Unknown");
|
|
626
626
|
}
|
|
@@ -679,8 +679,8 @@ Check the top-level render call using <` + S + ">.");
|
|
|
679
679
|
Ge.Fragment = r, Ge.jsx = xs, Ge.jsxs = bs;
|
|
680
680
|
}()), Ge;
|
|
681
681
|
}
|
|
682
|
-
process.env.NODE_ENV === "production" ?
|
|
683
|
-
var s =
|
|
682
|
+
process.env.NODE_ENV === "production" ? Jt.exports = Hs() : Jt.exports = Qs();
|
|
683
|
+
var s = Jt.exports;
|
|
684
684
|
const Us = () => {
|
|
685
685
|
const [e, t] = A(window.location.pathname), n = () => {
|
|
686
686
|
const r = window.location.pathname;
|
|
@@ -755,14 +755,14 @@ function An(e, t, n) {
|
|
|
755
755
|
var r = n === void 0 ? {} : n, o = r.leading, i = r.trailing;
|
|
756
756
|
return Ws(e, t, { maxWait: t, leading: o === void 0 || o, trailing: i === void 0 || i });
|
|
757
757
|
}
|
|
758
|
-
let
|
|
758
|
+
let Dt;
|
|
759
759
|
const kt = (e = !0, t = !1, n = "window") => {
|
|
760
760
|
if (!e)
|
|
761
761
|
return;
|
|
762
762
|
const [r, o] = P.useState(0) || [!1, () => {
|
|
763
763
|
}];
|
|
764
764
|
Y(() => (a(), window.addEventListener("resize", u), () => {
|
|
765
|
-
clearTimeout(
|
|
765
|
+
clearTimeout(Dt), u.flush(), window.removeEventListener("resize", u);
|
|
766
766
|
}), n === "window" ? [] : [n]);
|
|
767
767
|
const l = () => {
|
|
768
768
|
if (n)
|
|
@@ -771,7 +771,7 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
771
771
|
o(l());
|
|
772
772
|
}, u = An(
|
|
773
773
|
() => {
|
|
774
|
-
l() !== r && (t && (clearTimeout(
|
|
774
|
+
l() !== r && (t && (clearTimeout(Dt), document.body.classList.add("is-resizing"), Dt = setTimeout(() => {
|
|
775
775
|
document.body.classList.remove("is-resizing");
|
|
776
776
|
}, 550)), a());
|
|
777
777
|
},
|
|
@@ -839,7 +839,7 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
839
839
|
day: "numeric",
|
|
840
840
|
month: "short",
|
|
841
841
|
year: "numeric"
|
|
842
|
-
}),
|
|
842
|
+
}), qt = (e) => {
|
|
843
843
|
let i;
|
|
844
844
|
const l = xn(), a = xn(new Date(e));
|
|
845
845
|
try {
|
|
@@ -857,7 +857,7 @@ const kt = (e = !0, t = !1, n = "window") => {
|
|
|
857
857
|
}, xn = (e) => {
|
|
858
858
|
const n = (e || /* @__PURE__ */ new Date()).toUTCString();
|
|
859
859
|
return new Date(n);
|
|
860
|
-
},
|
|
860
|
+
}, tn = {
|
|
861
861
|
apolitical: "Apolitical",
|
|
862
862
|
breadcrumbs_label: "Go back to:",
|
|
863
863
|
breadcrumbs_currentPage: "Current page:",
|
|
@@ -1195,11 +1195,11 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1195
1195
|
languageSwitcher_disclaimer: "Este conteúdo foi traduzido automaticamente e, ocasionalmente, poderão ocorrer erros de linguagem de gênero ou outras traduções diretas. Estamos tentando resolver isso, porém se perceber algo errado por favor nos avise em <link>{email}</link>"
|
|
1196
1196
|
}, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1197
1197
|
__proto__: null,
|
|
1198
|
-
en,
|
|
1198
|
+
en: tn,
|
|
1199
1199
|
es: Js,
|
|
1200
1200
|
fr: qs,
|
|
1201
1201
|
pt: Xs
|
|
1202
|
-
}, Symbol.toStringTag, { value: "Module" })), On = (e) => e in
|
|
1202
|
+
}, Symbol.toStringTag, { value: "Module" })), On = (e) => e in tn, $e = (e, t, n, r, o = {}) => {
|
|
1203
1203
|
let i = "";
|
|
1204
1204
|
return On(`${t}_${n}`) ? i = e({ id: `${t}_${n}` }, o) : i = e({ id: t }, { [r]: n, ...o }), i;
|
|
1205
1205
|
}, Ks = (e, t, n) => {
|
|
@@ -1410,7 +1410,7 @@ const Ue = ({ className: e = "", maxWidth: t = !1 }) => {
|
|
|
1410
1410
|
}, ar = ({ format: e, height: t, query: n, width: r }) => {
|
|
1411
1411
|
let o = `w=${r}&h=${t}`;
|
|
1412
1412
|
return o = e ? `${o}&fm=${e}` : o, o = n ? `${o}&${n}` : o, o;
|
|
1413
|
-
},
|
|
1413
|
+
}, Rt = ({ format: e, range: t, url: n, query: r }) => t.map(({ height: o, width: i }) => `${n}?${ar({
|
|
1414
1414
|
format: e,
|
|
1415
1415
|
height: o,
|
|
1416
1416
|
query: r,
|
|
@@ -1427,7 +1427,7 @@ const Bn = ({ image: e, className: t, testId: n }) => {
|
|
|
1427
1427
|
loading: c,
|
|
1428
1428
|
decoding: m,
|
|
1429
1429
|
fetchPriority: d
|
|
1430
|
-
} = e, { range: p, sizes: h } = rr(e), g =
|
|
1430
|
+
} = e, { range: p, sizes: h } = rr(e), g = Rt({ format: "avif", query: l, range: p, url: a }), v = Rt({ format: "webp", query: l, range: p, url: a }), w = Rt({ format: "", query: l, range: p, url: a });
|
|
1431
1431
|
return /* @__PURE__ */ s.jsxs("picture", { className: t, children: [
|
|
1432
1432
|
i !== "image/gif" && /* @__PURE__ */ s.jsx(
|
|
1433
1433
|
"source",
|
|
@@ -1485,7 +1485,7 @@ const or = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
|
|
|
1485
1485
|
}, 300);
|
|
1486
1486
|
}, [e]), /* @__PURE__ */ s.jsx("aside", { ref: o, className: E("tooltip text-medium", i, { loading: t }), hidden: i === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
|
|
1487
1487
|
};
|
|
1488
|
-
const
|
|
1488
|
+
const Et = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: E("full-width-section", t), ...n, children: e });
|
|
1489
1489
|
const eo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
1490
1490
|
const r = [];
|
|
1491
1491
|
return t.forEach((o) => {
|
|
@@ -1499,7 +1499,7 @@ const eo = ({ text: e, buttons: t, className: n = "" }) => {
|
|
|
1499
1499
|
target: "_blank",
|
|
1500
1500
|
children: o.text
|
|
1501
1501
|
});
|
|
1502
|
-
}), /* @__PURE__ */ s.jsx(
|
|
1502
|
+
}), /* @__PURE__ */ s.jsx(Et, { className: E("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
1503
1503
|
P.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
|
|
1504
1504
|
/* @__PURE__ */ s.jsx(jt, { buttons: r })
|
|
1505
1505
|
] }) });
|
|
@@ -1605,7 +1605,7 @@ const ir = [
|
|
|
1605
1605
|
const p = document.getElementById(l.link.substring(1));
|
|
1606
1606
|
p && p.scrollIntoView({ behavior: "smooth" });
|
|
1607
1607
|
}), /* @__PURE__ */ s.jsx(
|
|
1608
|
-
|
|
1608
|
+
Et,
|
|
1609
1609
|
{
|
|
1610
1610
|
className: E("banner-section", r, o, e, {
|
|
1611
1611
|
"has-image": n,
|
|
@@ -1667,7 +1667,7 @@ const Hn = ({ label: e = !1, className: t = "", children: n }) => {
|
|
|
1667
1667
|
] });
|
|
1668
1668
|
};
|
|
1669
1669
|
const Re = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: E("highlighted-text-box", e, t), ...r, children: n });
|
|
1670
|
-
const
|
|
1670
|
+
const St = ({
|
|
1671
1671
|
variant: e = "empty",
|
|
1672
1672
|
text: t = !1,
|
|
1673
1673
|
button: n = !1,
|
|
@@ -1704,9 +1704,9 @@ const Et = ({
|
|
|
1704
1704
|
}
|
|
1705
1705
|
);
|
|
1706
1706
|
};
|
|
1707
|
-
const
|
|
1707
|
+
const Xt = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), Qn = { q: Xt, blockquote: Xt };
|
|
1708
1708
|
for (let e = 1; e <= 6; e++)
|
|
1709
|
-
Qn[`h${e}`] = { component:
|
|
1709
|
+
Qn[`h${e}`] = { component: Xt, props: { className: "title" } };
|
|
1710
1710
|
const lr = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: E("helper-text-box text-small", e, t), children: [
|
|
1711
1711
|
n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
|
|
1712
1712
|
typeof r == "string" ? /* @__PURE__ */ s.jsx(
|
|
@@ -1770,11 +1770,11 @@ const ao = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1770
1770
|
return null;
|
|
1771
1771
|
let n = t.formatMessage({ id: "markdown_collapsibleSection_summary" });
|
|
1772
1772
|
const r = [];
|
|
1773
|
-
for (const i of
|
|
1773
|
+
for (const i of Yt.toArray(e))
|
|
1774
1774
|
if (!(!i || typeof i == "string" || typeof i == "number"))
|
|
1775
1775
|
if (P.isValidElement(i) && i.type === "summary") {
|
|
1776
1776
|
if (i.props && i.props.children) {
|
|
1777
|
-
for (const l of
|
|
1777
|
+
for (const l of Yt.toArray(i.props.children))
|
|
1778
1778
|
if (!(!l || typeof l == "string" || typeof l == "number") && P.isValidElement(l)) {
|
|
1779
1779
|
const a = l.type;
|
|
1780
1780
|
if (mr.includes(a)) {
|
|
@@ -1825,7 +1825,7 @@ const ao = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
|
|
|
1825
1825
|
let n = { ...t };
|
|
1826
1826
|
t.href && (t.href.includes("http:") || t.href.includes("https:")) && !t.target && (n.target = "_blank");
|
|
1827
1827
|
let r = e, o = !1;
|
|
1828
|
-
for (const i of
|
|
1828
|
+
for (const i of Yt.toArray(e))
|
|
1829
1829
|
if (!(!i || typeof i == "string" || typeof i == "number") && P.isValidElement(i)) {
|
|
1830
1830
|
const l = i.type;
|
|
1831
1831
|
if (["button", "center", "span", "strong"].includes(l) && i.props && i.props.children && i.props.children[0])
|
|
@@ -1886,17 +1886,17 @@ const ft = ({
|
|
|
1886
1886
|
children: r,
|
|
1887
1887
|
...o
|
|
1888
1888
|
}) => /* @__PURE__ */ s.jsx("span", { className: E("pill", e, t, n), ...o, children: r });
|
|
1889
|
-
const
|
|
1889
|
+
const Zt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => P.createElement(e, { ...r, className: E("status-banner text-small", n), "aria-live": "assertive" }, t);
|
|
1890
1890
|
const br = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
|
|
1891
1891
|
const r = C(), o = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, i = { "--progress": `${e}%` };
|
|
1892
1892
|
return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${o}`, n), style: i, children: /* @__PURE__ */ s.jsx(me, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
|
|
1893
1893
|
}, vr = We(br);
|
|
1894
|
-
const
|
|
1894
|
+
const At = "loadingBlock_", wr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
|
|
1895
1895
|
const r = C();
|
|
1896
1896
|
t || (t = {
|
|
1897
|
-
0: { text: r.formatMessage({ id: `${
|
|
1898
|
-
75: { text: r.formatMessage({ id: `${
|
|
1899
|
-
100: { text: r.formatMessage({ id: `${
|
|
1897
|
+
0: { text: r.formatMessage({ id: `${At}loading` }) },
|
|
1898
|
+
75: { text: r.formatMessage({ id: `${At}almostDone` }) },
|
|
1899
|
+
100: { text: r.formatMessage({ id: `${At}complete` }) }
|
|
1900
1900
|
});
|
|
1901
1901
|
let o = null;
|
|
1902
1902
|
const i = Object.keys(t);
|
|
@@ -1917,7 +1917,7 @@ const Rt = "loadingBlock_", wr = ({ progress: e = 0, steps: t = !1, className: n
|
|
|
1917
1917
|
);
|
|
1918
1918
|
}, oo = We(wr);
|
|
1919
1919
|
const Te = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(Rn, { element: e, className: E("loading-placeholder", t), ...n });
|
|
1920
|
-
const
|
|
1920
|
+
const Kt = {
|
|
1921
1921
|
header: ["logo", "link", "link", "search"],
|
|
1922
1922
|
sidebar: ["text", "text", "text", "text", "text"],
|
|
1923
1923
|
"cards-section": ["subtitle", "cards"],
|
|
@@ -1934,7 +1934,7 @@ const Zt = {
|
|
|
1934
1934
|
"cards-section",
|
|
1935
1935
|
"footer"
|
|
1936
1936
|
]
|
|
1937
|
-
}, Un = (e, t) => e in
|
|
1937
|
+
}, Un = (e, t) => e in Kt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Kt[e].map((n, r) => Un(n, r)) }, t) : /* @__PURE__ */ s.jsx(Te, { className: e }, t), io = ({ layout: e = "overview-page", ...t }) => /* @__PURE__ */ s.jsx("div", { className: E("loading-state", e), ...t, children: Kt[e].map((n, r) => Un(n, r)) }), Wn = (e) => {
|
|
1938
1938
|
const t = e && e.toUpperCase().split(" ");
|
|
1939
1939
|
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) : "";
|
|
1940
1940
|
}, st = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], kr = (e) => {
|
|
@@ -2020,7 +2020,7 @@ const nn = ({
|
|
|
2020
2020
|
}) => {
|
|
2021
2021
|
const l = C(), a = zn(t);
|
|
2022
2022
|
a.name || (a.name = l.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
|
|
2023
|
-
const { name: u, url: c, image: m } = a, d = jr(a), p = n && n.createdAt ?
|
|
2023
|
+
const { name: u, url: c, image: m } = a, d = jr(a), p = n && n.createdAt ? qt(n.createdAt) : !1, h = n && n.createdAt ? In(n.createdAt) : "";
|
|
2024
2024
|
return P.createElement(e, {
|
|
2025
2025
|
className: E("member text-medium", i),
|
|
2026
2026
|
children: /* @__PURE__ */ s.jsxs(
|
|
@@ -2118,7 +2118,7 @@ const jn = {
|
|
|
2118
2118
|
e && /* @__PURE__ */ s.jsx(Ns, { initialIsOpen: !1 })
|
|
2119
2119
|
] });
|
|
2120
2120
|
};
|
|
2121
|
-
var Er =
|
|
2121
|
+
var Er = en({ client: dt });
|
|
2122
2122
|
function Sr(e) {
|
|
2123
2123
|
var t = e.children, n = e.client, r = e.apiKey, o = e.options, i = bt(function() {
|
|
2124
2124
|
return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && o && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (dt.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), dt.init(r, o)), dt);
|
|
@@ -2148,7 +2148,7 @@ const $r = ({ children: e, user: t }) => t.isLoading ? null : process.env.REACT_
|
|
|
2148
2148
|
...n || {}
|
|
2149
2149
|
};
|
|
2150
2150
|
return /* @__PURE__ */ s.jsx(ys, { locale: r, messages: o, children: e });
|
|
2151
|
-
}, Se =
|
|
2151
|
+
}, Se = en({ isLoading: !0 });
|
|
2152
2152
|
function Mr() {
|
|
2153
2153
|
return we(Se);
|
|
2154
2154
|
}
|
|
@@ -2160,7 +2160,7 @@ const Nr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { va
|
|
|
2160
2160
|
}).catch(() => o({ isLoading: !1 }));
|
|
2161
2161
|
}, []), /* @__PURE__ */ s.jsx(Tr, { locale: n == null ? void 0 : n.locale, messages: n == null ? void 0 : n.messages, children: /* @__PURE__ */ s.jsx(Cs, { children: /* @__PURE__ */ s.jsx(Nr, { user: r, children: /* @__PURE__ */ s.jsx(yr, { children: /* @__PURE__ */ s.jsx($r, { user: r, children: t }) }) }) }) });
|
|
2162
2162
|
};
|
|
2163
|
-
const
|
|
2163
|
+
const Ft = "joinCommunityButton", Yn = ({ isMember: e = !1, isShort: t = !1, functions: { join: n, leave: r } = { join: () => {
|
|
2164
2164
|
}, leave: () => {
|
|
2165
2165
|
} } }) => {
|
|
2166
2166
|
const o = C(), i = we(Se), l = i && typeof i.id == "string", [a, u] = A(e), [c, m] = A(e ? "joined" : "notJoined");
|
|
@@ -2168,7 +2168,7 @@ const At = "joinCommunityButton", Yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2168
2168
|
c === "joining" ? m("joined") : c === "leaving" && m("notJoined");
|
|
2169
2169
|
}, [a]);
|
|
2170
2170
|
const d = {}, p = {};
|
|
2171
|
-
return a && c !== "leaving" && (d["data-hover-text"] = o.formatMessage({ id: `${
|
|
2171
|
+
return a && c !== "leaving" && (d["data-hover-text"] = o.formatMessage({ id: `${Ft}_leave` }), d["aria-label"] = o.formatMessage({ id: `${Ft}_member_aria` }), p["aria-hidden"] = "true"), /* @__PURE__ */ s.jsx(
|
|
2172
2172
|
U,
|
|
2173
2173
|
{
|
|
2174
2174
|
variant: a ? "secondary" : "primary",
|
|
@@ -2181,11 +2181,11 @@ const At = "joinCommunityButton", Yn = ({ isMember: e = !1, isShort: t = !1, fun
|
|
|
2181
2181
|
className: E("join-community-button", c, { active: c === "joining" }),
|
|
2182
2182
|
disabled: !l,
|
|
2183
2183
|
...d,
|
|
2184
|
-
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${
|
|
2184
|
+
children: /* @__PURE__ */ s.jsx("span", { className: "text", ...p, children: o.formatMessage({ id: `${Ft}${["joining", "leaving"].includes(c) ? `_${c}` : a ? "_member" : t ? "_short" : ""}` }) })
|
|
2185
2185
|
}
|
|
2186
2186
|
);
|
|
2187
2187
|
};
|
|
2188
|
-
const
|
|
2188
|
+
const Lt = "communityDetails_", lo = ({
|
|
2189
2189
|
className: e = "",
|
|
2190
2190
|
isMember: t = !1,
|
|
2191
2191
|
slug: n,
|
|
@@ -2198,10 +2198,10 @@ const Ft = "communityDetails_", lo = ({
|
|
|
2198
2198
|
/* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
|
|
2199
2199
|
/* @__PURE__ */ s.jsxs("div", { className: "top", children: [
|
|
2200
2200
|
/* @__PURE__ */ s.jsxs("h3", { children: [
|
|
2201
|
-
a.formatMessage({ id: `${
|
|
2201
|
+
a.formatMessage({ id: `${Lt}members` }),
|
|
2202
2202
|
/* @__PURE__ */ s.jsx("span", { className: "count", children: c })
|
|
2203
2203
|
] }),
|
|
2204
|
-
!d && /* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${
|
|
2204
|
+
!d && /* @__PURE__ */ s.jsx("p", { className: "text-small", children: /* @__PURE__ */ s.jsx("a", { href: `/communities/${n}/members`, children: a.formatMessage({ id: `${Lt}viewAll` }) }) })
|
|
2205
2205
|
] }),
|
|
2206
2206
|
/* @__PURE__ */ s.jsx(
|
|
2207
2207
|
Vn,
|
|
@@ -2227,7 +2227,7 @@ const Ft = "communityDetails_", lo = ({
|
|
|
2227
2227
|
onClick: i,
|
|
2228
2228
|
icon: { icon: "plus" },
|
|
2229
2229
|
styling: { fullWidth: !0 },
|
|
2230
|
-
children: a.formatMessage({ id: `${
|
|
2230
|
+
children: a.formatMessage({ id: `${Lt}invite` })
|
|
2231
2231
|
}
|
|
2232
2232
|
)
|
|
2233
2233
|
] });
|
|
@@ -2282,7 +2282,7 @@ const mo = ({
|
|
|
2282
2282
|
i === "before-lang" ? r += `/${o}` : (r.includes(`/${n}/`) || (r += `/${n}`), r += `/${o}`);
|
|
2283
2283
|
}), r.includes(`/${n}/`) || (r += `/${n}`), r;
|
|
2284
2284
|
};
|
|
2285
|
-
const
|
|
2285
|
+
const It = { en: "English", es: "Español", fr: "Français", pt: "Português" }, rt = "languageSwitcher_", fo = ({
|
|
2286
2286
|
currentLanguage: e,
|
|
2287
2287
|
isOriginalLanguage: t = !1,
|
|
2288
2288
|
isHumanTranslation: n = !1,
|
|
@@ -2304,16 +2304,16 @@ const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2304
2304
|
/* @__PURE__ */ s.jsxs("nav", { children: [
|
|
2305
2305
|
l !== "short" && /* @__PURE__ */ s.jsx("p", { children: a || c.formatMessage({ id: `${rt}label` }) }),
|
|
2306
2306
|
/* @__PURE__ */ s.jsx("ul", { children: h.map((v) => {
|
|
2307
|
-
if (!
|
|
2307
|
+
if (!It[v])
|
|
2308
2308
|
return null;
|
|
2309
2309
|
let w = { className: v };
|
|
2310
|
-
return m === v ? w["aria-label"] = c.formatMessage({ id: `${rt}selected` }, { language:
|
|
2310
|
+
return m === v ? w["aria-label"] = c.formatMessage({ id: `${rt}selected` }, { language: It[v] }) : w = {
|
|
2311
2311
|
...w,
|
|
2312
2312
|
href: Cr(v, i),
|
|
2313
2313
|
onClick: (y) => {
|
|
2314
2314
|
y.preventDefault(), y.stopPropagation(), d(v), o(v);
|
|
2315
2315
|
}
|
|
2316
|
-
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(yt, { ...w, fallbackElement: "span", children:
|
|
2316
|
+
}, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(yt, { ...w, fallbackElement: "span", children: It[v] }) }, v);
|
|
2317
2317
|
}) }),
|
|
2318
2318
|
l !== "short" && !g && /* @__PURE__ */ s.jsx("p", { children: c.formatMessage({ id: `${rt}translation_${t ? "original" : n ? "human" : "machine"}` }) })
|
|
2319
2319
|
] }),
|
|
@@ -2331,15 +2331,15 @@ const Lt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
|
|
|
2331
2331
|
})
|
|
2332
2332
|
] });
|
|
2333
2333
|
};
|
|
2334
|
-
const
|
|
2334
|
+
const Ot = Es({ locale: "en", messages: tn }), Gn = ({
|
|
2335
2335
|
hasNextPage: e = !0,
|
|
2336
2336
|
loadNextPage: t = () => {
|
|
2337
2337
|
},
|
|
2338
2338
|
icon: n = !1,
|
|
2339
2339
|
messages: r = {
|
|
2340
|
-
button:
|
|
2341
|
-
endOfFeed:
|
|
2342
|
-
error:
|
|
2340
|
+
button: Ot.formatMessage({ id: "loadMore_button" }),
|
|
2341
|
+
endOfFeed: Ot.formatMessage({ id: "loadMore_endOfFeed" }),
|
|
2342
|
+
error: Ot.formatMessage({ id: "loadMore_error" })
|
|
2343
2343
|
},
|
|
2344
2344
|
className: o = "",
|
|
2345
2345
|
gtmContext: i = "LoadMore"
|
|
@@ -2625,28 +2625,28 @@ const Ir = {
|
|
|
2625
2625
|
const o = kt(!0);
|
|
2626
2626
|
let i = r;
|
|
2627
2627
|
return P.Children.count(r) === 1 && (i = P.Children.toArray(r)[0], i.props && (i = i.props.children)), /* @__PURE__ */ s.jsx("section", { className: E("columns", `layout-${e}`, n), children: P.Children.map(i, (l, a) => t !== !1 && a === t && o && o < Ir[e] ? null : l) });
|
|
2628
|
-
}, go = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Or, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2628
|
+
}, go = ({ activeLink: e, ...t }) => /* @__PURE__ */ s.jsx(Et, { children: /* @__PURE__ */ s.jsx(Or, { layout: "1-3", children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
2629
2629
|
/* @__PURE__ */ s.jsx(Ar, { activeLink: e }),
|
|
2630
2630
|
/* @__PURE__ */ s.jsx(xr, { ...t })
|
|
2631
|
-
] }) });
|
|
2632
|
-
const
|
|
2633
|
-
const e = C(), [t, n, r] = Ps(
|
|
2634
|
-
|
|
2631
|
+
] }) }) });
|
|
2632
|
+
const Bt = "cookieBanner_", Ht = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], Qt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), Br = () => {
|
|
2633
|
+
const e = C(), [t, n, r] = Ps(Ht), [o, i] = A(!t["apol-cookie-banner"]), l = () => {
|
|
2634
|
+
Ht.forEach((m) => {
|
|
2635
2635
|
n(m, !0, {
|
|
2636
2636
|
path: "/",
|
|
2637
|
-
expires:
|
|
2637
|
+
expires: Qt,
|
|
2638
2638
|
domain: m === "apolitical-performance-cookie-consent" ? ".apolitical.co" : void 0
|
|
2639
2639
|
});
|
|
2640
2640
|
}), i(!1), window.location.reload();
|
|
2641
2641
|
}, a = () => {
|
|
2642
2642
|
n("apol-cookie-banner", !0, {
|
|
2643
2643
|
path: "/",
|
|
2644
|
-
expires:
|
|
2645
|
-
}),
|
|
2644
|
+
expires: Qt
|
|
2645
|
+
}), Ht.forEach((m) => {
|
|
2646
2646
|
if (m === "apol-cookie-banner") {
|
|
2647
2647
|
n(m, !0, {
|
|
2648
2648
|
path: "/",
|
|
2649
|
-
expires:
|
|
2649
|
+
expires: Qt
|
|
2650
2650
|
});
|
|
2651
2651
|
return;
|
|
2652
2652
|
}
|
|
@@ -2668,11 +2668,11 @@ const Ot = "cookieBanner_", Bt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2668
2668
|
className: "gtm-trackable",
|
|
2669
2669
|
"data-gtm-event-context": "cookie-banner",
|
|
2670
2670
|
"data-gtm-event-type": `cookie-${m.gtmType}-click`,
|
|
2671
|
-
children: e.formatMessage({ id: `${
|
|
2671
|
+
children: e.formatMessage({ id: `${Bt}buttons_${m.id}` })
|
|
2672
2672
|
});
|
|
2673
2673
|
}), /* @__PURE__ */ s.jsxs("aside", { id: "cookie-banner", className: "text-medium", children: [
|
|
2674
|
-
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${
|
|
2675
|
-
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${
|
|
2674
|
+
/* @__PURE__ */ s.jsx("h6", { children: e.formatMessage({ id: `${Bt}title` }) }),
|
|
2675
|
+
/* @__PURE__ */ s.jsx("p", { children: e.formatMessage({ id: `${Bt}text` }) }),
|
|
2676
2676
|
/* @__PURE__ */ s.jsx(jt, { buttons: c })
|
|
2677
2677
|
] });
|
|
2678
2678
|
}, Ce = {
|
|
@@ -2772,7 +2772,7 @@ const Ot = "cookieBanner_", Bt = ["apol-cookie-banner", "apolitical-performance-
|
|
|
2772
2772
|
const Be = "footer_", ht = "SiteFooter", yn = ({ group: e }) => {
|
|
2773
2773
|
const t = Ce[e].order || [];
|
|
2774
2774
|
let n = !1;
|
|
2775
|
-
return "text" in Ce[e] && (n = Ce[e].text), /* @__PURE__ */ s.jsxs(
|
|
2775
|
+
return "text" in Ce[e] && (n = Ce[e].text), /* @__PURE__ */ s.jsxs(Gt, { children: [
|
|
2776
2776
|
/* @__PURE__ */ s.jsx("p", { className: "pre-title", children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}` }) }),
|
|
2777
2777
|
Array.isArray(t) && t.length > 0 && /* @__PURE__ */ s.jsx("ul", { className: "text-medium", children: t.map((r) => {
|
|
2778
2778
|
if (["order", "child", "text"].includes(r))
|
|
@@ -2790,7 +2790,7 @@ const Be = "footer_", ht = "SiteFooter", yn = ({ group: e }) => {
|
|
|
2790
2790
|
}
|
|
2791
2791
|
) }, `${e}_${r}`);
|
|
2792
2792
|
}) }),
|
|
2793
|
-
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(
|
|
2793
|
+
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ s.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ s.jsxs(Gt, { children: [
|
|
2794
2794
|
/* @__PURE__ */ s.jsx("dt", { children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}_${r}` }) }),
|
|
2795
2795
|
/* @__PURE__ */ s.jsxs("dd", { children: [
|
|
2796
2796
|
typeof n != "boolean" && n[r].address && /* @__PURE__ */ s.jsx("address", { children: /* @__PURE__ */ s.jsx(De, { id: `${Be}${e}_${r}_address`, values: { br: /* @__PURE__ */ s.jsx("br", {}) } }) }),
|
|
@@ -3685,7 +3685,7 @@ const ns = ({
|
|
|
3685
3685
|
/* @__PURE__ */ s.jsx(Ue, {}),
|
|
3686
3686
|
/* @__PURE__ */ s.jsx(jt, { buttons: c })
|
|
3687
3687
|
] }),
|
|
3688
|
-
l && /* @__PURE__ */ s.jsx(
|
|
3688
|
+
l && /* @__PURE__ */ s.jsx(Zt, { className: "error", children: l })
|
|
3689
3689
|
] })
|
|
3690
3690
|
}
|
|
3691
3691
|
) });
|
|
@@ -3733,7 +3733,7 @@ const Yr = () => {
|
|
|
3733
3733
|
return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
3734
3734
|
/* @__PURE__ */ s.jsx(es, {}),
|
|
3735
3735
|
/* @__PURE__ */ s.jsx("div", { id: "content", children: /* @__PURE__ */ s.jsx(
|
|
3736
|
-
|
|
3736
|
+
St,
|
|
3737
3737
|
{
|
|
3738
3738
|
variant: "error",
|
|
3739
3739
|
text: e.formatMessage({ id: "pageLayout_error" })
|
|
@@ -3782,7 +3782,7 @@ const Yr = () => {
|
|
|
3782
3782
|
}, En = {
|
|
3783
3783
|
default: "tags_",
|
|
3784
3784
|
headerTopics: "header_topics_topics_"
|
|
3785
|
-
},
|
|
3785
|
+
}, Ut = {
|
|
3786
3786
|
topic: {
|
|
3787
3787
|
Climate: "climate",
|
|
3788
3788
|
CitiesAndLocalGovernment: "cities-and-local-government",
|
|
@@ -3801,13 +3801,13 @@ const Yr = () => {
|
|
|
3801
3801
|
}, Jr = {
|
|
3802
3802
|
getTagDetails: (e) => {
|
|
3803
3803
|
if (e.includes("topic_")) {
|
|
3804
|
-
if (e =
|
|
3804
|
+
if (e = Ut.topic[e.replace("topic_", "")], e) {
|
|
3805
3805
|
const t = pt.topics.topics[e].href;
|
|
3806
3806
|
return t ? { id: e, href: t, text: `${En.headerTopics}${e}` } : null;
|
|
3807
3807
|
}
|
|
3808
3808
|
return null;
|
|
3809
3809
|
}
|
|
3810
|
-
return
|
|
3810
|
+
return Ut[e] ? (e = Ut[e], { id: e, text: `${En.default}${e}` }) : null;
|
|
3811
3811
|
}
|
|
3812
3812
|
};
|
|
3813
3813
|
const wo = ({
|
|
@@ -4078,8 +4078,8 @@ const ge = "discussion_form_", ss = ({
|
|
|
4078
4078
|
)
|
|
4079
4079
|
}) }),
|
|
4080
4080
|
/* @__PURE__ */ s.jsx(jt, { buttons: B }),
|
|
4081
|
-
v === "submitted" && /* @__PURE__ */ s.jsx(
|
|
4082
|
-
h && /* @__PURE__ */ s.jsx(
|
|
4081
|
+
v === "submitted" && /* @__PURE__ */ s.jsx(Zt, { className: "success", "data-testid": "success", children: $e(c.formatMessage, `${ge}success`, e.type, "action") }),
|
|
4082
|
+
h && /* @__PURE__ */ s.jsx(Zt, { id: "error-message", className: "error", "data-testid": "error", children: l.error ? l.error : typeof h == "string" ? h.includes(" ") ? h : c.formatMessage(
|
|
4083
4083
|
{ id: h },
|
|
4084
4084
|
{
|
|
4085
4085
|
action: c.formatMessage({
|
|
@@ -4096,7 +4096,7 @@ const ge = "discussion_form_", ss = ({
|
|
|
4096
4096
|
createPost: t,
|
|
4097
4097
|
membershipRequiredToPost: { isMember: n, required: r, join: o, leave: i, notMemberStateText: l }
|
|
4098
4098
|
}) => r && !n ? /* @__PURE__ */ s.jsx(
|
|
4099
|
-
|
|
4099
|
+
St,
|
|
4100
4100
|
{
|
|
4101
4101
|
text: l,
|
|
4102
4102
|
button: {
|
|
@@ -4115,12 +4115,12 @@ const ge = "discussion_form_", ss = ({
|
|
|
4115
4115
|
), qr = {
|
|
4116
4116
|
showThread: !1,
|
|
4117
4117
|
showForm: !1
|
|
4118
|
-
},
|
|
4118
|
+
}, $t = en(qr), Xr = ({ children: e }) => {
|
|
4119
4119
|
const [t, n] = A({
|
|
4120
4120
|
showThread: !1,
|
|
4121
4121
|
showForm: !1
|
|
4122
4122
|
});
|
|
4123
|
-
return /* @__PURE__ */ s.jsx(
|
|
4123
|
+
return /* @__PURE__ */ s.jsx($t.Provider, { value: { ...t, updateConversation: n }, children: e });
|
|
4124
4124
|
}, Zr = ({
|
|
4125
4125
|
question: e,
|
|
4126
4126
|
answer: t,
|
|
@@ -4131,9 +4131,9 @@ const ge = "discussion_form_", ss = ({
|
|
|
4131
4131
|
...n && { replySlug: n }
|
|
4132
4132
|
}), Kr = (e, t = 10) => !e || e.length === 0 ? [] : e.slice(0, t);
|
|
4133
4133
|
let Ze = !1;
|
|
4134
|
-
const
|
|
4134
|
+
const Wt = () => {
|
|
4135
4135
|
Ze !== !1 && (clearTimeout(Ze), Ze = !1);
|
|
4136
|
-
},
|
|
4136
|
+
}, zt = 5, ea = ({
|
|
4137
4137
|
element: e = "div",
|
|
4138
4138
|
likes: t = 0,
|
|
4139
4139
|
peopleWhoLiked: n = !1,
|
|
@@ -4149,14 +4149,14 @@ const Ut = () => {
|
|
|
4149
4149
|
Y(() => {
|
|
4150
4150
|
h(o);
|
|
4151
4151
|
}, [o]);
|
|
4152
|
-
const [m, d] = A(t), [p, h] = A(o), [g, v] = A(!1), [w, y] = A(!1), x = bt(() => Kr(n,
|
|
4152
|
+
const [m, d] = A(t), [p, h] = A(o), [g, v] = A(!1), [w, y] = A(!1), x = bt(() => Kr(n, zt), [n]), _ = (N) => {
|
|
4153
4153
|
if (N.preventDefault(), N.stopPropagation(), y(!1), Ze)
|
|
4154
|
-
return
|
|
4155
|
-
if (
|
|
4154
|
+
return Wt(), !1;
|
|
4155
|
+
if (Wt(), g || !l)
|
|
4156
4156
|
return !1;
|
|
4157
4157
|
Ze = setTimeout($, 350);
|
|
4158
4158
|
}, $ = async () => {
|
|
4159
|
-
if (
|
|
4159
|
+
if (Wt(), g || !l)
|
|
4160
4160
|
return !1;
|
|
4161
4161
|
let N = p ? m - 1 : m + 1;
|
|
4162
4162
|
N < 0 && (N = 0), v(!0), d(N), h(!p);
|
|
@@ -4219,7 +4219,7 @@ const Ut = () => {
|
|
|
4219
4219
|
children: N.name
|
|
4220
4220
|
}
|
|
4221
4221
|
) }, N.id || window.btoa(N.name))),
|
|
4222
|
-
n.length >
|
|
4222
|
+
n.length > zt && /* @__PURE__ */ s.jsx("li", { children: c.formatMessage({ id: "discussion_likes_more" }, { number: n.length - zt }) })
|
|
4223
4223
|
] }) })
|
|
4224
4224
|
] })
|
|
4225
4225
|
}
|
|
@@ -4228,7 +4228,7 @@ const Ut = () => {
|
|
|
4228
4228
|
const t = {};
|
|
4229
4229
|
return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
|
|
4230
4230
|
}, rn = (e, t) => e && !t;
|
|
4231
|
-
const Ne = "discussion_", ta = 280,
|
|
4231
|
+
const Ne = "discussion_", ta = 280, Tt = ({
|
|
4232
4232
|
element: e = "div",
|
|
4233
4233
|
content: t,
|
|
4234
4234
|
userHasPermissions: n = !0,
|
|
@@ -4255,7 +4255,7 @@ const Ne = "discussion_", ta = 280, $t = ({
|
|
|
4255
4255
|
children: g,
|
|
4256
4256
|
isTruncated: v = !1
|
|
4257
4257
|
}) => {
|
|
4258
|
-
const w = C(), y = we(Se), x = we(
|
|
4258
|
+
const w = C(), y = we(Se), x = we($t), [_, $] = A({
|
|
4259
4259
|
body: t && t.body || "",
|
|
4260
4260
|
isEditing: !1,
|
|
4261
4261
|
didEdit: t && t.isEdited || !1
|
|
@@ -4538,15 +4538,15 @@ const Ne = "discussion_", ta = 280, $t = ({
|
|
|
4538
4538
|
] })
|
|
4539
4539
|
});
|
|
4540
4540
|
};
|
|
4541
|
-
const
|
|
4541
|
+
const Vt = "discussion_responses_", jo = ({ type: e = "answer", responses: t = 0 }) => {
|
|
4542
4542
|
const n = C();
|
|
4543
4543
|
return /* @__PURE__ */ s.jsxs("div", { className: "responses-heading", children: [
|
|
4544
|
-
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${
|
|
4545
|
-
t === 0 && /* @__PURE__ */ s.jsx("p", { children: $e(n.formatMessage, `${
|
|
4544
|
+
/* @__PURE__ */ s.jsx("h3", { children: n.formatMessage({ id: `${Vt}title` }, { action: n.formatMessage({ id: `${Vt}${e}` }), count: t }) }),
|
|
4545
|
+
t === 0 && /* @__PURE__ */ s.jsx("p", { children: $e(n.formatMessage, `${Vt}empty`, e, e) })
|
|
4546
4546
|
] });
|
|
4547
4547
|
};
|
|
4548
4548
|
const na = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
|
|
4549
|
-
const r = C(), o = ae(null), i = we(
|
|
4549
|
+
const r = C(), o = ae(null), i = we($t), [l, a] = A(
|
|
4550
4550
|
"closed"
|
|
4551
4551
|
/* Closed */
|
|
4552
4552
|
);
|
|
@@ -4878,7 +4878,7 @@ const yo = ({
|
|
|
4878
4878
|
},
|
|
4879
4879
|
user: y
|
|
4880
4880
|
} = ma({ queryKey: [e, t], queryFns: i });
|
|
4881
|
-
return u ? /* @__PURE__ */ s.jsx(
|
|
4881
|
+
return u ? /* @__PURE__ */ s.jsx(St, { variant: "error", text: u.message }) : /* @__PURE__ */ s.jsxs("section", { children: [
|
|
4882
4882
|
/* @__PURE__ */ s.jsx(
|
|
4883
4883
|
sn,
|
|
4884
4884
|
{
|
|
@@ -4902,9 +4902,9 @@ const yo = ({
|
|
|
4902
4902
|
name: (I = (oe = V == null ? void 0 : V.user) == null ? void 0 : oe.data) == null ? void 0 : I.name
|
|
4903
4903
|
};
|
|
4904
4904
|
}) : !1, M = x == null ? void 0 : x.actor, F = (M == null ? void 0 : M.id) === (y == null ? void 0 : y.id);
|
|
4905
|
-
return /* @__PURE__ */ s.jsxs(
|
|
4905
|
+
return /* @__PURE__ */ s.jsxs(Gt, { children: [
|
|
4906
4906
|
/* @__PURE__ */ s.jsx(
|
|
4907
|
-
|
|
4907
|
+
Tt,
|
|
4908
4908
|
{
|
|
4909
4909
|
content: {
|
|
4910
4910
|
type: "post",
|
|
@@ -5249,7 +5249,7 @@ const yo = ({
|
|
|
5249
5249
|
replies: i,
|
|
5250
5250
|
functions: { create: l, edit: a, remove: u, join: c, leave: m, like: d, unlike: p }
|
|
5251
5251
|
}) => {
|
|
5252
|
-
const h = C(), g = wt(), v = we(Se), w = we(
|
|
5252
|
+
const h = C(), g = wt(), v = we(Se), w = we($t), y = ka({
|
|
5253
5253
|
queryClient: g,
|
|
5254
5254
|
queryKey: [e, t, r],
|
|
5255
5255
|
mutationFn: async (k) => l({ replyId: n, content: k.body })
|
|
@@ -5308,7 +5308,7 @@ const yo = ({
|
|
|
5308
5308
|
(i == null ? void 0 : i.length) === 0 || (i == null ? void 0 : i.map((k) => {
|
|
5309
5309
|
var L, J, q, ce, le, de, V, se, oe, I, ue, _e, fe, ke, xe, je, be;
|
|
5310
5310
|
return /* @__PURE__ */ s.jsx(
|
|
5311
|
-
|
|
5311
|
+
Tt,
|
|
5312
5312
|
{
|
|
5313
5313
|
content: {
|
|
5314
5314
|
type: "reply",
|
|
@@ -5434,7 +5434,7 @@ const yo = ({
|
|
|
5434
5434
|
var L, J, q, ce, le, de, V, se, oe, I, ue, _e, fe, ke, xe, je, be, Z, re, he;
|
|
5435
5435
|
const z = ((L = b == null ? void 0 : b.user) == null ? void 0 : L.id) === (g == null ? void 0 : g.id), k = rn(o, z);
|
|
5436
5436
|
return /* @__PURE__ */ s.jsx(Xr, { children: /* @__PURE__ */ s.jsx(
|
|
5437
|
-
|
|
5437
|
+
Tt,
|
|
5438
5438
|
{
|
|
5439
5439
|
content: {
|
|
5440
5440
|
type: "reply",
|
|
@@ -5665,7 +5665,7 @@ const Eo = ({
|
|
|
5665
5665
|
return /* @__PURE__ */ s.jsx(Te, { style: { height: "400px" } });
|
|
5666
5666
|
if (!_)
|
|
5667
5667
|
return /* @__PURE__ */ s.jsx(
|
|
5668
|
-
|
|
5668
|
+
St,
|
|
5669
5669
|
{
|
|
5670
5670
|
variant: "error",
|
|
5671
5671
|
text: w.formatMessage({ id: "activitySection_notFoundError" })
|
|
@@ -5673,7 +5673,7 @@ const Eo = ({
|
|
|
5673
5673
|
);
|
|
5674
5674
|
const q = ((le = _ == null ? void 0 : _.actor) == null ? void 0 : le.id) === (y == null ? void 0 : y.id), ce = rn(r, q);
|
|
5675
5675
|
return /* @__PURE__ */ s.jsx(
|
|
5676
|
-
|
|
5676
|
+
Tt,
|
|
5677
5677
|
{
|
|
5678
5678
|
className: "activity-section",
|
|
5679
5679
|
content: {
|
|
@@ -5770,7 +5770,7 @@ const Eo = ({
|
|
|
5770
5770
|
startDate: m
|
|
5771
5771
|
} = t;
|
|
5772
5772
|
if (e === "question") {
|
|
5773
|
-
const d = o &&
|
|
5773
|
+
const d = o && qt(o);
|
|
5774
5774
|
return /* @__PURE__ */ s.jsxs("p", { className: "details answers", "data-testid": "question-answers", children: [
|
|
5775
5775
|
n.formatMessage({ id: "card_answers" }, { number: r }),
|
|
5776
5776
|
o && /* @__PURE__ */ s.jsxs("span", { "data-testid": "question-created-at", children: [
|
|
@@ -5802,7 +5802,7 @@ const Eo = ({
|
|
|
5802
5802
|
}
|
|
5803
5803
|
);
|
|
5804
5804
|
if (u || c) {
|
|
5805
|
-
const d = c &&
|
|
5805
|
+
const d = c && qt(c);
|
|
5806
5806
|
return /* @__PURE__ */ s.jsxs("ul", { className: "details", children: [
|
|
5807
5807
|
u && /* @__PURE__ */ s.jsx("li", { "data-testid": "reading-time", children: n.formatMessage({ id: "card_time_read" }, { time: u }) }),
|
|
5808
5808
|
c && /* @__PURE__ */ s.jsx("li", { "data-testid": "published-date", children: n.formatMessage(
|
|
@@ -6129,7 +6129,7 @@ const lt = "notFoundError_", $o = () => {
|
|
|
6129
6129
|
{
|
|
6130
6130
|
styling: { background: "bold", circle: "small", variant: "alt-2" },
|
|
6131
6131
|
additionalContent: {
|
|
6132
|
-
appended: /* @__PURE__ */ s.jsxs(
|
|
6132
|
+
appended: /* @__PURE__ */ s.jsxs(Et, { children: [
|
|
6133
6133
|
/* @__PURE__ */ s.jsx(
|
|
6134
6134
|
Ia,
|
|
6135
6135
|
{
|
|
@@ -6167,22 +6167,22 @@ export {
|
|
|
6167
6167
|
Or as Columns,
|
|
6168
6168
|
lo as CommunityDetails,
|
|
6169
6169
|
Vn as Contributors,
|
|
6170
|
-
|
|
6170
|
+
$t as ConversationContext,
|
|
6171
6171
|
Br as CookieBanner,
|
|
6172
6172
|
Xr as DiscussionConversation,
|
|
6173
6173
|
ss as DiscussionForm,
|
|
6174
6174
|
ea as DiscussionLikes,
|
|
6175
|
-
|
|
6175
|
+
Tt as DiscussionPost,
|
|
6176
6176
|
na as DiscussionThread,
|
|
6177
6177
|
Ue as Divider,
|
|
6178
6178
|
eo as DownloadSection,
|
|
6179
6179
|
Xe as EMAILS,
|
|
6180
6180
|
_o as EmailHelperTextBox,
|
|
6181
|
-
|
|
6181
|
+
St as EmptyStateBox,
|
|
6182
6182
|
mo as Filters,
|
|
6183
6183
|
$r as FlagsProvider,
|
|
6184
6184
|
qn as Footer,
|
|
6185
|
-
|
|
6185
|
+
Et as FullWidthSection,
|
|
6186
6186
|
co as GlobalProviders,
|
|
6187
6187
|
es as Header,
|
|
6188
6188
|
lr as HelperTextBox,
|
|
@@ -6224,7 +6224,7 @@ export {
|
|
|
6224
6224
|
Ur as SearchForm,
|
|
6225
6225
|
ho as ShareLinks,
|
|
6226
6226
|
_r as Span,
|
|
6227
|
-
|
|
6227
|
+
Zt as StatusBanner,
|
|
6228
6228
|
po as Tabs,
|
|
6229
6229
|
wo as Tags,
|
|
6230
6230
|
or as Tooltip,
|