@commercetools-demo/puck-components 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,2564 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var index_exports = {};
32
+ __export(index_exports, {
33
+ CONTENT_WIDTHS: () => CONTENT_WIDTHS,
34
+ RichTextContent: () => RichTextContent,
35
+ colors: () => colors,
36
+ createRenderConfig: () => createRenderConfig,
37
+ defaultRenderConfig: () => defaultRenderConfig,
38
+ formatPrice: () => formatPrice,
39
+ getFirstPrice: () => getFirstPrice,
40
+ getLocalizedText: () => getLocalizedText,
41
+ getProductImage: () => getProductImage,
42
+ getProductName: () => getProductName,
43
+ getProductSku: () => getProductSku,
44
+ getProductSlug: () => getProductSlug,
45
+ intlCatalogs: () => catalogs,
46
+ productLinkDefaults: () => productLinkDefaults,
47
+ renderButton: () => renderButton,
48
+ renderCard: () => renderCard,
49
+ renderCategoryGrid: () => renderCategoryGrid,
50
+ renderCategoryHero: () => renderCategoryHero,
51
+ renderCheckoutPromoBanner: () => renderCheckoutPromoBanner,
52
+ renderColumns: () => renderColumns,
53
+ renderCountdownBanner: () => renderCountdownBanner,
54
+ renderCrossSellBlock: () => renderCrossSellBlock,
55
+ renderDeliveryMessage: () => renderDeliveryMessage,
56
+ renderDivider: () => renderDivider,
57
+ renderEmptyState: () => renderEmptyState,
58
+ renderFAQAccordion: () => renderFAQAccordion,
59
+ renderFooterBlock: () => renderFooterBlock,
60
+ renderGrid: () => renderGrid,
61
+ renderHero: () => renderHero,
62
+ renderHeroBanner: () => renderHeroBanner,
63
+ renderImage: () => renderImage,
64
+ renderImageBlock: () => renderImageBlock,
65
+ renderNewsletterSignup: () => renderNewsletterSignup,
66
+ renderProductBanner: () => renderProductBanner,
67
+ renderProductGridHeader: () => renderProductGridHeader,
68
+ renderProductSlider: () => renderProductSlider,
69
+ renderProductTeaser: () => renderProductTeaser,
70
+ renderPromotionalBanner: () => renderPromotionalBanner,
71
+ renderRelatedProductsSlider: () => renderRelatedProductsSlider,
72
+ renderRichText: () => renderRichText,
73
+ renderRoot: () => renderRoot,
74
+ renderSocialLinks: () => renderSocialLinks,
75
+ renderSpacer: () => renderSpacer,
76
+ renderTabContent: () => renderTabContent,
77
+ renderTestimonialsSlider: () => renderTestimonialsSlider,
78
+ renderTextBlock: () => renderTextBlock,
79
+ renderThankYouContent: () => renderThankYouContent,
80
+ renderTrustBadges: () => renderTrustBadges,
81
+ renderVideoBlock: () => renderVideoBlock,
82
+ renderWebsiteLogo: () => renderWebsiteLogo,
83
+ resolveProductLink: () => resolveProductLink,
84
+ sanitizeHtml: () => sanitizeHtml
85
+ });
86
+ module.exports = __toCommonJS(index_exports);
87
+
88
+ // src/intl/en.json
89
+ var en_default = {
90
+ "Editor.loadingEditor": "Loading editor\u2026",
91
+ "Editor.errorLoadingPage": "Error loading page:",
92
+ "Editor.toggleComponentsPanel": "Toggle components panel",
93
+ "Editor.togglePropertiesPanel": "Toggle properties panel",
94
+ "Editor.undo": "Undo",
95
+ "Editor.redo": "Redo",
96
+ "Editor.badgeSaving": "Saving\u2026",
97
+ "Editor.badgeUnsaved": "Unsaved",
98
+ "Editor.badgeDraft": "Draft",
99
+ "Editor.badgePublished": "Published",
100
+ "Editor.preview": "Preview",
101
+ "Editor.save": "Save",
102
+ "Editor.publish": "Publish",
103
+ "Editor.moreOptions": "More options",
104
+ "Editor.hideVersionHistory": "Hide version history",
105
+ "Editor.versionHistory": "Version history",
106
+ "Editor.revertToPublished": "Revert to published",
107
+ "Editor.createTemplateFromPage": "Create a template from this page",
108
+ "Editor.createTemplateTitle": "Create a new template",
109
+ "Editor.nameLabel": "Name",
110
+ "Editor.nameRequired": "Name is required",
111
+ "Editor.templateNamePlaceholder": "e.g. Landing page",
112
+ "Editor.createTemplateWithoutData": "Create template without data",
113
+ "Editor.cancel": "Cancel",
114
+ "Editor.creating": "Creating\u2026",
115
+ "Editor.create": "Create",
116
+ "Editor.discardChangesTitle": "Discard unsaved changes?",
117
+ "Editor.discardChangesBody": "You have unsaved changes on this page. If you leave now, those changes will be lost.",
118
+ "Editor.stayOnPage": "Stay on page",
119
+ "Editor.leaveAndDiscard": "Leave & discard",
120
+ "Editor.showPanel": "Show {panel} panel",
121
+ "Editor.tabComponents": "Components",
122
+ "Editor.tabHistory": "History",
123
+ "Editor.searchComponents": "Search components",
124
+ "Editor.searchComponentsPlaceholder": "Search components\u2026",
125
+ "Editor.clearSearch": "Clear search",
126
+ "Editor.resizePropertiesPanel": "Resize properties panel",
127
+ "Editor.resizeComponentsPanel": "Resize components panel",
128
+ "Editor.searchProducts": "Search products",
129
+ "Editor.searchProductsPlaceholder": "Search by product name\u2026",
130
+ "Editor.productSearchResults": "Product search results",
131
+ "Editor.searching": "Searching\u2026",
132
+ "Editor.noProductsFound": "No products found",
133
+ "Editor.unnamedProduct": "(unnamed product)",
134
+ "Editor.skuLabel": "SKU: {sku}",
135
+ "Editor.noSkuOnMasterVariant": "No SKU on master variant",
136
+ "Editor.added": "Added",
137
+ "Editor.datasourceType": "Datasource type",
138
+ "Editor.datasourceProductBySku": "Product by SKU",
139
+ "Editor.datasourceProductsBySku": "Products by SKU",
140
+ "Editor.selectedProduct": "Selected product",
141
+ "Editor.selectedProducts": "Selected products",
142
+ "Editor.noProductSelectedSearch": "No product selected \u2014 search above to add one.",
143
+ "Editor.remove": "Remove",
144
+ "Editor.richTextPlaceholder": "Start typing\u2026",
145
+ "Editor.uploadAFile": "Upload a file",
146
+ "Editor.close": "Close",
147
+ "Editor.title": "Title",
148
+ "Editor.fileTitlePlaceholder": "File title",
149
+ "Editor.description": "Description",
150
+ "Editor.optionalDescriptionPlaceholder": "Optional description",
151
+ "Editor.dropToSelectFile": "Click or drag & drop to select a file",
152
+ "Editor.noFileSelected": "No file selected",
153
+ "Editor.uploading": "Uploading\u2026",
154
+ "Editor.upload": "Upload",
155
+ "Editor.selectFromMediaLibrary": "Select from Media Library",
156
+ "Editor.noFilesFound": "No files found.",
157
+ "Editor.prev": "\u2190 Prev",
158
+ "Editor.next": "Next \u2192",
159
+ "Editor.nothingSelected": "Nothing selected",
160
+ "Editor.select": "Select",
161
+ "Editor.selectedImagePreview": "Selected image preview",
162
+ "Editor.noImageSelected": "No image selected",
163
+ "Editor.mediaLibrary": "Media Library",
164
+ "Editor.loading": "Loading\u2026",
165
+ "Editor.loadingProduct": "Loading product\u2026",
166
+ "Editor.loadingProducts": "Loading products\u2026",
167
+ "Editor.errorLoadingProduct": "Error loading product",
168
+ "Editor.noProductSelected": "No product selected",
169
+ "Editor.noDescription": "No description",
170
+ "Editor.noCategoriesConfigured": "No categories configured",
171
+ "Editor.noFaqItemsConfigured": "No FAQ items configured",
172
+ "Editor.noProductsConfigured": "No products configured",
173
+ "Editor.noImage": "No image",
174
+ "Editor.noVideoUrlConfigured": "No video URL configured",
175
+ "Editor.cfg.root.field.title": "Page Title",
176
+ "Editor.cfg.root.field.backgroundColor": "Background Color",
177
+ "Editor.cfg.root.field.contentWidth": "Content Width",
178
+ "Editor.cfg.root.contentWidth.full": "Full width",
179
+ "Editor.cfg.category.layout": "Layout",
180
+ "Editor.cfg.category.text": "Text & Content",
181
+ "Editor.cfg.category.media": "Media",
182
+ "Editor.cfg.category.heroBanners": "Hero & Banners",
183
+ "Editor.cfg.category.products": "Products",
184
+ "Editor.cfg.category.actions": "Buttons & Forms",
185
+ "Editor.cfg.category.socialProof": "Social Proof & Info",
186
+ "Editor.cfg.category.sections": "Page Sections",
187
+ "Editor.cfg.category.other": "Other",
188
+ "Editor.cfg.shared.field.linkWith": "Link products by",
189
+ "Editor.cfg.shared.linkWith.slug": "Slug",
190
+ "Editor.cfg.shared.linkWith.sku": "SKU",
191
+ "Editor.cfg.shared.field.baseUrl": "Link base URL",
192
+ "Editor.cfg.fontSize.default": "Default",
193
+ "Editor.cfg.fontSize.small": "Small (0.875rem)",
194
+ "Editor.cfg.fontSize.medium": "Medium (1rem)",
195
+ "Editor.cfg.fontSize.large": "Large (1.25rem)",
196
+ "Editor.cfg.fontSize.xLarge": "X-Large (1.5rem)",
197
+ "Editor.cfg.fontSize.2xLarge": "2X-Large (2rem)",
198
+ "Editor.cfg.fontSize.3xLarge": "3X-Large (2.5rem)",
199
+ "Editor.cfg.fontSize.4xLarge": "4X-Large (3rem)",
200
+ "Editor.cfg.hero.label": "Hero",
201
+ "Editor.cfg.hero.field.heading": "Heading",
202
+ "Editor.cfg.hero.field.headingFontSize": "Heading Font Size",
203
+ "Editor.cfg.hero.field.subheading": "Subheading",
204
+ "Editor.cfg.hero.field.subheadingFontSize": "Subheading Font Size",
205
+ "Editor.cfg.hero.field.backgroundImage": "Background Image URL",
206
+ "Editor.cfg.hero.field.ctaText": "CTA Button Text",
207
+ "Editor.cfg.hero.field.ctaUrl": "CTA Button URL",
208
+ "Editor.cfg.hero.field.layout": "Layout",
209
+ "Editor.cfg.hero.layout.centered": "Centered",
210
+ "Editor.cfg.hero.layout.leftAligned": "Left Aligned",
211
+ "Editor.cfg.hero.field.minHeight": "Min Height (CSS, e.g. 400px)",
212
+ "Editor.cfg.richText.label": "Rich Text",
213
+ "Editor.cfg.richText.field.content": "Content",
214
+ "Editor.cfg.richText.field.align": "Text Alignment",
215
+ "Editor.cfg.align.left": "Left",
216
+ "Editor.cfg.align.center": "Center",
217
+ "Editor.cfg.align.right": "Right",
218
+ "Editor.cfg.richText.field.maxWidth": "Max Width (CSS)",
219
+ "Editor.cfg.richText.field.padding": "Padding (CSS)",
220
+ "Editor.cfg.grid.label": "Grid",
221
+ "Editor.cfg.grid.field.columnCount": "Number of Columns",
222
+ "Editor.cfg.grid.field.rowCount": "Number of Rows",
223
+ "Editor.cfg.grid.field.gap": "Gap (CSS)",
224
+ "Editor.cfg.grid.field.padding": "Padding (CSS)",
225
+ "Editor.cfg.columns.label": "Columns",
226
+ "Editor.cfg.columns.field.columnCount": "Number of Columns",
227
+ "Editor.cfg.columns.count.2": "2 Columns",
228
+ "Editor.cfg.columns.count.3": "3 Columns",
229
+ "Editor.cfg.columns.count.4": "4 Columns",
230
+ "Editor.cfg.columns.field.gap": "Column Gap (CSS)",
231
+ "Editor.cfg.columns.field.padding": "Padding (CSS)",
232
+ "Editor.cfg.image.label": "Image",
233
+ "Editor.cfg.image.field.src": "Image",
234
+ "Editor.cfg.image.field.alt": "Alt Text",
235
+ "Editor.cfg.image.field.caption": "Caption",
236
+ "Editor.cfg.image.field.width": "Width (CSS, e.g. 100%)",
237
+ "Editor.cfg.image.field.height": "Height (CSS, e.g. 300px)",
238
+ "Editor.cfg.image.field.objectFit": "Object Fit",
239
+ "Editor.cfg.image.objectFit.cover": "Cover",
240
+ "Editor.cfg.image.objectFit.contain": "Contain",
241
+ "Editor.cfg.image.objectFit.fill": "Fill",
242
+ "Editor.cfg.image.field.borderRadius": "Border Radius (CSS)",
243
+ "Editor.cfg.image.field.align": "Alignment",
244
+ "Editor.cfg.button.label": "Button",
245
+ "Editor.cfg.button.field.label": "Button Label",
246
+ "Editor.cfg.button.field.href": "Link URL",
247
+ "Editor.cfg.button.field.variant": "Variant",
248
+ "Editor.cfg.button.variant.primary": "Primary",
249
+ "Editor.cfg.button.variant.secondary": "Secondary",
250
+ "Editor.cfg.button.variant.outline": "Outline",
251
+ "Editor.cfg.button.field.size": "Size",
252
+ "Editor.cfg.button.size.small": "Small",
253
+ "Editor.cfg.button.size.medium": "Medium",
254
+ "Editor.cfg.button.size.large": "Large",
255
+ "Editor.cfg.button.field.fontSize": "Font Size Override",
256
+ "Editor.cfg.button.field.align": "Alignment",
257
+ "Editor.cfg.button.field.openInNewTab": "Open in New Tab",
258
+ "Editor.cfg.yesNo.yes": "Yes",
259
+ "Editor.cfg.yesNo.no": "No",
260
+ "Editor.cfg.card.label": "Card",
261
+ "Editor.cfg.card.field.title": "Title",
262
+ "Editor.cfg.card.field.titleFontSize": "Title Font Size",
263
+ "Editor.cfg.card.field.body": "Body Text",
264
+ "Editor.cfg.card.field.imageUrl": "Image URL",
265
+ "Editor.cfg.card.field.ctaText": "CTA Text",
266
+ "Editor.cfg.card.field.ctaUrl": "CTA URL",
267
+ "Editor.cfg.card.field.shadow": "Drop Shadow",
268
+ "Editor.cfg.card.field.borderRadius": "Border Radius (CSS)",
269
+ "Editor.cfg.spacer.label": "Spacer",
270
+ "Editor.cfg.spacer.field.height": "Height (CSS, e.g. 48px)",
271
+ "Editor.cfg.spacer.field.showLine": "Show Divider Line",
272
+ "Editor.cfg.spacer.field.lineColor": "Line Color",
273
+ "Editor.cfg.productTeaser.label": "Product Teaser",
274
+ "Editor.cfg.productTeaser.field.datasource": "Product Datasource",
275
+ "Editor.cfg.productTeaser.field.richText": "Rich Text",
276
+ "Editor.cfg.heroBanner.label": "Hero Banner",
277
+ "Editor.cfg.heroBanner.field.title": "Title",
278
+ "Editor.cfg.heroBanner.field.subtitle": "Subtitle",
279
+ "Editor.cfg.heroBanner.field.image": "Image",
280
+ "Editor.cfg.textBlock.label": "Text Block",
281
+ "Editor.cfg.textBlock.field.content": "Content",
282
+ "Editor.cfg.categoryGrid.label": "Category Grid",
283
+ "Editor.cfg.categoryGrid.field.image": "Category {n} Image",
284
+ "Editor.cfg.categoryGrid.field.label": "Category {n} Label",
285
+ "Editor.cfg.categoryGrid.field.link": "Category {n} Link",
286
+ "Editor.cfg.categoryHero.label": "Category Hero",
287
+ "Editor.cfg.categoryHero.field.title": "Title",
288
+ "Editor.cfg.categoryHero.field.subtitle": "Subtitle",
289
+ "Editor.cfg.categoryHero.field.image": "Background Image",
290
+ "Editor.cfg.categoryHero.field.ctaText": "CTA Text",
291
+ "Editor.cfg.categoryHero.field.ctaLink": "CTA Link",
292
+ "Editor.cfg.checkoutPromoBanner.label": "Checkout Promo Banner",
293
+ "Editor.cfg.checkoutPromoBanner.field.title": "Title",
294
+ "Editor.cfg.checkoutPromoBanner.field.message": "Message",
295
+ "Editor.cfg.checkoutPromoBanner.field.ctaText": "CTA Text",
296
+ "Editor.cfg.checkoutPromoBanner.field.ctaLink": "CTA Link",
297
+ "Editor.cfg.countdownBanner.label": "Countdown Banner",
298
+ "Editor.cfg.countdownBanner.field.headline": "Headline",
299
+ "Editor.cfg.countdownBanner.field.subline": "Subline",
300
+ "Editor.cfg.countdownBanner.field.endDate": "End Date (ISO, e.g. 2025-12-31T23:59:59)",
301
+ "Editor.cfg.countdownBanner.field.ctaText": "CTA Text",
302
+ "Editor.cfg.countdownBanner.field.ctaLink": "CTA Link",
303
+ "Editor.cfg.countdownBanner.field.background": "Background Color",
304
+ "Editor.cfg.crossSellBlock.label": "Cross-Sell Block",
305
+ "Editor.cfg.crossSellBlock.field.title": "Title",
306
+ "Editor.cfg.crossSellBlock.field.products": "Products",
307
+ "Editor.cfg.crossSellBlock.field.ctaText": "CTA Text",
308
+ "Editor.cfg.deliveryMessage.label": "Delivery Message",
309
+ "Editor.cfg.deliveryMessage.field.message": "Message (use $XX for threshold)",
310
+ "Editor.cfg.deliveryMessage.field.threshold": "Threshold Amount (e.g. 50)",
311
+ "Editor.cfg.divider.label": "Divider",
312
+ "Editor.cfg.divider.field.lineStyle": "Line Style",
313
+ "Editor.cfg.divider.lineStyle.solid": "Solid",
314
+ "Editor.cfg.divider.lineStyle.dashed": "Dashed",
315
+ "Editor.cfg.divider.lineStyle.dotted": "Dotted",
316
+ "Editor.cfg.divider.field.spacing": "Spacing (px)",
317
+ "Editor.cfg.emptyState.label": "Empty State",
318
+ "Editor.cfg.emptyState.field.image": "Image",
319
+ "Editor.cfg.emptyState.field.title": "Title",
320
+ "Editor.cfg.emptyState.field.description": "Description",
321
+ "Editor.cfg.emptyState.field.ctaText": "CTA Text",
322
+ "Editor.cfg.emptyState.field.ctaLink": "CTA Link",
323
+ "Editor.cfg.faqAccordion.label": "FAQ Accordion",
324
+ "Editor.cfg.faqAccordion.field.question": "Question {n}",
325
+ "Editor.cfg.faqAccordion.field.answer": "Answer {n}",
326
+ "Editor.cfg.footerBlock.label": "Footer Block",
327
+ "Editor.cfg.footerBlock.field.column": "Column {n}",
328
+ "Editor.cfg.footerBlock.field.copyright": "Copyright Text",
329
+ "Editor.cfg.imageBlock.label": "Image Block",
330
+ "Editor.cfg.imageBlock.field.image": "Image",
331
+ "Editor.cfg.imageBlock.field.caption": "Caption",
332
+ "Editor.cfg.imageBlock.field.link": "Link URL",
333
+ "Editor.cfg.newsletterSignup.label": "Newsletter Signup",
334
+ "Editor.cfg.newsletterSignup.field.title": "Title",
335
+ "Editor.cfg.newsletterSignup.field.subtitle": "Subtitle",
336
+ "Editor.cfg.newsletterSignup.field.ctaText": "Button Text",
337
+ "Editor.cfg.newsletterSignup.field.placeholder": "Input Placeholder",
338
+ "Editor.newsletterEmailAria": "Email",
339
+ "Editor.cfg.productBanner.label": "Product Banner",
340
+ "Editor.cfg.productBanner.field.title": "Title",
341
+ "Editor.cfg.productBanner.field.description": "Description",
342
+ "Editor.cfg.productBanner.field.ctaText": "CTA Text",
343
+ "Editor.cfg.productBanner.field.ctaLink": "CTA Link",
344
+ "Editor.cfg.productBanner.field.product": "Product",
345
+ "Editor.cfg.productBanner.field.productOnLeft": "Product Position",
346
+ "Editor.cfg.productBanner.productPosition.right": "Product on Right",
347
+ "Editor.cfg.productBanner.productPosition.left": "Product on Left",
348
+ "Editor.cfg.productBanner.field.background": "Background Color",
349
+ "Editor.cfg.productGridHeader.label": "Product Grid Header",
350
+ "Editor.cfg.productGridHeader.field.title": "Title",
351
+ "Editor.cfg.productGridHeader.field.description": "Description",
352
+ "Editor.cfg.productSlider.label": "Product Slider",
353
+ "Editor.cfg.productSlider.field.title": "Title",
354
+ "Editor.cfg.productSlider.field.subtitle": "Subtitle",
355
+ "Editor.cfg.productSlider.field.products": "Products",
356
+ "Editor.cfg.promotionalBanner.label": "Promotional Banner",
357
+ "Editor.cfg.promotionalBanner.field.image": "Image",
358
+ "Editor.cfg.promotionalBanner.field.title": "Title",
359
+ "Editor.cfg.promotionalBanner.field.subtitle": "Subtitle",
360
+ "Editor.cfg.promotionalBanner.field.ctaText": "CTA Text",
361
+ "Editor.cfg.promotionalBanner.field.ctaLink": "CTA Link",
362
+ "Editor.cfg.promotionalBanner.field.background": "Background Color",
363
+ "Editor.cfg.relatedProducts.label": "Related Products",
364
+ "Editor.cfg.relatedProducts.field.title": "Title",
365
+ "Editor.cfg.relatedProducts.field.subtitle": "Subtitle",
366
+ "Editor.cfg.relatedProducts.field.products": "Products",
367
+ "Editor.cfg.socialLinks.label": "Social Links",
368
+ "Editor.cfg.socialLinks.field.label": "Link {n} Label",
369
+ "Editor.cfg.socialLinks.field.url": "Link {n} URL",
370
+ "Editor.cfg.tabContent.label": "Tab Content",
371
+ "Editor.cfg.tabContent.field.tabLabel": "Tab Label",
372
+ "Editor.cfg.tabContent.field.content": "Content",
373
+ "Editor.cfg.testimonials.label": "Testimonials",
374
+ "Editor.cfg.testimonials.field.quote": "Quote {n}",
375
+ "Editor.cfg.testimonials.field.author": "Author {n}",
376
+ "Editor.cfg.testimonials.field.role": "Role {n}",
377
+ "Editor.cfg.thankYouContent.label": "Thank You Content",
378
+ "Editor.cfg.thankYouContent.field.headline": "Headline",
379
+ "Editor.cfg.thankYouContent.field.message": "Message",
380
+ "Editor.cfg.thankYouContent.field.ctaText": "CTA Text",
381
+ "Editor.cfg.thankYouContent.field.ctaLink": "CTA Link",
382
+ "Editor.cfg.trustBadges.label": "Trust Badges",
383
+ "Editor.cfg.trustBadges.field.icon": "Badge {n} Icon",
384
+ "Editor.cfg.trustBadges.field.label": "Badge {n} Label",
385
+ "Editor.cfg.videoBlock.label": "Video Block",
386
+ "Editor.cfg.videoBlock.field.videoUrl": "Video URL",
387
+ "Editor.cfg.videoBlock.field.posterImage": "Poster Image",
388
+ "Editor.cfg.videoBlock.field.title": "Title",
389
+ "Editor.cfg.videoBlock.field.caption": "Caption",
390
+ "Editor.cfg.websiteLogo.label": "Website Logo",
391
+ "Editor.cfg.websiteLogo.field.logo": "Logo",
392
+ "Editor.cfg.websiteLogo.field.maxWidth": "Max Width (px)",
393
+ "Editor.cfg.websiteLogo.field.maxHeight": "Max Height (px)",
394
+ "Editor.websiteLogoAlt": "Logo",
395
+ "Editor.color.none": "None",
396
+ "Editor.color.custom": "Custom color",
397
+ "Editor.color.white": "White",
398
+ "Editor.color.lightGray": "Light gray",
399
+ "Editor.color.gray": "Gray",
400
+ "Editor.color.slate": "Slate",
401
+ "Editor.color.charcoal": "Charcoal",
402
+ "Editor.color.black": "Black",
403
+ "Editor.color.red": "Red",
404
+ "Editor.color.orange": "Orange",
405
+ "Editor.color.amber": "Amber",
406
+ "Editor.color.yellow": "Yellow",
407
+ "Editor.color.lime": "Lime",
408
+ "Editor.color.green": "Green",
409
+ "Editor.color.teal": "Teal",
410
+ "Editor.color.cyan": "Cyan",
411
+ "Editor.color.skyBlue": "Sky blue",
412
+ "Editor.color.blue": "Blue",
413
+ "Editor.color.navy": "Navy",
414
+ "Editor.color.purple": "Purple",
415
+ "Editor.color.pink": "Pink",
416
+ "Editor.color.sand": "Sand"
417
+ };
418
+
419
+ // src/intl/es.json
420
+ var es_default = {
421
+ "Editor.loadingEditor": "Cargando editor\u2026",
422
+ "Editor.errorLoadingPage": "Error al cargar la p\xE1gina:",
423
+ "Editor.toggleComponentsPanel": "Panel de componentes alternados",
424
+ "Editor.togglePropertiesPanel": "Mostrar/ocultar panel de propiedades",
425
+ "Editor.undo": "Deshacer",
426
+ "Editor.redo": "Rehacer",
427
+ "Editor.badgeSaving": "Ahorro\u2026",
428
+ "Editor.badgeUnsaved": "No guardado",
429
+ "Editor.badgeDraft": "Borrador",
430
+ "Editor.badgePublished": "Publicado",
431
+ "Editor.preview": "Vista previa",
432
+ "Editor.save": "Guardar",
433
+ "Editor.publish": "Publicar",
434
+ "Editor.moreOptions": "M\xE1s opciones",
435
+ "Editor.hideVersionHistory": "Ocultar historial de versiones",
436
+ "Editor.versionHistory": "Historial de versiones",
437
+ "Editor.revertToPublished": "Volver a la versi\xF3n publicada",
438
+ "Editor.createTemplateFromPage": "Crea una plantilla a partir de esta p\xE1gina.",
439
+ "Editor.createTemplateTitle": "Crear una nueva plantilla",
440
+ "Editor.nameLabel": "Nombre",
441
+ "Editor.nameRequired": "Se requiere el nombre",
442
+ "Editor.templateNamePlaceholder": "p. ej. P\xE1gina de inicio",
443
+ "Editor.createTemplateWithoutData": "Crear plantilla sin datos",
444
+ "Editor.cancel": "Cancelar",
445
+ "Editor.creating": "Creando\u2026",
446
+ "Editor.create": "Crear",
447
+ "Editor.discardChangesTitle": "\xBFDescartar los cambios no guardados?",
448
+ "Editor.discardChangesBody": "Tienes cambios sin guardar en esta p\xE1gina. Si sales ahora, esos cambios se perder\xE1n.",
449
+ "Editor.stayOnPage": "Permanecer en la p\xE1gina",
450
+ "Editor.leaveAndDiscard": "Dejar y desechar",
451
+ "Editor.showPanel": "Mostrar panel {panel}",
452
+ "Editor.tabComponents": "Componentes",
453
+ "Editor.tabHistory": "Historia",
454
+ "Editor.searchComponents": "Componentes de b\xFAsqueda",
455
+ "Editor.searchComponentsPlaceholder": "Componentes de b\xFAsqueda\u2026",
456
+ "Editor.clearSearch": "Borrar b\xFAsqueda",
457
+ "Editor.resizePropertiesPanel": "Redimensionar el panel de propiedades",
458
+ "Editor.resizeComponentsPanel": "Redimensionar el panel de componentes",
459
+ "Editor.searchProducts": "Buscar productos",
460
+ "Editor.searchProductsPlaceholder": "Buscar por nombre del producto\u2026",
461
+ "Editor.productSearchResults": "Resultados de la b\xFAsqueda de productos",
462
+ "Editor.searching": "B\xFAsqueda\u2026",
463
+ "Editor.noProductsFound": "No se encontraron productos",
464
+ "Editor.unnamedProduct": "(producto sin nombre)",
465
+ "Editor.skuLabel": "SKU: {sku}",
466
+ "Editor.noSkuOnMasterVariant": "No hay SKU en la variante principal",
467
+ "Editor.added": "Agregado",
468
+ "Editor.datasourceType": "Tipo de fuente de datos",
469
+ "Editor.datasourceProductBySku": "Producto por SKU",
470
+ "Editor.datasourceProductsBySku": "Productos por SKU",
471
+ "Editor.selectedProduct": "Producto seleccionado",
472
+ "Editor.selectedProducts": "Productos seleccionados",
473
+ "Editor.noProductSelectedSearch": "No se ha seleccionado ning\xFAn producto; busque arriba para a\xF1adir uno.",
474
+ "Editor.remove": "Eliminar",
475
+ "Editor.richTextPlaceholder": "Empieza a escribir\u2026",
476
+ "Editor.uploadAFile": "Subir un archivo",
477
+ "Editor.close": "Cerrar",
478
+ "Editor.title": "T\xEDtulo",
479
+ "Editor.fileTitlePlaceholder": "T\xEDtulo del archivo",
480
+ "Editor.description": "Descripci\xF3n",
481
+ "Editor.optionalDescriptionPlaceholder": "Descripci\xF3n opcional",
482
+ "Editor.dropToSelectFile": "Haz clic o arrastra y suelta para seleccionar un archivo.",
483
+ "Editor.noFileSelected": "No se ha seleccionado ning\xFAn archivo.",
484
+ "Editor.uploading": "Subiendo\u2026",
485
+ "Editor.upload": "Subir",
486
+ "Editor.selectFromMediaLibrary": "Seleccionar de la biblioteca multimedia",
487
+ "Editor.noFilesFound": "No se encontraron archivos.",
488
+ "Editor.prev": "\u2190 Anterior",
489
+ "Editor.next": "Siguiente \u2192",
490
+ "Editor.nothingSelected": "No se ha seleccionado nada",
491
+ "Editor.select": "Seleccionar",
492
+ "Editor.selectedImagePreview": "Vista previa de la imagen seleccionada",
493
+ "Editor.noImageSelected": "No se ha seleccionado ninguna imagen",
494
+ "Editor.mediaLibrary": "Biblioteca multimedia",
495
+ "Editor.loading": "Cargando\u2026",
496
+ "Editor.loadingProduct": "Cargando producto\u2026",
497
+ "Editor.loadingProducts": "Cargando productos\u2026",
498
+ "Editor.errorLoadingProduct": "Error al cargar el producto",
499
+ "Editor.noProductSelected": "No se ha seleccionado ning\xFAn producto.",
500
+ "Editor.noDescription": "Sin descripci\xF3n",
501
+ "Editor.noCategoriesConfigured": "No se han configurado categor\xEDas",
502
+ "Editor.noFaqItemsConfigured": "No hay elementos de preguntas frecuentes configurados.",
503
+ "Editor.noProductsConfigured": "No hay productos configurados",
504
+ "Editor.noImage": "Sin imagen",
505
+ "Editor.noVideoUrlConfigured": "No se ha configurado ninguna URL de v\xEDdeo.",
506
+ "Editor.cfg.root.field.title": "T\xEDtulo de la p\xE1gina",
507
+ "Editor.cfg.root.field.backgroundColor": "Color de fondo",
508
+ "Editor.cfg.root.field.contentWidth": "Ancho del contenido",
509
+ "Editor.cfg.root.contentWidth.full": "Ancho completo",
510
+ "Editor.cfg.category.layout": "Disposici\xF3n",
511
+ "Editor.cfg.category.text": "Texto y contenido",
512
+ "Editor.cfg.category.media": "Medios de comunicaci\xF3n",
513
+ "Editor.cfg.category.heroBanners": "H\xE9roes y Estandartes",
514
+ "Editor.cfg.category.products": "Productos",
515
+ "Editor.cfg.category.actions": "Botones y formularios",
516
+ "Editor.cfg.category.socialProof": "Prueba social e informaci\xF3n",
517
+ "Editor.cfg.category.sections": "Secciones de p\xE1gina",
518
+ "Editor.cfg.category.other": "Otro",
519
+ "Editor.cfg.shared.field.linkWith": "Enlace productos por",
520
+ "Editor.cfg.shared.linkWith.slug": "Slug",
521
+ "Editor.cfg.shared.linkWith.sku": "SKU",
522
+ "Editor.cfg.shared.field.baseUrl": "URL base del enlace",
523
+ "Editor.cfg.fontSize.default": "Por defecto",
524
+ "Editor.cfg.fontSize.small": "Peque\xF1o (0,875 rem)",
525
+ "Editor.cfg.fontSize.medium": "Medio (1 rem)",
526
+ "Editor.cfg.fontSize.large": "Grande (1,25 rem)",
527
+ "Editor.cfg.fontSize.xLarge": "Extra grande (1,5 rem)",
528
+ "Editor.cfg.fontSize.2xLarge": "2X-Grande (2rem)",
529
+ "Editor.cfg.fontSize.3xLarge": "3X-Grande (2,5 rem)",
530
+ "Editor.cfg.fontSize.4xLarge": "4X-Grande (3rem)",
531
+ "Editor.cfg.hero.label": "Hero",
532
+ "Editor.cfg.hero.field.heading": "T\xEDtulo",
533
+ "Editor.cfg.hero.field.headingFontSize": "Tama\xF1o de fuente del encabezado",
534
+ "Editor.cfg.hero.field.subheading": "Subt\xEDtulo",
535
+ "Editor.cfg.hero.field.subheadingFontSize": "Tama\xF1o de fuente del subt\xEDtulo",
536
+ "Editor.cfg.hero.field.backgroundImage": "URL de la imagen de fondo",
537
+ "Editor.cfg.hero.field.ctaText": "Texto del bot\xF3n CTA",
538
+ "Editor.cfg.hero.field.ctaUrl": "URL del bot\xF3n CTA",
539
+ "Editor.cfg.hero.field.layout": "Disposici\xF3n",
540
+ "Editor.cfg.hero.layout.centered": "Centrado",
541
+ "Editor.cfg.hero.layout.leftAligned": "Alineado a la izquierda",
542
+ "Editor.cfg.hero.field.minHeight": "Altura m\xEDnima (CSS, por ejemplo, 400px)",
543
+ "Editor.cfg.richText.label": "Texto enriquecido",
544
+ "Editor.cfg.richText.field.content": "Contenido",
545
+ "Editor.cfg.richText.field.align": "Alineaci\xF3n del texto",
546
+ "Editor.cfg.align.left": "Izquierda",
547
+ "Editor.cfg.align.center": "Centro",
548
+ "Editor.cfg.align.right": "Bien",
549
+ "Editor.cfg.richText.field.maxWidth": "Ancho m\xE1ximo (CSS)",
550
+ "Editor.cfg.richText.field.padding": "Relleno (CSS)",
551
+ "Editor.cfg.grid.label": "Red",
552
+ "Editor.cfg.grid.field.columnCount": "N\xFAmero de columnas",
553
+ "Editor.cfg.grid.field.rowCount": "N\xFAmero de filas",
554
+ "Editor.cfg.grid.field.gap": "Brecha (CSS)",
555
+ "Editor.cfg.grid.field.padding": "Relleno (CSS)",
556
+ "Editor.cfg.columns.label": "Columnas",
557
+ "Editor.cfg.columns.field.columnCount": "N\xFAmero de columnas",
558
+ "Editor.cfg.columns.count.2": "2 columnas",
559
+ "Editor.cfg.columns.count.3": "3 columnas",
560
+ "Editor.cfg.columns.count.4": "4 columnas",
561
+ "Editor.cfg.columns.field.gap": "Espacio entre columnas (CSS)",
562
+ "Editor.cfg.columns.field.padding": "Relleno (CSS)",
563
+ "Editor.cfg.image.label": "Imagen",
564
+ "Editor.cfg.image.field.src": "Imagen",
565
+ "Editor.cfg.image.field.alt": "Texto alternativo",
566
+ "Editor.cfg.image.field.caption": "Subt\xEDtulo",
567
+ "Editor.cfg.image.field.width": "Ancho (CSS, por ejemplo, 100%)",
568
+ "Editor.cfg.image.field.height": "Altura (CSS, por ejemplo, 300px)",
569
+ "Editor.cfg.image.field.objectFit": "Ajuste del objeto",
570
+ "Editor.cfg.image.objectFit.cover": "Cubrir",
571
+ "Editor.cfg.image.objectFit.contain": "Contener",
572
+ "Editor.cfg.image.objectFit.fill": "Llenar",
573
+ "Editor.cfg.image.field.borderRadius": "Radio de borde (CSS)",
574
+ "Editor.cfg.image.field.align": "Alineaci\xF3n",
575
+ "Editor.cfg.button.label": "Bot\xF3n",
576
+ "Editor.cfg.button.field.label": "Etiqueta del bot\xF3n",
577
+ "Editor.cfg.button.field.href": "URL del enlace",
578
+ "Editor.cfg.button.field.variant": "Variante",
579
+ "Editor.cfg.button.variant.primary": "Primario",
580
+ "Editor.cfg.button.variant.secondary": "Secundario",
581
+ "Editor.cfg.button.variant.outline": "Describir",
582
+ "Editor.cfg.button.field.size": "Tama\xF1o",
583
+ "Editor.cfg.button.size.small": "Peque\xF1o",
584
+ "Editor.cfg.button.size.medium": "Medio",
585
+ "Editor.cfg.button.size.large": "Grande",
586
+ "Editor.cfg.button.field.fontSize": "Anulaci\xF3n del tama\xF1o de fuente",
587
+ "Editor.cfg.button.field.align": "Alineaci\xF3n",
588
+ "Editor.cfg.button.field.openInNewTab": "Abrir en una pesta\xF1a nueva",
589
+ "Editor.cfg.yesNo.yes": "S\xED",
590
+ "Editor.cfg.yesNo.no": "No",
591
+ "Editor.cfg.card.label": "Tarjeta",
592
+ "Editor.cfg.card.field.title": "T\xEDtulo",
593
+ "Editor.cfg.card.field.titleFontSize": "Tama\xF1o de fuente del t\xEDtulo",
594
+ "Editor.cfg.card.field.body": "Texto del cuerpo",
595
+ "Editor.cfg.card.field.imageUrl": "URL de la imagen",
596
+ "Editor.cfg.card.field.ctaText": "Texto de llamada a la acci\xF3n",
597
+ "Editor.cfg.card.field.ctaUrl": "URL de llamada a la acci\xF3n",
598
+ "Editor.cfg.card.field.shadow": "Sombra paralela",
599
+ "Editor.cfg.card.field.borderRadius": "Radio de borde (CSS)",
600
+ "Editor.cfg.spacer.label": "espaciador",
601
+ "Editor.cfg.spacer.field.height": "Altura (CSS, por ejemplo, 48px)",
602
+ "Editor.cfg.spacer.field.showLine": "Mostrar l\xEDnea divisoria",
603
+ "Editor.cfg.spacer.field.lineColor": "Color de l\xEDnea",
604
+ "Editor.cfg.productTeaser.label": "Avance del producto",
605
+ "Editor.cfg.productTeaser.field.datasource": "Fuente de datos del producto",
606
+ "Editor.cfg.productTeaser.field.richText": "Texto enriquecido",
607
+ "Editor.cfg.heroBanner.label": "Hero Banner",
608
+ "Editor.cfg.heroBanner.field.title": "T\xEDtulo",
609
+ "Editor.cfg.heroBanner.field.subtitle": "Subtitular",
610
+ "Editor.cfg.heroBanner.field.image": "Imagen",
611
+ "Editor.cfg.textBlock.label": "Bloque de texto",
612
+ "Editor.cfg.textBlock.field.content": "Contenido",
613
+ "Editor.cfg.categoryGrid.label": "Cuadr\xEDcula de categor\xEDas",
614
+ "Editor.cfg.categoryGrid.field.image": "Categor\xEDa {n} Imagen",
615
+ "Editor.cfg.categoryGrid.field.label": "Categor\xEDa {n} Etiqueta",
616
+ "Editor.cfg.categoryGrid.field.link": "Enlace de categor\xEDa {n}",
617
+ "Editor.cfg.categoryHero.label": "H\xE9roe de categor\xEDa",
618
+ "Editor.cfg.categoryHero.field.title": "T\xEDtulo",
619
+ "Editor.cfg.categoryHero.field.subtitle": "Subtitular",
620
+ "Editor.cfg.categoryHero.field.image": "Imagen de fondo",
621
+ "Editor.cfg.categoryHero.field.ctaText": "Texto de llamada a la acci\xF3n",
622
+ "Editor.cfg.categoryHero.field.ctaLink": "Enlace CTA",
623
+ "Editor.cfg.checkoutPromoBanner.label": "Banner promocional de pago",
624
+ "Editor.cfg.checkoutPromoBanner.field.title": "T\xEDtulo",
625
+ "Editor.cfg.checkoutPromoBanner.field.message": "Mensaje",
626
+ "Editor.cfg.checkoutPromoBanner.field.ctaText": "Texto de llamada a la acci\xF3n",
627
+ "Editor.cfg.checkoutPromoBanner.field.ctaLink": "Enlace CTA",
628
+ "Editor.cfg.countdownBanner.label": "Banner de cuenta regresiva",
629
+ "Editor.cfg.countdownBanner.field.headline": "Titular",
630
+ "Editor.cfg.countdownBanner.field.subline": "Subl\xEDnea",
631
+ "Editor.cfg.countdownBanner.field.endDate": "Fecha de finalizaci\xF3n (ISO, por ejemplo, 2025-12-31T23:59:59)",
632
+ "Editor.cfg.countdownBanner.field.ctaText": "Texto de llamada a la acci\xF3n",
633
+ "Editor.cfg.countdownBanner.field.ctaLink": "Enlace CTA",
634
+ "Editor.cfg.countdownBanner.field.background": "Color de fondo",
635
+ "Editor.cfg.crossSellBlock.label": "Bloque de venta cruzada",
636
+ "Editor.cfg.crossSellBlock.field.title": "T\xEDtulo",
637
+ "Editor.cfg.crossSellBlock.field.products": "Productos",
638
+ "Editor.cfg.crossSellBlock.field.ctaText": "Texto de llamada a la acci\xF3n",
639
+ "Editor.cfg.deliveryMessage.label": "Mensaje de entrega",
640
+ "Editor.cfg.deliveryMessage.field.message": "Mensaje (use $XX para el umbral)",
641
+ "Editor.cfg.deliveryMessage.field.threshold": "Cantidad umbral (p. ej., 50)",
642
+ "Editor.cfg.divider.label": "Divisor",
643
+ "Editor.cfg.divider.field.lineStyle": "Estilo de l\xEDnea",
644
+ "Editor.cfg.divider.lineStyle.solid": "S\xF3lido",
645
+ "Editor.cfg.divider.lineStyle.dashed": "Corrido",
646
+ "Editor.cfg.divider.lineStyle.dotted": "Punteado",
647
+ "Editor.cfg.divider.field.spacing": "Espaciado (px)",
648
+ "Editor.cfg.emptyState.label": "Estado vac\xEDo",
649
+ "Editor.cfg.emptyState.field.image": "Imagen",
650
+ "Editor.cfg.emptyState.field.title": "T\xEDtulo",
651
+ "Editor.cfg.emptyState.field.description": "Descripci\xF3n",
652
+ "Editor.cfg.emptyState.field.ctaText": "Texto de llamada a la acci\xF3n",
653
+ "Editor.cfg.emptyState.field.ctaLink": "Enlace CTA",
654
+ "Editor.cfg.faqAccordion.label": "Acorde\xF3n de preguntas frecuentes",
655
+ "Editor.cfg.faqAccordion.field.question": "Pregunta {n}",
656
+ "Editor.cfg.faqAccordion.field.answer": "Respuesta {n}",
657
+ "Editor.cfg.footerBlock.label": "Bloque de pie de p\xE1gina",
658
+ "Editor.cfg.footerBlock.field.column": "Columna {n}",
659
+ "Editor.cfg.footerBlock.field.copyright": "Texto de derechos de autor",
660
+ "Editor.cfg.imageBlock.label": "Bloque de imagen",
661
+ "Editor.cfg.imageBlock.field.image": "Imagen",
662
+ "Editor.cfg.imageBlock.field.caption": "Subt\xEDtulo",
663
+ "Editor.cfg.imageBlock.field.link": "URL del enlace",
664
+ "Editor.cfg.newsletterSignup.label": "Suscripci\xF3n al bolet\xEDn informativo",
665
+ "Editor.cfg.newsletterSignup.field.title": "T\xEDtulo",
666
+ "Editor.cfg.newsletterSignup.field.subtitle": "Subtitular",
667
+ "Editor.cfg.newsletterSignup.field.ctaText": "Texto del bot\xF3n",
668
+ "Editor.cfg.newsletterSignup.field.placeholder": "Marcador de posici\xF3n de entrada",
669
+ "Editor.newsletterEmailAria": "Correo electr\xF3nico",
670
+ "Editor.cfg.productBanner.label": "Banner del producto",
671
+ "Editor.cfg.productBanner.field.title": "T\xEDtulo",
672
+ "Editor.cfg.productBanner.field.description": "Descripci\xF3n",
673
+ "Editor.cfg.productBanner.field.ctaText": "Texto de llamada a la acci\xF3n",
674
+ "Editor.cfg.productBanner.field.ctaLink": "Enlace CTA",
675
+ "Editor.cfg.productBanner.field.product": "Producto",
676
+ "Editor.cfg.productBanner.field.productOnLeft": "Posicionamiento del producto",
677
+ "Editor.cfg.productBanner.productPosition.right": "Producto a la derecha",
678
+ "Editor.cfg.productBanner.productPosition.left": "Producto a la izquierda",
679
+ "Editor.cfg.productBanner.field.background": "Color de fondo",
680
+ "Editor.cfg.productGridHeader.label": "Encabezado de la cuadr\xEDcula de productos",
681
+ "Editor.cfg.productGridHeader.field.title": "T\xEDtulo",
682
+ "Editor.cfg.productGridHeader.field.description": "Descripci\xF3n",
683
+ "Editor.cfg.productSlider.label": "Deslizador de productos",
684
+ "Editor.cfg.productSlider.field.title": "T\xEDtulo",
685
+ "Editor.cfg.productSlider.field.subtitle": "Subtitular",
686
+ "Editor.cfg.productSlider.field.products": "Productos",
687
+ "Editor.cfg.promotionalBanner.label": "Banner promocional",
688
+ "Editor.cfg.promotionalBanner.field.image": "Imagen",
689
+ "Editor.cfg.promotionalBanner.field.title": "T\xEDtulo",
690
+ "Editor.cfg.promotionalBanner.field.subtitle": "Subtitular",
691
+ "Editor.cfg.promotionalBanner.field.ctaText": "Texto de llamada a la acci\xF3n",
692
+ "Editor.cfg.promotionalBanner.field.ctaLink": "Enlace CTA",
693
+ "Editor.cfg.promotionalBanner.field.background": "Color de fondo",
694
+ "Editor.cfg.relatedProducts.label": "Productos relacionados",
695
+ "Editor.cfg.relatedProducts.field.title": "T\xEDtulo",
696
+ "Editor.cfg.relatedProducts.field.subtitle": "Subtitular",
697
+ "Editor.cfg.relatedProducts.field.products": "Productos",
698
+ "Editor.cfg.socialLinks.label": "Enlaces sociales",
699
+ "Editor.cfg.socialLinks.field.label": "Enlace {n} Etiqueta",
700
+ "Editor.cfg.socialLinks.field.url": "Enlace {n} URL",
701
+ "Editor.cfg.tabContent.label": "Contenido de la pesta\xF1a",
702
+ "Editor.cfg.tabContent.field.tabLabel": "Etiqueta de pesta\xF1a",
703
+ "Editor.cfg.tabContent.field.content": "Contenido",
704
+ "Editor.cfg.testimonials.label": "Testimonios",
705
+ "Editor.cfg.testimonials.field.quote": "Cita {n}",
706
+ "Editor.cfg.testimonials.field.author": "Autor {n}",
707
+ "Editor.cfg.testimonials.field.role": "Rol {n}",
708
+ "Editor.cfg.thankYouContent.label": "Contenido de agradecimiento",
709
+ "Editor.cfg.thankYouContent.field.headline": "Titular",
710
+ "Editor.cfg.thankYouContent.field.message": "Mensaje",
711
+ "Editor.cfg.thankYouContent.field.ctaText": "Texto de llamada a la acci\xF3n",
712
+ "Editor.cfg.thankYouContent.field.ctaLink": "Enlace CTA",
713
+ "Editor.cfg.trustBadges.label": "Insignias de confianza",
714
+ "Editor.cfg.trustBadges.field.icon": "Insignia {n} Icono",
715
+ "Editor.cfg.trustBadges.field.label": "Etiqueta de insignia {n}",
716
+ "Editor.cfg.videoBlock.label": "Bloque de v\xEDdeo",
717
+ "Editor.cfg.videoBlock.field.videoUrl": "URL del v\xEDdeo",
718
+ "Editor.cfg.videoBlock.field.posterImage": "Imagen del p\xF3ster",
719
+ "Editor.cfg.videoBlock.field.title": "T\xEDtulo",
720
+ "Editor.cfg.videoBlock.field.caption": "Subt\xEDtulo",
721
+ "Editor.cfg.websiteLogo.label": "Logotipo del sitio web",
722
+ "Editor.cfg.websiteLogo.field.logo": "Logo",
723
+ "Editor.cfg.websiteLogo.field.maxWidth": "Ancho m\xE1ximo (px)",
724
+ "Editor.cfg.websiteLogo.field.maxHeight": "Altura m\xE1xima (px)",
725
+ "Editor.websiteLogoAlt": "Logo",
726
+ "Editor.color.none": "Ninguno",
727
+ "Editor.color.custom": "Color personalizado",
728
+ "Editor.color.white": "Blanco",
729
+ "Editor.color.lightGray": "Gris claro",
730
+ "Editor.color.gray": "Gris",
731
+ "Editor.color.slate": "Pizarra",
732
+ "Editor.color.charcoal": "Carb\xF3n",
733
+ "Editor.color.black": "Negro",
734
+ "Editor.color.red": "Rojo",
735
+ "Editor.color.orange": "Naranja",
736
+ "Editor.color.amber": "\xC1mbar",
737
+ "Editor.color.yellow": "Amarillo",
738
+ "Editor.color.lime": "Lima",
739
+ "Editor.color.green": "Verde",
740
+ "Editor.color.teal": "Verde azulado",
741
+ "Editor.color.cyan": "Cian",
742
+ "Editor.color.skyBlue": "Azul cielo",
743
+ "Editor.color.blue": "Azul",
744
+ "Editor.color.navy": "Azul marino",
745
+ "Editor.color.purple": "Morado",
746
+ "Editor.color.pink": "Rosa",
747
+ "Editor.color.sand": "Arena"
748
+ };
749
+
750
+ // src/intl/index.ts
751
+ var catalogs = { en: en_default, es: es_default };
752
+
753
+ // src/utils/sanitizeHtml.ts
754
+ var import_isomorphic_dompurify = __toESM(require("isomorphic-dompurify"));
755
+ var sanitizeHtml = (html) => {
756
+ if (!html) return "";
757
+ return import_isomorphic_dompurify.default.sanitize(html, {
758
+ USE_PROFILES: { html: true },
759
+ ADD_ATTR: ["target", "rel"]
760
+ });
761
+ };
762
+
763
+ // src/components/RichTextContent.tsx
764
+ var import_jsx_runtime = require("react/jsx-runtime");
765
+ var STYLE_ID = "puck-rich-text-content-styles";
766
+ var RICH_TEXT_CSS = `
767
+ .puck-rich-text-content { line-height: 1.6; }
768
+ .puck-rich-text-content > :first-child { margin-top: 0; }
769
+ .puck-rich-text-content > :last-child { margin-bottom: 0; }
770
+ .puck-rich-text-content h1 { font-size: 2em; font-weight: 700; line-height: 1.2; margin: 0.67em 0; }
771
+ .puck-rich-text-content h2 { font-size: 1.5em; font-weight: 700; line-height: 1.25; margin: 0.75em 0; }
772
+ .puck-rich-text-content h3 { font-size: 1.17em; font-weight: 700; line-height: 1.3; margin: 0.83em 0; }
773
+ .puck-rich-text-content h4 { font-size: 1em; font-weight: 700; margin: 1em 0; }
774
+ .puck-rich-text-content h5 { font-size: 0.83em; font-weight: 700; margin: 1.17em 0; }
775
+ .puck-rich-text-content h6 { font-size: 0.75em; font-weight: 700; margin: 1.33em 0; }
776
+ .puck-rich-text-content p { margin: 1em 0; }
777
+ .puck-rich-text-content strong, .puck-rich-text-content b { font-weight: 700; }
778
+ .puck-rich-text-content em, .puck-rich-text-content i { font-style: italic; }
779
+ .puck-rich-text-content u { text-decoration: underline; }
780
+ .puck-rich-text-content s, .puck-rich-text-content del { text-decoration: line-through; }
781
+ .puck-rich-text-content ul { list-style: disc; margin: 1em 0; padding-left: 1.5em; }
782
+ .puck-rich-text-content ol { list-style: decimal; margin: 1em 0; padding-left: 1.5em; }
783
+ .puck-rich-text-content li { margin: 0.25em 0; }
784
+ .puck-rich-text-content a { color: #2563eb; text-decoration: underline; }
785
+ .puck-rich-text-content blockquote { margin: 1em 0; padding-left: 1em; border-left: 3px solid #d1d5db; color: #4b5563; }
786
+ .puck-rich-text-content code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(0,0,0,0.06); padding: 0.1em 0.3em; border-radius: 3px; font-size: 0.9em; }
787
+ .puck-rich-text-content pre { background: rgba(0,0,0,0.06); padding: 0.75em 1em; border-radius: 6px; overflow-x: auto; }
788
+ .puck-rich-text-content pre code { background: none; padding: 0; }
789
+ .puck-rich-text-content img { max-width: 100%; height: auto; }
790
+ .puck-rich-text-content hr { border: none; border-top: 1px solid #e5e7eb; margin: 1.5em 0; }
791
+ `.trim();
792
+ var RichTextContent = ({
793
+ html,
794
+ className,
795
+ style
796
+ }) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
797
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", { href: STYLE_ID, precedence: "default", children: RICH_TEXT_CSS }),
798
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
799
+ "div",
800
+ {
801
+ className: className ? `puck-rich-text-content ${className}` : "puck-rich-text-content",
802
+ style,
803
+ dangerouslySetInnerHTML: { __html: sanitizeHtml(html) }
804
+ }
805
+ )
806
+ ] });
807
+
808
+ // src/components/cms/shared.ts
809
+ var getLocalizedText = (obj) => {
810
+ if (!obj) return "";
811
+ return obj["en-US"] ?? obj["en"] ?? Object.values(obj)[0] ?? "";
812
+ };
813
+ var formatPrice = (centAmount, currencyCode = "USD", fractionDigits = 2) => {
814
+ const amount = centAmount / Math.pow(10, fractionDigits);
815
+ return new Intl.NumberFormat("en-US", {
816
+ style: "currency",
817
+ currency: currencyCode
818
+ }).format(amount);
819
+ };
820
+ var getFirstPrice = (product) => {
821
+ const p = product;
822
+ return p?.masterVariant?.prices?.[0]?.value ?? null;
823
+ };
824
+ var getProductImage = (product) => {
825
+ const p = product;
826
+ return p?.masterVariant?.images?.[0]?.url ?? null;
827
+ };
828
+ var getProductName = (product) => {
829
+ const p = product;
830
+ return getLocalizedText(p?.name) || "Product";
831
+ };
832
+ var getProductSlug = (product) => {
833
+ const p = product;
834
+ return getLocalizedText(p?.slug) || p?.id || "#";
835
+ };
836
+ var getProductSku = (product) => {
837
+ const p = product;
838
+ return p?.masterVariant?.sku ?? "";
839
+ };
840
+ var resolveProductLink = (product, linkWith = "sku", baseUrl = "/p/") => {
841
+ const p = product;
842
+ const slug = getLocalizedText(p?.slug);
843
+ const sku = getProductSku(product);
844
+ const id = p?.id ?? "";
845
+ const identifier = (linkWith === "sku" ? sku : slug) || id || slug || sku;
846
+ const base = "/" + String(baseUrl ?? "").trim().replace(/^\/+|\/+$/g, "").replace(/\/{2,}/g, "/");
847
+ const cleanId = String(identifier ?? "").trim().replace(/^\/+|\/+$/g, "");
848
+ return (cleanId ? `${base}/${cleanId}` : base).replace(/\/{2,}/g, "/");
849
+ };
850
+ var productLinkDefaults = {
851
+ linkWith: "sku",
852
+ baseUrl: "/p/"
853
+ };
854
+ var colors = {
855
+ primary: "#2c5530",
856
+ primaryHover: "#1e3a21",
857
+ lightBg: "#f0f7f0",
858
+ lightBorder: "#c8e6c8",
859
+ text: "#333",
860
+ textMuted: "#666",
861
+ border: "#eee",
862
+ bg: "#f5f5f5"
863
+ };
864
+
865
+ // src/components/Root.tsx
866
+ var import_react = __toESM(require("react"));
867
+ var CONTENT_WIDTHS = {
868
+ x: "256px",
869
+ "2x": "512px",
870
+ "3x": "768px",
871
+ "4x": "1024px",
872
+ "5x": "1280px",
873
+ "6x": "1536px",
874
+ full: "100%"
875
+ };
876
+ var renderRoot = ({
877
+ children,
878
+ backgroundColor,
879
+ contentWidth
880
+ }) => {
881
+ const maxWidth = CONTENT_WIDTHS[contentWidth] ?? "100%";
882
+ const isConstrained = maxWidth !== "100%";
883
+ return import_react.default.createElement(
884
+ "div",
885
+ {
886
+ style: {
887
+ background: backgroundColor ?? "#ffffff",
888
+ minHeight: "100vh",
889
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif'
890
+ }
891
+ },
892
+ import_react.default.createElement(
893
+ "div",
894
+ {
895
+ style: {
896
+ maxWidth,
897
+ // Centre the content column and give it breathing room on the sides
898
+ // when its width is constrained.
899
+ margin: "0 auto",
900
+ paddingLeft: isConstrained ? "24px" : void 0,
901
+ paddingRight: isConstrained ? "24px" : void 0,
902
+ boxSizing: "border-box"
903
+ }
904
+ },
905
+ children
906
+ )
907
+ );
908
+ };
909
+
910
+ // src/components/Hero.tsx
911
+ var import_jsx_runtime2 = require("react/jsx-runtime");
912
+ var renderHero = ({
913
+ heading,
914
+ headingFontSize,
915
+ subheading,
916
+ subheadingFontSize,
917
+ backgroundImage,
918
+ ctaText,
919
+ ctaUrl,
920
+ layout,
921
+ minHeight
922
+ }) => {
923
+ const isCenter = layout !== "left-aligned";
924
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
925
+ "section",
926
+ {
927
+ style: {
928
+ position: "relative",
929
+ minHeight: minHeight ?? "400px",
930
+ display: "flex",
931
+ alignItems: "center",
932
+ justifyContent: isCenter ? "center" : "flex-start",
933
+ padding: "48px 32px",
934
+ backgroundImage: backgroundImage ? `url(${backgroundImage})` : void 0,
935
+ backgroundSize: "cover",
936
+ backgroundPosition: "center",
937
+ backgroundColor: backgroundImage ? void 0 : "#1a1a2e",
938
+ color: "#fff",
939
+ boxSizing: "border-box"
940
+ },
941
+ children: [
942
+ backgroundImage && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
943
+ "div",
944
+ {
945
+ style: {
946
+ position: "absolute",
947
+ inset: 0,
948
+ background: "rgba(0,0,0,0.45)"
949
+ }
950
+ }
951
+ ),
952
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
953
+ "div",
954
+ {
955
+ style: {
956
+ position: "relative",
957
+ maxWidth: "720px",
958
+ textAlign: isCenter ? "center" : "left"
959
+ },
960
+ children: [
961
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("h1", { style: { margin: "0 0 16px", fontSize: headingFontSize || "2.5rem", fontWeight: 700 }, children: heading }),
962
+ subheading && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("p", { style: { margin: "0 0 24px", fontSize: subheadingFontSize || "1.2rem", opacity: 0.85 }, children: subheading }),
963
+ ctaText && ctaUrl && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
964
+ "a",
965
+ {
966
+ href: ctaUrl,
967
+ style: {
968
+ display: "inline-block",
969
+ padding: "12px 28px",
970
+ background: "#e94560",
971
+ color: "#fff",
972
+ borderRadius: "4px",
973
+ textDecoration: "none",
974
+ fontWeight: 600
975
+ },
976
+ children: ctaText
977
+ }
978
+ )
979
+ ]
980
+ }
981
+ )
982
+ ]
983
+ }
984
+ );
985
+ };
986
+
987
+ // src/components/RichText.tsx
988
+ var import_jsx_runtime3 = require("react/jsx-runtime");
989
+ var renderRichText = ({
990
+ content,
991
+ align,
992
+ maxWidth,
993
+ padding
994
+ }) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
995
+ RichTextContent,
996
+ {
997
+ html: content,
998
+ style: {
999
+ padding: padding ?? "32px",
1000
+ textAlign: align ?? "left",
1001
+ maxWidth,
1002
+ margin: maxWidth ? "0 auto" : void 0,
1003
+ boxSizing: "border-box"
1004
+ }
1005
+ }
1006
+ );
1007
+
1008
+ // src/components/Grid.tsx
1009
+ var import_puck = require("@measured/puck");
1010
+ var import_jsx_runtime4 = require("react/jsx-runtime");
1011
+ var renderGrid = ({
1012
+ columnCount = 2,
1013
+ rowCount = 1,
1014
+ gap = "16px",
1015
+ padding = "16px"
1016
+ }) => {
1017
+ const cols = Math.max(1, columnCount);
1018
+ const rows = Math.max(1, rowCount);
1019
+ const cells = Array.from({ length: cols * rows }, (_, i) => i);
1020
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1021
+ "div",
1022
+ {
1023
+ style: {
1024
+ display: "grid",
1025
+ gridTemplateColumns: `repeat(${cols}, 1fr)`,
1026
+ gridTemplateRows: `repeat(${rows}, minmax(40px, auto))`,
1027
+ gap,
1028
+ padding,
1029
+ boxSizing: "border-box"
1030
+ },
1031
+ children: cells.map((i) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_puck.DropZone, { zone: `cell-${i}` }) }, i))
1032
+ }
1033
+ );
1034
+ };
1035
+
1036
+ // src/components/Columns.tsx
1037
+ var import_puck2 = require("@measured/puck");
1038
+ var import_jsx_runtime5 = require("react/jsx-runtime");
1039
+ var renderColumns = ({
1040
+ columnCount = 2,
1041
+ gap = "16px",
1042
+ padding = "16px"
1043
+ }) => {
1044
+ const cols = Array.from({ length: columnCount }, (_, i) => i);
1045
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
1046
+ "div",
1047
+ {
1048
+ style: {
1049
+ display: "grid",
1050
+ gridTemplateColumns: `repeat(${columnCount}, 1fr)`,
1051
+ gap,
1052
+ padding,
1053
+ boxSizing: "border-box"
1054
+ },
1055
+ children: cols.map((i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_puck2.DropZone, { zone: `column-${i}` }) }, i))
1056
+ }
1057
+ );
1058
+ };
1059
+
1060
+ // src/components/Image.tsx
1061
+ var import_react_intl = require("react-intl");
1062
+ var import_jsx_runtime6 = require("react/jsx-runtime");
1063
+ var renderImage = ({
1064
+ src,
1065
+ alt,
1066
+ caption,
1067
+ width,
1068
+ height,
1069
+ objectFit,
1070
+ borderRadius,
1071
+ align
1072
+ }) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
1073
+ "figure",
1074
+ {
1075
+ style: {
1076
+ margin: 0,
1077
+ padding: "16px",
1078
+ textAlign: align ?? "center",
1079
+ boxSizing: "border-box"
1080
+ },
1081
+ children: [
1082
+ src ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1083
+ "img",
1084
+ {
1085
+ src,
1086
+ alt: alt ?? "",
1087
+ style: {
1088
+ width: width ?? "100%",
1089
+ height,
1090
+ objectFit: objectFit ?? "cover",
1091
+ borderRadius,
1092
+ display: "inline-block",
1093
+ maxWidth: "100%"
1094
+ }
1095
+ }
1096
+ ) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1097
+ "div",
1098
+ {
1099
+ style: {
1100
+ width: width ?? "100%",
1101
+ height: height ?? "200px",
1102
+ background: "#e0e0e0",
1103
+ display: "flex",
1104
+ alignItems: "center",
1105
+ justifyContent: "center",
1106
+ color: "#888",
1107
+ fontSize: "14px",
1108
+ borderRadius
1109
+ },
1110
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_intl.FormattedMessage, { id: "Editor.noImageSelected" })
1111
+ }
1112
+ ),
1113
+ caption && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
1114
+ "figcaption",
1115
+ {
1116
+ style: { marginTop: "8px", fontSize: "14px", color: "#666" },
1117
+ children: caption
1118
+ }
1119
+ )
1120
+ ]
1121
+ }
1122
+ );
1123
+
1124
+ // src/components/Button.tsx
1125
+ var import_jsx_runtime7 = require("react/jsx-runtime");
1126
+ var VARIANT_STYLES = {
1127
+ primary: { background: "#1a1a2e", color: "#fff", border: "2px solid #1a1a2e" },
1128
+ secondary: { background: "#e94560", color: "#fff", border: "2px solid #e94560" },
1129
+ outline: { background: "transparent", color: "#1a1a2e", border: "2px solid #1a1a2e" }
1130
+ };
1131
+ var SIZE_STYLES = {
1132
+ sm: { padding: "6px 16px", fontSize: "14px" },
1133
+ md: { padding: "10px 24px", fontSize: "16px" },
1134
+ lg: { padding: "14px 32px", fontSize: "18px" }
1135
+ };
1136
+ var renderButton = ({
1137
+ label,
1138
+ href,
1139
+ variant = "primary",
1140
+ size = "md",
1141
+ fontSize,
1142
+ align = "left",
1143
+ openInNewTab
1144
+ }) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { style: { padding: "12px 16px", textAlign: align, boxSizing: "border-box" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
1145
+ "a",
1146
+ {
1147
+ href: href ?? "#",
1148
+ target: openInNewTab ? "_blank" : void 0,
1149
+ rel: openInNewTab ? "noopener noreferrer" : void 0,
1150
+ style: {
1151
+ display: "inline-block",
1152
+ borderRadius: "4px",
1153
+ textDecoration: "none",
1154
+ fontWeight: 600,
1155
+ cursor: "pointer",
1156
+ ...VARIANT_STYLES[variant],
1157
+ ...SIZE_STYLES[size],
1158
+ ...fontSize ? { fontSize } : {}
1159
+ },
1160
+ children: label
1161
+ }
1162
+ ) });
1163
+
1164
+ // src/components/Card.tsx
1165
+ var import_jsx_runtime8 = require("react/jsx-runtime");
1166
+ var renderCard = ({
1167
+ title,
1168
+ titleFontSize,
1169
+ body,
1170
+ imageUrl,
1171
+ ctaText,
1172
+ ctaUrl,
1173
+ shadow,
1174
+ borderRadius
1175
+ }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1176
+ "div",
1177
+ {
1178
+ style: {
1179
+ border: "1px solid #e0e0e0",
1180
+ borderRadius: borderRadius ?? "8px",
1181
+ overflow: "hidden",
1182
+ boxShadow: shadow ? "0 2px 8px rgba(0,0,0,0.12)" : void 0,
1183
+ background: "#fff",
1184
+ margin: "8px",
1185
+ boxSizing: "border-box"
1186
+ },
1187
+ children: [
1188
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1189
+ "img",
1190
+ {
1191
+ src: imageUrl,
1192
+ alt: title,
1193
+ style: { width: "100%", height: "200px", objectFit: "cover", display: "block" }
1194
+ }
1195
+ ),
1196
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { padding: "16px" }, children: [
1197
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { style: { margin: "0 0 8px", fontSize: titleFontSize || "1.1rem" }, children: title }),
1198
+ body && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
1199
+ RichTextContent,
1200
+ {
1201
+ html: body,
1202
+ style: { margin: "0 0 16px", color: "#555", fontSize: "14px" }
1203
+ }
1204
+ ),
1205
+ ctaText && ctaUrl && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
1206
+ "a",
1207
+ {
1208
+ href: ctaUrl,
1209
+ style: {
1210
+ color: "#e94560",
1211
+ fontWeight: 600,
1212
+ textDecoration: "none",
1213
+ fontSize: "14px"
1214
+ },
1215
+ children: [
1216
+ ctaText,
1217
+ " \u2192"
1218
+ ]
1219
+ }
1220
+ )
1221
+ ] })
1222
+ ]
1223
+ }
1224
+ );
1225
+
1226
+ // src/components/Spacer.tsx
1227
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1228
+ var renderSpacer = ({
1229
+ height = "48px",
1230
+ showLine = false,
1231
+ lineColor = "#e0e0e0"
1232
+ }) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1233
+ "div",
1234
+ {
1235
+ style: {
1236
+ height,
1237
+ display: "flex",
1238
+ alignItems: "center",
1239
+ padding: "0 16px",
1240
+ boxSizing: "border-box"
1241
+ },
1242
+ children: showLine && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("hr", { style: { width: "100%", border: "none", borderTop: `1px solid ${lineColor}` } })
1243
+ }
1244
+ );
1245
+
1246
+ // src/components/ProductTeaser.tsx
1247
+ var import_react_intl2 = require("react-intl");
1248
+ var import_puck_api = require("@commercetools-demo/puck-api");
1249
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1250
+ var getLocalizedName = (name) => {
1251
+ if (!name) return "";
1252
+ return name["en"] ?? name["en-US"] ?? Object.values(name)[0] ?? "";
1253
+ };
1254
+ var formatPrice2 = (centAmount, currencyCode, fractionDigits) => {
1255
+ const amount = centAmount / Math.pow(10, fractionDigits);
1256
+ return `${currencyCode} ${amount.toFixed(fractionDigits)}`;
1257
+ };
1258
+ var renderProductTeaser = ({ datasource, richText, linkWith, baseUrl }) => {
1259
+ const hasPreResolved = datasource?.resolvedData != null;
1260
+ const { data: fetchedData, loading, error } = (0, import_puck_api.useDatasource)(
1261
+ hasPreResolved ? void 0 : datasource?.type,
1262
+ hasPreResolved ? [] : datasource?.skus ?? []
1263
+ );
1264
+ const data = hasPreResolved ? datasource.resolvedData : fetchedData;
1265
+ const product = data ? Array.isArray(data) ? data[0] ?? null : data : null;
1266
+ const imageUrl = product?.masterVariant?.images?.[0]?.url;
1267
+ const priceValue = product?.masterVariant?.prices?.[0]?.value;
1268
+ const productName = getLocalizedName(product?.name);
1269
+ const href = product ? resolveProductLink(product, linkWith, baseUrl) : void 0;
1270
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1271
+ "div",
1272
+ {
1273
+ style: {
1274
+ display: "flex",
1275
+ gap: "24px",
1276
+ padding: "16px",
1277
+ alignItems: "flex-start",
1278
+ fontFamily: "inherit"
1279
+ },
1280
+ children: [
1281
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { flexShrink: 0, width: "200px" }, children: loading ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1282
+ "div",
1283
+ {
1284
+ style: {
1285
+ width: "200px",
1286
+ height: "200px",
1287
+ background: "#f3f4f6",
1288
+ borderRadius: "8px",
1289
+ display: "flex",
1290
+ alignItems: "center",
1291
+ justifyContent: "center",
1292
+ color: "#9ca3af",
1293
+ fontSize: "13px"
1294
+ },
1295
+ children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_intl2.FormattedMessage, { id: "Editor.loading" })
1296
+ }
1297
+ ) : imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("a", { href, style: { display: "block" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1298
+ "img",
1299
+ {
1300
+ src: imageUrl,
1301
+ alt: productName,
1302
+ style: {
1303
+ width: "200px",
1304
+ height: "200px",
1305
+ objectFit: "cover",
1306
+ borderRadius: "8px",
1307
+ display: "block"
1308
+ }
1309
+ }
1310
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1311
+ "div",
1312
+ {
1313
+ style: {
1314
+ width: "200px",
1315
+ height: "200px",
1316
+ background: "#f3f4f6",
1317
+ borderRadius: "8px",
1318
+ display: "flex",
1319
+ alignItems: "center",
1320
+ justifyContent: "center",
1321
+ color: "#9ca3af",
1322
+ fontSize: "13px"
1323
+ },
1324
+ children: error ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_intl2.FormattedMessage, { id: "Editor.errorLoadingProduct" }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_intl2.FormattedMessage, { id: "Editor.noProductSelected" })
1325
+ }
1326
+ ) }),
1327
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1328
+ "div",
1329
+ {
1330
+ style: {
1331
+ display: "flex",
1332
+ flexDirection: "column",
1333
+ gap: "12px",
1334
+ flex: 1,
1335
+ minWidth: 0
1336
+ },
1337
+ children: [
1338
+ richText ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(RichTextContent, { html: richText }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { style: { color: "#9ca3af", fontSize: "13px" }, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_intl2.FormattedMessage, { id: "Editor.noDescription" }) }),
1339
+ priceValue && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1340
+ "div",
1341
+ {
1342
+ style: {
1343
+ fontSize: "20px",
1344
+ fontWeight: 700,
1345
+ color: "#111827"
1346
+ },
1347
+ children: formatPrice2(
1348
+ priceValue.centAmount,
1349
+ priceValue.currencyCode,
1350
+ priceValue.fractionDigits
1351
+ )
1352
+ }
1353
+ )
1354
+ ]
1355
+ }
1356
+ )
1357
+ ]
1358
+ }
1359
+ );
1360
+ };
1361
+
1362
+ // src/components/cms/HeroBanner.tsx
1363
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1364
+ var renderHeroBanner = ({ title, subtitle, image }) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1365
+ "div",
1366
+ {
1367
+ style: {
1368
+ position: "relative",
1369
+ width: "100%",
1370
+ paddingBottom: "56.25%",
1371
+ overflow: "hidden",
1372
+ backgroundColor: "#f0f0f0"
1373
+ },
1374
+ children: [
1375
+ image && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1376
+ "img",
1377
+ {
1378
+ src: image,
1379
+ alt: title || "Hero banner",
1380
+ style: {
1381
+ position: "absolute",
1382
+ top: 0,
1383
+ left: 0,
1384
+ width: "100%",
1385
+ height: "100%",
1386
+ objectFit: "cover",
1387
+ objectPosition: "center"
1388
+ }
1389
+ }
1390
+ ),
1391
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1392
+ "div",
1393
+ {
1394
+ style: {
1395
+ position: "absolute",
1396
+ top: 0,
1397
+ left: 0,
1398
+ width: "100%",
1399
+ height: "100%",
1400
+ background: "rgba(0,0,0,0.3)",
1401
+ zIndex: 1
1402
+ }
1403
+ }
1404
+ ),
1405
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1406
+ "div",
1407
+ {
1408
+ style: {
1409
+ position: "absolute",
1410
+ top: "50%",
1411
+ left: "50%",
1412
+ transform: "translate(-50%,-50%)",
1413
+ textAlign: "center",
1414
+ color: "white",
1415
+ zIndex: 2,
1416
+ padding: "2rem",
1417
+ maxWidth: "90%"
1418
+ },
1419
+ children: [
1420
+ title && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1421
+ "h1",
1422
+ {
1423
+ style: {
1424
+ fontSize: "3rem",
1425
+ fontWeight: "bold",
1426
+ margin: "0 0 1rem 0",
1427
+ textShadow: "2px 2px 4px rgba(0,0,0,0.7)"
1428
+ },
1429
+ children: title
1430
+ }
1431
+ ),
1432
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1433
+ "p",
1434
+ {
1435
+ style: {
1436
+ fontSize: "1.25rem",
1437
+ margin: 0,
1438
+ textShadow: "1px 1px 2px rgba(0,0,0,0.7)",
1439
+ opacity: 0.95
1440
+ },
1441
+ children: subtitle
1442
+ }
1443
+ )
1444
+ ]
1445
+ }
1446
+ )
1447
+ ]
1448
+ }
1449
+ );
1450
+
1451
+ // src/components/cms/TextBlock.tsx
1452
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1453
+ var renderTextBlock = ({ content }) => {
1454
+ if (!content) return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_jsx_runtime12.Fragment, {});
1455
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1456
+ RichTextContent,
1457
+ {
1458
+ html: content,
1459
+ style: {
1460
+ maxWidth: "720px",
1461
+ margin: "0 auto",
1462
+ padding: "1.5rem 1rem",
1463
+ lineHeight: 1.6,
1464
+ color: "#333"
1465
+ }
1466
+ }
1467
+ );
1468
+ };
1469
+
1470
+ // src/components/cms/CategoryGrid.tsx
1471
+ var import_react_intl3 = require("react-intl");
1472
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1473
+ var renderCategoryGrid = (props) => {
1474
+ const categories = [
1475
+ [props.category1Image, props.category1Label, props.category1Link],
1476
+ [props.category2Image, props.category2Label, props.category2Link],
1477
+ [props.category3Image, props.category3Label, props.category3Link],
1478
+ [props.category4Image, props.category4Label, props.category4Link]
1479
+ ].filter(([, label, link]) => label && link);
1480
+ if (categories.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { padding: "2rem", textAlign: "center", color: "#999", fontSize: "13px" }, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_intl3.FormattedMessage, { id: "Editor.noCategoriesConfigured" }) });
1481
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1482
+ "div",
1483
+ {
1484
+ style: {
1485
+ display: "grid",
1486
+ gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
1487
+ gap: "1.5rem",
1488
+ padding: "2rem 1rem"
1489
+ },
1490
+ children: categories.map(([image, label, link], i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1491
+ "a",
1492
+ {
1493
+ href: link,
1494
+ style: {
1495
+ display: "block",
1496
+ textAlign: "center",
1497
+ textDecoration: "none",
1498
+ color: "inherit",
1499
+ borderRadius: "8px",
1500
+ overflow: "hidden",
1501
+ boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
1502
+ },
1503
+ children: [
1504
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { aspectRatio: "1", background: "#f0f0f0", overflow: "hidden" }, children: image && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1505
+ "img",
1506
+ {
1507
+ src: image,
1508
+ alt: label,
1509
+ style: { width: "100%", height: "100%", objectFit: "cover" }
1510
+ }
1511
+ ) }),
1512
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1513
+ "span",
1514
+ {
1515
+ style: {
1516
+ display: "block",
1517
+ padding: "1rem",
1518
+ fontWeight: 600,
1519
+ color: "#333"
1520
+ },
1521
+ children: label
1522
+ }
1523
+ )
1524
+ ]
1525
+ },
1526
+ i
1527
+ ))
1528
+ }
1529
+ );
1530
+ };
1531
+
1532
+ // src/components/cms/CategoryHero.tsx
1533
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1534
+ var renderCategoryHero = ({ title, subtitle, image, ctaText, ctaLink }) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1535
+ "div",
1536
+ {
1537
+ style: {
1538
+ position: "relative",
1539
+ minHeight: "220px",
1540
+ display: "flex",
1541
+ alignItems: "center",
1542
+ justifyContent: "center",
1543
+ background: "#f0f0f0",
1544
+ borderRadius: "8px",
1545
+ overflow: "hidden",
1546
+ margin: "1rem 0"
1547
+ },
1548
+ children: [
1549
+ image && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1550
+ "img",
1551
+ {
1552
+ src: image,
1553
+ alt: title || "Category",
1554
+ style: {
1555
+ position: "absolute",
1556
+ top: 0,
1557
+ left: 0,
1558
+ width: "100%",
1559
+ height: "100%",
1560
+ objectFit: "cover",
1561
+ opacity: 0.85
1562
+ }
1563
+ }
1564
+ ),
1565
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { style: { position: "absolute", inset: 0, background: "rgba(0,0,0,0.25)" } }),
1566
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1567
+ "div",
1568
+ {
1569
+ style: {
1570
+ position: "relative",
1571
+ zIndex: 1,
1572
+ textAlign: "center",
1573
+ padding: "2rem",
1574
+ color: "white",
1575
+ textShadow: "0 1px 3px rgba(0,0,0,0.5)"
1576
+ },
1577
+ children: [
1578
+ title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h1", { style: { fontSize: "2.5rem", marginBottom: "0.5rem" }, children: title }),
1579
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { style: { fontSize: "1.1rem", marginBottom: "1rem" }, children: subtitle }),
1580
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1581
+ "a",
1582
+ {
1583
+ href: ctaLink,
1584
+ style: {
1585
+ display: "inline-block",
1586
+ background: "white",
1587
+ color: "#2c5530",
1588
+ padding: "0.75rem 2rem",
1589
+ borderRadius: "4px",
1590
+ textDecoration: "none",
1591
+ fontWeight: 600
1592
+ },
1593
+ children: ctaText
1594
+ }
1595
+ )
1596
+ ]
1597
+ }
1598
+ )
1599
+ ]
1600
+ }
1601
+ );
1602
+
1603
+ // src/components/cms/CheckoutPromoBanner.tsx
1604
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1605
+ var renderCheckoutPromoBanner = ({ title, message, ctaText, ctaLink }) => {
1606
+ if (!title && !message && !ctaText) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, {});
1607
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1608
+ "div",
1609
+ {
1610
+ style: {
1611
+ padding: "1rem 1.25rem",
1612
+ background: "#f0f7f0",
1613
+ border: "1px solid #c8e6c8",
1614
+ borderRadius: "4px",
1615
+ marginBottom: "1rem",
1616
+ fontSize: "0.95rem"
1617
+ },
1618
+ children: [
1619
+ title && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { fontWeight: 600, color: "#2c5530", marginBottom: "0.25rem" }, children: title }),
1620
+ message && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { style: { margin: "0 0 0.5rem 0", color: "#333" }, children: message }),
1621
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("a", { href: ctaLink, style: { color: "#2c5530", fontWeight: 600, textDecoration: "none" }, children: ctaText })
1622
+ ]
1623
+ }
1624
+ );
1625
+ };
1626
+
1627
+ // src/components/cms/CountdownBanner.tsx
1628
+ var import_react2 = require("react");
1629
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1630
+ var calcTimeLeft = (endDate) => {
1631
+ if (!endDate) return "";
1632
+ const end = new Date(endDate);
1633
+ const now = /* @__PURE__ */ new Date();
1634
+ if (end <= now) return "Offer ended";
1635
+ const diff = end.getTime() - now.getTime();
1636
+ const d = Math.floor(diff / 864e5);
1637
+ const h = Math.floor(diff % 864e5 / 36e5);
1638
+ const m = Math.floor(diff % 36e5 / 6e4);
1639
+ const s = Math.floor(diff % 6e4 / 1e3);
1640
+ if (d > 0) return `${d}d ${h}h ${m}m left`;
1641
+ if (h > 0) return `${h}h ${m}m ${s}s left`;
1642
+ return `${m}m ${s}s left`;
1643
+ };
1644
+ var renderCountdownBanner = ({ headline, subline, endDate, ctaText, ctaLink, background }) => {
1645
+ const [timeLeft, setTimeLeft] = (0, import_react2.useState)(() => calcTimeLeft(endDate));
1646
+ (0, import_react2.useEffect)(() => {
1647
+ if (!endDate) return;
1648
+ const id = setInterval(() => setTimeLeft(calcTimeLeft(endDate)), 1e3);
1649
+ return () => clearInterval(id);
1650
+ }, [endDate]);
1651
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
1652
+ "div",
1653
+ {
1654
+ style: {
1655
+ background: background || "#2c5530",
1656
+ color: "white",
1657
+ padding: "2rem 1rem",
1658
+ textAlign: "center",
1659
+ borderRadius: "4px",
1660
+ margin: "1rem 0"
1661
+ },
1662
+ children: [
1663
+ headline && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("h2", { style: { fontSize: "1.75rem", marginBottom: "0.5rem" }, children: headline }),
1664
+ subline && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: { fontSize: "1rem", opacity: 0.9, marginBottom: "1rem" }, children: subline }),
1665
+ timeLeft && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { style: { fontSize: "1.25rem", fontWeight: 600, margin: "0 0 1rem 0", letterSpacing: "0.05em" }, children: timeLeft }),
1666
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1667
+ "a",
1668
+ {
1669
+ href: ctaLink,
1670
+ style: {
1671
+ display: "inline-block",
1672
+ background: "white",
1673
+ color: "#2c5530",
1674
+ padding: "0.75rem 2rem",
1675
+ borderRadius: "4px",
1676
+ textDecoration: "none",
1677
+ fontWeight: 600
1678
+ },
1679
+ children: ctaText
1680
+ }
1681
+ )
1682
+ ]
1683
+ }
1684
+ );
1685
+ };
1686
+
1687
+ // src/components/cms/CrossSellBlock.tsx
1688
+ var import_react_intl4 = require("react-intl");
1689
+ var import_puck_api2 = require("@commercetools-demo/puck-api");
1690
+ var import_jsx_runtime17 = require("react/jsx-runtime");
1691
+ var renderCrossSellBlock = ({ title, products, ctaText, linkWith, baseUrl }) => {
1692
+ const hasPreResolved = products?.resolvedData != null;
1693
+ const { data: fetchedData, loading } = (0, import_puck_api2.useDatasource)(
1694
+ hasPreResolved ? void 0 : products?.type,
1695
+ hasPreResolved ? [] : products?.skus ?? []
1696
+ );
1697
+ const items = hasPreResolved ? Array.isArray(products.resolvedData) ? products.resolvedData : [] : Array.isArray(fetchedData) ? fetchedData : [];
1698
+ if (!loading && items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_jsx_runtime17.Fragment, {});
1699
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { style: { padding: "2rem 0", borderTop: "1px solid #eee" }, children: [
1700
+ title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { style: { fontSize: "1.5rem", marginBottom: "1.5rem", color: "#333" }, children: title || "Frequently bought together" }),
1701
+ loading && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { color: "#999", padding: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_intl4.FormattedMessage, { id: "Editor.loading" }) }),
1702
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1703
+ "div",
1704
+ {
1705
+ style: {
1706
+ display: "grid",
1707
+ gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
1708
+ gap: "1rem"
1709
+ },
1710
+ children: items.map((product, i) => {
1711
+ const name = getLocalizedText(product?.name);
1712
+ const imageUrl = getProductImage(product);
1713
+ const priceVal = getFirstPrice(product);
1714
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
1715
+ "a",
1716
+ {
1717
+ href: resolveProductLink(product, linkWith, baseUrl),
1718
+ style: {
1719
+ textAlign: "center",
1720
+ textDecoration: "none",
1721
+ color: "inherit",
1722
+ padding: "1rem",
1723
+ borderRadius: "8px",
1724
+ border: "1px solid #eee"
1725
+ },
1726
+ children: [
1727
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { height: "120px", marginBottom: "0.75rem", display: "flex", alignItems: "center", justifyContent: "center", background: "#f9f9f9", borderRadius: "4px" }, children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("img", { src: imageUrl, alt: name, style: { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } }) : null }),
1728
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontWeight: 600, fontSize: "0.95rem", marginBottom: "0.25rem" }, children: name }),
1729
+ priceVal && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { fontSize: "1.1rem", color: "#2c5530", fontWeight: "bold" }, children: formatPrice(priceVal.centAmount, priceVal.currencyCode, priceVal.fractionDigits) })
1730
+ ]
1731
+ },
1732
+ product?.id ?? i
1733
+ );
1734
+ })
1735
+ }
1736
+ ),
1737
+ ctaText && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("a", { href: "#", style: { display: "inline-block", marginTop: "1rem", color: "#2c5530", fontWeight: 600, textDecoration: "none" }, children: ctaText })
1738
+ ] });
1739
+ };
1740
+
1741
+ // src/components/cms/DeliveryMessage.tsx
1742
+ var import_jsx_runtime18 = require("react/jsx-runtime");
1743
+ var renderDeliveryMessage = ({ message, threshold }) => {
1744
+ if (!message) return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, {});
1745
+ const text = threshold ? message.replace(/\$\d+/g, `$${threshold}`) : message;
1746
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
1747
+ "div",
1748
+ {
1749
+ style: {
1750
+ padding: "0.75rem 1rem",
1751
+ background: "#f0f7f0",
1752
+ borderRadius: "4px",
1753
+ fontSize: "0.95rem",
1754
+ color: "#2c5530"
1755
+ },
1756
+ children: text
1757
+ }
1758
+ );
1759
+ };
1760
+
1761
+ // src/components/cms/Divider.tsx
1762
+ var import_jsx_runtime19 = require("react/jsx-runtime");
1763
+ var renderDivider = ({
1764
+ lineStyle,
1765
+ spacing
1766
+ }) => {
1767
+ const s = parseInt(spacing, 10) || 24;
1768
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
1769
+ "hr",
1770
+ {
1771
+ style: {
1772
+ border: "none",
1773
+ borderTop: `1px ${lineStyle} #ddd`,
1774
+ margin: `${s / 2}px 0`
1775
+ }
1776
+ }
1777
+ );
1778
+ };
1779
+
1780
+ // src/components/cms/EmptyState.tsx
1781
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1782
+ var renderEmptyState = ({ image, title, description, ctaText, ctaLink }) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { style: { textAlign: "center", padding: "3rem 1rem" }, children: [
1783
+ image && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1784
+ "img",
1785
+ {
1786
+ src: image,
1787
+ alt: title || "Empty state",
1788
+ style: { maxWidth: "200px", height: "auto", marginBottom: "1.5rem", opacity: 0.8 }
1789
+ }
1790
+ ),
1791
+ title && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("h2", { style: { fontSize: "1.5rem", color: "#333", marginBottom: "0.5rem" }, children: title }),
1792
+ description && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { style: { color: "#666", marginBottom: "1.5rem", maxWidth: "400px", margin: "0 auto 1.5rem" }, children: description }),
1793
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1794
+ "a",
1795
+ {
1796
+ href: ctaLink,
1797
+ style: {
1798
+ display: "inline-block",
1799
+ background: "#2c5530",
1800
+ color: "white",
1801
+ padding: "0.75rem 2rem",
1802
+ borderRadius: "4px",
1803
+ textDecoration: "none",
1804
+ fontWeight: 600
1805
+ },
1806
+ children: ctaText
1807
+ }
1808
+ )
1809
+ ] });
1810
+
1811
+ // src/components/cms/FAQAccordion.tsx
1812
+ var import_react3 = require("react");
1813
+ var import_react_intl5 = require("react-intl");
1814
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1815
+ var renderFAQAccordion = (props) => {
1816
+ const items = [
1817
+ [props.question1, props.answer1],
1818
+ [props.question2, props.answer2],
1819
+ [props.question3, props.answer3],
1820
+ [props.question4, props.answer4]
1821
+ ].filter(([q]) => q);
1822
+ const [open, setOpen] = (0, import_react3.useState)(null);
1823
+ if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { padding: "1rem", color: "#999", fontSize: "13px" }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_intl5.FormattedMessage, { id: "Editor.noFaqItemsConfigured" }) });
1824
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { style: { border: "1px solid #eee", borderRadius: "8px", overflow: "hidden" }, children: items.map(([question, answer], i) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { style: { borderBottom: i < items.length - 1 ? "1px solid #eee" : "none" }, children: [
1825
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
1826
+ "button",
1827
+ {
1828
+ onClick: () => setOpen(open === i ? null : i),
1829
+ style: {
1830
+ width: "100%",
1831
+ padding: "1rem 1.25rem",
1832
+ textAlign: "left",
1833
+ fontWeight: 600,
1834
+ fontSize: "1rem",
1835
+ background: "#fafafa",
1836
+ border: "none",
1837
+ cursor: "pointer",
1838
+ display: "flex",
1839
+ justifyContent: "space-between",
1840
+ alignItems: "center"
1841
+ },
1842
+ children: [
1843
+ question,
1844
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { fontSize: "1.2rem", lineHeight: 1 }, children: open === i ? "\u2212" : "+" })
1845
+ ]
1846
+ }
1847
+ ),
1848
+ open === i && answer && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1849
+ RichTextContent,
1850
+ {
1851
+ html: answer,
1852
+ style: {
1853
+ padding: "1rem 1.25rem",
1854
+ background: "white",
1855
+ fontSize: "0.95rem",
1856
+ lineHeight: 1.5,
1857
+ color: "#555"
1858
+ }
1859
+ }
1860
+ )
1861
+ ] }, i)) });
1862
+ };
1863
+
1864
+ // src/components/cms/FooterBlock.tsx
1865
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1866
+ var renderFooterBlock = ({ column1, column2, column3, copyright }) => {
1867
+ const columns = [column1, column2, column3].filter(Boolean);
1868
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("footer", { style: { background: "#333", color: "#eee", padding: "2rem 1rem", marginTop: "3rem" }, children: [
1869
+ columns.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1870
+ "div",
1871
+ {
1872
+ style: {
1873
+ display: "grid",
1874
+ gridTemplateColumns: `repeat(${columns.length}, 1fr)`,
1875
+ gap: "2rem",
1876
+ maxWidth: "1200px",
1877
+ margin: "0 auto 2rem"
1878
+ },
1879
+ children: columns.map((html, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
1880
+ RichTextContent,
1881
+ {
1882
+ html,
1883
+ style: { fontSize: "0.9rem", lineHeight: 1.6 }
1884
+ },
1885
+ i
1886
+ ))
1887
+ }
1888
+ ),
1889
+ copyright && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { style: { textAlign: "center", fontSize: "0.85rem", color: "#999", margin: 0 }, children: copyright })
1890
+ ] });
1891
+ };
1892
+
1893
+ // src/components/cms/ImageBlock.tsx
1894
+ var import_react_intl6 = require("react-intl");
1895
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1896
+ var renderImageBlock = ({ image, caption, link }) => {
1897
+ if (!image) return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { style: { padding: "2rem", textAlign: "center", color: "#999", background: "#f5f5f5", borderRadius: "4px" }, children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react_intl6.FormattedMessage, { id: "Editor.noImageSelected" }) });
1898
+ const img = /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1899
+ "img",
1900
+ {
1901
+ src: image,
1902
+ alt: caption || "Image",
1903
+ style: { maxWidth: "100%", height: "auto", borderRadius: "4px" }
1904
+ }
1905
+ );
1906
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("figure", { style: { margin: "1rem 0", textAlign: "center" }, children: [
1907
+ link ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("a", { href: link, style: { display: "inline-block" }, children: img }) : img,
1908
+ caption && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("figcaption", { style: { marginTop: "0.5rem", fontSize: "0.9rem", color: "#666" }, children: caption })
1909
+ ] });
1910
+ };
1911
+
1912
+ // src/components/cms/NewsletterSignup.tsx
1913
+ var import_react_intl7 = require("react-intl");
1914
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1915
+ var renderNewsletterSignup = ({ title, subtitle, ctaText, placeholder }) => {
1916
+ const intl = (0, import_react_intl7.useIntl)();
1917
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1918
+ "div",
1919
+ {
1920
+ style: {
1921
+ textAlign: "center",
1922
+ padding: "2rem 1rem",
1923
+ background: "#f5f5f5",
1924
+ borderRadius: "8px",
1925
+ maxWidth: "480px",
1926
+ margin: "0 auto"
1927
+ },
1928
+ children: [
1929
+ title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("h3", { style: { fontSize: "1.5rem", marginBottom: "0.5rem", color: "#333" }, children: title }),
1930
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { style: { fontSize: "0.95rem", color: "#666", marginBottom: "1.5rem" }, children: subtitle }),
1931
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
1932
+ "form",
1933
+ {
1934
+ onSubmit: (e) => e.preventDefault(),
1935
+ style: { display: "flex", gap: "0.5rem", flexWrap: "wrap", justifyContent: "center" },
1936
+ children: [
1937
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1938
+ "input",
1939
+ {
1940
+ type: "email",
1941
+ placeholder,
1942
+ "aria-label": intl.formatMessage({ id: "Editor.newsletterEmailAria" }),
1943
+ style: {
1944
+ padding: "0.75rem 1rem",
1945
+ border: "1px solid #ddd",
1946
+ borderRadius: "4px",
1947
+ fontSize: "1rem",
1948
+ minWidth: "200px"
1949
+ }
1950
+ }
1951
+ ),
1952
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1953
+ "button",
1954
+ {
1955
+ type: "submit",
1956
+ style: {
1957
+ padding: "0.75rem 1.5rem",
1958
+ background: "#2c5530",
1959
+ color: "white",
1960
+ border: "none",
1961
+ borderRadius: "4px",
1962
+ fontWeight: 600,
1963
+ cursor: "pointer"
1964
+ },
1965
+ children: ctaText || "Subscribe"
1966
+ }
1967
+ )
1968
+ ]
1969
+ }
1970
+ )
1971
+ ]
1972
+ }
1973
+ );
1974
+ };
1975
+
1976
+ // src/components/cms/ProductBanner.tsx
1977
+ var import_react_intl8 = require("react-intl");
1978
+ var import_puck_api3 = require("@commercetools-demo/puck-api");
1979
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1980
+ var renderProductBanner = ({
1981
+ title,
1982
+ description,
1983
+ ctaText,
1984
+ ctaLink,
1985
+ product,
1986
+ productOnLeft,
1987
+ background,
1988
+ linkWith,
1989
+ baseUrl
1990
+ }) => {
1991
+ const hasPreResolved = product?.resolvedData != null;
1992
+ const { data: fetchedData, loading } = (0, import_puck_api3.useDatasource)(
1993
+ hasPreResolved ? void 0 : product?.type,
1994
+ hasPreResolved ? [] : product?.skus ?? []
1995
+ );
1996
+ const raw = hasPreResolved ? product.resolvedData : fetchedData;
1997
+ const p = raw;
1998
+ const name = getLocalizedText(p?.name);
1999
+ const description2 = getLocalizedText(p?.description);
2000
+ const imageUrl = p?.masterVariant?.images?.[0]?.url;
2001
+ const sku = p?.masterVariant?.sku;
2002
+ const priceVal = getFirstPrice(p);
2003
+ const productHref = p ? resolveProductLink(p, linkWith, baseUrl) : void 0;
2004
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
2005
+ "div",
2006
+ {
2007
+ style: {
2008
+ display: "flex",
2009
+ alignItems: "center",
2010
+ minHeight: "400px",
2011
+ backgroundColor: background || "#f5f5f5",
2012
+ padding: "2rem",
2013
+ borderRadius: "2px",
2014
+ margin: "1rem 0",
2015
+ gap: "2rem",
2016
+ flexDirection: productOnLeft ? "row-reverse" : "row",
2017
+ flexWrap: "wrap"
2018
+ },
2019
+ children: [
2020
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { flex: 1, minWidth: "200px" }, children: [
2021
+ title && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { style: { fontSize: "2rem", fontWeight: "bold", marginBottom: "1rem", color: "#333" }, children: title }),
2022
+ description && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2023
+ RichTextContent,
2024
+ {
2025
+ html: description,
2026
+ style: { marginBottom: "2rem", color: "#555", lineHeight: 1.6 }
2027
+ }
2028
+ ),
2029
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2030
+ "a",
2031
+ {
2032
+ href: ctaLink,
2033
+ style: {
2034
+ display: "inline-block",
2035
+ backgroundColor: "#2c5530",
2036
+ color: "white",
2037
+ padding: "0.75rem 2rem",
2038
+ borderRadius: "2px",
2039
+ textDecoration: "none",
2040
+ fontWeight: 600
2041
+ },
2042
+ children: ctaText
2043
+ }
2044
+ )
2045
+ ] }),
2046
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { style: { flex: 1, minWidth: "200px", display: "flex", flexDirection: "column", alignItems: "center" }, children: [
2047
+ loading && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { color: "#999", padding: "2rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_intl8.FormattedMessage, { id: "Editor.loadingProduct" }) }),
2048
+ name && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("a", { href: productHref, style: { textDecoration: "none", color: "inherit" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h3", { style: { fontSize: "1.5rem", fontWeight: 600, marginBottom: "0.5rem", textAlign: "center" }, children: name }) }),
2049
+ description2 && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("p", { style: { fontSize: "0.9rem", color: "#666", textAlign: "center", marginBottom: "1rem", fontStyle: "italic" }, children: description2 }),
2050
+ imageUrl && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("a", { href: productHref, style: { display: "block", marginBottom: "1rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2051
+ "img",
2052
+ {
2053
+ src: imageUrl,
2054
+ alt: name || "Product",
2055
+ style: { maxWidth: "100%", maxHeight: "300px", objectFit: "cover", borderRadius: "2px", boxShadow: "0 4px 12px rgba(0,0,0,0.1)", display: "block" }
2056
+ }
2057
+ ) }),
2058
+ priceVal && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2059
+ "span",
2060
+ {
2061
+ style: {
2062
+ fontSize: "1.25rem",
2063
+ fontWeight: "bold",
2064
+ color: "#2c5530",
2065
+ background: "rgba(255,255,255,0.8)",
2066
+ padding: "0.5rem 1rem",
2067
+ borderRadius: "2px",
2068
+ marginBottom: "0.5rem"
2069
+ },
2070
+ children: formatPrice(priceVal.centAmount, priceVal.currencyCode, priceVal.fractionDigits)
2071
+ }
2072
+ ),
2073
+ sku && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { style: { fontSize: "0.85rem", color: "#666", background: "rgba(255,255,255,0.6)", padding: "0.25rem 0.75rem", borderRadius: "2px" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_intl8.FormattedMessage, { id: "Editor.skuLabel", values: { sku } }) }),
2074
+ !loading && !p && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { style: { color: "#999", fontSize: "13px", padding: "2rem", textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react_intl8.FormattedMessage, { id: "Editor.noProductSelected" }) })
2075
+ ] })
2076
+ ]
2077
+ }
2078
+ );
2079
+ };
2080
+
2081
+ // src/components/cms/ProductGridHeader.tsx
2082
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2083
+ var renderProductGridHeader = ({ title, description }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: { marginBottom: "2rem", padding: "0 1rem" }, children: [
2084
+ title && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("h1", { style: { fontSize: "2rem", fontWeight: "bold", color: "#333", marginBottom: "0.75rem" }, children: title }),
2085
+ description && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2086
+ RichTextContent,
2087
+ {
2088
+ html: description,
2089
+ style: { fontSize: "1rem", color: "#666", lineHeight: 1.5, maxWidth: "720px" }
2090
+ }
2091
+ )
2092
+ ] });
2093
+
2094
+ // src/components/cms/ProductSlider.tsx
2095
+ var import_react_intl9 = require("react-intl");
2096
+ var import_puck_api4 = require("@commercetools-demo/puck-api");
2097
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2098
+ var renderProductSlider = ({ title, subtitle, products, linkWith, baseUrl }) => {
2099
+ const hasPreResolved = products?.resolvedData != null;
2100
+ const { data: fetchedData, loading } = (0, import_puck_api4.useDatasource)(
2101
+ hasPreResolved ? void 0 : products?.type,
2102
+ hasPreResolved ? [] : products?.skus ?? []
2103
+ );
2104
+ const items = hasPreResolved ? Array.isArray(products.resolvedData) ? products.resolvedData : [] : Array.isArray(fetchedData) ? fetchedData : [];
2105
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { padding: "2rem 0" }, children: [
2106
+ (title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { textAlign: "center", marginBottom: "1.5rem" }, children: [
2107
+ title && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h2", { style: { fontSize: "2rem", fontWeight: "bold", color: "#333", marginBottom: "0.5rem" }, children: title }),
2108
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { style: { fontSize: "1.1rem", color: "#666", margin: 0 }, children: subtitle })
2109
+ ] }),
2110
+ loading && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { textAlign: "center", color: "#999", padding: "2rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_intl9.FormattedMessage, { id: "Editor.loadingProducts" }) }),
2111
+ !loading && items.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { textAlign: "center", color: "#999", padding: "2rem", fontSize: "13px" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_intl9.FormattedMessage, { id: "Editor.noProductsConfigured" }) }),
2112
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2113
+ "div",
2114
+ {
2115
+ style: {
2116
+ display: "flex",
2117
+ gap: "1rem",
2118
+ overflowX: "auto",
2119
+ scrollSnapType: "x mandatory",
2120
+ paddingBottom: "1rem"
2121
+ },
2122
+ children: items.map((product, i) => {
2123
+ const name = getLocalizedText(product?.name);
2124
+ const desc = getLocalizedText(product?.description);
2125
+ const imageUrl = getProductImage(product);
2126
+ const priceVal = getFirstPrice(product);
2127
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
2128
+ "a",
2129
+ {
2130
+ href: resolveProductLink(product, linkWith, baseUrl),
2131
+ style: {
2132
+ flex: "0 0 280px",
2133
+ background: "white",
2134
+ borderRadius: "12px",
2135
+ boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
2136
+ overflow: "hidden",
2137
+ textDecoration: "none",
2138
+ color: "inherit",
2139
+ scrollSnapAlign: "start"
2140
+ },
2141
+ children: [
2142
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { width: "100%", height: "200px", background: "#f5f5f5", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden" }, children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { src: imageUrl, alt: name, style: { width: "100%", height: "100%", objectFit: "contain" } }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { style: { color: "#999", fontSize: "0.85rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_intl9.FormattedMessage, { id: "Editor.noImage" }) }) }),
2143
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { padding: "1.5rem" }, children: [
2144
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { style: { fontSize: "1.1rem", fontWeight: 600, color: "#333", marginBottom: "0.5rem", lineHeight: 1.3 }, children: name }),
2145
+ desc && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { style: { fontSize: "0.9rem", color: "#666", marginBottom: "1rem", display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", overflow: "hidden" }, children: desc }),
2146
+ priceVal && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { fontSize: "1.2rem", fontWeight: "bold", color: "#2c5530" }, children: formatPrice(priceVal.centAmount, priceVal.currencyCode, priceVal.fractionDigits) })
2147
+ ] })
2148
+ ]
2149
+ },
2150
+ product?.id ?? i
2151
+ );
2152
+ })
2153
+ }
2154
+ )
2155
+ ] });
2156
+ };
2157
+
2158
+ // src/components/cms/PromotionalBanner.tsx
2159
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2160
+ var renderPromotionalBanner = ({ image, title, subtitle, ctaText, ctaLink, background }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2161
+ "div",
2162
+ {
2163
+ style: {
2164
+ display: "flex",
2165
+ alignItems: "center",
2166
+ justifyContent: "center",
2167
+ minHeight: "280px",
2168
+ backgroundColor: background || "#f5f5f5",
2169
+ padding: "2rem",
2170
+ borderRadius: "2px",
2171
+ margin: "1rem 0",
2172
+ gap: "2rem",
2173
+ flexWrap: "wrap"
2174
+ },
2175
+ children: [
2176
+ image && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { flex: "0 0 auto", maxWidth: "40%" }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("img", { src: image, alt: title || "Promo", style: { maxWidth: "100%", height: "auto", borderRadius: "2px" } }) }),
2177
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { flex: 1, minWidth: "200px" }, children: [
2178
+ title && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("h2", { style: { fontSize: "1.75rem", fontWeight: "bold", marginBottom: "0.5rem", color: "#333" }, children: title }),
2179
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("p", { style: { fontSize: "1rem", color: "#666", marginBottom: "1rem" }, children: subtitle }),
2180
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2181
+ "a",
2182
+ {
2183
+ href: ctaLink,
2184
+ style: {
2185
+ display: "inline-block",
2186
+ backgroundColor: "#2c5530",
2187
+ color: "white",
2188
+ padding: "0.75rem 2rem",
2189
+ borderRadius: "2px",
2190
+ textDecoration: "none",
2191
+ fontWeight: 600
2192
+ },
2193
+ children: ctaText
2194
+ }
2195
+ )
2196
+ ] })
2197
+ ]
2198
+ }
2199
+ );
2200
+
2201
+ // src/components/cms/RelatedProductsSlider.tsx
2202
+ var import_react_intl10 = require("react-intl");
2203
+ var import_puck_api5 = require("@commercetools-demo/puck-api");
2204
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2205
+ var renderRelatedProductsSlider = ({ title, subtitle, products, linkWith, baseUrl }) => {
2206
+ const hasPreResolved = products?.resolvedData != null;
2207
+ const { data: fetchedData, loading } = (0, import_puck_api5.useDatasource)(
2208
+ hasPreResolved ? void 0 : products?.type,
2209
+ hasPreResolved ? [] : products?.skus ?? []
2210
+ );
2211
+ const items = hasPreResolved ? Array.isArray(products.resolvedData) ? products.resolvedData : [] : Array.isArray(fetchedData) ? fetchedData : [];
2212
+ if (!loading && items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, {});
2213
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { padding: "2rem 0" }, children: [
2214
+ (title || subtitle) && /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { textAlign: "center", marginBottom: "1.5rem" }, children: [
2215
+ title && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { style: { fontSize: "2rem", fontWeight: "bold", color: "#333", marginBottom: "0.5rem" }, children: title }),
2216
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { style: { fontSize: "1.1rem", color: "#666", margin: 0 }, children: subtitle })
2217
+ ] }),
2218
+ loading && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { textAlign: "center", color: "#999", padding: "2rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_intl10.FormattedMessage, { id: "Editor.loading" }) }),
2219
+ items.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2220
+ "div",
2221
+ {
2222
+ style: {
2223
+ display: "flex",
2224
+ gap: "1rem",
2225
+ overflowX: "auto",
2226
+ scrollSnapType: "x mandatory",
2227
+ paddingBottom: "1rem"
2228
+ },
2229
+ children: items.map((product, i) => {
2230
+ const name = getLocalizedText(product?.name);
2231
+ const imageUrl = getProductImage(product);
2232
+ const priceVal = getFirstPrice(product);
2233
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
2234
+ "a",
2235
+ {
2236
+ href: resolveProductLink(product, linkWith, baseUrl),
2237
+ style: {
2238
+ flex: "0 0 280px",
2239
+ background: "white",
2240
+ borderRadius: "12px",
2241
+ boxShadow: "0 4px 12px rgba(0,0,0,0.1)",
2242
+ overflow: "hidden",
2243
+ textDecoration: "none",
2244
+ color: "inherit",
2245
+ scrollSnapAlign: "start"
2246
+ },
2247
+ children: [
2248
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { width: "100%", height: "200px", background: "#f5f5f5", display: "flex", alignItems: "center", justifyContent: "center", overflow: "hidden" }, children: imageUrl ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("img", { src: imageUrl, alt: name, style: { width: "100%", height: "100%", objectFit: "contain" } }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { style: { color: "#999", fontSize: "0.85rem" }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_intl10.FormattedMessage, { id: "Editor.noImage" }) }) }),
2249
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { padding: "1.5rem" }, children: [
2250
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h3", { style: { fontSize: "1.1rem", fontWeight: 600, color: "#333", marginBottom: "0.5rem" }, children: name }),
2251
+ priceVal && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { fontSize: "1.2rem", fontWeight: "bold", color: "#2c5530" }, children: formatPrice(priceVal.centAmount, priceVal.currencyCode, priceVal.fractionDigits) })
2252
+ ] })
2253
+ ]
2254
+ },
2255
+ product?.id ?? i
2256
+ );
2257
+ })
2258
+ }
2259
+ )
2260
+ ] });
2261
+ };
2262
+
2263
+ // src/components/cms/SocialLinks.tsx
2264
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2265
+ var renderSocialLinks = (props) => {
2266
+ const links = [
2267
+ [props.link1Label, props.link1Url],
2268
+ [props.link2Label, props.link2Url],
2269
+ [props.link3Label, props.link3Url],
2270
+ [props.link4Label, props.link4Url]
2271
+ ].filter(([label, url]) => label && url);
2272
+ if (links.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_jsx_runtime30.Fragment, {});
2273
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { style: { display: "flex", flexWrap: "wrap", gap: "1rem", padding: "0.5rem 0" }, children: links.map(([label, url], i) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2274
+ "a",
2275
+ {
2276
+ href: url,
2277
+ target: "_blank",
2278
+ rel: "noopener noreferrer",
2279
+ style: { color: "#2c5530", textDecoration: "none", fontWeight: 500, fontSize: "0.95rem" },
2280
+ children: label
2281
+ },
2282
+ i
2283
+ )) });
2284
+ };
2285
+
2286
+ // src/components/cms/TabContent.tsx
2287
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2288
+ var renderTabContent = ({ tabLabel, content }) => {
2289
+ if (!content) return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_jsx_runtime31.Fragment, {});
2290
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { padding: "1.5rem 0", lineHeight: 1.6, color: "#333" }, children: [
2291
+ tabLabel && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("h3", { style: { marginBottom: "1rem" }, children: tabLabel }),
2292
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(RichTextContent, { html: content })
2293
+ ] });
2294
+ };
2295
+
2296
+ // src/components/cms/TestimonialsSlider.tsx
2297
+ var import_jsx_runtime32 = require("react/jsx-runtime");
2298
+ var renderTestimonialsSlider = (props) => {
2299
+ const items = [
2300
+ [props.quote1, props.author1, props.role1],
2301
+ [props.quote2, props.author2, props.role2],
2302
+ [props.quote3, props.author3, props.role3]
2303
+ ].filter(([q]) => q);
2304
+ if (items.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_jsx_runtime32.Fragment, {});
2305
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { style: { padding: "2rem 1rem", background: "#f9f9f9", borderRadius: "8px", margin: "1rem 0" }, children: items.map(([quote, author, role], i) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { style: { marginBottom: i < items.length - 1 ? "2rem" : 0 }, children: [
2306
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2307
+ "blockquote",
2308
+ {
2309
+ style: {
2310
+ fontSize: "1.15rem",
2311
+ fontStyle: "italic",
2312
+ color: "#444",
2313
+ margin: "0 0 0.75rem 0",
2314
+ paddingLeft: "1rem",
2315
+ borderLeft: "4px solid #2c5530"
2316
+ },
2317
+ children: quote
2318
+ }
2319
+ ),
2320
+ author && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("cite", { style: { fontStyle: "normal", fontSize: "0.95rem", fontWeight: 600, color: "#333" }, children: [
2321
+ "\u2014 ",
2322
+ author,
2323
+ role && /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { style: { fontWeight: "normal", color: "#666" }, children: [
2324
+ " (",
2325
+ role,
2326
+ ")"
2327
+ ] })
2328
+ ] })
2329
+ ] }, i)) });
2330
+ };
2331
+
2332
+ // src/components/cms/ThankYouContent.tsx
2333
+ var import_jsx_runtime33 = require("react/jsx-runtime");
2334
+ var renderThankYouContent = ({ headline, message, ctaText, ctaLink }) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { style: { textAlign: "center", padding: "3rem 1rem", maxWidth: "560px", margin: "0 auto" }, children: [
2335
+ headline && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h1", { style: { fontSize: "2rem", color: "#2c5530", marginBottom: "1rem" }, children: headline }),
2336
+ message && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2337
+ RichTextContent,
2338
+ {
2339
+ html: message,
2340
+ style: { fontSize: "1rem", lineHeight: 1.6, color: "#555", marginBottom: "2rem" }
2341
+ }
2342
+ ),
2343
+ ctaText && ctaLink && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2344
+ "a",
2345
+ {
2346
+ href: ctaLink,
2347
+ style: {
2348
+ display: "inline-block",
2349
+ background: "#2c5530",
2350
+ color: "white",
2351
+ padding: "0.75rem 2rem",
2352
+ borderRadius: "4px",
2353
+ textDecoration: "none",
2354
+ fontWeight: 600
2355
+ },
2356
+ children: ctaText
2357
+ }
2358
+ )
2359
+ ] });
2360
+
2361
+ // src/components/cms/TrustBadges.tsx
2362
+ var import_jsx_runtime34 = require("react/jsx-runtime");
2363
+ var renderTrustBadges = (props) => {
2364
+ const badges = [
2365
+ [props.badge1Icon, props.badge1Label],
2366
+ [props.badge2Icon, props.badge2Label],
2367
+ [props.badge3Icon, props.badge3Label],
2368
+ [props.badge4Icon, props.badge4Label]
2369
+ ].filter(([, label]) => label);
2370
+ if (badges.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_jsx_runtime34.Fragment, {});
2371
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2372
+ "div",
2373
+ {
2374
+ style: {
2375
+ display: "flex",
2376
+ flexWrap: "wrap",
2377
+ justifyContent: "center",
2378
+ gap: "2rem",
2379
+ padding: "2rem 1rem",
2380
+ background: "#f9f9f9",
2381
+ borderRadius: "4px"
2382
+ },
2383
+ children: badges.map(([icon, label], i) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "0.75rem" }, children: [
2384
+ icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2385
+ "img",
2386
+ {
2387
+ src: icon,
2388
+ alt: label,
2389
+ style: { width: "40px", height: "40px", objectFit: "contain" }
2390
+ }
2391
+ ),
2392
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { style: { fontSize: "0.95rem", fontWeight: 500, color: "#333" }, children: label })
2393
+ ] }, i))
2394
+ }
2395
+ );
2396
+ };
2397
+
2398
+ // src/components/cms/VideoBlock.tsx
2399
+ var import_react_intl11 = require("react-intl");
2400
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2401
+ var renderVideoBlock = ({ videoUrl, posterImage, title, caption }) => {
2402
+ if (!videoUrl) return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { style: { padding: "2rem", textAlign: "center", color: "#999", background: "#f5f5f5", borderRadius: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_react_intl11.FormattedMessage, { id: "Editor.noVideoUrlConfigured" }) });
2403
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { style: { margin: "1.5rem 0" }, children: [
2404
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2405
+ "div",
2406
+ {
2407
+ style: {
2408
+ position: "relative",
2409
+ paddingBottom: "56.25%",
2410
+ height: 0,
2411
+ overflow: "hidden",
2412
+ background: "#000",
2413
+ borderRadius: "8px"
2414
+ },
2415
+ children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2416
+ "video",
2417
+ {
2418
+ src: videoUrl,
2419
+ poster: posterImage || void 0,
2420
+ controls: true,
2421
+ preload: "metadata",
2422
+ style: {
2423
+ position: "absolute",
2424
+ top: 0,
2425
+ left: 0,
2426
+ width: "100%",
2427
+ height: "100%",
2428
+ objectFit: "contain"
2429
+ }
2430
+ }
2431
+ )
2432
+ }
2433
+ ),
2434
+ title && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { style: { marginTop: "0.75rem", fontSize: "1.1rem", color: "#333" }, children: title }),
2435
+ caption && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { style: { fontSize: "0.9rem", color: "#666", marginTop: "0.25rem" }, children: caption })
2436
+ ] });
2437
+ };
2438
+
2439
+ // src/components/cms/WebsiteLogo.tsx
2440
+ var import_react_intl12 = require("react-intl");
2441
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2442
+ var renderWebsiteLogo = ({ logo, maxWidth, maxHeight }) => {
2443
+ const intl = (0, import_react_intl12.useIntl)();
2444
+ if (!logo) return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { style: { width: `${parseInt(maxWidth, 10) || 180}px`, height: `${parseInt(maxHeight, 10) || 50}px`, background: "#f0f0f0", borderRadius: "4px" } });
2445
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2446
+ "div",
2447
+ {
2448
+ style: {
2449
+ maxWidth: `${parseInt(maxWidth, 10) || 180}px`,
2450
+ maxHeight: `${parseInt(maxHeight, 10) || 50}px`
2451
+ },
2452
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2453
+ "img",
2454
+ {
2455
+ src: logo,
2456
+ alt: intl.formatMessage({ id: "Editor.websiteLogoAlt" }),
2457
+ style: { width: "100%", height: "100%", objectFit: "contain" }
2458
+ }
2459
+ )
2460
+ }
2461
+ );
2462
+ };
2463
+
2464
+ // src/renderConfig.tsx
2465
+ var components = {
2466
+ Hero: { render: renderHero },
2467
+ RichText: { render: renderRichText },
2468
+ Grid: { render: renderGrid },
2469
+ Columns: { render: renderColumns },
2470
+ Image: { render: renderImage },
2471
+ Button: { render: renderButton },
2472
+ Card: { render: renderCard },
2473
+ Spacer: { render: renderSpacer },
2474
+ ProductTeaser: { render: renderProductTeaser },
2475
+ HeroBanner: { render: renderHeroBanner },
2476
+ TextBlock: { render: renderTextBlock },
2477
+ CategoryGrid: { render: renderCategoryGrid },
2478
+ CategoryHero: { render: renderCategoryHero },
2479
+ CheckoutPromoBanner: { render: renderCheckoutPromoBanner },
2480
+ CountdownBanner: { render: renderCountdownBanner },
2481
+ CrossSellBlock: { render: renderCrossSellBlock },
2482
+ DeliveryMessage: { render: renderDeliveryMessage },
2483
+ Divider: { render: renderDivider },
2484
+ EmptyState: { render: renderEmptyState },
2485
+ FAQAccordion: { render: renderFAQAccordion },
2486
+ FooterBlock: { render: renderFooterBlock },
2487
+ ImageBlock: { render: renderImageBlock },
2488
+ NewsletterSignup: { render: renderNewsletterSignup },
2489
+ ProductBanner: { render: renderProductBanner },
2490
+ ProductGridHeader: { render: renderProductGridHeader },
2491
+ ProductSlider: { render: renderProductSlider },
2492
+ PromotionalBanner: { render: renderPromotionalBanner },
2493
+ RelatedProductsSlider: { render: renderRelatedProductsSlider },
2494
+ SocialLinks: { render: renderSocialLinks },
2495
+ TabContent: { render: renderTabContent },
2496
+ TestimonialsSlider: { render: renderTestimonialsSlider },
2497
+ ThankYouContent: { render: renderThankYouContent },
2498
+ TrustBadges: { render: renderTrustBadges },
2499
+ VideoBlock: { render: renderVideoBlock },
2500
+ WebsiteLogo: { render: renderWebsiteLogo }
2501
+ };
2502
+ function createRenderConfig() {
2503
+ return {
2504
+ components,
2505
+ root: { render: renderRoot }
2506
+ };
2507
+ }
2508
+ var defaultRenderConfig = createRenderConfig();
2509
+ // Annotate the CommonJS export names for ESM import in node:
2510
+ 0 && (module.exports = {
2511
+ CONTENT_WIDTHS,
2512
+ RichTextContent,
2513
+ colors,
2514
+ createRenderConfig,
2515
+ defaultRenderConfig,
2516
+ formatPrice,
2517
+ getFirstPrice,
2518
+ getLocalizedText,
2519
+ getProductImage,
2520
+ getProductName,
2521
+ getProductSku,
2522
+ getProductSlug,
2523
+ intlCatalogs,
2524
+ productLinkDefaults,
2525
+ renderButton,
2526
+ renderCard,
2527
+ renderCategoryGrid,
2528
+ renderCategoryHero,
2529
+ renderCheckoutPromoBanner,
2530
+ renderColumns,
2531
+ renderCountdownBanner,
2532
+ renderCrossSellBlock,
2533
+ renderDeliveryMessage,
2534
+ renderDivider,
2535
+ renderEmptyState,
2536
+ renderFAQAccordion,
2537
+ renderFooterBlock,
2538
+ renderGrid,
2539
+ renderHero,
2540
+ renderHeroBanner,
2541
+ renderImage,
2542
+ renderImageBlock,
2543
+ renderNewsletterSignup,
2544
+ renderProductBanner,
2545
+ renderProductGridHeader,
2546
+ renderProductSlider,
2547
+ renderProductTeaser,
2548
+ renderPromotionalBanner,
2549
+ renderRelatedProductsSlider,
2550
+ renderRichText,
2551
+ renderRoot,
2552
+ renderSocialLinks,
2553
+ renderSpacer,
2554
+ renderTabContent,
2555
+ renderTestimonialsSlider,
2556
+ renderTextBlock,
2557
+ renderThankYouContent,
2558
+ renderTrustBadges,
2559
+ renderVideoBlock,
2560
+ renderWebsiteLogo,
2561
+ resolveProductLink,
2562
+ sanitizeHtml
2563
+ });
2564
+ //# sourceMappingURL=index.js.map