@apolitical/component-library 3.0.2-ac.1 → 3.0.2-ac.3
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/general/index.d.ts +1 -1
- package/general/progress-tracker/index.d.ts +1 -0
- package/index.js +8 -8
- package/index.mjs +148 -151
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/variables/colors/theme/_general.scss +5 -5
- package/general/navigation-dots/index.d.ts +0 -1
- /package/general/{navigation-dots/navigation-dots.d.ts → progress-tracker/progress-tracker.d.ts} +0 -0
package/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import K, { memo as Oe, useState as
|
|
1
|
+
import K, { memo as Oe, useState as ee, useEffect as ae, useRef as pe, useMemo as bt, createContext as Zn, useContext as Ne, Children as An, useCallback as Jr, useReducer as Hn, Fragment as gt, Suspense as pi } from "react";
|
|
2
2
|
import ft from "lodash.clonedeep";
|
|
3
3
|
import hi from "lodash.set";
|
|
4
|
-
import {
|
|
4
|
+
import { FormattedMessage as ye, useIntl as G, IntlProvider as gi, createIntl as vi } from "react-intl";
|
|
5
5
|
import Qe from "truncate";
|
|
6
6
|
import { QueryClient as bi, QueryClientProvider as yi, useMutation as ke, useQueryClient as Vn, useInfiniteQuery as Xr, useQuery as _i } from "@tanstack/react-query";
|
|
7
7
|
import { ReactQueryDevtools as xi } from "@tanstack/react-query-devtools";
|
|
@@ -281,7 +281,7 @@ function $i() {
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
var Y = v.ReactCurrentDispatcher, V;
|
|
284
|
-
function
|
|
284
|
+
function X(h, $, L) {
|
|
285
285
|
{
|
|
286
286
|
if (V === void 0)
|
|
287
287
|
try {
|
|
@@ -367,7 +367,7 @@ function $i() {
|
|
|
367
367
|
} finally {
|
|
368
368
|
re = !1, Y.current = me, te(), Error.prepareStackTrace = le;
|
|
369
369
|
}
|
|
370
|
-
var Ve = h ? h.displayName || h.name : "", gr = Ve ?
|
|
370
|
+
var Ve = h ? h.displayName || h.name : "", gr = Ve ? X(Ve) : "";
|
|
371
371
|
return typeof h == "function" && M.set(h, gr), gr;
|
|
372
372
|
}
|
|
373
373
|
function ve(h, $, L) {
|
|
@@ -383,12 +383,12 @@ function $i() {
|
|
|
383
383
|
if (typeof h == "function")
|
|
384
384
|
return D(h, Pe(h));
|
|
385
385
|
if (typeof h == "string")
|
|
386
|
-
return
|
|
386
|
+
return X(h);
|
|
387
387
|
switch (h) {
|
|
388
388
|
case l:
|
|
389
|
-
return
|
|
389
|
+
return X("Suspense");
|
|
390
390
|
case d:
|
|
391
|
-
return
|
|
391
|
+
return X("SuspenseList");
|
|
392
392
|
}
|
|
393
393
|
if (typeof h == "object")
|
|
394
394
|
switch (h.$$typeof) {
|
|
@@ -716,7 +716,7 @@ Check the top-level render call using <` + L + ">.");
|
|
|
716
716
|
process.env.NODE_ENV === "production" ? In.exports = Pi() : In.exports = $i();
|
|
717
717
|
var a = In.exports;
|
|
718
718
|
const Ri = () => {
|
|
719
|
-
const [t, e] =
|
|
719
|
+
const [t, e] = ee(window.location.pathname), n = () => {
|
|
720
720
|
const r = window.location.pathname;
|
|
721
721
|
e(r);
|
|
722
722
|
};
|
|
@@ -1162,6 +1162,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1162
1162
|
/* General */
|
|
1163
1163
|
tooltip_loading: "Loading...",
|
|
1164
1164
|
return_to_nav_button: "Back to top",
|
|
1165
|
+
progress_tracker_steps: "Step {current} of {total}",
|
|
1165
1166
|
/* Layout */
|
|
1166
1167
|
cookieBanner_title: "Cookies and your privacy",
|
|
1167
1168
|
cookieBanner_text: "We take your trust and privacy very seriously. Apolitical uses safe cookies (small files on your device) to run the site. You can reject non-essential cookies, but some site features may not work without them.",
|
|
@@ -1593,42 +1594,38 @@ const vl = ({ image: t, className: e, testId: n }) => /* @__PURE__ */ a.jsx(
|
|
|
1593
1594
|
}
|
|
1594
1595
|
return n ? K.createElement(n, { children: e, className: r, ...c }) : e;
|
|
1595
1596
|
};
|
|
1596
|
-
const bl = ({ currentStep: t = 1, steps: e = 1 }) => {
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
const i = [];
|
|
1600
|
-
for (let s = 1; s < e + 1; s++)
|
|
1601
|
-
i.push(s);
|
|
1602
|
-
r(i);
|
|
1603
|
-
}, [e]), /* @__PURE__ */ a.jsx("div", { className: "navigation-dots-wrapper", children: /* @__PURE__ */ a.jsx("div", { className: "dots-wrapper", children: n.map((i) => /* @__PURE__ */ a.jsxs(
|
|
1604
|
-
"div",
|
|
1597
|
+
const bl = ({ currentStep: t = 1, steps: e = 1 }) => /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1598
|
+
/* @__PURE__ */ a.jsx(be, { children: /* @__PURE__ */ a.jsx(
|
|
1599
|
+
ye,
|
|
1605
1600
|
{
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
"
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
};
|
|
1601
|
+
id: "progress_tracker_steps",
|
|
1602
|
+
values: { currentStep: t, total: e }
|
|
1603
|
+
}
|
|
1604
|
+
) }),
|
|
1605
|
+
/* @__PURE__ */ a.jsx("div", { className: "wrapper", children: /* @__PURE__ */ a.jsx("div", { className: "dots-wrapper", children: new Array(e).fill("").map((n, r) => {
|
|
1606
|
+
const i = r + 1;
|
|
1607
|
+
return /* @__PURE__ */ a.jsxs("div", { className: "dot-wrapper", children: [
|
|
1608
|
+
/* @__PURE__ */ a.jsx(
|
|
1609
|
+
"div",
|
|
1610
|
+
{
|
|
1611
|
+
className: S("dot", {
|
|
1612
|
+
active: i === t,
|
|
1613
|
+
completed: i < t
|
|
1614
|
+
}),
|
|
1615
|
+
"data-testid": "progress-dot"
|
|
1616
|
+
}
|
|
1617
|
+
),
|
|
1618
|
+
/* @__PURE__ */ a.jsx(
|
|
1619
|
+
"div",
|
|
1620
|
+
{
|
|
1621
|
+
className: S("line", {
|
|
1622
|
+
active: i < t
|
|
1623
|
+
})
|
|
1624
|
+
}
|
|
1625
|
+
)
|
|
1626
|
+
] }, r);
|
|
1627
|
+
}) }) })
|
|
1628
|
+
] });
|
|
1632
1629
|
const yl = ({ elementId: t, offset: e = 20 }) => {
|
|
1633
1630
|
const n = G(), r = () => {
|
|
1634
1631
|
const i = document.getElementById(t);
|
|
@@ -1653,7 +1650,7 @@ const yl = ({ elementId: t, offset: e = 20 }) => {
|
|
|
1653
1650
|
};
|
|
1654
1651
|
let st = !1;
|
|
1655
1652
|
const Gi = ({ isOpen: t = !1, isLoading: e = !1, children: n }) => {
|
|
1656
|
-
const r = G(), i = pe(null), [s, o] =
|
|
1653
|
+
const r = G(), i = pe(null), [s, o] = ee("hidden");
|
|
1657
1654
|
ae(() => {
|
|
1658
1655
|
const f = i.current;
|
|
1659
1656
|
if (f)
|
|
@@ -2031,7 +2028,7 @@ function Gn() {
|
|
|
2031
2028
|
return Ne(De);
|
|
2032
2029
|
}
|
|
2033
2030
|
const ss = ({ children: t, user: e }) => /* @__PURE__ */ a.jsx(De.Provider, { value: e, children: t }), Sl = ({ bootstrap: t, children: e, intl: n, showDevTools: r }) => {
|
|
2034
|
-
const [i, s] =
|
|
2031
|
+
const [i, s] = ee({ isLoading: !0 });
|
|
2035
2032
|
return ae(() => {
|
|
2036
2033
|
t().then((o) => {
|
|
2037
2034
|
s({ ...o, isLoading: !1 }), Hi(5e3);
|
|
@@ -2131,7 +2128,7 @@ const Cl = ({
|
|
|
2131
2128
|
text: r,
|
|
2132
2129
|
children: i
|
|
2133
2130
|
}) => {
|
|
2134
|
-
const s = G(), o = pe(null), [c, f] =
|
|
2131
|
+
const s = G(), o = pe(null), [c, f] = ee(""), [l, d] = ee("closed");
|
|
2135
2132
|
ae(() => {
|
|
2136
2133
|
const p = o.current;
|
|
2137
2134
|
if (p)
|
|
@@ -2182,7 +2179,7 @@ const Cl = ({
|
|
|
2182
2179
|
]
|
|
2183
2180
|
}
|
|
2184
2181
|
);
|
|
2185
|
-
},
|
|
2182
|
+
}, _e = () => K.Fragment, cs = ({ children: t }) => /* @__PURE__ */ a.jsx(Ie, { variant: "secondary", children: t }), ls = ["span", "strong", "h1", "h2", "h3", "h4", "h5", "h6", "p"], ds = ({ children: t }) => {
|
|
2186
2183
|
const e = G();
|
|
2187
2184
|
if (!t)
|
|
2188
2185
|
return null;
|
|
@@ -2283,27 +2280,27 @@ const hs = {
|
|
|
2283
2280
|
CaseStudy: cs,
|
|
2284
2281
|
// Override embedded HTML
|
|
2285
2282
|
// Our content team previously used real HTML, which we need to tear out and replace with React components
|
|
2286
|
-
style:
|
|
2283
|
+
style: _e,
|
|
2287
2284
|
details: ds,
|
|
2288
2285
|
div: us,
|
|
2289
2286
|
iframe: fs
|
|
2290
2287
|
},
|
|
2291
2288
|
"text-only": {
|
|
2292
|
-
h1:
|
|
2293
|
-
h2:
|
|
2294
|
-
h3:
|
|
2295
|
-
h4:
|
|
2296
|
-
h5:
|
|
2297
|
-
h6:
|
|
2298
|
-
style:
|
|
2299
|
-
details:
|
|
2300
|
-
div:
|
|
2301
|
-
TextBox:
|
|
2302
|
-
CollapsibleSection:
|
|
2303
|
-
CaseStudy:
|
|
2304
|
-
blockquote:
|
|
2305
|
-
iframe:
|
|
2306
|
-
button:
|
|
2289
|
+
h1: _e,
|
|
2290
|
+
h2: _e,
|
|
2291
|
+
h3: _e,
|
|
2292
|
+
h4: _e,
|
|
2293
|
+
h5: _e,
|
|
2294
|
+
h6: _e,
|
|
2295
|
+
style: _e,
|
|
2296
|
+
details: _e,
|
|
2297
|
+
div: _e,
|
|
2298
|
+
TextBox: _e,
|
|
2299
|
+
CollapsibleSection: _e,
|
|
2300
|
+
CaseStudy: _e,
|
|
2301
|
+
blockquote: _e,
|
|
2302
|
+
iframe: _e,
|
|
2303
|
+
button: _e
|
|
2307
2304
|
}
|
|
2308
2305
|
}, Lt = ({
|
|
2309
2306
|
className: t = "",
|
|
@@ -2469,7 +2466,7 @@ const wr = 256, Ze = ({
|
|
|
2469
2466
|
height: s = wr,
|
|
2470
2467
|
...o
|
|
2471
2468
|
}) => {
|
|
2472
|
-
const [c, f] =
|
|
2469
|
+
const [c, f] = ee(!1), l = pe(null);
|
|
2473
2470
|
ae(() => {
|
|
2474
2471
|
const u = l.current;
|
|
2475
2472
|
if (!u)
|
|
@@ -2774,7 +2771,7 @@ function js() {
|
|
|
2774
2771
|
function V(D) {
|
|
2775
2772
|
return j(D) === p;
|
|
2776
2773
|
}
|
|
2777
|
-
function
|
|
2774
|
+
function X(D) {
|
|
2778
2775
|
return j(D) === n;
|
|
2779
2776
|
}
|
|
2780
2777
|
function re(D) {
|
|
@@ -2786,7 +2783,7 @@ function js() {
|
|
|
2786
2783
|
function oe(D) {
|
|
2787
2784
|
return j(D) === u;
|
|
2788
2785
|
}
|
|
2789
|
-
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = F, ue.ContextProvider = q, ue.Element = R, ue.ForwardRef = O, ue.Fragment = C, ue.Lazy = T, ue.Memo = x, ue.Portal = N, ue.Profiler = I, ue.StrictMode = W, ue.Suspense = A, ue.isAsyncMode = J, ue.isConcurrentMode = k, ue.isContextConsumer = P, ue.isContextProvider = z, ue.isElement = B, ue.isForwardRef = H, ue.isFragment = te, ue.isLazy = Y, ue.isMemo = V, ue.isPortal =
|
|
2786
|
+
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = F, ue.ContextProvider = q, ue.Element = R, ue.ForwardRef = O, ue.Fragment = C, ue.Lazy = T, ue.Memo = x, ue.Portal = N, ue.Profiler = I, ue.StrictMode = W, ue.Suspense = A, ue.isAsyncMode = J, ue.isConcurrentMode = k, ue.isContextConsumer = P, ue.isContextProvider = z, ue.isElement = B, ue.isForwardRef = H, ue.isFragment = te, ue.isLazy = Y, ue.isMemo = V, ue.isPortal = X, ue.isProfiler = re, ue.isStrictMode = M, ue.isSuspense = oe, ue.isValidElementType = E, ue.typeOf = j;
|
|
2790
2787
|
}()), ue;
|
|
2791
2788
|
}
|
|
2792
2789
|
var Er;
|
|
@@ -2963,31 +2960,31 @@ function Ss() {
|
|
|
2963
2960
|
function _(k) {
|
|
2964
2961
|
if (process.env.NODE_ENV !== "production")
|
|
2965
2962
|
var P = {}, z = 0;
|
|
2966
|
-
function B(te, Y, V,
|
|
2967
|
-
if (
|
|
2963
|
+
function B(te, Y, V, X, re, M, oe) {
|
|
2964
|
+
if (X = X || m, M = M || V, oe !== n) {
|
|
2968
2965
|
if (f) {
|
|
2969
2966
|
var D = new Error(
|
|
2970
2967
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
2971
2968
|
);
|
|
2972
2969
|
throw D.name = "Invariant Violation", D;
|
|
2973
2970
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
2974
|
-
var ve =
|
|
2971
|
+
var ve = X + ":" + V;
|
|
2975
2972
|
!P[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
2976
2973
|
z < 3 && (s(
|
|
2977
|
-
"You are manually calling a React.PropTypes validation function for the `" + M + "` prop on `" +
|
|
2974
|
+
"You are manually calling a React.PropTypes validation function for the `" + M + "` prop on `" + X + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
2978
2975
|
), P[ve] = !0, z++);
|
|
2979
2976
|
}
|
|
2980
2977
|
}
|
|
2981
|
-
return Y[V] == null ? te ? Y[V] === null ? new y("The " + re + " `" + M + "` is marked as required " + ("in `" +
|
|
2978
|
+
return Y[V] == null ? te ? Y[V] === null ? new y("The " + re + " `" + M + "` is marked as required " + ("in `" + X + "`, but its value is `null`.")) : new y("The " + re + " `" + M + "` is marked as required in " + ("`" + X + "`, but its value is `undefined`.")) : null : k(Y, V, X, re, M);
|
|
2982
2979
|
}
|
|
2983
2980
|
var H = B.bind(null, !1);
|
|
2984
2981
|
return H.isRequired = B.bind(null, !0), H;
|
|
2985
2982
|
}
|
|
2986
2983
|
function v(k) {
|
|
2987
2984
|
function P(z, B, H, te, Y, V) {
|
|
2988
|
-
var
|
|
2985
|
+
var X = z[B], re = W(X);
|
|
2989
2986
|
if (re !== k) {
|
|
2990
|
-
var M = A(
|
|
2987
|
+
var M = A(X);
|
|
2991
2988
|
return new y(
|
|
2992
2989
|
"Invalid " + te + " `" + Y + "` of type " + ("`" + M + "` supplied to `" + H + "`, expected ") + ("`" + k + "`."),
|
|
2993
2990
|
{ expectedType: k }
|
|
@@ -3006,8 +3003,8 @@ function Ss() {
|
|
|
3006
3003
|
return new y("Property `" + Y + "` of component `" + H + "` has invalid PropType notation inside arrayOf.");
|
|
3007
3004
|
var V = z[B];
|
|
3008
3005
|
if (!Array.isArray(V)) {
|
|
3009
|
-
var
|
|
3010
|
-
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" +
|
|
3006
|
+
var X = W(V);
|
|
3007
|
+
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected an array."));
|
|
3011
3008
|
}
|
|
3012
3009
|
for (var re = 0; re < V.length; re++) {
|
|
3013
3010
|
var M = k(V, re, H, te, Y + "[" + re + "]", n);
|
|
@@ -3043,8 +3040,8 @@ function Ss() {
|
|
|
3043
3040
|
function U(k) {
|
|
3044
3041
|
function P(z, B, H, te, Y) {
|
|
3045
3042
|
if (!(z[B] instanceof k)) {
|
|
3046
|
-
var V = k.name || m,
|
|
3047
|
-
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" +
|
|
3043
|
+
var V = k.name || m, X = J(z[B]);
|
|
3044
|
+
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected ") + ("instance of `" + V + "`."));
|
|
3048
3045
|
}
|
|
3049
3046
|
return null;
|
|
3050
3047
|
}
|
|
@@ -3056,8 +3053,8 @@ function Ss() {
|
|
|
3056
3053
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
3057
3054
|
) : s("Invalid argument supplied to oneOf, expected an array.")), o;
|
|
3058
3055
|
function P(z, B, H, te, Y) {
|
|
3059
|
-
for (var V = z[B],
|
|
3060
|
-
if (g(V, k[
|
|
3056
|
+
for (var V = z[B], X = 0; X < k.length; X++)
|
|
3057
|
+
if (g(V, k[X]))
|
|
3061
3058
|
return null;
|
|
3062
3059
|
var re = JSON.stringify(k, function(oe, D) {
|
|
3063
3060
|
var ve = A(D);
|
|
@@ -3071,9 +3068,9 @@ function Ss() {
|
|
|
3071
3068
|
function P(z, B, H, te, Y) {
|
|
3072
3069
|
if (typeof k != "function")
|
|
3073
3070
|
return new y("Property `" + Y + "` of component `" + H + "` has invalid PropType notation inside objectOf.");
|
|
3074
|
-
var V = z[B],
|
|
3075
|
-
if (
|
|
3076
|
-
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" +
|
|
3071
|
+
var V = z[B], X = W(V);
|
|
3072
|
+
if (X !== "object")
|
|
3073
|
+
return new y("Invalid " + te + " `" + Y + "` of type " + ("`" + X + "` supplied to `" + H + "`, expected an object."));
|
|
3077
3074
|
for (var re in V)
|
|
3078
3075
|
if (r(V, re)) {
|
|
3079
3076
|
var M = k(V, re, H, te, Y + "." + re, n);
|
|
@@ -3094,15 +3091,15 @@ function Ss() {
|
|
|
3094
3091
|
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Z(z) + " at index " + P + "."
|
|
3095
3092
|
), o;
|
|
3096
3093
|
}
|
|
3097
|
-
function B(H, te, Y, V,
|
|
3094
|
+
function B(H, te, Y, V, X) {
|
|
3098
3095
|
for (var re = [], M = 0; M < k.length; M++) {
|
|
3099
|
-
var oe = k[M], D = oe(H, te, Y, V,
|
|
3096
|
+
var oe = k[M], D = oe(H, te, Y, V, X, n);
|
|
3100
3097
|
if (D == null)
|
|
3101
3098
|
return null;
|
|
3102
3099
|
D.data && r(D.data, "expectedType") && re.push(D.data.expectedType);
|
|
3103
3100
|
}
|
|
3104
3101
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
3105
|
-
return new y("Invalid " + V + " `" +
|
|
3102
|
+
return new y("Invalid " + V + " `" + X + "` supplied to " + ("`" + Y + "`" + ve + "."));
|
|
3106
3103
|
}
|
|
3107
3104
|
return _(B);
|
|
3108
3105
|
}
|
|
@@ -3119,9 +3116,9 @@ function Ss() {
|
|
|
3119
3116
|
}
|
|
3120
3117
|
function T(k) {
|
|
3121
3118
|
function P(z, B, H, te, Y) {
|
|
3122
|
-
var V = z[B],
|
|
3123
|
-
if (
|
|
3124
|
-
return new y("Invalid " + te + " `" + Y + "` of type `" +
|
|
3119
|
+
var V = z[B], X = W(V);
|
|
3120
|
+
if (X !== "object")
|
|
3121
|
+
return new y("Invalid " + te + " `" + Y + "` of type `" + X + "` " + ("supplied to `" + H + "`, expected `object`."));
|
|
3125
3122
|
for (var re in k) {
|
|
3126
3123
|
var M = k[re];
|
|
3127
3124
|
if (typeof M != "function")
|
|
@@ -3136,9 +3133,9 @@ function Ss() {
|
|
|
3136
3133
|
}
|
|
3137
3134
|
function x(k) {
|
|
3138
3135
|
function P(z, B, H, te, Y) {
|
|
3139
|
-
var V = z[B],
|
|
3140
|
-
if (
|
|
3141
|
-
return new y("Invalid " + te + " `" + Y + "` of type `" +
|
|
3136
|
+
var V = z[B], X = W(V);
|
|
3137
|
+
if (X !== "object")
|
|
3138
|
+
return new y("Invalid " + te + " `" + Y + "` of type `" + X + "` " + ("supplied to `" + H + "`, expected `object`."));
|
|
3142
3139
|
var re = e({}, z[B], k);
|
|
3143
3140
|
for (var M in re) {
|
|
3144
3141
|
var oe = k[M];
|
|
@@ -4279,7 +4276,7 @@ const en = ({
|
|
|
4279
4276
|
className: d = "",
|
|
4280
4277
|
gtmContext: u = "Modal"
|
|
4281
4278
|
}) => {
|
|
4282
|
-
const m = G(), [p, g] =
|
|
4279
|
+
const m = G(), [p, g] = ee(e), y = (b) => {
|
|
4283
4280
|
b.key === "Escape" && _(!1);
|
|
4284
4281
|
};
|
|
4285
4282
|
ae(() => (window.addEventListener("keyup", y), () => {
|
|
@@ -4339,13 +4336,13 @@ const Ct = "emailHelperTextBox_", wo = ({
|
|
|
4339
4336
|
redirectPath: n,
|
|
4340
4337
|
resendVerificationCode: r
|
|
4341
4338
|
}) => {
|
|
4342
|
-
const i = G(), [s, o] =
|
|
4339
|
+
const i = G(), [s, o] = ee({
|
|
4343
4340
|
path: `${Ct}default`,
|
|
4344
4341
|
type: "default",
|
|
4345
4342
|
link: {},
|
|
4346
4343
|
mail: {},
|
|
4347
4344
|
error: ""
|
|
4348
|
-
}), [c, f] =
|
|
4345
|
+
}), [c, f] = ee(!1), l = Jr(
|
|
4349
4346
|
(p) => {
|
|
4350
4347
|
p.preventDefault(), p.stopPropagation();
|
|
4351
4348
|
const g = (y) => {
|
|
@@ -4520,11 +4517,11 @@ const Ye = {
|
|
|
4520
4517
|
}) => {
|
|
4521
4518
|
const { onChange: r = () => {
|
|
4522
4519
|
}, onKeyInput: i = async () => {
|
|
4523
|
-
} } = n, [{ input: s, displayInput: o, debouncedInput: c }, f] =
|
|
4520
|
+
} } = n, [{ input: s, displayInput: o, debouncedInput: c }, f] = ee({
|
|
4524
4521
|
input: t,
|
|
4525
4522
|
displayInput: t,
|
|
4526
4523
|
debouncedInput: t
|
|
4527
|
-
}), [{ predictions: l, activePredictionIndex: d, isPredictionSelected: u }, m] =
|
|
4524
|
+
}), [{ predictions: l, activePredictionIndex: d, isPredictionSelected: u }, m] = ee({
|
|
4528
4525
|
predictions: [],
|
|
4529
4526
|
activePredictionIndex: -1,
|
|
4530
4527
|
isPredictionSelected: !!t
|
|
@@ -4655,7 +4652,7 @@ const Eo = ({
|
|
|
4655
4652
|
multiSelectOptions: f,
|
|
4656
4653
|
id: l
|
|
4657
4654
|
}) => {
|
|
4658
|
-
const d = G(), [u, m] =
|
|
4655
|
+
const d = G(), [u, m] = ee(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [y, _] = ee(g);
|
|
4659
4656
|
let v;
|
|
4660
4657
|
Array.isArray(y) && y.length === 1 && typeof y[0] == "string" ? v = e && y ? e.find((F) => F.id === y[0]) : e ? e[0] : { id: "", label: "" } : Array.isArray(y) && y.length === 1 && typeof y[0] != "string" ? v = y[0] : v = { id: "", label: "" }, ae(() => {
|
|
4661
4658
|
_(g);
|
|
@@ -4857,7 +4854,7 @@ const Co = ({
|
|
|
4857
4854
|
gtm: { context: n } = { context: void 0 },
|
|
4858
4855
|
...r
|
|
4859
4856
|
}) => {
|
|
4860
|
-
const i = G(), s = pe(), o = t || s, [c, f] =
|
|
4857
|
+
const i = G(), s = pe(), o = t || s, [c, f] = ee(!1), [l, d] = ee(e), u = () => {
|
|
4861
4858
|
var m;
|
|
4862
4859
|
f(!c), d(c ? "password" : "text"), (m = o.current) == null || m.focus();
|
|
4863
4860
|
};
|
|
@@ -5347,7 +5344,7 @@ const $l = ({
|
|
|
5347
5344
|
className: s = "",
|
|
5348
5345
|
hasLoaded: o = !1
|
|
5349
5346
|
}) => {
|
|
5350
|
-
const c = G(), [f, l] =
|
|
5347
|
+
const c = G(), [f, l] = ee({
|
|
5351
5348
|
setUp: !1,
|
|
5352
5349
|
id: null,
|
|
5353
5350
|
rating: null,
|
|
@@ -5429,7 +5426,7 @@ const Rl = ({
|
|
|
5429
5426
|
isDisabled: s = !1,
|
|
5430
5427
|
className: o = ""
|
|
5431
5428
|
}) => {
|
|
5432
|
-
const [c, f] =
|
|
5429
|
+
const [c, f] = ee(
|
|
5433
5430
|
typeof r == "boolean" || typeof r == "string" ? r : n[0].value
|
|
5434
5431
|
);
|
|
5435
5432
|
ae(() => {
|
|
@@ -5479,7 +5476,7 @@ const Rl = ({
|
|
|
5479
5476
|
);
|
|
5480
5477
|
};
|
|
5481
5478
|
function Ml({ className: t = "", userId: e, userName: n, src: r, setUserImage: i, uploadImage: s }) {
|
|
5482
|
-
const [o, c] =
|
|
5479
|
+
const [o, c] = ee(!1), [f, l] = ee(!1), d = pe(null), u = async (m) => {
|
|
5483
5480
|
c(!0), l(!1);
|
|
5484
5481
|
try {
|
|
5485
5482
|
const p = m.target.files && m.target.files[0];
|
|
@@ -5502,7 +5499,7 @@ function Ml({ className: t = "", userId: e, userName: n, src: r, setUserImage: i
|
|
|
5502
5499
|
};
|
|
5503
5500
|
return /* @__PURE__ */ a.jsxs("div", { className: S("profile-image-change-figure", t), children: [
|
|
5504
5501
|
/* @__PURE__ */ a.jsx(Ze, { className: "profile-image-change-picture", name: n, src: r, "data-testid": "profile-picture" }),
|
|
5505
|
-
f && /* @__PURE__ */ a.jsx("p", { className: "error text-small", children: /* @__PURE__ */ a.jsx(
|
|
5502
|
+
f && /* @__PURE__ */ a.jsx("p", { className: "error text-small", children: /* @__PURE__ */ a.jsx(ye, { id: "profile_image_change_error" }) }),
|
|
5506
5503
|
/* @__PURE__ */ a.jsx(
|
|
5507
5504
|
"input",
|
|
5508
5505
|
{
|
|
@@ -5524,7 +5521,7 @@ function Ml({ className: t = "", userId: e, userName: n, src: r, setUserImage: i
|
|
|
5524
5521
|
"data-gtm-event-type": `${r ? "change-photo" : "add-photo"}-click`,
|
|
5525
5522
|
className: "gtm-trackable",
|
|
5526
5523
|
disabled: o,
|
|
5527
|
-
children: /* @__PURE__ */ a.jsx(
|
|
5524
|
+
children: /* @__PURE__ */ a.jsx(ye, { id: o ? "profile_image_change_uploading_text" : r ? "profile_image_change_cta_with_picture" : "profile_image_change_cta_without_picture" })
|
|
5528
5525
|
}
|
|
5529
5526
|
)
|
|
5530
5527
|
] });
|
|
@@ -5590,7 +5587,7 @@ const Oo = ({
|
|
|
5590
5587
|
initialFormStatus: l = "NOT_SUBMITTED"
|
|
5591
5588
|
/* NOT_SUBMITTED */
|
|
5592
5589
|
}) => {
|
|
5593
|
-
const [d, u] =
|
|
5590
|
+
const [d, u] = ee([]), [m, p] = ee(!0), [g, y] = ee(l), { formatMessage: _ } = G(), v = async (j) => {
|
|
5594
5591
|
j.preventDefault();
|
|
5595
5592
|
try {
|
|
5596
5593
|
await f(d), u([]), y(
|
|
@@ -5675,7 +5672,7 @@ const Oo = ({
|
|
|
5675
5672
|
CONFIRMED_PASSWORD: "confirmedPassword",
|
|
5676
5673
|
CURRENT_PASSWORD: "oldPassword"
|
|
5677
5674
|
}, Fl = ({ functions: t, ...e }) => {
|
|
5678
|
-
const { formatMessage: n } = G(), [r, i] =
|
|
5675
|
+
const { formatMessage: n } = G(), [r, i] = ee(null), [s, o] = ee(!1), [c, f] = ee({
|
|
5679
5676
|
isMoreThanEightCharacters: !1,
|
|
5680
5677
|
includesNumberAndSymbol: !1,
|
|
5681
5678
|
includesLowerAndUppercase: !1
|
|
@@ -5685,7 +5682,7 @@ const Oo = ({
|
|
|
5685
5682
|
id: Te.NEW_PASSWORD,
|
|
5686
5683
|
type: "password",
|
|
5687
5684
|
autoComplete: "password",
|
|
5688
|
-
placeholder: "
|
|
5685
|
+
placeholder: "",
|
|
5689
5686
|
label: n({ id: "passwordRules_newPassword_label" }),
|
|
5690
5687
|
validation: xn(["required", d]),
|
|
5691
5688
|
functions: {
|
|
@@ -5699,7 +5696,7 @@ const Oo = ({
|
|
|
5699
5696
|
id: Te.CONFIRMED_PASSWORD,
|
|
5700
5697
|
type: "password",
|
|
5701
5698
|
autoComplete: "password",
|
|
5702
|
-
placeholder: "
|
|
5699
|
+
placeholder: "",
|
|
5703
5700
|
label: n({ id: "passwordRules_confirmPassword_label" }),
|
|
5704
5701
|
validation: xn(["required", l])
|
|
5705
5702
|
}
|
|
@@ -5708,7 +5705,7 @@ const Oo = ({
|
|
|
5708
5705
|
"data-testid": Te.CURRENT_PASSWORD,
|
|
5709
5706
|
id: Te.CURRENT_PASSWORD,
|
|
5710
5707
|
type: "password",
|
|
5711
|
-
placeholder: "
|
|
5708
|
+
placeholder: "",
|
|
5712
5709
|
label: n({ id: "passwordRules_currentPassword_label" }),
|
|
5713
5710
|
validation: xn(["required"])
|
|
5714
5711
|
}), s && u.push({
|
|
@@ -6045,9 +6042,9 @@ const Bo = ({ className: t = "" }) => /* @__PURE__ */ a.jsxs(
|
|
|
6045
6042
|
className: S("success-message", t),
|
|
6046
6043
|
"data-testid": "success-message",
|
|
6047
6044
|
children: [
|
|
6048
|
-
/* @__PURE__ */ a.jsx("p", { className: "success-title", children: /* @__PURE__ */ a.jsx(
|
|
6045
|
+
/* @__PURE__ */ a.jsx("p", { className: "success-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_success_title" }) }),
|
|
6049
6046
|
/* @__PURE__ */ a.jsx(
|
|
6050
|
-
|
|
6047
|
+
ye,
|
|
6051
6048
|
{
|
|
6052
6049
|
id: "signup_success_text",
|
|
6053
6050
|
values: {
|
|
@@ -6137,7 +6134,7 @@ const qo = {
|
|
|
6137
6134
|
className: S("signup-form-fieldset", t),
|
|
6138
6135
|
"data-testid": "signup-form",
|
|
6139
6136
|
children: [
|
|
6140
|
-
n.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(
|
|
6137
|
+
n.title && /* @__PURE__ */ a.jsx("p", { className: "signup-title", children: /* @__PURE__ */ a.jsx(ye, { id: "signup_title" }) }),
|
|
6141
6138
|
p && /* @__PURE__ */ a.jsx(
|
|
6142
6139
|
ze,
|
|
6143
6140
|
{
|
|
@@ -6242,7 +6239,7 @@ const Dl = ({
|
|
|
6242
6239
|
}
|
|
6243
6240
|
);
|
|
6244
6241
|
const Al = ({ members: t }) => {
|
|
6245
|
-
const [e, n] =
|
|
6242
|
+
const [e, n] = ee(!1), r = (i) => {
|
|
6246
6243
|
const { fullName: s, jobTitle: o, organisation: c, photo: f } = i || {};
|
|
6247
6244
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
6248
6245
|
/* @__PURE__ */ a.jsx(Ze, { name: s, src: f }),
|
|
@@ -6398,7 +6395,7 @@ const Al = ({ members: t }) => {
|
|
|
6398
6395
|
}
|
|
6399
6396
|
}, Uo = ({ data: t, cta: e, link: n, gtmContext: r }) => {
|
|
6400
6397
|
var g;
|
|
6401
|
-
const i = G(), [s, o] =
|
|
6398
|
+
const i = G(), [s, o] = ee({
|
|
6402
6399
|
loading: !1,
|
|
6403
6400
|
registered: t.registered || !1
|
|
6404
6401
|
});
|
|
@@ -6485,7 +6482,7 @@ const Zo = {
|
|
|
6485
6482
|
gtmContext: i = "Carousel",
|
|
6486
6483
|
className: s = ""
|
|
6487
6484
|
}) => {
|
|
6488
|
-
const o = G(), c = Ne(De), f = c && typeof c.id == "string", [l, d] =
|
|
6485
|
+
const o = G(), c = Ne(De), f = c && typeof c.id == "string", [l, d] = ee({
|
|
6489
6486
|
data: null,
|
|
6490
6487
|
isLoading: !0
|
|
6491
6488
|
}), { data: u, isLoading: m } = l, p = Jr(() => {
|
|
@@ -6639,10 +6636,10 @@ const Ko = ({
|
|
|
6639
6636
|
className: s,
|
|
6640
6637
|
gtmContext: o
|
|
6641
6638
|
}) => {
|
|
6642
|
-
const c = G(), [f, l] =
|
|
6639
|
+
const c = G(), [f, l] = ee({
|
|
6643
6640
|
cardsPerPage: 4,
|
|
6644
6641
|
isLoading: !0
|
|
6645
|
-
}), { cardsPerPage: d, isLoading: u } = f, [m, p] =
|
|
6642
|
+
}), { cardsPerPage: d, isLoading: u } = f, [m, p] = ee({
|
|
6646
6643
|
currentPage: 0,
|
|
6647
6644
|
loadedPages: [0]
|
|
6648
6645
|
}), { currentPage: g, loadedPages: y } = m, _ = e.length, v = Math.ceil(_ / d), b = pe(null), E = yt(!0, !0, b == null ? void 0 : b.current);
|
|
@@ -6819,7 +6816,7 @@ const kn = "joinCommunityButton", Da = ({
|
|
|
6819
6816
|
}, leave: () => {
|
|
6820
6817
|
} }
|
|
6821
6818
|
}) => {
|
|
6822
|
-
const i = G(), s = Ne(De), o = s && typeof s.id == "string", [c, f] =
|
|
6819
|
+
const i = G(), s = Ne(De), o = s && typeof s.id == "string", [c, f] = ee(t), [l, d] = ee(t ? "joined" : "notJoined");
|
|
6823
6820
|
ae(() => {
|
|
6824
6821
|
l === "joining" ? d("joined") : l === "leaving" && d("notJoined");
|
|
6825
6822
|
}, [c]);
|
|
@@ -6930,7 +6927,7 @@ const ql = ({
|
|
|
6930
6927
|
text: typeof e != "boolean" && e.text || s.formatMessage({ id: "filters_all" })
|
|
6931
6928
|
},
|
|
6932
6929
|
...t
|
|
6933
|
-
] : t, [c, f] =
|
|
6930
|
+
] : t, [c, f] = ee(e ? ["all"] : []), l = (d, u) => {
|
|
6934
6931
|
let m = [];
|
|
6935
6932
|
c.includes(d) ? m = c.filter((p) => p !== d) : d === "all" ? m = ["all"] : n ? m = [...c.filter((p) => p !== "all"), d] : m = [d], f((p) => (r && typeof r == "function" && r({ current: m, previous: p }), m)), u && typeof u == "function" && u();
|
|
6936
6933
|
};
|
|
@@ -6978,7 +6975,7 @@ const Tn = {
|
|
|
6978
6975
|
label: c,
|
|
6979
6976
|
className: f = ""
|
|
6980
6977
|
}) => {
|
|
6981
|
-
const l = G(), [d, u] =
|
|
6978
|
+
const l = G(), [d, u] = ee(t);
|
|
6982
6979
|
if (ae(() => {
|
|
6983
6980
|
t !== d && u(t);
|
|
6984
6981
|
}, [t]), !r || !Object.values(r).some(
|
|
@@ -7041,7 +7038,7 @@ const En = vi({ locale: "en", messages: Kn }), nn = ({
|
|
|
7041
7038
|
className: c = "",
|
|
7042
7039
|
gtmContext: f = "LoadMore"
|
|
7043
7040
|
}) => {
|
|
7044
|
-
const [l, d] =
|
|
7041
|
+
const [l, d] = ee(""), u = async (m) => {
|
|
7045
7042
|
try {
|
|
7046
7043
|
await e(m);
|
|
7047
7044
|
} catch (p) {
|
|
@@ -7075,7 +7072,7 @@ const Aa = ({
|
|
|
7075
7072
|
href: "/home/",
|
|
7076
7073
|
className: S("logo", t, e, n),
|
|
7077
7074
|
...r,
|
|
7078
|
-
children: /* @__PURE__ */ a.jsx(be, { children: /* @__PURE__ */ a.jsx(
|
|
7075
|
+
children: /* @__PURE__ */ a.jsx(be, { children: /* @__PURE__ */ a.jsx(ye, { id: "apolitical" }) })
|
|
7079
7076
|
}
|
|
7080
7077
|
) });
|
|
7081
7078
|
let Rt = !1;
|
|
@@ -7087,7 +7084,7 @@ const Qo = ({
|
|
|
7087
7084
|
}) => {
|
|
7088
7085
|
const i = G(), s = pe(
|
|
7089
7086
|
null
|
|
7090
|
-
), [o, c] =
|
|
7087
|
+
), [o, c] = ee(!1), f = (l) => {
|
|
7091
7088
|
s.current && l.target instanceof HTMLElement && !s.current.contains(l.target) && c(!1);
|
|
7092
7089
|
};
|
|
7093
7090
|
return ae(() => (document.addEventListener("click", f, !0), () => {
|
|
@@ -7288,7 +7285,7 @@ const zl = ({ tabs: t, className: e = "", preventLocationChange: n }) => {
|
|
|
7288
7285
|
}
|
|
7289
7286
|
}
|
|
7290
7287
|
}
|
|
7291
|
-
const [s, o] =
|
|
7288
|
+
const [s, o] = ee(
|
|
7292
7289
|
(l = t[i]) != null && l.id ? t[i].id : r(t[i].id, t[i].text, i)
|
|
7293
7290
|
);
|
|
7294
7291
|
ae(() => {
|
|
@@ -7365,7 +7362,7 @@ const Cn = "contactFooter_", Zl = ({ onSuccess: t = async () => {
|
|
|
7365
7362
|
return ae(() => (c(), window.addEventListener("resize", f), () => {
|
|
7366
7363
|
clearTimeout(Sn), window.removeEventListener("resize", f);
|
|
7367
7364
|
}), []), /* @__PURE__ */ a.jsx(nt, { id: "contactForm", className: "contact-footer", children: /* @__PURE__ */ a.jsxs("div", { className: "inner-wrapper", children: [
|
|
7368
|
-
/* @__PURE__ */ a.jsx("h2", { children: /* @__PURE__ */ a.jsx(
|
|
7365
|
+
/* @__PURE__ */ a.jsx("h2", { children: /* @__PURE__ */ a.jsx(ye, { id: `${Cn}title` }) }),
|
|
7369
7366
|
/* @__PURE__ */ a.jsxs(
|
|
7370
7367
|
"div",
|
|
7371
7368
|
{
|
|
@@ -7375,8 +7372,8 @@ const Cn = "contactFooter_", Zl = ({ onSuccess: t = async () => {
|
|
|
7375
7372
|
style: s ? {} : { minHeight: r },
|
|
7376
7373
|
children: [
|
|
7377
7374
|
/* @__PURE__ */ a.jsxs("aside", { children: [
|
|
7378
|
-
/* @__PURE__ */ a.jsx("p", { children: /* @__PURE__ */ a.jsx(
|
|
7379
|
-
/* @__PURE__ */ a.jsx(wt, { className: "mailto-link", href: "mailto:hello@apolitical.co", children: /* @__PURE__ */ a.jsx(
|
|
7375
|
+
/* @__PURE__ */ a.jsx("p", { children: /* @__PURE__ */ a.jsx(ye, { id: `${Cn}text` }) }),
|
|
7376
|
+
/* @__PURE__ */ a.jsx(wt, { className: "mailto-link", href: "mailto:hello@apolitical.co", children: /* @__PURE__ */ a.jsx(ye, { id: `${Cn}email` }) })
|
|
7380
7377
|
] }),
|
|
7381
7378
|
/* @__PURE__ */ a.jsx(
|
|
7382
7379
|
Fo,
|
|
@@ -7398,7 +7395,7 @@ const Nn = "cookieBanner_", Pn = [
|
|
|
7398
7395
|
"apolitical-performance-cookie-consent",
|
|
7399
7396
|
"functional-cookie-consent"
|
|
7400
7397
|
], $n = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), ic = () => {
|
|
7401
|
-
const t = G(), [e, n, r] = ea(Pn), [i, s] =
|
|
7398
|
+
const t = G(), [e, n, r] = ea(Pn), [i, s] = ee(
|
|
7402
7399
|
!e["apol-cookie-banner"]
|
|
7403
7400
|
), o = () => {
|
|
7404
7401
|
Pn.forEach((d) => {
|
|
@@ -7542,7 +7539,7 @@ const Ge = "footer_", Yt = "SiteFooter", Wr = ({ group: t }) => {
|
|
|
7542
7539
|
const e = Me[t].order || [];
|
|
7543
7540
|
let n = !1;
|
|
7544
7541
|
return "text" in Me[t] && (n = Me[t].text), /* @__PURE__ */ a.jsxs(gt, { children: [
|
|
7545
|
-
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(
|
|
7542
|
+
/* @__PURE__ */ a.jsx("p", { className: "pre-title", children: /* @__PURE__ */ a.jsx(ye, { id: `${Ge}${t}` }) }),
|
|
7546
7543
|
Array.isArray(e) && e.length > 0 && /* @__PURE__ */ a.jsx("ul", { className: "text-medium", children: e.map((r) => {
|
|
7547
7544
|
if (["order", "child", "text"].includes(r))
|
|
7548
7545
|
return null;
|
|
@@ -7555,15 +7552,15 @@ const Ge = "footer_", Yt = "SiteFooter", Wr = ({ group: t }) => {
|
|
|
7555
7552
|
"data-gtm-event-context": Yt,
|
|
7556
7553
|
"data-gtm-event-type": s,
|
|
7557
7554
|
...o,
|
|
7558
|
-
children: /* @__PURE__ */ a.jsx(
|
|
7555
|
+
children: /* @__PURE__ */ a.jsx(ye, { id: `${Ge}${t}_${r}` })
|
|
7559
7556
|
}
|
|
7560
7557
|
) }, `${t}_${r}`);
|
|
7561
7558
|
}) }),
|
|
7562
7559
|
typeof n != "boolean" && "order" in n && Array.isArray(n.order) && /* @__PURE__ */ a.jsx("dl", { className: "text-medium", children: n.order.map((r) => /* @__PURE__ */ a.jsxs(gt, { children: [
|
|
7563
|
-
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(
|
|
7560
|
+
/* @__PURE__ */ a.jsx("dt", { children: /* @__PURE__ */ a.jsx(ye, { id: `${Ge}${t}_${r}` }) }),
|
|
7564
7561
|
/* @__PURE__ */ a.jsxs("dd", { children: [
|
|
7565
7562
|
typeof n != "boolean" && n[r].address && /* @__PURE__ */ a.jsx("address", { children: /* @__PURE__ */ a.jsx(
|
|
7566
|
-
|
|
7563
|
+
ye,
|
|
7567
7564
|
{
|
|
7568
7565
|
id: `${Ge}${t}_${r}_address`,
|
|
7569
7566
|
values: { br: /* @__PURE__ */ a.jsx("br", {}) }
|
|
@@ -7611,12 +7608,12 @@ const Ge = "footer_", Yt = "SiteFooter", Wr = ({ group: t }) => {
|
|
|
7611
7608
|
className: "gtm-trackable",
|
|
7612
7609
|
"data-gtm-event-context": Yt,
|
|
7613
7610
|
"data-gtm-event-type": "social-click",
|
|
7614
|
-
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(
|
|
7611
|
+
children: /* @__PURE__ */ a.jsx("span", { className: "hidden", children: /* @__PURE__ */ a.jsx(ye, { id: `${Ge}social_${t}` }) })
|
|
7615
7612
|
}
|
|
7616
7613
|
) }, t);
|
|
7617
7614
|
}) }),
|
|
7618
7615
|
/* @__PURE__ */ a.jsx("small", { children: /* @__PURE__ */ a.jsx(
|
|
7619
|
-
|
|
7616
|
+
ye,
|
|
7620
7617
|
{
|
|
7621
7618
|
id: `${Ge}copyright`,
|
|
7622
7619
|
values: { currentYear: (/* @__PURE__ */ new Date()).getFullYear() }
|
|
@@ -8301,9 +8298,9 @@ const we = "discussion_form_", er = ({
|
|
|
8301
8298
|
gtmContext: l = "DiscussionForm"
|
|
8302
8299
|
}) => {
|
|
8303
8300
|
var O, C, T;
|
|
8304
|
-
const d = G(), u = Ne(De), [m, p] =
|
|
8301
|
+
const d = G(), u = Ne(De), [m, p] = ee(
|
|
8305
8302
|
n.isEditing && n.isEditing.text || ""
|
|
8306
|
-
), [g, y] =
|
|
8303
|
+
), [g, y] = ee(c.error || !1), [_, v] = ee(!1), b = pe(null);
|
|
8307
8304
|
if (r || (r = b), n.isLoading)
|
|
8308
8305
|
return /* @__PURE__ */ a.jsx(
|
|
8309
8306
|
Ee,
|
|
@@ -8518,7 +8515,7 @@ const we = "discussion_form_", er = ({
|
|
|
8518
8515
|
}, dc = {
|
|
8519
8516
|
showForm: !1
|
|
8520
8517
|
}, tr = Zn(dc), uc = ({ children: t }) => {
|
|
8521
|
-
const [e, n] =
|
|
8518
|
+
const [e, n] = ee({
|
|
8522
8519
|
showForm: !1
|
|
8523
8520
|
});
|
|
8524
8521
|
return /* @__PURE__ */ a.jsx(tr.Provider, { value: { ...e, updateConversation: n }, children: t });
|
|
@@ -8550,7 +8547,7 @@ const Mn = () => {
|
|
|
8550
8547
|
ae(() => {
|
|
8551
8548
|
p(i);
|
|
8552
8549
|
}, [i]);
|
|
8553
|
-
const [d, u] =
|
|
8550
|
+
const [d, u] = ee(e), [m, p] = ee(i), [g, y] = ee(!1), [_, v] = ee(!1), b = bt(
|
|
8554
8551
|
() => mc(n, Fn),
|
|
8555
8552
|
[n]
|
|
8556
8553
|
), E = (w) => {
|
|
@@ -8687,14 +8684,14 @@ const Re = "discussion_", hc = 280, an = ({
|
|
|
8687
8684
|
children: y,
|
|
8688
8685
|
isTruncated: _ = !1
|
|
8689
8686
|
}) => {
|
|
8690
|
-
const v = G(), b = Ne(De), E = Ne(tr), { author: j, canLike: w, createdAt: U, id: F, likes: q = 0, userLiked: R, comments: O = 0 } = e, C = b && b.id && typeof j != "string" && j.id && j.id === b.id || !1, T = typeof w == "boolean" ? w : n ? !C : !1, x = C && (!e.createdAt || Li(e.createdAt, 10, "seconds")), N = pe(null), [I, W] =
|
|
8687
|
+
const v = G(), b = Ne(De), E = Ne(tr), { author: j, canLike: w, createdAt: U, id: F, likes: q = 0, userLiked: R, comments: O = 0 } = e, C = b && b.id && typeof j != "string" && j.id && j.id === b.id || !1, T = typeof w == "boolean" ? w : n ? !C : !1, x = C && (!e.createdAt || Li(e.createdAt, 10, "seconds")), N = pe(null), [I, W] = ee({
|
|
8691
8688
|
body: e && e.body || "",
|
|
8692
8689
|
isEditing: !1,
|
|
8693
8690
|
didEdit: e && e.isEdited || !1
|
|
8694
|
-
}), [A, Z] =
|
|
8691
|
+
}), [A, Z] = ee(!1), [J, k] = ee(
|
|
8695
8692
|
x ? "highlighted" : "default"
|
|
8696
8693
|
/* Default */
|
|
8697
|
-
), [P, z] =
|
|
8694
|
+
), [P, z] = ee("");
|
|
8698
8695
|
ae(() => {
|
|
8699
8696
|
const M = N.current;
|
|
8700
8697
|
if (!(!M || J === "default"))
|
|
@@ -8737,7 +8734,7 @@ const Re = "discussion_", hc = 280, an = ({
|
|
|
8737
8734
|
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Se = e.slugs) == null ? void 0 : Se.answer) || ((Be = e.slugs) == null ? void 0 : Be.question) || "").toLowerCase().slice(-15)}`, D = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
8738
8735
|
ve && ve.focus(), D && D.scrollIntoView({ behavior: "smooth" });
|
|
8739
8736
|
}, 0);
|
|
8740
|
-
},
|
|
8737
|
+
}, X = async () => {
|
|
8741
8738
|
Z(!1);
|
|
8742
8739
|
try {
|
|
8743
8740
|
await c(zr(e.slugs));
|
|
@@ -8975,13 +8972,13 @@ const Re = "discussion_", hc = 280, an = ({
|
|
|
8975
8972
|
{
|
|
8976
8973
|
variant: "primary",
|
|
8977
8974
|
className: "destructive",
|
|
8978
|
-
onClick:
|
|
8975
|
+
onClick: X,
|
|
8979
8976
|
children: v.formatMessage({ id: "discussion_delete_delete" })
|
|
8980
8977
|
}
|
|
8981
8978
|
],
|
|
8982
8979
|
gtmContext: `${e.type.charAt(0).toUpperCase()}${e.type.slice(1)}:${e.slug}`,
|
|
8983
8980
|
children: /* @__PURE__ */ a.jsx(
|
|
8984
|
-
|
|
8981
|
+
ye,
|
|
8985
8982
|
{
|
|
8986
8983
|
id: "discussion_delete_text",
|
|
8987
8984
|
values: {
|
|
@@ -10468,12 +10465,12 @@ const Yc = ({
|
|
|
10468
10465
|
latest_children: E,
|
|
10469
10466
|
children_counts: j
|
|
10470
10467
|
} = _, U = (((I = b == null ? void 0 : b.like) == null ? void 0 : I.length) || 0) > 0 ? (W = b == null ? void 0 : b.like) == null ? void 0 : W.find((V) => {
|
|
10471
|
-
var
|
|
10472
|
-
return ((
|
|
10468
|
+
var X;
|
|
10469
|
+
return ((X = V == null ? void 0 : V.user) == null ? void 0 : X.id) === (y == null ? void 0 : y.id);
|
|
10473
10470
|
}) : !1, F = U ? U == null ? void 0 : U.id : "", q = !!U, O = (((A = E == null ? void 0 : E.like) == null ? void 0 : A.length) || 0) > 0 ? (Z = E == null ? void 0 : E.like) == null ? void 0 : Z.map((V) => {
|
|
10474
|
-
var
|
|
10471
|
+
var X, re, M;
|
|
10475
10472
|
return {
|
|
10476
|
-
id: (
|
|
10473
|
+
id: (X = V == null ? void 0 : V.user) == null ? void 0 : X.id,
|
|
10477
10474
|
name: (M = (re = V == null ? void 0 : V.user) == null ? void 0 : re.data) == null ? void 0 : M.name
|
|
10478
10475
|
};
|
|
10479
10476
|
}) : !1, C = _ == null ? void 0 : _.user, T = (C == null ? void 0 : C.id) === (y == null ? void 0 : y.id), x = rn(i, T), N = typeof _.data.content == "string" ? (J = _ == null ? void 0 : _.data) == null ? void 0 : J.content : (
|
|
@@ -10516,7 +10513,7 @@ const Yc = ({
|
|
|
10516
10513
|
createContent: () => null,
|
|
10517
10514
|
deleteContent: () => p({ replyId: v }),
|
|
10518
10515
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10519
|
-
updateContent: (V, { body:
|
|
10516
|
+
updateContent: (V, { body: X }) => u({ replyId: v, content: X })
|
|
10520
10517
|
},
|
|
10521
10518
|
likes: {
|
|
10522
10519
|
createLike: () => m({ replyId: v }),
|
|
@@ -10573,7 +10570,7 @@ const Yc = ({
|
|
|
10573
10570
|
}
|
|
10574
10571
|
),
|
|
10575
10572
|
f == null ? void 0 : f.map((E) => {
|
|
10576
|
-
var Z, J, k, P, z, B, H, te, Y, V,
|
|
10573
|
+
var Z, J, k, P, z, B, H, te, Y, V, X, re;
|
|
10577
10574
|
const { id: j, own_children: w, latest_children: U, children_counts: F } = E, R = (((Z = w == null ? void 0 : w.like) == null ? void 0 : Z.length) || 0) > 0 ? (J = w == null ? void 0 : w.like) == null ? void 0 : J.find((M) => {
|
|
10578
10575
|
var oe;
|
|
10579
10576
|
return ((oe = M == null ? void 0 : M.user) == null ? void 0 : oe.id) === (b == null ? void 0 : b.id);
|
|
@@ -10607,7 +10604,7 @@ const Yc = ({
|
|
|
10607
10604
|
name: (te = N.data) == null ? void 0 : te.name,
|
|
10608
10605
|
organization: (Y = N.data) == null ? void 0 : Y.organization,
|
|
10609
10606
|
jobTitle: (V = N.data) == null ? void 0 : V.jobTitle,
|
|
10610
|
-
location: (
|
|
10607
|
+
location: (X = N.data) == null ? void 0 : X.location,
|
|
10611
10608
|
image: {
|
|
10612
10609
|
thumbnail: ((re = N.data) == null ? void 0 : re.thumbnail) || void 0
|
|
10613
10610
|
}
|
|
@@ -11011,7 +11008,6 @@ export {
|
|
|
11011
11008
|
Pa as Modal,
|
|
11012
11009
|
Qo as MoreMenu,
|
|
11013
11010
|
gl as NUMBER_OF_USERS,
|
|
11014
|
-
bl as NavigationDots,
|
|
11015
11011
|
ec as NavigationMenu,
|
|
11016
11012
|
Xl as NotFoundError,
|
|
11017
11013
|
en as Overlay,
|
|
@@ -11023,6 +11019,7 @@ export {
|
|
|
11023
11019
|
Ml as ProfileImageChange,
|
|
11024
11020
|
Ze as ProfilePicture,
|
|
11025
11021
|
ys as ProgressBar,
|
|
11022
|
+
bl as ProgressTracker,
|
|
11026
11023
|
$l as Rating,
|
|
11027
11024
|
Kc as RepliesFeed,
|
|
11028
11025
|
gc as ResponsesHeading,
|