@cntrl-site/components 1.0.109 → 1.0.110
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/dist/{Chronicles-Clc3aiGG.mjs → Chronicles-Cy2h3jlZ.mjs} +250 -249
- package/dist/Chronicles-D0ojQzOP.js +196 -0
- package/dist/{ChroniclesComponent-4QMq3nfr.js → ChroniclesComponent-FFenN7yL.js} +1 -1
- package/dist/{ChroniclesComponent-CwSeQzn1.mjs → ChroniclesComponent-cZLqN307.mjs} +53 -57
- package/dist/Components/Chronicles/Chronicles.d.ts +1 -2
- package/dist/Components/Chronicles/ChroniclesComponent.d.ts +2 -8
- package/dist/{components-Dn_5L1zL.mjs → components-DtO0Ti47.mjs} +1 -1
- package/dist/{components-CU9RB7sz.js → components-f82884Bk.js} +1 -1
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +1 -1
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +2 -2
- package/dist/sources.js +24 -16
- package/dist/sources.mjs +24 -16
- package/package.json +1 -1
- package/dist/Chronicles-DBqZzhwf.js +0 -198
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as p, jsxs as E, Fragment as
|
|
2
|
-
import { useMemo as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import
|
|
5
|
-
import { s as
|
|
6
|
-
import { b as
|
|
7
|
-
import { u as
|
|
8
|
-
import { b as
|
|
1
|
+
import { jsx as p, jsxs as E, Fragment as Tt } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as ae, useRef as R, useState as f, useEffect as h, useCallback as _t, useLayoutEffect as se, Fragment as kt } from "react";
|
|
3
|
+
import { createPortal as zt } from "react-dom";
|
|
4
|
+
import x from "classnames";
|
|
5
|
+
import { s as At } from "./scalingValue-C9JH5L6O.mjs";
|
|
6
|
+
import { b as Ht } from "./buildColorVars-CLyWQm5K.mjs";
|
|
7
|
+
import { u as Ft } from "./useScopedStyles-DhBG3557.mjs";
|
|
8
|
+
import { b as Wt } from "./buildValidUrl-BbtqqeHr.mjs";
|
|
9
9
|
import { o as Xe, t as Ye } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
10
|
-
import { u as
|
|
11
|
-
const
|
|
10
|
+
import { u as Vt } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
|
|
11
|
+
const Bt = ["title2", "title3", "title4"], q = ["column1Width", "column2Width", "column3Width", "column4Width"], Dt = ["column1", "column2", "column3", "column4", "column5"], jt = ["title", ...Bt], Qe = {
|
|
12
12
|
center: { x: "50%", y: "50%" },
|
|
13
13
|
"left-top": { x: "0%", y: "0%" },
|
|
14
14
|
"top-center": { x: "50%", y: "0%" },
|
|
@@ -18,12 +18,12 @@ const jt = ["title2", "title3", "title4"], q = ["column1Width", "column2Width",
|
|
|
18
18
|
"left-bottom": { x: "0%", y: "100%" },
|
|
19
19
|
"bottom-center": { x: "50%", y: "100%" },
|
|
20
20
|
"right-bottom": { x: "100%", y: "100%" }
|
|
21
|
-
},
|
|
21
|
+
}, po = Object.keys(Qe), V = 300, ue = 300, Z = 4e-3, Gt = 20, qe = /\.(mp4|webm|ogg|mov)(\?|$)/i, Pe = [
|
|
22
22
|
"--cntrl-article-width",
|
|
23
23
|
"--cntrl-article-top",
|
|
24
24
|
"--cntrl-article-left",
|
|
25
25
|
"--cntrl-viewport-height"
|
|
26
|
-
],
|
|
26
|
+
], Kt = {
|
|
27
27
|
triggerColor: "trigger-color",
|
|
28
28
|
triggerHoverColor: "trigger-hover-color",
|
|
29
29
|
closeColor: "close-color",
|
|
@@ -32,46 +32,46 @@ const jt = ["title2", "title3", "title4"], q = ["column1Width", "column2Width",
|
|
|
32
32
|
textColor: "text-color",
|
|
33
33
|
textHoverColor: "text-hover-color",
|
|
34
34
|
overlayColor: "overlay-color"
|
|
35
|
-
},
|
|
35
|
+
}, Ut = [
|
|
36
36
|
{ side: "top", axis: "y", variant: "row-padding" },
|
|
37
37
|
{ side: "bottom", axis: "y", variant: "row-padding", reverse: !0 },
|
|
38
38
|
{ side: "left", axis: "x", variant: "column-padding", opposite: "right" },
|
|
39
39
|
{ side: "right", axis: "x", variant: "column-padding", opposite: "left", reverse: !0 }
|
|
40
40
|
];
|
|
41
|
-
function et({ columns: e, columnGap: o, panelWidth: n, panelPadding:
|
|
42
|
-
return Math.max(0, n -
|
|
41
|
+
function et({ columns: e, columnGap: o, panelWidth: n, panelPadding: i }) {
|
|
42
|
+
return Math.max(0, n - i.left - i.right - (e - 1) * o);
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Xt(e) {
|
|
45
45
|
const o = et(e) / e.columns;
|
|
46
46
|
return Object.fromEntries(q.slice(0, e.columns - 1).map((n) => [n, o]));
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...
|
|
48
|
+
function mo(e, o) {
|
|
49
|
+
return typeof e.columns != "number" || e.columns === o.columns ? e : { ...e, ...Xt({ ...o, ...e }) };
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Yt(e) {
|
|
52
52
|
const o = et(e), n = q.slice(0, e.columns - 1).map((c) => {
|
|
53
53
|
const d = e[c];
|
|
54
54
|
return typeof d == "number" ? Math.max(0, d) : o / e.columns;
|
|
55
|
-
}),
|
|
56
|
-
return [...n.map((c) => c * a), Math.max(0, o -
|
|
55
|
+
}), i = n.reduce((c, d) => c + d, 0), a = i > o ? o / i : 1;
|
|
56
|
+
return [...n.map((c) => c * a), Math.max(0, o - i * a)];
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
const o = e.reduce((n,
|
|
58
|
+
function qt(e) {
|
|
59
|
+
const o = e.reduce((n, i) => n + i, 0);
|
|
60
60
|
return e.map((n) => `minmax(0, ${o > 0 ? n / o * 100 : 1}fr)`).join(" ");
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function Zt(e) {
|
|
63
63
|
const o = [];
|
|
64
|
-
return e.forEach((n,
|
|
64
|
+
return e.forEach((n, i) => {
|
|
65
65
|
var d;
|
|
66
66
|
const a = ((d = n.group) == null ? void 0 : d.trim()) ?? "", c = o[o.length - 1];
|
|
67
67
|
if (!c || a !== "" && a !== c.label) {
|
|
68
|
-
o.push({ label: a, rows: [{ item: n, index:
|
|
68
|
+
o.push({ label: a, rows: [{ item: n, index: i }] });
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
c.rows.push({ item: n, index:
|
|
71
|
+
c.rows.push({ item: n, index: i });
|
|
72
72
|
}), o;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function W(e) {
|
|
75
75
|
return ((e == null ? void 0 : e.image) ?? []).filter((o) => !!(o != null && o.assetId));
|
|
76
76
|
}
|
|
77
77
|
function Ze(e, o, n) {
|
|
@@ -81,20 +81,23 @@ function tt({ type: e, name: o, assetId: n }) {
|
|
|
81
81
|
return e ? e === "video" : qe.test(o ?? "") || qe.test(n);
|
|
82
82
|
}
|
|
83
83
|
function ot(e) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
const o = e ? getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
85
|
+
if (!o) return e;
|
|
86
|
+
let n = e;
|
|
87
|
+
for (let i = n.parentElement; i && getComputedStyle(i).getPropertyValue("--cntrl-article-width").trim() === o; i = i.parentElement)
|
|
88
|
+
n = i;
|
|
89
|
+
return n;
|
|
90
|
+
}
|
|
91
|
+
function ce(e) {
|
|
89
92
|
const o = ot(e);
|
|
90
93
|
if (!o) return {};
|
|
91
94
|
const n = getComputedStyle(o);
|
|
92
95
|
return Object.fromEntries(
|
|
93
|
-
Pe.map((
|
|
96
|
+
Pe.map((i) => [i, n.getPropertyValue(i).trim()]).filter(([, i]) => i)
|
|
94
97
|
);
|
|
95
98
|
}
|
|
96
99
|
function Je(e, o) {
|
|
97
|
-
const n = (
|
|
100
|
+
const n = (i) => e[`${o}${i}`];
|
|
98
101
|
return {
|
|
99
102
|
fontSettings: { fontFamily: n("FontFamily"), ...n("FontSettings") },
|
|
100
103
|
fontSize: n("FontSize"),
|
|
@@ -106,7 +109,7 @@ function Je(e, o) {
|
|
|
106
109
|
color: "#000000"
|
|
107
110
|
};
|
|
108
111
|
}
|
|
109
|
-
function
|
|
112
|
+
function Jt(e) {
|
|
110
113
|
return `
|
|
111
114
|
.${e}-trigger,
|
|
112
115
|
.${e}-close {
|
|
@@ -143,8 +146,7 @@ function Pt(e) {
|
|
|
143
146
|
outline: 1px solid currentColor;
|
|
144
147
|
outline-offset: 2px;
|
|
145
148
|
}
|
|
146
|
-
.${e}-interactive .${e}-trigger:hover
|
|
147
|
-
.${e}-state-hover .${e}-trigger {
|
|
149
|
+
.${e}-interactive .${e}-trigger:hover {
|
|
148
150
|
color: var(--${e}-trigger-hover-color, var(--${e}-trigger-color));
|
|
149
151
|
}
|
|
150
152
|
.${e}-close:hover {
|
|
@@ -207,7 +209,7 @@ function Pt(e) {
|
|
|
207
209
|
}
|
|
208
210
|
.${e}-media-visible,
|
|
209
211
|
.${e}-media-fading {
|
|
210
|
-
transition: opacity ${
|
|
212
|
+
transition: opacity ${ue}ms cubic-bezier(0, 0, 0.58, 1);
|
|
211
213
|
}
|
|
212
214
|
.${e}-media-visible {
|
|
213
215
|
z-index: 1;
|
|
@@ -295,8 +297,7 @@ a.${e}-row {
|
|
|
295
297
|
}
|
|
296
298
|
.${e}-interactive .${e}-row:hover .${e}-title,
|
|
297
299
|
.${e}-row:focus-visible .${e}-title,
|
|
298
|
-
.${e}-panel-copy .${e}-row-active .${e}-title
|
|
299
|
-
.${e}-state-hover .${e}-row:first-of-type .${e}-title {
|
|
300
|
+
.${e}-panel-copy .${e}-row-active .${e}-title {
|
|
300
301
|
color: var(--${e}-text-hover-color, var(--${e}-text-color));
|
|
301
302
|
}
|
|
302
303
|
.${e}-control-anchor {
|
|
@@ -306,24 +307,24 @@ a.${e}-row {
|
|
|
306
307
|
}
|
|
307
308
|
`;
|
|
308
309
|
}
|
|
309
|
-
function
|
|
310
|
-
const
|
|
310
|
+
function Qt({ P: e, media: o, isVisible: n, isLoaded: i, isCovered: a, isFading: c, onLoad: d }) {
|
|
311
|
+
const y = R(null), r = tt(o), O = x(
|
|
311
312
|
`${e}-media`,
|
|
312
313
|
o.objectFit === "contain" && `${e}-media-contain`,
|
|
313
|
-
n &&
|
|
314
|
+
n && i && `${e}-media-visible`,
|
|
314
315
|
a && `${e}-media-covered`,
|
|
315
316
|
c && `${e}-media-fading`
|
|
316
317
|
);
|
|
317
318
|
return h(() => {
|
|
318
|
-
var
|
|
319
|
-
const
|
|
320
|
-
|
|
321
|
-
}) :
|
|
322
|
-
}, [n]),
|
|
319
|
+
var B;
|
|
320
|
+
const N = y.current;
|
|
321
|
+
N && (n ? (B = N.play()) == null || B.catch(() => {
|
|
322
|
+
}) : N.pause());
|
|
323
|
+
}, [n]), r ? /* @__PURE__ */ p(
|
|
323
324
|
"video",
|
|
324
325
|
{
|
|
325
|
-
ref:
|
|
326
|
-
className:
|
|
326
|
+
ref: y,
|
|
327
|
+
className: O,
|
|
327
328
|
src: o.assetId,
|
|
328
329
|
muted: !0,
|
|
329
330
|
loop: !0,
|
|
@@ -331,31 +332,31 @@ function eo({ P: e, media: o, isVisible: n, isLoaded: l, isCovered: a, isFading:
|
|
|
331
332
|
preload: "auto",
|
|
332
333
|
onLoadedData: d
|
|
333
334
|
}
|
|
334
|
-
) : /* @__PURE__ */ p("img", { className:
|
|
335
|
+
) : /* @__PURE__ */ p("img", { className: O, src: o.assetId, alt: "", decoding: "async", onLoad: d });
|
|
335
336
|
}
|
|
336
|
-
function
|
|
337
|
+
function Pt(e, o, n, i, a) {
|
|
337
338
|
const c = o[o.length - 1];
|
|
338
339
|
let d = n;
|
|
339
|
-
return o.slice(0, -1).map((
|
|
340
|
-
const
|
|
341
|
-
return d +=
|
|
340
|
+
return o.slice(0, -1).map((y, r) => {
|
|
341
|
+
const O = d + y + i / 2;
|
|
342
|
+
return d += y + i, /* @__PURE__ */ p(
|
|
342
343
|
"div",
|
|
343
344
|
{
|
|
344
|
-
"data-controls": q[
|
|
345
|
+
"data-controls": q[r],
|
|
345
346
|
"data-controls-axis": "x",
|
|
346
347
|
"data-controls-variant": "column-width",
|
|
347
|
-
"data-controls-min": String(
|
|
348
|
-
"data-controls-max-fraction": String(
|
|
348
|
+
"data-controls-min": String(Gt),
|
|
349
|
+
"data-controls-max-fraction": String(y + c),
|
|
349
350
|
className: `${e}-control-anchor`,
|
|
350
|
-
style: { top: 0, left: a(
|
|
351
|
+
style: { top: 0, left: a(O - Z / 2), width: a(Z), height: "100%" }
|
|
351
352
|
},
|
|
352
|
-
q[
|
|
353
|
+
q[r]
|
|
353
354
|
);
|
|
354
355
|
});
|
|
355
356
|
}
|
|
356
|
-
function
|
|
357
|
-
return
|
|
358
|
-
const c =
|
|
357
|
+
function eo(e, o, n, i) {
|
|
358
|
+
return Ut.map((a) => {
|
|
359
|
+
const c = i(Math.max(n[a.side], Z)), d = a.axis === "x";
|
|
359
360
|
return /* @__PURE__ */ p(
|
|
360
361
|
"div",
|
|
361
362
|
{
|
|
@@ -379,197 +380,198 @@ function vo({
|
|
|
379
380
|
settings: e,
|
|
380
381
|
content: o,
|
|
381
382
|
isEditor: n,
|
|
382
|
-
isEditMode:
|
|
383
|
+
isEditMode: i,
|
|
383
384
|
isPreviewMode: a,
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
unavailableStates: S
|
|
385
|
+
portalId: c,
|
|
386
|
+
currentState: d,
|
|
387
|
+
unavailableStates: y
|
|
388
388
|
}) {
|
|
389
|
-
var
|
|
390
|
-
const { prefix: r } =
|
|
391
|
-
type:
|
|
392
|
-
triggerLabel:
|
|
393
|
-
closeLabel:
|
|
389
|
+
var je;
|
|
390
|
+
const { prefix: r } = Ft(), {
|
|
391
|
+
type: O,
|
|
392
|
+
triggerLabel: N,
|
|
393
|
+
closeLabel: B,
|
|
394
394
|
columns: J,
|
|
395
|
-
columnGap:
|
|
396
|
-
hoverInterval:
|
|
397
|
-
panelPosition:
|
|
398
|
-
panelWidth:
|
|
399
|
-
panelPadding:
|
|
400
|
-
panelRadius:
|
|
401
|
-
groupGap:
|
|
402
|
-
triggerColor:
|
|
403
|
-
triggerHoverColor:
|
|
404
|
-
closeColor:
|
|
405
|
-
closeHoverColor:
|
|
406
|
-
panelColor:
|
|
407
|
-
textColor:
|
|
408
|
-
textHoverColor:
|
|
409
|
-
overlayColor:
|
|
410
|
-
} = e,
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
}, [
|
|
414
|
-
if (
|
|
415
|
-
te(
|
|
395
|
+
columnGap: de,
|
|
396
|
+
hoverInterval: pe,
|
|
397
|
+
panelPosition: nt,
|
|
398
|
+
panelWidth: me,
|
|
399
|
+
panelPadding: T,
|
|
400
|
+
panelRadius: rt,
|
|
401
|
+
groupGap: ve,
|
|
402
|
+
triggerColor: it,
|
|
403
|
+
triggerHoverColor: lt,
|
|
404
|
+
closeColor: at,
|
|
405
|
+
closeHoverColor: st,
|
|
406
|
+
panelColor: ct,
|
|
407
|
+
textColor: ut,
|
|
408
|
+
textHoverColor: dt,
|
|
409
|
+
overlayColor: pt
|
|
410
|
+
} = e, S = ae(() => o ?? [], [o]), D = R(null), j = R(null), Q = R(null), fe = R(null), ge = R(null), he = R(null), $e = R(null), [mt, G] = f(!1), [_, ye] = f(!1), [A, we] = f(!1), [be, Ce] = f(!1), [g, k] = f(null), [xe, Se] = f(0), [P, vt] = f(() => /* @__PURE__ */ new Set()), [Le, ft] = f(() => /* @__PURE__ */ new Set()), [K, Ie] = f(null), [gt, ht] = f(null), [M, $t] = f(null), [ee, te] = f({}), [oe, ne] = f(null), [yt, Re] = f(!1), z = n && !a, w = !z, m = O === "a", wt = z && d === "open" && !(y != null && y.includes("open")), b = !m && (wt || (w || i) && mt), Me = w && (m || b), $ = (t) => At(t, n ?? !1), bt = ae(() => Jt(r), [r]), Ee = Qe[nt], Oe = Yt(e), Ct = jt.slice(0, J - 1), H = J > 1, xt = ae(() => H ? Zt(S) : [{ label: "", rows: S.map((t, l) => ({ item: t, index: l })) }], [S, H]), U = g === null ? [] : W(S[g]), Ne = U[xe], L = g !== null && Ne ? Ze(g, xe, Ne.assetId) : null, Te = L !== null && Le.has(L);
|
|
411
|
+
Vt(b && !z), h(() => {
|
|
412
|
+
z && !i && G(!1);
|
|
413
|
+
}, [z, i]), h(() => {
|
|
414
|
+
if (b) {
|
|
415
|
+
te(ce(D.current)), ye(!0);
|
|
416
416
|
return;
|
|
417
417
|
}
|
|
418
|
-
|
|
419
|
-
const t = window.setTimeout(() =>
|
|
418
|
+
we(!1), k(null);
|
|
419
|
+
const t = window.setTimeout(() => ye(!1), V);
|
|
420
420
|
return () => window.clearTimeout(t);
|
|
421
|
-
}, [
|
|
422
|
-
var
|
|
423
|
-
if (!
|
|
424
|
-
(
|
|
425
|
-
const t = requestAnimationFrame(() =>
|
|
421
|
+
}, [b]), h(() => {
|
|
422
|
+
var l;
|
|
423
|
+
if (!b || !_) return;
|
|
424
|
+
(l = Q.current) == null || l.getBoundingClientRect();
|
|
425
|
+
const t = requestAnimationFrame(() => we(!0));
|
|
426
426
|
return () => cancelAnimationFrame(t);
|
|
427
|
-
}, [
|
|
428
|
-
if (!
|
|
429
|
-
|
|
427
|
+
}, [b, _]), h(() => {
|
|
428
|
+
if (!A) {
|
|
429
|
+
Ce(!1);
|
|
430
430
|
return;
|
|
431
431
|
}
|
|
432
|
-
const t = window.setTimeout(() =>
|
|
432
|
+
const t = window.setTimeout(() => Ce(!0), V);
|
|
433
433
|
return () => window.clearTimeout(t);
|
|
434
|
-
}, [
|
|
435
|
-
const X =
|
|
436
|
-
const t = j.current,
|
|
437
|
-
if (!t || !
|
|
438
|
-
const u = t.getBoundingClientRect(), s =
|
|
439
|
-
|
|
440
|
-
}, []),
|
|
434
|
+
}, [A]);
|
|
435
|
+
const X = _t(() => {
|
|
436
|
+
const t = j.current, l = Q.current;
|
|
437
|
+
if (!t || !l) return;
|
|
438
|
+
const u = t.getBoundingClientRect(), s = l.getBoundingClientRect();
|
|
439
|
+
$t({ top: u.top - s.top, left: u.left - s.left });
|
|
440
|
+
}, []), _e = _ || m && P.size > 0;
|
|
441
441
|
h(() => {
|
|
442
442
|
const t = D.current;
|
|
443
|
-
if (!
|
|
444
|
-
const
|
|
445
|
-
const
|
|
446
|
-
return Pe.every((Y) =>
|
|
447
|
-
}), u = new ResizeObserver(
|
|
443
|
+
if (!_e || !t || typeof ResizeObserver > "u") return;
|
|
444
|
+
const l = () => te((C) => {
|
|
445
|
+
const I = ce(t);
|
|
446
|
+
return Pe.every((Y) => C[Y] === I[Y]) ? C : I;
|
|
447
|
+
}), u = new ResizeObserver(l);
|
|
448
448
|
u.observe(t);
|
|
449
|
-
const s = ot(t);
|
|
450
|
-
return
|
|
451
|
-
|
|
452
|
-
|
|
449
|
+
const s = new MutationObserver(l), v = ot(t);
|
|
450
|
+
return v && v !== t && (u.observe(v), s.observe(v, { attributes: !0, attributeFilter: ["style"] })), () => {
|
|
451
|
+
u.disconnect(), s.disconnect();
|
|
452
|
+
};
|
|
453
|
+
}, [_e]), se(() => {
|
|
454
|
+
if (_)
|
|
453
455
|
return X(), window.addEventListener("resize", X), () => window.removeEventListener("resize", X);
|
|
454
|
-
}, [
|
|
455
|
-
var
|
|
456
|
-
if (!
|
|
457
|
-
(
|
|
456
|
+
}, [_, ee, X]), h(() => {
|
|
457
|
+
var l;
|
|
458
|
+
if (!b || !w) return;
|
|
459
|
+
(l = fe.current) == null || l.focus({ preventScroll: !0 });
|
|
458
460
|
const t = (u) => {
|
|
459
461
|
var s;
|
|
460
462
|
u.key === "Escape" && (G(!1), (s = j.current) == null || s.focus({ preventScroll: !0 }));
|
|
461
463
|
};
|
|
462
464
|
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
463
|
-
}, [
|
|
465
|
+
}, [b, w]), se(() => {
|
|
464
466
|
if (!m || g === null) return;
|
|
465
|
-
const t =
|
|
466
|
-
if (!t || !
|
|
467
|
-
const u = t.getBoundingClientRect(), s =
|
|
467
|
+
const t = ge.current, l = he.current;
|
|
468
|
+
if (!t || !l) return;
|
|
469
|
+
const u = t.getBoundingClientRect(), s = l.getBoundingClientRect();
|
|
468
470
|
ne({ top: u.top - s.top, left: u.left - s.left, width: u.width });
|
|
469
471
|
}, [m, g]), h(() => {
|
|
470
472
|
if (g !== null) return;
|
|
471
|
-
const t = window.setTimeout(() => ne(null),
|
|
473
|
+
const t = window.setTimeout(() => ne(null), ue);
|
|
472
474
|
return () => window.clearTimeout(t);
|
|
473
475
|
}, [g]);
|
|
474
476
|
const ke = oe !== null;
|
|
475
477
|
h(() => {
|
|
476
478
|
if (!m || !ke) return;
|
|
477
479
|
const t = () => {
|
|
478
|
-
|
|
480
|
+
Re(!0), k(null), ne(null);
|
|
479
481
|
};
|
|
480
482
|
return document.addEventListener("scroll", t, { capture: !0, passive: !0 }), window.addEventListener("resize", t), () => {
|
|
481
483
|
document.removeEventListener("scroll", t, { capture: !0 }), window.removeEventListener("resize", t);
|
|
482
484
|
};
|
|
483
485
|
}, [m, ke]), h(() => {
|
|
484
|
-
|
|
485
|
-
tt(
|
|
486
|
+
Me && S.forEach((t) => W(t).forEach((l) => {
|
|
487
|
+
tt(l) || (new Image().src = l.assetId);
|
|
486
488
|
}));
|
|
487
|
-
}, [
|
|
489
|
+
}, [Me, S]), h(() => {
|
|
488
490
|
if (U.length < 2) return;
|
|
489
491
|
const t = window.setInterval(() => {
|
|
490
|
-
|
|
491
|
-
},
|
|
492
|
+
Se((l) => (l + 1) % U.length);
|
|
493
|
+
}, pe);
|
|
492
494
|
return () => window.clearInterval(t);
|
|
493
|
-
}, [g, U.length,
|
|
494
|
-
const t =
|
|
495
|
-
|
|
496
|
-
}, [
|
|
497
|
-
if (!
|
|
498
|
-
const t = window.setTimeout(() =>
|
|
495
|
+
}, [g, U.length, pe]), se(() => {
|
|
496
|
+
const t = $e.current;
|
|
497
|
+
$e.current = L, L !== null && (ht(L), Ie(t));
|
|
498
|
+
}, [L]), h(() => {
|
|
499
|
+
if (!Te || K === null) return;
|
|
500
|
+
const t = window.setTimeout(() => Ie(null), ue);
|
|
499
501
|
return () => window.clearTimeout(t);
|
|
500
|
-
}, [
|
|
501
|
-
const
|
|
502
|
+
}, [Te, K]);
|
|
503
|
+
const ze = () => {
|
|
502
504
|
var t;
|
|
503
|
-
|
|
504
|
-
},
|
|
505
|
-
if (!
|
|
506
|
-
|
|
505
|
+
w && (G(!1), (t = j.current) == null || t.focus({ preventScroll: !0 }));
|
|
506
|
+
}, Ae = (t) => {
|
|
507
|
+
if (!w || W(S[t]).length === 0) {
|
|
508
|
+
k(null);
|
|
507
509
|
return;
|
|
508
510
|
}
|
|
509
|
-
|
|
510
|
-
},
|
|
511
|
-
|
|
512
|
-
},
|
|
513
|
-
!
|
|
514
|
-
},
|
|
515
|
-
triggerColor:
|
|
516
|
-
triggerHoverColor:
|
|
517
|
-
closeColor:
|
|
518
|
-
closeHoverColor:
|
|
519
|
-
panelColor:
|
|
520
|
-
textColor:
|
|
521
|
-
textHoverColor:
|
|
522
|
-
overlayColor:
|
|
523
|
-
},
|
|
524
|
-
const s = Ze(t, u,
|
|
511
|
+
vt((l) => l.has(t) ? l : new Set(l).add(t)), m && g === null && te(ce(D.current)), g !== t && Se(0), Re(!1), k(t);
|
|
512
|
+
}, He = (t) => {
|
|
513
|
+
k((l) => l === t ? null : l);
|
|
514
|
+
}, St = (t) => {
|
|
515
|
+
!w && t.target.closest("a") && t.preventDefault();
|
|
516
|
+
}, Fe = Xe(Ye(Je(e, "trigger"), n)), F = Dt.slice(0, J).map((t) => Xe(Ye(Je(e, t), n))), We = F[0].lineHeight, Ve = (je = F[1]) == null ? void 0 : je.lineHeight, Lt = We !== void 0 && Ve !== void 0 ? `calc((${Ve} - ${We}) / 2)` : void 0, re = Ht(r, {
|
|
517
|
+
triggerColor: it,
|
|
518
|
+
triggerHoverColor: lt,
|
|
519
|
+
closeColor: at,
|
|
520
|
+
closeHoverColor: st,
|
|
521
|
+
panelColor: ct,
|
|
522
|
+
textColor: ut,
|
|
523
|
+
textHoverColor: dt,
|
|
524
|
+
overlayColor: pt
|
|
525
|
+
}, Kt, []), ie = w ? `${r}-interactive` : "", It = !!i && (m || be), Be = /* @__PURE__ */ p("div", { className: x(`${r}-media-layer`, yt && `${r}-media-layer-instant`), "aria-hidden": "true", children: [...P].flatMap((t) => W(S[t]).map((l, u) => {
|
|
526
|
+
const s = Ze(t, u, l.assetId);
|
|
525
527
|
return /* @__PURE__ */ p(
|
|
526
|
-
|
|
528
|
+
Qt,
|
|
527
529
|
{
|
|
528
530
|
P: r,
|
|
529
|
-
media:
|
|
530
|
-
isVisible: s ===
|
|
531
|
-
isLoaded:
|
|
531
|
+
media: l,
|
|
532
|
+
isVisible: s === L,
|
|
533
|
+
isLoaded: Le.has(s),
|
|
532
534
|
isCovered: s === K,
|
|
533
|
-
isFading:
|
|
534
|
-
onLoad: () =>
|
|
535
|
+
isFading: L === null && (s === gt || s === K),
|
|
536
|
+
onLoad: () => ft((v) => v.has(s) ? v : new Set(v).add(s))
|
|
535
537
|
},
|
|
536
538
|
s
|
|
537
539
|
);
|
|
538
|
-
})) }),
|
|
539
|
-
const
|
|
540
|
+
})) }), le = (t) => {
|
|
541
|
+
const l = !t && It;
|
|
540
542
|
return /* @__PURE__ */ E(
|
|
541
543
|
"div",
|
|
542
544
|
{
|
|
543
|
-
ref: t ? void 0 :
|
|
544
|
-
className:
|
|
545
|
+
ref: t ? void 0 : ge,
|
|
546
|
+
className: x(
|
|
545
547
|
`${r}-panel`,
|
|
546
|
-
|
|
548
|
+
A && be && `${r}-panel-settled`,
|
|
547
549
|
m && `${r}-panel-inline`,
|
|
548
550
|
t && `${r}-panel-copy`
|
|
549
551
|
),
|
|
550
552
|
style: {
|
|
551
|
-
width: $(
|
|
552
|
-
paddingTop: $(
|
|
553
|
-
paddingRight: $(
|
|
554
|
-
paddingBottom: $(
|
|
555
|
-
paddingLeft: $(
|
|
556
|
-
borderRadius: $(
|
|
557
|
-
[`--${r}-group-gap`]: $(
|
|
558
|
-
[`--${r}-panel-x`]:
|
|
559
|
-
[`--${r}-panel-y`]:
|
|
560
|
-
[`--${r}-grid-columns`]:
|
|
561
|
-
[`--${r}-column-gap`]: $(
|
|
553
|
+
width: $(me),
|
|
554
|
+
paddingTop: $(T.top),
|
|
555
|
+
paddingRight: $(T.right),
|
|
556
|
+
paddingBottom: $(T.bottom),
|
|
557
|
+
paddingLeft: $(T.left),
|
|
558
|
+
borderRadius: $(rt),
|
|
559
|
+
[`--${r}-group-gap`]: $(ve),
|
|
560
|
+
[`--${r}-panel-x`]: Ee.x,
|
|
561
|
+
[`--${r}-panel-y`]: Ee.y,
|
|
562
|
+
[`--${r}-grid-columns`]: qt(Oe),
|
|
563
|
+
[`--${r}-column-gap`]: $(de),
|
|
562
564
|
...t && oe
|
|
563
565
|
},
|
|
564
566
|
"data-lightbox-scrollable": m ? void 0 : "",
|
|
565
567
|
"aria-hidden": t || void 0,
|
|
566
|
-
onMouseLeave: t ? void 0 : () =>
|
|
567
|
-
onClickCapture: t ? void 0 :
|
|
568
|
+
onMouseLeave: t ? void 0 : () => k(null),
|
|
569
|
+
onClickCapture: t ? void 0 : St,
|
|
568
570
|
children: [
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
l && eo(r, me, T, $),
|
|
572
|
+
l && Pt(r, Oe, T.left, de, $),
|
|
573
|
+
xt.map((u, s) => /* @__PURE__ */ E(kt, { children: [
|
|
574
|
+
l && s > 0 && /* @__PURE__ */ p(
|
|
573
575
|
"div",
|
|
574
576
|
{
|
|
575
577
|
"data-controls": "groupGap",
|
|
@@ -578,47 +580,47 @@ function vo({
|
|
|
578
580
|
"data-controls-reverse": "",
|
|
579
581
|
"data-controls-min": "0",
|
|
580
582
|
className: `${r}-control-anchor`,
|
|
581
|
-
style: { left: 0, width: "100%", height: $(Math.max(
|
|
583
|
+
style: { left: 0, width: "100%", height: $(Math.max(ve, Z)) }
|
|
582
584
|
}
|
|
583
585
|
),
|
|
584
586
|
/* @__PURE__ */ E(
|
|
585
587
|
"div",
|
|
586
588
|
{
|
|
587
|
-
className:
|
|
589
|
+
className: x(`${r}-group`, !H && `${r}-group-unlabeled`),
|
|
588
590
|
style: { gridTemplateRows: `repeat(${u.rows.length}, auto) 1fr` },
|
|
589
591
|
children: [
|
|
590
|
-
|
|
592
|
+
H && /* @__PURE__ */ p(
|
|
591
593
|
"span",
|
|
592
594
|
{
|
|
593
595
|
className: `${r}-group-label`,
|
|
594
|
-
style: { ...
|
|
596
|
+
style: { ...F[0], gridRow: `1 / span ${u.rows.length + 1}`, marginTop: Lt },
|
|
595
597
|
children: u.label
|
|
596
598
|
}
|
|
597
599
|
),
|
|
598
|
-
u.rows.map(({ item: v, index:
|
|
600
|
+
u.rows.map(({ item: v, index: C }) => {
|
|
599
601
|
var Ke;
|
|
600
|
-
const
|
|
601
|
-
href:
|
|
602
|
-
...
|
|
603
|
-
} : {},
|
|
604
|
-
tabIndex:
|
|
605
|
-
onMouseEnter: () =>
|
|
606
|
-
onMouseLeave: () =>
|
|
607
|
-
onFocus: () =>
|
|
608
|
-
onBlur: () =>
|
|
602
|
+
const I = !t && ((Ke = v.link) != null && Ke.value) ? v.link : void 0, Ge = I ? "a" : "div", Y = I ? {
|
|
603
|
+
href: Wt(I.value),
|
|
604
|
+
...I.target === "blank" && { target: "_blank", rel: "noreferrer" }
|
|
605
|
+
} : {}, Et = !I && w && W(v).length > 0, Ot = t ? {} : {
|
|
606
|
+
tabIndex: Et ? 0 : void 0,
|
|
607
|
+
onMouseEnter: () => Ae(C),
|
|
608
|
+
onMouseLeave: () => He(C),
|
|
609
|
+
onFocus: () => Ae(C),
|
|
610
|
+
onBlur: () => He(C)
|
|
609
611
|
};
|
|
610
612
|
return /* @__PURE__ */ E(
|
|
611
|
-
|
|
613
|
+
Ge,
|
|
612
614
|
{
|
|
613
|
-
className:
|
|
615
|
+
className: x(`${r}-row`, t && C === g && `${r}-row-active`),
|
|
616
|
+
...Y,
|
|
614
617
|
...Ot,
|
|
615
|
-
...Tt,
|
|
616
618
|
children: [
|
|
617
|
-
!
|
|
618
|
-
|
|
619
|
+
!H && /* @__PURE__ */ p("div", { className: `${r}-title`, style: F[0], children: v.group }),
|
|
620
|
+
Ct.map((Ue, Nt) => /* @__PURE__ */ p("div", { className: `${r}-title`, style: F[Nt + 1], children: v[Ue] }, Ue))
|
|
619
621
|
]
|
|
620
622
|
},
|
|
621
|
-
|
|
623
|
+
C
|
|
622
624
|
);
|
|
623
625
|
})
|
|
624
626
|
]
|
|
@@ -628,96 +630,95 @@ function vo({
|
|
|
628
630
|
]
|
|
629
631
|
}
|
|
630
632
|
);
|
|
631
|
-
},
|
|
633
|
+
}, Rt = _ && !m ? /* @__PURE__ */ E(
|
|
632
634
|
"div",
|
|
633
635
|
{
|
|
634
636
|
ref: Q,
|
|
635
|
-
className:
|
|
637
|
+
className: x(
|
|
636
638
|
`${r}-overlay`,
|
|
637
639
|
n && `${r}-overlay-editor`,
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
le,
|
|
640
|
+
i && `${r}-overlay-edit-mode`,
|
|
641
|
+
A && `${r}-overlay-active`,
|
|
641
642
|
ie
|
|
642
643
|
),
|
|
643
644
|
style: { ...re, ...ee },
|
|
644
645
|
role: "dialog",
|
|
645
646
|
"aria-modal": "true",
|
|
646
|
-
"aria-label":
|
|
647
|
+
"aria-label": N,
|
|
647
648
|
"data-selection": "none",
|
|
648
649
|
children: [
|
|
649
|
-
/* @__PURE__ */ p("div", { className: `${r}-backdrop`, "aria-hidden": "true", onClick:
|
|
650
|
-
|
|
650
|
+
/* @__PURE__ */ p("div", { className: `${r}-backdrop`, "aria-hidden": "true", onClick: ze }),
|
|
651
|
+
Be,
|
|
651
652
|
/* @__PURE__ */ p(
|
|
652
653
|
"button",
|
|
653
654
|
{
|
|
654
|
-
ref:
|
|
655
|
+
ref: fe,
|
|
655
656
|
type: "button",
|
|
656
657
|
className: `${r}-close`,
|
|
657
658
|
style: {
|
|
658
|
-
...
|
|
659
|
+
...Fe,
|
|
659
660
|
top: (M == null ? void 0 : M.top) ?? 0,
|
|
660
661
|
left: (M == null ? void 0 : M.left) ?? 0,
|
|
661
662
|
visibility: M ? "visible" : "hidden"
|
|
662
663
|
},
|
|
663
|
-
onClick:
|
|
664
|
-
children:
|
|
664
|
+
onClick: ze,
|
|
665
|
+
children: B
|
|
665
666
|
}
|
|
666
667
|
),
|
|
667
|
-
|
|
668
|
+
le(!1)
|
|
668
669
|
]
|
|
669
670
|
}
|
|
670
|
-
) : null,
|
|
671
|
+
) : null, Mt = m && P.size > 0 ? /* @__PURE__ */ E(
|
|
671
672
|
"div",
|
|
672
673
|
{
|
|
673
|
-
ref:
|
|
674
|
-
className:
|
|
674
|
+
ref: he,
|
|
675
|
+
className: x(`${r}-inline-layer`, n && `${r}-overlay-editor`, ie),
|
|
675
676
|
style: { ...re, ...ee },
|
|
676
677
|
"aria-hidden": "true",
|
|
677
678
|
"data-selection": "none",
|
|
678
679
|
children: [
|
|
679
|
-
|
|
680
|
-
oe &&
|
|
680
|
+
Be,
|
|
681
|
+
oe && le(!0)
|
|
681
682
|
]
|
|
682
683
|
}
|
|
683
|
-
) : null,
|
|
684
|
-
return /* @__PURE__ */ E(
|
|
685
|
-
/* @__PURE__ */ p("style", { dangerouslySetInnerHTML: { __html:
|
|
684
|
+
) : null, De = Rt ?? Mt;
|
|
685
|
+
return /* @__PURE__ */ E(Tt, { children: [
|
|
686
|
+
/* @__PURE__ */ p("style", { dangerouslySetInnerHTML: { __html: bt } }),
|
|
686
687
|
/* @__PURE__ */ p(
|
|
687
688
|
"div",
|
|
688
689
|
{
|
|
689
690
|
ref: D,
|
|
690
|
-
className:
|
|
691
|
+
className: x(z && `${r}-editor`, ie),
|
|
691
692
|
style: re,
|
|
692
|
-
children: m ?
|
|
693
|
+
children: m ? le(!1) : /* @__PURE__ */ p(
|
|
693
694
|
"button",
|
|
694
695
|
{
|
|
695
696
|
ref: j,
|
|
696
697
|
type: "button",
|
|
697
|
-
className:
|
|
698
|
-
style:
|
|
698
|
+
className: x(`${r}-trigger`, A && `${r}-trigger-hidden`),
|
|
699
|
+
style: Fe,
|
|
699
700
|
"aria-haspopup": "dialog",
|
|
700
|
-
"aria-expanded":
|
|
701
|
+
"aria-expanded": b,
|
|
701
702
|
onClick: () => {
|
|
702
|
-
|
|
703
|
+
w && G(!0);
|
|
703
704
|
},
|
|
704
|
-
children:
|
|
705
|
+
children: N
|
|
705
706
|
}
|
|
706
707
|
)
|
|
707
708
|
}
|
|
708
709
|
),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
(
|
|
710
|
+
De && typeof document < "u" && zt(
|
|
711
|
+
De,
|
|
712
|
+
(c ? document.getElementById(c) : null) ?? document.body
|
|
712
713
|
)
|
|
713
714
|
] });
|
|
714
715
|
}
|
|
715
716
|
export {
|
|
716
|
-
|
|
717
|
+
Dt as CHRONICLES_COLUMN_STYLE_PREFIXES,
|
|
717
718
|
q as CHRONICLES_COLUMN_WIDTH_KEYS,
|
|
718
|
-
|
|
719
|
-
|
|
719
|
+
Bt as CHRONICLES_EXTRA_TITLE_KEYS,
|
|
720
|
+
po as CHRONICLES_PANEL_POSITIONS,
|
|
720
721
|
vo as Chronicles,
|
|
721
|
-
|
|
722
|
-
|
|
722
|
+
mo as applyChroniclesColumnCountChange,
|
|
723
|
+
Xt as getChroniclesEqualColumnWidths
|
|
723
724
|
};
|