@apolitical/component-library 1.13.4-beta.3 → 1.13.4-beta.4

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.
Files changed (3) hide show
  1. package/index.js +9 -9
  2. package/index.mjs +214 -184
  3. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import N, { memo as Ne, useState as F, useEffect as X, useRef as ne, useMemo as et, Children as Mt, createContext as Ft, useContext as ge, Fragment as Ct, useCallback as ke, useReducer as rs, Suspense as os } from "react";
2
2
  import as from "lodash.clonedeep";
3
3
  import is from "lodash.set";
4
- import { useIntl as A, IntlProvider as cs, createIntl as ls, FormattedMessage as ye } from "react-intl";
4
+ import { useIntl as A, IntlProvider as ls, createIntl as cs, FormattedMessage as ye } from "react-intl";
5
5
  import tt from "truncate";
6
6
  import nt from "markdown-to-jsx";
7
7
  import { QueryClient as ds, QueryClientProvider as us, useQueryClient as st, useQuery as fn, useMutation as de } from "@tanstack/react-query";
@@ -53,7 +53,7 @@ var pn = { exports: {} };
53
53
  })();
54
54
  })(pn);
55
55
  var vs = pn.exports;
56
- const E = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => N.createElement(e, { ...r, className: E("hidden", { "show-on-focus": t }), children: n }), ce = Ne(ws), ks = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), gn = Ne(ks);
56
+ const S = /* @__PURE__ */ bs(vs), ws = ({ element: e = "span", showOnFocus: t = !0, children: n, ...r }) => N.createElement(e, { ...r, className: S("hidden", { "show-on-focus": t }), children: n }), le = Ne(ws), ks = ({ element: e = "span", children: t = null, ...n }) => N.createElement(e, { ...n, "aria-hidden": !0 }, t), gn = Ne(ks);
57
57
  var Dt = { exports: {} }, Re = {};
58
58
  /**
59
59
  * @license React
@@ -102,7 +102,7 @@ function ys() {
102
102
  var v = _ && m[_] || m[j];
103
103
  return typeof v == "function" ? v : null;
104
104
  }
105
- var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
105
+ var E = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
106
106
  function k(m) {
107
107
  {
108
108
  for (var v = arguments.length, y = new Array(v > 1 ? v - 1 : 0), $ = 1; $ < v; $++)
@@ -112,7 +112,7 @@ function ys() {
112
112
  }
113
113
  function T(m, v, y) {
114
114
  {
115
- var $ = S.ReactDebugCurrentFrame, B = $.getStackAddendum();
115
+ var $ = E.ReactDebugCurrentFrame, B = $.getStackAddendum();
116
116
  B !== "" && (v += "%s", y = y.concat([B]));
117
117
  var z = y.map(function(R) {
118
118
  return String(R);
@@ -246,7 +246,7 @@ function ys() {
246
246
  U < 0 && k("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
247
247
  }
248
248
  }
249
- var K = S.ReactCurrentDispatcher, ue;
249
+ var K = E.ReactCurrentDispatcher, ue;
250
250
  function fe(m, v, y) {
251
251
  {
252
252
  if (ue === void 0)
@@ -314,14 +314,14 @@ function ys() {
314
314
  } catch (be) {
315
315
  if (be && $ && typeof be.stack == "string") {
316
316
  for (var D = be.stack.split(`
317
- `), le = $.stack.split(`
318
- `), q = D.length - 1, ee = le.length - 1; q >= 1 && ee >= 0 && D[q] !== le[ee]; )
317
+ `), ce = $.stack.split(`
318
+ `), q = D.length - 1, ee = ce.length - 1; q >= 1 && ee >= 0 && D[q] !== ce[ee]; )
319
319
  ee--;
320
320
  for (; q >= 1 && ee >= 0; q--, ee--)
321
- if (D[q] !== le[ee]) {
321
+ if (D[q] !== ce[ee]) {
322
322
  if (q !== 1 || ee !== 1)
323
323
  do
324
- if (q--, ee--, ee < 0 || D[q] !== le[ee]) {
324
+ if (q--, ee--, ee < 0 || D[q] !== ce[ee]) {
325
325
  var he = `
326
326
  ` + D[q].replace(" at new ", " at ");
327
327
  return m.displayName && he.includes("<anonymous>") && (he = he.replace("<anonymous>", m.displayName)), typeof m == "function" && xe.set(m, he), he;
@@ -372,7 +372,7 @@ function ys() {
372
372
  }
373
373
  return "";
374
374
  }
375
- var Qe = Object.prototype.hasOwnProperty, Qt = {}, Ut = S.ReactDebugCurrentFrame;
375
+ var Qe = Object.prototype.hasOwnProperty, Qt = {}, Ut = E.ReactDebugCurrentFrame;
376
376
  function Ue(m) {
377
377
  if (m) {
378
378
  var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
@@ -388,8 +388,8 @@ function ys() {
388
388
  var D = void 0;
389
389
  try {
390
390
  if (typeof m[R] != "function") {
391
- var le = Error(($ || "React class") + ": " + y + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
392
- throw le.name = "Invariant Violation", le;
391
+ var ce = Error(($ || "React class") + ": " + y + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof m[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
392
+ throw ce.name = "Invariant Violation", ce;
393
393
  }
394
394
  D = m[R](v, R, $, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
395
395
  } catch (q) {
@@ -423,7 +423,7 @@ function ys() {
423
423
  if (Hn(m))
424
424
  return k("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", In(m)), zt(m);
425
425
  }
426
- var Pe = S.ReactCurrentOwner, Qn = {
426
+ var Pe = E.ReactCurrentOwner, Qn = {
427
427
  key: !0,
428
428
  ref: !0,
429
429
  __self: !0,
@@ -505,8 +505,8 @@ function ys() {
505
505
  };
506
506
  function Jn(m, v, y, $, B) {
507
507
  {
508
- var z, R = {}, D = null, le = null;
509
- y !== void 0 && (Wt(y), D = "" + y), zn(v) && (Wt(v.key), D = "" + v.key), Un(v) && (le = v.ref, Wn(v, B));
508
+ var z, R = {}, D = null, ce = null;
509
+ y !== void 0 && (Wt(y), D = "" + y), zn(v) && (Wt(v.key), D = "" + v.key), Un(v) && (ce = v.ref, Wn(v, B));
510
510
  for (z in v)
511
511
  Qe.call(v, z) && !Qn.hasOwnProperty(z) && (R[z] = v[z]);
512
512
  if (m && m.defaultProps) {
@@ -514,14 +514,14 @@ function ys() {
514
514
  for (z in q)
515
515
  R[z] === void 0 && (R[z] = q[z]);
516
516
  }
517
- if (D || le) {
517
+ if (D || ce) {
518
518
  var ee = typeof m == "function" ? m.displayName || m.name || "Unknown" : m;
519
- D && Vn(R, ee), le && Yn(R, ee);
519
+ D && Vn(R, ee), ce && Yn(R, ee);
520
520
  }
521
- return Gn(m, D, le, B, $, Pe.current, R);
521
+ return Gn(m, D, ce, B, $, Pe.current, R);
522
522
  }
523
523
  }
524
- var mt = S.ReactCurrentOwner, Gt = S.ReactDebugCurrentFrame;
524
+ var mt = E.ReactCurrentOwner, Gt = E.ReactDebugCurrentFrame;
525
525
  function Te(m) {
526
526
  if (m) {
527
527
  var v = m._owner, y = He(m.type, m._source, v ? v.type : null);
@@ -645,8 +645,8 @@ Check the top-level render call using <` + y + ">.");
645
645
  if (!R) {
646
646
  var D = "";
647
647
  (m === void 0 || typeof m == "object" && m !== null && Object.keys(m).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
648
- var le = Xn(B);
649
- le ? D += le : D += Jt();
648
+ var ce = Xn(B);
649
+ ce ? D += ce : D += Jt();
650
650
  var q;
651
651
  m === null ? q = "null" : dt(m) ? q = "array" : m !== void 0 && m.$$typeof === t ? (q = "<" + (L(m.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : q = typeof m, k("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", q, D);
652
652
  }
@@ -710,7 +710,7 @@ function Ss(e, t, n) {
710
710
  f.current = !1;
711
711
  };
712
712
  }, []);
713
- var S = et(function() {
713
+ var E = et(function() {
714
714
  var k = function(x) {
715
715
  var b = o.current, Q = a.current;
716
716
  return o.current = a.current = null, c.current = x, u.current = l.current.apply(Q, b);
@@ -749,7 +749,7 @@ function Ss(e, t, n) {
749
749
  return d.current ? C(Date.now()) : u.current;
750
750
  }, V;
751
751
  }, [p, j, t, g, _, h]);
752
- return S;
752
+ return E;
753
753
  }
754
754
  function _n(e, t, n) {
755
755
  var r = n === void 0 ? {} : n, i = r.leading, c = r.trailing;
@@ -1199,14 +1199,14 @@ Thank you for helping to protect the Apolitical community from abusive content.`
1199
1199
  }) => {
1200
1200
  const p = rt(typeof t == "object");
1201
1201
  if (typeof t == "object" && typeof p == "number") {
1202
- const g = Object.assign({}, t), S = xn(Object.keys(g));
1203
- t = bn(p, S, g);
1202
+ const g = Object.assign({}, t), E = xn(Object.keys(g));
1203
+ t = bn(p, E, g);
1204
1204
  }
1205
1205
  const _ = [];
1206
1206
  typeof t == "string" && _.push(t), r && (_.push("icon"), typeof r == "object" ? (_.push(r.icon), r.position ? _.push(r.position) : _.push("left"), r.hover && _.push(`hover_${r.hover}`), r.animate && (_.push("animate"), typeof r.animate == "string" && _.push(r.animate))) : (_.push(r), !r.includes("right") && !r.includes("left") && _.push("left"))), n.muted && _.push("muted"), n.fullWidth && _.push("full-width");
1207
1207
  const j = {
1208
1208
  ...f,
1209
- className: E(e, o, _, {
1209
+ className: S(e, o, _, {
1210
1210
  "no-text": !l,
1211
1211
  disabled: a,
1212
1212
  button: i
@@ -1219,15 +1219,15 @@ Thank you for helping to protect the Apolitical community from abusive content.`
1219
1219
  return i && (c = "a", j.href = i), N.createElement(
1220
1220
  c,
1221
1221
  j,
1222
- l || (u ? /* @__PURE__ */ s.jsx(ce, { showOnFocus: !1, children: u }) : null)
1222
+ l || (u ? /* @__PURE__ */ s.jsx(le, { showOnFocus: !1, children: u }) : null)
1223
1223
  );
1224
1224
  }, ot = ({ buttons: e, className: t = "", ...n }) => {
1225
1225
  const r = e.length > 1 ? "ul" : "p", i = e.map((c, d) => r === "p" ? /* @__PURE__ */ s.jsx(J, { ...c }, d) : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(J, { ...c }) }, d));
1226
- return N.createElement(r, { className: E("button-wrapper", t), ...n, children: i });
1226
+ return N.createElement(r, { className: S("button-wrapper", t), ...n, children: i });
1227
1227
  };
1228
1228
  const De = ({ className: e = "", maxWidth: t = !1 }) => {
1229
1229
  const n = t ? { "--max-width": `${t / 16}rem` } : {};
1230
- return /* @__PURE__ */ s.jsx("hr", { className: E(e, { "has-max-width": t }), style: n });
1230
+ return /* @__PURE__ */ s.jsx("hr", { className: S(e, { "has-max-width": t }), style: n });
1231
1231
  }, at = ({
1232
1232
  href: e,
1233
1233
  children: t,
@@ -1244,7 +1244,7 @@ const De = ({ className: e = "", maxWidth: t = !1 }) => {
1244
1244
  "a",
1245
1245
  {
1246
1246
  href: e,
1247
- className: E("gtm-trackable", r),
1247
+ className: S("gtm-trackable", r),
1248
1248
  ...a,
1249
1249
  children: t
1250
1250
  }
@@ -1437,9 +1437,9 @@ const Hs = ({ isOpen: e = !1, isLoading: t = !1, children: n }) => {
1437
1437
  e ? d("opening") : (d("closing"), a = "hidden"), Le = setTimeout(() => {
1438
1438
  d(a);
1439
1439
  }, 300);
1440
- }, [e]), /* @__PURE__ */ s.jsx("aside", { ref: i, className: E("tooltip text-medium", c, { loading: t }), hidden: c === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
1440
+ }, [e]), /* @__PURE__ */ s.jsx("aside", { ref: i, className: S("tooltip text-medium", c, { loading: t }), hidden: c === "hidden", children: t ? /* @__PURE__ */ s.jsx("p", { children: r.formatMessage({ id: "tooltip_loading" }) }) : typeof n == "string" ? /* @__PURE__ */ s.jsx("p", { children: n }) : n });
1441
1441
  };
1442
- const wn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: E("full-width-section", t), ...n, children: e });
1442
+ const wn = ({ children: e, className: t = "", ...n }) => /* @__PURE__ */ s.jsx("section", { className: S("full-width-section", t), ...n, children: e });
1443
1443
  const fo = ({ text: e, buttons: t, className: n = "" }) => {
1444
1444
  const r = [];
1445
1445
  return t.forEach((i) => {
@@ -1453,7 +1453,7 @@ const fo = ({ text: e, buttons: t, className: n = "" }) => {
1453
1453
  target: "_blank",
1454
1454
  children: i.text
1455
1455
  });
1456
- }), /* @__PURE__ */ s.jsx(wn, { className: E("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1456
+ }), /* @__PURE__ */ s.jsx(wn, { className: S("download-section", n), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1457
1457
  N.createElement(typeof e == "string" ? "h2" : e.element, { className: "text" }, typeof e == "string" ? e : e.text),
1458
1458
  /* @__PURE__ */ s.jsx(ot, { buttons: r })
1459
1459
  ] }) });
@@ -1466,12 +1466,12 @@ const ho = ({ title: e = !1, logos: t = [], className: n = "" }) => {
1466
1466
  element: typeof e == "object" ? e.element : "h2",
1467
1467
  text: typeof e == "string" ? e : typeof e == "object" ? e.text : ""
1468
1468
  };
1469
- return /* @__PURE__ */ s.jsxs("div", { className: E("logos", n), children: [
1469
+ return /* @__PURE__ */ s.jsxs("div", { className: S("logos", n), children: [
1470
1470
  e && N.createElement(i.element, { className: "title" }, i.text),
1471
1471
  /* @__PURE__ */ s.jsx(
1472
1472
  "ul",
1473
1473
  {
1474
- className: E({ "two-col": r === 2 || r === 4, "three-col": r === 5 || r <= 10 && r % 3 === 0 }),
1474
+ className: S({ "two-col": r === 2 || r === 4, "three-col": r === 5 || r <= 10 && r % 3 === 0 }),
1475
1475
  children: t.map(
1476
1476
  ({ logo: c, nameOfBusiness: d, link: o = !1, description: a = !1 }, u) => {
1477
1477
  if (!c || !c.url)
@@ -1554,7 +1554,7 @@ const Qs = [
1554
1554
  }), /* @__PURE__ */ s.jsx(
1555
1555
  wn,
1556
1556
  {
1557
- className: E("banner-section", r, i, e, {
1557
+ className: S("banner-section", r, i, e, {
1558
1558
  "has-image": n,
1559
1559
  "has-extra-spacing": i === "normal" && u.eyebrow && u.title
1560
1560
  }),
@@ -1594,7 +1594,7 @@ const go = ({
1594
1594
  title: n,
1595
1595
  text: r,
1596
1596
  gtmContext: i
1597
- }) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: E("marketing-block", e), children: [
1597
+ }) => !n && !r ? null : /* @__PURE__ */ s.jsxs("aside", { className: S("marketing-block", e), children: [
1598
1598
  n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
1599
1599
  r && /* @__PURE__ */ s.jsx("p", { children: r }),
1600
1600
  t && /* @__PURE__ */ s.jsx(J, { variant: "secondary", size: "medium", href: t.link, className: "gtm-trackable", "data-gtm-event-context": i, "data-gtm-event-type": "learn-more-click", children: t.text })
@@ -1608,12 +1608,12 @@ const go = ({
1608
1608
  }, _o = "200,000+";
1609
1609
  const kn = ({ label: e = !1, className: t = "", children: n }) => {
1610
1610
  const r = A();
1611
- return /* @__PURE__ */ s.jsxs("details", { className: E("collapsible-section", t), children: [
1611
+ return /* @__PURE__ */ s.jsxs("details", { className: S("collapsible-section", t), children: [
1612
1612
  /* @__PURE__ */ s.jsx("summary", { children: e || r.formatMessage({ id: "collapsibleSection_summary" }) }),
1613
1613
  /* @__PURE__ */ s.jsx("div", { className: "content", children: n })
1614
1614
  ] });
1615
1615
  };
1616
- const Ee = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: E("highlighted-text-box", e, t), ...r, children: n });
1616
+ const Ee = ({ variant: e = "primary", className: t = "", children: n, ...r }) => /* @__PURE__ */ s.jsx("div", { className: S("highlighted-text-box", e, t), ...r, children: n });
1617
1617
  const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r = "" }) => {
1618
1618
  let i = n && !!Object.keys(n).length;
1619
1619
  const c = typeof n == "object" && "breakpoints" in n, d = rt(c);
@@ -1622,7 +1622,7 @@ const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r =
1622
1622
  i = bn(d, h, f);
1623
1623
  }
1624
1624
  const { breakpoints: o, text: a = "", component: u, ...l } = n;
1625
- return /* @__PURE__ */ s.jsx(Ee, { variant: "subtle", className: E("empty-state-box", e, r), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1625
+ return /* @__PURE__ */ s.jsx(Ee, { variant: "subtle", className: S("empty-state-box", e, r), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1626
1626
  t && /* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: t }),
1627
1627
  i && typeof n == "object" && (u || /* @__PURE__ */ s.jsx(
1628
1628
  J,
@@ -1637,7 +1637,7 @@ const it = ({ variant: e = "empty", text: t = !1, button: n = !1, className: r =
1637
1637
  const At = ({ children: e, ...t }) => /* @__PURE__ */ s.jsx("p", { ...t, children: e }), jn = { q: At, blockquote: At };
1638
1638
  for (let e = 1; e <= 6; e++)
1639
1639
  jn[`h${e}`] = { component: At, props: { className: "title" } };
1640
- const zs = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: E("helper-text-box text-small", e, t), children: [
1640
+ const zs = ({ type: e = "default", className: t = "", heading: n = !1, children: r }) => /* @__PURE__ */ s.jsxs("div", { className: S("helper-text-box text-small", e, t), children: [
1641
1641
  n && /* @__PURE__ */ s.jsx("p", { className: "title", children: n }),
1642
1642
  typeof r == "string" ? /* @__PURE__ */ s.jsx(
1643
1643
  nt,
@@ -1675,8 +1675,8 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1675
1675
  if (!r)
1676
1676
  return null;
1677
1677
  const h = ["opening", "open"].includes(u);
1678
- return /* @__PURE__ */ s.jsxs(Ee, { variant: "subtle", className: E("hide-show-text-box", e), children: [
1679
- /* @__PURE__ */ s.jsxs("div", { ref: d, className: E("content", u), children: [
1678
+ return /* @__PURE__ */ s.jsxs(Ee, { variant: "subtle", className: S("hide-show-text-box", e), children: [
1679
+ /* @__PURE__ */ s.jsxs("div", { ref: d, className: S("content", u), children: [
1680
1680
  /* @__PURE__ */ s.jsx(nt, { options: { forceBlock: !0 }, children: u === "closed" ? o : r }),
1681
1681
  u !== "closed" && i
1682
1682
  ] }),
@@ -1686,7 +1686,7 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1686
1686
  variant: "tertiary",
1687
1687
  icon: { icon: "navigation_arrow", position: "left", animate: !0 },
1688
1688
  styling: { muted: !0 },
1689
- className: E({ "rotate-180": h }),
1689
+ className: S({ "rotate-180": h }),
1690
1690
  onClick: () => {
1691
1691
  l(h ? "ready-to-close" : "opening");
1692
1692
  },
@@ -1744,7 +1744,7 @@ const xo = ({ className: e = "", show: t = !1, hide: n = !1, text: r, children:
1744
1744
  let r = "default";
1745
1745
  const i = e.src;
1746
1746
  return i.includes("youtube") || i.includes("vimeo") ? r = "video" : i.includes("riddle") || i.includes("sli.do") ? r = "poll" : i.includes("padlet") && (r = "padlet"), /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1747
- /* @__PURE__ */ s.jsx(ce, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
1747
+ /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx("a", { href: `#content-after-iframe-${n}`, children: t.formatMessage({ id: `markdown_skip${r === "default" ? "" : `_${r}`}` }) }) }),
1748
1748
  /* @__PURE__ */ s.jsx("iframe", { ...e, title: t.formatMessage({ id: `markdown_iframe${r === "default" ? "" : `_${r}`}` }) }),
1749
1749
  /* @__PURE__ */ s.jsx("span", { id: `content-after-iframe-${n}`, tabIndex: -1 })
1750
1750
  ] });
@@ -1787,13 +1787,13 @@ const on = ({ className: e = "", options: t = {}, children: n }) => {
1787
1787
  iframe: Xs
1788
1788
  }
1789
1789
  };
1790
- return /* @__PURE__ */ s.jsx("div", { className: E("markdown-text", e), children: /* @__PURE__ */ s.jsx(nt, { options: { ...r, ...t }, children: n }) });
1790
+ return /* @__PURE__ */ s.jsx("div", { className: S("markdown-text", e), children: /* @__PURE__ */ s.jsx(nt, { options: { ...r, ...t }, children: n }) });
1791
1791
  };
1792
- const qs = ({ size: e = "medium", variant: t = "default", className: n = "", children: r }) => /* @__PURE__ */ s.jsx("span", { className: E("pill", e, t, n), children: r });
1793
- const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => N.createElement(e, { ...r, className: E("status-banner text-small", n), "aria-live": "assertive" }, t);
1792
+ const qs = ({ size: e = "medium", variant: t = "default", className: n = "", children: r }) => /* @__PURE__ */ s.jsx("span", { className: S("pill", e, t, n), children: r });
1793
+ const Pt = ({ element: e = "p", children: t = null, className: n = "", ...r }) => N.createElement(e, { ...r, className: S("status-banner text-small", n), "aria-live": "assertive" }, t);
1794
1794
  const er = ({ progress: e = 0, text: t = !1, className: n = "" }) => {
1795
1795
  const r = A(), i = e > 75 ? 100 : e > 50 ? 75 : e > 25 ? 50 : e > 5 ? 25 : 0, c = { "--progress": `${e}%` };
1796
- return /* @__PURE__ */ s.jsx("span", { className: E(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(ce, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
1796
+ return /* @__PURE__ */ s.jsx("span", { className: S(`progress-bar section-${i}`, n), style: c, children: /* @__PURE__ */ s.jsx(le, { children: t ? `${e} ${t}` : r.formatMessage({ id: "progressBar" }, { number: e }) }) });
1797
1797
  }, tr = Ne(er);
1798
1798
  const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n = "" }) => {
1799
1799
  const r = A();
@@ -1810,7 +1810,7 @@ const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n
1810
1810
  return /* @__PURE__ */ s.jsxs(
1811
1811
  Ee,
1812
1812
  {
1813
- className: E("loading-block", n, { "has-icon": i && t[i].icon }),
1813
+ className: S("loading-block", n, { "has-icon": i && t[i].icon }),
1814
1814
  variant: "subtle",
1815
1815
  style: d,
1816
1816
  children: [
@@ -1820,14 +1820,14 @@ const _t = "loadingBlock_", nr = ({ progress: e = 0, steps: t = !1, className: n
1820
1820
  }
1821
1821
  );
1822
1822
  }, bo = Ne(nr);
1823
- const je = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(gn, { element: e, className: E("loading-placeholder", t), ...n });
1823
+ const je = ({ element: e = "div", className: t = "", ...n }) => /* @__PURE__ */ s.jsx(gn, { element: e, className: S("loading-placeholder", t), ...n });
1824
1824
  const Rt = {
1825
1825
  header: ["logo", "link", "link", "search"],
1826
1826
  sidebar: ["text", "text", "text", "text", "text"],
1827
1827
  "cards-section": ["subtitle", "cards"],
1828
1828
  cards: ["card", "card", "card", "card"],
1829
1829
  "overview-page": ["header", "sidebar", "title", "text", "cards-section", "cards-section", "footer"]
1830
- }, yn = (e, t) => e in Rt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Rt[e].map((n, r) => yn(n, r)) }, t) : /* @__PURE__ */ s.jsx(je, { className: e }, t), sr = ({ layout: e = "overview-page" }) => /* @__PURE__ */ s.jsx("div", { className: E("loading-state", e), children: Rt[e].map((t, n) => yn(t, n)) }), En = (e) => {
1830
+ }, yn = (e, t) => e in Rt ? /* @__PURE__ */ s.jsx("div", { className: e, children: Rt[e].map((n, r) => yn(n, r)) }, t) : /* @__PURE__ */ s.jsx(je, { className: e }, t), sr = ({ layout: e = "overview-page" }) => /* @__PURE__ */ s.jsx("div", { className: S("loading-state", e), children: Rt[e].map((t, n) => yn(t, n)) }), En = (e) => {
1831
1831
  const t = e && e.toUpperCase().split(" ");
1832
1832
  return Array.isArray(t) && t.length > 1 && t[0] !== "" ? t[1] === "" ? t[0][0] : t[0][0] + t[t.length - 1][0] : e ? e.substr(0, 1) : "";
1833
1833
  }, ze = ["#5AB6A3", "#A2D7AF", "#806056", "#3962B3"], rr = (e) => {
@@ -1852,7 +1852,7 @@ const an = 256, Ot = ({ className: e = "", src: t = "", name: n, alt: r, width:
1852
1852
  typeof window < "u" && window.devicePixelRatio && (f.width = p * window.devicePixelRatio, f.height = _ * window.devicePixelRatio, h.scale(window.devicePixelRatio, window.devicePixelRatio)), h.fillStyle = rr(n), h.fillRect(0, 0, p, _), h.font = `${p / 3}px Arial`, h.textAlign = "center", h.fillStyle = "white", h.fillText(En(n), p / 2, _ / 1.6);
1853
1853
  }, [n]);
1854
1854
  let l = !1;
1855
- return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx("figure", { className: E("profile-picture", e, { error: o }), ...d, children: l ? /* @__PURE__ */ s.jsx(
1855
+ return t && t !== "" && !o && (t.includes("http") || t.includes("//")) && (l = !0), /* @__PURE__ */ s.jsx("figure", { className: S("profile-picture", e, { error: o }), ...d, children: l ? /* @__PURE__ */ s.jsx(
1856
1856
  "img",
1857
1857
  {
1858
1858
  src: t,
@@ -1900,7 +1900,7 @@ const Bt = ({
1900
1900
  o.name || (o.name = d.formatMessage({ id: `member_${typeof t == "string" ? t : "community"}` }));
1901
1901
  const { name: a, url: u, image: l } = o, f = or(o), h = n && n.createdAt ? Cs(n.createdAt) : !1, p = n && n.createdAt ? Ms(n.createdAt) : "";
1902
1902
  return N.createElement(e, {
1903
- className: E("member text-medium", c),
1903
+ className: S("member text-medium", c),
1904
1904
  children: /* @__PURE__ */ s.jsxs(
1905
1905
  at,
1906
1906
  {
@@ -1925,29 +1925,29 @@ const Bt = ({
1925
1925
  )
1926
1926
  });
1927
1927
  };
1928
- const cn = {
1928
+ const ln = {
1929
1929
  small: 24,
1930
1930
  medium: 48
1931
1931
  }, ar = ({ element: e = "div", contributors: { total: t, data: n } = { total: void 0, data: [] }, styling: { showText: r, size: i, showGap: c, showPlaceholders: d } = { showText: !0, size: "medium", showGap: !0, showPlaceholders: !1 }, cutoff: o = 2, className: a = "" }) => {
1932
1932
  const u = A();
1933
1933
  return !n || n.length === 0 ? null : N.createElement(
1934
1934
  e,
1935
- { className: E("contributors", a, i, { "has-gap": c }), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1935
+ { className: S("contributors", a, i, { "has-gap": c }), children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
1936
1936
  /* @__PURE__ */ s.jsx("ul", { children: n.map((l, f) => {
1937
1937
  let h, p = "";
1938
1938
  if (f < o) {
1939
1939
  const { name: _ = "", image: j = "" } = Sn(l);
1940
1940
  if (d)
1941
1941
  return /* @__PURE__ */ s.jsx(je, { element: "li", className: "contributor" }, f);
1942
- h = /* @__PURE__ */ s.jsx(Ot, { name: _, src: j, width: cn[i || "medium"], height: cn[i || "medium"] });
1942
+ h = /* @__PURE__ */ s.jsx(Ot, { name: _, src: j, width: ln[i || "medium"], height: ln[i || "medium"] });
1943
1943
  } else if (f === o) {
1944
1944
  const _ = (t || n.length) - o;
1945
- h = /* @__PURE__ */ s.jsxs("small", { className: E({ "large-number": _ > 99 }), children: [
1945
+ h = /* @__PURE__ */ s.jsxs("small", { className: S({ "large-number": _ > 99 }), children: [
1946
1946
  "+",
1947
1947
  Fs(_, 0)
1948
1948
  ] }), p = "number-left";
1949
1949
  }
1950
- return h ? /* @__PURE__ */ s.jsx("li", { className: E("contributor", p), children: h }, f) : null;
1950
+ return h ? /* @__PURE__ */ s.jsx("li", { className: S("contributor", p), children: h }, f) : null;
1951
1951
  }) }),
1952
1952
  r && /* @__PURE__ */ s.jsx("span", { className: "label", children: typeof r == "string" ? r : n.length === 1 ? typeof n[0] == "string" ? u.formatMessage({ id: `member_${n[0]}` }) : tt(n[0].name || "", 20) : null })
1953
1953
  ] }) }
@@ -1969,15 +1969,15 @@ const cn = {
1969
1969
  e && /* @__PURE__ */ s.jsx(ms, { initialIsOpen: !1 })
1970
1970
  ] });
1971
1971
  };
1972
- var cr = Ft({ client: Xe });
1973
- function lr(e) {
1972
+ var lr = Ft({ client: Xe });
1973
+ function cr(e) {
1974
1974
  var t = e.children, n = e.client, r = e.apiKey, i = e.options, c = et(function() {
1975
1975
  return n && r && console.warn("[PostHog.js] You have provided both a client and an apiKey to PostHogProvider. The apiKey will be ignored in favour of the client."), n && i && console.warn("[PostHog.js] You have provided both a client and options to PostHogProvider. The options will be ignored in favour of the client."), n || (r && (Xe.__loaded && console.warn("[PostHog.js] was already loaded elsewhere. This may cause issues."), Xe.init(r, i)), Xe);
1976
1976
  }, [n, r]);
1977
- return N.createElement(cr.Provider, { value: { client: c } }, t);
1977
+ return N.createElement(lr.Provider, { value: { client: c } }, t);
1978
1978
  }
1979
1979
  const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.Fragment, {}) : process.env.REACT_APP_PUBLIC_POSTHOG_KEY ? /* @__PURE__ */ s.jsx(
1980
- lr,
1980
+ cr,
1981
1981
  {
1982
1982
  apiKey: atob(process.env.REACT_APP_PUBLIC_POSTHOG_KEY),
1983
1983
  options: {
@@ -1997,7 +1997,7 @@ const dr = ({ children: e, user: t }) => t.isLoading ? /* @__PURE__ */ s.jsx(s.F
1997
1997
  ...Rs[r],
1998
1998
  ...n || {}
1999
1999
  };
2000
- return /* @__PURE__ */ s.jsx(cs, { locale: r, messages: i, children: e });
2000
+ return /* @__PURE__ */ s.jsx(ls, { locale: r, messages: i, children: e });
2001
2001
  }, Se = Ft(null), mr = ({ children: e, user: t }) => /* @__PURE__ */ s.jsx(Se.Provider, { value: t, children: e }), vo = ({ bootstrap: e, children: t, intl: n }) => {
2002
2002
  const [r, i] = F({ isLoading: !0 });
2003
2003
  return X(() => {
@@ -2022,7 +2022,7 @@ const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, fun
2022
2022
  onClick: async (p) => {
2023
2023
  d && (p.currentTarget.blur(), o ? (l("leaving"), typeof r == "function" && await r()) : (l("joining"), typeof n == "function" && await n()), a(!o));
2024
2024
  },
2025
- className: E("join-community-button", u, { active: u === "joining" }),
2025
+ className: S("join-community-button", u, { active: u === "joining" }),
2026
2026
  disabled: !d,
2027
2027
  ...f,
2028
2028
  children: /* @__PURE__ */ s.jsx("span", { className: "text", ...h, children: i.formatMessage({ id: `${xt}${["joining", "leaving"].includes(u) ? `_${u}` : o ? "_member" : t ? "_short" : ""}` }) })
@@ -2031,7 +2031,7 @@ const xt = "joinCommunityButton", Tn = ({ isMember: e = !1, isShort: t = !1, fun
2031
2031
  };
2032
2032
  const bt = "communityDetails_", wo = ({ isMember: e = !1, slug: t, members: { number: n, data: r } = { number: void 0, data: [] }, className: i = "", ...c }) => {
2033
2033
  const d = A(), o = n || (r == null ? void 0 : r.length) || 0;
2034
- return /* @__PURE__ */ s.jsxs("div", { className: E("community-details", i), children: [
2034
+ return /* @__PURE__ */ s.jsxs("div", { className: S("community-details", i), children: [
2035
2035
  /* @__PURE__ */ s.jsx(De, {}),
2036
2036
  /* @__PURE__ */ s.jsxs("div", { className: "member-details", children: [
2037
2037
  /* @__PURE__ */ s.jsxs("div", { className: "top", children: [
@@ -2054,9 +2054,9 @@ const ko = ({
2054
2054
  }) => {
2055
2055
  const r = A();
2056
2056
  return /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2057
- /* @__PURE__ */ s.jsx(ce, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
2058
- /* @__PURE__ */ s.jsx("ul", { className: E("breadcrumbs text-small", n), children: e.map(({ text: i, href: c, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
2059
- d && /* @__PURE__ */ s.jsx(ce, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
2057
+ /* @__PURE__ */ s.jsx(le, { element: "p", children: r.formatMessage({ id: "breadcrumbs_label" }) }),
2058
+ /* @__PURE__ */ s.jsx("ul", { className: S("breadcrumbs text-small", n), children: e.map(({ text: i, href: c, current: d = !1 }, o) => /* @__PURE__ */ s.jsxs("li", { children: [
2059
+ d && /* @__PURE__ */ s.jsx(le, { element: "span", children: r.formatMessage({ id: "breadcrumbs_currentPage" }) }),
2060
2060
  /* @__PURE__ */ s.jsx(at, { href: d ? void 0 : c, children: tt(i, t) })
2061
2061
  ] }, `${window.btoa(i)}_${o}`)) })
2062
2062
  ] });
@@ -2073,13 +2073,13 @@ const jo = ({
2073
2073
  let h = [];
2074
2074
  o.includes(l) ? h = o.filter((p) => p !== l) : l === "all" ? h = ["all"] : n ? h = [...o.filter((p) => p !== "all"), l] : h = [l], a((p) => (r && typeof r == "function" && r({ current: h, previous: p }), h)), f && typeof f == "function" && f();
2075
2075
  };
2076
- return /* @__PURE__ */ s.jsx("ul", { className: E("filters", i), children: d.map(({ id: l, text: f, disabled: h = !1, callback: p = () => {
2076
+ return /* @__PURE__ */ s.jsx("ul", { className: S("filters", i), children: d.map(({ id: l, text: f, disabled: h = !1, callback: p = () => {
2077
2077
  } }) => {
2078
2078
  let _ = {};
2079
2079
  return h && (_ = { disabled: !0, "aria-label": c.formatMessage({ id: "filters_disabled" }, { name: f }) }), /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(
2080
2080
  "button",
2081
2081
  {
2082
- className: E(l, { selected: o.includes(l) }),
2082
+ className: S(l, { selected: o.includes(l) }),
2083
2083
  onClick: (j) => {
2084
2084
  j.preventDefault(), j.stopPropagation(), u(l, p);
2085
2085
  },
@@ -2115,7 +2115,7 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
2115
2115
  }, [e]), !r || !Object.values(r).some((j) => j && j.post_name))
2116
2116
  return null;
2117
2117
  const p = Object.keys(r), _ = l !== e;
2118
- return /* @__PURE__ */ s.jsxs("div", { className: E("language-switcher text-small", d, a), children: [
2118
+ return /* @__PURE__ */ s.jsxs("div", { className: S("language-switcher text-small", d, a), children: [
2119
2119
  /* @__PURE__ */ s.jsxs("nav", { children: [
2120
2120
  d !== "short" && /* @__PURE__ */ s.jsx("p", { children: o || u.formatMessage({ id: `${We}label` }) }),
2121
2121
  /* @__PURE__ */ s.jsx("ul", { children: p.map((j) => {
@@ -2125,8 +2125,8 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
2125
2125
  return l === j ? g["aria-label"] = u.formatMessage({ id: `${We}selected` }, { language: vt[j] }) : g = {
2126
2126
  ...g,
2127
2127
  href: fr(j, c),
2128
- onClick: (S) => {
2129
- S.preventDefault(), S.stopPropagation(), f(j), i(j);
2128
+ onClick: (E) => {
2129
+ E.preventDefault(), E.stopPropagation(), f(j), i(j);
2130
2130
  }
2131
2131
  }, /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { ...g, fallbackElement: "span", children: vt[j] }) }, j);
2132
2132
  }) }),
@@ -2146,7 +2146,7 @@ const vt = { en: "English", es: "Español", fr: "Français", pt: "Português" },
2146
2146
  })
2147
2147
  ] });
2148
2148
  };
2149
- const wt = ls({ locale: "en", messages: Lt }), hr = ({
2149
+ const wt = cs({ locale: "en", messages: Lt }), hr = ({
2150
2150
  page: e = 1,
2151
2151
  length: t = 0,
2152
2152
  limit: n = 10,
@@ -2171,7 +2171,7 @@ const wt = ls({ locale: "en", messages: Lt }), hr = ({
2171
2171
  _ instanceof Error && _.message && _.message.includes("Cannot read items") ? f(!0) : u(!0);
2172
2172
  }
2173
2173
  };
2174
- return /* @__PURE__ */ s.jsxs("footer", { className: E("load-more", d), children: [
2174
+ return /* @__PURE__ */ s.jsxs("footer", { className: S("load-more", d), children: [
2175
2175
  a && /* @__PURE__ */ s.jsx("p", { className: "error", children: c.error }),
2176
2176
  l ? /* @__PURE__ */ s.jsx("p", { children: c.endOfFeed }) : /* @__PURE__ */ s.jsx(
2177
2177
  J,
@@ -2197,7 +2197,7 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
2197
2197
  document.removeEventListener("click", a, !0);
2198
2198
  })), N.createElement(e, {
2199
2199
  ref: c,
2200
- className: E("more-menu text-medium", r),
2200
+ className: S("more-menu text-medium", r),
2201
2201
  children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
2202
2202
  /* @__PURE__ */ s.jsx(
2203
2203
  J,
@@ -2241,13 +2241,13 @@ const pr = ({ element: e = "div", id: t = "more-menu", options: n, className: r
2241
2241
  ] })
2242
2242
  });
2243
2243
  };
2244
- const $n = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: E("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(ce, { children: /* @__PURE__ */ s.jsx(ye, { id: "apolitical" }) }) }) });
2244
+ const $n = ({ variant: e = "default", version: t = "default", className: n = "", ...r }) => /* @__PURE__ */ s.jsx("p", { className: "logo-wrapper", children: /* @__PURE__ */ s.jsx("a", { href: "/home/", className: S("logo", e, t, n), ...r, children: /* @__PURE__ */ s.jsx(le, { children: /* @__PURE__ */ s.jsx(ye, { id: "apolitical" }) }) }) });
2245
2245
  const gr = {
2246
2246
  "2-1": 901
2247
2247
  }, Eo = ({ layout: e = "2-1", hideOnMobile: t = !1, className: n = "", children: r }) => {
2248
2248
  const i = rt(!0);
2249
2249
  let c = r;
2250
- return N.Children.count(r) === 1 && (c = N.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: E("columns", `layout-${e}`, n), children: N.Children.map(c, (d, o) => t !== !1 && o === t && i && i < gr[e] ? null : d) });
2250
+ return N.Children.count(r) === 1 && (c = N.Children.toArray(r)[0], c.props && (c = c.props.children)), /* @__PURE__ */ s.jsx("section", { className: S("columns", `layout-${e}`, n), children: N.Children.map(c, (d, o) => t !== !1 && o === t && i && i < gr[e] ? null : d) });
2251
2251
  };
2252
2252
  const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-cookie-consent", "functional-cookie-consent"], yt = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), _r = () => {
2253
2253
  const e = A(), [t, n, r] = fs(jt), [i, c] = F(!t["apol-cookie-banner"]), d = () => {
@@ -2389,7 +2389,7 @@ const kt = "cookieBanner_", jt = ["apol-cookie-banner", "apolitical-performance-
2389
2389
  facebook: { href: "https://www.facebook.com/apoliticalco" }
2390
2390
  }
2391
2391
  };
2392
- const Me = "footer_", Ze = "SiteFooter", ln = ({ group: e }) => {
2392
+ const Me = "footer_", Ze = "SiteFooter", cn = ({ group: e }) => {
2393
2393
  const t = we[e].order || [];
2394
2394
  let n = !1;
2395
2395
  return "text" in we[e] && (n = we[e].text), /* @__PURE__ */ s.jsxs(Ct, { children: [
@@ -2440,8 +2440,8 @@ const Me = "footer_", Ze = "SiteFooter", ln = ({ group: e }) => {
2440
2440
  }
2441
2441
  ),
2442
2442
  /* @__PURE__ */ s.jsx("footer", { children: ["platform", "community", "company", "contact"].map((e) => /* @__PURE__ */ s.jsxs("div", { className: "group", children: [
2443
- /* @__PURE__ */ s.jsx(ln, { group: e }),
2444
- Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(ln, { group: we[e].child })
2443
+ /* @__PURE__ */ s.jsx(cn, { group: e }),
2444
+ Object.keys(we[e]).includes("child") && /* @__PURE__ */ s.jsx(cn, { group: we[e].child })
2445
2445
  ] }, e)) }),
2446
2446
  /* @__PURE__ */ s.jsx("hr", {}),
2447
2447
  /* @__PURE__ */ s.jsxs("div", { className: "sub-footer", children: [
@@ -2531,7 +2531,7 @@ const Ye = "emailHelperTextBox_", So = ({ type: e, email: t, redirectPath: n, re
2531
2531
  "data-gtm-event-context": "VerifyEmailBox",
2532
2532
  "data-gtm-event-type": "SendEmailClick",
2533
2533
  className: "gtm-trackable",
2534
- onClick: (S) => u(S),
2534
+ onClick: (E) => u(E),
2535
2535
  "data-testid": "send-verify-email-click"
2536
2536
  };
2537
2537
  break;
@@ -2591,15 +2591,15 @@ const Ge = "passwordRules_", Cn = "isMoreThanEightCharacters", Dn = "includesNum
2591
2591
  [Nn]: "lowercaseUppercase"
2592
2592
  }, br = ({ matchingRules: e = { isMoreThanEightCharacters: !1, includesNumberAndSymbol: !1, includesLowerAndUppercase: !1 }, className: t = "" }) => {
2593
2593
  const n = A();
2594
- return /* @__PURE__ */ s.jsxs("aside", { className: E("password-rules", t), children: [
2594
+ return /* @__PURE__ */ s.jsxs("aside", { className: S("password-rules", t), children: [
2595
2595
  /* @__PURE__ */ s.jsx("small", { children: n.formatMessage({ id: `${Ge}intro` }) }),
2596
- /* @__PURE__ */ s.jsx("ul", { children: [Cn, Dn, Nn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: E({ matches: e[r] }), children: [
2597
- /* @__PURE__ */ s.jsxs(ce, { children: [
2596
+ /* @__PURE__ */ s.jsx("ul", { children: [Cn, Dn, Nn].map((r) => /* @__PURE__ */ s.jsxs("li", { className: S({ matches: e[r] }), children: [
2597
+ /* @__PURE__ */ s.jsxs(le, { children: [
2598
2598
  n.formatMessage({ id: `${Ge}rule_label` }),
2599
2599
  " "
2600
2600
  ] }),
2601
2601
  /* @__PURE__ */ s.jsx("span", { children: n.formatMessage({ id: `${Ge}rule_${xr[r]}` }) }),
2602
- !e[r] && /* @__PURE__ */ s.jsxs(ce, { element: "strong", children: [
2602
+ !e[r] && /* @__PURE__ */ s.jsxs(le, { element: "strong", children: [
2603
2603
  " ",
2604
2604
  " ",
2605
2605
  n.formatMessage({ id: `${Ge}notMet` })
@@ -2618,10 +2618,10 @@ const $o = ({
2618
2618
  }) => {
2619
2619
  const o = A(), [a, u] = F({ setUp: !1, id: null, rating: null, disabled: !0 }), l = async () => {
2620
2620
  try {
2621
- const S = await n();
2622
- u((k) => ({ ...k, setUp: !0, id: S && S.id, disabled: !1 }));
2623
- } catch (S) {
2624
- u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(S);
2621
+ const E = await n();
2622
+ u((k) => ({ ...k, setUp: !0, id: E && E.id, disabled: !1 }));
2623
+ } catch (E) {
2624
+ u((k) => ({ ...k, setUp: !0, disabled: !0 })), i(E);
2625
2625
  }
2626
2626
  };
2627
2627
  if (X(() => {
@@ -2634,21 +2634,21 @@ const $o = ({
2634
2634
  high: o.formatMessage({ id: `${_}high` }),
2635
2635
  success: o.formatMessage({ id: `${_}success` }),
2636
2636
  ...e
2637
- }, g = async (S) => {
2637
+ }, g = async (E) => {
2638
2638
  if (!(!f || p))
2639
2639
  try {
2640
- u((k) => ({ ...k, rating: S, disabled: !0 })), await r({ id: f, value: S });
2640
+ u((k) => ({ ...k, rating: E, disabled: !0 })), await r({ id: f, value: E });
2641
2641
  } catch (k) {
2642
2642
  u((T) => ({ ...T, rating: null })), i(k);
2643
2643
  } finally {
2644
2644
  u((k) => ({ ...k, disabled: !1 }));
2645
2645
  }
2646
2646
  };
2647
- return /* @__PURE__ */ s.jsxs("div", { className: E("rating", c), children: [
2647
+ return /* @__PURE__ */ s.jsxs("div", { className: S("rating", c), children: [
2648
2648
  /* @__PURE__ */ s.jsx("span", { className: "label", children: j[h ? "success" : "text"] }),
2649
- /* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((S) => {
2650
- const k = S + 1;
2651
- return /* @__PURE__ */ s.jsx("li", { className: E({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
2649
+ /* @__PURE__ */ s.jsx("ol", { children: Array.from(new Array(t).keys()).map((E) => {
2650
+ const k = E + 1;
2651
+ return /* @__PURE__ */ s.jsx("li", { className: S({ selected: h && k <= h }), children: /* @__PURE__ */ s.jsx(
2652
2652
  J,
2653
2653
  {
2654
2654
  variant: "tertiary",
@@ -2686,11 +2686,11 @@ const vr = ({
2686
2686
  "form",
2687
2687
  {
2688
2688
  onSubmit: l,
2689
- className: E("search-form gtm-trackable", t),
2689
+ className: S("search-form gtm-trackable", t),
2690
2690
  "data-gtm-event-context": i,
2691
2691
  "data-gtm-event-type": c,
2692
2692
  children: /* @__PURE__ */ s.jsx("fieldset", { id: `${e}-form`, hidden: n ? !d : !1, role: "search", children: /* @__PURE__ */ s.jsxs("p", { children: [
2693
- /* @__PURE__ */ s.jsx(ce, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
2693
+ /* @__PURE__ */ s.jsx(le, { element: "label", htmlFor: e, children: a.formatMessage({ id: "search_label" }) }),
2694
2694
  /* @__PURE__ */ s.jsx(
2695
2695
  "input",
2696
2696
  {
@@ -2712,10 +2712,10 @@ const vr = ({
2712
2712
  onClick: (f) => {
2713
2713
  f.preventDefault(), f.stopPropagation(), u.current && u.current.value && (u.current.value = "");
2714
2714
  },
2715
- children: /* @__PURE__ */ s.jsx(ce, { children: a.formatMessage({ id: "search_clear" }) })
2715
+ children: /* @__PURE__ */ s.jsx(le, { children: a.formatMessage({ id: "search_clear" }) })
2716
2716
  }
2717
2717
  ),
2718
- /* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(ce, { children: a.formatMessage({ id: "search_cta" }) }) })
2718
+ /* @__PURE__ */ s.jsx("button", { className: "search", onClick: l, children: /* @__PURE__ */ s.jsx(le, { children: a.formatMessage({ id: "search_cta" }) }) })
2719
2719
  ] }) })
2720
2720
  }
2721
2721
  );
@@ -2733,7 +2733,7 @@ const wr = ({
2733
2733
  initialFormStatus: u = "NOT_SUBMITTED"
2734
2734
  /* NOT_SUBMITTED */
2735
2735
  }) => {
2736
- const [l, f] = F([]), [h, p] = F(!0), [_, j] = F(u), { formatMessage: g } = A(), S = async (M) => {
2736
+ const [l, f] = F([]), [h, p] = F(!0), [_, j] = F(u), { formatMessage: g } = A(), E = async (M) => {
2737
2737
  M.preventDefault();
2738
2738
  try {
2739
2739
  await a(l), f([]), j(
@@ -2771,8 +2771,8 @@ const wr = ({
2771
2771
  "form",
2772
2772
  {
2773
2773
  style: { backgroundColor: c },
2774
- onSubmit: S,
2775
- className: E("invite-form gtm-trackable"),
2774
+ onSubmit: E,
2775
+ className: S("invite-form gtm-trackable"),
2776
2776
  children: [
2777
2777
  /* @__PURE__ */ s.jsxs("fieldset", { className: "content", children: [
2778
2778
  /* @__PURE__ */ s.jsx("h2", { className: "title", style: { color: r }, children: e }),
@@ -3026,7 +3026,7 @@ const wr = ({
3026
3026
  });
3027
3027
  }
3028
3028
  const p = o.order && o.order[0] && o[o.order[0]], _ = p && o[o.order[0]].order, j = h && window.location.pathname === o.href;
3029
- let g = {}, S = {};
3029
+ let g = {}, E = {};
3030
3030
  if (p) {
3031
3031
  const k = o.menuId || e, T = {
3032
3032
  onClick: (M) => H.events.onClick(M, { id: k, callback: i, isOpen: r[k] }),
@@ -3045,14 +3045,14 @@ const wr = ({
3045
3045
  "aria-haspopup": !0,
3046
3046
  "aria-expanded": r[k],
3047
3047
  "aria-controls": k
3048
- }), S = { hidden: k in r ? !r[k] : !0 }), _ || (S = {
3049
- ...S,
3048
+ }), E = { hidden: k in r ? !r[k] : !0 }), _ || (E = {
3049
+ ...E,
3050
3050
  ...T
3051
3051
  });
3052
3052
  }
3053
- return /* @__PURE__ */ s.jsxs("li", { className: E({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
3053
+ return /* @__PURE__ */ s.jsxs("li", { className: S({ [o.className]: o.className, "has-submenu": p, parent: _, active: j }), role: "none", ...g, children: [
3054
3054
  h ? N.createElement(l ? J : "a", h, d.formatMessage({ id: f })) : d.formatMessage({ id: f }),
3055
- o.order && /* @__PURE__ */ s.jsx("ul", { ...S, children: o.order.map((k) => {
3055
+ o.order && /* @__PURE__ */ s.jsx("ul", { ...E, children: o.order.map((k) => {
3056
3056
  if (!o[k])
3057
3057
  return null;
3058
3058
  const T = {
@@ -3062,7 +3062,7 @@ const wr = ({
3062
3062
  callback: i,
3063
3063
  doTrack: a ? u : null
3064
3064
  };
3065
- return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: E({ [o[k].className]: o[k].className }), children: [
3065
+ return o[k].order ? /* @__PURE__ */ s.jsxs("li", { className: S({ [o[k].className]: o[k].className }), children: [
3066
3066
  d.formatMessage({ id: `${f}_${k}` }),
3067
3067
  /* @__PURE__ */ s.jsx("ul", { children: o[k].order.map((M) => /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}.${M}`, ...T }, M)) })
3068
3068
  ] }, k) : /* @__PURE__ */ s.jsx(qe, { id: `${e}.${k}`, ...T }, k);
@@ -3112,8 +3112,8 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
3112
3112
  dispatch: d
3113
3113
  });
3114
3114
  }, [a.account]), t && t.isLoading ? null : /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3115
- /* @__PURE__ */ s.jsxs("nav", { id: "header", className: E({ "logged-in": r, "logged-out": !r, visible: o }), children: [
3116
- /* @__PURE__ */ s.jsx(ce, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
3115
+ /* @__PURE__ */ s.jsxs("nav", { id: "header", className: S({ "logged-in": r, "logged-out": !r, visible: o }), children: [
3116
+ /* @__PURE__ */ s.jsx(le, { element: "a", href: "#content-of-page", children: e.formatMessage({ id: "header_skip" }) }),
3117
3117
  /* @__PURE__ */ s.jsx($n, {}),
3118
3118
  !i.navigation && /* @__PURE__ */ s.jsx(
3119
3119
  "button",
@@ -3127,7 +3127,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
3127
3127
  "aria-haspopup": "true",
3128
3128
  "aria-expanded": a.navigation,
3129
3129
  "aria-controls": "navigation",
3130
- children: /* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
3130
+ children: /* @__PURE__ */ s.jsx(le, { children: e.formatMessage({ id: `header_menu_${a.navigation ? "hide" : "show"}` }) })
3131
3131
  }
3132
3132
  ),
3133
3133
  /* @__PURE__ */ s.jsx(
@@ -3161,7 +3161,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
3161
3161
  "aria-haspopup": "true",
3162
3162
  "aria-expanded": a.search,
3163
3163
  "aria-controls": "search-form",
3164
- children: /* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_search_${a.search ? "hide" : "show"}` }) })
3164
+ children: /* @__PURE__ */ s.jsx(le, { children: e.formatMessage({ id: `header_search_${a.search ? "hide" : "show"}` }) })
3165
3165
  }
3166
3166
  ),
3167
3167
  /* @__PURE__ */ s.jsx(
@@ -3184,7 +3184,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
3184
3184
  "aria-expanded": a.account,
3185
3185
  "aria-controls": "navigation",
3186
3186
  children: [
3187
- /* @__PURE__ */ s.jsx(ce, { children: e.formatMessage({ id: `header_account_${a.account ? "hide" : "show"}` }) }),
3187
+ /* @__PURE__ */ s.jsx(le, { children: e.formatMessage({ id: `header_account_${a.account ? "hide" : "show"}` }) }),
3188
3188
  /* @__PURE__ */ s.jsx(Ot, { name: t && t.name || "", src: t && t.image && t.image.thumbnail || "" })
3189
3189
  ]
3190
3190
  }
@@ -3194,7 +3194,7 @@ const kr = { height: 67, height_desktop: 83 }, An = () => {
3194
3194
  /* @__PURE__ */ s.jsx(
3195
3195
  "div",
3196
3196
  {
3197
- className: E("overlay", { open: a.navigation || a.account || !i.search && a.search })
3197
+ className: S("overlay", { open: a.navigation || a.account || !i.search && a.search })
3198
3198
  }
3199
3199
  )
3200
3200
  ] });
@@ -3212,7 +3212,7 @@ const jr = () => {
3212
3212
  window.scrollTo(0, 0);
3213
3213
  }, [d]);
3214
3214
  const o = vn(e, { locale: c });
3215
- return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: E(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
3215
+ return /* @__PURE__ */ s.jsx(gs, { onError: t, fallback: /* @__PURE__ */ s.jsx(jr, {}), children: /* @__PURE__ */ s.jsx(os, { fallback: /* @__PURE__ */ s.jsx(sr, { layout: "overview-page" }), children: /* @__PURE__ */ s.jsx("div", { id: "wrapper", className: S(i, { [r]: r !== "default" }), children: /* @__PURE__ */ s.jsxs(hs, { children: [
3216
3216
  /* @__PURE__ */ s.jsx(An, {}),
3217
3217
  /* @__PURE__ */ s.jsx("div", { className: "content", children: o }),
3218
3218
  n && /* @__PURE__ */ s.jsx(Mn, {}),
@@ -3267,7 +3267,7 @@ const Co = ({
3267
3267
  return;
3268
3268
  const l = yr.getTagDetails(u);
3269
3269
  l && a.push(l);
3270
- }), a.length < 1 ? null : /* @__PURE__ */ s.jsx("ul", { className: E("tags text-small", t, i, { "one-line": n }), children: a.map((u) => {
3270
+ }), a.length < 1 ? null : /* @__PURE__ */ s.jsx("ul", { className: S("tags text-small", t, i, { "one-line": n }), children: a.map((u) => {
3271
3271
  const l = o.formatMessage({ id: u.text });
3272
3272
  return /* @__PURE__ */ s.jsx("li", { children: u.href && r ? /* @__PURE__ */ s.jsx(
3273
3273
  "a",
@@ -3289,7 +3289,7 @@ const Do = ({
3289
3289
  className: c = ""
3290
3290
  }) => {
3291
3291
  const d = A();
3292
- return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: E("members-list", c), children: [
3292
+ return t.length === 0 ? null : (e || (e = t.length), /* @__PURE__ */ s.jsxs("div", { className: S("members-list", c), children: [
3293
3293
  /* @__PURE__ */ s.jsxs("h1", { children: [
3294
3294
  d.formatMessage({ id: "membersList" }),
3295
3295
  /* @__PURE__ */ s.jsx("span", { className: "count", children: e })
@@ -3343,8 +3343,8 @@ const me = "discussion_form_", Pn = ({
3343
3343
  var b, Q;
3344
3344
  const u = A(), l = ge(Se), [f, h] = F(
3345
3345
  n.isEditing && n.isEditing.text || ""
3346
- ), [p, _] = F(d.error || !1), [j, g] = F(!1), S = ne(null);
3347
- if (r || (r = S), n.isLoading)
3346
+ ), [p, _] = F(d.error || !1), [j, g] = F(!1), E = ne(null);
3347
+ if (r || (r = E), n.isLoading)
3348
3348
  return /* @__PURE__ */ s.jsx(
3349
3349
  je,
3350
3350
  {
@@ -3445,7 +3445,7 @@ const me = "discussion_form_", Pn = ({
3445
3445
  onClick: (w) => {
3446
3446
  if (n.isEditing) {
3447
3447
  g("submitting"), o.handleSaveEdit && o.handleSaveEdit(
3448
- S.current && "value" in S.current ? S.current.value : ""
3448
+ E.current && "value" in E.current ? E.current.value : ""
3449
3449
  );
3450
3450
  return;
3451
3451
  }
@@ -3463,7 +3463,7 @@ const me = "discussion_form_", Pn = ({
3463
3463
  "form",
3464
3464
  {
3465
3465
  id: T,
3466
- className: E("discussion-card discussion-form", {
3466
+ className: S("discussion-card discussion-form", {
3467
3467
  "no-styling": n.isInWrapper && n.isEditing
3468
3468
  }),
3469
3469
  "data-testid": `discussion-${e.type}-form`,
@@ -3477,7 +3477,7 @@ const me = "discussion_form_", Pn = ({
3477
3477
  gtmType: "profile-click"
3478
3478
  }
3479
3479
  ),
3480
- /* @__PURE__ */ s.jsx(ce, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(u.formatMessage, `${me}label`, e.type, "action") }),
3480
+ /* @__PURE__ */ s.jsx(le, { element: "label", showOnFocus: !1, htmlFor: `${T}-input`, children: pe(u.formatMessage, `${me}label`, e.type, "action") }),
3481
3481
  /* @__PURE__ */ s.jsx(
3482
3482
  _s,
3483
3483
  {
@@ -3550,12 +3550,12 @@ const me = "discussion_form_", Pn = ({
3550
3550
  ), Er = {
3551
3551
  showThread: !1,
3552
3552
  showForm: !1
3553
- }, ct = Ft(Er), Sr = ({ children: e }) => {
3553
+ }, lt = Ft(Er), Sr = ({ children: e }) => {
3554
3554
  const [t, n] = F({
3555
3555
  showThread: !1,
3556
3556
  showForm: !1
3557
3557
  });
3558
- return /* @__PURE__ */ s.jsx(ct.Provider, { value: { ...t, updateConversation: n }, children: e });
3558
+ return /* @__PURE__ */ s.jsx(lt.Provider, { value: { ...t, updateConversation: n }, children: e });
3559
3559
  }, Tr = ({
3560
3560
  question: e,
3561
3561
  answer: t,
@@ -3584,8 +3584,8 @@ const St = () => {
3584
3584
  X(() => {
3585
3585
  p(i);
3586
3586
  }, [i]);
3587
- const [l, f] = F(t), [h, p] = F(i), [_, j] = F(!1), [g, S] = F(!1), k = et(() => $r(n, Tt), [n]), T = (C) => {
3588
- if (C.preventDefault(), C.stopPropagation(), S(!1), Be)
3587
+ const [l, f] = F(t), [h, p] = F(i), [_, j] = F(!1), [g, E] = F(!1), k = et(() => $r(n, Tt), [n]), T = (C) => {
3588
+ if (C.preventDefault(), C.stopPropagation(), E(!1), Be)
3589
3589
  return St(), !1;
3590
3590
  if (St(), _ || !d)
3591
3591
  return !1;
@@ -3609,19 +3609,19 @@ const St = () => {
3609
3609
  return N.createElement(
3610
3610
  e,
3611
3611
  {
3612
- className: E("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": h, disabled: !d }),
3612
+ className: S("likes-wrapper text-medium action-button", { "show-spinner": _, "is-liked": h, disabled: !d }),
3613
3613
  onClick: T,
3614
3614
  onMouseEnter: () => {
3615
- S(!0);
3615
+ E(!0);
3616
3616
  },
3617
3617
  onMouseLeave: () => {
3618
- S(!1);
3618
+ E(!1);
3619
3619
  },
3620
3620
  onFocus: () => {
3621
- S(!0);
3621
+ E(!0);
3622
3622
  },
3623
3623
  onBlur: () => {
3624
- S(!1);
3624
+ E(!1);
3625
3625
  },
3626
3626
  children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3627
3627
  /* @__PURE__ */ s.jsx(
@@ -3630,7 +3630,7 @@ const St = () => {
3630
3630
  variant: "tertiary",
3631
3631
  size: "medium",
3632
3632
  icon: { icon: h ? "heart" : "heart_empty", animate: "bounce" },
3633
- className: E({ "do-animation": h && !i }),
3633
+ className: S({ "do-animation": h && !i }),
3634
3634
  screenreaderText: d ? u.formatMessage({
3635
3635
  id: `discussion_likes_${h ? "unlike" : "like"}`
3636
3636
  }, { action: u.formatMessage({ id: `discussion_action_${c.type}` }) }) : !1,
@@ -3642,7 +3642,7 @@ const St = () => {
3642
3642
  "data-gtm-event-type": `like-${c.type}-click`
3643
3643
  }
3644
3644
  ),
3645
- /* @__PURE__ */ s.jsx("span", { className: E("number-of-likes", { "no-likes": l === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: l }) }),
3645
+ /* @__PURE__ */ s.jsx("span", { className: S("number-of-likes", { "no-likes": l === 0 }), "data-testid": "number-of-likes", children: u.formatMessage({ id: `discussion_likes${r ? "_short" : ""}` }, { number: l }) }),
3646
3646
  n && /* @__PURE__ */ s.jsx(Hs, { isOpen: g, isLoading: n.length === 0, children: n.length && /* @__PURE__ */ s.jsxs("ul", { children: [
3647
3647
  k.map((C) => typeof C == "string" || !C.name ? null : /* @__PURE__ */ s.jsx("li", { children: /* @__PURE__ */ s.jsx(at, { href: C.id ? `/profiles/${C.id}` : void 0, gtmContext: "Likes", gtmType: "liked-name-click", children: C.name }) }, C.id || window.btoa(C.name))),
3648
3648
  n.length > Tt && /* @__PURE__ */ s.jsx("li", { children: u.formatMessage({ id: "discussion_likes_more" }, { number: n.length - Tt }) })
@@ -3654,7 +3654,7 @@ const St = () => {
3654
3654
  const Cr = ({ element: e = "section", children: t, className: n, ...r }) => N.createElement(
3655
3655
  e,
3656
3656
  {
3657
- className: E("modal", n),
3657
+ className: S("modal", n),
3658
3658
  children: typeof t == "string" ? /* @__PURE__ */ s.jsx("p", { children: t }) : t,
3659
3659
  ...r
3660
3660
  }
@@ -3674,18 +3674,18 @@ const Rn = ({
3674
3674
  className: l = "",
3675
3675
  gtmContext: f = "Modal"
3676
3676
  }) => {
3677
- const h = A(), [p, _] = F(t), j = (S) => {
3678
- _(S), S ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
3677
+ const h = A(), [p, _] = F(t), j = (E) => {
3678
+ _(E), E ? (i(), document.body.classList.add("has-overlay")) : (c(), document.body.classList.remove("has-overlay"));
3679
3679
  };
3680
3680
  X(() => {
3681
3681
  j(t);
3682
3682
  }, [t]);
3683
3683
  const g = r ? { "--max-width": `${r / 16}rem` } : {};
3684
- return /* @__PURE__ */ s.jsx("div", { className: E("overlay", { open: p }), children: /* @__PURE__ */ s.jsx(
3684
+ return /* @__PURE__ */ s.jsx("div", { className: S("overlay", { open: p }), children: /* @__PURE__ */ s.jsx(
3685
3685
  Cr,
3686
3686
  {
3687
3687
  id: e,
3688
- className: E("overlay-modal", l, { "has-max-width": r }),
3688
+ className: S("overlay-modal", l, { "has-max-width": r }),
3689
3689
  hidden: !p,
3690
3690
  style: g,
3691
3691
  children: t && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
@@ -3739,7 +3739,7 @@ const No = ({
3739
3739
  isOpen: t,
3740
3740
  showDivider: !1,
3741
3741
  showIcon: d,
3742
- className: E("invite-modal", e, { success: !!n }),
3742
+ className: S("invite-modal", e, { success: !!n }),
3743
3743
  children: /* @__PURE__ */ s.jsx(
3744
3744
  wr,
3745
3745
  {
@@ -3756,7 +3756,7 @@ const No = ({
3756
3756
  const t = {};
3757
3757
  return Object.keys(e).forEach((n) => n.includes("Id") ? t[n] = e[n] : t[`${n}Slug`] = e[n]), t;
3758
3758
  }, Ht = (e, t) => e && !t;
3759
- const ve = "discussion_", Nr = 280, lt = ({
3759
+ const ve = "discussion_", Nr = 280, ct = ({
3760
3760
  element: e = "div",
3761
3761
  content: t,
3762
3762
  userHasPermissions: n = !0,
@@ -3783,7 +3783,7 @@ const ve = "discussion_", Nr = 280, lt = ({
3783
3783
  children: _,
3784
3784
  isTruncated: j = !1
3785
3785
  }) => {
3786
- const g = A(), S = ge(Se), k = ge(ct), [T, M] = F({
3786
+ const g = A(), E = ge(Se), k = ge(lt), [T, M] = F({
3787
3787
  body: t && t.body || "",
3788
3788
  isEditing: !1,
3789
3789
  didEdit: t && t.isEdited || !1
@@ -3796,7 +3796,7 @@ const ve = "discussion_", Nr = 280, lt = ({
3796
3796
  });
3797
3797
  }, [t.isEdited]), r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question))
3798
3798
  return /* @__PURE__ */ s.jsx(je, { className: "discussion-card discussion-post" });
3799
- const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body, Nr) : T.body, Z = S && S.id && typeof b != "string" && b.id && b.id === S.id || !1, re = typeof Q == "boolean" ? Q : n ? !Z : !1, oe = async (P) => {
3799
+ const { author: b, canLike: Q, createdAt: w, id: Y, likes: L = 0, userLiked: O, comments: U = 0 } = t, W = j ? tt(T.body, Nr) : T.body, Z = E && E.id && typeof b != "string" && b.id && b.id === E.id || !1, re = typeof Q == "boolean" ? Q : n ? !Z : !1, oe = async (P) => {
3800
3800
  P || (P = ""), x("");
3801
3801
  try {
3802
3802
  if (!xs(P, T.body)) {
@@ -3857,14 +3857,14 @@ const ve = "discussion_", Nr = 280, lt = ({
3857
3857
  ...Dr(`delete-${t.slug}-modal`, C)
3858
3858
  }
3859
3859
  ), N.createElement(e, {
3860
- className: E("discussion-post", h),
3860
+ className: S("discussion-post", h),
3861
3861
  "data-testid": `discussion-${t.type}-thread`,
3862
3862
  children: /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
3863
3863
  /* @__PURE__ */ s.jsxs(
3864
3864
  "div",
3865
3865
  {
3866
3866
  id: Y || t.slug,
3867
- className: E("discussion-card", t.type, {
3867
+ className: S("discussion-card", t.type, {
3868
3868
  editing: T.isEditing,
3869
3869
  "has-link": f.post && !T.isEditing
3870
3870
  }),
@@ -3936,7 +3936,7 @@ const ve = "discussion_", Nr = 280, lt = ({
3936
3936
  !T.isEditing && /* @__PURE__ */ s.jsxs(
3937
3937
  "ul",
3938
3938
  {
3939
- className: E("actions text-medium", t.type),
3939
+ className: S("actions text-medium", t.type),
3940
3940
  "data-testid": `${t.type}-actions`,
3941
3941
  children: [
3942
3942
  /* @__PURE__ */ s.jsx(
@@ -4072,7 +4072,10 @@ const $t = "discussion_responses_", Ao = ({ type: e = "answer", responses: t = 0
4072
4072
  ] });
4073
4073
  };
4074
4074
  const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4075
- const r = A(), i = ne(null), c = ge(ct), [d, o] = F("closed");
4075
+ const r = A(), i = ne(null), c = ge(lt), [d, o] = F(
4076
+ "closed"
4077
+ /* Closed */
4078
+ );
4076
4079
  X(() => {
4077
4080
  const f = i.current;
4078
4081
  if (f)
@@ -4080,13 +4083,27 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4080
4083
  f.removeEventListener("transitionend", a);
4081
4084
  };
4082
4085
  }, []), Ce(() => {
4083
- d === "closed" && !c.showThread || o(["opening", "open"].includes(d) ? "ready-to-close" : "opening");
4086
+ d === "closed" && !c.showThread || o(
4087
+ [
4088
+ "opening",
4089
+ "open"
4090
+ /* Open */
4091
+ ].includes(d) ? "ready-to-close" : "opening"
4092
+ /* Opening */
4093
+ );
4084
4094
  }, [c.showThread]), X(() => {
4085
- d === "ready-to-close" && o("closing");
4095
+ d === "ready-to-close" && o(
4096
+ "closing"
4097
+ /* Closing */
4098
+ );
4086
4099
  }, [d]);
4087
4100
  const a = ({ propertyName: f }) => {
4088
4101
  f === "max-height" && o((h) => h === "opening" ? "open" : h === "closing" ? "closed" : h);
4089
- }, u = ["opening", "open"].includes(d), l = vn(n, {
4102
+ }, u = [
4103
+ "opening",
4104
+ "open"
4105
+ /* Open */
4106
+ ].includes(d), l = vn(n, {
4090
4107
  element: "li"
4091
4108
  });
4092
4109
  return /* @__PURE__ */ s.jsxs("div", { className: "thread-wrapper", children: [
@@ -4114,7 +4131,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4114
4131
  "ul",
4115
4132
  {
4116
4133
  ref: i,
4117
- className: E("thread", d),
4134
+ className: S("thread", d),
4118
4135
  hidden: !c.showThread,
4119
4136
  children: l
4120
4137
  }
@@ -4193,7 +4210,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4193
4210
  }, onError: (o, a, u) => {
4194
4211
  e.setQueryData(t, u.previousActivities);
4195
4212
  }, onSuccess: (o) => {
4196
- const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => ((l == null ? void 0 : l.id) === (o == null ? void 0 : o.activity_id) && (l.own_reactions.like ? l.own_reactions.like.push(o) : l.own_reactions.like = [o]), l));
4213
+ const a = e.getQueryData(t), u = a == null ? void 0 : a.map((l) => {
4214
+ var f, h;
4215
+ return (l == null ? void 0 : l.id) === (o == null ? void 0 : o.activity_id) && ((f = l.own_reactions) != null && f.like ? l.own_reactions.like.push(o) : l.own_reactions.like = [o], (h = l.latest_reactions) != null && h.like ? l.latest_reactions.like.push(o) : l.latest_reactions.like = [o]), l;
4216
+ });
4197
4217
  return e.setQueryData(t, () => u && [...u]), { previousActivities: a };
4198
4218
  }, onSettled: (o, a, u) => {
4199
4219
  e.invalidateQueries({
@@ -4215,13 +4235,15 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4215
4235
  e.setQueryData(t, l.previousActivities);
4216
4236
  }, onSuccess: (a, { activityId: u }) => {
4217
4237
  const l = e.getQueryData(t), f = l == null ? void 0 : l.map((h) => {
4218
- var p, _, j, g;
4238
+ var p, _, j, g, E;
4219
4239
  if (h.id === u) {
4220
- const S = (j = (_ = (p = h.own_reactions) == null ? void 0 : p.like) == null ? void 0 : _.find(
4221
- (k) => k.user_id === (n == null ? void 0 : n.id)
4240
+ const k = (j = (_ = (p = h.own_reactions) == null ? void 0 : p.like) == null ? void 0 : _.find(
4241
+ (T) => T.user_id === (n == null ? void 0 : n.id)
4222
4242
  )) == null ? void 0 : j.id;
4223
4243
  return h.own_reactions.like = (g = h.own_reactions.like) == null ? void 0 : g.filter(
4224
- (k) => k.id !== S
4244
+ (T) => T.id !== k
4245
+ ), h.latest_reactions.like = (E = h.latest_reactions.like) == null ? void 0 : E.filter(
4246
+ (T) => T.id !== k
4225
4247
  ), h;
4226
4248
  } else
4227
4249
  return h;
@@ -4245,12 +4267,12 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4245
4267
  } = fn({
4246
4268
  queryKey: [e, t],
4247
4269
  queryFn: r
4248
- }), S = Rr({
4270
+ }), E = Rr({
4249
4271
  queryClient: f,
4250
4272
  queryKey: [e, t],
4251
4273
  user: h,
4252
4274
  mutationFn: i
4253
- }), { mutate: k } = de(S), T = Fr({
4275
+ }), { mutate: k } = de(E), T = Fr({
4254
4276
  queryClient: f,
4255
4277
  queryKey: [e, t],
4256
4278
  mutationFn: async (w) => await c(w)
@@ -4304,7 +4326,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4304
4326
  const Y = ((O = w == null ? void 0 : w.actor) == null ? void 0 : O.id) === (h == null ? void 0 : h.id), L = Ht(n, Y);
4305
4327
  return /* @__PURE__ */ s.jsxs(Ct, { children: [
4306
4328
  /* @__PURE__ */ s.jsx(
4307
- lt,
4329
+ ct,
4308
4330
  {
4309
4331
  content: {
4310
4332
  type: "post",
@@ -4420,8 +4442,8 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4420
4442
  }, onSuccess: (d) => {
4421
4443
  var u;
4422
4444
  const o = e.getQueryData(t), a = (u = o == null ? void 0 : o.latest_reactions.reply) == null ? void 0 : u.map((l) => {
4423
- var f;
4424
- return l.id === d.id && ((f = l.own_children) != null && f.like ? l.own_children.like.push(d) : l.own_children = { like: [d] }), l;
4445
+ var f, h;
4446
+ return l.id === d.id && ((f = l.own_children) != null && f.like ? l.own_children.like.push(d) : l.own_children = { like: [d] }, (h = l.latest_children) != null && h.like ? l.latest_children.like.push(d) : l.latest_children = { like: [d] }), l;
4425
4447
  });
4426
4448
  return e.setQueryData(t, () => ({
4427
4449
  ...o,
@@ -4451,10 +4473,16 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4451
4473
  if (!u)
4452
4474
  return;
4453
4475
  const l = (f = u.latest_reactions.reply) == null ? void 0 : f.map((h) => {
4454
- var p;
4455
- return h.id === a ? (p = h.latest_children.reply) == null ? void 0 : p.filter(
4456
- (j) => j.user_id !== (n == null ? void 0 : n.id)
4457
- ) : h;
4476
+ var p, _, j;
4477
+ if (h.id === a) {
4478
+ let g = (p = h.latest_children.reply) == null ? void 0 : p.filter(
4479
+ (E) => E.user_id !== (n == null ? void 0 : n.id)
4480
+ );
4481
+ return g = (j = (_ = h == null ? void 0 : h.own_children) == null ? void 0 : _.reply) == null ? void 0 : j.filter(
4482
+ (E) => E.user_id !== (n == null ? void 0 : n.id)
4483
+ ), g;
4484
+ }
4485
+ return h;
4458
4486
  });
4459
4487
  return e.setQueryData(t, () => ({
4460
4488
  ...u,
@@ -4535,7 +4563,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4535
4563
  var l;
4536
4564
  const a = e.getQueryData(t), u = (l = a == null ? void 0 : a.latest_reactions.reply) == null ? void 0 : l.map((f) => {
4537
4565
  var h;
4538
- return f.id === o.replyParentId && ((h = f.latest_children.reply) == null || h.map((p) => (p.id === o.replyId && (p.own_children = p.own_children || {}, p.own_children.like = p.own_children.like || [], p.own_children.like.push(d)), p))), f;
4566
+ return f.id === o.replyParentId && ((h = f.latest_children.reply) == null || h.map((p) => (p.id === o.replyId && (p.latest_children = p.latest_children || {}, p.own_children = p.own_children || {}, p.latest_children.like = p.latest_children.like || [], p.own_children.like = p.own_children.like || [], p.latest_children.like.push(d), p.own_children.like.push(d)), p))), f;
4539
4567
  });
4540
4568
  return e.setQueryData(t, () => ({
4541
4569
  ...a,
@@ -4550,17 +4578,17 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4550
4578
  replies: c,
4551
4579
  functions: { create: d, edit: o, join: a, leave: u, like: l, unlike: f }
4552
4580
  }) => {
4553
- const h = A(), p = st(), _ = ge(ct), j = Ur({
4581
+ const h = A(), p = st(), _ = ge(lt), j = Ur({
4554
4582
  queryClient: p,
4555
4583
  queryKey: [e, t, r],
4556
4584
  mutationFn: async (b) => d({ replyId: n, content: b.body })
4557
- }), { mutate: g } = de(j), S = zr({
4585
+ }), { mutate: g } = de(j), E = zr({
4558
4586
  queryClient: p,
4559
4587
  queryKey: [e, t, r],
4560
4588
  mutationFn: o
4561
4589
  }), {
4562
4590
  mutate: k
4563
- } = de(S), T = mn({
4591
+ } = de(E), T = mn({
4564
4592
  queryClient: p,
4565
4593
  queryKey: [e, t, r],
4566
4594
  mutationFn: l
@@ -4602,7 +4630,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4602
4630
  (c == null ? void 0 : c.length) === 0 || (c == null ? void 0 : c.map((b) => {
4603
4631
  var Q, w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te;
4604
4632
  return /* @__PURE__ */ s.jsx(
4605
- lt,
4633
+ ct,
4606
4634
  {
4607
4635
  content: {
4608
4636
  type: "reply",
@@ -4672,7 +4700,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4672
4700
  queryKey: [e, t, n],
4673
4701
  mutationFn: async (x) => d(x)
4674
4702
  }), {
4675
- mutate: S
4703
+ mutate: E
4676
4704
  } = de(g), k = Hr({
4677
4705
  queryClient: h,
4678
4706
  queryKey: [e, t, n],
@@ -4712,7 +4740,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4712
4740
  var w, Y, L, O, U, W, Z, re, oe, ae, ie, se, P, te, G, K, ue, fe;
4713
4741
  const b = ((w = x == null ? void 0 : x.user) == null ? void 0 : w.id) === (p == null ? void 0 : p.id), Q = Ht(i, b);
4714
4742
  return /* @__PURE__ */ s.jsx(Sr, { children: /* @__PURE__ */ s.jsx(
4715
- lt,
4743
+ ct,
4716
4744
  {
4717
4745
  content: {
4718
4746
  type: "reply",
@@ -4741,7 +4769,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4741
4769
  content: {
4742
4770
  createContent: () => console.log("create"),
4743
4771
  deleteContent: () => console.log("delete"),
4744
- updateContent: (_e, xe) => S({ replyInfo: _e, content: xe })
4772
+ updateContent: (_e, xe) => E({ replyInfo: _e, content: xe })
4745
4773
  },
4746
4774
  likes: {
4747
4775
  createLike: () => I({ replyId: x == null ? void 0 : x.id }),
@@ -4817,7 +4845,7 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4817
4845
  e.setQueryData(t, u.previousActivity);
4818
4846
  }, onSuccess: (o) => {
4819
4847
  const a = e.getQueryData(t);
4820
- return a != null && a.own_reactions.like ? a.own_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), e.setQueryData(t, () => ({
4848
+ return a != null && a.own_reactions.like ? a.own_reactions.like.push(o) : a && (a.own_reactions = { like: [o] }), a != null && a.latest_reactions.like ? a.latest_reactions.like.push(o) : a && (a.latest_reactions = { like: [o] }), e.setQueryData(t, () => ({
4821
4849
  ...a
4822
4850
  })), { previousActivity: a };
4823
4851
  }, onSettled: () => {
@@ -4844,8 +4872,10 @@ const Ar = ({ count: e = 0, showRepliesButton: t = !0, children: n }) => {
4844
4872
  const u = (p = (h = (f = r.own_reactions) == null ? void 0 : f.like) == null ? void 0 : h.find(
4845
4873
  (_) => _.user_id === (n == null ? void 0 : n.id)
4846
4874
  )) == null ? void 0 : p.id, l = e.getQueryData(t);
4847
- if (l != null && l.own_reactions.like)
4848
- return l.own_reactions.like = l.own_reactions.like.filter(
4875
+ if (l != null && l.own_reactions.like && (l.own_reactions.like = l.own_reactions.like.filter(
4876
+ (_) => _.id !== u
4877
+ ), !!(l != null && l.latest_reactions.like)))
4878
+ return l.latest_reactions.like = l.latest_reactions.like.filter(
4849
4879
  (_) => _.id !== u
4850
4880
  ), e.setQueryData(t, () => ({
4851
4881
  ...l
@@ -4874,7 +4904,7 @@ const Ro = ({
4874
4904
  var O, U, W, Z, re, oe, ae, ie, se, P, te;
4875
4905
  const _ = ge(Se), j = st(), {
4876
4906
  data: g,
4877
- error: S,
4907
+ error: E,
4878
4908
  isLoading: k,
4879
4909
  isFetching: T
4880
4910
  } = fn({
@@ -4913,13 +4943,13 @@ const Ro = ({
4913
4943
  async ({ activityId: G }) => b({ activityId: G }),
4914
4944
  [b]
4915
4945
  );
4916
- if (S)
4917
- return /* @__PURE__ */ s.jsx(it, { variant: "error", text: S.message });
4946
+ if (E)
4947
+ return /* @__PURE__ */ s.jsx(it, { variant: "error", text: E.message });
4918
4948
  if (k || T)
4919
4949
  return /* @__PURE__ */ s.jsx(je, { style: { height: "400px" } });
4920
4950
  const Y = ((O = g == null ? void 0 : g.actor) == null ? void 0 : O.id) === (_ == null ? void 0 : _.id), L = Ht(r, Y);
4921
4951
  return /* @__PURE__ */ s.jsx(
4922
- lt,
4952
+ ct,
4923
4953
  {
4924
4954
  className: "activity-section",
4925
4955
  content: {
@@ -5011,12 +5041,12 @@ export {
5011
5041
  Eo as Columns,
5012
5042
  wo as CommunityDetails,
5013
5043
  ar as Contributors,
5014
- ct as ConversationContext,
5044
+ lt as ConversationContext,
5015
5045
  _r as CookieBanner,
5016
5046
  Sr as DiscussionConversation,
5017
5047
  Pn as DiscussionForm,
5018
5048
  Mr as DiscussionLikes,
5019
- lt as DiscussionPost,
5049
+ ct as DiscussionPost,
5020
5050
  Ar as DiscussionThread,
5021
5051
  De as Divider,
5022
5052
  fo as DownloadSection,
@@ -5069,7 +5099,7 @@ export {
5069
5099
  Hs as Tooltip,
5070
5100
  Se as UserContext,
5071
5101
  mr as UserProvider,
5072
- ce as VisuallyHidden,
5102
+ le as VisuallyHidden,
5073
5103
  Dr as addAriaProps,
5074
5104
  Sn as getMember,
5075
5105
  Ke as headerData,