@nok-integration/storefront-react 0.17.0 → 0.17.2
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.
- package/dist/index.d.ts +943 -56
- package/dist/index.mjs +901 -701
- package/dist/standalone/storefront.mjs +901 -701
- package/dist/standalone/styles.css +1078 -581
- package/dist/styles.css +1078 -581
- package/package.json +26 -9
package/dist/index.mjs
CHANGED
|
@@ -483,18 +483,18 @@ function requireParseUtil() {
|
|
|
483
483
|
if (this.value !== "aborted")
|
|
484
484
|
this.value = "aborted";
|
|
485
485
|
}
|
|
486
|
-
static mergeArray(
|
|
486
|
+
static mergeArray(status, results) {
|
|
487
487
|
const arrayValue = [];
|
|
488
488
|
for (const s of results) {
|
|
489
489
|
if (s.status === "aborted")
|
|
490
490
|
return exports.INVALID;
|
|
491
491
|
if (s.status === "dirty")
|
|
492
|
-
|
|
492
|
+
status.dirty();
|
|
493
493
|
arrayValue.push(s.value);
|
|
494
494
|
}
|
|
495
|
-
return { status:
|
|
495
|
+
return { status: status.value, value: arrayValue };
|
|
496
496
|
}
|
|
497
|
-
static async mergeObjectAsync(
|
|
497
|
+
static async mergeObjectAsync(status, pairs) {
|
|
498
498
|
const syncPairs = [];
|
|
499
499
|
for (const pair of pairs) {
|
|
500
500
|
const key = await pair.key;
|
|
@@ -504,9 +504,9 @@ function requireParseUtil() {
|
|
|
504
504
|
value: value2
|
|
505
505
|
});
|
|
506
506
|
}
|
|
507
|
-
return ParseStatus.mergeObjectSync(
|
|
507
|
+
return ParseStatus.mergeObjectSync(status, syncPairs);
|
|
508
508
|
}
|
|
509
|
-
static mergeObjectSync(
|
|
509
|
+
static mergeObjectSync(status, pairs) {
|
|
510
510
|
const finalObject = {};
|
|
511
511
|
for (const pair of pairs) {
|
|
512
512
|
const { key, value: value2 } = pair;
|
|
@@ -515,14 +515,14 @@ function requireParseUtil() {
|
|
|
515
515
|
if (value2.status === "aborted")
|
|
516
516
|
return exports.INVALID;
|
|
517
517
|
if (key.status === "dirty")
|
|
518
|
-
|
|
518
|
+
status.dirty();
|
|
519
519
|
if (value2.status === "dirty")
|
|
520
|
-
|
|
520
|
+
status.dirty();
|
|
521
521
|
if (key.value !== "__proto__" && (typeof value2.value !== "undefined" || pair.alwaysSet)) {
|
|
522
522
|
finalObject[key.value] = value2.value;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
return { status:
|
|
525
|
+
return { status: status.value, value: finalObject };
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
528
|
exports.ParseStatus = ParseStatus;
|
|
@@ -1023,7 +1023,7 @@ function requireTypes() {
|
|
|
1023
1023
|
});
|
|
1024
1024
|
return parseUtil_js_1.INVALID;
|
|
1025
1025
|
}
|
|
1026
|
-
const
|
|
1026
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
1027
1027
|
let ctx = void 0;
|
|
1028
1028
|
for (const check of this._def.checks) {
|
|
1029
1029
|
if (check.kind === "min") {
|
|
@@ -1037,7 +1037,7 @@ function requireTypes() {
|
|
|
1037
1037
|
exact: false,
|
|
1038
1038
|
message: check.message
|
|
1039
1039
|
});
|
|
1040
|
-
|
|
1040
|
+
status.dirty();
|
|
1041
1041
|
}
|
|
1042
1042
|
} else if (check.kind === "max") {
|
|
1043
1043
|
if (input.data.length > check.value) {
|
|
@@ -1050,7 +1050,7 @@ function requireTypes() {
|
|
|
1050
1050
|
exact: false,
|
|
1051
1051
|
message: check.message
|
|
1052
1052
|
});
|
|
1053
|
-
|
|
1053
|
+
status.dirty();
|
|
1054
1054
|
}
|
|
1055
1055
|
} else if (check.kind === "length") {
|
|
1056
1056
|
const tooBig = input.data.length > check.value;
|
|
@@ -1076,7 +1076,7 @@ function requireTypes() {
|
|
|
1076
1076
|
message: check.message
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
|
|
1079
|
+
status.dirty();
|
|
1080
1080
|
}
|
|
1081
1081
|
} else if (check.kind === "email") {
|
|
1082
1082
|
if (!emailRegex.test(input.data)) {
|
|
@@ -1086,7 +1086,7 @@ function requireTypes() {
|
|
|
1086
1086
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1087
1087
|
message: check.message
|
|
1088
1088
|
});
|
|
1089
|
-
|
|
1089
|
+
status.dirty();
|
|
1090
1090
|
}
|
|
1091
1091
|
} else if (check.kind === "emoji") {
|
|
1092
1092
|
if (!emojiRegex) {
|
|
@@ -1099,7 +1099,7 @@ function requireTypes() {
|
|
|
1099
1099
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1100
1100
|
message: check.message
|
|
1101
1101
|
});
|
|
1102
|
-
|
|
1102
|
+
status.dirty();
|
|
1103
1103
|
}
|
|
1104
1104
|
} else if (check.kind === "uuid") {
|
|
1105
1105
|
if (!uuidRegex.test(input.data)) {
|
|
@@ -1109,7 +1109,7 @@ function requireTypes() {
|
|
|
1109
1109
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1110
1110
|
message: check.message
|
|
1111
1111
|
});
|
|
1112
|
-
|
|
1112
|
+
status.dirty();
|
|
1113
1113
|
}
|
|
1114
1114
|
} else if (check.kind === "nanoid") {
|
|
1115
1115
|
if (!nanoidRegex.test(input.data)) {
|
|
@@ -1119,7 +1119,7 @@ function requireTypes() {
|
|
|
1119
1119
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1120
1120
|
message: check.message
|
|
1121
1121
|
});
|
|
1122
|
-
|
|
1122
|
+
status.dirty();
|
|
1123
1123
|
}
|
|
1124
1124
|
} else if (check.kind === "cuid") {
|
|
1125
1125
|
if (!cuidRegex.test(input.data)) {
|
|
@@ -1129,7 +1129,7 @@ function requireTypes() {
|
|
|
1129
1129
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1130
1130
|
message: check.message
|
|
1131
1131
|
});
|
|
1132
|
-
|
|
1132
|
+
status.dirty();
|
|
1133
1133
|
}
|
|
1134
1134
|
} else if (check.kind === "cuid2") {
|
|
1135
1135
|
if (!cuid2Regex.test(input.data)) {
|
|
@@ -1139,7 +1139,7 @@ function requireTypes() {
|
|
|
1139
1139
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1140
1140
|
message: check.message
|
|
1141
1141
|
});
|
|
1142
|
-
|
|
1142
|
+
status.dirty();
|
|
1143
1143
|
}
|
|
1144
1144
|
} else if (check.kind === "ulid") {
|
|
1145
1145
|
if (!ulidRegex.test(input.data)) {
|
|
@@ -1149,7 +1149,7 @@ function requireTypes() {
|
|
|
1149
1149
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1150
1150
|
message: check.message
|
|
1151
1151
|
});
|
|
1152
|
-
|
|
1152
|
+
status.dirty();
|
|
1153
1153
|
}
|
|
1154
1154
|
} else if (check.kind === "url") {
|
|
1155
1155
|
try {
|
|
@@ -1161,7 +1161,7 @@ function requireTypes() {
|
|
|
1161
1161
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1162
1162
|
message: check.message
|
|
1163
1163
|
});
|
|
1164
|
-
|
|
1164
|
+
status.dirty();
|
|
1165
1165
|
}
|
|
1166
1166
|
} else if (check.kind === "regex") {
|
|
1167
1167
|
check.regex.lastIndex = 0;
|
|
@@ -1173,7 +1173,7 @@ function requireTypes() {
|
|
|
1173
1173
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1174
1174
|
message: check.message
|
|
1175
1175
|
});
|
|
1176
|
-
|
|
1176
|
+
status.dirty();
|
|
1177
1177
|
}
|
|
1178
1178
|
} else if (check.kind === "trim") {
|
|
1179
1179
|
input.data = input.data.trim();
|
|
@@ -1185,7 +1185,7 @@ function requireTypes() {
|
|
|
1185
1185
|
validation: { includes: check.value, position: check.position },
|
|
1186
1186
|
message: check.message
|
|
1187
1187
|
});
|
|
1188
|
-
|
|
1188
|
+
status.dirty();
|
|
1189
1189
|
}
|
|
1190
1190
|
} else if (check.kind === "toLowerCase") {
|
|
1191
1191
|
input.data = input.data.toLowerCase();
|
|
@@ -1199,7 +1199,7 @@ function requireTypes() {
|
|
|
1199
1199
|
validation: { startsWith: check.value },
|
|
1200
1200
|
message: check.message
|
|
1201
1201
|
});
|
|
1202
|
-
|
|
1202
|
+
status.dirty();
|
|
1203
1203
|
}
|
|
1204
1204
|
} else if (check.kind === "endsWith") {
|
|
1205
1205
|
if (!input.data.endsWith(check.value)) {
|
|
@@ -1209,7 +1209,7 @@ function requireTypes() {
|
|
|
1209
1209
|
validation: { endsWith: check.value },
|
|
1210
1210
|
message: check.message
|
|
1211
1211
|
});
|
|
1212
|
-
|
|
1212
|
+
status.dirty();
|
|
1213
1213
|
}
|
|
1214
1214
|
} else if (check.kind === "datetime") {
|
|
1215
1215
|
const regex = datetimeRegex(check);
|
|
@@ -1220,7 +1220,7 @@ function requireTypes() {
|
|
|
1220
1220
|
validation: "datetime",
|
|
1221
1221
|
message: check.message
|
|
1222
1222
|
});
|
|
1223
|
-
|
|
1223
|
+
status.dirty();
|
|
1224
1224
|
}
|
|
1225
1225
|
} else if (check.kind === "date") {
|
|
1226
1226
|
const regex = dateRegex;
|
|
@@ -1231,7 +1231,7 @@ function requireTypes() {
|
|
|
1231
1231
|
validation: "date",
|
|
1232
1232
|
message: check.message
|
|
1233
1233
|
});
|
|
1234
|
-
|
|
1234
|
+
status.dirty();
|
|
1235
1235
|
}
|
|
1236
1236
|
} else if (check.kind === "time") {
|
|
1237
1237
|
const regex = timeRegex(check);
|
|
@@ -1242,7 +1242,7 @@ function requireTypes() {
|
|
|
1242
1242
|
validation: "time",
|
|
1243
1243
|
message: check.message
|
|
1244
1244
|
});
|
|
1245
|
-
|
|
1245
|
+
status.dirty();
|
|
1246
1246
|
}
|
|
1247
1247
|
} else if (check.kind === "duration") {
|
|
1248
1248
|
if (!durationRegex.test(input.data)) {
|
|
@@ -1252,7 +1252,7 @@ function requireTypes() {
|
|
|
1252
1252
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1253
1253
|
message: check.message
|
|
1254
1254
|
});
|
|
1255
|
-
|
|
1255
|
+
status.dirty();
|
|
1256
1256
|
}
|
|
1257
1257
|
} else if (check.kind === "ip") {
|
|
1258
1258
|
if (!isValidIP(input.data, check.version)) {
|
|
@@ -1262,7 +1262,7 @@ function requireTypes() {
|
|
|
1262
1262
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1263
1263
|
message: check.message
|
|
1264
1264
|
});
|
|
1265
|
-
|
|
1265
|
+
status.dirty();
|
|
1266
1266
|
}
|
|
1267
1267
|
} else if (check.kind === "jwt") {
|
|
1268
1268
|
if (!isValidJWT(input.data, check.alg)) {
|
|
@@ -1272,7 +1272,7 @@ function requireTypes() {
|
|
|
1272
1272
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1273
1273
|
message: check.message
|
|
1274
1274
|
});
|
|
1275
|
-
|
|
1275
|
+
status.dirty();
|
|
1276
1276
|
}
|
|
1277
1277
|
} else if (check.kind === "cidr") {
|
|
1278
1278
|
if (!isValidCidr(input.data, check.version)) {
|
|
@@ -1282,7 +1282,7 @@ function requireTypes() {
|
|
|
1282
1282
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1283
1283
|
message: check.message
|
|
1284
1284
|
});
|
|
1285
|
-
|
|
1285
|
+
status.dirty();
|
|
1286
1286
|
}
|
|
1287
1287
|
} else if (check.kind === "base64") {
|
|
1288
1288
|
if (!base64Regex.test(input.data)) {
|
|
@@ -1292,7 +1292,7 @@ function requireTypes() {
|
|
|
1292
1292
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1293
1293
|
message: check.message
|
|
1294
1294
|
});
|
|
1295
|
-
|
|
1295
|
+
status.dirty();
|
|
1296
1296
|
}
|
|
1297
1297
|
} else if (check.kind === "base64url") {
|
|
1298
1298
|
if (!base64urlRegex.test(input.data)) {
|
|
@@ -1302,13 +1302,13 @@ function requireTypes() {
|
|
|
1302
1302
|
code: ZodError_js_1.ZodIssueCode.invalid_string,
|
|
1303
1303
|
message: check.message
|
|
1304
1304
|
});
|
|
1305
|
-
|
|
1305
|
+
status.dirty();
|
|
1306
1306
|
}
|
|
1307
1307
|
} else {
|
|
1308
1308
|
util_js_1.util.assertNever(check);
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
return { status:
|
|
1311
|
+
return { status: status.value, value: input.data };
|
|
1312
1312
|
}
|
|
1313
1313
|
_regex(regex, validation, message2) {
|
|
1314
1314
|
return this.refinement((data) => regex.test(data), {
|
|
@@ -1585,7 +1585,7 @@ function requireTypes() {
|
|
|
1585
1585
|
return parseUtil_js_1.INVALID;
|
|
1586
1586
|
}
|
|
1587
1587
|
let ctx = void 0;
|
|
1588
|
-
const
|
|
1588
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
1589
1589
|
for (const check of this._def.checks) {
|
|
1590
1590
|
if (check.kind === "int") {
|
|
1591
1591
|
if (!util_js_1.util.isInteger(input.data)) {
|
|
@@ -1596,7 +1596,7 @@ function requireTypes() {
|
|
|
1596
1596
|
received: "float",
|
|
1597
1597
|
message: check.message
|
|
1598
1598
|
});
|
|
1599
|
-
|
|
1599
|
+
status.dirty();
|
|
1600
1600
|
}
|
|
1601
1601
|
} else if (check.kind === "min") {
|
|
1602
1602
|
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
|
@@ -1610,7 +1610,7 @@ function requireTypes() {
|
|
|
1610
1610
|
exact: false,
|
|
1611
1611
|
message: check.message
|
|
1612
1612
|
});
|
|
1613
|
-
|
|
1613
|
+
status.dirty();
|
|
1614
1614
|
}
|
|
1615
1615
|
} else if (check.kind === "max") {
|
|
1616
1616
|
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
|
@@ -1624,7 +1624,7 @@ function requireTypes() {
|
|
|
1624
1624
|
exact: false,
|
|
1625
1625
|
message: check.message
|
|
1626
1626
|
});
|
|
1627
|
-
|
|
1627
|
+
status.dirty();
|
|
1628
1628
|
}
|
|
1629
1629
|
} else if (check.kind === "multipleOf") {
|
|
1630
1630
|
if (floatSafeRemainder(input.data, check.value) !== 0) {
|
|
@@ -1634,7 +1634,7 @@ function requireTypes() {
|
|
|
1634
1634
|
multipleOf: check.value,
|
|
1635
1635
|
message: check.message
|
|
1636
1636
|
});
|
|
1637
|
-
|
|
1637
|
+
status.dirty();
|
|
1638
1638
|
}
|
|
1639
1639
|
} else if (check.kind === "finite") {
|
|
1640
1640
|
if (!Number.isFinite(input.data)) {
|
|
@@ -1643,13 +1643,13 @@ function requireTypes() {
|
|
|
1643
1643
|
code: ZodError_js_1.ZodIssueCode.not_finite,
|
|
1644
1644
|
message: check.message
|
|
1645
1645
|
});
|
|
1646
|
-
|
|
1646
|
+
status.dirty();
|
|
1647
1647
|
}
|
|
1648
1648
|
} else {
|
|
1649
1649
|
util_js_1.util.assertNever(check);
|
|
1650
1650
|
}
|
|
1651
1651
|
}
|
|
1652
|
-
return { status:
|
|
1652
|
+
return { status: status.value, value: input.data };
|
|
1653
1653
|
}
|
|
1654
1654
|
gte(value2, message2) {
|
|
1655
1655
|
return this.setLimit("min", value2, true, errorUtil_js_1.errorUtil.toString(message2));
|
|
@@ -1815,7 +1815,7 @@ function requireTypes() {
|
|
|
1815
1815
|
return this._getInvalidInput(input);
|
|
1816
1816
|
}
|
|
1817
1817
|
let ctx = void 0;
|
|
1818
|
-
const
|
|
1818
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
1819
1819
|
for (const check of this._def.checks) {
|
|
1820
1820
|
if (check.kind === "min") {
|
|
1821
1821
|
const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;
|
|
@@ -1828,7 +1828,7 @@ function requireTypes() {
|
|
|
1828
1828
|
inclusive: check.inclusive,
|
|
1829
1829
|
message: check.message
|
|
1830
1830
|
});
|
|
1831
|
-
|
|
1831
|
+
status.dirty();
|
|
1832
1832
|
}
|
|
1833
1833
|
} else if (check.kind === "max") {
|
|
1834
1834
|
const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;
|
|
@@ -1841,7 +1841,7 @@ function requireTypes() {
|
|
|
1841
1841
|
inclusive: check.inclusive,
|
|
1842
1842
|
message: check.message
|
|
1843
1843
|
});
|
|
1844
|
-
|
|
1844
|
+
status.dirty();
|
|
1845
1845
|
}
|
|
1846
1846
|
} else if (check.kind === "multipleOf") {
|
|
1847
1847
|
if (input.data % check.value !== BigInt(0)) {
|
|
@@ -1851,13 +1851,13 @@ function requireTypes() {
|
|
|
1851
1851
|
multipleOf: check.value,
|
|
1852
1852
|
message: check.message
|
|
1853
1853
|
});
|
|
1854
|
-
|
|
1854
|
+
status.dirty();
|
|
1855
1855
|
}
|
|
1856
1856
|
} else {
|
|
1857
1857
|
util_js_1.util.assertNever(check);
|
|
1858
1858
|
}
|
|
1859
1859
|
}
|
|
1860
|
-
return { status:
|
|
1860
|
+
return { status: status.value, value: input.data };
|
|
1861
1861
|
}
|
|
1862
1862
|
_getInvalidInput(input) {
|
|
1863
1863
|
const ctx = this._getOrReturnCtx(input);
|
|
@@ -2017,7 +2017,7 @@ function requireTypes() {
|
|
|
2017
2017
|
});
|
|
2018
2018
|
return parseUtil_js_1.INVALID;
|
|
2019
2019
|
}
|
|
2020
|
-
const
|
|
2020
|
+
const status = new parseUtil_js_1.ParseStatus();
|
|
2021
2021
|
let ctx = void 0;
|
|
2022
2022
|
for (const check of this._def.checks) {
|
|
2023
2023
|
if (check.kind === "min") {
|
|
@@ -2031,7 +2031,7 @@ function requireTypes() {
|
|
|
2031
2031
|
minimum: check.value,
|
|
2032
2032
|
type: "date"
|
|
2033
2033
|
});
|
|
2034
|
-
|
|
2034
|
+
status.dirty();
|
|
2035
2035
|
}
|
|
2036
2036
|
} else if (check.kind === "max") {
|
|
2037
2037
|
if (input.data.getTime() > check.value) {
|
|
@@ -2044,14 +2044,14 @@ function requireTypes() {
|
|
|
2044
2044
|
maximum: check.value,
|
|
2045
2045
|
type: "date"
|
|
2046
2046
|
});
|
|
2047
|
-
|
|
2047
|
+
status.dirty();
|
|
2048
2048
|
}
|
|
2049
2049
|
} else {
|
|
2050
2050
|
util_js_1.util.assertNever(check);
|
|
2051
2051
|
}
|
|
2052
2052
|
}
|
|
2053
2053
|
return {
|
|
2054
|
-
status:
|
|
2054
|
+
status: status.value,
|
|
2055
2055
|
value: new Date(input.data.getTime())
|
|
2056
2056
|
};
|
|
2057
2057
|
}
|
|
@@ -2245,7 +2245,7 @@ function requireTypes() {
|
|
|
2245
2245
|
};
|
|
2246
2246
|
class ZodArray extends ZodType {
|
|
2247
2247
|
_parse(input) {
|
|
2248
|
-
const { ctx, status
|
|
2248
|
+
const { ctx, status } = this._processInputParams(input);
|
|
2249
2249
|
const def = this._def;
|
|
2250
2250
|
if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
|
|
2251
2251
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
@@ -2268,7 +2268,7 @@ function requireTypes() {
|
|
|
2268
2268
|
exact: true,
|
|
2269
2269
|
message: def.exactLength.message
|
|
2270
2270
|
});
|
|
2271
|
-
|
|
2271
|
+
status.dirty();
|
|
2272
2272
|
}
|
|
2273
2273
|
}
|
|
2274
2274
|
if (def.minLength !== null) {
|
|
@@ -2281,7 +2281,7 @@ function requireTypes() {
|
|
|
2281
2281
|
exact: false,
|
|
2282
2282
|
message: def.minLength.message
|
|
2283
2283
|
});
|
|
2284
|
-
|
|
2284
|
+
status.dirty();
|
|
2285
2285
|
}
|
|
2286
2286
|
}
|
|
2287
2287
|
if (def.maxLength !== null) {
|
|
@@ -2294,20 +2294,20 @@ function requireTypes() {
|
|
|
2294
2294
|
exact: false,
|
|
2295
2295
|
message: def.maxLength.message
|
|
2296
2296
|
});
|
|
2297
|
-
|
|
2297
|
+
status.dirty();
|
|
2298
2298
|
}
|
|
2299
2299
|
}
|
|
2300
2300
|
if (ctx.common.async) {
|
|
2301
2301
|
return Promise.all([...ctx.data].map((item2, i) => {
|
|
2302
2302
|
return def.type._parseAsync(new ParseInputLazyPath(ctx, item2, ctx.path, i));
|
|
2303
2303
|
})).then((result2) => {
|
|
2304
|
-
return parseUtil_js_1.ParseStatus.mergeArray(
|
|
2304
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, result2);
|
|
2305
2305
|
});
|
|
2306
2306
|
}
|
|
2307
2307
|
const result = [...ctx.data].map((item2, i) => {
|
|
2308
2308
|
return def.type._parseSync(new ParseInputLazyPath(ctx, item2, ctx.path, i));
|
|
2309
2309
|
});
|
|
2310
|
-
return parseUtil_js_1.ParseStatus.mergeArray(
|
|
2310
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, result);
|
|
2311
2311
|
}
|
|
2312
2312
|
get element() {
|
|
2313
2313
|
return this._def.type;
|
|
@@ -2397,7 +2397,7 @@ function requireTypes() {
|
|
|
2397
2397
|
});
|
|
2398
2398
|
return parseUtil_js_1.INVALID;
|
|
2399
2399
|
}
|
|
2400
|
-
const { status
|
|
2400
|
+
const { status, ctx } = this._processInputParams(input);
|
|
2401
2401
|
const { shape, keys: shapeKeys } = this._getCached();
|
|
2402
2402
|
const extraKeys = [];
|
|
2403
2403
|
if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === "strip")) {
|
|
@@ -2432,7 +2432,7 @@ function requireTypes() {
|
|
|
2432
2432
|
code: ZodError_js_1.ZodIssueCode.unrecognized_keys,
|
|
2433
2433
|
keys: extraKeys
|
|
2434
2434
|
});
|
|
2435
|
-
|
|
2435
|
+
status.dirty();
|
|
2436
2436
|
}
|
|
2437
2437
|
} else if (unknownKeys === "strip") ;
|
|
2438
2438
|
else {
|
|
@@ -2466,10 +2466,10 @@ function requireTypes() {
|
|
|
2466
2466
|
}
|
|
2467
2467
|
return syncPairs;
|
|
2468
2468
|
}).then((syncPairs) => {
|
|
2469
|
-
return parseUtil_js_1.ParseStatus.mergeObjectSync(
|
|
2469
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, syncPairs);
|
|
2470
2470
|
});
|
|
2471
2471
|
} else {
|
|
2472
|
-
return parseUtil_js_1.ParseStatus.mergeObjectSync(
|
|
2472
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
|
|
2473
2473
|
}
|
|
2474
2474
|
}
|
|
2475
2475
|
get shape() {
|
|
@@ -2950,7 +2950,7 @@ function requireTypes() {
|
|
|
2950
2950
|
}
|
|
2951
2951
|
class ZodIntersection extends ZodType {
|
|
2952
2952
|
_parse(input) {
|
|
2953
|
-
const { status
|
|
2953
|
+
const { status, ctx } = this._processInputParams(input);
|
|
2954
2954
|
const handleParsed = (parsedLeft, parsedRight) => {
|
|
2955
2955
|
if ((0, parseUtil_js_1.isAborted)(parsedLeft) || (0, parseUtil_js_1.isAborted)(parsedRight)) {
|
|
2956
2956
|
return parseUtil_js_1.INVALID;
|
|
@@ -2963,9 +2963,9 @@ function requireTypes() {
|
|
|
2963
2963
|
return parseUtil_js_1.INVALID;
|
|
2964
2964
|
}
|
|
2965
2965
|
if ((0, parseUtil_js_1.isDirty)(parsedLeft) || (0, parseUtil_js_1.isDirty)(parsedRight)) {
|
|
2966
|
-
|
|
2966
|
+
status.dirty();
|
|
2967
2967
|
}
|
|
2968
|
-
return { status:
|
|
2968
|
+
return { status: status.value, value: merged.data };
|
|
2969
2969
|
};
|
|
2970
2970
|
if (ctx.common.async) {
|
|
2971
2971
|
return Promise.all([
|
|
@@ -3004,7 +3004,7 @@ function requireTypes() {
|
|
|
3004
3004
|
};
|
|
3005
3005
|
class ZodTuple extends ZodType {
|
|
3006
3006
|
_parse(input) {
|
|
3007
|
-
const { status
|
|
3007
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3008
3008
|
if (ctx.parsedType !== util_js_1.ZodParsedType.array) {
|
|
3009
3009
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3010
3010
|
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
@@ -3032,7 +3032,7 @@ function requireTypes() {
|
|
|
3032
3032
|
exact: false,
|
|
3033
3033
|
type: "array"
|
|
3034
3034
|
});
|
|
3035
|
-
|
|
3035
|
+
status.dirty();
|
|
3036
3036
|
}
|
|
3037
3037
|
const items2 = [...ctx.data].map((item2, itemIndex) => {
|
|
3038
3038
|
const schema = this._def.items[itemIndex] || this._def.rest;
|
|
@@ -3042,10 +3042,10 @@ function requireTypes() {
|
|
|
3042
3042
|
}).filter((x) => !!x);
|
|
3043
3043
|
if (ctx.common.async) {
|
|
3044
3044
|
return Promise.all(items2).then((results) => {
|
|
3045
|
-
return parseUtil_js_1.ParseStatus.mergeArray(
|
|
3045
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, results);
|
|
3046
3046
|
});
|
|
3047
3047
|
} else {
|
|
3048
|
-
return parseUtil_js_1.ParseStatus.mergeArray(
|
|
3048
|
+
return parseUtil_js_1.ParseStatus.mergeArray(status, items2);
|
|
3049
3049
|
}
|
|
3050
3050
|
}
|
|
3051
3051
|
get items() {
|
|
@@ -3078,7 +3078,7 @@ function requireTypes() {
|
|
|
3078
3078
|
return this._def.valueType;
|
|
3079
3079
|
}
|
|
3080
3080
|
_parse(input) {
|
|
3081
|
-
const { status
|
|
3081
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3082
3082
|
if (ctx.parsedType !== util_js_1.ZodParsedType.object) {
|
|
3083
3083
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3084
3084
|
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
@@ -3098,9 +3098,9 @@ function requireTypes() {
|
|
|
3098
3098
|
});
|
|
3099
3099
|
}
|
|
3100
3100
|
if (ctx.common.async) {
|
|
3101
|
-
return parseUtil_js_1.ParseStatus.mergeObjectAsync(
|
|
3101
|
+
return parseUtil_js_1.ParseStatus.mergeObjectAsync(status, pairs);
|
|
3102
3102
|
} else {
|
|
3103
|
-
return parseUtil_js_1.ParseStatus.mergeObjectSync(
|
|
3103
|
+
return parseUtil_js_1.ParseStatus.mergeObjectSync(status, pairs);
|
|
3104
3104
|
}
|
|
3105
3105
|
}
|
|
3106
3106
|
get element() {
|
|
@@ -3132,7 +3132,7 @@ function requireTypes() {
|
|
|
3132
3132
|
return this._def.valueType;
|
|
3133
3133
|
}
|
|
3134
3134
|
_parse(input) {
|
|
3135
|
-
const { status
|
|
3135
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3136
3136
|
if (ctx.parsedType !== util_js_1.ZodParsedType.map) {
|
|
3137
3137
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3138
3138
|
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
@@ -3159,11 +3159,11 @@ function requireTypes() {
|
|
|
3159
3159
|
return parseUtil_js_1.INVALID;
|
|
3160
3160
|
}
|
|
3161
3161
|
if (key.status === "dirty" || value2.status === "dirty") {
|
|
3162
|
-
|
|
3162
|
+
status.dirty();
|
|
3163
3163
|
}
|
|
3164
3164
|
finalMap.set(key.value, value2.value);
|
|
3165
3165
|
}
|
|
3166
|
-
return { status:
|
|
3166
|
+
return { status: status.value, value: finalMap };
|
|
3167
3167
|
});
|
|
3168
3168
|
} else {
|
|
3169
3169
|
const finalMap = /* @__PURE__ */ new Map();
|
|
@@ -3174,11 +3174,11 @@ function requireTypes() {
|
|
|
3174
3174
|
return parseUtil_js_1.INVALID;
|
|
3175
3175
|
}
|
|
3176
3176
|
if (key.status === "dirty" || value2.status === "dirty") {
|
|
3177
|
-
|
|
3177
|
+
status.dirty();
|
|
3178
3178
|
}
|
|
3179
3179
|
finalMap.set(key.value, value2.value);
|
|
3180
3180
|
}
|
|
3181
|
-
return { status:
|
|
3181
|
+
return { status: status.value, value: finalMap };
|
|
3182
3182
|
}
|
|
3183
3183
|
}
|
|
3184
3184
|
}
|
|
@@ -3193,7 +3193,7 @@ function requireTypes() {
|
|
|
3193
3193
|
};
|
|
3194
3194
|
class ZodSet extends ZodType {
|
|
3195
3195
|
_parse(input) {
|
|
3196
|
-
const { status
|
|
3196
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3197
3197
|
if (ctx.parsedType !== util_js_1.ZodParsedType.set) {
|
|
3198
3198
|
(0, parseUtil_js_1.addIssueToContext)(ctx, {
|
|
3199
3199
|
code: ZodError_js_1.ZodIssueCode.invalid_type,
|
|
@@ -3213,7 +3213,7 @@ function requireTypes() {
|
|
|
3213
3213
|
exact: false,
|
|
3214
3214
|
message: def.minSize.message
|
|
3215
3215
|
});
|
|
3216
|
-
|
|
3216
|
+
status.dirty();
|
|
3217
3217
|
}
|
|
3218
3218
|
}
|
|
3219
3219
|
if (def.maxSize !== null) {
|
|
@@ -3226,7 +3226,7 @@ function requireTypes() {
|
|
|
3226
3226
|
exact: false,
|
|
3227
3227
|
message: def.maxSize.message
|
|
3228
3228
|
});
|
|
3229
|
-
|
|
3229
|
+
status.dirty();
|
|
3230
3230
|
}
|
|
3231
3231
|
}
|
|
3232
3232
|
const valueType = this._def.valueType;
|
|
@@ -3236,10 +3236,10 @@ function requireTypes() {
|
|
|
3236
3236
|
if (element.status === "aborted")
|
|
3237
3237
|
return parseUtil_js_1.INVALID;
|
|
3238
3238
|
if (element.status === "dirty")
|
|
3239
|
-
|
|
3239
|
+
status.dirty();
|
|
3240
3240
|
parsedSet.add(element.value);
|
|
3241
3241
|
}
|
|
3242
|
-
return { status:
|
|
3242
|
+
return { status: status.value, value: parsedSet };
|
|
3243
3243
|
}
|
|
3244
3244
|
const elements = [...ctx.data.values()].map((item2, i) => valueType._parse(new ParseInputLazyPath(ctx, item2, ctx.path, i)));
|
|
3245
3245
|
if (ctx.common.async) {
|
|
@@ -3577,15 +3577,15 @@ function requireTypes() {
|
|
|
3577
3577
|
return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
|
|
3578
3578
|
}
|
|
3579
3579
|
_parse(input) {
|
|
3580
|
-
const { status
|
|
3580
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3581
3581
|
const effect = this._def.effect || null;
|
|
3582
3582
|
const checkCtx = {
|
|
3583
3583
|
addIssue: (arg) => {
|
|
3584
3584
|
(0, parseUtil_js_1.addIssueToContext)(ctx, arg);
|
|
3585
3585
|
if (arg.fatal) {
|
|
3586
|
-
|
|
3586
|
+
status.abort();
|
|
3587
3587
|
} else {
|
|
3588
|
-
|
|
3588
|
+
status.dirty();
|
|
3589
3589
|
}
|
|
3590
3590
|
},
|
|
3591
3591
|
get path() {
|
|
@@ -3597,7 +3597,7 @@ function requireTypes() {
|
|
|
3597
3597
|
const processed = effect.transform(ctx.data, checkCtx);
|
|
3598
3598
|
if (ctx.common.async) {
|
|
3599
3599
|
return Promise.resolve(processed).then(async (processed2) => {
|
|
3600
|
-
if (
|
|
3600
|
+
if (status.value === "aborted")
|
|
3601
3601
|
return parseUtil_js_1.INVALID;
|
|
3602
3602
|
const result = await this._def.schema._parseAsync({
|
|
3603
3603
|
data: processed2,
|
|
@@ -3608,12 +3608,12 @@ function requireTypes() {
|
|
|
3608
3608
|
return parseUtil_js_1.INVALID;
|
|
3609
3609
|
if (result.status === "dirty")
|
|
3610
3610
|
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3611
|
-
if (
|
|
3611
|
+
if (status.value === "dirty")
|
|
3612
3612
|
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3613
3613
|
return result;
|
|
3614
3614
|
});
|
|
3615
3615
|
} else {
|
|
3616
|
-
if (
|
|
3616
|
+
if (status.value === "aborted")
|
|
3617
3617
|
return parseUtil_js_1.INVALID;
|
|
3618
3618
|
const result = this._def.schema._parseSync({
|
|
3619
3619
|
data: processed,
|
|
@@ -3624,7 +3624,7 @@ function requireTypes() {
|
|
|
3624
3624
|
return parseUtil_js_1.INVALID;
|
|
3625
3625
|
if (result.status === "dirty")
|
|
3626
3626
|
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3627
|
-
if (
|
|
3627
|
+
if (status.value === "dirty")
|
|
3628
3628
|
return (0, parseUtil_js_1.DIRTY)(result.value);
|
|
3629
3629
|
return result;
|
|
3630
3630
|
}
|
|
@@ -3649,17 +3649,17 @@ function requireTypes() {
|
|
|
3649
3649
|
if (inner2.status === "aborted")
|
|
3650
3650
|
return parseUtil_js_1.INVALID;
|
|
3651
3651
|
if (inner2.status === "dirty")
|
|
3652
|
-
|
|
3652
|
+
status.dirty();
|
|
3653
3653
|
executeRefinement(inner2.value);
|
|
3654
|
-
return { status:
|
|
3654
|
+
return { status: status.value, value: inner2.value };
|
|
3655
3655
|
} else {
|
|
3656
3656
|
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner2) => {
|
|
3657
3657
|
if (inner2.status === "aborted")
|
|
3658
3658
|
return parseUtil_js_1.INVALID;
|
|
3659
3659
|
if (inner2.status === "dirty")
|
|
3660
|
-
|
|
3660
|
+
status.dirty();
|
|
3661
3661
|
return executeRefinement(inner2.value).then(() => {
|
|
3662
|
-
return { status:
|
|
3662
|
+
return { status: status.value, value: inner2.value };
|
|
3663
3663
|
});
|
|
3664
3664
|
});
|
|
3665
3665
|
}
|
|
@@ -3677,13 +3677,13 @@ function requireTypes() {
|
|
|
3677
3677
|
if (result instanceof Promise) {
|
|
3678
3678
|
throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);
|
|
3679
3679
|
}
|
|
3680
|
-
return { status:
|
|
3680
|
+
return { status: status.value, value: result };
|
|
3681
3681
|
} else {
|
|
3682
3682
|
return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {
|
|
3683
3683
|
if (!(0, parseUtil_js_1.isValid)(base))
|
|
3684
3684
|
return parseUtil_js_1.INVALID;
|
|
3685
3685
|
return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({
|
|
3686
|
-
status:
|
|
3686
|
+
status: status.value,
|
|
3687
3687
|
value: result
|
|
3688
3688
|
}));
|
|
3689
3689
|
});
|
|
@@ -3870,7 +3870,7 @@ function requireTypes() {
|
|
|
3870
3870
|
types.ZodBranded = ZodBranded;
|
|
3871
3871
|
class ZodPipeline extends ZodType {
|
|
3872
3872
|
_parse(input) {
|
|
3873
|
-
const { status
|
|
3873
|
+
const { status, ctx } = this._processInputParams(input);
|
|
3874
3874
|
if (ctx.common.async) {
|
|
3875
3875
|
const handleAsync = async () => {
|
|
3876
3876
|
const inResult = await this._def.in._parseAsync({
|
|
@@ -3881,7 +3881,7 @@ function requireTypes() {
|
|
|
3881
3881
|
if (inResult.status === "aborted")
|
|
3882
3882
|
return parseUtil_js_1.INVALID;
|
|
3883
3883
|
if (inResult.status === "dirty") {
|
|
3884
|
-
|
|
3884
|
+
status.dirty();
|
|
3885
3885
|
return (0, parseUtil_js_1.DIRTY)(inResult.value);
|
|
3886
3886
|
} else {
|
|
3887
3887
|
return this._def.out._parseAsync({
|
|
@@ -3901,7 +3901,7 @@ function requireTypes() {
|
|
|
3901
3901
|
if (inResult.status === "aborted")
|
|
3902
3902
|
return parseUtil_js_1.INVALID;
|
|
3903
3903
|
if (inResult.status === "dirty") {
|
|
3904
|
-
|
|
3904
|
+
status.dirty();
|
|
3905
3905
|
return {
|
|
3906
3906
|
status: "dirty",
|
|
3907
3907
|
value: inResult.value
|
|
@@ -4252,7 +4252,7 @@ function requireCatalog() {
|
|
|
4252
4252
|
hasRequiredCatalog = 1;
|
|
4253
4253
|
(function(exports) {
|
|
4254
4254
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4255
|
-
exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.ProductPromo = exports.ProductVariant = void 0;
|
|
4255
|
+
exports.CatalogReadQuery = exports.ListProductsQuery = exports.RecommendationsResponse = exports.ProductListResponse = exports.Product = exports.SizeGuide = exports.SizeGuideMeasurement = exports.SizeChartUnit = exports.ProductPromo = exports.ProductVariant = void 0;
|
|
4256
4256
|
const zod_1 = /* @__PURE__ */ requireZod();
|
|
4257
4257
|
const money_1 = requireMoney();
|
|
4258
4258
|
const common_1 = requireCommon();
|
|
@@ -4276,12 +4276,40 @@ function requireCatalog() {
|
|
|
4276
4276
|
/** ISO-8601 end time that drives the countdown; absent = show the message, no timer. */
|
|
4277
4277
|
ends_at: common_1.Timestamp.optional()
|
|
4278
4278
|
});
|
|
4279
|
+
exports.SizeChartUnit = zod_1.z.enum(["cm", "in"]);
|
|
4280
|
+
exports.SizeGuideMeasurement = zod_1.z.object({
|
|
4281
|
+
/** e.g. "Chest width". */
|
|
4282
|
+
label: zod_1.z.string().min(1),
|
|
4283
|
+
/** e.g. "Measured 2.5 cm below the armhole, garment flat." */
|
|
4284
|
+
description: zod_1.z.string().min(1)
|
|
4285
|
+
});
|
|
4279
4286
|
exports.SizeGuide = zod_1.z.object({
|
|
4280
4287
|
title: zod_1.z.string(),
|
|
4281
|
-
/**
|
|
4288
|
+
/** The fit this chart is for, e.g. "Oversized hoodies and zip-ups · Unisex". */
|
|
4289
|
+
subtitle: zod_1.z.string().min(1).optional(),
|
|
4290
|
+
/**
|
|
4291
|
+
* Column headings for `rows`, e.g. `['Size', 'Chest', 'Length']`.
|
|
4292
|
+
*
|
|
4293
|
+
* Bare nouns, with no unit in the heading: the unit belongs to the whole chart and is
|
|
4294
|
+
* named by `unit`, so that a consumer converting to the other unit does not leave
|
|
4295
|
+
* "Chest (cm)" written above a column of inches.
|
|
4296
|
+
*/
|
|
4282
4297
|
columns: zod_1.z.array(zod_1.z.string()).optional(),
|
|
4283
4298
|
/** One row per size; each row's length matches `columns`. */
|
|
4284
4299
|
rows: zod_1.z.array(zod_1.z.array(zod_1.z.string())).optional(),
|
|
4300
|
+
/**
|
|
4301
|
+
* The unit `rows` are written in.
|
|
4302
|
+
*
|
|
4303
|
+
* Absent means the numbers carry no declared unit — a consumer must then show them as
|
|
4304
|
+
* they are and offer no conversion, because it has nothing to convert from.
|
|
4305
|
+
*/
|
|
4306
|
+
unit: exports.SizeChartUnit.optional(),
|
|
4307
|
+
/** The line under the table, e.g. "All measurements are taken from the garment laid flat, not from the body." */
|
|
4308
|
+
note: zod_1.z.string().min(1).optional(),
|
|
4309
|
+
/** The "How to measure" list. Absent/empty = the section is not drawn. */
|
|
4310
|
+
measurements: zod_1.z.array(exports.SizeGuideMeasurement).optional(),
|
|
4311
|
+
/** The fabric line, e.g. "100% cotton · 220–240 GSM · Oversized fit · Sizes XS–XL". */
|
|
4312
|
+
fabric: zod_1.z.string().min(1).optional(),
|
|
4285
4313
|
/** Free-text fit guidance, e.g. "Relaxed, slightly oversized fit". */
|
|
4286
4314
|
notes: zod_1.z.array(zod_1.z.string()).optional()
|
|
4287
4315
|
});
|
|
@@ -4336,7 +4364,7 @@ function requireContent() {
|
|
|
4336
4364
|
hasRequiredContent = 1;
|
|
4337
4365
|
(function(exports) {
|
|
4338
4366
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4339
|
-
exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
|
|
4367
|
+
exports.HomeContent = exports.HomeSlide = exports.CategoryPage = exports.CategoryBlock = exports.ProductGalleryBlock = exports.ExploreBlock = exports.WhyUsBlock = exports.ReviewBlock = exports.GridBlock = exports.LifestyleImageBlock = exports.FeaturedBlock = exports.LifestyleTextBlock = exports.RailBlock = exports.CategoryHero = void 0;
|
|
4340
4368
|
const zod_1 = /* @__PURE__ */ requireZod();
|
|
4341
4369
|
const common_1 = requireCommon();
|
|
4342
4370
|
const catalog_1 = requireCatalog();
|
|
@@ -4366,7 +4394,7 @@ function requireContent() {
|
|
|
4366
4394
|
});
|
|
4367
4395
|
exports.GridBlock = zod_1.z.object({
|
|
4368
4396
|
kind: zod_1.z.literal("grid"),
|
|
4369
|
-
title: zod_1.z.string(),
|
|
4397
|
+
title: zod_1.z.string().min(1).optional(),
|
|
4370
4398
|
products: zod_1.z.array(catalog_1.Product)
|
|
4371
4399
|
});
|
|
4372
4400
|
exports.ReviewBlock = zod_1.z.object({
|
|
@@ -4387,10 +4415,16 @@ function requireContent() {
|
|
|
4387
4415
|
title: zod_1.z.string(),
|
|
4388
4416
|
links: zod_1.z.array(zod_1.z.object({ label: zod_1.z.string(), code: zod_1.z.string() })).min(1)
|
|
4389
4417
|
});
|
|
4418
|
+
exports.ProductGalleryBlock = zod_1.z.object({
|
|
4419
|
+
kind: zod_1.z.literal("product_gallery"),
|
|
4420
|
+
title: zod_1.z.string().min(1),
|
|
4421
|
+
product: catalog_1.Product
|
|
4422
|
+
});
|
|
4390
4423
|
exports.CategoryBlock = zod_1.z.discriminatedUnion("kind", [
|
|
4391
4424
|
exports.RailBlock,
|
|
4392
4425
|
exports.LifestyleTextBlock,
|
|
4393
4426
|
exports.FeaturedBlock,
|
|
4427
|
+
exports.ProductGalleryBlock,
|
|
4394
4428
|
exports.LifestyleImageBlock,
|
|
4395
4429
|
exports.GridBlock,
|
|
4396
4430
|
exports.ReviewBlock,
|
|
@@ -4702,6 +4736,12 @@ function requireOrders() {
|
|
|
4702
4736
|
* never used to price, and never shown on a picking list.
|
|
4703
4737
|
*/
|
|
4704
4738
|
customer_ref: zod_1.z.string().min(1),
|
|
4739
|
+
/**
|
|
4740
|
+
* The fan's own name, for support and the order queue. Optional, and absent on every
|
|
4741
|
+
* order placed before DAZN began sending it — the surfaces fall back to the recipient's
|
|
4742
|
+
* name rather than showing a blank, which is what they did for all of them until now.
|
|
4743
|
+
*/
|
|
4744
|
+
name: zod_1.z.string().min(1).optional(),
|
|
4705
4745
|
/**
|
|
4706
4746
|
* For carrier despatch notifications only. Optional because not every market's carrier
|
|
4707
4747
|
* takes one, and an address is what actually ships the parcel.
|
|
@@ -5098,10 +5138,10 @@ function requireClient() {
|
|
|
5098
5138
|
code;
|
|
5099
5139
|
requestId;
|
|
5100
5140
|
body;
|
|
5101
|
-
constructor(
|
|
5102
|
-
super(parsed?.error.message ?? `DAZN API error (HTTP ${
|
|
5141
|
+
constructor(status, parsed) {
|
|
5142
|
+
super(parsed?.error.message ?? `DAZN API error (HTTP ${status})`);
|
|
5103
5143
|
this.name = "DaznApiError";
|
|
5104
|
-
this.status =
|
|
5144
|
+
this.status = status;
|
|
5105
5145
|
this.code = parsed?.error.code;
|
|
5106
5146
|
this.requestId = parsed?.request_id;
|
|
5107
5147
|
this.body = parsed?.error;
|
|
@@ -5540,7 +5580,7 @@ const neutral$1 = "_neutral_1bagf_12";
|
|
|
5540
5580
|
const success$1 = "_success_1bagf_17";
|
|
5541
5581
|
const critical$1 = "_critical_1bagf_22";
|
|
5542
5582
|
const promo = "_promo_1bagf_27";
|
|
5543
|
-
const styles$
|
|
5583
|
+
const styles$K = {
|
|
5544
5584
|
badge: badge$4,
|
|
5545
5585
|
neutral: neutral$1,
|
|
5546
5586
|
success: success$1,
|
|
@@ -5548,7 +5588,7 @@ const styles$I = {
|
|
|
5548
5588
|
promo
|
|
5549
5589
|
};
|
|
5550
5590
|
function Badge({ tone = "neutral", children }) {
|
|
5551
|
-
return /* @__PURE__ */ jsx("span", { className: [styles$
|
|
5591
|
+
return /* @__PURE__ */ jsx("span", { className: [styles$K.badge, styles$K[tone]].join(" "), children });
|
|
5552
5592
|
}
|
|
5553
5593
|
const button$1 = "_button_tdhm8_1";
|
|
5554
5594
|
const fullWidth = "_fullWidth_tdhm8_25";
|
|
@@ -5557,7 +5597,7 @@ const secondary = "_secondary_tdhm8_34";
|
|
|
5557
5597
|
const ghost = "_ghost_tdhm8_40";
|
|
5558
5598
|
const spinner = "_spinner_tdhm8_62";
|
|
5559
5599
|
const spin = "_spin_tdhm8_62";
|
|
5560
|
-
const styles$
|
|
5600
|
+
const styles$J = {
|
|
5561
5601
|
button: button$1,
|
|
5562
5602
|
fullWidth,
|
|
5563
5603
|
primary,
|
|
@@ -5583,23 +5623,23 @@ const Button = forwardRef(function Button2({
|
|
|
5583
5623
|
ref,
|
|
5584
5624
|
type,
|
|
5585
5625
|
className: [
|
|
5586
|
-
styles$
|
|
5587
|
-
styles$
|
|
5588
|
-
fullWidth2 ? styles$
|
|
5626
|
+
styles$J.button,
|
|
5627
|
+
styles$J[variant],
|
|
5628
|
+
fullWidth2 ? styles$J.fullWidth : "",
|
|
5589
5629
|
className ?? ""
|
|
5590
5630
|
].filter(Boolean).join(" "),
|
|
5591
5631
|
disabled: isDisabled,
|
|
5592
5632
|
"aria-busy": loading || void 0,
|
|
5593
5633
|
...rest,
|
|
5594
5634
|
children: [
|
|
5595
|
-
loading && /* @__PURE__ */ jsx("span", { className: styles$
|
|
5635
|
+
loading && /* @__PURE__ */ jsx("span", { className: styles$J.spinner, "aria-hidden": "true" }),
|
|
5596
5636
|
/* @__PURE__ */ jsx("span", { children })
|
|
5597
5637
|
]
|
|
5598
5638
|
}
|
|
5599
5639
|
);
|
|
5600
5640
|
});
|
|
5601
5641
|
const skeleton = "_skeleton_1nxz7_1";
|
|
5602
|
-
const styles$
|
|
5642
|
+
const styles$I = {
|
|
5603
5643
|
skeleton
|
|
5604
5644
|
};
|
|
5605
5645
|
function Skeleton({ width, height, radius, className, circle }) {
|
|
@@ -5612,14 +5652,14 @@ function Skeleton({ width, height, radius, className, circle }) {
|
|
|
5612
5652
|
"span",
|
|
5613
5653
|
{
|
|
5614
5654
|
"aria-hidden": "true",
|
|
5615
|
-
className: [styles$
|
|
5655
|
+
className: [styles$I.skeleton, className ?? ""].filter(Boolean).join(" "),
|
|
5616
5656
|
style
|
|
5617
5657
|
}
|
|
5618
5658
|
);
|
|
5619
5659
|
}
|
|
5620
5660
|
const surface$1 = "_surface_cfqo9_10";
|
|
5621
5661
|
const fill = "_fill_cfqo9_35";
|
|
5622
|
-
const styles$
|
|
5662
|
+
const styles$H = {
|
|
5623
5663
|
surface: surface$1,
|
|
5624
5664
|
fill
|
|
5625
5665
|
};
|
|
@@ -5660,7 +5700,7 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
5660
5700
|
...rest,
|
|
5661
5701
|
ref: attach,
|
|
5662
5702
|
"data-shop-theme": tone,
|
|
5663
|
-
className: [styles$
|
|
5703
|
+
className: [styles$H.surface, fill2 ? styles$H.fill : "", className ?? ""].filter(Boolean).join(" "),
|
|
5664
5704
|
children
|
|
5665
5705
|
}
|
|
5666
5706
|
);
|
|
@@ -5668,17 +5708,17 @@ const ShopSurface = forwardRef(function ShopSurface2({ tone, fill: fill2 = false
|
|
|
5668
5708
|
const root$6 = "_root_ney0g_1";
|
|
5669
5709
|
const inner = "_inner_ney0g_6";
|
|
5670
5710
|
const media$3 = "_media_ney0g_20";
|
|
5671
|
-
const lines$
|
|
5711
|
+
const lines$2 = "_lines_ney0g_32";
|
|
5672
5712
|
const lineWide = "_lineWide_ney0g_41";
|
|
5673
5713
|
const lineMid = "_lineMid_ney0g_45";
|
|
5674
5714
|
const lineNarrow = "_lineNarrow_ney0g_49";
|
|
5675
5715
|
const row$8 = "_row_ney0g_53";
|
|
5676
5716
|
const action$2 = "_action_ney0g_57";
|
|
5677
|
-
const styles$
|
|
5717
|
+
const styles$G = {
|
|
5678
5718
|
root: root$6,
|
|
5679
5719
|
inner,
|
|
5680
5720
|
media: media$3,
|
|
5681
|
-
lines: lines$
|
|
5721
|
+
lines: lines$2,
|
|
5682
5722
|
lineWide,
|
|
5683
5723
|
lineMid,
|
|
5684
5724
|
lineNarrow,
|
|
@@ -5686,34 +5726,38 @@ const styles$E = {
|
|
|
5686
5726
|
action: action$2
|
|
5687
5727
|
};
|
|
5688
5728
|
function ScreenSkeleton({ tone, shape = "media" }) {
|
|
5689
|
-
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$
|
|
5690
|
-
/* @__PURE__ */ jsx(Skeleton, { className: styles$
|
|
5691
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
5692
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$
|
|
5693
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5694
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$
|
|
5729
|
+
return /* @__PURE__ */ jsx(ShopSurface, { tone, fill: true, className: styles$G.root, children: /* @__PURE__ */ jsx("div", { className: styles$G.inner, role: "status", "aria-label": "Loading", children: shape === "media" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5730
|
+
/* @__PURE__ */ jsx(Skeleton, { className: styles$G.media }),
|
|
5731
|
+
/* @__PURE__ */ jsxs("div", { className: styles$G.lines, children: [
|
|
5732
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 22, className: styles$G.lineWide }),
|
|
5733
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$G.lineMid }),
|
|
5734
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 16, className: styles$G.lineNarrow })
|
|
5695
5735
|
] }),
|
|
5696
|
-
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$
|
|
5697
|
-
] }) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
5698
|
-
}
|
|
5699
|
-
const root$5 = "
|
|
5700
|
-
const icon$4 = "
|
|
5701
|
-
const
|
|
5702
|
-
const
|
|
5703
|
-
const
|
|
5704
|
-
const
|
|
5736
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8, className: styles$G.action })
|
|
5737
|
+
] }) : /* @__PURE__ */ jsx("div", { className: styles$G.lines, children: [0, 1, 2, 3].map((i) => /* @__PURE__ */ jsx(Skeleton, { height: 72, className: styles$G.row }, i)) }) }) });
|
|
5738
|
+
}
|
|
5739
|
+
const root$5 = "_root_ryf3q_6";
|
|
5740
|
+
const icon$4 = "_icon_ryf3q_15";
|
|
5741
|
+
const text$5 = "_text_ryf3q_21";
|
|
5742
|
+
const title$j = "_title_ryf3q_35";
|
|
5743
|
+
const body$6 = "_body_ryf3q_40";
|
|
5744
|
+
const action$1 = "_action_ryf3q_48";
|
|
5745
|
+
const styles$F = {
|
|
5705
5746
|
root: root$5,
|
|
5706
5747
|
icon: icon$4,
|
|
5748
|
+
text: text$5,
|
|
5707
5749
|
title: title$j,
|
|
5708
|
-
body: body$
|
|
5750
|
+
body: body$6,
|
|
5709
5751
|
action: action$1
|
|
5710
5752
|
};
|
|
5711
5753
|
function EmptyState({ title: title2, body: body2, action: action2, icon: icon2 }) {
|
|
5712
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5713
|
-
icon2 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
5714
|
-
/* @__PURE__ */
|
|
5715
|
-
|
|
5716
|
-
|
|
5754
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$F.root, role: "status", children: [
|
|
5755
|
+
icon2 && /* @__PURE__ */ jsx("div", { className: styles$F.icon, children: icon2 }),
|
|
5756
|
+
/* @__PURE__ */ jsxs("div", { className: styles$F.text, children: [
|
|
5757
|
+
/* @__PURE__ */ jsx("h2", { className: styles$F.title, children: title2 }),
|
|
5758
|
+
body2 && /* @__PURE__ */ jsx("p", { className: styles$F.body, children: body2 })
|
|
5759
|
+
] }),
|
|
5760
|
+
action2 && /* @__PURE__ */ jsx("div", { className: styles$F.action, children: action2 })
|
|
5717
5761
|
] });
|
|
5718
5762
|
}
|
|
5719
5763
|
const TREATMENTS = {
|
|
@@ -5851,18 +5895,18 @@ function isDuplicateOrder(err) {
|
|
|
5851
5895
|
}
|
|
5852
5896
|
const root$4 = "_root_1lbpx_1";
|
|
5853
5897
|
const title$i = "_title_1lbpx_10";
|
|
5854
|
-
const body$
|
|
5855
|
-
const styles$
|
|
5898
|
+
const body$5 = "_body_1lbpx_15";
|
|
5899
|
+
const styles$E = {
|
|
5856
5900
|
root: root$4,
|
|
5857
5901
|
title: title$i,
|
|
5858
|
-
body: body$
|
|
5902
|
+
body: body$5
|
|
5859
5903
|
};
|
|
5860
5904
|
function ErrorState({ code, title: title2, body: body2, onRetry, retryLabel }) {
|
|
5861
5905
|
const treatment = treatmentFor(code);
|
|
5862
5906
|
const showRetry = Boolean(onRetry) && treatment.retriable;
|
|
5863
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
5864
|
-
/* @__PURE__ */ jsx("h2", { className: styles$
|
|
5865
|
-
/* @__PURE__ */ jsx("p", { className: styles$
|
|
5907
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$E.root, role: "alert", children: [
|
|
5908
|
+
/* @__PURE__ */ jsx("h2", { className: styles$E.title, children: title2 ?? treatment.title }),
|
|
5909
|
+
/* @__PURE__ */ jsx("p", { className: styles$E.body, children: body2 ?? treatment.body }),
|
|
5866
5910
|
showRetry && /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: onRetry, children: retryLabel ?? "Try again" })
|
|
5867
5911
|
] });
|
|
5868
5912
|
}
|
|
@@ -5882,9 +5926,9 @@ const STATUS_TONE = {
|
|
|
5882
5926
|
cancelled: "critical",
|
|
5883
5927
|
refunded: "critical"
|
|
5884
5928
|
};
|
|
5885
|
-
function StatusBadge({ status
|
|
5886
|
-
const tone = STATUS_TONE[
|
|
5887
|
-
const label2 = STATUS_LABEL[
|
|
5929
|
+
function StatusBadge({ status }) {
|
|
5930
|
+
const tone = STATUS_TONE[status] ?? "neutral";
|
|
5931
|
+
const label2 = STATUS_LABEL[status] ?? status;
|
|
5888
5932
|
return /* @__PURE__ */ jsx(Badge, { tone, children: label2 });
|
|
5889
5933
|
}
|
|
5890
5934
|
const viewport = "_viewport_5aafz_14";
|
|
@@ -5899,9 +5943,9 @@ const success = "_success_5aafz_163";
|
|
|
5899
5943
|
const critical = "_critical_5aafz_168";
|
|
5900
5944
|
const rich = "_rich_5aafz_183";
|
|
5901
5945
|
const description = "_description_5aafz_198";
|
|
5902
|
-
const thumb$
|
|
5946
|
+
const thumb$1 = "_thumb_5aafz_216";
|
|
5903
5947
|
const thumbImage = "_thumbImage_5aafz_227";
|
|
5904
|
-
const styles$
|
|
5948
|
+
const styles$D = {
|
|
5905
5949
|
viewport,
|
|
5906
5950
|
anchor,
|
|
5907
5951
|
caret,
|
|
@@ -5914,7 +5958,7 @@ const styles$B = {
|
|
|
5914
5958
|
critical,
|
|
5915
5959
|
rich,
|
|
5916
5960
|
description,
|
|
5917
|
-
thumb: thumb$
|
|
5961
|
+
thumb: thumb$1,
|
|
5918
5962
|
thumbImage
|
|
5919
5963
|
};
|
|
5920
5964
|
const ToastContext = createContext(null);
|
|
@@ -6011,35 +6055,35 @@ function ToastProvider({ children }) {
|
|
|
6011
6055
|
const api = useMemo(() => ({ show }), [show]);
|
|
6012
6056
|
return /* @__PURE__ */ jsxs(ToastContext.Provider, { value: api, children: [
|
|
6013
6057
|
children,
|
|
6014
|
-
/* @__PURE__ */ jsx("div", { className: styles$
|
|
6058
|
+
/* @__PURE__ */ jsx("div", { className: styles$D.viewport, ref: viewportRef, "aria-live": "polite", "aria-atomic": "false", children: toasts.map((t) => {
|
|
6015
6059
|
const rich2 = Boolean(t.description || t.image);
|
|
6016
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6017
|
-
t.anchor === "cart" && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6060
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$D.anchor, children: [
|
|
6061
|
+
t.anchor === "cart" && /* @__PURE__ */ jsx("span", { className: styles$D.caret, children: /* @__PURE__ */ jsx(Caret, {}) }),
|
|
6018
6062
|
/* @__PURE__ */ jsxs(
|
|
6019
6063
|
"div",
|
|
6020
6064
|
{
|
|
6021
|
-
className: [styles$
|
|
6065
|
+
className: [styles$D.toast, rich2 ? styles$D.rich : styles$D[t.tone]].join(" "),
|
|
6022
6066
|
role: "status",
|
|
6023
6067
|
children: [
|
|
6024
|
-
t.image && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6068
|
+
t.image && /* @__PURE__ */ jsx("span", { className: styles$D.thumb, children: /* @__PURE__ */ jsx(
|
|
6025
6069
|
ShopImage,
|
|
6026
6070
|
{
|
|
6027
6071
|
src: t.image,
|
|
6028
6072
|
alt: "",
|
|
6029
6073
|
fill: true,
|
|
6030
6074
|
sizes: "40px",
|
|
6031
|
-
className: styles$
|
|
6075
|
+
className: styles$D.thumbImage
|
|
6032
6076
|
}
|
|
6033
6077
|
) }),
|
|
6034
|
-
/* @__PURE__ */ jsxs("span", { className: styles$
|
|
6035
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6036
|
-
t.description && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6078
|
+
/* @__PURE__ */ jsxs("span", { className: styles$D.text, children: [
|
|
6079
|
+
/* @__PURE__ */ jsx("span", { className: styles$D.message, children: t.message }),
|
|
6080
|
+
t.description && /* @__PURE__ */ jsx("span", { className: styles$D.description, children: t.description })
|
|
6037
6081
|
] }),
|
|
6038
6082
|
t.action && /* @__PURE__ */ jsx(
|
|
6039
6083
|
"button",
|
|
6040
6084
|
{
|
|
6041
6085
|
type: "button",
|
|
6042
|
-
className: styles$
|
|
6086
|
+
className: styles$D.action,
|
|
6043
6087
|
onClick: () => {
|
|
6044
6088
|
t.action?.onAction();
|
|
6045
6089
|
dismiss(t.id);
|
|
@@ -6102,13 +6146,13 @@ function useLocale(override) {
|
|
|
6102
6146
|
}
|
|
6103
6147
|
const badge$3 = "_badge_156ya_2";
|
|
6104
6148
|
const icon$3 = "_icon_156ya_18";
|
|
6105
|
-
const styles$
|
|
6149
|
+
const styles$C = {
|
|
6106
6150
|
badge: badge$3,
|
|
6107
6151
|
icon: icon$3
|
|
6108
6152
|
};
|
|
6109
6153
|
function SaleBadge({ pct }) {
|
|
6110
|
-
return /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6111
|
-
/* @__PURE__ */ jsxs("svg", { className: styles$
|
|
6154
|
+
return /* @__PURE__ */ jsxs("span", { className: styles$C.badge, children: [
|
|
6155
|
+
/* @__PURE__ */ jsxs("svg", { className: styles$C.icon, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: [
|
|
6112
6156
|
/* @__PURE__ */ jsx(
|
|
6113
6157
|
"path",
|
|
6114
6158
|
{
|
|
@@ -6131,17 +6175,17 @@ const end = "_end_n3nm5_14";
|
|
|
6131
6175
|
const sm = "_sm_n3nm5_21";
|
|
6132
6176
|
const md = "_md_n3nm5_24";
|
|
6133
6177
|
const lg = "_lg_n3nm5_27";
|
|
6134
|
-
const price$
|
|
6178
|
+
const price$2 = "_price_n3nm5_31";
|
|
6135
6179
|
const compareAt = "_compareAt_n3nm5_36";
|
|
6136
6180
|
const strikethrough = "_strikethrough_n3nm5_44";
|
|
6137
|
-
const styles$
|
|
6181
|
+
const styles$B = {
|
|
6138
6182
|
root: root$3,
|
|
6139
6183
|
center: center$1,
|
|
6140
6184
|
end,
|
|
6141
6185
|
sm,
|
|
6142
6186
|
md,
|
|
6143
6187
|
lg,
|
|
6144
|
-
price: price$
|
|
6188
|
+
price: price$2,
|
|
6145
6189
|
compareAt,
|
|
6146
6190
|
strikethrough
|
|
6147
6191
|
};
|
|
@@ -6156,15 +6200,130 @@ function PriceBlock({
|
|
|
6156
6200
|
const { format } = useMoney();
|
|
6157
6201
|
const pct = discountPct$1 ?? discountPct(price2, compareAt2);
|
|
6158
6202
|
const hasCompare = compareAt2 && compareAt2.amount > price2.amount;
|
|
6159
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6160
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6161
|
-
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6203
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$B.root, styles$B[size], styles$B[align], styles$B[variant]].join(" "), children: [
|
|
6204
|
+
/* @__PURE__ */ jsx("span", { className: styles$B.price, children: format(price2) }),
|
|
6205
|
+
hasCompare && /* @__PURE__ */ jsxs("span", { className: styles$B.compareAt, children: [
|
|
6162
6206
|
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(compareAt2)}` }),
|
|
6163
6207
|
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(compareAt2) })
|
|
6164
6208
|
] }),
|
|
6165
6209
|
hasCompare && variant === "badge" && pct !== void 0 && /* @__PURE__ */ jsx(SaleBadge, { pct })
|
|
6166
6210
|
] });
|
|
6167
6211
|
}
|
|
6212
|
+
const timeline = "_timeline_1cum7_7";
|
|
6213
|
+
const row$7 = "_row_1cum7_15";
|
|
6214
|
+
const line$1 = "_line_1cum7_20";
|
|
6215
|
+
const marker = "_marker_1cum7_27";
|
|
6216
|
+
const tick = "_tick_1cum7_35";
|
|
6217
|
+
const pending$2 = "_pending_1cum7_44";
|
|
6218
|
+
const connector = "_connector_1cum7_68";
|
|
6219
|
+
const text$3 = "_text_1cum7_84";
|
|
6220
|
+
const label$1 = "_label_1cum7_101";
|
|
6221
|
+
const past = "_past_1cum7_113";
|
|
6222
|
+
const current = "_current_1cum7_118";
|
|
6223
|
+
const future = "_future_1cum7_133";
|
|
6224
|
+
const date$1 = "_date_1cum7_138";
|
|
6225
|
+
const styles$A = {
|
|
6226
|
+
timeline,
|
|
6227
|
+
row: row$7,
|
|
6228
|
+
line: line$1,
|
|
6229
|
+
marker,
|
|
6230
|
+
tick,
|
|
6231
|
+
pending: pending$2,
|
|
6232
|
+
connector,
|
|
6233
|
+
text: text$3,
|
|
6234
|
+
label: label$1,
|
|
6235
|
+
past,
|
|
6236
|
+
current,
|
|
6237
|
+
future,
|
|
6238
|
+
date: date$1
|
|
6239
|
+
};
|
|
6240
|
+
function OrderTimeline({
|
|
6241
|
+
progress: progress2,
|
|
6242
|
+
estimatedDelivery,
|
|
6243
|
+
locale: localeProp
|
|
6244
|
+
}) {
|
|
6245
|
+
const locale = useLocale(localeProp);
|
|
6246
|
+
const currentIndex = progress2.findIndex((e) => e.current);
|
|
6247
|
+
return /* @__PURE__ */ jsx("ol", { className: styles$A.timeline, children: progress2.map((entry, i) => {
|
|
6248
|
+
const state = stateOf(entry, i, currentIndex);
|
|
6249
|
+
const estimate = !entry.at && i === progress2.length - 1 && estimatedDelivery ? formatWindow(estimatedDelivery, locale) : void 0;
|
|
6250
|
+
return /* @__PURE__ */ jsxs(
|
|
6251
|
+
"li",
|
|
6252
|
+
{
|
|
6253
|
+
className: styles$A.row,
|
|
6254
|
+
"aria-current": entry.current ? "step" : void 0,
|
|
6255
|
+
children: [
|
|
6256
|
+
/* @__PURE__ */ jsxs("div", { className: styles$A.line, children: [
|
|
6257
|
+
/* @__PURE__ */ jsx("span", { className: styles$A.marker, children: state === "future" ? /* @__PURE__ */ jsx("span", { className: styles$A.pending, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(StepTick, { tone: state }) }),
|
|
6258
|
+
/* @__PURE__ */ jsxs("span", { className: styles$A.text, children: [
|
|
6259
|
+
/* @__PURE__ */ jsx("span", { className: [styles$A.label, styles$A[state]].join(" "), children: entry.label }),
|
|
6260
|
+
entry.at ? /* @__PURE__ */ jsx("time", { className: styles$A.date, dateTime: entry.at, children: formatStepDate(entry.at, locale) }) : estimate && /* @__PURE__ */ jsx("span", { className: styles$A.date, children: estimate })
|
|
6261
|
+
] })
|
|
6262
|
+
] }),
|
|
6263
|
+
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$A.connector, "aria-hidden": "true" })
|
|
6264
|
+
]
|
|
6265
|
+
},
|
|
6266
|
+
entry.step
|
|
6267
|
+
);
|
|
6268
|
+
}) });
|
|
6269
|
+
}
|
|
6270
|
+
function stateOf(entry, index, currentIndex) {
|
|
6271
|
+
if (entry.current) return "current";
|
|
6272
|
+
if (currentIndex === -1) return entry.at ? "past" : "future";
|
|
6273
|
+
return index < currentIndex ? "past" : "future";
|
|
6274
|
+
}
|
|
6275
|
+
function StepTick({ tone }) {
|
|
6276
|
+
return /* @__PURE__ */ jsxs(
|
|
6277
|
+
"svg",
|
|
6278
|
+
{
|
|
6279
|
+
className: styles$A.tick,
|
|
6280
|
+
width: "28",
|
|
6281
|
+
height: "28",
|
|
6282
|
+
viewBox: "0 0 28 28",
|
|
6283
|
+
fill: "none",
|
|
6284
|
+
"aria-hidden": "true",
|
|
6285
|
+
children: [
|
|
6286
|
+
/* @__PURE__ */ jsx(
|
|
6287
|
+
"path",
|
|
6288
|
+
{
|
|
6289
|
+
d: "M14 1C21.1797 1 27 6.8203 27 14C27 21.1797 21.1797 27 14 27C6.8203 27 1 21.1797 1 14C1 6.8203 6.8203 1 14 1Z",
|
|
6290
|
+
fill: "#F9FAFA",
|
|
6291
|
+
stroke: "#F9FAFA",
|
|
6292
|
+
strokeWidth: "2"
|
|
6293
|
+
}
|
|
6294
|
+
),
|
|
6295
|
+
/* @__PURE__ */ jsx(
|
|
6296
|
+
"path",
|
|
6297
|
+
{
|
|
6298
|
+
d: "M13.9943 26C12.3436 26 10.7913 25.6856 9.33743 25.0568C7.89115 24.4356 6.61903 23.5758 5.52106 22.4773C4.4231 21.3788 3.55987 20.1061 2.93138 18.6591C2.31046 17.2045 2 15.6515 2 14C2 12.3409 2.31046 10.7879 2.93138 9.34091C3.55987 7.88636 4.4231 6.60985 5.52106 5.51136C6.61903 4.41288 7.89115 3.55303 9.33743 2.93182C10.7913 2.31061 12.3436 2 13.9943 2C15.6526 2 17.2049 2.31061 18.6512 2.93182C20.1051 3.55303 21.381 4.41288 22.4789 5.51136C23.5769 6.60985 24.4363 7.88636 25.0573 9.34091C25.6858 10.7879 26 12.3409 26 14C26 15.6515 25.6858 17.2045 25.0573 18.6591C24.4363 20.1061 23.5769 21.3788 22.4789 22.4773C21.381 23.5758 20.1051 24.4356 18.6512 25.0568C17.2049 25.6856 15.6526 26 13.9943 26ZM12.7449 19.6932C12.9948 19.6932 13.222 19.6364 13.4264 19.5227C13.6384 19.4015 13.8202 19.2311 13.9716 19.0114L19.2532 10.9432C19.3441 10.7992 19.416 10.6515 19.469 10.5C19.5296 10.3485 19.5599 10.2008 19.5599 10.0568C19.5599 9.70833 19.4274 9.42045 19.1623 9.19318C18.9049 8.96591 18.6058 8.85227 18.265 8.85227C17.8183 8.85227 17.4434 9.0947 17.1406 9.57955L12.7222 16.6136L10.7345 14.1818C10.5831 13.9924 10.424 13.8561 10.2575 13.7727C10.0984 13.6894 9.91292 13.6477 9.7009 13.6477C9.36015 13.6477 9.06484 13.7727 8.81495 14.0227C8.56507 14.2652 8.44013 14.5606 8.44013 14.9091C8.44013 15.0758 8.47042 15.2348 8.531 15.3864C8.59158 15.5379 8.68623 15.6932 8.81495 15.8523L11.4728 19.0341C11.6545 19.2538 11.8476 19.4205 12.0521 19.5341C12.2565 19.6402 12.4875 19.6932 12.7449 19.6932Z",
|
|
6299
|
+
fill: tone === "current" ? "#0C161C" : "#B3B9BB"
|
|
6300
|
+
}
|
|
6301
|
+
)
|
|
6302
|
+
]
|
|
6303
|
+
}
|
|
6304
|
+
);
|
|
6305
|
+
}
|
|
6306
|
+
function formatStepDate(iso, locale) {
|
|
6307
|
+
const date2 = new Date(iso);
|
|
6308
|
+
const weekday = date2.toLocaleDateString(locale, { weekday: "long" });
|
|
6309
|
+
const dayMonth = date2.toLocaleDateString(locale, { day: "numeric", month: "short" });
|
|
6310
|
+
return `${weekday}, ${dayMonth}`;
|
|
6311
|
+
}
|
|
6312
|
+
function formatWindow(window2, locale) {
|
|
6313
|
+
const from = new Date(window2.from);
|
|
6314
|
+
const to = new Date(window2.to);
|
|
6315
|
+
const utc = { timeZone: "UTC" };
|
|
6316
|
+
const weekday = from.toLocaleDateString(locale, { weekday: "long", ...utc });
|
|
6317
|
+
const dayMonth = (d) => d.toLocaleDateString(locale, { day: "numeric", month: "short", ...utc });
|
|
6318
|
+
const sameDay = from.getUTCFullYear() === to.getUTCFullYear() && from.getUTCMonth() === to.getUTCMonth() && from.getUTCDate() === to.getUTCDate();
|
|
6319
|
+
if (sameDay) return `${weekday}, ${dayMonth(from)}`;
|
|
6320
|
+
if (from.getUTCMonth() !== to.getUTCMonth()) {
|
|
6321
|
+
return `${weekday} ${dayMonth(from)} - ${dayMonth(to)}`;
|
|
6322
|
+
}
|
|
6323
|
+
const day = (d) => d.toLocaleDateString(locale, { day: "numeric", ...utc });
|
|
6324
|
+
const month = new Intl.DateTimeFormat(locale, { month: "short", ...utc }).formatToParts(from).find((part) => part.type === "month")?.value;
|
|
6325
|
+
return month ? `${weekday} ${day(from)}-${day(to)} ${month}` : `${weekday} ${dayMonth(from)} - ${dayMonth(to)}`;
|
|
6326
|
+
}
|
|
6168
6327
|
const COLOUR_KEYS = ["colour", "color"];
|
|
6169
6328
|
function colourKeyOf(variants) {
|
|
6170
6329
|
return COLOUR_KEYS.find((k) => variants.some((v) => k in v.attributes)) ?? null;
|
|
@@ -6250,110 +6409,15 @@ const SWATCH_HEX = {
|
|
|
6250
6409
|
green: "#147e4a",
|
|
6251
6410
|
beige: "#e8e0d2"
|
|
6252
6411
|
};
|
|
6253
|
-
function swatchColour(
|
|
6254
|
-
return SWATCH_HEX[
|
|
6255
|
-
}
|
|
6256
|
-
const timeline = "_timeline_1cum7_7";
|
|
6257
|
-
const row$7 = "_row_1cum7_15";
|
|
6258
|
-
const line$2 = "_line_1cum7_20";
|
|
6259
|
-
const marker = "_marker_1cum7_27";
|
|
6260
|
-
const tick = "_tick_1cum7_35";
|
|
6261
|
-
const pending$2 = "_pending_1cum7_44";
|
|
6262
|
-
const connector = "_connector_1cum7_68";
|
|
6263
|
-
const text$3 = "_text_1cum7_84";
|
|
6264
|
-
const label$1 = "_label_1cum7_101";
|
|
6265
|
-
const past = "_past_1cum7_113";
|
|
6266
|
-
const current = "_current_1cum7_118";
|
|
6267
|
-
const future = "_future_1cum7_133";
|
|
6268
|
-
const date$1 = "_date_1cum7_138";
|
|
6269
|
-
const styles$y = {
|
|
6270
|
-
timeline,
|
|
6271
|
-
row: row$7,
|
|
6272
|
-
line: line$2,
|
|
6273
|
-
marker,
|
|
6274
|
-
tick,
|
|
6275
|
-
pending: pending$2,
|
|
6276
|
-
connector,
|
|
6277
|
-
text: text$3,
|
|
6278
|
-
label: label$1,
|
|
6279
|
-
past,
|
|
6280
|
-
current,
|
|
6281
|
-
future,
|
|
6282
|
-
date: date$1
|
|
6283
|
-
};
|
|
6284
|
-
function OrderTimeline({ progress: progress2, locale: localeProp }) {
|
|
6285
|
-
const locale = useLocale(localeProp);
|
|
6286
|
-
const currentIndex = progress2.findIndex((e) => e.current);
|
|
6287
|
-
return /* @__PURE__ */ jsx("ol", { className: styles$y.timeline, children: progress2.map((entry, i) => {
|
|
6288
|
-
const state = stateOf(entry, i, currentIndex);
|
|
6289
|
-
return /* @__PURE__ */ jsxs(
|
|
6290
|
-
"li",
|
|
6291
|
-
{
|
|
6292
|
-
className: styles$y.row,
|
|
6293
|
-
"aria-current": entry.current ? "step" : void 0,
|
|
6294
|
-
children: [
|
|
6295
|
-
/* @__PURE__ */ jsxs("div", { className: styles$y.line, children: [
|
|
6296
|
-
/* @__PURE__ */ jsx("span", { className: styles$y.marker, children: state === "future" ? /* @__PURE__ */ jsx("span", { className: styles$y.pending, "aria-hidden": "true" }) : /* @__PURE__ */ jsx(StepTick, { tone: state }) }),
|
|
6297
|
-
/* @__PURE__ */ jsxs("span", { className: styles$y.text, children: [
|
|
6298
|
-
/* @__PURE__ */ jsx("span", { className: [styles$y.label, styles$y[state]].join(" "), children: entry.label }),
|
|
6299
|
-
entry.at && /* @__PURE__ */ jsx("time", { className: styles$y.date, dateTime: entry.at, children: formatStepDate(entry.at, locale) })
|
|
6300
|
-
] })
|
|
6301
|
-
] }),
|
|
6302
|
-
i < progress2.length - 1 && /* @__PURE__ */ jsx("span", { className: styles$y.connector, "aria-hidden": "true" })
|
|
6303
|
-
]
|
|
6304
|
-
},
|
|
6305
|
-
entry.step
|
|
6306
|
-
);
|
|
6307
|
-
}) });
|
|
6308
|
-
}
|
|
6309
|
-
function stateOf(entry, index, currentIndex) {
|
|
6310
|
-
if (entry.current) return "current";
|
|
6311
|
-
if (currentIndex === -1) return entry.at ? "past" : "future";
|
|
6312
|
-
return index < currentIndex ? "past" : "future";
|
|
6313
|
-
}
|
|
6314
|
-
function StepTick({ tone }) {
|
|
6315
|
-
return /* @__PURE__ */ jsxs(
|
|
6316
|
-
"svg",
|
|
6317
|
-
{
|
|
6318
|
-
className: styles$y.tick,
|
|
6319
|
-
width: "28",
|
|
6320
|
-
height: "28",
|
|
6321
|
-
viewBox: "0 0 28 28",
|
|
6322
|
-
fill: "none",
|
|
6323
|
-
"aria-hidden": "true",
|
|
6324
|
-
children: [
|
|
6325
|
-
/* @__PURE__ */ jsx(
|
|
6326
|
-
"path",
|
|
6327
|
-
{
|
|
6328
|
-
d: "M14 1C21.1797 1 27 6.8203 27 14C27 21.1797 21.1797 27 14 27C6.8203 27 1 21.1797 1 14C1 6.8203 6.8203 1 14 1Z",
|
|
6329
|
-
fill: "#F9FAFA",
|
|
6330
|
-
stroke: "#F9FAFA",
|
|
6331
|
-
strokeWidth: "2"
|
|
6332
|
-
}
|
|
6333
|
-
),
|
|
6334
|
-
/* @__PURE__ */ jsx(
|
|
6335
|
-
"path",
|
|
6336
|
-
{
|
|
6337
|
-
d: "M13.9943 26C12.3436 26 10.7913 25.6856 9.33743 25.0568C7.89115 24.4356 6.61903 23.5758 5.52106 22.4773C4.4231 21.3788 3.55987 20.1061 2.93138 18.6591C2.31046 17.2045 2 15.6515 2 14C2 12.3409 2.31046 10.7879 2.93138 9.34091C3.55987 7.88636 4.4231 6.60985 5.52106 5.51136C6.61903 4.41288 7.89115 3.55303 9.33743 2.93182C10.7913 2.31061 12.3436 2 13.9943 2C15.6526 2 17.2049 2.31061 18.6512 2.93182C20.1051 3.55303 21.381 4.41288 22.4789 5.51136C23.5769 6.60985 24.4363 7.88636 25.0573 9.34091C25.6858 10.7879 26 12.3409 26 14C26 15.6515 25.6858 17.2045 25.0573 18.6591C24.4363 20.1061 23.5769 21.3788 22.4789 22.4773C21.381 23.5758 20.1051 24.4356 18.6512 25.0568C17.2049 25.6856 15.6526 26 13.9943 26ZM12.7449 19.6932C12.9948 19.6932 13.222 19.6364 13.4264 19.5227C13.6384 19.4015 13.8202 19.2311 13.9716 19.0114L19.2532 10.9432C19.3441 10.7992 19.416 10.6515 19.469 10.5C19.5296 10.3485 19.5599 10.2008 19.5599 10.0568C19.5599 9.70833 19.4274 9.42045 19.1623 9.19318C18.9049 8.96591 18.6058 8.85227 18.265 8.85227C17.8183 8.85227 17.4434 9.0947 17.1406 9.57955L12.7222 16.6136L10.7345 14.1818C10.5831 13.9924 10.424 13.8561 10.2575 13.7727C10.0984 13.6894 9.91292 13.6477 9.7009 13.6477C9.36015 13.6477 9.06484 13.7727 8.81495 14.0227C8.56507 14.2652 8.44013 14.5606 8.44013 14.9091C8.44013 15.0758 8.47042 15.2348 8.531 15.3864C8.59158 15.5379 8.68623 15.6932 8.81495 15.8523L11.4728 19.0341C11.6545 19.2538 11.8476 19.4205 12.0521 19.5341C12.2565 19.6402 12.4875 19.6932 12.7449 19.6932Z",
|
|
6338
|
-
fill: tone === "current" ? "#0C161C" : "#B3B9BB"
|
|
6339
|
-
}
|
|
6340
|
-
)
|
|
6341
|
-
]
|
|
6342
|
-
}
|
|
6343
|
-
);
|
|
6344
|
-
}
|
|
6345
|
-
function formatStepDate(iso, locale) {
|
|
6346
|
-
const date2 = new Date(iso);
|
|
6347
|
-
const weekday = date2.toLocaleDateString(locale, { weekday: "long" });
|
|
6348
|
-
const dayMonth = date2.toLocaleDateString(locale, { day: "numeric", month: "short" });
|
|
6349
|
-
return `${weekday}, ${dayMonth}`;
|
|
6412
|
+
function swatchColour(name2) {
|
|
6413
|
+
return SWATCH_HEX[name2.toLowerCase().trim()] ?? "#c9cdd0";
|
|
6350
6414
|
}
|
|
6351
6415
|
const summary = "_summary_1hsxt_2";
|
|
6352
6416
|
const row$6 = "_row_1hsxt_16";
|
|
6353
6417
|
const free = "_free_1hsxt_53";
|
|
6354
6418
|
const pending$1 = "_pending_1hsxt_59";
|
|
6355
6419
|
const discount = "_discount_1hsxt_69";
|
|
6356
|
-
const styles$
|
|
6420
|
+
const styles$z = {
|
|
6357
6421
|
summary,
|
|
6358
6422
|
row: row$6,
|
|
6359
6423
|
free,
|
|
@@ -6377,102 +6441,185 @@ function OrderSummary({
|
|
|
6377
6441
|
const isDeferred = (key) => deferred.includes(key);
|
|
6378
6442
|
const anyDeferred = deferred.length > 0;
|
|
6379
6443
|
const visible = rows.filter((row2) => !hidden.includes(row2.key)).filter((row2) => row2.key !== "total" || !anyDeferred).filter((row2) => row2.key !== "discount" || discount2 !== void 0);
|
|
6380
|
-
return /* @__PURE__ */ jsx("dl", { className: styles$
|
|
6444
|
+
return /* @__PURE__ */ jsx("dl", { className: styles$z.summary, children: visible.map(({ label: label2, key }) => {
|
|
6381
6445
|
if (key === "discount" && discount2) {
|
|
6382
|
-
return /* @__PURE__ */ jsxs("div", { className: [styles$
|
|
6446
|
+
return /* @__PURE__ */ jsxs("div", { className: [styles$z.row, styles$z.discount].join(" "), children: [
|
|
6383
6447
|
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6384
6448
|
/* @__PURE__ */ jsx("dd", { children: `−${format(discount2)}` })
|
|
6385
6449
|
] }, key);
|
|
6386
6450
|
}
|
|
6387
6451
|
const pending2 = key !== "total" && isDeferred(key);
|
|
6388
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6452
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$z.row, children: [
|
|
6389
6453
|
/* @__PURE__ */ jsx("dt", { children: label2 }),
|
|
6390
|
-
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$
|
|
6454
|
+
/* @__PURE__ */ jsx("dd", { className: pending2 ? styles$z.pending : void 0, children: pending2 ? "Calculated at checkout" : renderValue(key, pricing, format) })
|
|
6391
6455
|
] }, key);
|
|
6392
6456
|
}) });
|
|
6393
6457
|
}
|
|
6394
6458
|
function renderValue(key, pricing, format) {
|
|
6395
6459
|
if (key === "shipping" && pricing.shipping.amount === 0) {
|
|
6396
|
-
return /* @__PURE__ */ jsx("span", { className: styles$
|
|
6460
|
+
return /* @__PURE__ */ jsx("span", { className: styles$z.free, children: "Free" });
|
|
6397
6461
|
}
|
|
6398
6462
|
return key === "discount" ? null : format(pricing[key]);
|
|
6399
6463
|
}
|
|
6400
|
-
const
|
|
6401
|
-
const
|
|
6402
|
-
const
|
|
6403
|
-
const
|
|
6404
|
-
const
|
|
6405
|
-
const
|
|
6406
|
-
const
|
|
6407
|
-
const
|
|
6408
|
-
const
|
|
6409
|
-
const
|
|
6410
|
-
const
|
|
6411
|
-
const
|
|
6412
|
-
const
|
|
6413
|
-
const
|
|
6414
|
-
const
|
|
6415
|
-
const
|
|
6416
|
-
const
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
const lineTitle$1 = "_lineTitle_1eqkm_189";
|
|
6421
|
-
const lineDetails = "_lineDetails_1eqkm_197";
|
|
6422
|
-
const linePrice$1 = "_linePrice_1eqkm_205";
|
|
6423
|
-
const details$1 = "_details_1eqkm_215";
|
|
6424
|
-
const detailBlock = "_detailBlock_1eqkm_228";
|
|
6425
|
-
const payment = "_payment_1eqkm_235";
|
|
6426
|
-
const detailLabel = "_detailLabel_1eqkm_239";
|
|
6427
|
-
const detailValue = "_detailValue_1eqkm_245";
|
|
6428
|
-
const last4 = "_last4_1eqkm_256";
|
|
6429
|
-
const brand = "_brand_1eqkm_262";
|
|
6430
|
-
const divider$2 = "_divider_1eqkm_268";
|
|
6431
|
-
const summaryCard$1 = "_summaryCard_1eqkm_275";
|
|
6432
|
-
const styles$w = {
|
|
6433
|
-
page: page$3,
|
|
6434
|
-
status,
|
|
6435
|
-
widget,
|
|
6436
|
-
title: title$h,
|
|
6437
|
-
headline: headline$1,
|
|
6438
|
-
subtitle: subtitle$4,
|
|
6439
|
-
dot: dot$3,
|
|
6440
|
-
trackButton,
|
|
6441
|
-
srOnly,
|
|
6442
|
-
itemsCard,
|
|
6443
|
-
cardHeader,
|
|
6444
|
-
cardTitle: cardTitle$1,
|
|
6445
|
-
count: count$1,
|
|
6446
|
-
lines: lines$2,
|
|
6447
|
-
line: line$1,
|
|
6448
|
-
thumb: thumb$1,
|
|
6464
|
+
const lines$1 = "_lines_7mr8w_19";
|
|
6465
|
+
const line = "_line_7mr8w_19";
|
|
6466
|
+
const thumb = "_thumb_7mr8w_34";
|
|
6467
|
+
const image$9 = "_image_7mr8w_44";
|
|
6468
|
+
const placeholder$6 = "_placeholder_7mr8w_48";
|
|
6469
|
+
const lineBody = "_lineBody_7mr8w_53";
|
|
6470
|
+
const lineText = "_lineText_7mr8w_62";
|
|
6471
|
+
const lineTitle = "_lineTitle_7mr8w_72";
|
|
6472
|
+
const lineMeta = "_lineMeta_7mr8w_91";
|
|
6473
|
+
const linePrice = "_linePrice_7mr8w_106";
|
|
6474
|
+
const paid$1 = "_paid_7mr8w_118";
|
|
6475
|
+
const was$2 = "_was_7mr8w_124";
|
|
6476
|
+
const card$2 = "_card_7mr8w_144";
|
|
6477
|
+
const cardTitle = "_cardTitle_7mr8w_152";
|
|
6478
|
+
const cardBody = "_cardBody_7mr8w_164";
|
|
6479
|
+
const summaryCard = "_summaryCard_7mr8w_136";
|
|
6480
|
+
const styles$y = {
|
|
6481
|
+
lines: lines$1,
|
|
6482
|
+
line,
|
|
6483
|
+
thumb,
|
|
6449
6484
|
image: image$9,
|
|
6450
6485
|
placeholder: placeholder$6,
|
|
6451
|
-
lineBody
|
|
6452
|
-
lineText
|
|
6453
|
-
lineTitle
|
|
6454
|
-
|
|
6455
|
-
linePrice
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
brand,
|
|
6463
|
-
divider: divider$2,
|
|
6464
|
-
summaryCard: summaryCard$1
|
|
6486
|
+
lineBody,
|
|
6487
|
+
lineText,
|
|
6488
|
+
lineTitle,
|
|
6489
|
+
lineMeta,
|
|
6490
|
+
linePrice,
|
|
6491
|
+
paid: paid$1,
|
|
6492
|
+
was: was$2,
|
|
6493
|
+
card: card$2,
|
|
6494
|
+
cardTitle,
|
|
6495
|
+
cardBody,
|
|
6496
|
+
summaryCard
|
|
6465
6497
|
};
|
|
6466
|
-
const SUMMARY_ROWS
|
|
6498
|
+
const SUMMARY_ROWS = [
|
|
6467
6499
|
{ label: "Subtotal", key: "subtotal" },
|
|
6468
|
-
{ label: "
|
|
6500
|
+
{ label: "Discount", key: "discount" },
|
|
6469
6501
|
{ label: "Shipping", key: "shipping" },
|
|
6470
6502
|
{ label: "Total", key: "total" }
|
|
6471
6503
|
];
|
|
6504
|
+
function OrderLine({ item: item2 }) {
|
|
6505
|
+
const { format } = useMoney();
|
|
6506
|
+
const compareAt2 = item2.compare_at_unit_price;
|
|
6507
|
+
const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
|
|
6508
|
+
const details2 = detailsOf(item2);
|
|
6509
|
+
return /* @__PURE__ */ jsxs("li", { className: styles$y.line, children: [
|
|
6510
|
+
/* @__PURE__ */ jsx("div", { className: styles$y.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$y.image }) : /* @__PURE__ */ jsx("div", { className: styles$y.placeholder, "aria-hidden": "true" }) }),
|
|
6511
|
+
/* @__PURE__ */ jsxs("div", { className: styles$y.lineBody, children: [
|
|
6512
|
+
/* @__PURE__ */ jsxs("div", { className: styles$y.lineText, children: [
|
|
6513
|
+
/* @__PURE__ */ jsx("span", { className: styles$y.lineTitle, children: item2.title ?? item2.sku }),
|
|
6514
|
+
/* @__PURE__ */ jsxs("span", { className: styles$y.lineMeta, children: [
|
|
6515
|
+
details2.map((detail2) => /* @__PURE__ */ jsx("span", { children: detail2 }, detail2)),
|
|
6516
|
+
pct !== void 0 && /* @__PURE__ */ jsx(SaleBadge, { pct })
|
|
6517
|
+
] })
|
|
6518
|
+
] }),
|
|
6519
|
+
/* @__PURE__ */ jsxs("span", { className: styles$y.linePrice, children: [
|
|
6520
|
+
/* @__PURE__ */ jsx("span", { className: styles$y.paid, children: format(item2.line_total) }),
|
|
6521
|
+
compareAt2 && /* @__PURE__ */ jsxs("span", { className: styles$y.was, children: [
|
|
6522
|
+
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(compareAt2)}` }),
|
|
6523
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(compareAt2) })
|
|
6524
|
+
] })
|
|
6525
|
+
] })
|
|
6526
|
+
] })
|
|
6527
|
+
] });
|
|
6528
|
+
}
|
|
6529
|
+
function OrderLines({ order }) {
|
|
6530
|
+
return /* @__PURE__ */ jsx("ul", { className: styles$y.lines, "aria-label": "Items", children: order.items.map((item2) => /* @__PURE__ */ jsx(OrderLine, { item: item2 }, item2.line_ref)) });
|
|
6531
|
+
}
|
|
6532
|
+
function ShippingAddressCard({ order }) {
|
|
6533
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$y.card, "aria-label": "Shipping address", children: [
|
|
6534
|
+
/* @__PURE__ */ jsx("h2", { className: styles$y.cardTitle, children: "Shipping address" }),
|
|
6535
|
+
/* @__PURE__ */ jsx("p", { className: styles$y.cardBody, children: formatAddress(order.ship_to) })
|
|
6536
|
+
] });
|
|
6537
|
+
}
|
|
6538
|
+
function OrderSummaryCard({ order }) {
|
|
6539
|
+
return /* @__PURE__ */ jsxs("section", { className: [styles$y.card, styles$y.summaryCard].join(" "), "aria-label": "Order summary", children: [
|
|
6540
|
+
/* @__PURE__ */ jsx("h2", { className: styles$y.cardTitle, children: "Order summary" }),
|
|
6541
|
+
/* @__PURE__ */ jsx(OrderSummary, { pricing: toPricing(order), rows: rowsFor(order), discount: order.totals.discount })
|
|
6542
|
+
] });
|
|
6543
|
+
}
|
|
6544
|
+
function detailsOf(item2) {
|
|
6545
|
+
const pairs = variantPairs(item2.attributes).map((p) => `${p.label}: ${p.value}`);
|
|
6546
|
+
return item2.qty > 1 ? [...pairs, `Qty: ${item2.qty}`] : pairs;
|
|
6547
|
+
}
|
|
6548
|
+
function rowsFor(order) {
|
|
6549
|
+
if (order.totals.tax.amount === 0) return SUMMARY_ROWS;
|
|
6550
|
+
return SUMMARY_ROWS.flatMap(
|
|
6551
|
+
(row2) => row2.key === "shipping" ? [row2, { label: "Tax", key: "tax" }] : [row2]
|
|
6552
|
+
);
|
|
6553
|
+
}
|
|
6554
|
+
function toPricing(order) {
|
|
6555
|
+
return {
|
|
6556
|
+
subtotal: order.totals.items,
|
|
6557
|
+
shipping: order.totals.shipping,
|
|
6558
|
+
tax: order.totals.tax,
|
|
6559
|
+
total: order.totals.grand_total
|
|
6560
|
+
};
|
|
6561
|
+
}
|
|
6562
|
+
function formatAddress(address) {
|
|
6563
|
+
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6564
|
+
}
|
|
6565
|
+
const page$3 = "_page_1vg5x_8";
|
|
6566
|
+
const widget = "_widget_1vg5x_18";
|
|
6567
|
+
const titleRow = "_titleRow_1vg5x_26";
|
|
6568
|
+
const headline$1 = "_headline_1vg5x_42";
|
|
6569
|
+
const track$5 = "_track_1vg5x_61";
|
|
6570
|
+
const rule = "_rule_1vg5x_86";
|
|
6571
|
+
const help = "_help_1vg5x_96";
|
|
6572
|
+
const helpTitle = "_helpTitle_1vg5x_102";
|
|
6573
|
+
const helpRows = "_helpRows_1vg5x_109";
|
|
6574
|
+
const helpRow = "_helpRow_1vg5x_109";
|
|
6575
|
+
const styles$x = {
|
|
6576
|
+
page: page$3,
|
|
6577
|
+
widget,
|
|
6578
|
+
titleRow,
|
|
6579
|
+
headline: headline$1,
|
|
6580
|
+
track: track$5,
|
|
6581
|
+
rule,
|
|
6582
|
+
help,
|
|
6583
|
+
helpTitle,
|
|
6584
|
+
helpRows,
|
|
6585
|
+
helpRow
|
|
6586
|
+
};
|
|
6587
|
+
function RedirectLink() {
|
|
6588
|
+
return /* @__PURE__ */ jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", "aria-hidden": "true", children: [
|
|
6589
|
+
/* @__PURE__ */ jsx(
|
|
6590
|
+
"path",
|
|
6591
|
+
{
|
|
6592
|
+
d: "M3.37413 1.63539C2.84882 1.63539 2.39164 1.90422 2.08646 2.29534C1.78479 2.68228 1.63445 3.17776 1.63445 3.66795V3.67088L1.66569 10.3328C1.66636 10.8221 1.81652 11.3164 2.1177 11.7025C2.42287 12.0935 2.8802 12.3615 3.40537 12.3615L3.4044 12.3625L10.6248 12.3654C11.1499 12.3653 11.6063 12.0965 11.9115 11.7054C12.2134 11.3185 12.3644 10.8232 12.3645 10.3328V8.33347C12.3645 7.94707 12.0508 7.63363 11.6645 7.63349C11.278 7.63349 10.9645 7.94699 10.9645 8.33347V10.3328C10.9644 10.5489 10.8962 10.7317 10.8083 10.8444C10.7238 10.9526 10.6512 10.9654 10.6248 10.9654L3.40537 10.9625C3.37921 10.9625 3.30653 10.9498 3.22184 10.8415C3.13389 10.7287 3.06474 10.5461 3.06466 10.3299V10.327L3.03342 3.66405C3.03416 3.44927 3.10311 3.26759 3.1906 3.15542C3.27527 3.04709 3.34796 3.03436 3.37413 3.03436H5.44477C5.83092 3.03423 6.14439 2.72147 6.14474 2.33537C6.14474 1.94897 5.83113 1.63553 5.44477 1.63539H3.37413Z",
|
|
6593
|
+
fill: "currentColor"
|
|
6594
|
+
}
|
|
6595
|
+
),
|
|
6596
|
+
/* @__PURE__ */ jsx(
|
|
6597
|
+
"path",
|
|
6598
|
+
{
|
|
6599
|
+
d: "M8.683 1.63442C8.29663 1.63442 7.9832 1.94806 7.98303 2.33439C7.98303 2.72087 8.29652 3.03436 8.683 3.03436H9.97458L6.504 6.50495C6.23093 6.77819 6.23093 7.22163 6.504 7.49487C6.77724 7.76794 7.22068 7.76794 7.49392 7.49487L10.9645 4.02331V5.31587C10.9645 5.70233 11.278 6.01582 11.6645 6.01584C12.0508 6.01571 12.3645 5.70226 12.3645 5.31587V2.33439C12.3643 2.04478 12.1878 1.79638 11.9369 1.69006L11.9271 1.68616C11.9116 1.67987 11.8951 1.67664 11.8793 1.67152C11.8526 1.66289 11.8261 1.6535 11.7982 1.64809C11.7924 1.64696 11.7865 1.64711 11.7807 1.64613C11.7428 1.63977 11.7042 1.63443 11.6645 1.63442H8.683Z",
|
|
6600
|
+
fill: "currentColor"
|
|
6601
|
+
}
|
|
6602
|
+
)
|
|
6603
|
+
] });
|
|
6604
|
+
}
|
|
6605
|
+
function ChevronRight$1() {
|
|
6606
|
+
return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(4.28 1.96)", children: /* @__PURE__ */ jsx(
|
|
6607
|
+
"path",
|
|
6608
|
+
{
|
|
6609
|
+
d: "M7.42763 6.03763C7.42763 5.83763 7.33763 5.64763 7.18763 5.51763L1.15763 0.177629C0.867628 -0.0823714 0.427629 -0.0523713 0.177629 0.237629C-0.0823713 0.527629 -0.0523714 0.967629 0.237629 1.22763L5.67763 6.04763L0.237629 10.8576C-0.0523709 11.1176 -0.0823709 11.5576 0.177629 11.8476C0.437629 12.1376 0.877629 12.1676 1.16763 11.9076L7.19763 6.56763C7.34763 6.43763 7.43763 6.24763 7.43763 6.04763L7.42763 6.03763Z",
|
|
6610
|
+
fill: "currentColor"
|
|
6611
|
+
}
|
|
6612
|
+
) }) });
|
|
6613
|
+
}
|
|
6472
6614
|
function OrderTrackingView(props) {
|
|
6473
6615
|
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderTrackingContent, { ...props }) });
|
|
6474
6616
|
}
|
|
6475
|
-
function OrderTrackingContent({
|
|
6617
|
+
function OrderTrackingContent({
|
|
6618
|
+
orderRef,
|
|
6619
|
+
locale: localeProp,
|
|
6620
|
+
onStartReturn,
|
|
6621
|
+
onContactSupport
|
|
6622
|
+
}) {
|
|
6476
6623
|
const { api } = useShop();
|
|
6477
6624
|
const locale = useLocale(localeProp);
|
|
6478
6625
|
const [order, setOrder] = useState(null);
|
|
@@ -6492,164 +6639,105 @@ function OrderTrackingContent({ orderRef, locale: localeProp }) {
|
|
|
6492
6639
|
void load();
|
|
6493
6640
|
}, [load]);
|
|
6494
6641
|
if (state === "loading") {
|
|
6495
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6496
|
-
/* @__PURE__ */ jsx(Skeleton, { height:
|
|
6497
|
-
/* @__PURE__ */ jsx(Skeleton, { height:
|
|
6498
|
-
/* @__PURE__ */ jsx(Skeleton, { height:
|
|
6642
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$x.page, children: [
|
|
6643
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 206, radius: 8 }),
|
|
6644
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 48, radius: 8 }),
|
|
6645
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 113, radius: 18 }),
|
|
6646
|
+
/* @__PURE__ */ jsx(Skeleton, { height: 240, radius: 18 })
|
|
6499
6647
|
] });
|
|
6500
6648
|
}
|
|
6501
6649
|
if (state === "error" || !order) {
|
|
6502
6650
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6503
6651
|
}
|
|
6504
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6505
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6506
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6507
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
6508
|
-
/* @__PURE__ */ jsxs("p", { className: styles$w.subtitle, children: [
|
|
6509
|
-
/* @__PURE__ */ jsx("span", { children: `Order #${shortRef$1(order.order_ref)}` }),
|
|
6510
|
-
/* @__PURE__ */ jsx("span", { className: styles$w.dot, "aria-hidden": "true" }),
|
|
6511
|
-
/* @__PURE__ */ jsx("span", { children: `Placed ${formatPlaced$1(order.placed_at, locale)}` })
|
|
6512
|
-
] })
|
|
6513
|
-
] }),
|
|
6514
|
-
/* @__PURE__ */ jsxs("div", { className: styles$w.widget, children: [
|
|
6515
|
-
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale }),
|
|
6652
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$x.page, children: [
|
|
6653
|
+
/* @__PURE__ */ jsxs("section", { className: styles$x.widget, "aria-label": "Delivery status", children: [
|
|
6654
|
+
/* @__PURE__ */ jsxs("div", { className: styles$x.titleRow, children: [
|
|
6655
|
+
/* @__PURE__ */ jsx("h1", { className: styles$x.headline, children: `Order #${shortRef$1(order.order_ref)}` }),
|
|
6516
6656
|
order.tracking?.url && /* @__PURE__ */ jsxs(
|
|
6517
6657
|
"a",
|
|
6518
6658
|
{
|
|
6519
|
-
className: styles$
|
|
6659
|
+
className: styles$x.track,
|
|
6520
6660
|
href: order.tracking.url,
|
|
6521
6661
|
target: "_blank",
|
|
6522
6662
|
rel: "noopener noreferrer",
|
|
6523
6663
|
children: [
|
|
6524
|
-
"Track
|
|
6525
|
-
/* @__PURE__ */ jsx("span", { className:
|
|
6664
|
+
"Track",
|
|
6665
|
+
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: ` ${order.tracking.carrier}, opens in a new tab` }),
|
|
6666
|
+
/* @__PURE__ */ jsx(RedirectLink, {})
|
|
6526
6667
|
]
|
|
6527
6668
|
}
|
|
6528
6669
|
)
|
|
6529
|
-
] })
|
|
6530
|
-
] }),
|
|
6531
|
-
/* @__PURE__ */ jsx(ItemsCard, { order }),
|
|
6532
|
-
/* @__PURE__ */ jsxs("section", { className: styles$w.details, "aria-label": "Delivery and payment", children: [
|
|
6533
|
-
/* @__PURE__ */ jsxs("div", { className: styles$w.detailBlock, children: [
|
|
6534
|
-
/* @__PURE__ */ jsx("h2", { className: styles$w.detailLabel, children: "Shipping address" }),
|
|
6535
|
-
/* @__PURE__ */ jsx("p", { className: styles$w.detailValue, children: formatAddress$1(order.ship_to) })
|
|
6536
6670
|
] }),
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
order.payment.last4
|
|
6546
|
-
] })
|
|
6547
|
-
] })
|
|
6548
|
-
] })
|
|
6549
|
-
] })
|
|
6671
|
+
/* @__PURE__ */ jsx(
|
|
6672
|
+
OrderTimeline,
|
|
6673
|
+
{
|
|
6674
|
+
progress: order.progress,
|
|
6675
|
+
...order.estimated_delivery ? { estimatedDelivery: order.estimated_delivery } : {},
|
|
6676
|
+
locale
|
|
6677
|
+
}
|
|
6678
|
+
)
|
|
6550
6679
|
] }),
|
|
6551
|
-
/* @__PURE__ */
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6680
|
+
/* @__PURE__ */ jsx("hr", { className: styles$x.rule }),
|
|
6681
|
+
/* @__PURE__ */ jsx(OrderLines, { order }),
|
|
6682
|
+
/* @__PURE__ */ jsx(ShippingAddressCard, { order }),
|
|
6683
|
+
/* @__PURE__ */ jsx(OrderSummaryCard, { order }),
|
|
6684
|
+
/* @__PURE__ */ jsx(
|
|
6685
|
+
NeedHelp,
|
|
6686
|
+
{
|
|
6687
|
+
order,
|
|
6688
|
+
...onStartReturn ? { onStartReturn } : {},
|
|
6689
|
+
...onContactSupport ? { onContactSupport } : {}
|
|
6690
|
+
}
|
|
6691
|
+
)
|
|
6555
6692
|
] });
|
|
6556
6693
|
}
|
|
6557
|
-
function
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6694
|
+
function NeedHelp({
|
|
6695
|
+
order,
|
|
6696
|
+
onStartReturn,
|
|
6697
|
+
onContactSupport
|
|
6698
|
+
}) {
|
|
6699
|
+
const emit = useShopEvent();
|
|
6700
|
+
if (order.status !== "delivered") return null;
|
|
6701
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$x.help, "aria-labelledby": "order-help", children: [
|
|
6702
|
+
/* @__PURE__ */ jsx("h2", { className: styles$x.helpTitle, id: "order-help", children: "Need help?" }),
|
|
6703
|
+
/* @__PURE__ */ jsxs("div", { className: styles$x.helpRows, children: [
|
|
6704
|
+
onStartReturn && /* @__PURE__ */ jsx(HelpRow, { label: "Start a return", onClick: onStartReturn }),
|
|
6705
|
+
/* @__PURE__ */ jsx(
|
|
6706
|
+
HelpRow,
|
|
6707
|
+
{
|
|
6708
|
+
label: "Contact support",
|
|
6709
|
+
onClick: () => {
|
|
6710
|
+
emit({ type: "support_requested", orderRef: order.order_ref });
|
|
6711
|
+
onContactSupport?.();
|
|
6712
|
+
}
|
|
6713
|
+
}
|
|
6714
|
+
)
|
|
6715
|
+
] })
|
|
6574
6716
|
] });
|
|
6575
6717
|
}
|
|
6576
|
-
function
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
}
|
|
6580
|
-
|
|
6581
|
-
return {
|
|
6582
|
-
subtotal: order.totals.items,
|
|
6583
|
-
shipping: order.totals.shipping,
|
|
6584
|
-
tax: order.totals.tax,
|
|
6585
|
-
total: order.totals.grand_total
|
|
6586
|
-
};
|
|
6718
|
+
function HelpRow({ label: label2, onClick }) {
|
|
6719
|
+
return /* @__PURE__ */ jsxs("button", { type: "button", className: styles$x.helpRow, onClick, children: [
|
|
6720
|
+
/* @__PURE__ */ jsx("span", { children: label2 }),
|
|
6721
|
+
/* @__PURE__ */ jsx(ChevronRight$1, {})
|
|
6722
|
+
] });
|
|
6587
6723
|
}
|
|
6588
6724
|
function shortRef$1(orderRef) {
|
|
6589
6725
|
return orderRef.replace(/^ord_/, "");
|
|
6590
6726
|
}
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
function formatAddress$1(address) {
|
|
6599
|
-
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6600
|
-
}
|
|
6601
|
-
const page$2 = "_page_8yxu9_6";
|
|
6602
|
-
const confirmed = "_confirmed_8yxu9_16";
|
|
6603
|
-
const title$g = "_title_8yxu9_22";
|
|
6604
|
-
const headline = "_headline_8yxu9_47";
|
|
6605
|
-
const subtitle$3 = "_subtitle_8yxu9_65";
|
|
6606
|
-
const lines$1 = "_lines_8yxu9_88";
|
|
6607
|
-
const line = "_line_8yxu9_88";
|
|
6608
|
-
const thumb = "_thumb_8yxu9_103";
|
|
6609
|
-
const image$8 = "_image_8yxu9_113";
|
|
6610
|
-
const placeholder$5 = "_placeholder_8yxu9_117";
|
|
6611
|
-
const lineBody = "_lineBody_8yxu9_122";
|
|
6612
|
-
const lineText = "_lineText_8yxu9_131";
|
|
6613
|
-
const lineTitle = "_lineTitle_8yxu9_141";
|
|
6614
|
-
const lineMeta = "_lineMeta_8yxu9_160";
|
|
6615
|
-
const linePrice = "_linePrice_8yxu9_175";
|
|
6616
|
-
const paid = "_paid_8yxu9_187";
|
|
6617
|
-
const was$1 = "_was_8yxu9_193";
|
|
6618
|
-
const card$2 = "_card_8yxu9_213";
|
|
6619
|
-
const cardTitle = "_cardTitle_8yxu9_221";
|
|
6620
|
-
const cardBody = "_cardBody_8yxu9_233";
|
|
6621
|
-
const summaryCard = "_summaryCard_8yxu9_205";
|
|
6622
|
-
const done = "_done_8yxu9_261";
|
|
6623
|
-
const styles$v = {
|
|
6727
|
+
const page$2 = "_page_1s8l9_6";
|
|
6728
|
+
const confirmed = "_confirmed_1s8l9_16";
|
|
6729
|
+
const title$h = "_title_1s8l9_22";
|
|
6730
|
+
const headline = "_headline_1s8l9_47";
|
|
6731
|
+
const subtitle$4 = "_subtitle_1s8l9_65";
|
|
6732
|
+
const done = "_done_1s8l9_87";
|
|
6733
|
+
const styles$w = {
|
|
6624
6734
|
page: page$2,
|
|
6625
6735
|
confirmed,
|
|
6626
|
-
title: title$
|
|
6736
|
+
title: title$h,
|
|
6627
6737
|
headline,
|
|
6628
|
-
subtitle: subtitle$
|
|
6629
|
-
lines: lines$1,
|
|
6630
|
-
line,
|
|
6631
|
-
thumb,
|
|
6632
|
-
image: image$8,
|
|
6633
|
-
placeholder: placeholder$5,
|
|
6634
|
-
lineBody,
|
|
6635
|
-
lineText,
|
|
6636
|
-
lineTitle,
|
|
6637
|
-
lineMeta,
|
|
6638
|
-
linePrice,
|
|
6639
|
-
paid,
|
|
6640
|
-
was: was$1,
|
|
6641
|
-
card: card$2,
|
|
6642
|
-
cardTitle,
|
|
6643
|
-
cardBody,
|
|
6644
|
-
summaryCard,
|
|
6738
|
+
subtitle: subtitle$4,
|
|
6645
6739
|
done
|
|
6646
6740
|
};
|
|
6647
|
-
const SUMMARY_ROWS = [
|
|
6648
|
-
{ label: "Subtotal", key: "subtotal" },
|
|
6649
|
-
{ label: "Discount", key: "discount" },
|
|
6650
|
-
{ label: "Shipping", key: "shipping" },
|
|
6651
|
-
{ label: "Total", key: "total" }
|
|
6652
|
-
];
|
|
6653
6741
|
function OrderConfirmationView(props) {
|
|
6654
6742
|
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderConfirmationContent, { ...props }) });
|
|
6655
6743
|
}
|
|
@@ -6673,7 +6761,7 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
6673
6761
|
void load();
|
|
6674
6762
|
}, [load]);
|
|
6675
6763
|
if (state === "loading") {
|
|
6676
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6764
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.page, children: [
|
|
6677
6765
|
/* @__PURE__ */ jsx(Skeleton, { height: 140, radius: 8 }),
|
|
6678
6766
|
/* @__PURE__ */ jsx(Skeleton, { height: 72, radius: 8 }),
|
|
6679
6767
|
/* @__PURE__ */ jsx(Skeleton, { height: 120, radius: 18 }),
|
|
@@ -6683,84 +6771,32 @@ function OrderConfirmationContent({ orderRef, locale: localeProp, onDone }) {
|
|
|
6683
6771
|
if (state === "error" || !order) {
|
|
6684
6772
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6685
6773
|
}
|
|
6686
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6687
|
-
/* @__PURE__ */ jsxs("section", { className: styles$
|
|
6688
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6689
|
-
/* @__PURE__ */ jsx("h1", { className: styles$
|
|
6690
|
-
order.email && /* @__PURE__ */ jsx("p", { className: styles$
|
|
6774
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$w.page, children: [
|
|
6775
|
+
/* @__PURE__ */ jsxs("section", { className: styles$w.confirmed, "aria-label": "Order confirmation", children: [
|
|
6776
|
+
/* @__PURE__ */ jsxs("div", { className: styles$w.title, children: [
|
|
6777
|
+
/* @__PURE__ */ jsx("h1", { className: styles$w.headline, children: "Your order is confirmed" }),
|
|
6778
|
+
order.email && /* @__PURE__ */ jsx("p", { className: styles$w.subtitle, children: `We’ve sent a confirmation to ${order.email}` })
|
|
6691
6779
|
] }),
|
|
6692
|
-
/* @__PURE__ */ jsx(OrderTimeline, { progress: order.progress, locale })
|
|
6693
|
-
] }),
|
|
6694
|
-
/* @__PURE__ */ jsx("ul", { className: styles$v.lines, "aria-label": "Items", children: order.items.map((item2) => /* @__PURE__ */ jsx(ConfirmationLine, { item: item2 }, item2.line_ref)) }),
|
|
6695
|
-
/* @__PURE__ */ jsxs("section", { className: styles$v.card, "aria-label": "Shipping address", children: [
|
|
6696
|
-
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Shipping address" }),
|
|
6697
|
-
/* @__PURE__ */ jsx("p", { className: styles$v.cardBody, children: formatAddress(order.ship_to) })
|
|
6698
|
-
] }),
|
|
6699
|
-
/* @__PURE__ */ jsxs("section", { className: [styles$v.card, styles$v.summaryCard].join(" "), "aria-label": "Order summary", children: [
|
|
6700
|
-
/* @__PURE__ */ jsx("h2", { className: styles$v.cardTitle, children: "Order summary" }),
|
|
6701
6780
|
/* @__PURE__ */ jsx(
|
|
6702
|
-
|
|
6781
|
+
OrderTimeline,
|
|
6703
6782
|
{
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6783
|
+
progress: order.progress,
|
|
6784
|
+
...order.estimated_delivery ? { estimatedDelivery: order.estimated_delivery } : {},
|
|
6785
|
+
locale
|
|
6707
6786
|
}
|
|
6708
6787
|
)
|
|
6709
6788
|
] }),
|
|
6710
|
-
|
|
6789
|
+
/* @__PURE__ */ jsx(OrderLines, { order }),
|
|
6790
|
+
/* @__PURE__ */ jsx(ShippingAddressCard, { order }),
|
|
6791
|
+
/* @__PURE__ */ jsx(OrderSummaryCard, { order }),
|
|
6792
|
+
onDone && /* @__PURE__ */ jsx(Button, { variant: "secondary", fullWidth: true, className: styles$w.done, onClick: onDone, children: "Done" })
|
|
6711
6793
|
] });
|
|
6712
6794
|
}
|
|
6713
|
-
function ConfirmationLine({ item: item2 }) {
|
|
6714
|
-
const { format } = useMoney();
|
|
6715
|
-
const compareAt2 = item2.compare_at_unit_price;
|
|
6716
|
-
const pct = compareAt2 ? discountPct(item2.unit_price, compareAt2) : void 0;
|
|
6717
|
-
const details2 = detailsOf(item2);
|
|
6718
|
-
return /* @__PURE__ */ jsxs("li", { className: styles$v.line, children: [
|
|
6719
|
-
/* @__PURE__ */ jsx("div", { className: styles$v.thumb, children: item2.image ? /* @__PURE__ */ jsx(ShopImage, { src: item2.image, alt: "", fill: true, sizes: "48px", className: styles$v.image }) : /* @__PURE__ */ jsx("div", { className: styles$v.placeholder, "aria-hidden": "true" }) }),
|
|
6720
|
-
/* @__PURE__ */ jsxs("div", { className: styles$v.lineBody, children: [
|
|
6721
|
-
/* @__PURE__ */ jsxs("div", { className: styles$v.lineText, children: [
|
|
6722
|
-
/* @__PURE__ */ jsx("span", { className: styles$v.lineTitle, children: item2.title ?? item2.sku }),
|
|
6723
|
-
/* @__PURE__ */ jsxs("span", { className: styles$v.lineMeta, children: [
|
|
6724
|
-
details2.map((detail2) => /* @__PURE__ */ jsx("span", { children: detail2 }, detail2)),
|
|
6725
|
-
pct !== void 0 && /* @__PURE__ */ jsx(SaleBadge, { pct })
|
|
6726
|
-
] })
|
|
6727
|
-
] }),
|
|
6728
|
-
/* @__PURE__ */ jsxs("span", { className: styles$v.linePrice, children: [
|
|
6729
|
-
/* @__PURE__ */ jsx("span", { className: styles$v.paid, children: format(item2.line_total) }),
|
|
6730
|
-
compareAt2 && /* @__PURE__ */ jsxs("span", { className: styles$v.was, children: [
|
|
6731
|
-
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(compareAt2)}` }),
|
|
6732
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(compareAt2) })
|
|
6733
|
-
] })
|
|
6734
|
-
] })
|
|
6735
|
-
] })
|
|
6736
|
-
] });
|
|
6737
|
-
}
|
|
6738
|
-
function detailsOf(item2) {
|
|
6739
|
-
const pairs = variantPairs(item2.attributes).map((p) => `${p.label}: ${p.value}`);
|
|
6740
|
-
return item2.qty > 1 ? [...pairs, `Qty: ${item2.qty}`] : pairs;
|
|
6741
|
-
}
|
|
6742
|
-
function rowsFor(order) {
|
|
6743
|
-
if (order.totals.tax.amount === 0) return SUMMARY_ROWS;
|
|
6744
|
-
return SUMMARY_ROWS.flatMap(
|
|
6745
|
-
(row2) => row2.key === "shipping" ? [row2, { label: "Tax", key: "tax" }] : [row2]
|
|
6746
|
-
);
|
|
6747
|
-
}
|
|
6748
|
-
function toPricing(order) {
|
|
6749
|
-
return {
|
|
6750
|
-
subtotal: order.totals.items,
|
|
6751
|
-
shipping: order.totals.shipping,
|
|
6752
|
-
tax: order.totals.tax,
|
|
6753
|
-
total: order.totals.grand_total
|
|
6754
|
-
};
|
|
6755
|
-
}
|
|
6756
|
-
function formatAddress(address) {
|
|
6757
|
-
return [address.line1, address.line2, address.postcode, address.city, address.country].filter(Boolean).join(", ");
|
|
6758
|
-
}
|
|
6759
6795
|
const badge$2 = "_badge_ghd02_6";
|
|
6760
6796
|
const progress = "_progress_ghd02_22";
|
|
6761
6797
|
const delivered = "_delivered_ghd02_27";
|
|
6762
6798
|
const cancelled = "_cancelled_ghd02_32";
|
|
6763
|
-
const styles$
|
|
6799
|
+
const styles$v = {
|
|
6764
6800
|
badge: badge$2,
|
|
6765
6801
|
progress,
|
|
6766
6802
|
delivered,
|
|
@@ -6780,28 +6816,28 @@ const TONE = {
|
|
|
6780
6816
|
delivered: "delivered",
|
|
6781
6817
|
cancelled: "cancelled"
|
|
6782
6818
|
};
|
|
6783
|
-
function OrderStatusBadge({ status
|
|
6784
|
-
const label2 = LABEL[
|
|
6785
|
-
const tone = TONE[
|
|
6786
|
-
return /* @__PURE__ */ jsx("span", { className: [styles$
|
|
6787
|
-
}
|
|
6788
|
-
const page$1 = "
|
|
6789
|
-
const empty = "
|
|
6790
|
-
const cta$1 = "
|
|
6791
|
-
const card$1 = "
|
|
6792
|
-
const tappable = "
|
|
6793
|
-
const head$1 = "
|
|
6794
|
-
const heading = "
|
|
6795
|
-
const title$
|
|
6796
|
-
const date = "
|
|
6797
|
-
const bottom$1 = "
|
|
6798
|
-
const strip = "
|
|
6799
|
-
const tile$2 = "
|
|
6800
|
-
const image$
|
|
6801
|
-
const placeholder$
|
|
6802
|
-
const more = "
|
|
6803
|
-
const chevron$3 = "
|
|
6804
|
-
const styles$
|
|
6819
|
+
function OrderStatusBadge({ status }) {
|
|
6820
|
+
const label2 = LABEL[status] ?? status.replace(/_/g, " ");
|
|
6821
|
+
const tone = TONE[status] ?? "progress";
|
|
6822
|
+
return /* @__PURE__ */ jsx("span", { className: [styles$v.badge, styles$v[tone]].join(" "), children: label2 });
|
|
6823
|
+
}
|
|
6824
|
+
const page$1 = "_page_6xodo_2";
|
|
6825
|
+
const empty = "_empty_6xodo_22";
|
|
6826
|
+
const cta$1 = "_cta_6xodo_32";
|
|
6827
|
+
const card$1 = "_card_6xodo_55";
|
|
6828
|
+
const tappable = "_tappable_6xodo_70";
|
|
6829
|
+
const head$1 = "_head_6xodo_79";
|
|
6830
|
+
const heading = "_heading_6xodo_87";
|
|
6831
|
+
const title$g = "_title_6xodo_96";
|
|
6832
|
+
const date = "_date_6xodo_115";
|
|
6833
|
+
const bottom$1 = "_bottom_6xodo_120";
|
|
6834
|
+
const strip = "_strip_6xodo_128";
|
|
6835
|
+
const tile$2 = "_tile_6xodo_133";
|
|
6836
|
+
const image$8 = "_image_6xodo_143";
|
|
6837
|
+
const placeholder$5 = "_placeholder_6xodo_147";
|
|
6838
|
+
const more = "_more_6xodo_154";
|
|
6839
|
+
const chevron$3 = "_chevron_6xodo_167";
|
|
6840
|
+
const styles$u = {
|
|
6805
6841
|
page: page$1,
|
|
6806
6842
|
empty,
|
|
6807
6843
|
cta: cta$1,
|
|
@@ -6809,28 +6845,25 @@ const styles$t = {
|
|
|
6809
6845
|
tappable,
|
|
6810
6846
|
head: head$1,
|
|
6811
6847
|
heading,
|
|
6812
|
-
title: title$
|
|
6848
|
+
title: title$g,
|
|
6813
6849
|
date,
|
|
6814
6850
|
bottom: bottom$1,
|
|
6815
6851
|
strip,
|
|
6816
6852
|
tile: tile$2,
|
|
6817
|
-
image: image$
|
|
6818
|
-
placeholder: placeholder$
|
|
6853
|
+
image: image$8,
|
|
6854
|
+
placeholder: placeholder$5,
|
|
6819
6855
|
more,
|
|
6820
6856
|
chevron: chevron$3
|
|
6821
6857
|
};
|
|
6822
6858
|
const TILES = 3;
|
|
6823
6859
|
function Chevron() {
|
|
6824
|
-
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx(
|
|
6860
|
+
return /* @__PURE__ */ jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(8 4.82)", children: /* @__PURE__ */ jsx(
|
|
6825
6861
|
"path",
|
|
6826
6862
|
{
|
|
6827
|
-
d: "
|
|
6828
|
-
|
|
6829
|
-
strokeWidth: "1.8",
|
|
6830
|
-
strokeLinecap: "round",
|
|
6831
|
-
strokeLinejoin: "round"
|
|
6863
|
+
d: "M0.292893 0.292893C0.683418 -0.0976311 1.31643 -0.0976311 1.70696 0.292893L7.70696 6.29289C8.09748 6.68342 8.09748 7.31643 7.70696 7.70696L1.70696 13.707C1.31643 14.0975 0.683417 14.0975 0.292893 13.707C-0.0976311 13.3164 -0.0976311 12.6834 0.292893 12.2929L5.58586 6.99992L0.292893 1.70696C-0.0976311 1.31643 -0.0976311 0.683418 0.292893 0.292893Z",
|
|
6864
|
+
fill: "currentColor"
|
|
6832
6865
|
}
|
|
6833
|
-
) });
|
|
6866
|
+
) }) });
|
|
6834
6867
|
}
|
|
6835
6868
|
function OrderListView(props) {
|
|
6836
6869
|
return /* @__PURE__ */ jsx(ShopSurface, { tone: "light", fill: true, children: /* @__PURE__ */ jsx(OrderListContent, { ...props }) });
|
|
@@ -6856,7 +6889,7 @@ function OrderListContent({ onOpenOrder, onStartShopping, locale: localeProp })
|
|
|
6856
6889
|
void load();
|
|
6857
6890
|
}, [load]);
|
|
6858
6891
|
if (state === "loading") {
|
|
6859
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6892
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$u.page, children: [
|
|
6860
6893
|
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 }),
|
|
6861
6894
|
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 }),
|
|
6862
6895
|
/* @__PURE__ */ jsx(Skeleton, { height: 148, radius: 12 })
|
|
@@ -6866,18 +6899,18 @@ function OrderListContent({ onOpenOrder, onStartShopping, locale: localeProp })
|
|
|
6866
6899
|
return /* @__PURE__ */ jsx(ErrorState, { code: errorCode, onRetry: () => void load() });
|
|
6867
6900
|
}
|
|
6868
6901
|
if (orders2.length === 0) {
|
|
6869
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
6902
|
+
return /* @__PURE__ */ jsx("div", { className: styles$u.empty, children: /* @__PURE__ */ jsx(
|
|
6870
6903
|
EmptyState,
|
|
6871
6904
|
{
|
|
6872
6905
|
title: "Nothing here yet",
|
|
6873
6906
|
body: "Your orders will show up here once you've shopped.",
|
|
6874
6907
|
...onStartShopping ? {
|
|
6875
|
-
action: /* @__PURE__ */ jsx("button", { type: "button", className: styles$
|
|
6908
|
+
action: /* @__PURE__ */ jsx("button", { type: "button", className: styles$u.cta, onClick: onStartShopping, children: "Continue shopping" })
|
|
6876
6909
|
} : {}
|
|
6877
6910
|
}
|
|
6878
6911
|
) });
|
|
6879
6912
|
}
|
|
6880
|
-
return /* @__PURE__ */ jsx("ul", { className: styles$
|
|
6913
|
+
return /* @__PURE__ */ jsx("ul", { className: styles$u.page, children: orders2.map((order) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(
|
|
6881
6914
|
OrderCard,
|
|
6882
6915
|
{
|
|
6883
6916
|
order,
|
|
@@ -6892,24 +6925,24 @@ function OrderCard({
|
|
|
6892
6925
|
onOpen
|
|
6893
6926
|
}) {
|
|
6894
6927
|
const body2 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6895
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6896
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6897
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6898
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
6928
|
+
/* @__PURE__ */ jsxs("div", { className: styles$u.head, children: [
|
|
6929
|
+
/* @__PURE__ */ jsxs("div", { className: styles$u.heading, children: [
|
|
6930
|
+
/* @__PURE__ */ jsx("span", { className: styles$u.title, children: `Order #${shortRef(order.order_ref)}` }),
|
|
6931
|
+
/* @__PURE__ */ jsx("span", { className: styles$u.date, children: formatPlaced(order.placed_at, locale) })
|
|
6899
6932
|
] }),
|
|
6900
6933
|
/* @__PURE__ */ jsx(OrderStatusBadge, { status: order.status })
|
|
6901
6934
|
] }),
|
|
6902
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
6935
|
+
/* @__PURE__ */ jsxs("div", { className: styles$u.bottom, children: [
|
|
6903
6936
|
/* @__PURE__ */ jsx(Thumbnails, { order }),
|
|
6904
|
-
onOpen && /* @__PURE__ */ jsx("span", { className: styles$
|
|
6937
|
+
onOpen && /* @__PURE__ */ jsx("span", { className: styles$u.chevron, children: /* @__PURE__ */ jsx(Chevron, {}) })
|
|
6905
6938
|
] })
|
|
6906
6939
|
] });
|
|
6907
|
-
if (!onOpen) return /* @__PURE__ */ jsx("div", { className: styles$
|
|
6940
|
+
if (!onOpen) return /* @__PURE__ */ jsx("div", { className: styles$u.card, children: body2 });
|
|
6908
6941
|
return /* @__PURE__ */ jsx(
|
|
6909
6942
|
"button",
|
|
6910
6943
|
{
|
|
6911
6944
|
type: "button",
|
|
6912
|
-
className: [styles$
|
|
6945
|
+
className: [styles$u.card, styles$u.tappable].join(" "),
|
|
6913
6946
|
onClick: onOpen,
|
|
6914
6947
|
"aria-label": `Order ${shortRef(order.order_ref)}, ${order.headline}`,
|
|
6915
6948
|
children: body2
|
|
@@ -6921,13 +6954,13 @@ function Thumbnails({ order }) {
|
|
|
6921
6954
|
const hidden = order.item_count - TILES + 1;
|
|
6922
6955
|
const overflow = images.length >= TILES && hidden > 1 ? hidden : 0;
|
|
6923
6956
|
if (images.length === 0) {
|
|
6924
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
6957
|
+
return /* @__PURE__ */ jsx("div", { className: styles$u.strip, children: /* @__PURE__ */ jsx("div", { className: [styles$u.tile, styles$u.placeholder].join(" "), "aria-hidden": "true" }) });
|
|
6925
6958
|
}
|
|
6926
|
-
return /* @__PURE__ */ jsx("div", { className: styles$
|
|
6959
|
+
return /* @__PURE__ */ jsx("div", { className: styles$u.strip, children: images.map((src, i) => {
|
|
6927
6960
|
const last = i === images.length - 1;
|
|
6928
|
-
return /* @__PURE__ */ jsxs("div", { className: styles$
|
|
6929
|
-
/* @__PURE__ */ jsx(ShopImage, { src, alt: "", fill: true, sizes: "56px", className: styles$
|
|
6930
|
-
overflow > 0 && last && /* @__PURE__ */ jsxs("span", { className: styles$
|
|
6961
|
+
return /* @__PURE__ */ jsxs("div", { className: styles$u.tile, children: [
|
|
6962
|
+
/* @__PURE__ */ jsx(ShopImage, { src, alt: "", fill: true, sizes: "56px", className: styles$u.image }),
|
|
6963
|
+
overflow > 0 && last && /* @__PURE__ */ jsxs("span", { className: styles$u.more, children: [
|
|
6931
6964
|
/* @__PURE__ */ jsxs("span", { "aria-hidden": "true", children: [
|
|
6932
6965
|
"+",
|
|
6933
6966
|
overflow
|
|
@@ -6945,32 +6978,32 @@ function formatPlaced(iso, locale) {
|
|
|
6945
6978
|
const day = date2.toLocaleDateString(locale, { day: "numeric", month: "short" });
|
|
6946
6979
|
return `${day}, ${date2.toLocaleDateString(locale, { year: "numeric" })}`;
|
|
6947
6980
|
}
|
|
6948
|
-
const tile$1 = "
|
|
6949
|
-
const media$2 = "
|
|
6950
|
-
const image$
|
|
6951
|
-
const placeholder$
|
|
6952
|
-
const topBadge = "
|
|
6953
|
-
const saleBadge$
|
|
6954
|
-
const oos$
|
|
6955
|
-
const bottom = "
|
|
6956
|
-
const titlePrice$1 = "
|
|
6957
|
-
const title$
|
|
6958
|
-
const swatches = "
|
|
6959
|
-
const swatch = "
|
|
6960
|
-
const swatchActive = "
|
|
6961
|
-
const swatchDot = "
|
|
6962
|
-
const large = "
|
|
6963
|
-
const styles$
|
|
6981
|
+
const tile$1 = "_tile_1eiri_7";
|
|
6982
|
+
const media$2 = "_media_1eiri_15";
|
|
6983
|
+
const image$7 = "_image_1eiri_25";
|
|
6984
|
+
const placeholder$4 = "_placeholder_1eiri_29";
|
|
6985
|
+
const topBadge = "_topBadge_1eiri_37";
|
|
6986
|
+
const saleBadge$2 = "_saleBadge_1eiri_60";
|
|
6987
|
+
const oos$3 = "_oos_1eiri_67";
|
|
6988
|
+
const bottom = "_bottom_1eiri_94";
|
|
6989
|
+
const titlePrice$1 = "_titlePrice_1eiri_81";
|
|
6990
|
+
const title$f = "_title_1eiri_5";
|
|
6991
|
+
const swatches = "_swatches_1eiri_160";
|
|
6992
|
+
const swatch = "_swatch_1eiri_160";
|
|
6993
|
+
const swatchActive = "_swatchActive_1eiri_177";
|
|
6994
|
+
const swatchDot = "_swatchDot_1eiri_181";
|
|
6995
|
+
const large = "_large_1eiri_192";
|
|
6996
|
+
const styles$t = {
|
|
6964
6997
|
tile: tile$1,
|
|
6965
6998
|
media: media$2,
|
|
6966
|
-
image: image$
|
|
6967
|
-
placeholder: placeholder$
|
|
6999
|
+
image: image$7,
|
|
7000
|
+
placeholder: placeholder$4,
|
|
6968
7001
|
topBadge,
|
|
6969
|
-
saleBadge: saleBadge$
|
|
6970
|
-
oos: oos$
|
|
7002
|
+
saleBadge: saleBadge$2,
|
|
7003
|
+
oos: oos$3,
|
|
6971
7004
|
bottom,
|
|
6972
7005
|
titlePrice: titlePrice$1,
|
|
6973
|
-
title: title$
|
|
7006
|
+
title: title$f,
|
|
6974
7007
|
swatches,
|
|
6975
7008
|
swatch,
|
|
6976
7009
|
swatchActive,
|
|
@@ -6987,9 +7020,9 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6987
7020
|
ShopLink,
|
|
6988
7021
|
{
|
|
6989
7022
|
to: `/product/${encodeURIComponent(product.sku)}`,
|
|
6990
|
-
className: [styles$
|
|
7023
|
+
className: [styles$t.tile, size === "large" ? styles$t.large : ""].join(" "),
|
|
6991
7024
|
children: [
|
|
6992
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7025
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.media, children: [
|
|
6993
7026
|
image2 ? /* @__PURE__ */ jsx(
|
|
6994
7027
|
ShopImage,
|
|
6995
7028
|
{
|
|
@@ -6997,17 +7030,17 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
6997
7030
|
alt: product.title,
|
|
6998
7031
|
fill: true,
|
|
6999
7032
|
sizes: size === "large" ? "(max-width: 480px) 100vw, 480px" : "(max-width: 480px) 45vw, 200px",
|
|
7000
|
-
className: styles$
|
|
7033
|
+
className: styles$t.image,
|
|
7001
7034
|
priority
|
|
7002
7035
|
}
|
|
7003
|
-
) : /* @__PURE__ */ jsx("div", { className: styles$
|
|
7004
|
-
anyInStock && topBadge2 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
7005
|
-
anyInStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$
|
|
7006
|
-
!anyInStock && /* @__PURE__ */ jsx("span", { className: styles$
|
|
7036
|
+
) : /* @__PURE__ */ jsx("div", { className: styles$t.placeholder, "aria-hidden": "true" }),
|
|
7037
|
+
anyInStock && topBadge2 && /* @__PURE__ */ jsx("span", { className: styles$t.topBadge, children: topBadge2 }),
|
|
7038
|
+
anyInStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$t.saleBadge, children: /* @__PURE__ */ jsx(SaleBadge, { pct }) }),
|
|
7039
|
+
!anyInStock && /* @__PURE__ */ jsx("span", { className: styles$t.oos, children: "Out of stock" })
|
|
7007
7040
|
] }),
|
|
7008
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7009
|
-
/* @__PURE__ */ jsxs("div", { className: styles$
|
|
7010
|
-
/* @__PURE__ */ jsx("span", { className: styles$
|
|
7041
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.bottom, children: [
|
|
7042
|
+
/* @__PURE__ */ jsxs("div", { className: styles$t.titlePrice, children: [
|
|
7043
|
+
/* @__PURE__ */ jsx("span", { className: styles$t.title, children: product.title }),
|
|
7011
7044
|
/* @__PURE__ */ jsx(
|
|
7012
7045
|
PriceBlock,
|
|
7013
7046
|
{
|
|
@@ -7019,11 +7052,11 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
7019
7052
|
}
|
|
7020
7053
|
)
|
|
7021
7054
|
] }),
|
|
7022
|
-
swatches2.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$
|
|
7055
|
+
swatches2.length > 0 && /* @__PURE__ */ jsx("div", { className: styles$t.swatches, "aria-hidden": "true", children: swatches2.map((c, i) => /* @__PURE__ */ jsx(
|
|
7023
7056
|
"span",
|
|
7024
7057
|
{
|
|
7025
|
-
className: [styles$
|
|
7026
|
-
children: /* @__PURE__ */ jsx("span", { className: styles$
|
|
7058
|
+
className: [styles$t.swatch, i === 0 ? styles$t.swatchActive : ""].join(" "),
|
|
7059
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$t.swatchDot, style: { background: swatchColour(c.value) } })
|
|
7027
7060
|
},
|
|
7028
7061
|
c.value
|
|
7029
7062
|
)) })
|
|
@@ -7032,6 +7065,72 @@ function ProductTile({ product, priority, size = "default" }) {
|
|
|
7032
7065
|
}
|
|
7033
7066
|
);
|
|
7034
7067
|
}
|
|
7068
|
+
const section$3 = "_section_1fdjh_5";
|
|
7069
|
+
const title$e = "_title_1fdjh_17";
|
|
7070
|
+
const link = "_link_1fdjh_26";
|
|
7071
|
+
const track$4 = "_track_1fdjh_38";
|
|
7072
|
+
const frame = "_frame_1fdjh_58";
|
|
7073
|
+
const image$6 = "_image_1fdjh_69";
|
|
7074
|
+
const placeholder$3 = "_placeholder_1fdjh_73";
|
|
7075
|
+
const saleBadge$1 = "_saleBadge_1fdjh_78";
|
|
7076
|
+
const oos$2 = "_oos_1fdjh_85";
|
|
7077
|
+
const caption = "_caption_1fdjh_101";
|
|
7078
|
+
const name = "_name_1fdjh_114";
|
|
7079
|
+
const price$1 = "_price_1fdjh_127";
|
|
7080
|
+
const paid = "_paid_1fdjh_136";
|
|
7081
|
+
const was$1 = "_was_1fdjh_142";
|
|
7082
|
+
const styles$s = {
|
|
7083
|
+
section: section$3,
|
|
7084
|
+
title: title$e,
|
|
7085
|
+
link,
|
|
7086
|
+
track: track$4,
|
|
7087
|
+
frame,
|
|
7088
|
+
image: image$6,
|
|
7089
|
+
placeholder: placeholder$3,
|
|
7090
|
+
saleBadge: saleBadge$1,
|
|
7091
|
+
oos: oos$2,
|
|
7092
|
+
caption,
|
|
7093
|
+
name,
|
|
7094
|
+
price: price$1,
|
|
7095
|
+
paid,
|
|
7096
|
+
was: was$1
|
|
7097
|
+
};
|
|
7098
|
+
function ProductGallery({ title: title2, product }) {
|
|
7099
|
+
const { format } = useMoney();
|
|
7100
|
+
const pct = product.compare_at ? discountPct(product.price, product.compare_at) : void 0;
|
|
7101
|
+
const inStock = product.variants.some((v) => v.in_stock);
|
|
7102
|
+
const images = product.media.length > 0 ? product.media : [void 0];
|
|
7103
|
+
return /* @__PURE__ */ jsxs("section", { className: styles$s.section, "aria-labelledby": `gallery-${product.sku}`, children: [
|
|
7104
|
+
/* @__PURE__ */ jsx("h2", { className: styles$s.title, id: `gallery-${product.sku}`, children: title2 }),
|
|
7105
|
+
/* @__PURE__ */ jsxs(ShopLink, { to: `/product/${encodeURIComponent(product.sku)}`, className: styles$s.link, children: [
|
|
7106
|
+
/* @__PURE__ */ jsx("ul", { className: styles$s.track, "aria-label": `${product.title} photographs`, children: images.map((src, i) => /* @__PURE__ */ jsxs("li", { className: styles$s.frame, children: [
|
|
7107
|
+
src ? /* @__PURE__ */ jsx(
|
|
7108
|
+
ShopImage,
|
|
7109
|
+
{
|
|
7110
|
+
src,
|
|
7111
|
+
alt: "",
|
|
7112
|
+
fill: true,
|
|
7113
|
+
sizes: "165px",
|
|
7114
|
+
className: styles$s.image,
|
|
7115
|
+
...i === 0 ? { priority: true } : {}
|
|
7116
|
+
}
|
|
7117
|
+
) : /* @__PURE__ */ jsx("div", { className: styles$s.placeholder, "aria-hidden": "true" }),
|
|
7118
|
+
i === 0 && inStock && pct !== void 0 && /* @__PURE__ */ jsx("span", { className: styles$s.saleBadge, children: /* @__PURE__ */ jsx(SaleBadge, { pct }) }),
|
|
7119
|
+
i === 0 && !inStock && /* @__PURE__ */ jsx("span", { className: styles$s.oos, children: "Out of stock" })
|
|
7120
|
+
] }, src ?? i)) }),
|
|
7121
|
+
/* @__PURE__ */ jsxs("div", { className: styles$s.caption, children: [
|
|
7122
|
+
/* @__PURE__ */ jsx("span", { className: styles$s.name, children: product.title }),
|
|
7123
|
+
/* @__PURE__ */ jsxs("span", { className: styles$s.price, children: [
|
|
7124
|
+
/* @__PURE__ */ jsx("span", { className: styles$s.paid, children: format(product.price) }),
|
|
7125
|
+
product.compare_at && /* @__PURE__ */ jsxs("span", { className: styles$s.was, children: [
|
|
7126
|
+
/* @__PURE__ */ jsx("span", { className: "visually-hidden", children: `Was ${format(product.compare_at)}` }),
|
|
7127
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: format(product.compare_at) })
|
|
7128
|
+
] })
|
|
7129
|
+
] })
|
|
7130
|
+
] })
|
|
7131
|
+
] })
|
|
7132
|
+
] });
|
|
7133
|
+
}
|
|
7035
7134
|
const bar$1 = "_bar_fn0g9_1";
|
|
7036
7135
|
const chips$1 = "_chips_fn0g9_8";
|
|
7037
7136
|
const chip$1 = "_chip_fn0g9_8";
|
|
@@ -7133,13 +7232,13 @@ function ProductGrid({
|
|
|
7133
7232
|
/* @__PURE__ */ jsx("div", { ref: sentinelRef, "aria-hidden": "true" })
|
|
7134
7233
|
] });
|
|
7135
7234
|
}
|
|
7136
|
-
const rail = "
|
|
7137
|
-
const header$6 = "
|
|
7138
|
-
const title$d = "
|
|
7139
|
-
const seeAll = "
|
|
7140
|
-
const track$3 = "
|
|
7141
|
-
const item = "
|
|
7142
|
-
const inset = "
|
|
7235
|
+
const rail = "_rail_11l7h_7";
|
|
7236
|
+
const header$6 = "_header_11l7h_14";
|
|
7237
|
+
const title$d = "_title_11l7h_21";
|
|
7238
|
+
const seeAll = "_seeAll_11l7h_27";
|
|
7239
|
+
const track$3 = "_track_11l7h_33";
|
|
7240
|
+
const item = "_item_11l7h_50";
|
|
7241
|
+
const inset = "_inset_11l7h_62";
|
|
7143
7242
|
const styles$p = {
|
|
7144
7243
|
rail,
|
|
7145
7244
|
header: header$6,
|
|
@@ -7208,22 +7307,22 @@ const overlay$2 = "_overlay_s4eai_1";
|
|
|
7208
7307
|
const scrim$4 = "_scrim_s4eai_10";
|
|
7209
7308
|
const sheet$2 = "_sheet_s4eai_16";
|
|
7210
7309
|
const grabArea = "_grabArea_s4eai_41";
|
|
7211
|
-
const grabber
|
|
7310
|
+
const grabber = "_grabber_s4eai_51";
|
|
7212
7311
|
const header$5 = "_header_s4eai_59";
|
|
7213
7312
|
const title$c = "_title_s4eai_67";
|
|
7214
7313
|
const close$2 = "_close_s4eai_71";
|
|
7215
|
-
const body$
|
|
7314
|
+
const body$4 = "_body_s4eai_84";
|
|
7216
7315
|
const footer = "_footer_s4eai_90";
|
|
7217
7316
|
const styles$o = {
|
|
7218
7317
|
overlay: overlay$2,
|
|
7219
7318
|
scrim: scrim$4,
|
|
7220
7319
|
sheet: sheet$2,
|
|
7221
7320
|
grabArea,
|
|
7222
|
-
grabber
|
|
7321
|
+
grabber,
|
|
7223
7322
|
header: header$5,
|
|
7224
7323
|
title: title$c,
|
|
7225
7324
|
close: close$2,
|
|
7226
|
-
body: body$
|
|
7325
|
+
body: body$4,
|
|
7227
7326
|
footer
|
|
7228
7327
|
};
|
|
7229
7328
|
const DISMISS_THRESHOLD_PX = 96;
|
|
@@ -7552,7 +7651,7 @@ function StickyCtaBar({ children, info: info2, variant = "floating" }) {
|
|
|
7552
7651
|
}
|
|
7553
7652
|
const surface = "_surface_1wfue_15";
|
|
7554
7653
|
const screen = "_screen_1wfue_20";
|
|
7555
|
-
const body$
|
|
7654
|
+
const body$3 = "_body_1wfue_12";
|
|
7556
7655
|
const items = "_items_1wfue_34";
|
|
7557
7656
|
const sectionHeader = "_sectionHeader_1wfue_40";
|
|
7558
7657
|
const sectionTitle = "_sectionTitle_1wfue_46";
|
|
@@ -7561,7 +7660,7 @@ const lines = "_lines_1wfue_73";
|
|
|
7561
7660
|
const styles$j = {
|
|
7562
7661
|
surface,
|
|
7563
7662
|
screen,
|
|
7564
|
-
body: body$
|
|
7663
|
+
body: body$3,
|
|
7565
7664
|
items,
|
|
7566
7665
|
sectionHeader,
|
|
7567
7666
|
sectionTitle,
|
|
@@ -7852,79 +7951,177 @@ function MediaGallery({ media: media2, alt }) {
|
|
|
7852
7951
|
)) })
|
|
7853
7952
|
] });
|
|
7854
7953
|
}
|
|
7855
|
-
const scrim$3 = "
|
|
7856
|
-
const sheet$1 = "
|
|
7857
|
-
const
|
|
7858
|
-
const
|
|
7859
|
-
const
|
|
7860
|
-
const
|
|
7861
|
-
const
|
|
7862
|
-
const
|
|
7863
|
-
const
|
|
7954
|
+
const scrim$3 = "_scrim_v44fk_8";
|
|
7955
|
+
const sheet$1 = "_sheet_v44fk_2";
|
|
7956
|
+
const header$4 = "_header_v44fk_42";
|
|
7957
|
+
const slot = "_slot_v44fk_48";
|
|
7958
|
+
const handleSlot = "_handleSlot_v44fk_56";
|
|
7959
|
+
const handle = "_handle_v44fk_56";
|
|
7960
|
+
const closeSlot$1 = "_closeSlot_v44fk_69";
|
|
7961
|
+
const close$1 = "_close_v44fk_69";
|
|
7962
|
+
const body$2 = "_body_v44fk_96";
|
|
7963
|
+
const titles = "_titles_v44fk_116";
|
|
7964
|
+
const title$a = "_title_v44fk_116";
|
|
7965
|
+
const subtitle$3 = "_subtitle_v44fk_132";
|
|
7966
|
+
const units = "_units_v44fk_145";
|
|
7967
|
+
const unit = "_unit_v44fk_145";
|
|
7968
|
+
const unitOn = "_unitOn_v44fk_179";
|
|
7969
|
+
const unitOff = "_unitOff_v44fk_187";
|
|
7970
|
+
const tableWrap = "_tableWrap_v44fk_196";
|
|
7971
|
+
const table = "_table_v44fk_196";
|
|
7972
|
+
const col = "_col_v44fk_221";
|
|
7973
|
+
const colEdge = "_colEdge_v44fk_225";
|
|
7974
|
+
const note = "_note_v44fk_293";
|
|
7975
|
+
const how = "_how_v44fk_305";
|
|
7976
|
+
const howTitle = "_howTitle_v44fk_311";
|
|
7977
|
+
const howList = "_howList_v44fk_319";
|
|
7978
|
+
const howItem = "_howItem_v44fk_326";
|
|
7979
|
+
const howLabel = "_howLabel_v44fk_351";
|
|
7980
|
+
const howText = "_howText_v44fk_361";
|
|
7981
|
+
const fabric = "_fabric_v44fk_370";
|
|
7982
|
+
const fabricLabel = "_fabricLabel_v44fk_378";
|
|
7983
|
+
const fabricText = "_fabricText_v44fk_386";
|
|
7984
|
+
const notes = "_notes_v44fk_397";
|
|
7864
7985
|
const styles$h = {
|
|
7865
7986
|
scrim: scrim$3,
|
|
7866
7987
|
sheet: sheet$1,
|
|
7867
|
-
grabber,
|
|
7868
7988
|
header: header$4,
|
|
7869
|
-
|
|
7989
|
+
slot,
|
|
7990
|
+
handleSlot,
|
|
7991
|
+
handle,
|
|
7992
|
+
closeSlot: closeSlot$1,
|
|
7870
7993
|
close: close$1,
|
|
7994
|
+
body: body$2,
|
|
7995
|
+
titles,
|
|
7996
|
+
title: title$a,
|
|
7997
|
+
subtitle: subtitle$3,
|
|
7998
|
+
units,
|
|
7999
|
+
unit,
|
|
8000
|
+
unitOn,
|
|
8001
|
+
unitOff,
|
|
7871
8002
|
tableWrap,
|
|
7872
8003
|
table,
|
|
8004
|
+
col,
|
|
8005
|
+
colEdge,
|
|
8006
|
+
note,
|
|
8007
|
+
how,
|
|
8008
|
+
howTitle,
|
|
8009
|
+
howList,
|
|
8010
|
+
howItem,
|
|
8011
|
+
howLabel,
|
|
8012
|
+
howText,
|
|
8013
|
+
fabric,
|
|
8014
|
+
fabricLabel,
|
|
8015
|
+
fabricText,
|
|
7873
8016
|
notes
|
|
7874
8017
|
};
|
|
7875
|
-
function
|
|
7876
|
-
|
|
7877
|
-
|
|
7878
|
-
|
|
7879
|
-
|
|
7880
|
-
|
|
8018
|
+
function CloseIcon$1() {
|
|
8019
|
+
return /* @__PURE__ */ jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", "aria-hidden": "true", children: /* @__PURE__ */ jsx("g", { transform: "translate(2.667 2.667)", children: /* @__PURE__ */ jsx(
|
|
8020
|
+
"path",
|
|
8021
|
+
{
|
|
8022
|
+
fillRule: "evenodd",
|
|
8023
|
+
clipRule: "evenodd",
|
|
8024
|
+
d: "M10.6667 1.12866L9.538 0L5.33333 4.21262L1.12866 0L0 1.12866L4.21262 5.33333L0 9.538L1.12866 10.6667L5.33333 6.45405L9.538 10.6667L10.6667 9.538L6.45405 5.33333L10.6667 1.12866Z",
|
|
8025
|
+
fill: "currentColor"
|
|
7881
8026
|
}
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
8027
|
+
) }) });
|
|
8028
|
+
}
|
|
8029
|
+
const CM_PER_INCH = 2.54;
|
|
8030
|
+
const UNIT_LABEL = { cm: "cm", in: "inches" };
|
|
8031
|
+
function otherUnit(unit2) {
|
|
8032
|
+
return unit2 === "cm" ? "in" : "cm";
|
|
8033
|
+
}
|
|
8034
|
+
function convert(cell, from, to) {
|
|
8035
|
+
if (from === to) return cell;
|
|
8036
|
+
const n = Number(cell);
|
|
8037
|
+
if (cell.trim() === "" || !Number.isFinite(n)) return cell;
|
|
8038
|
+
return (to === "in" ? n / CM_PER_INCH : n * CM_PER_INCH).toFixed(1);
|
|
8039
|
+
}
|
|
8040
|
+
function SizeGuideSheet({ guide, onClose }) {
|
|
8041
|
+
const sheetRef = useRef(null);
|
|
7885
8042
|
const columns = guide.columns ?? [];
|
|
7886
|
-
const rows = guide.rows ?? [];
|
|
8043
|
+
const rows = useMemo(() => guide.rows ?? [], [guide.rows]);
|
|
8044
|
+
const measurements = guide.measurements ?? [];
|
|
7887
8045
|
const notes2 = guide.notes ?? [];
|
|
7888
8046
|
const hasTable = columns.length > 0 && rows.length > 0;
|
|
8047
|
+
const authored = guide.unit;
|
|
8048
|
+
const [unit2, setUnit] = useState(authored);
|
|
8049
|
+
const shown = useMemo(
|
|
8050
|
+
() => authored && unit2 && unit2 !== authored ? rows.map((row2) => row2.map((cell) => convert(cell, authored, unit2))) : rows,
|
|
8051
|
+
[rows, authored, unit2]
|
|
8052
|
+
);
|
|
8053
|
+
useModalDialog(true, onClose, sheetRef);
|
|
7889
8054
|
return /* @__PURE__ */ jsx("div", { className: styles$h.scrim, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
7890
|
-
|
|
8055
|
+
ShopSurface,
|
|
7891
8056
|
{
|
|
8057
|
+
tone: "light",
|
|
8058
|
+
ref: sheetRef,
|
|
7892
8059
|
className: styles$h.sheet,
|
|
7893
8060
|
role: "dialog",
|
|
7894
8061
|
"aria-modal": "true",
|
|
7895
8062
|
"aria-labelledby": "size-guide-title",
|
|
7896
8063
|
onClick: (e) => e.stopPropagation(),
|
|
7897
8064
|
children: [
|
|
7898
|
-
/* @__PURE__ */ jsx("div", { className: styles$h.grabber, "aria-hidden": "true" }),
|
|
7899
8065
|
/* @__PURE__ */ jsxs("div", { className: styles$h.header, children: [
|
|
7900
|
-
/* @__PURE__ */ jsx("
|
|
8066
|
+
/* @__PURE__ */ jsx("div", { className: styles$h.slot, "aria-hidden": "true" }),
|
|
8067
|
+
/* @__PURE__ */ jsx("div", { className: styles$h.handleSlot, "aria-hidden": "true", children: /* @__PURE__ */ jsx("div", { className: styles$h.handle }) }),
|
|
7901
8068
|
/* @__PURE__ */ jsx(
|
|
7902
8069
|
"button",
|
|
7903
8070
|
{
|
|
7904
|
-
ref: closeRef,
|
|
7905
8071
|
type: "button",
|
|
7906
|
-
className: styles$h.
|
|
8072
|
+
className: styles$h.closeSlot,
|
|
7907
8073
|
onClick: onClose,
|
|
7908
8074
|
"aria-label": "Close size guide",
|
|
7909
|
-
children: /* @__PURE__ */ jsx("
|
|
7910
|
-
"path",
|
|
7911
|
-
{
|
|
7912
|
-
d: "M4 4l8 8M12 4l-8 8",
|
|
7913
|
-
stroke: "currentColor",
|
|
7914
|
-
strokeWidth: "1.6",
|
|
7915
|
-
strokeLinecap: "round"
|
|
7916
|
-
}
|
|
7917
|
-
) })
|
|
8075
|
+
children: /* @__PURE__ */ jsx("span", { className: styles$h.close, children: /* @__PURE__ */ jsx(CloseIcon$1, {}) })
|
|
7918
8076
|
}
|
|
7919
8077
|
)
|
|
7920
8078
|
] }),
|
|
7921
|
-
|
|
7922
|
-
/* @__PURE__ */
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
8079
|
+
/* @__PURE__ */ jsxs("div", { className: styles$h.body, children: [
|
|
8080
|
+
/* @__PURE__ */ jsxs("div", { className: styles$h.titles, children: [
|
|
8081
|
+
/* @__PURE__ */ jsx("h2", { id: "size-guide-title", className: styles$h.title, children: guide.title }),
|
|
8082
|
+
guide.subtitle && /* @__PURE__ */ jsx("p", { className: styles$h.subtitle, children: guide.subtitle })
|
|
8083
|
+
] }),
|
|
8084
|
+
hasTable && authored && unit2 && /* @__PURE__ */ jsx("div", { className: styles$h.units, role: "radiogroup", "aria-label": "Measurement unit", children: [authored, otherUnit(authored)].map((u) => /* @__PURE__ */ jsx(
|
|
8085
|
+
"button",
|
|
8086
|
+
{
|
|
8087
|
+
type: "button",
|
|
8088
|
+
role: "radio",
|
|
8089
|
+
"aria-checked": u === unit2,
|
|
8090
|
+
className: `${styles$h.unit} ${u === unit2 ? styles$h.unitOn : styles$h.unitOff}`,
|
|
8091
|
+
onClick: () => setUnit(u),
|
|
8092
|
+
children: UNIT_LABEL[u]
|
|
8093
|
+
},
|
|
8094
|
+
u
|
|
8095
|
+
)) }),
|
|
8096
|
+
hasTable && /* The chart can be wider than the sheet, so it scrolls inside its own
|
|
8097
|
+
container rather than making the sheet scroll sideways. */
|
|
8098
|
+
/* @__PURE__ */ jsx("div", { className: styles$h.tableWrap, children: /* @__PURE__ */ jsxs("table", { className: styles$h.table, children: [
|
|
8099
|
+
/* @__PURE__ */ jsx("colgroup", { children: columns.map((c, i) => /* @__PURE__ */ jsx(
|
|
8100
|
+
"col",
|
|
8101
|
+
{
|
|
8102
|
+
className: i === 0 || i === columns.length - 1 ? styles$h.colEdge : styles$h.col
|
|
8103
|
+
},
|
|
8104
|
+
c
|
|
8105
|
+
)) }),
|
|
8106
|
+
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", { children: columns.map((c) => /* @__PURE__ */ jsx("th", { scope: "col", children: c }, c)) }) }),
|
|
8107
|
+
/* @__PURE__ */ jsx("tbody", { children: shown.map((row2, r) => /* @__PURE__ */ jsx("tr", { children: row2.map(
|
|
8108
|
+
(cell, i) => i === 0 ? /* @__PURE__ */ jsx("th", { scope: "row", children: cell }, cell) : /* @__PURE__ */ jsx("td", { children: cell }, `${cell}-${i}`)
|
|
8109
|
+
) }, rows[r]?.join("|") ?? r)) })
|
|
8110
|
+
] }) }),
|
|
8111
|
+
guide.note && /* @__PURE__ */ jsx("p", { className: styles$h.note, children: guide.note }),
|
|
8112
|
+
measurements.length > 0 && /* @__PURE__ */ jsxs("section", { className: styles$h.how, "aria-labelledby": "size-guide-how", children: [
|
|
8113
|
+
/* @__PURE__ */ jsx("h3", { id: "size-guide-how", className: styles$h.howTitle, children: "How to measure" }),
|
|
8114
|
+
/* @__PURE__ */ jsx("dl", { className: styles$h.howList, children: measurements.map((m) => /* @__PURE__ */ jsxs("div", { className: styles$h.howItem, children: [
|
|
8115
|
+
/* @__PURE__ */ jsx("dt", { className: styles$h.howLabel, children: m.label }),
|
|
8116
|
+
/* @__PURE__ */ jsx("dd", { className: styles$h.howText, children: m.description })
|
|
8117
|
+
] }, m.label)) })
|
|
8118
|
+
] }),
|
|
8119
|
+
guide.fabric && /* @__PURE__ */ jsxs("div", { className: styles$h.fabric, children: [
|
|
8120
|
+
/* @__PURE__ */ jsx("p", { className: styles$h.fabricLabel, children: "Fabric" }),
|
|
8121
|
+
/* @__PURE__ */ jsx("p", { className: styles$h.fabricText, children: guide.fabric })
|
|
8122
|
+
] }),
|
|
8123
|
+
notes2.length > 0 && /* @__PURE__ */ jsx("ul", { className: styles$h.notes, children: notes2.map((n) => /* @__PURE__ */ jsx("li", { children: n }, n)) })
|
|
8124
|
+
] })
|
|
7928
8125
|
]
|
|
7929
8126
|
}
|
|
7930
8127
|
) });
|
|
@@ -8587,15 +8784,15 @@ function LifestyleImage({ images }) {
|
|
|
8587
8784
|
)) })
|
|
8588
8785
|
] }) });
|
|
8589
8786
|
}
|
|
8590
|
-
const section$2 = "
|
|
8591
|
-
const track = "
|
|
8592
|
-
const card = "
|
|
8593
|
-
const quote = "
|
|
8594
|
-
const author = "
|
|
8595
|
-
const dots = "
|
|
8596
|
-
const dot = "
|
|
8597
|
-
const dotActive = "
|
|
8598
|
-
const disclaimer = "
|
|
8787
|
+
const section$2 = "_section_kdf3c_1";
|
|
8788
|
+
const track = "_track_kdf3c_8";
|
|
8789
|
+
const card = "_card_kdf3c_38";
|
|
8790
|
+
const quote = "_quote_kdf3c_50";
|
|
8791
|
+
const author = "_author_kdf3c_58";
|
|
8792
|
+
const dots = "_dots_kdf3c_69";
|
|
8793
|
+
const dot = "_dot_kdf3c_69";
|
|
8794
|
+
const dotActive = "_dotActive_kdf3c_85";
|
|
8795
|
+
const disclaimer = "_disclaimer_kdf3c_91";
|
|
8599
8796
|
const styles$6 = {
|
|
8600
8797
|
section: section$2,
|
|
8601
8798
|
track,
|
|
@@ -8630,10 +8827,10 @@ function ReviewCarousel({ quotes, disclaimer: disclaimer2 }) {
|
|
|
8630
8827
|
disclaimer2 && /* @__PURE__ */ jsx("p", { className: styles$6.disclaimer, children: disclaimer2 })
|
|
8631
8828
|
] });
|
|
8632
8829
|
}
|
|
8633
|
-
const section$1 = "
|
|
8634
|
-
const row$2 = "
|
|
8635
|
-
const title$4 = "
|
|
8636
|
-
const body = "
|
|
8830
|
+
const section$1 = "_section_1tevp_1";
|
|
8831
|
+
const row$2 = "_row_1tevp_9";
|
|
8832
|
+
const title$4 = "_title_1tevp_21";
|
|
8833
|
+
const body = "_body_1tevp_38";
|
|
8637
8834
|
const styles$5 = {
|
|
8638
8835
|
section: section$1,
|
|
8639
8836
|
row: row$2,
|
|
@@ -8646,10 +8843,10 @@ function WhyUs({ items: items2 }) {
|
|
|
8646
8843
|
/* @__PURE__ */ jsx("p", { className: styles$5.body, children: it.body })
|
|
8647
8844
|
] }, i)) });
|
|
8648
8845
|
}
|
|
8649
|
-
const section = "
|
|
8650
|
-
const title$3 = "
|
|
8651
|
-
const list$1 = "
|
|
8652
|
-
const row$1 = "
|
|
8846
|
+
const section = "_section_snuuj_1";
|
|
8847
|
+
const title$3 = "_title_snuuj_10";
|
|
8848
|
+
const list$1 = "_list_snuuj_17";
|
|
8849
|
+
const row$1 = "_row_snuuj_32";
|
|
8653
8850
|
const styles$4 = {
|
|
8654
8851
|
section,
|
|
8655
8852
|
title: title$3,
|
|
@@ -8690,11 +8887,13 @@ function Block({ block }) {
|
|
|
8690
8887
|
block.title && /* @__PURE__ */ jsx("h2", { className: styles$3.blockTitle, children: block.title }),
|
|
8691
8888
|
/* @__PURE__ */ jsx(ProductTile, { product: block.product, priority: true, size: "large" })
|
|
8692
8889
|
] });
|
|
8890
|
+
case "product_gallery":
|
|
8891
|
+
return /* @__PURE__ */ jsx(ProductGallery, { title: block.title, product: block.product });
|
|
8693
8892
|
case "lifestyle_image":
|
|
8694
8893
|
return /* @__PURE__ */ jsx(LifestyleImage, { images: block.images });
|
|
8695
8894
|
case "grid":
|
|
8696
8895
|
return /* @__PURE__ */ jsxs("div", { className: styles$3.gridBlock, children: [
|
|
8697
|
-
/* @__PURE__ */ jsx("h2", { className: styles$3.blockTitle, children: block.title }),
|
|
8896
|
+
block.title && /* @__PURE__ */ jsx("h2", { className: styles$3.blockTitle, children: block.title }),
|
|
8698
8897
|
/* @__PURE__ */ jsx("ul", { className: styles$3.grid, children: block.products.map((p) => /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx(ProductTile, { product: p }) }, p.sku)) })
|
|
8699
8898
|
] });
|
|
8700
8899
|
case "review":
|
|
@@ -9035,17 +9234,17 @@ function useCartCount() {
|
|
|
9035
9234
|
}, [subscribe]);
|
|
9036
9235
|
return count2;
|
|
9037
9236
|
}
|
|
9038
|
-
const header$1 = "
|
|
9039
|
-
const floating = "
|
|
9040
|
-
const scrolled = "
|
|
9041
|
-
const title$1 = "
|
|
9042
|
-
const right = "
|
|
9043
|
-
const spacer = "
|
|
9044
|
-
const iconBtn = "
|
|
9045
|
-
const menuBtn = "
|
|
9046
|
-
const badge = "
|
|
9047
|
-
const closeSlot = "
|
|
9048
|
-
const centred = "
|
|
9237
|
+
const header$1 = "_header_oq0bd_25";
|
|
9238
|
+
const floating = "_floating_oq0bd_44";
|
|
9239
|
+
const scrolled = "_scrolled_oq0bd_87";
|
|
9240
|
+
const title$1 = "_title_oq0bd_161";
|
|
9241
|
+
const right = "_right_oq0bd_174";
|
|
9242
|
+
const spacer = "_spacer_oq0bd_187";
|
|
9243
|
+
const iconBtn = "_iconBtn_oq0bd_192";
|
|
9244
|
+
const menuBtn = "_menuBtn_oq0bd_219";
|
|
9245
|
+
const badge = "_badge_oq0bd_247";
|
|
9246
|
+
const closeSlot = "_closeSlot_oq0bd_274";
|
|
9247
|
+
const centred = "_centred_oq0bd_289";
|
|
9049
9248
|
const styles$1 = {
|
|
9050
9249
|
header: header$1,
|
|
9051
9250
|
floating,
|
|
@@ -9378,6 +9577,7 @@ export {
|
|
|
9378
9577
|
PriceBlock,
|
|
9379
9578
|
ProductDetail,
|
|
9380
9579
|
ProductDetails,
|
|
9580
|
+
ProductGallery,
|
|
9381
9581
|
ProductGrid,
|
|
9382
9582
|
ProductTile,
|
|
9383
9583
|
ProductView,
|