@apolitical/component-library 2.1.8-SW.0 → 2.1.8-ac.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +15 -15
- package/index.mjs +178 -175
- package/package.json +1 -1
- package/text/empty-state-box/empty-state-box.d.ts +1 -1
package/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as Sr from "react";
|
|
2
|
-
import K, { memo as
|
|
2
|
+
import K, { memo as De, useState as ne, useEffect as se, useRef as pe, useMemo as bt, createContext as Qn, useContext as Ne, Children as Ln, useCallback as fa, useReducer as Jn, forwardRef as Ni, createElement as Cr, Component as Pi, Fragment as gt, Suspense as Ri } from "react";
|
|
3
3
|
import ft from "lodash.clonedeep";
|
|
4
4
|
import Mi from "lodash.set";
|
|
5
5
|
import { useIntl as Q, IntlProvider as Oi, FormattedMessage as je, createIntl as Fi } from "react-intl";
|
|
6
6
|
import Ke from "truncate";
|
|
7
|
-
import { QueryClient as
|
|
7
|
+
import { QueryClient as Di, QueryClientProvider as Ai, useMutation as ke, useQueryClient as Xn, useInfiniteQuery as ma, useQuery as Li } from "@tanstack/react-query";
|
|
8
8
|
import { ReactQueryDevtools as Ii } from "@tanstack/react-query-devtools";
|
|
9
9
|
import Ft from "posthog-js";
|
|
10
10
|
import { CookiesProvider as Bi, useCookies as pa } from "react-cookie";
|
|
@@ -84,11 +84,11 @@ const $ = /* @__PURE__ */ en(Wi), Hi = ({
|
|
|
84
84
|
...r,
|
|
85
85
|
className: $("hidden", { "show-on-focus": e }),
|
|
86
86
|
children: n
|
|
87
|
-
}), be =
|
|
87
|
+
}), be = De(Hi), Vi = ({
|
|
88
88
|
element: t = "span",
|
|
89
89
|
children: e = null,
|
|
90
90
|
...n
|
|
91
|
-
}) => K.createElement(t, { ...n, "aria-hidden": !0 }, e), er =
|
|
91
|
+
}) => K.createElement(t, { ...n, "aria-hidden": !0 }, e), er = De(Vi);
|
|
92
92
|
var In = { exports: {} }, at = {};
|
|
93
93
|
/**
|
|
94
94
|
* @license React
|
|
@@ -295,16 +295,16 @@ function Ki() {
|
|
|
295
295
|
` + H + h;
|
|
296
296
|
}
|
|
297
297
|
}
|
|
298
|
-
var re = !1,
|
|
298
|
+
var re = !1, D;
|
|
299
299
|
{
|
|
300
300
|
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
301
|
-
|
|
301
|
+
D = new oe();
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function A(h, P) {
|
|
304
304
|
if (!h || re)
|
|
305
305
|
return "";
|
|
306
306
|
{
|
|
307
|
-
var q =
|
|
307
|
+
var q = D.get(h);
|
|
308
308
|
if (q !== void 0)
|
|
309
309
|
return q;
|
|
310
310
|
}
|
|
@@ -359,7 +359,7 @@ function Ki() {
|
|
|
359
359
|
if (he--, ge--, ge < 0 || ie[he] !== _e[ge]) {
|
|
360
360
|
var Te = `
|
|
361
361
|
` + ie[he].replace(" at new ", " at ");
|
|
362
|
-
return h.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", h.displayName)), typeof h == "function" &&
|
|
362
|
+
return h.displayName && Te.includes("<anonymous>") && (Te = Te.replace("<anonymous>", h.displayName)), typeof h == "function" && D.set(h, Te), Te;
|
|
363
363
|
}
|
|
364
364
|
while (he >= 1 && ge >= 0);
|
|
365
365
|
break;
|
|
@@ -369,10 +369,10 @@ function Ki() {
|
|
|
369
369
|
re = !1, Y.current = me, X(), Error.prepareStackTrace = le;
|
|
370
370
|
}
|
|
371
371
|
var He = h ? h.displayName || h.name : "", Er = He ? J(He) : "";
|
|
372
|
-
return typeof h == "function" &&
|
|
372
|
+
return typeof h == "function" && D.set(h, Er), Er;
|
|
373
373
|
}
|
|
374
374
|
function ve(h, P, q) {
|
|
375
|
-
return
|
|
375
|
+
return A(h, !1);
|
|
376
376
|
}
|
|
377
377
|
function Pe(h) {
|
|
378
378
|
var P = h.prototype;
|
|
@@ -382,7 +382,7 @@ function Ki() {
|
|
|
382
382
|
if (h == null)
|
|
383
383
|
return "";
|
|
384
384
|
if (typeof h == "function")
|
|
385
|
-
return
|
|
385
|
+
return A(h, Pe(h));
|
|
386
386
|
if (typeof h == "string")
|
|
387
387
|
return J(h);
|
|
388
388
|
switch (h) {
|
|
@@ -1337,7 +1337,7 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1337
1337
|
}
|
|
1338
1338
|
}
|
|
1339
1339
|
return r;
|
|
1340
|
-
},
|
|
1340
|
+
}, Dt = (t, e) => K.Children.map(t, (n) => Object.is(n, null) ? n : K.cloneElement(n, {
|
|
1341
1341
|
...e
|
|
1342
1342
|
})), ds = (t = 0) => {
|
|
1343
1343
|
setTimeout(() => {
|
|
@@ -1869,7 +1869,7 @@ const gs = [
|
|
|
1869
1869
|
] })
|
|
1870
1870
|
}
|
|
1871
1871
|
);
|
|
1872
|
-
}, nd =
|
|
1872
|
+
}, nd = De(vs);
|
|
1873
1873
|
const bs = ({
|
|
1874
1874
|
alignImage: t = "left",
|
|
1875
1875
|
className: e,
|
|
@@ -1905,7 +1905,7 @@ const bs = ({
|
|
|
1905
1905
|
}
|
|
1906
1906
|
)
|
|
1907
1907
|
] });
|
|
1908
|
-
}, rd =
|
|
1908
|
+
}, rd = De(bs);
|
|
1909
1909
|
const ad = ({
|
|
1910
1910
|
variant: t = "primary",
|
|
1911
1911
|
button: e = null,
|
|
@@ -1928,7 +1928,7 @@ const ad = ({
|
|
|
1928
1928
|
}
|
|
1929
1929
|
)
|
|
1930
1930
|
] }), ys = ({ showDevTools: t = !0, children: e }) => {
|
|
1931
|
-
const n = new
|
|
1931
|
+
const n = new Di({
|
|
1932
1932
|
// default options we would like on all queries can be overridden individually
|
|
1933
1933
|
defaultOptions: {
|
|
1934
1934
|
queries: {
|
|
@@ -1939,7 +1939,7 @@ const ad = ({
|
|
|
1939
1939
|
}
|
|
1940
1940
|
}
|
|
1941
1941
|
});
|
|
1942
|
-
return /* @__PURE__ */ i.jsxs(
|
|
1942
|
+
return /* @__PURE__ */ i.jsxs(Ai, { client: n, children: [
|
|
1943
1943
|
e,
|
|
1944
1944
|
t && /* @__PURE__ */ i.jsx(Ii, { initialIsOpen: !1 })
|
|
1945
1945
|
] });
|
|
@@ -1976,11 +1976,11 @@ const ws = ({ children: t, user: e }) => e.isLoading ? null : process.env.REACT_
|
|
|
1976
1976
|
...n || {}
|
|
1977
1977
|
};
|
|
1978
1978
|
return /* @__PURE__ */ i.jsx(Oi, { locale: r, messages: a, children: t });
|
|
1979
|
-
},
|
|
1979
|
+
}, Ae = Qn({ isLoading: !0 });
|
|
1980
1980
|
function nr() {
|
|
1981
|
-
return Ne(
|
|
1981
|
+
return Ne(Ae);
|
|
1982
1982
|
}
|
|
1983
|
-
const ks = ({ children: t, user: e }) => /* @__PURE__ */ i.jsx(
|
|
1983
|
+
const ks = ({ children: t, user: e }) => /* @__PURE__ */ i.jsx(Ae.Provider, { value: e, children: t }), id = ({ bootstrap: t, children: e, intl: n, showDevTools: r }) => {
|
|
1984
1984
|
const [a, s] = ne({ isLoading: !0 });
|
|
1985
1985
|
return se(() => {
|
|
1986
1986
|
t().then((o) => {
|
|
@@ -2039,7 +2039,7 @@ const tt = ({
|
|
|
2039
2039
|
variant: "subtle",
|
|
2040
2040
|
className: $("empty-state-box", t, r),
|
|
2041
2041
|
children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
2042
|
-
e &&
|
|
2042
|
+
e && /* @__PURE__ */ i.jsx(Xe, { options: { forceBlock: !0 }, children: e }),
|
|
2043
2043
|
a && typeof n == "object" && (l || /* @__PURE__ */ i.jsx(
|
|
2044
2044
|
ae,
|
|
2045
2045
|
{
|
|
@@ -2314,8 +2314,8 @@ const Fs = ({ author: t, authorCite: e, content: n }) => /* @__PURE__ */ i.jsxs(
|
|
|
2314
2314
|
/* @__PURE__ */ i.jsx(Xe, { className: "testimonial", children: n }),
|
|
2315
2315
|
t && /* @__PURE__ */ i.jsx("p", { className: "author text-small", children: t }),
|
|
2316
2316
|
e && /* @__PURE__ */ i.jsx("p", { className: "author-cite text-small", children: /* @__PURE__ */ i.jsx("cite", { children: e }) })
|
|
2317
|
-
] }), od =
|
|
2318
|
-
const
|
|
2317
|
+
] }), od = De(Fs);
|
|
2318
|
+
const Ds = ({ progress: t = 0, text: e = !1, className: n = "" }) => {
|
|
2319
2319
|
const r = Q(), a = t > 75 ? 100 : t > 50 ? 75 : t > 25 ? 50 : t > 5 ? 25 : 0, s = { "--progress": `${t}%` };
|
|
2320
2320
|
return /* @__PURE__ */ i.jsx(
|
|
2321
2321
|
"span",
|
|
@@ -2325,7 +2325,7 @@ const As = ({ progress: t = 0, text: e = !1, className: n = "" }) => {
|
|
|
2325
2325
|
children: /* @__PURE__ */ i.jsx(be, { children: e ? `${t} ${e}` : r.formatMessage({ id: "progressBar" }, { number: t }) })
|
|
2326
2326
|
}
|
|
2327
2327
|
);
|
|
2328
|
-
},
|
|
2328
|
+
}, As = De(Ds);
|
|
2329
2329
|
const hn = "loadingBlock_", Ls = ({ progress: t = 0, steps: e = !1, className: n = "" }) => {
|
|
2330
2330
|
const r = Q();
|
|
2331
2331
|
e || (e = {
|
|
@@ -2350,11 +2350,11 @@ const hn = "loadingBlock_", Ls = ({ progress: t = 0, steps: e = !1, className: n
|
|
|
2350
2350
|
style: o,
|
|
2351
2351
|
children: [
|
|
2352
2352
|
a && /* @__PURE__ */ i.jsx("span", { className: "step", children: e[a].text }),
|
|
2353
|
-
/* @__PURE__ */ i.jsx(
|
|
2353
|
+
/* @__PURE__ */ i.jsx(As, { progress: t })
|
|
2354
2354
|
]
|
|
2355
2355
|
}
|
|
2356
2356
|
);
|
|
2357
|
-
}, cd =
|
|
2357
|
+
}, cd = De(Ls);
|
|
2358
2358
|
const Se = ({ element: t = "div", className: e = "", ...n }) => /* @__PURE__ */ i.jsx(
|
|
2359
2359
|
er,
|
|
2360
2360
|
{
|
|
@@ -2656,20 +2656,20 @@ var ue = {};
|
|
|
2656
2656
|
* This source code is licensed under the MIT license found in the
|
|
2657
2657
|
* LICENSE file in the root directory of this source tree.
|
|
2658
2658
|
*/
|
|
2659
|
-
var
|
|
2659
|
+
var Dr;
|
|
2660
2660
|
function Us() {
|
|
2661
|
-
return
|
|
2661
|
+
return Dr || (Dr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
2662
2662
|
var t = typeof Symbol == "function" && Symbol.for, e = t ? Symbol.for("react.element") : 60103, n = t ? Symbol.for("react.portal") : 60106, r = t ? Symbol.for("react.fragment") : 60107, a = t ? Symbol.for("react.strict_mode") : 60108, s = t ? Symbol.for("react.profiler") : 60114, o = t ? Symbol.for("react.provider") : 60109, c = t ? Symbol.for("react.context") : 60110, u = t ? Symbol.for("react.async_mode") : 60111, l = t ? Symbol.for("react.concurrent_mode") : 60111, f = t ? Symbol.for("react.forward_ref") : 60112, d = t ? Symbol.for("react.suspense") : 60113, m = t ? Symbol.for("react.suspense_list") : 60120, p = t ? Symbol.for("react.memo") : 60115, g = t ? Symbol.for("react.lazy") : 60116, v = t ? Symbol.for("react.block") : 60121, b = t ? Symbol.for("react.fundamental") : 60117, y = t ? Symbol.for("react.responder") : 60118, _ = t ? Symbol.for("react.scope") : 60119;
|
|
2663
|
-
function E(
|
|
2664
|
-
return typeof
|
|
2665
|
-
|
|
2663
|
+
function E(A) {
|
|
2664
|
+
return typeof A == "string" || typeof A == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
2665
|
+
A === r || A === l || A === s || A === a || A === d || A === m || typeof A == "object" && A !== null && (A.$$typeof === g || A.$$typeof === p || A.$$typeof === o || A.$$typeof === c || A.$$typeof === f || A.$$typeof === b || A.$$typeof === y || A.$$typeof === _ || A.$$typeof === v);
|
|
2666
2666
|
}
|
|
2667
|
-
function k(
|
|
2668
|
-
if (typeof
|
|
2669
|
-
var ve =
|
|
2667
|
+
function k(A) {
|
|
2668
|
+
if (typeof A == "object" && A !== null) {
|
|
2669
|
+
var ve = A.$$typeof;
|
|
2670
2670
|
switch (ve) {
|
|
2671
2671
|
case e:
|
|
2672
|
-
var Pe =
|
|
2672
|
+
var Pe = A.type;
|
|
2673
2673
|
switch (Pe) {
|
|
2674
2674
|
case u:
|
|
2675
2675
|
case l:
|
|
@@ -2697,51 +2697,51 @@ function Us() {
|
|
|
2697
2697
|
}
|
|
2698
2698
|
}
|
|
2699
2699
|
var w = u, U = l, M = c, I = o, R = e, O = f, S = r, T = g, x = p, C = n, B = s, F = a, L = d, V = !1;
|
|
2700
|
-
function ee(
|
|
2701
|
-
return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(
|
|
2700
|
+
function ee(A) {
|
|
2701
|
+
return V || (V = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), j(A) || k(A) === u;
|
|
2702
2702
|
}
|
|
2703
|
-
function j(
|
|
2704
|
-
return k(
|
|
2703
|
+
function j(A) {
|
|
2704
|
+
return k(A) === l;
|
|
2705
2705
|
}
|
|
2706
|
-
function N(
|
|
2707
|
-
return k(
|
|
2706
|
+
function N(A) {
|
|
2707
|
+
return k(A) === c;
|
|
2708
2708
|
}
|
|
2709
|
-
function Z(
|
|
2710
|
-
return k(
|
|
2709
|
+
function Z(A) {
|
|
2710
|
+
return k(A) === o;
|
|
2711
2711
|
}
|
|
2712
|
-
function z(
|
|
2713
|
-
return typeof
|
|
2712
|
+
function z(A) {
|
|
2713
|
+
return typeof A == "object" && A !== null && A.$$typeof === e;
|
|
2714
2714
|
}
|
|
2715
|
-
function W(
|
|
2716
|
-
return k(
|
|
2715
|
+
function W(A) {
|
|
2716
|
+
return k(A) === f;
|
|
2717
2717
|
}
|
|
2718
|
-
function X(
|
|
2719
|
-
return k(
|
|
2718
|
+
function X(A) {
|
|
2719
|
+
return k(A) === r;
|
|
2720
2720
|
}
|
|
2721
|
-
function Y(
|
|
2722
|
-
return k(
|
|
2721
|
+
function Y(A) {
|
|
2722
|
+
return k(A) === g;
|
|
2723
2723
|
}
|
|
2724
|
-
function H(
|
|
2725
|
-
return k(
|
|
2724
|
+
function H(A) {
|
|
2725
|
+
return k(A) === p;
|
|
2726
2726
|
}
|
|
2727
|
-
function J(
|
|
2728
|
-
return k(
|
|
2727
|
+
function J(A) {
|
|
2728
|
+
return k(A) === n;
|
|
2729
2729
|
}
|
|
2730
|
-
function re(
|
|
2731
|
-
return k(
|
|
2730
|
+
function re(A) {
|
|
2731
|
+
return k(A) === s;
|
|
2732
2732
|
}
|
|
2733
|
-
function A
|
|
2734
|
-
return k(
|
|
2733
|
+
function D(A) {
|
|
2734
|
+
return k(A) === a;
|
|
2735
2735
|
}
|
|
2736
|
-
function oe(
|
|
2737
|
-
return k(
|
|
2736
|
+
function oe(A) {
|
|
2737
|
+
return k(A) === d;
|
|
2738
2738
|
}
|
|
2739
|
-
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = M, ue.ContextProvider = I, ue.Element = R, ue.ForwardRef = O, ue.Fragment = S, ue.Lazy = T, ue.Memo = x, ue.Portal = C, ue.Profiler = B, ue.StrictMode = F, ue.Suspense = L, ue.isAsyncMode = ee, ue.isConcurrentMode = j, ue.isContextConsumer = N, ue.isContextProvider = Z, ue.isElement = z, ue.isForwardRef = W, ue.isFragment = X, ue.isLazy = Y, ue.isMemo = H, ue.isPortal = J, ue.isProfiler = re, ue.isStrictMode =
|
|
2739
|
+
ue.AsyncMode = w, ue.ConcurrentMode = U, ue.ContextConsumer = M, ue.ContextProvider = I, ue.Element = R, ue.ForwardRef = O, ue.Fragment = S, ue.Lazy = T, ue.Memo = x, ue.Portal = C, ue.Profiler = B, ue.StrictMode = F, ue.Suspense = L, ue.isAsyncMode = ee, ue.isConcurrentMode = j, ue.isContextConsumer = N, ue.isContextProvider = Z, ue.isElement = z, ue.isForwardRef = W, ue.isFragment = X, ue.isLazy = Y, ue.isMemo = H, ue.isPortal = J, ue.isProfiler = re, ue.isStrictMode = D, ue.isSuspense = oe, ue.isValidElementType = E, ue.typeOf = k;
|
|
2740
2740
|
}()), ue;
|
|
2741
2741
|
}
|
|
2742
|
-
var
|
|
2742
|
+
var Ar;
|
|
2743
2743
|
function ar() {
|
|
2744
|
-
return
|
|
2744
|
+
return Ar || (Ar = 1, process.env.NODE_ENV === "production" ? kt.exports = qs() : kt.exports = Us()), kt.exports;
|
|
2745
2745
|
}
|
|
2746
2746
|
/*
|
|
2747
2747
|
object-assign
|
|
@@ -2913,22 +2913,22 @@ function Ws() {
|
|
|
2913
2913
|
function b(j) {
|
|
2914
2914
|
if (process.env.NODE_ENV !== "production")
|
|
2915
2915
|
var N = {}, Z = 0;
|
|
2916
|
-
function z(X, Y, H, J, re,
|
|
2917
|
-
if (J = J || m,
|
|
2916
|
+
function z(X, Y, H, J, re, D, oe) {
|
|
2917
|
+
if (J = J || m, D = D || H, oe !== n) {
|
|
2918
2918
|
if (u) {
|
|
2919
|
-
var
|
|
2919
|
+
var A = new Error(
|
|
2920
2920
|
"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"
|
|
2921
2921
|
);
|
|
2922
|
-
throw
|
|
2922
|
+
throw A.name = "Invariant Violation", A;
|
|
2923
2923
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
2924
2924
|
var ve = J + ":" + H;
|
|
2925
2925
|
!N[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
2926
2926
|
Z < 3 && (s(
|
|
2927
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
2927
|
+
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + J + "`. 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."
|
|
2928
2928
|
), N[ve] = !0, Z++);
|
|
2929
2929
|
}
|
|
2930
2930
|
}
|
|
2931
|
-
return Y[H] == null ? X ? Y[H] === null ? new v("The " + re + " `" +
|
|
2931
|
+
return Y[H] == null ? X ? Y[H] === null ? new v("The " + re + " `" + D + "` is marked as required " + ("in `" + J + "`, but its value is `null`.")) : new v("The " + re + " `" + D + "` is marked as required in " + ("`" + J + "`, but its value is `undefined`.")) : null : j(Y, H, J, re, D);
|
|
2932
2932
|
}
|
|
2933
2933
|
var W = z.bind(null, !1);
|
|
2934
2934
|
return W.isRequired = z.bind(null, !0), W;
|
|
@@ -2937,9 +2937,9 @@ function Ws() {
|
|
|
2937
2937
|
function N(Z, z, W, X, Y, H) {
|
|
2938
2938
|
var J = Z[z], re = F(J);
|
|
2939
2939
|
if (re !== j) {
|
|
2940
|
-
var
|
|
2940
|
+
var D = L(J);
|
|
2941
2941
|
return new v(
|
|
2942
|
-
"Invalid " + X + " `" + Y + "` of type " + ("`" +
|
|
2942
|
+
"Invalid " + X + " `" + Y + "` of type " + ("`" + D + "` supplied to `" + W + "`, expected ") + ("`" + j + "`."),
|
|
2943
2943
|
{ expectedType: j }
|
|
2944
2944
|
);
|
|
2945
2945
|
}
|
|
@@ -2960,9 +2960,9 @@ function Ws() {
|
|
|
2960
2960
|
return new v("Invalid " + X + " `" + Y + "` of type " + ("`" + J + "` supplied to `" + W + "`, expected an array."));
|
|
2961
2961
|
}
|
|
2962
2962
|
for (var re = 0; re < H.length; re++) {
|
|
2963
|
-
var
|
|
2964
|
-
if (
|
|
2965
|
-
return
|
|
2963
|
+
var D = j(H, re, W, X, Y + "[" + re + "]", n);
|
|
2964
|
+
if (D instanceof Error)
|
|
2965
|
+
return D;
|
|
2966
2966
|
}
|
|
2967
2967
|
return null;
|
|
2968
2968
|
}
|
|
@@ -3009,9 +3009,9 @@ function Ws() {
|
|
|
3009
3009
|
for (var H = Z[z], J = 0; J < j.length; J++)
|
|
3010
3010
|
if (g(H, j[J]))
|
|
3011
3011
|
return null;
|
|
3012
|
-
var re = JSON.stringify(j, function(oe,
|
|
3013
|
-
var ve = L(
|
|
3014
|
-
return ve === "symbol" ? String(
|
|
3012
|
+
var re = JSON.stringify(j, function(oe, A) {
|
|
3013
|
+
var ve = L(A);
|
|
3014
|
+
return ve === "symbol" ? String(A) : A;
|
|
3015
3015
|
});
|
|
3016
3016
|
return new v("Invalid " + X + " `" + Y + "` of value `" + String(H) + "` " + ("supplied to `" + W + "`, expected one of " + re + "."));
|
|
3017
3017
|
}
|
|
@@ -3026,9 +3026,9 @@ function Ws() {
|
|
|
3026
3026
|
return new v("Invalid " + X + " `" + Y + "` of type " + ("`" + J + "` supplied to `" + W + "`, expected an object."));
|
|
3027
3027
|
for (var re in H)
|
|
3028
3028
|
if (r(H, re)) {
|
|
3029
|
-
var
|
|
3030
|
-
if (
|
|
3031
|
-
return
|
|
3029
|
+
var D = j(H, re, W, X, Y + "." + re, n);
|
|
3030
|
+
if (D instanceof Error)
|
|
3031
|
+
return D;
|
|
3032
3032
|
}
|
|
3033
3033
|
return null;
|
|
3034
3034
|
}
|
|
@@ -3045,11 +3045,11 @@ function Ws() {
|
|
|
3045
3045
|
), o;
|
|
3046
3046
|
}
|
|
3047
3047
|
function z(W, X, Y, H, J) {
|
|
3048
|
-
for (var re = [],
|
|
3049
|
-
var oe = j[
|
|
3050
|
-
if (
|
|
3048
|
+
for (var re = [], D = 0; D < j.length; D++) {
|
|
3049
|
+
var oe = j[D], A = oe(W, X, Y, H, J, n);
|
|
3050
|
+
if (A == null)
|
|
3051
3051
|
return null;
|
|
3052
|
-
|
|
3052
|
+
A.data && r(A.data, "expectedType") && re.push(A.data.expectedType);
|
|
3053
3053
|
}
|
|
3054
3054
|
var ve = re.length > 0 ? ", expected one of type [" + re.join(", ") + "]" : "";
|
|
3055
3055
|
return new v("Invalid " + H + " `" + J + "` supplied to " + ("`" + Y + "`" + ve + "."));
|
|
@@ -3073,10 +3073,10 @@ function Ws() {
|
|
|
3073
3073
|
if (J !== "object")
|
|
3074
3074
|
return new v("Invalid " + X + " `" + Y + "` of type `" + J + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
3075
3075
|
for (var re in j) {
|
|
3076
|
-
var
|
|
3077
|
-
if (typeof
|
|
3078
|
-
return S(W, X, Y, re, L(
|
|
3079
|
-
var oe =
|
|
3076
|
+
var D = j[re];
|
|
3077
|
+
if (typeof D != "function")
|
|
3078
|
+
return S(W, X, Y, re, L(D));
|
|
3079
|
+
var oe = D(H, re, W, X, Y + "." + re, n);
|
|
3080
3080
|
if (oe)
|
|
3081
3081
|
return oe;
|
|
3082
3082
|
}
|
|
@@ -3090,18 +3090,18 @@ function Ws() {
|
|
|
3090
3090
|
if (J !== "object")
|
|
3091
3091
|
return new v("Invalid " + X + " `" + Y + "` of type `" + J + "` " + ("supplied to `" + W + "`, expected `object`."));
|
|
3092
3092
|
var re = e({}, Z[z], j);
|
|
3093
|
-
for (var
|
|
3094
|
-
var oe = j[
|
|
3095
|
-
if (r(j,
|
|
3096
|
-
return S(W, X, Y,
|
|
3093
|
+
for (var D in re) {
|
|
3094
|
+
var oe = j[D];
|
|
3095
|
+
if (r(j, D) && typeof oe != "function")
|
|
3096
|
+
return S(W, X, Y, D, L(oe));
|
|
3097
3097
|
if (!oe)
|
|
3098
3098
|
return new v(
|
|
3099
|
-
"Invalid " + X + " `" + Y + "` key `" +
|
|
3099
|
+
"Invalid " + X + " `" + Y + "` key `" + D + "` supplied to `" + W + "`.\nBad object: " + JSON.stringify(Z[z], null, " ") + `
|
|
3100
3100
|
Valid keys: ` + JSON.stringify(Object.keys(j), null, " ")
|
|
3101
3101
|
);
|
|
3102
|
-
var
|
|
3103
|
-
if (
|
|
3104
|
-
return
|
|
3102
|
+
var A = oe(H, D, W, X, Y + "." + D, n);
|
|
3103
|
+
if (A)
|
|
3104
|
+
return A;
|
|
3105
3105
|
}
|
|
3106
3106
|
return null;
|
|
3107
3107
|
}
|
|
@@ -3253,12 +3253,12 @@ var Oa = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3253
3253
|
}, Ks = function(e) {
|
|
3254
3254
|
var n, r = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "contenteditable");
|
|
3255
3255
|
return r === "" || r === "true";
|
|
3256
|
-
},
|
|
3256
|
+
}, Da = function(e, n, r) {
|
|
3257
3257
|
if (Zt(e))
|
|
3258
3258
|
return [];
|
|
3259
3259
|
var a = Array.prototype.slice.apply(e.querySelectorAll(Ut));
|
|
3260
3260
|
return n && Ze.call(e, Ut) && a.unshift(e), a = a.filter(r), a;
|
|
3261
|
-
},
|
|
3261
|
+
}, Aa = function t(e, n, r) {
|
|
3262
3262
|
for (var a = [], s = Array.from(e); s.length; ) {
|
|
3263
3263
|
var o = s.shift();
|
|
3264
3264
|
if (!Zt(o, !1))
|
|
@@ -3407,25 +3407,25 @@ var Oa = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3407
3407
|
}, Ba = function(e, n) {
|
|
3408
3408
|
n = n || {};
|
|
3409
3409
|
var r;
|
|
3410
|
-
return n.getShadowRoot ? r =
|
|
3410
|
+
return n.getShadowRoot ? r = Aa([e], n.includeContainer, {
|
|
3411
3411
|
filter: Zn.bind(null, n),
|
|
3412
3412
|
flatten: !1,
|
|
3413
3413
|
getShadowRoot: n.getShadowRoot,
|
|
3414
3414
|
shadowRootFilter: oo
|
|
3415
|
-
}) : r =
|
|
3415
|
+
}) : r = Da(e, n.includeContainer, Zn.bind(null, n)), co(r);
|
|
3416
3416
|
}, qa = function(e, n) {
|
|
3417
3417
|
n = n || {};
|
|
3418
3418
|
var r;
|
|
3419
|
-
return n.getShadowRoot ? r =
|
|
3419
|
+
return n.getShadowRoot ? r = Aa([e], n.includeContainer, {
|
|
3420
3420
|
filter: Wt.bind(null, n),
|
|
3421
3421
|
flatten: !0,
|
|
3422
3422
|
getShadowRoot: n.getShadowRoot
|
|
3423
|
-
}) : r =
|
|
3423
|
+
}) : r = Da(e, n.includeContainer, Wt.bind(null, n)), r;
|
|
3424
3424
|
}, Ue = function(e, n) {
|
|
3425
3425
|
if (n = n || {}, !e)
|
|
3426
3426
|
throw new Error("No node provided");
|
|
3427
3427
|
return Ze.call(e, Ut) === !1 ? !1 : Zn(n, e);
|
|
3428
|
-
}, lo = /* @__PURE__ */ Oa.concat("iframe").join(","),
|
|
3428
|
+
}, lo = /* @__PURE__ */ Oa.concat("iframe").join(","), At = function(e, n) {
|
|
3429
3429
|
if (n = n || {}, !e)
|
|
3430
3430
|
throw new Error("No node provided");
|
|
3431
3431
|
return Ze.call(e, lo) === !1 ? !1 : Wt(n, e);
|
|
@@ -3434,7 +3434,7 @@ const uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
3434
3434
|
__proto__: null,
|
|
3435
3435
|
focusable: qa,
|
|
3436
3436
|
getTabIndex: Le,
|
|
3437
|
-
isFocusable:
|
|
3437
|
+
isFocusable: At,
|
|
3438
3438
|
isTabbable: Ue,
|
|
3439
3439
|
tabbable: Ba
|
|
3440
3440
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -3600,7 +3600,7 @@ var Vr = {
|
|
|
3600
3600
|
var T = f("initialFocus");
|
|
3601
3601
|
if (T === !1)
|
|
3602
3602
|
return !1;
|
|
3603
|
-
if (T === void 0 || !
|
|
3603
|
+
if (T === void 0 || !At(T, s.tabbableOptions))
|
|
3604
3604
|
if (l(r.activeElement) >= 0)
|
|
3605
3605
|
T = r.activeElement;
|
|
3606
3606
|
else {
|
|
@@ -3695,7 +3695,7 @@ var Vr = {
|
|
|
3695
3695
|
var H = Y.firstTabbableNode;
|
|
3696
3696
|
return x === H;
|
|
3697
3697
|
});
|
|
3698
|
-
if (j < 0 && (ee.container === x ||
|
|
3698
|
+
if (j < 0 && (ee.container === x || At(x, s.tabbableOptions) && !Ue(x, s.tabbableOptions) && !ee.nextTabbableNode(x, !1)) && (j = V), j >= 0) {
|
|
3699
3699
|
var N = j === 0 ? o.tabbableGroups.length - 1 : j - 1, Z = o.tabbableGroups[N];
|
|
3700
3700
|
L = Le(x) >= 0 ? Z.lastTabbableNode : Z.lastDomTabbableNode;
|
|
3701
3701
|
} else
|
|
@@ -3705,7 +3705,7 @@ var Vr = {
|
|
|
3705
3705
|
var H = Y.lastTabbableNode;
|
|
3706
3706
|
return x === H;
|
|
3707
3707
|
});
|
|
3708
|
-
if (z < 0 && (ee.container === x ||
|
|
3708
|
+
if (z < 0 && (ee.container === x || At(x, s.tabbableOptions) && !Ue(x, s.tabbableOptions) && !ee.nextTabbableNode(x)) && (z = V), z >= 0) {
|
|
3709
3709
|
var W = z === o.tabbableGroups.length - 1 ? 0 : z + 1, X = o.tabbableGroups[W];
|
|
3710
3710
|
L = Le(x) >= 0 ? X.firstTabbableNode : X.firstDomTabbableNode;
|
|
3711
3711
|
} else
|
|
@@ -4208,8 +4208,8 @@ sr.defaultProps = {
|
|
|
4208
4208
|
focusTrapOptions: {},
|
|
4209
4209
|
_createFocusTrap: Mo
|
|
4210
4210
|
};
|
|
4211
|
-
var
|
|
4212
|
-
const
|
|
4211
|
+
var Do = sr;
|
|
4212
|
+
const Ao = /* @__PURE__ */ en(Do);
|
|
4213
4213
|
const za = ({ element: t = "section", children: e, className: n, ...r }) => K.createElement(t, {
|
|
4214
4214
|
className: $("modal", n),
|
|
4215
4215
|
children: typeof e == "string" ? /* @__PURE__ */ i.jsx("p", { children: e }) : e,
|
|
@@ -4252,7 +4252,7 @@ const nn = ({
|
|
|
4252
4252
|
}),
|
|
4253
4253
|
hidden: !p,
|
|
4254
4254
|
style: y,
|
|
4255
|
-
children: e && /* @__PURE__ */ i.jsx(
|
|
4255
|
+
children: e && /* @__PURE__ */ i.jsx(Ao, { children: /* @__PURE__ */ i.jsxs("div", { className: "overlay-content", children: [
|
|
4256
4256
|
/* @__PURE__ */ i.jsxs("div", { className: "top", children: [
|
|
4257
4257
|
c && /* @__PURE__ */ i.jsx("h2", { className: "modal-title", children: c }),
|
|
4258
4258
|
/* @__PURE__ */ i.jsx(
|
|
@@ -4508,7 +4508,7 @@ const Za = ({
|
|
|
4508
4508
|
b
|
|
4509
4509
|
);
|
|
4510
4510
|
};
|
|
4511
|
-
const Bo =
|
|
4511
|
+
const Bo = De(function({
|
|
4512
4512
|
direction: e = "down"
|
|
4513
4513
|
}) {
|
|
4514
4514
|
return /* @__PURE__ */ i.jsx(
|
|
@@ -5211,7 +5211,7 @@ const Ct = "passwordRules_", Wa = "isMoreThanEightCharacters", Ha = "includesNum
|
|
|
5211
5211
|
)
|
|
5212
5212
|
) })
|
|
5213
5213
|
] });
|
|
5214
|
-
}, ld =
|
|
5214
|
+
}, ld = De(Vo);
|
|
5215
5215
|
const dd = ({
|
|
5216
5216
|
text: t = {},
|
|
5217
5217
|
topRating: e = 5,
|
|
@@ -5634,16 +5634,17 @@ const Go = ({
|
|
|
5634
5634
|
}) => {
|
|
5635
5635
|
if (!t.form || !t.form.current)
|
|
5636
5636
|
throw new Error("No refs.form");
|
|
5637
|
-
if (!t.form.current.checkValidity()) {
|
|
5637
|
+
if (console.log("handleData 1"), !t.form.current.checkValidity()) {
|
|
5638
5638
|
t.hiddenValidation && t.hiddenValidation.current && t.hiddenValidation.current.click();
|
|
5639
5639
|
return;
|
|
5640
5640
|
}
|
|
5641
|
-
if (t.recaptcha && t.recaptcha.current && !t.recaptcha.current.getValue()) {
|
|
5641
|
+
if (console.log("handleData 2", { recaptcha: t.recaptcha }), t.recaptcha && t.recaptcha.current && !t.recaptcha.current.getValue()) {
|
|
5642
5642
|
t.recaptcha.current.execute();
|
|
5643
5643
|
return;
|
|
5644
5644
|
}
|
|
5645
|
+
console.log("handleData 3");
|
|
5645
5646
|
const o = Qo(new FormData(t.form.current)), c = Object.assign(o, e);
|
|
5646
|
-
await n(c), localStorage.setItem("email", o.email), r && r({ ...o, ...s.values }), a([{ type: "showSuccessMessage", value: !0 }]);
|
|
5647
|
+
await n(c), console.log("handleData 4"), localStorage.setItem("email", o.email), console.log("handleData 5"), r && r({ ...o, ...s.values }), console.log("handleData 6"), a([{ type: "showSuccessMessage", value: !0 }]);
|
|
5647
5648
|
};
|
|
5648
5649
|
var Jo = ["sitekey", "onChange", "theme", "type", "tabindex", "onExpired", "onErrored", "size", "stoken", "grecaptcha", "badge", "hl", "isolated"];
|
|
5649
5650
|
function Hn() {
|
|
@@ -6284,17 +6285,19 @@ const yc = {
|
|
|
6284
6285
|
},
|
|
6285
6286
|
functions: {
|
|
6286
6287
|
onSuccess: async () => {
|
|
6287
|
-
Ya({
|
|
6288
|
+
console.log("SUCCESS"), Ya({
|
|
6288
6289
|
refs: b,
|
|
6289
6290
|
dataToSubmit: a,
|
|
6290
6291
|
createAccount: e.createAccount,
|
|
6291
|
-
onSuccess:
|
|
6292
|
+
onSuccess: () => {
|
|
6293
|
+
console.log("run on success"), e.onSuccess && e.onSuccess();
|
|
6294
|
+
},
|
|
6292
6295
|
dispatch: u,
|
|
6293
6296
|
state: c
|
|
6294
6297
|
});
|
|
6295
6298
|
},
|
|
6296
6299
|
onCatch: (E) => {
|
|
6297
|
-
e.handleError(E), u([
|
|
6300
|
+
console.log("ERROR", E), e.handleError(E), u([
|
|
6298
6301
|
{ type: "showSuccessMessage", value: !1 },
|
|
6299
6302
|
{ type: "showError", value: !0 }
|
|
6300
6303
|
]);
|
|
@@ -6598,7 +6601,7 @@ const jc = {
|
|
|
6598
6601
|
gtmContext: a = "Carousel",
|
|
6599
6602
|
className: s = ""
|
|
6600
6603
|
}) => {
|
|
6601
|
-
const o = Q(), c = Ne(
|
|
6604
|
+
const o = Q(), c = Ne(Ae), u = c && typeof c.id == "string", [l, f] = ne({
|
|
6602
6605
|
data: null,
|
|
6603
6606
|
isLoading: !0
|
|
6604
6607
|
}), { data: d, isLoading: m } = l, p = fa(() => {
|
|
@@ -6932,7 +6935,7 @@ const kn = "joinCommunityButton", Ja = ({
|
|
|
6932
6935
|
}, leave: () => {
|
|
6933
6936
|
} }
|
|
6934
6937
|
}) => {
|
|
6935
|
-
const a = Q(), s = Ne(
|
|
6938
|
+
const a = Q(), s = Ne(Ae), o = s && typeof s.id == "string", [c, u] = ne(t), [l, f] = ne(t ? "joined" : "notJoined");
|
|
6936
6939
|
se(() => {
|
|
6937
6940
|
l === "joining" ? f("joined") : l === "leaving" && f("notJoined");
|
|
6938
6941
|
}, [c]);
|
|
@@ -7269,7 +7272,7 @@ const Pc = [
|
|
|
7269
7272
|
href: "/solution-articles/"
|
|
7270
7273
|
}
|
|
7271
7274
|
], Rc = ({ activeLink: t }) => {
|
|
7272
|
-
const e = Q(), n = Ne(
|
|
7275
|
+
const e = Q(), n = Ne(Ae), r = n && typeof n.id == "string";
|
|
7273
7276
|
return /* @__PURE__ */ i.jsxs("ul", { id: "navigation-menu", className: "text-medium", children: [
|
|
7274
7277
|
Pc.map(({ key: a, href: s }) => /* @__PURE__ */ i.jsx(
|
|
7275
7278
|
"li",
|
|
@@ -7454,7 +7457,7 @@ const Fc = {
|
|
|
7454
7457
|
"2-1": 901,
|
|
7455
7458
|
"1-3": 769,
|
|
7456
7459
|
"1-1": 769
|
|
7457
|
-
},
|
|
7460
|
+
}, Dc = ({
|
|
7458
7461
|
layout: t = "2-1",
|
|
7459
7462
|
hideOnMobile: e = !1,
|
|
7460
7463
|
className: n = "",
|
|
@@ -7502,7 +7505,7 @@ const $n = "contactFooter_", wd = ({ onSuccess: t = async () => {
|
|
|
7502
7505
|
}
|
|
7503
7506
|
)
|
|
7504
7507
|
] }) });
|
|
7505
|
-
}, jd = ({ activeLink: t, ...e }) => /* @__PURE__ */ i.jsx(et, { children: /* @__PURE__ */ i.jsx(
|
|
7508
|
+
}, jd = ({ activeLink: t, ...e }) => /* @__PURE__ */ i.jsx(et, { children: /* @__PURE__ */ i.jsx(Dc, { layout: "1-3", children: /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
7506
7509
|
/* @__PURE__ */ i.jsx(Rc, { activeLink: t }),
|
|
7507
7510
|
/* @__PURE__ */ i.jsx(Os, { ...e })
|
|
7508
7511
|
] }) }) });
|
|
@@ -7510,7 +7513,7 @@ const Nn = "cookieBanner_", Pn = [
|
|
|
7510
7513
|
"apol-cookie-banner",
|
|
7511
7514
|
"apolitical-performance-cookie-consent",
|
|
7512
7515
|
"functional-cookie-consent"
|
|
7513
|
-
], Rn = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3),
|
|
7516
|
+
], Rn = new Date(Date.now() + 12 * 30 * 24 * 60 * 60 * 1e3), Ac = () => {
|
|
7514
7517
|
const t = Q(), [e, n, r] = pa(Pn), [a, s] = ne(
|
|
7515
7518
|
!e["apol-cookie-banner"]
|
|
7516
7519
|
), o = () => {
|
|
@@ -8038,7 +8041,7 @@ const Ye = "footer_", Yt = "SiteFooter", na = ({ group: t }) => {
|
|
|
8038
8041
|
);
|
|
8039
8042
|
};
|
|
8040
8043
|
const Lc = { height: 67, height_desktop: 83 }, ti = ({ showNavigation: t = !0 }) => {
|
|
8041
|
-
const e = Q(), n = Ne(
|
|
8044
|
+
const e = Q(), n = Ne(Ae), r = yt(!0, !0), a = n && typeof n.id == "string", s = bt(
|
|
8042
8045
|
() => fe.getIsDesktopVersion(a, r),
|
|
8043
8046
|
[a, r]
|
|
8044
8047
|
), [o, c] = Jn(ya, {
|
|
@@ -8239,9 +8242,9 @@ const Ic = () => {
|
|
|
8239
8242
|
se(() => {
|
|
8240
8243
|
window.scrollTo(0, 0);
|
|
8241
8244
|
}, [p]);
|
|
8242
|
-
const g =
|
|
8245
|
+
const g = Dt(t, { locale: c }), v = Dt(e, {
|
|
8243
8246
|
locale: c
|
|
8244
|
-
}), b =
|
|
8247
|
+
}), b = Dt(n, {
|
|
8245
8248
|
locale: c
|
|
8246
8249
|
}), y = {};
|
|
8247
8250
|
return f !== "default" && (y[f] = !0), d !== "default" && (y[d] = !0), m !== "default" && (y[m] = !0), /* @__PURE__ */ i.jsx(Ui, { onError: r, fallback: /* @__PURE__ */ i.jsx(Ic, {}), children: /* @__PURE__ */ i.jsx(Ri, { fallback: null, children: /* @__PURE__ */ i.jsxs(
|
|
@@ -8260,7 +8263,7 @@ const Ic = () => {
|
|
|
8260
8263
|
] }),
|
|
8261
8264
|
b && /* @__PURE__ */ i.jsx("div", { className: "additional-content appended", children: b }),
|
|
8262
8265
|
l && /* @__PURE__ */ i.jsx(ei, {}),
|
|
8263
|
-
/* @__PURE__ */ i.jsx(
|
|
8266
|
+
/* @__PURE__ */ i.jsx(Ac, {})
|
|
8264
8267
|
]
|
|
8265
8268
|
}
|
|
8266
8269
|
) }) });
|
|
@@ -8400,7 +8403,7 @@ const xe = "discussion_form_", dr = ({
|
|
|
8400
8403
|
gtmContext: l = "DiscussionForm"
|
|
8401
8404
|
}) => {
|
|
8402
8405
|
var O, S, T;
|
|
8403
|
-
const f = Q(), d = Ne(
|
|
8406
|
+
const f = Q(), d = Ne(Ae), [m, p] = ne(
|
|
8404
8407
|
n.isEditing && n.isEditing.text || ""
|
|
8405
8408
|
), [g, v] = ne(c.error || !1), [b, y] = ne(!1), _ = pe(null);
|
|
8406
8409
|
if (r || (r = _), n.isLoading)
|
|
@@ -8782,7 +8785,7 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8782
8785
|
children: v,
|
|
8783
8786
|
isTruncated: b = !1
|
|
8784
8787
|
}) => {
|
|
8785
|
-
const y = Q(), _ = Ne(
|
|
8788
|
+
const y = Q(), _ = Ne(Ae), E = Ne(ur), { author: k, canLike: w, createdAt: U, id: M, likes: I = 0, userLiked: R, comments: O = 0 } = e, S = _ && _.id && typeof k != "string" && k.id && k.id === _.id || !1, T = typeof w == "boolean" ? w : n ? !S : !1, x = S && (!e.createdAt || rs(e.createdAt, 10, "seconds")), C = pe(null), [B, F] = ne({
|
|
8786
8789
|
body: e && e.body || "",
|
|
8787
8790
|
isEditing: !1,
|
|
8788
8791
|
didEdit: e && e.isEdited || !1
|
|
@@ -8791,10 +8794,10 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8791
8794
|
/* Default */
|
|
8792
8795
|
), [N, Z] = ne("");
|
|
8793
8796
|
se(() => {
|
|
8794
|
-
const
|
|
8795
|
-
if (!(!
|
|
8796
|
-
return document.addEventListener("discussionFormSubmitted", z),
|
|
8797
|
-
document.removeEventListener("discussionFormSubmitted", z),
|
|
8797
|
+
const D = C.current;
|
|
8798
|
+
if (!(!D || ee === "default"))
|
|
8799
|
+
return document.addEventListener("discussionFormSubmitted", z), D.addEventListener("transitionend", W), () => {
|
|
8800
|
+
document.removeEventListener("discussionFormSubmitted", z), D.removeEventListener("transitionend", W);
|
|
8798
8801
|
};
|
|
8799
8802
|
}, []), se(() => {
|
|
8800
8803
|
F({
|
|
@@ -8810,27 +8813,27 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8810
8813
|
/* Fading */
|
|
8811
8814
|
);
|
|
8812
8815
|
}, 1e3);
|
|
8813
|
-
}, W = ({ propertyName:
|
|
8814
|
-
|
|
8816
|
+
}, W = ({ propertyName: D }) => {
|
|
8817
|
+
D === "background-color" && j((oe) => (oe === "default" && (document.removeEventListener("discussionFormSubmitted", z), C.current && C.current.removeEventListener("transitionend", W)), oe === "fading" ? "default" : oe));
|
|
8815
8818
|
};
|
|
8816
8819
|
if (r || !e || e.type === "answer" && (!e.slugs || !e.slugs.question))
|
|
8817
8820
|
return /* @__PURE__ */ i.jsx(Se, { className: "discussion-card discussion-post" });
|
|
8818
|
-
const X = b ? Ke(B.body, Vc) : B.body, Y = async (
|
|
8819
|
-
|
|
8821
|
+
const X = b ? Ke(B.body, Vc) : B.body, Y = async (D) => {
|
|
8822
|
+
D || (D = ""), Z("");
|
|
8820
8823
|
try {
|
|
8821
|
-
if (!Zi(
|
|
8822
|
-
const oe = e.type === "question" ? { title:
|
|
8824
|
+
if (!Zi(D, B.body)) {
|
|
8825
|
+
const oe = e.type === "question" ? { title: D } : { body: D };
|
|
8823
8826
|
await u(aa(e.slugs), oe);
|
|
8824
8827
|
}
|
|
8825
|
-
F({ body:
|
|
8828
|
+
F({ body: D, isEditing: !1, didEdit: !0 });
|
|
8826
8829
|
} catch {
|
|
8827
8830
|
Z(`${Me}form_error`);
|
|
8828
8831
|
}
|
|
8829
8832
|
}, H = () => {
|
|
8830
8833
|
E && E.updateConversation && E.updateConversation({ showForm: !0 }), setTimeout(() => {
|
|
8831
8834
|
var Pe, Ce, qe;
|
|
8832
|
-
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((qe = e.slugs) == null ? void 0 : qe.question) || "").toLowerCase().slice(-15)}`,
|
|
8833
|
-
ve && ve.focus(),
|
|
8835
|
+
const oe = `reply-form-${(e.type === "answer" ? e.slug : ((Pe = e.slugs) == null ? void 0 : Pe.reply) || ((Ce = e.slugs) == null ? void 0 : Ce.answer) || ((qe = e.slugs) == null ? void 0 : qe.question) || "").toLowerCase().slice(-15)}`, A = document.getElementById(oe), ve = document.getElementById(`${oe}-input`);
|
|
8836
|
+
ve && ve.focus(), A && A.scrollIntoView({ behavior: "smooth" });
|
|
8834
8837
|
}, 0);
|
|
8835
8838
|
}, J = () => {
|
|
8836
8839
|
V(!1);
|
|
@@ -8842,8 +8845,8 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8842
8845
|
}, re = [
|
|
8843
8846
|
{
|
|
8844
8847
|
text: y.formatMessage({ id: `${Me}moreMenu_report` }),
|
|
8845
|
-
onClick: (
|
|
8846
|
-
|
|
8848
|
+
onClick: (D) => {
|
|
8849
|
+
D.stopPropagation();
|
|
8847
8850
|
},
|
|
8848
8851
|
href: `mailto:community@apolitical.co?subject=${encodeURI(
|
|
8849
8852
|
y.formatMessage({ id: `${Me}report_subject` })
|
|
@@ -8871,8 +8874,8 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8871
8874
|
},
|
|
8872
8875
|
{
|
|
8873
8876
|
text: y.formatMessage({ id: `${Me}moreMenu_delete` }),
|
|
8874
|
-
onClick: (
|
|
8875
|
-
|
|
8877
|
+
onClick: (D) => {
|
|
8878
|
+
D.preventDefault(), D.stopPropagation(), V(!0);
|
|
8876
8879
|
},
|
|
8877
8880
|
icon: "trash",
|
|
8878
8881
|
className: "gtm-trackable",
|
|
@@ -8895,8 +8898,8 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8895
8898
|
editing: B.isEditing,
|
|
8896
8899
|
"has-link": m.post && !B.isEditing
|
|
8897
8900
|
}),
|
|
8898
|
-
onClick: (
|
|
8899
|
-
!m.post || B.isEditing || (
|
|
8901
|
+
onClick: (D) => {
|
|
8902
|
+
!m.post || B.isEditing || (D.preventDefault(), D.stopPropagation(), window.location.href = m.post);
|
|
8900
8903
|
},
|
|
8901
8904
|
children: [
|
|
8902
8905
|
!B.isEditing && /* @__PURE__ */ i.jsx(
|
|
@@ -8986,8 +8989,8 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
8986
8989
|
"li",
|
|
8987
8990
|
{
|
|
8988
8991
|
className: "action-button",
|
|
8989
|
-
onClick: (
|
|
8990
|
-
|
|
8992
|
+
onClick: (D) => {
|
|
8993
|
+
D.preventDefault(), D.stopPropagation(), m.comments && (window.location.href = m.comments), typeof d == "function" && d();
|
|
8991
8994
|
},
|
|
8992
8995
|
children: [
|
|
8993
8996
|
/* @__PURE__ */ i.jsx(
|
|
@@ -9080,7 +9083,7 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9080
9083
|
{
|
|
9081
9084
|
id: "discussion_delete_text",
|
|
9082
9085
|
values: {
|
|
9083
|
-
p: (
|
|
9086
|
+
p: (D) => /* @__PURE__ */ i.jsx("p", { children: D }),
|
|
9084
9087
|
action: y.formatMessage({
|
|
9085
9088
|
id: `discussion_action_${e.type}`
|
|
9086
9089
|
})
|
|
@@ -9092,14 +9095,14 @@ const Me = "discussion_", Vc = 280, on = ({
|
|
|
9092
9095
|
] })
|
|
9093
9096
|
});
|
|
9094
9097
|
};
|
|
9095
|
-
const
|
|
9098
|
+
const Dn = "discussion_responses_", Yc = ({ type: t = "answer", responses: e = 0 }) => {
|
|
9096
9099
|
const n = Q();
|
|
9097
9100
|
return e = parseInt(e), /* @__PURE__ */ i.jsxs("div", { className: "responses-heading", children: [
|
|
9098
9101
|
/* @__PURE__ */ i.jsx("h4", { children: n.formatMessage(
|
|
9099
|
-
{ id: `${
|
|
9100
|
-
{ action: n.formatMessage({ id: `${
|
|
9102
|
+
{ id: `${Dn}title` },
|
|
9103
|
+
{ action: n.formatMessage({ id: `${Dn}${t}` }), count: e }
|
|
9101
9104
|
) }),
|
|
9102
|
-
e === 0 && /* @__PURE__ */ i.jsx("p", { children: $e(n.formatMessage, `${
|
|
9105
|
+
e === 0 && /* @__PURE__ */ i.jsx("p", { children: $e(n.formatMessage, `${Dn}empty`, t, t) })
|
|
9103
9106
|
] });
|
|
9104
9107
|
};
|
|
9105
9108
|
const Kc = ({
|
|
@@ -9112,7 +9115,7 @@ const Kc = ({
|
|
|
9112
9115
|
form: r,
|
|
9113
9116
|
children: a
|
|
9114
9117
|
}) => {
|
|
9115
|
-
const s = Q(), o = Ne(ur), c =
|
|
9118
|
+
const s = Q(), o = Ne(ur), c = Dt(a, {
|
|
9116
9119
|
element: "li"
|
|
9117
9120
|
});
|
|
9118
9121
|
return /* @__PURE__ */ i.jsxs("div", { className: "thread-wrapper", children: [
|
|
@@ -9285,7 +9288,7 @@ const si = (t) => {
|
|
|
9285
9288
|
});
|
|
9286
9289
|
document.dispatchEvent(e);
|
|
9287
9290
|
};
|
|
9288
|
-
let ca,
|
|
9291
|
+
let ca, An = 0;
|
|
9289
9292
|
const oi = () => {
|
|
9290
9293
|
se(() => (document.addEventListener("discussionPostAdded", t), () => {
|
|
9291
9294
|
document.removeEventListener(
|
|
@@ -9300,10 +9303,10 @@ const oi = () => {
|
|
|
9300
9303
|
clearTimeout(ca);
|
|
9301
9304
|
const r = document.getElementById(n);
|
|
9302
9305
|
if (r) {
|
|
9303
|
-
r.scrollIntoView({ behavior: "smooth", block: "start" }),
|
|
9306
|
+
r.scrollIntoView({ behavior: "smooth", block: "start" }), An = 0;
|
|
9304
9307
|
return;
|
|
9305
9308
|
}
|
|
9306
|
-
|
|
9309
|
+
An++, !(An > 10) && (ca = setTimeout(() => {
|
|
9307
9310
|
t(e);
|
|
9308
9311
|
}, 50));
|
|
9309
9312
|
};
|
|
@@ -10566,10 +10569,10 @@ const El = ({
|
|
|
10566
10569
|
var J;
|
|
10567
10570
|
return ((J = H == null ? void 0 : H.user) == null ? void 0 : J.id) === (v == null ? void 0 : v.id);
|
|
10568
10571
|
}) : !1, M = U ? U == null ? void 0 : U.id : "", I = !!U, O = (((L = E == null ? void 0 : E.like) == null ? void 0 : L.length) || 0) > 0 ? (V = E == null ? void 0 : E.like) == null ? void 0 : V.map((H) => {
|
|
10569
|
-
var J, re,
|
|
10572
|
+
var J, re, D;
|
|
10570
10573
|
return {
|
|
10571
10574
|
id: (J = H == null ? void 0 : H.user) == null ? void 0 : J.id,
|
|
10572
|
-
name: (
|
|
10575
|
+
name: (D = (re = H == null ? void 0 : H.user) == null ? void 0 : re.data) == null ? void 0 : D.name
|
|
10573
10576
|
};
|
|
10574
10577
|
}) : !1, S = b == null ? void 0 : b.user, T = (S == null ? void 0 : S.id) === (v == null ? void 0 : v.id), x = sn(a, T), C = typeof b.data.content == "string" ? (ee = b == null ? void 0 : b.data) == null ? void 0 : ee.content : (
|
|
10575
10578
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -10669,14 +10672,14 @@ const El = ({
|
|
|
10669
10672
|
),
|
|
10670
10673
|
u == null ? void 0 : u.map((E) => {
|
|
10671
10674
|
var V, ee, j, N, Z, z, W, X, Y, H, J, re;
|
|
10672
|
-
const { id: k, own_children: w, latest_children: U, children_counts: M } = E, R = (((V = w == null ? void 0 : w.like) == null ? void 0 : V.length) || 0) > 0 ? (ee = w == null ? void 0 : w.like) == null ? void 0 : ee.find((
|
|
10675
|
+
const { id: k, own_children: w, latest_children: U, children_counts: M } = E, R = (((V = w == null ? void 0 : w.like) == null ? void 0 : V.length) || 0) > 0 ? (ee = w == null ? void 0 : w.like) == null ? void 0 : ee.find((D) => {
|
|
10673
10676
|
var oe;
|
|
10674
|
-
return ((oe =
|
|
10675
|
-
}) : !1, O = R ? R == null ? void 0 : R.id : "", S = !!R, x = (((j = U == null ? void 0 : U.like) == null ? void 0 : j.length) || 0) > 0 ? (N = U == null ? void 0 : U.like) == null ? void 0 : N.map((
|
|
10676
|
-
var oe,
|
|
10677
|
+
return ((oe = D == null ? void 0 : D.user) == null ? void 0 : oe.id) === (_ == null ? void 0 : _.id);
|
|
10678
|
+
}) : !1, O = R ? R == null ? void 0 : R.id : "", S = !!R, x = (((j = U == null ? void 0 : U.like) == null ? void 0 : j.length) || 0) > 0 ? (N = U == null ? void 0 : U.like) == null ? void 0 : N.map((D) => {
|
|
10679
|
+
var oe, A, ve;
|
|
10677
10680
|
return {
|
|
10678
|
-
id: (oe =
|
|
10679
|
-
name: (ve = (
|
|
10681
|
+
id: (oe = D == null ? void 0 : D.user) == null ? void 0 : oe.id,
|
|
10682
|
+
name: (ve = (A = D == null ? void 0 : D.user) == null ? void 0 : A.data) == null ? void 0 : ve.name
|
|
10680
10683
|
};
|
|
10681
10684
|
}) : !1, C = E == null ? void 0 : E.user, B = (C == null ? void 0 : C.id) === (_ == null ? void 0 : _.id), F = sn(r, B), L = typeof E.data.content == "string" ? (Z = E == null ? void 0 : E.data) == null ? void 0 : Z.content : (
|
|
10682
10685
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -10716,7 +10719,7 @@ const El = ({
|
|
|
10716
10719
|
createContent: () => null,
|
|
10717
10720
|
deleteContent: () => b({ replyId: k }),
|
|
10718
10721
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10719
|
-
updateContent: (
|
|
10722
|
+
updateContent: (D, { body: oe }) => g({ replyId: k, content: oe })
|
|
10720
10723
|
},
|
|
10721
10724
|
likes: {
|
|
10722
10725
|
createLike: () => v({ replyId: k }),
|
|
@@ -10861,7 +10864,7 @@ const Cd = ({
|
|
|
10861
10864
|
}
|
|
10862
10865
|
}) => {
|
|
10863
10866
|
var R, O, S, T, x, C, B, F, L, V;
|
|
10864
|
-
const l = Q(), f = Ne(
|
|
10867
|
+
const l = Q(), f = Ne(Ae), {
|
|
10865
10868
|
activity: d,
|
|
10866
10869
|
error: m,
|
|
10867
10870
|
isLoading: p,
|
|
@@ -11055,13 +11058,13 @@ export {
|
|
|
11055
11058
|
kc as CardBlock,
|
|
11056
11059
|
hd as Carousel,
|
|
11057
11060
|
Ta as CollapsibleSection,
|
|
11058
|
-
|
|
11061
|
+
Dc as Columns,
|
|
11059
11062
|
gd as CommunityDetails,
|
|
11060
11063
|
wd as ContactFooter,
|
|
11061
11064
|
Yo as ContactForm,
|
|
11062
11065
|
Pa as Contributors,
|
|
11063
11066
|
ur as ConversationContext,
|
|
11064
|
-
|
|
11067
|
+
Ac as CookieBanner,
|
|
11065
11068
|
pd as Directory,
|
|
11066
11069
|
zc as DiscussionConversation,
|
|
11067
11070
|
dr as DiscussionForm,
|
|
@@ -11114,7 +11117,7 @@ export {
|
|
|
11114
11117
|
ld as PasswordRules,
|
|
11115
11118
|
Bt as Pill,
|
|
11116
11119
|
nt as ProfilePicture,
|
|
11117
|
-
|
|
11120
|
+
As as ProgressBar,
|
|
11118
11121
|
dd as Rating,
|
|
11119
11122
|
Sl as RepliesFeed,
|
|
11120
11123
|
Yc as ResponsesHeading,
|
|
@@ -11131,7 +11134,7 @@ export {
|
|
|
11131
11134
|
ud as Toggle,
|
|
11132
11135
|
ps as Tooltip,
|
|
11133
11136
|
jd as TopLevelPage,
|
|
11134
|
-
|
|
11137
|
+
Ae as UserContext,
|
|
11135
11138
|
ks as UserProvider,
|
|
11136
11139
|
be as VisuallyHidden,
|
|
11137
11140
|
Lo as addAriaProps,
|