@faststore/core 2.1.16 → 2.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (187) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/build-manifest.json +125 -0
  3. package/.next/cache/.tsbuildinfo +1 -0
  4. package/.next/cache/config.json +7 -0
  5. package/.next/cache/eslint/.cache_1gneedd +1 -0
  6. package/.next/cache/next-server.js.nft.json +1 -0
  7. package/.next/cache/webpack/client-production/0.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/export-marker.json +1 -0
  12. package/.next/images-manifest.json +1 -0
  13. package/.next/next-server.js.nft.json +1 -0
  14. package/.next/package.json +1 -0
  15. package/.next/prerender-manifest.json +1 -0
  16. package/.next/react-loadable-manifest.json +44 -0
  17. package/.next/required-server-files.json +1 -0
  18. package/.next/routes-manifest.json +1 -0
  19. package/.next/server/chunks/123.js +58 -0
  20. package/.next/server/chunks/143.js +106 -0
  21. package/.next/server/chunks/183.js +90 -0
  22. package/.next/server/chunks/184.js +61 -0
  23. package/.next/server/chunks/186.js +136 -0
  24. package/.next/server/chunks/205.js +721 -0
  25. package/.next/server/chunks/247.js +61 -0
  26. package/.next/server/chunks/253.js +535 -0
  27. package/.next/server/chunks/269.js +517 -0
  28. package/.next/server/chunks/287.js +58 -0
  29. package/.next/server/chunks/289.js +242 -0
  30. package/.next/server/chunks/312.js +697 -0
  31. package/.next/server/chunks/350.js +143 -0
  32. package/.next/server/chunks/487.js +9142 -0
  33. package/.next/server/chunks/502.js +626 -0
  34. package/.next/server/chunks/513.js +257 -0
  35. package/.next/server/chunks/576.js +90 -0
  36. package/.next/server/chunks/597.js +211 -0
  37. package/.next/server/chunks/650.js +9142 -0
  38. package/.next/server/chunks/676.js +32 -0
  39. package/.next/server/chunks/74.js +4066 -0
  40. package/.next/server/chunks/825.js +4039 -0
  41. package/.next/server/chunks/854.js +72 -0
  42. package/.next/server/chunks/859.js +959 -0
  43. package/.next/server/chunks/886.js +120 -0
  44. package/.next/server/chunks/90.js +623 -0
  45. package/.next/server/chunks/907.js +1956 -0
  46. package/.next/server/chunks/98.js +124 -0
  47. package/.next/server/chunks/font-manifest.json +1 -0
  48. package/.next/server/font-manifest.json +1 -0
  49. package/.next/server/middleware-build-manifest.js +1 -0
  50. package/.next/server/middleware-manifest.json +6 -0
  51. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  52. package/.next/server/pages/404.js +386 -0
  53. package/.next/server/pages/404.js.nft.json +1 -0
  54. package/.next/server/pages/500.js +388 -0
  55. package/.next/server/pages/500.js.nft.json +1 -0
  56. package/.next/server/pages/[...slug].js +778 -0
  57. package/.next/server/pages/[...slug].js.nft.json +1 -0
  58. package/.next/server/pages/[slug]/p.js +2390 -0
  59. package/.next/server/pages/[slug]/p.js.nft.json +1 -0
  60. package/.next/server/pages/_app.js +281 -0
  61. package/.next/server/pages/_app.js.nft.json +1 -0
  62. package/.next/server/pages/_document.js +340 -0
  63. package/.next/server/pages/_document.js.nft.json +1 -0
  64. package/.next/server/pages/_error.js +164 -0
  65. package/.next/server/pages/_error.js.nft.json +1 -0
  66. package/.next/server/pages/account.js +363 -0
  67. package/.next/server/pages/account.js.nft.json +1 -0
  68. package/.next/server/pages/api/graphql.js +365 -0
  69. package/.next/server/pages/api/graphql.js.nft.json +1 -0
  70. package/.next/server/pages/api/preview.js +119 -0
  71. package/.next/server/pages/api/preview.js.nft.json +1 -0
  72. package/.next/server/pages/checkout.js +363 -0
  73. package/.next/server/pages/checkout.js.nft.json +1 -0
  74. package/.next/server/pages/en-US/404.html +81 -0
  75. package/.next/server/pages/en-US/404.json +1 -0
  76. package/.next/server/pages/en-US/500.html +81 -0
  77. package/.next/server/pages/en-US/500.json +1 -0
  78. package/.next/server/pages/en-US/account.html +81 -0
  79. package/.next/server/pages/en-US/account.json +1 -0
  80. package/.next/server/pages/en-US/checkout.html +81 -0
  81. package/.next/server/pages/en-US/checkout.json +1 -0
  82. package/.next/server/pages/en-US/login.html +81 -0
  83. package/.next/server/pages/en-US/login.json +1 -0
  84. package/.next/server/pages/en-US/s.html +81 -0
  85. package/.next/server/pages/en-US/s.json +1 -0
  86. package/.next/server/pages/en-US.html +81 -0
  87. package/.next/server/pages/en-US.json +1 -0
  88. package/.next/server/pages/index.js +909 -0
  89. package/.next/server/pages/index.js.nft.json +1 -0
  90. package/.next/server/pages/login.js +368 -0
  91. package/.next/server/pages/login.js.nft.json +1 -0
  92. package/.next/server/pages/s.js +466 -0
  93. package/.next/server/pages/s.js.nft.json +1 -0
  94. package/.next/server/pages-manifest.json +16 -0
  95. package/.next/server/webpack-api-runtime.js +229 -0
  96. package/.next/server/webpack-runtime.js +229 -0
  97. package/.next/static/chunks/113-207e8eceab001eea.js +1 -0
  98. package/.next/static/chunks/130-15325805e3c8d5f4.js +1 -0
  99. package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
  100. package/.next/static/chunks/495.0ecd099878b2a36d.js +1 -0
  101. package/.next/static/chunks/502.b14533723651e5a1.js +1 -0
  102. package/.next/static/chunks/548-ab84e9e8b49413ab.js +1 -0
  103. package/.next/static/chunks/597.f8d0595b113c70af.js +1 -0
  104. package/.next/static/chunks/64.7ea3677ac3a10e00.js +1 -0
  105. package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
  106. package/.next/static/chunks/738-67a288ca3569cdbb.js +1 -0
  107. package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
  108. package/.next/static/chunks/791-b6747a7c7ca0967e.js +1 -0
  109. package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
  110. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
  111. package/.next/static/chunks/main-fd466221927468fd.js +1 -0
  112. package/.next/static/chunks/pages/404-6da332b2c4ef0f41.js +1 -0
  113. package/.next/static/chunks/pages/500-88dd73506f17946c.js +1 -0
  114. package/.next/static/chunks/pages/[...slug]-ab804df4ac6c945e.js +1 -0
  115. package/.next/static/chunks/pages/[slug]/p-93d3f1c0f2d3aed2.js +1 -0
  116. package/.next/static/chunks/pages/_app-79d333aa6001a806.js +1 -0
  117. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
  118. package/.next/static/chunks/pages/account-06126db1f6dc537e.js +1 -0
  119. package/.next/static/chunks/pages/checkout-5138b7956d64dde8.js +1 -0
  120. package/.next/static/chunks/pages/index-7ba4f6708af42d8e.js +1 -0
  121. package/.next/static/chunks/pages/login-a688a70872ea61f5.js +1 -0
  122. package/.next/static/chunks/pages/s-99aad326e6aafeb7.js +1 -0
  123. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
  124. package/.next/static/chunks/webpack-8bf035049b590d82.js +1 -0
  125. package/.next/static/css/0e00026896a2ee3e.css +1 -0
  126. package/.next/static/css/13ddbbc10e89ff0e.css +1 -0
  127. package/.next/static/css/1b23beb5af203ffb.css +1 -0
  128. package/.next/static/css/584640ffee46aa49.css +1 -0
  129. package/.next/static/css/6f33907361436e6c.css +1 -0
  130. package/.next/static/css/7d822a137c54a781.css +1 -0
  131. package/.next/static/css/a49f71ae6bb528e0.css +1 -0
  132. package/.next/static/css/e02cdad8fc000339.css +1 -0
  133. package/.next/static/css/f7ed956d370744ea.css +1 -0
  134. package/.next/static/css/f9d59f597a4d8f82.css +1 -0
  135. package/.next/static/hlJfefjb0gNJqepjDW_Eh/_buildManifest.js +1 -0
  136. package/.next/static/hlJfefjb0gNJqepjDW_Eh/_ssgManifest.js +1 -0
  137. package/.next/trace +78 -0
  138. package/.turbo/turbo-build.log +13 -13
  139. package/README.md +1 -2
  140. package/package.json +4 -4
  141. package/public/~partytown/debug/partytown-atomics.js +556 -0
  142. package/public/~partytown/debug/partytown-media.js +374 -0
  143. package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
  144. package/public/~partytown/debug/partytown-sw.js +59 -0
  145. package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
  146. package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
  147. package/public/~partytown/debug/partytown.js +72 -0
  148. package/public/~partytown/partytown-atomics.js +2 -0
  149. package/public/~partytown/partytown-media.js +2 -0
  150. package/public/~partytown/partytown-sw.js +2 -0
  151. package/public/~partytown/partytown.js +2 -0
  152. package/src/components/common/Alert/Alert.tsx +14 -2
  153. package/src/components/common/Alert/section.module.scss +2 -0
  154. package/src/components/common/Footer/Footer.tsx +5 -14
  155. package/src/components/navigation/Navbar/Navbar.tsx +1 -1
  156. package/src/components/navigation/NavbarLinks/NavbarLinks.tsx +1 -1
  157. package/src/components/product/ProductCard/ProductCard.tsx +1 -1
  158. package/src/components/region/RegionBar/RegionBar.tsx +22 -6
  159. package/src/components/sections/Alert/Alert.tsx +23 -7
  160. package/src/components/sections/Alert/Overrides.tsx +27 -0
  161. package/src/components/sections/BannerNewsletter/BannerNewsletter.tsx +2 -4
  162. package/src/components/sections/BannerText/BannerText.tsx +0 -2
  163. package/src/components/sections/Breadcrumb/Breadcrumb.tsx +1 -1
  164. package/src/components/sections/EmptyState/EmptyState.tsx +12 -5
  165. package/src/components/sections/EmptyState/Overrides.tsx +26 -0
  166. package/src/components/sections/Incentives/Incentives.tsx +1 -1
  167. package/src/components/sections/Incentives/section.module.scss +2 -0
  168. package/src/components/sections/Navbar/section.module.scss +4 -0
  169. package/src/components/sections/Newsletter/Overrides.tsx +35 -0
  170. package/src/components/sections/Newsletter/section.module.scss +2 -0
  171. package/src/components/sections/ProductDetails/ProductDetails.tsx +2 -4
  172. package/src/components/sections/ProductGallery/ProductGallery.tsx +2 -4
  173. package/src/components/sections/ProductGallery/section.module.scss +13 -0
  174. package/src/components/sections/ProductShelf/section.module.scss +5 -0
  175. package/src/components/sections/ProductTiles/ProductTiles.tsx +18 -20
  176. package/src/components/sections/RegionBar/Overrides.tsx +28 -0
  177. package/src/components/sections/Section/section.scss +8 -0
  178. package/src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx +1 -1
  179. package/src/components/ui/Incentives/Incentives.tsx +1 -1
  180. package/src/components/ui/Newsletter/Newsletter.tsx +67 -55
  181. package/src/components/ui/ProductGallery/ProductGallery.tsx +5 -2
  182. package/src/customizations/components/overrides/Alert.tsx +15 -0
  183. package/src/customizations/components/overrides/EmptyState.tsx +13 -0
  184. package/src/customizations/components/overrides/Newsletter.tsx +19 -0
  185. package/src/customizations/components/overrides/RegionBar.tsx +16 -0
  186. package/src/styles/global/components.scss +0 -6
  187. package/src/typings/overrides.d.ts +19 -0
@@ -0,0 +1,721 @@
1
+ exports.id = 205;
2
+ exports.ids = [205];
3
+ exports.modules = {
4
+
5
+ /***/ 94285:
6
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
7
+
8
+ "use strict";
9
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
11
+ /* harmony export */ });
12
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
13
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
14
+
15
+ const ProductShelf = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ProductShelf({ testId = 'fs-product-shelf', children, ...otherProps }, ref) {
16
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { ref: ref, "data-fs-product-shelf": true, "data-fs-content": "product-shelf", "data-testid": testId, ...otherProps }, children));
17
+ });
18
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductShelf);
19
+ //# sourceMappingURL=ProductShelf.js.map
20
+
21
+ /***/ }),
22
+
23
+ /***/ 86237:
24
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
25
+
26
+ "use strict";
27
+
28
+ // EXPORTS
29
+ __webpack_require__.d(__webpack_exports__, {
30
+ "z": () => (/* binding */ Components),
31
+ "x": () => (/* binding */ productShelfPropsCustomization)
32
+ });
33
+
34
+ // EXTERNAL MODULE: ../components/dist/organisms/ProductShelf/ProductShelf.js
35
+ var ProductShelf = __webpack_require__(94285);
36
+ // EXTERNAL MODULE: ./src/components/product/ProductCard/index.ts + 4 modules
37
+ var ProductCard = __webpack_require__(56475);
38
+ // EXTERNAL MODULE: external "react"
39
+ var external_react_ = __webpack_require__(16689);
40
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
41
+ // EXTERNAL MODULE: ../components/dist/molecules/IconButton/IconButton.js
42
+ var IconButton = __webpack_require__(82765);
43
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
44
+ var Icon = __webpack_require__(25045);
45
+ // EXTERNAL MODULE: external "react-swipeable"
46
+ var external_react_swipeable_ = __webpack_require__(3789);
47
+ ;// CONCATENATED MODULE: ../components/dist/hooks/useSlider.js
48
+
49
+
50
+ const nextPage = (current, total) => (current + 1) % total;
51
+ const previousPage = (current, total) => (total - ((total - current + 1) % total)) % total;
52
+ function reducer(state, action) {
53
+ switch (action.type) {
54
+ case 'NEXT_PAGE': {
55
+ // If `state.infinite` is true, we need to take into account an extra
56
+ // page in the calculation. This extra page is a clone of the first page.
57
+ const adjustedTotalPages = state.infinite
58
+ ? state.totalPages + 1
59
+ : state.totalPages;
60
+ const nextPageIndex = nextPage(state.currentPage, adjustedTotalPages);
61
+ const nextItemIndex = (nextPageIndex % adjustedTotalPages) * state.itemsPerPage;
62
+ return {
63
+ ...state,
64
+ sliding: true,
65
+ slideDirection: 'next',
66
+ currentItem: nextItemIndex,
67
+ currentPage: nextPageIndex,
68
+ };
69
+ }
70
+ case 'PREVIOUS_PAGE': {
71
+ // If `state.infinite` is true, we need to take into account an extra
72
+ // page in the calculation. This extra page is a clone of the first page.
73
+ const adjustedTotalPages = state.infinite
74
+ ? state.totalPages + 1
75
+ : state.totalPages;
76
+ // If `state.infinite` is true and we're currently on page 0, we need to
77
+ // let the slider go to page -1. This -1 page is a clone of the last page.
78
+ const shouldGoToClone = state.infinite && state.currentPage === 0;
79
+ const previousPageIndex = shouldGoToClone
80
+ ? -1
81
+ : previousPage(state.currentPage, state.totalPages);
82
+ return {
83
+ ...state,
84
+ sliding: true,
85
+ slideDirection: 'previous',
86
+ currentItem: (previousPageIndex % adjustedTotalPages) * state.itemsPerPage,
87
+ currentPage: previousPageIndex,
88
+ };
89
+ }
90
+ case 'GO_TO_PAGE': {
91
+ if (action.payload.pageIndex === state.currentPage) {
92
+ return state;
93
+ }
94
+ return {
95
+ ...state,
96
+ sliding: action.payload.shouldSlide,
97
+ slideDirection: action.payload.pageIndex > state.currentPage ? 'next' : 'previous',
98
+ currentItem: (action.payload.pageIndex % state.totalPages) * state.itemsPerPage,
99
+ currentPage: action.payload.pageIndex,
100
+ };
101
+ }
102
+ case 'STOP_SLIDE':
103
+ return { ...state, sliding: false };
104
+ default:
105
+ return state;
106
+ }
107
+ }
108
+ const defaultSliderState = (totalItems, itemsPerPage, infinite) => ({
109
+ currentItem: 0,
110
+ currentPage: 0,
111
+ sliding: false,
112
+ slideDirection: 'next',
113
+ totalItems,
114
+ itemsPerPage,
115
+ totalPages: Math.ceil(totalItems / itemsPerPage),
116
+ infinite,
117
+ });
118
+ const slide = (page, dispatch) => {
119
+ if (page === 'next') {
120
+ dispatch({ type: 'NEXT_PAGE' });
121
+ }
122
+ if (page === 'previous') {
123
+ dispatch({ type: 'PREVIOUS_PAGE' });
124
+ }
125
+ if (typeof page === 'number') {
126
+ dispatch({
127
+ type: 'GO_TO_PAGE',
128
+ payload: {
129
+ pageIndex: page,
130
+ shouldSlide: true,
131
+ },
132
+ });
133
+ }
134
+ };
135
+ const useSlider = ({ totalItems, itemsPerPage = 1, infiniteMode = false, shouldSlideOnSwipe = true, ...swipeableConfigOverrides }) => {
136
+ const [sliderState, sliderDispatch] = (0,external_react_.useReducer)(reducer, undefined, () => defaultSliderState(totalItems, itemsPerPage, infiniteMode));
137
+ const handlers = (0,external_react_swipeable_.useSwipeable)({
138
+ onSwipedRight: () => shouldSlideOnSwipe && slide('previous', sliderDispatch),
139
+ onSwipedLeft: () => shouldSlideOnSwipe && slide('next', sliderDispatch),
140
+ trackMouse: true,
141
+ ...swipeableConfigOverrides,
142
+ });
143
+ return {
144
+ handlers,
145
+ slide,
146
+ sliderState,
147
+ sliderDispatch,
148
+ };
149
+ };
150
+ //# sourceMappingURL=useSlider.js.map
151
+ // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js
152
+ var Button = __webpack_require__(57578);
153
+ ;// CONCATENATED MODULE: ../components/dist/molecules/Carousel/CarouselBullets.js
154
+
155
+
156
+ const defaultAriaLabel = (id, idx, isActive) => isActive ? `Current page from ${id}` : `Go to page ${idx + 1} from ${id}`;
157
+ const CarouselBullets = (0,external_react_.forwardRef)(function Bullets({ id, totalQuantity, activeBullet, onClick, testId = 'fs-carousel-bullets', ariaLabelGenerator = defaultAriaLabel, ariaControlsGenerator, ...otherProps }, ref) {
158
+ const bulletIndexes = (0,external_react_.useMemo)(() => Array(totalQuantity).fill(0), [totalQuantity]);
159
+ return (external_react_default().createElement("div", { ref: ref, "data-fs-carousel-bullets": true, "data-testid": testId, role: "tablist", ...otherProps }, bulletIndexes.map((_, idx) => {
160
+ const isActive = activeBullet === idx;
161
+ return (external_react_default().createElement(Button/* default */.Z, { key: `${id}-${idx}`, role: "tab", tabIndex: -1, "data-fs-carousel-bullet": true, testId: `${testId}-bullet`, onClick: (e) => onClick(e, idx), "aria-label": ariaLabelGenerator(id, idx, isActive), "aria-controls": ariaControlsGenerator?.(idx), "aria-selected": isActive, variant: "tertiary" }));
162
+ })));
163
+ });
164
+ /* harmony default export */ const Carousel_CarouselBullets = (CarouselBullets);
165
+ //# sourceMappingURL=CarouselBullets.js.map
166
+ ;// CONCATENATED MODULE: ../components/dist/hooks/useSlideVisibility.js
167
+
168
+ function isSlideVisible({ itemsPerPage, currentSlide, slideIdx, totalItems, }) {
169
+ const isClonedSlide = currentSlide < 0 || currentSlide >= totalItems;
170
+ const isVisible = slideIdx >= currentSlide && slideIdx < currentSlide + itemsPerPage;
171
+ return isClonedSlide || isVisible;
172
+ }
173
+ const useSlideVisibility = ({ currentSlide, itemsPerPage, totalItems, }) => {
174
+ /** Keeps track of slides that have been visualized before.
175
+ * We want to keep rendering them because the issue is mostly rendering
176
+ * slides that might never be viewed; On the other hand, hiding slides
177
+ * that were visible causes visual glitches */
178
+ const visitedSlides = (0,external_react_.useRef)(new Set());
179
+ (0,external_react_.useEffect)(() => {
180
+ for (let i = 0; i < itemsPerPage; i++) {
181
+ visitedSlides.current.add(currentSlide + i);
182
+ }
183
+ }, [currentSlide, itemsPerPage]);
184
+ const isItemVisible = (index) => isSlideVisible({
185
+ slideIdx: index,
186
+ currentSlide,
187
+ itemsPerPage,
188
+ totalItems,
189
+ });
190
+ const shouldRenderItem = (index) => {
191
+ return visitedSlides.current.has(index) || isItemVisible(index);
192
+ };
193
+ return { shouldRenderItem, isItemVisible };
194
+ };
195
+ //# sourceMappingURL=useSlideVisibility.js.map
196
+ ;// CONCATENATED MODULE: ../components/dist/molecules/Carousel/CarouselItem.js
197
+
198
+
199
+ function CarouselItem({ id, index, state, children, totalItems, infiniteMode, isScrollCarousel, }) {
200
+ const { isItemVisible, shouldRenderItem } = useSlideVisibility({
201
+ totalItems,
202
+ currentSlide: state.currentItem,
203
+ itemsPerPage: state.itemsPerPage,
204
+ });
205
+ const style = (!isScrollCarousel && { width: '100%' }) ||
206
+ (isScrollCarousel && {
207
+ maxWidth: '60%',
208
+ display: 'inline-block',
209
+ });
210
+ const shouldDisplayItem = isScrollCarousel || shouldRenderItem(index - Number(infiniteMode));
211
+ return (external_react_default().createElement("li", { style: style, id: `${id}-carousel-item-${index}`, "data-fs-carousel-item": true, "data-fs-carousel-item-visible": isItemVisible(index - Number(infiniteMode)) || undefined }, shouldDisplayItem ? children : null));
212
+ }
213
+ /* harmony default export */ const Carousel_CarouselItem = (CarouselItem);
214
+ //# sourceMappingURL=CarouselItem.js.map
215
+ ;// CONCATENATED MODULE: ../components/dist/molecules/Carousel/Carousel.js
216
+
217
+
218
+
219
+
220
+
221
+ const createTransformValues = (infinite, totalItems) => {
222
+ const transformMap = {};
223
+ const slideWidth = 100 / totalItems;
224
+ for (let idx = 0; idx < totalItems; ++idx) {
225
+ const currIdx = infinite ? idx - 1 : idx;
226
+ const transformValue = -(slideWidth * idx);
227
+ transformMap[currIdx] = transformValue;
228
+ }
229
+ return transformMap;
230
+ };
231
+ function Carousel({ children, className, 'aria-label': ariaLabel, infiniteMode = true, controls = 'complete', testId = 'fs-carousel', transition = {
232
+ duration: 400,
233
+ property: 'transform',
234
+ }, id = 'fs-carousel', variant = 'slide', itemsPerPage = 1, navigationIcons = undefined, ...swipeableConfigOverrides }) {
235
+ const carouselTrackRef = (0,external_react_.useRef)(null);
236
+ const isSlideCarousel = variant === 'slide';
237
+ const isScrollCarousel = variant === 'scroll';
238
+ const childrenArray = external_react_default().Children.toArray(children);
239
+ const childrenCount = childrenArray.length;
240
+ const numberOfSlides = infiniteMode ? childrenCount + 2 : childrenCount;
241
+ const slidingTransition = `${transition.property} ${transition.duration}ms ${transition.timing ?? ''} ${transition.delay ?? ''}`;
242
+ const { handlers, slide, sliderState, sliderDispatch } = useSlider({
243
+ itemsPerPage,
244
+ infiniteMode,
245
+ totalItems: childrenCount,
246
+ shouldSlideOnSwipe: isSlideCarousel,
247
+ ...swipeableConfigOverrides,
248
+ });
249
+ const pagesCount = Math.ceil(childrenCount / sliderState.itemsPerPage);
250
+ const showNavigationArrows = pagesCount !== 1 &&
251
+ (controls === 'complete' || controls === 'navigationArrows');
252
+ const showPaginationBullets = pagesCount !== 1 &&
253
+ (controls === 'complete' || controls === 'paginationBullets');
254
+ const transformValues = (0,external_react_.useMemo)(() => createTransformValues(infiniteMode, numberOfSlides), [numberOfSlides, infiniteMode]);
255
+ const postRenderedSlides = infiniteMode && children ? childrenArray.slice(0, 1) : [];
256
+ const preRenderedSlides = infiniteMode && children ? childrenArray.slice(childrenCount - 1) : [];
257
+ const slides = preRenderedSlides.concat(children ?? [], postRenderedSlides);
258
+ const slideCarouselTrackStyle = (0,external_react_.useMemo)(() => ({
259
+ display: 'flex',
260
+ width: `${numberOfSlides * 100}%`,
261
+ transition: sliderState.sliding ? slidingTransition : undefined,
262
+ transform: `translate3d(${transformValues[sliderState.currentPage]}%, 0, 0)`,
263
+ }), [
264
+ numberOfSlides,
265
+ transformValues,
266
+ slidingTransition,
267
+ sliderState.sliding,
268
+ sliderState.currentPage,
269
+ ]);
270
+ const scrollCarouselTrackStyle = (0,external_react_.useMemo)(() => ({
271
+ width: '100%',
272
+ display: 'block',
273
+ overflowX: 'scroll',
274
+ whiteSpace: 'nowrap',
275
+ }), []);
276
+ const carouselTrackStyle = (isSlideCarousel && slideCarouselTrackStyle) ||
277
+ (isScrollCarousel && scrollCarouselTrackStyle);
278
+ const slidePrevious = () => {
279
+ if (sliderState.sliding ||
280
+ (!infiniteMode && sliderState.currentPage === 0)) {
281
+ return;
282
+ }
283
+ slide('previous', sliderDispatch);
284
+ };
285
+ const slideNext = () => {
286
+ if (sliderState.sliding ||
287
+ (!infiniteMode && sliderState.currentPage === childrenCount - 1)) {
288
+ return;
289
+ }
290
+ slide('next', sliderDispatch);
291
+ };
292
+ const onScrollTrack = (event) => {
293
+ if (isSlideCarousel || itemsPerPage > 1) {
294
+ return;
295
+ }
296
+ const itemWidth = Number(event.currentTarget.firstElementChild?.scrollWidth);
297
+ const scrollOffset = event.currentTarget?.scrollLeft;
298
+ const formatter = scrollOffset > itemWidth / 2 ? Math.round : Math.floor;
299
+ const page = formatter(scrollOffset / itemWidth);
300
+ slide(page, sliderDispatch);
301
+ };
302
+ const onTransitionTrackEnd = () => {
303
+ sliderDispatch({
304
+ type: 'STOP_SLIDE',
305
+ });
306
+ if (infiniteMode && sliderState.currentItem >= childrenCount) {
307
+ sliderDispatch({
308
+ type: 'GO_TO_PAGE',
309
+ payload: {
310
+ pageIndex: 0,
311
+ shouldSlide: false,
312
+ },
313
+ });
314
+ }
315
+ if (infiniteMode && sliderState.currentItem < 0) {
316
+ sliderDispatch({
317
+ type: 'GO_TO_PAGE',
318
+ payload: {
319
+ pageIndex: sliderState.totalPages - 1,
320
+ shouldSlide: false,
321
+ },
322
+ });
323
+ }
324
+ };
325
+ const onScrollPagination = async (index, slideDirection) => {
326
+ if (slideDirection === 'previous' && sliderState.currentPage === 0) {
327
+ return;
328
+ }
329
+ if (slideDirection === 'next' &&
330
+ sliderState.currentPage === sliderState.totalPages - 1) {
331
+ return;
332
+ }
333
+ let scrollOffset;
334
+ const carouselItemsWidth = Number(carouselTrackRef.current?.firstElementChild?.clientWidth);
335
+ if (itemsPerPage > 1) {
336
+ scrollOffset = index * carouselItemsWidth * itemsPerPage;
337
+ }
338
+ else {
339
+ scrollOffset = index * carouselItemsWidth - carouselItemsWidth * 0.125;
340
+ }
341
+ carouselTrackRef.current?.scrollTo({
342
+ left: scrollOffset,
343
+ behavior: 'smooth',
344
+ });
345
+ slide(index, sliderDispatch);
346
+ };
347
+ // accessible behavior for tablist
348
+ const handleBulletsKeyDown = (event) => {
349
+ switch (event.key) {
350
+ case 'ArrowLeft': {
351
+ isSlideCarousel && slidePrevious();
352
+ isScrollCarousel &&
353
+ onScrollPagination(sliderState.currentPage - 1, 'previous');
354
+ break;
355
+ }
356
+ case 'ArrowRight': {
357
+ isSlideCarousel && slideNext();
358
+ isScrollCarousel &&
359
+ onScrollPagination(sliderState.currentPage + 1, 'next');
360
+ break;
361
+ }
362
+ case 'Home': {
363
+ slide(0, sliderDispatch);
364
+ break;
365
+ }
366
+ case 'End': {
367
+ slide(childrenCount - 1, sliderDispatch);
368
+ break;
369
+ }
370
+ default:
371
+ }
372
+ };
373
+ return (external_react_default().createElement("section", { id: id, "data-fs-carousel": true, className: className, "data-testid": testId, "aria-label": ariaLabel },
374
+ external_react_default().createElement("div", { "data-fs-carousel-track-container": true, style: {
375
+ width: '100%',
376
+ overflow: 'hidden',
377
+ display: isScrollCarousel ? 'block' : undefined,
378
+ }, ...handlers },
379
+ external_react_default().createElement("ul", { "aria-live": "polite", ref: carouselTrackRef, style: carouselTrackStyle, "data-fs-carousel-track": true, onScroll: onScrollTrack, onTransitionEnd: onTransitionTrackEnd }, slides.map((currentSlide, idx) => (external_react_default().createElement(Carousel_CarouselItem, { id: id, index: idx, key: String(idx), state: sliderState, totalItems: childrenCount, infiniteMode: infiniteMode, isScrollCarousel: isScrollCarousel }, currentSlide))))),
380
+ showNavigationArrows && (external_react_default().createElement("div", { "data-fs-carousel-controls": true },
381
+ external_react_default().createElement(IconButton/* default */.Z, { "data-fs-carousel-control": "left", "aria-controls": id, "aria-label": "previous", icon: navigationIcons?.left ?? (external_react_default().createElement(Icon/* default */.Z, { name: "ArrowLeft", width: 20, height: 20, weight: "bold" })), onClick: () => {
382
+ isSlideCarousel && slidePrevious();
383
+ isScrollCarousel &&
384
+ onScrollPagination(sliderState.currentPage - 1, 'previous');
385
+ } }),
386
+ external_react_default().createElement(IconButton/* default */.Z, { "data-fs-carousel-control": "right", "aria-controls": id, "aria-label": "next", icon: navigationIcons?.right ?? (external_react_default().createElement(Icon/* default */.Z, { name: "ArrowRight", width: 20, height: 20, weight: "bold" })), onClick: () => {
387
+ isSlideCarousel && slideNext();
388
+ isScrollCarousel &&
389
+ onScrollPagination(sliderState.currentPage + 1, 'next');
390
+ } }))),
391
+ showPaginationBullets && (external_react_default().createElement(Carousel_CarouselBullets, { id: id, tabIndex: 0, activeBullet: sliderState.currentPage, totalQuantity: pagesCount, onKeyDown: handleBulletsKeyDown, onClick: async (_, idx) => {
392
+ isSlideCarousel &&
393
+ !sliderState.sliding &&
394
+ slide(idx, sliderDispatch);
395
+ isScrollCarousel && onScrollPagination(idx);
396
+ }, onFocus: (event) => event.currentTarget.focus(), ariaControlsGenerator: (idx) => `${id}-carousel-item-${idx}` }))));
397
+ }
398
+ /* harmony default export */ const Carousel_Carousel = (Carousel);
399
+ //# sourceMappingURL=Carousel.js.map
400
+ // EXTERNAL MODULE: external "react/jsx-runtime"
401
+ var jsx_runtime_ = __webpack_require__(20997);
402
+ ;// CONCATENATED MODULE: ./src/components/ui/Carousel/Carousel.tsx
403
+
404
+
405
+
406
+ function Carousel_Carousel_Carousel({
407
+ id,
408
+ testId,
409
+ children,
410
+ itemsPerPage = 5
411
+ }) {
412
+ const isMobile = window.innerWidth <= 768;
413
+ return /*#__PURE__*/jsx_runtime_.jsx(Carousel_Carousel, {
414
+ id: id,
415
+ testId: testId,
416
+ variant: "scroll",
417
+ infiniteMode: false,
418
+ itemsPerPage: isMobile ? 1 : itemsPerPage,
419
+ children: children
420
+ });
421
+ }
422
+
423
+ /* harmony default export */ const ui_Carousel_Carousel = (Carousel_Carousel_Carousel);
424
+ ;// CONCATENATED MODULE: ./src/components/ui/Carousel/index.ts
425
+
426
+ ;// CONCATENATED MODULE: ./src/customizations/components/overrides/ProductShelf.tsx
427
+ // This is an example of how it can be used on the starter.
428
+ const SECTION = 'ProductShelf';
429
+ const overrides = {
430
+ name: SECTION,
431
+ components: {
432
+ ProductShelf: {
433
+ props: {}
434
+ },
435
+ __experimentalCarousel: {
436
+ props: {}
437
+ },
438
+ __experimentalProductCard: {
439
+ props: {}
440
+ }
441
+ }
442
+ };
443
+ /* harmony default export */ const overrides_ProductShelf = (overrides);
444
+ ;// CONCATENATED MODULE: ./src/components/sections/ProductShelf/Overrides.tsx
445
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
446
+
447
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
448
+
449
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
450
+
451
+
452
+
453
+
454
+
455
+ const productShelfComponentsCustomization = {};
456
+ const productShelfPropsCustomization = {};
457
+ Object.entries(overrides_ProductShelf.components).forEach(([key, value]) => {
458
+ if (value.Component) {
459
+ productShelfComponentsCustomization[key] = value.Component;
460
+ }
461
+ });
462
+ Object.entries(overrides_ProductShelf.components).forEach(([key, value]) => {
463
+ if (value.props) {
464
+ productShelfPropsCustomization[key] = value.props;
465
+ }
466
+ });
467
+
468
+ const Components = _objectSpread({
469
+ ProductShelf: ProductShelf/* default */.Z,
470
+ __experimentalCarousel: ui_Carousel_Carousel,
471
+ __experimentalProductCard: ProductCard/* default */.Z
472
+ }, productShelfComponentsCustomization);
473
+
474
+
475
+
476
+ /***/ }),
477
+
478
+ /***/ 70424:
479
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
480
+
481
+ "use strict";
482
+
483
+ // EXPORTS
484
+ __webpack_require__.d(__webpack_exports__, {
485
+ "Z": () => (/* reexport */ ProductShelfSkeleton_ProductShelfSkeleton)
486
+ });
487
+
488
+ // EXTERNAL MODULE: ../components/dist/organisms/ProductShelf/ProductShelf.js
489
+ var ProductShelf = __webpack_require__(94285);
490
+ // EXTERNAL MODULE: external "react"
491
+ var external_react_ = __webpack_require__(16689);
492
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
493
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ProductShelf/ProductShelfItems.js
494
+
495
+ const ProductShelfItems = (0,external_react_.forwardRef)(function ProductShelfItems({ testId = 'fs-product-shelf-items', children, ...otherProps }, ref) {
496
+ return (external_react_default().createElement("ul", { role: "list", ref: ref, "data-fs-product-shelf-items": true, "data-fs-content": "product-shelf", "data-testid": testId, ...otherProps }, children));
497
+ });
498
+ /* harmony default export */ const ProductShelf_ProductShelfItems = (ProductShelfItems);
499
+ //# sourceMappingURL=ProductShelfItems.js.map
500
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ProductShelf/ProductShelfItem.js
501
+
502
+ const ProductShelfItem = (0,external_react_.forwardRef)(function ProductShelfItem({ testId = 'fs-product-shelf-item', children, ...otherProps }, ref) {
503
+ return (external_react_default().createElement("li", { role: "listitem", ref: ref, "data-fs-product-shelf-item": true, "data-testid": testId, ...otherProps }, children));
504
+ });
505
+ /* harmony default export */ const ProductShelf_ProductShelfItem = (ProductShelfItem);
506
+ //# sourceMappingURL=ProductShelfItem.js.map
507
+ // EXTERNAL MODULE: ./src/constants.ts
508
+ var constants = __webpack_require__(18459);
509
+ // EXTERNAL MODULE: ./src/components/skeletons/ProductCardSkeleton/index.ts + 1 modules
510
+ var ProductCardSkeleton = __webpack_require__(73288);
511
+ // EXTERNAL MODULE: external "react/jsx-runtime"
512
+ var jsx_runtime_ = __webpack_require__(20997);
513
+ ;// CONCATENATED MODULE: ./src/components/skeletons/ProductShelfSkeleton/ProductShelfSkeleton.tsx
514
+
515
+
516
+
517
+
518
+
519
+
520
+ function ProductShelfSkeleton({
521
+ children,
522
+ aspectRatio,
523
+ loading = true
524
+ }) {
525
+ return loading ? /*#__PURE__*/jsx_runtime_.jsx(ProductShelf/* default */.Z, {
526
+ "data-fs-product-shelf-skeleton": true,
527
+ children: /*#__PURE__*/jsx_runtime_.jsx(ProductShelf_ProductShelfItems, {
528
+ children: Array.from({
529
+ length: constants/* ITEMS_PER_SECTION */.K
530
+ }, (_, index) => /*#__PURE__*/jsx_runtime_.jsx(ProductShelf_ProductShelfItem, {
531
+ children: /*#__PURE__*/jsx_runtime_.jsx(ProductCardSkeleton/* default */.Z, {
532
+ aspectRatio: aspectRatio,
533
+ sectioned: true,
534
+ bordered: true
535
+ })
536
+ }, String(index)))
537
+ })
538
+ }) : /*#__PURE__*/jsx_runtime_.jsx(jsx_runtime_.Fragment, {
539
+ children: children
540
+ });
541
+ }
542
+
543
+ /* harmony default export */ const ProductShelfSkeleton_ProductShelfSkeleton = (ProductShelfSkeleton);
544
+ ;// CONCATENATED MODULE: ./src/components/skeletons/ProductShelfSkeleton/index.ts
545
+
546
+
547
+ /***/ }),
548
+
549
+ /***/ 77691:
550
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
551
+
552
+ "use strict";
553
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
554
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
555
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
556
+ /* harmony export */ });
557
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16689);
558
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
559
+ /* harmony import */ var src_components_skeletons_ProductShelfSkeleton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70424);
560
+ /* harmony import */ var src_sdk_analytics_hooks_useViewItemListEvent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55184);
561
+ /* harmony import */ var src_sdk_product_useProductsQuery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24867);
562
+ /* harmony import */ var src_utils_utilities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(43952);
563
+ /* harmony import */ var src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86237);
564
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20997);
565
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__);
566
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_sdk_product_useProductsQuery__WEBPACK_IMPORTED_MODULE_3__]);
567
+ src_sdk_product_useProductsQuery__WEBPACK_IMPORTED_MODULE_3__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
568
+ const _excluded = ["title", "inView", "productCardConfiguration"];
569
+
570
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
571
+
572
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
573
+
574
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
575
+
576
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
577
+
578
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
579
+
580
+
581
+
582
+
583
+
584
+
585
+
586
+
587
+
588
+
589
+
590
+ const {
591
+ ProductShelf: ProductShelfWrapper,
592
+ __experimentalCarousel: Carousel,
593
+ __experimentalProductCard: ProductCard
594
+ } = src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Components */ .z;
595
+
596
+ function ProductShelf(_ref) {
597
+ let {
598
+ title,
599
+ inView,
600
+ productCardConfiguration: {
601
+ bordered = src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Props.__experimentalProductCard.bordered */ .x.__experimentalProductCard.bordered,
602
+ showDiscountBadge = src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Props.__experimentalProductCard.showDiscountBadge */ .x.__experimentalProductCard.showDiscountBadge
603
+ } = {}
604
+ } = _ref,
605
+ variables = _objectWithoutProperties(_ref, _excluded);
606
+
607
+ const titleId = (0,src_utils_utilities__WEBPACK_IMPORTED_MODULE_6__/* .textToKebabCase */ .B)(title);
608
+ const id = (0,react__WEBPACK_IMPORTED_MODULE_0__.useId)();
609
+ const viewedOnce = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
610
+ const products = (0,src_sdk_product_useProductsQuery__WEBPACK_IMPORTED_MODULE_3__/* .useProductsQuery */ .kN)(variables);
611
+ const productEdges = products?.edges ?? [];
612
+ const aspectRatio = 1;
613
+ const {
614
+ sendViewItemListEvent
615
+ } = (0,src_sdk_analytics_hooks_useViewItemListEvent__WEBPACK_IMPORTED_MODULE_2__/* .useViewItemListEvent */ .m)({
616
+ products: productEdges,
617
+ title,
618
+ page: 0,
619
+ pageSize: 0
620
+ });
621
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
622
+ if (inView && !viewedOnce.current && productEdges.length) {
623
+ sendViewItemListEvent();
624
+ viewedOnce.current = true;
625
+ }
626
+ }, [inView, productEdges.length, sendViewItemListEvent]);
627
+
628
+ if (products?.edges.length === 0) {
629
+ return null;
630
+ }
631
+
632
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.Fragment, {
633
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx("h2", {
634
+ className: "text__title-section layout__content",
635
+ children: title
636
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx(src_components_skeletons_ProductShelfSkeleton__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
637
+ aspectRatio: aspectRatio,
638
+ loading: products === undefined,
639
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx(ProductShelfWrapper, _objectSpread(_objectSpread({}, src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Props.ProductShelfWrapper */ .x.ProductShelfWrapper), {}, {
640
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_5__.jsx(Carousel, _objectSpread(_objectSpread({
641
+ id: titleId || id
642
+ }, src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Props.__experimentalCarousel */ .x.__experimentalCarousel), {}, {
643
+ children: productEdges.map((product, idx) => /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ProductCard, _objectSpread(_objectSpread({
644
+ aspectRatio: aspectRatio,
645
+ imgProps: {
646
+ width: 216,
647
+ height: 216,
648
+ sizes: '(max-width: 768px) 42vw, 30vw'
649
+ }
650
+ }, src_components_sections_ProductShelf_Overrides__WEBPACK_IMPORTED_MODULE_4__/* .Props.__experimentalProductCard */ .x.__experimentalProductCard), {}, {
651
+ bordered: bordered,
652
+ showDiscountBadge: showDiscountBadge // Dynamic props shouldn't be overridable
653
+ // This decision can be reviewed later if needed
654
+ ,
655
+ key: `${product.node.id}`,
656
+ product: product.node,
657
+ index: idx + 1
658
+ })))
659
+ }))
660
+ }))
661
+ })]
662
+ });
663
+ }
664
+
665
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductShelf);
666
+ __webpack_async_result__();
667
+ } catch(e) { __webpack_async_result__(e); } });
668
+
669
+ /***/ }),
670
+
671
+ /***/ 34805:
672
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
673
+
674
+ "use strict";
675
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
676
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
677
+ /* harmony export */ "Z": () => (/* reexport safe */ _ProductShelf__WEBPACK_IMPORTED_MODULE_0__.Z)
678
+ /* harmony export */ });
679
+ /* harmony import */ var _ProductShelf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77691);
680
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_ProductShelf__WEBPACK_IMPORTED_MODULE_0__]);
681
+ _ProductShelf__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
682
+
683
+ __webpack_async_result__();
684
+ } catch(e) { __webpack_async_result__(e); } });
685
+
686
+ /***/ }),
687
+
688
+ /***/ 43952:
689
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
690
+
691
+ "use strict";
692
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
693
+ /* harmony export */ "B": () => (/* binding */ textToKebabCase)
694
+ /* harmony export */ });
695
+ //Input "Example Text!". Output: example-text
696
+ function textToKebabCase(text) {
697
+ // Replace spaces and special characters with hyphens
698
+ let kebabCase = text.replace(/[^\w\s]/gi, '-'); // Remove whitespace
699
+
700
+ kebabCase = kebabCase.replace(/\s+/g, '-'); // Convert to lowercase
701
+
702
+ kebabCase = kebabCase.toLowerCase();
703
+ return kebabCase ?? '';
704
+ }
705
+
706
+ /***/ }),
707
+
708
+ /***/ 56627:
709
+ /***/ ((module) => {
710
+
711
+ // Exports
712
+ module.exports = {
713
+ "section": "section_section__C1DoH",
714
+ "loading": "section_loading__k5bCF"
715
+ };
716
+
717
+
718
+ /***/ })
719
+
720
+ };
721
+ ;