@apolitical/component-library 5.3.6-ac.1 → 5.3.6
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/form/types/invite-form/invite-form.d.ts +2 -4
- package/helpers/intl.d.ts +0 -2
- package/index.js +21 -21
- package/index.mjs +567 -593
- package/modals/types/invite-modal/invite-modal.d.ts +2 -4
- package/package.json +1 -1
- package/style.css +1 -1
package/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import te, { memo as Jt, useState as ue, useEffect as de, useRef as ke, useMemo as Yt, forwardRef as Ys, Children as vs, createContext as kt, useContext as Le, useCallback as Re, lazy as fr, useReducer as hr, useLayoutEffect as hh, Component as mh, Fragment as Ir, Suspense as Sc } from "react";
|
|
2
2
|
import { useIntl as le, FormattedMessage as ht, IntlProvider as ph, createIntl as gh } from "react-intl";
|
|
3
|
-
import
|
|
3
|
+
import An from "lodash.clonedeep";
|
|
4
4
|
import vh from "lodash.set";
|
|
5
5
|
import jc from "react-dom";
|
|
6
6
|
import Gt from "markdown-to-jsx";
|
|
@@ -14,7 +14,7 @@ import Pc from "lodash.get";
|
|
|
14
14
|
import { ErrorBoundary as Ch } from "react-error-boundary";
|
|
15
15
|
import { ReactMultiEmail as Eh } from "react-multi-email";
|
|
16
16
|
var ti = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
17
|
-
function
|
|
17
|
+
function Mn(e) {
|
|
18
18
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
19
19
|
}
|
|
20
20
|
function Nc(e) {
|
|
@@ -75,7 +75,7 @@ var Mc = { exports: {} };
|
|
|
75
75
|
})();
|
|
76
76
|
})(Mc);
|
|
77
77
|
var _h = Mc.exports;
|
|
78
|
-
const V = /* @__PURE__ */
|
|
78
|
+
const V = /* @__PURE__ */ Mn(_h), kh = ({
|
|
79
79
|
element: e = "span",
|
|
80
80
|
showOnFocus: t = !0,
|
|
81
81
|
children: n,
|
|
@@ -156,10 +156,10 @@ function Bh() {
|
|
|
156
156
|
Ve.unshift("Warning: " + ae), Function.prototype.apply.call(console[M], console, Ve);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
var B = !1, D = !1, C = !1,
|
|
159
|
+
var B = !1, D = !1, C = !1, S = !1, I = !1, P;
|
|
160
160
|
P = Symbol.for("react.module.reference");
|
|
161
161
|
function L(M) {
|
|
162
|
-
return !!(typeof M == "string" || typeof M == "function" || M === r || M === a || I || M === i || M === u || M === d ||
|
|
162
|
+
return !!(typeof M == "string" || typeof M == "function" || M === r || M === a || I || M === i || M === u || M === d || S || M === p || B || D || C || typeof M == "object" && M !== null && (M.$$typeof === m || M.$$typeof === h || M.$$typeof === s || M.$$typeof === o || M.$$typeof === l || // This needs to include all possible module reference object
|
|
163
163
|
// types supported by any Flight configuration anywhere since
|
|
164
164
|
// we don't know which Flight build this will end up being used
|
|
165
165
|
// with.
|
|
@@ -220,7 +220,7 @@ function Bh() {
|
|
|
220
220
|
}
|
|
221
221
|
return null;
|
|
222
222
|
}
|
|
223
|
-
var
|
|
223
|
+
var T = Object.assign, j = 0, H, W, ie, ne, x, z, re;
|
|
224
224
|
function F() {
|
|
225
225
|
}
|
|
226
226
|
F.__reactDisabledLog = !0;
|
|
@@ -256,25 +256,25 @@ function Bh() {
|
|
|
256
256
|
writable: !0
|
|
257
257
|
};
|
|
258
258
|
Object.defineProperties(console, {
|
|
259
|
-
log:
|
|
259
|
+
log: T({}, M, {
|
|
260
260
|
value: H
|
|
261
261
|
}),
|
|
262
|
-
info:
|
|
262
|
+
info: T({}, M, {
|
|
263
263
|
value: W
|
|
264
264
|
}),
|
|
265
|
-
warn:
|
|
265
|
+
warn: T({}, M, {
|
|
266
266
|
value: ie
|
|
267
267
|
}),
|
|
268
|
-
error:
|
|
268
|
+
error: T({}, M, {
|
|
269
269
|
value: ne
|
|
270
270
|
}),
|
|
271
|
-
group:
|
|
271
|
+
group: T({}, M, {
|
|
272
272
|
value: x
|
|
273
273
|
}),
|
|
274
|
-
groupCollapsed:
|
|
274
|
+
groupCollapsed: T({}, M, {
|
|
275
275
|
value: z
|
|
276
276
|
}),
|
|
277
|
-
groupEnd:
|
|
277
|
+
groupEnd: T({}, M, {
|
|
278
278
|
value: re
|
|
279
279
|
})
|
|
280
280
|
});
|
|
@@ -755,12 +755,12 @@ function Rc(e, t, n) {
|
|
|
755
755
|
return !1;
|
|
756
756
|
var $ = L - i.current;
|
|
757
757
|
return !i.current || $ >= t || $ < 0 || b && L - a.current >= w;
|
|
758
|
-
},
|
|
758
|
+
}, S = function(L) {
|
|
759
759
|
return s.current = null, f && o.current ? B(L) : (o.current = l.current = null, u.current);
|
|
760
760
|
}, I = function L() {
|
|
761
761
|
var $ = Date.now();
|
|
762
762
|
if (C($))
|
|
763
|
-
return
|
|
763
|
+
return S($);
|
|
764
764
|
if (h.current) {
|
|
765
765
|
var A = t - ($ - i.current), _ = b ? Math.min(A, w - ($ - a.current)) : A;
|
|
766
766
|
D(L, _);
|
|
@@ -782,7 +782,7 @@ function Rc(e, t, n) {
|
|
|
782
782
|
}, P.isPending = function() {
|
|
783
783
|
return !!s.current;
|
|
784
784
|
}, P.flush = function() {
|
|
785
|
-
return s.current ?
|
|
785
|
+
return s.current ? S(Date.now()) : u.current;
|
|
786
786
|
}, P;
|
|
787
787
|
}, [g, b, t, w, f, p, m, v]);
|
|
788
788
|
return E;
|
|
@@ -893,7 +893,7 @@ const Yo = {}, pr = Ys(
|
|
|
893
893
|
}, d) => {
|
|
894
894
|
const h = le(), [m] = ue(e || Date.now().toString()), p = ke(null), g = d || p, [f, b] = ue(n ? "open" : "hidden"), { extraPadding: v = !0, hasPointer: w = !1, hasForm: E = !1 } = t, { onOpen: B = () => {
|
|
895
895
|
}, onClose: D = () => {
|
|
896
|
-
} } = o, { readToScreenreadersWhenClosed: C = !1, ...
|
|
896
|
+
} } = o, { readToScreenreadersWhenClosed: C = !1, ...S } = l, I = Yo[m];
|
|
897
897
|
de(() => {
|
|
898
898
|
const A = g == null ? void 0 : g.current;
|
|
899
899
|
if (A)
|
|
@@ -922,7 +922,7 @@ const Yo = {}, pr = Ys(
|
|
|
922
922
|
}, [n]);
|
|
923
923
|
const L = {
|
|
924
924
|
...u,
|
|
925
|
-
...
|
|
925
|
+
...S
|
|
926
926
|
};
|
|
927
927
|
s && s.onBlur && (L.onBlur = s.onBlur);
|
|
928
928
|
const $ = {
|
|
@@ -946,7 +946,7 @@ const Yo = {}, pr = Ys(
|
|
|
946
946
|
}
|
|
947
947
|
), aa = (e, t) => {
|
|
948
948
|
Array.isArray(t) || (t = [t]);
|
|
949
|
-
const n =
|
|
949
|
+
const n = An(e);
|
|
950
950
|
return t.forEach(({ type: r, value: i }) => {
|
|
951
951
|
vh(n, r, i);
|
|
952
952
|
}), n;
|
|
@@ -983,7 +983,7 @@ function P_(e) {
|
|
|
983
983
|
"--icon": `url(${sn}icons/${e}.svg)`
|
|
984
984
|
} : {};
|
|
985
985
|
}
|
|
986
|
-
const
|
|
986
|
+
const kn = {
|
|
987
987
|
milliseconds: {
|
|
988
988
|
inSecond: 1e3,
|
|
989
989
|
inMinute: 6e4,
|
|
@@ -1007,13 +1007,13 @@ const Fn = {
|
|
|
1007
1007
|
} catch {
|
|
1008
1008
|
return "";
|
|
1009
1009
|
}
|
|
1010
|
-
const i = t /
|
|
1010
|
+
const i = t / kn.milliseconds.inHour, a = Math.floor(t / kn.milliseconds.inDay);
|
|
1011
1011
|
if (a < 1)
|
|
1012
1012
|
return i < 1 ? { path: "now" } : { path: "hours", number: Math.floor(i) };
|
|
1013
1013
|
if (a < 7)
|
|
1014
1014
|
return { path: "days", number: a };
|
|
1015
1015
|
const s = Math.floor(a / 7);
|
|
1016
|
-
return s <=
|
|
1016
|
+
return s <= kn.year.weeks ? { path: "weeks", number: s } : { path: "years", number: Math.floor(a / kn.year.days) };
|
|
1017
1017
|
}, Mi = (e) => {
|
|
1018
1018
|
const n = (e || /* @__PURE__ */ new Date()).toUTCString();
|
|
1019
1019
|
return new Date(n);
|
|
@@ -1027,11 +1027,11 @@ const Fn = {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
switch (n) {
|
|
1029
1029
|
case "seconds":
|
|
1030
|
-
return r /
|
|
1030
|
+
return r / kn.milliseconds.inSecond <= t;
|
|
1031
1031
|
case "minutes":
|
|
1032
|
-
return r /
|
|
1032
|
+
return r / kn.milliseconds.inMinute <= t;
|
|
1033
1033
|
case "hours":
|
|
1034
|
-
return r /
|
|
1034
|
+
return r / kn.milliseconds.inHour <= t;
|
|
1035
1035
|
}
|
|
1036
1036
|
return !1;
|
|
1037
1037
|
}, Ih = (e, t) => {
|
|
@@ -1286,8 +1286,6 @@ Thank you for helping to protect the Apolitical community from abusive content.`
|
|
|
1286
1286
|
inviteForm_email_placeholder: "Add email addresses...",
|
|
1287
1287
|
inviteForm_title: "Know someone who might like to join this workshop?",
|
|
1288
1288
|
inviteForm_label: "Invite your colleagues by typing or pasting their email addresses below",
|
|
1289
|
-
inviteForm_message_label: "Add an invitation note",
|
|
1290
|
-
inviteForm_message_placeholder: "Add a personal note to your invitation...",
|
|
1291
1289
|
inviteForm_ctaMessage: "Send",
|
|
1292
1290
|
inviteForm_success: "Invitation Sent!",
|
|
1293
1291
|
inviteForm_error: "Something went wrong!",
|
|
@@ -1936,7 +1934,7 @@ const N_ = ({ image: e, className: t = "", testId: n }) => /* @__PURE__ */ c.jsx
|
|
|
1936
1934
|
"data-testid": n || "image-container",
|
|
1937
1935
|
children: e && /* @__PURE__ */ c.jsx(Gr, { image: { ...e }, className: "image" })
|
|
1938
1936
|
}
|
|
1939
|
-
),
|
|
1937
|
+
), Rn = ({
|
|
1940
1938
|
href: e,
|
|
1941
1939
|
children: t,
|
|
1942
1940
|
fallbackElement: n,
|
|
@@ -2163,7 +2161,7 @@ const zt = ({
|
|
|
2163
2161
|
}
|
|
2164
2162
|
);
|
|
2165
2163
|
};
|
|
2166
|
-
const
|
|
2164
|
+
const $n = ({
|
|
2167
2165
|
variant: e = "empty",
|
|
2168
2166
|
text: t = !1,
|
|
2169
2167
|
button: n = !1,
|
|
@@ -2817,7 +2815,7 @@ const ws = {
|
|
|
2817
2815
|
if (r <= t * (i + 1))
|
|
2818
2816
|
return ri[i];
|
|
2819
2817
|
};
|
|
2820
|
-
const su = 256,
|
|
2818
|
+
const su = 256, In = ({
|
|
2821
2819
|
className: e = "",
|
|
2822
2820
|
src: t = "",
|
|
2823
2821
|
name: n,
|
|
@@ -2911,7 +2909,7 @@ const yn = ({
|
|
|
2911
2909
|
C.name || (C.name = h.formatMessage({
|
|
2912
2910
|
id: `member_${typeof t == "string" ? t : "community"}`
|
|
2913
2911
|
}));
|
|
2914
|
-
const { name:
|
|
2912
|
+
const { name: S, image: I } = C;
|
|
2915
2913
|
let { url: P } = C;
|
|
2916
2914
|
typeof t == "object" && t.link !== void 0 && (t.link === !1 ? P = void 0 : P = t.link);
|
|
2917
2915
|
const L = Sm(C), $ = r && r.createdAt ? Ds(r.createdAt) : !1, A = r && r.createdAt ? Wc(r.createdAt) : "";
|
|
@@ -2923,7 +2921,7 @@ const yn = ({
|
|
|
2923
2921
|
...p,
|
|
2924
2922
|
children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
2925
2923
|
/* @__PURE__ */ c.jsxs(
|
|
2926
|
-
|
|
2924
|
+
Rn,
|
|
2927
2925
|
{
|
|
2928
2926
|
href: P,
|
|
2929
2927
|
gtmType: o,
|
|
@@ -2934,13 +2932,13 @@ const yn = ({
|
|
|
2934
2932
|
ii && clearTimeout(ii), ii = setTimeout(() => {
|
|
2935
2933
|
window.location.href = P;
|
|
2936
2934
|
}, 150);
|
|
2937
|
-
const
|
|
2935
|
+
const T = new CustomEvent(ut.MEMBER_CLICKED, {
|
|
2938
2936
|
detail: { link: P, timeout: ii }
|
|
2939
2937
|
});
|
|
2940
|
-
document.dispatchEvent(
|
|
2938
|
+
document.dispatchEvent(T);
|
|
2941
2939
|
},
|
|
2942
2940
|
children: [
|
|
2943
|
-
/* @__PURE__ */ c.jsx(
|
|
2941
|
+
/* @__PURE__ */ c.jsx(In, { name: S, src: I, alt: n }),
|
|
2944
2942
|
/* @__PURE__ */ c.jsxs("div", { className: "details", children: [
|
|
2945
2943
|
/* @__PURE__ */ c.jsxs(
|
|
2946
2944
|
"div",
|
|
@@ -2948,7 +2946,7 @@ const yn = ({
|
|
|
2948
2946
|
className: V("name", { "new-line": v }),
|
|
2949
2947
|
"data-testid": "member-name",
|
|
2950
2948
|
children: [
|
|
2951
|
-
/* @__PURE__ */ c.jsx("span", { children:
|
|
2949
|
+
/* @__PURE__ */ c.jsx("span", { children: S }),
|
|
2952
2950
|
(u == null ? void 0 : u.showBadges) && (C == null ? void 0 : C.badges) && /* @__PURE__ */ c.jsx(Fm, { userBadges: C.badges, badgeOptions: u }),
|
|
2953
2951
|
r && /* @__PURE__ */ c.jsxs(
|
|
2954
2952
|
"span",
|
|
@@ -3059,7 +3057,7 @@ const ou = {
|
|
|
3059
3057
|
if (s)
|
|
3060
3058
|
return /* @__PURE__ */ c.jsx(qt, { element: "li", className: "contributor" }, p);
|
|
3061
3059
|
g = /* @__PURE__ */ c.jsx(
|
|
3062
|
-
|
|
3060
|
+
In,
|
|
3063
3061
|
{
|
|
3064
3062
|
name: b,
|
|
3065
3063
|
src: v,
|
|
@@ -3216,7 +3214,7 @@ function Mm() {
|
|
|
3216
3214
|
}
|
|
3217
3215
|
}
|
|
3218
3216
|
}
|
|
3219
|
-
var D = l, C = u,
|
|
3217
|
+
var D = l, C = u, S = o, I = s, P = t, L = d, $ = r, A = g, _ = p, T = n, j = a, H = i, W = h, ie = !1;
|
|
3220
3218
|
function ne(G) {
|
|
3221
3219
|
return ie || (ie = !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.")), x(G) || B(G) === l;
|
|
3222
3220
|
}
|
|
@@ -3256,7 +3254,7 @@ function Mm() {
|
|
|
3256
3254
|
function ce(G) {
|
|
3257
3255
|
return B(G) === h;
|
|
3258
3256
|
}
|
|
3259
|
-
qe.AsyncMode = D, qe.ConcurrentMode = C, qe.ContextConsumer =
|
|
3257
|
+
qe.AsyncMode = D, qe.ConcurrentMode = C, qe.ContextConsumer = S, qe.ContextProvider = I, qe.Element = P, qe.ForwardRef = L, qe.Fragment = $, qe.Lazy = A, qe.Memo = _, qe.Portal = T, qe.Profiler = j, qe.StrictMode = H, qe.Suspense = W, qe.isAsyncMode = ne, qe.isConcurrentMode = x, qe.isContextConsumer = z, qe.isContextProvider = re, qe.isElement = F, qe.isForwardRef = k, qe.isFragment = N, qe.isLazy = O, qe.isMemo = q, qe.isPortal = J, qe.isProfiler = U, qe.isStrictMode = X, qe.isSuspense = ce, qe.isValidElementType = E, qe.typeOf = B;
|
|
3260
3258
|
}()), qe;
|
|
3261
3259
|
}
|
|
3262
3260
|
var cu;
|
|
@@ -3418,7 +3416,7 @@ function Im() {
|
|
|
3418
3416
|
instanceOf: C,
|
|
3419
3417
|
node: L(),
|
|
3420
3418
|
objectOf: I,
|
|
3421
|
-
oneOf:
|
|
3419
|
+
oneOf: S,
|
|
3422
3420
|
oneOfType: P,
|
|
3423
3421
|
shape: A,
|
|
3424
3422
|
exact: _
|
|
@@ -3520,7 +3518,7 @@ function Im() {
|
|
|
3520
3518
|
}
|
|
3521
3519
|
return b(z);
|
|
3522
3520
|
}
|
|
3523
|
-
function
|
|
3521
|
+
function S(x) {
|
|
3524
3522
|
if (!Array.isArray(x))
|
|
3525
3523
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? a(
|
|
3526
3524
|
"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])."
|
|
@@ -3578,7 +3576,7 @@ function Im() {
|
|
|
3578
3576
|
}
|
|
3579
3577
|
function L() {
|
|
3580
3578
|
function x(z, re, F, k, N) {
|
|
3581
|
-
return
|
|
3579
|
+
return T(z[re]) ? null : new f("Invalid " + k + " `" + N + "` supplied to " + ("`" + F + "`, expected a ReactNode."));
|
|
3582
3580
|
}
|
|
3583
3581
|
return b(x);
|
|
3584
3582
|
}
|
|
@@ -3627,7 +3625,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
3627
3625
|
}
|
|
3628
3626
|
return b(z);
|
|
3629
3627
|
}
|
|
3630
|
-
function
|
|
3628
|
+
function T(x) {
|
|
3631
3629
|
switch (typeof x) {
|
|
3632
3630
|
case "number":
|
|
3633
3631
|
case "string":
|
|
@@ -3637,7 +3635,7 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
3637
3635
|
return !x;
|
|
3638
3636
|
case "object":
|
|
3639
3637
|
if (Array.isArray(x))
|
|
3640
|
-
return x.every(
|
|
3638
|
+
return x.every(T);
|
|
3641
3639
|
if (x === null || o(x))
|
|
3642
3640
|
return !0;
|
|
3643
3641
|
var z = h(x);
|
|
@@ -3645,12 +3643,12 @@ Valid keys: ` + JSON.stringify(Object.keys(x), null, " ")
|
|
|
3645
3643
|
var re = z.call(x), F;
|
|
3646
3644
|
if (z !== x.entries) {
|
|
3647
3645
|
for (; !(F = re.next()).done; )
|
|
3648
|
-
if (!
|
|
3646
|
+
if (!T(F.value))
|
|
3649
3647
|
return !1;
|
|
3650
3648
|
} else
|
|
3651
3649
|
for (; !(F = re.next()).done; ) {
|
|
3652
3650
|
var k = F.value;
|
|
3653
|
-
if (k && !
|
|
3651
|
+
if (k && !T(k[1]))
|
|
3654
3652
|
return !1;
|
|
3655
3653
|
}
|
|
3656
3654
|
} else
|
|
@@ -3758,7 +3756,7 @@ var Wm = Cs.exports;
|
|
|
3758
3756
|
* tabbable 6.2.0
|
|
3759
3757
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
3760
3758
|
*/
|
|
3761
|
-
var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], $i = /* @__PURE__ */ id.join(","), ad = typeof Element > "u",
|
|
3759
|
+
var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])", "a[href]:not([inert])", "button:not([inert])", "[tabindex]:not(slot):not([inert])", "audio[controls]:not([inert])", "video[controls]:not([inert])", '[contenteditable]:not([contenteditable="false"]):not([inert])', "details>summary:first-of-type:not([inert])", "details:not([inert])"], $i = /* @__PURE__ */ id.join(","), ad = typeof Element > "u", jn = ad ? function() {
|
|
3762
3760
|
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, Ii = !ad && Element.prototype.getRootNode ? function(e) {
|
|
3763
3761
|
var t;
|
|
3764
3762
|
return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
|
|
@@ -3776,7 +3774,7 @@ var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3776
3774
|
if (Li(t))
|
|
3777
3775
|
return [];
|
|
3778
3776
|
var i = Array.prototype.slice.apply(t.querySelectorAll($i));
|
|
3779
|
-
return n &&
|
|
3777
|
+
return n && jn.call(t, $i) && i.unshift(t), i = i.filter(r), i;
|
|
3780
3778
|
}, od = function e(t, n, r) {
|
|
3781
3779
|
for (var i = [], a = Array.from(t); a.length; ) {
|
|
3782
3780
|
var s = a.shift();
|
|
@@ -3788,7 +3786,7 @@ var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3788
3786
|
candidates: u
|
|
3789
3787
|
});
|
|
3790
3788
|
} else {
|
|
3791
|
-
var d =
|
|
3789
|
+
var d = jn.call(s, $i);
|
|
3792
3790
|
d && r.filter(s) && (n || !t.includes(s)) && i.push(s);
|
|
3793
3791
|
var h = s.shadowRoot || // check for an undisclosed shadow
|
|
3794
3792
|
typeof r.getShadowRoot == "function" && r.getShadowRoot(s), m = !Li(h, !1) && (!r.shadowRootFilter || r.shadowRootFilter(s));
|
|
@@ -3864,8 +3862,8 @@ var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3864
3862
|
var r = n.displayCheck, i = n.getShadowRoot;
|
|
3865
3863
|
if (getComputedStyle(t).visibility === "hidden")
|
|
3866
3864
|
return !0;
|
|
3867
|
-
var a =
|
|
3868
|
-
if (
|
|
3865
|
+
var a = jn.call(t, "details>summary:first-of-type"), s = a ? t.parentElement : t;
|
|
3866
|
+
if (jn.call(s, "details:not([open]) *"))
|
|
3869
3867
|
return !0;
|
|
3870
3868
|
if (!r || r === "full" || r === "legacy-full") {
|
|
3871
3869
|
if (typeof i == "function") {
|
|
@@ -3891,7 +3889,7 @@ var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3891
3889
|
for (var r = 0; r < n.children.length; r++) {
|
|
3892
3890
|
var i = n.children.item(r);
|
|
3893
3891
|
if (i.tagName === "LEGEND")
|
|
3894
|
-
return
|
|
3892
|
+
return jn.call(n, "fieldset[disabled] *") ? !0 : !i.contains(t);
|
|
3895
3893
|
}
|
|
3896
3894
|
return !0;
|
|
3897
3895
|
}
|
|
@@ -3940,21 +3938,21 @@ var id = ["input:not([inert])", "select:not([inert])", "textarea:not([inert])",
|
|
|
3940
3938
|
flatten: !0,
|
|
3941
3939
|
getShadowRoot: n.getShadowRoot
|
|
3942
3940
|
}) : r = sd(t, n.includeContainer, zi.bind(null, n)), r;
|
|
3943
|
-
},
|
|
3941
|
+
}, En = function(t, n) {
|
|
3944
3942
|
if (n = n || {}, !t)
|
|
3945
3943
|
throw new Error("No node provided");
|
|
3946
|
-
return
|
|
3944
|
+
return jn.call(t, $i) === !1 ? !1 : Es(n, t);
|
|
3947
3945
|
}, ip = /* @__PURE__ */ id.concat("iframe").join(","), Fi = function(t, n) {
|
|
3948
3946
|
if (n = n || {}, !t)
|
|
3949
3947
|
throw new Error("No node provided");
|
|
3950
|
-
return
|
|
3948
|
+
return jn.call(t, ip) === !1 ? !1 : zi(n, t);
|
|
3951
3949
|
};
|
|
3952
3950
|
const ap = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3953
3951
|
__proto__: null,
|
|
3954
3952
|
focusable: dd,
|
|
3955
3953
|
getTabIndex: gn,
|
|
3956
3954
|
isFocusable: Fi,
|
|
3957
|
-
isTabbable:
|
|
3955
|
+
isTabbable: En,
|
|
3958
3956
|
tabbable: cd
|
|
3959
3957
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3960
3958
|
/*!
|
|
@@ -4085,24 +4083,24 @@ var Du = {
|
|
|
4085
4083
|
delayInitialFocusTimer: void 0,
|
|
4086
4084
|
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
4087
4085
|
recentNavEvent: void 0
|
|
4088
|
-
}, o, l = function(A, _,
|
|
4089
|
-
return A && A[_] !== void 0 ? A[_] : a[
|
|
4086
|
+
}, o, l = function(A, _, T) {
|
|
4087
|
+
return A && A[_] !== void 0 ? A[_] : a[T || _];
|
|
4090
4088
|
}, u = function(A, _) {
|
|
4091
|
-
var
|
|
4089
|
+
var T = typeof (_ == null ? void 0 : _.composedPath) == "function" ? _.composedPath() : void 0;
|
|
4092
4090
|
return s.containerGroups.findIndex(function(j) {
|
|
4093
4091
|
var H = j.container, W = j.tabbableNodes;
|
|
4094
4092
|
return H.contains(A) || // fall back to explicit tabbable search which will take into consideration any
|
|
4095
4093
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
4096
4094
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
4097
4095
|
// look inside web components even if open)
|
|
4098
|
-
(
|
|
4096
|
+
(T == null ? void 0 : T.includes(H)) || W.find(function(ie) {
|
|
4099
4097
|
return ie === A;
|
|
4100
4098
|
});
|
|
4101
4099
|
});
|
|
4102
4100
|
}, d = function(A) {
|
|
4103
4101
|
var _ = a[A];
|
|
4104
4102
|
if (typeof _ == "function") {
|
|
4105
|
-
for (var
|
|
4103
|
+
for (var T = arguments.length, j = new Array(T > 1 ? T - 1 : 0), H = 1; H < T; H++)
|
|
4106
4104
|
j[H - 1] = arguments[H];
|
|
4107
4105
|
_ = _.apply(void 0, j);
|
|
4108
4106
|
}
|
|
@@ -4123,25 +4121,25 @@ var Du = {
|
|
|
4123
4121
|
if (u(r.activeElement) >= 0)
|
|
4124
4122
|
A = r.activeElement;
|
|
4125
4123
|
else {
|
|
4126
|
-
var _ = s.tabbableGroups[0],
|
|
4127
|
-
A =
|
|
4124
|
+
var _ = s.tabbableGroups[0], T = _ && _.firstTabbableNode;
|
|
4125
|
+
A = T || d("fallbackFocus");
|
|
4128
4126
|
}
|
|
4129
4127
|
if (!A)
|
|
4130
4128
|
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
4131
4129
|
return A;
|
|
4132
4130
|
}, m = function() {
|
|
4133
4131
|
if (s.containerGroups = s.containers.map(function(A) {
|
|
4134
|
-
var _ = cd(A, a.tabbableOptions),
|
|
4135
|
-
return
|
|
4136
|
-
}), ie =
|
|
4137
|
-
return
|
|
4132
|
+
var _ = cd(A, a.tabbableOptions), T = dd(A, a.tabbableOptions), j = _.length > 0 ? _[0] : void 0, H = _.length > 0 ? _[_.length - 1] : void 0, W = T.find(function(x) {
|
|
4133
|
+
return En(x);
|
|
4134
|
+
}), ie = T.slice().reverse().find(function(x) {
|
|
4135
|
+
return En(x);
|
|
4138
4136
|
}), ne = !!_.find(function(x) {
|
|
4139
4137
|
return gn(x) > 0;
|
|
4140
4138
|
});
|
|
4141
4139
|
return {
|
|
4142
4140
|
container: A,
|
|
4143
4141
|
tabbableNodes: _,
|
|
4144
|
-
focusableNodes:
|
|
4142
|
+
focusableNodes: T,
|
|
4145
4143
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
4146
4144
|
posTabIndexesFound: ne,
|
|
4147
4145
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
@@ -4169,10 +4167,10 @@ var Du = {
|
|
|
4169
4167
|
*/
|
|
4170
4168
|
nextTabbableNode: function(z) {
|
|
4171
4169
|
var re = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, F = _.indexOf(z);
|
|
4172
|
-
return F < 0 ? re ?
|
|
4173
|
-
return
|
|
4174
|
-
}) :
|
|
4175
|
-
return
|
|
4170
|
+
return F < 0 ? re ? T.slice(T.indexOf(z) + 1).find(function(k) {
|
|
4171
|
+
return En(k);
|
|
4172
|
+
}) : T.slice(0, T.indexOf(z)).reverse().find(function(k) {
|
|
4173
|
+
return En(k);
|
|
4176
4174
|
}) : _[F + (re ? 1 : -1)];
|
|
4177
4175
|
}
|
|
4178
4176
|
};
|
|
@@ -4202,11 +4200,11 @@ var Du = {
|
|
|
4202
4200
|
var _ = d("setReturnFocus", A);
|
|
4203
4201
|
return _ || (_ === !1 ? !1 : A);
|
|
4204
4202
|
}, b = function(A) {
|
|
4205
|
-
var _ = A.target,
|
|
4206
|
-
_ = _ || si(
|
|
4203
|
+
var _ = A.target, T = A.event, j = A.isBackward, H = j === void 0 ? !1 : j;
|
|
4204
|
+
_ = _ || si(T), m();
|
|
4207
4205
|
var W = null;
|
|
4208
4206
|
if (s.tabbableGroups.length > 0) {
|
|
4209
|
-
var ie = u(_,
|
|
4207
|
+
var ie = u(_, T), ne = ie >= 0 ? s.containerGroups[ie] : void 0;
|
|
4210
4208
|
if (ie < 0)
|
|
4211
4209
|
H ? W = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : W = s.tabbableGroups[0].firstTabbableNode;
|
|
4212
4210
|
else if (H) {
|
|
@@ -4214,21 +4212,21 @@ var Du = {
|
|
|
4214
4212
|
var q = O.firstTabbableNode;
|
|
4215
4213
|
return _ === q;
|
|
4216
4214
|
});
|
|
4217
|
-
if (x < 0 && (ne.container === _ || Fi(_, a.tabbableOptions) && !
|
|
4215
|
+
if (x < 0 && (ne.container === _ || Fi(_, a.tabbableOptions) && !En(_, a.tabbableOptions) && !ne.nextTabbableNode(_, !1)) && (x = ie), x >= 0) {
|
|
4218
4216
|
var z = x === 0 ? s.tabbableGroups.length - 1 : x - 1, re = s.tabbableGroups[z];
|
|
4219
4217
|
W = gn(_) >= 0 ? re.lastTabbableNode : re.lastDomTabbableNode;
|
|
4220
4218
|
} else
|
|
4221
|
-
Sr(
|
|
4219
|
+
Sr(T) || (W = ne.nextTabbableNode(_, !1));
|
|
4222
4220
|
} else {
|
|
4223
4221
|
var F = wu(s.tabbableGroups, function(O) {
|
|
4224
4222
|
var q = O.lastTabbableNode;
|
|
4225
4223
|
return _ === q;
|
|
4226
4224
|
});
|
|
4227
|
-
if (F < 0 && (ne.container === _ || Fi(_, a.tabbableOptions) && !
|
|
4225
|
+
if (F < 0 && (ne.container === _ || Fi(_, a.tabbableOptions) && !En(_, a.tabbableOptions) && !ne.nextTabbableNode(_)) && (F = ie), F >= 0) {
|
|
4228
4226
|
var k = F === s.tabbableGroups.length - 1 ? 0 : F + 1, N = s.tabbableGroups[k];
|
|
4229
4227
|
W = gn(_) >= 0 ? N.firstTabbableNode : N.firstDomTabbableNode;
|
|
4230
4228
|
} else
|
|
4231
|
-
Sr(
|
|
4229
|
+
Sr(T) || (W = ne.nextTabbableNode(_));
|
|
4232
4230
|
}
|
|
4233
4231
|
} else
|
|
4234
4232
|
W = d("fallbackFocus");
|
|
@@ -4251,9 +4249,9 @@ var Du = {
|
|
|
4251
4249
|
xr(a.allowOutsideClick, A) || A.preventDefault();
|
|
4252
4250
|
}
|
|
4253
4251
|
}, w = function(A) {
|
|
4254
|
-
var _ = si(A),
|
|
4255
|
-
if (
|
|
4256
|
-
|
|
4252
|
+
var _ = si(A), T = u(_, A) >= 0;
|
|
4253
|
+
if (T || _ instanceof Document)
|
|
4254
|
+
T && (s.mostRecentlyFocusedNode = _);
|
|
4257
4255
|
else {
|
|
4258
4256
|
A.stopImmediatePropagation();
|
|
4259
4257
|
var j, H = !0;
|
|
@@ -4285,11 +4283,11 @@ var Du = {
|
|
|
4285
4283
|
}, E = function(A) {
|
|
4286
4284
|
var _ = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
4287
4285
|
s.recentNavEvent = A;
|
|
4288
|
-
var
|
|
4286
|
+
var T = b({
|
|
4289
4287
|
event: A,
|
|
4290
4288
|
isBackward: _
|
|
4291
4289
|
});
|
|
4292
|
-
|
|
4290
|
+
T && (Sr(A) && A.preventDefault(), g(T));
|
|
4293
4291
|
}, B = function(A) {
|
|
4294
4292
|
if (cp(A) && xr(a.escapeDeactivates, A) !== !1) {
|
|
4295
4293
|
A.preventDefault(), o.deactivate();
|
|
@@ -4316,12 +4314,12 @@ var Du = {
|
|
|
4316
4314
|
capture: !0,
|
|
4317
4315
|
passive: !1
|
|
4318
4316
|
}), o;
|
|
4319
|
-
},
|
|
4317
|
+
}, S = function() {
|
|
4320
4318
|
if (s.active)
|
|
4321
4319
|
return r.removeEventListener("focusin", w, !0), r.removeEventListener("mousedown", v, !0), r.removeEventListener("touchstart", v, !0), r.removeEventListener("click", D, !0), r.removeEventListener("keydown", B, !0), o;
|
|
4322
4320
|
}, I = function(A) {
|
|
4323
|
-
var _ = A.some(function(
|
|
4324
|
-
var j = Array.from(
|
|
4321
|
+
var _ = A.some(function(T) {
|
|
4322
|
+
var j = Array.from(T.removedNodes);
|
|
4325
4323
|
return j.some(function(H) {
|
|
4326
4324
|
return H === s.mostRecentlyFocusedNode;
|
|
4327
4325
|
});
|
|
@@ -4345,10 +4343,10 @@ var Du = {
|
|
|
4345
4343
|
activate: function(A) {
|
|
4346
4344
|
if (s.active)
|
|
4347
4345
|
return this;
|
|
4348
|
-
var _ = l(A, "onActivate"),
|
|
4346
|
+
var _ = l(A, "onActivate"), T = l(A, "onPostActivate"), j = l(A, "checkCanFocusTrap");
|
|
4349
4347
|
j || m(), s.active = !0, s.paused = !1, s.nodeFocusedBeforeActivation = r.activeElement, _ == null || _();
|
|
4350
4348
|
var H = function() {
|
|
4351
|
-
j && m(), C(), L(),
|
|
4349
|
+
j && m(), C(), L(), T == null || T();
|
|
4352
4350
|
};
|
|
4353
4351
|
return j ? (j(s.containers.concat()).then(H, H), this) : (H(), this);
|
|
4354
4352
|
},
|
|
@@ -4360,9 +4358,9 @@ var Du = {
|
|
|
4360
4358
|
onPostDeactivate: a.onPostDeactivate,
|
|
4361
4359
|
checkCanReturnFocus: a.checkCanReturnFocus
|
|
4362
4360
|
}, A);
|
|
4363
|
-
clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0,
|
|
4364
|
-
var
|
|
4365
|
-
|
|
4361
|
+
clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, S(), s.active = !1, s.paused = !1, L(), Du.deactivateTrap(i, o);
|
|
4362
|
+
var T = l(_, "onDeactivate"), j = l(_, "onPostDeactivate"), H = l(_, "checkCanReturnFocus"), W = l(_, "returnFocus", "returnFocusOnDeactivate");
|
|
4363
|
+
T == null || T();
|
|
4366
4364
|
var ie = function() {
|
|
4367
4365
|
xu(function() {
|
|
4368
4366
|
W && g(f(s.nodeFocusedBeforeActivation)), j == null || j();
|
|
@@ -4373,19 +4371,19 @@ var Du = {
|
|
|
4373
4371
|
pause: function(A) {
|
|
4374
4372
|
if (s.paused || !s.active)
|
|
4375
4373
|
return this;
|
|
4376
|
-
var _ = l(A, "onPause"),
|
|
4377
|
-
return s.paused = !0, _ == null || _(),
|
|
4374
|
+
var _ = l(A, "onPause"), T = l(A, "onPostPause");
|
|
4375
|
+
return s.paused = !0, _ == null || _(), S(), L(), T == null || T(), this;
|
|
4378
4376
|
},
|
|
4379
4377
|
unpause: function(A) {
|
|
4380
4378
|
if (!s.paused || !s.active)
|
|
4381
4379
|
return this;
|
|
4382
|
-
var _ = l(A, "onUnpause"),
|
|
4383
|
-
return s.paused = !1, _ == null || _(), m(), C(), L(),
|
|
4380
|
+
var _ = l(A, "onUnpause"), T = l(A, "onPostUnpause");
|
|
4381
|
+
return s.paused = !1, _ == null || _(), m(), C(), L(), T == null || T(), this;
|
|
4384
4382
|
},
|
|
4385
4383
|
updateContainerElements: function(A) {
|
|
4386
4384
|
var _ = [].concat(A).filter(Boolean);
|
|
4387
|
-
return s.containers = _.map(function(
|
|
4388
|
-
return typeof
|
|
4385
|
+
return s.containers = _.map(function(T) {
|
|
4386
|
+
return typeof T == "string" ? r.querySelector(T) : T;
|
|
4389
4387
|
}), s.active && m(), L(), this;
|
|
4390
4388
|
}
|
|
4391
4389
|
}, o.updateContainerElements(t), o;
|
|
@@ -4728,7 +4726,7 @@ ao.defaultProps = {
|
|
|
4728
4726
|
_createFocusTrap: Fp
|
|
4729
4727
|
};
|
|
4730
4728
|
var Tp = ao;
|
|
4731
|
-
const Sp = /* @__PURE__ */
|
|
4729
|
+
const Sp = /* @__PURE__ */ Mn(Tp);
|
|
4732
4730
|
const xn = ({
|
|
4733
4731
|
id: e = "content-overlay",
|
|
4734
4732
|
isOpen: t = !1,
|
|
@@ -4745,11 +4743,11 @@ const xn = ({
|
|
|
4745
4743
|
gtmContext: h = "Modal"
|
|
4746
4744
|
}) => {
|
|
4747
4745
|
const m = le(), { registerOverlay: p, unregisterOverlay: g } = Cm(), [f, b] = ue(t), [v, w] = ue(null), E = ke(null), B = (P) => {
|
|
4748
|
-
f && P.key === "Escape" &&
|
|
4746
|
+
f && P.key === "Escape" && S(!1);
|
|
4749
4747
|
}, D = (P) => {
|
|
4750
4748
|
w(P.target);
|
|
4751
4749
|
}, C = (P) => {
|
|
4752
|
-
v === E.current && P.target === E.current &&
|
|
4750
|
+
v === E.current && P.target === E.current && S(!1), w(null);
|
|
4753
4751
|
};
|
|
4754
4752
|
de(() => {
|
|
4755
4753
|
if (f)
|
|
@@ -4762,7 +4760,7 @@ const xn = ({
|
|
|
4762
4760
|
P && (P.removeEventListener("mousedown", D), P.removeEventListener("mouseup", C));
|
|
4763
4761
|
};
|
|
4764
4762
|
}, [v]);
|
|
4765
|
-
const
|
|
4763
|
+
const S = (P) => {
|
|
4766
4764
|
if (b(P), P)
|
|
4767
4765
|
i(), p(e);
|
|
4768
4766
|
else {
|
|
@@ -4771,7 +4769,7 @@ const xn = ({
|
|
|
4771
4769
|
a(), g(e);
|
|
4772
4770
|
}
|
|
4773
4771
|
};
|
|
4774
|
-
de(() => (
|
|
4772
|
+
de(() => (S(t), () => {
|
|
4775
4773
|
f && g(e);
|
|
4776
4774
|
}), [t]);
|
|
4777
4775
|
const I = r ? { "--max-width": `${r / 16}rem` } : {};
|
|
@@ -4803,7 +4801,7 @@ const xn = ({
|
|
|
4803
4801
|
variant: "tertiary",
|
|
4804
4802
|
size: "medium",
|
|
4805
4803
|
icon: { icon: "close" },
|
|
4806
|
-
onClick: () =>
|
|
4804
|
+
onClick: () => S(!1),
|
|
4807
4805
|
className: "gtm-trackable",
|
|
4808
4806
|
"data-gtm-event-type": "close-modal-click",
|
|
4809
4807
|
"data-gtm-event-context": h,
|
|
@@ -4958,7 +4956,7 @@ const W_ = ({ breadcrumbs: e, cutoff: t = 20, className: n = "" }) => {
|
|
|
4958
4956
|
children: r.formatMessage({ id: "breadcrumbs_currentPage" })
|
|
4959
4957
|
}
|
|
4960
4958
|
),
|
|
4961
|
-
/* @__PURE__ */ c.jsx(
|
|
4959
|
+
/* @__PURE__ */ c.jsx(Rn, { href: s ? void 0 : a, ...l, children: ar(i, t) })
|
|
4962
4960
|
] }, `${window.btoa(i)}_${o}`);
|
|
4963
4961
|
}
|
|
4964
4962
|
) })
|
|
@@ -5109,7 +5107,7 @@ const ui = "languageSwitcher_", U_ = ({
|
|
|
5109
5107
|
}
|
|
5110
5108
|
};
|
|
5111
5109
|
}
|
|
5112
|
-
return /* @__PURE__ */ c.jsx("li", { children: /* @__PURE__ */ c.jsx(
|
|
5110
|
+
return /* @__PURE__ */ c.jsx("li", { children: /* @__PURE__ */ c.jsx(Rn, { ...w, fallbackElement: "span", children: Da[b] }) }, b);
|
|
5113
5111
|
}) }),
|
|
5114
5112
|
s !== "short" && !f && /* @__PURE__ */ c.jsx("p", { children: u.formatMessage({
|
|
5115
5113
|
id: `${ui}translation_${t ? "original" : n ? "human" : "machine"}`
|
|
@@ -5430,8 +5428,8 @@ const V_ = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
|
|
|
5430
5428
|
if (B && !h(B))
|
|
5431
5429
|
return;
|
|
5432
5430
|
f = r(f, b, D);
|
|
5433
|
-
const C = s === f,
|
|
5434
|
-
w || (
|
|
5431
|
+
const C = s === f, S = {};
|
|
5432
|
+
w || (S["aria-controls"] = f, S.onClick = (I) => {
|
|
5435
5433
|
I.preventDefault(), I.stopPropagation(), o(f), !n && (window.location.hash = `#${f}`);
|
|
5436
5434
|
}, p.push(
|
|
5437
5435
|
/* @__PURE__ */ c.jsx(
|
|
@@ -5458,7 +5456,7 @@ const V_ = ({ tabs: e, className: t = "", preventLocationChange: n }) => {
|
|
|
5458
5456
|
tabIndex: C ? 0 : -1,
|
|
5459
5457
|
"aria-selected": C,
|
|
5460
5458
|
onKeyDown: (I) => d(I, D),
|
|
5461
|
-
...
|
|
5459
|
+
...S,
|
|
5462
5460
|
children: b
|
|
5463
5461
|
}
|
|
5464
5462
|
) }, `tab-${f}`)
|
|
@@ -5906,13 +5904,13 @@ const gd = ({
|
|
|
5906
5904
|
case "ArrowRight":
|
|
5907
5905
|
w.stopPropagation(), w.preventDefault();
|
|
5908
5906
|
const C = w.currentTarget;
|
|
5909
|
-
let
|
|
5907
|
+
let S = C == null ? void 0 : C.nextElementSibling;
|
|
5910
5908
|
if (w.key === "ArrowLeft") {
|
|
5911
5909
|
const I = C == null ? void 0 : C.previousElementSibling;
|
|
5912
|
-
I ?
|
|
5910
|
+
I ? S = I : S = (E = C == null ? void 0 : C.parentElement) == null ? void 0 : E.lastElementChild;
|
|
5913
5911
|
} else
|
|
5914
|
-
|
|
5915
|
-
|
|
5912
|
+
S || (S = (B = C == null ? void 0 : C.parentElement) == null ? void 0 : B.firstElementChild);
|
|
5913
|
+
S && ((D = S == null ? void 0 : S.querySelector("label")) == null || D.focus());
|
|
5916
5914
|
break;
|
|
5917
5915
|
}
|
|
5918
5916
|
} : void 0,
|
|
@@ -5951,17 +5949,17 @@ const Gp = ({
|
|
|
5951
5949
|
}) => {
|
|
5952
5950
|
const d = le(), [h, m] = ue(!1), p = r || n, g = Array.isArray(p) ? [...p] : p ? [p] : [], [f, b] = ue(g);
|
|
5953
5951
|
let v;
|
|
5954
|
-
Array.isArray(f) && f.length === 1 && typeof f[0] == "string" ? v = t && f ? t.find((
|
|
5952
|
+
Array.isArray(f) && f.length === 1 && typeof f[0] == "string" ? v = t && f ? t.find((S) => S.id === f[0]) : t ? t[0] : { id: "", label: "" } : Array.isArray(f) && f.length === 1 && typeof f[0] != "string" ? v = f[0] : v = { id: "", label: "" }, de(() => {
|
|
5955
5953
|
b(g);
|
|
5956
5954
|
}, [r, n]);
|
|
5957
|
-
const { onChange: w, onMultiSelectSubmit: E, ...B } = i, D = (
|
|
5955
|
+
const { onChange: w, onMultiSelectSubmit: E, ...B } = i, D = (S) => {
|
|
5958
5956
|
if (o) {
|
|
5959
5957
|
let I = [];
|
|
5960
|
-
f != null && f.includes(
|
|
5958
|
+
f != null && f.includes(S.id) ? I = f.filter((P) => P !== S.id) : I = [...f, S.id], b([...I]), w && w([...I]);
|
|
5961
5959
|
} else
|
|
5962
|
-
b([
|
|
5963
|
-
}, C = (
|
|
5964
|
-
if (
|
|
5960
|
+
b([S]), w && w(S.id), m(!1);
|
|
5961
|
+
}, C = (S) => {
|
|
5962
|
+
if (S === "all") {
|
|
5965
5963
|
const I = (t == null ? void 0 : t.map((P) => P.id)) || [];
|
|
5966
5964
|
b(I), w && w(I);
|
|
5967
5965
|
} else
|
|
@@ -5975,8 +5973,8 @@ const Gp = ({
|
|
|
5975
5973
|
"aria-expanded": h,
|
|
5976
5974
|
"aria-haspopup": "listbox",
|
|
5977
5975
|
"aria-controls": "dropdown-list",
|
|
5978
|
-
onClick: (
|
|
5979
|
-
|
|
5976
|
+
onClick: (S) => {
|
|
5977
|
+
S.preventDefault(), S.stopPropagation(), m(!h);
|
|
5980
5978
|
},
|
|
5981
5979
|
"data-testid": "dropdown-selector",
|
|
5982
5980
|
...B,
|
|
@@ -5990,23 +5988,23 @@ const Gp = ({
|
|
|
5990
5988
|
"select",
|
|
5991
5989
|
{
|
|
5992
5990
|
defaultValue: v.id,
|
|
5993
|
-
onChange: (
|
|
5994
|
-
|
|
5995
|
-
const I = t && t.find((P) => P.id ===
|
|
5991
|
+
onChange: (S) => {
|
|
5992
|
+
S.preventDefault(), S.stopPropagation();
|
|
5993
|
+
const I = t && t.find((P) => P.id === S.target.value);
|
|
5996
5994
|
D(I);
|
|
5997
5995
|
},
|
|
5998
5996
|
hidden: !h,
|
|
5999
5997
|
...B,
|
|
6000
|
-
children: t == null ? void 0 : t.map((
|
|
5998
|
+
children: t == null ? void 0 : t.map((S) => /* @__PURE__ */ c.jsx(
|
|
6001
5999
|
"option",
|
|
6002
6000
|
{
|
|
6003
|
-
value:
|
|
6001
|
+
value: S.id,
|
|
6004
6002
|
className: "gtm-trackable",
|
|
6005
|
-
"data-gtm-event-type": `${
|
|
6003
|
+
"data-gtm-event-type": `${S.id}-click`,
|
|
6006
6004
|
"data-gtm-event-context": a,
|
|
6007
|
-
children:
|
|
6005
|
+
children: S.label
|
|
6008
6006
|
},
|
|
6009
|
-
|
|
6007
|
+
S.id
|
|
6010
6008
|
))
|
|
6011
6009
|
}
|
|
6012
6010
|
),
|
|
@@ -6047,8 +6045,8 @@ const Gp = ({
|
|
|
6047
6045
|
) })
|
|
6048
6046
|
] })
|
|
6049
6047
|
] }),
|
|
6050
|
-
/* @__PURE__ */ c.jsx("ul", { children: t == null ? void 0 : t.map((
|
|
6051
|
-
const I =
|
|
6048
|
+
/* @__PURE__ */ c.jsx("ul", { children: t == null ? void 0 : t.map((S) => {
|
|
6049
|
+
const I = S.id === v.id || (f == null ? void 0 : f.includes(S)) || (f == null ? void 0 : f.includes(S.id));
|
|
6052
6050
|
return /* @__PURE__ */ c.jsx("li", { "data-testid": "dropdown-options", children: /* @__PURE__ */ c.jsxs(
|
|
6053
6051
|
"button",
|
|
6054
6052
|
{
|
|
@@ -6056,20 +6054,20 @@ const Gp = ({
|
|
|
6056
6054
|
selected: I,
|
|
6057
6055
|
"selected-single": I && !o
|
|
6058
6056
|
}),
|
|
6059
|
-
"data-gtm-event-type": `${
|
|
6057
|
+
"data-gtm-event-type": `${S.id}-click`,
|
|
6060
6058
|
"data-gtm-event-context": a,
|
|
6061
6059
|
onClick: (P) => {
|
|
6062
|
-
P.preventDefault(), P.stopPropagation(), D(
|
|
6060
|
+
P.preventDefault(), P.stopPropagation(), D(S);
|
|
6063
6061
|
},
|
|
6064
6062
|
role: "menuitem",
|
|
6065
6063
|
"aria-current": I,
|
|
6066
6064
|
"data-testid": I ? "current-selection" : "",
|
|
6067
6065
|
children: [
|
|
6068
6066
|
o && /* @__PURE__ */ c.jsx("span", { className: "pretty-checkbox", "data-testid": "pretty-checkbox" }),
|
|
6069
|
-
/* @__PURE__ */ c.jsx("span", { className: V({ "menu-option-label": o }), children:
|
|
6067
|
+
/* @__PURE__ */ c.jsx("span", { className: V({ "menu-option-label": o }), children: S.label })
|
|
6070
6068
|
]
|
|
6071
6069
|
}
|
|
6072
|
-
) },
|
|
6070
|
+
) }, S.id);
|
|
6073
6071
|
}) })
|
|
6074
6072
|
] }),
|
|
6075
6073
|
(l == null ? void 0 : l.submitSection) && /* @__PURE__ */ c.jsx("p", { className: "submit", children: /* @__PURE__ */ c.jsx(
|
|
@@ -6129,8 +6127,8 @@ const Eu = ({
|
|
|
6129
6127
|
return;
|
|
6130
6128
|
let C;
|
|
6131
6129
|
if (a) {
|
|
6132
|
-
const
|
|
6133
|
-
Array.isArray(g) &&
|
|
6130
|
+
const S = g == null ? void 0 : g.indexOf(w);
|
|
6131
|
+
Array.isArray(g) && S >= 0 ? (C = g, C.splice(S, 1)) : (!g || g.length === 0 ? C = [] : C = g, C.push(w));
|
|
6134
6132
|
} else
|
|
6135
6133
|
C = f === w ? void 0 : w;
|
|
6136
6134
|
t.onChange(C);
|
|
@@ -6238,7 +6236,7 @@ const Kn = {
|
|
|
6238
6236
|
type: o,
|
|
6239
6237
|
required: p,
|
|
6240
6238
|
"aria-required": p,
|
|
6241
|
-
functions:
|
|
6239
|
+
functions: An(i),
|
|
6242
6240
|
value: u
|
|
6243
6241
|
};
|
|
6244
6242
|
const C = ($) => {
|
|
@@ -6255,7 +6253,7 @@ const Kn = {
|
|
|
6255
6253
|
});
|
|
6256
6254
|
}
|
|
6257
6255
|
o && Kn[o] && Kn[o].props && (D = { ...D, ...Kn[o].props }), b && (D.intlPath = `${t}_${e}`), r && (D["aria-invalid"] = !0, D["aria-errormessage"] = w, C(w));
|
|
6258
|
-
const
|
|
6256
|
+
const S = h.label || m.formatMessage({ id: t ? `${t}_${e}` : e }), I = ({ ...$ }) => r ? te.createElement(
|
|
6259
6257
|
$.as || "p",
|
|
6260
6258
|
{
|
|
6261
6259
|
id: w,
|
|
@@ -6270,7 +6268,7 @@ const Kn = {
|
|
|
6270
6268
|
f,
|
|
6271
6269
|
{
|
|
6272
6270
|
...D,
|
|
6273
|
-
label:
|
|
6271
|
+
label: S,
|
|
6274
6272
|
className: V("field-wrapper", n)
|
|
6275
6273
|
}
|
|
6276
6274
|
),
|
|
@@ -6291,7 +6289,7 @@ const Kn = {
|
|
|
6291
6289
|
b ? te.Fragment : "p",
|
|
6292
6290
|
P,
|
|
6293
6291
|
/* @__PURE__ */ c.jsxs(L, { ...B, children: [
|
|
6294
|
-
|
|
6292
|
+
S,
|
|
6295
6293
|
p && s && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
6296
6294
|
" ",
|
|
6297
6295
|
/* @__PURE__ */ c.jsxs("small", { children: [
|
|
@@ -6323,7 +6321,7 @@ const Kn = {
|
|
|
6323
6321
|
] })
|
|
6324
6322
|
) });
|
|
6325
6323
|
}, Xp = (e, t) => {
|
|
6326
|
-
const { type: n, payload: r } = t, i = e.errors ?
|
|
6324
|
+
const { type: n, payload: r } = t, i = e.errors ? An(e.errors) : {}, a = e.values ? An(e.values) : {};
|
|
6327
6325
|
switch (n) {
|
|
6328
6326
|
case "updateValue":
|
|
6329
6327
|
if (r != null && r.key && i[r == null ? void 0 : r.key] && delete i[r == null ? void 0 : r.key], r != null && r.key) {
|
|
@@ -6354,7 +6352,7 @@ const Kn = {
|
|
|
6354
6352
|
onFailure: u = () => {
|
|
6355
6353
|
},
|
|
6356
6354
|
intl: d
|
|
6357
|
-
} = r, h =
|
|
6355
|
+
} = r, h = An(Object.keys(i));
|
|
6358
6356
|
for (const m of s)
|
|
6359
6357
|
if (m.validation)
|
|
6360
6358
|
for (let p = 0; p < m.validation.length; p++) {
|
|
@@ -6413,7 +6411,7 @@ const Kn = {
|
|
|
6413
6411
|
}
|
|
6414
6412
|
};
|
|
6415
6413
|
let Ta = null;
|
|
6416
|
-
const
|
|
6414
|
+
const Ln = ({
|
|
6417
6415
|
element: e = "form",
|
|
6418
6416
|
fields: t,
|
|
6419
6417
|
className: n = "",
|
|
@@ -6444,7 +6442,7 @@ const wn = ({
|
|
|
6444
6442
|
} = l || {}, {
|
|
6445
6443
|
onSuccess: C = async () => {
|
|
6446
6444
|
},
|
|
6447
|
-
onCancel:
|
|
6445
|
+
onCancel: S = () => {
|
|
6448
6446
|
},
|
|
6449
6447
|
onCatch: I = () => {
|
|
6450
6448
|
},
|
|
@@ -6460,7 +6458,7 @@ const wn = ({
|
|
|
6460
6458
|
formSubmitted: !1,
|
|
6461
6459
|
errors: {},
|
|
6462
6460
|
values: $
|
|
6463
|
-
}), { errors:
|
|
6461
|
+
}), { errors: T, isSubmitting: j, formSubmitted: H, values: W } = A;
|
|
6464
6462
|
de(() => {
|
|
6465
6463
|
w && H && (Ta = setTimeout(() => {
|
|
6466
6464
|
_({
|
|
@@ -6566,7 +6564,7 @@ const wn = ({
|
|
|
6566
6564
|
"data-gtm-event-context": d.context,
|
|
6567
6565
|
"data-gtm-event-type": d.event,
|
|
6568
6566
|
disabled: j || H,
|
|
6569
|
-
onClick:
|
|
6567
|
+
onClick: S,
|
|
6570
6568
|
children: o.text || L.formatMessage({ id: "form_cancel" })
|
|
6571
6569
|
}), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
6572
6570
|
te.createElement(
|
|
@@ -6578,8 +6576,8 @@ const wn = ({
|
|
|
6578
6576
|
ref: ne
|
|
6579
6577
|
},
|
|
6580
6578
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
6581
|
-
|
|
6582
|
-
|
|
6579
|
+
T != null && T.general ? /* @__PURE__ */ c.jsx(
|
|
6580
|
+
$n,
|
|
6583
6581
|
{
|
|
6584
6582
|
variant: "error",
|
|
6585
6583
|
text: L.formatMessage({ id: "form_error_generalError" })
|
|
@@ -6611,7 +6609,7 @@ const wn = ({
|
|
|
6611
6609
|
...k,
|
|
6612
6610
|
showRequiredLabels: B,
|
|
6613
6611
|
value: X,
|
|
6614
|
-
error:
|
|
6612
|
+
error: T == null ? void 0 : T[O],
|
|
6615
6613
|
functions: ce
|
|
6616
6614
|
},
|
|
6617
6615
|
O
|
|
@@ -7462,10 +7460,10 @@ function Et(e, ...t) {
|
|
|
7462
7460
|
);
|
|
7463
7461
|
}
|
|
7464
7462
|
var ur = Object.getPrototypeOf;
|
|
7465
|
-
function
|
|
7463
|
+
function On(e) {
|
|
7466
7464
|
return !!e && !!e[Tt];
|
|
7467
7465
|
}
|
|
7468
|
-
function
|
|
7466
|
+
function Pn(e) {
|
|
7469
7467
|
var t;
|
|
7470
7468
|
return e ? Ad(e) || Array.isArray(e) || !!e[Au] || !!((t = e.constructor) != null && t[Au]) || ua(e) || la(e) : !1;
|
|
7471
7469
|
}
|
|
@@ -7504,7 +7502,7 @@ function ua(e) {
|
|
|
7504
7502
|
function la(e) {
|
|
7505
7503
|
return e instanceof Set;
|
|
7506
7504
|
}
|
|
7507
|
-
function
|
|
7505
|
+
function _n(e) {
|
|
7508
7506
|
return e.copy_ || e.base_;
|
|
7509
7507
|
}
|
|
7510
7508
|
function As(e, t) {
|
|
@@ -7539,7 +7537,7 @@ function As(e, t) {
|
|
|
7539
7537
|
}
|
|
7540
7538
|
}
|
|
7541
7539
|
function co(e, t = !1) {
|
|
7542
|
-
return ca(e) ||
|
|
7540
|
+
return ca(e) || On(e) || !Pn(e) || (oa(e) > 1 && (e.set = e.add = e.clear = e.delete = Sg), Object.freeze(e), t && Object.entries(e).forEach(([n, r]) => co(r, !0))), e;
|
|
7543
7541
|
}
|
|
7544
7542
|
function Sg() {
|
|
7545
7543
|
Et(2);
|
|
@@ -7548,7 +7546,7 @@ function ca(e) {
|
|
|
7548
7546
|
return Object.isFrozen(e);
|
|
7549
7547
|
}
|
|
7550
7548
|
var jg = {};
|
|
7551
|
-
function
|
|
7549
|
+
function Nn(e) {
|
|
7552
7550
|
const t = jg[e];
|
|
7553
7551
|
return t || Et(0, e), t;
|
|
7554
7552
|
}
|
|
@@ -7568,7 +7566,7 @@ function Og(e, t) {
|
|
|
7568
7566
|
};
|
|
7569
7567
|
}
|
|
7570
7568
|
function Bu(e, t) {
|
|
7571
|
-
t && (
|
|
7569
|
+
t && (Nn("Patches"), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
7572
7570
|
}
|
|
7573
7571
|
function Bs(e) {
|
|
7574
7572
|
Ts(e), e.drafts_.forEach(Pg), e.drafts_ = null;
|
|
@@ -7586,7 +7584,7 @@ function Pg(e) {
|
|
|
7586
7584
|
function Su(e, t) {
|
|
7587
7585
|
t.unfinalizedDrafts_ = t.drafts_.length;
|
|
7588
7586
|
const n = t.drafts_[0];
|
|
7589
|
-
return e !== void 0 && e !== n ? (n[Tt].modified_ && (Bs(t), Et(4)),
|
|
7587
|
+
return e !== void 0 && e !== n ? (n[Tt].modified_ && (Bs(t), Et(4)), Pn(e) && (e = Hi(t, e), t.parent_ || Vi(t, e)), t.patches_ && Nn("Patches").generateReplacementPatches_(
|
|
7590
7588
|
n[Tt].base_,
|
|
7591
7589
|
e,
|
|
7592
7590
|
t.patches_,
|
|
@@ -7613,7 +7611,7 @@ function Hi(e, t, n) {
|
|
|
7613
7611
|
r.type_ === 3 && (a = new Set(i), i.clear(), s = !0), Ui(
|
|
7614
7612
|
a,
|
|
7615
7613
|
(o, l) => ju(e, r, i, o, l, n, s)
|
|
7616
|
-
), Vi(e, i, !1), n && e.patches_ &&
|
|
7614
|
+
), Vi(e, i, !1), n && e.patches_ && Nn("Patches").generatePatches_(
|
|
7617
7615
|
r,
|
|
7618
7616
|
n,
|
|
7619
7617
|
e.patches_,
|
|
@@ -7623,16 +7621,16 @@ function Hi(e, t, n) {
|
|
|
7623
7621
|
return r.copy_;
|
|
7624
7622
|
}
|
|
7625
7623
|
function ju(e, t, n, r, i, a, s) {
|
|
7626
|
-
if (process.env.NODE_ENV !== "production" && i === n && Et(5),
|
|
7624
|
+
if (process.env.NODE_ENV !== "production" && i === n && Et(5), On(i)) {
|
|
7627
7625
|
const o = a && t && t.type_ !== 3 && // Set objects are atomic since they have no keys.
|
|
7628
7626
|
!Fs(t.assigned_, r) ? a.concat(r) : void 0, l = Hi(e, i, o);
|
|
7629
|
-
if (Bd(n, r, l),
|
|
7627
|
+
if (Bd(n, r, l), On(l))
|
|
7630
7628
|
e.canAutoFreeze_ = !1;
|
|
7631
7629
|
else
|
|
7632
7630
|
return;
|
|
7633
7631
|
} else
|
|
7634
7632
|
s && n.add(i);
|
|
7635
|
-
if (
|
|
7633
|
+
if (Pn(i) && !ca(i)) {
|
|
7636
7634
|
if (!e.immer_.autoFreeze_ && e.unfinalizedDrafts_ < 1)
|
|
7637
7635
|
return;
|
|
7638
7636
|
Hi(e, i), (!t || !t.scope_.parent_) && typeof r != "symbol" && Object.prototype.propertyIsEnumerable.call(n, r) && Vi(e, i);
|
|
@@ -7674,24 +7672,24 @@ var fo = {
|
|
|
7674
7672
|
get(e, t) {
|
|
7675
7673
|
if (t === Tt)
|
|
7676
7674
|
return e;
|
|
7677
|
-
const n =
|
|
7675
|
+
const n = _n(e);
|
|
7678
7676
|
if (!Fs(n, t))
|
|
7679
7677
|
return Mg(e, n, t);
|
|
7680
7678
|
const r = n[t];
|
|
7681
|
-
return e.finalized_ || !
|
|
7679
|
+
return e.finalized_ || !Pn(r) ? r : r === Pa(e.base_, t) ? (Na(e), e.copy_[t] = js(r, e)) : r;
|
|
7682
7680
|
},
|
|
7683
7681
|
has(e, t) {
|
|
7684
|
-
return t in
|
|
7682
|
+
return t in _n(e);
|
|
7685
7683
|
},
|
|
7686
7684
|
ownKeys(e) {
|
|
7687
|
-
return Reflect.ownKeys(
|
|
7685
|
+
return Reflect.ownKeys(_n(e));
|
|
7688
7686
|
},
|
|
7689
7687
|
set(e, t, n) {
|
|
7690
|
-
const r = Sd(
|
|
7688
|
+
const r = Sd(_n(e), t);
|
|
7691
7689
|
if (r != null && r.set)
|
|
7692
7690
|
return r.set.call(e.draft_, n), !0;
|
|
7693
7691
|
if (!e.modified_) {
|
|
7694
|
-
const i = Pa(
|
|
7692
|
+
const i = Pa(_n(e), t), a = i == null ? void 0 : i[Tt];
|
|
7695
7693
|
if (a && a.base_ === n)
|
|
7696
7694
|
return e.copy_[t] = n, e.assigned_[t] = !1, !0;
|
|
7697
7695
|
if (Tg(n, i) && (n !== void 0 || Fs(e.base_, t)))
|
|
@@ -7708,7 +7706,7 @@ var fo = {
|
|
|
7708
7706
|
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
|
|
7709
7707
|
// the same guarantee in ES5 mode.
|
|
7710
7708
|
getOwnPropertyDescriptor(e, t) {
|
|
7711
|
-
const n =
|
|
7709
|
+
const n = _n(e), r = Reflect.getOwnPropertyDescriptor(n, t);
|
|
7712
7710
|
return r && {
|
|
7713
7711
|
writable: !0,
|
|
7714
7712
|
configurable: e.type_ !== 1 || t !== "length",
|
|
@@ -7739,7 +7737,7 @@ Wr.set = function(e, t, n) {
|
|
|
7739
7737
|
};
|
|
7740
7738
|
function Pa(e, t) {
|
|
7741
7739
|
const n = e[Tt];
|
|
7742
|
-
return (n ?
|
|
7740
|
+
return (n ? _n(n) : e)[t];
|
|
7743
7741
|
}
|
|
7744
7742
|
function Mg(e, t, n) {
|
|
7745
7743
|
var i;
|
|
@@ -7783,7 +7781,7 @@ var Rg = class {
|
|
|
7783
7781
|
}
|
|
7784
7782
|
typeof n != "function" && Et(6), r !== void 0 && typeof r != "function" && Et(7);
|
|
7785
7783
|
let i;
|
|
7786
|
-
if (
|
|
7784
|
+
if (Pn(t)) {
|
|
7787
7785
|
const a = Tu(this), s = js(t, void 0);
|
|
7788
7786
|
let o = !0;
|
|
7789
7787
|
try {
|
|
@@ -7795,7 +7793,7 @@ var Rg = class {
|
|
|
7795
7793
|
} else if (!t || typeof t != "object") {
|
|
7796
7794
|
if (i = n(t), i === void 0 && (i = t), i === Fd && (i = void 0), this.autoFreeze_ && co(i, !0), r) {
|
|
7797
7795
|
const a = [], s = [];
|
|
7798
|
-
|
|
7796
|
+
Nn("Patches").generateReplacementPatches_(t, i, a, s), r(a, s);
|
|
7799
7797
|
}
|
|
7800
7798
|
return i;
|
|
7801
7799
|
} else
|
|
@@ -7810,7 +7808,7 @@ var Rg = class {
|
|
|
7810
7808
|
}, typeof (e == null ? void 0 : e.autoFreeze) == "boolean" && this.setAutoFreeze(e.autoFreeze), typeof (e == null ? void 0 : e.useStrictShallowCopy) == "boolean" && this.setUseStrictShallowCopy(e.useStrictShallowCopy);
|
|
7811
7809
|
}
|
|
7812
7810
|
createDraft(e) {
|
|
7813
|
-
|
|
7811
|
+
Pn(e) || Et(8), On(e) && (e = $g(e));
|
|
7814
7812
|
const t = Tu(this), n = js(e, void 0);
|
|
7815
7813
|
return n[Tt].isManual_ = !0, Ts(t), n;
|
|
7816
7814
|
}
|
|
@@ -7846,22 +7844,22 @@ var Rg = class {
|
|
|
7846
7844
|
}
|
|
7847
7845
|
}
|
|
7848
7846
|
n > -1 && (t = t.slice(n + 1));
|
|
7849
|
-
const r =
|
|
7850
|
-
return
|
|
7847
|
+
const r = Nn("Patches").applyPatches_;
|
|
7848
|
+
return On(e) ? r(e, t) : this.produce(
|
|
7851
7849
|
e,
|
|
7852
7850
|
(i) => r(i, t)
|
|
7853
7851
|
);
|
|
7854
7852
|
}
|
|
7855
7853
|
};
|
|
7856
7854
|
function js(e, t) {
|
|
7857
|
-
const n = ua(e) ?
|
|
7855
|
+
const n = ua(e) ? Nn("MapSet").proxyMap_(e, t) : la(e) ? Nn("MapSet").proxySet_(e, t) : Ng(e, t);
|
|
7858
7856
|
return (t ? t.scope_ : Td()).drafts_.push(n), n;
|
|
7859
7857
|
}
|
|
7860
7858
|
function $g(e) {
|
|
7861
|
-
return
|
|
7859
|
+
return On(e) || Et(10, e), jd(e);
|
|
7862
7860
|
}
|
|
7863
7861
|
function jd(e) {
|
|
7864
|
-
if (!
|
|
7862
|
+
if (!Pn(e) || ca(e))
|
|
7865
7863
|
return e;
|
|
7866
7864
|
const t = e[Tt];
|
|
7867
7865
|
let n;
|
|
@@ -8195,8 +8193,8 @@ var Ug = (e, t, n) => {
|
|
|
8195
8193
|
else
|
|
8196
8194
|
throw new Error('Cannot apply a "merge_node" operation at path ['.concat(v, "] to nodes of different interfaces: ").concat(ot.stringify(w), " ").concat(ot.stringify(B)));
|
|
8197
8195
|
if (D.children.splice(C, 1), t)
|
|
8198
|
-
for (var [
|
|
8199
|
-
t[I] = Be.transform(
|
|
8196
|
+
for (var [S, I] of Y.points(t))
|
|
8197
|
+
t[I] = Be.transform(S, n);
|
|
8200
8198
|
break;
|
|
8201
8199
|
}
|
|
8202
8200
|
case "move_node": {
|
|
@@ -8208,7 +8206,7 @@ var Ug = (e, t, n) => {
|
|
|
8208
8206
|
throw new Error("Cannot move a path [".concat(P, "] to new path [").concat(L, "] because the destination is inside itself."));
|
|
8209
8207
|
var $ = oe.get(e, P), A = oe.parent(e, P), _ = P[P.length - 1];
|
|
8210
8208
|
A.children.splice(_, 1);
|
|
8211
|
-
var
|
|
8209
|
+
var T = R.transform(P, n), j = oe.get(e, R.parent(T)), H = T[T.length - 1];
|
|
8212
8210
|
if (j.children.splice(H, 0, $), t)
|
|
8213
8211
|
for (var [W, ie] of Y.points(t))
|
|
8214
8212
|
t[ie] = Be.transform(W, n);
|
|
@@ -8329,7 +8327,7 @@ var Ug = (e, t, n) => {
|
|
|
8329
8327
|
try {
|
|
8330
8328
|
n = Ug(e, n, t);
|
|
8331
8329
|
} finally {
|
|
8332
|
-
e.children = Pu(e.children), n ? e.selection =
|
|
8330
|
+
e.children = Pu(e.children), n ? e.selection = On(n) ? Pu(n) : n : e.selection = null;
|
|
8333
8331
|
}
|
|
8334
8332
|
}
|
|
8335
8333
|
}, Vg = {
|
|
@@ -9543,8 +9541,8 @@ var Bv = (e, t) => {
|
|
|
9543
9541
|
}
|
|
9544
9542
|
case "split_node": {
|
|
9545
9543
|
var {
|
|
9546
|
-
path:
|
|
9547
|
-
} = t, I = R.levels(
|
|
9544
|
+
path: S
|
|
9545
|
+
} = t, I = R.levels(S), P = R.next(S);
|
|
9548
9546
|
return [...I, P];
|
|
9549
9547
|
}
|
|
9550
9548
|
default:
|
|
@@ -10284,8 +10282,8 @@ function _0(e) {
|
|
|
10284
10282
|
}
|
|
10285
10283
|
}
|
|
10286
10284
|
}
|
|
10287
|
-
function D(C,
|
|
10288
|
-
return
|
|
10285
|
+
function D(C, S, I) {
|
|
10286
|
+
return S === "character" ? po(C, I) : S === "word" ? sv(C, I) : S === "line" || S === "block" ? C.length : 1;
|
|
10289
10287
|
}
|
|
10290
10288
|
}();
|
|
10291
10289
|
}
|
|
@@ -10514,7 +10512,7 @@ var S0 = (e, t) => {
|
|
|
10514
10512
|
match: (De) => he.isElement(De) && y.isBlock(t, De),
|
|
10515
10513
|
at: E,
|
|
10516
10514
|
voids: l
|
|
10517
|
-
}), C = B && D && !R.equals(B[1], D[1]),
|
|
10515
|
+
}), C = B && D && !R.equals(B[1], D[1]), S = R.equals(w.path, E.path), I = l ? null : (r = y.void(t, {
|
|
10518
10516
|
at: w,
|
|
10519
10517
|
mode: "highest"
|
|
10520
10518
|
})) !== null && r !== void 0 ? r : y.elementReadOnly(t, {
|
|
@@ -10536,18 +10534,18 @@ var S0 = (e, t) => {
|
|
|
10536
10534
|
$ && D && R.isAncestor(D[1], $.path) && (E = $);
|
|
10537
10535
|
}
|
|
10538
10536
|
var A = [], _;
|
|
10539
|
-
for (var
|
|
10537
|
+
for (var T of y.nodes(t, {
|
|
10540
10538
|
at: u,
|
|
10541
10539
|
voids: l
|
|
10542
10540
|
})) {
|
|
10543
|
-
var [j, H] =
|
|
10544
|
-
_ && R.compare(H, _) === 0 || (!l && he.isElement(j) && (y.isVoid(t, j) || y.isElementReadOnly(t, j)) || !R.isCommon(H, w.path) && !R.isCommon(H, E.path)) && (A.push(
|
|
10541
|
+
var [j, H] = T;
|
|
10542
|
+
_ && R.compare(H, _) === 0 || (!l && he.isElement(j) && (y.isVoid(t, j) || y.isElementReadOnly(t, j)) || !R.isCommon(H, w.path) && !R.isCommon(H, E.path)) && (A.push(T), _ = H);
|
|
10545
10543
|
}
|
|
10546
10544
|
var W = Array.from(A, (De) => {
|
|
10547
10545
|
var [, Fe] = De;
|
|
10548
10546
|
return y.pathRef(t, Fe);
|
|
10549
10547
|
}), ie = y.pointRef(t, w), ne = y.pointRef(t, E), x = "";
|
|
10550
|
-
if (!
|
|
10548
|
+
if (!S && !I) {
|
|
10551
10549
|
var z = ie.current, [re] = y.leaf(t, z), {
|
|
10552
10550
|
path: F
|
|
10553
10551
|
} = z, {
|
|
@@ -10566,7 +10564,7 @@ var S0 = (e, t) => {
|
|
|
10566
10564
|
})), !P) {
|
|
10567
10565
|
var O = ne.current, [q] = y.leaf(t, O), {
|
|
10568
10566
|
path: J
|
|
10569
|
-
} = O, U =
|
|
10567
|
+
} = O, U = S ? w.offset : 0, X = q.text.slice(U, E.offset);
|
|
10570
10568
|
X.length > 0 && (t.apply({
|
|
10571
10569
|
type: "remove_text",
|
|
10572
10570
|
path: J,
|
|
@@ -10574,7 +10572,7 @@ var S0 = (e, t) => {
|
|
|
10574
10572
|
text: X
|
|
10575
10573
|
}), x = X);
|
|
10576
10574
|
}
|
|
10577
|
-
!
|
|
10575
|
+
!S && C && ne.current && ie.current && Q.mergeNodes(t, {
|
|
10578
10576
|
at: ne.current,
|
|
10579
10577
|
hanging: !0,
|
|
10580
10578
|
voids: l
|
|
@@ -10640,7 +10638,7 @@ var S0 = (e, t) => {
|
|
|
10640
10638
|
children: n
|
|
10641
10639
|
}, []), [, C] = oe.last({
|
|
10642
10640
|
children: n
|
|
10643
|
-
}, []),
|
|
10641
|
+
}, []), S = [], I = (N) => {
|
|
10644
10642
|
var [O, q] = N, J = q.length === 0;
|
|
10645
10643
|
return J ? !1 : w ? !0 : !(E && R.isAncestor(q, D) && he.isElement(O) && !t.isVoid(O) && !t.isInline(O) || B && R.isAncestor(q, C) && he.isElement(O) && !t.isVoid(O) && !t.isInline(O));
|
|
10646
10644
|
};
|
|
@@ -10649,10 +10647,10 @@ var S0 = (e, t) => {
|
|
|
10649
10647
|
}, {
|
|
10650
10648
|
pass: I
|
|
10651
10649
|
}))
|
|
10652
|
-
I(P) &&
|
|
10653
|
-
var L = [], $ = [], A = [], _ = !0,
|
|
10654
|
-
for (var [j] of
|
|
10655
|
-
he.isElement(j) && !t.isInline(j) ? (_ = !1,
|
|
10650
|
+
I(P) && S.push(P);
|
|
10651
|
+
var L = [], $ = [], A = [], _ = !0, T = !1;
|
|
10652
|
+
for (var [j] of S)
|
|
10653
|
+
he.isElement(j) && !t.isInline(j) ? (_ = !1, T = !0, $.push(j)) : _ ? L.push(j) : A.push(j);
|
|
10656
10654
|
var [H] = y.nodes(t, {
|
|
10657
10655
|
at: s,
|
|
10658
10656
|
match: (N) => me.isText(N) || y.isInline(t, N),
|
|
@@ -10661,9 +10659,9 @@ var S0 = (e, t) => {
|
|
|
10661
10659
|
}), [, W] = H, ie = y.isStart(t, s, W), ne = y.isEnd(t, s, W), x = y.pathRef(t, v && !A.length ? R.next(f) : f), z = y.pathRef(t, ne ? R.next(W) : W);
|
|
10662
10660
|
Q.splitNodes(t, {
|
|
10663
10661
|
at: s,
|
|
10664
|
-
match: (N) =>
|
|
10665
|
-
mode:
|
|
10666
|
-
always:
|
|
10662
|
+
match: (N) => T ? he.isElement(N) && y.isBlock(t, N) : me.isText(N) || y.isInline(t, N),
|
|
10663
|
+
mode: T ? "lowest" : "highest",
|
|
10664
|
+
always: T && (!b || L.length > 0) && (!v || A.length > 0),
|
|
10667
10665
|
voids: a
|
|
10668
10666
|
});
|
|
10669
10667
|
var re = y.pathRef(t, !ie || ie && ne ? R.next(W) : W);
|
|
@@ -10881,12 +10879,12 @@ var W0 = function(t, n) {
|
|
|
10881
10879
|
var L = function() {
|
|
10882
10880
|
var _ = E.concat(B);
|
|
10883
10881
|
B++;
|
|
10884
|
-
var
|
|
10882
|
+
var T = {
|
|
10885
10883
|
type: "insert_node",
|
|
10886
10884
|
path: _,
|
|
10887
10885
|
node: $
|
|
10888
10886
|
};
|
|
10889
|
-
t.apply(
|
|
10887
|
+
t.apply(T), l = R.next(l), D.push(T), me.isText ? C.push(...Array.from(oe.nodes($), (j) => {
|
|
10890
10888
|
var [, H] = j;
|
|
10891
10889
|
return _.concat(H);
|
|
10892
10890
|
})) : C.push(_);
|
|
@@ -10903,12 +10901,12 @@ var W0 = function(t, n) {
|
|
|
10903
10901
|
});
|
|
10904
10902
|
});
|
|
10905
10903
|
} else
|
|
10906
|
-
for (var
|
|
10904
|
+
for (var S of n) {
|
|
10907
10905
|
var I = E.concat(B);
|
|
10908
10906
|
B++, t.apply({
|
|
10909
10907
|
type: "insert_node",
|
|
10910
10908
|
path: I,
|
|
10911
|
-
node:
|
|
10909
|
+
node: S
|
|
10912
10910
|
}), l = R.next(l);
|
|
10913
10911
|
}
|
|
10914
10912
|
if (l = R.previous(l), d) {
|
|
@@ -11040,13 +11038,13 @@ var W0 = function(t, n) {
|
|
|
11040
11038
|
at: g,
|
|
11041
11039
|
mode: "highest",
|
|
11042
11040
|
match: (L) => B.includes(L) && Md(t, L)
|
|
11043
|
-
}), C = D && y.pathRef(t, D[1]),
|
|
11041
|
+
}), C = D && y.pathRef(t, D[1]), S, I;
|
|
11044
11042
|
if (me.isText(p) && me.isText(f)) {
|
|
11045
11043
|
var P = un(p, K0);
|
|
11046
|
-
I = f.text.length,
|
|
11044
|
+
I = f.text.length, S = P;
|
|
11047
11045
|
} else if (he.isElement(p) && he.isElement(f)) {
|
|
11048
11046
|
var P = un(p, Z0);
|
|
11049
|
-
I = f.children.length,
|
|
11047
|
+
I = f.children.length, S = P;
|
|
11050
11048
|
} else
|
|
11051
11049
|
throw new Error("Cannot merge the node at path [".concat(g, "] with the previous sibling because it is not the same kind: ").concat(ot.stringify(p), " ").concat(ot.stringify(f)));
|
|
11052
11050
|
E || Q.moveNodes(t, {
|
|
@@ -11063,7 +11061,7 @@ var W0 = function(t, n) {
|
|
|
11063
11061
|
type: "merge_node",
|
|
11064
11062
|
path: v,
|
|
11065
11063
|
position: I,
|
|
11066
|
-
properties:
|
|
11064
|
+
properties: S
|
|
11067
11065
|
}), C && C.unref();
|
|
11068
11066
|
}
|
|
11069
11067
|
}
|
|
@@ -11187,8 +11185,8 @@ var W0 = function(t, n) {
|
|
|
11187
11185
|
var B = {}, D = {};
|
|
11188
11186
|
if (E.length !== 0) {
|
|
11189
11187
|
var C = !1;
|
|
11190
|
-
for (var
|
|
11191
|
-
|
|
11188
|
+
for (var S in n)
|
|
11189
|
+
S === "children" || S === "text" || s(n[S], w[S]) && (C = !0, w.hasOwnProperty(S) && (B[S] = w[S]), o ? n[S] != null && (D[S] = o(w[S], n[S])) : n[S] != null && (D[S] = n[S]));
|
|
11192
11190
|
C && t.apply({
|
|
11193
11191
|
type: "set_node",
|
|
11194
11192
|
path: E,
|
|
@@ -11258,7 +11256,7 @@ var W0 = function(t, n) {
|
|
|
11258
11256
|
o = C + 1, l = !0;
|
|
11259
11257
|
}
|
|
11260
11258
|
p = y.pointRef(t, s);
|
|
11261
|
-
var
|
|
11259
|
+
var S = s.path.length - o, [, I] = g, P = s.path.slice(0, S), L = o === 0 ? s.offset : s.path[S] + b;
|
|
11262
11260
|
for (var [$, A] of y.levels(t, {
|
|
11263
11261
|
at: P,
|
|
11264
11262
|
reverse: !0,
|
|
@@ -11267,8 +11265,8 @@ var W0 = function(t, n) {
|
|
|
11267
11265
|
var _ = !1;
|
|
11268
11266
|
if (A.length < I.length || A.length === 0 || !i && he.isElement($) && y.isVoid(t, $))
|
|
11269
11267
|
break;
|
|
11270
|
-
var
|
|
11271
|
-
if (l || !m || !y.isEdge(t,
|
|
11268
|
+
var T = m.current, j = y.isEnd(t, T, A);
|
|
11269
|
+
if (l || !m || !y.isEdge(t, T, A)) {
|
|
11272
11270
|
_ = !0;
|
|
11273
11271
|
var H = oe.extractProps($);
|
|
11274
11272
|
t.apply({
|
|
@@ -11404,7 +11402,7 @@ var rb = function(t, n) {
|
|
|
11404
11402
|
var [E] = w, B = w[w.length - 1], [, D] = E, [, C] = B;
|
|
11405
11403
|
if (D.length === 0 && C.length === 0)
|
|
11406
11404
|
return 0;
|
|
11407
|
-
var
|
|
11405
|
+
var S = R.equals(D, C) ? R.parent(D) : R.common(D, C), I = y.range(t, D, C), P = y.node(t, S), [L] = P, $ = S.length + 1, A = R.next(C.slice(0, $)), _ = dl(dl({}, n), {}, {
|
|
11408
11406
|
children: []
|
|
11409
11407
|
});
|
|
11410
11408
|
Q.insertNodes(t, _, {
|
|
@@ -11412,7 +11410,7 @@ var rb = function(t, n) {
|
|
|
11412
11410
|
voids: s
|
|
11413
11411
|
}), Q.moveNodes(t, {
|
|
11414
11412
|
at: I,
|
|
11415
|
-
match: (
|
|
11413
|
+
match: (T) => he.isAncestor(L) && L.children.includes(T),
|
|
11416
11414
|
to: A.concat(0),
|
|
11417
11415
|
voids: s
|
|
11418
11416
|
});
|
|
@@ -11942,7 +11940,7 @@ var rb = function(t, n) {
|
|
|
11942
11940
|
function fb(e) {
|
|
11943
11941
|
return e = String(e || ""), cb.test(e) ? "rtl" : db.test(e) ? "ltr" : "neutral";
|
|
11944
11942
|
}
|
|
11945
|
-
const Id = /* @__PURE__ */
|
|
11943
|
+
const Id = /* @__PURE__ */ Mn(lb);
|
|
11946
11944
|
function hb(e) {
|
|
11947
11945
|
var t = typeof e;
|
|
11948
11946
|
return e != null && (t == "object" || t == "function");
|
|
@@ -12009,19 +12007,19 @@ function cy(e, t, n) {
|
|
|
12009
12007
|
throw new TypeError(oy);
|
|
12010
12008
|
t = vl(t) || 0, sy(n) && (d = !!n.leading, h = "maxWait" in n, a = h ? uy(vl(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m);
|
|
12011
12009
|
function p(C) {
|
|
12012
|
-
var
|
|
12013
|
-
return r = i = void 0, u = C, s = e.apply(I,
|
|
12010
|
+
var S = r, I = i;
|
|
12011
|
+
return r = i = void 0, u = C, s = e.apply(I, S), s;
|
|
12014
12012
|
}
|
|
12015
12013
|
function g(C) {
|
|
12016
12014
|
return u = C, o = setTimeout(v, t), d ? p(C) : s;
|
|
12017
12015
|
}
|
|
12018
12016
|
function f(C) {
|
|
12019
|
-
var
|
|
12017
|
+
var S = C - l, I = C - u, P = t - S;
|
|
12020
12018
|
return h ? ly(P, a - I) : P;
|
|
12021
12019
|
}
|
|
12022
12020
|
function b(C) {
|
|
12023
|
-
var
|
|
12024
|
-
return l === void 0 ||
|
|
12021
|
+
var S = C - l, I = C - u;
|
|
12022
|
+
return l === void 0 || S >= t || S < 0 || h && I >= a;
|
|
12025
12023
|
}
|
|
12026
12024
|
function v() {
|
|
12027
12025
|
var C = $a();
|
|
@@ -12039,8 +12037,8 @@ function cy(e, t, n) {
|
|
|
12039
12037
|
return o === void 0 ? s : w($a());
|
|
12040
12038
|
}
|
|
12041
12039
|
function D() {
|
|
12042
|
-
var C = $a(),
|
|
12043
|
-
if (r = arguments, i = this, l = C,
|
|
12040
|
+
var C = $a(), S = b(C);
|
|
12041
|
+
if (r = arguments, i = this, l = C, S) {
|
|
12044
12042
|
if (o === void 0)
|
|
12045
12043
|
return g(l);
|
|
12046
12044
|
if (h)
|
|
@@ -12051,7 +12049,7 @@ function cy(e, t, n) {
|
|
|
12051
12049
|
return D.cancel = E, D.flush = B, D;
|
|
12052
12050
|
}
|
|
12053
12051
|
var Wd = cy;
|
|
12054
|
-
const dy = /* @__PURE__ */
|
|
12052
|
+
const dy = /* @__PURE__ */ Mn(Wd);
|
|
12055
12053
|
var fy = Wd, hy = vo, my = "Expected a function";
|
|
12056
12054
|
function py(e, t, n) {
|
|
12057
12055
|
var r = !0, i = !0;
|
|
@@ -12064,7 +12062,7 @@ function py(e, t, n) {
|
|
|
12064
12062
|
});
|
|
12065
12063
|
}
|
|
12066
12064
|
var gy = py;
|
|
12067
|
-
const vy = /* @__PURE__ */
|
|
12065
|
+
const vy = /* @__PURE__ */ Mn(gy), bl = (e) => typeof e == "object" && e != null && e.nodeType === 1, yl = (e, t) => (!t || e !== "hidden") && e !== "visible" && e !== "clip", Ia = (e, t) => {
|
|
12068
12066
|
if (e.clientHeight < e.scrollHeight || e.clientWidth < e.scrollWidth) {
|
|
12069
12067
|
const n = getComputedStyle(e, null);
|
|
12070
12068
|
return yl(n.overflowY, t) || yl(n.overflowX, t) || ((r) => {
|
|
@@ -12100,25 +12098,25 @@ const vy = /* @__PURE__ */ Rn(gy), bl = (e) => typeof e == "object" && e != null
|
|
|
12100
12098
|
}
|
|
12101
12099
|
g != null && g === document.body && Ia(g) && !Ia(document.documentElement) || g != null && Ia(g, d) && p.push(g);
|
|
12102
12100
|
}
|
|
12103
|
-
const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, b = (a = (i = window.visualViewport) == null ? void 0 : i.height) != null ? a : innerHeight, { scrollX: v, scrollY: w } = window, { height: E, width: B, top: D, right: C, bottom:
|
|
12101
|
+
const f = (r = (n = window.visualViewport) == null ? void 0 : n.width) != null ? r : innerWidth, b = (a = (i = window.visualViewport) == null ? void 0 : i.height) != null ? a : innerHeight, { scrollX: v, scrollY: w } = window, { height: E, width: B, top: D, right: C, bottom: S, left: I } = e.getBoundingClientRect(), { top: P, right: L, bottom: $, left: A } = ((H) => {
|
|
12104
12102
|
const W = window.getComputedStyle(H);
|
|
12105
12103
|
return { top: parseFloat(W.scrollMarginTop) || 0, right: parseFloat(W.scrollMarginRight) || 0, bottom: parseFloat(W.scrollMarginBottom) || 0, left: parseFloat(W.scrollMarginLeft) || 0 };
|
|
12106
12104
|
})(e);
|
|
12107
|
-
let _ = o === "start" || o === "nearest" ? D - P : o === "end" ?
|
|
12105
|
+
let _ = o === "start" || o === "nearest" ? D - P : o === "end" ? S + $ : D + E / 2 - P + $, T = l === "center" ? I + B / 2 - A + L : l === "end" ? C + L : I - A;
|
|
12108
12106
|
const j = [];
|
|
12109
12107
|
for (let H = 0; H < p.length; H++) {
|
|
12110
12108
|
const W = p[H], { height: ie, width: ne, top: x, right: z, bottom: re, left: F } = W.getBoundingClientRect();
|
|
12111
|
-
if (s === "if-needed" && D >= 0 && I >= 0 &&
|
|
12109
|
+
if (s === "if-needed" && D >= 0 && I >= 0 && S <= b && C <= f && D >= x && S <= re && I >= F && C <= z)
|
|
12112
12110
|
return j;
|
|
12113
12111
|
const k = getComputedStyle(W), N = parseInt(k.borderLeftWidth, 10), O = parseInt(k.borderTopWidth, 10), q = parseInt(k.borderRightWidth, 10), J = parseInt(k.borderBottomWidth, 10);
|
|
12114
12112
|
let U = 0, X = 0;
|
|
12115
12113
|
const ce = "offsetWidth" in W ? W.offsetWidth - W.clientWidth - N - q : 0, G = "offsetHeight" in W ? W.offsetHeight - W.clientHeight - O - J : 0, ve = "offsetWidth" in W ? W.offsetWidth === 0 ? 0 : ne / W.offsetWidth : 0, De = "offsetHeight" in W ? W.offsetHeight === 0 ? 0 : ie / W.offsetHeight : 0;
|
|
12116
12114
|
if (m === W)
|
|
12117
|
-
U = o === "start" ? _ : o === "end" ? _ - b : o === "nearest" ? hi(w, w + b, b, O, J, w + _, w + _ + E, E) : _ - b / 2, X = l === "start" ?
|
|
12115
|
+
U = o === "start" ? _ : o === "end" ? _ - b : o === "nearest" ? hi(w, w + b, b, O, J, w + _, w + _ + E, E) : _ - b / 2, X = l === "start" ? T : l === "center" ? T - f / 2 : l === "end" ? T - f : hi(v, v + f, f, N, q, v + T, v + T + B, B), U = Math.max(0, U + w), X = Math.max(0, X + v);
|
|
12118
12116
|
else {
|
|
12119
|
-
U = o === "start" ? _ - x - O : o === "end" ? _ - re + J + G : o === "nearest" ? hi(x, re, ie, O, J + G, _, _ + E, E) : _ - (x + ie / 2) + G / 2, X = l === "start" ?
|
|
12117
|
+
U = o === "start" ? _ - x - O : o === "end" ? _ - re + J + G : o === "nearest" ? hi(x, re, ie, O, J + G, _, _ + E, E) : _ - (x + ie / 2) + G / 2, X = l === "start" ? T - F - N : l === "center" ? T - (F + ne / 2) + ce / 2 : l === "end" ? T - z + q + ce : hi(F, z, ne, N, q + ce, T, T + B, B);
|
|
12120
12118
|
const { scrollLeft: Fe, scrollTop: Ne } = W;
|
|
12121
|
-
U = De === 0 ? 0 : Math.max(0, Math.min(Ne + U / De, W.scrollHeight - ie / De + G)), X = ve === 0 ? 0 : Math.max(0, Math.min(Fe + X / ve, W.scrollWidth - ne / ve + ce)), _ += Ne - U,
|
|
12119
|
+
U = De === 0 ? 0 : Math.max(0, Math.min(Ne + U / De, W.scrollHeight - ie / De + G)), X = ve === 0 ? 0 : Math.max(0, Math.min(Fe + X / ve, W.scrollWidth - ne / ve + ce)), _ += Ne - U, T += Fe - X;
|
|
12122
12120
|
}
|
|
12123
12121
|
j.push({ el: W, top: U, left: X });
|
|
12124
12122
|
}
|
|
@@ -12147,12 +12145,12 @@ function Dy(e, t) {
|
|
|
12147
12145
|
i.scroll({ top: o, left: l, behavior: r });
|
|
12148
12146
|
}
|
|
12149
12147
|
}
|
|
12150
|
-
var
|
|
12151
|
-
return
|
|
12148
|
+
var Bn = [], xy = function() {
|
|
12149
|
+
return Bn.some(function(e) {
|
|
12152
12150
|
return e.activeTargets.length > 0;
|
|
12153
12151
|
});
|
|
12154
12152
|
}, wy = function() {
|
|
12155
|
-
return
|
|
12153
|
+
return Bn.some(function(e) {
|
|
12156
12154
|
return e.skippedTargets.length > 0;
|
|
12157
12155
|
});
|
|
12158
12156
|
}, xl = "ResizeObserver loop completed with undelivered notifications.", Cy = function() {
|
|
@@ -12164,16 +12162,16 @@ var Tn = [], xy = function() {
|
|
|
12164
12162
|
(function(e) {
|
|
12165
12163
|
e.BORDER_BOX = "border-box", e.CONTENT_BOX = "content-box", e.DEVICE_PIXEL_CONTENT_BOX = "device-pixel-content-box";
|
|
12166
12164
|
})(Hr || (Hr = {}));
|
|
12167
|
-
var
|
|
12165
|
+
var Tn = function(e) {
|
|
12168
12166
|
return Object.freeze(e);
|
|
12169
12167
|
}, Ey = function() {
|
|
12170
12168
|
function e(t, n) {
|
|
12171
|
-
this.inlineSize = t, this.blockSize = n,
|
|
12169
|
+
this.inlineSize = t, this.blockSize = n, Tn(this);
|
|
12172
12170
|
}
|
|
12173
12171
|
return e;
|
|
12174
12172
|
}(), Ud = function() {
|
|
12175
12173
|
function e(t, n, r, i) {
|
|
12176
|
-
return this.x = t, this.y = n, this.width = r, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width,
|
|
12174
|
+
return this.x = t, this.y = n, this.width = r, this.height = i, this.top = this.y, this.left = this.x, this.bottom = this.top + this.height, this.right = this.left + this.width, Tn(this);
|
|
12177
12175
|
}
|
|
12178
12176
|
return e.prototype.toJSON = function() {
|
|
12179
12177
|
var t = this, n = t.x, r = t.y, i = t.top, a = t.right, s = t.bottom, o = t.left, l = t.width, u = t.height;
|
|
@@ -12215,7 +12213,7 @@ var Sn = function(e) {
|
|
|
12215
12213
|
return parseFloat(e || "0");
|
|
12216
12214
|
}, rr = function(e, t, n) {
|
|
12217
12215
|
return e === void 0 && (e = 0), t === void 0 && (t = 0), n === void 0 && (n = !1), new Ey((n ? t : e) || 0, (n ? e : t) || 0);
|
|
12218
|
-
}, El =
|
|
12216
|
+
}, El = Tn({
|
|
12219
12217
|
devicePixelContentBoxSize: rr(),
|
|
12220
12218
|
borderBoxSize: rr(),
|
|
12221
12219
|
contentBoxSize: rr(),
|
|
@@ -12225,7 +12223,7 @@ var Sn = function(e) {
|
|
|
12225
12223
|
return mi.get(e);
|
|
12226
12224
|
if (Hd(e))
|
|
12227
12225
|
return mi.set(e, El), El;
|
|
12228
|
-
var n = getComputedStyle(e), r = bo(e) && e.ownerSVGElement && e.getBBox(), i = !Fy && n.boxSizing === "border-box", a = ky.test(n.writingMode || ""), s = !r && Cl.test(n.overflowY || ""), o = !r && Cl.test(n.overflowX || ""), l = r ? 0 : Ut(n.paddingTop), u = r ? 0 : Ut(n.paddingRight), d = r ? 0 : Ut(n.paddingBottom), h = r ? 0 : Ut(n.paddingLeft), m = r ? 0 : Ut(n.borderTopWidth), p = r ? 0 : Ut(n.borderRightWidth), g = r ? 0 : Ut(n.borderBottomWidth), f = r ? 0 : Ut(n.borderLeftWidth), b = h + u, v = l + d, w = f + p, E = m + g, B = o ? e.offsetHeight - E - e.clientHeight : 0, D = s ? e.offsetWidth - w - e.clientWidth : 0, C = i ? b + w : 0,
|
|
12226
|
+
var n = getComputedStyle(e), r = bo(e) && e.ownerSVGElement && e.getBBox(), i = !Fy && n.boxSizing === "border-box", a = ky.test(n.writingMode || ""), s = !r && Cl.test(n.overflowY || ""), o = !r && Cl.test(n.overflowX || ""), l = r ? 0 : Ut(n.paddingTop), u = r ? 0 : Ut(n.paddingRight), d = r ? 0 : Ut(n.paddingBottom), h = r ? 0 : Ut(n.paddingLeft), m = r ? 0 : Ut(n.borderTopWidth), p = r ? 0 : Ut(n.borderRightWidth), g = r ? 0 : Ut(n.borderBottomWidth), f = r ? 0 : Ut(n.borderLeftWidth), b = h + u, v = l + d, w = f + p, E = m + g, B = o ? e.offsetHeight - E - e.clientHeight : 0, D = s ? e.offsetWidth - w - e.clientWidth : 0, C = i ? b + w : 0, S = i ? v + E : 0, I = r ? r.width : Ut(n.width) - C - D, P = r ? r.height : Ut(n.height) - S - B, L = I + b + D + w, $ = P + v + B + E, A = Tn({
|
|
12229
12227
|
devicePixelContentBoxSize: rr(Math.round(I * devicePixelRatio), Math.round(P * devicePixelRatio), a),
|
|
12230
12228
|
borderBoxSize: rr(L, $, a),
|
|
12231
12229
|
contentBoxSize: rr(I, P, a),
|
|
@@ -12245,7 +12243,7 @@ var Sn = function(e) {
|
|
|
12245
12243
|
}, Ay = function() {
|
|
12246
12244
|
function e(t) {
|
|
12247
12245
|
var n = Vd(t);
|
|
12248
|
-
this.target = t, this.contentRect = n.contentRect, this.borderBoxSize =
|
|
12246
|
+
this.target = t, this.contentRect = n.contentRect, this.borderBoxSize = Tn([n.borderBoxSize]), this.contentBoxSize = Tn([n.contentBoxSize]), this.devicePixelContentBoxSize = Tn([n.devicePixelContentBoxSize]);
|
|
12249
12247
|
}
|
|
12250
12248
|
return e;
|
|
12251
12249
|
}(), Zd = function(e) {
|
|
@@ -12256,7 +12254,7 @@ var Sn = function(e) {
|
|
|
12256
12254
|
return t;
|
|
12257
12255
|
}, By = function() {
|
|
12258
12256
|
var e = 1 / 0, t = [];
|
|
12259
|
-
|
|
12257
|
+
Bn.forEach(function(s) {
|
|
12260
12258
|
if (s.activeTargets.length !== 0) {
|
|
12261
12259
|
var o = [];
|
|
12262
12260
|
s.activeTargets.forEach(function(u) {
|
|
@@ -12273,7 +12271,7 @@ var Sn = function(e) {
|
|
|
12273
12271
|
}
|
|
12274
12272
|
return e;
|
|
12275
12273
|
}, _l = function(e) {
|
|
12276
|
-
|
|
12274
|
+
Bn.forEach(function(n) {
|
|
12277
12275
|
n.activeTargets.splice(0, n.activeTargets.length), n.skippedTargets.splice(0, n.skippedTargets.length), n.observationTargets.forEach(function(i) {
|
|
12278
12276
|
i.isActive() && (Zd(i.target) > e ? n.activeTargets.push(i) : n.skippedTargets.push(i));
|
|
12279
12277
|
});
|
|
@@ -12394,10 +12392,10 @@ var Sn = function(e) {
|
|
|
12394
12392
|
pi.set(t, r);
|
|
12395
12393
|
}, e.observe = function(t, n, r) {
|
|
12396
12394
|
var i = pi.get(t), a = i.observationTargets.length === 0;
|
|
12397
|
-
Bl(i.observationTargets, n) < 0 && (a &&
|
|
12395
|
+
Bl(i.observationTargets, n) < 0 && (a && Bn.push(i), i.observationTargets.push(new Iy(n, r && r.box)), Al(1), Os.schedule());
|
|
12398
12396
|
}, e.unobserve = function(t, n) {
|
|
12399
12397
|
var r = pi.get(t), i = Bl(r.observationTargets, n), a = r.observationTargets.length === 1;
|
|
12400
|
-
i >= 0 && (a &&
|
|
12398
|
+
i >= 0 && (a && Bn.splice(Bn.indexOf(r), 1), r.observationTargets.splice(i, 1), Al(-1));
|
|
12401
12399
|
}, e.disconnect = function(t) {
|
|
12402
12400
|
var n = this, r = pi.get(t);
|
|
12403
12401
|
r.observationTargets.slice().forEach(function(i) {
|
|
@@ -12617,14 +12615,14 @@ function Mt(e, t, n) {
|
|
|
12617
12615
|
writable: !0
|
|
12618
12616
|
}) : e[t] = n, e;
|
|
12619
12617
|
}
|
|
12620
|
-
var xo = /* @__PURE__ */ kt(null),
|
|
12618
|
+
var xo = /* @__PURE__ */ kt(null), wn = () => {
|
|
12621
12619
|
var e = Le(xo);
|
|
12622
12620
|
if (!e)
|
|
12623
12621
|
throw new Error("The `useSlateStatic` hook must be used inside the <Slate> component's context.");
|
|
12624
12622
|
return e;
|
|
12625
12623
|
}, ef = parseInt(te.version.split(".")[0], 10), Yy = typeof navigator < "u" && typeof window < "u" && /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream, Tl = typeof navigator < "u" && /Mac OS X/.test(navigator.userAgent), bt = typeof navigator < "u" && /Android/.test(navigator.userAgent), er = typeof navigator < "u" && /^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent), Tr = typeof navigator < "u" && /AppleWebKit(?!.*Chrome)/i.test(navigator.userAgent), Gy = typeof navigator < "u" && /Edge?\/(?:[0-6][0-9]|[0-7][0-8])(?:\.)/i.test(navigator.userAgent), tf = typeof navigator < "u" && /Chrome/i.test(navigator.userAgent), Qy = typeof navigator < "u" && /Chrome?\/(?:[0-7][0-5]|[0-6][0-9])(?:\.)/i.test(navigator.userAgent), Jy = bt && typeof navigator < "u" && /Chrome?\/(?:[0-5]?\d)(?:\.)/i.test(navigator.userAgent), Xy = typeof navigator < "u" && /^(?!.*Seamonkey)(?=.*Firefox\/(?:[0-7][0-9]|[0-8][0-6])(?:\.)).*/i.test(navigator.userAgent), e1 = typeof navigator < "u" && /.*UCBrowser/.test(navigator.userAgent), t1 = typeof navigator < "u" && /.*Wechat/.test(navigator.userAgent) && !/.*MacWechat/.test(navigator.userAgent), Ti = typeof window < "u" && typeof window.document < "u" && typeof window.document.createElement < "u", fn = (!Qy || !Jy) && !Gy && // globalThis is undefined in older browsers
|
|
12626
12624
|
typeof globalThis < "u" && globalThis.InputEvent && // @ts-ignore The `getTargetRanges` property isn't recognized.
|
|
12627
|
-
typeof globalThis.InputEvent.prototype.getTargetRanges == "function", wo = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), nf = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(),
|
|
12625
|
+
typeof globalThis.InputEvent.prototype.getTargetRanges == "function", wo = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), nf = /* @__PURE__ */ new WeakMap(), Si = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), Kr = /* @__PURE__ */ new WeakMap(), Sn = /* @__PURE__ */ new WeakMap(), Yi = /* @__PURE__ */ new WeakMap(), fa = /* @__PURE__ */ new WeakMap(), Ns = /* @__PURE__ */ new WeakMap(), bn = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakMap(), Ms = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), It = /* @__PURE__ */ new WeakMap(), nn = /* @__PURE__ */ new WeakMap(), Ct = /* @__PURE__ */ new WeakMap(), mn = /* @__PURE__ */ new WeakMap(), pn = /* @__PURE__ */ new WeakMap(), rf = /* @__PURE__ */ new WeakMap(), cr = Symbol("placeholder"), af = Symbol("mark-placeholder"), n1 = globalThis.Text, _o = (e) => e && e.ownerDocument && e.ownerDocument.defaultView || null, r1 = (e) => Dn(e) && e.nodeType === 8, Nt = (e) => Dn(e) && e.nodeType === 1, Dn = (e) => {
|
|
12628
12626
|
var t = _o(e);
|
|
12629
12627
|
return !!t && e instanceof t.Node;
|
|
12630
12628
|
}, Rs = (e) => {
|
|
@@ -12852,7 +12850,7 @@ var ee = {
|
|
|
12852
12850
|
},
|
|
12853
12851
|
insertFragmentData: (e, t) => e.insertFragmentData(t),
|
|
12854
12852
|
insertTextData: (e, t) => e.insertTextData(t),
|
|
12855
|
-
isComposing: (e) => !!
|
|
12853
|
+
isComposing: (e) => !!Fn.get(e),
|
|
12856
12854
|
isFocused: (e) => !!bn.get(e),
|
|
12857
12855
|
isReadOnly: (e) => !!Ns.get(e),
|
|
12858
12856
|
isTargetInsideNonReadonlyVoid: (e, t) => {
|
|
@@ -12934,24 +12932,24 @@ var ee = {
|
|
|
12934
12932
|
var v = ee.getWindow(e), w = v.document.createRange();
|
|
12935
12933
|
w.setStart(l, 0), w.setEnd(a, s);
|
|
12936
12934
|
var E = w.cloneContents(), B = [...Array.prototype.slice.call(E.querySelectorAll("[data-slate-zero-width]")), ...Array.prototype.slice.call(E.querySelectorAll("[contenteditable=false]"))];
|
|
12937
|
-
B.forEach((
|
|
12938
|
-
if (bt && !r &&
|
|
12939
|
-
|
|
12935
|
+
B.forEach((T) => {
|
|
12936
|
+
if (bt && !r && T.hasAttribute("data-slate-zero-width") && T.textContent.length > 0 && T.textContext !== "\uFEFF") {
|
|
12937
|
+
T.textContent.startsWith("\uFEFF") && (T.textContent = T.textContent.slice(1));
|
|
12940
12938
|
return;
|
|
12941
12939
|
}
|
|
12942
|
-
|
|
12940
|
+
T.parentNode.removeChild(T);
|
|
12943
12941
|
}), u = E.textContent.length, b = l;
|
|
12944
12942
|
}
|
|
12945
12943
|
} else if (g) {
|
|
12946
12944
|
for (var D = g.querySelectorAll("[data-slate-leaf]"), C = 0; C < D.length; C++) {
|
|
12947
|
-
var
|
|
12948
|
-
if (ee.hasDOMNode(e,
|
|
12949
|
-
f =
|
|
12945
|
+
var S = D[C];
|
|
12946
|
+
if (ee.hasDOMNode(e, S)) {
|
|
12947
|
+
f = S;
|
|
12950
12948
|
break;
|
|
12951
12949
|
}
|
|
12952
12950
|
}
|
|
12953
|
-
f ? (l = f.closest('[data-slate-node="text"]'), b = f, u = b.textContent.length, b.querySelectorAll("[data-slate-zero-width]").forEach((
|
|
12954
|
-
u -=
|
|
12951
|
+
f ? (l = f.closest('[data-slate-node="text"]'), b = f, u = b.textContent.length, b.querySelectorAll("[data-slate-zero-width]").forEach((T) => {
|
|
12952
|
+
u -= T.textContent.length;
|
|
12955
12953
|
})) : u = 1;
|
|
12956
12954
|
}
|
|
12957
12955
|
b && u === b.textContent.length && // COMPAT: Android IMEs might remove the zero width space while composing,
|
|
@@ -13005,8 +13003,8 @@ var ee = {
|
|
|
13005
13003
|
u = t.focusNode;
|
|
13006
13004
|
var m = t.getRangeAt(0), p = t.getRangeAt(t.rangeCount - 1);
|
|
13007
13005
|
if (u instanceof HTMLTableRowElement && m.startContainer instanceof HTMLTableRowElement && p.startContainer instanceof HTMLTableRowElement) {
|
|
13008
|
-
let C = function(
|
|
13009
|
-
return
|
|
13006
|
+
let C = function(S) {
|
|
13007
|
+
return S.childElementCount > 0 ? C(S.children[0]) : S;
|
|
13010
13008
|
};
|
|
13011
13009
|
var g = m.startContainer, f = p.startContainer, b = C(g.children[m.startOffset]), v = C(f.children[p.startOffset]);
|
|
13012
13010
|
d = 0, v.childNodes.length > 0 ? o = v.childNodes[0] : o = v, b.childNodes.length > 0 ? u = b.childNodes[0] : u = b, v instanceof HTMLElement ? l = v.innerHTML.length : l = 0;
|
|
@@ -13341,8 +13339,8 @@ function w1(e) {
|
|
|
13341
13339
|
if (pn.delete(t), A) {
|
|
13342
13340
|
var {
|
|
13343
13341
|
selection: _
|
|
13344
|
-
} = t,
|
|
13345
|
-
|
|
13342
|
+
} = t, T = Sl(t, A);
|
|
13343
|
+
T && (!_ || !Y.equals(T, _)) && Q.select(t, T);
|
|
13346
13344
|
}
|
|
13347
13345
|
}, h = () => {
|
|
13348
13346
|
var A = mn.get(t);
|
|
@@ -13351,8 +13349,8 @@ function w1(e) {
|
|
|
13351
13349
|
var _ = Be.isPoint(A.at) ? $s(t, A.at) : Sl(t, A.at);
|
|
13352
13350
|
if (!_)
|
|
13353
13351
|
return;
|
|
13354
|
-
var
|
|
13355
|
-
(!t.selection || !Y.equals(t.selection,
|
|
13352
|
+
var T = y.range(t, _);
|
|
13353
|
+
(!t.selection || !Y.equals(t.selection, T)) && Q.select(t, _);
|
|
13356
13354
|
}
|
|
13357
13355
|
A.run();
|
|
13358
13356
|
}
|
|
@@ -13366,16 +13364,16 @@ function w1(e) {
|
|
|
13366
13364
|
affinity: "forward"
|
|
13367
13365
|
});
|
|
13368
13366
|
nn.set(t, t.marks), D1("flush", mn.get(t), Ct.get(t));
|
|
13369
|
-
for (var _ = B(),
|
|
13367
|
+
for (var _ = B(), T; T = (j = Ct.get(t)) === null || j === void 0 ? void 0 : j[0]; ) {
|
|
13370
13368
|
var j, H, W = It.get(t);
|
|
13371
13369
|
W !== void 0 && (It.delete(t), t.marks = W), W && u === !1 && (u = null);
|
|
13372
|
-
var ie = g1(
|
|
13373
|
-
(!t.selection || !Y.equals(t.selection, ie)) && Q.select(t, ie),
|
|
13370
|
+
var ie = g1(T);
|
|
13371
|
+
(!t.selection || !Y.equals(t.selection, ie)) && Q.select(t, ie), T.diff.text ? y.insertText(t, T.diff.text) : y.deleteFragment(t), Ct.set(t, (H = Ct.get(t)) === null || H === void 0 ? void 0 : H.filter((z) => {
|
|
13374
13372
|
var {
|
|
13375
13373
|
id: re
|
|
13376
13374
|
} = z;
|
|
13377
|
-
return re !==
|
|
13378
|
-
})), f1(t,
|
|
13375
|
+
return re !== T.id;
|
|
13376
|
+
})), f1(t, T) || (_ = !1, mn.delete(t), nn.delete(t), i = "action", pn.delete(t), n.cancel(), r.cancel(), A == null || A.unref());
|
|
13379
13377
|
}
|
|
13380
13378
|
var ne = A == null ? void 0 : A.unref();
|
|
13381
13379
|
if (ne && !pn.get(t) && (!t.selection || !Y.equals(ne, t.selection)) && Q.select(t, ne), E()) {
|
|
@@ -13387,21 +13385,21 @@ function w1(e) {
|
|
|
13387
13385
|
nn.delete(t), x !== void 0 && (t.marks = x, t.onChange());
|
|
13388
13386
|
}, p = (A) => {
|
|
13389
13387
|
a && clearTimeout(a), a = setTimeout(() => {
|
|
13390
|
-
|
|
13388
|
+
Fn.set(t, !1), m();
|
|
13391
13389
|
}, b1);
|
|
13392
13390
|
}, g = (A) => {
|
|
13393
|
-
|
|
13391
|
+
Fn.set(t, !0), a && (clearTimeout(a), a = null);
|
|
13394
13392
|
}, f = function() {
|
|
13395
|
-
var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1,
|
|
13396
|
-
if (
|
|
13393
|
+
var _ = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, T = Ps.get(t);
|
|
13394
|
+
if (T) {
|
|
13397
13395
|
if (B() || _) {
|
|
13398
|
-
|
|
13396
|
+
T.style.display = "none";
|
|
13399
13397
|
return;
|
|
13400
13398
|
}
|
|
13401
|
-
|
|
13399
|
+
T.style.removeProperty("display");
|
|
13402
13400
|
}
|
|
13403
13401
|
}, b = (A, _) => {
|
|
13404
|
-
var
|
|
13402
|
+
var T, j = (T = Ct.get(t)) !== null && T !== void 0 ? T : [];
|
|
13405
13403
|
Ct.set(t, j);
|
|
13406
13404
|
var H = oe.leaf(t, A), W = j.findIndex((x) => R.equals(x.path, A));
|
|
13407
13405
|
if (W < 0) {
|
|
@@ -13423,19 +13421,19 @@ function w1(e) {
|
|
|
13423
13421
|
});
|
|
13424
13422
|
}, v = function(_) {
|
|
13425
13423
|
var {
|
|
13426
|
-
at:
|
|
13424
|
+
at: T
|
|
13427
13425
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
13428
13426
|
u = !1, pn.delete(t), n.cancel(), r.cancel(), E() && m(), mn.set(t, {
|
|
13429
|
-
at:
|
|
13427
|
+
at: T,
|
|
13430
13428
|
run: _
|
|
13431
13429
|
}), o = setTimeout(m);
|
|
13432
13430
|
}, w = (A) => {
|
|
13433
13431
|
var _;
|
|
13434
13432
|
s && (clearTimeout(s), s = null);
|
|
13435
13433
|
var {
|
|
13436
|
-
inputType:
|
|
13434
|
+
inputType: T
|
|
13437
13435
|
} = A, j = null, H = A.dataTransfer || A.data || void 0;
|
|
13438
|
-
u !== !1 &&
|
|
13436
|
+
u !== !1 && T !== "insertText" && T !== "insertCompositionText" && (u = !1);
|
|
13439
13437
|
var [W] = A.getTargetRanges();
|
|
13440
13438
|
W && (j = ee.toSlateRange(t, W, {
|
|
13441
13439
|
exactMatch: !1,
|
|
@@ -13447,7 +13445,7 @@ function w1(e) {
|
|
|
13447
13445
|
suppressThrow: !0
|
|
13448
13446
|
})), j = (_ = j) !== null && _ !== void 0 ? _ : t.selection, !!j) {
|
|
13449
13447
|
var x = !0;
|
|
13450
|
-
if (
|
|
13448
|
+
if (T.startsWith("delete")) {
|
|
13451
13449
|
if (Y.isExpanded(j)) {
|
|
13452
13450
|
var [z, re] = Y.edges(j), F = oe.leaf(t, z.path);
|
|
13453
13451
|
if (F.text.length === z.offset && re.offset === 0) {
|
|
@@ -13461,7 +13459,7 @@ function w1(e) {
|
|
|
13461
13459
|
});
|
|
13462
13460
|
}
|
|
13463
13461
|
}
|
|
13464
|
-
var N =
|
|
13462
|
+
var N = T.endsWith("Backward") ? "backward" : "forward", [O, q] = Y.edges(j), [J, U] = y.leaf(t, O.path), X = {
|
|
13465
13463
|
text: "",
|
|
13466
13464
|
start: O.offset,
|
|
13467
13465
|
end: q.offset
|
|
@@ -13472,7 +13470,7 @@ function w1(e) {
|
|
|
13472
13470
|
path: j.anchor.path,
|
|
13473
13471
|
offset: O.offset
|
|
13474
13472
|
}, Ne = y.range(t, Fe, Fe);
|
|
13475
|
-
return
|
|
13473
|
+
return S(Ne), b(j.anchor.path, {
|
|
13476
13474
|
text: "",
|
|
13477
13475
|
end: q.offset,
|
|
13478
13476
|
start: O.offset
|
|
@@ -13485,7 +13483,7 @@ function w1(e) {
|
|
|
13485
13483
|
});
|
|
13486
13484
|
}
|
|
13487
13485
|
}
|
|
13488
|
-
switch (
|
|
13486
|
+
switch (T) {
|
|
13489
13487
|
case "deleteByComposition":
|
|
13490
13488
|
case "deleteByCut":
|
|
13491
13489
|
case "deleteByDrag":
|
|
@@ -13589,7 +13587,7 @@ function w1(e) {
|
|
|
13589
13587
|
at: j
|
|
13590
13588
|
});
|
|
13591
13589
|
var ge = H ?? "";
|
|
13592
|
-
if (It.get(t) && (ge = ge.replace("\uFEFF", "")),
|
|
13590
|
+
if (It.get(t) && (ge = ge.replace("\uFEFF", "")), T === "insertText" && /.*\n.*\n$/.test(ge) && (ge = ge.slice(0, -1)), ge.includes(`
|
|
13593
13591
|
`))
|
|
13594
13592
|
return v(() => {
|
|
13595
13593
|
var be = ge.split(`
|
|
@@ -13606,11 +13604,11 @@ function w1(e) {
|
|
|
13606
13604
|
end: je.offset,
|
|
13607
13605
|
text: ge
|
|
13608
13606
|
};
|
|
13609
|
-
if (ge && u &&
|
|
13607
|
+
if (ge && u && T === "insertCompositionText") {
|
|
13610
13608
|
var se = u.start + u.text.search(/\S|$/), pe = K.start + K.text.search(/\S|$/);
|
|
13611
13609
|
pe === se + 1 && K.end === u.start + u.text.length ? (K.start -= 1, u = null, L()) : u = !1;
|
|
13612
13610
|
} else
|
|
13613
|
-
|
|
13611
|
+
T === "insertText" ? u === null ? u = K : u && Y.isCollapsed(j) && u.end + u.text.length === Ae.offset ? u = bi(bi({}, u), {}, {
|
|
13614
13612
|
text: u.text + ge
|
|
13615
13613
|
}) : u = !1 : u = !1;
|
|
13616
13614
|
if (x) {
|
|
@@ -13627,14 +13625,14 @@ function w1(e) {
|
|
|
13627
13625
|
}, E = () => !!mn.get(t), B = () => {
|
|
13628
13626
|
var A;
|
|
13629
13627
|
return !!((A = Ct.get(t)) !== null && A !== void 0 && A.length);
|
|
13630
|
-
}, D = () => E() || B(), C = () => i,
|
|
13628
|
+
}, D = () => E() || B(), C = () => i, S = (A) => {
|
|
13631
13629
|
pn.set(t, A), s && (clearTimeout(s), s = null);
|
|
13632
13630
|
var {
|
|
13633
13631
|
selection: _
|
|
13634
13632
|
} = t;
|
|
13635
13633
|
if (A) {
|
|
13636
|
-
var
|
|
13637
|
-
(
|
|
13634
|
+
var T = !_ || !R.equals(_.anchor.path, A.anchor.path), j = !_ || !R.equals(_.anchor.path.slice(0, -1), A.anchor.path.slice(0, -1));
|
|
13635
|
+
(T && u || j) && (u = !1), (T || B()) && (s = setTimeout(m, y1));
|
|
13638
13636
|
}
|
|
13639
13637
|
}, I = () => {
|
|
13640
13638
|
(E() || !B()) && m();
|
|
@@ -13643,7 +13641,7 @@ function w1(e) {
|
|
|
13643
13641
|
}, L = () => {
|
|
13644
13642
|
E() || (o = setTimeout(m));
|
|
13645
13643
|
}, $ = (A) => {
|
|
13646
|
-
if (!(B() || E()) && A.some((
|
|
13644
|
+
if (!(B() || E()) && A.some((T) => ko(t, T, A))) {
|
|
13647
13645
|
var _;
|
|
13648
13646
|
(_ = rf.get(t)) === null || _ === void 0 || _();
|
|
13649
13647
|
}
|
|
@@ -13655,7 +13653,7 @@ function w1(e) {
|
|
|
13655
13653
|
hasPendingAction: E,
|
|
13656
13654
|
hasPendingChanges: D,
|
|
13657
13655
|
isFlushing: C,
|
|
13658
|
-
handleUserSelect:
|
|
13656
|
+
handleUserSelect: S,
|
|
13659
13657
|
handleCompositionEnd: p,
|
|
13660
13658
|
handleCompositionStart: g,
|
|
13661
13659
|
handleDOMBeforeInput: w,
|
|
@@ -13713,7 +13711,7 @@ var F1 = {
|
|
|
13713
13711
|
} = e, n = lr(e, _1);
|
|
13714
13712
|
if (!bt)
|
|
13715
13713
|
return null;
|
|
13716
|
-
var r =
|
|
13714
|
+
var r = wn(), i = C1(), [a] = ue(() => w1(k1({
|
|
13717
13715
|
editor: r
|
|
13718
13716
|
}, n)));
|
|
13719
13717
|
return E1(t, a.handleDomMutations, F1), Eo.set(r, a.scheduleFlush), i && a.flush(), a;
|
|
@@ -13766,7 +13764,7 @@ var N1 = (e) => {
|
|
|
13766
13764
|
leaf: n,
|
|
13767
13765
|
parent: r,
|
|
13768
13766
|
text: i
|
|
13769
|
-
} = e, a =
|
|
13767
|
+
} = e, a = wn(), s = ee.findPath(a, i), o = R.parent(s), l = !!n[af];
|
|
13770
13768
|
return a.isVoid(r) ? /* @__PURE__ */ te.createElement(Ua, {
|
|
13771
13769
|
length: oe.string(r).length
|
|
13772
13770
|
}) : n.text === "" && r.children[r.children.length - 1] === i && !a.isInline(r) && y.string(a, o) === "" ? /* @__PURE__ */ te.createElement(Ua, {
|
|
@@ -13843,7 +13841,7 @@ var I1 = (e) => {
|
|
|
13843
13841
|
parent: i,
|
|
13844
13842
|
renderPlaceholder: a,
|
|
13845
13843
|
renderLeaf: s = (w) => /* @__PURE__ */ te.createElement(z1, ff({}, w))
|
|
13846
|
-
} = e, o =
|
|
13844
|
+
} = e, o = wn(), l = ke(null), u = ke(null), [d, h] = ue(!1), m = ke(null), p = Re((w) => {
|
|
13847
13845
|
if ($1(l, w == null), w == null) {
|
|
13848
13846
|
var E;
|
|
13849
13847
|
Ps.delete(o), (E = t.onPlaceholderResize) === null || E === void 0 || E.call(t, null);
|
|
@@ -13912,7 +13910,7 @@ var I1 = (e) => {
|
|
|
13912
13910
|
renderPlaceholder: i,
|
|
13913
13911
|
renderLeaf: a,
|
|
13914
13912
|
text: s
|
|
13915
|
-
} = e, o =
|
|
13913
|
+
} = e, o = wn(), l = ke(null), u = me.decorations(s, t), d = ee.findKey(o, s), h = [], m = 0; m < u.length; m++) {
|
|
13916
13914
|
var p = u[m];
|
|
13917
13915
|
h.push(/* @__PURE__ */ te.createElement(L1, {
|
|
13918
13916
|
isLast: n && m === u.length - 1,
|
|
@@ -13926,7 +13924,7 @@ var I1 = (e) => {
|
|
|
13926
13924
|
}
|
|
13927
13925
|
var g = Re((f) => {
|
|
13928
13926
|
var b = fa.get(o);
|
|
13929
|
-
f ? (b == null || b.set(d, f),
|
|
13927
|
+
f ? (b == null || b.set(d, f), Sn.set(s, f), Kr.set(f, s)) : (b == null || b.delete(d), Sn.delete(s), l.current && Kr.delete(l.current)), l.current = f;
|
|
13930
13928
|
}, [l, o, d, s]);
|
|
13931
13929
|
return /* @__PURE__ */ te.createElement("span", {
|
|
13932
13930
|
"data-slate-node": "text",
|
|
@@ -13962,9 +13960,9 @@ var W1 = (e) => {
|
|
|
13962
13960
|
renderPlaceholder: i,
|
|
13963
13961
|
renderLeaf: a,
|
|
13964
13962
|
selection: s
|
|
13965
|
-
} = e, o =
|
|
13963
|
+
} = e, o = wn(), l = Z1(), u = o.isInline(n), d = ee.findKey(o, n), h = Re((w) => {
|
|
13966
13964
|
var E = fa.get(o);
|
|
13967
|
-
w ? (E == null || E.set(d, w),
|
|
13965
|
+
w ? (E == null || E.set(d, w), Sn.set(n, w), Kr.set(w, n)) : (E == null || E.delete(d), Sn.delete(n));
|
|
13968
13966
|
}, [o, d, n]), m = pf({
|
|
13969
13967
|
decorations: t,
|
|
13970
13968
|
node: n,
|
|
@@ -14009,7 +14007,7 @@ var W1 = (e) => {
|
|
|
14009
14007
|
attributes: t,
|
|
14010
14008
|
children: n,
|
|
14011
14009
|
element: r
|
|
14012
|
-
} = e, i =
|
|
14010
|
+
} = e, i = wn(), a = i.isInline(r) ? "span" : "div";
|
|
14013
14011
|
return /* @__PURE__ */ te.createElement(a, Ls(Ls({}, t), {}, {
|
|
14014
14012
|
style: {
|
|
14015
14013
|
position: "relative"
|
|
@@ -14023,7 +14021,7 @@ var W1 = (e) => {
|
|
|
14023
14021
|
renderPlaceholder: i,
|
|
14024
14022
|
renderLeaf: a,
|
|
14025
14023
|
selection: s
|
|
14026
|
-
} = e, o = V1(), l =
|
|
14024
|
+
} = e, o = V1(), l = wn(), u = ee.findPath(l, n), d = [], h = he.isElement(n) && !l.isInline(n) && y.hasInlines(l, n), m = 0; m < n.children.length; m++) {
|
|
14027
14025
|
var p = u.concat(m), g = n.children[m], f = ee.findKey(l, g), b = y.range(l, p), v = s && Y.intersection(b, s), w = o([g, p]);
|
|
14028
14026
|
for (var E of t) {
|
|
14029
14027
|
var B = Y.intersection(E, b);
|
|
@@ -14061,7 +14059,7 @@ var W1 = (e) => {
|
|
|
14061
14059
|
return t;
|
|
14062
14060
|
};
|
|
14063
14061
|
function Y1() {
|
|
14064
|
-
var e =
|
|
14062
|
+
var e = wn(), t = ke(!1), n = ke(0), r = Re(() => {
|
|
14065
14063
|
if (!t.current) {
|
|
14066
14064
|
t.current = !0;
|
|
14067
14065
|
var i = ee.getWindow(e);
|
|
@@ -14248,7 +14246,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14248
14246
|
disableDefaultStyles: p = !1
|
|
14249
14247
|
} = e, g = lr(e, rD), f = zn(), [b, v] = ue(!1), w = ke(null), E = ke([]), [B, D] = ue(), {
|
|
14250
14248
|
onUserInput: C,
|
|
14251
|
-
receivedUserInput:
|
|
14249
|
+
receivedUserInput: S
|
|
14252
14250
|
} = Y1(), [, I] = hr((k) => k + 1, 0);
|
|
14253
14251
|
rf.set(f, I), Ns.set(f, s);
|
|
14254
14252
|
var P = Yt(() => ({
|
|
@@ -14288,7 +14286,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14288
14286
|
scheduleOnDOMSelectionChange: A
|
|
14289
14287
|
}), Zr(() => {
|
|
14290
14288
|
var k, N, O;
|
|
14291
|
-
w.current && (O = _o(w.current)) ? (nf.set(f, O), Si.set(f, w.current),
|
|
14289
|
+
w.current && (O = _o(w.current)) ? (nf.set(f, O), Si.set(f, w.current), Sn.set(f, w.current), Kr.set(w.current, f)) : Sn.delete(f);
|
|
14292
14290
|
var {
|
|
14293
14291
|
selection: q
|
|
14294
14292
|
} = f, J = ee.findDocumentOrShadowRoot(f), U = J.getSelection();
|
|
@@ -14489,15 +14487,15 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14489
14487
|
case "insertFromYank":
|
|
14490
14488
|
case "insertReplacementText":
|
|
14491
14489
|
case "insertText": {
|
|
14492
|
-
q === "insertFromComposition" && ee.isComposing(f) && (v(!1),
|
|
14490
|
+
q === "insertFromComposition" && ee.isComposing(f) && (v(!1), Fn.set(f, !1)), (J == null ? void 0 : J.constructor.name) === "DataTransfer" ? ee.insertData(f, J) : typeof J == "string" && (X ? E.current.push(() => y.insertText(f, J)) : y.insertText(f, J));
|
|
14493
14491
|
break;
|
|
14494
14492
|
}
|
|
14495
14493
|
}
|
|
14496
14494
|
var K = (N = Pr.get(f)) === null || N === void 0 ? void 0 : N.unref();
|
|
14497
14495
|
Pr.delete(f), K && (!f.selection || !Y.equals(f.selection, K)) && Q.select(f, K);
|
|
14498
14496
|
}
|
|
14499
|
-
}, [f, $, C, i, s, A]),
|
|
14500
|
-
k == null ? ($.cancel(), A.cancel(), Si.delete(f),
|
|
14497
|
+
}, [f, $, C, i, s, A]), T = Re((k) => {
|
|
14498
|
+
k == null ? ($.cancel(), A.cancel(), Si.delete(f), Sn.delete(f), w.current && fn && w.current.removeEventListener("beforeinput", _)) : fn && k.addEventListener("beforeinput", _), w.current = k;
|
|
14501
14499
|
}, [$, A, f, _]);
|
|
14502
14500
|
Zr(() => {
|
|
14503
14501
|
var k = ee.getWindow(f);
|
|
@@ -14566,7 +14564,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14566
14564
|
value: r
|
|
14567
14565
|
}, /* @__PURE__ */ te.createElement(nD, {
|
|
14568
14566
|
node: w,
|
|
14569
|
-
receivedUserInput:
|
|
14567
|
+
receivedUserInput: S
|
|
14570
14568
|
}, /* @__PURE__ */ te.createElement(m, Vt(Vt({
|
|
14571
14569
|
role: s ? void 0 : "textbox",
|
|
14572
14570
|
"aria-multiline": s ? void 0 : !0
|
|
@@ -14588,7 +14586,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14588
14586
|
// this magic zIndex="-1" will fix it
|
|
14589
14587
|
zindex: -1,
|
|
14590
14588
|
suppressContentEditableWarning: !0,
|
|
14591
|
-
ref:
|
|
14589
|
+
ref: T,
|
|
14592
14590
|
style: Vt(Vt({}, p ? {} : Vt({
|
|
14593
14591
|
// Allow positioning relative to the editable element.
|
|
14594
14592
|
position: "relative",
|
|
@@ -14673,7 +14671,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14673
14671
|
if (ee.hasSelectableTarget(f, k.target)) {
|
|
14674
14672
|
var N;
|
|
14675
14673
|
if (ee.isComposing(f) && Promise.resolve().then(() => {
|
|
14676
|
-
v(!1),
|
|
14674
|
+
v(!1), Fn.set(f, !1);
|
|
14677
14675
|
}), (N = L.current) === null || N === void 0 || N.handleCompositionEnd(k), gt(k, g.onCompositionEnd) || bt)
|
|
14678
14676
|
return;
|
|
14679
14677
|
if (!Tr && !Xy && !Yy && !t1 && !e1 && k.data) {
|
|
@@ -14685,7 +14683,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14685
14683
|
}
|
|
14686
14684
|
}, [g.onCompositionEnd, f]),
|
|
14687
14685
|
onCompositionUpdate: Re((k) => {
|
|
14688
|
-
ee.hasSelectableTarget(f, k.target) && !gt(k, g.onCompositionUpdate) && (ee.isComposing(f) || (v(!0),
|
|
14686
|
+
ee.hasSelectableTarget(f, k.target) && !gt(k, g.onCompositionUpdate) && (ee.isComposing(f) || (v(!0), Fn.set(f, !0)));
|
|
14689
14687
|
}, [g.onCompositionUpdate, f]),
|
|
14690
14688
|
onCompositionStart: Re((k) => {
|
|
14691
14689
|
if (ee.hasSelectableTarget(f, k.target)) {
|
|
@@ -14772,7 +14770,7 @@ var aD = (e) => /* @__PURE__ */ te.createElement(te.Fragment, null, pf(e)), sD =
|
|
|
14772
14770
|
var {
|
|
14773
14771
|
nativeEvent: O
|
|
14774
14772
|
} = k;
|
|
14775
|
-
if (ee.isComposing(f) && O.isComposing === !1 && (
|
|
14773
|
+
if (ee.isComposing(f) && O.isComposing === !1 && (Fn.set(f, !1), v(!1)), gt(k, g.onKeyDown) || ee.isComposing(f))
|
|
14776
14774
|
return;
|
|
14777
14775
|
var {
|
|
14778
14776
|
selection: q
|
|
@@ -15104,7 +15102,7 @@ var vD = function(t) {
|
|
|
15104
15102
|
}, r.apply = (u) => {
|
|
15105
15103
|
var d = [], h = [], m = Ct.get(r);
|
|
15106
15104
|
if (m != null && m.length) {
|
|
15107
|
-
var p = m.map((
|
|
15105
|
+
var p = m.map((T) => v1(T, u)).filter(Boolean);
|
|
15108
15106
|
Ct.set(r, p);
|
|
15109
15107
|
}
|
|
15110
15108
|
var g = pn.get(r);
|
|
@@ -15144,8 +15142,8 @@ var vD = function(t) {
|
|
|
15144
15142
|
d.push(...Zn(r, E));
|
|
15145
15143
|
var B;
|
|
15146
15144
|
R.isBefore(u.path, u.newPath) ? (d.push(...Zn(r, R.parent(u.path))), B = u.newPath) : (d.push(...Zn(r, R.parent(u.newPath))), B = u.path);
|
|
15147
|
-
var D = oe.get(t, R.parent(B)), C = ee.findKey(r, D),
|
|
15148
|
-
h.push([
|
|
15145
|
+
var D = oe.get(t, R.parent(B)), C = ee.findKey(r, D), S = y.pathRef(r, R.parent(B));
|
|
15146
|
+
h.push([S, C]);
|
|
15149
15147
|
break;
|
|
15150
15148
|
}
|
|
15151
15149
|
}
|
|
@@ -15185,7 +15183,7 @@ var vD = function(t) {
|
|
|
15185
15183
|
var D = v.ownerDocument.createElement("span");
|
|
15186
15184
|
D.style.whiteSpace = "pre", D.appendChild(v), b.appendChild(D), v = D;
|
|
15187
15185
|
}
|
|
15188
|
-
var C = r.getFragment(),
|
|
15186
|
+
var C = r.getFragment(), S = JSON.stringify(C), I = window.btoa(encodeURIComponent(S));
|
|
15189
15187
|
v.setAttribute("data-slate-fragment", I), u.setData("application/".concat(n), I);
|
|
15190
15188
|
var P = b.ownerDocument.createElement("div");
|
|
15191
15189
|
return P.appendChild(b), P.setAttribute("hidden", "true"), b.ownerDocument.body.appendChild(P), u.setData("text/html", P.innerHTML), u.setData("text/plain", uf(P)), b.ownerDocument.body.removeChild(P), u;
|
|
@@ -15420,7 +15418,7 @@ var ji = Object.prototype.hasOwnProperty, xf = Object.prototype.toString, Zl = O
|
|
|
15420
15418
|
r = Xl(o, n), i = Xl(t, n), o !== i && (d && i && (Ql(i) || (a = Gl(i))) ? (a ? (a = !1, s = r && Gl(r) ? r : []) : s = r && Ql(r) ? r : {}, Jl(o, { name: n, newValue: e(d, s, i) })) : typeof i < "u" && Jl(o, { name: n, newValue: i }));
|
|
15421
15419
|
return o;
|
|
15422
15420
|
};
|
|
15423
|
-
const Va = /* @__PURE__ */
|
|
15421
|
+
const Va = /* @__PURE__ */ Mn(wD);
|
|
15424
15422
|
function qs(e) {
|
|
15425
15423
|
if (typeof e != "object" || e === null)
|
|
15426
15424
|
return !1;
|
|
@@ -16778,7 +16776,7 @@ function Cf(e, t) {
|
|
|
16778
16776
|
function ir(e) {
|
|
16779
16777
|
return e.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
16780
16778
|
}
|
|
16781
|
-
const Zt =
|
|
16779
|
+
const Zt = Cn(/[A-Za-z]/), Lt = Cn(/[\dA-Za-z]/), YD = Cn(/[#-'*+\--9=?A-Z^-~]/);
|
|
16782
16780
|
function Hs(e) {
|
|
16783
16781
|
return (
|
|
16784
16782
|
// Special whitespace codes (which have negative values), C0 and Control
|
|
@@ -16786,7 +16784,7 @@ function Hs(e) {
|
|
|
16786
16784
|
e !== null && (e < 32 || e === 127)
|
|
16787
16785
|
);
|
|
16788
16786
|
}
|
|
16789
|
-
const Vs =
|
|
16787
|
+
const Vs = Cn(/\d/), GD = Cn(/[\dA-Fa-f]/), QD = Cn(/[!-/:-@[-`{-~]/);
|
|
16790
16788
|
function we(e) {
|
|
16791
16789
|
return e !== null && e < -2;
|
|
16792
16790
|
}
|
|
@@ -16796,8 +16794,8 @@ function _t(e) {
|
|
|
16796
16794
|
function Ie(e) {
|
|
16797
16795
|
return e === -2 || e === -1 || e === 32;
|
|
16798
16796
|
}
|
|
16799
|
-
const JD =
|
|
16800
|
-
function
|
|
16797
|
+
const JD = Cn(/\p{P}|\p{S}/u), XD = Cn(/\s/);
|
|
16798
|
+
function Cn(e) {
|
|
16801
16799
|
return t;
|
|
16802
16800
|
function t(n) {
|
|
16803
16801
|
return n !== null && n > -1 && e.test(String.fromCharCode(n));
|
|
@@ -16881,15 +16879,15 @@ function rx(e) {
|
|
|
16881
16879
|
break;
|
|
16882
16880
|
}
|
|
16883
16881
|
v(r);
|
|
16884
|
-
let
|
|
16885
|
-
for (;
|
|
16886
|
-
t.events[
|
|
16882
|
+
let S = B;
|
|
16883
|
+
for (; S < t.events.length; )
|
|
16884
|
+
t.events[S][1].end = Object.assign({}, C), S++;
|
|
16887
16885
|
return ln(
|
|
16888
16886
|
t.events,
|
|
16889
16887
|
D + 1,
|
|
16890
16888
|
0,
|
|
16891
16889
|
t.events.slice(B)
|
|
16892
|
-
), t.events.length =
|
|
16890
|
+
), t.events.length = S, u(E);
|
|
16893
16891
|
}
|
|
16894
16892
|
return o(E);
|
|
16895
16893
|
}
|
|
@@ -16953,8 +16951,8 @@ function rx(e) {
|
|
|
16953
16951
|
i.events[C][1].end.offset > s)
|
|
16954
16952
|
)
|
|
16955
16953
|
return;
|
|
16956
|
-
const
|
|
16957
|
-
let I =
|
|
16954
|
+
const S = t.events.length;
|
|
16955
|
+
let I = S, P, L;
|
|
16958
16956
|
for (; I--; )
|
|
16959
16957
|
if (t.events[I][0] === "exit" && t.events[I][1].type === "chunkFlow") {
|
|
16960
16958
|
if (P) {
|
|
@@ -16963,13 +16961,13 @@ function rx(e) {
|
|
|
16963
16961
|
}
|
|
16964
16962
|
P = !0;
|
|
16965
16963
|
}
|
|
16966
|
-
for (v(r), C =
|
|
16964
|
+
for (v(r), C = S; C < t.events.length; )
|
|
16967
16965
|
t.events[C][1].end = Object.assign({}, L), C++;
|
|
16968
16966
|
ln(
|
|
16969
16967
|
t.events,
|
|
16970
16968
|
I + 1,
|
|
16971
16969
|
0,
|
|
16972
|
-
t.events.slice(
|
|
16970
|
+
t.events.slice(S)
|
|
16973
16971
|
), t.events.length = C;
|
|
16974
16972
|
}
|
|
16975
16973
|
}
|
|
@@ -17211,8 +17209,8 @@ function px(e, t, n) {
|
|
|
17211
17209
|
return u(C);
|
|
17212
17210
|
}
|
|
17213
17211
|
function u(C) {
|
|
17214
|
-
const
|
|
17215
|
-
return a =
|
|
17212
|
+
const S = r.events[r.events.length - 1];
|
|
17213
|
+
return a = S && S[1].type === "linePrefix" ? S[2].sliceSerialize(S[1], !0).length : 0, o = C, e.enter("codeFenced"), e.enter("codeFencedFence"), e.enter("codeFencedFenceSequence"), d(C);
|
|
17216
17214
|
}
|
|
17217
17215
|
function d(C) {
|
|
17218
17216
|
return C === o ? (s++, e.consume(C), d) : s < 3 ? n(C) : (e.exit("codeFencedFenceSequence"), Ie(C) ? Ke(e, h, "whitespace")(C) : h(C));
|
|
@@ -17251,7 +17249,7 @@ function px(e, t, n) {
|
|
|
17251
17249
|
function B(C) {
|
|
17252
17250
|
return e.exit("codeFenced"), t(C);
|
|
17253
17251
|
}
|
|
17254
|
-
function D(C,
|
|
17252
|
+
function D(C, S, I) {
|
|
17255
17253
|
let P = 0;
|
|
17256
17254
|
return L;
|
|
17257
17255
|
function L(j) {
|
|
@@ -17264,10 +17262,10 @@ function px(e, t, n) {
|
|
|
17264
17262
|
return j === o ? (C.enter("codeFencedFenceSequence"), _(j)) : I(j);
|
|
17265
17263
|
}
|
|
17266
17264
|
function _(j) {
|
|
17267
|
-
return j === o ? (P++, C.consume(j), _) : P >= s ? (C.exit("codeFencedFenceSequence"), Ie(j) ? Ke(C,
|
|
17265
|
+
return j === o ? (P++, C.consume(j), _) : P >= s ? (C.exit("codeFencedFenceSequence"), Ie(j) ? Ke(C, T, "whitespace")(j) : T(j)) : I(j);
|
|
17268
17266
|
}
|
|
17269
|
-
function
|
|
17270
|
-
return j === null || we(j) ? (C.exit("codeFencedFence"),
|
|
17267
|
+
function T(j) {
|
|
17268
|
+
return j === null || we(j) ? (C.exit("codeFencedFence"), S(j)) : I(j);
|
|
17271
17269
|
}
|
|
17272
17270
|
}
|
|
17273
17271
|
}
|
|
@@ -17954,10 +17952,10 @@ function Hx(e, t, n) {
|
|
|
17954
17952
|
return F === 61 ? (e.consume(F), C) : Ie(F) ? (e.consume(F), D) : E(F);
|
|
17955
17953
|
}
|
|
17956
17954
|
function C(F) {
|
|
17957
|
-
return F === null || F === 60 || F === 61 || F === 62 || F === 96 ? n(F) : F === 34 || F === 39 ? (e.consume(F), l = F,
|
|
17955
|
+
return F === null || F === 60 || F === 61 || F === 62 || F === 96 ? n(F) : F === 34 || F === 39 ? (e.consume(F), l = F, S) : Ie(F) ? (e.consume(F), C) : I(F);
|
|
17958
17956
|
}
|
|
17959
|
-
function
|
|
17960
|
-
return F === l ? (e.consume(F), l = null, P) : F === null || we(F) ? n(F) : (e.consume(F),
|
|
17957
|
+
function S(F) {
|
|
17958
|
+
return F === l ? (e.consume(F), l = null, P) : F === null || we(F) ? n(F) : (e.consume(F), S);
|
|
17961
17959
|
}
|
|
17962
17960
|
function I(F) {
|
|
17963
17961
|
return F === null || F === 34 || F === 39 || F === 47 || F === 60 || F === 61 || F === 62 || F === 96 || _t(F) ? D(F) : (e.consume(F), I);
|
|
@@ -17975,9 +17973,9 @@ function Hx(e, t, n) {
|
|
|
17975
17973
|
return F === 45 && i === 2 ? (e.consume(F), H) : F === 60 && i === 1 ? (e.consume(F), W) : F === 62 && i === 4 ? (e.consume(F), z) : F === 63 && i === 3 ? (e.consume(F), x) : F === 93 && i === 5 ? (e.consume(F), ne) : we(F) && (i === 6 || i === 7) ? (e.exit("htmlFlowData"), e.check(qx, re, _)(F)) : F === null || we(F) ? (e.exit("htmlFlowData"), _(F)) : (e.consume(F), A);
|
|
17976
17974
|
}
|
|
17977
17975
|
function _(F) {
|
|
17978
|
-
return e.check(Wx,
|
|
17976
|
+
return e.check(Wx, T, re)(F);
|
|
17979
17977
|
}
|
|
17980
|
-
function
|
|
17978
|
+
function T(F) {
|
|
17981
17979
|
return e.enter("lineEnding"), e.consume(F), e.exit("lineEnding"), j;
|
|
17982
17980
|
}
|
|
17983
17981
|
function j(F) {
|
|
@@ -18080,10 +18078,10 @@ function Yx(e, t, n) {
|
|
|
18080
18078
|
return Zt(x) ? (e.consume(x), C) : n(x);
|
|
18081
18079
|
}
|
|
18082
18080
|
function C(x) {
|
|
18083
|
-
return x === 45 || Lt(x) ? (e.consume(x), C) :
|
|
18081
|
+
return x === 45 || Lt(x) ? (e.consume(x), C) : S(x);
|
|
18084
18082
|
}
|
|
18085
|
-
function
|
|
18086
|
-
return we(x) ? (s =
|
|
18083
|
+
function S(x) {
|
|
18084
|
+
return we(x) ? (s = S, W(x)) : Ie(x) ? (e.consume(x), S) : H(x);
|
|
18087
18085
|
}
|
|
18088
18086
|
function I(x) {
|
|
18089
18087
|
return x === 45 || Lt(x) ? (e.consume(x), I) : x === 47 || x === 62 || _t(x) ? P(x) : n(x);
|
|
@@ -18098,13 +18096,13 @@ function Yx(e, t, n) {
|
|
|
18098
18096
|
return x === 61 ? (e.consume(x), A) : we(x) ? (s = $, W(x)) : Ie(x) ? (e.consume(x), $) : P(x);
|
|
18099
18097
|
}
|
|
18100
18098
|
function A(x) {
|
|
18101
|
-
return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 34 || x === 39 ? (e.consume(x), i = x, _) : we(x) ? (s = A, W(x)) : Ie(x) ? (e.consume(x), A) : (e.consume(x),
|
|
18099
|
+
return x === null || x === 60 || x === 61 || x === 62 || x === 96 ? n(x) : x === 34 || x === 39 ? (e.consume(x), i = x, _) : we(x) ? (s = A, W(x)) : Ie(x) ? (e.consume(x), A) : (e.consume(x), T);
|
|
18102
18100
|
}
|
|
18103
18101
|
function _(x) {
|
|
18104
18102
|
return x === i ? (e.consume(x), i = void 0, j) : x === null ? n(x) : we(x) ? (s = _, W(x)) : (e.consume(x), _);
|
|
18105
18103
|
}
|
|
18106
|
-
function
|
|
18107
|
-
return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 96 ? n(x) : x === 47 || x === 62 || _t(x) ? P(x) : (e.consume(x),
|
|
18104
|
+
function T(x) {
|
|
18105
|
+
return x === null || x === 34 || x === 39 || x === 60 || x === 61 || x === 96 ? n(x) : x === 47 || x === 62 || _t(x) ? P(x) : (e.consume(x), T);
|
|
18108
18106
|
}
|
|
18109
18107
|
function j(x) {
|
|
18110
18108
|
return x === 47 || x === 62 || _t(x) ? P(x) : n(x);
|
|
@@ -18591,9 +18589,9 @@ function kw(e, t, n) {
|
|
|
18591
18589
|
consume: w,
|
|
18592
18590
|
enter: E,
|
|
18593
18591
|
exit: B,
|
|
18594
|
-
attempt:
|
|
18595
|
-
check:
|
|
18596
|
-
interrupt:
|
|
18592
|
+
attempt: S(D),
|
|
18593
|
+
check: S(C),
|
|
18594
|
+
interrupt: S(C, {
|
|
18597
18595
|
interrupt: !0
|
|
18598
18596
|
})
|
|
18599
18597
|
}, u = {
|
|
@@ -18620,12 +18618,12 @@ function kw(e, t, n) {
|
|
|
18620
18618
|
return Fw(s, $);
|
|
18621
18619
|
}
|
|
18622
18620
|
function g() {
|
|
18623
|
-
const { line: $, column: A, offset: _, _index:
|
|
18621
|
+
const { line: $, column: A, offset: _, _index: T, _bufferIndex: j } = r;
|
|
18624
18622
|
return {
|
|
18625
18623
|
line: $,
|
|
18626
18624
|
column: A,
|
|
18627
18625
|
offset: _,
|
|
18628
|
-
_index:
|
|
18626
|
+
_index: T,
|
|
18629
18627
|
_bufferIndex: j
|
|
18630
18628
|
};
|
|
18631
18629
|
}
|
|
@@ -18663,14 +18661,14 @@ function kw(e, t, n) {
|
|
|
18663
18661
|
function C($, A) {
|
|
18664
18662
|
A.restore();
|
|
18665
18663
|
}
|
|
18666
|
-
function
|
|
18664
|
+
function S($, A) {
|
|
18667
18665
|
return _;
|
|
18668
|
-
function _(
|
|
18666
|
+
function _(T, j, H) {
|
|
18669
18667
|
let W, ie, ne, x;
|
|
18670
|
-
return Array.isArray(
|
|
18668
|
+
return Array.isArray(T) ? re(T) : "tokenize" in T ? (
|
|
18671
18669
|
// @ts-expect-error Looks like a construct.
|
|
18672
|
-
re([
|
|
18673
|
-
) : z(
|
|
18670
|
+
re([T])
|
|
18671
|
+
) : z(T);
|
|
18674
18672
|
function z(O) {
|
|
18675
18673
|
return q;
|
|
18676
18674
|
function q(J) {
|
|
@@ -18717,13 +18715,13 @@ function kw(e, t, n) {
|
|
|
18717
18715
|
), $.resolveTo && (u.events = $.resolveTo(u.events, u));
|
|
18718
18716
|
}
|
|
18719
18717
|
function P() {
|
|
18720
|
-
const $ = g(), A = u.previous, _ = u.currentConstruct,
|
|
18718
|
+
const $ = g(), A = u.previous, _ = u.currentConstruct, T = u.events.length, j = Array.from(o);
|
|
18721
18719
|
return {
|
|
18722
18720
|
restore: H,
|
|
18723
|
-
from:
|
|
18721
|
+
from: T
|
|
18724
18722
|
};
|
|
18725
18723
|
function H() {
|
|
18726
|
-
r = $, u.previous = A, u.currentConstruct = _, u.events.length =
|
|
18724
|
+
r = $, u.previous = A, u.currentConstruct = _, u.events.length = T, o = j, L();
|
|
18727
18725
|
}
|
|
18728
18726
|
}
|
|
18729
18727
|
function L() {
|
|
@@ -19011,7 +19009,7 @@ function Vw(e) {
|
|
|
19011
19009
|
hardBreakTrailing: l(A),
|
|
19012
19010
|
htmlFlow: l(_),
|
|
19013
19011
|
htmlFlowData: L,
|
|
19014
|
-
htmlText: l(
|
|
19012
|
+
htmlText: l(T),
|
|
19015
19013
|
htmlTextData: L,
|
|
19016
19014
|
image: l(W),
|
|
19017
19015
|
label: ne,
|
|
@@ -19027,7 +19025,7 @@ function Vw(e) {
|
|
|
19027
19025
|
resourceTitleString: z,
|
|
19028
19026
|
resource: re,
|
|
19029
19027
|
setextHeading: l(I),
|
|
19030
|
-
setextHeadingLineSequence:
|
|
19028
|
+
setextHeadingLineSequence: S,
|
|
19031
19029
|
setextHeadingText: C,
|
|
19032
19030
|
strong: l(),
|
|
19033
19031
|
thematicBreak: l()
|
|
@@ -19243,7 +19241,7 @@ function Vw(e) {
|
|
|
19243
19241
|
function C() {
|
|
19244
19242
|
this.data.setextHeadingSlurpLineEnding = !0;
|
|
19245
19243
|
}
|
|
19246
|
-
function
|
|
19244
|
+
function S(K) {
|
|
19247
19245
|
const se = this.stack[this.stack.length - 1];
|
|
19248
19246
|
se.depth = this.sliceSerialize(K).codePointAt(0) === 61 ? 1 : 2;
|
|
19249
19247
|
}
|
|
@@ -19279,7 +19277,7 @@ function Vw(e) {
|
|
|
19279
19277
|
const K = this.resume(), se = this.stack[this.stack.length - 1];
|
|
19280
19278
|
se.value = K;
|
|
19281
19279
|
}
|
|
19282
|
-
function
|
|
19280
|
+
function T() {
|
|
19283
19281
|
const K = this.resume(), se = this.stack[this.stack.length - 1];
|
|
19284
19282
|
se.value = K;
|
|
19285
19283
|
}
|
|
@@ -19649,7 +19647,7 @@ const Yw = function(t) {
|
|
|
19649
19647
|
}, Gw = (e, t = (n) => {
|
|
19650
19648
|
}) => {
|
|
19651
19649
|
ID().use(Zw).use(Yw).process(e).then((n) => {
|
|
19652
|
-
const r =
|
|
19650
|
+
const r = An(n.result), i = (s) => {
|
|
19653
19651
|
const o = s;
|
|
19654
19652
|
[Z.li, Z.blockquote].includes(o.type) && o.children.map((l, u) => {
|
|
19655
19653
|
const d = l;
|
|
@@ -20063,8 +20061,8 @@ const iC = ({
|
|
|
20063
20061
|
P ? C = P : C = (v = D == null ? void 0 : D.parentElement) == null ? void 0 : v.lastElementChild;
|
|
20064
20062
|
} else
|
|
20065
20063
|
C || (C = (w = D == null ? void 0 : D.parentElement) == null ? void 0 : w.firstElementChild);
|
|
20066
|
-
const
|
|
20067
|
-
|
|
20064
|
+
const S = C == null ? void 0 : C.className.split(" ")[0];
|
|
20065
|
+
S && (m(S), (E = C == null ? void 0 : C.querySelector("button")) == null || E.focus());
|
|
20068
20066
|
break;
|
|
20069
20067
|
default:
|
|
20070
20068
|
const I = b.currentTarget.closest("fieldset");
|
|
@@ -20248,8 +20246,8 @@ const lC = () => {
|
|
|
20248
20246
|
};
|
|
20249
20247
|
switch (v.push({ className: D }), D) {
|
|
20250
20248
|
case "open":
|
|
20251
|
-
C.href = (d == null ? void 0 : d.full) || "", C.onClick = (
|
|
20252
|
-
|
|
20249
|
+
C.href = (d == null ? void 0 : d.full) || "", C.onClick = (S) => {
|
|
20250
|
+
S.preventDefault(), S.stopPropagation(), window.open((d == null ? void 0 : d.full) || "", "_blank"), s([{ type: "showLinkEditor", value: !1 }]);
|
|
20253
20251
|
}, C.children = /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
20254
20252
|
C.children,
|
|
20255
20253
|
/* @__PURE__ */ c.jsx(He, { children: e.formatMessage({ id: `${t}${D}_text` }) })
|
|
@@ -20262,10 +20260,10 @@ const lC = () => {
|
|
|
20262
20260
|
break;
|
|
20263
20261
|
case "remove":
|
|
20264
20262
|
C.onClick = () => {
|
|
20265
|
-
const
|
|
20263
|
+
const S = [
|
|
20266
20264
|
{ type: "showLinkEditor", value: !1 }
|
|
20267
20265
|
];
|
|
20268
|
-
Rr(u) && (zf(u),
|
|
20266
|
+
Rr(u) && (zf(u), S.push({ type: "lastAnchor", value: null }), a && (d == null ? void 0 : d.full) === (a == null ? void 0 : a.url) && S.push({ type: "enrichedUrl", value: !1 })), s(S);
|
|
20269
20267
|
};
|
|
20270
20268
|
break;
|
|
20271
20269
|
}
|
|
@@ -20332,7 +20330,7 @@ const lC = () => {
|
|
|
20332
20330
|
}
|
|
20333
20331
|
},
|
|
20334
20332
|
children: p ? /* @__PURE__ */ c.jsx(Yr, { wrappers: v, buttons: w }) : /* @__PURE__ */ c.jsx(
|
|
20335
|
-
|
|
20333
|
+
Ln,
|
|
20336
20334
|
{
|
|
20337
20335
|
element: "fieldset",
|
|
20338
20336
|
id: `${n}-link-editor`,
|
|
@@ -20344,13 +20342,13 @@ const lC = () => {
|
|
|
20344
20342
|
const C = [
|
|
20345
20343
|
{ type: "showLinkEditor", value: !1 }
|
|
20346
20344
|
];
|
|
20347
|
-
let
|
|
20345
|
+
let S = D.url;
|
|
20348
20346
|
if (D.url) {
|
|
20349
20347
|
const { full: I } = Hc(D.url);
|
|
20350
|
-
|
|
20348
|
+
S = I, d != null && d.full ? uC(u, S, n, l) : oC(u, S, n, l), C.push({ type: "lastAnchor", value: null });
|
|
20351
20349
|
}
|
|
20352
20350
|
if (s(C), D.url && o && (!m || a && (d == null ? void 0 : d.full) === a.url)) {
|
|
20353
|
-
const I = await o(
|
|
20351
|
+
const I = await o(S);
|
|
20354
20352
|
I.url && s([{ type: "enrichedUrl", value: I }]);
|
|
20355
20353
|
}
|
|
20356
20354
|
});
|
|
@@ -20460,7 +20458,7 @@ function DC(e) {
|
|
|
20460
20458
|
var n = t[1];
|
|
20461
20459
|
return n ? !!(bC.test(n) || yC.test(n)) : !1;
|
|
20462
20460
|
}
|
|
20463
|
-
const xC = /* @__PURE__ */
|
|
20461
|
+
const xC = /* @__PURE__ */ Mn(gC), wC = (e, t, n) => {
|
|
20464
20462
|
const { insertText: r, isInline: i } = e;
|
|
20465
20463
|
try {
|
|
20466
20464
|
e.isInline = (a) => {
|
|
@@ -20552,14 +20550,14 @@ const _C = ({
|
|
|
20552
20550
|
enrichedUrl: !1
|
|
20553
20551
|
}, [B, D] = hr(aa, E), {
|
|
20554
20552
|
editorKey: C,
|
|
20555
|
-
originalValue:
|
|
20553
|
+
originalValue: S,
|
|
20556
20554
|
initialValue: I,
|
|
20557
20555
|
stringValue: P,
|
|
20558
20556
|
lastAnchor: L,
|
|
20559
20557
|
lastKey: $,
|
|
20560
20558
|
hasInteracted: A,
|
|
20561
20559
|
hasLoaded: _,
|
|
20562
|
-
enrichedUrl:
|
|
20560
|
+
enrichedUrl: T,
|
|
20563
20561
|
mentionPopover: j
|
|
20564
20562
|
} = B, H = (k) => {
|
|
20565
20563
|
k && D([{ type: "tabbableOption", value: k || Gi[0] }]);
|
|
@@ -20604,8 +20602,8 @@ const _C = ({
|
|
|
20604
20602
|
re(ie);
|
|
20605
20603
|
}
|
|
20606
20604
|
}, [z.children.length, I]), de(() => {
|
|
20607
|
-
|
|
20608
|
-
let N =
|
|
20605
|
+
S && (async () => {
|
|
20606
|
+
let N = An(S);
|
|
20609
20607
|
if (N.includes("<")) {
|
|
20610
20608
|
zr.prototype.escape = (q) => q;
|
|
20611
20609
|
const O = new zr();
|
|
@@ -20624,33 +20622,33 @@ const _C = ({
|
|
|
20624
20622
|
})), Gw(N, (O) => {
|
|
20625
20623
|
const q = [
|
|
20626
20624
|
{ type: "initialValue", value: O },
|
|
20627
|
-
{ type: "editorKey", value:
|
|
20625
|
+
{ type: "editorKey", value: S.toString() }
|
|
20628
20626
|
];
|
|
20629
20627
|
o != null && o.link && (q.push({ type: "enrichedUrl", value: o.link }), o.link.url && W(o.link.url)), D(q), setTimeout(() => {
|
|
20630
20628
|
D([{ type: "stringValue", value: vc(z) }]);
|
|
20631
20629
|
}, 150);
|
|
20632
20630
|
});
|
|
20633
20631
|
})();
|
|
20634
|
-
}, [
|
|
20635
|
-
if (
|
|
20632
|
+
}, [S]), de(() => {
|
|
20633
|
+
if (T === void 0 && z) {
|
|
20636
20634
|
const N = Xw(z);
|
|
20637
20635
|
N && W(N);
|
|
20638
20636
|
}
|
|
20639
20637
|
const k = (N) => {
|
|
20640
20638
|
var J;
|
|
20641
20639
|
const O = N, q = ((J = O == null ? void 0 : O.detail) == null ? void 0 : J.url) || null;
|
|
20642
|
-
q &&
|
|
20640
|
+
q && T && T.url === q && D([{ type: "enrichedUrl", value: void 0 }]);
|
|
20643
20641
|
};
|
|
20644
20642
|
return window.addEventListener("linkRemoved", k), () => {
|
|
20645
20643
|
window.removeEventListener("linkRemoved", k);
|
|
20646
20644
|
};
|
|
20647
|
-
}, [
|
|
20645
|
+
}, [T]), de(() => {
|
|
20648
20646
|
if (t) {
|
|
20649
20647
|
Ni.lastIndex = 0;
|
|
20650
20648
|
const k = t.match(Ni);
|
|
20651
20649
|
k && k.length === 1 && k[0].length === t.length && !A && D([{ type: "originalValue", value: t }]);
|
|
20652
20650
|
}
|
|
20653
|
-
t !== "" || !z || bs(
|
|
20651
|
+
t !== "" || !z || bs(S, t) && !A || (y.withoutNormalizing(z, () => {
|
|
20654
20652
|
Q.delete(z, {
|
|
20655
20653
|
at: {
|
|
20656
20654
|
anchor: y.start(z, []),
|
|
@@ -20663,7 +20661,7 @@ const _C = ({
|
|
|
20663
20661
|
{ type: "enrichedUrl", value: !1 }
|
|
20664
20662
|
]));
|
|
20665
20663
|
}, [t]), de(() => {
|
|
20666
|
-
P === "" &&
|
|
20664
|
+
P === "" && T && D([{ type: "enrichedUrl", value: void 0 }]);
|
|
20667
20665
|
}, [P]);
|
|
20668
20666
|
const F = Rc(() => {
|
|
20669
20667
|
tC({
|
|
@@ -20795,10 +20793,10 @@ const _C = ({
|
|
|
20795
20793
|
}
|
|
20796
20794
|
}
|
|
20797
20795
|
),
|
|
20798
|
-
|
|
20796
|
+
T ? /* @__PURE__ */ c.jsx(
|
|
20799
20797
|
Op,
|
|
20800
20798
|
{
|
|
20801
|
-
data:
|
|
20799
|
+
data: T,
|
|
20802
20800
|
variant: "condensed",
|
|
20803
20801
|
onClick: () => {
|
|
20804
20802
|
D([{ type: "enrichedUrl", value: !1 }]);
|
|
@@ -20814,7 +20812,7 @@ const _C = ({
|
|
|
20814
20812
|
"aria-label": u.formatMessage(
|
|
20815
20813
|
{ id: "richTextEditor_link_enrichedUrl_aria" },
|
|
20816
20814
|
{
|
|
20817
|
-
title:
|
|
20815
|
+
title: T.title || u.formatMessage({
|
|
20818
20816
|
id: "richTextEditor_link_enrichedUrl_aria_fallback"
|
|
20819
20817
|
})
|
|
20820
20818
|
}
|
|
@@ -20913,11 +20911,11 @@ function kC({
|
|
|
20913
20911
|
const D = B.target.files && B.target.files[0];
|
|
20914
20912
|
if (!D || !t)
|
|
20915
20913
|
throw m(!1), new Error("Image file or userID is missing");
|
|
20916
|
-
const C = await i({ fileObject: D, userId: t }),
|
|
20914
|
+
const C = await i({ fileObject: D, userId: t }), S = {
|
|
20917
20915
|
thumbnail: C.thumbnailURL,
|
|
20918
20916
|
full: C.originalURL
|
|
20919
20917
|
};
|
|
20920
|
-
d(
|
|
20918
|
+
d(S), s(S);
|
|
20921
20919
|
} catch {
|
|
20922
20920
|
g(!0);
|
|
20923
20921
|
} finally {
|
|
@@ -20931,7 +20929,7 @@ function kC({
|
|
|
20931
20929
|
} = (a == null ? void 0 : a.text) || {};
|
|
20932
20930
|
return /* @__PURE__ */ c.jsxs("div", { className: V("profile-image-change-figure", e), children: [
|
|
20933
20931
|
/* @__PURE__ */ c.jsx(
|
|
20934
|
-
|
|
20932
|
+
In,
|
|
20935
20933
|
{
|
|
20936
20934
|
className: "profile-image-change-picture",
|
|
20937
20935
|
name: n,
|
|
@@ -20976,7 +20974,7 @@ const FC = ({
|
|
|
20976
20974
|
}) => {
|
|
20977
20975
|
const { context: r = "FooterContactUsForm", event: i = "contact-form-submit-click" } = e || {};
|
|
20978
20976
|
return /* @__PURE__ */ c.jsx(
|
|
20979
|
-
|
|
20977
|
+
Ln,
|
|
20980
20978
|
{
|
|
20981
20979
|
id: "contact-us-form",
|
|
20982
20980
|
fields: [
|
|
@@ -21021,74 +21019,73 @@ const FC = ({
|
|
|
21021
21019
|
const AC = ({
|
|
21022
21020
|
title: e,
|
|
21023
21021
|
label: t,
|
|
21024
|
-
|
|
21025
|
-
|
|
21026
|
-
|
|
21027
|
-
|
|
21028
|
-
|
|
21029
|
-
|
|
21030
|
-
|
|
21031
|
-
|
|
21032
|
-
initialFormStatus: d = "NOT_SUBMITTED"
|
|
21022
|
+
ctaMessage: n,
|
|
21023
|
+
titleColor: r,
|
|
21024
|
+
labelColor: i,
|
|
21025
|
+
backgroundColor: a,
|
|
21026
|
+
onClose: s,
|
|
21027
|
+
reportError: o,
|
|
21028
|
+
sendInvites: l,
|
|
21029
|
+
initialFormStatus: u = "NOT_SUBMITTED"
|
|
21033
21030
|
/* NOT_SUBMITTED */
|
|
21034
21031
|
}) => {
|
|
21035
|
-
const [
|
|
21036
|
-
|
|
21032
|
+
const [d, h] = ue([]), [m, p] = ue(!0), [g, f] = ue(u), { formatMessage: b } = le(), v = async (B) => {
|
|
21033
|
+
B.preventDefault();
|
|
21037
21034
|
try {
|
|
21038
|
-
await
|
|
21035
|
+
await l(d), h([]), f(
|
|
21039
21036
|
"SUCCESS"
|
|
21040
21037
|
/* SUCCESS */
|
|
21041
21038
|
);
|
|
21042
|
-
} catch (
|
|
21043
|
-
|
|
21039
|
+
} catch (D) {
|
|
21040
|
+
f(
|
|
21044
21041
|
"ERROR"
|
|
21045
21042
|
/* ERROR */
|
|
21046
|
-
),
|
|
21043
|
+
), o(D);
|
|
21047
21044
|
}
|
|
21048
|
-
},
|
|
21049
|
-
|
|
21045
|
+
}, w = (B) => {
|
|
21046
|
+
B.preventDefault(), f(
|
|
21050
21047
|
"NOT_SUBMITTED"
|
|
21051
21048
|
/* NOT_SUBMITTED */
|
|
21052
|
-
),
|
|
21053
|
-
},
|
|
21054
|
-
|
|
21049
|
+
), p(!0), h([]);
|
|
21050
|
+
}, E = (B) => {
|
|
21051
|
+
B.preventDefault(), s(), f(
|
|
21055
21052
|
"CLOSED"
|
|
21056
21053
|
/* CLOSED */
|
|
21057
21054
|
);
|
|
21058
21055
|
};
|
|
21059
|
-
return
|
|
21060
|
-
/* @__PURE__ */ c.jsx("div", { className: "content centred", children:
|
|
21056
|
+
return g === "CLOSED" ? null : g === "ERROR" || g === "SUCCESS" ? /* @__PURE__ */ c.jsxs("div", { className: "invite-form-wrapper", children: [
|
|
21057
|
+
/* @__PURE__ */ c.jsx("div", { className: "content centred", children: g === "SUCCESS" ? /* @__PURE__ */ c.jsx("h2", { className: "success-title", children: b({ id: "inviteForm_success" }) }) : /* @__PURE__ */ c.jsxs("h2", { className: "error-title", children: [
|
|
21061
21058
|
" ",
|
|
21062
|
-
|
|
21059
|
+
b({ id: "inviteForm_error" })
|
|
21063
21060
|
] }) }),
|
|
21064
21061
|
/* @__PURE__ */ c.jsx(on, {}),
|
|
21065
|
-
/* @__PURE__ */ c.jsx("div", { className: "footer", children:
|
|
21066
|
-
/* @__PURE__ */ c.jsx(Te, { variant: "secondary", onClick:
|
|
21067
|
-
/* @__PURE__ */ c.jsx(Te, { onClick:
|
|
21068
|
-
] }) : /* @__PURE__ */ c.jsx(Te, { onClick:
|
|
21062
|
+
/* @__PURE__ */ c.jsx("div", { className: "footer", children: g === "SUCCESS" ? /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
21063
|
+
/* @__PURE__ */ c.jsx(Te, { variant: "secondary", onClick: w, children: b({ id: "inviteForm_ctaSendMoreInvites" }) }),
|
|
21064
|
+
/* @__PURE__ */ c.jsx(Te, { onClick: E, children: b({ id: "inviteForm_ctaDone" }) })
|
|
21065
|
+
] }) : /* @__PURE__ */ c.jsx(Te, { onClick: w, children: b({ id: "inviteForm_ctaTryAgain" }) }) })
|
|
21069
21066
|
] }) : /* @__PURE__ */ c.jsx("div", { className: "invite-form-wrapper", children: /* @__PURE__ */ c.jsxs(
|
|
21070
21067
|
"form",
|
|
21071
21068
|
{
|
|
21072
|
-
style: { backgroundColor:
|
|
21073
|
-
onSubmit:
|
|
21069
|
+
style: { backgroundColor: a },
|
|
21070
|
+
onSubmit: v,
|
|
21074
21071
|
className: V("invite-form gtm-trackable"),
|
|
21075
21072
|
children: [
|
|
21076
21073
|
/* @__PURE__ */ c.jsxs("fieldset", { className: "content", children: [
|
|
21077
|
-
/* @__PURE__ */ c.jsx("h2", { className: "title", style: { color:
|
|
21078
|
-
/* @__PURE__ */ c.jsx("label", { htmlFor: "email-input", className: "label", style: { color:
|
|
21074
|
+
/* @__PURE__ */ c.jsx("h2", { className: "title", style: { color: r }, children: e }),
|
|
21075
|
+
/* @__PURE__ */ c.jsx("label", { htmlFor: "email-input", className: "label", style: { color: i }, children: t }),
|
|
21079
21076
|
/* @__PURE__ */ c.jsx(
|
|
21080
21077
|
Eh,
|
|
21081
21078
|
{
|
|
21082
21079
|
id: "email-input",
|
|
21083
21080
|
inputClassName: "email-input input",
|
|
21084
|
-
placeholder:
|
|
21085
|
-
emails:
|
|
21086
|
-
onChange: (
|
|
21087
|
-
|
|
21081
|
+
placeholder: b({ id: "inviteForm_email_placeholder" }),
|
|
21082
|
+
emails: d,
|
|
21083
|
+
onChange: (B) => {
|
|
21084
|
+
h(B), p(!B.length);
|
|
21088
21085
|
},
|
|
21089
21086
|
autoFocus: !1,
|
|
21090
|
-
getLabel: (
|
|
21091
|
-
/* @__PURE__ */ c.jsx("div", { "data-tag-item": !0, children:
|
|
21087
|
+
getLabel: (B, D, C) => /* @__PURE__ */ c.jsxs("div", { className: "email text-medium", children: [
|
|
21088
|
+
/* @__PURE__ */ c.jsx("div", { "data-tag-item": !0, children: B }),
|
|
21092
21089
|
/* @__PURE__ */ c.jsx(
|
|
21093
21090
|
Te,
|
|
21094
21091
|
{
|
|
@@ -21096,39 +21093,18 @@ const AC = ({
|
|
|
21096
21093
|
size: "small",
|
|
21097
21094
|
icon: { icon: "close" },
|
|
21098
21095
|
onClick: () => {
|
|
21099
|
-
|
|
21096
|
+
C(D), p(!d.length);
|
|
21100
21097
|
},
|
|
21101
21098
|
className: "remove-email-button",
|
|
21102
|
-
screenreaderText:
|
|
21099
|
+
screenreaderText: b({ id: "overlay_close" })
|
|
21103
21100
|
}
|
|
21104
21101
|
)
|
|
21105
|
-
] },
|
|
21102
|
+
] }, D)
|
|
21106
21103
|
}
|
|
21107
21104
|
)
|
|
21108
21105
|
] }),
|
|
21109
|
-
/* @__PURE__ */ c.jsx(
|
|
21110
|
-
wn,
|
|
21111
|
-
{
|
|
21112
|
-
id: "invite-form-message",
|
|
21113
|
-
fields: [
|
|
21114
|
-
{
|
|
21115
|
-
id: "message",
|
|
21116
|
-
type: "textarea",
|
|
21117
|
-
label: E({ id: "inviteForm_message_label" }),
|
|
21118
|
-
placeholder: n || E({ id: "inviteForm_message_placeholder" }),
|
|
21119
|
-
functions: {
|
|
21120
|
-
onChange: (T) => g(T)
|
|
21121
|
-
}
|
|
21122
|
-
}
|
|
21123
|
-
],
|
|
21124
|
-
functions: {},
|
|
21125
|
-
button: {
|
|
21126
|
-
hideButton: !0
|
|
21127
|
-
}
|
|
21128
|
-
}
|
|
21129
|
-
),
|
|
21130
21106
|
/* @__PURE__ */ c.jsx(on, {}),
|
|
21131
|
-
/* @__PURE__ */ c.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ c.jsx(Te, { className: "sendEmailsButton", disabled:
|
|
21107
|
+
/* @__PURE__ */ c.jsx("fieldset", { className: "footer", children: /* @__PURE__ */ c.jsx(Te, { className: "sendEmailsButton", disabled: m, children: n }) })
|
|
21132
21108
|
]
|
|
21133
21109
|
}
|
|
21134
21110
|
) });
|
|
@@ -21198,8 +21174,8 @@ const AC = ({
|
|
|
21198
21174
|
...t
|
|
21199
21175
|
};
|
|
21200
21176
|
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
21201
|
-
/* @__PURE__ */ c.jsx(
|
|
21202
|
-
r && /* @__PURE__ */ c.jsx(
|
|
21177
|
+
/* @__PURE__ */ c.jsx(Ln, { ...m }),
|
|
21178
|
+
r && /* @__PURE__ */ c.jsx($n, { variant: "error", text: r })
|
|
21203
21179
|
] });
|
|
21204
21180
|
};
|
|
21205
21181
|
const BC = ({ hooks: e, functions: t, meta: n = {}, gtm: r }) => {
|
|
@@ -21214,7 +21190,7 @@ const BC = ({ hooks: e, functions: t, meta: n = {}, gtm: r }) => {
|
|
|
21214
21190
|
}
|
|
21215
21191
|
} = t, { buildLocation: f, isValidPlace: b, predictPlaces: v } = e.useMaps(), { context: w = "ProfileForm", event: E = "profile-form-submit-click" } = r || {};
|
|
21216
21192
|
return /* @__PURE__ */ c.jsx(
|
|
21217
|
-
|
|
21193
|
+
Ln,
|
|
21218
21194
|
{
|
|
21219
21195
|
id: "profile-details-form",
|
|
21220
21196
|
fields: [
|
|
@@ -21306,12 +21282,12 @@ const BC = ({ hooks: e, functions: t, meta: n = {}, gtm: r }) => {
|
|
|
21306
21282
|
functions: {
|
|
21307
21283
|
onSuccess: async (C) => {
|
|
21308
21284
|
try {
|
|
21309
|
-
const
|
|
21285
|
+
const S = {
|
|
21310
21286
|
...C,
|
|
21311
21287
|
image: o || null,
|
|
21312
21288
|
location: u ? await f(C == null ? void 0 : C.location) : s.location
|
|
21313
21289
|
};
|
|
21314
|
-
s.updateDetails && s.updateDetails((I) => ({ ...I, ...
|
|
21290
|
+
s.updateDetails && s.updateDetails((I) => ({ ...I, ...S })), await m(S);
|
|
21315
21291
|
} catch {
|
|
21316
21292
|
g();
|
|
21317
21293
|
}
|
|
@@ -21696,7 +21672,7 @@ const NC = {
|
|
|
21696
21672
|
shouldDisableButton: B,
|
|
21697
21673
|
showSuccessMessage: D,
|
|
21698
21674
|
showError: C
|
|
21699
|
-
} = f, [
|
|
21675
|
+
} = f, [S, I] = Oc([
|
|
21700
21676
|
"signup-this-session",
|
|
21701
21677
|
"functional-cookie-consent"
|
|
21702
21678
|
]), P = {
|
|
@@ -21711,9 +21687,9 @@ const NC = {
|
|
|
21711
21687
|
de(() => {
|
|
21712
21688
|
E === !0 && P.jobTitle.current && P.jobTitle.current.focus();
|
|
21713
21689
|
}, [E]), de(() => {
|
|
21714
|
-
|
|
21715
|
-
}, [
|
|
21716
|
-
D &&
|
|
21690
|
+
S["signup-this-session"] && b([{ type: "showSuccessMessage", value: !0 }]);
|
|
21691
|
+
}, [S]), de(() => {
|
|
21692
|
+
D && S["functional-cookie-consent"] && I("signup-this-session", "true", {
|
|
21717
21693
|
path: "/",
|
|
21718
21694
|
maxAge: 3600
|
|
21719
21695
|
});
|
|
@@ -21737,14 +21713,14 @@ const NC = {
|
|
|
21737
21713
|
children: [
|
|
21738
21714
|
g.title && /* @__PURE__ */ c.jsx("p", { className: "signup-title", children: /* @__PURE__ */ c.jsx(ht, { id: "signup_title" }) }),
|
|
21739
21715
|
C && /* @__PURE__ */ c.jsx(
|
|
21740
|
-
|
|
21716
|
+
$n,
|
|
21741
21717
|
{
|
|
21742
21718
|
variant: "error",
|
|
21743
21719
|
text: l.formatMessage({ id: "signup_error" })
|
|
21744
21720
|
}
|
|
21745
21721
|
),
|
|
21746
21722
|
/* @__PURE__ */ c.jsx(
|
|
21747
|
-
|
|
21723
|
+
Ln,
|
|
21748
21724
|
{
|
|
21749
21725
|
className: "signup-form",
|
|
21750
21726
|
formRef: P.form,
|
|
@@ -21917,7 +21893,7 @@ const MC = ({
|
|
|
21917
21893
|
functions: { onClose: p },
|
|
21918
21894
|
className: V("edit-section-modal"),
|
|
21919
21895
|
children: b || (n ? /* @__PURE__ */ c.jsx(
|
|
21920
|
-
|
|
21896
|
+
Ln,
|
|
21921
21897
|
{
|
|
21922
21898
|
...n,
|
|
21923
21899
|
fields: n.fields,
|
|
@@ -22049,7 +22025,7 @@ const as = "contactFooter_", ek = ({ onSuccess: e = async () => {
|
|
|
22049
22025
|
children: [
|
|
22050
22026
|
/* @__PURE__ */ c.jsxs("aside", { children: [
|
|
22051
22027
|
/* @__PURE__ */ c.jsx("p", { children: /* @__PURE__ */ c.jsx(ht, { id: `${as}text` }) }),
|
|
22052
|
-
/* @__PURE__ */ c.jsx(
|
|
22028
|
+
/* @__PURE__ */ c.jsx(Rn, { className: "mailto-link", href: "mailto:hello@apolitical.co", children: /* @__PURE__ */ c.jsx(ht, { id: `${as}email` }) })
|
|
22053
22029
|
] }),
|
|
22054
22030
|
/* @__PURE__ */ c.jsx(
|
|
22055
22031
|
FC,
|
|
@@ -22890,7 +22866,7 @@ const Vf = ({ showNavigation: e = !0 }) => {
|
|
|
22890
22866
|
] ? "hide" : "show"}`
|
|
22891
22867
|
}) }),
|
|
22892
22868
|
/* @__PURE__ */ c.jsx(
|
|
22893
|
-
|
|
22869
|
+
In,
|
|
22894
22870
|
{
|
|
22895
22871
|
name: n && n.name || "",
|
|
22896
22872
|
src: n && n.image && n.image.thumbnail || ""
|
|
@@ -22925,7 +22901,7 @@ const IC = () => {
|
|
|
22925
22901
|
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
22926
22902
|
/* @__PURE__ */ c.jsx(Vf, {}),
|
|
22927
22903
|
/* @__PURE__ */ c.jsx("div", { id: "content", children: /* @__PURE__ */ c.jsx(
|
|
22928
|
-
|
|
22904
|
+
$n,
|
|
22929
22905
|
{
|
|
22930
22906
|
variant: "error",
|
|
22931
22907
|
text: e.formatMessage({ id: "pageLayout_error" })
|
|
@@ -22949,9 +22925,9 @@ const IC = () => {
|
|
|
22949
22925
|
modal: p = "default"
|
|
22950
22926
|
} = a, g = Th(), [f, b] = ue(""), v = (C) => {
|
|
22951
22927
|
const {
|
|
22952
|
-
detail: { message:
|
|
22928
|
+
detail: { message: S }
|
|
22953
22929
|
} = C;
|
|
22954
|
-
b(
|
|
22930
|
+
b(S);
|
|
22955
22931
|
};
|
|
22956
22932
|
de(() => (window.scrollTo(0, 0), document.addEventListener("ariaLive", v), () => {
|
|
22957
22933
|
document.removeEventListener("ariaLive", v);
|
|
@@ -23116,7 +23092,7 @@ const qC = 25, WC = ({
|
|
|
23116
23092
|
}
|
|
23117
23093
|
),
|
|
23118
23094
|
/* @__PURE__ */ c.jsx(
|
|
23119
|
-
|
|
23095
|
+
Rn,
|
|
23120
23096
|
{
|
|
23121
23097
|
href: "/profiles/me",
|
|
23122
23098
|
className: "text-small",
|
|
@@ -23273,7 +23249,7 @@ const nt = "discussion_form_", ma = ({
|
|
|
23273
23249
|
isAutoFocused: B = !1,
|
|
23274
23250
|
isEditing: D = !1,
|
|
23275
23251
|
hasTitleField: C = !1,
|
|
23276
|
-
isPrepopulated:
|
|
23252
|
+
isPrepopulated: S = !1,
|
|
23277
23253
|
showTitle: I = !1,
|
|
23278
23254
|
showGuidelines: P = !0,
|
|
23279
23255
|
showDivider: L = !1,
|
|
@@ -23281,7 +23257,7 @@ const nt = "discussion_form_", ma = ({
|
|
|
23281
23257
|
showPostType: A = !1,
|
|
23282
23258
|
postCategories: _ = []
|
|
23283
23259
|
} = i || {}, {
|
|
23284
|
-
onChange:
|
|
23260
|
+
onChange: T = () => {
|
|
23285
23261
|
},
|
|
23286
23262
|
create: j = () => {
|
|
23287
23263
|
},
|
|
@@ -23301,12 +23277,12 @@ const nt = "discussion_form_", ma = ({
|
|
|
23301
23277
|
}
|
|
23302
23278
|
} = d, [F, k] = ue({
|
|
23303
23279
|
title: C && C.text || "",
|
|
23304
|
-
body: D && D.text ||
|
|
23280
|
+
body: D && D.text || S && S.text || "",
|
|
23305
23281
|
categories: D ? D.categories : ""
|
|
23306
23282
|
}), [N, O] = ue(l.error || !1), [q, J] = ue(!1);
|
|
23307
23283
|
if (de(() => {
|
|
23308
|
-
u && !D &&
|
|
23309
|
-
}, [
|
|
23284
|
+
u && !D && S && S !== F.body && k({ ...F, body: S.text || "" });
|
|
23285
|
+
}, [S]), v)
|
|
23310
23286
|
return /* @__PURE__ */ c.jsx(
|
|
23311
23287
|
qt,
|
|
23312
23288
|
{
|
|
@@ -23315,7 +23291,7 @@ const nt = "discussion_form_", ma = ({
|
|
|
23315
23291
|
}
|
|
23316
23292
|
);
|
|
23317
23293
|
const U = (ge) => {
|
|
23318
|
-
k({ ...F, body: ge }),
|
|
23294
|
+
k({ ...F, body: ge }), T({ body: ge });
|
|
23319
23295
|
let Ae;
|
|
23320
23296
|
!g || !g.id ? Ae = $t(
|
|
23321
23297
|
p.formatMessage,
|
|
@@ -23450,7 +23426,7 @@ const nt = "discussion_form_", ma = ({
|
|
|
23450
23426
|
placeholder: p.formatMessage({ id: `${nt}titleField_placeholder` }),
|
|
23451
23427
|
functions: {
|
|
23452
23428
|
onChange: (ge) => {
|
|
23453
|
-
k({ ...F, title: ge }),
|
|
23429
|
+
k({ ...F, title: ge }), T({ title: ge });
|
|
23454
23430
|
}
|
|
23455
23431
|
},
|
|
23456
23432
|
validation: [
|
|
@@ -23481,14 +23457,14 @@ const nt = "discussion_form_", ma = ({
|
|
|
23481
23457
|
],
|
|
23482
23458
|
functions: {
|
|
23483
23459
|
onChange: (ge) => {
|
|
23484
|
-
k((Ae) => ({ ...Ae, categories: ge })),
|
|
23460
|
+
k((Ae) => ({ ...Ae, categories: ge })), T({ postType: ge });
|
|
23485
23461
|
}
|
|
23486
23462
|
}
|
|
23487
23463
|
});
|
|
23488
23464
|
let We = !g || !g.id || !r || Fe || Ne;
|
|
23489
23465
|
return D && (C ? We = We || F.body === D.text && F.title === C.text : We = We || F.body === D.text), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
23490
23466
|
/* @__PURE__ */ c.jsxs(
|
|
23491
|
-
|
|
23467
|
+
Ln,
|
|
23492
23468
|
{
|
|
23493
23469
|
id: X,
|
|
23494
23470
|
className: V("discussion-card discussion-form", {
|
|
@@ -23649,7 +23625,7 @@ const eE = ({
|
|
|
23649
23625
|
ignoreInteractions: B,
|
|
23650
23626
|
showLikers: D,
|
|
23651
23627
|
tabbableLink: C,
|
|
23652
|
-
showLikesModal:
|
|
23628
|
+
showLikesModal: S
|
|
23653
23629
|
} = b, I = QC(v);
|
|
23654
23630
|
de(() => {
|
|
23655
23631
|
v([{ type: "userLikedContent", value: i }]);
|
|
@@ -23657,8 +23633,8 @@ const eE = ({
|
|
|
23657
23633
|
const P = Yt(
|
|
23658
23634
|
() => GC(n, XC),
|
|
23659
23635
|
[n]
|
|
23660
|
-
), L = (
|
|
23661
|
-
if (
|
|
23636
|
+
), L = (T) => {
|
|
23637
|
+
if (T.preventDefault(), T.stopPropagation(), v([{ type: "showLikers", value: !1 }]), $r)
|
|
23662
23638
|
return cs(), !1;
|
|
23663
23639
|
if (cs(), B || !s)
|
|
23664
23640
|
return !1;
|
|
@@ -23666,10 +23642,10 @@ const eE = ({
|
|
|
23666
23642
|
}, $ = async () => {
|
|
23667
23643
|
if (cs(), B || !s)
|
|
23668
23644
|
return !1;
|
|
23669
|
-
let
|
|
23670
|
-
|
|
23645
|
+
let T = E ? w - 1 : w + 1;
|
|
23646
|
+
T < 0 && (T = 0), v([
|
|
23671
23647
|
{ type: "ignoreInteractions", value: !0 },
|
|
23672
|
-
{ type: "numberOfLikes", value:
|
|
23648
|
+
{ type: "numberOfLikes", value: T },
|
|
23673
23649
|
{ type: "userLikedContent", value: !E }
|
|
23674
23650
|
]);
|
|
23675
23651
|
try {
|
|
@@ -23699,8 +23675,8 @@ const eE = ({
|
|
|
23699
23675
|
e,
|
|
23700
23676
|
{
|
|
23701
23677
|
className: "likes-wrapper",
|
|
23702
|
-
onKeyDown: (
|
|
23703
|
-
|
|
23678
|
+
onKeyDown: (T) => {
|
|
23679
|
+
T.key === "Escape" && v([{ type: "showLikers", value: !1 }]);
|
|
23704
23680
|
},
|
|
23705
23681
|
onMouseEnter: () => {
|
|
23706
23682
|
_(), v([{ type: "showLikers", value: !0 }]);
|
|
@@ -23755,10 +23731,10 @@ const eE = ({
|
|
|
23755
23731
|
_();
|
|
23756
23732
|
},
|
|
23757
23733
|
onBlur: () => A,
|
|
23758
|
-
onClick: (
|
|
23734
|
+
onClick: (T) => {
|
|
23759
23735
|
var H;
|
|
23760
|
-
|
|
23761
|
-
const j = (H =
|
|
23736
|
+
T.preventDefault(), T.stopPropagation(), _(), v([{ type: "showLikers", value: !0 }]);
|
|
23737
|
+
const j = (H = T.currentTarget.nextSibling) == null ? void 0 : H.childNodes[0];
|
|
23762
23738
|
if (j) {
|
|
23763
23739
|
const W = j.querySelector(
|
|
23764
23740
|
"li:first-child a"
|
|
@@ -23768,8 +23744,8 @@ const eE = ({
|
|
|
23768
23744
|
}, 100));
|
|
23769
23745
|
}
|
|
23770
23746
|
},
|
|
23771
|
-
onKeyDown: (
|
|
23772
|
-
|
|
23747
|
+
onKeyDown: (T) => {
|
|
23748
|
+
T.key === "Escape" && (T.preventDefault(), T.stopPropagation(), A());
|
|
23773
23749
|
},
|
|
23774
23750
|
"aria-expanded": D,
|
|
23775
23751
|
"aria-controls": `likes-tooltip-${a.slug}`,
|
|
@@ -23786,22 +23762,22 @@ const eE = ({
|
|
|
23786
23762
|
isOpen: D,
|
|
23787
23763
|
isLoading: n.length === 0,
|
|
23788
23764
|
children: n.length && /* @__PURE__ */ c.jsxs("ul", { children: [
|
|
23789
|
-
P.map((
|
|
23790
|
-
if (typeof
|
|
23765
|
+
P.map((T, j) => {
|
|
23766
|
+
if (typeof T == "string")
|
|
23791
23767
|
return null;
|
|
23792
23768
|
const H = {};
|
|
23793
23769
|
return C !== j && (H.tabIndex = -1), /* @__PURE__ */ c.jsx("li", { "data-index": j, children: /* @__PURE__ */ c.jsx(
|
|
23794
|
-
|
|
23770
|
+
Rn,
|
|
23795
23771
|
{
|
|
23796
|
-
href:
|
|
23772
|
+
href: T.id ? `/profiles/${T.id}` : void 0,
|
|
23797
23773
|
gtmContext: "Likes",
|
|
23798
23774
|
gtmType: "liked-name-click",
|
|
23799
23775
|
onFocus: () => _(),
|
|
23800
23776
|
onKeyDown: I,
|
|
23801
23777
|
...H,
|
|
23802
|
-
children:
|
|
23778
|
+
children: T.name ? T.name : /* @__PURE__ */ c.jsx("span", { className: "deleted-user", children: g.formatMessage({ id: "member_deleted" }) })
|
|
23803
23779
|
}
|
|
23804
|
-
) },
|
|
23780
|
+
) }, T.id || window.btoa(T.name || ""));
|
|
23805
23781
|
}),
|
|
23806
23782
|
/* @__PURE__ */ c.jsx("li", { "data-index": P.length, className: "show-all", children: /* @__PURE__ */ c.jsx(
|
|
23807
23783
|
Te,
|
|
@@ -23817,14 +23793,14 @@ const eE = ({
|
|
|
23817
23793
|
] })
|
|
23818
23794
|
}
|
|
23819
23795
|
),
|
|
23820
|
-
|
|
23796
|
+
S && /* @__PURE__ */ c.jsx(Qr, { children: /* @__PURE__ */ c.jsx(Sc, { children: /* @__PURE__ */ c.jsx(
|
|
23821
23797
|
JC,
|
|
23822
23798
|
{
|
|
23823
23799
|
activityId: o,
|
|
23824
23800
|
basePath: l,
|
|
23825
23801
|
parentId: u,
|
|
23826
23802
|
likeCount: t,
|
|
23827
|
-
showModal:
|
|
23803
|
+
showModal: S,
|
|
23828
23804
|
functions: {
|
|
23829
23805
|
onClose: () => v([{ type: "showLikesModal", value: !1 }]),
|
|
23830
23806
|
likes: {
|
|
@@ -24484,7 +24460,7 @@ const rk = ({
|
|
|
24484
24460
|
fetchNextPage: w,
|
|
24485
24461
|
hasNextPage: E,
|
|
24486
24462
|
isLoading: B,
|
|
24487
|
-
mutations: { create: D, edit: C, remove:
|
|
24463
|
+
mutations: { create: D, edit: C, remove: S, like: I, unlike: P, pin: L, unpin: $ }
|
|
24488
24464
|
} = gE({
|
|
24489
24465
|
queryKey: [e, t, "activities", m],
|
|
24490
24466
|
queryFns: a,
|
|
@@ -24502,10 +24478,10 @@ const rk = ({
|
|
|
24502
24478
|
)
|
|
24503
24479
|
);
|
|
24504
24480
|
}, [i]);
|
|
24505
|
-
const [A, _] = ue(null),
|
|
24481
|
+
const [A, _] = ue(null), T = () => {
|
|
24506
24482
|
_(b.length), w();
|
|
24507
24483
|
};
|
|
24508
|
-
return Xf(), v ? /* @__PURE__ */ c.jsx(
|
|
24484
|
+
return Xf(), v ? /* @__PURE__ */ c.jsx($n, { variant: "error", text: v.message }) : /* @__PURE__ */ c.jsxs("section", { children: [
|
|
24509
24485
|
/* @__PURE__ */ c.jsx(
|
|
24510
24486
|
nh,
|
|
24511
24487
|
{
|
|
@@ -24596,7 +24572,7 @@ const rk = ({
|
|
|
24596
24572
|
name: (ve = (G = X == null ? void 0 : X.user) == null ? void 0 : G.data) == null ? void 0 : ve.name
|
|
24597
24573
|
};
|
|
24598
24574
|
}) : !1;
|
|
24599
|
-
return /* @__PURE__ */ c.jsx(Ir, { children: /* @__PURE__ */ c.jsx(
|
|
24575
|
+
return (j == null ? void 0 : j.verb) !== "post" ? /* @__PURE__ */ c.jsx(c.Fragment, { children: " " }) : /* @__PURE__ */ c.jsx(Ir, { children: /* @__PURE__ */ c.jsx(
|
|
24600
24576
|
pa,
|
|
24601
24577
|
{
|
|
24602
24578
|
content: {
|
|
@@ -24627,7 +24603,7 @@ const rk = ({
|
|
|
24627
24603
|
functions: {
|
|
24628
24604
|
content: {
|
|
24629
24605
|
createContent: () => null,
|
|
24630
|
-
deleteContent: () =>
|
|
24606
|
+
deleteContent: () => S({ activityId: W }),
|
|
24631
24607
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
24632
24608
|
updateContent: (X, { body: ce }) => C({ activityId: W, content: ce })
|
|
24633
24609
|
},
|
|
@@ -24673,7 +24649,7 @@ const rk = ({
|
|
|
24673
24649
|
sa,
|
|
24674
24650
|
{
|
|
24675
24651
|
hasNextPage: E,
|
|
24676
|
-
loadNextPage:
|
|
24652
|
+
loadNextPage: T,
|
|
24677
24653
|
icon: { icon: "arrow-down", position: "right" },
|
|
24678
24654
|
messages: {
|
|
24679
24655
|
button: h.formatMessage({ id: "loadMore_button" }),
|
|
@@ -25434,7 +25410,7 @@ const BE = ({
|
|
|
25434
25410
|
},
|
|
25435
25411
|
functions: {
|
|
25436
25412
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25437
|
-
create: (C, { body:
|
|
25413
|
+
create: (C, { body: S }) => g({ activityId: n, replyId: r, content: S }),
|
|
25438
25414
|
listMembers: s.listMembers,
|
|
25439
25415
|
clickMentionFallback: s.clickMentionFallback
|
|
25440
25416
|
},
|
|
@@ -25448,7 +25424,7 @@ const BE = ({
|
|
|
25448
25424
|
children: d && d.length > 0 ? d == null ? void 0 : d.map((C) => {
|
|
25449
25425
|
var ne, x, z, re, F, k, N;
|
|
25450
25426
|
const {
|
|
25451
|
-
id:
|
|
25427
|
+
id: S,
|
|
25452
25428
|
own_children: I,
|
|
25453
25429
|
latest_children: P,
|
|
25454
25430
|
children_counts: L,
|
|
@@ -25456,7 +25432,7 @@ const BE = ({
|
|
|
25456
25432
|
} = C, _ = (((ne = I == null ? void 0 : I.like) == null ? void 0 : ne.length) || 0) > 0 ? (x = I == null ? void 0 : I.like) == null ? void 0 : x.find((O) => {
|
|
25457
25433
|
var q;
|
|
25458
25434
|
return ((q = O == null ? void 0 : O.user) == null ? void 0 : q.id) === (E == null ? void 0 : E.id);
|
|
25459
|
-
}) : !1,
|
|
25435
|
+
}) : !1, T = _ ? _ == null ? void 0 : _.id : "", j = !!_, W = (((z = P == null ? void 0 : P.like) == null ? void 0 : z.length) || 0) > 0 ? (re = P == null ? void 0 : P.like) == null ? void 0 : re.map((O) => {
|
|
25460
25436
|
var q, J, U;
|
|
25461
25437
|
return {
|
|
25462
25438
|
id: (q = O == null ? void 0 : O.user) == null ? void 0 : q.id,
|
|
@@ -25471,7 +25447,7 @@ const BE = ({
|
|
|
25471
25447
|
{
|
|
25472
25448
|
isCommunity: !0,
|
|
25473
25449
|
content: {
|
|
25474
|
-
id:
|
|
25450
|
+
id: S,
|
|
25475
25451
|
type: "reply",
|
|
25476
25452
|
body: ie,
|
|
25477
25453
|
canLike: i,
|
|
@@ -25493,14 +25469,14 @@ const BE = ({
|
|
|
25493
25469
|
functions: {
|
|
25494
25470
|
content: {
|
|
25495
25471
|
createContent: () => null,
|
|
25496
|
-
deleteContent: () => v({ replyId:
|
|
25472
|
+
deleteContent: () => v({ replyId: S }),
|
|
25497
25473
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25498
|
-
updateContent: (O, { body: q }) => f({ replyId:
|
|
25474
|
+
updateContent: (O, { body: q }) => f({ replyId: S, content: q })
|
|
25499
25475
|
},
|
|
25500
25476
|
likes: {
|
|
25501
|
-
createLike: () => b({ replyId:
|
|
25502
|
-
deleteLike: () => w({ replyId:
|
|
25503
|
-
listLikes: (O) => o.list({ replyId:
|
|
25477
|
+
createLike: () => b({ replyId: S }),
|
|
25478
|
+
deleteLike: () => w({ replyId: S, reactionId: T }),
|
|
25479
|
+
listLikes: (O) => o.list({ replyId: S, ...O })
|
|
25504
25480
|
},
|
|
25505
25481
|
comments: {},
|
|
25506
25482
|
mentions: {
|
|
@@ -25525,7 +25501,7 @@ const BE = ({
|
|
|
25525
25501
|
basePath: e,
|
|
25526
25502
|
parentId: t
|
|
25527
25503
|
},
|
|
25528
|
-
|
|
25504
|
+
S
|
|
25529
25505
|
);
|
|
25530
25506
|
}) : null
|
|
25531
25507
|
}
|
|
@@ -25553,7 +25529,7 @@ const TE = ({
|
|
|
25553
25529
|
queryFns: u
|
|
25554
25530
|
}), C = () => {
|
|
25555
25531
|
I(m.length), p();
|
|
25556
|
-
}, [
|
|
25532
|
+
}, [S, I] = ue(null);
|
|
25557
25533
|
return Ic([f]), Xf(), /* @__PURE__ */ c.jsxs("section", { className: "replies-feed", children: [
|
|
25558
25534
|
/* @__PURE__ */ c.jsx(UE, { type: "comment", responses: r, isLoading: f }),
|
|
25559
25535
|
/* @__PURE__ */ c.jsx(
|
|
@@ -25590,7 +25566,7 @@ const TE = ({
|
|
|
25590
25566
|
id: $,
|
|
25591
25567
|
own_children: A,
|
|
25592
25568
|
latest_children: _,
|
|
25593
|
-
children_counts:
|
|
25569
|
+
children_counts: T,
|
|
25594
25570
|
data: { mentioned_users: j }
|
|
25595
25571
|
} = P, W = (((F = A == null ? void 0 : A.like) == null ? void 0 : F.length) || 0) > 0 ? (k = A == null ? void 0 : A.like) == null ? void 0 : k.find((X) => {
|
|
25596
25572
|
var ce;
|
|
@@ -25623,7 +25599,7 @@ const TE = ({
|
|
|
25623
25599
|
slug: $,
|
|
25624
25600
|
author: Xr(P == null ? void 0 : P.user),
|
|
25625
25601
|
userLiked: ne,
|
|
25626
|
-
likes: (
|
|
25602
|
+
likes: (T == null ? void 0 : T.like) || 0,
|
|
25627
25603
|
peopleWhoLiked: z,
|
|
25628
25604
|
mentions: j
|
|
25629
25605
|
},
|
|
@@ -25671,7 +25647,7 @@ const TE = ({
|
|
|
25671
25647
|
}
|
|
25672
25648
|
),
|
|
25673
25649
|
styling: { showShareLinkButton: !0 },
|
|
25674
|
-
setFocus: L ===
|
|
25650
|
+
setFocus: L === S,
|
|
25675
25651
|
basePath: e,
|
|
25676
25652
|
parentId: t
|
|
25677
25653
|
},
|
|
@@ -25894,7 +25870,7 @@ const pa = ({
|
|
|
25894
25870
|
parentId: B
|
|
25895
25871
|
}) => {
|
|
25896
25872
|
var Ae, je, K, se, pe, be, _e, Xe, et;
|
|
25897
|
-
const D = le(), C = Le(Dt),
|
|
25873
|
+
const D = le(), C = Le(Dt), S = Le(Po), {
|
|
25898
25874
|
createContent: I = async () => {
|
|
25899
25875
|
},
|
|
25900
25876
|
deleteContent: P = async () => {
|
|
@@ -25907,7 +25883,7 @@ const pa = ({
|
|
|
25907
25883
|
deleteLike: A = () => {
|
|
25908
25884
|
},
|
|
25909
25885
|
listLikes: _ = async () => ({})
|
|
25910
|
-
} = o.likes || {}, { openComments:
|
|
25886
|
+
} = o.likes || {}, { openComments: T = () => {
|
|
25911
25887
|
} } = o.comments || {}, { listMembers: j = () => Promise.resolve([]), clickMentionFallback: H = () => {
|
|
25912
25888
|
} } = o.mentions || {}, {
|
|
25913
25889
|
author: W,
|
|
@@ -25986,9 +25962,9 @@ const pa = ({
|
|
|
25986
25962
|
Ne(`${Ht}form_error`);
|
|
25987
25963
|
}
|
|
25988
25964
|
}, Qe = () => {
|
|
25989
|
-
if (
|
|
25965
|
+
if (S && S.updateConversation) {
|
|
25990
25966
|
const xe = { showForm: !0 }, Oe = t.author;
|
|
25991
|
-
Oe && Oe.id && (b && (xe.prepopulateForm = `@{{${Oe.id}}}`), xe.mentionData = { id: Oe.id, name: Oe.name }),
|
|
25967
|
+
Oe && Oe.id && (b && (xe.prepopulateForm = `@{{${Oe.id}}}`), xe.mentionData = { id: Oe.id, name: Oe.name }), S.updateConversation(xe);
|
|
25992
25968
|
}
|
|
25993
25969
|
setTimeout(() => {
|
|
25994
25970
|
var At, dt, Wn;
|
|
@@ -26215,7 +26191,7 @@ const pa = ({
|
|
|
26215
26191
|
ea,
|
|
26216
26192
|
{
|
|
26217
26193
|
onClick: (xe) => {
|
|
26218
|
-
xe.preventDefault(), xe.stopPropagation(), l.comments && (window.location.href = l.comments), typeof
|
|
26194
|
+
xe.preventDefault(), xe.stopPropagation(), l.comments && (window.location.href = l.comments), typeof T == "function" && T();
|
|
26219
26195
|
},
|
|
26220
26196
|
icon: { icon: "speech-bubble_square" },
|
|
26221
26197
|
"data-gtm-event-context": d,
|
|
@@ -26396,7 +26372,7 @@ const LE = fr(
|
|
|
26396
26372
|
},
|
|
26397
26373
|
"data-testid": "discussion-form-card",
|
|
26398
26374
|
children: [
|
|
26399
|
-
/* @__PURE__ */ c.jsx(
|
|
26375
|
+
/* @__PURE__ */ c.jsx(In, { name: l.name, src: l.image, alt: "" }),
|
|
26400
26376
|
/* @__PURE__ */ c.jsx(
|
|
26401
26377
|
sr,
|
|
26402
26378
|
{
|
|
@@ -26486,7 +26462,7 @@ const LE = fr(
|
|
|
26486
26462
|
}) => {
|
|
26487
26463
|
if (a && !i)
|
|
26488
26464
|
return /* @__PURE__ */ c.jsx(
|
|
26489
|
-
|
|
26465
|
+
$n,
|
|
26490
26466
|
{
|
|
26491
26467
|
text: l,
|
|
26492
26468
|
button: {
|
|
@@ -26755,19 +26731,19 @@ const ak = ({
|
|
|
26755
26731
|
return /* @__PURE__ */ c.jsx(qt, { style: { height: "400px" } });
|
|
26756
26732
|
if (b || !f)
|
|
26757
26733
|
return /* @__PURE__ */ c.jsx(
|
|
26758
|
-
|
|
26734
|
+
$n,
|
|
26759
26735
|
{
|
|
26760
26736
|
variant: "error",
|
|
26761
26737
|
text: g.formatMessage({ id: "activitySection_notFoundError" })
|
|
26762
26738
|
}
|
|
26763
26739
|
);
|
|
26764
|
-
const { own_reactions:
|
|
26740
|
+
const { own_reactions: S, latest_reactions: I, mentioned_users: P } = f, L = (((j = I == null ? void 0 : I.like) == null ? void 0 : j.length) || 0) > 0, $ = (((H = S == null ? void 0 : S.like) == null ? void 0 : H.length) || 0) > 0, A = $ ? S == null ? void 0 : S.like[0].id : "", _ = L ? (W = I == null ? void 0 : I.like) == null ? void 0 : W.map((z) => {
|
|
26765
26741
|
var re, F, k;
|
|
26766
26742
|
return {
|
|
26767
26743
|
id: (re = z == null ? void 0 : z.user) == null ? void 0 : re.id,
|
|
26768
26744
|
name: (k = (F = z == null ? void 0 : z.user) == null ? void 0 : F.data) == null ? void 0 : k.name
|
|
26769
26745
|
};
|
|
26770
|
-
}) : !1,
|
|
26746
|
+
}) : !1, T = f == null ? void 0 : f.actor;
|
|
26771
26747
|
return /* @__PURE__ */ c.jsxs("section", { className: "activity-section", children: [
|
|
26772
26748
|
/* @__PURE__ */ c.jsx(
|
|
26773
26749
|
pa,
|
|
@@ -26787,7 +26763,7 @@ const ak = ({
|
|
|
26787
26763
|
answer: f == null ? void 0 : f.id
|
|
26788
26764
|
},
|
|
26789
26765
|
slug: n,
|
|
26790
|
-
author: Xr(
|
|
26766
|
+
author: Xr(T),
|
|
26791
26767
|
userLiked: $,
|
|
26792
26768
|
likes: ((ie = f == null ? void 0 : f.reaction_counts) == null ? void 0 : ie.like) || 0,
|
|
26793
26769
|
comments: (f == null ? void 0 : f.total_replies) || 0,
|
|
@@ -26795,7 +26771,7 @@ const ak = ({
|
|
|
26795
26771
|
mentions: P,
|
|
26796
26772
|
pinned: ((ne = f == null ? void 0 : f.reaction_counts) == null ? void 0 : ne.pin) && ((x = f == null ? void 0 : f.reaction_counts) == null ? void 0 : x.pin) > 0 || !1
|
|
26797
26773
|
},
|
|
26798
|
-
originalAuthorId:
|
|
26774
|
+
originalAuthorId: T == null ? void 0 : T.id,
|
|
26799
26775
|
forceHide: { comments: !0 },
|
|
26800
26776
|
functions: {
|
|
26801
26777
|
content: {
|
|
@@ -26945,37 +26921,35 @@ const sk = ({
|
|
|
26945
26921
|
className: e,
|
|
26946
26922
|
showModal: t = !0,
|
|
26947
26923
|
title: n,
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26955
|
-
|
|
26956
|
-
sendInvites: d
|
|
26924
|
+
formTitle: r,
|
|
26925
|
+
formLabel: i,
|
|
26926
|
+
ctaMessage: a,
|
|
26927
|
+
showIcon: s,
|
|
26928
|
+
onClose: o,
|
|
26929
|
+
reportError: l = () => {
|
|
26930
|
+
},
|
|
26931
|
+
sendInvites: u
|
|
26957
26932
|
}) => {
|
|
26958
|
-
const
|
|
26959
|
-
return
|
|
26933
|
+
const d = le();
|
|
26934
|
+
return r || (r = d.formatMessage({ id: "inviteModal_formTitle" })), i || (i = d.formatMessage({ id: "inviteModal_formLabel" })), a || (a = d.formatMessage({ id: "inviteModal_cta" })), /* @__PURE__ */ c.jsx(
|
|
26960
26935
|
xn,
|
|
26961
26936
|
{
|
|
26962
26937
|
id: "invite-user-modal",
|
|
26963
26938
|
title: n,
|
|
26964
26939
|
isOpen: t,
|
|
26965
26940
|
showDivider: !1,
|
|
26966
|
-
showIcon:
|
|
26967
|
-
functions: { onClose:
|
|
26941
|
+
showIcon: s,
|
|
26942
|
+
functions: { onClose: o },
|
|
26968
26943
|
className: V("invite-modal", e, { success: !!n }),
|
|
26969
26944
|
children: /* @__PURE__ */ c.jsx(
|
|
26970
26945
|
AC,
|
|
26971
26946
|
{
|
|
26972
|
-
title:
|
|
26973
|
-
label:
|
|
26974
|
-
|
|
26975
|
-
|
|
26976
|
-
|
|
26977
|
-
|
|
26978
|
-
reportError: u
|
|
26947
|
+
title: r,
|
|
26948
|
+
label: i,
|
|
26949
|
+
ctaMessage: a,
|
|
26950
|
+
onClose: o,
|
|
26951
|
+
sendInvites: u,
|
|
26952
|
+
reportError: l
|
|
26979
26953
|
}
|
|
26980
26954
|
)
|
|
26981
26955
|
}
|
|
@@ -27043,7 +27017,7 @@ const ok = ({ members: e }) => {
|
|
|
27043
27017
|
const [t, n] = ue(!1), r = (i) => {
|
|
27044
27018
|
const { fullName: a, jobTitle: s, organisation: o, photo: l } = i || {};
|
|
27045
27019
|
return /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
27046
|
-
/* @__PURE__ */ c.jsx(
|
|
27020
|
+
/* @__PURE__ */ c.jsx(In, { name: a, src: l }),
|
|
27047
27021
|
/* @__PURE__ */ c.jsx("p", { children: a }),
|
|
27048
27022
|
/* @__PURE__ */ c.jsx("small", { className: "text-medium", children: o ? `${s}, ${o}` : s })
|
|
27049
27023
|
] });
|
|
@@ -27668,7 +27642,7 @@ const ih = ({
|
|
|
27668
27642
|
} = ia[v];
|
|
27669
27643
|
let C = f.slug ? `${w}${f.slug}` : !1;
|
|
27670
27644
|
f.slug && (f.slug.slice(0, 4) === "http" || f.slug.slice(0, 2) === "//" || f.slug.slice(0, 6) === "mailto" || f.slug.slice(0, 3) === "tel") && (C = f.slug);
|
|
27671
|
-
const
|
|
27645
|
+
const S = (_) => {
|
|
27672
27646
|
C && (_.preventDefault(), _.stopPropagation(), window.location.href = C);
|
|
27673
27647
|
}, I = { ...o_, ...B };
|
|
27674
27648
|
let P = { className: "card" }, L = {};
|
|
@@ -27679,7 +27653,7 @@ const ih = ({
|
|
|
27679
27653
|
"data-gtm-event-type": `${D}-click`,
|
|
27680
27654
|
"data-testid": "link"
|
|
27681
27655
|
}, f.openInNewTab && (L.target = "_blank"), P = {
|
|
27682
|
-
onClick:
|
|
27656
|
+
onClick: S,
|
|
27683
27657
|
className: "card gtm-trackable",
|
|
27684
27658
|
"data-gtm-event-context": `${s}-CarouselCard`,
|
|
27685
27659
|
"data-gtm-event-type": `${D}-click`
|
|
@@ -27719,7 +27693,7 @@ const ih = ({
|
|
|
27719
27693
|
f.registered && /* @__PURE__ */ c.jsx(an, { size: "small", variant: "registered", children: u.formatMessage({ id: "card_registered" }) }),
|
|
27720
27694
|
/* @__PURE__ */ c.jsx(Gr, { image: { ...f.banner, description: "" } })
|
|
27721
27695
|
] }) : E === "people" ? /* @__PURE__ */ c.jsx(
|
|
27722
|
-
|
|
27696
|
+
In,
|
|
27723
27697
|
{
|
|
27724
27698
|
name: f.title || "",
|
|
27725
27699
|
src: f.profile,
|
|
@@ -27745,8 +27719,8 @@ const ih = ({
|
|
|
27745
27719
|
) : ar(f.partner[0], I.partner) }),
|
|
27746
27720
|
/* Text */
|
|
27747
27721
|
["title", "text", "secondaryText"].map((_) => {
|
|
27748
|
-
const
|
|
27749
|
-
if (!
|
|
27722
|
+
const T = f[_];
|
|
27723
|
+
if (!T)
|
|
27750
27724
|
return null;
|
|
27751
27725
|
const j = jh(_), H = {
|
|
27752
27726
|
key: _,
|
|
@@ -27757,7 +27731,7 @@ const ih = ({
|
|
|
27757
27731
|
forceWrapper: !0,
|
|
27758
27732
|
forceInline: !0
|
|
27759
27733
|
}, ie = ar(
|
|
27760
|
-
|
|
27734
|
+
T,
|
|
27761
27735
|
I[_]
|
|
27762
27736
|
);
|
|
27763
27737
|
return ["title", "text"].includes(_) && C ? (W.wrapper = "a", /* @__PURE__ */ c.jsx("p", { ...H, children: /* @__PURE__ */ c.jsx(Gt, { options: W, ...L, children: ie }) })) : /* @__PURE__ */ c.jsx(Gt, { options: W, ...H, children: ie });
|
|
@@ -27836,37 +27810,37 @@ const h_ = ({
|
|
|
27836
27810
|
}), { cardsPerPage: m, isLoading: p } = d, [g, f] = ue({
|
|
27837
27811
|
currentPage: 0,
|
|
27838
27812
|
loadedPages: [0]
|
|
27839
|
-
}), { currentPage: b, loadedPages: v } = g, [w, E] = ue(""), B = t.length, D = Math.ceil(B / m), C = ke(null),
|
|
27813
|
+
}), { currentPage: b, loadedPages: v } = g, [w, E] = ue(""), B = t.length, D = Math.ceil(B / m), C = ke(null), S = mr(!0, !0, C == null ? void 0 : C.current);
|
|
27840
27814
|
de(() => {
|
|
27841
27815
|
let _ = 1;
|
|
27842
|
-
|
|
27843
|
-
...
|
|
27816
|
+
S && (S >= ps.fourCards ? _ = 4 : S >= ps.threeCards ? _ = 3 : S >= ps.twoCards && (_ = 2), _ > B && (_ = B)), h((T) => ({
|
|
27817
|
+
...T,
|
|
27844
27818
|
cardsPerPage: _,
|
|
27845
27819
|
isLoading: !1
|
|
27846
27820
|
}));
|
|
27847
|
-
}, [
|
|
27821
|
+
}, [S, B]);
|
|
27848
27822
|
const I = (_ = "next") => {
|
|
27849
27823
|
gs && clearTimeout(gs);
|
|
27850
|
-
let
|
|
27824
|
+
let T = b;
|
|
27851
27825
|
if (typeof _ == "string")
|
|
27852
27826
|
if (_ === "next")
|
|
27853
27827
|
if (b < D - 1)
|
|
27854
|
-
|
|
27828
|
+
T = b + 1;
|
|
27855
27829
|
else
|
|
27856
27830
|
return;
|
|
27857
27831
|
else if (b > 0)
|
|
27858
|
-
|
|
27832
|
+
T = b - 1;
|
|
27859
27833
|
else
|
|
27860
27834
|
return;
|
|
27861
27835
|
else
|
|
27862
|
-
|
|
27836
|
+
T = _;
|
|
27863
27837
|
E(""), f((H) => ({
|
|
27864
27838
|
...H,
|
|
27865
|
-
currentPage:
|
|
27866
|
-
loadedPages: [.../* @__PURE__ */ new Set([...v,
|
|
27839
|
+
currentPage: T,
|
|
27840
|
+
loadedPages: [.../* @__PURE__ */ new Set([...v, T])]
|
|
27867
27841
|
}));
|
|
27868
27842
|
const j = () => {
|
|
27869
|
-
const H =
|
|
27843
|
+
const H = T * d.cardsPerPage, W = H + d.cardsPerPage;
|
|
27870
27844
|
return t.slice(H, W).length;
|
|
27871
27845
|
};
|
|
27872
27846
|
gs = setTimeout(() => {
|
|
@@ -27890,20 +27864,20 @@ const h_ = ({
|
|
|
27890
27864
|
}, L = (_) => {
|
|
27891
27865
|
if (Ci === null)
|
|
27892
27866
|
return;
|
|
27893
|
-
const
|
|
27867
|
+
const T = _.touches[0].clientX, j = Ci - T;
|
|
27894
27868
|
j > 5 ? I("next") : j < -5 && I("previous"), Ci = null;
|
|
27895
27869
|
}, $ = {
|
|
27896
|
-
"--width": `${
|
|
27870
|
+
"--width": `${S || 0}px`,
|
|
27897
27871
|
"--total-cards": B,
|
|
27898
27872
|
"--cards-per-page": m,
|
|
27899
27873
|
"--page": b
|
|
27900
27874
|
};
|
|
27901
27875
|
if (p)
|
|
27902
27876
|
return /* @__PURE__ */ c.jsx(no, { layout: `carousel${i ? "-with-title" : ""}` });
|
|
27903
|
-
const A = (_,
|
|
27877
|
+
const A = (_, T) => {
|
|
27904
27878
|
var H;
|
|
27905
27879
|
let j = null;
|
|
27906
|
-
return (H = _ == null ? void 0 : _.sys) != null && H.id ? j = `card-${_.sys.id}` : _ != null && _.slug ? j = `card-${_.slug}` : [n[
|
|
27880
|
+
return (H = _ == null ? void 0 : _.sys) != null && H.id ? j = `card-${_.sys.id}` : _ != null && _.slug ? j = `card-${_.slug}` : [n[T], _.contentType].includes("customCard") && (j = `card-${window.btoa(`${_.title} ${_.createdAt}`)}-${T}`), j;
|
|
27907
27881
|
};
|
|
27908
27882
|
return /* @__PURE__ */ c.jsxs(
|
|
27909
27883
|
"section",
|
|
@@ -27921,19 +27895,19 @@ const h_ = ({
|
|
|
27921
27895
|
onTouchMove: L,
|
|
27922
27896
|
style: $,
|
|
27923
27897
|
"data-testid": "carousel-list",
|
|
27924
|
-
children: t.map((_,
|
|
27925
|
-
let j = A(_,
|
|
27926
|
-
return j && d_(
|
|
27898
|
+
children: t.map((_, T) => {
|
|
27899
|
+
let j = A(_, T);
|
|
27900
|
+
return j && d_(T, m, b, v) ? /* @__PURE__ */ c.jsx(
|
|
27927
27901
|
ih,
|
|
27928
27902
|
{
|
|
27929
27903
|
id: j,
|
|
27930
|
-
card: { ..._, contentType: n[
|
|
27904
|
+
card: { ..._, contentType: n[T] },
|
|
27931
27905
|
buildCardData: r,
|
|
27932
27906
|
gtmContext: s,
|
|
27933
27907
|
...o
|
|
27934
27908
|
},
|
|
27935
27909
|
j
|
|
27936
|
-
) : (j = j || `${e}-card-${
|
|
27910
|
+
) : (j = j || `${e}-card-${T}`, /* @__PURE__ */ c.jsx(
|
|
27937
27911
|
qt,
|
|
27938
27912
|
{
|
|
27939
27913
|
element: "li",
|
|
@@ -27962,7 +27936,7 @@ const h_ = ({
|
|
|
27962
27936
|
disabled: b <= 0
|
|
27963
27937
|
}
|
|
27964
27938
|
) }),
|
|
27965
|
-
[...Array(D)].map((_,
|
|
27939
|
+
[...Array(D)].map((_, T) => /* @__PURE__ */ c.jsx(
|
|
27966
27940
|
"li",
|
|
27967
27941
|
{
|
|
27968
27942
|
"data-testid": "carousel-controls-button",
|
|
@@ -27970,19 +27944,19 @@ const h_ = ({
|
|
|
27970
27944
|
"button",
|
|
27971
27945
|
{
|
|
27972
27946
|
className: V("page-indicator", {
|
|
27973
|
-
selected:
|
|
27947
|
+
selected: T === b
|
|
27974
27948
|
}),
|
|
27975
27949
|
onClick: (j) => {
|
|
27976
|
-
j.preventDefault(), j.stopPropagation(), I(
|
|
27950
|
+
j.preventDefault(), j.stopPropagation(), I(T);
|
|
27977
27951
|
},
|
|
27978
27952
|
children: /* @__PURE__ */ c.jsx(He, { showOnFocus: !1, children: l.formatMessage(
|
|
27979
27953
|
{ id: `${u}slide` },
|
|
27980
|
-
{ number:
|
|
27954
|
+
{ number: T + 1, total: D }
|
|
27981
27955
|
) })
|
|
27982
27956
|
}
|
|
27983
27957
|
)
|
|
27984
27958
|
},
|
|
27985
|
-
`page-indicator-${
|
|
27959
|
+
`page-indicator-${T}`
|
|
27986
27960
|
)),
|
|
27987
27961
|
/* @__PURE__ */ c.jsx("li", { className: "arrow next", children: /* @__PURE__ */ c.jsx(
|
|
27988
27962
|
Te,
|
|
@@ -28171,7 +28145,7 @@ const vk = ({
|
|
|
28171
28145
|
optional: B,
|
|
28172
28146
|
slug: D,
|
|
28173
28147
|
subsectionId: C,
|
|
28174
|
-
title:
|
|
28148
|
+
title: S,
|
|
28175
28149
|
type: I
|
|
28176
28150
|
}) => {
|
|
28177
28151
|
const P = i && t || E, L = {};
|
|
@@ -28187,12 +28161,12 @@ const vk = ({
|
|
|
28187
28161
|
}),
|
|
28188
28162
|
...L,
|
|
28189
28163
|
children: /* @__PURE__ */ c.jsx(
|
|
28190
|
-
|
|
28164
|
+
Rn,
|
|
28191
28165
|
{
|
|
28192
28166
|
href: P ? `/microcourses/en/${o}/${D}` : void 0,
|
|
28193
28167
|
fallbackElement: "span",
|
|
28194
28168
|
className: "inner",
|
|
28195
|
-
gtmContext: `MicrocourseOutline${Oh(
|
|
28169
|
+
gtmContext: `MicrocourseOutline${Oh(S)}`,
|
|
28196
28170
|
gtmType: "article-click",
|
|
28197
28171
|
children: /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
28198
28172
|
/* @__PURE__ */ c.jsx(
|
|
@@ -28200,7 +28174,7 @@ const vk = ({
|
|
|
28200
28174
|
{
|
|
28201
28175
|
sectionId: a,
|
|
28202
28176
|
subsectionId: C,
|
|
28203
|
-
title:
|
|
28177
|
+
title: S,
|
|
28204
28178
|
className: "course-title"
|
|
28205
28179
|
}
|
|
28206
28180
|
),
|
|
@@ -28386,13 +28360,13 @@ export {
|
|
|
28386
28360
|
Ar as EMAILS,
|
|
28387
28361
|
J_ as EditSection,
|
|
28388
28362
|
Vp as EmailHelperTextBox,
|
|
28389
|
-
|
|
28363
|
+
$n as EmptyStateBox,
|
|
28390
28364
|
Op as EnrichedUrl,
|
|
28391
28365
|
Dm as FeatureFlags,
|
|
28392
28366
|
Pp as Filters,
|
|
28393
28367
|
ym as FlagsProvider,
|
|
28394
28368
|
Hf as Footer,
|
|
28395
|
-
|
|
28369
|
+
Ln as Form,
|
|
28396
28370
|
Z as Formatting,
|
|
28397
28371
|
Rt as Fragment,
|
|
28398
28372
|
qn as FullWidthSection,
|
|
@@ -28417,7 +28391,7 @@ export {
|
|
|
28417
28391
|
p_ as LessonType,
|
|
28418
28392
|
OE as LikesFeed,
|
|
28419
28393
|
PE as LikesModal,
|
|
28420
|
-
|
|
28394
|
+
Rn as Link,
|
|
28421
28395
|
sa as LoadMore,
|
|
28422
28396
|
z_ as LoadingBlock,
|
|
28423
28397
|
qt as LoadingPlaceholder,
|
|
@@ -28452,7 +28426,7 @@ export {
|
|
|
28452
28426
|
kC as ProfileImageChange,
|
|
28453
28427
|
Io as ProfileModal,
|
|
28454
28428
|
rh as ProfileModalLauncher,
|
|
28455
|
-
|
|
28429
|
+
In as ProfilePicture,
|
|
28456
28430
|
Qc as ProgressBar,
|
|
28457
28431
|
M_ as ProgressTracker,
|
|
28458
28432
|
K_ as Rating,
|