@apolitical/component-library 4.6.0-4652.0 → 4.6.0-4652.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +29 -29
- package/index.mjs +257 -262
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -220,14 +220,14 @@ function yh() {
|
|
|
220
220
|
}
|
|
221
221
|
return null;
|
|
222
222
|
}
|
|
223
|
-
var S = Object.assign, N = 0, K, Y,
|
|
223
|
+
var S = Object.assign, N = 0, K, Y, Q, J, D, R, q;
|
|
224
224
|
function _() {
|
|
225
225
|
}
|
|
226
226
|
_.__reactDisabledLog = !0;
|
|
227
227
|
function A() {
|
|
228
228
|
{
|
|
229
229
|
if (N === 0) {
|
|
230
|
-
K = console.log, Y = console.info,
|
|
230
|
+
K = console.log, Y = console.info, Q = console.warn, J = console.error, D = console.group, R = console.groupCollapsed, q = console.groupEnd;
|
|
231
231
|
var j = {
|
|
232
232
|
configurable: !0,
|
|
233
233
|
enumerable: !0,
|
|
@@ -263,10 +263,10 @@ function yh() {
|
|
|
263
263
|
value: Y
|
|
264
264
|
}),
|
|
265
265
|
warn: S({}, j, {
|
|
266
|
-
value:
|
|
266
|
+
value: Q
|
|
267
267
|
}),
|
|
268
268
|
error: S({}, j, {
|
|
269
|
-
value:
|
|
269
|
+
value: J
|
|
270
270
|
}),
|
|
271
271
|
group: S({}, j, {
|
|
272
272
|
value: D
|
|
@@ -301,7 +301,7 @@ function yh() {
|
|
|
301
301
|
var ue = typeof WeakMap == "function" ? WeakMap : Map;
|
|
302
302
|
ne = new ue();
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function G(j, se) {
|
|
305
305
|
if (!j || te)
|
|
306
306
|
return "";
|
|
307
307
|
{
|
|
@@ -373,7 +373,7 @@ function yh() {
|
|
|
373
373
|
return typeof j == "function" && ne.set(j, Po), Po;
|
|
374
374
|
}
|
|
375
375
|
function ve(j, se, de) {
|
|
376
|
-
return
|
|
376
|
+
return G(j, !1);
|
|
377
377
|
}
|
|
378
378
|
function pe(j) {
|
|
379
379
|
var se = j.prototype;
|
|
@@ -383,7 +383,7 @@ function yh() {
|
|
|
383
383
|
if (j == null)
|
|
384
384
|
return "";
|
|
385
385
|
if (typeof j == "function")
|
|
386
|
-
return
|
|
386
|
+
return G(j, pe(j));
|
|
387
387
|
if (typeof j == "string")
|
|
388
388
|
return re(j);
|
|
389
389
|
switch (j) {
|
|
@@ -4438,7 +4438,7 @@ const Pn = ({
|
|
|
4438
4438
|
);
|
|
4439
4439
|
};
|
|
4440
4440
|
}, []);
|
|
4441
|
-
const
|
|
4441
|
+
const Q = ke(null), J = a || Q;
|
|
4442
4442
|
if (!t.length)
|
|
4443
4443
|
return null;
|
|
4444
4444
|
let D = k.text;
|
|
@@ -4491,8 +4491,8 @@ const Pn = ({
|
|
|
4491
4491
|
if (A.preventDefault(), A.stopPropagation(), N)
|
|
4492
4492
|
return;
|
|
4493
4493
|
let I = 0;
|
|
4494
|
-
if ((H =
|
|
4495
|
-
const re = document.getElementById(
|
|
4494
|
+
if ((H = J == null ? void 0 : J.current) != null && H.id) {
|
|
4495
|
+
const re = document.getElementById(J.current.id);
|
|
4496
4496
|
re && (I = re.getBoundingClientRect().top + window.scrollY);
|
|
4497
4497
|
}
|
|
4498
4498
|
const $ = document.getElementById("header");
|
|
@@ -4521,7 +4521,7 @@ const Pn = ({
|
|
|
4521
4521
|
...f,
|
|
4522
4522
|
id: r,
|
|
4523
4523
|
className: Z("form", n),
|
|
4524
|
-
ref:
|
|
4524
|
+
ref: J
|
|
4525
4525
|
},
|
|
4526
4526
|
/* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
4527
4527
|
S != null && S.general ? /* @__PURE__ */ c.jsx(
|
|
@@ -4544,12 +4544,12 @@ const Pn = ({
|
|
|
4544
4544
|
return /* @__PURE__ */ c.jsx(H, { ...A.props || {} }, `component-${$}-${I}`);
|
|
4545
4545
|
const ne = (Y == null ? void 0 : Y[$]) || "", ue = {
|
|
4546
4546
|
...re,
|
|
4547
|
-
onChange: (
|
|
4548
|
-
B({ type: "updateValue", payload: { key: $, value:
|
|
4547
|
+
onChange: (G) => {
|
|
4548
|
+
B({ type: "updateValue", payload: { key: $, value: G } }), re.onChange(G && G.toString(), B);
|
|
4549
4549
|
}
|
|
4550
4550
|
};
|
|
4551
|
-
return te && (ue.onKeyDown = (
|
|
4552
|
-
|
|
4551
|
+
return te && (ue.onKeyDown = (G) => {
|
|
4552
|
+
G.key === "Enter" && (G.stopPropagation(), G.preventDefault(), R()), re.onKeyDown && re.onKeyDown(G);
|
|
4553
4553
|
}), /* @__PURE__ */ c.jsx(
|
|
4554
4554
|
Pm,
|
|
4555
4555
|
{
|
|
@@ -6149,14 +6149,14 @@ var kp = (e, t, n) => {
|
|
|
6149
6149
|
C.children.splice(B, 1);
|
|
6150
6150
|
var S = O.transform(P, n), N = oe.get(e, O.parent(S)), K = S[S.length - 1];
|
|
6151
6151
|
if (N.children.splice(K, 0, L), t)
|
|
6152
|
-
for (var [Y,
|
|
6153
|
-
t[
|
|
6152
|
+
for (var [Y, Q] of U.points(t))
|
|
6153
|
+
t[Q] = Be.transform(Y, n);
|
|
6154
6154
|
break;
|
|
6155
6155
|
}
|
|
6156
6156
|
case "remove_node": {
|
|
6157
6157
|
var {
|
|
6158
|
-
path:
|
|
6159
|
-
} = n, D =
|
|
6158
|
+
path: J
|
|
6159
|
+
} = n, D = J[J.length - 1], R = oe.parent(e, J);
|
|
6160
6160
|
if (R.children.splice(D, 1), t)
|
|
6161
6161
|
for (var [q, _] of U.points(t)) {
|
|
6162
6162
|
var A = Be.transform(q, n);
|
|
@@ -6165,14 +6165,14 @@ var kp = (e, t, n) => {
|
|
|
6165
6165
|
else {
|
|
6166
6166
|
var I = void 0, $ = void 0;
|
|
6167
6167
|
for (var [H, re] of oe.texts(e))
|
|
6168
|
-
if (O.compare(re,
|
|
6168
|
+
if (O.compare(re, J) === -1)
|
|
6169
6169
|
I = [H, re];
|
|
6170
6170
|
else {
|
|
6171
6171
|
$ = [H, re];
|
|
6172
6172
|
break;
|
|
6173
6173
|
}
|
|
6174
6174
|
var te = !1;
|
|
6175
|
-
I && $ && (O.equals($[1],
|
|
6175
|
+
I && $ && (O.equals($[1], J) ? te = !O.hasPrevious($[1]) : te = O.common(I[1], J).length < O.common($[1], J).length), I && !te ? (q.path = I[1], q.offset = I[0].text.length) : $ ? (q.path = $[1], q.offset = 0) : t = null;
|
|
6176
6176
|
}
|
|
6177
6177
|
}
|
|
6178
6178
|
break;
|
|
@@ -6181,11 +6181,11 @@ var kp = (e, t, n) => {
|
|
|
6181
6181
|
var {
|
|
6182
6182
|
path: ne,
|
|
6183
6183
|
offset: ue,
|
|
6184
|
-
text:
|
|
6184
|
+
text: G
|
|
6185
6185
|
} = n;
|
|
6186
|
-
if (
|
|
6186
|
+
if (G.length === 0)
|
|
6187
6187
|
break;
|
|
6188
|
-
var ve = oe.leaf(e, ne), pe = ve.text.slice(0, ue), xe = ve.text.slice(ue +
|
|
6188
|
+
var ve = oe.leaf(e, ne), pe = ve.text.slice(0, ue), xe = ve.text.slice(ue + G.length);
|
|
6189
6189
|
if (ve.text = pe + xe, t)
|
|
6190
6190
|
for (var [Se, je] of U.points(t))
|
|
6191
6191
|
t[je] = Be.transform(Se, n);
|
|
@@ -8485,9 +8485,9 @@ var hv = (e, t) => {
|
|
|
8485
8485
|
var Y = Array.from(C, (pe) => {
|
|
8486
8486
|
var [, xe] = pe;
|
|
8487
8487
|
return y.pathRef(t, xe);
|
|
8488
|
-
}),
|
|
8488
|
+
}), Q = y.pointRef(t, x), J = y.pointRef(t, k), D = "";
|
|
8489
8489
|
if (!T && !z) {
|
|
8490
|
-
var R =
|
|
8490
|
+
var R = Q.current, [q] = y.leaf(t, R), {
|
|
8491
8491
|
path: _
|
|
8492
8492
|
} = R, {
|
|
8493
8493
|
offset: A
|
|
@@ -8503,7 +8503,7 @@ var hv = (e, t) => {
|
|
|
8503
8503
|
at: pe,
|
|
8504
8504
|
voids: l
|
|
8505
8505
|
})), !P) {
|
|
8506
|
-
var $ =
|
|
8506
|
+
var $ = J.current, [H] = y.leaf(t, $), {
|
|
8507
8507
|
path: re
|
|
8508
8508
|
} = $, te = T ? x.offset : 0, ne = H.text.slice(te, k.offset);
|
|
8509
8509
|
ne.length > 0 && (t.apply({
|
|
@@ -8513,12 +8513,12 @@ var hv = (e, t) => {
|
|
|
8513
8513
|
text: ne
|
|
8514
8514
|
}), D = ne);
|
|
8515
8515
|
}
|
|
8516
|
-
!T && F &&
|
|
8517
|
-
at:
|
|
8516
|
+
!T && F && J.current && Q.current && X.mergeNodes(t, {
|
|
8517
|
+
at: J.current,
|
|
8518
8518
|
hanging: !0,
|
|
8519
8519
|
voids: l
|
|
8520
8520
|
}), h && i && s === "character" && D.length > 1 && D.match(/[\u0E00-\u0E7F]+/) && X.insertText(t, D.slice(0, D.length - o));
|
|
8521
|
-
var ue =
|
|
8521
|
+
var ue = Q.unref(), G = J.unref(), ve = i ? ue || G : G || ue;
|
|
8522
8522
|
n.at == null && ve && X.select(t, ve);
|
|
8523
8523
|
}
|
|
8524
8524
|
}
|
|
@@ -8597,7 +8597,7 @@ var hv = (e, t) => {
|
|
|
8597
8597
|
match: (I) => me.isText(I) || y.isInline(t, I),
|
|
8598
8598
|
mode: "highest",
|
|
8599
8599
|
voids: i
|
|
8600
|
-
}), [, Y] = K,
|
|
8600
|
+
}), [, Y] = K, Q = y.isStart(t, s, Y), J = y.isEnd(t, s, Y), D = y.pathRef(t, v && !C.length ? O.next(f) : f), R = y.pathRef(t, J ? O.next(Y) : Y);
|
|
8601
8601
|
X.splitNodes(t, {
|
|
8602
8602
|
at: s,
|
|
8603
8603
|
match: (I) => S ? fe.isElement(I) && y.isBlock(t, I) : me.isText(I) || y.isInline(t, I),
|
|
@@ -8605,7 +8605,7 @@ var hv = (e, t) => {
|
|
|
8605
8605
|
always: S && (!b || M.length > 0) && (!v || C.length > 0),
|
|
8606
8606
|
voids: i
|
|
8607
8607
|
});
|
|
8608
|
-
var q = y.pathRef(t, !
|
|
8608
|
+
var q = y.pathRef(t, !Q || Q && J ? O.next(Y) : Y);
|
|
8609
8609
|
if (X.insertNodes(t, M, {
|
|
8610
8610
|
at: q.current,
|
|
8611
8611
|
match: (I) => me.isText(I) || y.isInline(t, I),
|
|
@@ -9157,9 +9157,9 @@ var _v = function(t, n) {
|
|
|
9157
9157
|
height: o = 0,
|
|
9158
9158
|
always: l = !1
|
|
9159
9159
|
} = n;
|
|
9160
|
-
if (i == null && (i = (
|
|
9160
|
+
if (i == null && (i = (J) => fe.isElement(J) && y.isBlock(t, J)), U.isRange(s) && (s = Nv(t, s)), O.isPath(s)) {
|
|
9161
9161
|
var u = s, d = y.point(t, u), [h] = y.parent(t, u);
|
|
9162
|
-
i = (
|
|
9162
|
+
i = (J) => J === h, o = d.path.length - u.length + 1, s = d, l = !0;
|
|
9163
9163
|
}
|
|
9164
9164
|
if (s) {
|
|
9165
9165
|
var p = y.pointRef(t, s, {
|
|
@@ -9224,8 +9224,8 @@ var _v = function(t, n) {
|
|
|
9224
9224
|
X.select(t, Y);
|
|
9225
9225
|
}
|
|
9226
9226
|
} finally {
|
|
9227
|
-
var
|
|
9228
|
-
p.unref(), (
|
|
9227
|
+
var Q;
|
|
9228
|
+
p.unref(), (Q = m) === null || Q === void 0 || Q.unref();
|
|
9229
9229
|
}
|
|
9230
9230
|
}
|
|
9231
9231
|
});
|
|
@@ -10046,18 +10046,18 @@ const X0 = /* @__PURE__ */ jn(J0), Wu = (e) => typeof e == "object" && e != null
|
|
|
10046
10046
|
let B = o === "start" || o === "nearest" ? E - P : o === "end" ? T + L : E + k / 2 - P + L, S = l === "center" ? z + w / 2 - C + M : l === "end" ? F + M : z - C;
|
|
10047
10047
|
const N = [];
|
|
10048
10048
|
for (let K = 0; K < m.length; K++) {
|
|
10049
|
-
const Y = m[K], { height:
|
|
10049
|
+
const Y = m[K], { height: Q, width: J, top: D, right: R, bottom: q, left: _ } = Y.getBoundingClientRect();
|
|
10050
10050
|
if (s === "if-needed" && E >= 0 && z >= 0 && T <= b && F <= f && E >= D && T <= q && z >= _ && F <= R)
|
|
10051
10051
|
return N;
|
|
10052
10052
|
const A = getComputedStyle(Y), I = parseInt(A.borderLeftWidth, 10), $ = parseInt(A.borderTopWidth, 10), H = parseInt(A.borderRightWidth, 10), re = parseInt(A.borderBottomWidth, 10);
|
|
10053
10053
|
let te = 0, ne = 0;
|
|
10054
|
-
const ue = "offsetWidth" in Y ? Y.offsetWidth - Y.clientWidth - I - H : 0,
|
|
10054
|
+
const ue = "offsetWidth" in Y ? Y.offsetWidth - Y.clientWidth - I - H : 0, G = "offsetHeight" in Y ? Y.offsetHeight - Y.clientHeight - $ - re : 0, ve = "offsetWidth" in Y ? Y.offsetWidth === 0 ? 0 : J / Y.offsetWidth : 0, pe = "offsetHeight" in Y ? Y.offsetHeight === 0 ? 0 : Q / Y.offsetHeight : 0;
|
|
10055
10055
|
if (p === Y)
|
|
10056
10056
|
te = o === "start" ? B : o === "end" ? B - b : o === "nearest" ? ra(x, x + b, b, $, re, x + B, x + B + k, k) : B - b / 2, ne = l === "start" ? S : l === "center" ? S - f / 2 : l === "end" ? S - f : ra(v, v + f, f, I, H, v + S, v + S + w, w), te = Math.max(0, te + x), ne = Math.max(0, ne + v);
|
|
10057
10057
|
else {
|
|
10058
|
-
te = o === "start" ? B - D - $ : o === "end" ? B - q + re +
|
|
10058
|
+
te = o === "start" ? B - D - $ : o === "end" ? B - q + re + G : o === "nearest" ? ra(D, q, Q, $, re + G, B, B + k, k) : B - (D + Q / 2) + G / 2, ne = l === "start" ? S - _ - I : l === "center" ? S - (_ + J / 2) + ue / 2 : l === "end" ? S - R + H + ue : ra(_, R, J, I, H + ue, S, S + w, w);
|
|
10059
10059
|
const { scrollLeft: xe, scrollTop: Se } = Y;
|
|
10060
|
-
te = pe === 0 ? 0 : Math.max(0, Math.min(Se + te / pe, Y.scrollHeight -
|
|
10060
|
+
te = pe === 0 ? 0 : Math.max(0, Math.min(Se + te / pe, Y.scrollHeight - Q / pe + G)), ne = ve === 0 ? 0 : Math.max(0, Math.min(xe + ne / ve, Y.scrollWidth - J / ve + ue)), B += Se - te, S += xe - ne;
|
|
10061
10061
|
}
|
|
10062
10062
|
N.push({ el: Y, top: te, left: ne });
|
|
10063
10063
|
}
|
|
@@ -11308,16 +11308,16 @@ function ay(e) {
|
|
|
11308
11308
|
for (var B = w(), S; S = (N = pt.get(t)) === null || N === void 0 ? void 0 : N[0]; ) {
|
|
11309
11309
|
var N, K, Y = Pt.get(t);
|
|
11310
11310
|
Y !== void 0 && (Pt.delete(t), t.marks = Y), Y && u === !1 && (u = null);
|
|
11311
|
-
var
|
|
11312
|
-
(!t.selection || !U.equals(t.selection,
|
|
11311
|
+
var Q = Jb(S);
|
|
11312
|
+
(!t.selection || !U.equals(t.selection, Q)) && X.select(t, Q), S.diff.text ? y.insertText(t, S.diff.text) : y.deleteFragment(t), pt.set(t, (K = pt.get(t)) === null || K === void 0 ? void 0 : K.filter((R) => {
|
|
11313
11313
|
var {
|
|
11314
11314
|
id: q
|
|
11315
11315
|
} = R;
|
|
11316
11316
|
return q !== S.id;
|
|
11317
11317
|
})), Zb(t, S) || (B = !1, ln.delete(t), Jt.delete(t), a = "action", cn.delete(t), n.cancel(), r.cancel(), C == null || C.unref());
|
|
11318
11318
|
}
|
|
11319
|
-
var
|
|
11320
|
-
if (
|
|
11319
|
+
var J = C == null ? void 0 : C.unref();
|
|
11320
|
+
if (J && !cn.get(t) && (!t.selection || !U.equals(J, t.selection)) && X.select(t, J), k()) {
|
|
11321
11321
|
h();
|
|
11322
11322
|
return;
|
|
11323
11323
|
}
|
|
@@ -11344,21 +11344,21 @@ function ay(e) {
|
|
|
11344
11344
|
pt.set(t, N);
|
|
11345
11345
|
var K = oe.leaf(t, C), Y = N.findIndex((D) => O.equals(D.path, C));
|
|
11346
11346
|
if (Y < 0) {
|
|
11347
|
-
var
|
|
11348
|
-
|
|
11347
|
+
var Q = qd(K.text, B);
|
|
11348
|
+
Q && N.push({
|
|
11349
11349
|
path: C,
|
|
11350
11350
|
diff: B,
|
|
11351
11351
|
id: l++
|
|
11352
11352
|
}), f();
|
|
11353
11353
|
return;
|
|
11354
11354
|
}
|
|
11355
|
-
var
|
|
11356
|
-
if (!
|
|
11355
|
+
var J = Qb(K.text, N[Y].diff, B);
|
|
11356
|
+
if (!J) {
|
|
11357
11357
|
N.splice(Y, 1), f();
|
|
11358
11358
|
return;
|
|
11359
11359
|
}
|
|
11360
11360
|
N[Y] = ua(ua({}, N[Y]), {}, {
|
|
11361
|
-
diff:
|
|
11361
|
+
diff: J
|
|
11362
11362
|
});
|
|
11363
11363
|
}, v = function(B) {
|
|
11364
11364
|
var {
|
|
@@ -11380,8 +11380,8 @@ function ay(e) {
|
|
|
11380
11380
|
exactMatch: !1,
|
|
11381
11381
|
suppressThrow: !0
|
|
11382
11382
|
}));
|
|
11383
|
-
var
|
|
11384
|
-
if (!N &&
|
|
11383
|
+
var Q = ee.getWindow(t), J = Q.getSelection();
|
|
11384
|
+
if (!N && J && (Y = J, N = ee.toSlateRange(t, J, {
|
|
11385
11385
|
exactMatch: !1,
|
|
11386
11386
|
suppressThrow: !0
|
|
11387
11387
|
})), N = (B = N) !== null && B !== void 0 ? B : t.selection, !!N) {
|
|
@@ -11404,7 +11404,7 @@ function ay(e) {
|
|
|
11404
11404
|
text: "",
|
|
11405
11405
|
start: $.offset,
|
|
11406
11406
|
end: H.offset
|
|
11407
|
-
}, ue = pt.get(t),
|
|
11407
|
+
}, ue = pt.get(t), G = ue == null ? void 0 : ue.find((ye) => O.equals(ye.path, te)), ve = G ? [G.diff, ne] : [ne], pe = zd(re.text, ...ve);
|
|
11408
11408
|
if (pe.length === 0 && (D = !1), U.isExpanded(N)) {
|
|
11409
11409
|
if (D && O.equals(N.anchor.path, N.focus.path)) {
|
|
11410
11410
|
var xe = {
|
|
@@ -12210,15 +12210,15 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12210
12210
|
var {
|
|
12211
12211
|
anchorNode: te,
|
|
12212
12212
|
focusNode: ne
|
|
12213
|
-
} = re, ue = ee.hasEditableTarget(f, te) || ee.isTargetInsideNonReadonlyVoid(f, te),
|
|
12214
|
-
if (ue &&
|
|
12213
|
+
} = re, ue = ee.hasEditableTarget(f, te) || ee.isTargetInsideNonReadonlyVoid(f, te), G = ee.hasEditableTarget(f, ne) || ee.isTargetInsideNonReadonlyVoid(f, ne);
|
|
12214
|
+
if (ue && G) {
|
|
12215
12215
|
var ve = ee.toSlateRange(f, re, {
|
|
12216
12216
|
exactMatch: !1,
|
|
12217
12217
|
suppressThrow: !0
|
|
12218
12218
|
});
|
|
12219
12219
|
ve && (!ee.isComposing(f) && !(A != null && A.hasPendingChanges()) && !(A != null && A.isFlushing()) ? X.select(f, ve) : A == null || A.handleUserSelect(ve));
|
|
12220
12220
|
}
|
|
12221
|
-
s && (!ue || !
|
|
12221
|
+
s && (!ue || !G) && X.deselect(f);
|
|
12222
12222
|
}
|
|
12223
12223
|
}, 100), [f, s, P]), C = qt(() => K0(L, 0), [L]);
|
|
12224
12224
|
M.current = cy({
|
|
@@ -12275,7 +12275,7 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12275
12275
|
});
|
|
12276
12276
|
return;
|
|
12277
12277
|
}
|
|
12278
|
-
var
|
|
12278
|
+
var G = null, ve = requestAnimationFrame(() => {
|
|
12279
12279
|
if (ue) {
|
|
12280
12280
|
var pe = (xe) => {
|
|
12281
12281
|
try {
|
|
@@ -12284,13 +12284,13 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12284
12284
|
} catch {
|
|
12285
12285
|
}
|
|
12286
12286
|
};
|
|
12287
|
-
pe(),
|
|
12287
|
+
pe(), G = setTimeout(() => {
|
|
12288
12288
|
pe(!0), P.isUpdatingSelection = !1;
|
|
12289
12289
|
});
|
|
12290
12290
|
}
|
|
12291
12291
|
});
|
|
12292
12292
|
return () => {
|
|
12293
|
-
cancelAnimationFrame(ve),
|
|
12293
|
+
cancelAnimationFrame(ve), G && clearTimeout(G);
|
|
12294
12294
|
};
|
|
12295
12295
|
}
|
|
12296
12296
|
});
|
|
@@ -12315,7 +12315,7 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12315
12315
|
// When there is an inline element, e.g. a link, and you select
|
|
12316
12316
|
// right after it (the start of the next node).
|
|
12317
12317
|
$.anchor.offset !== 0) {
|
|
12318
|
-
var ue,
|
|
12318
|
+
var ue, G;
|
|
12319
12319
|
ne = !0, f.marks && (ne = !1);
|
|
12320
12320
|
var {
|
|
12321
12321
|
anchor: ve
|
|
@@ -12324,7 +12324,7 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12324
12324
|
var Ye, Pe = je == null ? void 0 : je.document.createTreeWalker(Se, NodeFilter.SHOW_TEXT).lastChild();
|
|
12325
12325
|
Pe === pe && ((Ye = Pe.textContent) === null || Ye === void 0 ? void 0 : Ye.length) === xe && (ne = !1);
|
|
12326
12326
|
}
|
|
12327
|
-
if (ne && pe.parentElement && (je == null || (
|
|
12327
|
+
if (ne && pe.parentElement && (je == null || (G = je.getComputedStyle(pe.parentElement)) === null || G === void 0 ? void 0 : G.whiteSpace) === "pre") {
|
|
12328
12328
|
var Oe = y.above(f, {
|
|
12329
12329
|
at: ve.path,
|
|
12330
12330
|
match: (ie) => fe.isElement(ie) && y.isBlock(f, ie)
|
|
@@ -12452,30 +12452,30 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12452
12452
|
E(void 0);
|
|
12453
12453
|
}, [K]);
|
|
12454
12454
|
if (K) {
|
|
12455
|
-
var
|
|
12455
|
+
var Q = y.start(f, []);
|
|
12456
12456
|
N.push({
|
|
12457
12457
|
[ar]: !0,
|
|
12458
12458
|
placeholder: i,
|
|
12459
12459
|
onPlaceholderResize: Y,
|
|
12460
|
-
anchor:
|
|
12461
|
-
focus:
|
|
12460
|
+
anchor: Q,
|
|
12461
|
+
focus: Q
|
|
12462
12462
|
});
|
|
12463
12463
|
}
|
|
12464
12464
|
var {
|
|
12465
|
-
marks:
|
|
12465
|
+
marks: J
|
|
12466
12466
|
} = f;
|
|
12467
|
-
if (P.hasMarkPlaceholder = !1, f.selection && U.isCollapsed(f.selection) &&
|
|
12467
|
+
if (P.hasMarkPlaceholder = !1, f.selection && U.isCollapsed(f.selection) && J) {
|
|
12468
12468
|
var {
|
|
12469
12469
|
anchor: D
|
|
12470
12470
|
} = f.selection, R = oe.leaf(f, D.path), q = rr(R, Ly);
|
|
12471
|
-
if (!me.equals(R,
|
|
12471
|
+
if (!me.equals(R, J, {
|
|
12472
12472
|
loose: !0
|
|
12473
12473
|
})) {
|
|
12474
12474
|
P.hasMarkPlaceholder = !0;
|
|
12475
12475
|
var _ = Object.fromEntries(Object.keys(q).map((A) => [A, null]));
|
|
12476
12476
|
N.push(It(It(It({
|
|
12477
12477
|
[Md]: !0
|
|
12478
|
-
}, _),
|
|
12478
|
+
}, _), J), {}, {
|
|
12479
12479
|
anchor: D,
|
|
12480
12480
|
focus: D
|
|
12481
12481
|
}));
|
|
@@ -12490,10 +12490,10 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12490
12490
|
var {
|
|
12491
12491
|
anchor: I
|
|
12492
12492
|
} = A, $ = oe.leaf(f, I.path);
|
|
12493
|
-
if (
|
|
12493
|
+
if (J && !me.equals($, J, {
|
|
12494
12494
|
loose: !0
|
|
12495
12495
|
})) {
|
|
12496
|
-
Pt.set(f,
|
|
12496
|
+
Pt.set(f, J);
|
|
12497
12497
|
return;
|
|
12498
12498
|
}
|
|
12499
12499
|
}
|
|
@@ -12597,10 +12597,10 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12597
12597
|
}
|
|
12598
12598
|
if (s)
|
|
12599
12599
|
return;
|
|
12600
|
-
var ue = y.start(f, $),
|
|
12600
|
+
var ue = y.start(f, $), G = y.end(f, $), ve = y.void(f, {
|
|
12601
12601
|
at: ue
|
|
12602
12602
|
}), pe = y.void(f, {
|
|
12603
|
-
at:
|
|
12603
|
+
at: G
|
|
12604
12604
|
});
|
|
12605
12605
|
if (ve && pe && O.equals(ve[1], pe[1])) {
|
|
12606
12606
|
var xe = y.range(f, ue);
|
|
@@ -12792,8 +12792,8 @@ var zy = (e) => /* @__PURE__ */ ae.createElement(ae.Fragment, null, Kd(e)), qy =
|
|
|
12792
12792
|
}
|
|
12793
12793
|
if (on) {
|
|
12794
12794
|
if ((Pd || Cr) && H && (Qe.isDeleteBackward($) || Qe.isDeleteForward($)) && U.isCollapsed(H)) {
|
|
12795
|
-
var
|
|
12796
|
-
if (fe.isElement(
|
|
12795
|
+
var G = oe.parent(f, H.anchor.path);
|
|
12796
|
+
if (fe.isElement(G) && y.isVoid(f, G) && (y.isInline(f, G) || y.isBlock(f, G))) {
|
|
12797
12797
|
A.preventDefault(), y.deleteBackward(f, {
|
|
12798
12798
|
unit: "block"
|
|
12799
12799
|
});
|
|
@@ -15788,7 +15788,7 @@ function kD(e, t, n) {
|
|
|
15788
15788
|
return _ === null || we(_) ? C(_) : $e(_) ? (e.consume(_), L) : n(_);
|
|
15789
15789
|
}
|
|
15790
15790
|
function C(_) {
|
|
15791
|
-
return _ === 45 && a === 2 ? (e.consume(_), K) : _ === 60 && a === 1 ? (e.consume(_), Y) : _ === 62 && a === 4 ? (e.consume(_), R) : _ === 63 && a === 3 ? (e.consume(_), D) : _ === 93 && a === 5 ? (e.consume(_),
|
|
15791
|
+
return _ === 45 && a === 2 ? (e.consume(_), K) : _ === 60 && a === 1 ? (e.consume(_), Y) : _ === 62 && a === 4 ? (e.consume(_), R) : _ === 63 && a === 3 ? (e.consume(_), D) : _ === 93 && a === 5 ? (e.consume(_), J) : we(_) && (a === 6 || a === 7) ? (e.exit("htmlFlowData"), e.check(
|
|
15792
15792
|
CD,
|
|
15793
15793
|
q,
|
|
15794
15794
|
B
|
|
@@ -15811,16 +15811,16 @@ function kD(e, t, n) {
|
|
|
15811
15811
|
return _ === 45 ? (e.consume(_), D) : C(_);
|
|
15812
15812
|
}
|
|
15813
15813
|
function Y(_) {
|
|
15814
|
-
return _ === 47 ? (e.consume(_), s = "",
|
|
15814
|
+
return _ === 47 ? (e.consume(_), s = "", Q) : C(_);
|
|
15815
15815
|
}
|
|
15816
|
-
function
|
|
15816
|
+
function Q(_) {
|
|
15817
15817
|
if (_ === 62) {
|
|
15818
15818
|
const A = s.toLowerCase();
|
|
15819
15819
|
return $l.includes(A) ? (e.consume(_), R) : C(_);
|
|
15820
15820
|
}
|
|
15821
|
-
return zt(_) && s.length < 8 ? (e.consume(_), s += String.fromCharCode(_),
|
|
15821
|
+
return zt(_) && s.length < 8 ? (e.consume(_), s += String.fromCharCode(_), Q) : C(_);
|
|
15822
15822
|
}
|
|
15823
|
-
function
|
|
15823
|
+
function J(_) {
|
|
15824
15824
|
return _ === 93 ? (e.consume(_), D) : C(_);
|
|
15825
15825
|
}
|
|
15826
15826
|
function D(_) {
|
|
@@ -15937,17 +15937,17 @@ function TD(e, t, n) {
|
|
|
15937
15937
|
return D === 62 ? (e.consume(D), e.exit("htmlTextData"), e.exit("htmlText"), t) : n(D);
|
|
15938
15938
|
}
|
|
15939
15939
|
function Y(D) {
|
|
15940
|
-
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(D), e.exit("lineEnding"),
|
|
15940
|
+
return e.exit("htmlTextData"), e.enter("lineEnding"), e.consume(D), e.exit("lineEnding"), Q;
|
|
15941
15941
|
}
|
|
15942
|
-
function
|
|
15942
|
+
function Q(D) {
|
|
15943
15943
|
return $e(D) ? Ue(
|
|
15944
15944
|
e,
|
|
15945
|
-
|
|
15945
|
+
J,
|
|
15946
15946
|
"linePrefix",
|
|
15947
15947
|
r.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4
|
|
15948
|
-
)(D) :
|
|
15948
|
+
)(D) : J(D);
|
|
15949
15949
|
}
|
|
15950
|
-
function
|
|
15950
|
+
function J(D) {
|
|
15951
15951
|
return e.enter("htmlTextData"), s(D);
|
|
15952
15952
|
}
|
|
15953
15953
|
}
|
|
@@ -16579,7 +16579,7 @@ function ox(e, t, n) {
|
|
|
16579
16579
|
function T(L, C) {
|
|
16580
16580
|
return B;
|
|
16581
16581
|
function B(S, N, K) {
|
|
16582
|
-
let Y,
|
|
16582
|
+
let Y, Q, J, D;
|
|
16583
16583
|
return Array.isArray(S) ? q(S) : "tokenize" in S ? (
|
|
16584
16584
|
// @ts-expect-error Looks like a construct.
|
|
16585
16585
|
q([S])
|
|
@@ -16597,12 +16597,12 @@ function ox(e, t, n) {
|
|
|
16597
16597
|
}
|
|
16598
16598
|
}
|
|
16599
16599
|
function q($) {
|
|
16600
|
-
return Y = $,
|
|
16600
|
+
return Y = $, Q = 0, $.length === 0 ? K : _($[Q]);
|
|
16601
16601
|
}
|
|
16602
16602
|
function _($) {
|
|
16603
16603
|
return H;
|
|
16604
16604
|
function H(re) {
|
|
16605
|
-
return D = P(),
|
|
16605
|
+
return D = P(), J = $, $.partial || (u.currentConstruct = $), $.name && u.parser.constructs.disable.null.includes($.name) ? I() : $.tokenize.call(
|
|
16606
16606
|
// If we do have fields, create an object w/ `context` as its
|
|
16607
16607
|
// prototype.
|
|
16608
16608
|
// This allows a “live binding”, which is needed for `interrupt`.
|
|
@@ -16614,10 +16614,10 @@ function ox(e, t, n) {
|
|
|
16614
16614
|
}
|
|
16615
16615
|
}
|
|
16616
16616
|
function A($) {
|
|
16617
|
-
return L(
|
|
16617
|
+
return L(J, D), N;
|
|
16618
16618
|
}
|
|
16619
16619
|
function I($) {
|
|
16620
|
-
return D.restore(), ++
|
|
16620
|
+
return D.restore(), ++Q < Y.length ? _(Y[Q]) : K;
|
|
16621
16621
|
}
|
|
16622
16622
|
}
|
|
16623
16623
|
}
|
|
@@ -16868,7 +16868,7 @@ function Bx(e) {
|
|
|
16868
16868
|
codeTextData: P,
|
|
16869
16869
|
data: P,
|
|
16870
16870
|
codeFlowValue: P,
|
|
16871
|
-
definition: i(
|
|
16871
|
+
definition: i(G),
|
|
16872
16872
|
definitionDestinationString: s,
|
|
16873
16873
|
definitionLabelString: s,
|
|
16874
16874
|
definitionTitleString: s,
|
|
@@ -16927,8 +16927,8 @@ function Bx(e) {
|
|
|
16927
16927
|
htmlText: l(S),
|
|
16928
16928
|
htmlTextData: M,
|
|
16929
16929
|
image: l(Y),
|
|
16930
|
-
label:
|
|
16931
|
-
labelText:
|
|
16930
|
+
label: J,
|
|
16931
|
+
labelText: Q,
|
|
16932
16932
|
lineEnding: L,
|
|
16933
16933
|
link: l(K),
|
|
16934
16934
|
listItem: l(),
|
|
@@ -17218,11 +17218,11 @@ function Bx(e) {
|
|
|
17218
17218
|
delete W.identifier, delete W.label;
|
|
17219
17219
|
this.data.referenceType = void 0;
|
|
17220
17220
|
}
|
|
17221
|
-
function
|
|
17221
|
+
function Q(W) {
|
|
17222
17222
|
const ie = this.sliceSerialize(W), ge = this.stack[this.stack.length - 2];
|
|
17223
17223
|
ge.label = Ex(ie), ge.identifier = Jn(ie).toLowerCase();
|
|
17224
17224
|
}
|
|
17225
|
-
function
|
|
17225
|
+
function J() {
|
|
17226
17226
|
const W = this.stack[this.stack.length - 1], ie = this.resume(), ge = this.stack[this.stack.length - 1];
|
|
17227
17227
|
if (this.data.inReference = !0, ge.type === "link") {
|
|
17228
17228
|
const ye = W.children;
|
|
@@ -17293,7 +17293,7 @@ function Bx(e) {
|
|
|
17293
17293
|
value: ""
|
|
17294
17294
|
};
|
|
17295
17295
|
}
|
|
17296
|
-
function
|
|
17296
|
+
function G() {
|
|
17297
17297
|
return {
|
|
17298
17298
|
type: "definition",
|
|
17299
17299
|
identifier: "",
|
|
@@ -18423,7 +18423,7 @@ const aw = ({
|
|
|
18423
18423
|
}, N = `rte-${e}`, K = Re(
|
|
18424
18424
|
(R) => /* @__PURE__ */ c.jsx(t1, { ...R }),
|
|
18425
18425
|
[]
|
|
18426
|
-
), Y = Re((R) => /* @__PURE__ */ c.jsx(n1, { ...R }), []),
|
|
18426
|
+
), Y = Re((R) => /* @__PURE__ */ c.jsx(n1, { ...R }), []), Q = qt(
|
|
18427
18427
|
() => tw(
|
|
18428
18428
|
nw(
|
|
18429
18429
|
rw(qv(Xy(Lv())), b),
|
|
@@ -18441,28 +18441,28 @@ const aw = ({
|
|
|
18441
18441
|
const R = t.match(Ba);
|
|
18442
18442
|
!R || R.length > 1 || R[0].length !== t.length || L || w([{ type: "originalValue", value: t }]);
|
|
18443
18443
|
}, [t]);
|
|
18444
|
-
const
|
|
18445
|
-
if (!
|
|
18444
|
+
const J = (R) => {
|
|
18445
|
+
if (!Q || R !== N)
|
|
18446
18446
|
return;
|
|
18447
|
-
const q = y.end(
|
|
18448
|
-
X.select(
|
|
18447
|
+
const q = y.end(Q, []);
|
|
18448
|
+
X.select(Q, q), ee.focus(Q);
|
|
18449
18449
|
};
|
|
18450
18450
|
he(() => {
|
|
18451
18451
|
const R = (q) => {
|
|
18452
18452
|
var I;
|
|
18453
18453
|
const _ = q, A = ((I = _ == null ? void 0 : _.detail) == null ? void 0 : I.id) || null;
|
|
18454
|
-
A &&
|
|
18454
|
+
A && J(A);
|
|
18455
18455
|
};
|
|
18456
18456
|
return window.addEventListener("focusEditor", R), () => {
|
|
18457
18457
|
window.removeEventListener("focusEditor", R);
|
|
18458
18458
|
};
|
|
18459
18459
|
}, []), he(() => {
|
|
18460
|
-
if (
|
|
18460
|
+
if (Q.children.length > 0 && !C) {
|
|
18461
18461
|
if (w([{ type: "hasLoaded", value: !0 }]), !s)
|
|
18462
18462
|
return;
|
|
18463
|
-
|
|
18463
|
+
J(N);
|
|
18464
18464
|
}
|
|
18465
|
-
}, [
|
|
18465
|
+
}, [Q.children.length, T]), he(() => {
|
|
18466
18466
|
F && (async () => {
|
|
18467
18467
|
let q = En(F);
|
|
18468
18468
|
if (q.includes("<")) {
|
|
@@ -18485,18 +18485,18 @@ const aw = ({
|
|
|
18485
18485
|
{ type: "initialValue", value: _ },
|
|
18486
18486
|
{ type: "editorKey", value: F.toString() }
|
|
18487
18487
|
]), setTimeout(() => {
|
|
18488
|
-
w([{ type: "stringValue", value: ql(
|
|
18488
|
+
w([{ type: "stringValue", value: ql(Q) }]);
|
|
18489
18489
|
}, 150);
|
|
18490
18490
|
});
|
|
18491
18491
|
})();
|
|
18492
18492
|
}, [F]), he(() => {
|
|
18493
|
-
t !== "" || !
|
|
18494
|
-
X.delete(
|
|
18493
|
+
t !== "" || !Q || ds(F, t) && !L || (y.withoutNormalizing(Q, () => {
|
|
18494
|
+
X.delete(Q, {
|
|
18495
18495
|
at: {
|
|
18496
|
-
anchor: y.start(
|
|
18497
|
-
focus: y.end(
|
|
18496
|
+
anchor: y.start(Q, []),
|
|
18497
|
+
focus: y.end(Q, [])
|
|
18498
18498
|
}
|
|
18499
|
-
}), X.deselect(
|
|
18499
|
+
}), X.deselect(Q), Q.children.length !== 0 && X.unwrapNodes(Q, { at: [0] }), X.insertNodes(Q, v, { at: [0] });
|
|
18500
18500
|
}), w([
|
|
18501
18501
|
{ type: "initialValue", value: v },
|
|
18502
18502
|
{ type: "lastAnchor", value: null }
|
|
@@ -18504,7 +18504,7 @@ const aw = ({
|
|
|
18504
18504
|
}, [t]);
|
|
18505
18505
|
const D = Bc(() => {
|
|
18506
18506
|
Nx({
|
|
18507
|
-
editor:
|
|
18507
|
+
editor: Q,
|
|
18508
18508
|
isShowing: B.show,
|
|
18509
18509
|
numberOfUsers: B.numberOfUsers,
|
|
18510
18510
|
listMembers: p,
|
|
@@ -18527,12 +18527,12 @@ const aw = ({
|
|
|
18527
18527
|
/* @__PURE__ */ c.jsxs(
|
|
18528
18528
|
Qy,
|
|
18529
18529
|
{
|
|
18530
|
-
editor:
|
|
18530
|
+
editor: Q,
|
|
18531
18531
|
initialValue: T,
|
|
18532
18532
|
onChange: (R) => {
|
|
18533
|
-
if (
|
|
18533
|
+
if (Q.operations.some((_) => _.type !== "set_selection")) {
|
|
18534
18534
|
const _ = Mx(R);
|
|
18535
|
-
g(_), w([{ type: "stringValue", value: ql(
|
|
18535
|
+
g(_), w([{ type: "stringValue", value: ql(Q) }]), L || w([{ type: "hasInteracted", value: !0 }]), D(), d && console.log({ serialized: _, json: R });
|
|
18536
18536
|
}
|
|
18537
18537
|
},
|
|
18538
18538
|
...l,
|
|
@@ -18548,40 +18548,40 @@ const aw = ({
|
|
|
18548
18548
|
tabIndex: 0,
|
|
18549
18549
|
onKeyDown: (R) => {
|
|
18550
18550
|
if (R.key === "Enter") {
|
|
18551
|
-
B.show && (R.preventDefault(), R.stopPropagation(), pf(
|
|
18552
|
-
const { selection: q } =
|
|
18551
|
+
B.show && (R.preventDefault(), R.stopPropagation(), pf(Q, B, w, N));
|
|
18552
|
+
const { selection: q } = Q;
|
|
18553
18553
|
if (q) {
|
|
18554
|
-
const _ = U.isCollapsed(q), [A, I] = y.node(
|
|
18554
|
+
const _ = U.isCollapsed(q), [A, I] = y.node(Q, q, { depth: 1 });
|
|
18555
18555
|
let $ = A, H = $.type;
|
|
18556
18556
|
const re = $.children[0];
|
|
18557
18557
|
if (re && [V.ol, V.ul].includes(re.type) && ($ = re, H = re.type), $ && fe.isElement($) && H !== V.paragraph) {
|
|
18558
18558
|
if (H === V.blockquote && !R.shiftKey) {
|
|
18559
|
-
R.stopPropagation(), R.preventDefault(), X.insertNodes(
|
|
18559
|
+
R.stopPropagation(), R.preventDefault(), X.insertNodes(Q, v);
|
|
18560
18560
|
return;
|
|
18561
18561
|
}
|
|
18562
18562
|
if (_) {
|
|
18563
|
-
const [te, ne] = y.parent(
|
|
18563
|
+
const [te, ne] = y.parent(Q, q, {
|
|
18564
18564
|
edge: "end"
|
|
18565
|
-
}),
|
|
18565
|
+
}), G = te.type;
|
|
18566
18566
|
if ([V.ul, V.ol].includes(H))
|
|
18567
|
-
if (R.stopPropagation(), R.preventDefault(),
|
|
18568
|
-
te.children.length === 1 && "text" in te.children[0] && te.children[0].text === "" && X.removeNodes(
|
|
18567
|
+
if (R.stopPropagation(), R.preventDefault(), G === V.li && M === "Enter") {
|
|
18568
|
+
te.children.length === 1 && "text" in te.children[0] && te.children[0].text === "" && X.removeNodes(Q, { at: ne }), X.insertNodes(Q, v, {
|
|
18569
18569
|
at: O.next(I)
|
|
18570
18570
|
}), X.select(
|
|
18571
|
-
|
|
18572
|
-
y.end(
|
|
18571
|
+
Q,
|
|
18572
|
+
y.end(Q, O.next(I))
|
|
18573
18573
|
);
|
|
18574
18574
|
return;
|
|
18575
18575
|
} else {
|
|
18576
|
-
const [ve, pe] = jx(
|
|
18576
|
+
const [ve, pe] = jx(Q, V.li), xe = {
|
|
18577
18577
|
type: V.li,
|
|
18578
18578
|
children: [{ text: "" }]
|
|
18579
18579
|
};
|
|
18580
|
-
X.insertNodes(
|
|
18580
|
+
X.insertNodes(Q, xe, {
|
|
18581
18581
|
at: O.next(pe)
|
|
18582
18582
|
}), X.select(
|
|
18583
|
-
|
|
18584
|
-
y.end(
|
|
18583
|
+
Q,
|
|
18584
|
+
y.end(Q, O.next(pe))
|
|
18585
18585
|
);
|
|
18586
18586
|
}
|
|
18587
18587
|
}
|
|
@@ -18605,21 +18605,21 @@ const aw = ({
|
|
|
18605
18605
|
}
|
|
18606
18606
|
]);
|
|
18607
18607
|
}
|
|
18608
|
-
w([{ type: "lastKey", value: R.key }]), Px(R,
|
|
18608
|
+
w([{ type: "lastKey", value: R.key }]), Px(R, Q, w, b);
|
|
18609
18609
|
},
|
|
18610
18610
|
onBlur: () => {
|
|
18611
|
-
|
|
18611
|
+
Q.selection && w([{ type: "lastAnchor", value: Q.selection.anchor }]);
|
|
18612
18612
|
},
|
|
18613
18613
|
onFocus: () => {
|
|
18614
18614
|
if (P) {
|
|
18615
|
-
if (!O.isPath(P.path) || !oe.has(
|
|
18615
|
+
if (!O.isPath(P.path) || !oe.has(Q, P.path))
|
|
18616
18616
|
return;
|
|
18617
|
-
const R = oe.get(
|
|
18617
|
+
const R = oe.get(Q, P.path);
|
|
18618
18618
|
let q = 0;
|
|
18619
18619
|
if (me.isText(R) ? q = R.text.length : R.children && (q = R.children.length), P.offset > q)
|
|
18620
18620
|
return;
|
|
18621
18621
|
try {
|
|
18622
|
-
X.select(
|
|
18622
|
+
X.select(Q, {
|
|
18623
18623
|
anchor: P,
|
|
18624
18624
|
focus: P
|
|
18625
18625
|
});
|
|
@@ -20761,9 +20761,9 @@ const nt = "discussion_form_", si = ({
|
|
|
20761
20761
|
onMention: K = () => {
|
|
20762
20762
|
},
|
|
20763
20763
|
listMembers: Y = () => Promise.resolve([]),
|
|
20764
|
-
clickMentionFallback:
|
|
20764
|
+
clickMentionFallback: Q = () => {
|
|
20765
20765
|
},
|
|
20766
|
-
props:
|
|
20766
|
+
props: J = {
|
|
20767
20767
|
create: { projectNames: ["questions-answers"] }
|
|
20768
20768
|
}
|
|
20769
20769
|
} = u, [D, R] = le({
|
|
@@ -20802,7 +20802,7 @@ const nt = "discussion_form_", si = ({
|
|
|
20802
20802
|
}
|
|
20803
20803
|
e && (H = `${e}-${H}`);
|
|
20804
20804
|
const re = async () => {
|
|
20805
|
-
if (!m || !m.id || !n ||
|
|
20805
|
+
if (!m || !m.id || !n || G)
|
|
20806
20806
|
return;
|
|
20807
20807
|
da && clearTimeout(da), I("submitting");
|
|
20808
20808
|
const Pe = window.location.pathname;
|
|
@@ -20816,7 +20816,7 @@ const nt = "discussion_form_", si = ({
|
|
|
20816
20816
|
Oe = await C({
|
|
20817
20817
|
title: D.body,
|
|
20818
20818
|
authorId: m && m.id,
|
|
20819
|
-
...
|
|
20819
|
+
...J == null ? void 0 : J.create
|
|
20820
20820
|
});
|
|
20821
20821
|
break;
|
|
20822
20822
|
case "response":
|
|
@@ -20861,8 +20861,8 @@ const nt = "discussion_form_", si = ({
|
|
|
20861
20861
|
_(!1), I(!1), f("");
|
|
20862
20862
|
}, 5e3);
|
|
20863
20863
|
}, ne = !D.title || !Io(D.title), ue = !D.body || !Io(D.body);
|
|
20864
|
-
let
|
|
20865
|
-
E && (
|
|
20864
|
+
let G = ue;
|
|
20865
|
+
E && (G = ne && ue);
|
|
20866
20866
|
const ve = A === "submitting", pe = [
|
|
20867
20867
|
{
|
|
20868
20868
|
component: ww,
|
|
@@ -20890,7 +20890,7 @@ const nt = "discussion_form_", si = ({
|
|
|
20890
20890
|
onChange: $,
|
|
20891
20891
|
onMention: K,
|
|
20892
20892
|
listMembers: Y,
|
|
20893
|
-
clickMentionFallback:
|
|
20893
|
+
clickMentionFallback: Q
|
|
20894
20894
|
},
|
|
20895
20895
|
data: d,
|
|
20896
20896
|
autoFocus: w !== !1 || k && !E,
|
|
@@ -20918,12 +20918,12 @@ const nt = "discussion_form_", si = ({
|
|
|
20918
20918
|
},
|
|
20919
20919
|
validation: [
|
|
20920
20920
|
{
|
|
20921
|
-
condition: () =>
|
|
20921
|
+
condition: () => G,
|
|
20922
20922
|
error: p.formatMessage({ id: `${nt}titleField_error` })
|
|
20923
20923
|
}
|
|
20924
20924
|
]
|
|
20925
20925
|
});
|
|
20926
|
-
let xe = !m || !m.id || !n ||
|
|
20926
|
+
let xe = !m || !m.id || !n || G || ve;
|
|
20927
20927
|
return w && (E ? xe = xe || D.body === w.text && D.title === E.text : xe = xe || D.body === w.text), /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
|
20928
20928
|
/* @__PURE__ */ c.jsxs(
|
|
20929
20929
|
Pn,
|
|
@@ -21202,15 +21202,15 @@ const kw = ({
|
|
|
21202
21202
|
onClick: (M) => M == null ? void 0 : M.stopPropagation(),
|
|
21203
21203
|
onFocus: () => F(),
|
|
21204
21204
|
onKeyDown: (M) => {
|
|
21205
|
-
var N, K, Y,
|
|
21205
|
+
var N, K, Y, Q;
|
|
21206
21206
|
if (!M || !["ArrowUp", "ArrowDown"].includes(M.key || ""))
|
|
21207
21207
|
return;
|
|
21208
21208
|
M.stopPropagation(), M.preventDefault();
|
|
21209
21209
|
const L = M.key === "ArrowUp" ? "up" : "down", C = (N = M.currentTarget) == null ? void 0 : N.parentElement;
|
|
21210
21210
|
let B = C == null ? void 0 : C.nextElementSibling;
|
|
21211
21211
|
if (L === "up") {
|
|
21212
|
-
const
|
|
21213
|
-
|
|
21212
|
+
const J = C == null ? void 0 : C.previousElementSibling;
|
|
21213
|
+
J ? B = J : (B = (K = C == null ? void 0 : C.parentElement) == null ? void 0 : K.lastElementChild, (B == null ? void 0 : B.getAttribute("data-index")) === "-1" && (B = B == null ? void 0 : B.previousElementSibling));
|
|
21214
21214
|
} else
|
|
21215
21215
|
(!B || (B == null ? void 0 : B.getAttribute("data-index")) === "-1") && (B = (Y = C == null ? void 0 : C.parentElement) == null ? void 0 : Y.firstElementChild);
|
|
21216
21216
|
if (!B)
|
|
@@ -21221,7 +21221,7 @@ const kw = ({
|
|
|
21221
21221
|
type: "tabbableLink",
|
|
21222
21222
|
value: S
|
|
21223
21223
|
}
|
|
21224
|
-
]), (
|
|
21224
|
+
]), (Q = B == null ? void 0 : B.querySelector("a")) == null || Q.focus();
|
|
21225
21225
|
},
|
|
21226
21226
|
...P,
|
|
21227
21227
|
children: T.name
|
|
@@ -21349,7 +21349,7 @@ const oi = ({
|
|
|
21349
21349
|
userLiked: N,
|
|
21350
21350
|
comments: K = 0,
|
|
21351
21351
|
mentions: Y
|
|
21352
|
-
} = t,
|
|
21352
|
+
} = t, Q = b && b.id && typeof M != "string" && M.id && M.id === b.id || !1, J = typeof L == "boolean" ? L : !0, D = Q && (!t.createdAt || Fh(t.createdAt, 10, "seconds")), R = ke(null), [q, _] = le({
|
|
21353
21353
|
title: t && t.body !== t.title && t.title || "",
|
|
21354
21354
|
body: t && t.body || "",
|
|
21355
21355
|
isEditing: !1,
|
|
@@ -21395,7 +21395,7 @@ const oi = ({
|
|
|
21395
21395
|
};
|
|
21396
21396
|
if (r || !t || t.type === "answer" && (!t.slugs || !t.slugs.question) || q.postBody === "" && t.title === "")
|
|
21397
21397
|
return /* @__PURE__ */ c.jsx(Rt, { className: "discussion-card" });
|
|
21398
|
-
const
|
|
21398
|
+
const G = async ({
|
|
21399
21399
|
title: be,
|
|
21400
21400
|
body: W
|
|
21401
21401
|
}) => {
|
|
@@ -21447,7 +21447,7 @@ const oi = ({
|
|
|
21447
21447
|
icon: "flag"
|
|
21448
21448
|
}
|
|
21449
21449
|
];
|
|
21450
|
-
return n &&
|
|
21450
|
+
return n && Q && xe.push(
|
|
21451
21451
|
{
|
|
21452
21452
|
text: f.formatMessage({ id: `${Yt}moreMenu_edit` }),
|
|
21453
21453
|
onClick: () => _({ ...q, isEditing: !0 }),
|
|
@@ -21534,7 +21534,7 @@ const oi = ({
|
|
|
21534
21534
|
},
|
|
21535
21535
|
functions: {
|
|
21536
21536
|
create: x,
|
|
21537
|
-
handleSaveEdit:
|
|
21537
|
+
handleSaveEdit: G,
|
|
21538
21538
|
handleCancel: () => {
|
|
21539
21539
|
te(""), _({ ...q, isEditing: !1 });
|
|
21540
21540
|
},
|
|
@@ -21597,7 +21597,7 @@ const oi = ({
|
|
|
21597
21597
|
slugs: t.slugs,
|
|
21598
21598
|
slug: t.slug
|
|
21599
21599
|
},
|
|
21600
|
-
canLike:
|
|
21600
|
+
canLike: J,
|
|
21601
21601
|
peopleWhoLiked: t.peopleWhoLiked,
|
|
21602
21602
|
functions: {
|
|
21603
21603
|
createLike: E,
|
|
@@ -22597,11 +22597,11 @@ const C_ = ({
|
|
|
22597
22597
|
latest_reactions: S,
|
|
22598
22598
|
reaction_counts: N,
|
|
22599
22599
|
mentioned_users: K
|
|
22600
|
-
} = M, Y = (((q = S == null ? void 0 : S.like) == null ? void 0 : q.length) || 0) > 0,
|
|
22601
|
-
var ue,
|
|
22600
|
+
} = M, Y = (((q = S == null ? void 0 : S.like) == null ? void 0 : q.length) || 0) > 0, Q = (((_ = B == null ? void 0 : B.like) == null ? void 0 : _.length) || 0) > 0, J = Q ? B == null ? void 0 : B.like[0].id : "", D = Y ? (A = S == null ? void 0 : S.like) == null ? void 0 : A.map((ne) => {
|
|
22601
|
+
var ue, G, ve;
|
|
22602
22602
|
return {
|
|
22603
22603
|
id: (ue = ne == null ? void 0 : ne.user) == null ? void 0 : ue.id,
|
|
22604
|
-
name: (ve = (
|
|
22604
|
+
name: (ve = (G = ne == null ? void 0 : ne.user) == null ? void 0 : G.data) == null ? void 0 : ve.name
|
|
22605
22605
|
};
|
|
22606
22606
|
}) : !1, R = M == null ? void 0 : M.actor;
|
|
22607
22607
|
return /* @__PURE__ */ c.jsx(Or, { children: /* @__PURE__ */ c.jsx(
|
|
@@ -22628,7 +22628,7 @@ const C_ = ({
|
|
|
22628
22628
|
thumbnail: ((te = R == null ? void 0 : R.data) == null ? void 0 : te.thumbnail) || void 0
|
|
22629
22629
|
}
|
|
22630
22630
|
},
|
|
22631
|
-
userLiked:
|
|
22631
|
+
userLiked: Q,
|
|
22632
22632
|
likes: (N == null ? void 0 : N.like) || 0,
|
|
22633
22633
|
comments: (N == null ? void 0 : N.reply) || 0,
|
|
22634
22634
|
peopleWhoLiked: D,
|
|
@@ -22648,7 +22648,7 @@ const C_ = ({
|
|
|
22648
22648
|
},
|
|
22649
22649
|
likes: {
|
|
22650
22650
|
createLike: () => E({ activityId: C }),
|
|
22651
|
-
deleteLike: () => F({ activityId: C, reactionId:
|
|
22651
|
+
deleteLike: () => F({ activityId: C, reactionId: J })
|
|
22652
22652
|
},
|
|
22653
22653
|
comments: {
|
|
22654
22654
|
openComments: () => null
|
|
@@ -23487,21 +23487,21 @@ const hC = ({
|
|
|
23487
23487
|
}
|
|
23488
23488
|
},
|
|
23489
23489
|
children: l && l.length > 0 ? l == null ? void 0 : l.map((w) => {
|
|
23490
|
-
var
|
|
23490
|
+
var Q, J, D, R, q, _, A, I, $, H, re, te;
|
|
23491
23491
|
const {
|
|
23492
23492
|
id: E,
|
|
23493
23493
|
own_children: F,
|
|
23494
23494
|
latest_children: T,
|
|
23495
23495
|
children_counts: z,
|
|
23496
23496
|
data: { mentioned_users: P }
|
|
23497
|
-
} = w, L = (((
|
|
23497
|
+
} = w, L = (((Q = F == null ? void 0 : F.like) == null ? void 0 : Q.length) || 0) > 0 ? (J = F == null ? void 0 : F.like) == null ? void 0 : J.find((ne) => {
|
|
23498
23498
|
var ue;
|
|
23499
23499
|
return ((ue = ne == null ? void 0 : ne.user) == null ? void 0 : ue.id) === (v == null ? void 0 : v.id);
|
|
23500
23500
|
}) : !1, C = L ? L == null ? void 0 : L.id : "", B = !!L, N = (((D = T == null ? void 0 : T.like) == null ? void 0 : D.length) || 0) > 0 ? (R = T == null ? void 0 : T.like) == null ? void 0 : R.map((ne) => {
|
|
23501
|
-
var ue,
|
|
23501
|
+
var ue, G, ve;
|
|
23502
23502
|
return {
|
|
23503
23503
|
id: (ue = ne == null ? void 0 : ne.user) == null ? void 0 : ue.id,
|
|
23504
|
-
name: (ve = (
|
|
23504
|
+
name: (ve = (G = ne == null ? void 0 : ne.user) == null ? void 0 : G.data) == null ? void 0 : ve.name
|
|
23505
23505
|
};
|
|
23506
23506
|
}) : !1, K = w == null ? void 0 : w.user, Y = typeof w.data.content == "string" ? (q = w == null ? void 0 : w.data) == null ? void 0 : q.content : (
|
|
23507
23507
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -23617,7 +23617,7 @@ const mC = ({
|
|
|
23617
23617
|
}
|
|
23618
23618
|
),
|
|
23619
23619
|
u == null ? void 0 : u.map((T, z) => {
|
|
23620
|
-
var q, _, A, I, $, H, re, te, ne, ue,
|
|
23620
|
+
var q, _, A, I, $, H, re, te, ne, ue, G, ve;
|
|
23621
23621
|
const {
|
|
23622
23622
|
id: P,
|
|
23623
23623
|
own_children: M,
|
|
@@ -23627,7 +23627,7 @@ const mC = ({
|
|
|
23627
23627
|
} = T, N = (((q = M == null ? void 0 : M.like) == null ? void 0 : q.length) || 0) > 0 ? (_ = M == null ? void 0 : M.like) == null ? void 0 : _.find((pe) => {
|
|
23628
23628
|
var xe;
|
|
23629
23629
|
return ((xe = pe == null ? void 0 : pe.user) == null ? void 0 : xe.id) === (k == null ? void 0 : k.id);
|
|
23630
|
-
}) : !1, K = N ? N == null ? void 0 : N.id : "", Y = !!N,
|
|
23630
|
+
}) : !1, K = N ? N == null ? void 0 : N.id : "", Y = !!N, J = (((A = L == null ? void 0 : L.like) == null ? void 0 : A.length) || 0) > 0 ? (I = L == null ? void 0 : L.like) == null ? void 0 : I.map((pe) => {
|
|
23631
23631
|
var xe, Se, je;
|
|
23632
23632
|
return {
|
|
23633
23633
|
id: (xe = pe == null ? void 0 : pe.user) == null ? void 0 : xe.id,
|
|
@@ -23658,14 +23658,14 @@ const mC = ({
|
|
|
23658
23658
|
name: (te = D.data) == null ? void 0 : te.name,
|
|
23659
23659
|
organization: (ne = D.data) == null ? void 0 : ne.organization,
|
|
23660
23660
|
jobTitle: (ue = D.data) == null ? void 0 : ue.jobTitle,
|
|
23661
|
-
location: (
|
|
23661
|
+
location: (G = D.data) == null ? void 0 : G.location,
|
|
23662
23662
|
image: {
|
|
23663
23663
|
thumbnail: ((ve = D.data) == null ? void 0 : ve.thumbnail) || void 0
|
|
23664
23664
|
}
|
|
23665
23665
|
},
|
|
23666
23666
|
userLiked: Y,
|
|
23667
23667
|
likes: (C == null ? void 0 : C.like) || 0,
|
|
23668
|
-
peopleWhoLiked:
|
|
23668
|
+
peopleWhoLiked: J,
|
|
23669
23669
|
mentions: B
|
|
23670
23670
|
},
|
|
23671
23671
|
functions: {
|
|
@@ -23819,7 +23819,7 @@ const __ = ({
|
|
|
23819
23819
|
leave: u
|
|
23820
23820
|
}
|
|
23821
23821
|
}) => {
|
|
23822
|
-
var P, M, L, C, B, S, N, K, Y,
|
|
23822
|
+
var P, M, L, C, B, S, N, K, Y, Q;
|
|
23823
23823
|
const d = ce(), {
|
|
23824
23824
|
activity: h,
|
|
23825
23825
|
error: p,
|
|
@@ -23839,11 +23839,11 @@ const __ = ({
|
|
|
23839
23839
|
text: d.formatMessage({ id: "activitySection_notFoundError" })
|
|
23840
23840
|
}
|
|
23841
23841
|
);
|
|
23842
|
-
const { own_reactions: v, latest_reactions: x, mentioned_users: k } = h, w = (((P = x == null ? void 0 : x.like) == null ? void 0 : P.length) || 0) > 0, E = (((M = v == null ? void 0 : v.like) == null ? void 0 : M.length) || 0) > 0, F = E ? v == null ? void 0 : v.like[0].id : "", T = w ? (L = x == null ? void 0 : x.like) == null ? void 0 : L.map((
|
|
23842
|
+
const { own_reactions: v, latest_reactions: x, mentioned_users: k } = h, w = (((P = x == null ? void 0 : x.like) == null ? void 0 : P.length) || 0) > 0, E = (((M = v == null ? void 0 : v.like) == null ? void 0 : M.length) || 0) > 0, F = E ? v == null ? void 0 : v.like[0].id : "", T = w ? (L = x == null ? void 0 : x.like) == null ? void 0 : L.map((J) => {
|
|
23843
23843
|
var D, R, q;
|
|
23844
23844
|
return {
|
|
23845
|
-
id: (D =
|
|
23846
|
-
name: (q = (R =
|
|
23845
|
+
id: (D = J == null ? void 0 : J.user) == null ? void 0 : D.id,
|
|
23846
|
+
name: (q = (R = J == null ? void 0 : J.user) == null ? void 0 : R.data) == null ? void 0 : q.name
|
|
23847
23847
|
};
|
|
23848
23848
|
}) : !1, z = h == null ? void 0 : h.actor;
|
|
23849
23849
|
return /* @__PURE__ */ c.jsxs("section", { className: "activity-section", children: [
|
|
@@ -23876,7 +23876,7 @@ const __ = ({
|
|
|
23876
23876
|
},
|
|
23877
23877
|
userLiked: E,
|
|
23878
23878
|
likes: ((Y = h == null ? void 0 : h.reaction_counts) == null ? void 0 : Y.like) || 0,
|
|
23879
|
-
comments: ((
|
|
23879
|
+
comments: ((Q = h == null ? void 0 : h.reaction_counts) == null ? void 0 : Q.reply) || 0,
|
|
23880
23880
|
peopleWhoLiked: T,
|
|
23881
23881
|
mentions: k
|
|
23882
23882
|
},
|
|
@@ -23887,7 +23887,7 @@ const __ = ({
|
|
|
23887
23887
|
createContent: () => null,
|
|
23888
23888
|
deleteContent: a,
|
|
23889
23889
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
23890
|
-
updateContent: (
|
|
23890
|
+
updateContent: (J, { title: D, body: R }) => g({ title: D, content: R })
|
|
23891
23891
|
},
|
|
23892
23892
|
likes: {
|
|
23893
23893
|
createLike: () => f({ activityId: n }),
|
|
@@ -24009,16 +24009,16 @@ var ac;
|
|
|
24009
24009
|
function xC() {
|
|
24010
24010
|
return ac || (ac = 1, process.env.NODE_ENV !== "production" && function() {
|
|
24011
24011
|
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, r = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, o = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, u = e ? Symbol.for("react.concurrent_mode") : 60111, d = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, p = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, g = e ? Symbol.for("react.lazy") : 60116, f = e ? Symbol.for("react.block") : 60121, b = e ? Symbol.for("react.fundamental") : 60117, v = e ? Symbol.for("react.responder") : 60118, x = e ? Symbol.for("react.scope") : 60119;
|
|
24012
|
-
function k(
|
|
24013
|
-
return typeof
|
|
24014
|
-
|
|
24012
|
+
function k(G) {
|
|
24013
|
+
return typeof G == "string" || typeof G == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
24014
|
+
G === r || G === u || G === i || G === a || G === h || G === p || typeof G == "object" && G !== null && (G.$$typeof === g || G.$$typeof === m || G.$$typeof === s || G.$$typeof === o || G.$$typeof === d || G.$$typeof === b || G.$$typeof === v || G.$$typeof === x || G.$$typeof === f);
|
|
24015
24015
|
}
|
|
24016
|
-
function w(
|
|
24017
|
-
if (typeof
|
|
24018
|
-
var ve =
|
|
24016
|
+
function w(G) {
|
|
24017
|
+
if (typeof G == "object" && G !== null) {
|
|
24018
|
+
var ve = G.$$typeof;
|
|
24019
24019
|
switch (ve) {
|
|
24020
24020
|
case t:
|
|
24021
|
-
var pe =
|
|
24021
|
+
var pe = G.type;
|
|
24022
24022
|
switch (pe) {
|
|
24023
24023
|
case l:
|
|
24024
24024
|
case u:
|
|
@@ -24045,47 +24045,47 @@ function xC() {
|
|
|
24045
24045
|
}
|
|
24046
24046
|
}
|
|
24047
24047
|
}
|
|
24048
|
-
var E = l, F = u, T = o, z = s, P = t, M = d, L = r, C = g, B = m, S = n, N = i, K = a, Y = h,
|
|
24049
|
-
function G
|
|
24050
|
-
return
|
|
24048
|
+
var E = l, F = u, T = o, z = s, P = t, M = d, L = r, C = g, B = m, S = n, N = i, K = a, Y = h, Q = !1;
|
|
24049
|
+
function J(G) {
|
|
24050
|
+
return Q || (Q = !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.")), D(G) || w(G) === l;
|
|
24051
24051
|
}
|
|
24052
|
-
function D(
|
|
24053
|
-
return w(
|
|
24052
|
+
function D(G) {
|
|
24053
|
+
return w(G) === u;
|
|
24054
24054
|
}
|
|
24055
|
-
function R(
|
|
24056
|
-
return w(
|
|
24055
|
+
function R(G) {
|
|
24056
|
+
return w(G) === o;
|
|
24057
24057
|
}
|
|
24058
|
-
function q(
|
|
24059
|
-
return w(
|
|
24058
|
+
function q(G) {
|
|
24059
|
+
return w(G) === s;
|
|
24060
24060
|
}
|
|
24061
|
-
function _(
|
|
24062
|
-
return typeof
|
|
24061
|
+
function _(G) {
|
|
24062
|
+
return typeof G == "object" && G !== null && G.$$typeof === t;
|
|
24063
24063
|
}
|
|
24064
|
-
function A(
|
|
24065
|
-
return w(
|
|
24064
|
+
function A(G) {
|
|
24065
|
+
return w(G) === d;
|
|
24066
24066
|
}
|
|
24067
|
-
function I(
|
|
24068
|
-
return w(
|
|
24067
|
+
function I(G) {
|
|
24068
|
+
return w(G) === r;
|
|
24069
24069
|
}
|
|
24070
|
-
function $(
|
|
24071
|
-
return w(
|
|
24070
|
+
function $(G) {
|
|
24071
|
+
return w(G) === g;
|
|
24072
24072
|
}
|
|
24073
|
-
function H(
|
|
24074
|
-
return w(
|
|
24073
|
+
function H(G) {
|
|
24074
|
+
return w(G) === m;
|
|
24075
24075
|
}
|
|
24076
|
-
function re(
|
|
24077
|
-
return w(
|
|
24076
|
+
function re(G) {
|
|
24077
|
+
return w(G) === n;
|
|
24078
24078
|
}
|
|
24079
|
-
function te(
|
|
24080
|
-
return w(
|
|
24079
|
+
function te(G) {
|
|
24080
|
+
return w(G) === i;
|
|
24081
24081
|
}
|
|
24082
|
-
function ne(
|
|
24083
|
-
return w(
|
|
24082
|
+
function ne(G) {
|
|
24083
|
+
return w(G) === a;
|
|
24084
24084
|
}
|
|
24085
|
-
function ue(
|
|
24086
|
-
return w(
|
|
24085
|
+
function ue(G) {
|
|
24086
|
+
return w(G) === h;
|
|
24087
24087
|
}
|
|
24088
|
-
ze.AsyncMode = E, ze.ConcurrentMode = F, ze.ContextConsumer = T, ze.ContextProvider = z, ze.Element = P, ze.ForwardRef = M, ze.Fragment = L, ze.Lazy = C, ze.Memo = B, ze.Portal = S, ze.Profiler = N, ze.StrictMode = K, ze.Suspense = Y, ze.isAsyncMode =
|
|
24088
|
+
ze.AsyncMode = E, ze.ConcurrentMode = F, ze.ContextConsumer = T, ze.ContextProvider = z, ze.Element = P, ze.ForwardRef = M, ze.Fragment = L, ze.Lazy = C, ze.Memo = B, ze.Portal = S, ze.Profiler = N, ze.StrictMode = K, ze.Suspense = Y, ze.isAsyncMode = J, ze.isConcurrentMode = D, ze.isContextConsumer = R, ze.isContextProvider = q, ze.isElement = _, ze.isForwardRef = A, ze.isFragment = I, ze.isLazy = $, ze.isMemo = H, ze.isPortal = re, ze.isProfiler = te, ze.isStrictMode = ne, ze.isSuspense = ue, ze.isValidElementType = k, ze.typeOf = w;
|
|
24089
24089
|
}()), ze;
|
|
24090
24090
|
}
|
|
24091
24091
|
var ic;
|
|
@@ -24265,10 +24265,10 @@ function EC() {
|
|
|
24265
24265
|
function _(I, $, H, re, te, ne, ue) {
|
|
24266
24266
|
if (re = re || p, ne = ne || H, ue !== n) {
|
|
24267
24267
|
if (l) {
|
|
24268
|
-
var
|
|
24268
|
+
var G = new Error(
|
|
24269
24269
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
24270
24270
|
);
|
|
24271
|
-
throw
|
|
24271
|
+
throw G.name = "Invariant Violation", G;
|
|
24272
24272
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
24273
24273
|
var ve = re + ":" + H;
|
|
24274
24274
|
!R[ve] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
@@ -24342,7 +24342,7 @@ function EC() {
|
|
|
24342
24342
|
function F(D) {
|
|
24343
24343
|
function R(q, _, A, I, $) {
|
|
24344
24344
|
if (!(q[_] instanceof D)) {
|
|
24345
|
-
var H = D.name || p, re =
|
|
24345
|
+
var H = D.name || p, re = J(q[_]);
|
|
24346
24346
|
return new f("Invalid " + I + " `" + $ + "` of type " + ("`" + re + "` supplied to `" + A + "`, expected ") + ("instance of `" + H + "`."));
|
|
24347
24347
|
}
|
|
24348
24348
|
return null;
|
|
@@ -24358,9 +24358,9 @@ function EC() {
|
|
|
24358
24358
|
for (var H = q[_], re = 0; re < D.length; re++)
|
|
24359
24359
|
if (g(H, D[re]))
|
|
24360
24360
|
return null;
|
|
24361
|
-
var te = JSON.stringify(D, function(ue,
|
|
24362
|
-
var ve = Y(
|
|
24363
|
-
return ve === "symbol" ? String(
|
|
24361
|
+
var te = JSON.stringify(D, function(ue, G) {
|
|
24362
|
+
var ve = Y(G);
|
|
24363
|
+
return ve === "symbol" ? String(G) : G;
|
|
24364
24364
|
});
|
|
24365
24365
|
return new f("Invalid " + I + " `" + $ + "` of value `" + String(H) + "` " + ("supplied to `" + A + "`, expected one of " + te + "."));
|
|
24366
24366
|
}
|
|
@@ -24390,15 +24390,15 @@ function EC() {
|
|
|
24390
24390
|
var q = D[R];
|
|
24391
24391
|
if (typeof q != "function")
|
|
24392
24392
|
return i(
|
|
24393
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
24393
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Q(q) + " at index " + R + "."
|
|
24394
24394
|
), s;
|
|
24395
24395
|
}
|
|
24396
24396
|
function _(A, I, $, H, re) {
|
|
24397
24397
|
for (var te = [], ne = 0; ne < D.length; ne++) {
|
|
24398
|
-
var ue = D[ne],
|
|
24399
|
-
if (
|
|
24398
|
+
var ue = D[ne], G = ue(A, I, $, H, re, n);
|
|
24399
|
+
if (G == null)
|
|
24400
24400
|
return null;
|
|
24401
|
-
|
|
24401
|
+
G.data && r(G.data, "expectedType") && te.push(G.data.expectedType);
|
|
24402
24402
|
}
|
|
24403
24403
|
var ve = te.length > 0 ? ", expected one of type [" + te.join(", ") + "]" : "";
|
|
24404
24404
|
return new f("Invalid " + H + " `" + re + "` supplied to " + ("`" + $ + "`" + ve + "."));
|
|
@@ -24448,9 +24448,9 @@ function EC() {
|
|
|
24448
24448
|
"Invalid " + I + " `" + $ + "` key `" + ne + "` supplied to `" + A + "`.\nBad object: " + JSON.stringify(q[_], null, " ") + `
|
|
24449
24449
|
Valid keys: ` + JSON.stringify(Object.keys(D), null, " ")
|
|
24450
24450
|
);
|
|
24451
|
-
var
|
|
24452
|
-
if (
|
|
24453
|
-
return
|
|
24451
|
+
var G = ue(H, ne, A, I, $ + "." + ne, n);
|
|
24452
|
+
if (G)
|
|
24453
|
+
return G;
|
|
24454
24454
|
}
|
|
24455
24455
|
return null;
|
|
24456
24456
|
}
|
|
@@ -24508,7 +24508,7 @@ Valid keys: ` + JSON.stringify(Object.keys(D), null, " ")
|
|
|
24508
24508
|
}
|
|
24509
24509
|
return R;
|
|
24510
24510
|
}
|
|
24511
|
-
function
|
|
24511
|
+
function Q(D) {
|
|
24512
24512
|
var R = Y(D);
|
|
24513
24513
|
switch (R) {
|
|
24514
24514
|
case "array":
|
|
@@ -24522,7 +24522,7 @@ Valid keys: ` + JSON.stringify(Object.keys(D), null, " ")
|
|
|
24522
24522
|
return R;
|
|
24523
24523
|
}
|
|
24524
24524
|
}
|
|
24525
|
-
function
|
|
24525
|
+
function J(D) {
|
|
24526
24526
|
return !D.constructor || !D.constructor.name ? p : D.constructor.name;
|
|
24527
24527
|
}
|
|
24528
24528
|
return m.checkPropTypes = a, m.resetWarningCache = a.resetWarningCache, m.PropTypes = m, m;
|
|
@@ -24924,8 +24924,8 @@ var pc = {
|
|
|
24924
24924
|
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
24925
24925
|
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
24926
24926
|
// look inside web components even if open)
|
|
24927
|
-
(S == null ? void 0 : S.includes(K)) || Y.find(function(
|
|
24928
|
-
return
|
|
24927
|
+
(S == null ? void 0 : S.includes(K)) || Y.find(function(Q) {
|
|
24928
|
+
return Q === C;
|
|
24929
24929
|
});
|
|
24930
24930
|
});
|
|
24931
24931
|
}, d = function(C) {
|
|
@@ -24962,9 +24962,9 @@ var pc = {
|
|
|
24962
24962
|
if (s.containerGroups = s.containers.map(function(C) {
|
|
24963
24963
|
var B = Wf(C, i.tabbableOptions), S = Hf(C, i.tabbableOptions), N = B.length > 0 ? B[0] : void 0, K = B.length > 0 ? B[B.length - 1] : void 0, Y = S.find(function(D) {
|
|
24964
24964
|
return xn(D);
|
|
24965
|
-
}),
|
|
24965
|
+
}), Q = S.slice().reverse().find(function(D) {
|
|
24966
24966
|
return xn(D);
|
|
24967
|
-
}),
|
|
24967
|
+
}), J = !!B.find(function(D) {
|
|
24968
24968
|
return dn(D) > 0;
|
|
24969
24969
|
});
|
|
24970
24970
|
return {
|
|
@@ -24972,7 +24972,7 @@ var pc = {
|
|
|
24972
24972
|
tabbableNodes: B,
|
|
24973
24973
|
focusableNodes: S,
|
|
24974
24974
|
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
24975
|
-
posTabIndexesFound:
|
|
24975
|
+
posTabIndexesFound: J,
|
|
24976
24976
|
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
24977
24977
|
firstTabbableNode: N,
|
|
24978
24978
|
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
@@ -24987,7 +24987,7 @@ var pc = {
|
|
|
24987
24987
|
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
24988
24988
|
firstDomTabbableNode: Y,
|
|
24989
24989
|
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
24990
|
-
lastDomTabbableNode:
|
|
24990
|
+
lastDomTabbableNode: Q,
|
|
24991
24991
|
/**
|
|
24992
24992
|
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
24993
24993
|
* in this container, if any.
|
|
@@ -25035,29 +25035,29 @@ var pc = {
|
|
|
25035
25035
|
B = B || ma(S), p();
|
|
25036
25036
|
var Y = null;
|
|
25037
25037
|
if (s.tabbableGroups.length > 0) {
|
|
25038
|
-
var
|
|
25039
|
-
if (
|
|
25038
|
+
var Q = u(B, S), J = Q >= 0 ? s.containerGroups[Q] : void 0;
|
|
25039
|
+
if (Q < 0)
|
|
25040
25040
|
K ? Y = s.tabbableGroups[s.tabbableGroups.length - 1].lastTabbableNode : Y = s.tabbableGroups[0].firstTabbableNode;
|
|
25041
25041
|
else if (K) {
|
|
25042
25042
|
var D = vc(s.tabbableGroups, function($) {
|
|
25043
25043
|
var H = $.firstTabbableNode;
|
|
25044
25044
|
return B === H;
|
|
25045
25045
|
});
|
|
25046
|
-
if (D < 0 && (
|
|
25046
|
+
if (D < 0 && (J.container === B || ka(B, i.tabbableOptions) && !xn(B, i.tabbableOptions) && !J.nextTabbableNode(B, !1)) && (D = Q), D >= 0) {
|
|
25047
25047
|
var R = D === 0 ? s.tabbableGroups.length - 1 : D - 1, q = s.tabbableGroups[R];
|
|
25048
25048
|
Y = dn(B) >= 0 ? q.lastTabbableNode : q.lastDomTabbableNode;
|
|
25049
25049
|
} else
|
|
25050
|
-
jr(S) || (Y =
|
|
25050
|
+
jr(S) || (Y = J.nextTabbableNode(B, !1));
|
|
25051
25051
|
} else {
|
|
25052
25052
|
var _ = vc(s.tabbableGroups, function($) {
|
|
25053
25053
|
var H = $.lastTabbableNode;
|
|
25054
25054
|
return B === H;
|
|
25055
25055
|
});
|
|
25056
|
-
if (_ < 0 && (
|
|
25056
|
+
if (_ < 0 && (J.container === B || ka(B, i.tabbableOptions) && !xn(B, i.tabbableOptions) && !J.nextTabbableNode(B)) && (_ = Q), _ >= 0) {
|
|
25057
25057
|
var A = _ === s.tabbableGroups.length - 1 ? 0 : _ + 1, I = s.tabbableGroups[A];
|
|
25058
25058
|
Y = dn(B) >= 0 ? I.firstTabbableNode : I.firstDomTabbableNode;
|
|
25059
25059
|
} else
|
|
25060
|
-
jr(S) || (Y =
|
|
25060
|
+
jr(S) || (Y = J.nextTabbableNode(B));
|
|
25061
25061
|
}
|
|
25062
25062
|
} else
|
|
25063
25063
|
Y = d("fallbackFocus");
|
|
@@ -25088,12 +25088,12 @@ var pc = {
|
|
|
25088
25088
|
var N, K = !0;
|
|
25089
25089
|
if (s.mostRecentlyFocusedNode)
|
|
25090
25090
|
if (dn(s.mostRecentlyFocusedNode) > 0) {
|
|
25091
|
-
var Y = u(s.mostRecentlyFocusedNode),
|
|
25092
|
-
if (
|
|
25093
|
-
var
|
|
25091
|
+
var Y = u(s.mostRecentlyFocusedNode), Q = s.containerGroups[Y].tabbableNodes;
|
|
25092
|
+
if (Q.length > 0) {
|
|
25093
|
+
var J = Q.findIndex(function(D) {
|
|
25094
25094
|
return D === s.mostRecentlyFocusedNode;
|
|
25095
25095
|
});
|
|
25096
|
-
|
|
25096
|
+
J >= 0 && (i.isKeyForward(s.recentNavEvent) ? J + 1 < Q.length && (N = Q[J + 1], K = !1) : J - 1 >= 0 && (N = Q[J - 1], K = !1));
|
|
25097
25097
|
}
|
|
25098
25098
|
} else
|
|
25099
25099
|
s.containerGroups.some(function(D) {
|
|
@@ -25192,12 +25192,12 @@ var pc = {
|
|
|
25192
25192
|
clearTimeout(s.delayInitialFocusTimer), s.delayInitialFocusTimer = void 0, T(), s.active = !1, s.paused = !1, M(), pc.deactivateTrap(a, o);
|
|
25193
25193
|
var S = l(B, "onDeactivate"), N = l(B, "onPostDeactivate"), K = l(B, "checkCanReturnFocus"), Y = l(B, "returnFocus", "returnFocusOnDeactivate");
|
|
25194
25194
|
S == null || S();
|
|
25195
|
-
var
|
|
25195
|
+
var Q = function() {
|
|
25196
25196
|
gc(function() {
|
|
25197
25197
|
Y && g(f(s.nodeFocusedBeforeActivation)), N == null || N();
|
|
25198
25198
|
});
|
|
25199
25199
|
};
|
|
25200
|
-
return Y && K ? (K(f(s.nodeFocusedBeforeActivation)).then(
|
|
25200
|
+
return Y && K ? (K(f(s.nodeFocusedBeforeActivation)).then(Q, Q), this) : (Q(), this);
|
|
25201
25201
|
},
|
|
25202
25202
|
pause: function(C) {
|
|
25203
25203
|
if (s.paused || !s.active)
|
|
@@ -26332,30 +26332,25 @@ const BE = {
|
|
|
26332
26332
|
handleCardClick: o,
|
|
26333
26333
|
setFocus: l = !1
|
|
26334
26334
|
}) => {
|
|
26335
|
-
var Y,
|
|
26335
|
+
var Y, Q;
|
|
26336
26336
|
const u = ce(), d = Ve(rn), h = d && typeof d.id == "string", p = t.contentType === "communityPage", m = ae.useRef(null), [g, f] = le({
|
|
26337
26337
|
data: null,
|
|
26338
26338
|
isLoading: !0
|
|
26339
26339
|
}), [b, v] = le(null), { data: x, isLoading: k } = g, w = Re(() => {
|
|
26340
|
-
n(t, h).then((
|
|
26341
|
-
f(() => ({ data:
|
|
26342
|
-
}).catch(() => f((
|
|
26343
|
-
}, [e]), E = Re((
|
|
26344
|
-
count:
|
|
26345
|
-
isMember: !!
|
|
26346
|
-
memberType:
|
|
26347
|
-
}
|
|
26340
|
+
n(t, h).then((J) => {
|
|
26341
|
+
f(() => ({ data: J, isLoading: !1 }));
|
|
26342
|
+
}).catch(() => f((J) => ({ ...J, isLoading: !1 })));
|
|
26343
|
+
}, [e]), E = Re((J) => kE(J) ? {
|
|
26344
|
+
count: J.membersCount || 0,
|
|
26345
|
+
isMember: !!J.role,
|
|
26346
|
+
memberType: J.role || null
|
|
26347
|
+
} : {
|
|
26348
26348
|
count: 0,
|
|
26349
26349
|
isMember: !1,
|
|
26350
26350
|
memberType: null
|
|
26351
26351
|
}, []), F = Re(() => {
|
|
26352
|
-
const { slug:
|
|
26353
|
-
|
|
26354
|
-
communitySlug: G,
|
|
26355
|
-
buildMemberData: !r,
|
|
26356
|
-
isCommunityCard: !p,
|
|
26357
|
-
isCommunityCardString: typeof G != "string"
|
|
26358
|
-
}), !(!r || !p || typeof G != "string") && r(G).then(E).then(v).catch(() => f((D) => D));
|
|
26352
|
+
const { slug: J } = t;
|
|
26353
|
+
!r || !p || typeof J != "string" || r(J).then(E).then(v).catch(() => f((D) => D));
|
|
26359
26354
|
}, [r, t, p, E]);
|
|
26360
26355
|
if (he(() => {
|
|
26361
26356
|
w(), F();
|
|
@@ -26383,8 +26378,8 @@ const BE = {
|
|
|
26383
26378
|
} = Ga[T];
|
|
26384
26379
|
let C = x.slug ? `${z}${x.slug}` : !1;
|
|
26385
26380
|
x.slug && (x.slug.slice(0, 4) === "http" || x.slug.slice(0, 2) === "//" || x.slug.slice(0, 6) === "mailto" || x.slug.slice(0, 3) === "tel") && (C = x.slug);
|
|
26386
|
-
const B = (
|
|
26387
|
-
C && (
|
|
26381
|
+
const B = (J) => {
|
|
26382
|
+
C && (J.preventDefault(), J.stopPropagation(), window.location.href = C);
|
|
26388
26383
|
}, S = { ...BE, ...M };
|
|
26389
26384
|
let N = { className: "card" }, K = {};
|
|
26390
26385
|
return C && (K = {
|
|
@@ -26401,7 +26396,7 @@ const BE = {
|
|
|
26401
26396
|
}), l && (N = {
|
|
26402
26397
|
...N,
|
|
26403
26398
|
tabIndex: "0"
|
|
26404
|
-
}, (Y = m == null ? void 0 : m.current) == null || Y.focus(), (
|
|
26399
|
+
}, (Y = m == null ? void 0 : m.current) == null || Y.focus(), (Q = m == null ? void 0 : m.current) == null || Q.scrollIntoView({ behavior: "smooth" })), /* @__PURE__ */ c.jsx(
|
|
26405
26400
|
"li",
|
|
26406
26401
|
{
|
|
26407
26402
|
className: Z("card-wrapper text-medium", P, s, {
|
|
@@ -26459,12 +26454,12 @@ const BE = {
|
|
|
26459
26454
|
{ partner: x.partner[0], number: x.partner.length - 1 }
|
|
26460
26455
|
) : Xn(x.partner[0], S.partner) }),
|
|
26461
26456
|
/* Text */
|
|
26462
|
-
["title", "text", "secondaryText"].map((
|
|
26463
|
-
const D = x[
|
|
26457
|
+
["title", "text", "secondaryText"].map((J) => {
|
|
26458
|
+
const D = x[J];
|
|
26464
26459
|
if (!D)
|
|
26465
26460
|
return null;
|
|
26466
|
-
const R = wh(
|
|
26467
|
-
key:
|
|
26461
|
+
const R = wh(J), q = {
|
|
26462
|
+
key: J,
|
|
26468
26463
|
className: R,
|
|
26469
26464
|
"data-testid": R
|
|
26470
26465
|
}, _ = {
|
|
@@ -26473,9 +26468,9 @@ const BE = {
|
|
|
26473
26468
|
forceInline: !0
|
|
26474
26469
|
}, A = Xn(
|
|
26475
26470
|
D,
|
|
26476
|
-
S[
|
|
26471
|
+
S[J]
|
|
26477
26472
|
);
|
|
26478
|
-
return ["title", "text"].includes(
|
|
26473
|
+
return ["title", "text"].includes(J) && C ? (_.wrapper = "a", /* @__PURE__ */ c.jsx("p", { ...q, children: /* @__PURE__ */ c.jsx(Wt, { options: _, ...K, children: A }) })) : /* @__PURE__ */ c.jsx(Wt, { options: _, ...q, children: A });
|
|
26479
26474
|
}),
|
|
26480
26475
|
p && /* @__PURE__ */ c.jsxs("span", { className: "member-information", children: [
|
|
26481
26476
|
(b == null ? void 0 : b.isMember) && /* @__PURE__ */ c.jsx(
|