@faststore/core 2.0.98-alpha.0 → 2.0.100-alpha.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.
Files changed (175) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/build-manifest.json +99 -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/120.js +435 -0
  20. package/.next/server/chunks/123.js +58 -0
  21. package/.next/server/chunks/1394.js +3801 -0
  22. package/.next/server/chunks/1608.js +515 -0
  23. package/.next/server/chunks/2154.js +206 -0
  24. package/.next/server/chunks/247.js +61 -0
  25. package/.next/server/chunks/2914.js +95 -0
  26. package/.next/server/chunks/2922.js +7293 -0
  27. package/.next/server/chunks/3264.js +67 -0
  28. package/.next/server/chunks/3431.js +7241 -0
  29. package/.next/server/chunks/350.js +142 -0
  30. package/.next/server/chunks/3746.js +237 -0
  31. package/.next/server/chunks/3898.js +240 -0
  32. package/.next/server/chunks/4312.js +674 -0
  33. package/.next/server/chunks/4371.js +1473 -0
  34. package/.next/server/chunks/5098.js +124 -0
  35. package/.next/server/chunks/5576.js +72 -0
  36. package/.next/server/chunks/6280.js +322 -0
  37. package/.next/server/chunks/6465.js +91 -0
  38. package/.next/server/chunks/676.js +32 -0
  39. package/.next/server/chunks/6859.js +959 -0
  40. package/.next/server/chunks/6881.js +320 -0
  41. package/.next/server/chunks/6898.js +149 -0
  42. package/.next/server/chunks/7104.js +196 -0
  43. package/.next/server/chunks/7181.js +658 -0
  44. package/.next/server/chunks/7183.js +72 -0
  45. package/.next/server/chunks/7992.js +570 -0
  46. package/.next/server/chunks/8098.js +246 -0
  47. package/.next/server/chunks/810.js +432 -0
  48. package/.next/server/chunks/8287.js +58 -0
  49. package/.next/server/chunks/9143.js +106 -0
  50. package/.next/server/chunks/9152.js +213 -0
  51. package/.next/server/chunks/953.js +646 -0
  52. package/.next/server/chunks/9557.js +117 -0
  53. package/.next/server/chunks/9854.js +72 -0
  54. package/.next/server/chunks/font-manifest.json +1 -0
  55. package/.next/server/font-manifest.json +1 -0
  56. package/.next/server/middleware-build-manifest.js +1 -0
  57. package/.next/server/middleware-manifest.json +6 -0
  58. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  59. package/.next/server/pages/404.js.nft.json +1 -0
  60. package/.next/server/pages/500.js.nft.json +1 -0
  61. package/.next/server/pages/[...slug].js +671 -0
  62. package/.next/server/pages/[...slug].js.nft.json +1 -0
  63. package/.next/server/pages/[slug]/p.js +2393 -0
  64. package/.next/server/pages/[slug]/p.js.nft.json +1 -0
  65. package/.next/server/pages/_app.js +2369 -0
  66. package/.next/server/pages/_app.js.nft.json +1 -0
  67. package/.next/server/pages/_document.js +304 -0
  68. package/.next/server/pages/_document.js.nft.json +1 -0
  69. package/.next/server/pages/_error.js +164 -0
  70. package/.next/server/pages/_error.js.nft.json +1 -0
  71. package/.next/server/pages/account.js.nft.json +1 -0
  72. package/.next/server/pages/api/graphql.js +315 -0
  73. package/.next/server/pages/api/graphql.js.nft.json +1 -0
  74. package/.next/server/pages/api/preview.js +118 -0
  75. package/.next/server/pages/api/preview.js.nft.json +1 -0
  76. package/.next/server/pages/checkout.js.nft.json +1 -0
  77. package/.next/server/pages/en-US/404.html +81 -0
  78. package/.next/server/pages/en-US/500.html +81 -0
  79. package/.next/server/pages/en-US/account.html +81 -0
  80. package/.next/server/pages/en-US/checkout.html +81 -0
  81. package/.next/server/pages/en-US/login.html +81 -0
  82. package/.next/server/pages/en-US/s.html +81 -0
  83. package/.next/server/pages/en-US.html +81 -0
  84. package/.next/server/pages/en-US.json +1 -0
  85. package/.next/server/pages/index.js +428 -0
  86. package/.next/server/pages/index.js.nft.json +1 -0
  87. package/.next/server/pages/login.js.nft.json +1 -0
  88. package/.next/server/pages/s.js.nft.json +1 -0
  89. package/.next/server/pages-manifest.json +16 -0
  90. package/.next/server/webpack-api-runtime.js +229 -0
  91. package/.next/server/webpack-runtime.js +229 -0
  92. package/.next/static/_W6shnELbnMsH_iBfBVBe/_buildManifest.js +1 -0
  93. package/.next/static/_W6shnELbnMsH_iBfBVBe/_ssgManifest.js +1 -0
  94. package/.next/static/chunks/143.dd8a556e6957baa1.js +1 -0
  95. package/.next/static/chunks/152.57849458d8337a92.js +1 -0
  96. package/.next/static/chunks/264-25ec99bbaf5d02b4.js +1 -0
  97. package/.next/static/chunks/351-a4e28d64f48c5269.js +1 -0
  98. package/.next/static/chunks/608.59e69b83f35d9c44.js +1 -0
  99. package/.next/static/chunks/651.7142f31ce1e052b3.js +1 -0
  100. package/.next/static/chunks/686.6c345856d484363b.js +1 -0
  101. package/.next/static/chunks/741.52f7fb873418346f.js +1 -0
  102. package/.next/static/chunks/781-7df372b5b56e3f96.js +1 -0
  103. package/.next/static/chunks/843.e1d0f9260a52f32c.js +1 -0
  104. package/.next/static/chunks/98.97381d2021f86cd9.js +1 -0
  105. package/.next/static/chunks/996.64460309250b214c.js +1 -0
  106. package/.next/static/chunks/framework-dfd14d7ce6600b03.js +1 -0
  107. package/.next/static/chunks/main-9746772201fe3ac1.js +1 -0
  108. package/.next/static/chunks/pages/404-ba608a2a9f0c420a.js +1 -0
  109. package/.next/static/chunks/pages/500-910883c20541d9ce.js +1 -0
  110. package/.next/static/chunks/pages/[...slug]-417e3b51bda1f5f3.js +1 -0
  111. package/.next/static/chunks/pages/[slug]/p-cbb4ca8d57bafa9f.js +1 -0
  112. package/.next/static/chunks/pages/_app-d757170e632a6003.js +1 -0
  113. package/.next/static/chunks/pages/_error-a7a0c1d9bfbb4f38.js +1 -0
  114. package/.next/static/chunks/pages/account-b8fc5222ffe89b60.js +1 -0
  115. package/.next/static/chunks/pages/checkout-f8cb7cb22225ef9d.js +1 -0
  116. package/.next/static/chunks/pages/index-9ea3f7868f5ed138.js +1 -0
  117. package/.next/static/chunks/pages/login-33954810b200eca8.js +1 -0
  118. package/.next/static/chunks/pages/s-ba2868e14fedb65b.js +1 -0
  119. package/.next/static/chunks/polyfills-c67a75d1b6f99dc8.js +1 -0
  120. package/.next/static/chunks/webpack-65b155971f3eac57.js +1 -0
  121. package/.next/static/css/10db3bc7ecdf0556.css +1 -0
  122. package/.next/static/css/43d61b402f41569b.css +1 -0
  123. package/.next/static/css/4899c3cc356704f9.css +1 -0
  124. package/.next/static/css/6507cb48401e73a4.css +1 -0
  125. package/.next/static/css/8ea129ea90e49e98.css +1 -0
  126. package/.next/static/css/b2f16bd4b93e0aca.css +1 -0
  127. package/.next/static/css/db63ea05e98cb7e8.css +1 -0
  128. package/.next/static/css/ea60a7e6c07ee644.css +1 -0
  129. package/.next/static/media/brandless-neutral.76ddf63a.png +0 -0
  130. package/.next/trace +65 -0
  131. package/.storybook/components/SectionItem.tsx +1 -3
  132. package/.turbo/turbo-build.log +16 -16
  133. package/CHANGELOG.md +10 -0
  134. package/cms/sections.json +843 -40
  135. package/package.json +4 -4
  136. package/public/icons.svg +60 -56
  137. package/public/~partytown/debug/partytown-atomics.js +556 -0
  138. package/public/~partytown/debug/partytown-media.js +374 -0
  139. package/public/~partytown/debug/partytown-sandbox-sw.js +543 -0
  140. package/public/~partytown/debug/partytown-sw.js +59 -0
  141. package/public/~partytown/debug/partytown-ww-atomics.js +1789 -0
  142. package/public/~partytown/debug/partytown-ww-sw.js +1781 -0
  143. package/public/~partytown/debug/partytown.js +72 -0
  144. package/public/~partytown/partytown-atomics.js +2 -0
  145. package/public/~partytown/partytown-media.js +2 -0
  146. package/public/~partytown/partytown-sw.js +2 -0
  147. package/public/~partytown/partytown.js +2 -0
  148. package/src/Layout.tsx +1 -2
  149. package/src/components/cart/CartSidebar/CartSidebar.tsx +6 -8
  150. package/src/components/cart/CartToggle/CartToggle.tsx +5 -2
  151. package/src/components/cart/EmptyCart/EmptyCart.tsx +1 -2
  152. package/src/components/common/Alert/Alert.tsx +1 -2
  153. package/src/components/common/Footer/Footer.tsx +3 -3
  154. package/src/components/common/Footer/FooterFlags.tsx +21 -18
  155. package/src/components/common/Navbar/Navbar.tsx +2 -4
  156. package/src/components/product/OutOfStock/OutOfStock.tsx +2 -3
  157. package/src/components/region/RegionButton/RegionButton.tsx +1 -2
  158. package/src/components/region/RegionModal/RegionalizationModalContent.tsx +1 -1
  159. package/src/components/search/SearchInput/SearchInput.tsx +17 -17
  160. package/src/components/sections/BannerText/BannerText.tsx +1 -0
  161. package/src/components/sections/Incentives/Incentives.tsx +1 -3
  162. package/src/components/sections/Newsletter/Newsletter.tsx +1 -2
  163. package/src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx +24 -18
  164. package/src/components/sections/ProductGallery/EmptyGallery.tsx +1 -2
  165. package/src/components/sections/ProductGallery/ProductGallery.tsx +4 -5
  166. package/src/components/sections/ScrollToTopButton/ScrollToTopButton.tsx +1 -3
  167. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +1 -2
  168. package/src/components/ui/Button/ButtonSignIn/ButtonSignIn.tsx +1 -2
  169. package/src/components/ui/Button/ButtonSignIn/ButtonSignInFallback/ButtonSignInFallback.tsx +1 -3
  170. package/src/components/ui/Carousel/Carousel.tsx +2 -4
  171. package/src/components/ui/Gift/Gift.tsx +6 -3
  172. package/src/components/ui/ImageGallery/ImageGallerySelector.tsx +5 -2
  173. package/src/pages/[...slug].tsx +1 -1
  174. package/src/components/ui/Icon/Icon.tsx +0 -35
  175. package/src/components/ui/Icon/index.ts +0 -1
@@ -0,0 +1,2393 @@
1
+ (() => {
2
+ var exports = {};
3
+ exports.id = 2103;
4
+ exports.ids = [2103];
5
+ exports.modules = {
6
+
7
+ /***/ 7738:
8
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
9
+
10
+ "use strict";
11
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
12
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
13
+ /* harmony export */ });
14
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
15
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
16
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4842);
17
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5045);
18
+
19
+
20
+ function BuyButton({ testId = 'fs-buy-button', icon, children, ...otherProps }) {
21
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { "data-fs-buy-button": true, icon: react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, { name: "ShoppingCart" }), iconPosition: "left", "data-testid": testId, ...otherProps }, children));
22
+ }
23
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BuyButton);
24
+ //# sourceMappingURL=BuyButton.js.map
25
+
26
+ /***/ }),
27
+
28
+ /***/ 1672:
29
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
30
+
31
+ "use strict";
32
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
33
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
34
+ /* harmony export */ });
35
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
36
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
37
+ /* harmony import */ var ___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(783);
38
+
39
+
40
+ const ProductTitle = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function ProductTitle({ title, label, refTag = 'Ref.: ', refNumber, testId = 'fs-product-title', ratingValue, ...otherProps }, ref) {
41
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("header", { ref: ref, "data-fs-product-title": true, "data-testid": testId, ...otherProps },
42
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-product-title-header": true },
43
+ title,
44
+ !!label && label),
45
+ (refNumber || ratingValue) && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", { "data-fs-product-title-addendum": true },
46
+ ratingValue && react__WEBPACK_IMPORTED_MODULE_0___default().createElement(___WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, { value: ratingValue }),
47
+ refNumber && (react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null,
48
+ refTag,
49
+ " ",
50
+ refNumber))))));
51
+ });
52
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductTitle);
53
+ //# sourceMappingURL=ProductTitle.js.map
54
+
55
+ /***/ }),
56
+
57
+ /***/ 4707:
58
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
59
+
60
+ "use strict";
61
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
62
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
63
+ /* harmony export */ });
64
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
65
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
66
+
67
+ const Table = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function Table({ children, variant = 'colored', testId = 'fs-table', ...otherProps }, ref) {
68
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { "data-fs-table": true },
69
+ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("table", { ref: ref, "data-fs-table-content": true, "data-fs-table-variant": variant, "data-testid": testId, ...otherProps }, children)));
70
+ });
71
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Table);
72
+ //# sourceMappingURL=Table.js.map
73
+
74
+ /***/ }),
75
+
76
+ /***/ 1566:
77
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
78
+
79
+ "use strict";
80
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
81
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
82
+ /* harmony export */ });
83
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
84
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
85
+
86
+ const TableBody = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableBody({ children, testId = 'fs-table-body', ...otherProps }, ref) {
87
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tbody", { ref: ref, "data-testid": testId, "data-fs-table-body": true, ...otherProps }, children));
88
+ });
89
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableBody);
90
+ //# sourceMappingURL=TableBody.js.map
91
+
92
+ /***/ }),
93
+
94
+ /***/ 3111:
95
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
96
+
97
+ "use strict";
98
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
99
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
100
+ /* harmony export */ });
101
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
102
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
103
+
104
+ const TableCell = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableCell({ scope, align, children, variant = 'data', testId = 'fs-table-cell', ...otherProps }, ref) {
105
+ const Cell = variant === 'header' ? 'th' : 'td';
106
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Cell, { ref: ref, "data-fs-table-cell": variant, "data-fs-table-cell-align": align, "data-testid": testId, scope: scope, ...otherProps }, children));
107
+ });
108
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableCell);
109
+ //# sourceMappingURL=TableCell.js.map
110
+
111
+ /***/ }),
112
+
113
+ /***/ 6037:
114
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
115
+
116
+ "use strict";
117
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
118
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
119
+ /* harmony export */ });
120
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
121
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
122
+
123
+ const TableRow = (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function TableRow({ children, testId = 'fs-table-row', ...otherProps }, ref) {
124
+ return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", { ref: ref, "data-fs-table-row": true, "data-testid": testId, ...otherProps }, children));
125
+ });
126
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (TableRow);
127
+ //# sourceMappingURL=TableRow.js.map
128
+
129
+ /***/ }),
130
+
131
+ /***/ 492:
132
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
133
+
134
+ "use strict";
135
+
136
+ // EXPORTS
137
+ __webpack_require__.d(__webpack_exports__, {
138
+ "Z": () => (/* reexport */ product_OutOfStock_OutOfStock)
139
+ });
140
+
141
+ // EXTERNAL MODULE: ../components/dist/hooks/UIProvider.js
142
+ var UIProvider = __webpack_require__(395);
143
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
144
+ var Icon = __webpack_require__(5045);
145
+ // EXTERNAL MODULE: external "react"
146
+ var external_react_ = __webpack_require__(6689);
147
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
148
+ // EXTERNAL MODULE: ../components/dist/molecules/InputField/InputField.js
149
+ var InputField = __webpack_require__(8287);
150
+ // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js + 1 modules
151
+ var Button = __webpack_require__(4842);
152
+ ;// CONCATENATED MODULE: ../components/dist/organisms/OutOfStock/OutOfStock.js
153
+
154
+
155
+ const OutOfStock = (0,external_react_.forwardRef)(function OutOfStock({ testId = 'fs-out-of-stock', title, buttonLabel = 'Notify Me', loadingLabel = 'Loading', inputLabel, subtitle, disabled, errorMessage, onSubmit, ...otherProps }, ref) {
156
+ return (external_react_default().createElement("form", { "data-fs-out-of-stock": true, ref: ref, "data-testid": testId, onSubmit: onSubmit, ...otherProps },
157
+ external_react_default().createElement("h2", { "data-fs-out-of-stock-title": true }, title),
158
+ subtitle && (external_react_default().createElement("p", { "data-fs-out-of-stock-message": true },
159
+ external_react_default().createElement(Icon/* default */.Z, { name: "BellRinging", width: 16, height: 16 }),
160
+ subtitle)),
161
+ external_react_default().createElement(InputField/* default */.Z, { id: "out-of-stock-email", name: "out-of-stock-email", label: inputLabel, "aria-label": inputLabel, error: errorMessage, required: true }),
162
+ external_react_default().createElement(Button/* default */.Z, { "data-fs-out-of-stock-button": true, type: "submit", loading: disabled, loadingLabel: loadingLabel, disabled: disabled, variant: "primary", icon: external_react_default().createElement(Icon/* default */.Z, { name: "BellRinging" }), iconPosition: "left" }, buttonLabel)));
163
+ });
164
+ /* harmony default export */ const OutOfStock_OutOfStock = (OutOfStock);
165
+ //# sourceMappingURL=OutOfStock.js.map
166
+ // EXTERNAL MODULE: ./src/sdk/session/index.ts
167
+ var session = __webpack_require__(5971);
168
+ // EXTERNAL MODULE: external "react/jsx-runtime"
169
+ var jsx_runtime_ = __webpack_require__(997);
170
+ ;// CONCATENATED MODULE: ./src/components/product/OutOfStock/OutOfStock.tsx
171
+
172
+
173
+
174
+
175
+
176
+ function OutOfStock_OutOfStock_OutOfStock() {
177
+ const {
178
+ postalCode
179
+ } = (0,session/* useSession */.kP)();
180
+ const {
181
+ 0: isLoading,
182
+ 1: setIsLoading
183
+ } = (0,external_react_.useState)(false);
184
+ const {
185
+ 0: error,
186
+ 1: setError
187
+ } = (0,external_react_.useState)('');
188
+ const {
189
+ pushToast
190
+ } = (0,UIProvider/* useUI */.l)();
191
+
192
+ const handleSubmit = event => {
193
+ event.preventDefault();
194
+ setIsLoading(true); // TODO: Missing integration
195
+
196
+ try {
197
+ // Return to original state after 2s mockup
198
+ setTimeout(() => setIsLoading(false), 2000);
199
+ const formElement = event.currentTarget;
200
+ formElement.reset();
201
+ pushToast({
202
+ title: 'Subscribed successfully!',
203
+ message: "You'll be notified when this product is back to stock.",
204
+ status: 'INFO',
205
+ icon: /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
206
+ name: "CircleWavyCheck",
207
+ width: 30,
208
+ height: 30
209
+ })
210
+ });
211
+ } catch (err) {
212
+ setError(err.message);
213
+ } finally {}
214
+ };
215
+
216
+ return /*#__PURE__*/jsx_runtime_.jsx(OutOfStock_OutOfStock, {
217
+ title: postalCode ? 'Unavailable in Your Location' : 'Out of Stock',
218
+ inputLabel: "Email",
219
+ subtitle: "Notify me when available",
220
+ onSubmit: handleSubmit,
221
+ disabled: isLoading,
222
+ errorMessage: error
223
+ });
224
+ }
225
+
226
+ /* harmony default export */ const product_OutOfStock_OutOfStock = (OutOfStock_OutOfStock_OutOfStock);
227
+ ;// CONCATENATED MODULE: ./src/components/product/OutOfStock/index.ts
228
+
229
+
230
+ /***/ }),
231
+
232
+ /***/ 2951:
233
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
234
+
235
+ "use strict";
236
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
237
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
238
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
239
+ /* harmony export */ });
240
+ /* harmony import */ var _BannerText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7528);
241
+ /* harmony import */ var _Newsletter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7191);
242
+ /* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8879);
243
+ /* harmony import */ var _banner_newsletter_module_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6308);
244
+ /* harmony import */ var _banner_newsletter_module_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_banner_newsletter_module_scss__WEBPACK_IMPORTED_MODULE_4__);
245
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(997);
246
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__);
247
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_Newsletter__WEBPACK_IMPORTED_MODULE_1__]);
248
+ _Newsletter__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ function BannerNewsletter() {
257
+ return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(_Section__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
258
+ className: "layout__content",
259
+ children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsxs)("div", {
260
+ className: (_banner_newsletter_module_scss__WEBPACK_IMPORTED_MODULE_4___default().fsBannerNewsletter),
261
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(_BannerText__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z, {
262
+ title: "Get to Know Our Next Release",
263
+ caption: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam elit nisi, vehicula in turpis sit amet, posuere aliquam nisl. ",
264
+ actionLabel: "Shop Now",
265
+ actionPath: "/",
266
+ variant: "secondary",
267
+ colorVariant: "light"
268
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__.jsx(_Newsletter__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
269
+ title: "Get News and Special Offers!",
270
+ description: "Receive our news and promotions in advance. Enjoy and get 10% off your first purchase. For more information click here.",
271
+ card: true
272
+ })]
273
+ })
274
+ });
275
+ }
276
+
277
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BannerNewsletter);
278
+ __webpack_async_result__();
279
+ } catch(e) { __webpack_async_result__(e); } });
280
+
281
+ /***/ }),
282
+
283
+ /***/ 994:
284
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
285
+
286
+ "use strict";
287
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
288
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
289
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
290
+ /* harmony export */ });
291
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
292
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
293
+ /* harmony import */ var _ProductShelf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7104);
294
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(997);
295
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__);
296
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_ProductShelf__WEBPACK_IMPORTED_MODULE_1__]);
297
+ _ProductShelf__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
298
+
299
+
300
+
301
+
302
+ const CrossSellingShelf = ({
303
+ items,
304
+ title,
305
+ context,
306
+ kind
307
+ }) => {
308
+ const selectedFacets = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => [{
309
+ key: kind,
310
+ value: context.isVariantOf.productGroupID
311
+ }], [kind, context.isVariantOf.productGroupID]);
312
+ return /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_2__.jsx(_ProductShelf__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
313
+ first: items,
314
+ title: title,
315
+ selectedFacets: selectedFacets
316
+ });
317
+ };
318
+
319
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CrossSellingShelf);
320
+ __webpack_async_result__();
321
+ } catch(e) { __webpack_async_result__(e); } });
322
+
323
+ /***/ }),
324
+
325
+ /***/ 7990:
326
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
327
+
328
+ "use strict";
329
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
330
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
331
+ /* harmony export */ "Z": () => (/* reexport safe */ _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__.Z)
332
+ /* harmony export */ });
333
+ /* harmony import */ var _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(994);
334
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__]);
335
+ _CrossSellingShelf__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
336
+
337
+ __webpack_async_result__();
338
+ } catch(e) { __webpack_async_result__(e); } });
339
+
340
+ /***/ }),
341
+
342
+ /***/ 4870:
343
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
344
+
345
+ "use strict";
346
+
347
+ // EXPORTS
348
+ __webpack_require__.d(__webpack_exports__, {
349
+ "Z": () => (/* reexport */ ProducDetailsContent_ProductDetailsContent)
350
+ });
351
+
352
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/Accordion.js
353
+ var Accordion = __webpack_require__(9739);
354
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionItem.js
355
+ var AccordionItem = __webpack_require__(5705);
356
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionButton.js
357
+ var AccordionButton = __webpack_require__(7743);
358
+ // EXTERNAL MODULE: ../components/dist/molecules/Accordion/AccordionPanel.js
359
+ var AccordionPanel = __webpack_require__(331);
360
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/Table.js
361
+ var Table = __webpack_require__(4707);
362
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableBody.js
363
+ var TableBody = __webpack_require__(1566);
364
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableRow.js
365
+ var TableRow = __webpack_require__(6037);
366
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableCell.js
367
+ var TableCell = __webpack_require__(3111);
368
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
369
+ var Icon = __webpack_require__(5045);
370
+ // EXTERNAL MODULE: ../components/dist/atoms/List/List.js
371
+ var List = __webpack_require__(1329);
372
+ // EXTERNAL MODULE: external "react"
373
+ var external_react_ = __webpack_require__(6689);
374
+ // EXTERNAL MODULE: ./src/components/sections/Section/index.ts + 1 modules
375
+ var Section = __webpack_require__(8879);
376
+ // EXTERNAL MODULE: external "react/jsx-runtime"
377
+ var jsx_runtime_ = __webpack_require__(997);
378
+ ;// CONCATENATED MODULE: ./src/components/sections/ProducDetailsContent/ProductDetailsContent.tsx
379
+ 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; }
380
+
381
+ 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; }
382
+
383
+ 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; }
384
+
385
+
386
+
387
+
388
+
389
+
390
+
391
+ /**
392
+ * Maps 'initiallyExpanded' prop values to indices
393
+ */
394
+ const INITIALLY_EXPANDED_MAP = {
395
+ first: [0],
396
+ all: [0, 1, 2, 3],
397
+ none: []
398
+ };
399
+ /**
400
+ * Default article labels
401
+ */
402
+
403
+ const DEFAULT_LABELS = {
404
+ description: 'Description',
405
+ about: 'About this product',
406
+ highlights: 'Product highlights',
407
+ learnMore: 'Learn More'
408
+ };
409
+
410
+ function ProductDetailsContent({
411
+ initiallyExpanded = 'first',
412
+ labels: propLabels = {}
413
+ }) {
414
+ const {
415
+ 0: indices,
416
+ 1: setIndices
417
+ } = (0,external_react_.useState)(new Set(INITIALLY_EXPANDED_MAP[initiallyExpanded]));
418
+
419
+ const onChange = index => {
420
+ setIndices(currentIndices => {
421
+ const newIndices = new Set(currentIndices);
422
+
423
+ if (currentIndices.has(index)) {
424
+ newIndices.delete(index);
425
+ } else {
426
+ newIndices.add(index);
427
+ }
428
+
429
+ return newIndices;
430
+ });
431
+ };
432
+
433
+ const labels = _objectSpread(_objectSpread({}, DEFAULT_LABELS), propLabels);
434
+
435
+ return /*#__PURE__*/jsx_runtime_.jsx(Section/* default */.Z, {
436
+ "data-fs-product-details-content": true,
437
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(Accordion/* default */.Z, {
438
+ indices: indices,
439
+ onChange: onChange,
440
+ "aria-label": "Product Details Content",
441
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
442
+ as: "article",
443
+ index: 0,
444
+ "data-fs-product-details-description": true,
445
+ prefixId: "product-details-content",
446
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
447
+ children: labels.description
448
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
449
+ children: /*#__PURE__*/jsx_runtime_.jsx("p", {
450
+ className: "text__body",
451
+ children: "Sony WH-1000XM4 Wireless Industry Leading Noise Canceling Overhead Headphones with Mic for Phone-Call and Alexa Voice Control, Black."
452
+ })
453
+ })]
454
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
455
+ as: "article",
456
+ index: 1,
457
+ "data-fs-product-details-about": true,
458
+ prefixId: "product-details-content",
459
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
460
+ children: labels.about
461
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
462
+ children: /*#__PURE__*/jsx_runtime_.jsx(Table/* default */.Z, {
463
+ cellPadding: 0,
464
+ cellSpacing: 0,
465
+ className: "text__title-mini-alt",
466
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableBody/* default */.Z, {
467
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
468
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
469
+ variant: "header",
470
+ align: "left",
471
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
472
+ "data-fs-accordion-item-button-icon": true,
473
+ name: "Ruler",
474
+ width: 18,
475
+ height: 18
476
+ }), /*#__PURE__*/jsx_runtime_.jsx("span", {
477
+ children: "Width"
478
+ })]
479
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
480
+ align: "right",
481
+ children: "1.50m"
482
+ })]
483
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
484
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
485
+ variant: "header",
486
+ align: "left",
487
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
488
+ "data-fs-accordion-item-button-icon": true,
489
+ name: "Ruler",
490
+ width: 18,
491
+ height: 18
492
+ }), "Height"]
493
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
494
+ align: "right",
495
+ children: "1.50m"
496
+ })]
497
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
498
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
499
+ variant: "header",
500
+ align: "left",
501
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
502
+ "data-fs-accordion-item-button-icon": true,
503
+ name: "Ruler",
504
+ width: 18,
505
+ height: 18
506
+ }), "Dimensions"]
507
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
508
+ align: "right",
509
+ children: "7.27 x 3.03 x 9.94 inches"
510
+ })]
511
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
512
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
513
+ variant: "header",
514
+ align: "left",
515
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
516
+ "data-fs-accordion-item-button-icon": true,
517
+ name: "Bag",
518
+ width: 18,
519
+ height: 18
520
+ }), "Weight"]
521
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
522
+ align: "right",
523
+ children: "12oz"
524
+ })]
525
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
526
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
527
+ variant: "header",
528
+ align: "left",
529
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
530
+ "data-fs-accordion-item-button-icon": true,
531
+ name: "RocketLaunch",
532
+ width: 18,
533
+ height: 18
534
+ }), "Days to ship"]
535
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
536
+ align: "right",
537
+ children: "11 Days"
538
+ })]
539
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(TableRow/* default */.Z, {
540
+ children: [/*#__PURE__*/(0,jsx_runtime_.jsxs)(TableCell/* default */.Z, {
541
+ variant: "header",
542
+ align: "left",
543
+ children: [/*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
544
+ "data-fs-accordion-item-button-icon": true,
545
+ name: "CircleWavyCheck",
546
+ width: 18,
547
+ height: 18
548
+ }), "Estimated"]
549
+ }), /*#__PURE__*/jsx_runtime_.jsx(TableCell/* default */.Z, {
550
+ align: "right",
551
+ children: "Nov 10th"
552
+ })]
553
+ })]
554
+ })
555
+ })
556
+ })]
557
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
558
+ as: "article",
559
+ className: "text__body",
560
+ index: 2,
561
+ "data-fs-product-details-highlights": true,
562
+ prefixId: "product-details-content",
563
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
564
+ children: labels.highlights
565
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
566
+ children: /*#__PURE__*/(0,jsx_runtime_.jsxs)(List/* default */.Z, {
567
+ marker: true,
568
+ children: [/*#__PURE__*/jsx_runtime_.jsx("li", {
569
+ children: "Industry-leading noise canceling with Dual Noise Sensor technology"
570
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
571
+ children: "Next-level music with Edge-AI, co-developed with Sony Music Studios Tokyo"
572
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
573
+ children: "Up to 30-hour battery life with quick charging (10 min charge for 5 hours of playback)"
574
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
575
+ children: "Touch Sensor controls to pause play skip tracks, control volume, activate your voice assistant, and answer phone calls"
576
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
577
+ children: "Speak-to-chat technology automatically reduces volume during conversations"
578
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
579
+ children: "Superior call quality with precise voice pickup"
580
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
581
+ children: "Wearing detection pauses playback when headphones are removed"
582
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
583
+ children: "Seamless multiple-device pairing"
584
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
585
+ children: "Adaptive Sound Control provides a personalized listening experience"
586
+ }), /*#__PURE__*/jsx_runtime_.jsx("li", {
587
+ children: "Updated design relieves pressure for long-lasting comfort"
588
+ })]
589
+ })
590
+ })]
591
+ }), /*#__PURE__*/(0,jsx_runtime_.jsxs)(AccordionItem/* default */.Z, {
592
+ as: "article",
593
+ index: 3,
594
+ "data-fs-product-details-learn-more": true,
595
+ prefixId: "product-details-content",
596
+ children: [/*#__PURE__*/jsx_runtime_.jsx(AccordionButton/* default */.Z, {
597
+ children: labels.learnMore
598
+ }), /*#__PURE__*/jsx_runtime_.jsx(AccordionPanel/* default */.Z, {
599
+ children: /*#__PURE__*/jsx_runtime_.jsx("p", {
600
+ className: "text__body",
601
+ children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laboru."
602
+ })
603
+ })]
604
+ })]
605
+ })
606
+ });
607
+ }
608
+
609
+ /* harmony default export */ const ProducDetailsContent_ProductDetailsContent = (ProductDetailsContent);
610
+ ;// CONCATENATED MODULE: ./src/components/sections/ProducDetailsContent/index.ts
611
+
612
+
613
+ /***/ }),
614
+
615
+ /***/ 1644:
616
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
617
+
618
+ "use strict";
619
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
620
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
621
+ /* harmony export */ "Z": () => (__WEBPACK_DEFAULT_EXPORT__)
622
+ /* harmony export */ });
623
+ /* unused harmony export fragment */
624
+ /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(8460);
625
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
626
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
627
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(7549);
628
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(123);
629
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(7738);
630
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(1672);
631
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(9875);
632
+ /* harmony import */ var src_components_product_OutOfStock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(492);
633
+ /* harmony import */ var src_components_ui_Breadcrumb__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(120);
634
+ /* harmony import */ var src_components_ui_ImageGallery__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1803);
635
+ /* harmony import */ var src_components_ui_ShippingSimulation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(104);
636
+ /* harmony import */ var src_components_ui_SkuSelector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4475);
637
+ /* harmony import */ var src_sdk_cart_useBuyButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8892);
638
+ /* harmony import */ var src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5346);
639
+ /* harmony import */ var src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3874);
640
+ /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5971);
641
+ /* harmony import */ var _ProducDetailsContent__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(4870);
642
+ /* harmony import */ var _Section__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8879);
643
+ /* harmony import */ var _product_details_module_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(841);
644
+ /* harmony import */ var _product_details_module_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_product_details_module_scss__WEBPACK_IMPORTED_MODULE_17__);
645
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(997);
646
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);
647
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_8__]);
648
+ src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_8__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
649
+ 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; }
650
+
651
+ 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; }
652
+
653
+ 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; }
654
+
655
+
656
+
657
+
658
+
659
+
660
+
661
+
662
+
663
+
664
+
665
+
666
+
667
+
668
+
669
+
670
+
671
+
672
+
673
+
674
+ function ProductDetails({
675
+ context: staleProduct
676
+ }) {
677
+ const {
678
+ currency
679
+ } = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_9__/* .useSession */ .kP)();
680
+ const {
681
+ 0: addQuantity,
682
+ 1: setAddQuantity
683
+ } = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(1); // Stale while revalidate the product for fetching the new price etc
684
+
685
+ const {
686
+ data,
687
+ isValidating
688
+ } = (0,src_sdk_product_useProduct__WEBPACK_IMPORTED_MODULE_8__/* .useProduct */ .i)(staleProduct.id, {
689
+ product: staleProduct
690
+ });
691
+
692
+ if (!data) {
693
+ throw new Error('NotFound');
694
+ }
695
+
696
+ const {
697
+ product: {
698
+ id,
699
+ sku,
700
+ gtin,
701
+ name: variantName,
702
+ brand,
703
+ isVariantOf,
704
+ isVariantOf: {
705
+ name,
706
+ productGroupID: productId,
707
+ skuVariants
708
+ },
709
+ image: productImages,
710
+ offers: {
711
+ offers: [{
712
+ availability,
713
+ price,
714
+ listPrice,
715
+ seller
716
+ }],
717
+ lowPrice
718
+ },
719
+ breadcrumbList: breadcrumbs,
720
+ additionalProperty
721
+ }
722
+ } = data;
723
+ const buyDisabled = availability !== 'https://schema.org/InStock';
724
+ const buyProps = (0,src_sdk_cart_useBuyButton__WEBPACK_IMPORTED_MODULE_6__/* .useBuyButton */ .Q)({
725
+ id,
726
+ price,
727
+ listPrice,
728
+ seller,
729
+ quantity: addQuantity,
730
+ itemOffered: {
731
+ sku,
732
+ name: variantName,
733
+ gtin,
734
+ image: productImages,
735
+ brand,
736
+ isVariantOf,
737
+ additionalProperty
738
+ }
739
+ });
740
+
741
+ const ProductDetailsSection = () => {
742
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.Fragment, {
743
+ children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("section", {
744
+ "data-fs-product-details-values": true,
745
+ children: [/*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("div", {
746
+ "data-fs-product-details-prices": true,
747
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
748
+ value: listPrice,
749
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_7__/* .useFormattedPrice */ .P,
750
+ testId: "list-price",
751
+ "data-value": listPrice,
752
+ variant: "listing",
753
+ SRText: "Original price:"
754
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, {
755
+ value: lowPrice,
756
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_7__/* .useFormattedPrice */ .P,
757
+ testId: "price",
758
+ "data-value": lowPrice,
759
+ variant: "spot",
760
+ className: "text__lead",
761
+ SRText: "Sale Price:"
762
+ })]
763
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_14__/* ["default"] */ .Z, {
764
+ min: 1,
765
+ max: 10,
766
+ onChange: setAddQuantity
767
+ })]
768
+ }), skuVariants && /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_ui_SkuSelector__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
769
+ slugsMap: skuVariants.slugsMap,
770
+ availableVariations: skuVariants.availableVariations,
771
+ activeVariations: skuVariants.activeVariations,
772
+ "data-fs-product-details-selectors": true
773
+ }),
774
+ /* NOTE: A loading skeleton had to be used to avoid a Lighthouse's
775
+ non-composited animation violation due to the button transitioning its
776
+ background color when changing from its initial disabled to active state.
777
+ See full explanation on commit https://git.io/JyXV5. */
778
+ isValidating ? /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(AddToCartLoadingSkeleton, {}) : /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z, _objectSpread(_objectSpread({
779
+ disabled: buyDisabled
780
+ }, buyProps), {}, {
781
+ children: "Add to Cart"
782
+ }))]
783
+ });
784
+ };
785
+
786
+ (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {
787
+ (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_16__/* .sendAnalyticsEvent */ ._)({
788
+ name: 'view_item',
789
+ params: {
790
+ currency: currency.code,
791
+ value: price,
792
+ items: [{
793
+ item_id: isVariantOf.productGroupID,
794
+ item_name: isVariantOf.name,
795
+ item_brand: brand.name,
796
+ item_variant: sku,
797
+ price,
798
+ discount: listPrice - price,
799
+ currency: currency.code,
800
+ item_variant_name: variantName,
801
+ product_reference_id: gtin
802
+ }]
803
+ }
804
+ });
805
+ }, [isVariantOf.productGroupID, isVariantOf.name, brand.name, sku, price, listPrice, currency.code, variantName, gtin]);
806
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(_Section__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z, {
807
+ className: `${(_product_details_module_scss__WEBPACK_IMPORTED_MODULE_17___default().fsProductDetails)} layout__content layout__section`,
808
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_ui_Breadcrumb__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
809
+ breadcrumbList: breadcrumbs.itemListElement
810
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("section", {
811
+ "data-fs-product-details-body": true,
812
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("header", {
813
+ "data-fs-product-details-title": true,
814
+ "data-fs-product-details-section": true,
815
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_18__/* ["default"] */ .Z, {
816
+ title: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("h1", {
817
+ children: name
818
+ }),
819
+ label: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_faststore_ui__WEBPACK_IMPORTED_MODULE_19__/* ["default"] */ .Z, {
820
+ listPrice: listPrice,
821
+ spotPrice: lowPrice,
822
+ size: "big"
823
+ }),
824
+ refNumber: productId
825
+ })
826
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_ui_ImageGallery__WEBPACK_IMPORTED_MODULE_3__/* .ImageGallery */ .hJ, {
827
+ "data-fs-product-details-gallery": true,
828
+ images: productImages
829
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("section", {
830
+ "data-fs-product-details-info": true,
831
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("section", {
832
+ "data-fs-product-details-settings": true,
833
+ "data-fs-product-details-section": true,
834
+ children: availability ? /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(ProductDetailsSection, {}) : /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_product_OutOfStock__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {})
835
+ }), availability && /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_ui_ShippingSimulation__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, {
836
+ "data-fs-product-details-section": true,
837
+ "data-fs-product-details-shipping": true,
838
+ productShippingInfo: {
839
+ id,
840
+ quantity: addQuantity,
841
+ seller: seller.identifier
842
+ },
843
+ formatter: src_sdk_product_useFormattedPrice__WEBPACK_IMPORTED_MODULE_7__/* .useFormattedPrice */ .P
844
+ })]
845
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(_ProducDetailsContent__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Z, {})]
846
+ })]
847
+ });
848
+ }
849
+
850
+ function AddToCartLoadingSkeleton() {
851
+ // Generated via https://skeletonreact.com/.
852
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("svg", {
853
+ role: "img",
854
+ width: "100%",
855
+ height: "48",
856
+ "aria-labelledby": "loading-aria",
857
+ viewBox: "0 0 112 48",
858
+ preserveAspectRatio: "none",
859
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("title", {
860
+ id: "loading-aria",
861
+ children: "Loading..."
862
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("rect", {
863
+ x: "0",
864
+ y: "0",
865
+ width: "100%",
866
+ height: "100%",
867
+ clipPath: "url(#clip-path)",
868
+ style: {
869
+ fill: 'url("#fill")'
870
+ }
871
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("defs", {
872
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("clipPath", {
873
+ id: "clip-path",
874
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("rect", {
875
+ x: "0",
876
+ y: "0",
877
+ rx: "2",
878
+ ry: "2",
879
+ width: "112",
880
+ height: "48"
881
+ })
882
+ }), /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)("linearGradient", {
883
+ id: "fill",
884
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("stop", {
885
+ offset: "0.599964",
886
+ stopColor: "#f3f3f3",
887
+ stopOpacity: "1",
888
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("animate", {
889
+ attributeName: "offset",
890
+ values: "-2; -2; 1",
891
+ keyTimes: "0; 0.25; 1",
892
+ dur: "2s",
893
+ repeatCount: "indefinite"
894
+ })
895
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("stop", {
896
+ offset: "1.59996",
897
+ stopColor: "#ecebeb",
898
+ stopOpacity: "1",
899
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("animate", {
900
+ attributeName: "offset",
901
+ values: "-1; -1; 2",
902
+ keyTimes: "0; 0.25; 1",
903
+ dur: "2s",
904
+ repeatCount: "indefinite"
905
+ })
906
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("stop", {
907
+ offset: "2.59996",
908
+ stopColor: "#f3f3f3",
909
+ stopOpacity: "1",
910
+ children: /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx("animate", {
911
+ attributeName: "offset",
912
+ values: "0; 0; 3",
913
+ keyTimes: "0; 0.25; 1",
914
+ dur: "2s",
915
+ repeatCount: "indefinite"
916
+ })
917
+ })]
918
+ })]
919
+ })]
920
+ });
921
+ }
922
+
923
+ const fragment = "unknown";
924
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ProductDetails);
925
+ __webpack_async_result__();
926
+ } catch(e) { __webpack_async_result__(e); } });
927
+
928
+ /***/ }),
929
+
930
+ /***/ 3220:
931
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
932
+
933
+ "use strict";
934
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
935
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
936
+ /* harmony export */ "Z": () => (/* reexport safe */ _ProductDetails__WEBPACK_IMPORTED_MODULE_0__.Z)
937
+ /* harmony export */ });
938
+ /* harmony import */ var _ProductDetails__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1644);
939
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_ProductDetails__WEBPACK_IMPORTED_MODULE_0__]);
940
+ _ProductDetails__WEBPACK_IMPORTED_MODULE_0__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
941
+
942
+ __webpack_async_result__();
943
+ } catch(e) { __webpack_async_result__(e); } });
944
+
945
+ /***/ }),
946
+
947
+ /***/ 1803:
948
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
949
+
950
+ "use strict";
951
+
952
+ // EXPORTS
953
+ __webpack_require__.d(__webpack_exports__, {
954
+ "hJ": () => (/* reexport */ ImageGallery_ImageGallery),
955
+ "ZA": () => (/* reexport */ ImageGallery_ImageGallerySelector),
956
+ "_I": () => (/* reexport */ ImageGallery_ImageZoom)
957
+ });
958
+
959
+ // EXTERNAL MODULE: ../components/dist/molecules/IconButton/IconButton.js
960
+ var IconButton = __webpack_require__(2765);
961
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
962
+ var Icon = __webpack_require__(5045);
963
+ // EXTERNAL MODULE: ../components/dist/atoms/Button/Button.js + 1 modules
964
+ var Button = __webpack_require__(4842);
965
+ // EXTERNAL MODULE: external "react"
966
+ var external_react_ = __webpack_require__(6689);
967
+ // EXTERNAL MODULE: external "react-intersection-observer"
968
+ var external_react_intersection_observer_ = __webpack_require__(9785);
969
+ // EXTERNAL MODULE: ./src/components/ui/Image/index.ts + 3 modules
970
+ var Image = __webpack_require__(2154);
971
+ // EXTERNAL MODULE: ./src/components/ui/ImageGallery/image-gallery-selector.module.scss
972
+ var image_gallery_selector_module = __webpack_require__(9265);
973
+ var image_gallery_selector_module_default = /*#__PURE__*/__webpack_require__.n(image_gallery_selector_module);
974
+ // EXTERNAL MODULE: external "react/jsx-runtime"
975
+ var jsx_runtime_ = __webpack_require__(997);
976
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageGallerySelector.tsx
977
+
978
+
979
+
980
+
981
+
982
+
983
+
984
+ const SCROLL_MARGIN_VALUE = 400;
985
+
986
+ const moveScroll = (container, value) => {
987
+ if (container) {
988
+ if (container.scrollHeight > container.clientHeight) {
989
+ // TODO: Temporary workaround for scroll-behavior with scrollTop – Safari 15.4) https://developer.apple.com/forums/thread/703294
990
+ container.style.overflow = 'auto';
991
+ window.requestAnimationFrame(() => container.scrollTo({
992
+ top: value,
993
+ behavior: 'smooth'
994
+ }));
995
+ setTimeout(() => container.style.overflow = 'hidden', 2000);
996
+ } else {
997
+ container.scrollLeft += value;
998
+ }
999
+ }
1000
+ };
1001
+
1002
+ const hasScroll = container => {
1003
+ if (container) {
1004
+ return container.scrollHeight > container.clientHeight || container.scrollWidth > container.clientWidth;
1005
+ }
1006
+
1007
+ return false;
1008
+ };
1009
+
1010
+ function ImageGallerySelector({
1011
+ images,
1012
+ onSelect,
1013
+ currentImageIdx
1014
+ }) {
1015
+ const elementsRef = (0,external_react_.useRef)(null);
1016
+ const elementHasScroll = hasScroll(elementsRef.current);
1017
+ const {
1018
+ ref: firstImageRef,
1019
+ inView: firstImageInView
1020
+ } = (0,external_react_intersection_observer_.useInView)({
1021
+ threshold: 1
1022
+ });
1023
+ const {
1024
+ ref: lastImageRef,
1025
+ inView: lastImageInView
1026
+ } = (0,external_react_intersection_observer_.useInView)({
1027
+ threshold: 1
1028
+ });
1029
+ return /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", {
1030
+ "data-fs-image-gallery-selector": true,
1031
+ className: (image_gallery_selector_module_default()).fsImageGallerySelector,
1032
+ "aria-roledescription": "carousel",
1033
+ "aria-label": "Product images",
1034
+ children: [elementHasScroll && !firstImageInView && /*#__PURE__*/jsx_runtime_.jsx(IconButton/* default */.Z, {
1035
+ "data-fs-image-gallery-selector-control-button": true,
1036
+ "aria-label": "backward slide image selector",
1037
+ icon: /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
1038
+ name: "ArrowLeft",
1039
+ width: 24,
1040
+ height: 24
1041
+ }),
1042
+ onClick: () => moveScroll(elementsRef.current, -SCROLL_MARGIN_VALUE)
1043
+ }), /*#__PURE__*/jsx_runtime_.jsx("div", {
1044
+ "data-fs-image-gallery-selector-elements": true,
1045
+ ref: elementsRef,
1046
+ children: images.map((image, idx) => {
1047
+ const ref = idx === 0 ? firstImageRef : idx === images.length - 1 ? lastImageRef : null;
1048
+ return /*#__PURE__*/jsx_runtime_.jsx(Button/* default */.Z, {
1049
+ "aria-label": `${image.alternateName} - Image ${idx + 1} of ${images.length}`,
1050
+ onClick: () => onSelect(idx),
1051
+ "data-fs-image-gallery-selector-thumbnail": idx === currentImageIdx ? 'selected' : 'true',
1052
+ children: /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, {
1053
+ onLoadingComplete: img => {
1054
+ if (ref) ref(img);
1055
+ },
1056
+ src: image.url,
1057
+ alt: image.alternateName,
1058
+ loading: idx === 0 ? 'eager' : 'lazy',
1059
+ sizes: "(max-width: 72px) 25vw, 30vw",
1060
+ width: 72,
1061
+ height: 72
1062
+ })
1063
+ }, idx);
1064
+ })
1065
+ }), elementHasScroll && !lastImageInView && /*#__PURE__*/jsx_runtime_.jsx(IconButton/* default */.Z, {
1066
+ "data-fs-image-gallery-selector-control-button": true,
1067
+ "aria-label": "forward slide image selector",
1068
+ icon: /*#__PURE__*/jsx_runtime_.jsx(Icon/* default */.Z, {
1069
+ name: "ArrowLeft",
1070
+ width: 24,
1071
+ height: 24
1072
+ }),
1073
+ onClick: () => moveScroll(elementsRef.current, +SCROLL_MARGIN_VALUE)
1074
+ })]
1075
+ });
1076
+ }
1077
+
1078
+ /* harmony default export */ const ImageGallery_ImageGallerySelector = (ImageGallerySelector);
1079
+ // EXTERNAL MODULE: ./src/components/ui/ImageGallery/image-gallery.module.scss
1080
+ var image_gallery_module = __webpack_require__(3910);
1081
+ var image_gallery_module_default = /*#__PURE__*/__webpack_require__.n(image_gallery_module);
1082
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageGallery.tsx
1083
+ const _excluded = ["images"];
1084
+
1085
+ 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; }
1086
+
1087
+ 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; }
1088
+
1089
+ 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; }
1090
+
1091
+ 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; }
1092
+
1093
+ 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; }
1094
+
1095
+
1096
+
1097
+
1098
+
1099
+
1100
+
1101
+
1102
+ function ImageGallery(_ref) {
1103
+ let {
1104
+ images
1105
+ } = _ref,
1106
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1107
+
1108
+ const {
1109
+ 0: selectedImageIdx,
1110
+ 1: setSelectedImageIdx
1111
+ } = (0,external_react_.useState)(0);
1112
+ const currentImage = images[selectedImageIdx];
1113
+ const hasSelector = images.length > 1;
1114
+ return /*#__PURE__*/(0,jsx_runtime_.jsxs)("section", _objectSpread(_objectSpread({
1115
+ "data-fs-image-gallery": hasSelector ? 'with-selector' : 'without-selector',
1116
+ className: (image_gallery_module_default()).fsImageGallery
1117
+ }, otherProps), {}, {
1118
+ children: [/*#__PURE__*/jsx_runtime_.jsx(ImageGallery_ImageZoom, {
1119
+ children: /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, {
1120
+ src: currentImage.url,
1121
+ alt: currentImage.alternateName,
1122
+ sizes: "(max-width: 804px) 25vw, 30vw",
1123
+ width: 804,
1124
+ height: 804 * (3 / 4),
1125
+ loading: "eager",
1126
+ priority: true
1127
+ })
1128
+ }), hasSelector && /*#__PURE__*/jsx_runtime_.jsx(ImageGallery_ImageGallerySelector, {
1129
+ images: images,
1130
+ currentImageIdx: selectedImageIdx,
1131
+ onSelect: setSelectedImageIdx
1132
+ })]
1133
+ }));
1134
+ }
1135
+
1136
+ /* harmony default export */ const ImageGallery_ImageGallery = (ImageGallery);
1137
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/ImageZoom.tsx
1138
+
1139
+
1140
+
1141
+ const ImageZoom = ({
1142
+ children
1143
+ }) => {
1144
+ return /*#__PURE__*/(0,jsx_runtime_.jsxs)(jsx_runtime_.Fragment, {
1145
+ children: [" ", children, " "]
1146
+ });
1147
+ };
1148
+
1149
+ /* harmony default export */ const ImageGallery_ImageZoom = (ImageZoom);
1150
+ ;// CONCATENATED MODULE: ./src/components/ui/ImageGallery/index.ts
1151
+
1152
+
1153
+
1154
+
1155
+ /***/ }),
1156
+
1157
+ /***/ 104:
1158
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1159
+
1160
+ "use strict";
1161
+
1162
+ // EXPORTS
1163
+ __webpack_require__.d(__webpack_exports__, {
1164
+ "Z": () => (/* reexport */ ShippingSimulation_ShippingSimulation_ShippingSimulation)
1165
+ });
1166
+
1167
+ // EXTERNAL MODULE: external "react"
1168
+ var external_react_ = __webpack_require__(6689);
1169
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1170
+ // EXTERNAL MODULE: ../components/dist/molecules/InputField/InputField.js
1171
+ var InputField = __webpack_require__(8287);
1172
+ // EXTERNAL MODULE: ../components/dist/atoms/Link/Link.js
1173
+ var Link = __webpack_require__(7865);
1174
+ // EXTERNAL MODULE: ../components/dist/atoms/Icon/Icon.js
1175
+ var Icon = __webpack_require__(5045);
1176
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/Table.js
1177
+ var Table = __webpack_require__(4707);
1178
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableBody.js
1179
+ var TableBody = __webpack_require__(1566);
1180
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableRow.js
1181
+ var TableRow = __webpack_require__(6037);
1182
+ // EXTERNAL MODULE: ../components/dist/molecules/Table/TableCell.js
1183
+ var TableCell = __webpack_require__(3111);
1184
+ // EXTERNAL MODULE: ../components/dist/atoms/Price/Price.js
1185
+ var Price = __webpack_require__(7549);
1186
+ ;// CONCATENATED MODULE: ../components/dist/organisms/ShippingSimulation/ShippingSimulation.js
1187
+
1188
+
1189
+ function ShippingSimulation({ testId = 'fs-shipping-simulation', formatter, title = "Shipping", inputLabel = "Postal Code", optionsLabel = "Shipping options", idkPostalCodeLinkProps, onInput, onSubmit, onClear, location, options = [], displayClearButton = false, errorMessage, postalCode, ...otherProps }) {
1190
+ const hasShippingOptions = !!options && options.length > 0;
1191
+ return (external_react_default().createElement("section", { "data-fs-shipping-simulation": true, "data-fs-shipping-simulation-empty": !hasShippingOptions ? "true" : "false", "data-testid": testId, ...otherProps },
1192
+ external_react_default().createElement("h2", { "data-fs-shipping-simulation-title": true }, title),
1193
+ external_react_default().createElement(InputField/* default */.Z, { actionable: true, error: errorMessage, id: `${testId}-input-field`, label: inputLabel, value: postalCode, onInput: (event) => onInput?.(event), onSubmit: () => onSubmit?.(), onClear: () => onClear?.(), displayClearButton: displayClearButton }),
1194
+ external_react_default().createElement(Link/* default */.Z, { href: "/", "data-fs-shipping-simulation-link": true, size: "small", ...idkPostalCodeLinkProps }, idkPostalCodeLinkProps?.children ??
1195
+ external_react_default().createElement((external_react_default()).Fragment, null,
1196
+ "I don't know my Postal Code",
1197
+ external_react_default().createElement(Icon/* default */.Z, { name: "ArrowSquareOut", width: 20, height: 20 }))),
1198
+ hasShippingOptions && (external_react_default().createElement((external_react_default()).Fragment, null,
1199
+ external_react_default().createElement("header", { "data-fs-shipping-simulation-header": true },
1200
+ external_react_default().createElement("h3", { "data-fs-shipping-simulation-subtitle": true }, optionsLabel),
1201
+ external_react_default().createElement("p", { "data-fs-shipping-simulation-location": true }, location)),
1202
+ external_react_default().createElement(Table/* default */.Z, null,
1203
+ external_react_default().createElement(TableBody/* default */.Z, null, options.map((option) => (external_react_default().createElement(TableRow/* default */.Z, { key: option.carrier },
1204
+ external_react_default().createElement(TableCell/* default */.Z, { align: "left" }, option.carrier),
1205
+ external_react_default().createElement(TableCell/* default */.Z, null, option.localizedEstimates),
1206
+ external_react_default().createElement(TableCell/* default */.Z, { align: "right" }, option.price && (external_react_default().createElement(Price/* default */.Z, { formatter: formatter, value: option.price, SRText: "price" }))))))))))));
1207
+ }
1208
+ /* harmony default export */ const ShippingSimulation_ShippingSimulation = (ShippingSimulation);
1209
+ //# sourceMappingURL=ShippingSimulation.js.map
1210
+ // EXTERNAL MODULE: ./src/sdk/graphql/request.ts
1211
+ var request = __webpack_require__(180);
1212
+ ;// CONCATENATED MODULE: ./src/sdk/shipping/index.ts
1213
+
1214
+ const query = "ShippingSimulationQuery";
1215
+ const getShippingSimulation = async ({
1216
+ items,
1217
+ postalCode,
1218
+ country
1219
+ }) => {
1220
+ const data = await (0,request/* request */.W)(query, {
1221
+ items,
1222
+ postalCode,
1223
+ country
1224
+ });
1225
+ return data.shipping;
1226
+ };
1227
+ /* harmony default export */ const shipping = ((/* unused pure expression or super */ null && (getShippingSimulation)));
1228
+ // EXTERNAL MODULE: ./src/sdk/session/index.ts
1229
+ var session = __webpack_require__(5971);
1230
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/useShippingSimulation.ts
1231
+ 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; }
1232
+
1233
+ 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; }
1234
+
1235
+ 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; }
1236
+
1237
+
1238
+
1239
+ const createEmptySimulation = () => ({
1240
+ input: {
1241
+ postalCode: '',
1242
+ displayClearButton: false,
1243
+ errorMessage: ''
1244
+ },
1245
+ shippingSimulation: {
1246
+ location: '',
1247
+ options: []
1248
+ }
1249
+ });
1250
+
1251
+ const reducer = (state, action) => {
1252
+ const {
1253
+ type
1254
+ } = action;
1255
+
1256
+ switch (type) {
1257
+ case 'clear':
1258
+ {
1259
+ return createEmptySimulation();
1260
+ }
1261
+
1262
+ case 'update':
1263
+ {
1264
+ const {
1265
+ payload
1266
+ } = action;
1267
+ return {
1268
+ input: _objectSpread(_objectSpread({}, state.input), payload.input),
1269
+ shippingSimulation: _objectSpread(_objectSpread({}, state.shippingSimulation), payload.shippingSimulation)
1270
+ };
1271
+ }
1272
+
1273
+ case 'onInput':
1274
+ {
1275
+ const {
1276
+ payload
1277
+ } = action;
1278
+ return _objectSpread(_objectSpread({}, state), {}, {
1279
+ input: _objectSpread({}, payload)
1280
+ });
1281
+ }
1282
+
1283
+ case 'onError':
1284
+ {
1285
+ const {
1286
+ payload
1287
+ } = action;
1288
+ return _objectSpread(_objectSpread({}, state), {}, {
1289
+ input: _objectSpread(_objectSpread({}, state.input), payload)
1290
+ });
1291
+ }
1292
+
1293
+ default:
1294
+ throw new Error(`Action ${type} not implemented`);
1295
+ }
1296
+ };
1297
+
1298
+ const useShippingSimulation = (shippingItem, fetchShippingSimulationFn, sessionPostalCode, country) => {
1299
+ const {
1300
+ 0: {
1301
+ input,
1302
+ shippingSimulation
1303
+ },
1304
+ 1: dispatch
1305
+ } = (0,external_react_.useReducer)(reducer, null, createEmptySimulation);
1306
+ const {
1307
+ postalCode: shippingPostalCode
1308
+ } = input;
1309
+ (0,external_react_.useEffect)(() => {
1310
+ if (!sessionPostalCode || shippingPostalCode) {
1311
+ return;
1312
+ } // Use sessionPostalCode if there is no shippingPostalCode
1313
+
1314
+
1315
+ async function fetchShipping() {
1316
+ const [location, options] = await fetchShippingSimulationFn(shippingItem, country, sessionPostalCode ?? '');
1317
+ dispatch({
1318
+ type: 'update',
1319
+ payload: {
1320
+ input: {
1321
+ postalCode: sessionPostalCode ?? '',
1322
+ displayClearButton: true,
1323
+ errorMessage: ''
1324
+ },
1325
+ shippingSimulation: {
1326
+ location,
1327
+ options
1328
+ }
1329
+ }
1330
+ });
1331
+ }
1332
+
1333
+ fetchShipping();
1334
+ }, [country, fetchShippingSimulationFn, sessionPostalCode, shippingItem, shippingPostalCode]);
1335
+ const handleSubmit = (0,external_react_.useCallback)(async () => {
1336
+ try {
1337
+ const [location, options] = await fetchShippingSimulationFn(shippingItem, country, shippingPostalCode ?? '');
1338
+ dispatch({
1339
+ type: 'update',
1340
+ payload: {
1341
+ input: {
1342
+ displayClearButton: true,
1343
+ errorMessage: ''
1344
+ },
1345
+ shippingSimulation: {
1346
+ location,
1347
+ options
1348
+ }
1349
+ }
1350
+ });
1351
+ } catch (error) {
1352
+ dispatch({
1353
+ type: 'onError',
1354
+ payload: {
1355
+ displayClearButton: true,
1356
+ errorMessage: 'You entered an invalid Postal Code'
1357
+ }
1358
+ });
1359
+ }
1360
+ }, [country, fetchShippingSimulationFn, shippingItem, shippingPostalCode]);
1361
+ const handleOnInput = (0,external_react_.useCallback)(e => {
1362
+ const currentValue = e.currentTarget.value;
1363
+
1364
+ if (currentValue) {
1365
+ dispatch({
1366
+ type: 'onInput',
1367
+ payload: {
1368
+ postalCode: currentValue,
1369
+ displayClearButton: false,
1370
+ errorMessage: ''
1371
+ }
1372
+ });
1373
+ } else {
1374
+ dispatch({
1375
+ type: 'clear'
1376
+ });
1377
+ }
1378
+ }, []);
1379
+ return {
1380
+ input,
1381
+ shippingSimulation,
1382
+ handleOnClear: () => {
1383
+ dispatch({
1384
+ type: 'clear'
1385
+ });
1386
+ },
1387
+ handleSubmit,
1388
+ handleOnInput
1389
+ };
1390
+ };
1391
+ // EXTERNAL MODULE: external "react/jsx-runtime"
1392
+ var jsx_runtime_ = __webpack_require__(997);
1393
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/ShippingSimulation.tsx
1394
+ const _excluded = ["productShippingInfo", "formatter"];
1395
+
1396
+ function ShippingSimulation_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; }
1397
+
1398
+ function ShippingSimulation_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ShippingSimulation_ownKeys(Object(source), !0).forEach(function (key) { ShippingSimulation_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ShippingSimulation_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
1399
+
1400
+ function ShippingSimulation_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; }
1401
+
1402
+ 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; }
1403
+
1404
+ 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; }
1405
+
1406
+
1407
+
1408
+
1409
+
1410
+
1411
+
1412
+ const fetchShippingSimulation = async (shippingItem, country, postalCode) => {
1413
+ const shipping = await getShippingSimulation({
1414
+ country,
1415
+ postalCode: postalCode,
1416
+ items: [shippingItem]
1417
+ });
1418
+ const location = [shipping?.address?.neighborhood, shipping?.address?.city].filter(Boolean).join(' / ') ?? '';
1419
+ const options = shipping?.logisticsInfo?.[0]?.slas ?? [];
1420
+ return [location, options];
1421
+ };
1422
+
1423
+ function ShippingSimulation_ShippingSimulation_ShippingSimulation(_ref) {
1424
+ let {
1425
+ productShippingInfo,
1426
+ formatter
1427
+ } = _ref,
1428
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1429
+
1430
+ const {
1431
+ country,
1432
+ postalCode: sessionPostalCode
1433
+ } = (0,session/* useSession */.kP)();
1434
+ const {
1435
+ input,
1436
+ shippingSimulation,
1437
+ handleSubmit,
1438
+ handleOnInput,
1439
+ handleOnClear
1440
+ } = useShippingSimulation(productShippingInfo, fetchShippingSimulation, sessionPostalCode, country);
1441
+ const {
1442
+ postalCode,
1443
+ displayClearButton,
1444
+ errorMessage
1445
+ } = input;
1446
+ const {
1447
+ location,
1448
+ options
1449
+ } = shippingSimulation;
1450
+ return /*#__PURE__*/jsx_runtime_.jsx(ShippingSimulation_ShippingSimulation, ShippingSimulation_objectSpread({
1451
+ formatter: formatter,
1452
+ onInput: handleOnInput,
1453
+ onSubmit: handleSubmit,
1454
+ onClear: handleOnClear,
1455
+ location: location,
1456
+ options: options,
1457
+ displayClearButton: displayClearButton,
1458
+ errorMessage: errorMessage,
1459
+ postalCode: postalCode
1460
+ }, otherProps));
1461
+ }
1462
+ ;// CONCATENATED MODULE: ./src/components/ui/ShippingSimulation/index.ts
1463
+
1464
+
1465
+ /***/ }),
1466
+
1467
+ /***/ 4475:
1468
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1469
+
1470
+ "use strict";
1471
+
1472
+ // EXPORTS
1473
+ __webpack_require__.d(__webpack_exports__, {
1474
+ "Z": () => (/* reexport */ SkuSelector_Selectors)
1475
+ });
1476
+
1477
+ // EXTERNAL MODULE: ./src/components/ui/Image/index.ts + 3 modules
1478
+ var Image = __webpack_require__(2154);
1479
+ // EXTERNAL MODULE: external "react"
1480
+ var external_react_ = __webpack_require__(6689);
1481
+ var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1482
+ // EXTERNAL MODULE: ../components/dist/atoms/Label/Label.js
1483
+ var Label = __webpack_require__(7216);
1484
+ // EXTERNAL MODULE: ../components/dist/atoms/Link/Link.js
1485
+ var Link = __webpack_require__(7865);
1486
+ // EXTERNAL MODULE: ../components/dist/atoms/SROnly/SROnly.js
1487
+ var SROnly = __webpack_require__(2691);
1488
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/useDefineVariant.js
1489
+
1490
+ const getImageName = (src) => {
1491
+ const sourcePath = new URL(src).pathname;
1492
+ const imageName = sourcePath.split('/').slice(-1)[0];
1493
+ return imageName;
1494
+ };
1495
+ const useDefineVariant = (options, variant) => (0,external_react_.useMemo)(() => {
1496
+ if (variant)
1497
+ return variant;
1498
+ const allOptionsHaveHexColor = options.every((option) => option.hexColor);
1499
+ if (allOptionsHaveHexColor) {
1500
+ return 'color';
1501
+ }
1502
+ const firstImageName = options[0]?.src && getImageName(options[0].src);
1503
+ const areSourcesEqualsOrNull = options.every((option) => {
1504
+ if (!option.src) {
1505
+ return true;
1506
+ }
1507
+ const optionImageName = getImageName(option.src);
1508
+ return optionImageName === firstImageName;
1509
+ });
1510
+ if (!areSourcesEqualsOrNull) {
1511
+ return 'image';
1512
+ }
1513
+ return 'label';
1514
+ }, [options, variant]);
1515
+ //# sourceMappingURL=useDefineVariant.js.map
1516
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/useSkuSlug.js
1517
+
1518
+ function getSkuSlug(slugsMap, selectedVariations, dominantVariation) {
1519
+ const slugsMapKey = Object.entries(selectedVariations).flat().join('-');
1520
+ if (slugsMapKey in slugsMap) {
1521
+ return slugsMap[slugsMapKey];
1522
+ }
1523
+ const possibleVariants = Object.keys(slugsMap);
1524
+ const firstVariationForDominantValue = possibleVariants.find((slug) => slug.includes(`${dominantVariation}-${selectedVariations[dominantVariation]}`));
1525
+ return slugsMap[firstVariationForDominantValue ?? possibleVariants[0]];
1526
+ }
1527
+ const useSkuSlug = (activeVariations, slugsMap, skuPropertyName, getItemHrefProp) => {
1528
+ const getItemHref = (0,external_react_.useCallback)((option) => {
1529
+ if (getItemHrefProp)
1530
+ return { getItemHrefProp };
1531
+ const currentItemHref = `/${getSkuSlug(slugsMap, {
1532
+ ...activeVariations,
1533
+ [skuPropertyName]: option.value,
1534
+ }, skuPropertyName)}/p`;
1535
+ return currentItemHref;
1536
+ }, [activeVariations, getItemHrefProp, slugsMap, skuPropertyName]);
1537
+ return { getItemHref };
1538
+ };
1539
+ //# sourceMappingURL=useSkuSlug.js.map
1540
+ ;// CONCATENATED MODULE: ../components/dist/molecules/SkuSelector/SkuSelector.js
1541
+
1542
+
1543
+
1544
+
1545
+ // TODO: Change by ImageComponent when it be right
1546
+ const ImageComponentFallback = ({ src, alt, ...otherProps }) => external_react_default().createElement("img", { src: src, alt: alt, ...otherProps });
1547
+ const SkuSelector = (0,external_react_.forwardRef)(function SkuSelector({ availableVariations, skuPropertyName, testId, activeVariations, linkProps, slugsMap, getItemHref: getItemHrefProp, ImageComponent = ImageComponentFallback, variant: variantProp, ...otherProps }, ref) {
1548
+ const activeSelectorValue = activeVariations[skuPropertyName];
1549
+ const options = availableVariations[skuPropertyName];
1550
+ const variant = useDefineVariant(options, variantProp);
1551
+ const { getItemHref } = useSkuSlug(activeVariations, slugsMap, skuPropertyName, getItemHrefProp);
1552
+ return (external_react_default().createElement("div", { ref: ref, "data-fs-sku-selector": true, "data-testid": testId, "data-fs-sku-selector-variant": variant, ...otherProps },
1553
+ skuPropertyName && (external_react_default().createElement(Label/* default */.Z, { "data-fs-sku-selector-title": true },
1554
+ skuPropertyName,
1555
+ ": ",
1556
+ external_react_default().createElement("strong", null, activeSelectorValue))),
1557
+ external_react_default().createElement("ul", { "data-fs-sku-selector-list": true }, options.map((option, index) => {
1558
+ return (external_react_default().createElement("li", { key: String(index), title: option.label, "data-fs-sku-selector-option": true, "data-fs-sku-selector-disabled": option.disabled, "data-fs-sku-selector-checked": option.value === activeVariations[skuPropertyName] },
1559
+ external_react_default().createElement(Link/* default */.Z, { "data-fs-sku-selector-option-link": true, href: getItemHref(option), ...linkProps },
1560
+ external_react_default().createElement(SROnly/* default */.Z, { text: option.label })),
1561
+ variant === 'label' && external_react_default().createElement("span", null, option.value),
1562
+ variant === 'image' && ImageComponent && (external_react_default().createElement("span", null,
1563
+ external_react_default().createElement(ImageComponent, { src: option.src ?? '', alt: option.alt ?? '', "data-fs-sku-selector-option-image": true }))),
1564
+ variant === 'color' && (external_react_default().createElement("span", null,
1565
+ external_react_default().createElement("div", { "data-fs-sku-selector-option-color": true, title: option.value, style: {
1566
+ '--data-fs-sku-selector-option-color-bkg-color': option.hexColor,
1567
+ } })))));
1568
+ }))));
1569
+ });
1570
+ /* harmony default export */ const SkuSelector_SkuSelector = (SkuSelector);
1571
+ //# sourceMappingURL=SkuSelector.js.map
1572
+ // EXTERNAL MODULE: ./node_modules/next/link.js
1573
+ var next_link = __webpack_require__(1664);
1574
+ var link_default = /*#__PURE__*/__webpack_require__.n(next_link);
1575
+ // EXTERNAL MODULE: external "react/jsx-runtime"
1576
+ var jsx_runtime_ = __webpack_require__(997);
1577
+ ;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/Selectors.tsx
1578
+ const _excluded = ["src", "alt"],
1579
+ _excluded2 = ["slugsMap", "activeVariations", "availableVariations"];
1580
+
1581
+ 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; }
1582
+
1583
+ 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; }
1584
+
1585
+ 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; }
1586
+
1587
+ 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; }
1588
+
1589
+ 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; }
1590
+
1591
+
1592
+
1593
+
1594
+
1595
+
1596
+ const ImageComponent = _ref => {
1597
+ let {
1598
+ src,
1599
+ alt
1600
+ } = _ref,
1601
+ otherProps = _objectWithoutProperties(_ref, _excluded);
1602
+
1603
+ return /*#__PURE__*/jsx_runtime_.jsx(Image/* Image */.E, _objectSpread({
1604
+ src: src,
1605
+ alt: alt,
1606
+ width: 20,
1607
+ height: 20,
1608
+ loading: "lazy"
1609
+ }, otherProps));
1610
+ };
1611
+
1612
+ function Selectors(_ref2) {
1613
+ let {
1614
+ slugsMap,
1615
+ activeVariations,
1616
+ availableVariations
1617
+ } = _ref2,
1618
+ otherProps = _objectWithoutProperties(_ref2, _excluded2);
1619
+
1620
+ return /*#__PURE__*/jsx_runtime_.jsx("section", _objectSpread(_objectSpread({}, otherProps), {}, {
1621
+ children: availableVariations && Object.keys(availableVariations).map(skuVariant => /*#__PURE__*/jsx_runtime_.jsx(SkuSelector_SkuSelector, {
1622
+ skuPropertyName: skuVariant,
1623
+ availableVariations: availableVariations,
1624
+ ImageComponent: ImageComponent,
1625
+ activeVariations: activeVariations,
1626
+ slugsMap: slugsMap,
1627
+ linkProps: {
1628
+ as: (link_default()),
1629
+ legacyBehavior: false
1630
+ }
1631
+ }, skuVariant))
1632
+ }));
1633
+ }
1634
+
1635
+ /* harmony default export */ const SkuSelector_Selectors = (Selectors);
1636
+ ;// CONCATENATED MODULE: ./src/components/ui/SkuSelector/index.ts
1637
+
1638
+
1639
+ /***/ }),
1640
+
1641
+ /***/ 4601:
1642
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
1643
+
1644
+ "use strict";
1645
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1646
+ __webpack_require__.r(__webpack_exports__);
1647
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1648
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
1649
+ /* harmony export */ "getStaticPaths": () => (/* binding */ getStaticPaths),
1650
+ /* harmony export */ "getStaticProps": () => (/* binding */ getStaticProps)
1651
+ /* harmony export */ });
1652
+ /* harmony import */ var _faststore_api__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4826);
1653
+ /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6641);
1654
+ /* harmony import */ var next_seo__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(next_seo__WEBPACK_IMPORTED_MODULE_1__);
1655
+ /* harmony import */ var src_components_cms_RenderPageSections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2659);
1656
+ /* harmony import */ var src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2951);
1657
+ /* harmony import */ var src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7990);
1658
+ /* harmony import */ var src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3220);
1659
+ /* harmony import */ var src_customizations_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7410);
1660
+ /* harmony import */ var src_sdk_session__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5971);
1661
+ /* harmony import */ var src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(2541);
1662
+ /* harmony import */ var src_server__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9685);
1663
+ /* harmony import */ var src_server_cms__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5764);
1664
+ /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(7183);
1665
+ /* harmony import */ var _faststore_config__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_faststore_config__WEBPACK_IMPORTED_MODULE_11__);
1666
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(997);
1667
+ /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);
1668
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([src_components_cms_RenderPageSections__WEBPACK_IMPORTED_MODULE_2__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__, src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__, src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_server__WEBPACK_IMPORTED_MODULE_9__]);
1669
+ ([src_components_cms_RenderPageSections__WEBPACK_IMPORTED_MODULE_2__, src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__, src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__, src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__, src_server__WEBPACK_IMPORTED_MODULE_9__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
1670
+ 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; }
1671
+
1672
+ 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; }
1673
+
1674
+ 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; }
1675
+
1676
+
1677
+
1678
+
1679
+
1680
+
1681
+
1682
+
1683
+
1684
+
1685
+
1686
+
1687
+
1688
+ /**
1689
+ * Sections: Components imported from each store's custom components and '../components/sections' only.
1690
+ * Do not import or render components from any other folder in here.
1691
+ */
1692
+
1693
+
1694
+
1695
+
1696
+
1697
+ const COMPONENTS = _objectSpread({
1698
+ ProductDetails: src_components_sections_ProductDetails__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z,
1699
+ BannerNewsletter: src_components_sections_BannerNewsletter_BannerNewsletter__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z,
1700
+ CrossSellingShelf: src_components_sections_CrossSellingShelf__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z
1701
+ }, src_customizations_components__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z);
1702
+
1703
+ function Page({
1704
+ product,
1705
+ sections
1706
+ }) {
1707
+ const {
1708
+ currency
1709
+ } = (0,src_sdk_session__WEBPACK_IMPORTED_MODULE_7__/* .useSession */ .kP)();
1710
+ const {
1711
+ seo
1712
+ } = product;
1713
+ const title = seo.title || (_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().seo.title);
1714
+ const description = seo.description || (_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().seo.description);
1715
+ const canonical = `${(_faststore_config__WEBPACK_IMPORTED_MODULE_11___default().storeUrl)}${seo.canonical}`;
1716
+ return /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.Fragment, {
1717
+ children: [/*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.NextSeo, {
1718
+ title: title,
1719
+ description: description,
1720
+ canonical: canonical,
1721
+ openGraph: {
1722
+ type: 'og:product',
1723
+ url: canonical,
1724
+ title,
1725
+ description,
1726
+ images: product.image.map(img => ({
1727
+ url: img.url,
1728
+ alt: img.alternateName
1729
+ }))
1730
+ },
1731
+ additionalMetaTags: [{
1732
+ property: 'product:price:amount',
1733
+ content: product.offers.lowPrice?.toString() ?? undefined
1734
+ }, {
1735
+ property: 'product:price:currency',
1736
+ content: currency.code
1737
+ }]
1738
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.BreadcrumbJsonLd, {
1739
+ itemListElements: product.breadcrumbList.itemListElement
1740
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(next_seo__WEBPACK_IMPORTED_MODULE_1__.ProductJsonLd, {
1741
+ productName: product.name,
1742
+ description: product.description,
1743
+ brand: product.brand.name,
1744
+ sku: product.sku,
1745
+ gtin: product.gtin,
1746
+ releaseDate: product.releaseDate,
1747
+ images: product.image.map(img => img.url) // Somehow, Google does not understand this valid Schema.org schema, so we need to do conversions
1748
+ ,
1749
+ offersType: "AggregateOffer",
1750
+ offers: _objectSpread(_objectSpread(_objectSpread({}, product.offers), product.offers.offers[0]), {}, {
1751
+ url: canonical
1752
+ })
1753
+ }), /*#__PURE__*/react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__.jsx(src_components_cms_RenderPageSections__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
1754
+ context: product,
1755
+ sections: sections,
1756
+ components: COMPONENTS
1757
+ })]
1758
+ });
1759
+ }
1760
+
1761
+ const query = "ServerProductPageQuery";
1762
+ const getStaticProps = async ({
1763
+ params,
1764
+ previewData
1765
+ }) => {
1766
+ const slug = params?.slug ?? '';
1767
+ const [cmsPage, searchResult] = await Promise.all([(0,src_server_cms__WEBPACK_IMPORTED_MODULE_10__/* .getPage */ .f)(_objectSpread(_objectSpread({}, previewData?.contentType === 'pdp' ? previewData : null), {}, {
1768
+ contentType: 'pdp'
1769
+ })), (0,src_server__WEBPACK_IMPORTED_MODULE_9__/* .execute */ .h)({
1770
+ variables: {
1771
+ slug
1772
+ },
1773
+ operationName: query
1774
+ })]);
1775
+ const {
1776
+ data,
1777
+ errors = []
1778
+ } = searchResult;
1779
+ const notFound = errors.find(_faststore_api__WEBPACK_IMPORTED_MODULE_0__.isNotFoundError);
1780
+
1781
+ if (notFound) {
1782
+ return {
1783
+ notFound: true
1784
+ };
1785
+ }
1786
+
1787
+ if (errors.length > 0) {
1788
+ throw errors[0];
1789
+ }
1790
+
1791
+ return {
1792
+ props: _objectSpread(_objectSpread({}, data), cmsPage)
1793
+ };
1794
+ };
1795
+ const getStaticPaths = async () => {
1796
+ return {
1797
+ paths: [],
1798
+ fallback: 'blocking'
1799
+ };
1800
+ };
1801
+ Page.displayName = 'Page';
1802
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,src_sdk_tests_mark__WEBPACK_IMPORTED_MODULE_8__/* .mark */ .B)(Page));
1803
+ __webpack_async_result__();
1804
+ } catch(e) { __webpack_async_result__(e); } });
1805
+
1806
+ /***/ }),
1807
+
1808
+ /***/ 8892:
1809
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1810
+
1811
+ "use strict";
1812
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1813
+ /* harmony export */ "Q": () => (/* binding */ useBuyButton)
1814
+ /* harmony export */ });
1815
+ /* harmony import */ var _faststore_sdk__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8460);
1816
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
1817
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1818
+ /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5971);
1819
+ /* harmony import */ var _faststore_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(395);
1820
+ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7566);
1821
+
1822
+
1823
+
1824
+
1825
+
1826
+ const useBuyButton = item => {
1827
+ const {
1828
+ openCart
1829
+ } = (0,_faststore_ui__WEBPACK_IMPORTED_MODULE_3__/* .useUI */ .l)();
1830
+ const {
1831
+ currency: {
1832
+ code
1833
+ }
1834
+ } = (0,_session__WEBPACK_IMPORTED_MODULE_1__/* .useSession */ .kP)();
1835
+ const onClick = (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(e => {
1836
+ e.preventDefault();
1837
+
1838
+ if (!item) {
1839
+ return;
1840
+ }
1841
+
1842
+ (0,_faststore_sdk__WEBPACK_IMPORTED_MODULE_4__/* .sendAnalyticsEvent */ ._)({
1843
+ name: 'add_to_cart',
1844
+ params: {
1845
+ currency: code,
1846
+ // TODO: In the future, we can explore more robust ways of
1847
+ // calculating the value (gift items, discounts, etc.).
1848
+ value: item.price * item.quantity,
1849
+ items: [{
1850
+ item_id: item.itemOffered.isVariantOf.productGroupID,
1851
+ item_name: item.itemOffered.isVariantOf.name,
1852
+ item_brand: item.itemOffered.brand.name,
1853
+ item_variant: item.itemOffered.sku,
1854
+ quantity: item.quantity,
1855
+ price: item.price,
1856
+ discount: item.listPrice - item.price,
1857
+ currency: code,
1858
+ item_variant_name: item.itemOffered.name,
1859
+ product_reference_id: item.itemOffered.gtin
1860
+ }]
1861
+ }
1862
+ });
1863
+ _index__WEBPACK_IMPORTED_MODULE_2__/* .cartStore.addItem */ .i8.addItem(item);
1864
+ openCart();
1865
+ }, [code, item, openCart]);
1866
+ return {
1867
+ onClick,
1868
+ 'data-testid': 'buy-button',
1869
+ 'data-sku': item?.itemOffered.sku,
1870
+ 'data-seller': item?.seller.identifier
1871
+ };
1872
+ };
1873
+
1874
+ /***/ }),
1875
+
1876
+ /***/ 3874:
1877
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
1878
+
1879
+ "use strict";
1880
+ __webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
1881
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1882
+ /* harmony export */ "i": () => (/* binding */ useProduct)
1883
+ /* harmony export */ });
1884
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6689);
1885
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
1886
+ /* harmony import */ var _graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7732);
1887
+ /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5971);
1888
+ var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__]);
1889
+ _graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__)[0];
1890
+
1891
+
1892
+
1893
+ const query = "BrowserProductQuery";
1894
+ const useProduct = (productID, fallbackData) => {
1895
+ const {
1896
+ channel,
1897
+ locale
1898
+ } = (0,_session__WEBPACK_IMPORTED_MODULE_2__/* .useSession */ .kP)();
1899
+ const variables = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
1900
+ if (!channel) {
1901
+ throw new Error(`useProduct: 'channel' from session is an empty string.`);
1902
+ }
1903
+
1904
+ return {
1905
+ locator: [{
1906
+ key: 'id',
1907
+ value: productID
1908
+ }, {
1909
+ key: 'channel',
1910
+ value: channel
1911
+ }, {
1912
+ key: 'locale',
1913
+ value: locale
1914
+ }]
1915
+ };
1916
+ }, [channel, locale, productID]);
1917
+ return (0,_graphql_useQuery__WEBPACK_IMPORTED_MODULE_1__/* .useQuery */ .aM)(query, variables, {
1918
+ fallbackData,
1919
+ revalidateOnMount: true
1920
+ });
1921
+ };
1922
+ __webpack_async_result__();
1923
+ } catch(e) { __webpack_async_result__(e); } });
1924
+
1925
+ /***/ }),
1926
+
1927
+ /***/ 6308:
1928
+ /***/ ((module) => {
1929
+
1930
+ // Exports
1931
+ module.exports = {
1932
+ "fs-banner-newsletter": "banner-newsletter_fs-banner-newsletter__45gCy",
1933
+ "fsBannerNewsletter": "banner-newsletter_fs-banner-newsletter__45gCy"
1934
+ };
1935
+
1936
+
1937
+ /***/ }),
1938
+
1939
+ /***/ 841:
1940
+ /***/ ((module) => {
1941
+
1942
+ // Exports
1943
+ module.exports = {
1944
+ "fs-product-details": "product-details_fs-product-details__KhD0C",
1945
+ "fsProductDetails": "product-details_fs-product-details__KhD0C"
1946
+ };
1947
+
1948
+
1949
+ /***/ }),
1950
+
1951
+ /***/ 9265:
1952
+ /***/ ((module) => {
1953
+
1954
+ // Exports
1955
+ module.exports = {
1956
+ "fs-image-gallery-selector": "image-gallery-selector_fs-image-gallery-selector__MgI11",
1957
+ "fsImageGallerySelector": "image-gallery-selector_fs-image-gallery-selector__MgI11"
1958
+ };
1959
+
1960
+
1961
+ /***/ }),
1962
+
1963
+ /***/ 3910:
1964
+ /***/ ((module) => {
1965
+
1966
+ // Exports
1967
+ module.exports = {
1968
+ "fs-image-gallery": "image-gallery_fs-image-gallery__qtBsI",
1969
+ "fsImageGallery": "image-gallery_fs-image-gallery__qtBsI"
1970
+ };
1971
+
1972
+
1973
+ /***/ }),
1974
+
1975
+ /***/ 5490:
1976
+ /***/ ((module) => {
1977
+
1978
+ "use strict";
1979
+ module.exports = require("@faststore/graphql-utils");
1980
+
1981
+ /***/ }),
1982
+
1983
+ /***/ 6676:
1984
+ /***/ ((module) => {
1985
+
1986
+ "use strict";
1987
+ module.exports = require("@vtex/client-cms");
1988
+
1989
+ /***/ }),
1990
+
1991
+ /***/ 2404:
1992
+ /***/ ((module) => {
1993
+
1994
+ "use strict";
1995
+ module.exports = require("fast-deep-equal");
1996
+
1997
+ /***/ }),
1998
+
1999
+ /***/ 7343:
2000
+ /***/ ((module) => {
2001
+
2002
+ "use strict";
2003
+ module.exports = require("graphql");
2004
+
2005
+ /***/ }),
2006
+
2007
+ /***/ 6548:
2008
+ /***/ ((module) => {
2009
+
2010
+ "use strict";
2011
+ module.exports = require("graphql/language");
2012
+
2013
+ /***/ }),
2014
+
2015
+ /***/ 3430:
2016
+ /***/ ((module) => {
2017
+
2018
+ "use strict";
2019
+ module.exports = require("idb-keyval");
2020
+
2021
+ /***/ }),
2022
+
2023
+ /***/ 7881:
2024
+ /***/ ((module) => {
2025
+
2026
+ "use strict";
2027
+ module.exports = require("isomorphic-unfetch");
2028
+
2029
+ /***/ }),
2030
+
2031
+ /***/ 6641:
2032
+ /***/ ((module) => {
2033
+
2034
+ "use strict";
2035
+ module.exports = require("next-seo");
2036
+
2037
+ /***/ }),
2038
+
2039
+ /***/ 3280:
2040
+ /***/ ((module) => {
2041
+
2042
+ "use strict";
2043
+ module.exports = require("next/dist/shared/lib/app-router-context.js");
2044
+
2045
+ /***/ }),
2046
+
2047
+ /***/ 2796:
2048
+ /***/ ((module) => {
2049
+
2050
+ "use strict";
2051
+ module.exports = require("next/dist/shared/lib/head-manager-context.js");
2052
+
2053
+ /***/ }),
2054
+
2055
+ /***/ 5429:
2056
+ /***/ ((module) => {
2057
+
2058
+ "use strict";
2059
+ module.exports = require("next/dist/shared/lib/head.js");
2060
+
2061
+ /***/ }),
2062
+
2063
+ /***/ 3539:
2064
+ /***/ ((module) => {
2065
+
2066
+ "use strict";
2067
+ module.exports = require("next/dist/shared/lib/i18n/detect-domain-locale.js");
2068
+
2069
+ /***/ }),
2070
+
2071
+ /***/ 4014:
2072
+ /***/ ((module) => {
2073
+
2074
+ "use strict";
2075
+ module.exports = require("next/dist/shared/lib/i18n/normalize-locale-path.js");
2076
+
2077
+ /***/ }),
2078
+
2079
+ /***/ 4486:
2080
+ /***/ ((module) => {
2081
+
2082
+ "use strict";
2083
+ module.exports = require("next/dist/shared/lib/image-blur-svg.js");
2084
+
2085
+ /***/ }),
2086
+
2087
+ /***/ 744:
2088
+ /***/ ((module) => {
2089
+
2090
+ "use strict";
2091
+ module.exports = require("next/dist/shared/lib/image-config-context.js");
2092
+
2093
+ /***/ }),
2094
+
2095
+ /***/ 5843:
2096
+ /***/ ((module) => {
2097
+
2098
+ "use strict";
2099
+ module.exports = require("next/dist/shared/lib/image-config.js");
2100
+
2101
+ /***/ }),
2102
+
2103
+ /***/ 8524:
2104
+ /***/ ((module) => {
2105
+
2106
+ "use strict";
2107
+ module.exports = require("next/dist/shared/lib/is-plain-object.js");
2108
+
2109
+ /***/ }),
2110
+
2111
+ /***/ 8020:
2112
+ /***/ ((module) => {
2113
+
2114
+ "use strict";
2115
+ module.exports = require("next/dist/shared/lib/mitt.js");
2116
+
2117
+ /***/ }),
2118
+
2119
+ /***/ 4406:
2120
+ /***/ ((module) => {
2121
+
2122
+ "use strict";
2123
+ module.exports = require("next/dist/shared/lib/page-path/denormalize-page-path.js");
2124
+
2125
+ /***/ }),
2126
+
2127
+ /***/ 4964:
2128
+ /***/ ((module) => {
2129
+
2130
+ "use strict";
2131
+ module.exports = require("next/dist/shared/lib/router-context.js");
2132
+
2133
+ /***/ }),
2134
+
2135
+ /***/ 3431:
2136
+ /***/ ((module) => {
2137
+
2138
+ "use strict";
2139
+ module.exports = require("next/dist/shared/lib/router/utils/add-locale.js");
2140
+
2141
+ /***/ }),
2142
+
2143
+ /***/ 1751:
2144
+ /***/ ((module) => {
2145
+
2146
+ "use strict";
2147
+ module.exports = require("next/dist/shared/lib/router/utils/add-path-prefix.js");
2148
+
2149
+ /***/ }),
2150
+
2151
+ /***/ 6220:
2152
+ /***/ ((module) => {
2153
+
2154
+ "use strict";
2155
+ module.exports = require("next/dist/shared/lib/router/utils/compare-states.js");
2156
+
2157
+ /***/ }),
2158
+
2159
+ /***/ 299:
2160
+ /***/ ((module) => {
2161
+
2162
+ "use strict";
2163
+ module.exports = require("next/dist/shared/lib/router/utils/format-next-pathname-info.js");
2164
+
2165
+ /***/ }),
2166
+
2167
+ /***/ 3938:
2168
+ /***/ ((module) => {
2169
+
2170
+ "use strict";
2171
+ module.exports = require("next/dist/shared/lib/router/utils/format-url.js");
2172
+
2173
+ /***/ }),
2174
+
2175
+ /***/ 9565:
2176
+ /***/ ((module) => {
2177
+
2178
+ "use strict";
2179
+ module.exports = require("next/dist/shared/lib/router/utils/get-asset-path-from-route.js");
2180
+
2181
+ /***/ }),
2182
+
2183
+ /***/ 5789:
2184
+ /***/ ((module) => {
2185
+
2186
+ "use strict";
2187
+ module.exports = require("next/dist/shared/lib/router/utils/get-next-pathname-info.js");
2188
+
2189
+ /***/ }),
2190
+
2191
+ /***/ 1897:
2192
+ /***/ ((module) => {
2193
+
2194
+ "use strict";
2195
+ module.exports = require("next/dist/shared/lib/router/utils/is-bot.js");
2196
+
2197
+ /***/ }),
2198
+
2199
+ /***/ 1428:
2200
+ /***/ ((module) => {
2201
+
2202
+ "use strict";
2203
+ module.exports = require("next/dist/shared/lib/router/utils/is-dynamic.js");
2204
+
2205
+ /***/ }),
2206
+
2207
+ /***/ 8854:
2208
+ /***/ ((module) => {
2209
+
2210
+ "use strict";
2211
+ module.exports = require("next/dist/shared/lib/router/utils/parse-path.js");
2212
+
2213
+ /***/ }),
2214
+
2215
+ /***/ 1292:
2216
+ /***/ ((module) => {
2217
+
2218
+ "use strict";
2219
+ module.exports = require("next/dist/shared/lib/router/utils/parse-relative-url.js");
2220
+
2221
+ /***/ }),
2222
+
2223
+ /***/ 4567:
2224
+ /***/ ((module) => {
2225
+
2226
+ "use strict";
2227
+ module.exports = require("next/dist/shared/lib/router/utils/path-has-prefix.js");
2228
+
2229
+ /***/ }),
2230
+
2231
+ /***/ 979:
2232
+ /***/ ((module) => {
2233
+
2234
+ "use strict";
2235
+ module.exports = require("next/dist/shared/lib/router/utils/querystring.js");
2236
+
2237
+ /***/ }),
2238
+
2239
+ /***/ 3297:
2240
+ /***/ ((module) => {
2241
+
2242
+ "use strict";
2243
+ module.exports = require("next/dist/shared/lib/router/utils/remove-trailing-slash.js");
2244
+
2245
+ /***/ }),
2246
+
2247
+ /***/ 6052:
2248
+ /***/ ((module) => {
2249
+
2250
+ "use strict";
2251
+ module.exports = require("next/dist/shared/lib/router/utils/resolve-rewrites.js");
2252
+
2253
+ /***/ }),
2254
+
2255
+ /***/ 4226:
2256
+ /***/ ((module) => {
2257
+
2258
+ "use strict";
2259
+ module.exports = require("next/dist/shared/lib/router/utils/route-matcher.js");
2260
+
2261
+ /***/ }),
2262
+
2263
+ /***/ 5052:
2264
+ /***/ ((module) => {
2265
+
2266
+ "use strict";
2267
+ module.exports = require("next/dist/shared/lib/router/utils/route-regex.js");
2268
+
2269
+ /***/ }),
2270
+
2271
+ /***/ 9232:
2272
+ /***/ ((module) => {
2273
+
2274
+ "use strict";
2275
+ module.exports = require("next/dist/shared/lib/utils.js");
2276
+
2277
+ /***/ }),
2278
+
2279
+ /***/ 5471:
2280
+ /***/ ((module) => {
2281
+
2282
+ "use strict";
2283
+ module.exports = require("p-limit");
2284
+
2285
+ /***/ }),
2286
+
2287
+ /***/ 6689:
2288
+ /***/ ((module) => {
2289
+
2290
+ "use strict";
2291
+ module.exports = require("react");
2292
+
2293
+ /***/ }),
2294
+
2295
+ /***/ 6405:
2296
+ /***/ ((module) => {
2297
+
2298
+ "use strict";
2299
+ module.exports = require("react-dom");
2300
+
2301
+ /***/ }),
2302
+
2303
+ /***/ 9785:
2304
+ /***/ ((module) => {
2305
+
2306
+ "use strict";
2307
+ module.exports = require("react-intersection-observer");
2308
+
2309
+ /***/ }),
2310
+
2311
+ /***/ 997:
2312
+ /***/ ((module) => {
2313
+
2314
+ "use strict";
2315
+ module.exports = require("react/jsx-runtime");
2316
+
2317
+ /***/ }),
2318
+
2319
+ /***/ 752:
2320
+ /***/ ((module) => {
2321
+
2322
+ "use strict";
2323
+ module.exports = require("tslib");
2324
+
2325
+ /***/ }),
2326
+
2327
+ /***/ 9664:
2328
+ /***/ ((module) => {
2329
+
2330
+ "use strict";
2331
+ module.exports = import("@envelop/core");;
2332
+
2333
+ /***/ }),
2334
+
2335
+ /***/ 7886:
2336
+ /***/ ((module) => {
2337
+
2338
+ "use strict";
2339
+ module.exports = import("@envelop/graphql-jit");;
2340
+
2341
+ /***/ }),
2342
+
2343
+ /***/ 4656:
2344
+ /***/ ((module) => {
2345
+
2346
+ "use strict";
2347
+ module.exports = import("@envelop/parser-cache");;
2348
+
2349
+ /***/ }),
2350
+
2351
+ /***/ 6093:
2352
+ /***/ ((module) => {
2353
+
2354
+ "use strict";
2355
+ module.exports = import("@envelop/validation-cache");;
2356
+
2357
+ /***/ }),
2358
+
2359
+ /***/ 7564:
2360
+ /***/ ((module) => {
2361
+
2362
+ "use strict";
2363
+ module.exports = import("chalk");;
2364
+
2365
+ /***/ }),
2366
+
2367
+ /***/ 5941:
2368
+ /***/ ((module) => {
2369
+
2370
+ "use strict";
2371
+ module.exports = import("swr");;
2372
+
2373
+ /***/ }),
2374
+
2375
+ /***/ 6113:
2376
+ /***/ ((module) => {
2377
+
2378
+ "use strict";
2379
+ module.exports = require("crypto");
2380
+
2381
+ /***/ })
2382
+
2383
+ };
2384
+ ;
2385
+
2386
+ // load runtime
2387
+ var __webpack_require__ = require("../../webpack-runtime.js");
2388
+ __webpack_require__.C(exports);
2389
+ var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId))
2390
+ var __webpack_exports__ = __webpack_require__.X(0, [1608,676,1394,2922,7183,2154,247,7181,8287,9854,6280,6881,6898,120,7104,350,7992,123], () => (__webpack_exec__(4601)));
2391
+ module.exports = __webpack_exports__;
2392
+
2393
+ })();