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