@cntrl-site/components 1.0.106-alpha.0 → 1.0.107-alpha.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/dist/ArchivePopup-DMpGP8r2.js +176 -0
- package/dist/ArchivePopup-X4EtTAyA.mjs +694 -0
- package/dist/ArchivePopupComponent-BTniPIfi.js +1 -0
- package/dist/{PretextComponent-j-OsRZTx.mjs → ArchivePopupComponent-GgAT2Avz.mjs} +954 -479
- package/dist/ClickGallerie-CYQMgrIr.js +36 -0
- package/dist/ClickGallerie-o2U6oyOF.mjs +272 -0
- package/dist/Components/ArchivePopup/ArchivePopup.d.ts +154 -0
- package/dist/Components/ArchivePopup/ArchivePopupComponent.d.ts +288 -0
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +2 -1
- package/dist/Components/Helix/Helix.d.ts +4 -1
- package/dist/Components/Hive/Hive.d.ts +4 -1
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +2 -1
- package/dist/Components/List/List.d.ts +6 -2
- package/dist/Components/Marquee/Marquee.d.ts +6 -2
- package/dist/Components/MarqueeText/MarqueeText.d.ts +2 -1
- package/dist/Components/Mercury/Mercury.d.ts +4 -1
- package/dist/Components/Waterfall/WaterfallLightbox.d.ts +4 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +27 -0
- package/dist/Components/utils/LinkWrapper.d.ts +16 -0
- package/dist/Components/utils/embedMedia.d.ts +40 -0
- package/dist/Components/utils/index.d.ts +6 -0
- package/dist/{ControlSlider-SiOt22l_.js → ControlSlider-Kkec-i14.js} +1 -1
- package/dist/{ControlSlider-pZv7H6BU.mjs → ControlSlider-LcZmviGX.mjs} +1 -1
- package/dist/EmbedMediaFrame-DsOTKE4i.js +1 -0
- package/dist/EmbedMediaFrame-DwHeOAy5.mjs +164 -0
- package/dist/{FAQ-C7823fyi.js → FAQ-BxhMo7T8.js} +1 -1
- package/dist/{FAQ-CZ39u4m8.mjs → FAQ-CdwSft5p.mjs} +1 -1
- package/dist/Grid-CFHTP3mb.js +378 -0
- package/dist/Grid-e-gLfsji.mjs +1590 -0
- package/dist/Helix-BpLo9FD3.js +43 -0
- package/dist/Helix-CidI3ucE.mjs +324 -0
- package/dist/{Hive-D6-R6TwM.mjs → Hive-BsmFHk2i.mjs} +505 -475
- package/dist/Hive-D1j6wZpV.js +321 -0
- package/dist/ImageRevealSlider-BuukTGAK.js +1 -0
- package/dist/{ImageRevealSlider-BdFGyVEP.mjs → ImageRevealSlider-Df9sygk9.mjs} +63 -70
- package/dist/{Lightbox-eP9qAZzL.mjs → Lightbox-C_fXsfdz.mjs} +1 -1
- package/dist/{Lightbox-CIss_nOG.js → Lightbox-DaunVrkp.js} +1 -1
- package/dist/LinkWrapper-Ca84iPtg.js +1 -0
- package/dist/LinkWrapper-DZs9hlOn.mjs +13 -0
- package/dist/{List-DW7fyJbf.mjs → List-Bh_-l9vD.mjs} +532 -520
- package/dist/List-DVvpQ24J.js +377 -0
- package/dist/Marquee-DByooiWP.mjs +578 -0
- package/dist/Marquee-DfIP-tIN.js +133 -0
- package/dist/{MarqueeText-Rzt2fJYt.mjs → MarqueeText-D6FNCe6P.mjs} +115 -114
- package/dist/MarqueeText-DsUiV6Zv.js +132 -0
- package/dist/Mercury-B-s2Kvuq.js +267 -0
- package/dist/Mercury-CCW0Es-s.mjs +1700 -0
- package/dist/{RichTextRenderer-B6WtTYlR.mjs → RichTextRenderer-BptwNpbJ.mjs} +10 -9
- package/dist/RichTextRenderer-K90Dd7pt.js +1 -0
- package/dist/{Slider20-Dm8BeCli.mjs → Slider20-CCzixTiN.mjs} +1 -1
- package/dist/{Slider20-C9o2REDl.js → Slider20-fMVeRfgx.js} +1 -1
- package/dist/{TestimonialGrid-CPu4qQ6B.mjs → TestimonialGrid-CbsVxSn9.mjs} +1 -1
- package/dist/{TestimonialGrid-D4ieiz9e.js → TestimonialGrid-CiCagfBU.js} +1 -1
- package/dist/{TestimonialSingle-DLdnAVF7.mjs → TestimonialSingle-BVm3Amrl.mjs} +1 -1
- package/dist/{TestimonialSingle-CVu15ZtV.js → TestimonialSingle-BWXynGjv.js} +1 -1
- package/dist/Waterfall-3kKioKh2.mjs +1432 -0
- package/dist/Waterfall-DII4-WV5.js +288 -0
- package/dist/{components-D2LyuDm-.mjs → components-DKuQ8PUa.mjs} +19 -18
- package/dist/components-SEwSqFrQ.js +1 -0
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +22 -21
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +52 -15
- package/dist/sources.js +1331 -233
- package/dist/sources.mjs +1355 -256
- package/dist/types/SchemaV1.d.ts +53 -1
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +30 -20
- package/package.json +1 -1
- package/dist/ClickGallerie-D7g093HX.js +0 -36
- package/dist/ClickGallerie-QSOQjSdv.mjs +0 -271
- package/dist/Grid-BBpdl60K.js +0 -374
- package/dist/Grid-DS53S_gA.mjs +0 -1576
- package/dist/Helix-BPn9V1sg.mjs +0 -315
- package/dist/Helix-DcgsCc4D.js +0 -43
- package/dist/Hive-n8Fz-j3o.js +0 -321
- package/dist/ImageRevealSlider-BBWtFjUF.js +0 -1
- package/dist/List-C32WImI3.js +0 -377
- package/dist/Marquee-DOIRRCu4.js +0 -133
- package/dist/Marquee-O_PDwlIb.mjs +0 -564
- package/dist/MarqueeText-DkaO2lQ5.js +0 -132
- package/dist/Mercury-C9D10TTT.mjs +0 -1702
- package/dist/Mercury-DynO-NxY.js +0 -267
- package/dist/PretextComponent-BnsS2zJ6.js +0 -1
- package/dist/RichTextRenderer-CIy6yI8U.js +0 -1
- package/dist/Waterfall-DC2WQ3GT.js +0 -287
- package/dist/Waterfall-Yud2VR62.mjs +0 -1404
- package/dist/components-B9Vdjf0w.js +0 -1
|
@@ -0,0 +1,1590 @@
|
|
|
1
|
+
import { jsxs as y, Fragment as X, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { S as oi, a as li } from "./react-splide.esm-DQqds4PL.mjs";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { s as g } from "./scalingValue-C9JH5L6O.mjs";
|
|
5
|
+
import { b as si } from "./buildColorVars-CLyWQm5K.mjs";
|
|
6
|
+
import { u as ai } from "./useScopedStyles-DhBG3557.mjs";
|
|
7
|
+
import { u as Gt } from "./useLazyVideos-CxXyEjRQ.mjs";
|
|
8
|
+
import { L as ut } from "./LinkWrapper-DZs9hlOn.mjs";
|
|
9
|
+
import { i as Oe, g as Et, E as qt, a as ci } from "./EmbedMediaFrame-DwHeOAy5.mjs";
|
|
10
|
+
import { useMemo as Rt, useState as k, useRef as $, useEffect as H, useCallback as re, useLayoutEffect as jt } from "react";
|
|
11
|
+
import { createPortal as di } from "react-dom";
|
|
12
|
+
import { o as It, t as Ct } from "./textStylesToCss-05Mn6I_2.mjs";
|
|
13
|
+
import { S as ui } from "./SvgImage-B5mR9y6q.mjs";
|
|
14
|
+
import { L as Xt } from "./LazyVideo-CdAWymKO.mjs";
|
|
15
|
+
function mi(e) {
|
|
16
|
+
return `calc(var(--cntrl-article-width, 100vw) * ${e / 1440})`;
|
|
17
|
+
}
|
|
18
|
+
function Ht(e) {
|
|
19
|
+
return ((e == null ? void 0 : e.trim().length) ?? 0) > 0;
|
|
20
|
+
}
|
|
21
|
+
function kt(e, t, i, s) {
|
|
22
|
+
return t !== void 0 && t < (e ?? 0.01) ? `${i} ${s}` : i;
|
|
23
|
+
}
|
|
24
|
+
function Tt(e, t, i, s) {
|
|
25
|
+
const o = e ?? 0.01;
|
|
26
|
+
return t === void 0 || t >= o ? {} : {
|
|
27
|
+
[`--${i}-title-leading-gap`]: g((o - t) / 2, s)
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function hi(e) {
|
|
31
|
+
return `
|
|
32
|
+
.${e}-wrapper {
|
|
33
|
+
display: grid;
|
|
34
|
+
align-items: start;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
min-height: ${mi(48)};
|
|
37
|
+
}
|
|
38
|
+
.${e}-item {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
}
|
|
44
|
+
.${e}-item-inner {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
align-items: center;
|
|
48
|
+
outline: 1px solid #FF5C02;
|
|
49
|
+
}
|
|
50
|
+
.${e}-item-inner-hidden {
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-direction: column;
|
|
53
|
+
align-items: center;
|
|
54
|
+
}
|
|
55
|
+
.${e}-item-image-wrapper {
|
|
56
|
+
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
align-items: center;
|
|
59
|
+
align-self: center;
|
|
60
|
+
}
|
|
61
|
+
.${e}-item-image-wrapper-fit-slider {
|
|
62
|
+
display: grid;
|
|
63
|
+
overflow: hidden;
|
|
64
|
+
position: relative;
|
|
65
|
+
}
|
|
66
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer {
|
|
67
|
+
grid-area: 1 / 1;
|
|
68
|
+
width: 100%;
|
|
69
|
+
display: grid;
|
|
70
|
+
visibility: hidden;
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer img {
|
|
74
|
+
grid-area: 1 / 1;
|
|
75
|
+
width: auto;
|
|
76
|
+
height: auto;
|
|
77
|
+
max-width: 100%;
|
|
78
|
+
object-fit: contain;
|
|
79
|
+
}
|
|
80
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer video {
|
|
81
|
+
grid-area: 1 / 1;
|
|
82
|
+
width: auto;
|
|
83
|
+
height: auto;
|
|
84
|
+
max-width: 100%;
|
|
85
|
+
object-fit: contain;
|
|
86
|
+
}
|
|
87
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-image-wrapper-sizer div {
|
|
88
|
+
grid-area: 1 / 1;
|
|
89
|
+
width: 100%;
|
|
90
|
+
}
|
|
91
|
+
.${e}-item-image-wrapper-fit-slider > .${e}-item-slider {
|
|
92
|
+
position: absolute;
|
|
93
|
+
inset: 0;
|
|
94
|
+
width: 100%;
|
|
95
|
+
overflow: hidden;
|
|
96
|
+
}
|
|
97
|
+
.${e}-item-slider .splide__track {
|
|
98
|
+
overflow: hidden;
|
|
99
|
+
}
|
|
100
|
+
.${e}-item-image-link {
|
|
101
|
+
width: 100%;
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
align-items: center;
|
|
105
|
+
}
|
|
106
|
+
.${e}-item-text-link {
|
|
107
|
+
display: flex;
|
|
108
|
+
flex-direction: column;
|
|
109
|
+
align-items: center;
|
|
110
|
+
width: 100%;
|
|
111
|
+
color: inherit;
|
|
112
|
+
text-decoration: none;
|
|
113
|
+
}
|
|
114
|
+
.${e}-item-image {
|
|
115
|
+
width: 100%;
|
|
116
|
+
height: 100%;
|
|
117
|
+
display: block;
|
|
118
|
+
max-width: 100%;
|
|
119
|
+
}
|
|
120
|
+
.${e}-item-video {
|
|
121
|
+
width: 100%;
|
|
122
|
+
height: 100%;
|
|
123
|
+
display: block;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
}
|
|
126
|
+
.${e}-item-slider,
|
|
127
|
+
.${e}-item-slider .splide__track,
|
|
128
|
+
.${e}-item-slider .splide__list,
|
|
129
|
+
.${e}-item-slider .splide__slide {
|
|
130
|
+
width: 100%;
|
|
131
|
+
height: 100%;
|
|
132
|
+
}
|
|
133
|
+
.${e}-item-slider .splide__slide {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
align-items: center;
|
|
137
|
+
}
|
|
138
|
+
.${e}-item-title {
|
|
139
|
+
white-space: normal;
|
|
140
|
+
overflow-wrap: anywhere;
|
|
141
|
+
word-break: break-word;
|
|
142
|
+
text-align: center;
|
|
143
|
+
margin-bottom: 0px;
|
|
144
|
+
margin-top: 0px;
|
|
145
|
+
color: var(--${e}-title-color);
|
|
146
|
+
}
|
|
147
|
+
.${e}-item-subtitle {
|
|
148
|
+
white-space: normal;
|
|
149
|
+
overflow-wrap: anywhere;
|
|
150
|
+
word-break: break-word;
|
|
151
|
+
text-align: center;
|
|
152
|
+
margin-bottom: 0px;
|
|
153
|
+
margin-top: 0px;
|
|
154
|
+
color: var(--${e}-subtitle-color);
|
|
155
|
+
}
|
|
156
|
+
.${e}-text-tight-leading {
|
|
157
|
+
display: block;
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
padding-top: var(--${e}-title-leading-gap, 0);
|
|
160
|
+
padding-bottom: var(--${e}-title-leading-gap, 0);
|
|
161
|
+
}
|
|
162
|
+
.${e}-show-text-hover .${e}-item-title,
|
|
163
|
+
.${e}-show-text-hover .${e}-item-subtitle {
|
|
164
|
+
opacity: 0;
|
|
165
|
+
transition: opacity 250ms;
|
|
166
|
+
}
|
|
167
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-title,
|
|
168
|
+
.${e}-show-text-hover .${e}-item-inner:hover .${e}-item-subtitle,
|
|
169
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-title,
|
|
170
|
+
.${e}-show-text-hover .${e}-item-inner-hidden:hover .${e}-item-subtitle {
|
|
171
|
+
opacity: 1;
|
|
172
|
+
}
|
|
173
|
+
.${e}-type-a .${e}-item-inner,
|
|
174
|
+
.${e}-type-a .${e}-item-inner-hidden,
|
|
175
|
+
.${e}-type-d .${e}-item-inner,
|
|
176
|
+
.${e}-type-d .${e}-item-inner-hidden {
|
|
177
|
+
align-items: flex-start;
|
|
178
|
+
}
|
|
179
|
+
.${e}-type-b .${e}-item-inner,
|
|
180
|
+
.${e}-type-b .${e}-item-inner-hidden,
|
|
181
|
+
.${e}-type-e .${e}-item-inner,
|
|
182
|
+
.${e}-type-e .${e}-item-inner-hidden {
|
|
183
|
+
align-items: center;
|
|
184
|
+
}
|
|
185
|
+
.${e}-type-c .${e}-item-inner,
|
|
186
|
+
.${e}-type-c .${e}-item-inner-hidden,
|
|
187
|
+
.${e}-type-f .${e}-item-inner,
|
|
188
|
+
.${e}-type-f .${e}-item-inner-hidden {
|
|
189
|
+
align-items: flex-end;
|
|
190
|
+
}
|
|
191
|
+
.${e}-type-a .${e}-item-image-link,
|
|
192
|
+
.${e}-type-b .${e}-item-image-link,
|
|
193
|
+
.${e}-type-c .${e}-item-image-link,
|
|
194
|
+
.${e}-type-d .${e}-item-image-link,
|
|
195
|
+
.${e}-type-e .${e}-item-image-link,
|
|
196
|
+
.${e}-type-f .${e}-item-image-link {
|
|
197
|
+
align-items: center;
|
|
198
|
+
}
|
|
199
|
+
.${e}-type-a .${e}-item-title,
|
|
200
|
+
.${e}-type-a .${e}-item-subtitle,
|
|
201
|
+
.${e}-type-d .${e}-item-title,
|
|
202
|
+
.${e}-type-d .${e}-item-subtitle {
|
|
203
|
+
text-align: left;
|
|
204
|
+
}
|
|
205
|
+
.${e}-type-b .${e}-item-title,
|
|
206
|
+
.${e}-type-b .${e}-item-subtitle,
|
|
207
|
+
.${e}-type-e .${e}-item-title,
|
|
208
|
+
.${e}-type-e .${e}-item-subtitle {
|
|
209
|
+
text-align: center;
|
|
210
|
+
}
|
|
211
|
+
.${e}-type-c .${e}-item-title,
|
|
212
|
+
.${e}-type-c .${e}-item-subtitle,
|
|
213
|
+
.${e}-type-f .${e}-item-title,
|
|
214
|
+
.${e}-type-f .${e}-item-subtitle {
|
|
215
|
+
text-align: right;
|
|
216
|
+
}
|
|
217
|
+
.${e}-item-text-block {
|
|
218
|
+
display: flex;
|
|
219
|
+
flex-direction: column;
|
|
220
|
+
align-items: flex-start;
|
|
221
|
+
width: 100%;
|
|
222
|
+
flex-shrink: 0;
|
|
223
|
+
}
|
|
224
|
+
.${e}-type-d .${e}-item-text-block {
|
|
225
|
+
align-items: flex-start;
|
|
226
|
+
}
|
|
227
|
+
.${e}-type-e .${e}-item-text-block {
|
|
228
|
+
align-items: center;
|
|
229
|
+
}
|
|
230
|
+
.${e}-type-f .${e}-item-text-block {
|
|
231
|
+
align-items: flex-end;
|
|
232
|
+
}
|
|
233
|
+
.${e}-type-a .${e}-item-text-link,
|
|
234
|
+
.${e}-type-d .${e}-item-text-link {
|
|
235
|
+
align-items: flex-start;
|
|
236
|
+
}
|
|
237
|
+
.${e}-type-b .${e}-item-text-link,
|
|
238
|
+
.${e}-type-e .${e}-item-text-link {
|
|
239
|
+
align-items: center;
|
|
240
|
+
}
|
|
241
|
+
.${e}-type-c .${e}-item-text-link,
|
|
242
|
+
.${e}-type-f .${e}-item-text-link {
|
|
243
|
+
align-items: flex-end;
|
|
244
|
+
}
|
|
245
|
+
.${e}-image-align-top .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
246
|
+
align-items: flex-start;
|
|
247
|
+
}
|
|
248
|
+
.${e}-image-align-center .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
249
|
+
align-items: center;
|
|
250
|
+
}
|
|
251
|
+
.${e}-image-align-bottom .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
252
|
+
align-items: flex-end;
|
|
253
|
+
}
|
|
254
|
+
.${e}-image-align-top .${e}-item-slider .splide__slide {
|
|
255
|
+
align-items: flex-start;
|
|
256
|
+
}
|
|
257
|
+
.${e}-image-align-center .${e}-item-slider .splide__slide {
|
|
258
|
+
align-items: center;
|
|
259
|
+
}
|
|
260
|
+
.${e}-image-align-bottom .${e}-item-slider .splide__slide {
|
|
261
|
+
align-items: flex-end;
|
|
262
|
+
}
|
|
263
|
+
.${e}-align-entries .${e}-item {
|
|
264
|
+
display: contents;
|
|
265
|
+
}
|
|
266
|
+
.${e}-align-entries .${e}-item-inner,
|
|
267
|
+
.${e}-align-entries .${e}-item-inner-hidden {
|
|
268
|
+
display: grid;
|
|
269
|
+
grid-template-rows: subgrid;
|
|
270
|
+
grid-row: span 3;
|
|
271
|
+
justify-self: center;
|
|
272
|
+
margin-bottom: var(--${e}-align-entries-row-gap, 0);
|
|
273
|
+
}
|
|
274
|
+
.${e}-align-entries .${e}-item-inner-last-row {
|
|
275
|
+
margin-bottom: 0;
|
|
276
|
+
}
|
|
277
|
+
.${e}-align-entries .${e}-item-text-link {
|
|
278
|
+
display: contents;
|
|
279
|
+
}
|
|
280
|
+
.${e}-align-entries .${e}-item-title-row,
|
|
281
|
+
.${e}-align-entries .${e}-item-subtitle-row {
|
|
282
|
+
display: flex;
|
|
283
|
+
flex-direction: column;
|
|
284
|
+
align-items: flex-start;
|
|
285
|
+
width: 100%;
|
|
286
|
+
min-height: 100%;
|
|
287
|
+
}
|
|
288
|
+
.${e}-type-a.${e}-align-entries .${e}-item-title-row,
|
|
289
|
+
.${e}-type-a.${e}-align-entries .${e}-item-subtitle-row,
|
|
290
|
+
.${e}-type-d.${e}-align-entries .${e}-item-title-row,
|
|
291
|
+
.${e}-type-d.${e}-align-entries .${e}-item-subtitle-row {
|
|
292
|
+
align-items: flex-start;
|
|
293
|
+
}
|
|
294
|
+
.${e}-type-b.${e}-align-entries .${e}-item-title-row,
|
|
295
|
+
.${e}-type-b.${e}-align-entries .${e}-item-subtitle-row,
|
|
296
|
+
.${e}-type-e.${e}-align-entries .${e}-item-title-row,
|
|
297
|
+
.${e}-type-e.${e}-align-entries .${e}-item-subtitle-row {
|
|
298
|
+
align-items: center;
|
|
299
|
+
}
|
|
300
|
+
.${e}-type-c.${e}-align-entries .${e}-item-title-row,
|
|
301
|
+
.${e}-type-c.${e}-align-entries .${e}-item-subtitle-row,
|
|
302
|
+
.${e}-type-f.${e}-align-entries .${e}-item-title-row,
|
|
303
|
+
.${e}-type-f.${e}-align-entries .${e}-item-subtitle-row {
|
|
304
|
+
align-items: flex-end;
|
|
305
|
+
}
|
|
306
|
+
.${e}-align-entries .${e}-item-image-link {
|
|
307
|
+
width: 100%;
|
|
308
|
+
height: 100%;
|
|
309
|
+
min-height: 100%;
|
|
310
|
+
display: flex;
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
align-items: center;
|
|
313
|
+
justify-content: flex-start;
|
|
314
|
+
}
|
|
315
|
+
.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
316
|
+
flex-shrink: 0;
|
|
317
|
+
height: auto;
|
|
318
|
+
align-self: auto;
|
|
319
|
+
}
|
|
320
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
321
|
+
margin-top: 0;
|
|
322
|
+
margin-bottom: auto;
|
|
323
|
+
}
|
|
324
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
325
|
+
margin-top: auto;
|
|
326
|
+
margin-bottom: auto;
|
|
327
|
+
}
|
|
328
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link > .${e}-item-image-wrapper {
|
|
329
|
+
margin-top: auto;
|
|
330
|
+
margin-bottom: 0;
|
|
331
|
+
}
|
|
332
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
333
|
+
align-items: flex-start;
|
|
334
|
+
}
|
|
335
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
336
|
+
align-items: center;
|
|
337
|
+
}
|
|
338
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-wrapper:not(.${e}-item-image-wrapper-fit-slider) {
|
|
339
|
+
align-items: flex-end;
|
|
340
|
+
}
|
|
341
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
342
|
+
align-items: flex-start;
|
|
343
|
+
}
|
|
344
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
345
|
+
align-items: center;
|
|
346
|
+
}
|
|
347
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-slider .splide__slide {
|
|
348
|
+
align-items: flex-end;
|
|
349
|
+
}
|
|
350
|
+
.${e}-image-align-top.${e}-align-entries .${e}-item-image-link {
|
|
351
|
+
justify-content: flex-start;
|
|
352
|
+
}
|
|
353
|
+
.${e}-image-align-center.${e}-align-entries .${e}-item-image-link {
|
|
354
|
+
justify-content: center;
|
|
355
|
+
}
|
|
356
|
+
.${e}-image-align-bottom.${e}-align-entries .${e}-item-image-link {
|
|
357
|
+
justify-content: flex-end;
|
|
358
|
+
}
|
|
359
|
+
.${e}-lightbox-counter {
|
|
360
|
+
margin: 0;
|
|
361
|
+
color: var(--${e}-lightbox-counter-color);
|
|
362
|
+
}
|
|
363
|
+
.${e}-lightbox {
|
|
364
|
+
position: fixed;
|
|
365
|
+
inset: 0;
|
|
366
|
+
z-index: 9997;
|
|
367
|
+
overscroll-behavior: none;
|
|
368
|
+
overflow: hidden;
|
|
369
|
+
}
|
|
370
|
+
.${e}-lightbox-editor {
|
|
371
|
+
inset: auto;
|
|
372
|
+
top: var(--cntrl-article-top, 0);
|
|
373
|
+
left: var(--cntrl-article-left, 0);
|
|
374
|
+
width: var(--cntrl-article-width, 100vw) !important;
|
|
375
|
+
height: var(--cntrl-viewport-height, 100vh) !important;
|
|
376
|
+
}
|
|
377
|
+
.${e}-control {
|
|
378
|
+
position: relative;
|
|
379
|
+
z-index: 2;
|
|
380
|
+
width: 100%;
|
|
381
|
+
}
|
|
382
|
+
.${e}-close-icon {
|
|
383
|
+
position: relative;
|
|
384
|
+
flex-shrink: 0;
|
|
385
|
+
pointer-events: auto;
|
|
386
|
+
z-index: 2;
|
|
387
|
+
display: flex;
|
|
388
|
+
align-items: center;
|
|
389
|
+
justify-content: center;
|
|
390
|
+
border: none;
|
|
391
|
+
background-color: transparent;
|
|
392
|
+
padding: 0;
|
|
393
|
+
}
|
|
394
|
+
.${e}-close-icon-inner {
|
|
395
|
+
all: unset;
|
|
396
|
+
position: relative;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
width: 100%;
|
|
399
|
+
height: 100%;
|
|
400
|
+
pointer-events: auto;
|
|
401
|
+
}
|
|
402
|
+
.${e}-close-icon-img {
|
|
403
|
+
position: absolute;
|
|
404
|
+
top: 50%;
|
|
405
|
+
left: 50%;
|
|
406
|
+
transform: translate(-50%, -50%);
|
|
407
|
+
}
|
|
408
|
+
`;
|
|
409
|
+
}
|
|
410
|
+
function gi() {
|
|
411
|
+
return Math.random() < 0.5 ? "ltr" : "ttb";
|
|
412
|
+
}
|
|
413
|
+
function pi(e) {
|
|
414
|
+
const t = e.Components.Autoplay;
|
|
415
|
+
t && (t.pause(!1), t.play());
|
|
416
|
+
}
|
|
417
|
+
function fi(e) {
|
|
418
|
+
const t = gi();
|
|
419
|
+
e.options.direction !== t && (e.options = { ...e.options, direction: t }), requestAnimationFrame(() => {
|
|
420
|
+
requestAnimationFrame(() => {
|
|
421
|
+
pi(e);
|
|
422
|
+
});
|
|
423
|
+
});
|
|
424
|
+
}
|
|
425
|
+
const q = 500, $i = 750, de = "cubic-bezier(0.22, 1, 0.36, 1)", yi = 72, wi = 50;
|
|
426
|
+
function xi(e) {
|
|
427
|
+
if (!Array.isArray(e) || e.length === 0) return !1;
|
|
428
|
+
const t = e[0];
|
|
429
|
+
return t !== null && typeof t == "object" && "media" in t && Array.isArray(t.media);
|
|
430
|
+
}
|
|
431
|
+
function vi(e) {
|
|
432
|
+
const [t, i] = e.media;
|
|
433
|
+
return i != null && i.assetId ? i : t != null && t.assetId ? t : null;
|
|
434
|
+
}
|
|
435
|
+
function bi(e) {
|
|
436
|
+
const [t] = e.media;
|
|
437
|
+
return t != null && t.assetId ? t : null;
|
|
438
|
+
}
|
|
439
|
+
function Yt(e) {
|
|
440
|
+
return !Array.isArray(e) || e.length === 0 ? [] : xi(e) ? e.flatMap((t) => {
|
|
441
|
+
const i = vi(t);
|
|
442
|
+
if (!i) return [];
|
|
443
|
+
const s = bi(t);
|
|
444
|
+
return [{
|
|
445
|
+
displayMedia: i,
|
|
446
|
+
lightboxMedia: s != null && s.assetId ? s : null
|
|
447
|
+
}];
|
|
448
|
+
}) : e.filter((t) => t == null ? void 0 : t.assetId).map((t) => ({
|
|
449
|
+
displayMedia: t,
|
|
450
|
+
lightboxMedia: t
|
|
451
|
+
}));
|
|
452
|
+
}
|
|
453
|
+
function Se(e) {
|
|
454
|
+
return !Oe(e) && e.type === "video";
|
|
455
|
+
}
|
|
456
|
+
function Si(e) {
|
|
457
|
+
const t = /* @__PURE__ */ new Set(), i = [];
|
|
458
|
+
for (const s of e) {
|
|
459
|
+
const o = Yt(s.gallery);
|
|
460
|
+
for (const b of o) {
|
|
461
|
+
const x = b.lightboxMedia;
|
|
462
|
+
x != null && x.assetId && !t.has(x.assetId) && (t.add(x.assetId), i.push(x));
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return i;
|
|
466
|
+
}
|
|
467
|
+
function Ii({ mediaList: e }) {
|
|
468
|
+
const [t, i] = k(null);
|
|
469
|
+
Gt(t, { preload: "metadata" });
|
|
470
|
+
const s = e.filter((o) => !Oe(o));
|
|
471
|
+
return s.length === 0 ? null : /* @__PURE__ */ n(
|
|
472
|
+
"div",
|
|
473
|
+
{
|
|
474
|
+
ref: i,
|
|
475
|
+
"aria-hidden": !0,
|
|
476
|
+
style: {
|
|
477
|
+
position: "absolute",
|
|
478
|
+
width: 0,
|
|
479
|
+
height: 0,
|
|
480
|
+
overflow: "hidden",
|
|
481
|
+
opacity: 0,
|
|
482
|
+
pointerEvents: "none"
|
|
483
|
+
},
|
|
484
|
+
children: s.map((o) => Se(o) ? /* @__PURE__ */ n(
|
|
485
|
+
"video",
|
|
486
|
+
{
|
|
487
|
+
src: o.assetId,
|
|
488
|
+
preload: "none",
|
|
489
|
+
muted: !0,
|
|
490
|
+
playsInline: !0
|
|
491
|
+
},
|
|
492
|
+
o.assetId
|
|
493
|
+
) : /* @__PURE__ */ n(
|
|
494
|
+
"img",
|
|
495
|
+
{
|
|
496
|
+
src: o.assetId,
|
|
497
|
+
alt: ""
|
|
498
|
+
},
|
|
499
|
+
o.assetId
|
|
500
|
+
))
|
|
501
|
+
}
|
|
502
|
+
);
|
|
503
|
+
}
|
|
504
|
+
function Ci(e) {
|
|
505
|
+
e.pause(), e.removeAttribute("src"), e.load();
|
|
506
|
+
}
|
|
507
|
+
const ki = ".splide__slide video";
|
|
508
|
+
function Ti(e) {
|
|
509
|
+
var o;
|
|
510
|
+
if (e.closest(".splide--fade, .splide__slide.is-active:not(.splide__slide--clone), .splide__slide.is-next")) return !0;
|
|
511
|
+
const t = e.closest(".splide__slide");
|
|
512
|
+
if (!t || t.classList.contains("splide__slide--clone")) return !1;
|
|
513
|
+
const i = t.dataset.slideIndex, s = (o = t.parentElement) == null ? void 0 : o.querySelector(".splide__slide.is-next");
|
|
514
|
+
return i !== void 0 && (s == null ? void 0 : s.dataset.slideIndex) === i;
|
|
515
|
+
}
|
|
516
|
+
function Vt({
|
|
517
|
+
media: e,
|
|
518
|
+
className: t,
|
|
519
|
+
style: i,
|
|
520
|
+
hasLightbox: s,
|
|
521
|
+
isSplideSlide: o = !1,
|
|
522
|
+
onMediaClick: b
|
|
523
|
+
}) {
|
|
524
|
+
if (Oe(e))
|
|
525
|
+
return /* @__PURE__ */ n(
|
|
526
|
+
qt,
|
|
527
|
+
{
|
|
528
|
+
media: e,
|
|
529
|
+
fit: i.objectFit === "contain" ? "contain" : "cover",
|
|
530
|
+
silentLoop: s,
|
|
531
|
+
className: t,
|
|
532
|
+
style: {
|
|
533
|
+
...i,
|
|
534
|
+
cursor: b ? "pointer" : "default"
|
|
535
|
+
},
|
|
536
|
+
onClick: b
|
|
537
|
+
}
|
|
538
|
+
);
|
|
539
|
+
if (Se(e)) {
|
|
540
|
+
const x = {
|
|
541
|
+
src: e.assetId,
|
|
542
|
+
className: t,
|
|
543
|
+
style: {
|
|
544
|
+
...i,
|
|
545
|
+
cursor: b ? "pointer" : "default"
|
|
546
|
+
},
|
|
547
|
+
muted: !0,
|
|
548
|
+
loop: !0,
|
|
549
|
+
playsInline: !0,
|
|
550
|
+
onClick: b
|
|
551
|
+
};
|
|
552
|
+
return o ? /* @__PURE__ */ n("video", { ...x, preload: "none" }) : /* @__PURE__ */ n(Xt, { ...x, autoPlay: !0 });
|
|
553
|
+
}
|
|
554
|
+
return /* @__PURE__ */ n(
|
|
555
|
+
"img",
|
|
556
|
+
{
|
|
557
|
+
src: e.assetId,
|
|
558
|
+
alt: e.name,
|
|
559
|
+
className: t,
|
|
560
|
+
style: {
|
|
561
|
+
...i,
|
|
562
|
+
cursor: b ? "pointer" : "default"
|
|
563
|
+
},
|
|
564
|
+
onClick: b
|
|
565
|
+
}
|
|
566
|
+
);
|
|
567
|
+
}
|
|
568
|
+
function Li({
|
|
569
|
+
className: e,
|
|
570
|
+
style: t,
|
|
571
|
+
children: i
|
|
572
|
+
}) {
|
|
573
|
+
const [s, o] = k(null);
|
|
574
|
+
return Gt(s, { autoPlay: !0, selector: ki, shouldPlay: Ti }), /* @__PURE__ */ n("div", { ref: o, className: e, style: t, children: i });
|
|
575
|
+
}
|
|
576
|
+
function Bt(e) {
|
|
577
|
+
const t = e.getBoundingClientRect();
|
|
578
|
+
return { width: t.width, height: t.height, left: t.left, top: t.top };
|
|
579
|
+
}
|
|
580
|
+
function _i(e, t) {
|
|
581
|
+
if (!t || !t.width || !t.height || !e.width || !e.height) return e;
|
|
582
|
+
const i = t.width / t.height, s = e.width / e.height;
|
|
583
|
+
if (i > s) {
|
|
584
|
+
const b = e.width / i;
|
|
585
|
+
return { width: e.width, height: b, left: e.left, top: e.top + (e.height - b) / 2 };
|
|
586
|
+
}
|
|
587
|
+
const o = e.height * i;
|
|
588
|
+
return { width: o, height: e.height, left: e.left + (e.width - o) / 2, top: e.top };
|
|
589
|
+
}
|
|
590
|
+
function Ni({
|
|
591
|
+
src: e,
|
|
592
|
+
mediaRef: t,
|
|
593
|
+
mediaStyle: i,
|
|
594
|
+
onLoadedMetadata: s
|
|
595
|
+
}) {
|
|
596
|
+
return H(() => {
|
|
597
|
+
const o = t.current;
|
|
598
|
+
if (o)
|
|
599
|
+
return () => {
|
|
600
|
+
Ci(o);
|
|
601
|
+
};
|
|
602
|
+
}, [e, t]), /* @__PURE__ */ n(
|
|
603
|
+
"video",
|
|
604
|
+
{
|
|
605
|
+
ref: t,
|
|
606
|
+
src: e,
|
|
607
|
+
muted: !0,
|
|
608
|
+
autoPlay: !0,
|
|
609
|
+
loop: !0,
|
|
610
|
+
playsInline: !0,
|
|
611
|
+
preload: "auto",
|
|
612
|
+
onLoadedMetadata: s,
|
|
613
|
+
style: i
|
|
614
|
+
}
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
const zi = "https://cdn.cntrl.site/component-assets/defaultCloseIcon.svg", Fi = 4e-3;
|
|
618
|
+
function Ai({
|
|
619
|
+
prefix: e,
|
|
620
|
+
closeIcon: t = zi,
|
|
621
|
+
closeIconMaxWidth: i = 0.0125,
|
|
622
|
+
closeIconColor: s = "#FFFFFF",
|
|
623
|
+
closeIconHoverColor: o = "#999999",
|
|
624
|
+
iconMarginRight: b = 0.01,
|
|
625
|
+
contentMarginTop: x = 0.01,
|
|
626
|
+
isEditor: Y,
|
|
627
|
+
isPreviewMode: ue,
|
|
628
|
+
isEditMode: r,
|
|
629
|
+
visible: M,
|
|
630
|
+
onClose: Z
|
|
631
|
+
}) {
|
|
632
|
+
if (!t) return null;
|
|
633
|
+
const P = g(i, Y), me = g(b, Y), Ie = g(x, Y), T = g(Math.max(x, Fi), Y);
|
|
634
|
+
return /* @__PURE__ */ y(
|
|
635
|
+
"div",
|
|
636
|
+
{
|
|
637
|
+
style: {
|
|
638
|
+
position: "absolute",
|
|
639
|
+
top: 0,
|
|
640
|
+
left: 0,
|
|
641
|
+
right: 0,
|
|
642
|
+
zIndex: 1e4,
|
|
643
|
+
display: "flex",
|
|
644
|
+
flexDirection: "column",
|
|
645
|
+
alignItems: "flex-end",
|
|
646
|
+
pointerEvents: "none",
|
|
647
|
+
opacity: M ? 1 : 0,
|
|
648
|
+
transition: "opacity 500ms cubic-bezier(0.22, 1, 0.36, 1)"
|
|
649
|
+
},
|
|
650
|
+
children: [
|
|
651
|
+
/* @__PURE__ */ n(
|
|
652
|
+
"div",
|
|
653
|
+
{
|
|
654
|
+
style: {
|
|
655
|
+
position: "relative",
|
|
656
|
+
width: "100%",
|
|
657
|
+
height: Ie,
|
|
658
|
+
flexShrink: 0
|
|
659
|
+
},
|
|
660
|
+
children: r && /* @__PURE__ */ n(
|
|
661
|
+
"div",
|
|
662
|
+
{
|
|
663
|
+
"data-controls": "contentMarginTop",
|
|
664
|
+
"data-controls-axis": "y",
|
|
665
|
+
"data-controls-min": "0",
|
|
666
|
+
className: `${e}-control`,
|
|
667
|
+
style: {
|
|
668
|
+
position: "absolute",
|
|
669
|
+
top: 0,
|
|
670
|
+
left: 0,
|
|
671
|
+
width: "100%",
|
|
672
|
+
height: T,
|
|
673
|
+
pointerEvents: M ? "auto" : "none"
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
)
|
|
677
|
+
}
|
|
678
|
+
),
|
|
679
|
+
/* @__PURE__ */ y(
|
|
680
|
+
"div",
|
|
681
|
+
{
|
|
682
|
+
className: `${e}-close-icon`,
|
|
683
|
+
style: {
|
|
684
|
+
width: P,
|
|
685
|
+
height: P,
|
|
686
|
+
marginRight: me,
|
|
687
|
+
pointerEvents: M ? "auto" : "none"
|
|
688
|
+
},
|
|
689
|
+
onClick: (L) => L.stopPropagation(),
|
|
690
|
+
children: [
|
|
691
|
+
/* @__PURE__ */ n(
|
|
692
|
+
"button",
|
|
693
|
+
{
|
|
694
|
+
type: "button",
|
|
695
|
+
className: `${e}-close-icon-inner`,
|
|
696
|
+
"aria-label": "Close",
|
|
697
|
+
onClick: (L) => {
|
|
698
|
+
L.stopPropagation(), Z();
|
|
699
|
+
},
|
|
700
|
+
children: /* @__PURE__ */ n(
|
|
701
|
+
ui,
|
|
702
|
+
{
|
|
703
|
+
url: t,
|
|
704
|
+
fill: s,
|
|
705
|
+
hoverFill: Y && !ue ? s : o,
|
|
706
|
+
className: `${e}-close-icon-img`
|
|
707
|
+
}
|
|
708
|
+
)
|
|
709
|
+
}
|
|
710
|
+
),
|
|
711
|
+
r && /* @__PURE__ */ n(
|
|
712
|
+
"div",
|
|
713
|
+
{
|
|
714
|
+
"data-controls": "iconMarginRight",
|
|
715
|
+
"data-controls-axis": "x",
|
|
716
|
+
"data-controls-reverse": "",
|
|
717
|
+
className: `${e}-control`,
|
|
718
|
+
style: {
|
|
719
|
+
position: "absolute",
|
|
720
|
+
top: 0,
|
|
721
|
+
left: "100%",
|
|
722
|
+
width: me,
|
|
723
|
+
height: "100%",
|
|
724
|
+
pointerEvents: M ? "auto" : "none"
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
)
|
|
728
|
+
]
|
|
729
|
+
}
|
|
730
|
+
)
|
|
731
|
+
]
|
|
732
|
+
}
|
|
733
|
+
);
|
|
734
|
+
}
|
|
735
|
+
function Oi({
|
|
736
|
+
prefix: e,
|
|
737
|
+
items: t,
|
|
738
|
+
index: i,
|
|
739
|
+
imageDisplay: s,
|
|
740
|
+
isEditor: o,
|
|
741
|
+
isPreviewMode: b,
|
|
742
|
+
isEditMode: x,
|
|
743
|
+
onClose: Y,
|
|
744
|
+
onPrev: ue,
|
|
745
|
+
onNext: r,
|
|
746
|
+
counterClassName: M,
|
|
747
|
+
counterStyle: Z,
|
|
748
|
+
closeIcon: P,
|
|
749
|
+
closeIconMaxWidth: me,
|
|
750
|
+
closeIconColor: Ie,
|
|
751
|
+
closeIconHoverColor: T,
|
|
752
|
+
iconMarginRight: L,
|
|
753
|
+
contentMarginTop: Xe
|
|
754
|
+
}) {
|
|
755
|
+
const Ce = s === "cover", We = $(null), he = $(null), ge = $(null), F = $(null), U = $(0), A = $(0), O = $("none"), K = $(!1), ee = $(!1), Ye = $(null), z = $(0), V = $(null), W = $(!1), oe = $(null), J = $(null), Me = $(null), Ue = $(() => {
|
|
756
|
+
}), [m, De] = k(null), [a, mt] = k(null), [I, ke] = k("opening"), [te, B] = k(0), [pe, G] = k(0), [Re, le] = k(null), [je, fe] = k(!1), [Te, $e] = k(!1), [ht, Ke] = k(!1), [gt, Je] = k(null), Qe = $(i), Ze = $(void 0), c = t[i], Lt = c ? Se(c) : !1, ye = c ? Oe(c) : !1, Pe = Re !== null, pt = re((l) => {
|
|
757
|
+
const u = l.currentTarget, _ = u instanceof HTMLVideoElement ? { width: u.videoWidth, height: u.videoHeight } : { width: u.naturalWidth, height: u.naturalHeight };
|
|
758
|
+
!_.width || !_.height || Je(_);
|
|
759
|
+
}, []);
|
|
760
|
+
H(() => {
|
|
761
|
+
Ye.current = a;
|
|
762
|
+
}, [a]), H(() => {
|
|
763
|
+
const l = We.current;
|
|
764
|
+
if (!l) return;
|
|
765
|
+
const u = () => mt(Bt(l));
|
|
766
|
+
u();
|
|
767
|
+
const _ = new ResizeObserver(u);
|
|
768
|
+
return _.observe(l), () => _.disconnect();
|
|
769
|
+
}, []);
|
|
770
|
+
const v = re(() => {
|
|
771
|
+
oe.current !== null && (window.clearTimeout(oe.current), oe.current = null);
|
|
772
|
+
}, []), se = re(() => {
|
|
773
|
+
const l = J.current;
|
|
774
|
+
J.current = null, v(), V.current = null, W.current = !1, le(null), fe(!1), G(0), z.current = 0, $e(!1), K.current = !1, A.current = 0, O.current = "none", l === 1 ? r() : l === -1 && ue();
|
|
775
|
+
}, [v, r, ue]), He = re(() => {
|
|
776
|
+
v(), J.current = null, V.current = null, W.current = !1, le(null), fe(!1), G(0), z.current = 0;
|
|
777
|
+
}, [v]), et = re(() => {
|
|
778
|
+
v(), oe.current = window.setTimeout(() => {
|
|
779
|
+
J.current !== null && se();
|
|
780
|
+
}, q + 32);
|
|
781
|
+
}, [v, se]), ie = re((l, u) => {
|
|
782
|
+
var ce;
|
|
783
|
+
const _ = ((ce = Ye.current) == null ? void 0 : ce.width) ?? 0;
|
|
784
|
+
if (v(), V.current = l, le(l), W.current = !0, fe(!0), u) {
|
|
785
|
+
J.current = l;
|
|
786
|
+
const be = -l * _;
|
|
787
|
+
z.current = be, G(be), et();
|
|
788
|
+
return;
|
|
789
|
+
}
|
|
790
|
+
z.current = 0, G(0), oe.current = window.setTimeout(() => {
|
|
791
|
+
oe.current = null, He();
|
|
792
|
+
}, q + 32);
|
|
793
|
+
}, [v, He, et]), we = re((l) => {
|
|
794
|
+
if (!(t.length <= 1)) {
|
|
795
|
+
if (W.current) {
|
|
796
|
+
if (J.current === l) {
|
|
797
|
+
Me.current = l, se();
|
|
798
|
+
return;
|
|
799
|
+
}
|
|
800
|
+
He();
|
|
801
|
+
}
|
|
802
|
+
v(), V.current = l, le(l), W.current = !1, fe(!1), z.current = 0, G(0), requestAnimationFrame(() => {
|
|
803
|
+
requestAnimationFrame(() => {
|
|
804
|
+
ie(l, !0);
|
|
805
|
+
});
|
|
806
|
+
});
|
|
807
|
+
}
|
|
808
|
+
}, [t.length, ie, se, He, v]);
|
|
809
|
+
Ue.current = we;
|
|
810
|
+
const Le = re((l) => {
|
|
811
|
+
l.propertyName !== "transform" || !W.current || J.current !== null && se();
|
|
812
|
+
}, [se]), xe = re(() => {
|
|
813
|
+
const l = he.current;
|
|
814
|
+
if (!l) return;
|
|
815
|
+
const u = Bt(l);
|
|
816
|
+
!u.width || !u.height || De(u);
|
|
817
|
+
}, []);
|
|
818
|
+
H(() => {
|
|
819
|
+
xe();
|
|
820
|
+
const l = he.current;
|
|
821
|
+
if (!l) return;
|
|
822
|
+
const u = new ResizeObserver(() => xe());
|
|
823
|
+
return u.observe(l), () => u.disconnect();
|
|
824
|
+
}, [xe]), H(() => {
|
|
825
|
+
I === "opening" && m && ke("open");
|
|
826
|
+
}, [I, m]), H(() => {
|
|
827
|
+
if (I !== "closing") return;
|
|
828
|
+
const l = setTimeout(() => Y(), q);
|
|
829
|
+
return () => clearTimeout(l);
|
|
830
|
+
}, [I, Y]), H(() => () => {
|
|
831
|
+
v();
|
|
832
|
+
}, [v]), jt(() => {
|
|
833
|
+
Qe.current === i && Ze.current === (c == null ? void 0 : c.assetId) || (v(), J.current = null, le(null), B(0), G(0), fe(!1), Ke(!1), $e(!1), Je(null), U.current = 0, A.current = 0, O.current = "none", K.current = !1, W.current = !1, z.current = 0, V.current = null, F.current = null, ee.current = !1, Qe.current = i, Ze.current = c == null ? void 0 : c.assetId);
|
|
834
|
+
}, [i, c == null ? void 0 : c.assetId, v]), jt(() => {
|
|
835
|
+
const l = Me.current;
|
|
836
|
+
l !== null && (Me.current = null, requestAnimationFrame(() => {
|
|
837
|
+
Ue.current(l);
|
|
838
|
+
}));
|
|
839
|
+
}, [i, c == null ? void 0 : c.assetId]), H(() => {
|
|
840
|
+
if (I !== "open") return;
|
|
841
|
+
let l = null;
|
|
842
|
+
const u = () => {
|
|
843
|
+
l && (document.removeEventListener("click", l, !0), l = null);
|
|
844
|
+
}, _ = () => {
|
|
845
|
+
u(), l = (w) => {
|
|
846
|
+
w.stopPropagation(), w.preventDefault(), u();
|
|
847
|
+
}, document.addEventListener("click", l, !0);
|
|
848
|
+
}, ce = (w) => {
|
|
849
|
+
const p = w < 0 ? 1 : -1;
|
|
850
|
+
if (Math.abs(w) > wi && t.length > 1) {
|
|
851
|
+
ie(p, !0);
|
|
852
|
+
return;
|
|
853
|
+
}
|
|
854
|
+
ie(p, !1);
|
|
855
|
+
}, be = (w) => {
|
|
856
|
+
if (w.touches.length !== 1 || W.current) return;
|
|
857
|
+
const p = w.touches[0];
|
|
858
|
+
ee.current = !0, F.current = { x: p.clientX, y: p.clientY }, O.current = "none", A.current = 0, K.current = !1;
|
|
859
|
+
}, ne = (w) => {
|
|
860
|
+
if (!F.current || w.touches.length !== 1 || W.current) return;
|
|
861
|
+
const p = w.touches[0], S = p.clientX - F.current.x, N = p.clientY - F.current.y;
|
|
862
|
+
if (O.current === "none") {
|
|
863
|
+
if (Math.abs(S) < 10 && Math.abs(N) < 10) return;
|
|
864
|
+
if (Math.abs(S) > Math.abs(N)) {
|
|
865
|
+
if (t.length <= 1) return;
|
|
866
|
+
O.current = "horizontal";
|
|
867
|
+
} else if (N > 0)
|
|
868
|
+
O.current = "vertical";
|
|
869
|
+
else
|
|
870
|
+
return;
|
|
871
|
+
}
|
|
872
|
+
if (O.current === "horizontal") {
|
|
873
|
+
K.current = !0, $e(!0), A.current = S;
|
|
874
|
+
const R = S < 0 ? 1 : -1;
|
|
875
|
+
V.current !== R && (V.current = R, le(R)), z.current = S, G(S), w.preventDefault();
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
O.current === "vertical" && (K.current = !0, $e(!0), U.current = N, B(N), w.preventDefault());
|
|
879
|
+
}, Fe = () => {
|
|
880
|
+
if (!F.current) return;
|
|
881
|
+
const w = O.current, p = K.current;
|
|
882
|
+
if (p && w === "horizontal")
|
|
883
|
+
ce(A.current), _();
|
|
884
|
+
else if (p && w === "vertical")
|
|
885
|
+
if (U.current > yi) {
|
|
886
|
+
const N = window.innerHeight;
|
|
887
|
+
U.current = N, Ke(!0), B(N), ke("closing");
|
|
888
|
+
} else
|
|
889
|
+
U.current = 0, B(0), _();
|
|
890
|
+
else w === "horizontal" && Math.abs(A.current) > 0 && (ce(A.current), _());
|
|
891
|
+
F.current = null, O.current = "none", A.current = 0, K.current = !1, $e(!1);
|
|
892
|
+
};
|
|
893
|
+
return document.addEventListener("touchstart", be, { passive: !0 }), document.addEventListener("touchmove", ne, { passive: !1 }), document.addEventListener("touchend", Fe), document.addEventListener("touchcancel", Fe), () => {
|
|
894
|
+
document.removeEventListener("touchstart", be), document.removeEventListener("touchmove", ne), document.removeEventListener("touchend", Fe), document.removeEventListener("touchcancel", Fe), u();
|
|
895
|
+
};
|
|
896
|
+
}, [I, t.length, ie]), H(() => {
|
|
897
|
+
const l = (u) => {
|
|
898
|
+
u.key === "Escape" && (u.preventDefault(), u.stopPropagation(), I !== "closing" && ke("closing"));
|
|
899
|
+
};
|
|
900
|
+
return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
|
|
901
|
+
}, [I]);
|
|
902
|
+
const tt = () => {
|
|
903
|
+
I !== "closing" && ke("closing");
|
|
904
|
+
}, ae = I === "open", ft = I === "closing", _t = te > 0 ? Math.max(0, 1 - te / 500) : 1, $t = te > 0 ? Math.max(0.35, 1 - te / 500) : 1, yt = ye && c ? { width: Et(c), height: 1 } : gt, d = m ? Ce ? m : _i(m, yt) : null, it = {
|
|
905
|
+
position: "fixed",
|
|
906
|
+
top: a == null ? void 0 : a.top,
|
|
907
|
+
left: a == null ? void 0 : a.left,
|
|
908
|
+
width: a == null ? void 0 : a.width,
|
|
909
|
+
height: a == null ? void 0 : a.height,
|
|
910
|
+
zIndex: 9998
|
|
911
|
+
}, ve = Ce ? "cover" : "contain", Ve = pe !== 0 || te > 0 ? `translate(${pe}px, ${te}px)` : void 0, wt = Te && !je ? "none" : je ? `transform ${q}ms ${de}` : ht ? `transform ${q}ms ${de}, opacity ${q}ms ${de}` : I === "opening" || ft ? `opacity ${q}ms ${de}` : "none", nt = {
|
|
912
|
+
...it,
|
|
913
|
+
transform: Ve,
|
|
914
|
+
opacity: te > 0 ? $t : I === "opening" || ft ? 0 : 1,
|
|
915
|
+
transition: wt,
|
|
916
|
+
pointerEvents: "none"
|
|
917
|
+
}, _e = {
|
|
918
|
+
position: "absolute",
|
|
919
|
+
top: ((d == null ? void 0 : d.top) ?? 0) - ((a == null ? void 0 : a.top) ?? 0),
|
|
920
|
+
left: ((d == null ? void 0 : d.left) ?? 0) - ((a == null ? void 0 : a.left) ?? 0),
|
|
921
|
+
width: d == null ? void 0 : d.width,
|
|
922
|
+
height: d == null ? void 0 : d.height,
|
|
923
|
+
objectFit: ve,
|
|
924
|
+
pointerEvents: "none"
|
|
925
|
+
}, rt = (a == null ? void 0 : a.width) ?? 0, Ne = Pe ? (i + Re + t.length) % t.length : null, D = Ne !== null ? t[Ne] : null, xt = {
|
|
926
|
+
...it,
|
|
927
|
+
transform: Pe ? `translateX(${Re * rt + pe}px)` : void 0,
|
|
928
|
+
opacity: 1,
|
|
929
|
+
transition: je ? `transform ${q}ms ${de}` : "none",
|
|
930
|
+
pointerEvents: "none"
|
|
931
|
+
}, E = {
|
|
932
|
+
position: "absolute",
|
|
933
|
+
top: ((m == null ? void 0 : m.top) ?? 0) - ((a == null ? void 0 : a.top) ?? 0),
|
|
934
|
+
left: ((m == null ? void 0 : m.left) ?? 0) - ((a == null ? void 0 : a.left) ?? 0),
|
|
935
|
+
width: m == null ? void 0 : m.width,
|
|
936
|
+
height: m == null ? void 0 : m.height,
|
|
937
|
+
objectFit: ve,
|
|
938
|
+
pointerEvents: "none"
|
|
939
|
+
}, ze = ye && c && ci(c).controls && d ? Math.min(52, d.height * 0.2) : 0, Be = d ? {
|
|
940
|
+
position: "fixed",
|
|
941
|
+
top: d.top,
|
|
942
|
+
height: d.height - ze,
|
|
943
|
+
width: d.width / 2,
|
|
944
|
+
zIndex: 9999
|
|
945
|
+
} : null;
|
|
946
|
+
return /* @__PURE__ */ y(
|
|
947
|
+
"div",
|
|
948
|
+
{
|
|
949
|
+
ref: We,
|
|
950
|
+
className: [
|
|
951
|
+
`${e}-lightbox`,
|
|
952
|
+
o ? `${e}-lightbox-editor` : ""
|
|
953
|
+
].filter(Boolean).join(" "),
|
|
954
|
+
style: {
|
|
955
|
+
touchAction: I === "open" ? "none" : void 0
|
|
956
|
+
},
|
|
957
|
+
onClick: tt,
|
|
958
|
+
children: [
|
|
959
|
+
/* @__PURE__ */ n(
|
|
960
|
+
"div",
|
|
961
|
+
{
|
|
962
|
+
style: {
|
|
963
|
+
position: "absolute",
|
|
964
|
+
inset: 0,
|
|
965
|
+
background: "rgba(28,31,34,0.9)",
|
|
966
|
+
opacity: ae ? _t : 0,
|
|
967
|
+
transition: Te ? "none" : `opacity ${q}ms ${de}`,
|
|
968
|
+
pointerEvents: "none"
|
|
969
|
+
}
|
|
970
|
+
}
|
|
971
|
+
),
|
|
972
|
+
/* @__PURE__ */ n(
|
|
973
|
+
"div",
|
|
974
|
+
{
|
|
975
|
+
style: {
|
|
976
|
+
position: "relative",
|
|
977
|
+
width: "100%",
|
|
978
|
+
height: "100%",
|
|
979
|
+
display: "flex",
|
|
980
|
+
flexDirection: "column",
|
|
981
|
+
alignItems: "center",
|
|
982
|
+
justifyContent: "center"
|
|
983
|
+
},
|
|
984
|
+
children: Ce ? /* @__PURE__ */ y(X, { children: [
|
|
985
|
+
/* @__PURE__ */ n("div", { ref: he, style: { position: "absolute", inset: 0 } }),
|
|
986
|
+
/* @__PURE__ */ n(
|
|
987
|
+
"div",
|
|
988
|
+
{
|
|
989
|
+
style: {
|
|
990
|
+
position: "absolute",
|
|
991
|
+
bottom: 0,
|
|
992
|
+
left: 0,
|
|
993
|
+
right: 0,
|
|
994
|
+
display: "flex",
|
|
995
|
+
flexDirection: "row",
|
|
996
|
+
justifyContent: "center",
|
|
997
|
+
alignItems: "center",
|
|
998
|
+
height: "10%",
|
|
999
|
+
opacity: ae ? 1 : 0,
|
|
1000
|
+
transition: `opacity ${q}ms ${de}`,
|
|
1001
|
+
pointerEvents: "none",
|
|
1002
|
+
zIndex: 9999
|
|
1003
|
+
},
|
|
1004
|
+
children: t.length > 1 && /* @__PURE__ */ y("p", { className: M, style: Z, children: [
|
|
1005
|
+
i + 1,
|
|
1006
|
+
" / ",
|
|
1007
|
+
t.length
|
|
1008
|
+
] })
|
|
1009
|
+
}
|
|
1010
|
+
)
|
|
1011
|
+
] }) : /* @__PURE__ */ y(X, { children: [
|
|
1012
|
+
/* @__PURE__ */ n("div", { style: { height: "10%" } }),
|
|
1013
|
+
/* @__PURE__ */ n(
|
|
1014
|
+
"div",
|
|
1015
|
+
{
|
|
1016
|
+
style: {
|
|
1017
|
+
width: "70%",
|
|
1018
|
+
height: "80%",
|
|
1019
|
+
display: "flex",
|
|
1020
|
+
justifyContent: "center",
|
|
1021
|
+
alignItems: "center"
|
|
1022
|
+
},
|
|
1023
|
+
children: /* @__PURE__ */ n("div", { ref: he, style: { width: "100%", height: "100%" } })
|
|
1024
|
+
}
|
|
1025
|
+
),
|
|
1026
|
+
/* @__PURE__ */ n(
|
|
1027
|
+
"div",
|
|
1028
|
+
{
|
|
1029
|
+
style: {
|
|
1030
|
+
display: "flex",
|
|
1031
|
+
flexDirection: "row",
|
|
1032
|
+
justifyContent: "center",
|
|
1033
|
+
alignItems: "center",
|
|
1034
|
+
height: "10%",
|
|
1035
|
+
opacity: ae ? 1 : 0,
|
|
1036
|
+
transition: `opacity ${q}ms ${de}`
|
|
1037
|
+
},
|
|
1038
|
+
children: t.length > 1 && /* @__PURE__ */ y("p", { className: M, style: Z, children: [
|
|
1039
|
+
i + 1,
|
|
1040
|
+
" / ",
|
|
1041
|
+
t.length
|
|
1042
|
+
] })
|
|
1043
|
+
}
|
|
1044
|
+
)
|
|
1045
|
+
] })
|
|
1046
|
+
}
|
|
1047
|
+
),
|
|
1048
|
+
m && a && D && /* @__PURE__ */ n("div", { style: xt, onTransitionEnd: Le, children: Oe(D) ? /* @__PURE__ */ n(
|
|
1049
|
+
"img",
|
|
1050
|
+
{
|
|
1051
|
+
src: D.thumbnail,
|
|
1052
|
+
alt: D.name,
|
|
1053
|
+
style: E
|
|
1054
|
+
},
|
|
1055
|
+
`neighbor-${Ne}-${D.assetId}`
|
|
1056
|
+
) : Se(D) ? /* @__PURE__ */ n(
|
|
1057
|
+
"video",
|
|
1058
|
+
{
|
|
1059
|
+
src: D.assetId,
|
|
1060
|
+
muted: !0,
|
|
1061
|
+
autoPlay: !0,
|
|
1062
|
+
loop: !0,
|
|
1063
|
+
playsInline: !0,
|
|
1064
|
+
preload: "auto",
|
|
1065
|
+
style: E
|
|
1066
|
+
},
|
|
1067
|
+
`neighbor-${Ne}-${D.assetId}`
|
|
1068
|
+
) : /* @__PURE__ */ n(
|
|
1069
|
+
"img",
|
|
1070
|
+
{
|
|
1071
|
+
src: D.assetId,
|
|
1072
|
+
alt: D.name,
|
|
1073
|
+
style: E
|
|
1074
|
+
},
|
|
1075
|
+
`neighbor-${Ne}-${D.assetId}`
|
|
1076
|
+
) }),
|
|
1077
|
+
m && a && c && /* @__PURE__ */ n("div", { style: nt, onTransitionEnd: Le, children: ye ? /* @__PURE__ */ n(
|
|
1078
|
+
qt,
|
|
1079
|
+
{
|
|
1080
|
+
media: c,
|
|
1081
|
+
fit: Ce ? "cover" : "contain",
|
|
1082
|
+
lazy: !1,
|
|
1083
|
+
startsAtOnce: !0,
|
|
1084
|
+
style: _e
|
|
1085
|
+
},
|
|
1086
|
+
`${i}-${c.assetId}`
|
|
1087
|
+
) : Lt ? /* @__PURE__ */ n(
|
|
1088
|
+
Ni,
|
|
1089
|
+
{
|
|
1090
|
+
src: c.assetId,
|
|
1091
|
+
mediaRef: ge,
|
|
1092
|
+
mediaStyle: _e,
|
|
1093
|
+
onLoadedMetadata: pt
|
|
1094
|
+
},
|
|
1095
|
+
`${i}-${c.assetId}`
|
|
1096
|
+
) : /* @__PURE__ */ n(
|
|
1097
|
+
"img",
|
|
1098
|
+
{
|
|
1099
|
+
ref: ge,
|
|
1100
|
+
src: c.assetId,
|
|
1101
|
+
alt: c.name,
|
|
1102
|
+
onLoad: pt,
|
|
1103
|
+
style: _e
|
|
1104
|
+
},
|
|
1105
|
+
`${i}-${c.assetId}`
|
|
1106
|
+
) }),
|
|
1107
|
+
ae && Be && t.length > 1 && /* @__PURE__ */ y(X, { children: [
|
|
1108
|
+
/* @__PURE__ */ n(
|
|
1109
|
+
"div",
|
|
1110
|
+
{
|
|
1111
|
+
style: {
|
|
1112
|
+
...Be,
|
|
1113
|
+
left: d.left,
|
|
1114
|
+
cursor: "w-resize",
|
|
1115
|
+
pointerEvents: Te ? "none" : "auto"
|
|
1116
|
+
},
|
|
1117
|
+
onClick: (l) => {
|
|
1118
|
+
if (ee.current) {
|
|
1119
|
+
ee.current = !1;
|
|
1120
|
+
return;
|
|
1121
|
+
}
|
|
1122
|
+
l.stopPropagation(), we(-1);
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
),
|
|
1126
|
+
/* @__PURE__ */ n(
|
|
1127
|
+
"div",
|
|
1128
|
+
{
|
|
1129
|
+
style: {
|
|
1130
|
+
...Be,
|
|
1131
|
+
left: d.left + d.width / 2,
|
|
1132
|
+
cursor: "e-resize",
|
|
1133
|
+
pointerEvents: Te ? "none" : "auto"
|
|
1134
|
+
},
|
|
1135
|
+
onClick: (l) => {
|
|
1136
|
+
if (ee.current) {
|
|
1137
|
+
ee.current = !1;
|
|
1138
|
+
return;
|
|
1139
|
+
}
|
|
1140
|
+
l.stopPropagation(), we(1);
|
|
1141
|
+
}
|
|
1142
|
+
}
|
|
1143
|
+
)
|
|
1144
|
+
] }),
|
|
1145
|
+
/* @__PURE__ */ n(
|
|
1146
|
+
Ai,
|
|
1147
|
+
{
|
|
1148
|
+
prefix: e,
|
|
1149
|
+
closeIcon: P,
|
|
1150
|
+
closeIconMaxWidth: me,
|
|
1151
|
+
closeIconColor: Ie,
|
|
1152
|
+
closeIconHoverColor: T,
|
|
1153
|
+
iconMarginRight: L,
|
|
1154
|
+
contentMarginTop: Xe,
|
|
1155
|
+
isEditor: o,
|
|
1156
|
+
isPreviewMode: b,
|
|
1157
|
+
isEditMode: x,
|
|
1158
|
+
visible: ae,
|
|
1159
|
+
onClose: tt
|
|
1160
|
+
}
|
|
1161
|
+
)
|
|
1162
|
+
]
|
|
1163
|
+
}
|
|
1164
|
+
);
|
|
1165
|
+
}
|
|
1166
|
+
function Wi(e) {
|
|
1167
|
+
return typeof e == "string" ? e === "cover" ? "cover" : "fit" : (e == null ? void 0 : e.display) === "cover" ? "cover" : "fit";
|
|
1168
|
+
}
|
|
1169
|
+
function Zi({ settings: e, content: t, isEditor: i, isPreviewMode: s, isEditMode: o, metadata: b, activeEvent: x, layoutId: Y, portalId: ue }) {
|
|
1170
|
+
const { prefix: r } = ai(), {
|
|
1171
|
+
type: M = "a",
|
|
1172
|
+
gridLayout: Z,
|
|
1173
|
+
textBoxWidth: P = 100,
|
|
1174
|
+
verticalGap: me,
|
|
1175
|
+
entriesCount: Ie,
|
|
1176
|
+
lightbox: T,
|
|
1177
|
+
imageDisplay: L,
|
|
1178
|
+
imageCorners: Xe,
|
|
1179
|
+
lightboxImageDisplay: Ce,
|
|
1180
|
+
slider: We,
|
|
1181
|
+
sliderTiming: he,
|
|
1182
|
+
direction: ge,
|
|
1183
|
+
transition: F,
|
|
1184
|
+
titleMarginTop: U,
|
|
1185
|
+
subtitleMarginTop: A,
|
|
1186
|
+
titleColor: O,
|
|
1187
|
+
subtitleColor: K,
|
|
1188
|
+
lightboxCounterColor: ee,
|
|
1189
|
+
titleFontFamily: Ye,
|
|
1190
|
+
titleFontSettings: z,
|
|
1191
|
+
titleFontSize: V,
|
|
1192
|
+
titleLineHeight: W,
|
|
1193
|
+
titleLetterSpacing: oe,
|
|
1194
|
+
titleWordSpacing: J,
|
|
1195
|
+
titleTextAppearance: Me,
|
|
1196
|
+
subtitleFontFamily: Ue,
|
|
1197
|
+
subtitleFontSettings: m,
|
|
1198
|
+
subtitleFontSize: De,
|
|
1199
|
+
subtitleLineHeight: a,
|
|
1200
|
+
subtitleLetterSpacing: mt,
|
|
1201
|
+
subtitleWordSpacing: I,
|
|
1202
|
+
subtitleTextAppearance: ke,
|
|
1203
|
+
lightboxCounterFontFamily: te,
|
|
1204
|
+
lightboxCounterFontSettings: B,
|
|
1205
|
+
lightboxCounterFontSize: pe,
|
|
1206
|
+
lightboxCounterLineHeight: G,
|
|
1207
|
+
lightboxCounterLetterSpacing: Re,
|
|
1208
|
+
lightboxCounterWordSpacing: le,
|
|
1209
|
+
lightboxCounterTextAppearance: je,
|
|
1210
|
+
closeIcon: fe,
|
|
1211
|
+
closeIconMaxWidth: Te,
|
|
1212
|
+
closeIconColor: $e,
|
|
1213
|
+
closeIconHoverColor: ht,
|
|
1214
|
+
iconMarginRight: Ke,
|
|
1215
|
+
contentMarginTop: gt,
|
|
1216
|
+
showText: Je = "always",
|
|
1217
|
+
alignEntries: Qe = "off",
|
|
1218
|
+
align: Ze = "top"
|
|
1219
|
+
} = e, c = {
|
|
1220
|
+
fontSettings: {
|
|
1221
|
+
fontFamily: Ye,
|
|
1222
|
+
fontWeight: (z == null ? void 0 : z.fontWeight) ?? 400,
|
|
1223
|
+
fontStyle: (z == null ? void 0 : z.fontStyle) ?? "normal"
|
|
1224
|
+
},
|
|
1225
|
+
fontSize: V ?? 0.01,
|
|
1226
|
+
lineHeight: W,
|
|
1227
|
+
letterSpacing: oe ?? 0,
|
|
1228
|
+
wordSpacing: J ?? 0,
|
|
1229
|
+
textAppearance: Me,
|
|
1230
|
+
color: O
|
|
1231
|
+
}, ye = {
|
|
1232
|
+
...It(Ct(c, i))
|
|
1233
|
+
}, Pe = {
|
|
1234
|
+
fontSettings: {
|
|
1235
|
+
fontFamily: Ue,
|
|
1236
|
+
fontWeight: (m == null ? void 0 : m.fontWeight) ?? 400,
|
|
1237
|
+
fontStyle: (m == null ? void 0 : m.fontStyle) ?? "normal"
|
|
1238
|
+
},
|
|
1239
|
+
fontSize: De ?? 0.01,
|
|
1240
|
+
lineHeight: a,
|
|
1241
|
+
letterSpacing: mt ?? 0,
|
|
1242
|
+
wordSpacing: I ?? 0,
|
|
1243
|
+
textAppearance: ke,
|
|
1244
|
+
color: K
|
|
1245
|
+
}, v = {
|
|
1246
|
+
...It(Ct(Pe, i))
|
|
1247
|
+
}, se = {
|
|
1248
|
+
fontSettings: {
|
|
1249
|
+
fontFamily: te,
|
|
1250
|
+
fontWeight: (B == null ? void 0 : B.fontWeight) ?? 400,
|
|
1251
|
+
fontStyle: (B == null ? void 0 : B.fontStyle) ?? "normal"
|
|
1252
|
+
},
|
|
1253
|
+
fontSize: pe ?? 0.01,
|
|
1254
|
+
lineHeight: G,
|
|
1255
|
+
letterSpacing: Re ?? 0,
|
|
1256
|
+
wordSpacing: le ?? 0,
|
|
1257
|
+
textAppearance: je,
|
|
1258
|
+
color: ee
|
|
1259
|
+
}, et = {
|
|
1260
|
+
...It(Ct(se, i)),
|
|
1261
|
+
...Tt(pe, G, r, i)
|
|
1262
|
+
}, ie = kt(
|
|
1263
|
+
V,
|
|
1264
|
+
W,
|
|
1265
|
+
`${r}-item-title`,
|
|
1266
|
+
`${r}-text-tight-leading`
|
|
1267
|
+
), we = kt(
|
|
1268
|
+
De,
|
|
1269
|
+
a,
|
|
1270
|
+
`${r}-item-subtitle`,
|
|
1271
|
+
`${r}-text-tight-leading`
|
|
1272
|
+
), Le = Tt(V, W, r, i), xe = Tt(De, a, r, i), tt = kt(
|
|
1273
|
+
pe,
|
|
1274
|
+
G,
|
|
1275
|
+
`${r}-lightbox-counter`,
|
|
1276
|
+
`${r}-text-tight-leading`
|
|
1277
|
+
), ae = si(r, {
|
|
1278
|
+
titleColor: O,
|
|
1279
|
+
subtitleColor: K,
|
|
1280
|
+
lightboxCounterColor: ee
|
|
1281
|
+
}, Mi, Di), $t = `${x && x !== "default" ? `${r}-state-${x}` : ""}${Je === "on hover" && (!i || s) ? ` ${r}-show-text-hover` : ""}`.trim(), yt = Ie === 0 ? 1 / 0 : Ie, d = (t ?? []).slice(0, yt), it = Rt(
|
|
1282
|
+
() => T === "on" ? Si(d) : [],
|
|
1283
|
+
[d, T]
|
|
1284
|
+
), ve = Z.entryWidth ?? 0.2, Ve = (L == null ? void 0 : L.display) === "cover", wt = (L == null ? void 0 : L.ratioValue) ?? "1:1", nt = (L == null ? void 0 : L.reversed) ?? !1, [_e, rt] = wt.split(":").map(Number), xt = `${nt ? rt : _e} / ${nt ? _e : rt}`, E = Z.columnsCount, ze = g(ve ?? 0, i), Be = ze, l = !Ve && We !== "off", u = d.length % E || E, _ = u < E && d.length > 0, ce = d.length - u, be = _ ? Math.floor((E - u) / 2) + 1 : 1, ne = Xe ? g(Xe, i) : void 0, Fe = {
|
|
1285
|
+
width: Be,
|
|
1286
|
+
...Ve ? { aspectRatio: xt, height: "auto", overflow: "hidden" } : { height: "auto" },
|
|
1287
|
+
...ne ? { borderRadius: ne, overflow: "hidden" } : {}
|
|
1288
|
+
}, w = `${r}-item-image-wrapper${l ? ` ${r}-item-image-wrapper-fit-slider` : ""}`.trim(), p = M === "d" || M === "e" || M === "f", S = Qe === "on", N = `calc(${g(ve ?? 0, i)} * (${P} / 100))`, R = g(ve * P / 100, i), Nt = Ve ? {
|
|
1289
|
+
objectFit: "cover",
|
|
1290
|
+
pointerEvents: "auto",
|
|
1291
|
+
width: "100%",
|
|
1292
|
+
height: "100%",
|
|
1293
|
+
maxWidth: "100%",
|
|
1294
|
+
...ne ? { borderRadius: ne } : {}
|
|
1295
|
+
} : {
|
|
1296
|
+
objectFit: "contain",
|
|
1297
|
+
pointerEvents: "auto",
|
|
1298
|
+
width: "auto",
|
|
1299
|
+
height: "auto",
|
|
1300
|
+
maxWidth: "100%",
|
|
1301
|
+
...ne ? { borderRadius: ne } : {}
|
|
1302
|
+
}, [Ut, Kt] = k(0), ot = $(null), Jt = F === "fade" || ge === "horizontal" ? "ltr" : ge === "vertical" ? "ttb" : "ltr";
|
|
1303
|
+
H(() => {
|
|
1304
|
+
const h = ot.current;
|
|
1305
|
+
if (!h) return;
|
|
1306
|
+
const C = new ResizeObserver((j) => {
|
|
1307
|
+
Kt(Math.round(j[0].contentRect.width));
|
|
1308
|
+
});
|
|
1309
|
+
return C.observe(h), () => C.disconnect();
|
|
1310
|
+
}, []);
|
|
1311
|
+
const Qt = (() => {
|
|
1312
|
+
const h = { ...ae }, C = ot.current ? getComputedStyle(ot.current).getPropertyValue("--cntrl-article-width").trim() : "";
|
|
1313
|
+
return C && (h["--cntrl-article-width"] = C), h;
|
|
1314
|
+
})(), [vt, bt] = k(!1), [lt, Zt] = k([]), [Pt, St] = k(0), zt = T === "on" && (!i || s), Ft = (h, C) => {
|
|
1315
|
+
i && !s || T !== "off" && (Zt(h), St(C), bt(!0));
|
|
1316
|
+
};
|
|
1317
|
+
H(() => {
|
|
1318
|
+
if (!vt || T !== "on" || typeof document > "u") return;
|
|
1319
|
+
const h = document.body.style.overflow;
|
|
1320
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1321
|
+
document.body.style.overflow = h;
|
|
1322
|
+
};
|
|
1323
|
+
}, [vt, T]), H(() => {
|
|
1324
|
+
!i || s || bt(!1);
|
|
1325
|
+
}, [i, s]);
|
|
1326
|
+
const ei = Rt(() => hi(r), [r]);
|
|
1327
|
+
return /* @__PURE__ */ y(X, { children: [
|
|
1328
|
+
/* @__PURE__ */ n("style", { dangerouslySetInnerHTML: { __html: ei } }),
|
|
1329
|
+
T === "on" && /* @__PURE__ */ n(Ii, { mediaList: it }),
|
|
1330
|
+
/* @__PURE__ */ n("div", { style: ae, children: /* @__PURE__ */ n(
|
|
1331
|
+
"div",
|
|
1332
|
+
{
|
|
1333
|
+
ref: ot,
|
|
1334
|
+
className: `${r}-wrapper ${r}-type-${M}${S ? ` ${r}-align-entries` : ""} ${r}-image-align-${Ze} ${$t}`.trim(),
|
|
1335
|
+
style: {
|
|
1336
|
+
gridTemplateColumns: `repeat(${E}, ${ze})`,
|
|
1337
|
+
rowGap: S ? 0 : g(me ?? 0, i),
|
|
1338
|
+
columnGap: g(Z.horizontalGap ?? 0, i),
|
|
1339
|
+
width: g(Z.wrapperWidth ?? 0, i),
|
|
1340
|
+
...S ? { [`--${r}-align-entries-row-gap`]: g(me ?? 0, i) } : {}
|
|
1341
|
+
},
|
|
1342
|
+
children: d.map((h, C) => {
|
|
1343
|
+
var Dt;
|
|
1344
|
+
const j = Ht(h.title), Q = Ht(h.subtitle), Ae = T === "off" && ((Dt = h.link) != null && Dt.value) ? h.link : void 0, ti = Math.floor(C / E) === Math.ceil(d.length / E) - 1, st = _ && C >= ce ? `${be + (C - ce)}` : void 0, At = p ? /* @__PURE__ */ y("div", { className: `${r}-item-text-block`, children: [
|
|
1345
|
+
j && /* @__PURE__ */ n("p", { className: ie, style: { width: N, ...ye, ...Le }, children: h.title }),
|
|
1346
|
+
j && /* @__PURE__ */ n(
|
|
1347
|
+
"div",
|
|
1348
|
+
{
|
|
1349
|
+
"data-controls": o ? "titleMarginTop" : void 0,
|
|
1350
|
+
className: o ? `${r}-control` : void 0,
|
|
1351
|
+
style: {
|
|
1352
|
+
height: g(U ?? 0, i),
|
|
1353
|
+
width: R
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
),
|
|
1357
|
+
Q && /* @__PURE__ */ n("p", { className: we, style: { width: N, ...v, ...xe }, children: h.subtitle }),
|
|
1358
|
+
Q && /* @__PURE__ */ n(
|
|
1359
|
+
"div",
|
|
1360
|
+
{
|
|
1361
|
+
"data-controls": o ? "subtitleMarginTop" : void 0,
|
|
1362
|
+
className: o ? `${r}-control` : void 0,
|
|
1363
|
+
style: {
|
|
1364
|
+
height: g(A ?? 0, i),
|
|
1365
|
+
width: R
|
|
1366
|
+
}
|
|
1367
|
+
}
|
|
1368
|
+
)
|
|
1369
|
+
] }) : null, ii = S ? /* @__PURE__ */ y("div", { className: `${r}-item-title-row`, children: [
|
|
1370
|
+
!p && /* @__PURE__ */ n(
|
|
1371
|
+
"div",
|
|
1372
|
+
{
|
|
1373
|
+
"data-controls": o && j ? "titleMarginTop" : void 0,
|
|
1374
|
+
className: o && j ? `${r}-control` : void 0,
|
|
1375
|
+
style: {
|
|
1376
|
+
height: j ? g(U ?? 0, i) : 0,
|
|
1377
|
+
width: R
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
),
|
|
1381
|
+
j && /* @__PURE__ */ n("p", { className: ie, style: { width: N, ...ye, ...Le }, children: h.title }),
|
|
1382
|
+
p && j && /* @__PURE__ */ n(
|
|
1383
|
+
"div",
|
|
1384
|
+
{
|
|
1385
|
+
"data-controls": o ? "titleMarginTop" : void 0,
|
|
1386
|
+
className: o ? `${r}-control` : void 0,
|
|
1387
|
+
style: {
|
|
1388
|
+
height: g(U ?? 0, i),
|
|
1389
|
+
width: R
|
|
1390
|
+
}
|
|
1391
|
+
}
|
|
1392
|
+
)
|
|
1393
|
+
] }) : null, ni = S ? /* @__PURE__ */ y("div", { className: `${r}-item-subtitle-row`, children: [
|
|
1394
|
+
!p && /* @__PURE__ */ n(
|
|
1395
|
+
"div",
|
|
1396
|
+
{
|
|
1397
|
+
"data-controls": o && Q ? "subtitleMarginTop" : void 0,
|
|
1398
|
+
className: o && Q ? `${r}-control` : void 0,
|
|
1399
|
+
style: {
|
|
1400
|
+
height: Q ? g(A ?? 0, i) : 0,
|
|
1401
|
+
width: R
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
),
|
|
1405
|
+
Q && /* @__PURE__ */ n("p", { className: we, style: { width: N, ...v, ...xe }, children: h.subtitle }),
|
|
1406
|
+
p && Q && /* @__PURE__ */ n(
|
|
1407
|
+
"div",
|
|
1408
|
+
{
|
|
1409
|
+
"data-controls": o ? "subtitleMarginTop" : void 0,
|
|
1410
|
+
className: o ? `${r}-control` : void 0,
|
|
1411
|
+
style: {
|
|
1412
|
+
height: g(A ?? 0, i),
|
|
1413
|
+
width: R
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
)
|
|
1417
|
+
] }) : null, Ot = /* @__PURE__ */ y(ut, { link: Ae, className: `${r}-item-text-link`, children: [
|
|
1418
|
+
ii,
|
|
1419
|
+
ni
|
|
1420
|
+
] }), Ge = Yt(h.gallery), at = Ge.filter((f) => f.lightboxMedia).map((f) => f.lightboxMedia), ct = /* @__PURE__ */ n(Li, { className: w, style: Fe, children: Ge.length === 0 ? null : We === "off" ? (() => {
|
|
1421
|
+
const { displayMedia: f, lightboxMedia: Ee } = Ge[0], qe = Ee ? at.findIndex((dt) => dt.assetId === Ee.assetId) : -1;
|
|
1422
|
+
return /* @__PURE__ */ n(
|
|
1423
|
+
Vt,
|
|
1424
|
+
{
|
|
1425
|
+
media: f,
|
|
1426
|
+
className: `${r}-item-${Se(f) ? "video" : "image"}`.trim(),
|
|
1427
|
+
style: Nt,
|
|
1428
|
+
hasLightbox: T === "on",
|
|
1429
|
+
onMediaClick: zt && qe >= 0 ? () => Ft(at, qe) : void 0
|
|
1430
|
+
}
|
|
1431
|
+
);
|
|
1432
|
+
})() : /* @__PURE__ */ y(X, { children: [
|
|
1433
|
+
l && /* @__PURE__ */ n("div", { className: `${r}-item-image-wrapper-sizer`, "aria-hidden": "true", children: Ge.map(({ displayMedia: f }) => Oe(f) ? /* @__PURE__ */ n("div", { style: { aspectRatio: `${Et(f)}` } }, `sizer-${f.assetId}`) : Se(f) ? /* @__PURE__ */ n(Xt, { src: f.assetId, nearPreload: "metadata", muted: !0, playsInline: !0 }, `sizer-${f.assetId}`) : /* @__PURE__ */ n("img", { src: f.assetId, alt: "" }, `sizer-${f.assetId}`)) }),
|
|
1434
|
+
/* @__PURE__ */ n(
|
|
1435
|
+
oi,
|
|
1436
|
+
{
|
|
1437
|
+
className: `${r}-item-slider`,
|
|
1438
|
+
options: {
|
|
1439
|
+
arrows: !1,
|
|
1440
|
+
pagination: !1,
|
|
1441
|
+
drag: !1,
|
|
1442
|
+
perPage: 1,
|
|
1443
|
+
autoplay: !0,
|
|
1444
|
+
interval: he * 1e3,
|
|
1445
|
+
width: "100%",
|
|
1446
|
+
height: "100%",
|
|
1447
|
+
speed: $i,
|
|
1448
|
+
type: F === "fade" ? "fade" : "loop",
|
|
1449
|
+
rewind: F === "fade",
|
|
1450
|
+
pauseOnHover: !1,
|
|
1451
|
+
pauseOnFocus: !1,
|
|
1452
|
+
direction: Jt
|
|
1453
|
+
},
|
|
1454
|
+
onMoved: (f) => {
|
|
1455
|
+
ge !== "random" || F === "fade" || fi(f);
|
|
1456
|
+
},
|
|
1457
|
+
children: Ge.map(({ displayMedia: f, lightboxMedia: Ee }, qe) => {
|
|
1458
|
+
const dt = Ee ? at.findIndex((ri) => ri.assetId === Ee.assetId) : -1;
|
|
1459
|
+
return /* @__PURE__ */ n(li, { "data-slide-index": qe, children: /* @__PURE__ */ n(
|
|
1460
|
+
Vt,
|
|
1461
|
+
{
|
|
1462
|
+
media: f,
|
|
1463
|
+
className: `${r}-item-${Se(f) ? "video" : "image"}`.trim(),
|
|
1464
|
+
style: Nt,
|
|
1465
|
+
hasLightbox: T === "on",
|
|
1466
|
+
isSplideSlide: !0,
|
|
1467
|
+
onMediaClick: zt && dt >= 0 ? () => Ft(at, dt) : void 0
|
|
1468
|
+
}
|
|
1469
|
+
) }, qe);
|
|
1470
|
+
})
|
|
1471
|
+
},
|
|
1472
|
+
`${F}-${ve}-${ge}-${he}-${Ut}-${Y}`
|
|
1473
|
+
)
|
|
1474
|
+
] }) }), Wt = p ? null : /* @__PURE__ */ y(X, { children: [
|
|
1475
|
+
/* @__PURE__ */ n(
|
|
1476
|
+
"div",
|
|
1477
|
+
{
|
|
1478
|
+
"data-controls": o && j ? "titleMarginTop" : void 0,
|
|
1479
|
+
className: o && j ? `${r}-control` : void 0,
|
|
1480
|
+
style: {
|
|
1481
|
+
height: j ? g(U ?? 0, i) : 0,
|
|
1482
|
+
width: R
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
),
|
|
1486
|
+
/* @__PURE__ */ n(
|
|
1487
|
+
"p",
|
|
1488
|
+
{
|
|
1489
|
+
className: ie,
|
|
1490
|
+
style: { width: N, ...ye, ...Le },
|
|
1491
|
+
children: h.title
|
|
1492
|
+
}
|
|
1493
|
+
),
|
|
1494
|
+
/* @__PURE__ */ n(
|
|
1495
|
+
"div",
|
|
1496
|
+
{
|
|
1497
|
+
"data-controls": o && Q ? "subtitleMarginTop" : void 0,
|
|
1498
|
+
className: o && Q ? `${r}-control` : void 0,
|
|
1499
|
+
style: {
|
|
1500
|
+
height: Q ? g(A ?? 0, i) : 0,
|
|
1501
|
+
width: R
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
),
|
|
1505
|
+
/* @__PURE__ */ n(
|
|
1506
|
+
"p",
|
|
1507
|
+
{
|
|
1508
|
+
className: we,
|
|
1509
|
+
style: { width: N, ...v, ...xe },
|
|
1510
|
+
children: h.subtitle
|
|
1511
|
+
}
|
|
1512
|
+
)
|
|
1513
|
+
] }), Mt = Ae ? /* @__PURE__ */ n(ut, { link: Ae, className: `${r}-item-image-link`, children: ct }) : /* @__PURE__ */ n("a", { className: `${r}-item-image-link`, children: ct });
|
|
1514
|
+
return /* @__PURE__ */ n(
|
|
1515
|
+
"div",
|
|
1516
|
+
{
|
|
1517
|
+
className: `${r}-item`.trim(),
|
|
1518
|
+
style: st && !S ? { gridColumn: st } : void 0,
|
|
1519
|
+
children: /* @__PURE__ */ n(
|
|
1520
|
+
"div",
|
|
1521
|
+
{
|
|
1522
|
+
className: `${o ? `${r}-item-inner` : `${r}-item-inner-hidden`}${S && ti ? ` ${r}-item-inner-last-row` : ""}`.trim(),
|
|
1523
|
+
style: {
|
|
1524
|
+
width: (P ?? 0) > 100 ? `calc(${ze} * (${P} / 100))` : ze,
|
|
1525
|
+
...st && S ? { gridColumn: st } : {}
|
|
1526
|
+
},
|
|
1527
|
+
children: S ? /* @__PURE__ */ n(X, { children: p ? /* @__PURE__ */ y(X, { children: [
|
|
1528
|
+
Ot,
|
|
1529
|
+
Mt
|
|
1530
|
+
] }) : /* @__PURE__ */ y(X, { children: [
|
|
1531
|
+
Mt,
|
|
1532
|
+
Ot
|
|
1533
|
+
] }) }) : Ae ? /* @__PURE__ */ y(X, { children: [
|
|
1534
|
+
/* @__PURE__ */ y(ut, { link: Ae, className: `${r}-item-image-link`, children: [
|
|
1535
|
+
At,
|
|
1536
|
+
ct
|
|
1537
|
+
] }),
|
|
1538
|
+
!p && /* @__PURE__ */ n(ut, { link: Ae, className: `${r}-item-text-link`, children: Wt })
|
|
1539
|
+
] }) : /* @__PURE__ */ y(X, { children: [
|
|
1540
|
+
At,
|
|
1541
|
+
ct,
|
|
1542
|
+
Wt
|
|
1543
|
+
] })
|
|
1544
|
+
}
|
|
1545
|
+
)
|
|
1546
|
+
},
|
|
1547
|
+
C
|
|
1548
|
+
);
|
|
1549
|
+
})
|
|
1550
|
+
}
|
|
1551
|
+
) }),
|
|
1552
|
+
(!i || s) && vt && typeof document < "u" && T === "on" && (() => {
|
|
1553
|
+
const h = (ue ? document.getElementById(ue) : null) ?? document.body;
|
|
1554
|
+
return di(
|
|
1555
|
+
/* @__PURE__ */ n("div", { style: Qt, "data-selection": "none", children: /* @__PURE__ */ n(
|
|
1556
|
+
Oi,
|
|
1557
|
+
{
|
|
1558
|
+
prefix: r,
|
|
1559
|
+
items: lt,
|
|
1560
|
+
index: Pt,
|
|
1561
|
+
imageDisplay: Wi(Ce),
|
|
1562
|
+
isEditor: i,
|
|
1563
|
+
isPreviewMode: s,
|
|
1564
|
+
isEditMode: o,
|
|
1565
|
+
closeIcon: fe,
|
|
1566
|
+
closeIconMaxWidth: Te,
|
|
1567
|
+
closeIconColor: $e,
|
|
1568
|
+
closeIconHoverColor: ht,
|
|
1569
|
+
iconMarginRight: Ke,
|
|
1570
|
+
contentMarginTop: gt,
|
|
1571
|
+
onClose: () => bt(!1),
|
|
1572
|
+
onPrev: () => St((C) => (C - 1 + lt.length) % lt.length),
|
|
1573
|
+
onNext: () => St((C) => (C + 1) % lt.length),
|
|
1574
|
+
counterClassName: tt,
|
|
1575
|
+
counterStyle: et
|
|
1576
|
+
}
|
|
1577
|
+
) }),
|
|
1578
|
+
h
|
|
1579
|
+
);
|
|
1580
|
+
})()
|
|
1581
|
+
] });
|
|
1582
|
+
}
|
|
1583
|
+
const Mi = {
|
|
1584
|
+
titleColor: "title-color",
|
|
1585
|
+
subtitleColor: "subtitle-color",
|
|
1586
|
+
lightboxCounterColor: "lightbox-counter-color"
|
|
1587
|
+
}, Di = ["hover", "focus", "filled", "success", "error"];
|
|
1588
|
+
export {
|
|
1589
|
+
Zi as Grid
|
|
1590
|
+
};
|