@cntrl-site/components 1.0.101 → 1.0.103
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/README.md +25 -1
- package/dist/Burger-C6jI6C1c.js +661 -0
- package/dist/Burger-EMSn7TPB.mjs +1807 -0
- package/dist/ClickGallerie-D7g093HX.js +36 -0
- package/dist/ClickGallerie-QSOQjSdv.mjs +271 -0
- package/dist/Components/Burger/BurgerComponent.d.ts +0 -1
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +1 -0
- package/dist/Components/ClickGallerie/ClickGallerieComponent.d.ts +0 -1
- package/dist/Components/FAQ/FAQComponent.d.ts +0 -1
- package/dist/Components/Form/FormComponent.d.ts +0 -1
- package/dist/Components/Grid/GridComponent.d.ts +0 -1
- package/dist/Components/Helix/HelixComponent.d.ts +0 -1
- package/dist/Components/Hive/HiveComponent.d.ts +0 -1
- package/dist/Components/LightboxJournal/LightboxJournalComponent.d.ts +0 -1
- package/dist/Components/LightboxStrip/LightboxStripComponent.d.ts +0 -1
- package/dist/Components/List/ListComponent.d.ts +0 -1
- package/dist/Components/Marquee/MarqueeComponent.d.ts +0 -1
- package/dist/Components/MarqueeText/MarqueeTextComponent.d.ts +0 -1
- package/dist/Components/Mercury/MercuryComponent.d.ts +0 -1
- package/dist/Components/OnelinerForm/OnelinerFormComponent.d.ts +0 -1
- package/dist/Components/Pretext/PretextComponent.d.ts +0 -1
- package/dist/Components/Scale/Scale.d.ts +2 -0
- package/dist/Components/Scale/ScaleComponent.d.ts +0 -1
- package/dist/Components/SimpleButton/SimpleButtonComponent.d.ts +0 -1
- package/dist/Components/Slider20/Slider20Component.d.ts +0 -1
- package/dist/Components/TestimonialGrid/TestimonialGridComponent.d.ts +0 -1
- package/dist/Components/TestimonialSingle/TestimonialSingleComponent.d.ts +0 -1
- package/dist/Components/Waterfall/WaterfallComponent.d.ts +0 -1
- package/dist/ControlSlider-SiOt22l_.js +1 -0
- package/dist/ControlSlider-pZv7H6BU.mjs +334 -0
- package/dist/FAQ-C7823fyi.js +166 -0
- package/dist/FAQ-CZ39u4m8.mjs +588 -0
- package/dist/Form-BX5_41nb.mjs +472 -0
- package/dist/Form-Dn-6A1He.js +153 -0
- package/dist/Grid-CemGhf3F.js +374 -0
- package/dist/Grid-cfQsXW3b.mjs +1553 -0
- package/dist/Helix-2Vr-9WBa.js +43 -0
- package/dist/Helix-BmkAKT1G.mjs +315 -0
- package/dist/Hive-BC6zQBsv.js +321 -0
- package/dist/Hive-BGMWinrW.mjs +1425 -0
- package/dist/HiveLightboxTitles-DhEeFKWs.mjs +507 -0
- package/dist/HiveLightboxTitles-DlyptAaK.js +1 -0
- package/dist/ImageRevealSlider-BBWtFjUF.js +1 -0
- package/dist/ImageRevealSlider-BdFGyVEP.mjs +184 -0
- package/dist/Lightbox-CIss_nOG.js +1 -0
- package/dist/Lightbox-eP9qAZzL.mjs +665 -0
- package/dist/LightboxJournal-D59ex6wH.mjs +1613 -0
- package/dist/LightboxJournal-DAEZOPDi.js +523 -0
- package/dist/LightboxStrip-BDjI1jyH.js +386 -0
- package/dist/LightboxStrip-YspzBP8N.mjs +1574 -0
- package/dist/List-C32WImI3.js +377 -0
- package/dist/List-DW7fyJbf.mjs +1891 -0
- package/dist/Marquee-BYClHHws.mjs +551 -0
- package/dist/Marquee-vmHaTGIP.js +133 -0
- package/dist/MarqueeText-4Rip_sQX.mjs +515 -0
- package/dist/MarqueeText-E6OubMOG.js +132 -0
- package/dist/Mercury-BwF_XW2w.js +267 -0
- package/dist/Mercury-DuKJQ1Zo.mjs +1701 -0
- package/dist/OnelinerForm-BEu7_sho.mjs +434 -0
- package/dist/OnelinerForm-C2Y_XMCY.js +194 -0
- package/dist/Pretext-10CcyP1E.mjs +2762 -0
- package/dist/Pretext-DvQ3xsni.js +231 -0
- package/dist/PretextComponent-CGycuNNn.js +1 -0
- package/dist/PretextComponent-DN8cyZ8x.mjs +11633 -0
- package/dist/RichTextRenderer-B6WtTYlR.mjs +32 -0
- package/dist/RichTextRenderer-CIy6yI8U.js +1 -0
- package/dist/Scale-Bg3bGICG.js +114 -0
- package/dist/Scale-TnkWtRrs.mjs +409 -0
- package/dist/SimpleButton-C-o2W9bS.mjs +451 -0
- package/dist/SimpleButton-nGEcO2gB.js +243 -0
- package/dist/Slider20-C9o2REDl.js +272 -0
- package/dist/Slider20-Dm8BeCli.mjs +851 -0
- package/dist/SvgImage-B5mR9y6q.mjs +51 -0
- package/dist/SvgImage-DFlmxAoL.js +1 -0
- package/dist/TestimonialGrid-CPu4qQ6B.mjs +492 -0
- package/dist/TestimonialGrid-D4ieiz9e.js +90 -0
- package/dist/TestimonialSingle-CVu15ZtV.js +125 -0
- package/dist/TestimonialSingle-DLdnAVF7.mjs +391 -0
- package/dist/Waterfall-A0FjM2my.mjs +1400 -0
- package/dist/Waterfall-DnPDHbCL.js +287 -0
- package/dist/buildColorVars-CE2D5cQV.js +1 -0
- package/dist/buildColorVars-CLyWQm5K.mjs +21 -0
- package/dist/components-BFJINCME.mjs +2053 -0
- package/dist/components-DTCDEBo0.js +1 -0
- package/dist/components.css +1 -1
- package/dist/elements.d.ts +7 -0
- package/dist/elements.js +1 -0
- package/dist/elements.mjs +63 -0
- package/dist/elements.node.d.ts +6 -0
- package/dist/elements.node.js +1 -0
- package/dist/elements.node.mjs +21 -0
- package/dist/forking.d.ts +1 -0
- package/dist/formFieldValidation-DZl2KVaF.js +1 -0
- package/dist/formFieldValidation-DvihFrq5.mjs +21 -0
- package/dist/getColorAlpha-BVBY0N5x.mjs +39 -0
- package/dist/getColorAlpha-CoSseoCn.js +1 -0
- package/dist/getImageRect-BQhQXvT8.js +1 -0
- package/dist/getImageRect-CBMhFNHM.mjs +109 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -28862
- package/dist/index.mjs +16 -62473
- package/dist/loadSvgMaskUrl-DfF7ay6h.js +1 -0
- package/dist/loadSvgMaskUrl-xHgGYgPe.mjs +20 -0
- package/dist/panelAvailability-D179wwJx.mjs +27 -0
- package/dist/panelAvailability-DnOe0rQ4.js +1 -0
- package/dist/react-splide.esm-CabaEmHi.js +6 -0
- package/dist/react-splide.esm-DQqds4PL.mjs +1750 -0
- package/dist/readTestimonialTextMeasure-BIXpGFEt.mjs +13 -0
- package/dist/readTestimonialTextMeasure-CEPaB4Sy.js +1 -0
- package/dist/scalingValue-C9JH5L6O.mjs +6 -0
- package/dist/scalingValue-CSHYgTZl.js +1 -0
- package/dist/sources.d.ts +1 -0
- package/dist/sources.js +23865 -0
- package/dist/sources.mjs +23891 -0
- package/dist/textStylesToCss-05Mn6I_2.mjs +32 -0
- package/dist/textStylesToCss-CNN3zZTV.js +1 -0
- package/dist/types/Component.d.ts +0 -1
- package/dist/useLightboxScrollLock-Hf16Eq4g.js +1 -0
- package/dist/useLightboxScrollLock-VQ07s7EJ.mjs +18 -0
- package/dist/useLightboxSwipeDismiss-Br9uE5G0.js +1 -0
- package/dist/useLightboxSwipeDismiss-SGv6Ra33.mjs +95 -0
- package/dist/useScopedStyles-Bf6yohVQ.js +1 -0
- package/dist/useScopedStyles-DhBG3557.mjs +11 -0
- package/dist/utils-033j3qNL.js +1 -0
- package/dist/utils-FxC9rcxw.mjs +247 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +17 -11
- package/package.json +31 -2
- package/dist/index-2JTNRDR1.js +0 -1
- package/dist/index-DA8t6EZ4.mjs +0 -255
- package/dist/panelAvailability-CgSic84c.mjs +0 -126
- package/dist/panelAvailability-D8c7cdbu.js +0 -1
|
@@ -0,0 +1,1613 @@
|
|
|
1
|
+
import { jsxs as a, jsx as l, Fragment as ft } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as p, useMemo as C, useState as L, useRef as $, useEffect as ot, useLayoutEffect as Ge } from "react";
|
|
3
|
+
import { flushSync as Mi, createPortal as Bi } from "react-dom";
|
|
4
|
+
import { u as zi } from "./useScopedStyles-DhBG3557.mjs";
|
|
5
|
+
import { u as Ki, i as It, g as Qe } from "./useLightboxSwipeDismiss-SGv6Ra33.mjs";
|
|
6
|
+
import { s as we } from "./scalingValue-C9JH5L6O.mjs";
|
|
7
|
+
import { S as ji } from "./SvgImage-B5mR9y6q.mjs";
|
|
8
|
+
import { u as Ai } from "./useLightboxScrollLock-VQ07s7EJ.mjs";
|
|
9
|
+
import { j as _t, r as Jt, i as Vt, s as Ee, k as Ue, S as Fi, l as Xe, m as Oi, D as ve, b as Gt, a as Ve, g as Ye, c as Ut, e as nt, h as Di, n as ye, f as ht, d as _i, T as Xt, o as Ji, p as Gi, q as Ui, t as qe, u as Ze, v as Xi } from "./utils-FxC9rcxw.mjs";
|
|
10
|
+
const Vi = ({
|
|
11
|
+
prefix: t,
|
|
12
|
+
entries: D,
|
|
13
|
+
settings: W,
|
|
14
|
+
isEditor: v,
|
|
15
|
+
isEditMode: f,
|
|
16
|
+
isPreviewMode: lt,
|
|
17
|
+
initialSlideIndex: Y = 0,
|
|
18
|
+
enableUrlSync: N = !1,
|
|
19
|
+
journalItemId: H = null,
|
|
20
|
+
onBeforeClose: q,
|
|
21
|
+
onClose: Z
|
|
22
|
+
}) => {
|
|
23
|
+
const {
|
|
24
|
+
type: M,
|
|
25
|
+
coverFit: ut,
|
|
26
|
+
backgroundColor: Yt,
|
|
27
|
+
imageGap: z,
|
|
28
|
+
maxWidth: qt,
|
|
29
|
+
maxHeight: mt,
|
|
30
|
+
textTransition: _,
|
|
31
|
+
title1Width: Q,
|
|
32
|
+
title2Width: E,
|
|
33
|
+
title3Width: B,
|
|
34
|
+
title1MarginLeft: K = 0,
|
|
35
|
+
title2MarginLeft: I = 0,
|
|
36
|
+
title3MarginLeft: Wt = 0,
|
|
37
|
+
titleRowMarginBottom: rt = 0,
|
|
38
|
+
titleHeaderLayout: Zt = "single-row",
|
|
39
|
+
countCloseGap: b = 0,
|
|
40
|
+
closeIcon: j,
|
|
41
|
+
closeIconMaxWidth: J,
|
|
42
|
+
closeIconColor: gt,
|
|
43
|
+
closeIconHoverColor: $e,
|
|
44
|
+
contentMarginTop: Pe = 0,
|
|
45
|
+
iconMarginRight: ti = 0
|
|
46
|
+
} = W, u = p((e) => we(e, v ?? !1), [v]), Qt = u(z ?? 0), ei = `${qt}%`, ii = `${mt}%`, Nt = u(b), ni = u(Pe), be = u(ti), st = _t("title1", Jt(W, "title1"), v), pt = _t("title2", Jt(W, "title2"), v), xt = _t("title3", Jt(W, "title3"), v), oi = _t("count", Jt(W, "count"), v), x = Zt === "mobile", G = !v || !!lt, li = !f && (!v || !!lt), d = C(() => Vt(D, M), [D, M]), [y, Et] = L(Y), wt = d[y], h = wt == null ? void 0 : wt.entry, [Te, Se] = L(!1), [Ie, vt] = L(null), [T, yt] = L(!1), [We, Pt] = L(null), [Ne, te] = L(!1), [ee, ke] = L(0), [at, $t] = L(), [kt, bt] = L(), [Rt, Ct] = L(null), P = $(null), Lt = $(0), Ht = $(0), Re = $(0), Ce = $(!1), ie = $(null), ne = $(null), U = $(null), X = $(null), oe = $(null), Le = $(null), Mt = $(null), He = p(() => {
|
|
47
|
+
const e = ne.current;
|
|
48
|
+
if (!e) return;
|
|
49
|
+
const i = e.closest(`.${t}-lightbox-content-area`);
|
|
50
|
+
if (!i) return e.getBoundingClientRect().width;
|
|
51
|
+
const r = Array.from(i.children).reduce((n, o) => !(o instanceof HTMLElement) || o.contains(e) ? n : n + o.getBoundingClientRect().width, 0);
|
|
52
|
+
return i.getBoundingClientRect().width - r;
|
|
53
|
+
}, [t]), tt = p(() => {
|
|
54
|
+
P.current && (clearTimeout(P.current), P.current = null);
|
|
55
|
+
}, []), ri = p((e) => {
|
|
56
|
+
e === Lt.current && (Pt(null), te(!1));
|
|
57
|
+
}, []), Tt = p(() => {
|
|
58
|
+
f || Ce.current || (Ce.current = !0, q == null || q(), Se(!1), ie.current = setTimeout(() => {
|
|
59
|
+
Z();
|
|
60
|
+
}, 300));
|
|
61
|
+
}, [f, q, Z]), si = p((e) => !!(e.closest("[data-controls]") || e.closest(`.${t}-close-icon`)), [t]), {
|
|
62
|
+
isSwipeDragging: le,
|
|
63
|
+
backdropStyle: ai,
|
|
64
|
+
mediaAreaStyle: ci,
|
|
65
|
+
overlayContentStyle: di,
|
|
66
|
+
swipeHandlers: hi,
|
|
67
|
+
dismissAreaStyle: fi
|
|
68
|
+
} = Ki({
|
|
69
|
+
enabled: li,
|
|
70
|
+
onClose: Tt,
|
|
71
|
+
animMs: 300,
|
|
72
|
+
isBlockedTarget: si
|
|
73
|
+
}), Me = p((e) => {
|
|
74
|
+
N && Ee(e + 1, H, !0);
|
|
75
|
+
}, [N, H]), re = p((e) => {
|
|
76
|
+
if (e)
|
|
77
|
+
return e.getBoundingClientRect().height;
|
|
78
|
+
}, []), ct = p((e) => {
|
|
79
|
+
if (d.length === 0) return;
|
|
80
|
+
const i = (e % d.length + d.length) % d.length;
|
|
81
|
+
if (i === y) return;
|
|
82
|
+
const r = d[y], n = d[i];
|
|
83
|
+
Lt.current += 1;
|
|
84
|
+
const o = Lt.current, c = _ === "fade" && Ue(r == null ? void 0 : r.entry) !== Ue(n == null ? void 0 : n.entry), g = re(U.current), s = c ? (() => {
|
|
85
|
+
const R = He();
|
|
86
|
+
Mi(() => {
|
|
87
|
+
Ct(n.entry);
|
|
88
|
+
}), U.current && R && (U.current.style.width = `${R}px`);
|
|
89
|
+
const Dt = re(U.current);
|
|
90
|
+
return U.current && (U.current.style.width = ""), { measuredIncomingTitlesHeight: Dt, incomingTitlesMeasureWidth: R };
|
|
91
|
+
})() : void 0, S = Math.max(
|
|
92
|
+
g ?? 0,
|
|
93
|
+
(s == null ? void 0 : s.measuredIncomingTitlesHeight) ?? 0
|
|
94
|
+
) || void 0;
|
|
95
|
+
ke(o), Pt(y), te(!0), Et(i), Me(i), Re.current = i, c ? (tt(), S && $t(S), s != null && s.incomingTitlesMeasureWidth && bt(s.incomingTitlesMeasureWidth), vt((r == null ? void 0 : r.entryIndex) ?? null), yt(!0), Ht.current = n.entryIndex, P.current = setTimeout(() => {
|
|
96
|
+
vt(null), yt(!1), $t(void 0), bt(void 0), Ct(null), P.current = null;
|
|
97
|
+
}, 400)) : (tt(), vt(null), yt(!1), $t(void 0), bt(void 0), Ct(null), Ht.current = n.entryIndex);
|
|
98
|
+
}, [y, tt, He, re, d, Me, _]), St = p(() => {
|
|
99
|
+
Mt.current = null;
|
|
100
|
+
}, []), ui = p((e) => {
|
|
101
|
+
!G || d.length <= 1 || e.pointerType === "mouse" && e.button !== 0 || e.target.closest("[data-controls]") || (Mt.current = {
|
|
102
|
+
startX: e.clientX,
|
|
103
|
+
startY: e.clientY,
|
|
104
|
+
pointerId: e.pointerId
|
|
105
|
+
});
|
|
106
|
+
}, [G, d.length]), mi = p((e) => {
|
|
107
|
+
var R;
|
|
108
|
+
if (!G || d.length <= 1 || e.pointerType === "mouse" && e.button !== 0) return;
|
|
109
|
+
if (le) {
|
|
110
|
+
St();
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const i = Mt.current;
|
|
114
|
+
if (!i || i.pointerId !== e.pointerId || (St(), e.target.closest("[data-controls]"))) return;
|
|
115
|
+
const n = e.clientX - i.startX, o = e.clientY - i.startY, c = Math.abs(n), g = Math.abs(o);
|
|
116
|
+
if (c >= Fi && c > g) {
|
|
117
|
+
ct(n > 0 ? y - 1 : y + 1);
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
if (c > Xe || g > Xe) return;
|
|
121
|
+
const s = (R = X.current) == null ? void 0 : R.getBoundingClientRect(), S = s ? s.left + s.width / 2 : window.innerWidth / 2;
|
|
122
|
+
ct(e.clientX < S ? y - 1 : y + 1);
|
|
123
|
+
}, [y, G, ct, le, St, d.length]), gi = p((e) => {
|
|
124
|
+
const i = Mt.current;
|
|
125
|
+
(i == null ? void 0 : i.pointerId) === e.pointerId && St();
|
|
126
|
+
}, [St]);
|
|
127
|
+
Ai(), ot(() => {
|
|
128
|
+
Le.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
129
|
+
const e = requestAnimationFrame(() => {
|
|
130
|
+
Se(!0), requestAnimationFrame(() => {
|
|
131
|
+
oe.current ? oe.current.focus() : X.current && X.current.focus();
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
return () => {
|
|
135
|
+
cancelAnimationFrame(e), ie.current && clearTimeout(ie.current), P.current && clearTimeout(P.current);
|
|
136
|
+
const i = Le.current;
|
|
137
|
+
i && document.contains(i) && i.focus({ preventScroll: !0 });
|
|
138
|
+
};
|
|
139
|
+
}, []), ot(() => {
|
|
140
|
+
var e;
|
|
141
|
+
_ !== "fade" && (Ht.current = ((e = d[y]) == null ? void 0 : e.entryIndex) ?? 0, tt(), vt(null), yt(!1), $t(void 0), bt(void 0));
|
|
142
|
+
}, [y, tt, d, _]), ot(() => {
|
|
143
|
+
const e = (i) => {
|
|
144
|
+
if (i.key === "Escape") {
|
|
145
|
+
Tt();
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
if (i.key === "ArrowLeft" && d.length > 1) {
|
|
149
|
+
ct(y - 1);
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
if (i.key === "ArrowRight" && d.length > 1) {
|
|
153
|
+
ct(y + 1);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (i.key === "Tab" && X.current) {
|
|
157
|
+
const r = X.current.querySelectorAll(
|
|
158
|
+
'button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])'
|
|
159
|
+
), n = Array.from(r).filter(
|
|
160
|
+
(s) => !s.closest('[aria-hidden="true"]')
|
|
161
|
+
);
|
|
162
|
+
if (n.length === 0) return;
|
|
163
|
+
const o = n[0], c = n[n.length - 1], g = document.activeElement;
|
|
164
|
+
i.shiftKey ? (g === o || !X.current.contains(g)) && (i.preventDefault(), c.focus()) : (g === c || !X.current.contains(g)) && (i.preventDefault(), o.focus());
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
168
|
+
}, [ct, Tt, y, d.length]), Ge(() => {
|
|
169
|
+
tt(), Lt.current = 0, ke(0), Pt(null), te(!1), vt(null), yt(!1), $t(void 0), bt(void 0), Ct(null), Et((e) => {
|
|
170
|
+
const i = Math.max(0, d.length - 1);
|
|
171
|
+
return Math.min(e, i);
|
|
172
|
+
});
|
|
173
|
+
}, [tt, D.length, M, d.length]), Ge(() => {
|
|
174
|
+
var r;
|
|
175
|
+
const e = Math.max(0, d.length - 1), i = Math.min(Math.max(0, Y), e);
|
|
176
|
+
Re.current = i, Ht.current = ((r = d[i]) == null ? void 0 : r.entryIndex) ?? 0, Et(i);
|
|
177
|
+
}, [Y]);
|
|
178
|
+
const m = Ie !== null ? D[Ie] : null, Be = We !== null ? d[We] : null, Bt = (h == null ? void 0 : h.title1) || (h == null ? void 0 : h.title2) || (h == null ? void 0 : h.title3) || (m == null ? void 0 : m.title1) || (m == null ? void 0 : m.title2) || (m == null ? void 0 : m.title3), et = Oi(M, d, D), dt = j !== null, pi = Bt || et || dt, xi = et && dt ? { gap: Nt } : void 0, zt = `${t}-titles-stack${x ? ` ${t}-titles-stack-stacked` : ""}`, ze = `${t}-titles-layer-out${x ? ` ${t}-titles-layer-out-stacked` : ""}`, wi = `${t}-titles-layer-out`, se = (K ?? 0) > 0 || f, vi = u(rt), k = C(
|
|
179
|
+
() => ({
|
|
180
|
+
title1Width: Q ?? ve.title1Width,
|
|
181
|
+
title2Width: E ?? ve.title2Width,
|
|
182
|
+
title3Width: B ?? ve.title3Width
|
|
183
|
+
}),
|
|
184
|
+
[Q, E, B]
|
|
185
|
+
), A = C(() => ({
|
|
186
|
+
title2MarginLeft: I,
|
|
187
|
+
title3MarginLeft: Wt
|
|
188
|
+
}), [I, Wt]), w = C(
|
|
189
|
+
() => h ? Gt(t, h, st, pt, xt) : [],
|
|
190
|
+
[t, h, st, pt, xt]
|
|
191
|
+
), Kt = C(
|
|
192
|
+
() => w.map((e) => k[e.widthKey]),
|
|
193
|
+
[w, k]
|
|
194
|
+
), F = C(
|
|
195
|
+
() => Ve(w.length, Kt),
|
|
196
|
+
[w.length, Kt]
|
|
197
|
+
), Ke = C(
|
|
198
|
+
() => Ye(w.length, Kt),
|
|
199
|
+
[w.length, Kt]
|
|
200
|
+
), jt = C(
|
|
201
|
+
() => w.filter((e) => e.prefix === "title1"),
|
|
202
|
+
[w]
|
|
203
|
+
), O = C(
|
|
204
|
+
() => w.filter((e) => e.prefix === "title2" || e.prefix === "title3"),
|
|
205
|
+
[w]
|
|
206
|
+
), At = C(
|
|
207
|
+
() => Ut(jt, k),
|
|
208
|
+
[jt, k]
|
|
209
|
+
), V = C(
|
|
210
|
+
() => Ut(O, k),
|
|
211
|
+
[O, k]
|
|
212
|
+
), ae = p((e, i) => {
|
|
213
|
+
const r = w.findIndex((o) => o.prefix === e.prefix);
|
|
214
|
+
if (!x || i === "single-row")
|
|
215
|
+
return {
|
|
216
|
+
effectiveWidth: Ke[r] ?? 0,
|
|
217
|
+
resolvedWidth: F[r] ?? 0,
|
|
218
|
+
maxWidth: nt(r, F)
|
|
219
|
+
};
|
|
220
|
+
if (i === "two-row-top") {
|
|
221
|
+
const o = jt.findIndex((c) => c.prefix === e.prefix);
|
|
222
|
+
return {
|
|
223
|
+
effectiveWidth: At.effective[o] ?? 0,
|
|
224
|
+
resolvedWidth: At.resolved[o] ?? 0,
|
|
225
|
+
maxWidth: nt(o, At.resolved)
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
const n = O.findIndex((o) => o.prefix === e.prefix);
|
|
229
|
+
return {
|
|
230
|
+
effectiveWidth: V.effective[n] ?? 0,
|
|
231
|
+
resolvedWidth: V.resolved[n] ?? 0,
|
|
232
|
+
maxWidth: nt(n, V.resolved)
|
|
233
|
+
};
|
|
234
|
+
}, [
|
|
235
|
+
w,
|
|
236
|
+
O,
|
|
237
|
+
V,
|
|
238
|
+
Ke,
|
|
239
|
+
F,
|
|
240
|
+
jt,
|
|
241
|
+
At,
|
|
242
|
+
x
|
|
243
|
+
]), yi = p(
|
|
244
|
+
(e) => Di(
|
|
245
|
+
w,
|
|
246
|
+
F,
|
|
247
|
+
A,
|
|
248
|
+
e
|
|
249
|
+
) + (x ? 0 : K ?? 0),
|
|
250
|
+
[w, F, A, x, K]
|
|
251
|
+
), $i = p(
|
|
252
|
+
() => x ? 0 : K ?? 0,
|
|
253
|
+
[x, K]
|
|
254
|
+
), ce = p(
|
|
255
|
+
(e) => O.slice(0, e).reduce(
|
|
256
|
+
(i, r, n) => i + (r.marginLeftKey ? A[r.marginLeftKey] ?? 0 : 0) + (V.resolved[n] ?? 0),
|
|
257
|
+
0
|
|
258
|
+
),
|
|
259
|
+
[O, V.resolved, A]
|
|
260
|
+
), bi = p(
|
|
261
|
+
(e) => {
|
|
262
|
+
const i = O[e];
|
|
263
|
+
return ce(e) + (i.marginLeftKey ? A[i.marginLeftKey] ?? 0 : 0) + (V.resolved[e] ?? 0);
|
|
264
|
+
},
|
|
265
|
+
[O, V.resolved, ce, A]
|
|
266
|
+
), de = p((e, i, r) => {
|
|
267
|
+
if (!x || r === "single-row") {
|
|
268
|
+
const s = e.findIndex((it) => it.prefix === i.prefix), S = e.map((it) => k[it.widthKey]), R = Ve(e.length, S);
|
|
269
|
+
return {
|
|
270
|
+
effectiveWidth: Ye(e.length, S)[s] ?? 0,
|
|
271
|
+
resolvedWidth: R[s] ?? 0,
|
|
272
|
+
maxWidth: nt(s, R)
|
|
273
|
+
};
|
|
274
|
+
}
|
|
275
|
+
if (r === "two-row-top") {
|
|
276
|
+
const s = e.filter((it) => it.prefix === "title1"), S = s.findIndex((it) => it.prefix === i.prefix), { resolved: R, effective: Dt } = Ut(s, k);
|
|
277
|
+
return {
|
|
278
|
+
effectiveWidth: Dt[S] ?? 0,
|
|
279
|
+
resolvedWidth: R[S] ?? 0,
|
|
280
|
+
maxWidth: nt(S, R)
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
const n = e.filter((s) => s.prefix === "title2" || s.prefix === "title3"), o = n.findIndex((s) => s.prefix === i.prefix), { resolved: c, effective: g } = Ut(n, k);
|
|
284
|
+
return {
|
|
285
|
+
effectiveWidth: g[o] ?? 0,
|
|
286
|
+
resolvedWidth: c[o] ?? 0,
|
|
287
|
+
maxWidth: nt(o, c)
|
|
288
|
+
};
|
|
289
|
+
}, [k, x]), he = (e, i, r) => {
|
|
290
|
+
const n = e.marginLeftKey ? A[e.marginLeftKey] ?? 0 : 0, {
|
|
291
|
+
effectiveWidth: o,
|
|
292
|
+
resolvedWidth: c,
|
|
293
|
+
maxWidth: g
|
|
294
|
+
} = r ?? ae(e, i), s = Math.max(n, Xt), S = f && i === "two-row-top";
|
|
295
|
+
return /* @__PURE__ */ a(
|
|
296
|
+
"div",
|
|
297
|
+
{
|
|
298
|
+
className: `${t}-title-cell`,
|
|
299
|
+
"data-title": e.prefix,
|
|
300
|
+
style: {
|
|
301
|
+
width: u(o),
|
|
302
|
+
...n > 0 ? { marginLeft: u(n) } : {}
|
|
303
|
+
},
|
|
304
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ l("p", { className: e.className, style: e.style, children: e.text }),
|
|
306
|
+
S && e.marginLeftKey ? /* @__PURE__ */ l(
|
|
307
|
+
"div",
|
|
308
|
+
{
|
|
309
|
+
"data-controls": e.marginLeftKey,
|
|
310
|
+
"data-controls-axis": "x",
|
|
311
|
+
"data-controls-min": "0",
|
|
312
|
+
"data-controls-max-fraction": String(c),
|
|
313
|
+
style: {
|
|
314
|
+
position: "absolute",
|
|
315
|
+
top: 0,
|
|
316
|
+
left: u(-n),
|
|
317
|
+
width: u(s),
|
|
318
|
+
height: "100%",
|
|
319
|
+
pointerEvents: "auto"
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
) : null,
|
|
323
|
+
S ? /* @__PURE__ */ l(
|
|
324
|
+
"div",
|
|
325
|
+
{
|
|
326
|
+
"data-controls": e.widthKey,
|
|
327
|
+
"data-controls-axis": "x",
|
|
328
|
+
"data-controls-max-fraction": String(g),
|
|
329
|
+
"data-controls-variant": "column-width",
|
|
330
|
+
className: `${t}-title-resize-handle`,
|
|
331
|
+
style: {
|
|
332
|
+
position: "absolute",
|
|
333
|
+
top: 0,
|
|
334
|
+
right: u(-ht / 2),
|
|
335
|
+
width: u(ht),
|
|
336
|
+
height: "100%",
|
|
337
|
+
pointerEvents: "auto"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
) : null
|
|
341
|
+
]
|
|
342
|
+
},
|
|
343
|
+
e.className
|
|
344
|
+
);
|
|
345
|
+
}, fe = (e = "two-row") => {
|
|
346
|
+
const i = w.findIndex((o) => o.prefix === "title1"), r = i >= 0 ? F[i] : k.title1Width, n = e === "two-row" && f;
|
|
347
|
+
return /* @__PURE__ */ l(
|
|
348
|
+
"div",
|
|
349
|
+
{
|
|
350
|
+
...n ? {
|
|
351
|
+
"data-controls": "title1MarginLeft",
|
|
352
|
+
"data-controls-axis": "x",
|
|
353
|
+
"data-controls-min": "0",
|
|
354
|
+
"data-controls-max-fraction": String(r)
|
|
355
|
+
} : {},
|
|
356
|
+
style: {
|
|
357
|
+
width: u(K ?? 0),
|
|
358
|
+
flexShrink: 0,
|
|
359
|
+
alignSelf: "stretch",
|
|
360
|
+
...n ? { pointerEvents: "auto" } : {}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
);
|
|
364
|
+
}, ue = () => /* @__PURE__ */ l(
|
|
365
|
+
"span",
|
|
366
|
+
{
|
|
367
|
+
className: `${t}-titles-baseline-strut`,
|
|
368
|
+
style: st,
|
|
369
|
+
"aria-hidden": "true",
|
|
370
|
+
children: " "
|
|
371
|
+
}
|
|
372
|
+
), je = () => /* @__PURE__ */ l(
|
|
373
|
+
"span",
|
|
374
|
+
{
|
|
375
|
+
className: `${t}-entry-counter`,
|
|
376
|
+
style: oi,
|
|
377
|
+
"aria-live": "polite",
|
|
378
|
+
"aria-atomic": "true",
|
|
379
|
+
children: Ji(d, y, M, D)
|
|
380
|
+
}
|
|
381
|
+
), Ti = () => et ? f && dt ? /* @__PURE__ */ a("div", { className: `${t}-text-bar-cell`, style: { flexShrink: 0 }, children: [
|
|
382
|
+
je(),
|
|
383
|
+
/* @__PURE__ */ l(
|
|
384
|
+
"div",
|
|
385
|
+
{
|
|
386
|
+
"data-controls": "countCloseGap",
|
|
387
|
+
"data-controls-axis": "x",
|
|
388
|
+
"data-controls-reverse": "true",
|
|
389
|
+
style: {
|
|
390
|
+
position: "absolute",
|
|
391
|
+
top: 0,
|
|
392
|
+
right: `calc(-0.5 * (${ye(Nt)} + ${Nt}))`,
|
|
393
|
+
width: ye(Nt),
|
|
394
|
+
height: "100%",
|
|
395
|
+
pointerEvents: "auto",
|
|
396
|
+
zIndex: 3
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
)
|
|
400
|
+
] }) : je() : null, me = () => !et && !dt ? null : /* @__PURE__ */ a(
|
|
401
|
+
"div",
|
|
402
|
+
{
|
|
403
|
+
className: `${t}-titles-row-header-controls`,
|
|
404
|
+
style: xi,
|
|
405
|
+
children: [
|
|
406
|
+
Ti(),
|
|
407
|
+
dt ? Wi() : null
|
|
408
|
+
]
|
|
409
|
+
}
|
|
410
|
+
), Si = () => /* @__PURE__ */ a(
|
|
411
|
+
"div",
|
|
412
|
+
{
|
|
413
|
+
className: `${t}-titles-row ${t}-titles-row-header`,
|
|
414
|
+
style: {
|
|
415
|
+
width: "100%",
|
|
416
|
+
position: "relative"
|
|
417
|
+
},
|
|
418
|
+
children: [
|
|
419
|
+
et || Bt ? ue() : null,
|
|
420
|
+
se ? fe("single-row") : null,
|
|
421
|
+
Fe(h),
|
|
422
|
+
/* @__PURE__ */ l("div", { style: { flex: 1, minWidth: 0 }, "aria-hidden": "true" }),
|
|
423
|
+
me(),
|
|
424
|
+
xe()
|
|
425
|
+
]
|
|
426
|
+
}
|
|
427
|
+
), Ii = () => /* @__PURE__ */ a(
|
|
428
|
+
"div",
|
|
429
|
+
{
|
|
430
|
+
className: `${t}-titles-row ${t}-titles-row-header`,
|
|
431
|
+
style: { width: "100%", position: "relative" },
|
|
432
|
+
children: [
|
|
433
|
+
et || Bt ? ue() : null,
|
|
434
|
+
se ? fe("single-row") : null,
|
|
435
|
+
/* @__PURE__ */ a(
|
|
436
|
+
"div",
|
|
437
|
+
{
|
|
438
|
+
className: `${t}-titles-row-titles`,
|
|
439
|
+
style: T && at ? { minHeight: at } : void 0,
|
|
440
|
+
children: [
|
|
441
|
+
/* @__PURE__ */ l(
|
|
442
|
+
"div",
|
|
443
|
+
{
|
|
444
|
+
ref: U,
|
|
445
|
+
className: zt,
|
|
446
|
+
style: {
|
|
447
|
+
position: "absolute",
|
|
448
|
+
visibility: "hidden",
|
|
449
|
+
pointerEvents: "none",
|
|
450
|
+
left: 0,
|
|
451
|
+
right: 0,
|
|
452
|
+
top: 0,
|
|
453
|
+
width: "100%",
|
|
454
|
+
height: "auto"
|
|
455
|
+
},
|
|
456
|
+
"aria-hidden": "true",
|
|
457
|
+
children: Ot(Rt || h)
|
|
458
|
+
}
|
|
459
|
+
),
|
|
460
|
+
/* @__PURE__ */ a(
|
|
461
|
+
"div",
|
|
462
|
+
{
|
|
463
|
+
ref: ne,
|
|
464
|
+
className: zt,
|
|
465
|
+
style: {
|
|
466
|
+
position: T ? "absolute" : "relative",
|
|
467
|
+
inset: T ? 0 : void 0,
|
|
468
|
+
width: "100%",
|
|
469
|
+
...T && kt ? { width: kt, maxWidth: "100%" } : void 0
|
|
470
|
+
},
|
|
471
|
+
children: [
|
|
472
|
+
m && T ? /* @__PURE__ */ l("div", { className: `${ze} ${t}-titles-fade-out`, children: Ot(m) }) : null,
|
|
473
|
+
/* @__PURE__ */ l("div", { className: `${t}-titles-layer-in${T ? ` ${t}-titles-layer-in-fading ${t}-titles-fade-in` : ""}`, children: Ot(h) })
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
)
|
|
477
|
+
]
|
|
478
|
+
}
|
|
479
|
+
),
|
|
480
|
+
me(),
|
|
481
|
+
xe()
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
), Wi = () => /* @__PURE__ */ a(
|
|
485
|
+
"div",
|
|
486
|
+
{
|
|
487
|
+
className: `${t}-close-icon`,
|
|
488
|
+
style: {
|
|
489
|
+
width: we(J ?? 0, v),
|
|
490
|
+
height: we(J ?? 0, v),
|
|
491
|
+
marginRight: be,
|
|
492
|
+
"--close-icon-hover-color": $e
|
|
493
|
+
},
|
|
494
|
+
children: [
|
|
495
|
+
/* @__PURE__ */ l(
|
|
496
|
+
"button",
|
|
497
|
+
{
|
|
498
|
+
ref: oe,
|
|
499
|
+
type: "button",
|
|
500
|
+
className: `${t}-close-icon-inner`,
|
|
501
|
+
onClick: Tt,
|
|
502
|
+
"aria-label": "Close",
|
|
503
|
+
children: /* @__PURE__ */ l(
|
|
504
|
+
ji,
|
|
505
|
+
{
|
|
506
|
+
url: j ?? "",
|
|
507
|
+
fill: gt,
|
|
508
|
+
hoverFill: v && !lt ? gt : $e,
|
|
509
|
+
className: `${t}-close-icon-img`
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
),
|
|
514
|
+
f && /* @__PURE__ */ l(
|
|
515
|
+
"div",
|
|
516
|
+
{
|
|
517
|
+
"data-controls": "iconMarginRight",
|
|
518
|
+
"data-controls-axis": "x",
|
|
519
|
+
"data-controls-reverse": "",
|
|
520
|
+
className: `${t}-control`,
|
|
521
|
+
style: {
|
|
522
|
+
position: "absolute",
|
|
523
|
+
top: 0,
|
|
524
|
+
left: "100%",
|
|
525
|
+
width: be,
|
|
526
|
+
height: "100%",
|
|
527
|
+
pointerEvents: "auto"
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
)
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
), Ae = (e, i) => /* @__PURE__ */ a(
|
|
534
|
+
"div",
|
|
535
|
+
{
|
|
536
|
+
className: `${t}-titles-row-top`,
|
|
537
|
+
children: [
|
|
538
|
+
et || Bt ? ue() : null,
|
|
539
|
+
se ? fe("two-row") : null,
|
|
540
|
+
i !== void 0 ? /* @__PURE__ */ l(
|
|
541
|
+
"div",
|
|
542
|
+
{
|
|
543
|
+
className: `${t}-titles-row-titles`,
|
|
544
|
+
style: {
|
|
545
|
+
position: "relative",
|
|
546
|
+
flex: 1,
|
|
547
|
+
minWidth: 0,
|
|
548
|
+
minHeight: i
|
|
549
|
+
},
|
|
550
|
+
children: e
|
|
551
|
+
}
|
|
552
|
+
) : /* @__PURE__ */ a(ft, { children: [
|
|
553
|
+
e,
|
|
554
|
+
/* @__PURE__ */ l("div", { style: { flex: 1, minWidth: 0 }, "aria-hidden": "true" })
|
|
555
|
+
] }),
|
|
556
|
+
me()
|
|
557
|
+
]
|
|
558
|
+
}
|
|
559
|
+
), Fe = (e) => {
|
|
560
|
+
if (!e) return null;
|
|
561
|
+
const i = Gt(t, e, st, pt, xt);
|
|
562
|
+
return /* @__PURE__ */ l(ft, { children: i.map((r) => he(
|
|
563
|
+
r,
|
|
564
|
+
"single-row",
|
|
565
|
+
de(i, r, "single-row")
|
|
566
|
+
)) });
|
|
567
|
+
}, ge = (e) => {
|
|
568
|
+
if (!e) return null;
|
|
569
|
+
const i = Gt(t, e, st, pt, xt), r = i.find((n) => n.prefix === "title1");
|
|
570
|
+
return r ? he(
|
|
571
|
+
r,
|
|
572
|
+
"two-row-top",
|
|
573
|
+
de(i, r, "two-row-top")
|
|
574
|
+
) : null;
|
|
575
|
+
}, pe = (e, i = !1) => {
|
|
576
|
+
const r = e ? Gt(t, e, st, pt, xt) : [], n = r.filter((g) => g.prefix === "title2" || g.prefix === "title3"), o = f && i;
|
|
577
|
+
return n.length > 0 || o || (rt ?? 0) > 0 ? /* @__PURE__ */ a("div", { className: `${t}-titles-row-bottom-wrap`, children: [
|
|
578
|
+
n.length > 0 ? /* @__PURE__ */ a("div", { className: `${t}-titles-row-bottom`, children: [
|
|
579
|
+
n.map((g) => he(
|
|
580
|
+
g,
|
|
581
|
+
"two-row-bottom",
|
|
582
|
+
de(r, g, "two-row-bottom")
|
|
583
|
+
)),
|
|
584
|
+
i && f ? /* @__PURE__ */ a(ft, { children: [
|
|
585
|
+
Ri(),
|
|
586
|
+
Ci()
|
|
587
|
+
] }) : null
|
|
588
|
+
] }) : null,
|
|
589
|
+
(rt ?? 0) > 0 || o ? /* @__PURE__ */ l(
|
|
590
|
+
"div",
|
|
591
|
+
{
|
|
592
|
+
"data-controls": o ? "titleRowMarginBottom" : void 0,
|
|
593
|
+
"data-controls-axis": o ? "y" : void 0,
|
|
594
|
+
"data-controls-reverse": o ? "" : void 0,
|
|
595
|
+
className: o ? `${t}-control` : void 0,
|
|
596
|
+
style: {
|
|
597
|
+
height: vi,
|
|
598
|
+
width: "100%",
|
|
599
|
+
flexShrink: 0,
|
|
600
|
+
pointerEvents: o ? "auto" : "none"
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
) : null
|
|
604
|
+
] }) : null;
|
|
605
|
+
}, Ft = (e, i = !1) => /* @__PURE__ */ a(ft, { children: [
|
|
606
|
+
Ae(ge(e)),
|
|
607
|
+
pe(e, i)
|
|
608
|
+
] }), Ot = (e) => x ? /* @__PURE__ */ l("div", { className: `${t}-titles-row-two-row`, children: Ft(e) }) : e ? /* @__PURE__ */ l("div", { className: `${t}-titles-row`, style: { width: "100%" }, children: Fe(e) }) : null, Ni = () => {
|
|
609
|
+
const e = x ? -1 : w.findIndex((n) => n.prefix === "title1"), i = !x && (f || (K ?? 0) > 0) ? (() => {
|
|
610
|
+
const n = K ?? 0, o = e >= 0 ? F[e] : k.title1Width, c = Math.max(n, Xt);
|
|
611
|
+
return /* @__PURE__ */ l(
|
|
612
|
+
"div",
|
|
613
|
+
{
|
|
614
|
+
"data-controls": "title1MarginLeft",
|
|
615
|
+
"data-controls-axis": "x",
|
|
616
|
+
"data-controls-min": "0",
|
|
617
|
+
"data-controls-max-fraction": String(o),
|
|
618
|
+
style: {
|
|
619
|
+
position: "absolute",
|
|
620
|
+
top: 0,
|
|
621
|
+
left: 0,
|
|
622
|
+
width: u(c),
|
|
623
|
+
height: "100%",
|
|
624
|
+
pointerEvents: "auto"
|
|
625
|
+
}
|
|
626
|
+
},
|
|
627
|
+
"title1MarginLeft"
|
|
628
|
+
);
|
|
629
|
+
})() : null, r = w.flatMap((n, o) => {
|
|
630
|
+
if (!n.marginLeftKey) return [];
|
|
631
|
+
const c = A[n.marginLeftKey] ?? 0, g = _i(
|
|
632
|
+
w,
|
|
633
|
+
F,
|
|
634
|
+
A,
|
|
635
|
+
o
|
|
636
|
+
) + $i(), s = Math.max(c, Xt);
|
|
637
|
+
return /* @__PURE__ */ l(
|
|
638
|
+
"div",
|
|
639
|
+
{
|
|
640
|
+
"data-controls": n.marginLeftKey,
|
|
641
|
+
"data-controls-axis": "x",
|
|
642
|
+
"data-controls-min": "0",
|
|
643
|
+
"data-controls-max-fraction": String(F[o]),
|
|
644
|
+
style: {
|
|
645
|
+
position: "absolute",
|
|
646
|
+
top: 0,
|
|
647
|
+
left: u(g),
|
|
648
|
+
width: u(s),
|
|
649
|
+
height: "100%",
|
|
650
|
+
pointerEvents: "auto"
|
|
651
|
+
}
|
|
652
|
+
},
|
|
653
|
+
n.marginLeftKey
|
|
654
|
+
);
|
|
655
|
+
});
|
|
656
|
+
return i ? [i, ...r] : r;
|
|
657
|
+
}, ki = () => w.map((e, i) => {
|
|
658
|
+
const r = nt(i, F), o = yi(i) - ht / 2;
|
|
659
|
+
return /* @__PURE__ */ l("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: /* @__PURE__ */ l(
|
|
660
|
+
"div",
|
|
661
|
+
{
|
|
662
|
+
"data-controls": e.widthKey,
|
|
663
|
+
"data-controls-axis": "x",
|
|
664
|
+
"data-controls-max-fraction": String(r),
|
|
665
|
+
"data-controls-variant": "column-width",
|
|
666
|
+
className: `${t}-title-resize-handle`,
|
|
667
|
+
style: {
|
|
668
|
+
position: "absolute",
|
|
669
|
+
top: 0,
|
|
670
|
+
left: u(o),
|
|
671
|
+
width: u(ht),
|
|
672
|
+
height: "100%",
|
|
673
|
+
pointerEvents: "auto"
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
) }, `${e.widthKey}-junction`);
|
|
677
|
+
}), Ri = () => O.flatMap((e, i) => {
|
|
678
|
+
if (!e.marginLeftKey) return [];
|
|
679
|
+
const r = A[e.marginLeftKey] ?? 0, n = ce(i), o = Math.max(r, Xt), { resolvedWidth: c } = ae(e, "two-row-bottom");
|
|
680
|
+
return /* @__PURE__ */ l(
|
|
681
|
+
"div",
|
|
682
|
+
{
|
|
683
|
+
"data-controls": e.marginLeftKey,
|
|
684
|
+
"data-controls-axis": "x",
|
|
685
|
+
"data-controls-min": "0",
|
|
686
|
+
"data-controls-max-fraction": String(c),
|
|
687
|
+
style: {
|
|
688
|
+
position: "absolute",
|
|
689
|
+
top: 0,
|
|
690
|
+
left: u(n),
|
|
691
|
+
width: u(o),
|
|
692
|
+
height: "100%",
|
|
693
|
+
pointerEvents: "auto"
|
|
694
|
+
}
|
|
695
|
+
},
|
|
696
|
+
e.marginLeftKey
|
|
697
|
+
);
|
|
698
|
+
}), Ci = () => O.map((e, i) => {
|
|
699
|
+
const { maxWidth: r } = ae(e, "two-row-bottom"), o = bi(i) - ht / 2;
|
|
700
|
+
return /* @__PURE__ */ l("div", { style: { position: "absolute", inset: 0, pointerEvents: "none" }, children: /* @__PURE__ */ l(
|
|
701
|
+
"div",
|
|
702
|
+
{
|
|
703
|
+
"data-controls": e.widthKey,
|
|
704
|
+
"data-controls-axis": "x",
|
|
705
|
+
"data-controls-max-fraction": String(r),
|
|
706
|
+
"data-controls-variant": "column-width",
|
|
707
|
+
className: `${t}-title-resize-handle`,
|
|
708
|
+
style: {
|
|
709
|
+
position: "absolute",
|
|
710
|
+
top: 0,
|
|
711
|
+
left: u(o),
|
|
712
|
+
width: u(ht),
|
|
713
|
+
height: "100%",
|
|
714
|
+
pointerEvents: "auto"
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
) }, `${e.widthKey}-junction`);
|
|
718
|
+
}), xe = () => !f || x ? null : /* @__PURE__ */ a(ft, { children: [
|
|
719
|
+
Ni(),
|
|
720
|
+
ki()
|
|
721
|
+
] }), Oe = (e) => {
|
|
722
|
+
const i = !e.objectFit && It(ut);
|
|
723
|
+
return {
|
|
724
|
+
className: `${t}-slide-image-cell${i ? ` ${t}-slide-image-cell-cover` : ""}`,
|
|
725
|
+
style: {
|
|
726
|
+
maxWidth: ei,
|
|
727
|
+
maxHeight: ii,
|
|
728
|
+
...i ? { "--image-aspect-ratio": Qe(ut) } : {}
|
|
729
|
+
}
|
|
730
|
+
};
|
|
731
|
+
}, De = (e) => e.objectFit ? {
|
|
732
|
+
className: `${t}-slide-image ${t}-slide-image-custom`,
|
|
733
|
+
style: { "--image-object-fit": e.objectFit }
|
|
734
|
+
} : It(ut) ? { className: `${t}-slide-image ${t}-slide-image-cover` } : { className: `${t}-slide-image ${t}-slide-image-fit` }, _e = (e) => {
|
|
735
|
+
if (e.length === 0) return null;
|
|
736
|
+
const i = e.length > 1, r = ye(Qt), n = `calc(-0.5 * (${r} + ${Qt}))`;
|
|
737
|
+
if (e.length === 1) {
|
|
738
|
+
const o = e[0];
|
|
739
|
+
return /* @__PURE__ */ l("div", { ...Oe(o), children: /* @__PURE__ */ l("img", { ...De(o), src: o.assetId, alt: o.name ?? "", draggable: !1 }) });
|
|
740
|
+
}
|
|
741
|
+
return /* @__PURE__ */ l(
|
|
742
|
+
"div",
|
|
743
|
+
{
|
|
744
|
+
className: `${t}-slide-inner`,
|
|
745
|
+
style: i ? { gap: Qt } : void 0,
|
|
746
|
+
children: e.map((o, c) => /* @__PURE__ */ a("div", { ...Oe(o), children: [
|
|
747
|
+
/* @__PURE__ */ l(
|
|
748
|
+
"img",
|
|
749
|
+
{
|
|
750
|
+
...De(o),
|
|
751
|
+
src: o.assetId,
|
|
752
|
+
alt: o.name ?? "",
|
|
753
|
+
draggable: !1
|
|
754
|
+
}
|
|
755
|
+
),
|
|
756
|
+
f && i && c < e.length - 1 && /* @__PURE__ */ l(
|
|
757
|
+
"div",
|
|
758
|
+
{
|
|
759
|
+
"data-controls": "imageGap",
|
|
760
|
+
"data-controls-axis": "x",
|
|
761
|
+
style: {
|
|
762
|
+
position: "absolute",
|
|
763
|
+
top: 0,
|
|
764
|
+
right: n,
|
|
765
|
+
width: r,
|
|
766
|
+
height: "100%",
|
|
767
|
+
pointerEvents: "auto",
|
|
768
|
+
zIndex: 3
|
|
769
|
+
}
|
|
770
|
+
}
|
|
771
|
+
)
|
|
772
|
+
] }, `${o.assetId}-${c}`))
|
|
773
|
+
}
|
|
774
|
+
);
|
|
775
|
+
}, Je = !!(h != null && h.title2 || h != null && h.title3 || m != null && m.title2 || m != null && m.title3 || (rt ?? 0) > 0 || f), Li = () => /* @__PURE__ */ a(
|
|
776
|
+
"div",
|
|
777
|
+
{
|
|
778
|
+
style: {
|
|
779
|
+
position: "relative",
|
|
780
|
+
width: "100%",
|
|
781
|
+
flex: 1,
|
|
782
|
+
alignSelf: "stretch",
|
|
783
|
+
display: "flex",
|
|
784
|
+
flexDirection: "column",
|
|
785
|
+
minHeight: 0,
|
|
786
|
+
height: "100%"
|
|
787
|
+
},
|
|
788
|
+
children: [
|
|
789
|
+
/* @__PURE__ */ l(
|
|
790
|
+
"div",
|
|
791
|
+
{
|
|
792
|
+
ref: U,
|
|
793
|
+
className: zt,
|
|
794
|
+
style: {
|
|
795
|
+
position: "absolute",
|
|
796
|
+
visibility: "hidden",
|
|
797
|
+
pointerEvents: "none",
|
|
798
|
+
left: 0,
|
|
799
|
+
right: 0,
|
|
800
|
+
top: 0,
|
|
801
|
+
width: "100%",
|
|
802
|
+
height: "auto"
|
|
803
|
+
},
|
|
804
|
+
"aria-hidden": "true",
|
|
805
|
+
children: Ft(Rt || h)
|
|
806
|
+
}
|
|
807
|
+
),
|
|
808
|
+
/* @__PURE__ */ a(
|
|
809
|
+
"div",
|
|
810
|
+
{
|
|
811
|
+
ref: ne,
|
|
812
|
+
className: `${t}-titles-row-two-row`,
|
|
813
|
+
style: {
|
|
814
|
+
...T && at ? { minHeight: at } : void 0,
|
|
815
|
+
...T && kt ? { width: kt, maxWidth: "100%" } : void 0
|
|
816
|
+
},
|
|
817
|
+
children: [
|
|
818
|
+
Ae(
|
|
819
|
+
/* @__PURE__ */ a(
|
|
820
|
+
"div",
|
|
821
|
+
{
|
|
822
|
+
className: zt,
|
|
823
|
+
style: {
|
|
824
|
+
position: T ? "absolute" : "relative",
|
|
825
|
+
inset: T ? 0 : void 0,
|
|
826
|
+
width: "100%"
|
|
827
|
+
},
|
|
828
|
+
children: [
|
|
829
|
+
m && T ? /* @__PURE__ */ l("div", { className: `${wi} ${t}-titles-fade-out`, children: ge(m) }) : null,
|
|
830
|
+
/* @__PURE__ */ l(
|
|
831
|
+
"div",
|
|
832
|
+
{
|
|
833
|
+
className: `${t}-titles-layer-in${T ? ` ${t}-titles-layer-in-fading ${t}-titles-fade-in` : ""}`,
|
|
834
|
+
children: ge(h)
|
|
835
|
+
}
|
|
836
|
+
)
|
|
837
|
+
]
|
|
838
|
+
}
|
|
839
|
+
),
|
|
840
|
+
T && at ? at : void 0
|
|
841
|
+
),
|
|
842
|
+
Je ? /* @__PURE__ */ a("div", { className: `${t}-titles-row-bottom-area`, children: [
|
|
843
|
+
m && T ? /* @__PURE__ */ l("div", { className: `${ze} ${t}-titles-layer-out-bottom ${t}-titles-fade-out`, children: pe(m) }) : null,
|
|
844
|
+
/* @__PURE__ */ l(
|
|
845
|
+
"div",
|
|
846
|
+
{
|
|
847
|
+
className: `${t}-titles-layer-in${T ? ` ${t}-titles-layer-in-fading ${t}-titles-fade-in` : ""}${x ? ` ${t}-titles-layer-in-stacked` : ""}`,
|
|
848
|
+
children: pe(h, !0)
|
|
849
|
+
}
|
|
850
|
+
)
|
|
851
|
+
] }) : null
|
|
852
|
+
]
|
|
853
|
+
}
|
|
854
|
+
)
|
|
855
|
+
]
|
|
856
|
+
}
|
|
857
|
+
), Hi = () => {
|
|
858
|
+
const e = Je;
|
|
859
|
+
return /* @__PURE__ */ a(
|
|
860
|
+
"div",
|
|
861
|
+
{
|
|
862
|
+
style: {
|
|
863
|
+
position: "relative",
|
|
864
|
+
width: "100%",
|
|
865
|
+
alignSelf: "stretch",
|
|
866
|
+
display: "flex",
|
|
867
|
+
flexDirection: "column",
|
|
868
|
+
minHeight: 0,
|
|
869
|
+
...e ? { flex: 1, height: "100%" } : {}
|
|
870
|
+
},
|
|
871
|
+
children: [
|
|
872
|
+
/* @__PURE__ */ l(
|
|
873
|
+
"div",
|
|
874
|
+
{
|
|
875
|
+
className: `${t}-titles-row-two-row`,
|
|
876
|
+
style: e ? void 0 : { flex: "0 0 auto", height: "auto" },
|
|
877
|
+
children: Ft(h, !0)
|
|
878
|
+
}
|
|
879
|
+
),
|
|
880
|
+
xe()
|
|
881
|
+
]
|
|
882
|
+
}
|
|
883
|
+
);
|
|
884
|
+
};
|
|
885
|
+
return /* @__PURE__ */ a(
|
|
886
|
+
"div",
|
|
887
|
+
{
|
|
888
|
+
ref: X,
|
|
889
|
+
"data-selection": "none",
|
|
890
|
+
className: `${t}-lightbox${v ? ` ${t}-lightbox-editor` : ""}${f ? ` ${t}-lightbox-edit-mode` : ""}`,
|
|
891
|
+
onClick: () => {
|
|
892
|
+
le || Tt();
|
|
893
|
+
},
|
|
894
|
+
role: "dialog",
|
|
895
|
+
"aria-modal": "true",
|
|
896
|
+
"aria-label": "Journal gallery",
|
|
897
|
+
tabIndex: dt ? void 0 : -1,
|
|
898
|
+
style: {
|
|
899
|
+
opacity: Te ? 1 : 0,
|
|
900
|
+
transition: "opacity 300ms ease",
|
|
901
|
+
pointerEvents: Te ? "auto" : "none"
|
|
902
|
+
},
|
|
903
|
+
children: [
|
|
904
|
+
/* @__PURE__ */ l("div", { className: `${t}-lightbox-backdrop`, style: { backgroundColor: Yt, ...ai } }),
|
|
905
|
+
/* @__PURE__ */ a(
|
|
906
|
+
"div",
|
|
907
|
+
{
|
|
908
|
+
className: `${t}-lightbox-dismiss-area`,
|
|
909
|
+
style: fi,
|
|
910
|
+
...hi,
|
|
911
|
+
children: [
|
|
912
|
+
/* @__PURE__ */ l(
|
|
913
|
+
"div",
|
|
914
|
+
{
|
|
915
|
+
className: `${t}-lightbox-content`,
|
|
916
|
+
style: ci,
|
|
917
|
+
onClick: (e) => e.stopPropagation(),
|
|
918
|
+
children: /* @__PURE__ */ l(
|
|
919
|
+
"div",
|
|
920
|
+
{
|
|
921
|
+
className: `${t}-lightbox-strip`,
|
|
922
|
+
"data-desktop-nav": G && d.length > 1 ? "true" : "false",
|
|
923
|
+
onPointerDown: G ? ui : void 0,
|
|
924
|
+
onPointerUp: G ? mi : void 0,
|
|
925
|
+
onPointerCancel: G ? gi : void 0,
|
|
926
|
+
children: /* @__PURE__ */ a("div", { className: `${t}-slide-stack`, children: [
|
|
927
|
+
Be && Ne ? /* @__PURE__ */ l(
|
|
928
|
+
"div",
|
|
929
|
+
{
|
|
930
|
+
className: `${t}-slide-layer-out ${t}-slide-fade-out`,
|
|
931
|
+
onAnimationEnd: (e) => {
|
|
932
|
+
e.target === e.currentTarget && ri(ee);
|
|
933
|
+
},
|
|
934
|
+
children: /* @__PURE__ */ l("div", { className: `${t}-slide-area`, children: _e(Be.images) })
|
|
935
|
+
},
|
|
936
|
+
`slide-out-${ee}`
|
|
937
|
+
) : null,
|
|
938
|
+
/* @__PURE__ */ l(
|
|
939
|
+
"div",
|
|
940
|
+
{
|
|
941
|
+
className: `${t}-slide-layer-in${Ne ? ` ${t}-slide-fade-in` : ""}`,
|
|
942
|
+
children: /* @__PURE__ */ l("div", { className: `${t}-slide-area`, children: wt ? _e(wt.images) : null })
|
|
943
|
+
},
|
|
944
|
+
`slide-in-${ee}-${y}`
|
|
945
|
+
)
|
|
946
|
+
] })
|
|
947
|
+
}
|
|
948
|
+
)
|
|
949
|
+
}
|
|
950
|
+
),
|
|
951
|
+
/* @__PURE__ */ a("div", { className: `${t}-lightbox-overlay-content`, style: di, children: [
|
|
952
|
+
/* @__PURE__ */ l(
|
|
953
|
+
"div",
|
|
954
|
+
{
|
|
955
|
+
"data-controls": f ? "contentMarginTop" : void 0,
|
|
956
|
+
className: f ? `${t}-control` : void 0,
|
|
957
|
+
style: { height: ni, width: "100%" }
|
|
958
|
+
}
|
|
959
|
+
),
|
|
960
|
+
/* @__PURE__ */ l("div", { style: {
|
|
961
|
+
display: "flex",
|
|
962
|
+
flexDirection: "row",
|
|
963
|
+
width: "100%",
|
|
964
|
+
...x ? { flex: 1, minHeight: 0 } : {}
|
|
965
|
+
}, children: /* @__PURE__ */ l("div", { className: `${t}-lightbox-content-area${x ? ` ${t}-lightbox-content-area-stacked` : ""}`, children: pi && /* @__PURE__ */ l(
|
|
966
|
+
"div",
|
|
967
|
+
{
|
|
968
|
+
className: `${t}-text-bar-cell${x ? ` ${t}-text-bar-cell-stacked` : ""}`,
|
|
969
|
+
style: x ? void 0 : { flex: 1, minWidth: 0, width: "100%" },
|
|
970
|
+
children: x ? _ === "fade" ? Li() : Hi() : _ === "fade" ? Ii() : Si()
|
|
971
|
+
}
|
|
972
|
+
) }) })
|
|
973
|
+
] })
|
|
974
|
+
]
|
|
975
|
+
}
|
|
976
|
+
)
|
|
977
|
+
]
|
|
978
|
+
}
|
|
979
|
+
);
|
|
980
|
+
};
|
|
981
|
+
function Yi(t) {
|
|
982
|
+
return `
|
|
983
|
+
.${t}-wrapper {
|
|
984
|
+
position: relative;
|
|
985
|
+
width: 100%;
|
|
986
|
+
height: 100%;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
.${t}-cover {
|
|
990
|
+
position: relative;
|
|
991
|
+
width: 100%;
|
|
992
|
+
height: 100%;
|
|
993
|
+
cursor: pointer;
|
|
994
|
+
pointer-events: auto;
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
.${t}-ratio-wrapper-cover {
|
|
998
|
+
aspect-ratio: var(--image-aspect-ratio);
|
|
999
|
+
height: auto;
|
|
1000
|
+
overflow: hidden;
|
|
1001
|
+
width: 100%;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
.${t}-ratio-wrapper-fit {
|
|
1005
|
+
height: 100%;
|
|
1006
|
+
width: 100%;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
.${t}-cover-image {
|
|
1010
|
+
display: block;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
.${t}-cover-image-cover {
|
|
1014
|
+
object-fit: cover;
|
|
1015
|
+
width: 100%;
|
|
1016
|
+
height: 100%;
|
|
1017
|
+
max-width: 100%;
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
.${t}-cover-image-fit {
|
|
1021
|
+
object-fit: contain;
|
|
1022
|
+
width: auto;
|
|
1023
|
+
height: auto;
|
|
1024
|
+
max-width: 100%;
|
|
1025
|
+
}
|
|
1026
|
+
|
|
1027
|
+
.${t}-lightbox {
|
|
1028
|
+
position: fixed;
|
|
1029
|
+
inset: 0;
|
|
1030
|
+
z-index: 9997;
|
|
1031
|
+
display: flex;
|
|
1032
|
+
flex-direction: column;
|
|
1033
|
+
align-items: center;
|
|
1034
|
+
justify-content: center;
|
|
1035
|
+
overscroll-behavior: none;
|
|
1036
|
+
}
|
|
1037
|
+
|
|
1038
|
+
.${t}-lightbox-editor {
|
|
1039
|
+
inset: auto;
|
|
1040
|
+
top: var(--cntrl-article-top, 0);
|
|
1041
|
+
left: var(--cntrl-article-left, 0);
|
|
1042
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
1043
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
.${t}-lightbox-edit-mode {
|
|
1047
|
+
z-index: 1;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
.${t}-lightbox-content {
|
|
1051
|
+
position: relative;
|
|
1052
|
+
z-index: 1;
|
|
1053
|
+
display: flex;
|
|
1054
|
+
flex-direction: column;
|
|
1055
|
+
align-items: center;
|
|
1056
|
+
justify-content: center;
|
|
1057
|
+
width: 100%;
|
|
1058
|
+
height: 100%;
|
|
1059
|
+
box-sizing: border-box;
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
.${t}-lightbox-backdrop {
|
|
1063
|
+
position: absolute;
|
|
1064
|
+
inset: 0;
|
|
1065
|
+
pointer-events: none;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
.${t}-lightbox-dismiss-area {
|
|
1069
|
+
position: relative;
|
|
1070
|
+
width: 100%;
|
|
1071
|
+
height: 100%;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
.${t}-lightbox-strip {
|
|
1075
|
+
position: relative;
|
|
1076
|
+
flex: 1;
|
|
1077
|
+
width: 100%;
|
|
1078
|
+
min-height: 0;
|
|
1079
|
+
display: flex;
|
|
1080
|
+
align-items: center;
|
|
1081
|
+
justify-content: center;
|
|
1082
|
+
max-width: 100%;
|
|
1083
|
+
overflow: hidden;
|
|
1084
|
+
box-sizing: border-box;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
.${t}-lightbox-strip[data-desktop-nav="true"]::before,
|
|
1088
|
+
.${t}-lightbox-strip[data-desktop-nav="true"]::after {
|
|
1089
|
+
content: '';
|
|
1090
|
+
position: absolute;
|
|
1091
|
+
top: 0;
|
|
1092
|
+
bottom: 0;
|
|
1093
|
+
width: 50%;
|
|
1094
|
+
z-index: 2;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
.${t}-lightbox-strip[data-desktop-nav="true"]::before {
|
|
1098
|
+
left: 0;
|
|
1099
|
+
cursor: w-resize;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
.${t}-lightbox-strip[data-desktop-nav="true"]::after {
|
|
1103
|
+
right: 0;
|
|
1104
|
+
cursor: e-resize;
|
|
1105
|
+
}
|
|
1106
|
+
|
|
1107
|
+
.${t}-slide-stack {
|
|
1108
|
+
position: relative;
|
|
1109
|
+
width: 100%;
|
|
1110
|
+
height: 100%;
|
|
1111
|
+
display: flex;
|
|
1112
|
+
align-items: center;
|
|
1113
|
+
justify-content: center;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
.${t}-slide-layer-out {
|
|
1117
|
+
position: absolute;
|
|
1118
|
+
inset: 0;
|
|
1119
|
+
display: flex;
|
|
1120
|
+
align-items: center;
|
|
1121
|
+
justify-content: center;
|
|
1122
|
+
z-index: 1;
|
|
1123
|
+
}
|
|
1124
|
+
|
|
1125
|
+
.${t}-slide-layer-in {
|
|
1126
|
+
position: absolute;
|
|
1127
|
+
inset: 0;
|
|
1128
|
+
display: flex;
|
|
1129
|
+
align-items: center;
|
|
1130
|
+
justify-content: center;
|
|
1131
|
+
z-index: 0;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
@keyframes ${t}-slide-fade-in {
|
|
1135
|
+
from { opacity: 0; }
|
|
1136
|
+
to { opacity: 1; }
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
@keyframes ${t}-slide-fade-out {
|
|
1140
|
+
from { opacity: 1; }
|
|
1141
|
+
to { opacity: 0; }
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
.${t}-slide-fade-in {
|
|
1145
|
+
opacity: 0;
|
|
1146
|
+
animation: ${t}-slide-fade-in 300ms ease-in-out forwards;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
.${t}-slide-fade-out {
|
|
1150
|
+
animation: ${t}-slide-fade-out 300ms ease-in-out forwards;
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
.${t}-slide-area {
|
|
1154
|
+
position: relative;
|
|
1155
|
+
width: 100%;
|
|
1156
|
+
height: 100%;
|
|
1157
|
+
min-width: 0;
|
|
1158
|
+
min-height: 0;
|
|
1159
|
+
box-sizing: border-box;
|
|
1160
|
+
display: flex;
|
|
1161
|
+
justify-content: center;
|
|
1162
|
+
align-items: center;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
.${t}-slide-inner {
|
|
1166
|
+
display: flex;
|
|
1167
|
+
flex-direction: row;
|
|
1168
|
+
align-items: center;
|
|
1169
|
+
justify-content: center;
|
|
1170
|
+
width: 100%;
|
|
1171
|
+
height: 100%;
|
|
1172
|
+
box-sizing: border-box;
|
|
1173
|
+
}
|
|
1174
|
+
|
|
1175
|
+
.${t}-slide-image-cell {
|
|
1176
|
+
position: relative;
|
|
1177
|
+
min-width: 0;
|
|
1178
|
+
height: 100%;
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
.${t}-slide-image-cell-cover {
|
|
1182
|
+
aspect-ratio: var(--image-aspect-ratio);
|
|
1183
|
+
overflow: hidden;
|
|
1184
|
+
height: auto;
|
|
1185
|
+
width: 100%;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
.${t}-slide-image {
|
|
1189
|
+
display: block;
|
|
1190
|
+
user-select: none;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
.${t}-slide-image-cover {
|
|
1194
|
+
object-fit: cover;
|
|
1195
|
+
width: 100%;
|
|
1196
|
+
height: 100%;
|
|
1197
|
+
max-width: 100%;
|
|
1198
|
+
}
|
|
1199
|
+
|
|
1200
|
+
.${t}-slide-image-fit {
|
|
1201
|
+
object-fit: contain;
|
|
1202
|
+
width: auto;
|
|
1203
|
+
height: auto;
|
|
1204
|
+
max-width: 100%;
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
.${t}-slide-image-custom {
|
|
1208
|
+
object-fit: var(--image-object-fit);
|
|
1209
|
+
max-width: 100%;
|
|
1210
|
+
height: 100%;
|
|
1211
|
+
}
|
|
1212
|
+
|
|
1213
|
+
.${t}-close-icon {
|
|
1214
|
+
position: relative;
|
|
1215
|
+
flex-shrink: 0;
|
|
1216
|
+
align-self: center;
|
|
1217
|
+
pointer-events: auto;
|
|
1218
|
+
z-index: 2;
|
|
1219
|
+
display: flex;
|
|
1220
|
+
align-items: center;
|
|
1221
|
+
justify-content: center;
|
|
1222
|
+
border: none;
|
|
1223
|
+
background-color: transparent;
|
|
1224
|
+
padding: 0;
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
.${t}-close-icon-inner {
|
|
1228
|
+
all: unset;
|
|
1229
|
+
position: relative;
|
|
1230
|
+
cursor: pointer;
|
|
1231
|
+
width: 100%;
|
|
1232
|
+
height: 100%;
|
|
1233
|
+
pointer-events: auto;
|
|
1234
|
+
}
|
|
1235
|
+
|
|
1236
|
+
.${t}-close-icon-img {
|
|
1237
|
+
position: absolute;
|
|
1238
|
+
top: 50%;
|
|
1239
|
+
left: 50%;
|
|
1240
|
+
transform: translate(-50%, -50%);
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
.${t}-titles-row {
|
|
1244
|
+
position: relative;
|
|
1245
|
+
flex: 0 1 auto;
|
|
1246
|
+
z-index: 2;
|
|
1247
|
+
box-sizing: border-box;
|
|
1248
|
+
pointer-events: none;
|
|
1249
|
+
word-break: break-word;
|
|
1250
|
+
min-width: 0;
|
|
1251
|
+
display: flex;
|
|
1252
|
+
flex-direction: row;
|
|
1253
|
+
align-items: baseline;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
.${t}-titles-row-header {
|
|
1257
|
+
flex: 1;
|
|
1258
|
+
align-items: baseline;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
.${t}-titles-row-header-controls {
|
|
1262
|
+
display: flex;
|
|
1263
|
+
flex-direction: row;
|
|
1264
|
+
align-items: baseline;
|
|
1265
|
+
flex-shrink: 0;
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
.${t}-titles-baseline-strut {
|
|
1269
|
+
width: 0;
|
|
1270
|
+
overflow: hidden;
|
|
1271
|
+
flex-shrink: 0;
|
|
1272
|
+
pointer-events: none;
|
|
1273
|
+
white-space: nowrap;
|
|
1274
|
+
}
|
|
1275
|
+
|
|
1276
|
+
.${t}-titles-row-titles {
|
|
1277
|
+
position: relative;
|
|
1278
|
+
flex: 1;
|
|
1279
|
+
min-width: 0;
|
|
1280
|
+
align-self: flex-start;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
.${t}-titles-row-two-row {
|
|
1284
|
+
display: flex;
|
|
1285
|
+
flex: 1;
|
|
1286
|
+
height: 100%;
|
|
1287
|
+
min-height: 0;
|
|
1288
|
+
align-self: stretch;
|
|
1289
|
+
flex-direction: column;
|
|
1290
|
+
width: 100%;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
.${t}-titles-row-top {
|
|
1294
|
+
display: flex;
|
|
1295
|
+
flex-direction: row;
|
|
1296
|
+
align-items: baseline;
|
|
1297
|
+
width: 100%;
|
|
1298
|
+
flex-shrink: 0;
|
|
1299
|
+
margin-bottom: 0;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
.${t}-titles-row-top .${t}-title-cell[data-title="title1"] {
|
|
1303
|
+
flex: 0 0 auto;
|
|
1304
|
+
min-width: 0;
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1307
|
+
.${t}-titles-row-bottom-wrap {
|
|
1308
|
+
display: flex;
|
|
1309
|
+
flex-direction: column;
|
|
1310
|
+
width: 100%;
|
|
1311
|
+
margin-top: auto;
|
|
1312
|
+
flex-shrink: 0;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.${t}-titles-row-bottom-area {
|
|
1316
|
+
position: relative;
|
|
1317
|
+
flex: 1;
|
|
1318
|
+
min-height: 0;
|
|
1319
|
+
display: flex;
|
|
1320
|
+
flex-direction: column;
|
|
1321
|
+
width: 100%;
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1324
|
+
.${t}-titles-row-bottom {
|
|
1325
|
+
position: relative;
|
|
1326
|
+
display: flex;
|
|
1327
|
+
flex-direction: row;
|
|
1328
|
+
align-items: flex-end;
|
|
1329
|
+
width: 100%;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
.${t}-titles-row-bottom .${t}-title-cell {
|
|
1333
|
+
flex: 0 0 auto;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
.${t}-title-cell {
|
|
1337
|
+
position: relative;
|
|
1338
|
+
flex: 0 0 auto;
|
|
1339
|
+
min-width: 0;
|
|
1340
|
+
box-sizing: border-box;
|
|
1341
|
+
}
|
|
1342
|
+
|
|
1343
|
+
.${t}-text-bar-cell {
|
|
1344
|
+
position: relative;
|
|
1345
|
+
flex: 0 1 auto;
|
|
1346
|
+
min-width: 0;
|
|
1347
|
+
display: flex;
|
|
1348
|
+
align-items: baseline;
|
|
1349
|
+
}
|
|
1350
|
+
|
|
1351
|
+
.${t}-title1,
|
|
1352
|
+
.${t}-title2,
|
|
1353
|
+
.${t}-title3 {
|
|
1354
|
+
margin: 0;
|
|
1355
|
+
min-width: 0;
|
|
1356
|
+
}
|
|
1357
|
+
|
|
1358
|
+
.${t}-title-resize-handle {
|
|
1359
|
+
background: transparent;
|
|
1360
|
+
}
|
|
1361
|
+
|
|
1362
|
+
.${t}-titles-stack {
|
|
1363
|
+
position: relative;
|
|
1364
|
+
display: flex;
|
|
1365
|
+
flex-direction: row;
|
|
1366
|
+
align-items: baseline;
|
|
1367
|
+
align-self: flex-start;
|
|
1368
|
+
min-width: 0;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
.${t}-titles-stack-stacked {
|
|
1372
|
+
flex-direction: column;
|
|
1373
|
+
align-items: stretch;
|
|
1374
|
+
height: 100%;
|
|
1375
|
+
}
|
|
1376
|
+
|
|
1377
|
+
.${t}-titles-layer-out {
|
|
1378
|
+
position: absolute;
|
|
1379
|
+
inset: 0;
|
|
1380
|
+
display: flex;
|
|
1381
|
+
flex-direction: row;
|
|
1382
|
+
align-items: baseline;
|
|
1383
|
+
z-index: 1;
|
|
1384
|
+
overflow: visible;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
.${t}-titles-layer-out-stacked {
|
|
1388
|
+
flex-direction: column;
|
|
1389
|
+
align-items: stretch;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
.${t}-titles-layer-out-bottom {
|
|
1393
|
+
justify-content: flex-end;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
.${t}-titles-layer-in {
|
|
1397
|
+
position: relative;
|
|
1398
|
+
display: flex;
|
|
1399
|
+
flex-direction: row;
|
|
1400
|
+
align-items: baseline;
|
|
1401
|
+
min-width: 0;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
.${t}-titles-layer-in-stacked {
|
|
1405
|
+
flex-direction: column;
|
|
1406
|
+
align-items: stretch;
|
|
1407
|
+
flex: 1;
|
|
1408
|
+
min-height: 0;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
.${t}-titles-layer-in-fading {
|
|
1412
|
+
position: absolute;
|
|
1413
|
+
inset: 0;
|
|
1414
|
+
z-index: 0;
|
|
1415
|
+
overflow: visible;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
.${t}-titles-fade-in,
|
|
1419
|
+
.${t}-titles-fade-out {
|
|
1420
|
+
overflow: visible;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
@keyframes ${t}-titles-fade-in {
|
|
1424
|
+
from { opacity: 0; }
|
|
1425
|
+
to { opacity: 1; }
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
@keyframes ${t}-titles-fade-out {
|
|
1429
|
+
from { opacity: 1; }
|
|
1430
|
+
to { opacity: 0; }
|
|
1431
|
+
}
|
|
1432
|
+
|
|
1433
|
+
.${t}-titles-fade-in {
|
|
1434
|
+
opacity: 0;
|
|
1435
|
+
animation: ${t}-titles-fade-in 400ms ease-in-out forwards;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1438
|
+
.${t}-titles-fade-out {
|
|
1439
|
+
animation: ${t}-titles-fade-out 400ms ease-in-out forwards;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.${t}-lightbox-overlay-content {
|
|
1443
|
+
position: absolute;
|
|
1444
|
+
inset: 0;
|
|
1445
|
+
z-index: 3;
|
|
1446
|
+
pointer-events: none;
|
|
1447
|
+
display: flex;
|
|
1448
|
+
flex-direction: column;
|
|
1449
|
+
isolation: isolate;
|
|
1450
|
+
}
|
|
1451
|
+
|
|
1452
|
+
.${t}-lightbox-content-area {
|
|
1453
|
+
position: relative;
|
|
1454
|
+
display: flex;
|
|
1455
|
+
flex-direction: row;
|
|
1456
|
+
align-items: flex-start;
|
|
1457
|
+
flex: 1;
|
|
1458
|
+
min-width: 0;
|
|
1459
|
+
min-height: 0;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
.${t}-lightbox-content-area-stacked {
|
|
1463
|
+
align-items: stretch;
|
|
1464
|
+
align-self: stretch;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
.${t}-text-bar-cell-stacked {
|
|
1468
|
+
align-self: stretch;
|
|
1469
|
+
flex: 1;
|
|
1470
|
+
min-width: 0;
|
|
1471
|
+
min-height: 0;
|
|
1472
|
+
height: 100%;
|
|
1473
|
+
flex-direction: column;
|
|
1474
|
+
align-items: stretch;
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
.${t}-entry-counter {
|
|
1478
|
+
position: relative;
|
|
1479
|
+
z-index: 2;
|
|
1480
|
+
pointer-events: none;
|
|
1481
|
+
white-space: nowrap;
|
|
1482
|
+
flex-shrink: 0;
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
.${t}-control {
|
|
1486
|
+
position: relative;
|
|
1487
|
+
z-index: 2;
|
|
1488
|
+
pointer-events: auto;
|
|
1489
|
+
flex-shrink: 0;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
.${t}-control::before {
|
|
1493
|
+
content: "";
|
|
1494
|
+
position: absolute;
|
|
1495
|
+
top: 0;
|
|
1496
|
+
left: 0;
|
|
1497
|
+
width: 100%;
|
|
1498
|
+
height: 100%;
|
|
1499
|
+
min-width: 20px;
|
|
1500
|
+
min-height: 20px;
|
|
1501
|
+
pointer-events: auto;
|
|
1502
|
+
z-index: 10;
|
|
1503
|
+
}
|
|
1504
|
+
`;
|
|
1505
|
+
}
|
|
1506
|
+
const ln = ({ settings: t, content: D, isEditor: W, isEditMode: v, isPreviewMode: f, portalId: lt, metadata: Y }) => {
|
|
1507
|
+
const { prefix: N } = zi(), H = (Y == null ? void 0 : Y.itemId) ?? null, { cover: q, coverFit: Z, type: M } = t, ut = $(null), [Yt, z] = L(!1), [qt, mt] = L(0), _ = $(!1), Q = $(!1), E = $(!1), B = C(
|
|
1508
|
+
() => (D ?? []).filter((b) => Gi(b).length > 0),
|
|
1509
|
+
[D]
|
|
1510
|
+
), K = Yt && B.length > 0, I = !W, Wt = p(() => {
|
|
1511
|
+
I && (E.current = !0, Ui(Q.current, H), Q.current = !1);
|
|
1512
|
+
}, [I, H]), rt = (b = 0) => {
|
|
1513
|
+
if (B.length === 0 || W && !v && !f) return;
|
|
1514
|
+
const j = Vt(B, M), J = Math.max(0, Math.min(b, j.length - 1));
|
|
1515
|
+
if (mt(J), I) {
|
|
1516
|
+
const gt = Xi();
|
|
1517
|
+
Ee(J + 1, H, gt), Q.current = !gt;
|
|
1518
|
+
}
|
|
1519
|
+
z(!0);
|
|
1520
|
+
}, Zt = p(() => {
|
|
1521
|
+
z(!1), E.current = !1;
|
|
1522
|
+
}, []);
|
|
1523
|
+
return ot(() => {
|
|
1524
|
+
!W || v || f || z(!1);
|
|
1525
|
+
}, [W, v, f]), ot(() => {
|
|
1526
|
+
if (!I || typeof window > "u") return;
|
|
1527
|
+
const b = window.history.scrollRestoration;
|
|
1528
|
+
return window.history.scrollRestoration = "manual", () => {
|
|
1529
|
+
window.history.scrollRestoration = b;
|
|
1530
|
+
};
|
|
1531
|
+
}, [I]), ot(() => {
|
|
1532
|
+
if (!I || _.current) return;
|
|
1533
|
+
_.current = !0;
|
|
1534
|
+
const b = qe(H);
|
|
1535
|
+
if (!b) return;
|
|
1536
|
+
const j = Ze(b, Vt(B, M).length);
|
|
1537
|
+
j < 0 || (mt(j), z(!0));
|
|
1538
|
+
}, [B, H, I, M]), ot(() => {
|
|
1539
|
+
if (!I) return;
|
|
1540
|
+
const b = () => {
|
|
1541
|
+
if (E.current) {
|
|
1542
|
+
E.current = !1, z(!1);
|
|
1543
|
+
return;
|
|
1544
|
+
}
|
|
1545
|
+
const j = qe(H);
|
|
1546
|
+
if (!j) {
|
|
1547
|
+
z(!1);
|
|
1548
|
+
return;
|
|
1549
|
+
}
|
|
1550
|
+
const J = Ze(j, Vt(B, M).length);
|
|
1551
|
+
if (J < 0) {
|
|
1552
|
+
z(!1);
|
|
1553
|
+
return;
|
|
1554
|
+
}
|
|
1555
|
+
Q.current = !1, mt(J), z(!0);
|
|
1556
|
+
};
|
|
1557
|
+
return window.addEventListener("popstate", b), () => window.removeEventListener("popstate", b);
|
|
1558
|
+
}, [B, H, I, M]), /* @__PURE__ */ a(ft, { children: [
|
|
1559
|
+
/* @__PURE__ */ a("div", { ref: ut, className: `${N}-wrapper`, children: [
|
|
1560
|
+
/* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: Yi(N) } }),
|
|
1561
|
+
q ? /* @__PURE__ */ l(
|
|
1562
|
+
"button",
|
|
1563
|
+
{
|
|
1564
|
+
type: "button",
|
|
1565
|
+
className: `${N}-cover ${It(Z) ? `${N}-ratio-wrapper-cover` : `${N}-ratio-wrapper-fit`}`,
|
|
1566
|
+
onClick: () => rt(),
|
|
1567
|
+
style: {
|
|
1568
|
+
display: "block",
|
|
1569
|
+
padding: 0,
|
|
1570
|
+
border: "none",
|
|
1571
|
+
background: "transparent",
|
|
1572
|
+
pointerEvents: W && !v && !f ? "none" : void 0,
|
|
1573
|
+
...It(Z) ? { "--image-aspect-ratio": Qe(Z) } : {}
|
|
1574
|
+
},
|
|
1575
|
+
"aria-label": "Open journal gallery",
|
|
1576
|
+
children: /* @__PURE__ */ l(
|
|
1577
|
+
"img",
|
|
1578
|
+
{
|
|
1579
|
+
className: `${N}-cover-image ${It(Z) ? `${N}-cover-image-cover` : `${N}-cover-image-fit`}`,
|
|
1580
|
+
src: q,
|
|
1581
|
+
alt: "cover"
|
|
1582
|
+
}
|
|
1583
|
+
)
|
|
1584
|
+
}
|
|
1585
|
+
) : null
|
|
1586
|
+
] }),
|
|
1587
|
+
K && typeof document < "u" && (() => {
|
|
1588
|
+
const b = (lt ? document.getElementById(lt) : null) ?? document.body;
|
|
1589
|
+
return Bi(
|
|
1590
|
+
/* @__PURE__ */ l(
|
|
1591
|
+
Vi,
|
|
1592
|
+
{
|
|
1593
|
+
prefix: N,
|
|
1594
|
+
entries: B,
|
|
1595
|
+
settings: t,
|
|
1596
|
+
isEditor: W,
|
|
1597
|
+
isEditMode: v,
|
|
1598
|
+
isPreviewMode: f,
|
|
1599
|
+
initialSlideIndex: qt,
|
|
1600
|
+
enableUrlSync: I,
|
|
1601
|
+
journalItemId: H,
|
|
1602
|
+
onBeforeClose: Wt,
|
|
1603
|
+
onClose: Zt
|
|
1604
|
+
}
|
|
1605
|
+
),
|
|
1606
|
+
b
|
|
1607
|
+
);
|
|
1608
|
+
})()
|
|
1609
|
+
] });
|
|
1610
|
+
};
|
|
1611
|
+
export {
|
|
1612
|
+
ln as LightboxJournal
|
|
1613
|
+
};
|