@aparte/n8n-chat 0.1.0 → 0.3.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 (86) hide show
  1. package/README.md +230 -16
  2. package/dist/cards.d.ts +3 -0
  3. package/dist/cdn/chunks/chunk-E55C7UF2.js +2 -0
  4. package/dist/cdn/chunks/chunk-E55C7UF2.js.map +7 -0
  5. package/dist/cdn/chunks/chunk-F2QIT4NR.js +206 -0
  6. package/dist/cdn/chunks/chunk-F2QIT4NR.js.map +7 -0
  7. package/dist/cdn/chunks/chunk-F2TNPBN3.js +2 -0
  8. package/dist/cdn/chunks/chunk-F2TNPBN3.js.map +7 -0
  9. package/dist/cdn/chunks/chunk-KY2H3HIJ.js +2 -0
  10. package/dist/cdn/chunks/chunk-KY2H3HIJ.js.map +7 -0
  11. package/dist/cdn/chunks/chunk-VLHCX6EH.js +356 -0
  12. package/dist/cdn/chunks/chunk-VLHCX6EH.js.map +7 -0
  13. package/dist/cdn/chunks/chunk-XC2SVYFR.js +2 -0
  14. package/dist/cdn/chunks/chunk-XC2SVYFR.js.map +7 -0
  15. package/dist/cdn/chunks/de-M5OVUL5F.js +2 -0
  16. package/dist/cdn/chunks/de-M5OVUL5F.js.map +7 -0
  17. package/dist/cdn/chunks/es-JUSLSPF7.js +2 -0
  18. package/dist/cdn/chunks/es-JUSLSPF7.js.map +7 -0
  19. package/dist/cdn/chunks/fr-Z2Y3375Z.js +2 -0
  20. package/dist/cdn/chunks/fr-Z2Y3375Z.js.map +7 -0
  21. package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js → highlight-ADUWBKTT.js} +2 -2
  22. package/dist/cdn/chunks/{highlight-HDJ3ROJ4.js.map → highlight-ADUWBKTT.js.map} +1 -1
  23. package/dist/cdn/chunks/it-N53LIIX5.js +2 -0
  24. package/dist/cdn/chunks/it-N53LIIX5.js.map +7 -0
  25. package/dist/cdn/chunks/items-GTJKLFZT.js +467 -0
  26. package/dist/cdn/chunks/items-GTJKLFZT.js.map +7 -0
  27. package/dist/cdn/chunks/ja-LJHMBKJ4.js +2 -0
  28. package/dist/cdn/chunks/ja-LJHMBKJ4.js.map +7 -0
  29. package/dist/cdn/chunks/ko-XAQOC75B.js +2 -0
  30. package/dist/cdn/chunks/ko-XAQOC75B.js.map +7 -0
  31. package/dist/cdn/chunks/link-L4C4K5GE.js +493 -0
  32. package/dist/cdn/chunks/link-L4C4K5GE.js.map +7 -0
  33. package/dist/cdn/chunks/media-EOQEOMXK.js +797 -0
  34. package/dist/cdn/chunks/media-EOQEOMXK.js.map +7 -0
  35. package/dist/cdn/chunks/order-T5L422AO.js +839 -0
  36. package/dist/cdn/chunks/order-T5L422AO.js.map +7 -0
  37. package/dist/cdn/chunks/place-UD2C3U5F.js +689 -0
  38. package/dist/cdn/chunks/place-UD2C3U5F.js.map +7 -0
  39. package/dist/cdn/chunks/plan-JJ3Z64NU.js +542 -0
  40. package/dist/cdn/chunks/plan-JJ3Z64NU.js.map +7 -0
  41. package/dist/cdn/chunks/product-FNGKWEQP.js +676 -0
  42. package/dist/cdn/chunks/product-FNGKWEQP.js.map +7 -0
  43. package/dist/cdn/chunks/pt-BR-KMZM3WTU.js +2 -0
  44. package/dist/cdn/chunks/pt-BR-KMZM3WTU.js.map +7 -0
  45. package/dist/cdn/chunks/ru-3AG5HYY2.js +2 -0
  46. package/dist/cdn/chunks/ru-3AG5HYY2.js.map +7 -0
  47. package/dist/cdn/chunks/score-3CGZEPWP.js +882 -0
  48. package/dist/cdn/chunks/score-3CGZEPWP.js.map +7 -0
  49. package/dist/cdn/chunks/stats-FGZCRFFK.js +491 -0
  50. package/dist/cdn/chunks/stats-FGZCRFFK.js.map +7 -0
  51. package/dist/cdn/chunks/stock-E72GAUMB.js +707 -0
  52. package/dist/cdn/chunks/stock-E72GAUMB.js.map +7 -0
  53. package/dist/cdn/chunks/weather-5ZNWC2WM.js +615 -0
  54. package/dist/cdn/chunks/weather-5ZNWC2WM.js.map +7 -0
  55. package/dist/cdn/chunks/zh-CN-DL6ZWLGA.js +2 -0
  56. package/dist/cdn/chunks/zh-CN-DL6ZWLGA.js.map +7 -0
  57. package/dist/cdn/n8n-chat.js +57 -51
  58. package/dist/cdn/n8n-chat.js.map +4 -4
  59. package/dist/create-chat.d.ts +43 -8
  60. package/dist/index.d.ts +2 -0
  61. package/dist/index.js +87 -41
  62. package/dist/index.js.map +1 -1
  63. package/dist/strings.d.ts +1 -1
  64. package/dist/style.css +9 -1
  65. package/dist/theme.css +8 -0
  66. package/package.json +7 -6
  67. package/dist/cdn/chunks/chunk-MU6PIUJC.js +0 -206
  68. package/dist/cdn/chunks/chunk-MU6PIUJC.js.map +0 -7
  69. package/dist/cdn/chunks/de-WJNL5YNK.js +0 -2
  70. package/dist/cdn/chunks/de-WJNL5YNK.js.map +0 -7
  71. package/dist/cdn/chunks/es-DV5N3CXP.js +0 -2
  72. package/dist/cdn/chunks/es-DV5N3CXP.js.map +0 -7
  73. package/dist/cdn/chunks/fr-YU75PBOR.js +0 -2
  74. package/dist/cdn/chunks/fr-YU75PBOR.js.map +0 -7
  75. package/dist/cdn/chunks/it-DZTHWNO3.js +0 -2
  76. package/dist/cdn/chunks/it-DZTHWNO3.js.map +0 -7
  77. package/dist/cdn/chunks/ja-QO442LBN.js +0 -2
  78. package/dist/cdn/chunks/ja-QO442LBN.js.map +0 -7
  79. package/dist/cdn/chunks/ko-EGFZJCXQ.js +0 -2
  80. package/dist/cdn/chunks/ko-EGFZJCXQ.js.map +0 -7
  81. package/dist/cdn/chunks/pt-BR-526LHI67.js +0 -2
  82. package/dist/cdn/chunks/pt-BR-526LHI67.js.map +0 -7
  83. package/dist/cdn/chunks/ru-5WNEMKNP.js +0 -2
  84. package/dist/cdn/chunks/ru-5WNEMKNP.js.map +0 -7
  85. package/dist/cdn/chunks/zh-CN-ABSHNLG6.js +0 -2
  86. package/dist/cdn/chunks/zh-CN-ABSHNLG6.js.map +0 -7
@@ -0,0 +1,676 @@
1
+ import{a as z}from"./chunk-XC2SVYFR.js";import{a as C}from"./chunk-KY2H3HIJ.js";import{a as o,b as y,d as m,e as g,f as l,i as _,o as G,q as b,r as Q,s as O,t as X,u as Y}from"./chunk-VLHCX6EH.js";import"./chunk-F2QIT4NR.js";import"./chunk-XAWE4EAK.js";var P=t=>`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" xmlns="http://www.w3.org/2000/svg">${t}</svg>`,ca=P('<path d="M5.5 8h13l-1 11.2a1.8 1.8 0 0 1-1.8 1.6H8.3a1.8 1.8 0 0 1-1.8-1.6z"/><path d="M9 10.5V6.8a3 3 0 0 1 6 0v3.7"/>'),da=P('<path d="M2.8 6.5h10.4v9.3H2.8z"/><path d="M13.2 9.5h4.1l3 3.2v3.1h-7.1"/><circle cx="7" cy="17.3" r="1.7"/><circle cx="17" cy="17.3" r="1.7"/>'),la=P('<circle cx="10.8" cy="10.8" r="6.3"/><path d="M15.5 15.5l4.7 4.7"/>'),ua=P('<path d="M3.5 12.6V4.8a1.3 1.3 0 0 1 1.3-1.3h7.8l8 8a1.3 1.3 0 0 1 0 1.8l-7 7a1.3 1.3 0 0 1-1.8 0z"/><circle cx="8.3" cy="8.3" r="1.5"/>'),_a=`/* =========================================
2
+ The product card \u2014 @aparte/plugin-cards/product
3
+ =========================================
4
+ Three variants of one card, chosen by \`data-variant\` on its root:
5
+ card a tile: the photo, the shop, the name, the stars, the price. Several
6
+ products are a row of tiles that scrolls, and the card drops its own
7
+ frame so the tiles are not boxes inside a box.
8
+ compact a row per product \u2014 thumbnail, name, stars, price \u2014 a list to scan.
9
+ detail one product at length: the photo beside the facts on a wide card, above
10
+ them on a narrow one; the others in a small row under it.
11
+ Every colour is a theme token or derived from one, so light and dark follow the chat.
12
+ */
13
+
14
+ .aparte-product-card {
15
+ --aparte-product-tile-size: 12.5rem;
16
+ --aparte-product-thumb-size: 3.5rem;
17
+ --aparte-product-media-radius: var(--aparte-radius-lg);
18
+ /* A product photo is shot on white. The plate it sits on is near-white in BOTH schemes
19
+ (derived from the ink, so it is a hair off white in light and a hair off cream in
20
+ dark) and the photo is multiplied into it: its white background melts into the plate
21
+ instead of sitting as a white square on a grey one. A photo on a dark plate in dark
22
+ mode keeps its white box whatever we do \u2014 the shops' own apps show it light too. */
23
+ --aparte-product-media-bg: color-mix(in oklab, var(--aparte-text) 5%, #fff);
24
+ --aparte-product-image-fit: contain;
25
+ --aparte-product-image-inset: 7%;
26
+ /* Where there is no photo: the theme's own surfaces, warmed by its accent. */
27
+ --aparte-product-placeholder: linear-gradient(
28
+ 145deg,
29
+ color-mix(in oklab, var(--aparte-primary) 16%, var(--aparte-surface-2)) 0%,
30
+ var(--aparte-surface-2) 55%,
31
+ color-mix(in oklab, var(--aparte-text) 5%, var(--aparte-surface-2)) 100%
32
+ );
33
+ --aparte-product-placeholder-ink: color-mix(in oklab, var(--aparte-text) 30%, transparent);
34
+ --aparte-product-price-color: var(--aparte-text);
35
+ --aparte-product-hover-border: color-mix(in oklab, var(--aparte-text) 22%, var(--aparte-border));
36
+ --aparte-product-hover-shadow: 0 8px 18px -12px rgb(0 0 0 / 0.38);
37
+ }
38
+
39
+ /* \u2500\u2500 Widths: each variant asks for its own; the bubble's limit caps them all \u2500\u2500 */
40
+
41
+ .aparte-product-card[data-variant="card"] { --aparte-rich-card-max-inline-size: 16.5rem; }
42
+ .aparte-product-card[data-variant="compact"] { --aparte-rich-card-max-inline-size: 28rem; }
43
+ .aparte-product-card[data-variant="detail"] { --aparte-rich-card-max-inline-size: 36rem; }
44
+ .aparte-product-card:has(> .aparte-product__collection) { --aparte-rich-card-max-inline-size: 42rem; }
45
+
46
+ /* Several tiles: each is framed, so the card is not. The kit's buttons under it lose
47
+ their band, which would otherwise float as a strip under nothing. */
48
+ .aparte-product-card:has(> .aparte-product__collection) {
49
+ overflow: visible;
50
+ border-color: transparent;
51
+ border-radius: 0;
52
+ background: transparent;
53
+ }
54
+
55
+ .aparte-product-card:has(> .aparte-product__collection) > .aparte-rich-card__actions {
56
+ padding-inline: 0;
57
+ border-block-start: 0;
58
+ background: none;
59
+ }
60
+
61
+ /* \u2500\u2500 Headings: the collection's title, the query of a running search \u2500\u2500\u2500 */
62
+
63
+ .aparte-product__heading {
64
+ margin-block-end: var(--aparte-space-4);
65
+ font-size: var(--aparte-font-size-md);
66
+ font-weight: var(--aparte-font-weight-semibold);
67
+ overflow-wrap: anywhere;
68
+ }
69
+
70
+ .aparte-product-card[data-variant="compact"] > .aparte-product__heading {
71
+ margin: 0;
72
+ padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-2);
73
+ }
74
+
75
+ .aparte-product__query {
76
+ display: flex;
77
+ align-items: center;
78
+ gap: var(--aparte-space-3);
79
+ min-inline-size: 0;
80
+ margin-block-end: var(--aparte-space-4);
81
+ color: var(--aparte-text-muted);
82
+ font-size: var(--aparte-font-size-md);
83
+ --aparte-rich-card-glyph-size: 1rem;
84
+ }
85
+
86
+ .aparte-product__query-text {
87
+ overflow: hidden;
88
+ text-overflow: ellipsis;
89
+ white-space: nowrap;
90
+ }
91
+
92
+ .aparte-product-card[data-variant="compact"] > .aparte-product__query,
93
+ .aparte-product-card[data-variant="detail"] > .aparte-product__query {
94
+ margin: 0;
95
+ padding: var(--aparte-space-5) var(--aparte-space-6) 0;
96
+ }
97
+
98
+ /* \u2500\u2500 The carousel, in product sizes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
99
+
100
+ .aparte-product-card .aparte-rich-card__carousel {
101
+ --aparte-rich-card-slide-size: var(--aparte-product-tile-size);
102
+ }
103
+
104
+ /* \u2500\u2500 A product, whatever its shape \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
105
+
106
+ .aparte-product {
107
+ position: relative;
108
+ min-inline-size: 0;
109
+ color: var(--aparte-text);
110
+ }
111
+
112
+ /* The title's link covers the tile or the row: one link per product, read once. */
113
+ .aparte-product__link {
114
+ color: inherit;
115
+ text-decoration: none;
116
+ }
117
+
118
+ .aparte-product--tile .aparte-product__link,
119
+ .aparte-product--row .aparte-product__link {
120
+ outline: none;
121
+ }
122
+
123
+ .aparte-product--tile .aparte-product__link::after,
124
+ .aparte-product--row .aparte-product__link::after {
125
+ content: "";
126
+ position: absolute;
127
+ inset: 0;
128
+ border-radius: inherit;
129
+ }
130
+
131
+ .aparte-product[data-linked]:hover .aparte-product__title {
132
+ text-decoration: underline;
133
+ text-decoration-thickness: 1px;
134
+ text-underline-offset: 0.18em;
135
+ }
136
+
137
+ /* The ring is the product's, since the link is all of it. */
138
+ .aparte-product--tile:has(.aparte-product__link:focus-visible) {
139
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
140
+ outline-offset: var(--aparte-focus-outline-offset);
141
+ }
142
+
143
+ .aparte-product--row:has(.aparte-product__link:focus-visible) {
144
+ /* A row reaches the card's clipped edges: its ring is drawn inside. */
145
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
146
+ outline-offset: calc(var(--aparte-focus-outline-width) * -1);
147
+ }
148
+
149
+ /* \u2500\u2500 The photo \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
150
+
151
+ .aparte-product__media {
152
+ position: relative;
153
+ display: grid;
154
+ place-items: center;
155
+ aspect-ratio: 1;
156
+ overflow: hidden;
157
+ border-radius: var(--aparte-product-media-radius);
158
+ background: var(--aparte-product-media-bg);
159
+ isolation: isolate;
160
+ }
161
+
162
+ .aparte-product__media[data-empty] {
163
+ background: var(--aparte-product-placeholder);
164
+ }
165
+
166
+ .aparte-product__placeholder {
167
+ grid-area: 1 / 1;
168
+ color: var(--aparte-product-placeholder-ink);
169
+ --aparte-rich-card-glyph-size: clamp(1.25rem, 30%, 3.5rem);
170
+ }
171
+
172
+ .aparte-product__media:not([data-empty]) .aparte-product__placeholder { visibility: hidden; }
173
+
174
+ .aparte-product__image {
175
+ grid-area: 1 / 1;
176
+ box-sizing: border-box;
177
+ inline-size: 100%;
178
+ block-size: 100%;
179
+ padding: var(--aparte-product-image-inset);
180
+ object-fit: var(--aparte-product-image-fit);
181
+ mix-blend-mode: multiply;
182
+ transition: scale var(--aparte-duration-slower) ease, opacity var(--aparte-duration-base) ease;
183
+ }
184
+
185
+ .aparte-product__image[hidden] { display: none; }
186
+
187
+ .aparte-product[data-linked]:hover .aparte-product__image,
188
+ .aparte-product__media-link:hover .aparte-product__image {
189
+ scale: 1.04;
190
+ }
191
+
192
+ /* Out of stock: the photo steps back, the line under it says why. */
193
+ .aparte-product[data-availability="out-of-stock"] .aparte-product__image {
194
+ opacity: 0.55;
195
+ filter: grayscale(0.5);
196
+ }
197
+
198
+ .aparte-product__flags {
199
+ position: absolute;
200
+ z-index: 1;
201
+ inset-block-start: var(--aparte-space-3);
202
+ inset-inline-start: var(--aparte-space-3);
203
+ display: flex;
204
+ flex-wrap: wrap;
205
+ gap: var(--aparte-space-2);
206
+ max-inline-size: calc(100% - var(--aparte-space-3) * 2);
207
+ }
208
+
209
+ /* The shop's word: a pill of the card's own surface over the plate, in either scheme. */
210
+ .aparte-product__flags .aparte-product__badge {
211
+ max-inline-size: 100%;
212
+ overflow: hidden;
213
+ text-overflow: ellipsis;
214
+ background: color-mix(in oklab, var(--aparte-surface-1) 90%, transparent);
215
+ color: var(--aparte-text);
216
+ box-shadow: 0 1px 3px rgb(0 0 0 / 0.14);
217
+ backdrop-filter: blur(6px);
218
+ }
219
+
220
+ .aparte-product__discount {
221
+ font-variant-numeric: tabular-nums;
222
+ }
223
+
224
+ /* \u2500\u2500 The words beside the photo \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
225
+
226
+ .aparte-product__body {
227
+ display: flex;
228
+ flex: 1;
229
+ flex-direction: column;
230
+ gap: var(--aparte-space-2);
231
+ min-inline-size: 0;
232
+ }
233
+
234
+ .aparte-product__merchant {
235
+ display: flex;
236
+ align-items: center;
237
+ gap: var(--aparte-space-2);
238
+ min-inline-size: 0;
239
+ color: var(--aparte-text-muted);
240
+ font-size: var(--aparte-font-size-xs);
241
+ }
242
+
243
+ .aparte-product__merchant-name {
244
+ overflow: hidden;
245
+ text-overflow: ellipsis;
246
+ white-space: nowrap;
247
+ }
248
+
249
+ .aparte-product__logo {
250
+ flex: none;
251
+ inline-size: 1rem;
252
+ block-size: 1rem;
253
+ border-radius: var(--aparte-radius-xs);
254
+ object-fit: cover;
255
+ }
256
+
257
+ .aparte-product__logo[hidden] { display: none; }
258
+
259
+ .aparte-product__title {
260
+ display: -webkit-box;
261
+ overflow: hidden;
262
+ -webkit-box-orient: vertical;
263
+ -webkit-line-clamp: 2;
264
+ line-clamp: 2;
265
+ font-size: var(--aparte-font-size-md);
266
+ font-weight: var(--aparte-font-weight-medium);
267
+ line-height: 1.3;
268
+ overflow-wrap: anywhere;
269
+ }
270
+
271
+ .aparte-product__price {
272
+ display: flex;
273
+ flex-wrap: wrap;
274
+ align-items: baseline;
275
+ gap: var(--aparte-space-1) var(--aparte-space-3);
276
+ font-variant-numeric: tabular-nums;
277
+ }
278
+
279
+ .aparte-product__now {
280
+ color: var(--aparte-product-price-color);
281
+ font-size: var(--aparte-font-size-lg);
282
+ font-weight: var(--aparte-font-weight-bold);
283
+ letter-spacing: -0.01em;
284
+ white-space: nowrap;
285
+ }
286
+
287
+ .aparte-product__was {
288
+ color: var(--aparte-text-muted);
289
+ font-size: var(--aparte-font-size-sm);
290
+ text-decoration-thickness: 1px;
291
+ white-space: nowrap;
292
+ }
293
+
294
+ .aparte-product__price .aparte-product__discount { align-self: center; }
295
+
296
+ /* Stock: a dot in the state's colour, the word in its readable ink. */
297
+ .aparte-product__stock {
298
+ --aparte-product-stock-tone: var(--aparte-neutral);
299
+ --aparte-product-stock-ink: var(--aparte-text-muted);
300
+ display: inline-flex;
301
+ align-items: center;
302
+ gap: var(--aparte-space-2);
303
+ min-inline-size: 0;
304
+ color: var(--aparte-product-stock-ink);
305
+ font-size: var(--aparte-font-size-xs);
306
+ font-weight: var(--aparte-font-weight-medium);
307
+ }
308
+
309
+ .aparte-product__stock[data-availability="in-stock"] { --aparte-product-stock-tone: var(--aparte-success); --aparte-product-stock-ink: var(--aparte-success-ink); }
310
+ .aparte-product__stock[data-availability="low-stock"] { --aparte-product-stock-tone: var(--aparte-warning); --aparte-product-stock-ink: var(--aparte-warning-ink); }
311
+ .aparte-product__stock[data-availability="out-of-stock"] { --aparte-product-stock-tone: var(--aparte-error); --aparte-product-stock-ink: var(--aparte-error-ink); }
312
+ .aparte-product__stock[data-availability="preorder"] { --aparte-product-stock-tone: var(--aparte-info); --aparte-product-stock-ink: var(--aparte-info-ink); }
313
+
314
+ .aparte-product__dot {
315
+ flex: none;
316
+ inline-size: 0.4375rem;
317
+ block-size: 0.4375rem;
318
+ border-radius: var(--aparte-radius-full);
319
+ background: var(--aparte-product-stock-tone);
320
+ box-shadow: 0 0 0 3px color-mix(in oklab, var(--aparte-product-stock-tone) 20%, transparent);
321
+ }
322
+
323
+ .aparte-product__stock-text {
324
+ overflow: hidden;
325
+ text-overflow: ellipsis;
326
+ white-space: nowrap;
327
+ }
328
+
329
+ .aparte-product__shipping {
330
+ display: inline-flex;
331
+ align-items: center;
332
+ gap: var(--aparte-space-2);
333
+ min-inline-size: 0;
334
+ color: var(--aparte-text-muted);
335
+ font-size: var(--aparte-font-size-xs);
336
+ --aparte-rich-card-glyph-size: 1rem;
337
+ }
338
+
339
+ .aparte-product__shipping[data-free] {
340
+ color: var(--aparte-success-ink);
341
+ font-weight: var(--aparte-font-weight-medium);
342
+ }
343
+
344
+ .aparte-product__shipping-icon:dir(rtl) { transform: scaleX(-1); }
345
+
346
+ /* Buttons sit above the link that covers the product. */
347
+ .aparte-product__actions {
348
+ position: relative;
349
+ z-index: 1;
350
+ display: flex;
351
+ flex-wrap: wrap;
352
+ gap: var(--aparte-space-2);
353
+ }
354
+
355
+ /* \u2500\u2500 card: the tile \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
356
+
357
+ .aparte-product--tile {
358
+ display: flex;
359
+ flex-direction: column;
360
+ gap: var(--aparte-space-4);
361
+ padding: var(--aparte-space-3) var(--aparte-space-3) var(--aparte-space-4);
362
+ border-radius: var(--aparte-card-radius);
363
+ }
364
+
365
+ .aparte-product--tile .aparte-product__body { padding-inline: var(--aparte-space-2); }
366
+
367
+ /* Two lines held even when the name takes one, so the prices in a row line up. */
368
+ .aparte-product--tile .aparte-product__title { min-block-size: 2lh; }
369
+
370
+ /* The price sits at the foot of the tile, level with its neighbours'. */
371
+ .aparte-product--tile .aparte-product__price {
372
+ margin-block-start: auto;
373
+ padding-block-start: var(--aparte-space-1);
374
+ }
375
+
376
+ .aparte-product--tile .aparte-product__actions { padding-inline: var(--aparte-space-2); }
377
+ .aparte-product--tile .aparte-product__action { flex: 1 1 auto; justify-content: center; }
378
+
379
+ /* A tile alone, the one product of an answer: a square photo the width of a chat column is
380
+ taller than the chat's view, and without a photo the square held nothing. A landscape frame,
381
+ and a low band when there is no picture; in a row of tiles they stay square and level. */
382
+ .aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media {
383
+ aspect-ratio: 4 / 3;
384
+ }
385
+
386
+ .aparte-product--tile:not(:is(.aparte-product__collection, .aparte-product__more) .aparte-product--tile) .aparte-product__media[data-empty] {
387
+ aspect-ratio: 3 / 1;
388
+ }
389
+
390
+ .aparte-product__collection .aparte-product--tile,
391
+ .aparte-product__more .aparte-product--tile {
392
+ border: var(--aparte-border-width) solid var(--aparte-border);
393
+ background: var(--aparte-surface-1);
394
+ transition:
395
+ border-color var(--aparte-duration-base) ease,
396
+ box-shadow var(--aparte-duration-base) ease,
397
+ translate var(--aparte-duration-base) ease;
398
+ }
399
+
400
+ .aparte-product__collection .aparte-product--tile[data-linked]:hover,
401
+ .aparte-product__more .aparte-product--tile[data-linked]:hover {
402
+ border-color: var(--aparte-product-hover-border);
403
+ box-shadow: var(--aparte-product-hover-shadow);
404
+ translate: 0 -2px;
405
+ }
406
+
407
+ /* A mini tile: the others under a detail. */
408
+ .aparte-product--mini {
409
+ gap: var(--aparte-space-3);
410
+ padding: var(--aparte-space-2) var(--aparte-space-2) var(--aparte-space-3);
411
+ }
412
+
413
+ .aparte-product--mini .aparte-product__body { gap: var(--aparte-space-1); }
414
+ .aparte-product--mini .aparte-product__title { font-size: var(--aparte-font-size-sm); }
415
+ .aparte-product--mini .aparte-product__now { font-size: var(--aparte-font-size-md); }
416
+ .aparte-product--mini .aparte-product__was { font-size: var(--aparte-font-size-xs); }
417
+
418
+ /* \u2500\u2500 compact: the rows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
419
+
420
+ /* On the drawn card only: a one-line state shrinks to its words, and a size container
421
+ cannot. */
422
+ .aparte-product-card[data-variant="compact"][data-state="ready"] {
423
+ container: aparte-product-rows / inline-size;
424
+ }
425
+
426
+ .aparte-product__rows {
427
+ margin: 0;
428
+ padding: var(--aparte-space-2) 0;
429
+ list-style: none;
430
+ }
431
+
432
+ /* A divider starting after the thumbnail, the way a settings list draws it. */
433
+ .aparte-product__item { position: relative; }
434
+
435
+ .aparte-product__item + .aparte-product__item::before {
436
+ content: "";
437
+ position: absolute;
438
+ inset-block-start: 0;
439
+ inset-inline: calc(var(--aparte-space-6) + var(--aparte-product-thumb-size) + var(--aparte-space-5)) var(--aparte-space-6);
440
+ border-block-start: var(--aparte-border-width) solid var(--aparte-border);
441
+ }
442
+
443
+ .aparte-product--row {
444
+ display: grid;
445
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;
446
+ align-items: center;
447
+ column-gap: var(--aparte-space-5);
448
+ padding: var(--aparte-space-4) var(--aparte-space-6);
449
+ transition: background-color var(--aparte-duration-fast) ease;
450
+ }
451
+
452
+ .aparte-product--row:has(> .aparte-product__actions) {
453
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto auto;
454
+ }
455
+
456
+ .aparte-product--row[data-linked]:hover { background: var(--aparte-surface-2); }
457
+
458
+ .aparte-product__thumb {
459
+ inline-size: var(--aparte-product-thumb-size);
460
+ --aparte-product-media-radius: var(--aparte-radius-md);
461
+ --aparte-product-image-inset: 4%;
462
+ }
463
+
464
+ .aparte-product__thumb .aparte-product__placeholder { --aparte-rich-card-glyph-size: 45%; }
465
+
466
+ .aparte-product__main {
467
+ display: flex;
468
+ flex-direction: column;
469
+ gap: var(--aparte-space-1);
470
+ min-inline-size: 0;
471
+ }
472
+
473
+ .aparte-product__meta {
474
+ display: flex;
475
+ flex-wrap: wrap;
476
+ align-items: center;
477
+ gap: var(--aparte-space-1) var(--aparte-space-3);
478
+ min-inline-size: 0;
479
+ color: var(--aparte-text-muted);
480
+ font-size: var(--aparte-font-size-xs);
481
+ }
482
+
483
+ .aparte-product__meta .aparte-rich-card__rating { font-size: var(--aparte-font-size-xs); }
484
+
485
+ .aparte-product--row .aparte-product__price {
486
+ flex-direction: column;
487
+ align-items: flex-end;
488
+ gap: 0;
489
+ text-align: end;
490
+ }
491
+
492
+ .aparte-product--row .aparte-product__now { font-size: var(--aparte-font-size-base); }
493
+ .aparte-product--row .aparte-product__was { font-size: var(--aparte-font-size-xs); }
494
+
495
+ /* On a narrow card a row's button goes under its name rather than squeeze it. */
496
+ @container aparte-product-rows (max-width: 24rem) {
497
+ .aparte-product--row:has(> .aparte-product__actions) {
498
+ grid-template-columns: var(--aparte-product-thumb-size) minmax(0, 1fr) auto;
499
+ }
500
+
501
+ .aparte-product--row > .aparte-product__actions {
502
+ grid-column: 2 / -1;
503
+ margin-block-start: var(--aparte-space-3);
504
+ }
505
+ }
506
+
507
+ /* \u2500\u2500 detail: one product at length \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
508
+
509
+ .aparte-product__detail {
510
+ container: aparte-product-detail / inline-size;
511
+ }
512
+
513
+ .aparte-product--detail {
514
+ display: grid;
515
+ gap: var(--aparte-space-6);
516
+ padding: var(--aparte-space-6);
517
+ }
518
+
519
+ .aparte-product--detail .aparte-product__media,
520
+ .aparte-product--detail .aparte-product__sk-media {
521
+ aspect-ratio: 4 / 3;
522
+ }
523
+
524
+ /* No picture: a low band for the glyph, not a frame the size of a photo that is not there. */
525
+ .aparte-product--detail .aparte-product__media[data-empty] {
526
+ aspect-ratio: 3 / 1;
527
+ }
528
+
529
+ .aparte-product__media-link {
530
+ display: block;
531
+ border-radius: var(--aparte-product-media-radius);
532
+ }
533
+
534
+ .aparte-product--detail .aparte-product__body { gap: var(--aparte-space-3); }
535
+
536
+ /* The clamp clips what overflows it, the focus ring included: the padding gives the ring
537
+ room inside, and the margin takes that room back from the layout. */
538
+ .aparte-product--detail .aparte-product__title {
539
+ -webkit-line-clamp: 4;
540
+ line-clamp: 4;
541
+ margin: calc(var(--aparte-space-2) * -1);
542
+ padding: var(--aparte-space-2);
543
+ font-size: var(--aparte-font-size-lg);
544
+ font-weight: var(--aparte-font-weight-semibold);
545
+ }
546
+
547
+ .aparte-product--detail .aparte-product__link:hover { text-decoration: underline; text-underline-offset: 0.18em; }
548
+
549
+ .aparte-product--detail .aparte-product__link:focus-visible {
550
+ border-radius: var(--aparte-radius-xs);
551
+ outline: var(--aparte-focus-outline-width) solid var(--aparte-border-focus);
552
+ outline-offset: var(--aparte-focus-outline-offset);
553
+ }
554
+
555
+ .aparte-product--detail .aparte-product__now { font-size: var(--aparte-font-size-2xl); }
556
+ .aparte-product--detail .aparte-product__was { font-size: var(--aparte-font-size-md); }
557
+
558
+ .aparte-product__facts {
559
+ display: flex;
560
+ flex-wrap: wrap;
561
+ align-items: center;
562
+ gap: var(--aparte-space-2) var(--aparte-space-6);
563
+ }
564
+
565
+ .aparte-product__description {
566
+ display: -webkit-box;
567
+ margin: 0;
568
+ overflow: hidden;
569
+ -webkit-box-orient: vertical;
570
+ -webkit-line-clamp: 3;
571
+ line-clamp: 3;
572
+ color: var(--aparte-text-muted);
573
+ font-size: var(--aparte-font-size-sm);
574
+ line-height: 1.5;
575
+ overflow-wrap: anywhere;
576
+ }
577
+
578
+ .aparte-product__options {
579
+ display: flex;
580
+ flex-wrap: wrap;
581
+ gap: var(--aparte-space-2);
582
+ margin: 0;
583
+ padding: 0;
584
+ list-style: none;
585
+ }
586
+
587
+ .aparte-product__option--more { color: var(--aparte-text-muted); }
588
+
589
+ .aparte-product--detail .aparte-product__actions { margin-block-start: var(--aparte-space-2); }
590
+ .aparte-product--detail .aparte-product__action { flex: 1 1 8rem; justify-content: center; }
591
+
592
+ @container aparte-product-detail (min-width: 30rem) {
593
+ .aparte-product--detail {
594
+ grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
595
+ align-items: start;
596
+ gap: var(--aparte-space-7);
597
+ }
598
+
599
+ .aparte-product--detail .aparte-product__media,
600
+ .aparte-product--detail .aparte-product__sk-media {
601
+ aspect-ratio: 1;
602
+ }
603
+ }
604
+
605
+ /* The others, under the detail. */
606
+ .aparte-product__more {
607
+ --aparte-product-tile-size: 9.5rem;
608
+ padding: var(--aparte-space-5) var(--aparte-space-6) var(--aparte-space-6);
609
+ border-block-start: var(--aparte-border-width) solid var(--aparte-border);
610
+ background: color-mix(in oklab, var(--aparte-surface-2) 45%, var(--aparte-surface-1));
611
+ }
612
+
613
+ .aparte-product__more-title {
614
+ margin-block-end: var(--aparte-space-4);
615
+ color: var(--aparte-text-muted);
616
+ font-size: var(--aparte-font-size-sm);
617
+ font-weight: var(--aparte-font-weight-semibold);
618
+ }
619
+
620
+ /* \u2500\u2500 Loading \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
621
+
622
+ .aparte-product__sk-track {
623
+ display: grid;
624
+ grid-auto-flow: column;
625
+ grid-auto-columns: var(--aparte-product-tile-size);
626
+ column-gap: var(--aparte-space-4);
627
+ overflow: hidden;
628
+ }
629
+
630
+ .aparte-product-card .aparte-product__sk-media {
631
+ block-size: auto;
632
+ aspect-ratio: 1;
633
+ border-radius: var(--aparte-product-media-radius);
634
+ }
635
+
636
+ .aparte-product-card .aparte-product__sk-thumb {
637
+ inline-size: var(--aparte-product-thumb-size);
638
+ block-size: auto;
639
+ aspect-ratio: 1;
640
+ border-radius: var(--aparte-radius-md);
641
+ }
642
+
643
+ .aparte-product-card .aparte-product__sk-line--short { inline-size: 60%; }
644
+
645
+ .aparte-product-card .aparte-product__sk-price {
646
+ inline-size: 4.5rem;
647
+ block-size: 1.125rem;
648
+ margin-block-start: auto;
649
+ }
650
+
651
+ .aparte-product--row .aparte-product__sk-price { margin-block-start: 0; }
652
+
653
+ /* \u2500\u2500 Small screens, motion \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
654
+
655
+ @media (max-width: 380px) {
656
+ .aparte-product-card { --aparte-product-tile-size: 10.75rem; --aparte-product-thumb-size: 3rem; }
657
+ .aparte-product--row { column-gap: var(--aparte-space-4); padding-inline: var(--aparte-space-5); }
658
+ .aparte-product__item + .aparte-product__item::before {
659
+ inset-inline: calc(var(--aparte-space-5) + var(--aparte-product-thumb-size) + var(--aparte-space-4)) var(--aparte-space-5);
660
+ }
661
+ .aparte-product--detail { padding: var(--aparte-space-5); }
662
+ .aparte-product__more { padding-inline: var(--aparte-space-5); }
663
+ }
664
+
665
+ /* The kit stops every transition under reduced motion; the hover's lift and zoom are
666
+ end states, not transitions, so they are taken out here. */
667
+ @media (prefers-reduced-motion: reduce) {
668
+ .aparte-product__collection .aparte-product--tile[data-linked]:hover,
669
+ .aparte-product__more .aparte-product--tile[data-linked]:hover { translate: none; }
670
+
671
+ .aparte-product[data-linked]:hover .aparte-product__image,
672
+ .aparte-product__media-link:hover .aparte-product__image { scale: none; }
673
+ }
674
+ `,u={cardsProductTitle:{en:"Products",fr:"Produits",de:"Produkte",es:"Productos",it:"Prodotti",ja:"\u5546\u54C1",ko:"\uC0C1\uD488",pt:"Produtos",ru:"\u0422\u043E\u0432\u0430\u0440\u044B",zh:"\u5546\u54C1"},cardsProductCount:{en:"{n} products",fr:"{n} produits",de:"{n} Produkte",es:"{n} productos",it:"{n} prodotti",ja:"{n}\u4EF6\u306E\u5546\u54C1",ko:"\uC0C1\uD488 {n}\uAC1C",pt:"{n} produtos",ru:"\u0422\u043E\u0432\u0430\u0440\u043E\u0432: {n}",zh:"{n} \u4EF6\u5546\u54C1"},cardsProductInStock:{en:"In stock",fr:"En stock",de:"Auf Lager",es:"En stock",it:"Disponibile",ja:"\u5728\u5EAB\u3042\u308A",ko:"\uC7AC\uACE0 \uC788\uC74C",pt:"Em estoque",ru:"\u0412 \u043D\u0430\u043B\u0438\u0447\u0438\u0438",zh:"\u6709\u8D27"},cardsProductLowStock:{en:"Only a few left",fr:"Plus que quelques-uns",de:"Nur noch wenige",es:"Quedan pocas unidades",it:"Ultimi pezzi",ja:"\u6B8B\u308A\u308F\u305A\u304B",ko:"\uD488\uC808 \uC784\uBC15",pt:"\xDAltimas unidades",ru:"\u041E\u0441\u0442\u0430\u043B\u043E\u0441\u044C \u043C\u0430\u043B\u043E",zh:"\u4EC5\u5269\u5C11\u91CF"},cardsProductOutOfStock:{en:"Out of stock",fr:"Rupture de stock",de:"Ausverkauft",es:"Agotado",it:"Esaurito",ja:"\u5728\u5EAB\u5207\u308C",ko:"\uD488\uC808",pt:"Esgotado",ru:"\u041D\u0435\u0442 \u0432 \u043D\u0430\u043B\u0438\u0447\u0438\u0438",zh:"\u7F3A\u8D27"},cardsProductPreorder:{en:"Pre-order",fr:"Pr\xE9commande",de:"Vorbestellbar",es:"Preventa",it:"Preordine",ja:"\u4E88\u7D04\u53D7\u4ED8\u4E2D",ko:"\uC608\uC57D \uD310\uB9E4",pt:"Pr\xE9-venda",ru:"\u041F\u0440\u0435\u0434\u0437\u0430\u043A\u0430\u0437",zh:"\u9884\u552E"},cardsProductWas:{en:"Was",fr:"Au lieu de",de:"Statt",es:"Antes",it:"Prima",ja:"\u901A\u5E38\u4FA1\u683C",ko:"\uC815\uAC00",pt:"De",ru:"\u0411\u044B\u043B\u043E",zh:"\u539F\u4EF7"},cardsProductFreeShipping:{en:"Free delivery",fr:"Livraison gratuite",de:"Kostenloser Versand",es:"Env\xEDo gratis",it:"Spedizione gratuita",ja:"\u9001\u6599\u7121\u6599",ko:"\uBB34\uB8CC \uBC30\uC1A1",pt:"Frete gr\xE1tis",ru:"\u0411\u0435\u0441\u043F\u043B\u0430\u0442\u043D\u0430\u044F \u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430",zh:"\u514D\u8FD0\u8D39"},cardsProductShippingCost:{en:"{price} delivery",fr:"Livraison {price}",de:"Versand {price}",es:"Env\xEDo {price}",it:"Spedizione {price}",ja:"\u9001\u6599 {price}",ko:"\uBC30\uC1A1\uBE44 {price}",pt:"Frete {price}",ru:"\u0414\u043E\u0441\u0442\u0430\u0432\u043A\u0430 {price}",zh:"\u8FD0\u8D39 {price}"},cardsProductOptions:{en:"Options",fr:"Options",de:"Optionen",es:"Opciones",it:"Opzioni",ja:"\u30AA\u30D7\u30B7\u30E7\u30F3",ko:"\uC635\uC158",pt:"Op\xE7\xF5es",ru:"\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",zh:"\u53EF\u9009\u9879"},cardsProductMoreOptions:{en:"{n} more",fr:"{n} de plus",de:"{n} weitere",es:"{n} m\xE1s",it:"altri {n}",ja:"\u307B\u304B{n}\u4EF6",ko:"{n}\uAC1C \uB354",pt:"mais {n}",ru:"\u0435\u0449\u0451 {n}",zh:"\u8FD8\u6709 {n} \u4E2A"},cardsProductMore:{en:"More options",fr:"Autres choix",de:"Weitere Angebote",es:"M\xE1s opciones",it:"Altre proposte",ja:"\u305D\u306E\u4ED6\u306E\u5019\u88DC",ko:"\uB2E4\uB978 \uC0C1\uD488",pt:"Mais op\xE7\xF5es",ru:"\u0414\u0440\u0443\u0433\u0438\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B",zh:"\u66F4\u591A\u9009\u62E9"}},J={"in-stock":"cardsProductInStock","low-stock":"cardsProductLowStock","out-of-stock":"cardsProductOutOfStock",preorder:"cardsProductPreorder"},fa=10,Z=6,T=2,d=t=>!!t&&typeof t=="object"&&!Array.isArray(t);function p(t,a){if(t){for(let e of a)if(t[e]!==void 0&&t[e]!==null)return t[e]}}function ra(t){return Array.isArray(t)?t:d(t)?Array.isArray(t.nodes)?t.nodes:Array.isArray(t.edges)?t.edges.map(a=>d(a)?a.node:void 0):[]:[]}function k(t){if(typeof t=="number")return{amount:Number.isFinite(t)&&t>=0?t:void 0};if(typeof t=="string"){let{amount:a,currency:e}=X(t);return{amount:a===void 0?void 0:Math.abs(a),currency:e}}return d(t)?{amount:k(p(t,["amount","value","price"])).amount,currency:O(p(t,["currencyCode","currency_code","currency"]))}:{}}function oa(t){if(Array.isArray(t)){for(let e of t){let r=oa(e);if(r)return r}return}if(d(t)){let e=m(p(t,["src","url","contentUrl","href","large","medium","thumbnail"])),r=l(p(t,["alt","altText","alt_text"]));return e?{src:e,...r?{alt:r}:{}}:void 0}let a=m(t);return a?{src:a}:void 0}var ma={instock:"in-stock",available:"in-stock",instoreonly:"in-stock",onlineonly:"in-stock",lowstock:"low-stock",limitedavailability:"low-stock",fewleft:"low-stock",outofstock:"out-of-stock",soldout:"out-of-stock",unavailable:"out-of-stock",discontinued:"out-of-stock",preorder:"preorder",presale:"preorder",backorder:"preorder"};function ha(t,a){let e=p(t,["availability","stockStatus","stock_status"])??p(a,["availability"]);if(typeof e=="string"&&e.trim()){let i=e.trim().toLowerCase().replace(/^(?:https?:\/\/schema\.org\/|schema:)/,"").replace(/[^a-z]/g,""),n=ma[i];return n?{status:n}:{text:e.trim()}}let r=typeof e=="boolean"?e:p(t,["inStock","in_stock","available"]);if(typeof r=="boolean")return{status:r?"in-stock":"out-of-stock"}}function va(t){let a=d(t.aggregateRating)?t.aggregateRating:void 0,e=p(t,["rating","stars","ratingValue","rating_value","averageRating","average_rating"])??p(a,["ratingValue"]),r=p(t,["reviewCount","review_count","reviews","reviewsCount","reviews_count","ratingCount","rating_count","numReviews"])??p(a,["reviewCount","ratingCount"]);d(e)&&(r??=p(e,["count","reviews"]),e=p(e,["rate","value","average"])),Array.isArray(r)&&(r=r.length);let i=g(p(t,["bestRating","best_rating"])??p(a,["bestRating"])),n=g(e),s=n!==void 0&&i!==void 0&&i>0&&n<=i?n*5/i:n,c=g(r);return{rating:s!==void 0&&s>=0&&s<=5?s:void 0,reviewCount:c!==void 0&&c>=0?Math.floor(c):void 0}}var ga="Default Title";function ba(t){let a=[],e=i=>{let n=l(i);n&&n!==ga&&!a.includes(n)&&a.push(n)},r=Array.isArray(t.options)?["options","sizes","colors","colours"]:["sizes","colors","colours","variants"];for(let i of r)for(let n of ra(t[i]))d(n)?Array.isArray(n.values)?n.values.forEach(e):e(p(n,["title","name","value","label"])):e(n);return a.slice(0,50)}function ka(t){if(t.freeShipping===!0||t.free_shipping===!0)return{cost:0};let a=p(t,["shipping","delivery","shippingInfo","shipping_info"]);if(d(a)&&(a=p(a,["text","label","description"])??p(a,["cost","price","amount"])),typeof a=="number")return Number.isFinite(a)&&a>=0?{cost:a}:void 0;let e=l(a);if(!e)return;let r=g(e);return r!==void 0&&r>=0?{cost:r}:{text:e}}function wa(t){return Array.isArray(t)?t.map(a=>{let e=d(a)?l(a.label):void 0;if(!e)return null;let r=a.url!==void 0?m(a.url):void 0;if(r===null)return null;let i=l(a.id);return!r&&!i?null:{label:e,...r?{url:r}:{},...i?{id:i}:{},...a.primary===!0?{primary:!0}:{}}}).filter(a=>a!==null).slice(0,T):[]}var ya={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:"\xA0"};function za(t){return t.replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi,(a,e)=>{if(e.startsWith("#")){let r=/^#x/i.test(e)?parseInt(e.slice(2),16):Number(e.slice(1));return r>0&&r<=1114111?String.fromCodePoint(r):a}return ya[e.toLowerCase()]??a})}function xa(t){return za(t.replace(/<\/?(?:br|p|li|div|h\d)(?=[\s/>])[^>]*>/gi," ").replace(/<[^>]*>/g,"")).replace(/\s+/g," ").trim()}function Pa(t){let a;for(let e of ra(t.variants)){if(!d(e))continue;let r=k(p(e,["price","amount"]));r.amount!==void 0&&(!a||r.amount<a.price.amount)&&(a={price:r,compare:k(p(e,["compare_at_price","compareAtPrice"]))})}return a}var aa=t=>d(t)?t.minVariantPrice:void 0;function Aa(t){if(!d(t))return null;let a=t,e=l(p(a,["title","name","productName","product_title"]));if(!e)return null;let r=a.offers,i=Array.isArray(r)?d(r[0])?r[0]:void 0:d(r)?r:void 0,n=p(a,["price","extracted_price","salePrice","sale_price","currentPrice","current_price"])??p(i,["price","lowPrice"])??aa(a.priceRange),s=n===void 0?Pa(a):void 0,c=s?s.price:k(n),f=p(a,["compareAtPrice","compare_at_price","originalPrice","original_price","listPrice","list_price","regularPrice","regular_price","wasPrice","was_price","extracted_old_price","oldPrice","old_price","msrp"])??aa(a.compareAtPriceRange),w=f===void 0&&s?s.compare:k(f),I=O(p(a,["currency","currency_code","currencyCode","priceCurrency"])??p(i,["priceCurrency"]))??c.currency??w.currency,v=p(a,["merchant","seller","store","shop","source","retailer","vendor"])??p(a,["brand"]),A=d(v)?l(p(v,["name","title"])):l(v),N=m(p(a,["merchantLogo","merchant_logo","source_icon","storeLogo","logo"])??(d(v)?p(v,["logo","icon","image"]):void 0)),$=l(p(a,["description","summary","snippet","subtitle","body_html","descriptionHtml"])),{rating:V,reviewCount:W}=va(a),F=ha(a,i),U=ka(a),H=oa(p(a,["image","images","thumbnail","image_url","imageUrl","featuredImage","photo"])),D=m(p(a,["url","link","permalink","product_link","productUrl","product_url","onlineStoreUrl","href"])??p(i,["url"])),B=l(p(a,["id","sku","product_id","productId"])),K=l(p(a,["badge","tag","ribbon"]));return{title:e,...B?{id:B}:{},...H?{image:H}:{},...c.amount!==void 0?{price:c.amount}:{},...I?{currency:I}:{},...c.amount!==void 0&&w.amount!==void 0&&w.amount>c.amount?{compareAtPrice:w.amount}:{},...V!==void 0?{rating:V}:{},...W!==void 0?{reviewCount:W}:{},...F?{availability:F}:{},...A?{merchant:A}:{},...A&&N?{merchantLogo:N}:{},...K?{badge:K}:{},options:ba(a),...U?{shipping:U}:{},...$?{description:xa($)}:{},...D?{url:D}:{},actions:wa(a.actions)}}function Oa(t){if(!t||typeof t!="object")return null;let a,e;if(Array.isArray(t))a=t;else{let i=t,n=["products","results","shopping_results","items"].map(s=>i[s]).find(Array.isArray);n?(a=n,e=l(p(i,["title","heading"]))):a=[i]}let r=a.map(Aa).filter(i=>i!==null).slice(0,fa);return r.length?{...e?{title:e}:{},products:r}:null}function Ca(t){let{price:a,compareAtPrice:e}=t;if(a===void 0||e===void 0||e<=a||e<=0)return;let r=(e-a)/e;return Math.round(r*100)>=1?r:void 0}var x=(t,a,e)=>Q(t,e,a.currency),h=t=>t!=null;function q(t,a=""){let e=o("div",{class:`aparte-product__media${a?` ${a}`:""}`},y(ca,"aparte-rich-card__glyph aparte-product__placeholder"));if(!t.image)return e.setAttribute("data-empty",""),e;let r=o("img",{class:"aparte-product__image",attrs:{src:t.image.src,alt:t.image.alt??t.title,loading:"lazy",decoding:"async",referrerpolicy:"no-referrer"}});return r.addEventListener("error",()=>{r.hidden=!0,e.setAttribute("data-empty","")},{once:!0}),e.append(r),e}function j(t){let a=o("div",{class:"aparte-product__title"});return t.url?a.append(o("a",{class:"aparte-product__link",attrs:{href:t.url,target:"_blank",rel:"noopener noreferrer"},text:t.title})):a.textContent=t.title,a}function ia(t){if(!t.merchant)return null;let a=o("div",{class:"aparte-product__merchant"});if(t.merchantLogo){let e=o("img",{class:"aparte-product__logo",attrs:{src:t.merchantLogo,alt:"",loading:"lazy",decoding:"async",referrerpolicy:"no-referrer"}});e.addEventListener("error",()=>{e.hidden=!0},{once:!0}),a.append(e)}return a.append(o("span",{class:"aparte-product__merchant-name",text:t.merchant})),a}function na(t,a){let e=Ca(a);if(e===void 0)return null;let r=o("span",{class:"aparte-badge aparte-badge--danger aparte-badge--solid aparte-badge--sm aparte-product__discount"});return t.bind(r,()=>`\u2212${Y(t.config,e)}`),r}function M(t,a,e=!1){if(a.price===void 0)return null;let r=o("div",{class:"aparte-product__price"}),i=o("span",{class:"aparte-product__now"});if(t.bind(i,()=>x(t.config,a,a.price)),r.append(i),a.compareAtPrice!==void 0){let n=o("span",{class:"aparte-sr-only"});t.bind(n,()=>`${_(t.config,"cardsProductWas",u.cardsProductWas)} `);let s=o("span",{class:"aparte-product__was-value"});t.bind(s,()=>x(t.config,a,a.compareAtPrice)),r.append(o("del",{class:"aparte-product__was"},n,s));let c=e?na(t,a):null;c&&r.append(c)}return r}function R(t,a){let e=a.availability;if(!e)return null;let r="status"in e?e.status:void 0,i=o("span",{class:"aparte-product__stock-text"});return r?t.word(i,J[r],u[J[r]]):i.textContent=e.text,o("div",{class:"aparte-product__stock",attrs:{"data-availability":r??"other"}},o("span",{class:"aparte-product__dot",attrs:{"aria-hidden":"true"}}),i)}function Sa(t,a){let e=a.shipping;if(!e)return null;let r=o("span",{class:"aparte-product__shipping-text"});return"text"in e?r.textContent=e.text:e.cost===0?t.word(r,"cardsProductFreeShipping",u.cardsProductFreeShipping):t.bind(r,()=>_(t.config,"cardsProductShippingCost",u.cardsProductShippingCost,{price:x(t.config,a,e.cost)})),o("div",{class:"aparte-product__shipping",attrs:{"data-free":"cost"in e&&e.cost===0}},y(da,"aparte-rich-card__glyph aparte-product__shipping-icon"),r)}function pa(t,a,e){let r=[a.badge?o("span",{class:"aparte-badge aparte-badge--sm aparte-product__badge",text:a.badge}):null,e?na(t,a):null].filter(h);return r.length?o("div",{class:"aparte-product__flags"},...r):null}function Ta(t,a){if(!a.options.length)return null;let e=o("ul",{class:"aparte-product__options",attrs:{role:"list"}});t.bind(e,()=>_(t.config,"cardsProductOptions",u.cardsProductOptions),"aria-label");for(let i of a.options.slice(0,Z))e.append(o("li",{class:"aparte-tag aparte-tag--sm aparte-product__option"},o("span",{class:"aparte-tag__label",text:i})));let r=a.options.length-Z;if(r>0){let i=o("span",{class:"aparte-tag__label",attrs:{"aria-hidden":"true"}});t.bind(i,()=>`+${b(t.config,r)}`);let n=o("span",{class:"aparte-sr-only"});t.bind(n,()=>_(t.config,"cardsProductMoreOptions",u.cardsProductMoreOptions,{n:b(t.config,r)})),e.append(o("li",{class:"aparte-tag aparte-tag--sm aparte-product__option aparte-product__option--more"},i,n))}return e}function E(t,a,e){let r=a.actions.slice(0,e).map(i=>t.action(i,a,"aparte-product__action")).filter(h);return r.length?o("div",{class:"aparte-product__actions"},...r):null}function L(t,a,e=""){return o("div",{class:`aparte-product aparte-product--${t}${e?` ${e}`:""}`,attrs:{"data-availability":a.availability&&"status"in a.availability?a.availability.status:void 0,"data-linked":a.url!==void 0}})}function S(t,a,{actions:e,mini:r=!1}){let i=L("tile",a,r?"aparte-product--mini":""),n=q(a),s=r?null:pa(t,a,!0);s&&n.append(s);let c=o("div",{class:"aparte-product__body"},r?null:ia(a),j(a),r?null:z(t,a.rating,{count:a.reviewCount}),M(t,a),r?null:R(t,a));i.append(n,c);let f=E(t,a,e);return f&&i.append(f),i}function ta(t,a){let e=L("row",a),r=o("div",{class:"aparte-product__meta"},a.merchant?o("span",{class:"aparte-product__merchant-name",text:a.merchant}):null,z(t,a.rating,{starsOnly:!0}),a.availability&&!("status"in a.availability&&a.availability.status==="in-stock")?R(t,a):null),i=o("div",{class:"aparte-product__main"},j(a),r.childNodes.length?r:null);e.append(q(a,"aparte-product__thumb"),i);let n=M(t,a);n&&e.append(n);let s=E(t,a,1);return s&&e.append(s),e}function qa(t,a){let e=L("detail",a),r=q(a),i=pa(t,a,!1);i&&r.append(i);let n=a.url?o("a",{class:"aparte-product__media-link",attrs:{href:a.url,target:"_blank",rel:"noopener noreferrer",tabindex:-1,"aria-hidden":"true"}},r):r,s=o("div",{class:"aparte-product__facts"},R(t,a),Sa(t,a)),c=o("div",{class:"aparte-product__body"},ia(a),j(a),z(t,a.rating,{count:a.reviewCount}),M(t,a,!0),s.childNodes.length?s:null,a.description?o("p",{class:"aparte-product__description",text:a.description}):null,Ta(t,a),E(t,a,T));return e.append(n,c),o("div",{class:"aparte-product__detail"},e)}function ea(t){return t.title?o("div",{class:"aparte-product__heading",text:t.title}):null}function sa(t,a){let e=t?.products??[];return e.length===1?e[0].title:t?.title?t.title:e.length>1?_(a.config,"cardsProductCount",u.cardsProductCount,{n:b(a.config,e.length)}):_(a.config,"cardsProductTitle",u.cardsProductTitle)}function ja(t,a){let{products:e}=t,r=e[0];if(a.variant==="detail"){let n=[qa(a,r)];if(e.length>1){let s=o("div",{class:"aparte-product__more-title"});a.word(s,"cardsProductMore",u.cardsProductMore);let c=e.slice(1).map(f=>S(a,f,{actions:0,mini:!0}));n.push(o("div",{class:"aparte-product__more"},s,C(a,c,{label:()=>_(a.config,"cardsProductMore",u.cardsProductMore)})))}return n}if(a.variant==="compact"){if(e.length===1)return[ta(a,r)];let n=o("ul",{class:"aparte-product__rows",attrs:{role:"list"}},...e.map(s=>o("li",{class:"aparte-product__item"},ta(a,s))));return[ea(t),n].filter(h)}if(e.length===1)return[S(a,r,{actions:T})];let i=e.map(n=>S(a,n,{actions:1}));return[o("div",{class:"aparte-product__collection"},ea(t),C(a,i,{label:()=>sa(t,a)}))]}function Ma(t,a){let e=(s,c="rect")=>o("span",{class:`aparte-skeleton aparte-skeleton--${c} ${s}`,attrs:{"aria-hidden":"true"}}),r=()=>[e("aparte-product__sk-line","text"),e("aparte-product__sk-line aparte-product__sk-line--short","text")],i=t?.title?o("div",{class:"aparte-product__query"},y(la,"aparte-rich-card__glyph aparte-product__query-icon"),o("span",{class:"aparte-product__query-text",text:t.title})):null;if(a.variant==="compact"){let s=[0,1,2].map(()=>o("div",{class:"aparte-product__item"},o("div",{class:"aparte-product aparte-product--row aparte-product--skeleton"},e("aparte-product__sk-thumb"),o("div",{class:"aparte-product__main"},...r()),e("aparte-product__sk-price","text"))));return[i,o("div",{class:"aparte-product__rows"},...s)].filter(h)}if(a.variant==="detail")return[i,o("div",{class:"aparte-product__detail"},o("div",{class:"aparte-product aparte-product--detail aparte-product--skeleton"},e("aparte-product__sk-media"),o("div",{class:"aparte-product__body"},...r(),e("aparte-product__sk-price","text"),e("aparte-product__sk-line","text"))))].filter(h);let n=[0,1,2].map(()=>o("div",{class:"aparte-product aparte-product--tile aparte-product--skeleton"},e("aparte-product__sk-media"),o("div",{class:"aparte-product__body"},...r(),e("aparte-product__sk-price","text"))));return[o("div",{class:"aparte-product__collection"},i,o("div",{class:"aparte-product__sk-track"},...n))]}var Ra=G({name:"product",variants:["card","compact","detail"],styles:_a,icon:ua,normalize:Oa,render:ja,skeleton:Ma,label:sa,fallback:(t,a)=>{let e=t.products.map(r=>{let i=r.price!==void 0?` \u2014 ${x(a.config,r,r.price)}`:"",n=r.rating!==void 0?` (${b(a.config,r.rating,{maximumFractionDigits:1})}/5)`:"";return`${r.title}${i}${n}`});return[t.title,...e].filter(h).join(`
675
+ `)},partial:t=>{let a=l(t.query??t.q??t.search??t.keywords??t.term??t.product);return a?{title:a}:null}});function Na(t={}){return Ra.setup(t)}export{Ca as discountOf,Ra as productCard,Oa as readProducts,Na as setupProductCard};
676
+ //# sourceMappingURL=product-FNGKWEQP.js.map