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