@sazito/checkout 0.4.0 → 0.4.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/README.md +46 -1
- package/dist/chunks/{labels-CnPllzhT.cjs → labels-DlZCs2z3.cjs} +24 -10
- package/dist/chunks/labels-DlZCs2z3.cjs.map +1 -0
- package/dist/chunks/{labels-e8w4zRbg.js → labels-DxIkDijU.js} +24 -10
- package/dist/chunks/labels-DxIkDijU.js.map +1 -0
- package/dist/chunks/{use-checkout-DPtLgxlA.cjs → use-checkout-BPcxdj0A.cjs} +31 -10
- package/dist/chunks/use-checkout-BPcxdj0A.cjs.map +1 -0
- package/dist/chunks/{use-checkout-BM810__v.js → use-checkout-tQfM_-7X.js} +31 -10
- package/dist/chunks/use-checkout-tQfM_-7X.js.map +1 -0
- package/dist/core/index.cjs +2 -1
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +14 -2
- package/dist/core/index.d.ts +14 -2
- package/dist/core/index.js +2 -2
- package/dist/next/index.cjs +48 -11
- package/dist/next/index.cjs.map +1 -1
- package/dist/next/index.d.cts +26 -4
- package/dist/next/index.d.ts +26 -4
- package/dist/next/index.js +49 -12
- package/dist/next/index.js.map +1 -1
- package/dist/next/payment-return.cjs +40 -0
- package/dist/next/payment-return.cjs.map +1 -1
- package/dist/next/payment-return.d.cts +7 -1
- package/dist/next/payment-return.d.ts +7 -1
- package/dist/next/payment-return.js +40 -1
- package/dist/next/payment-return.js.map +1 -1
- package/dist/react/index.cjs +3 -2
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +6 -0
- package/dist/react/index.d.ts +6 -0
- package/dist/react/index.js +3 -2
- package/dist/react/index.js.map +1 -1
- package/dist/styles.css +263 -5
- package/package.json +1 -1
- package/dist/chunks/labels-CnPllzhT.cjs.map +0 -1
- package/dist/chunks/labels-e8w4zRbg.js.map +0 -1
- package/dist/chunks/use-checkout-BM810__v.js.map +0 -1
- package/dist/chunks/use-checkout-DPtLgxlA.cjs.map +0 -1
|
@@ -25,6 +25,45 @@ function parsePaymentReturn(segments, searchParams = {}) {
|
|
|
25
25
|
params
|
|
26
26
|
};
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Parse a complete checkout URL containing Sazito's nested payment callback.
|
|
30
|
+
* The callback may be mounted below any checkout base path; only its final
|
|
31
|
+
* five path segments are significant.
|
|
32
|
+
*/
|
|
33
|
+
function parsePaymentReturnUrl(url) {
|
|
34
|
+
let parsedUrl;
|
|
35
|
+
try {
|
|
36
|
+
parsedUrl = typeof url === 'string'
|
|
37
|
+
? new URL(url, 'https://checkout.sazito.invalid')
|
|
38
|
+
: url;
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return undefined;
|
|
42
|
+
}
|
|
43
|
+
const segments = parsedUrl.pathname
|
|
44
|
+
.split('/')
|
|
45
|
+
.filter(Boolean)
|
|
46
|
+
.map(decodePathSegment);
|
|
47
|
+
if (segments.length < 5) {
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
const searchParams = {};
|
|
51
|
+
for (const [key, value] of parsedUrl.searchParams) {
|
|
52
|
+
// Match Next.js search-param normalization: preserve the first value.
|
|
53
|
+
if (searchParams[key] === undefined) {
|
|
54
|
+
searchParams[key] = value;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return parsePaymentReturn(segments.slice(-5), searchParams);
|
|
58
|
+
}
|
|
59
|
+
function decodePathSegment(segment) {
|
|
60
|
+
try {
|
|
61
|
+
return decodeURIComponent(segment);
|
|
62
|
+
}
|
|
63
|
+
catch {
|
|
64
|
+
return segment;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
28
67
|
function normalizeSearchParams(searchParams) {
|
|
29
68
|
const normalized = {};
|
|
30
69
|
for (const [key, value] of Object.entries(searchParams)) {
|
|
@@ -37,4 +76,5 @@ function normalizeSearchParams(searchParams) {
|
|
|
37
76
|
}
|
|
38
77
|
|
|
39
78
|
exports.parsePaymentReturn = parsePaymentReturn;
|
|
79
|
+
exports.parsePaymentReturnUrl = parsePaymentReturnUrl;
|
|
40
80
|
//# sourceMappingURL=payment-return.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-return.cjs","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":";;AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB
|
|
1
|
+
{"version":3,"file":"payment-return.cjs","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\n/**\n * Parse a complete checkout URL containing Sazito's nested payment callback.\n * The callback may be mounted below any checkout base path; only its final\n * five path segments are significant.\n */\nexport function parsePaymentReturnUrl(\n url: string | URL\n): CheckoutPaymentReturn | undefined {\n let parsedUrl: URL;\n\n try {\n parsedUrl = typeof url === 'string'\n ? new URL(url, 'https://checkout.sazito.invalid')\n : url;\n } catch {\n return undefined;\n }\n\n const segments = parsedUrl.pathname\n .split('/')\n .filter(Boolean)\n .map(decodePathSegment);\n\n if (segments.length < 5) {\n return undefined;\n }\n\n const searchParams: Record<string, string> = {};\n for (const [key, value] of parsedUrl.searchParams) {\n // Match Next.js search-param normalization: preserve the first value.\n if (searchParams[key] === undefined) {\n searchParams[key] = value;\n }\n }\n\n return parsePaymentReturn(segments.slice(-5), searchParams);\n}\n\nfunction decodePathSegment(segment: string): string {\n try {\n return decodeURIComponent(segment);\n } catch {\n return segment;\n }\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":";;AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA;;;;AAIG;AACG,SAAU,qBAAqB,CACnC,GAAiB,EAAA;AAEjB,IAAA,IAAI,SAAc;AAElB,IAAA,IAAI;AACF,QAAA,SAAS,GAAG,OAAO,GAAG,KAAK;AACzB,cAAE,IAAI,GAAG,CAAC,GAAG,EAAE,iCAAiC;cAC9C,GAAG;IACT;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,QAAQ,GAAG,SAAS,CAAC;SACxB,KAAK,CAAC,GAAG;SACT,MAAM,CAAC,OAAO;SACd,GAAG,CAAC,iBAAiB,CAAC;AAEzB,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;AACvB,QAAA,OAAO,SAAS;IAClB;IAEA,MAAM,YAAY,GAA2B,EAAE;IAC/C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,YAAY,EAAE;;AAEjD,QAAA,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACnC,YAAA,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK;QAC3B;IACF;AAEA,IAAA,OAAO,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC;AAC7D;AAEA,SAAS,iBAAiB,CAAC,OAAe,EAAA;AACxC,IAAA,IAAI;AACF,QAAA,OAAO,kBAAkB,CAAC,OAAO,CAAC;IACpC;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,OAAO;IAChB;AACF;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;;;;;"}
|
|
@@ -21,6 +21,12 @@ type PaymentReturnSearchParams = Record<string, string | string[] | undefined>;
|
|
|
21
21
|
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
22
22
|
*/
|
|
23
23
|
declare function parsePaymentReturn(segments: readonly string[] | undefined, searchParams?: PaymentReturnSearchParams): CheckoutPaymentReturn | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Parse a complete checkout URL containing Sazito's nested payment callback.
|
|
26
|
+
* The callback may be mounted below any checkout base path; only its final
|
|
27
|
+
* five path segments are significant.
|
|
28
|
+
*/
|
|
29
|
+
declare function parsePaymentReturnUrl(url: string | URL): CheckoutPaymentReturn | undefined;
|
|
24
30
|
|
|
25
|
-
export { parsePaymentReturn };
|
|
31
|
+
export { parsePaymentReturn, parsePaymentReturnUrl };
|
|
26
32
|
export type { CheckoutPaymentReturn, PaymentReturnSearchParams };
|
|
@@ -21,6 +21,12 @@ type PaymentReturnSearchParams = Record<string, string | string[] | undefined>;
|
|
|
21
21
|
* Returns undefined for ordinary checkout URLs and malformed callbacks.
|
|
22
22
|
*/
|
|
23
23
|
declare function parsePaymentReturn(segments: readonly string[] | undefined, searchParams?: PaymentReturnSearchParams): CheckoutPaymentReturn | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Parse a complete checkout URL containing Sazito's nested payment callback.
|
|
26
|
+
* The callback may be mounted below any checkout base path; only its final
|
|
27
|
+
* five path segments are significant.
|
|
28
|
+
*/
|
|
29
|
+
declare function parsePaymentReturnUrl(url: string | URL): CheckoutPaymentReturn | undefined;
|
|
24
30
|
|
|
25
|
-
export { parsePaymentReturn };
|
|
31
|
+
export { parsePaymentReturn, parsePaymentReturnUrl };
|
|
26
32
|
export type { CheckoutPaymentReturn, PaymentReturnSearchParams };
|
|
@@ -23,6 +23,45 @@ function parsePaymentReturn(segments, searchParams = {}) {
|
|
|
23
23
|
params
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* Parse a complete checkout URL containing Sazito's nested payment callback.
|
|
28
|
+
* The callback may be mounted below any checkout base path; only its final
|
|
29
|
+
* five path segments are significant.
|
|
30
|
+
*/
|
|
31
|
+
function parsePaymentReturnUrl(url) {
|
|
32
|
+
let parsedUrl;
|
|
33
|
+
try {
|
|
34
|
+
parsedUrl = typeof url === 'string'
|
|
35
|
+
? new URL(url, 'https://checkout.sazito.invalid')
|
|
36
|
+
: url;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
const segments = parsedUrl.pathname
|
|
42
|
+
.split('/')
|
|
43
|
+
.filter(Boolean)
|
|
44
|
+
.map(decodePathSegment);
|
|
45
|
+
if (segments.length < 5) {
|
|
46
|
+
return undefined;
|
|
47
|
+
}
|
|
48
|
+
const searchParams = {};
|
|
49
|
+
for (const [key, value] of parsedUrl.searchParams) {
|
|
50
|
+
// Match Next.js search-param normalization: preserve the first value.
|
|
51
|
+
if (searchParams[key] === undefined) {
|
|
52
|
+
searchParams[key] = value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
return parsePaymentReturn(segments.slice(-5), searchParams);
|
|
56
|
+
}
|
|
57
|
+
function decodePathSegment(segment) {
|
|
58
|
+
try {
|
|
59
|
+
return decodeURIComponent(segment);
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return segment;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
26
65
|
function normalizeSearchParams(searchParams) {
|
|
27
66
|
const normalized = {};
|
|
28
67
|
for (const [key, value] of Object.entries(searchParams)) {
|
|
@@ -34,5 +73,5 @@ function normalizeSearchParams(searchParams) {
|
|
|
34
73
|
return normalized;
|
|
35
74
|
}
|
|
36
75
|
|
|
37
|
-
export { parsePaymentReturn };
|
|
76
|
+
export { parsePaymentReturn, parsePaymentReturnUrl };
|
|
38
77
|
//# sourceMappingURL=payment-return.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payment-return.js","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":"AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;;;;"}
|
|
1
|
+
{"version":3,"file":"payment-return.js","sources":["../../src/core/payment-return.ts"],"sourcesContent":["import type {\n CheckoutPaymentReturn,\n PaymentReturnSearchParams\n} from './types';\n\n/**\n * Parse Sazito's nested payment callback path into checkout-ready data.\n * Returns undefined for ordinary checkout URLs and malformed callbacks.\n */\nexport function parsePaymentReturn(\n segments: readonly string[] | undefined,\n searchParams: PaymentReturnSearchParams = {}\n): CheckoutPaymentReturn | undefined {\n const [resultRoute, paymentSegment, rawPaymentId, identifierSegment, rawIdentifier] =\n segments ?? [];\n const paymentId = Number(rawPaymentId);\n const identifier = rawIdentifier?.trim();\n\n if (\n segments?.length !== 5 ||\n !resultRoute?.toLowerCase().endsWith('result') ||\n paymentSegment?.toLowerCase() !== 'payment' ||\n identifierSegment?.toLowerCase() !== 'identifier' ||\n !Number.isSafeInteger(paymentId) ||\n paymentId <= 0 ||\n !identifier\n ) {\n return undefined;\n }\n\n const params = normalizeSearchParams(searchParams);\n params.id = String(paymentId);\n params.paymentIdentifier = identifier;\n\n return {\n payment: { id: paymentId, identifier },\n params\n };\n}\n\n/**\n * Parse a complete checkout URL containing Sazito's nested payment callback.\n * The callback may be mounted below any checkout base path; only its final\n * five path segments are significant.\n */\nexport function parsePaymentReturnUrl(\n url: string | URL\n): CheckoutPaymentReturn | undefined {\n let parsedUrl: URL;\n\n try {\n parsedUrl = typeof url === 'string'\n ? new URL(url, 'https://checkout.sazito.invalid')\n : url;\n } catch {\n return undefined;\n }\n\n const segments = parsedUrl.pathname\n .split('/')\n .filter(Boolean)\n .map(decodePathSegment);\n\n if (segments.length < 5) {\n return undefined;\n }\n\n const searchParams: Record<string, string> = {};\n for (const [key, value] of parsedUrl.searchParams) {\n // Match Next.js search-param normalization: preserve the first value.\n if (searchParams[key] === undefined) {\n searchParams[key] = value;\n }\n }\n\n return parsePaymentReturn(segments.slice(-5), searchParams);\n}\n\nfunction decodePathSegment(segment: string): string {\n try {\n return decodeURIComponent(segment);\n } catch {\n return segment;\n }\n}\n\nfunction normalizeSearchParams(\n searchParams: PaymentReturnSearchParams\n): Record<string, string> {\n const normalized: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(searchParams)) {\n const firstValue = Array.isArray(value) ? value[0] : value;\n if (firstValue !== undefined) {\n normalized[key] = firstValue;\n }\n }\n\n return normalized;\n}\n"],"names":[],"mappings":"AAKA;;;AAGG;SACa,kBAAkB,CAChC,QAAuC,EACvC,eAA0C,EAAE,EAAA;AAE5C,IAAA,MAAM,CAAC,WAAW,EAAE,cAAc,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,CAAC,GACjF,QAAQ,IAAI,EAAE;AAChB,IAAA,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,aAAa,EAAE,IAAI,EAAE;AAExC,IAAA,IACE,QAAQ,EAAE,MAAM,KAAK,CAAC;QACtB,CAAC,WAAW,EAAE,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC;AAC9C,QAAA,cAAc,EAAE,WAAW,EAAE,KAAK,SAAS;AAC3C,QAAA,iBAAiB,EAAE,WAAW,EAAE,KAAK,YAAY;AACjD,QAAA,CAAC,MAAM,CAAC,aAAa,CAAC,SAAS,CAAC;AAChC,QAAA,SAAS,IAAI,CAAC;QACd,CAAC,UAAU,EACX;AACA,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,YAAY,CAAC;AAClD,IAAA,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;AAC7B,IAAA,MAAM,CAAC,iBAAiB,GAAG,UAAU;IAErC,OAAO;AACL,QAAA,OAAO,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,UAAU,EAAE;QACtC;KACD;AACH;AAEA;;;;AAIG;AACG,SAAU,qBAAqB,CACnC,GAAiB,EAAA;AAEjB,IAAA,IAAI,SAAc;AAElB,IAAA,IAAI;AACF,QAAA,SAAS,GAAG,OAAO,GAAG,KAAK;AACzB,cAAE,IAAI,GAAG,CAAC,GAAG,EAAE,iCAAiC;cAC9C,GAAG;IACT;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,MAAM,QAAQ,GAAG,SAAS,CAAC;SACxB,KAAK,CAAC,GAAG;SACT,MAAM,CAAC,OAAO;SACd,GAAG,CAAC,iBAAiB,CAAC;AAEzB,IAAA,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;AACvB,QAAA,OAAO,SAAS;IAClB;IAEA,MAAM,YAAY,GAA2B,EAAE;IAC/C,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,SAAS,CAAC,YAAY,EAAE;;AAEjD,QAAA,IAAI,YAAY,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE;AACnC,YAAA,YAAY,CAAC,GAAG,CAAC,GAAG,KAAK;QAC3B;IACF;AAEA,IAAA,OAAO,kBAAkB,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,YAAY,CAAC;AAC7D;AAEA,SAAS,iBAAiB,CAAC,OAAe,EAAA;AACxC,IAAA,IAAI;AACF,QAAA,OAAO,kBAAkB,CAAC,OAAO,CAAC;IACpC;AAAE,IAAA,MAAM;AACN,QAAA,OAAO,OAAO;IAChB;AACF;AAEA,SAAS,qBAAqB,CAC5B,YAAuC,EAAA;IAEvC,MAAM,UAAU,GAA2B,EAAE;AAE7C,IAAA,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE;AACvD,QAAA,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK;AAC1D,QAAA,IAAI,UAAU,KAAK,SAAS,EAAE;AAC5B,YAAA,UAAU,CAAC,GAAG,CAAC,GAAG,UAAU;QAC9B;IACF;AAEA,IAAA,OAAO,UAAU;AACnB;;;;"}
|
package/dist/react/index.cjs
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var useCheckout = require('../chunks/use-checkout-
|
|
4
|
+
var useCheckout = require('../chunks/use-checkout-BPcxdj0A.cjs');
|
|
5
5
|
require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
|
-
require('../
|
|
7
|
+
require('../next/payment-return.cjs');
|
|
8
|
+
require('../chunks/labels-DlZCs2z3.cjs');
|
|
8
9
|
require('@sazito/client-sdk');
|
|
9
10
|
|
|
10
11
|
|
package/dist/react/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|
package/dist/react/index.d.cts
CHANGED
|
@@ -331,6 +331,12 @@ interface Strings {
|
|
|
331
331
|
paymentPending: string;
|
|
332
332
|
paymentPendingHint: string;
|
|
333
333
|
orderNumber: string;
|
|
334
|
+
orderId: string;
|
|
335
|
+
orderConfirmedHint: string;
|
|
336
|
+
orderDetails: string;
|
|
337
|
+
orderItems: string;
|
|
338
|
+
product: string;
|
|
339
|
+
lineTotal: string;
|
|
334
340
|
tryAgain: string;
|
|
335
341
|
loading: string;
|
|
336
342
|
processing: string;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -331,6 +331,12 @@ interface Strings {
|
|
|
331
331
|
paymentPending: string;
|
|
332
332
|
paymentPendingHint: string;
|
|
333
333
|
orderNumber: string;
|
|
334
|
+
orderId: string;
|
|
335
|
+
orderConfirmedHint: string;
|
|
336
|
+
orderDetails: string;
|
|
337
|
+
orderItems: string;
|
|
338
|
+
product: string;
|
|
339
|
+
lineTotal: string;
|
|
334
340
|
tryAgain: string;
|
|
335
341
|
loading: string;
|
|
336
342
|
processing: string;
|
package/dist/react/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
export { C as CheckoutProvider, S as SazitoProvider, u as useCheckout, a as useCheckoutEngine, b as useSazitoClient } from '../chunks/use-checkout-
|
|
2
|
+
export { C as CheckoutProvider, S as SazitoProvider, u as useCheckout, a as useCheckoutEngine, b as useSazitoClient } from '../chunks/use-checkout-tQfM_-7X.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../
|
|
5
|
+
import '../next/payment-return.js';
|
|
6
|
+
import '../chunks/labels-DxIkDijU.js';
|
|
6
7
|
import '@sazito/client-sdk';
|
|
7
8
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/styles.css
CHANGED
|
@@ -1661,19 +1661,24 @@
|
|
|
1661
1661
|
|
|
1662
1662
|
/* ---- result --------------------------------------------------------- */
|
|
1663
1663
|
.szc-result-wrap {
|
|
1664
|
-
padding: 24px;
|
|
1664
|
+
padding: 24px 24px 48px;
|
|
1665
1665
|
display: flex;
|
|
1666
1666
|
justify-content: center;
|
|
1667
1667
|
}
|
|
1668
1668
|
.szc-result {
|
|
1669
|
-
max-width:
|
|
1669
|
+
max-width: 960px;
|
|
1670
1670
|
width: 100%;
|
|
1671
|
+
display: flex;
|
|
1672
|
+
flex-direction: column;
|
|
1673
|
+
gap: 24px;
|
|
1674
|
+
}
|
|
1675
|
+
.szc-result__hero {
|
|
1671
1676
|
text-align: center;
|
|
1672
1677
|
display: flex;
|
|
1673
1678
|
flex-direction: column;
|
|
1674
1679
|
align-items: center;
|
|
1675
1680
|
gap: 12px;
|
|
1676
|
-
padding: 40px 24px;
|
|
1681
|
+
padding: 40px 24px 32px;
|
|
1677
1682
|
border: 1px solid var(--szc-border);
|
|
1678
1683
|
border-radius: calc(var(--szc-radius) * 1.2);
|
|
1679
1684
|
background: var(--szc-card);
|
|
@@ -1692,8 +1697,45 @@
|
|
|
1692
1697
|
margin: 4px 0 0;
|
|
1693
1698
|
font-size: 20px;
|
|
1694
1699
|
}
|
|
1695
|
-
.szc-
|
|
1696
|
-
|
|
1700
|
+
.szc-result__hint {
|
|
1701
|
+
max-width: 560px;
|
|
1702
|
+
margin: 0;
|
|
1703
|
+
color: var(--szc-muted-fg);
|
|
1704
|
+
font-size: 13.5px;
|
|
1705
|
+
line-height: 1.8;
|
|
1706
|
+
}
|
|
1707
|
+
.szc-result__reference {
|
|
1708
|
+
width: min(100%, 540px);
|
|
1709
|
+
display: grid;
|
|
1710
|
+
grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.8fr);
|
|
1711
|
+
margin: 6px 0 0;
|
|
1712
|
+
border: 1px solid color-mix(in srgb, var(--szc-success) 30%, var(--szc-border));
|
|
1713
|
+
border-radius: calc(var(--szc-radius) * 0.85);
|
|
1714
|
+
overflow: hidden;
|
|
1715
|
+
background: color-mix(in srgb, var(--szc-success) 5%, var(--szc-card));
|
|
1716
|
+
}
|
|
1717
|
+
.szc-result__reference > div {
|
|
1718
|
+
min-width: 0;
|
|
1719
|
+
padding: 14px 18px;
|
|
1720
|
+
}
|
|
1721
|
+
.szc-result__reference > div + div {
|
|
1722
|
+
border-inline-start: 1px solid var(--szc-border);
|
|
1723
|
+
}
|
|
1724
|
+
.szc-result__reference dt {
|
|
1725
|
+
margin-bottom: 4px;
|
|
1726
|
+
color: var(--szc-muted-fg);
|
|
1727
|
+
font-size: 12px;
|
|
1728
|
+
}
|
|
1729
|
+
.szc-result__reference dd {
|
|
1730
|
+
margin: 0;
|
|
1731
|
+
font-size: 15px;
|
|
1732
|
+
font-weight: 700;
|
|
1733
|
+
overflow-wrap: anywhere;
|
|
1734
|
+
}
|
|
1735
|
+
.szc-result__reference-primary dd {
|
|
1736
|
+
color: var(--szc-success);
|
|
1737
|
+
font-size: 18px;
|
|
1738
|
+
letter-spacing: 0.02em;
|
|
1697
1739
|
}
|
|
1698
1740
|
.szc-result__actions {
|
|
1699
1741
|
display: flex;
|
|
@@ -1702,6 +1744,222 @@
|
|
|
1702
1744
|
flex-wrap: wrap;
|
|
1703
1745
|
justify-content: center;
|
|
1704
1746
|
}
|
|
1747
|
+
.szc-result__details {
|
|
1748
|
+
display: flex;
|
|
1749
|
+
flex-direction: column;
|
|
1750
|
+
gap: 14px;
|
|
1751
|
+
}
|
|
1752
|
+
.szc-result__details-title {
|
|
1753
|
+
margin: 0 2px 2px;
|
|
1754
|
+
font-size: 18px;
|
|
1755
|
+
}
|
|
1756
|
+
.szc-result__section {
|
|
1757
|
+
display: flex;
|
|
1758
|
+
flex-direction: column;
|
|
1759
|
+
gap: 10px;
|
|
1760
|
+
}
|
|
1761
|
+
.szc-result__section-title {
|
|
1762
|
+
margin: 0 2px;
|
|
1763
|
+
font-size: 14px;
|
|
1764
|
+
}
|
|
1765
|
+
.szc-result-shipping-list {
|
|
1766
|
+
display: grid;
|
|
1767
|
+
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
|
1768
|
+
gap: 10px;
|
|
1769
|
+
}
|
|
1770
|
+
.szc-result-group {
|
|
1771
|
+
overflow: hidden;
|
|
1772
|
+
border: 1px solid var(--szc-border);
|
|
1773
|
+
border-radius: calc(var(--szc-radius) * 0.9);
|
|
1774
|
+
background: var(--szc-card);
|
|
1775
|
+
}
|
|
1776
|
+
.szc-result-group__head {
|
|
1777
|
+
min-height: 66px;
|
|
1778
|
+
display: flex;
|
|
1779
|
+
align-items: center;
|
|
1780
|
+
gap: 12px;
|
|
1781
|
+
padding: 12px 16px;
|
|
1782
|
+
border-bottom: 1px solid var(--szc-border);
|
|
1783
|
+
background: color-mix(in srgb, var(--szc-muted) 46%, var(--szc-card));
|
|
1784
|
+
}
|
|
1785
|
+
.szc-result-group__mark {
|
|
1786
|
+
width: 40px;
|
|
1787
|
+
height: 40px;
|
|
1788
|
+
flex: none;
|
|
1789
|
+
display: inline-flex;
|
|
1790
|
+
align-items: center;
|
|
1791
|
+
justify-content: center;
|
|
1792
|
+
overflow: hidden;
|
|
1793
|
+
border-radius: calc(var(--szc-radius) * 0.55);
|
|
1794
|
+
background: color-mix(in srgb, var(--szc-accent) 10%, var(--szc-card));
|
|
1795
|
+
color: var(--szc-accent);
|
|
1796
|
+
}
|
|
1797
|
+
.szc-result-group__mark img {
|
|
1798
|
+
width: 100%;
|
|
1799
|
+
height: 100%;
|
|
1800
|
+
padding: 7px;
|
|
1801
|
+
object-fit: contain;
|
|
1802
|
+
}
|
|
1803
|
+
.szc-result-group__title {
|
|
1804
|
+
min-width: 0;
|
|
1805
|
+
flex: 1;
|
|
1806
|
+
margin: 0;
|
|
1807
|
+
font-size: 14px;
|
|
1808
|
+
font-weight: 700;
|
|
1809
|
+
}
|
|
1810
|
+
.szc-result-group__price {
|
|
1811
|
+
color: var(--szc-muted-fg);
|
|
1812
|
+
font-size: 12.5px;
|
|
1813
|
+
white-space: nowrap;
|
|
1814
|
+
}
|
|
1815
|
+
.szc-result-items__head,
|
|
1816
|
+
.szc-result-item {
|
|
1817
|
+
display: grid;
|
|
1818
|
+
grid-template-columns: minmax(0, 1fr) 100px 160px;
|
|
1819
|
+
align-items: center;
|
|
1820
|
+
gap: 16px;
|
|
1821
|
+
}
|
|
1822
|
+
.szc-result-items__head {
|
|
1823
|
+
padding: 12px 16px;
|
|
1824
|
+
color: var(--szc-muted-fg);
|
|
1825
|
+
font-size: 11.5px;
|
|
1826
|
+
font-weight: 600;
|
|
1827
|
+
}
|
|
1828
|
+
.szc-result-items {
|
|
1829
|
+
list-style: none;
|
|
1830
|
+
margin: 0;
|
|
1831
|
+
padding: 0 16px 10px;
|
|
1832
|
+
}
|
|
1833
|
+
.szc-result-item {
|
|
1834
|
+
min-height: 78px;
|
|
1835
|
+
padding: 10px 0;
|
|
1836
|
+
border-top: 1px solid var(--szc-border);
|
|
1837
|
+
font-size: 13.5px;
|
|
1838
|
+
}
|
|
1839
|
+
.szc-result-item__product {
|
|
1840
|
+
min-width: 0;
|
|
1841
|
+
display: flex;
|
|
1842
|
+
align-items: center;
|
|
1843
|
+
gap: 12px;
|
|
1844
|
+
}
|
|
1845
|
+
.szc-result-item__product > span:last-child {
|
|
1846
|
+
min-width: 0;
|
|
1847
|
+
display: flex;
|
|
1848
|
+
flex-direction: column;
|
|
1849
|
+
gap: 4px;
|
|
1850
|
+
}
|
|
1851
|
+
.szc-result-item__product strong {
|
|
1852
|
+
overflow: hidden;
|
|
1853
|
+
text-overflow: ellipsis;
|
|
1854
|
+
white-space: nowrap;
|
|
1855
|
+
}
|
|
1856
|
+
.szc-result-item__product small {
|
|
1857
|
+
color: var(--szc-muted-fg);
|
|
1858
|
+
overflow: hidden;
|
|
1859
|
+
text-overflow: ellipsis;
|
|
1860
|
+
white-space: nowrap;
|
|
1861
|
+
}
|
|
1862
|
+
.szc-result-item__thumb {
|
|
1863
|
+
width: 52px;
|
|
1864
|
+
height: 52px;
|
|
1865
|
+
flex: none;
|
|
1866
|
+
border: 1px solid var(--szc-border);
|
|
1867
|
+
border-radius: calc(var(--szc-radius) * 0.45);
|
|
1868
|
+
object-fit: cover;
|
|
1869
|
+
background: var(--szc-muted);
|
|
1870
|
+
}
|
|
1871
|
+
.szc-result-item__quantity,
|
|
1872
|
+
.szc-result-item__total {
|
|
1873
|
+
white-space: nowrap;
|
|
1874
|
+
}
|
|
1875
|
+
.szc-result-item__total {
|
|
1876
|
+
font-weight: 650;
|
|
1877
|
+
}
|
|
1878
|
+
.szc-result-item__mobile-label {
|
|
1879
|
+
display: none;
|
|
1880
|
+
}
|
|
1881
|
+
.szc-result-summary {
|
|
1882
|
+
width: min(100%, 460px);
|
|
1883
|
+
align-self: flex-end;
|
|
1884
|
+
margin: 0;
|
|
1885
|
+
padding: 18px;
|
|
1886
|
+
display: flex;
|
|
1887
|
+
flex-direction: column;
|
|
1888
|
+
gap: 12px;
|
|
1889
|
+
border: 1px solid var(--szc-border);
|
|
1890
|
+
border-radius: calc(var(--szc-radius) * 0.9);
|
|
1891
|
+
background: var(--szc-card);
|
|
1892
|
+
}
|
|
1893
|
+
.szc-result-summary > div {
|
|
1894
|
+
display: flex;
|
|
1895
|
+
align-items: baseline;
|
|
1896
|
+
justify-content: space-between;
|
|
1897
|
+
gap: 20px;
|
|
1898
|
+
font-size: 13px;
|
|
1899
|
+
}
|
|
1900
|
+
.szc-result-summary dt,
|
|
1901
|
+
.szc-result-summary dd {
|
|
1902
|
+
margin: 0;
|
|
1903
|
+
}
|
|
1904
|
+
.szc-result-summary dd {
|
|
1905
|
+
font-weight: 650;
|
|
1906
|
+
white-space: nowrap;
|
|
1907
|
+
}
|
|
1908
|
+
.szc-result-summary__savings {
|
|
1909
|
+
color: var(--szc-success);
|
|
1910
|
+
}
|
|
1911
|
+
.szc-result-summary__total {
|
|
1912
|
+
margin-top: 2px;
|
|
1913
|
+
padding-top: 14px;
|
|
1914
|
+
border-top: 1px solid var(--szc-border);
|
|
1915
|
+
color: var(--szc-accent);
|
|
1916
|
+
font-size: 15px !important;
|
|
1917
|
+
font-weight: 800;
|
|
1918
|
+
}
|
|
1919
|
+
@media (max-width: 640px) {
|
|
1920
|
+
.szc-result-wrap {
|
|
1921
|
+
padding: 24px 16px 32px;
|
|
1922
|
+
}
|
|
1923
|
+
.szc-result__hero {
|
|
1924
|
+
padding: 32px 18px 26px;
|
|
1925
|
+
}
|
|
1926
|
+
.szc-result__reference {
|
|
1927
|
+
grid-template-columns: 1fr;
|
|
1928
|
+
}
|
|
1929
|
+
.szc-result__reference > div + div {
|
|
1930
|
+
border-inline-start: 0;
|
|
1931
|
+
border-top: 1px solid var(--szc-border);
|
|
1932
|
+
}
|
|
1933
|
+
.szc-result-items__head {
|
|
1934
|
+
display: none;
|
|
1935
|
+
}
|
|
1936
|
+
.szc-result-items {
|
|
1937
|
+
padding: 0 14px;
|
|
1938
|
+
}
|
|
1939
|
+
.szc-result-item {
|
|
1940
|
+
grid-template-columns: 1fr auto;
|
|
1941
|
+
gap: 8px 14px;
|
|
1942
|
+
padding: 14px 0;
|
|
1943
|
+
}
|
|
1944
|
+
.szc-result-item__product {
|
|
1945
|
+
grid-column: 1 / -1;
|
|
1946
|
+
}
|
|
1947
|
+
.szc-result-item__quantity,
|
|
1948
|
+
.szc-result-item__total {
|
|
1949
|
+
display: flex;
|
|
1950
|
+
align-items: center;
|
|
1951
|
+
gap: 5px;
|
|
1952
|
+
}
|
|
1953
|
+
.szc-result-item__mobile-label {
|
|
1954
|
+
display: inline;
|
|
1955
|
+
color: var(--szc-muted-fg);
|
|
1956
|
+
font-size: 11px;
|
|
1957
|
+
font-weight: 400;
|
|
1958
|
+
}
|
|
1959
|
+
.szc-result-summary {
|
|
1960
|
+
width: 100%;
|
|
1961
|
+
}
|
|
1962
|
+
}
|
|
1705
1963
|
|
|
1706
1964
|
/* ---- misc ----------------------------------------------------------- */
|
|
1707
1965
|
.szc-error {
|