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