@cntrl-site/components 1.0.108 → 1.0.109

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 (53) hide show
  1. package/dist/Chronicles-Clc3aiGG.mjs +723 -0
  2. package/dist/Chronicles-DBqZzhwf.js +198 -0
  3. package/dist/ChroniclesComponent-4QMq3nfr.js +1 -0
  4. package/dist/{PretextComponent-BiS9XbZr.mjs → ChroniclesComponent-CwSeQzn1.mjs} +857 -425
  5. package/dist/{ClickGallerie-o2U6oyOF.mjs → ClickGallerie-Cjc_1Gxy.mjs} +1 -1
  6. package/dist/{ClickGallerie-CYQMgrIr.js → ClickGallerie-DYbc-rDp.js} +1 -1
  7. package/dist/Components/Chronicles/Chronicles.d.ts +121 -0
  8. package/dist/Components/Chronicles/ChroniclesComponent.d.ts +313 -0
  9. package/dist/Components/utils/buildValidUrl.d.ts +1 -0
  10. package/dist/Components/utils/index.d.ts +1 -0
  11. package/dist/{ControlSlider-Kkec-i14.js → ControlSlider-C8ckUIDm.js} +1 -1
  12. package/dist/{ControlSlider-LcZmviGX.mjs → ControlSlider-DqKfaKMG.mjs} +1 -1
  13. package/dist/{FAQ-CdwSft5p.mjs → FAQ-BS-vO0l-.mjs} +1 -1
  14. package/dist/{FAQ-BxhMo7T8.js → FAQ-Ct0YfqX1.js} +1 -1
  15. package/dist/{Grid-CFHTP3mb.js → Grid-CU1dsdoO.js} +1 -1
  16. package/dist/{Grid-e-gLfsji.mjs → Grid-qbqchSLi.mjs} +1 -1
  17. package/dist/{ImageRevealSlider-Df9sygk9.mjs → ImageRevealSlider-DifEXySR.mjs} +1 -1
  18. package/dist/{ImageRevealSlider-BuukTGAK.js → ImageRevealSlider-DlxudBUy.js} +1 -1
  19. package/dist/{Lightbox-C_fXsfdz.mjs → Lightbox-BY99NS14.mjs} +1 -1
  20. package/dist/{Lightbox-DaunVrkp.js → Lightbox-DZckgBzK.js} +1 -1
  21. package/dist/LinkWrapper-5kQHiGJQ.mjs +10 -0
  22. package/dist/LinkWrapper-CTqM1ucO.js +1 -0
  23. package/dist/{Marquee-DfIP-tIN.js → Marquee-DDKigLBo.js} +1 -1
  24. package/dist/{Marquee-DByooiWP.mjs → Marquee-_xVuf-zp.mjs} +1 -1
  25. package/dist/{MarqueeText-DsUiV6Zv.js → MarqueeText-B5hqB0HA.js} +1 -1
  26. package/dist/{MarqueeText-D6FNCe6P.mjs → MarqueeText-C2E6UDsb.mjs} +1 -1
  27. package/dist/{RichTextRenderer-BptwNpbJ.mjs → RichTextRenderer-D52Xto59.mjs} +1 -1
  28. package/dist/{RichTextRenderer-K90Dd7pt.js → RichTextRenderer-DEFXh5o6.js} +1 -1
  29. package/dist/{Slider20-fMVeRfgx.js → Slider20-BOmjDRf2.js} +1 -1
  30. package/dist/{Slider20-CCzixTiN.mjs → Slider20-DUi6qwnd.mjs} +1 -1
  31. package/dist/{TestimonialGrid-CiCagfBU.js → TestimonialGrid-BHZazEVX.js} +1 -1
  32. package/dist/{TestimonialGrid-CbsVxSn9.mjs → TestimonialGrid-C-8IDzWu.mjs} +1 -1
  33. package/dist/{TestimonialSingle-BWXynGjv.js → TestimonialSingle-BORQom3u.js} +1 -1
  34. package/dist/{TestimonialSingle-BVm3Amrl.mjs → TestimonialSingle-DrnyReim.mjs} +1 -1
  35. package/dist/buildValidUrl-BbtqqeHr.mjs +7 -0
  36. package/dist/buildValidUrl-CtJWFCPi.js +1 -0
  37. package/dist/components-CU9RB7sz.js +1 -0
  38. package/dist/{components-ljYgHKal.mjs → components-Dn_5L1zL.mjs} +18 -17
  39. package/dist/elements.js +1 -1
  40. package/dist/elements.mjs +16 -15
  41. package/dist/elements.node.js +1 -1
  42. package/dist/elements.node.mjs +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/index.mjs +2 -2
  45. package/dist/sources.js +1028 -22
  46. package/dist/sources.mjs +1052 -45
  47. package/dist/utils.js +1 -1
  48. package/dist/utils.mjs +19 -17
  49. package/package.json +1 -1
  50. package/dist/LinkWrapper-Ca84iPtg.js +0 -1
  51. package/dist/LinkWrapper-DZs9hlOn.mjs +0 -13
  52. package/dist/PretextComponent-DWOy-dqD.js +0 -1
  53. package/dist/components-CJlisugq.js +0 -1
@@ -1,7 +1,7 @@
1
1
  import { jsxs as Z, Fragment as oe, jsx as b } from "react/jsx-runtime";
2
2
  import { useState as y, useRef as _, useMemo as se, useCallback as ie, useEffect as w } from "react";
3
3
  import { u as ae } from "./useScopedStyles-DhBG3557.mjs";
4
- import { L as ce } from "./LinkWrapper-DZs9hlOn.mjs";
4
+ import { L as ce } from "./LinkWrapper-5kQHiGJQ.mjs";
5
5
  const le = {
6
6
  sizeType: "custom",
7
7
  value: 700,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),u=require("react"),te=require("./useScopedStyles-Bf6yohVQ.js"),ne=require("./LinkWrapper-Ca84iPtg.js"),se={sizeType:"custom",value:700,min:400,max:700};function z(r,i){return{widthPx:r,heightPx:r*i}}function F(r,i,a,o,t,h){return{x:Math.min(Math.max(r,t/2),a-t/2),y:Math.min(Math.max(i,h/2),o-h/2)}}function A(r,i,a,o){const{heightPx:t}=z(a,o);return F(r/2,i/2,r,i,a,t)}function Z(r,i,a){for(const o of a){const{heightPx:t}=z(o.widthPx,o.aspectRatio),h=o.widthPx/2,f=t/2;if(r>=o.x-h&&r<=o.x+h&&i>=o.y-f&&i<=o.y+f)return!0}return!1}function re(r,i,a,o,t,h,f,p){if(t==="system")return"none";const P=o.getBoundingClientRect(),R=document.elementFromPoint(P.left+r,P.top+i);return R&&R.closest("a")?"none":Z(r,i,a)||h==="area"?f??"none":p??"none"}function H(r,i,a){var p;const{sizeType:o,value:t,min:h,max:f}=i;return o==="custom"?t:o==="as is"?((p=a.get(r))==null?void 0:p.naturalWidth)??t:Math.round(Math.random()*(f-h)+h)}function oe(r){return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react/jsx-runtime"),u=require("react"),te=require("./useScopedStyles-Bf6yohVQ.js"),ne=require("./LinkWrapper-CTqM1ucO.js"),se={sizeType:"custom",value:700,min:400,max:700};function z(r,i){return{widthPx:r,heightPx:r*i}}function F(r,i,a,o,t,h){return{x:Math.min(Math.max(r,t/2),a-t/2),y:Math.min(Math.max(i,h/2),o-h/2)}}function A(r,i,a,o){const{heightPx:t}=z(a,o);return F(r/2,i/2,r,i,a,t)}function Z(r,i,a){for(const o of a){const{heightPx:t}=z(o.widthPx,o.aspectRatio),h=o.widthPx/2,f=t/2;if(r>=o.x-h&&r<=o.x+h&&i>=o.y-f&&i<=o.y+f)return!0}return!1}function re(r,i,a,o,t,h,f,p){if(t==="system")return"none";const P=o.getBoundingClientRect(),R=document.elementFromPoint(P.left+r,P.top+i);return R&&R.closest("a")?"none":Z(r,i,a)||h==="area"?f??"none":p??"none"}function H(r,i,a){var p;const{sizeType:o,value:t,min:h,max:f}=i;return o==="custom"?t:o==="as is"?((p=a.get(r))==null?void 0:p.naturalWidth)??t:Math.round(Math.random()*(f-h)+h)}function oe(r){return`
2
2
  .${r}-root {
3
3
  position: absolute;
4
4
  top: 0;
@@ -0,0 +1,121 @@
1
+ import { CommonComponentProps } from '../props';
2
+ import { ContentLink } from '../utils/index';
3
+ import { TextStyles } from '../utils/textStylesToCss';
4
+ export declare const CHRONICLES_EXTRA_TITLE_KEYS: readonly ["title2", "title3", "title4"];
5
+ export declare const CHRONICLES_COLUMN_WIDTH_KEYS: readonly ["column1Width", "column2Width", "column3Width", "column4Width"];
6
+ export declare const CHRONICLES_COLUMN_STYLE_PREFIXES: readonly ["column1", "column2", "column3", "column4", "column5"];
7
+ declare const PANEL_POSITION_OFFSETS: {
8
+ readonly center: {
9
+ readonly x: "50%";
10
+ readonly y: "50%";
11
+ };
12
+ readonly 'left-top': {
13
+ readonly x: "0%";
14
+ readonly y: "0%";
15
+ };
16
+ readonly 'top-center': {
17
+ readonly x: "50%";
18
+ readonly y: "0%";
19
+ };
20
+ readonly 'top-right': {
21
+ readonly x: "100%";
22
+ readonly y: "0%";
23
+ };
24
+ readonly 'left-center': {
25
+ readonly x: "0%";
26
+ readonly y: "50%";
27
+ };
28
+ readonly 'right-center': {
29
+ readonly x: "100%";
30
+ readonly y: "50%";
31
+ };
32
+ readonly 'left-bottom': {
33
+ readonly x: "0%";
34
+ readonly y: "100%";
35
+ };
36
+ readonly 'bottom-center': {
37
+ readonly x: "50%";
38
+ readonly y: "100%";
39
+ };
40
+ readonly 'right-bottom': {
41
+ readonly x: "100%";
42
+ readonly y: "100%";
43
+ };
44
+ };
45
+ type ChroniclesPanelPosition = keyof typeof PANEL_POSITION_OFFSETS;
46
+ export declare const CHRONICLES_PANEL_POSITIONS: ChroniclesPanelPosition[];
47
+ type Padding = {
48
+ top: number;
49
+ right: number;
50
+ bottom: number;
51
+ left: number;
52
+ };
53
+ type ColumnWidthKey = typeof CHRONICLES_COLUMN_WIDTH_KEYS[number];
54
+ type TextStylePrefix = 'trigger' | typeof CHRONICLES_COLUMN_STYLE_PREFIXES[number];
55
+ type ChroniclesMedia = {
56
+ assetId: string;
57
+ name?: string;
58
+ type?: 'image' | 'video';
59
+ objectFit?: 'cover' | 'contain';
60
+ };
61
+ type ChroniclesItem = {
62
+ group?: string;
63
+ title?: string;
64
+ title2?: string;
65
+ title3?: string;
66
+ title4?: string;
67
+ image?: ChroniclesMedia[];
68
+ link?: ContentLink;
69
+ };
70
+ type TextStyleFields = {
71
+ FontFamily: string;
72
+ FontSettings: {
73
+ fontWeight: number;
74
+ fontStyle: string;
75
+ };
76
+ FontSize: number;
77
+ LineHeight: number;
78
+ LetterSpacing: number;
79
+ WordSpacing: number;
80
+ TextAlign?: TextStyles['textAlign'];
81
+ TextAppearance: TextStyles['textAppearance'];
82
+ };
83
+ type PrefixedTextStyle<Prefix extends string> = {
84
+ [Key in keyof TextStyleFields as `${Prefix}${Key}`]: TextStyleFields[Key];
85
+ };
86
+ type ColumnLayoutSettings = Partial<Record<ColumnWidthKey, number>> & {
87
+ columns: number;
88
+ columnGap: number;
89
+ panelWidth: number;
90
+ panelPadding: Padding;
91
+ };
92
+ type ChroniclesSettings = PrefixedTextStyle<TextStylePrefix> & ColumnLayoutSettings & {
93
+ type: 'a' | 'b';
94
+ triggerLabel: string;
95
+ closeLabel: string;
96
+ hoverInterval: number;
97
+ panelPosition: ChroniclesPanelPosition;
98
+ panelRadius: number;
99
+ groupGap: number;
100
+ triggerColor: string;
101
+ triggerHoverColor: string;
102
+ closeColor: string;
103
+ closeHoverColor: string;
104
+ panelColor: string;
105
+ textColor: string;
106
+ textHoverColor: string;
107
+ overlayColor: string;
108
+ };
109
+ type ChroniclesProps = {
110
+ settings: ChroniclesSettings;
111
+ content?: ChroniclesItem[];
112
+ isEditor?: boolean;
113
+ isEditMode?: boolean;
114
+ isPreviewMode?: boolean;
115
+ activeEvent?: string;
116
+ portalId?: string;
117
+ } & CommonComponentProps;
118
+ export declare function getChroniclesEqualColumnWidths(settings: ColumnLayoutSettings): Partial<Record<ColumnWidthKey, number>>;
119
+ export declare function applyChroniclesColumnCountChange(nextSettings: Record<string, any>, prevSettings: Record<string, any>): Record<string, any>;
120
+ export declare function Chronicles({ settings, content, isEditor, isEditMode, isPreviewMode, activeEvent, portalId, currentState, unavailableStates, }: ChroniclesProps): import("react/jsx-runtime").JSX.Element;
121
+ export {};
@@ -0,0 +1,313 @@
1
+ import { LayoutItem, SchemaDisplayRule, SchemaProperty } from '../../types/SchemaV1';
2
+ import { applyChroniclesColumnCountChange, Chronicles } from './Chronicles';
3
+ export declare const ChroniclesComponent: {
4
+ element: typeof Chronicles;
5
+ id: string;
6
+ name: string;
7
+ category: string;
8
+ normalizeLayoutSettingsUpdate: typeof applyChroniclesColumnCountChange;
9
+ preview: {
10
+ type: "image";
11
+ url: string;
12
+ };
13
+ version: number;
14
+ schema: {
15
+ type: "object";
16
+ version: 1;
17
+ content: {
18
+ type: "array";
19
+ settings: {
20
+ addItemWithoutImage: true;
21
+ allowsVideo: true;
22
+ };
23
+ display: {
24
+ type: string;
25
+ rules: SchemaDisplayRule[];
26
+ };
27
+ items: {
28
+ type: "object";
29
+ properties: {
30
+ link: {
31
+ type: "object";
32
+ label: string;
33
+ contentKey: "link";
34
+ display: {
35
+ type: string;
36
+ };
37
+ };
38
+ image: {
39
+ type: "object";
40
+ label: string;
41
+ display: {
42
+ type: string;
43
+ };
44
+ properties: {
45
+ assetId: {
46
+ type: "string";
47
+ };
48
+ name: {
49
+ type: "string";
50
+ };
51
+ type: {
52
+ type: "string";
53
+ enum: string[];
54
+ };
55
+ objectFit: {
56
+ type: "string";
57
+ enum: string[];
58
+ };
59
+ };
60
+ };
61
+ group: {
62
+ type: "string";
63
+ label: string;
64
+ placeholder: string;
65
+ display: {
66
+ type: string;
67
+ };
68
+ };
69
+ title: {
70
+ type: "string";
71
+ label: string;
72
+ placeholder: string;
73
+ display: {
74
+ type: string;
75
+ };
76
+ };
77
+ };
78
+ };
79
+ default: {
80
+ group: string;
81
+ title: string;
82
+ link: {
83
+ type: "url";
84
+ value: string;
85
+ target: "self";
86
+ };
87
+ image: {
88
+ assetId: string;
89
+ name: string;
90
+ objectFit: "cover";
91
+ }[];
92
+ }[];
93
+ };
94
+ settings: {
95
+ sizing: string;
96
+ properties: {
97
+ hoverInterval: {
98
+ type: "number";
99
+ scope: "common";
100
+ title: string;
101
+ display: {
102
+ type: string;
103
+ };
104
+ min: number;
105
+ step: number;
106
+ max: number;
107
+ };
108
+ panelPosition: {
109
+ type: "string";
110
+ scope: "layout";
111
+ title: string;
112
+ display: {
113
+ type: string;
114
+ enum: ("center" | "top-center" | "top-right" | "bottom-center" | "left-top" | "left-center" | "right-center" | "left-bottom" | "right-bottom")[];
115
+ };
116
+ };
117
+ panelWidth: SchemaProperty;
118
+ panelPadding: {
119
+ type: "object";
120
+ scope: "layout";
121
+ title: string;
122
+ display: {
123
+ type: string;
124
+ };
125
+ };
126
+ panelRadius: SchemaProperty;
127
+ groupGap: SchemaProperty;
128
+ triggerColor: SchemaProperty;
129
+ triggerHoverColor: SchemaProperty;
130
+ closeColor: SchemaProperty;
131
+ closeHoverColor: SchemaProperty;
132
+ panelColor: SchemaProperty;
133
+ textColor: SchemaProperty;
134
+ textHoverColor: SchemaProperty;
135
+ overlayColor: SchemaProperty;
136
+ type: {
137
+ type: "string";
138
+ scope: "layout";
139
+ title: string;
140
+ display: {
141
+ type: string;
142
+ };
143
+ enum: string[];
144
+ };
145
+ triggerLabel: {
146
+ type: "string";
147
+ scope: "common";
148
+ title: string;
149
+ display: {
150
+ type: string;
151
+ };
152
+ };
153
+ closeLabel: {
154
+ type: "string";
155
+ scope: "common";
156
+ title: string;
157
+ display: {
158
+ type: string;
159
+ };
160
+ };
161
+ columns: {
162
+ type: "number";
163
+ scope: "layout";
164
+ title: string;
165
+ display: {
166
+ type: string;
167
+ };
168
+ min: number;
169
+ max: number;
170
+ };
171
+ columnGap: SchemaProperty;
172
+ };
173
+ defaults: {
174
+ triggerLabel: string;
175
+ closeLabel: string;
176
+ hoverInterval: number;
177
+ triggerColor: string;
178
+ triggerHoverColor: string;
179
+ closeColor: string;
180
+ closeHoverColor: string;
181
+ panelColor: string;
182
+ textColor: string;
183
+ textHoverColor: string;
184
+ overlayColor: string;
185
+ triggerFontFamily: string;
186
+ triggerFontSettings: {
187
+ fontWeight: number;
188
+ fontStyle: string;
189
+ };
190
+ triggerLetterSpacing: number;
191
+ triggerWordSpacing: number;
192
+ triggerTextAppearance: {
193
+ textTransform: string;
194
+ textDecoration: string;
195
+ fontVariant: string;
196
+ };
197
+ };
198
+ layoutDefaults: {
199
+ m: {
200
+ type: string;
201
+ panelPosition: string;
202
+ columns: number;
203
+ columnGap: number;
204
+ panelWidth: number;
205
+ panelPadding: {
206
+ top: number;
207
+ right: number;
208
+ bottom: number;
209
+ left: number;
210
+ };
211
+ panelRadius: number;
212
+ groupGap: number;
213
+ triggerFontSize: number;
214
+ triggerLineHeight: number;
215
+ } & Partial<Record<"column1Width" | "column2Width" | "column3Width" | "column4Width", number>>;
216
+ t: {
217
+ type: string;
218
+ panelPosition: string;
219
+ columns: number;
220
+ columnGap: number;
221
+ panelWidth: number;
222
+ panelPadding: {
223
+ top: number;
224
+ right: number;
225
+ bottom: number;
226
+ left: number;
227
+ };
228
+ panelRadius: number;
229
+ groupGap: number;
230
+ triggerFontSize: number;
231
+ triggerLineHeight: number;
232
+ } & Partial<Record<"column1Width" | "column2Width" | "column3Width" | "column4Width", number>>;
233
+ d: {
234
+ type: string;
235
+ panelPosition: string;
236
+ columns: number;
237
+ columnGap: number;
238
+ panelWidth: number;
239
+ panelPadding: {
240
+ top: number;
241
+ right: number;
242
+ bottom: number;
243
+ left: number;
244
+ };
245
+ panelRadius: number;
246
+ groupGap: number;
247
+ triggerFontSize: number;
248
+ triggerLineHeight: number;
249
+ } & Partial<Record<"column1Width" | "column2Width" | "column3Width" | "column4Width", number>>;
250
+ };
251
+ displayRules: (SchemaDisplayRule | {
252
+ if: {
253
+ name: string;
254
+ value: string;
255
+ };
256
+ then: {
257
+ name: string;
258
+ value: boolean;
259
+ };
260
+ })[];
261
+ };
262
+ panels: ({
263
+ id: string;
264
+ icon: string;
265
+ title: string;
266
+ tooltip: string;
267
+ layout: (string | {
268
+ type: "row";
269
+ title: string;
270
+ items: string[];
271
+ })[];
272
+ } | {
273
+ id: string;
274
+ icon: string;
275
+ title: string;
276
+ tooltip: string;
277
+ layout: (string | {
278
+ type: "tab";
279
+ id: string;
280
+ tabs: {
281
+ Label: LayoutItem[];
282
+ };
283
+ })[];
284
+ })[];
285
+ paletteBookmark: {
286
+ items: string[];
287
+ panelIds: string[];
288
+ stateItems: {
289
+ default: string[];
290
+ hover: string[];
291
+ open: string[];
292
+ };
293
+ };
294
+ states: string[];
295
+ statePanels: string[];
296
+ };
297
+ assetsPaths: {
298
+ content: {
299
+ path: string;
300
+ placeholderEnabled: boolean;
301
+ }[];
302
+ parameters: never[];
303
+ };
304
+ fontSettingsPaths: {
305
+ content: never[];
306
+ parameters: {
307
+ path: string;
308
+ }[];
309
+ };
310
+ fontRelations: {
311
+ [k: string]: string;
312
+ };
313
+ };
@@ -0,0 +1 @@
1
+ export declare function buildValidUrl(url: string): string;
@@ -11,6 +11,7 @@ export { readTestimonialTextMeasure } from './readTestimonialTextMeasure';
11
11
  export { getAvailableStatePanels, getUnavailableStates, isPanelAvailable, } from './panelAvailability';
12
12
  export type { PanelAvailabilityContext } from './panelAvailability';
13
13
  export { LinkWrapper } from './LinkWrapper';
14
+ export { buildValidUrl } from './buildValidUrl';
14
15
  export type { ContentLink } from '../../types/SchemaV1';
15
16
  export { getEmbedAspect, getEmbedPlayback, getEmbedPlayerSrc, getEmbedProvider, isEmbedMedia, postEmbedCommand } from './embedMedia';
16
17
  export type { EmbedCommand, EmbedMediaLike, EmbedPlayback, EmbedPlayMode, EmbedProvider } from './embedMedia';
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),L=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const d=require("classnames"),M=require("./RichTextRenderer-K90Dd7pt.js"),s=require("./scalingValue-CSHYgTZl.js"),k=require("./SvgImage-DFlmxAoL.js"),U=require("./textStylesToCss-CNN3zZTV.js"),H="ControlSlider-module__wrapper___sHEkd",Y="ControlSlider-module__hoverArrow___A-dOH",K="ControlSlider-module__sliderItem___QQSkR",Q="ControlSlider-module__sliderImage___9hRl-",Z="ControlSlider-module__arrow___05ghY",G="ControlSlider-module__arrowVertical___tBfVN",J="ControlSlider-module__nextArrow___-30Yc",X="ControlSlider-module__arrowInner___aEra3",E="ControlSlider-module__arrowIcon___S4ztF",ee="ControlSlider-module__arrowImg___2dwJW",te="ControlSlider-module__mirror___brd6U",oe="ControlSlider-module__pagination___bicLF",ne="ControlSlider-module__paginationInner___bT-P-",ie="ControlSlider-module__paginationVertical___zYqKw",re="ControlSlider-module__paginationItem___nTRbk",le="ControlSlider-module__dot___p1Qun",ae="ControlSlider-module__activeDot___LHFaj",se="ControlSlider-module__paginationInsideBottom___R3FWn",ce="ControlSlider-module__paginationInsideTop___V-qb-",de="ControlSlider-module__paginationOutsideBottom___14w8D",_e="ControlSlider-module__paginationOutsideTop___SCLqB",me="ControlSlider-module__paginationInsideLeft___yOBRZ",ge="ControlSlider-module__paginationInsideRight___Rtt3o",pe="ControlSlider-module__paginationOutsideLeft___lahaw",ue="ControlSlider-module__paginationOutsideRight___EtuQa",he="ControlSlider-module__imgWrapper___UjEgB",fe="ControlSlider-module__captionBlock___dJ6-j",Ce="ControlSlider-module__captionTextWrapper___HFlpf",Se="ControlSlider-module__captionText___uGBVc",ve="ControlSlider-module__active___WZK4G",we="ControlSlider-module__withPointerEvents___t-18M",Ie="ControlSlider-module__topLeftAlignment___zjnGM",xe="ControlSlider-module__topCenterAlignment___gD1xW",Ae="ControlSlider-module__topRightAlignment___NMapS",ye="ControlSlider-module__middleLeftAlignment___OnUrY",Re="ControlSlider-module__middleCenterAlignment___Tdkl0",be="ControlSlider-module__middleRightAlignment___wEbfX",je="ControlSlider-module__bottomLeftAlignment___cTP2-",Le="ControlSlider-module__bottomCenterAlignment___c54fB",ke="ControlSlider-module__bottomRightAlignment___kEwrz",Ve="ControlSlider-module__clickOverlay___DZA28",Te="ControlSlider-module__contain___pLyq7",Oe="ControlSlider-module__cover___KdDat",e={wrapper:H,hoverArrow:Y,sliderItem:K,sliderImage:Q,arrow:Z,arrowVertical:G,nextArrow:J,arrowInner:X,arrowIcon:E,arrowImg:ee,mirror:te,pagination:oe,paginationInner:ne,paginationVertical:ie,paginationItem:re,dot:le,activeDot:ae,paginationInsideBottom:se,paginationInsideTop:ce,paginationOutsideBottom:de,paginationOutsideTop:_e,paginationInsideLeft:me,paginationInsideRight:ge,paginationOutsideLeft:pe,paginationOutsideRight:ue,imgWrapper:he,captionBlock:fe,captionTextWrapper:Ce,captionText:Se,active:ve,withPointerEvents:we,topLeftAlignment:Ie,topCenterAlignment:xe,topRightAlignment:Ae,middleLeftAlignment:ye,middleCenterAlignment:Re,middleRightAlignment:be,bottomLeftAlignment:je,bottomCenterAlignment:Le,bottomRightAlignment:ke,clickOverlay:Ve,contain:Te,cover:Oe},Ne={"top-left":e.topLeftAlignment,"top-center":e.topCenterAlignment,"top-right":e.topRightAlignment,"middle-left":e.middleLeftAlignment,"middle-center":e.middleCenterAlignment,"middle-right":e.middleRightAlignment,"bottom-left":e.bottomLeftAlignment,"bottom-center":e.bottomCenterAlignment,"bottom-right":e.bottomRightAlignment};function ze({settings:p,content:u,styles:T,isEditor:l}){const[_,O]=g.useState(null),{widthSettings:I,fontSettings:v,letterSpacing:N,textAlign:z,wordSpacing:B,fontSizeLineHeight:x,textAppearance:w,color:W}=T.imageCaption??{},[m,F]=g.useState(void 0),[C,q]=g.useState(null),[S,D]=g.useState(0),[$,P]=g.useState(0),{direction:n,transition:a,controls:o,pagination:i,imageCaption:h,triggers:f}=p,A=g.useRef(a.type),{x:y,y:R}=p.controls.offset,b=r=>{_&&_.go(r)};return g.useEffect(()=>{if(!C)return;const r=new ResizeObserver(c=>{if(!_)return;const[j]=c;F({width:Math.round(j.contentRect.width),height:Math.round(j.contentRect.height)})});return r.observe(C),()=>r.unobserve(C)},[C]),g.useEffect(()=>{!_||A.current===a.type||(P(r=>r+1),A.current=a.type)},[a.type]),t.jsx("div",{className:d(e.wrapper,{[e.editor]:l}),ref:q,children:t.jsxs("div",{className:e.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:a.backgroundColor&&a.type==="fade in"?a.backgroundColor:"transparent"},children:[p.imageCaption.isActive&&t.jsx("div",{className:d(e.captionBlock),children:t.jsx("div",{className:e.captionTextWrapper,children:u.map((r,c)=>t.jsx("div",{className:d(e.captionText,Ne[h.alignment],{[e.withPointerEvents]:c===S&&l,[e.active]:c===S}),style:{fontFamily:U.normalizeFontFamilyCssValue(v.fontFamily),fontWeight:v.fontWeight,fontStyle:v.fontStyle,width:I.sizing==="auto"?"max-content":s.scalingValue(I.width,l),letterSpacing:s.scalingValue(N,l),wordSpacing:s.scalingValue(B,l),textAlign:z,fontSize:s.scalingValue(x.fontSize,l),lineHeight:s.scalingValue(x.lineHeight,l),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:W,transitionDuration:a.duration?`${Math.round(parseInt(a.duration)/2)}ms`:"500ms"},children:t.jsx("div",{"data-styles":"imageCaption",className:e.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:s.scalingValue(h.offset.y,l),left:s.scalingValue(h.offset.x,l)},children:t.jsx(M.RichTextRenderer,{content:r.imageCaption})})},c))})}),t.jsx(L.Splide2,{onMove:r=>{D(r.index)},ref:O,options:{arrows:!1,speed:a.duration?parseInt(a.duration):500,autoplay:f.autoPlay!==null,...f.autoPlay!==null&&{interval:parseInt(f.autoPlay)*1e3},direction:n==="horiz"||a.type==="fade in"?"ltr":"ttb",pagination:!1,drag:f.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:a.type==="fade in"?"fade":"loop",rewind:!0},children:u.map((r,c)=>t.jsx(L.SplideSlide,{children:t.jsx("div",{className:e.sliderItem,children:t.jsx("div",{className:e.imgWrapper,children:t.jsx("img",{className:d(e.sliderImage,{[e.contain]:r.image.objectFit==="contain",[e.cover]:r.image.objectFit==="cover"}),src:r.image.assetId,alt:r.image.name??""})})})},c))},$),o.isActive&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:d(e.arrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{onClick:()=>{b("-1")},className:e.arrowInner,style:{transform:`translate(${s.scalingValue(y,l)}, ${s.scalingValue(R*(n==="horiz"?1:-1),l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:d(e.arrowImg,e.mirror)}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg,e.mirror)})]})}),t.jsx("div",{className:d(e.arrow,e.nextArrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{className:e.arrowInner,onClick:()=>b("+1"),style:{transform:`translate(${s.scalingValue(y*(n==="horiz"?-1:1),l)}, ${s.scalingValue(R,l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:e.arrowImg}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg)})]})})]}),f.triggersList.click&&t.jsx("div",{className:e.clickOverlay,onClick:()=>{_&&_.go("+1")}}),i.isActive&&t.jsx("div",{className:d(e.pagination,{[e.paginationInsideBottom]:i.position==="inside-1"&&n==="horiz",[e.paginationInsideTop]:i.position==="inside-2"&&n==="horiz",[e.paginationOutsideBottom]:i.position==="outside-1"&&n==="horiz",[e.paginationOutsideTop]:i.position==="outside-2"&&n==="horiz",[e.paginationInsideLeft]:i.position==="inside-1"&&n==="vert",[e.paginationInsideRight]:i.position==="inside-2"&&n==="vert",[e.paginationOutsideLeft]:i.position==="outside-1"&&n==="vert",[e.paginationOutsideRight]:i.position==="outside-2"&&n==="vert",[e.paginationVertical]:n==="vert"}),children:t.jsx("div",{className:e.paginationInner,style:{backgroundColor:i.colors[2],transform:`scale(${i.scale/100}) translate(${s.scalingValue(i.offset.x,l)}, ${s.scalingValue(i.offset.y,l)}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:u.map((r,c)=>t.jsx("button",{onClick:()=>{_&&_.go(c)},className:d(e.paginationItem),children:t.jsx("div",{className:d(e.dot,{[e.activeDot]:c===S}),style:{backgroundColor:c===S?i.colors[0]:i.colors[1],"--pagination-hover-color":i.hover}})},c))})})]})})}function V({color:p,className:u}){return t.jsx("svg",{viewBox:"0 0 10 18",className:u,children:t.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:t.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:p,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}exports.ControlSlider=ze;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),g=require("react"),L=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const d=require("classnames"),M=require("./RichTextRenderer-DEFXh5o6.js"),s=require("./scalingValue-CSHYgTZl.js"),k=require("./SvgImage-DFlmxAoL.js"),U=require("./textStylesToCss-CNN3zZTV.js"),H="ControlSlider-module__wrapper___sHEkd",Y="ControlSlider-module__hoverArrow___A-dOH",K="ControlSlider-module__sliderItem___QQSkR",Q="ControlSlider-module__sliderImage___9hRl-",Z="ControlSlider-module__arrow___05ghY",G="ControlSlider-module__arrowVertical___tBfVN",J="ControlSlider-module__nextArrow___-30Yc",X="ControlSlider-module__arrowInner___aEra3",E="ControlSlider-module__arrowIcon___S4ztF",ee="ControlSlider-module__arrowImg___2dwJW",te="ControlSlider-module__mirror___brd6U",oe="ControlSlider-module__pagination___bicLF",ne="ControlSlider-module__paginationInner___bT-P-",ie="ControlSlider-module__paginationVertical___zYqKw",re="ControlSlider-module__paginationItem___nTRbk",le="ControlSlider-module__dot___p1Qun",ae="ControlSlider-module__activeDot___LHFaj",se="ControlSlider-module__paginationInsideBottom___R3FWn",ce="ControlSlider-module__paginationInsideTop___V-qb-",de="ControlSlider-module__paginationOutsideBottom___14w8D",_e="ControlSlider-module__paginationOutsideTop___SCLqB",me="ControlSlider-module__paginationInsideLeft___yOBRZ",ge="ControlSlider-module__paginationInsideRight___Rtt3o",pe="ControlSlider-module__paginationOutsideLeft___lahaw",ue="ControlSlider-module__paginationOutsideRight___EtuQa",he="ControlSlider-module__imgWrapper___UjEgB",fe="ControlSlider-module__captionBlock___dJ6-j",Ce="ControlSlider-module__captionTextWrapper___HFlpf",Se="ControlSlider-module__captionText___uGBVc",ve="ControlSlider-module__active___WZK4G",we="ControlSlider-module__withPointerEvents___t-18M",Ie="ControlSlider-module__topLeftAlignment___zjnGM",xe="ControlSlider-module__topCenterAlignment___gD1xW",Ae="ControlSlider-module__topRightAlignment___NMapS",ye="ControlSlider-module__middleLeftAlignment___OnUrY",Re="ControlSlider-module__middleCenterAlignment___Tdkl0",be="ControlSlider-module__middleRightAlignment___wEbfX",je="ControlSlider-module__bottomLeftAlignment___cTP2-",Le="ControlSlider-module__bottomCenterAlignment___c54fB",ke="ControlSlider-module__bottomRightAlignment___kEwrz",Ve="ControlSlider-module__clickOverlay___DZA28",Te="ControlSlider-module__contain___pLyq7",Oe="ControlSlider-module__cover___KdDat",e={wrapper:H,hoverArrow:Y,sliderItem:K,sliderImage:Q,arrow:Z,arrowVertical:G,nextArrow:J,arrowInner:X,arrowIcon:E,arrowImg:ee,mirror:te,pagination:oe,paginationInner:ne,paginationVertical:ie,paginationItem:re,dot:le,activeDot:ae,paginationInsideBottom:se,paginationInsideTop:ce,paginationOutsideBottom:de,paginationOutsideTop:_e,paginationInsideLeft:me,paginationInsideRight:ge,paginationOutsideLeft:pe,paginationOutsideRight:ue,imgWrapper:he,captionBlock:fe,captionTextWrapper:Ce,captionText:Se,active:ve,withPointerEvents:we,topLeftAlignment:Ie,topCenterAlignment:xe,topRightAlignment:Ae,middleLeftAlignment:ye,middleCenterAlignment:Re,middleRightAlignment:be,bottomLeftAlignment:je,bottomCenterAlignment:Le,bottomRightAlignment:ke,clickOverlay:Ve,contain:Te,cover:Oe},Ne={"top-left":e.topLeftAlignment,"top-center":e.topCenterAlignment,"top-right":e.topRightAlignment,"middle-left":e.middleLeftAlignment,"middle-center":e.middleCenterAlignment,"middle-right":e.middleRightAlignment,"bottom-left":e.bottomLeftAlignment,"bottom-center":e.bottomCenterAlignment,"bottom-right":e.bottomRightAlignment};function ze({settings:p,content:u,styles:T,isEditor:l}){const[_,O]=g.useState(null),{widthSettings:I,fontSettings:v,letterSpacing:N,textAlign:z,wordSpacing:B,fontSizeLineHeight:x,textAppearance:w,color:W}=T.imageCaption??{},[m,F]=g.useState(void 0),[C,q]=g.useState(null),[S,D]=g.useState(0),[$,P]=g.useState(0),{direction:n,transition:a,controls:o,pagination:i,imageCaption:h,triggers:f}=p,A=g.useRef(a.type),{x:y,y:R}=p.controls.offset,b=r=>{_&&_.go(r)};return g.useEffect(()=>{if(!C)return;const r=new ResizeObserver(c=>{if(!_)return;const[j]=c;F({width:Math.round(j.contentRect.width),height:Math.round(j.contentRect.height)})});return r.observe(C),()=>r.unobserve(C)},[C]),g.useEffect(()=>{!_||A.current===a.type||(P(r=>r+1),A.current=a.type)},[a.type]),t.jsx("div",{className:d(e.wrapper,{[e.editor]:l}),ref:q,children:t.jsxs("div",{className:e.sliderInner,style:{width:m?m.width:"100%",height:m?m.height:"100%",backgroundColor:a.backgroundColor&&a.type==="fade in"?a.backgroundColor:"transparent"},children:[p.imageCaption.isActive&&t.jsx("div",{className:d(e.captionBlock),children:t.jsx("div",{className:e.captionTextWrapper,children:u.map((r,c)=>t.jsx("div",{className:d(e.captionText,Ne[h.alignment],{[e.withPointerEvents]:c===S&&l,[e.active]:c===S}),style:{fontFamily:U.normalizeFontFamilyCssValue(v.fontFamily),fontWeight:v.fontWeight,fontStyle:v.fontStyle,width:I.sizing==="auto"?"max-content":s.scalingValue(I.width,l),letterSpacing:s.scalingValue(N,l),wordSpacing:s.scalingValue(B,l),textAlign:z,fontSize:s.scalingValue(x.fontSize,l),lineHeight:s.scalingValue(x.lineHeight,l),textTransform:w.textTransform??"none",textDecoration:w.textDecoration??"none",fontVariant:w.fontVariant??"normal",color:W,transitionDuration:a.duration?`${Math.round(parseInt(a.duration)/2)}ms`:"500ms"},children:t.jsx("div",{"data-styles":"imageCaption",className:e.captionTextInner,style:{"--link-hover-color":h.linkHoverColor,"--link-color":h.linkColor,position:"relative",top:s.scalingValue(h.offset.y,l),left:s.scalingValue(h.offset.x,l)},children:t.jsx(M.RichTextRenderer,{content:r.imageCaption})})},c))})}),t.jsx(L.Splide2,{onMove:r=>{D(r.index)},ref:O,options:{arrows:!1,speed:a.duration?parseInt(a.duration):500,autoplay:f.autoPlay!==null,...f.autoPlay!==null&&{interval:parseInt(f.autoPlay)*1e3},direction:n==="horiz"||a.type==="fade in"?"ltr":"ttb",pagination:!1,drag:f.triggersList.drag,perPage:1,width:m?m.width:"100%",height:m?m.height:"100%",type:a.type==="fade in"?"fade":"loop",rewind:!0},children:u.map((r,c)=>t.jsx(L.SplideSlide,{children:t.jsx("div",{className:e.sliderItem,children:t.jsx("div",{className:e.imgWrapper,children:t.jsx("img",{className:d(e.sliderImage,{[e.contain]:r.image.objectFit==="contain",[e.cover]:r.image.objectFit==="cover"}),src:r.image.assetId,alt:r.image.name??""})})})},c))},$),o.isActive&&t.jsxs(t.Fragment,{children:[t.jsx("div",{className:d(e.arrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{onClick:()=>{b("-1")},className:e.arrowInner,style:{transform:`translate(${s.scalingValue(y,l)}, ${s.scalingValue(R*(n==="horiz"?1:-1),l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:d(e.arrowImg,e.mirror)}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg,e.mirror)})]})}),t.jsx("div",{className:d(e.arrow,e.nextArrow,{[e.arrowVertical]:n==="vert",[e.hoverArrow]:o.show==="on hover"}),style:{color:o.color,"--arrow-hover-color":o.hover},children:t.jsxs("button",{className:e.arrowInner,onClick:()=>b("+1"),style:{transform:`translate(${s.scalingValue(y*(n==="horiz"?-1:1),l)}, ${s.scalingValue(R,l)}) scale(${p.controls.scale/100}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:[o.arrowsImgUrl&&t.jsx(k.SvgImage,{url:o.arrowsImgUrl,fill:o.color,hoverFill:o.hover,className:e.arrowImg}),!o.arrowsImgUrl&&t.jsx(V,{color:o.color,className:d(e.arrowIcon,e.arrowImg)})]})})]}),f.triggersList.click&&t.jsx("div",{className:e.clickOverlay,onClick:()=>{_&&_.go("+1")}}),i.isActive&&t.jsx("div",{className:d(e.pagination,{[e.paginationInsideBottom]:i.position==="inside-1"&&n==="horiz",[e.paginationInsideTop]:i.position==="inside-2"&&n==="horiz",[e.paginationOutsideBottom]:i.position==="outside-1"&&n==="horiz",[e.paginationOutsideTop]:i.position==="outside-2"&&n==="horiz",[e.paginationInsideLeft]:i.position==="inside-1"&&n==="vert",[e.paginationInsideRight]:i.position==="inside-2"&&n==="vert",[e.paginationOutsideLeft]:i.position==="outside-1"&&n==="vert",[e.paginationOutsideRight]:i.position==="outside-2"&&n==="vert",[e.paginationVertical]:n==="vert"}),children:t.jsx("div",{className:e.paginationInner,style:{backgroundColor:i.colors[2],transform:`scale(${i.scale/100}) translate(${s.scalingValue(i.offset.x,l)}, ${s.scalingValue(i.offset.y,l)}) rotate(${n==="horiz"?"0deg":"90deg"})`},children:u.map((r,c)=>t.jsx("button",{onClick:()=>{_&&_.go(c)},className:d(e.paginationItem),children:t.jsx("div",{className:d(e.dot,{[e.activeDot]:c===S}),style:{backgroundColor:c===S?i.colors[0]:i.colors[1],"--pagination-hover-color":i.hover}})},c))})})]})})}function V({color:p,className:u}){return t.jsx("svg",{viewBox:"0 0 10 18",className:u,children:t.jsx("g",{id:"Symbols",stroke:"none",strokeWidth:"1",fillRule:"evenodd",children:t.jsx("path",{d:"M-3.70710678,4.29289322 C-3.34662282,3.93240926 -2.77939176,3.90467972 -2.38710056,4.20970461 L-2.29289322,4.29289322 L5,11.585 L12.2928932,4.29289322 C12.6533772,3.93240926 13.2206082,3.90467972 13.6128994,4.20970461 L13.7071068,4.29289322 C14.0675907,4.65337718 14.0953203,5.22060824 13.7902954,5.61289944 L13.7071068,5.70710678 L5.70710678,13.7071068 C5.34662282,14.0675907 4.77939176,14.0953203 4.38710056,13.7902954 L4.29289322,13.7071068 L-3.70710678,5.70710678 C-4.09763107,5.31658249 -4.09763107,4.68341751 -3.70710678,4.29289322 Z",id:"Shape-Copy",fill:p,transform:"translate(5, 9) rotate(-90) translate(-5, -9)"})})})}exports.ControlSlider=ze;
@@ -3,7 +3,7 @@ import { useState as f, useRef as Y, useEffect as O } from "react";
3
3
  import { S as q, a as K } from "./react-splide.esm-DQqds4PL.mjs";
4
4
  /* empty css */
5
5
  import c from "classnames";
6
- import { R as Q } from "./RichTextRenderer-BptwNpbJ.mjs";
6
+ import { R as Q } from "./RichTextRenderer-D52Xto59.mjs";
7
7
  import { s } from "./scalingValue-C9JH5L6O.mjs";
8
8
  import { S as N } from "./SvgImage-B5mR9y6q.mjs";
9
9
  import { n as Z } from "./textStylesToCss-05Mn6I_2.mjs";
@@ -6,7 +6,7 @@ import { b as Et } from "./buildColorVars-CLyWQm5K.mjs";
6
6
  import { u as Pt } from "./useScopedStyles-DhBG3557.mjs";
7
7
  import { o as J, t as U } from "./textStylesToCss-05Mn6I_2.mjs";
8
8
  import { S as to } from "./SvgImage-B5mR9y6q.mjs";
9
- import { R as oo } from "./RichTextRenderer-BptwNpbJ.mjs";
9
+ import { R as oo } from "./RichTextRenderer-D52Xto59.mjs";
10
10
  const X = 300, m = 4e-3, eo = {
11
11
  questionColor: "question-color",
12
12
  answerColor: "answer-color",
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),G=require("classnames"),p=require("./scalingValue-CSHYgTZl.js"),Kt=require("./buildColorVars-CE2D5cQV.js"),Yt=require("./useScopedStyles-Bf6yohVQ.js"),w=require("./textStylesToCss-CNN3zZTV.js"),Zt=require("./SvgImage-DFlmxAoL.js"),Jt=require("./RichTextRenderer-K90Dd7pt.js"),K=300,h=.004,Ut={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Xt=["hover","focus","filled","success","error"];function Et(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Y(t,r,n,s){return r!==void 0&&r<(t??.01)?`${n} ${s}`:n}function Z(t,r,n,s){const l=t??.01;return r===void 0||r>=l?{}:{[`--${n}-text-leading-gap`]:p.scalingValue((l-r)/2,s)}}function Pt(t){return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),m=require("react"),G=require("classnames"),p=require("./scalingValue-CSHYgTZl.js"),Kt=require("./buildColorVars-CE2D5cQV.js"),Yt=require("./useScopedStyles-Bf6yohVQ.js"),w=require("./textStylesToCss-CNN3zZTV.js"),Zt=require("./SvgImage-DFlmxAoL.js"),Jt=require("./RichTextRenderer-DEFXh5o6.js"),K=300,h=.004,Ut={questionColor:"question-color",answerColor:"answer-color",dividerColor:"divider-color",iconColor:"icon-color",questionHoverColor:"question-hover-color",iconHoverColor:"icon-hover-color",iconActiveColor:"icon-active-color",dividerHoverColor:"divider-hover-color"},Xt=["hover","focus","filled","success","error"];function Et(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function Y(t,r,n,s){return r!==void 0&&r<(t??.01)?`${n} ${s}`:n}function Z(t,r,n,s){const l=t??.01;return r===void 0||r>=l?{}:{[`--${n}-text-leading-gap`]:p.scalingValue((l-r)/2,s)}}function Pt(t){return`
2
2
  .${t}-wrapper {
3
3
  box-sizing: border-box;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Ft=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const p=require("./scalingValue-CSHYgTZl.js"),Jt=require("./buildColorVars-CE2D5cQV.js"),Qt=require("./useScopedStyles-Bf6yohVQ.js"),Mt=require("./useLazyVideos-CdCbc2j0.js"),ot=require("./LinkWrapper-Ca84iPtg.js"),q=require("./EmbedMediaFrame-DsOTKE4i.js"),r=require("react"),Zt=require("react-dom"),_e=require("./textStylesToCss-CNN3zZTV.js"),Pt=require("./SvgImage-DFlmxAoL.js"),At=require("./LazyVideo-imbU18js.js");function ei(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zt(e){return((e==null?void 0:e.trim().length)??0)>0}function wt(e,i,n,a){return i!==void 0&&i<(e??.01)?`${n} ${a}`:n}function bt(e,i,n,a){const l=e??.01;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:p.scalingValue((l-i)/2,a)}}function ti(e){return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Ft=require("./react-splide.esm-CabaEmHi.js");;/* empty css */const p=require("./scalingValue-CSHYgTZl.js"),Jt=require("./buildColorVars-CE2D5cQV.js"),Qt=require("./useScopedStyles-Bf6yohVQ.js"),Mt=require("./useLazyVideos-CdCbc2j0.js"),ot=require("./LinkWrapper-CTqM1ucO.js"),q=require("./EmbedMediaFrame-DsOTKE4i.js"),r=require("react"),Zt=require("react-dom"),_e=require("./textStylesToCss-CNN3zZTV.js"),Pt=require("./SvgImage-DFlmxAoL.js"),At=require("./LazyVideo-imbU18js.js");function ei(e){return`calc(var(--cntrl-article-width, 100vw) * ${e/1440})`}function zt(e){return((e==null?void 0:e.trim().length)??0)>0}function wt(e,i,n,a){return i!==void 0&&i<(e??.01)?`${n} ${a}`:n}function bt(e,i,n,a){const l=e??.01;return i===void 0||i>=l?{}:{[`--${n}-title-leading-gap`]:p.scalingValue((l-i)/2,a)}}function ti(e){return`
2
2
  .${e}-wrapper {
3
3
  display: grid;
4
4
  align-items: start;
@@ -5,7 +5,7 @@ import { s as g } from "./scalingValue-C9JH5L6O.mjs";
5
5
  import { b as si } from "./buildColorVars-CLyWQm5K.mjs";
6
6
  import { u as ai } from "./useScopedStyles-DhBG3557.mjs";
7
7
  import { u as Gt } from "./useLazyVideos-CxXyEjRQ.mjs";
8
- import { L as ut } from "./LinkWrapper-DZs9hlOn.mjs";
8
+ import { L as ut } from "./LinkWrapper-5kQHiGJQ.mjs";
9
9
  import { i as Oe, g as Et, E as qt, a as ci } from "./EmbedMediaFrame-DwHeOAy5.mjs";
10
10
  import { useMemo as Rt, useState as k, useRef as $, useEffect as H, useCallback as re, useLayoutEffect as jt } from "react";
11
11
  import { createPortal as di } from "react-dom";
@@ -1,6 +1,6 @@
1
1
  import { jsxs as K, jsx as M } from "react/jsx-runtime";
2
2
  import { useState as w, useRef as T, useEffect as W } from "react";
3
- import { L as U } from "./LinkWrapper-DZs9hlOn.mjs";
3
+ import { L as U } from "./LinkWrapper-5kQHiGJQ.mjs";
4
4
  const V = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", Z = "ImageRevealSlider-module__image___Qjt-e", ee = "ImageRevealSlider-module__link___N-iLG", te = "ImageRevealSlider-module__cursor___2U03d", p = {
5
5
  imageRevealSlider: V,
6
6
  image: Z,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),r=require("react"),J=require("./LinkWrapper-Ca84iPtg.js"),K="ImageRevealSlider-module__imageRevealSlider___UE5Ob",U="ImageRevealSlider-module__image___Qjt-e",V="ImageRevealSlider-module__link___N-iLG",Z="ImageRevealSlider-module__cursor___2U03d",p={imageRevealSlider:K,image:U,link:V,cursor:Z};function T(c,l,g){for(const t of g){const a=new Image;a.src=t.assetId;const u=t.width?Number.parseFloat(t.width):a.naturalWidth,o=a.naturalHeight/a.naturalWidth*u,S=u/2,v=o/2;if(c>=t.x-S&&c<=t.x+S&&l>=t.y-v&&l<=t.y+v)return!0}return!1}function P(c){return new Promise(l=>{const g=new Image;g.src=c,g.onload=()=>{l({width:g.naturalWidth,height:g.naturalHeight})}})}async function ee(c,l,g,t){let a,u;if(l==="custom"){a=g;const o=await P(c);u=o.height/o.width*a}else if(l==="random"){a=Math.random()*(t.max-t.min)+t.min;const o=await P(c);u=o.height/o.width*a}else{const o=await P(c);a=o.width,u=o.height}return{width:a,height:u,finalWidth:`${a}px`}}function te({settings:c,content:l,isEditor:g}){const[t,a]=r.useState(null),[u,o]=r.useState([]),[S,v]=r.useState(0),G=r.useRef(0),[E,Q]=r.useState({x:0,y:0}),[A,y]=r.useState(1),[W,C]=r.useState("none"),b=r.useRef({x:0,y:0}),[I,L]=r.useState(!1),{sizeType:N,imageWidth:$,randomRangeImageWidth:z}=c.imageSize,{revealPosition:_,visible:j}=c.position,{cursorType:H,target:R,defaultCursorScale:O,defaultCursor:X,hoverCursorScale:Y,hoverCursor:q}=c.cursor;r.useEffect(()=>{if(!t)return;const e=(s,h)=>{const i=t.getBoundingClientRect(),w=s-i.left,f=h-i.top;if(Q({x:w,y:f}),H==="system"){C("none"),y(1);return}const m=w,k=f,M=document.elementFromPoint(i.left+m,i.top+k);if(M&&M.closest("a")){C("none"),y(1);return}const F=T(m,k,u)||R==="area"?{img:q??"none",scale:Y}:{img:X??"none",scale:O};C(F.img),y(F.scale)},n=s=>{s.stopPropagation(),b.current={x:s.clientX,y:s.clientY},e(s.clientX,s.clientY)},d=()=>{I&&e(b.current.x,b.current.y)};return t.addEventListener("mousemove",n),window.addEventListener("scroll",d,!0),()=>{t.removeEventListener("mousemove",n),window.removeEventListener("scroll",d,!0)}},[t,I,E,H,R,q,X,Y,O,u]),r.useEffect(()=>{I||(C("none"),y(0))},[I]);const B=async(e,n,d,s={})=>{const{width:h,height:i,finalWidth:w}=await ee(e.image.assetId,N,$,z);let f=0,m=0;_==="same"?(f=n/2,m=d/2):(f=s.x??Math.random()*n,m=s.y??Math.random()*d);const k=Math.min(Math.max(f,h/2),n-h/2),M=Math.min(Math.max(m,i/2),d-i/2);return{id:G.current++,assetId:e.image.assetId,link:e.link,name:e.image.name,x:k,y:M,width:w}};r.useEffect(()=>{if(!t||l.length===0)return;const e=t.getBoundingClientRect(),n=e.width,d=e.height,s=[];(async()=>{const i=l[0],w=await B(i,n,d);s.push(w),o(s),v(1)})()},[N,$,z,_,t]),r.useEffect(()=>{j==="last One"&&o(e=>e.length>0?[e[e.length-1]]:[])},[j]);const D=async e=>{if(!t)return;const n=t.getBoundingClientRect(),d=e.clientX-n.left,s=e.clientY-n.top;if(R==="image"&&!T(d,s,u))return;let h=0,i=0;_==="on Click"?(h=d,i=s):_==="same"?(h=n.width/2,i=n.height/2):(h=Math.random()*n.width,i=Math.random()*n.height);const w=l[S],f=await B(w,n.width,n.height,{x:h,y:i});o(m=>j==="all"?[...m,f]:[f]),v(m=>m>=l.length-1?0:m+1)};return x.jsxs("div",{ref:a,onClick:D,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:p.imageRevealSlider,style:{cursor:W==="none"?"default":"none"},children:[u.map(e=>x.jsx("div",{className:p.wrapper,style:{top:`${e.y}px`,left:`${e.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:e.width??"auto",height:"auto",cursor:W==="none"?"default":"none"},children:x.jsx(J.LinkWrapper,{link:R==="area"?e.link:void 0,className:p.link,children:x.jsx("img",{src:e.assetId,alt:e.name,className:p.image},e.id)})},e.id)),I&&x.jsx("div",{className:p.cursor,style:{left:`${E.x}px`,top:`${E.y}px`,transform:`translate(-50%, -50%) scale(${A})`,backgroundImage:`url('${W}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}exports.ImageRevealSlider=te;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("react/jsx-runtime"),r=require("react"),J=require("./LinkWrapper-CTqM1ucO.js"),K="ImageRevealSlider-module__imageRevealSlider___UE5Ob",U="ImageRevealSlider-module__image___Qjt-e",V="ImageRevealSlider-module__link___N-iLG",Z="ImageRevealSlider-module__cursor___2U03d",p={imageRevealSlider:K,image:U,link:V,cursor:Z};function T(c,l,g){for(const t of g){const a=new Image;a.src=t.assetId;const u=t.width?Number.parseFloat(t.width):a.naturalWidth,o=a.naturalHeight/a.naturalWidth*u,S=u/2,v=o/2;if(c>=t.x-S&&c<=t.x+S&&l>=t.y-v&&l<=t.y+v)return!0}return!1}function P(c){return new Promise(l=>{const g=new Image;g.src=c,g.onload=()=>{l({width:g.naturalWidth,height:g.naturalHeight})}})}async function ee(c,l,g,t){let a,u;if(l==="custom"){a=g;const o=await P(c);u=o.height/o.width*a}else if(l==="random"){a=Math.random()*(t.max-t.min)+t.min;const o=await P(c);u=o.height/o.width*a}else{const o=await P(c);a=o.width,u=o.height}return{width:a,height:u,finalWidth:`${a}px`}}function te({settings:c,content:l,isEditor:g}){const[t,a]=r.useState(null),[u,o]=r.useState([]),[S,v]=r.useState(0),G=r.useRef(0),[E,Q]=r.useState({x:0,y:0}),[A,y]=r.useState(1),[W,C]=r.useState("none"),b=r.useRef({x:0,y:0}),[I,L]=r.useState(!1),{sizeType:N,imageWidth:$,randomRangeImageWidth:z}=c.imageSize,{revealPosition:_,visible:j}=c.position,{cursorType:H,target:R,defaultCursorScale:O,defaultCursor:X,hoverCursorScale:Y,hoverCursor:q}=c.cursor;r.useEffect(()=>{if(!t)return;const e=(s,h)=>{const i=t.getBoundingClientRect(),w=s-i.left,f=h-i.top;if(Q({x:w,y:f}),H==="system"){C("none"),y(1);return}const m=w,k=f,M=document.elementFromPoint(i.left+m,i.top+k);if(M&&M.closest("a")){C("none"),y(1);return}const F=T(m,k,u)||R==="area"?{img:q??"none",scale:Y}:{img:X??"none",scale:O};C(F.img),y(F.scale)},n=s=>{s.stopPropagation(),b.current={x:s.clientX,y:s.clientY},e(s.clientX,s.clientY)},d=()=>{I&&e(b.current.x,b.current.y)};return t.addEventListener("mousemove",n),window.addEventListener("scroll",d,!0),()=>{t.removeEventListener("mousemove",n),window.removeEventListener("scroll",d,!0)}},[t,I,E,H,R,q,X,Y,O,u]),r.useEffect(()=>{I||(C("none"),y(0))},[I]);const B=async(e,n,d,s={})=>{const{width:h,height:i,finalWidth:w}=await ee(e.image.assetId,N,$,z);let f=0,m=0;_==="same"?(f=n/2,m=d/2):(f=s.x??Math.random()*n,m=s.y??Math.random()*d);const k=Math.min(Math.max(f,h/2),n-h/2),M=Math.min(Math.max(m,i/2),d-i/2);return{id:G.current++,assetId:e.image.assetId,link:e.link,name:e.image.name,x:k,y:M,width:w}};r.useEffect(()=>{if(!t||l.length===0)return;const e=t.getBoundingClientRect(),n=e.width,d=e.height,s=[];(async()=>{const i=l[0],w=await B(i,n,d);s.push(w),o(s),v(1)})()},[N,$,z,_,t]),r.useEffect(()=>{j==="last One"&&o(e=>e.length>0?[e[e.length-1]]:[])},[j]);const D=async e=>{if(!t)return;const n=t.getBoundingClientRect(),d=e.clientX-n.left,s=e.clientY-n.top;if(R==="image"&&!T(d,s,u))return;let h=0,i=0;_==="on Click"?(h=d,i=s):_==="same"?(h=n.width/2,i=n.height/2):(h=Math.random()*n.width,i=Math.random()*n.height);const w=l[S],f=await B(w,n.width,n.height,{x:h,y:i});o(m=>j==="all"?[...m,f]:[f]),v(m=>m>=l.length-1?0:m+1)};return x.jsxs("div",{ref:a,onClick:D,onMouseEnter:()=>L(!0),onMouseLeave:()=>L(!1),className:p.imageRevealSlider,style:{cursor:W==="none"?"default":"none"},children:[u.map(e=>x.jsx("div",{className:p.wrapper,style:{top:`${e.y}px`,left:`${e.x}px`,position:"absolute",transform:"translate(-50%, -50%)",width:e.width??"auto",height:"auto",cursor:W==="none"?"default":"none"},children:x.jsx(J.LinkWrapper,{link:R==="area"?e.link:void 0,className:p.link,children:x.jsx("img",{src:e.assetId,alt:e.name,className:p.image},e.id)})},e.id)),I&&x.jsx("div",{className:p.cursor,style:{left:`${E.x}px`,top:`${E.y}px`,transform:`translate(-50%, -50%) scale(${A})`,backgroundImage:`url('${W}')`,backgroundSize:"cover",backgroundPosition:"center",position:"absolute",pointerEvents:"none"}})]})}exports.ImageRevealSlider=te;
@@ -5,7 +5,7 @@ import { s as d } from "./scalingValue-C9JH5L6O.mjs";
5
5
  import { S as se } from "./SvgImage-B5mR9y6q.mjs";
6
6
  import N from "classnames";
7
7
  import { S as We, a as Ve } from "./react-splide.esm-DQqds4PL.mjs";
8
- import { R as De } from "./RichTextRenderer-BptwNpbJ.mjs";
8
+ import { R as De } from "./RichTextRenderer-D52Xto59.mjs";
9
9
  import { b as ve, g as be } from "./getImageRect-CBMhFNHM.mjs";
10
10
  import { g as we } from "./getColorAlpha-BVBY0N5x.mjs";
11
11
  import { n as Xe } from "./textStylesToCss-05Mn6I_2.mjs";