@mission-studio/puck 1.0.21 → 1.0.23

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.
@@ -0,0 +1,2126 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // components/page/astro/index.ts
21
+ var astro_exports = {};
22
+ __export(astro_exports, {
23
+ Button: () => Button,
24
+ Card: () => Card,
25
+ Columns: () => Columns,
26
+ Container: () => Container,
27
+ CustomImage: () => CustomImage,
28
+ Divider: () => Divider,
29
+ FeatureGrid: () => FeatureGrid,
30
+ FeaturesList: () => FeaturesList,
31
+ Footer: () => Footer,
32
+ Heading: () => Heading,
33
+ Icon: () => Icon,
34
+ Image: () => Image,
35
+ ImageCarousel: () => ImageCarousel,
36
+ Paragraph: () => Paragraph,
37
+ Popup: () => Popup,
38
+ Section: () => Section,
39
+ Spacer: () => Spacer,
40
+ TextBlock: () => TextBlock,
41
+ Topbar: () => Topbar,
42
+ VideoEmbed: () => VideoEmbed,
43
+ availableIcons: () => availableIcons
44
+ });
45
+ module.exports = __toCommonJS(astro_exports);
46
+
47
+ // components/page/primitives/Heading.ts
48
+ var headingSizeMap = {
49
+ xs: "0.875rem",
50
+ sm: "1rem",
51
+ md: "1.25rem",
52
+ lg: "1.5rem",
53
+ xl: "2rem",
54
+ "2xl": "2.5rem",
55
+ "3xl": "3rem",
56
+ "4xl": "4rem"
57
+ };
58
+ var headingWeightMap = {
59
+ normal: 400,
60
+ medium: 500,
61
+ semibold: 600,
62
+ bold: 700,
63
+ extrabold: 800
64
+ };
65
+ var headingLetterSpacingMap = {
66
+ tight: "-0.025em",
67
+ normal: "0",
68
+ wide: "0.05em"
69
+ };
70
+ var headingLineHeightMap = {
71
+ tight: "1.1",
72
+ normal: "1.4",
73
+ relaxed: "1.6"
74
+ };
75
+ function getHeadingStyle(props) {
76
+ return {
77
+ fontSize: headingSizeMap[props.size],
78
+ fontWeight: headingWeightMap[props.weight],
79
+ color: props.color,
80
+ textAlign: props.align,
81
+ letterSpacing: headingLetterSpacingMap[props.letterSpacing],
82
+ lineHeight: headingLineHeightMap[props.lineHeight],
83
+ margin: 0
84
+ };
85
+ }
86
+
87
+ // components/page/astro/Heading.tsx
88
+ var import_jsx_runtime = require("react/jsx-runtime");
89
+ function Heading({
90
+ text,
91
+ level = "h2",
92
+ size = "2xl",
93
+ weight = "bold",
94
+ color = "rgba(0, 0, 0, 1)",
95
+ align = "left",
96
+ letterSpacing = "normal",
97
+ lineHeight = "tight",
98
+ id
99
+ }) {
100
+ const resolvedText = text || "";
101
+ const Tag = level;
102
+ const style = getHeadingStyle({
103
+ size,
104
+ weight,
105
+ color,
106
+ align,
107
+ letterSpacing,
108
+ lineHeight
109
+ });
110
+ if (!resolvedText) return null;
111
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Tag, { id, style, children: resolvedText });
112
+ }
113
+
114
+ // components/page/primitives/Paragraph.ts
115
+ var paragraphSizeMap = {
116
+ sm: "0.875rem",
117
+ base: "1rem",
118
+ lg: "1.125rem",
119
+ xl: "1.25rem"
120
+ };
121
+ var paragraphWeightMap = {
122
+ normal: 400,
123
+ medium: 500,
124
+ semibold: 600
125
+ };
126
+ var paragraphLineHeightMap = {
127
+ tight: "1.4",
128
+ normal: "1.6",
129
+ relaxed: "1.75",
130
+ loose: "2"
131
+ };
132
+ function getParagraphStyle(props) {
133
+ return {
134
+ fontSize: paragraphSizeMap[props.size],
135
+ fontWeight: paragraphWeightMap[props.weight],
136
+ color: props.color,
137
+ textAlign: props.align,
138
+ lineHeight: paragraphLineHeightMap[props.lineHeight],
139
+ maxWidth: props.maxWidth || void 0,
140
+ margin: 0
141
+ };
142
+ }
143
+
144
+ // components/page/astro/Paragraph.tsx
145
+ var import_jsx_runtime2 = require("react/jsx-runtime");
146
+ function Paragraph({
147
+ text,
148
+ size = "base",
149
+ weight = "normal",
150
+ color = "rgba(0, 0, 0, 1)",
151
+ align = "left",
152
+ lineHeight = "normal",
153
+ maxWidth,
154
+ id
155
+ }) {
156
+ const resolvedText = text || "";
157
+ const style = getParagraphStyle({
158
+ size,
159
+ weight,
160
+ color,
161
+ align,
162
+ lineHeight,
163
+ maxWidth
164
+ });
165
+ if (!resolvedText) return null;
166
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { id, style, children: resolvedText });
167
+ }
168
+
169
+ // entries/context.tsx
170
+ var import_react = require("react");
171
+ var import_jsx_runtime3 = require("react/jsx-runtime");
172
+ var EntriesContext = (0, import_react.createContext)(null);
173
+ function useEntries() {
174
+ const context = (0, import_react.useContext)(EntriesContext);
175
+ if (!context) {
176
+ return {
177
+ entries: [],
178
+ entryNames: [],
179
+ getEntry: () => void 0,
180
+ getEntryValue: () => void 0
181
+ };
182
+ }
183
+ return context;
184
+ }
185
+
186
+ // hooks/useGtmEvent.ts
187
+ function useGtmEvent() {
188
+ return (eventName, data) => {
189
+ if (typeof window === "undefined") return;
190
+ if (typeof window.gtag === "function") {
191
+ window.gtag("event", eventName, data || {});
192
+ }
193
+ };
194
+ }
195
+
196
+ // hooks/useUtmParams.ts
197
+ var import_react2 = require("react");
198
+ function useUtmParams() {
199
+ const [utmParams, setUtmParams] = (0, import_react2.useState)({});
200
+ (0, import_react2.useEffect)(() => {
201
+ if (typeof window === "undefined") return;
202
+ const urlParams = new URLSearchParams(window.location.search);
203
+ const source = urlParams.get("utm_source");
204
+ const medium = urlParams.get("utm_medium");
205
+ const campaign = urlParams.get("utm_campaign");
206
+ const content = urlParams.get("utm_content");
207
+ const term = urlParams.get("utm_term");
208
+ const params = {};
209
+ if (source) {
210
+ params.source = source;
211
+ sessionStorage.setItem("utm_source", source);
212
+ } else {
213
+ const stored = sessionStorage.getItem("utm_source");
214
+ if (stored) params.source = stored;
215
+ }
216
+ if (medium) {
217
+ params.medium = medium;
218
+ sessionStorage.setItem("utm_medium", medium);
219
+ } else {
220
+ const stored = sessionStorage.getItem("utm_medium");
221
+ if (stored) params.medium = stored;
222
+ }
223
+ if (campaign) {
224
+ params.campaign = campaign;
225
+ sessionStorage.setItem("utm_campaign", campaign);
226
+ } else {
227
+ const stored = sessionStorage.getItem("utm_campaign");
228
+ if (stored) params.campaign = stored;
229
+ }
230
+ if (content) {
231
+ params.content = content;
232
+ sessionStorage.setItem("utm_content", content);
233
+ } else {
234
+ const stored = sessionStorage.getItem("utm_content");
235
+ if (stored) params.content = stored;
236
+ }
237
+ if (term) {
238
+ params.term = term;
239
+ sessionStorage.setItem("utm_term", term);
240
+ } else {
241
+ const stored = sessionStorage.getItem("utm_term");
242
+ if (stored) params.term = stored;
243
+ }
244
+ setUtmParams(params);
245
+ }, []);
246
+ return utmParams;
247
+ }
248
+
249
+ // theme/context.tsx
250
+ var import_react3 = require("react");
251
+
252
+ // theme/defaults.ts
253
+ var DEFAULT_THEME = {
254
+ id: "default",
255
+ name: "Default Theme",
256
+ colors: {
257
+ primary: { color: "#3B82F6", opacity: 100 },
258
+ secondary: { color: "#8B5CF6", opacity: 100 },
259
+ accent: { color: "#10B981", opacity: 100 },
260
+ background: { color: "#FFFFFF", opacity: 100 },
261
+ foreground: { color: "#111827", opacity: 100 },
262
+ muted: { color: "#F3F4F6", opacity: 100 }
263
+ },
264
+ typography: {
265
+ fontFamily: {
266
+ heading: "system-ui, sans-serif",
267
+ body: "system-ui, sans-serif"
268
+ },
269
+ fontSize: {
270
+ base: "base",
271
+ heading: "4xl"
272
+ },
273
+ fontWeight: {
274
+ normal: 400,
275
+ heading: 700
276
+ }
277
+ },
278
+ spacing: {
279
+ xs: 8,
280
+ sm: 12,
281
+ md: 16,
282
+ lg: 24,
283
+ xl: 32
284
+ },
285
+ borders: {
286
+ radiusSmall: 4,
287
+ radiusMedium: 8,
288
+ radiusLarge: 16
289
+ },
290
+ shadows: {
291
+ small: "sm",
292
+ medium: "md",
293
+ large: "lg"
294
+ }
295
+ };
296
+
297
+ // theme/context.tsx
298
+ var import_jsx_runtime4 = require("react/jsx-runtime");
299
+ var ThemeContext = (0, import_react3.createContext)(null);
300
+ function useTheme() {
301
+ const context = (0, import_react3.useContext)(ThemeContext);
302
+ if (!context) {
303
+ return {
304
+ theme: DEFAULT_THEME,
305
+ resolveColor: (key) => DEFAULT_THEME.colors[key],
306
+ resolveSpacing: (key) => DEFAULT_THEME.spacing[key],
307
+ resolveBorderRadius: (key) => DEFAULT_THEME.borders[key],
308
+ resolveShadow: (key) => DEFAULT_THEME.shadows[key]
309
+ };
310
+ }
311
+ return context;
312
+ }
313
+
314
+ // utils/index.ts
315
+ var import_tailwind_merge = require("tailwind-merge");
316
+ var import_clsx = require("clsx");
317
+ function hexToRgba(hex, opacity) {
318
+ if (hex.startsWith("rgba(")) {
319
+ const rgbaMatch = hex.match(
320
+ /rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*[\d.]+)?\)/
321
+ );
322
+ if (rgbaMatch) {
323
+ return `rgba(${rgbaMatch[1]}, ${rgbaMatch[2]}, ${rgbaMatch[3]}, ${opacity / 100})`;
324
+ }
325
+ }
326
+ if (hex.startsWith("rgb(")) {
327
+ const rgbMatch = hex.match(/rgb\((\d+),\s*(\d+),\s*(\d+)\)/);
328
+ if (rgbMatch) {
329
+ return `rgba(${rgbMatch[1]}, ${rgbMatch[2]}, ${rgbMatch[3]}, ${opacity / 100})`;
330
+ }
331
+ }
332
+ const sanitized = hex.replace("#", "");
333
+ const r = parseInt(sanitized.slice(0, 2), 16);
334
+ const g = parseInt(sanitized.slice(2, 4), 16);
335
+ const b = parseInt(sanitized.slice(4, 6), 16);
336
+ return `rgba(${r}, ${g}, ${b}, ${opacity / 100})`;
337
+ }
338
+ function cn(...inputs) {
339
+ return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
340
+ }
341
+
342
+ // components/page/Button.tsx
343
+ var import_jsx_runtime5 = require("react/jsx-runtime");
344
+ var sizeStyles = {
345
+ sm: { padding: "8px 16px", fontSize: "0.875rem" },
346
+ md: { padding: "12px 24px", fontSize: "1rem" },
347
+ lg: { padding: "16px 32px", fontSize: "1.125rem" },
348
+ xl: { padding: "20px 40px", fontSize: "1.25rem" }
349
+ };
350
+ var radiusMap = {
351
+ none: "0",
352
+ sm: "4px",
353
+ md: "8px",
354
+ lg: "16px",
355
+ full: "9999px"
356
+ };
357
+ function isThemeableValue(value) {
358
+ return typeof value === "object" && value !== null && "useTheme" in value;
359
+ }
360
+ function isEntryBoundValue(value) {
361
+ return typeof value === "object" && value !== null && "useEntry" in value;
362
+ }
363
+ function Button({
364
+ text,
365
+ href,
366
+ target = "_self",
367
+ variant = "solid",
368
+ size = "md",
369
+ color,
370
+ textColor,
371
+ borderRadius = "md",
372
+ fullWidth = false,
373
+ align = "center",
374
+ id
375
+ }) {
376
+ const { resolveColor: resolveColor2 } = useTheme();
377
+ const { getEntryValue } = useEntries();
378
+ const utm = useUtmParams();
379
+ const sendEvent = useGtmEvent();
380
+ const resolvedText = (() => {
381
+ if (!text) return "Button";
382
+ if (typeof text === "string") return text;
383
+ if (isEntryBoundValue(text)) {
384
+ if (text.useEntry) {
385
+ return String(getEntryValue(text.entryName, text.fieldKey) ?? "Button");
386
+ }
387
+ return text.value;
388
+ }
389
+ return "Button";
390
+ })();
391
+ const handleClick = () => {
392
+ const sessionId = typeof window !== "undefined" ? sessionStorage.getItem("session_id") : null;
393
+ sendEvent("button_click", {
394
+ text: resolvedText,
395
+ href: href || void 0,
396
+ variant,
397
+ session_id: sessionId,
398
+ ...utm
399
+ });
400
+ };
401
+ const resolvedColor = (() => {
402
+ if (!color) return resolveColor2("primary");
403
+ if (typeof color === "string") return { color, opacity: 100 };
404
+ if (isThemeableValue(color)) {
405
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
406
+ }
407
+ if ("color" in color) return color;
408
+ return resolveColor2("primary");
409
+ })();
410
+ const resolvedTextColor = (() => {
411
+ if (!textColor) {
412
+ if (variant === "solid") return { color: "#FFFFFF", opacity: 100 };
413
+ return resolvedColor;
414
+ }
415
+ if (typeof textColor === "string")
416
+ return { color: textColor, opacity: 100 };
417
+ if (isThemeableValue(textColor)) {
418
+ return textColor.useTheme ? resolveColor2(textColor.themeKey) : textColor.value;
419
+ }
420
+ if ("color" in textColor) return textColor;
421
+ return { color: "#FFFFFF", opacity: 100 };
422
+ })();
423
+ const bgColor = hexToRgba(resolvedColor.color, resolvedColor.opacity);
424
+ const fgColor = hexToRgba(resolvedTextColor.color, resolvedTextColor.opacity);
425
+ const baseStyle = {
426
+ ...sizeStyles[size],
427
+ borderRadius: radiusMap[borderRadius],
428
+ fontWeight: 600,
429
+ cursor: "pointer",
430
+ display: "inline-flex",
431
+ alignItems: "center",
432
+ justifyContent: "center",
433
+ textDecoration: "none",
434
+ transition: "opacity 0.2s, transform 0.2s",
435
+ width: fullWidth ? "100%" : "auto",
436
+ border: "none"
437
+ };
438
+ const variantStyles = {
439
+ solid: {
440
+ backgroundColor: bgColor,
441
+ color: fgColor
442
+ },
443
+ outline: {
444
+ backgroundColor: "transparent",
445
+ color: bgColor,
446
+ border: `2px solid ${bgColor}`
447
+ },
448
+ ghost: {
449
+ backgroundColor: "transparent",
450
+ color: bgColor
451
+ },
452
+ link: {
453
+ backgroundColor: "transparent",
454
+ color: bgColor,
455
+ padding: "0",
456
+ textDecoration: "underline"
457
+ }
458
+ };
459
+ const style = { ...baseStyle, ...variantStyles[variant] };
460
+ const wrapperStyle = {
461
+ display: "flex",
462
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
463
+ };
464
+ const content = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { style, children: resolvedText });
465
+ if (href) {
466
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
467
+ "a",
468
+ {
469
+ id,
470
+ href,
471
+ target,
472
+ style,
473
+ rel: target === "_blank" ? "noopener noreferrer" : void 0,
474
+ onClick: handleClick,
475
+ children: resolvedText
476
+ }
477
+ ) });
478
+ }
479
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { id, type: "button", style, onClick: handleClick, children: resolvedText }) });
480
+ }
481
+
482
+ // components/page/Image.tsx
483
+ var import_jsx_runtime6 = require("react/jsx-runtime");
484
+ var widthMap = {
485
+ auto: "auto",
486
+ full: "100%",
487
+ sm: "300px",
488
+ md: "500px",
489
+ lg: "700px",
490
+ xl: "900px"
491
+ };
492
+ var aspectRatioMap = {
493
+ auto: void 0,
494
+ "1:1": "1 / 1",
495
+ "4:3": "4 / 3",
496
+ "16:9": "16 / 9",
497
+ "21:9": "21 / 9"
498
+ };
499
+ var radiusMap2 = {
500
+ none: "0",
501
+ sm: "4px",
502
+ md: "8px",
503
+ lg: "16px",
504
+ xl: "24px",
505
+ full: "9999px"
506
+ };
507
+ var shadowMap = {
508
+ none: "none",
509
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
510
+ md: "0 4px 6px rgba(0,0,0,0.1)",
511
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
512
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
513
+ };
514
+ function isThemeableValue2(value) {
515
+ return typeof value === "object" && value !== null && "useTheme" in value;
516
+ }
517
+ function isEntryBoundValue2(value) {
518
+ return typeof value === "object" && value !== null && "useEntry" in value;
519
+ }
520
+ function Image({
521
+ src,
522
+ alt = "",
523
+ width = "full",
524
+ aspectRatio = "auto",
525
+ objectFit = "cover",
526
+ borderRadius = "none",
527
+ shadow = "none",
528
+ align = "center",
529
+ caption,
530
+ captionColor,
531
+ id
532
+ }) {
533
+ const { resolveColor: resolveColor2 } = useTheme();
534
+ const { getEntryValue } = useEntries();
535
+ const resolvedSrc = (() => {
536
+ if (!src) return "";
537
+ if (typeof src === "string") return src;
538
+ if (isEntryBoundValue2(src)) {
539
+ if (src.useEntry) {
540
+ return String(getEntryValue(src.entryName, src.fieldKey) ?? "");
541
+ }
542
+ return src.value;
543
+ }
544
+ return "";
545
+ })();
546
+ const resolvedCaption = (() => {
547
+ if (!caption) return "";
548
+ if (typeof caption === "string") return caption;
549
+ if (isEntryBoundValue2(caption)) {
550
+ if (caption.useEntry) {
551
+ return String(getEntryValue(caption.entryName, caption.fieldKey) ?? "");
552
+ }
553
+ return caption.value;
554
+ }
555
+ return "";
556
+ })();
557
+ const resolvedCaptionColor = (() => {
558
+ if (!captionColor) return resolveColor2("muted");
559
+ if (typeof captionColor === "string")
560
+ return { color: captionColor, opacity: 100 };
561
+ if (isThemeableValue2(captionColor)) {
562
+ return captionColor.useTheme ? resolveColor2(captionColor.themeKey) : captionColor.value;
563
+ }
564
+ if ("color" in captionColor) return captionColor;
565
+ return resolveColor2("muted");
566
+ })();
567
+ const wrapperStyle = {
568
+ display: "flex",
569
+ flexDirection: "column",
570
+ alignItems: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
571
+ gap: "8px"
572
+ };
573
+ const imageStyle = {
574
+ width: widthMap[width],
575
+ maxWidth: "100%",
576
+ aspectRatio: aspectRatioMap[aspectRatio],
577
+ objectFit,
578
+ borderRadius: radiusMap2[borderRadius],
579
+ boxShadow: shadowMap[shadow],
580
+ display: "block"
581
+ };
582
+ const captionStyle = {
583
+ fontSize: "0.875rem",
584
+ color: hexToRgba(resolvedCaptionColor.color, resolvedCaptionColor.opacity),
585
+ textAlign: align,
586
+ maxWidth: widthMap[width]
587
+ };
588
+ if (!resolvedSrc) {
589
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
590
+ "div",
591
+ {
592
+ style: {
593
+ ...imageStyle,
594
+ backgroundColor: "#e5e7eb",
595
+ display: "flex",
596
+ alignItems: "center",
597
+ justifyContent: "center",
598
+ minHeight: "200px",
599
+ color: "#9ca3af"
600
+ },
601
+ children: "No image"
602
+ }
603
+ ) });
604
+ }
605
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("figure", { id, style: { ...wrapperStyle, margin: 0 }, children: [
606
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("img", { src: resolvedSrc, alt, style: imageStyle, loading: "lazy" }),
607
+ resolvedCaption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("figcaption", { style: captionStyle, children: resolvedCaption })
608
+ ] });
609
+ }
610
+
611
+ // components/page/ImageCarousel.tsx
612
+ var import_react4 = require("react");
613
+ var import_jsx_runtime7 = require("react/jsx-runtime");
614
+ var aspectRatioMap2 = {
615
+ "16:9": "16 / 9",
616
+ "4:3": "4 / 3",
617
+ "1:1": "1 / 1",
618
+ "21:9": "21 / 9"
619
+ };
620
+ var radiusMap3 = {
621
+ none: "0",
622
+ sm: "4px",
623
+ md: "8px",
624
+ lg: "16px"
625
+ };
626
+ function isThemeableValue3(value) {
627
+ return typeof value === "object" && value !== null && "useTheme" in value;
628
+ }
629
+ function ImageCarousel({
630
+ images = [],
631
+ aspectRatio = "16:9",
632
+ borderRadius = "none",
633
+ showDots = true,
634
+ showArrows = true,
635
+ arrowColor,
636
+ dotColor,
637
+ id
638
+ }) {
639
+ const [currentIndex, setCurrentIndex] = (0, import_react4.useState)(0);
640
+ const { resolveColor: resolveColor2 } = useTheme();
641
+ const utm = useUtmParams();
642
+ const sendEvent = useGtmEvent();
643
+ const resolvedArrowColor = (() => {
644
+ if (!arrowColor) return { color: "#FFFFFF", opacity: 100 };
645
+ if (typeof arrowColor === "string")
646
+ return { color: arrowColor, opacity: 100 };
647
+ if (isThemeableValue3(arrowColor)) {
648
+ return arrowColor.useTheme ? resolveColor2(arrowColor.themeKey) : arrowColor.value;
649
+ }
650
+ if ("color" in arrowColor) return arrowColor;
651
+ return { color: "#FFFFFF", opacity: 100 };
652
+ })();
653
+ const resolvedDotColor = (() => {
654
+ if (!dotColor) return resolveColor2("primary");
655
+ if (typeof dotColor === "string") return { color: dotColor, opacity: 100 };
656
+ if (isThemeableValue3(dotColor)) {
657
+ return dotColor.useTheme ? resolveColor2(dotColor.themeKey) : dotColor.value;
658
+ }
659
+ if ("color" in dotColor) return dotColor;
660
+ return resolveColor2("primary");
661
+ })();
662
+ const goToPrevious = () => {
663
+ const newIndex = currentIndex === 0 ? images.length - 1 : currentIndex - 1;
664
+ setCurrentIndex(newIndex);
665
+ sendEvent("carousel_navigate", {
666
+ direction: "previous",
667
+ slideIndex: newIndex,
668
+ totalSlides: images.length,
669
+ ...utm
670
+ });
671
+ };
672
+ const goToNext = () => {
673
+ const newIndex = currentIndex === images.length - 1 ? 0 : currentIndex + 1;
674
+ setCurrentIndex(newIndex);
675
+ sendEvent("carousel_navigate", {
676
+ direction: "next",
677
+ slideIndex: newIndex,
678
+ totalSlides: images.length,
679
+ ...utm
680
+ });
681
+ };
682
+ const goToSlide = (index) => {
683
+ setCurrentIndex(index);
684
+ sendEvent("carousel_navigate", {
685
+ direction: "direct",
686
+ slideIndex: index,
687
+ totalSlides: images.length,
688
+ ...utm
689
+ });
690
+ };
691
+ if (images.length === 0) {
692
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
693
+ "div",
694
+ {
695
+ style: {
696
+ aspectRatio: aspectRatioMap2[aspectRatio],
697
+ backgroundColor: "#e5e7eb",
698
+ borderRadius: radiusMap3[borderRadius],
699
+ display: "flex",
700
+ alignItems: "center",
701
+ justifyContent: "center",
702
+ color: "#9ca3af"
703
+ },
704
+ children: "No images"
705
+ }
706
+ );
707
+ }
708
+ const containerStyle = {
709
+ position: "relative",
710
+ aspectRatio: aspectRatioMap2[aspectRatio],
711
+ borderRadius: radiusMap3[borderRadius],
712
+ overflow: "hidden"
713
+ };
714
+ const slideContainerStyle = {
715
+ display: "flex",
716
+ transition: "transform 0.3s ease-in-out",
717
+ transform: `translateX(-${currentIndex * 100}%)`,
718
+ height: "100%"
719
+ };
720
+ const slideStyle = {
721
+ minWidth: "100%",
722
+ height: "100%"
723
+ };
724
+ const imageStyle = {
725
+ width: "100%",
726
+ height: "100%",
727
+ objectFit: "cover"
728
+ };
729
+ const arrowStyle = {
730
+ position: "absolute",
731
+ top: "50%",
732
+ transform: "translateY(-50%)",
733
+ backgroundColor: "rgba(0,0,0,0.5)",
734
+ color: hexToRgba(resolvedArrowColor.color, resolvedArrowColor.opacity),
735
+ border: "none",
736
+ borderRadius: "50%",
737
+ width: "40px",
738
+ height: "40px",
739
+ cursor: "pointer",
740
+ display: "flex",
741
+ alignItems: "center",
742
+ justifyContent: "center",
743
+ fontSize: "20px",
744
+ zIndex: 1
745
+ };
746
+ const dotsContainerStyle = {
747
+ position: "absolute",
748
+ bottom: "16px",
749
+ left: "50%",
750
+ transform: "translateX(-50%)",
751
+ display: "flex",
752
+ gap: "8px",
753
+ zIndex: 1
754
+ };
755
+ const dotStyle = (isActive) => ({
756
+ width: "10px",
757
+ height: "10px",
758
+ borderRadius: "50%",
759
+ border: "none",
760
+ cursor: "pointer",
761
+ backgroundColor: isActive ? hexToRgba(resolvedDotColor.color, resolvedDotColor.opacity) : "rgba(255,255,255,0.5)"
762
+ });
763
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { id, style: containerStyle, children: [
764
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideContainerStyle, children: images.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: slideStyle, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
765
+ "img",
766
+ {
767
+ src: image.src,
768
+ alt: image.alt || "",
769
+ style: imageStyle,
770
+ loading: "lazy"
771
+ }
772
+ ) }, index)) }),
773
+ showArrows && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
774
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
775
+ "button",
776
+ {
777
+ type: "button",
778
+ onClick: goToPrevious,
779
+ style: { ...arrowStyle, left: "16px" },
780
+ "aria-label": "Previous slide",
781
+ children: "\u2039"
782
+ }
783
+ ),
784
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
785
+ "button",
786
+ {
787
+ type: "button",
788
+ onClick: goToNext,
789
+ style: { ...arrowStyle, right: "16px" },
790
+ "aria-label": "Next slide",
791
+ children: "\u203A"
792
+ }
793
+ )
794
+ ] }),
795
+ showDots && images.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: dotsContainerStyle, children: images.map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
796
+ "button",
797
+ {
798
+ type: "button",
799
+ onClick: () => goToSlide(index),
800
+ style: dotStyle(index === currentIndex),
801
+ "aria-label": `Go to slide ${index + 1}`
802
+ },
803
+ index
804
+ )) })
805
+ ] });
806
+ }
807
+
808
+ // components/page/VideoEmbed.tsx
809
+ var import_jsx_runtime8 = require("react/jsx-runtime");
810
+ var aspectRatioMap3 = {
811
+ "16:9": "56.25%",
812
+ // 9/16 * 100
813
+ "4:3": "75%",
814
+ "1:1": "100%",
815
+ "21:9": "42.86%"
816
+ };
817
+ var radiusMap4 = {
818
+ none: "0",
819
+ sm: "4px",
820
+ md: "8px",
821
+ lg: "16px"
822
+ };
823
+ var maxWidthMap = {
824
+ sm: "400px",
825
+ md: "600px",
826
+ lg: "800px",
827
+ xl: "1000px",
828
+ full: "100%"
829
+ };
830
+ function isEntryBoundValue3(value) {
831
+ return typeof value === "object" && value !== null && "useEntry" in value;
832
+ }
833
+ function parseVideoUrl(url) {
834
+ const ytMatch = url.match(
835
+ /(?:youtube\.com\/(?:watch\?v=|embed\/)|youtu\.be\/)([a-zA-Z0-9_-]{11})/
836
+ );
837
+ if (ytMatch) {
838
+ return {
839
+ type: "youtube",
840
+ embedUrl: `https://www.youtube.com/embed/${ytMatch[1]}`
841
+ };
842
+ }
843
+ const vimeoMatch = url.match(/(?:vimeo\.com\/)(\d+)/);
844
+ if (vimeoMatch) {
845
+ return {
846
+ type: "vimeo",
847
+ embedUrl: `https://player.vimeo.com/video/${vimeoMatch[1]}`
848
+ };
849
+ }
850
+ return { type: "unknown", embedUrl: url };
851
+ }
852
+ function VideoEmbed({
853
+ url,
854
+ aspectRatio = "16:9",
855
+ borderRadius = "none",
856
+ autoplay = false,
857
+ muted = false,
858
+ loop = false,
859
+ align = "center",
860
+ maxWidth = "full",
861
+ id
862
+ }) {
863
+ const { getEntryValue } = useEntries();
864
+ const resolvedUrl = (() => {
865
+ if (!url) return "";
866
+ if (typeof url === "string") return url;
867
+ if (isEntryBoundValue3(url)) {
868
+ if (url.useEntry) {
869
+ return String(getEntryValue(url.entryName, url.fieldKey) ?? "");
870
+ }
871
+ return url.value;
872
+ }
873
+ return "";
874
+ })();
875
+ if (!resolvedUrl) {
876
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
877
+ "div",
878
+ {
879
+ style: {
880
+ backgroundColor: "#1f2937",
881
+ borderRadius: radiusMap4[borderRadius],
882
+ aspectRatio: aspectRatio.replace(":", " / "),
883
+ display: "flex",
884
+ alignItems: "center",
885
+ justifyContent: "center",
886
+ color: "#9ca3af",
887
+ maxWidth: maxWidthMap[maxWidth],
888
+ marginLeft: align === "center" ? "auto" : align === "right" ? "auto" : void 0,
889
+ marginRight: align === "center" ? "auto" : align === "left" ? "auto" : void 0
890
+ },
891
+ children: "No video URL"
892
+ }
893
+ );
894
+ }
895
+ const { embedUrl } = parseVideoUrl(resolvedUrl);
896
+ const params = new URLSearchParams();
897
+ if (autoplay) params.set("autoplay", "1");
898
+ if (muted) params.set("mute", "1");
899
+ if (loop) params.set("loop", "1");
900
+ const finalUrl = params.toString() ? `${embedUrl}?${params.toString()}` : embedUrl;
901
+ const wrapperStyle = {
902
+ display: "flex",
903
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
904
+ };
905
+ const containerStyle = {
906
+ position: "relative",
907
+ width: "100%",
908
+ maxWidth: maxWidthMap[maxWidth],
909
+ paddingBottom: aspectRatioMap3[aspectRatio],
910
+ borderRadius: radiusMap4[borderRadius],
911
+ overflow: "hidden"
912
+ };
913
+ const iframeStyle = {
914
+ position: "absolute",
915
+ top: 0,
916
+ left: 0,
917
+ width: "100%",
918
+ height: "100%",
919
+ border: "none"
920
+ };
921
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
922
+ "iframe",
923
+ {
924
+ src: finalUrl,
925
+ style: iframeStyle,
926
+ allow: "accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",
927
+ allowFullScreen: true,
928
+ loading: "lazy"
929
+ }
930
+ ) }) });
931
+ }
932
+
933
+ // components/page/Icon.tsx
934
+ var import_jsx_runtime9 = require("react/jsx-runtime");
935
+ var sizeMap = {
936
+ sm: { size: "16px", strokeWidth: 2 },
937
+ md: { size: "24px", strokeWidth: 2 },
938
+ lg: { size: "32px", strokeWidth: 1.5 },
939
+ xl: { size: "48px", strokeWidth: 1.5 },
940
+ "2xl": { size: "64px", strokeWidth: 1.5 }
941
+ };
942
+ var icons = {
943
+ check: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
944
+ "svg",
945
+ {
946
+ width: size,
947
+ height: size,
948
+ viewBox: "0 0 24 24",
949
+ fill: "none",
950
+ stroke: color,
951
+ strokeWidth,
952
+ strokeLinecap: "round",
953
+ strokeLinejoin: "round",
954
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "20 6 9 17 4 12" })
955
+ }
956
+ ),
957
+ x: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
958
+ "svg",
959
+ {
960
+ width: size,
961
+ height: size,
962
+ viewBox: "0 0 24 24",
963
+ fill: "none",
964
+ stroke: color,
965
+ strokeWidth,
966
+ strokeLinecap: "round",
967
+ strokeLinejoin: "round",
968
+ children: [
969
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
970
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
971
+ ]
972
+ }
973
+ ),
974
+ star: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
975
+ "svg",
976
+ {
977
+ width: size,
978
+ height: size,
979
+ viewBox: "0 0 24 24",
980
+ fill: color,
981
+ stroke: color,
982
+ strokeWidth,
983
+ strokeLinecap: "round",
984
+ strokeLinejoin: "round",
985
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" })
986
+ }
987
+ ),
988
+ heart: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
989
+ "svg",
990
+ {
991
+ width: size,
992
+ height: size,
993
+ viewBox: "0 0 24 24",
994
+ fill: "none",
995
+ stroke: color,
996
+ strokeWidth,
997
+ strokeLinecap: "round",
998
+ strokeLinejoin: "round",
999
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" })
1000
+ }
1001
+ ),
1002
+ arrowRight: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1003
+ "svg",
1004
+ {
1005
+ width: size,
1006
+ height: size,
1007
+ viewBox: "0 0 24 24",
1008
+ fill: "none",
1009
+ stroke: color,
1010
+ strokeWidth,
1011
+ strokeLinecap: "round",
1012
+ strokeLinejoin: "round",
1013
+ children: [
1014
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }),
1015
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 5 19 12 12 19" })
1016
+ ]
1017
+ }
1018
+ ),
1019
+ arrowLeft: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1020
+ "svg",
1021
+ {
1022
+ width: size,
1023
+ height: size,
1024
+ viewBox: "0 0 24 24",
1025
+ fill: "none",
1026
+ stroke: color,
1027
+ strokeWidth,
1028
+ strokeLinecap: "round",
1029
+ strokeLinejoin: "round",
1030
+ children: [
1031
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("line", { x1: "19", y1: "12", x2: "5", y2: "12" }),
1032
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "12 19 5 12 12 5" })
1033
+ ]
1034
+ }
1035
+ ),
1036
+ mail: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1037
+ "svg",
1038
+ {
1039
+ width: size,
1040
+ height: size,
1041
+ viewBox: "0 0 24 24",
1042
+ fill: "none",
1043
+ stroke: color,
1044
+ strokeWidth,
1045
+ strokeLinecap: "round",
1046
+ strokeLinejoin: "round",
1047
+ children: [
1048
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z" }),
1049
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "22,6 12,13 2,6" })
1050
+ ]
1051
+ }
1052
+ ),
1053
+ phone: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1054
+ "svg",
1055
+ {
1056
+ width: size,
1057
+ height: size,
1058
+ viewBox: "0 0 24 24",
1059
+ fill: "none",
1060
+ stroke: color,
1061
+ strokeWidth,
1062
+ strokeLinecap: "round",
1063
+ strokeLinejoin: "round",
1064
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z" })
1065
+ }
1066
+ ),
1067
+ mapPin: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1068
+ "svg",
1069
+ {
1070
+ width: size,
1071
+ height: size,
1072
+ viewBox: "0 0 24 24",
1073
+ fill: "none",
1074
+ stroke: color,
1075
+ strokeWidth,
1076
+ strokeLinecap: "round",
1077
+ strokeLinejoin: "round",
1078
+ children: [
1079
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z" }),
1080
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "12", cy: "10", r: "3" })
1081
+ ]
1082
+ }
1083
+ ),
1084
+ zap: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1085
+ "svg",
1086
+ {
1087
+ width: size,
1088
+ height: size,
1089
+ viewBox: "0 0 24 24",
1090
+ fill: "none",
1091
+ stroke: color,
1092
+ strokeWidth,
1093
+ strokeLinecap: "round",
1094
+ strokeLinejoin: "round",
1095
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polygon", { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" })
1096
+ }
1097
+ ),
1098
+ shield: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1099
+ "svg",
1100
+ {
1101
+ width: size,
1102
+ height: size,
1103
+ viewBox: "0 0 24 24",
1104
+ fill: "none",
1105
+ stroke: color,
1106
+ strokeWidth,
1107
+ strokeLinecap: "round",
1108
+ strokeLinejoin: "round",
1109
+ children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" })
1110
+ }
1111
+ ),
1112
+ users: ({ size, color, strokeWidth }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1113
+ "svg",
1114
+ {
1115
+ width: size,
1116
+ height: size,
1117
+ viewBox: "0 0 24 24",
1118
+ fill: "none",
1119
+ stroke: color,
1120
+ strokeWidth,
1121
+ strokeLinecap: "round",
1122
+ strokeLinejoin: "round",
1123
+ children: [
1124
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" }),
1125
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("circle", { cx: "9", cy: "7", r: "4" }),
1126
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M23 21v-2a4 4 0 0 0-3-3.87" }),
1127
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M16 3.13a4 4 0 0 1 0 7.75" })
1128
+ ]
1129
+ }
1130
+ )
1131
+ };
1132
+ function isThemeableValue4(value) {
1133
+ return typeof value === "object" && value !== null && "useTheme" in value;
1134
+ }
1135
+ function Icon({
1136
+ name = "check",
1137
+ size = "md",
1138
+ color,
1139
+ align = "center",
1140
+ id
1141
+ }) {
1142
+ const { resolveColor: resolveColor2 } = useTheme();
1143
+ const resolvedColor = (() => {
1144
+ if (!color) return resolveColor2("primary");
1145
+ if (typeof color === "string") return { color, opacity: 100 };
1146
+ if (isThemeableValue4(color)) {
1147
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1148
+ }
1149
+ if ("color" in color) return color;
1150
+ return resolveColor2("primary");
1151
+ })();
1152
+ const IconComponent = icons[name.toLowerCase()] || icons.check;
1153
+ const { size: iconSize, strokeWidth } = sizeMap[size];
1154
+ const colorValue = hexToRgba(resolvedColor.color, resolvedColor.opacity);
1155
+ const wrapperStyle = {
1156
+ display: "flex",
1157
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center"
1158
+ };
1159
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1160
+ IconComponent,
1161
+ {
1162
+ size: iconSize,
1163
+ color: colorValue,
1164
+ strokeWidth
1165
+ }
1166
+ ) });
1167
+ }
1168
+ var availableIcons = Object.keys(icons);
1169
+
1170
+ // design-system/shadows.ts
1171
+ var shadowPresets = [
1172
+ { label: "None", value: "none", css: "none" },
1173
+ { label: "XS", value: "xs", css: "0 1px 2px 0 rgb(0 0 0 / 0.05)" },
1174
+ {
1175
+ label: "SM",
1176
+ value: "sm",
1177
+ css: "0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1)"
1178
+ },
1179
+ {
1180
+ label: "MD",
1181
+ value: "md",
1182
+ css: "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)"
1183
+ },
1184
+ {
1185
+ label: "LG",
1186
+ value: "lg",
1187
+ css: "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)"
1188
+ },
1189
+ {
1190
+ label: "XL",
1191
+ value: "xl",
1192
+ css: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)"
1193
+ },
1194
+ { label: "2XL", value: "2xl", css: "0 25px 50px -12px rgb(0 0 0 / 0.25)" },
1195
+ {
1196
+ label: "Inner",
1197
+ value: "inner",
1198
+ css: "inset 0 2px 4px 0 rgb(0 0 0 / 0.05)"
1199
+ }
1200
+ ];
1201
+ var getShadowCSS = (value) => {
1202
+ const preset = shadowPresets.find((p) => p.value === value);
1203
+ return preset?.css ?? "none";
1204
+ };
1205
+
1206
+ // components/page/Section.tsx
1207
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1208
+ function isThemeableValue5(value) {
1209
+ return typeof value === "object" && value !== null && "useTheme" in value;
1210
+ }
1211
+ function resolveBackgroundColor(bg, resolveColor2) {
1212
+ if (!bg) return void 0;
1213
+ if (typeof bg === "string") return bg;
1214
+ if (isThemeableValue5(bg)) {
1215
+ if (bg.useTheme) {
1216
+ const themeColor = resolveColor2(bg.themeKey);
1217
+ return hexToRgba(themeColor.color, themeColor.opacity);
1218
+ }
1219
+ return hexToRgba(bg.value.color, bg.value.opacity);
1220
+ }
1221
+ if ("color" in bg && "opacity" in bg) {
1222
+ return hexToRgba(bg.color, bg.opacity);
1223
+ }
1224
+ return void 0;
1225
+ }
1226
+ function getVisibilityClasses(visibility) {
1227
+ if (!visibility) return "";
1228
+ if (!visibility.mobile && !visibility.desktop) {
1229
+ return "hidden";
1230
+ }
1231
+ if (!visibility.mobile && visibility.desktop) {
1232
+ return "hidden md:block";
1233
+ }
1234
+ if (visibility.mobile && !visibility.desktop) {
1235
+ return "md:hidden";
1236
+ }
1237
+ return "";
1238
+ }
1239
+ function Section({
1240
+ children: _children,
1241
+ verticalPadding = 48,
1242
+ horizontalPadding = 32,
1243
+ gap = 24,
1244
+ backgroundColor,
1245
+ backgroundImage,
1246
+ shadow = "none",
1247
+ borderRadius = 0,
1248
+ contentMaxWidth = "1400px",
1249
+ anchorLink,
1250
+ visibility,
1251
+ puck
1252
+ }) {
1253
+ const { resolveColor: resolveColor2 } = useTheme();
1254
+ const DropZone = puck?.renderDropZone;
1255
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1256
+ "section",
1257
+ {
1258
+ id: anchorLink,
1259
+ className: cn("flex w-full flex-col", getVisibilityClasses(visibility)),
1260
+ style: {
1261
+ padding: `${verticalPadding}px ${horizontalPadding}px`,
1262
+ gap: `${gap}px`,
1263
+ backgroundColor: resolveBackgroundColor(backgroundColor, resolveColor2),
1264
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
1265
+ backgroundSize: "cover",
1266
+ backgroundPosition: "center",
1267
+ boxShadow: getShadowCSS(shadow),
1268
+ borderRadius: `${borderRadius}px`
1269
+ },
1270
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "mx-auto w-full", style: { maxWidth: contentMaxWidth }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(DropZone, { zone: "content" }) })
1271
+ }
1272
+ );
1273
+ }
1274
+
1275
+ // components/page/Container.tsx
1276
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1277
+ var maxWidthMap2 = {
1278
+ sm: "640px",
1279
+ md: "768px",
1280
+ lg: "1024px",
1281
+ xl: "1280px",
1282
+ "2xl": "1536px",
1283
+ full: "100%"
1284
+ };
1285
+ var paddingMap = {
1286
+ none: "0",
1287
+ sm: "16px",
1288
+ md: "24px",
1289
+ lg: "32px",
1290
+ xl: "48px"
1291
+ };
1292
+ function isThemeableValue6(value) {
1293
+ return typeof value === "object" && value !== null && "useTheme" in value;
1294
+ }
1295
+ function Container({
1296
+ maxWidth = "lg",
1297
+ padding,
1298
+ paddingX = "md",
1299
+ paddingY = "none",
1300
+ backgroundColor,
1301
+ centered = true,
1302
+ id,
1303
+ puck
1304
+ }) {
1305
+ const { resolveColor: resolveColor2 } = useTheme();
1306
+ const DropZone = puck?.renderDropZone;
1307
+ const resolvedBgColor = (() => {
1308
+ if (!backgroundColor) return null;
1309
+ if (typeof backgroundColor === "string")
1310
+ return { color: backgroundColor, opacity: 100 };
1311
+ if (isThemeableValue6(backgroundColor)) {
1312
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1313
+ }
1314
+ if ("color" in backgroundColor) return backgroundColor;
1315
+ return null;
1316
+ })();
1317
+ const effectivePaddingX = padding || paddingX;
1318
+ const effectivePaddingY = padding || paddingY;
1319
+ const style = {
1320
+ maxWidth: maxWidthMap2[maxWidth],
1321
+ marginLeft: centered ? "auto" : void 0,
1322
+ marginRight: centered ? "auto" : void 0,
1323
+ paddingLeft: paddingMap[effectivePaddingX],
1324
+ paddingRight: paddingMap[effectivePaddingX],
1325
+ paddingTop: paddingMap[effectivePaddingY],
1326
+ paddingBottom: paddingMap[effectivePaddingY],
1327
+ backgroundColor: resolvedBgColor ? hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity) : void 0,
1328
+ width: "100%"
1329
+ };
1330
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(DropZone, { zone: "container-content" }) });
1331
+ }
1332
+
1333
+ // components/page/Columns.tsx
1334
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1335
+ var gapMap = {
1336
+ none: "0",
1337
+ sm: "16px",
1338
+ md: "24px",
1339
+ lg: "32px",
1340
+ xl: "48px"
1341
+ };
1342
+ var alignMap = {
1343
+ top: "flex-start",
1344
+ center: "center",
1345
+ bottom: "flex-end",
1346
+ stretch: "stretch"
1347
+ };
1348
+ function Columns({
1349
+ columns = 2,
1350
+ gap = "md",
1351
+ verticalAlign = "top",
1352
+ stackOnMobile = true,
1353
+ id,
1354
+ puck
1355
+ }) {
1356
+ const DropZone = puck?.renderDropZone;
1357
+ const containerStyle = {
1358
+ display: "grid",
1359
+ gridTemplateColumns: `repeat(${columns}, 1fr)`,
1360
+ gap: gapMap[gap],
1361
+ alignItems: alignMap[verticalAlign]
1362
+ };
1363
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { id, style: containerStyle, children: Array.from({ length: columns }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { minWidth: 0 }, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(DropZone, { zone: `column-${index}` }) }, index)) });
1364
+ }
1365
+
1366
+ // components/page/Card.tsx
1367
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1368
+ var borderWidthMap = {
1369
+ none: "0",
1370
+ thin: "1px",
1371
+ medium: "2px",
1372
+ thick: "4px"
1373
+ };
1374
+ var radiusMap5 = {
1375
+ none: "0",
1376
+ sm: "4px",
1377
+ md: "8px",
1378
+ lg: "16px",
1379
+ xl: "24px"
1380
+ };
1381
+ var shadowMap2 = {
1382
+ none: "none",
1383
+ sm: "0 1px 2px rgba(0,0,0,0.05)",
1384
+ md: "0 4px 6px rgba(0,0,0,0.1)",
1385
+ lg: "0 10px 15px rgba(0,0,0,0.1)",
1386
+ xl: "0 20px 25px rgba(0,0,0,0.15)"
1387
+ };
1388
+ var paddingMap2 = {
1389
+ none: "0",
1390
+ sm: "16px",
1391
+ md: "24px",
1392
+ lg: "32px",
1393
+ xl: "48px"
1394
+ };
1395
+ function isThemeableValue7(value) {
1396
+ return typeof value === "object" && value !== null && "useTheme" in value;
1397
+ }
1398
+ function Card({
1399
+ backgroundColor,
1400
+ borderColor,
1401
+ borderWidth = "thin",
1402
+ borderRadius = "md",
1403
+ shadow = "sm",
1404
+ padding = "md",
1405
+ id,
1406
+ puck
1407
+ }) {
1408
+ const { resolveColor: resolveColor2 } = useTheme();
1409
+ const DropZone = puck?.renderDropZone;
1410
+ const resolvedBgColor = (() => {
1411
+ if (!backgroundColor) return resolveColor2("background");
1412
+ if (typeof backgroundColor === "string")
1413
+ return { color: backgroundColor, opacity: 100 };
1414
+ if (isThemeableValue7(backgroundColor)) {
1415
+ return backgroundColor.useTheme ? resolveColor2(backgroundColor.themeKey) : backgroundColor.value;
1416
+ }
1417
+ if ("color" in backgroundColor) return backgroundColor;
1418
+ return resolveColor2("background");
1419
+ })();
1420
+ const resolvedBorderColor = (() => {
1421
+ if (!borderColor) return resolveColor2("muted");
1422
+ if (typeof borderColor === "string")
1423
+ return { color: borderColor, opacity: 100 };
1424
+ if (isThemeableValue7(borderColor)) {
1425
+ return borderColor.useTheme ? resolveColor2(borderColor.themeKey) : borderColor.value;
1426
+ }
1427
+ if ("color" in borderColor) return borderColor;
1428
+ return resolveColor2("muted");
1429
+ })();
1430
+ const style = {
1431
+ backgroundColor: hexToRgba(resolvedBgColor.color, resolvedBgColor.opacity),
1432
+ border: borderWidth !== "none" ? `${borderWidthMap[borderWidth]} solid ${hexToRgba(resolvedBorderColor.color, resolvedBorderColor.opacity)}` : "none",
1433
+ borderRadius: radiusMap5[borderRadius],
1434
+ boxShadow: shadowMap2[shadow],
1435
+ padding: paddingMap2[padding]
1436
+ };
1437
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { id, style, children: DropZone && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropZone, { zone: "card-content" }) });
1438
+ }
1439
+
1440
+ // components/page/Divider.tsx
1441
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1442
+ var thicknessMap = {
1443
+ thin: "1px",
1444
+ medium: "2px",
1445
+ thick: "4px"
1446
+ };
1447
+ var widthMap2 = {
1448
+ full: "100%",
1449
+ "3/4": "75%",
1450
+ "1/2": "50%",
1451
+ "1/4": "25%"
1452
+ };
1453
+ var spacingMap = {
1454
+ sm: "16px",
1455
+ md: "24px",
1456
+ lg: "32px",
1457
+ xl: "48px"
1458
+ };
1459
+ function isThemeableValue8(value) {
1460
+ return typeof value === "object" && value !== null && "useTheme" in value;
1461
+ }
1462
+ function Divider({
1463
+ style: lineStyle = "solid",
1464
+ thickness = "thin",
1465
+ color,
1466
+ width = "full",
1467
+ align = "center",
1468
+ spacing = "md",
1469
+ id
1470
+ }) {
1471
+ const { resolveColor: resolveColor2 } = useTheme();
1472
+ const resolvedColor = (() => {
1473
+ if (!color) return resolveColor2("muted");
1474
+ if (typeof color === "string") return { color, opacity: 100 };
1475
+ if (isThemeableValue8(color)) {
1476
+ return color.useTheme ? resolveColor2(color.themeKey) : color.value;
1477
+ }
1478
+ if ("color" in color) return color;
1479
+ return resolveColor2("muted");
1480
+ })();
1481
+ const wrapperStyle = {
1482
+ display: "flex",
1483
+ justifyContent: align === "left" ? "flex-start" : align === "right" ? "flex-end" : "center",
1484
+ padding: `${spacingMap[spacing]} 0`
1485
+ };
1486
+ const hrStyle = {
1487
+ width: widthMap2[width],
1488
+ border: "none",
1489
+ borderTop: `${thicknessMap[thickness]} ${lineStyle} ${hexToRgba(resolvedColor.color, resolvedColor.opacity)}`,
1490
+ margin: 0
1491
+ };
1492
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { id, style: wrapperStyle, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", { style: hrStyle }) });
1493
+ }
1494
+
1495
+ // components/page/Spacer.tsx
1496
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1497
+ var sizeMap2 = {
1498
+ xs: "8px",
1499
+ sm: "16px",
1500
+ md: "24px",
1501
+ lg: "32px",
1502
+ xl: "48px",
1503
+ "2xl": "64px",
1504
+ "3xl": "96px"
1505
+ };
1506
+ function Spacer({ size = "md", id }) {
1507
+ const style = {
1508
+ height: sizeMap2[size],
1509
+ width: "100%"
1510
+ };
1511
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { id, style, "aria-hidden": "true" });
1512
+ }
1513
+
1514
+ // components/page/TextBlock.tsx
1515
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1516
+ var alignmentMap = {
1517
+ left: "text-left",
1518
+ center: "text-center",
1519
+ right: "text-right"
1520
+ };
1521
+ var sizeMap3 = {
1522
+ small: "text-2xl",
1523
+ "medium-small": "text-3xl",
1524
+ medium: "text-4xl",
1525
+ large: "text-5xl",
1526
+ xlarge: "text-6xl"
1527
+ };
1528
+ function isThemeableValue9(value) {
1529
+ return typeof value === "object" && value !== null && "useTheme" in value;
1530
+ }
1531
+ function isEntryBoundValue4(value) {
1532
+ return typeof value === "object" && value !== null && "useEntry" in value;
1533
+ }
1534
+ function resolveColor(color, resolveThemeColor) {
1535
+ if (!color) return "#000000";
1536
+ if (typeof color === "string") return color;
1537
+ if (isThemeableValue9(color)) {
1538
+ if (color.useTheme) {
1539
+ const themeColor = resolveThemeColor(color.themeKey);
1540
+ return hexToRgba(themeColor.color, themeColor.opacity);
1541
+ }
1542
+ return hexToRgba(color.value.color, color.value.opacity);
1543
+ }
1544
+ if ("color" in color && "opacity" in color) {
1545
+ return hexToRgba(color.color, color.opacity);
1546
+ }
1547
+ return "#000000";
1548
+ }
1549
+ function resolveColorHex(color, resolveThemeColor) {
1550
+ if (!color) return "#000000";
1551
+ if (typeof color === "string") return color;
1552
+ if (isThemeableValue9(color)) {
1553
+ if (color.useTheme) {
1554
+ return resolveThemeColor(color.themeKey).color;
1555
+ }
1556
+ return color.value.color;
1557
+ }
1558
+ if ("color" in color) {
1559
+ return color.color;
1560
+ }
1561
+ return "#000000";
1562
+ }
1563
+ function TextBlock({
1564
+ title,
1565
+ subtitle,
1566
+ body,
1567
+ alignment = "left",
1568
+ textSize = "medium",
1569
+ textColor,
1570
+ subtitleBodyColor,
1571
+ useGradientText = false,
1572
+ gradientColor1,
1573
+ gradientColor2,
1574
+ anchorLink
1575
+ }) {
1576
+ const { resolveColor: resolveThemeColor } = useTheme();
1577
+ const { getEntryValue } = useEntries();
1578
+ const resolveText = (value) => {
1579
+ if (!value) return void 0;
1580
+ if (typeof value === "string") return value;
1581
+ if (isEntryBoundValue4(value)) {
1582
+ if (value.useEntry) {
1583
+ const entryVal = getEntryValue(value.entryName, value.fieldKey);
1584
+ return entryVal != null ? String(entryVal) : void 0;
1585
+ }
1586
+ return value.value;
1587
+ }
1588
+ return void 0;
1589
+ };
1590
+ const resolvedTitle = resolveText(title);
1591
+ const resolvedSubtitle = resolveText(subtitle);
1592
+ const resolvedBody = resolveText(body);
1593
+ const titleColorValue = resolveColor(textColor, resolveThemeColor);
1594
+ const subtitleColorValue = resolveColor(subtitleBodyColor, resolveThemeColor);
1595
+ const gradientStyle = useGradientText ? {
1596
+ backgroundImage: `linear-gradient(90deg, ${resolveColorHex(gradientColor1, resolveThemeColor)}, ${resolveColorHex(gradientColor2, resolveThemeColor)})`,
1597
+ WebkitBackgroundClip: "text",
1598
+ WebkitTextFillColor: "transparent",
1599
+ backgroundClip: "text"
1600
+ } : { color: titleColorValue };
1601
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1602
+ "div",
1603
+ {
1604
+ id: anchorLink,
1605
+ className: cn("flex flex-col gap-4", alignmentMap[alignment]),
1606
+ children: [
1607
+ resolvedTitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1608
+ "h2",
1609
+ {
1610
+ className: cn("font-bold", sizeMap3[textSize]),
1611
+ style: gradientStyle,
1612
+ children: resolvedTitle
1613
+ }
1614
+ ),
1615
+ resolvedSubtitle && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { className: "text-xl", style: { color: subtitleColorValue }, children: resolvedSubtitle }),
1616
+ resolvedBody && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1617
+ "div",
1618
+ {
1619
+ className: "prose max-w-none",
1620
+ style: { color: subtitleColorValue },
1621
+ dangerouslySetInnerHTML: { __html: resolvedBody }
1622
+ }
1623
+ )
1624
+ ]
1625
+ }
1626
+ );
1627
+ }
1628
+
1629
+ // components/page/CustomImage.tsx
1630
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1631
+ var alignmentMap2 = {
1632
+ left: "mr-auto",
1633
+ center: "mx-auto",
1634
+ right: "ml-auto"
1635
+ };
1636
+ function CustomImage({
1637
+ image,
1638
+ alt = "",
1639
+ maxWidth,
1640
+ alignment = "center",
1641
+ fitContent = false
1642
+ }) {
1643
+ if (!image) {
1644
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "flex h-48 w-full items-center justify-center bg-gray-200 text-gray-400", children: "No image" });
1645
+ }
1646
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1647
+ "img",
1648
+ {
1649
+ src: image,
1650
+ alt,
1651
+ className: cn(
1652
+ "block",
1653
+ alignmentMap2[alignment],
1654
+ fitContent && "h-full w-full object-cover"
1655
+ ),
1656
+ style: { maxWidth: maxWidth ? `${maxWidth}px` : void 0 }
1657
+ }
1658
+ );
1659
+ }
1660
+
1661
+ // components/page/FeaturesList.tsx
1662
+ var import_lucide_react = require("lucide-react");
1663
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1664
+ var sizeMap4 = {
1665
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1666
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1667
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1668
+ };
1669
+ function FeaturesList({
1670
+ features = [],
1671
+ align = "left",
1672
+ size = "medium",
1673
+ iconColor = "#000000",
1674
+ anchorLink
1675
+ }) {
1676
+ const sizeConfig = sizeMap4[size];
1677
+ const getIcon = (iconName) => {
1678
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1679
+ return import_lucide_react.icons[formatted] || null;
1680
+ };
1681
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1682
+ "div",
1683
+ {
1684
+ id: anchorLink,
1685
+ className: cn(
1686
+ "flex flex-col gap-6",
1687
+ align === "center" && "items-center text-center",
1688
+ align === "right" && "items-end text-right"
1689
+ ),
1690
+ children: features.map((feature, index) => {
1691
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1692
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
1693
+ "div",
1694
+ {
1695
+ className: cn(
1696
+ "flex gap-4",
1697
+ align === "center" && "flex-col items-center",
1698
+ align === "right" && "flex-row-reverse"
1699
+ ),
1700
+ children: [
1701
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1702
+ "img",
1703
+ {
1704
+ src: feature.image,
1705
+ alt: feature.title || "",
1706
+ className: "object-contain",
1707
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1708
+ }
1709
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1710
+ IconComponent,
1711
+ {
1712
+ size: sizeConfig.icon,
1713
+ style: { color: iconColor },
1714
+ className: "flex-shrink-0"
1715
+ }
1716
+ ) : null,
1717
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col gap-1", children: [
1718
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("h3", { className: cn("font-semibold", sizeConfig.title), children: feature.title }),
1719
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1720
+ ] })
1721
+ ]
1722
+ },
1723
+ index
1724
+ );
1725
+ })
1726
+ }
1727
+ );
1728
+ }
1729
+
1730
+ // components/page/FeatureGrid.tsx
1731
+ var import_lucide_react2 = require("lucide-react");
1732
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1733
+ var sizeMap5 = {
1734
+ small: { icon: 24, title: "text-base", desc: "text-sm" },
1735
+ medium: { icon: 32, title: "text-lg", desc: "text-base" },
1736
+ large: { icon: 48, title: "text-xl", desc: "text-lg" }
1737
+ };
1738
+ function FeatureGrid({
1739
+ heading,
1740
+ description,
1741
+ features = [],
1742
+ columns = 3,
1743
+ align = "left",
1744
+ size = "medium",
1745
+ iconColor = "#3B82F6",
1746
+ textColor = "#000000",
1747
+ anchorLink
1748
+ }) {
1749
+ const sizeConfig = sizeMap5[size];
1750
+ const getIcon = (iconName) => {
1751
+ const formatted = iconName.charAt(0).toUpperCase() + iconName.slice(1);
1752
+ return import_lucide_react2.icons[formatted] || null;
1753
+ };
1754
+ const columnClass = {
1755
+ 2: "grid-cols-1 md:grid-cols-2",
1756
+ 3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
1757
+ 4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4"
1758
+ };
1759
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { id: anchorLink, className: "flex flex-col gap-8", children: [
1760
+ (heading || description) && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1761
+ "div",
1762
+ {
1763
+ className: cn(
1764
+ "flex flex-col gap-2",
1765
+ align === "center" && "text-center",
1766
+ align === "right" && "text-right"
1767
+ ),
1768
+ children: [
1769
+ heading && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h2", { className: "text-3xl font-bold", style: { color: textColor }, children: heading }),
1770
+ description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-gray-600", children: description })
1771
+ ]
1772
+ }
1773
+ ),
1774
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("grid gap-6", columnClass[columns]), children: features.map((feature, index) => {
1775
+ const IconComponent = feature.icon ? getIcon(feature.icon) : null;
1776
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
1777
+ "div",
1778
+ {
1779
+ className: cn(
1780
+ "flex flex-col gap-3 rounded-lg bg-gray-50 p-6",
1781
+ align === "center" && "items-center text-center"
1782
+ ),
1783
+ children: [
1784
+ feature.image ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1785
+ "img",
1786
+ {
1787
+ src: feature.image,
1788
+ alt: feature.title || "",
1789
+ className: "object-contain",
1790
+ style: { width: sizeConfig.icon, height: sizeConfig.icon }
1791
+ }
1792
+ ) : IconComponent ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1793
+ IconComponent,
1794
+ {
1795
+ size: sizeConfig.icon,
1796
+ style: { color: iconColor }
1797
+ }
1798
+ ) : null,
1799
+ feature.title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1800
+ "h3",
1801
+ {
1802
+ className: cn("font-semibold", sizeConfig.title),
1803
+ style: { color: textColor },
1804
+ children: feature.title
1805
+ }
1806
+ ),
1807
+ feature.description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: cn("text-gray-600", sizeConfig.desc), children: feature.description })
1808
+ ]
1809
+ },
1810
+ index
1811
+ );
1812
+ }) })
1813
+ ] });
1814
+ }
1815
+
1816
+ // components/page/Footer.tsx
1817
+ var import_lucide_react3 = require("lucide-react");
1818
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1819
+ function Footer({
1820
+ logo,
1821
+ copyright = "\xA9 2024 Company. All rights reserved.",
1822
+ backgroundColor = "#111827",
1823
+ textColor = "#ffffff",
1824
+ facebookUrl,
1825
+ instagramUrl,
1826
+ twitterUrl,
1827
+ puck
1828
+ }) {
1829
+ const DropZone = puck?.renderDropZone;
1830
+ const utm = useUtmParams();
1831
+ const sendEvent = useGtmEvent();
1832
+ const getSocialPlatform = (url) => {
1833
+ if (url.includes("facebook")) return "facebook";
1834
+ if (url.includes("instagram")) return "instagram";
1835
+ if (url.includes("twitter")) return "twitter";
1836
+ return "social";
1837
+ };
1838
+ const handleSocialClick = (url) => {
1839
+ const platform = getSocialPlatform(url);
1840
+ sendEvent("social_click", {
1841
+ platform,
1842
+ url,
1843
+ ...utm
1844
+ });
1845
+ };
1846
+ const socialLinks = [
1847
+ { url: facebookUrl, Icon: import_lucide_react3.Facebook },
1848
+ { url: instagramUrl, Icon: import_lucide_react3.Instagram },
1849
+ { url: twitterUrl, Icon: import_lucide_react3.Twitter }
1850
+ ].filter(
1851
+ (link) => !!link.url
1852
+ );
1853
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1854
+ "footer",
1855
+ {
1856
+ className: "w-full px-6 py-8",
1857
+ style: { backgroundColor, color: textColor },
1858
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mx-auto flex max-w-7xl flex-col items-center justify-between gap-6 md:flex-row", children: [
1859
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: logo && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) }),
1860
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(DropZone, { zone: "footer-content" }),
1861
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "flex items-center gap-4", children: socialLinks.map(({ url, Icon: Icon3 }, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1862
+ "a",
1863
+ {
1864
+ href: url,
1865
+ target: "_blank",
1866
+ rel: "noopener noreferrer",
1867
+ className: "transition-opacity hover:opacity-80",
1868
+ onClick: () => handleSocialClick(url),
1869
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Icon3, { size: 24, style: { color: textColor } })
1870
+ },
1871
+ index
1872
+ )) }),
1873
+ copyright && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-sm opacity-80", children: copyright })
1874
+ ] })
1875
+ }
1876
+ );
1877
+ }
1878
+
1879
+ // components/page/Topbar.tsx
1880
+ var import_react5 = require("react");
1881
+ var import_lucide_react4 = require("lucide-react");
1882
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1883
+ function Topbar({
1884
+ logo,
1885
+ logoUrl = "/",
1886
+ navItems = [],
1887
+ backgroundColor = "#ffffff",
1888
+ textColor = "#000000",
1889
+ maxWidth = "1400px",
1890
+ puck
1891
+ }) {
1892
+ const DropZone = puck?.renderDropZone;
1893
+ const [mobileMenuOpen, setMobileMenuOpen] = (0, import_react5.useState)(false);
1894
+ const utm = useUtmParams();
1895
+ const sendEvent = useGtmEvent();
1896
+ const handleNavClick = (item) => {
1897
+ sendEvent("nav_click", {
1898
+ name: item.name,
1899
+ url: item.url,
1900
+ linkType: item.linkType || "internal",
1901
+ ...utm
1902
+ });
1903
+ };
1904
+ const handleMobileMenuToggle = () => {
1905
+ const newState = !mobileMenuOpen;
1906
+ setMobileMenuOpen(newState);
1907
+ sendEvent("mobile_menu_toggle", {
1908
+ open: newState,
1909
+ ...utm
1910
+ });
1911
+ };
1912
+ const renderLink = (item, index) => {
1913
+ const className = "hover:opacity-80 transition-opacity";
1914
+ if (item.linkType === "external") {
1915
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1916
+ "a",
1917
+ {
1918
+ href: item.url,
1919
+ target: "_blank",
1920
+ rel: "noopener noreferrer",
1921
+ className,
1922
+ onClick: () => handleNavClick(item),
1923
+ children: item.name
1924
+ },
1925
+ index
1926
+ );
1927
+ }
1928
+ if (item.linkType === "scrollTo") {
1929
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1930
+ "a",
1931
+ {
1932
+ href: item.url,
1933
+ className,
1934
+ onClick: () => handleNavClick(item),
1935
+ children: item.name
1936
+ },
1937
+ index
1938
+ );
1939
+ }
1940
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1941
+ "a",
1942
+ {
1943
+ href: item.url,
1944
+ className,
1945
+ onClick: () => handleNavClick(item),
1946
+ children: item.name
1947
+ },
1948
+ index
1949
+ );
1950
+ };
1951
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1952
+ "nav",
1953
+ {
1954
+ className: "sticky top-0 z-50 w-full px-6 py-4",
1955
+ style: { backgroundColor, color: textColor },
1956
+ children: [
1957
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1958
+ "div",
1959
+ {
1960
+ className: "mx-auto flex items-center justify-between",
1961
+ style: { maxWidth },
1962
+ children: [
1963
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1964
+ "a",
1965
+ {
1966
+ href: logoUrl,
1967
+ className: "flex-shrink-0",
1968
+ onClick: () => sendEvent("nav_click", {
1969
+ name: "logo",
1970
+ url: logoUrl,
1971
+ linkType: "internal",
1972
+ ...utm
1973
+ }),
1974
+ children: logo ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("img", { src: logo, alt: "Logo", className: "h-8" }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "text-xl font-bold", children: "Logo" })
1975
+ }
1976
+ ),
1977
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "hidden items-center gap-8 md:flex", children: [
1978
+ navItems.map(renderLink),
1979
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1980
+ ] }),
1981
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { className: "md:hidden", onClick: handleMobileMenuToggle, children: mobileMenuOpen ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.X, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_lucide_react4.Menu, { size: 24 }) })
1982
+ ]
1983
+ }
1984
+ ),
1985
+ mobileMenuOpen && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1986
+ "div",
1987
+ {
1988
+ className: "absolute top-full right-0 left-0 flex flex-col gap-4 px-6 py-4 md:hidden",
1989
+ style: { backgroundColor },
1990
+ children: [
1991
+ navItems.map(renderLink),
1992
+ DropZone && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DropZone, { zone: "cta" })
1993
+ ]
1994
+ }
1995
+ )
1996
+ ]
1997
+ }
1998
+ );
1999
+ }
2000
+
2001
+ // components/page/Popup.tsx
2002
+ var import_react6 = require("react");
2003
+ var import_lucide_react5 = require("lucide-react");
2004
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2005
+ function Icon2({ name, ...props }) {
2006
+ const formatted = name.charAt(0).toUpperCase() + name.slice(1);
2007
+ const IconComponent = import_lucide_react5.icons[formatted];
2008
+ if (!IconComponent) return null;
2009
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(IconComponent, { ...props });
2010
+ }
2011
+ var widthMap3 = {
2012
+ small: "max-w-sm",
2013
+ medium: "max-w-lg",
2014
+ large: "max-w-2xl"
2015
+ };
2016
+ var sizeMap6 = {
2017
+ small: "px-3 py-1.5 text-sm",
2018
+ medium: "px-4 py-2 text-base",
2019
+ large: "px-6 py-3 text-lg"
2020
+ };
2021
+ function Popup({
2022
+ ctaText = "Open",
2023
+ buttonColor = "#3B82F6",
2024
+ textColor = "#ffffff",
2025
+ icon,
2026
+ iconPosition = "left",
2027
+ size = "medium",
2028
+ width = "medium",
2029
+ textLink = false,
2030
+ puck
2031
+ }) {
2032
+ const [isOpen, setIsOpen] = (0, import_react6.useState)(false);
2033
+ const utm = useUtmParams();
2034
+ const sendEvent = useGtmEvent();
2035
+ const handleOpen = () => {
2036
+ setIsOpen(true);
2037
+ sendEvent("popup_open", {
2038
+ ctaText,
2039
+ type: textLink ? "link" : "button",
2040
+ ...utm
2041
+ });
2042
+ };
2043
+ const handleClose = () => {
2044
+ setIsOpen(false);
2045
+ sendEvent("popup_close", { ctaText, ...utm });
2046
+ };
2047
+ const trigger = textLink ? /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2048
+ "button",
2049
+ {
2050
+ onClick: handleOpen,
2051
+ className: "underline hover:opacity-80",
2052
+ style: { color: buttonColor },
2053
+ children: ctaText
2054
+ }
2055
+ ) : /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2056
+ "button",
2057
+ {
2058
+ onClick: handleOpen,
2059
+ className: cn(
2060
+ "flex items-center gap-2 rounded-full font-medium",
2061
+ sizeMap6[size]
2062
+ ),
2063
+ style: { backgroundColor: buttonColor, color: textColor },
2064
+ children: [
2065
+ icon && iconPosition === "left" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 }),
2066
+ ctaText,
2067
+ icon && iconPosition === "right" && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(Icon2, { name: icon, size: 18 })
2068
+ ]
2069
+ }
2070
+ );
2071
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
2072
+ trigger,
2073
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2074
+ "div",
2075
+ {
2076
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-4",
2077
+ onClick: handleClose,
2078
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2079
+ "div",
2080
+ {
2081
+ className: cn(
2082
+ "relative w-full rounded-lg bg-white p-6",
2083
+ widthMap3[width]
2084
+ ),
2085
+ onClick: (e) => e.stopPropagation(),
2086
+ children: [
2087
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2088
+ "button",
2089
+ {
2090
+ onClick: handleClose,
2091
+ className: "absolute top-4 right-4 text-gray-500 hover:text-gray-700",
2092
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_lucide_react5.X, { size: 24 })
2093
+ }
2094
+ ),
2095
+ puck && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(puck.renderDropZone, { zone: "popup-content" })
2096
+ ]
2097
+ }
2098
+ )
2099
+ }
2100
+ )
2101
+ ] });
2102
+ }
2103
+ // Annotate the CommonJS export names for ESM import in node:
2104
+ 0 && (module.exports = {
2105
+ Button,
2106
+ Card,
2107
+ Columns,
2108
+ Container,
2109
+ CustomImage,
2110
+ Divider,
2111
+ FeatureGrid,
2112
+ FeaturesList,
2113
+ Footer,
2114
+ Heading,
2115
+ Icon,
2116
+ Image,
2117
+ ImageCarousel,
2118
+ Paragraph,
2119
+ Popup,
2120
+ Section,
2121
+ Spacer,
2122
+ TextBlock,
2123
+ Topbar,
2124
+ VideoEmbed,
2125
+ availableIcons
2126
+ });