@asteby/storefront-react 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/checkout.cjs +673 -51
- package/dist/checkout.cjs.map +1 -1
- package/dist/checkout.css +230 -0
- package/dist/checkout.d.cts +323 -4
- package/dist/checkout.d.ts +323 -4
- package/dist/checkout.js +652 -45
- package/dist/checkout.js.map +1 -1
- package/dist/{chunk-3ZJTDFHE.js → chunk-ODIQR6TG.js} +5 -4
- package/dist/chunk-ODIQR6TG.js.map +1 -0
- package/dist/payments.cjs +171 -40
- package/dist/payments.cjs.map +1 -1
- package/dist/payments.css +14 -1
- package/dist/payments.d.cts +37 -1
- package/dist/payments.d.ts +37 -1
- package/dist/payments.js +169 -40
- package/dist/payments.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-3ZJTDFHE.js.map +0 -1
package/dist/checkout.cjs
CHANGED
|
@@ -1,9 +1,504 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
3
|
var react = require('react');
|
|
4
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
var storefront = require('@asteby/storefront');
|
|
6
6
|
|
|
7
|
+
// src/checkout/address-fields.tsx
|
|
8
|
+
var ES = {
|
|
9
|
+
valueMissing: "Completa este campo.",
|
|
10
|
+
choiceMissing: "Elige una opci\xF3n.",
|
|
11
|
+
email: "Escribe un correo v\xE1lido, por ejemplo nombre@correo.com.",
|
|
12
|
+
tel: "Escribe un tel\xE9fono v\xE1lido.",
|
|
13
|
+
pattern: "Revisa el formato.",
|
|
14
|
+
tooShort: "Escribe al menos {n} caracteres.",
|
|
15
|
+
server: "Revisa este campo.",
|
|
16
|
+
summaryOne: "Revisa 1 campo para continuar",
|
|
17
|
+
summaryMany: "Revisa {n} campos para continuar",
|
|
18
|
+
optional: "(opcional)"
|
|
19
|
+
};
|
|
20
|
+
var EN = {
|
|
21
|
+
valueMissing: "Fill in this field.",
|
|
22
|
+
choiceMissing: "Choose an option.",
|
|
23
|
+
email: "Enter a valid email, like name@example.com.",
|
|
24
|
+
tel: "Enter a valid phone number.",
|
|
25
|
+
pattern: "Check the format.",
|
|
26
|
+
tooShort: "Enter at least {n} characters.",
|
|
27
|
+
server: "Check this field.",
|
|
28
|
+
summaryOne: "Check 1 field to continue",
|
|
29
|
+
summaryMany: "Check {n} fields to continue",
|
|
30
|
+
optional: "(optional)"
|
|
31
|
+
};
|
|
32
|
+
function fieldMessages(locale, overrides) {
|
|
33
|
+
const base = (locale ?? "es-MX").toLowerCase().startsWith("en") ? EN : ES;
|
|
34
|
+
return overrides ? { ...base, ...overrides } : base;
|
|
35
|
+
}
|
|
36
|
+
var isControl = (el) => !!el && typeof el.tagName === "string" && ["INPUT", "SELECT", "TEXTAREA"].includes(el.tagName) && !!el.name;
|
|
37
|
+
function validationMessage(el, m = ES) {
|
|
38
|
+
const v = el.validity;
|
|
39
|
+
if (!v || v.valid) return null;
|
|
40
|
+
const own = el.getAttribute("data-sf-error");
|
|
41
|
+
if (own) return own;
|
|
42
|
+
if (v.valueMissing) return el instanceof HTMLInputElement && (el.type === "radio" || el.type === "checkbox") ? m.choiceMissing : m.valueMissing;
|
|
43
|
+
if (v.typeMismatch && el instanceof HTMLInputElement) return el.type === "email" ? m.email : el.type === "tel" ? m.tel : m.pattern;
|
|
44
|
+
if (v.patternMismatch) return el.getAttribute("title") || (el instanceof HTMLInputElement && el.type === "tel" ? m.tel : m.pattern);
|
|
45
|
+
if (v.tooShort && el instanceof HTMLInputElement) return m.tooShort.replace("{n}", String(el.minLength));
|
|
46
|
+
return el.validationMessage || m.pattern;
|
|
47
|
+
}
|
|
48
|
+
function labelOf(el) {
|
|
49
|
+
if (el instanceof HTMLInputElement && el.type === "radio") {
|
|
50
|
+
const legend = el.closest("fieldset")?.querySelector("legend");
|
|
51
|
+
if (legend?.textContent) return legend.textContent.trim();
|
|
52
|
+
}
|
|
53
|
+
const text = el.labels?.[0]?.getAttribute("data-sf-label") ?? el.labels?.[0]?.textContent ?? el.getAttribute("aria-label") ?? el.name;
|
|
54
|
+
return text.trim();
|
|
55
|
+
}
|
|
56
|
+
function useFieldErrors(formRef, options = {}) {
|
|
57
|
+
const m = fieldMessages(options.locale, options.messages);
|
|
58
|
+
const live = react.useRef(m);
|
|
59
|
+
live.current = m;
|
|
60
|
+
const server = [...options.serverFields ?? []];
|
|
61
|
+
const serverKey = server.join("|");
|
|
62
|
+
const [errors, setErrors] = react.useState(() => Object.fromEntries(server.map((n) => [n, options.serverMessages?.[n] ?? m.server])));
|
|
63
|
+
const [summary, setSummary] = react.useState(null);
|
|
64
|
+
const [summaryKey, setSummaryKey] = react.useState(0);
|
|
65
|
+
react.useEffect(() => {
|
|
66
|
+
if (!server.length) return;
|
|
67
|
+
const form = formRef.current;
|
|
68
|
+
const items = [];
|
|
69
|
+
const next = {};
|
|
70
|
+
for (const name of server) {
|
|
71
|
+
const msg = options.serverMessages?.[name] ?? live.current.server;
|
|
72
|
+
next[name] = msg;
|
|
73
|
+
const el = form?.elements.namedItem(name);
|
|
74
|
+
const ctl = el && "length" in el && !(el instanceof HTMLSelectElement) ? el[0] : el;
|
|
75
|
+
if (ctl) items.push({ name, id: ctl.id || name, label: labelOf(ctl), message: msg });
|
|
76
|
+
}
|
|
77
|
+
setErrors((e) => ({ ...e, ...next }));
|
|
78
|
+
if (items.length) {
|
|
79
|
+
setSummary(items);
|
|
80
|
+
setSummaryKey((k) => k + 1);
|
|
81
|
+
}
|
|
82
|
+
}, [serverKey]);
|
|
83
|
+
react.useEffect(() => {
|
|
84
|
+
const form = formRef.current;
|
|
85
|
+
if (!form) return;
|
|
86
|
+
let batch = null;
|
|
87
|
+
const set = (name, msg) => setErrors((e) => {
|
|
88
|
+
if (msg === null) {
|
|
89
|
+
if (!(name in e)) return e;
|
|
90
|
+
const { [name]: _gone, ...rest } = e;
|
|
91
|
+
return rest;
|
|
92
|
+
}
|
|
93
|
+
return e[name] === msg ? e : { ...e, [name]: msg };
|
|
94
|
+
});
|
|
95
|
+
const onBlur = (ev) => {
|
|
96
|
+
const el = ev.target;
|
|
97
|
+
if (!isControl(el) || el instanceof HTMLInputElement && (el.type === "radio" || el.type === "checkbox" || el.type === "hidden")) return;
|
|
98
|
+
if (!el.value) return;
|
|
99
|
+
set(el.name, validationMessage(el, live.current));
|
|
100
|
+
};
|
|
101
|
+
const onInput = (ev) => {
|
|
102
|
+
const el = ev.target;
|
|
103
|
+
if (!isControl(el)) return;
|
|
104
|
+
setErrors((e) => {
|
|
105
|
+
if (!(el.name in e)) return e;
|
|
106
|
+
const msg = el.validity.valid ? null : validationMessage(el, live.current);
|
|
107
|
+
if (msg !== null) return e;
|
|
108
|
+
const { [el.name]: _gone, ...rest } = e;
|
|
109
|
+
return rest;
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
const onInvalid = (ev) => {
|
|
113
|
+
const el = ev.target;
|
|
114
|
+
if (!isControl(el)) return;
|
|
115
|
+
ev.preventDefault();
|
|
116
|
+
if (!batch) {
|
|
117
|
+
batch = [];
|
|
118
|
+
queueMicrotask(() => {
|
|
119
|
+
const list = batch ?? [];
|
|
120
|
+
batch = null;
|
|
121
|
+
const seen = /* @__PURE__ */ new Set();
|
|
122
|
+
const items = [];
|
|
123
|
+
const next = {};
|
|
124
|
+
for (const c of list) {
|
|
125
|
+
if (seen.has(c.name)) continue;
|
|
126
|
+
seen.add(c.name);
|
|
127
|
+
const msg = validationMessage(c, live.current) ?? live.current.valueMissing;
|
|
128
|
+
next[c.name] = msg;
|
|
129
|
+
items.push({ name: c.name, id: c.id || c.name, label: labelOf(c), message: msg });
|
|
130
|
+
}
|
|
131
|
+
setErrors((e) => ({ ...e, ...next }));
|
|
132
|
+
setSummary(items);
|
|
133
|
+
setSummaryKey((k) => k + 1);
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
batch.push(el);
|
|
137
|
+
};
|
|
138
|
+
form.addEventListener("focusout", onBlur);
|
|
139
|
+
form.addEventListener("input", onInput);
|
|
140
|
+
form.addEventListener("change", onInput);
|
|
141
|
+
form.addEventListener("invalid", onInvalid, true);
|
|
142
|
+
return () => {
|
|
143
|
+
form.removeEventListener("focusout", onBlur);
|
|
144
|
+
form.removeEventListener("input", onInput);
|
|
145
|
+
form.removeEventListener("change", onInput);
|
|
146
|
+
form.removeEventListener("invalid", onInvalid, true);
|
|
147
|
+
};
|
|
148
|
+
}, [formRef]);
|
|
149
|
+
const shown = summary ? summary.filter((s) => s.name in errors).map((s) => ({ ...s, message: errors[s.name] })) : null;
|
|
150
|
+
return {
|
|
151
|
+
errors,
|
|
152
|
+
summary: shown && shown.length ? shown : null,
|
|
153
|
+
summaryKey,
|
|
154
|
+
clear: () => {
|
|
155
|
+
setErrors({});
|
|
156
|
+
setSummary(null);
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
function ErrorSummary({ items, focusKey, locale, messages, title, className, classNames: cx = {} }) {
|
|
161
|
+
const ref = react.useRef(null);
|
|
162
|
+
const m = fieldMessages(locale, messages);
|
|
163
|
+
const has = !!items && items.length > 0;
|
|
164
|
+
react.useEffect(() => {
|
|
165
|
+
if (has) ref.current?.focus();
|
|
166
|
+
}, [focusKey]);
|
|
167
|
+
if (!has) return null;
|
|
168
|
+
const n = items.length;
|
|
169
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, role: "alert", tabIndex: -1, className, "data-sf-error-summary": true, "aria-labelledby": "sf-error-summary-title", children: [
|
|
170
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { id: "sf-error-summary-title", className: cx.title, "data-sf-error-summary-title": true, children: title ?? (n === 1 ? m.summaryOne : m.summaryMany.replace("{n}", String(n))) }),
|
|
171
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx.list, children: items.map((it) => /* @__PURE__ */ jsxRuntime.jsx("li", { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
172
|
+
"a",
|
|
173
|
+
{
|
|
174
|
+
href: `#${it.id}`,
|
|
175
|
+
className: cx.link,
|
|
176
|
+
onClick: (e) => {
|
|
177
|
+
const el = document.getElementById(it.id);
|
|
178
|
+
if (!el) return;
|
|
179
|
+
e.preventDefault();
|
|
180
|
+
el.focus();
|
|
181
|
+
el.scrollIntoView?.({ block: "center" });
|
|
182
|
+
},
|
|
183
|
+
children: [
|
|
184
|
+
it.label,
|
|
185
|
+
": ",
|
|
186
|
+
it.message
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
) }, it.name)) })
|
|
190
|
+
] });
|
|
191
|
+
}
|
|
192
|
+
function CheckoutField(props) {
|
|
193
|
+
const { name, label, id = name, error, hint, optional = false, classNames: cx = {}, locale, messages, ...rest } = props;
|
|
194
|
+
const m = fieldMessages(locale, messages);
|
|
195
|
+
const hintId = hint ? `${id}-hint` : void 0;
|
|
196
|
+
const errorId = `${id}-error`;
|
|
197
|
+
const describedBy = [hintId, error ? errorId : void 0].filter(Boolean).join(" ") || void 0;
|
|
198
|
+
const common = {
|
|
199
|
+
id,
|
|
200
|
+
name,
|
|
201
|
+
required: !optional,
|
|
202
|
+
"aria-invalid": error ? true : void 0,
|
|
203
|
+
"aria-describedby": describedBy,
|
|
204
|
+
className: cx.input,
|
|
205
|
+
"data-sf-field-control": ""
|
|
206
|
+
};
|
|
207
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.root, "data-sf-field": true, "data-invalid": error ? "" : void 0, children: [
|
|
208
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { htmlFor: id, className: cx.label, "data-sf-label": label, children: [
|
|
209
|
+
label,
|
|
210
|
+
optional ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx.optional, "data-sf-field-optional": true, children: [
|
|
211
|
+
" ",
|
|
212
|
+
m.optional
|
|
213
|
+
] }) : null
|
|
214
|
+
] }),
|
|
215
|
+
hint ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: hintId, className: cx.hint, "data-sf-field-hint": true, children: hint }) : null,
|
|
216
|
+
rest.as === "select" ? (() => {
|
|
217
|
+
const { as: _as, children, ...select } = rest;
|
|
218
|
+
return /* @__PURE__ */ jsxRuntime.jsx("select", { ...select, ...common, children });
|
|
219
|
+
})() : (() => {
|
|
220
|
+
const { as: _as, ...input } = rest;
|
|
221
|
+
return /* @__PURE__ */ jsxRuntime.jsx("input", { ...input, ...common });
|
|
222
|
+
})(),
|
|
223
|
+
error ? /* @__PURE__ */ jsxRuntime.jsx("p", { id: errorId, className: cx.error, "data-sf-field-error": true, children: error }) : null
|
|
224
|
+
] });
|
|
225
|
+
}
|
|
226
|
+
var ES2 = {
|
|
227
|
+
email: "Correo",
|
|
228
|
+
phone: "Tel\xE9fono",
|
|
229
|
+
first_name: "Nombre",
|
|
230
|
+
last_name: "Apellidos",
|
|
231
|
+
zip: "C\xF3digo postal",
|
|
232
|
+
province: "Estado",
|
|
233
|
+
city: "Ciudad o municipio",
|
|
234
|
+
neighborhood: "Colonia",
|
|
235
|
+
address1: "Calle y n\xFAmero",
|
|
236
|
+
address2: "N\xFAmero interior o departamento",
|
|
237
|
+
reference: "Referencias para la entrega",
|
|
238
|
+
provincePlaceholder: "Elige tu estado",
|
|
239
|
+
address1Hint: "Por ejemplo: Av. Insurgentes Sur 1234",
|
|
240
|
+
referenceHint: "Entre qu\xE9 calles, color de la fachada\u2026",
|
|
241
|
+
emailHint: "Te enviamos aqu\xED la confirmaci\xF3n y el seguimiento.",
|
|
242
|
+
phoneHint: "Solo para la paqueter\xEDa, por si necesita contactarte.",
|
|
243
|
+
lookupFilled: "Completamos estado y ciudad con tu c\xF3digo postal."
|
|
244
|
+
};
|
|
245
|
+
var EN2 = {
|
|
246
|
+
email: "Email",
|
|
247
|
+
phone: "Phone",
|
|
248
|
+
first_name: "First name",
|
|
249
|
+
last_name: "Last name",
|
|
250
|
+
zip: "Postal code",
|
|
251
|
+
province: "State",
|
|
252
|
+
city: "City",
|
|
253
|
+
neighborhood: "Neighborhood",
|
|
254
|
+
address1: "Street and number",
|
|
255
|
+
address2: "Apartment, suite",
|
|
256
|
+
reference: "Delivery notes",
|
|
257
|
+
provincePlaceholder: "Choose your state",
|
|
258
|
+
address1Hint: "For example: 1234 Main St",
|
|
259
|
+
referenceHint: "Cross streets, building color\u2026",
|
|
260
|
+
emailHint: "We send the confirmation and tracking here.",
|
|
261
|
+
phoneHint: "Only for the carrier, in case they need to reach you.",
|
|
262
|
+
lookupFilled: "We filled in state and city from your postal code."
|
|
263
|
+
};
|
|
264
|
+
function addressFieldsMessages(locale, overrides) {
|
|
265
|
+
const base = (locale ?? "es-MX").toLowerCase().startsWith("en") ? EN2 : ES2;
|
|
266
|
+
return overrides ? { ...base, ...overrides } : base;
|
|
267
|
+
}
|
|
268
|
+
var join = (...c) => c.filter(Boolean).join(" ") || void 0;
|
|
269
|
+
var field = (cx, span) => ({ ...cx, root: join(cx.root, cx[span]) });
|
|
270
|
+
function ContactFields({ defaults = {}, names = {}, errors = {}, phone, hints = true, locale, messages, fieldMessages: fm, classNames: cx = {} }) {
|
|
271
|
+
const m = addressFieldsMessages(locale, messages);
|
|
272
|
+
const n = (k) => names[k] ?? k;
|
|
273
|
+
const common = { ...locale ? { locale } : {}, ...fm ? { messages: fm } : {} };
|
|
274
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
275
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("email"), label: m.email, type: "email", autoComplete: "email", inputMode: "email", autoCapitalize: "none", spellCheck: false, defaultValue: defaults.email ?? "", error: errors[n("email")] ?? null, hint: hints ? m.emailHint : void 0, classNames: field(cx, "wide") }),
|
|
276
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("phone"), label: m.phone, type: "tel", autoComplete: "tel", inputMode: "tel", defaultValue: defaults.phone ?? "", error: errors[n("phone")] ?? null, hint: hints ? m.phoneHint : void 0, classNames: field(cx, "wide"), ...phone?.pattern ? { pattern: phone.pattern } : {}, ...phone?.title ? { title: phone.title } : {}, ...phone?.minLength ? { minLength: phone.minLength } : {} }),
|
|
277
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("first_name"), label: m.first_name, autoComplete: "given-name", defaultValue: defaults.first_name ?? "", error: errors[n("first_name")] ?? null, classNames: field(cx, "half") }),
|
|
278
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("last_name"), label: m.last_name, autoComplete: "family-name", defaultValue: defaults.last_name ?? "", error: errors[n("last_name")] ?? null, classNames: field(cx, "half") })
|
|
279
|
+
] });
|
|
280
|
+
}
|
|
281
|
+
function AddressFields(props) {
|
|
282
|
+
const { defaults, names = {}, errors = {}, countryCode, provinces, postalCode, lookupPostalCode, locale, messages, fieldMessages: fm, classNames: cx = {}, children } = props;
|
|
283
|
+
const showNeighborhood = props.neighborhood ?? true;
|
|
284
|
+
const showReference = props.reference ?? true;
|
|
285
|
+
const m = addressFieldsMessages(locale, messages);
|
|
286
|
+
const n = (k) => names[k] ?? k;
|
|
287
|
+
const common = { ...locale ? { locale } : {}, ...fm ? { messages: fm } : {} };
|
|
288
|
+
const listId = react.useId();
|
|
289
|
+
const [colonias, setColonias] = react.useState([]);
|
|
290
|
+
const [filled, setFilled] = react.useState(false);
|
|
291
|
+
const lastZip = react.useRef(null);
|
|
292
|
+
const zipRef = react.useRef(null);
|
|
293
|
+
const lookupRef = react.useRef(lookupPostalCode);
|
|
294
|
+
lookupRef.current = lookupPostalCode;
|
|
295
|
+
const runLookup = (zip) => {
|
|
296
|
+
const lookup = lookupRef.current;
|
|
297
|
+
if (!lookup || !zip || zip === lastZip.current) return;
|
|
298
|
+
if (postalCode?.pattern && !new RegExp(`^(?:${postalCode.pattern})$`).test(zip)) return;
|
|
299
|
+
lastZip.current = zip;
|
|
300
|
+
const form = zipRef.current?.closest("form");
|
|
301
|
+
void lookup(zip).then(
|
|
302
|
+
(info) => {
|
|
303
|
+
if (!info || lastZip.current !== zip) return;
|
|
304
|
+
const fill2 = (name, value) => {
|
|
305
|
+
const el = form?.elements.namedItem(name);
|
|
306
|
+
if (!el || !value || "length" in el && !(el instanceof HTMLSelectElement)) return false;
|
|
307
|
+
if (el.value && el.dataset.sfAutofilled !== "1") return false;
|
|
308
|
+
if (el instanceof HTMLSelectElement && ![...el.options].some((o) => o.value === value)) return false;
|
|
309
|
+
el.value = value;
|
|
310
|
+
el.dataset.sfAutofilled = "1";
|
|
311
|
+
el.dispatchEvent(new Event("input", { bubbles: true }));
|
|
312
|
+
return true;
|
|
313
|
+
};
|
|
314
|
+
const a = fill2(n("province"), info.province);
|
|
315
|
+
const b = fill2(n("city"), info.city);
|
|
316
|
+
setColonias(info.neighborhoods ?? []);
|
|
317
|
+
setFilled(a || b);
|
|
318
|
+
},
|
|
319
|
+
() => {
|
|
320
|
+
}
|
|
321
|
+
);
|
|
322
|
+
};
|
|
323
|
+
react.useEffect(() => {
|
|
324
|
+
const zip = defaults?.zip;
|
|
325
|
+
if (zip) runLookup(zip);
|
|
326
|
+
}, []);
|
|
327
|
+
const numericZip = postalCode?.inputMode === "numeric";
|
|
328
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
329
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { ref: zipRef, className: join(cx.half), "data-sf-zip": true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
330
|
+
CheckoutField,
|
|
331
|
+
{
|
|
332
|
+
...common,
|
|
333
|
+
name: n("zip"),
|
|
334
|
+
label: m.zip,
|
|
335
|
+
autoComplete: "postal-code",
|
|
336
|
+
inputMode: postalCode?.inputMode ?? "text",
|
|
337
|
+
...postalCode?.pattern ? { pattern: postalCode.pattern } : {},
|
|
338
|
+
...postalCode?.maxLength ? { maxLength: postalCode.maxLength } : {},
|
|
339
|
+
...postalCode?.title ? { title: postalCode.title } : {},
|
|
340
|
+
...numericZip ? { autoCapitalize: "none" } : {},
|
|
341
|
+
defaultValue: defaults?.zip ?? "",
|
|
342
|
+
error: errors[n("zip")] ?? null,
|
|
343
|
+
classNames: { ...cx, root: cx.root },
|
|
344
|
+
onInput: (e) => {
|
|
345
|
+
const v = e.currentTarget.value.trim();
|
|
346
|
+
if (postalCode?.maxLength && v.length === postalCode.maxLength) runLookup(v);
|
|
347
|
+
},
|
|
348
|
+
onBlur: (e) => runLookup(e.currentTarget.value.trim())
|
|
349
|
+
}
|
|
350
|
+
) }),
|
|
351
|
+
provinces && provinces.length ? /* @__PURE__ */ jsxRuntime.jsxs(CheckoutField, { ...common, as: "select", name: n("province"), label: m.province, autoComplete: "address-level1", defaultValue: defaults?.province ?? "", error: errors[n("province")] ?? null, classNames: field(cx, "half"), children: [
|
|
352
|
+
/* @__PURE__ */ jsxRuntime.jsx("option", { value: "", disabled: true, children: m.provincePlaceholder }),
|
|
353
|
+
provinces.map((p) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: p.name, children: p.name }, p.code ?? p.name))
|
|
354
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("province"), label: m.province, autoComplete: "address-level1", defaultValue: defaults?.province ?? "", error: errors[n("province")] ?? null, classNames: field(cx, "half") }),
|
|
355
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("city"), label: m.city, autoComplete: "address-level2", defaultValue: defaults?.city ?? "", error: errors[n("city")] ?? null, classNames: field(cx, "half") }),
|
|
356
|
+
showNeighborhood ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
357
|
+
CheckoutField,
|
|
358
|
+
{
|
|
359
|
+
...common,
|
|
360
|
+
name: n("neighborhood"),
|
|
361
|
+
label: m.neighborhood,
|
|
362
|
+
autoComplete: "address-level3",
|
|
363
|
+
optional: showNeighborhood !== "required",
|
|
364
|
+
defaultValue: defaults?.neighborhood ?? "",
|
|
365
|
+
error: errors[n("neighborhood")] ?? null,
|
|
366
|
+
classNames: field(cx, "half"),
|
|
367
|
+
...colonias.length ? { list: listId } : {}
|
|
368
|
+
}
|
|
369
|
+
) : null,
|
|
370
|
+
colonias.length ? /* @__PURE__ */ jsxRuntime.jsx("datalist", { id: listId, children: colonias.map((c) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: c }, c)) }) : null,
|
|
371
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", "aria-live": "polite", "data-sf-zip-status": true, style: filled ? void 0 : { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap" }, className: filled ? join(cx.hint, cx.wide) : void 0, children: filled ? m.lookupFilled : "" }),
|
|
372
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("address1"), label: m.address1, autoComplete: "address-line1", defaultValue: defaults?.address1 ?? "", error: errors[n("address1")] ?? null, hint: m.address1Hint, classNames: field(cx, "wide") }),
|
|
373
|
+
/* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("address2"), label: m.address2, autoComplete: "address-line2", optional: true, defaultValue: defaults?.address2 ?? "", error: errors[n("address2")] ?? null, classNames: field(cx, "half") }),
|
|
374
|
+
showReference ? /* @__PURE__ */ jsxRuntime.jsx(CheckoutField, { ...common, name: n("reference"), label: m.reference, optional: true, defaultValue: defaults?.reference ?? "", error: errors[n("reference")] ?? null, hint: m.referenceHint, classNames: field(cx, "wide"), maxLength: 200 }) : null,
|
|
375
|
+
/* @__PURE__ */ jsxRuntime.jsx("input", { type: "hidden", name: "country_code", value: countryCode }),
|
|
376
|
+
children
|
|
377
|
+
] });
|
|
378
|
+
}
|
|
379
|
+
var StorefrontContext = react.createContext(null);
|
|
380
|
+
function useOptionalStorefront() {
|
|
381
|
+
return react.useContext(StorefrontContext);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
// src/locale.ts
|
|
385
|
+
function useResolvedLocale(locale) {
|
|
386
|
+
const sf = useOptionalStorefront();
|
|
387
|
+
return locale ?? sf?.locale ?? "es-MX";
|
|
388
|
+
}
|
|
389
|
+
var ES3 = {
|
|
390
|
+
title: "Tu pedido",
|
|
391
|
+
subtotal: "Subtotal",
|
|
392
|
+
discount: "Descuento",
|
|
393
|
+
shipping: "Env\xEDo",
|
|
394
|
+
shippingPending: "Al elegir la entrega",
|
|
395
|
+
updating: "Actualizando\u2026",
|
|
396
|
+
free: "Gratis",
|
|
397
|
+
taxes: "Impuestos",
|
|
398
|
+
taxesIncluded: "Incluye {amount} de impuestos",
|
|
399
|
+
total: "Total",
|
|
400
|
+
quantity: "Cantidad: {n}",
|
|
401
|
+
show: "Ver resumen del pedido",
|
|
402
|
+
hide: "Ocultar resumen del pedido"
|
|
403
|
+
};
|
|
404
|
+
var EN3 = {
|
|
405
|
+
title: "Your order",
|
|
406
|
+
subtotal: "Subtotal",
|
|
407
|
+
discount: "Discount",
|
|
408
|
+
shipping: "Shipping",
|
|
409
|
+
shippingPending: "Calculated at delivery",
|
|
410
|
+
updating: "Updating\u2026",
|
|
411
|
+
free: "Free",
|
|
412
|
+
taxes: "Taxes",
|
|
413
|
+
taxesIncluded: "Includes {amount} in taxes",
|
|
414
|
+
total: "Total",
|
|
415
|
+
quantity: "Quantity: {n}",
|
|
416
|
+
show: "Show order summary",
|
|
417
|
+
hide: "Hide order summary"
|
|
418
|
+
};
|
|
419
|
+
function orderSummaryMessages(locale, overrides) {
|
|
420
|
+
const base = (locale ?? "es-MX").toLowerCase().startsWith("en") ? EN3 : ES3;
|
|
421
|
+
return overrides ? { ...base, ...overrides } : base;
|
|
422
|
+
}
|
|
423
|
+
var isZero = (m) => !!m && Number(m.amount) === 0;
|
|
424
|
+
var positive = (m) => !!m && Number(m.amount) > 0;
|
|
425
|
+
function OrderSummary(props) {
|
|
426
|
+
const { lines, cost, updating = false, renderLineMedia, renderAmount, title, headingLevel = 2, classNames: cx = {}, children } = props;
|
|
427
|
+
const locale = useResolvedLocale(props.locale);
|
|
428
|
+
const m = orderSummaryMessages(locale, props.messages);
|
|
429
|
+
const money = (v) => renderAmount ? renderAmount(v) : storefront.formatMoney(v, locale);
|
|
430
|
+
const H = headingLevel === 3 ? "h3" : "h2";
|
|
431
|
+
const discounts = cost.discounts?.filter((d) => positive(d.amount)) ?? [];
|
|
432
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.root, "data-sf-summary": true, children: [
|
|
433
|
+
title === false ? null : /* @__PURE__ */ jsxRuntime.jsx(H, { className: cx.title, "data-sf-summary-title": true, children: title ?? m.title }),
|
|
434
|
+
/* @__PURE__ */ jsxRuntime.jsx("ul", { className: cx.lines, "data-sf-summary-lines": true, children: lines.map((l) => {
|
|
435
|
+
const variant = l.merchandise.title && !/^default( title)?$/i.test(l.merchandise.title) ? l.merchandise.title : null;
|
|
436
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("li", { className: cx.line, "data-sf-summary-line": true, children: [
|
|
437
|
+
renderLineMedia ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx.media, "data-sf-summary-media": true, children: [
|
|
438
|
+
renderLineMedia(l),
|
|
439
|
+
l.quantity > 1 ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.qty, "data-sf-summary-qty": true, "aria-hidden": "true", children: l.quantity }) : null
|
|
440
|
+
] }) : null,
|
|
441
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { "data-sf-summary-line-body": true, children: [
|
|
442
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx.lineTitle, "data-sf-summary-line-title": true, children: [
|
|
443
|
+
!renderLineMedia && l.quantity > 1 ? `${l.quantity} \xD7 ` : null,
|
|
444
|
+
l.merchandise.product.title
|
|
445
|
+
] }),
|
|
446
|
+
variant ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.variant, "data-sf-summary-variant": true, children: variant }) : null,
|
|
447
|
+
renderLineMedia || l.quantity > 1 ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap" }, children: m.quantity.replace("{n}", String(l.quantity)) }) : null
|
|
448
|
+
] }),
|
|
449
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.linePrice, "data-sf-summary-line-price": true, children: money(l.cost.total) })
|
|
450
|
+
] }, l.id);
|
|
451
|
+
}) }),
|
|
452
|
+
children,
|
|
453
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dl", { className: cx.totals, "data-sf-summary-totals": true, "aria-busy": updating || void 0, children: [
|
|
454
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.row, "data-sf-summary-row": "subtotal", children: [
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: m.subtotal }),
|
|
456
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: money(cost.subtotal) })
|
|
457
|
+
] }),
|
|
458
|
+
discounts.length ? discounts.map((d) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.row ? `${cx.row} ${cx.discount ?? ""}`.trim() : cx.discount, "data-sf-summary-row": "discount", children: [
|
|
459
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: d.code ? `${m.discount} (${d.code})` : d.title || m.discount }),
|
|
460
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
|
|
461
|
+
"\u2212",
|
|
462
|
+
money(d.amount)
|
|
463
|
+
] })
|
|
464
|
+
] }, d.id)) : positive(cost.discount) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.row ? `${cx.row} ${cx.discount ?? ""}`.trim() : cx.discount, "data-sf-summary-row": "discount", children: [
|
|
465
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: m.discount }),
|
|
466
|
+
/* @__PURE__ */ jsxRuntime.jsxs("dd", { children: [
|
|
467
|
+
"\u2212",
|
|
468
|
+
money(cost.discount)
|
|
469
|
+
] })
|
|
470
|
+
] }) : null,
|
|
471
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.row, "data-sf-summary-row": "shipping", children: [
|
|
472
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: m.shipping }),
|
|
473
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { className: updating || !cost.shipping ? cx.muted : void 0, children: updating ? m.updating : !cost.shipping ? m.shippingPending : isZero(cost.shipping) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.free, children: m.free }) : money(cost.shipping) })
|
|
474
|
+
] }),
|
|
475
|
+
positive(cost.tax) && !cost.tax_included ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.row, "data-sf-summary-row": "tax", children: [
|
|
476
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: m.taxes }),
|
|
477
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { children: money(cost.tax) })
|
|
478
|
+
] }) : null,
|
|
479
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.total, "data-sf-summary-row": "total", children: [
|
|
480
|
+
/* @__PURE__ */ jsxRuntime.jsx("dt", { children: m.total }),
|
|
481
|
+
/* @__PURE__ */ jsxRuntime.jsx("dd", { "aria-live": "polite", "data-updating": updating || void 0, children: money(cost.total) })
|
|
482
|
+
] })
|
|
483
|
+
] }),
|
|
484
|
+
positive(cost.tax) && cost.tax_included ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: cx.note, "data-sf-summary-tax-note": true, children: m.taxesIncluded.split("{amount}").flatMap((part, i) => i === 0 ? [part] : [/* @__PURE__ */ jsxRuntime.jsx("span", { children: money(cost.tax) }, i), part]) }) : null
|
|
485
|
+
] });
|
|
486
|
+
}
|
|
487
|
+
function OrderSummaryDisclosure({ total, updating, renderAmount, locale: loc, messages, defaultOpen = false, className, classNames: cx = {}, children }) {
|
|
488
|
+
const locale = useResolvedLocale(loc);
|
|
489
|
+
const m = orderSummaryMessages(locale, messages);
|
|
490
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("details", { className, "data-sf-summary-disclosure": true, ...defaultOpen ? { open: true } : {}, children: [
|
|
491
|
+
/* @__PURE__ */ jsxRuntime.jsxs("summary", { className: cx.summary, "data-sf-summary-toggle": true, children: [
|
|
492
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx.label, "data-sf-summary-toggle-label": true, children: [
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-sf-summary-show": true, children: m.show }),
|
|
494
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-sf-summary-hide": true, children: m.hide })
|
|
495
|
+
] }),
|
|
496
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.total, "data-sf-summary-toggle-total": true, "data-updating": updating || void 0, children: renderAmount ? renderAmount(total) : storefront.formatMoney(total, locale) })
|
|
497
|
+
] }),
|
|
498
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: cx.panel, "data-sf-summary-panel": true, children })
|
|
499
|
+
] });
|
|
500
|
+
}
|
|
501
|
+
|
|
7
502
|
// src/checkout/brands/logos.generated.ts
|
|
8
503
|
var LOGOS = {
|
|
9
504
|
"7eleven": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 xmlns:xlink=%22http://www.w3.org/1999/xlink%22 xml:space=%22preserve%22 viewBox=%220 0 45 59.89%22%3E%3Cdefs%3E%3Cpath id=%22a%22 d=%22M0 0h45v59.9H0z%22/%3E%3C/defs%3E%3CclipPath id=%22b%22%3E%3Cuse xlink:href=%22%23a%22 style=%22overflow:visible%22/%3E%3C/clipPath%3E%3Cpath d=%22M34.2 45c.9 0 1.7.8 1.7 1.7s-.7 1.7-1.7 1.7c-.9 0-1.6-.8-1.6-1.7s.7-1.7 1.6-1.7m0 3c.7 0 1.3-.6 1.3-1.3 0-.8-.6-1.3-1.3-1.3s-1.3.6-1.3 1.3c0 .8.6 1.3 1.3 1.3m-.2-.4h-.3v-1.8h.6q.6 0 .6.6c0 .3-.2.5-.4.5l.4.7h-.4l-.4-.7H34zm.2-1q.3 0 .3-.3t-.3-.3H34v.5h.2zm8-14.3c-.9 0-1.5.4-2.1.9l-.4.6-.1-.1.5-.8v-.5h-3.2V43h2.9v-6.7c0-1.1.7-1.4 1.2-1.5s1.1.2 1.1.8V43H45v-7.3c0-2.3-1-3.4-2.8-3.4M9.9 40.6h3v2.3H7V32.3h2.9zM0 42.9h5.9v-2.1h-3v-2.3h3v-2h-3v-2h3v-2.2H0zm13.9 0h6v-2.1h-3.1v-2.3h3.1v-2h-3.1v-2h3.1v-2.2h-6zm16 0h6v-2.1h-3.1v-2.3h3.1v-2h-3.1v-2h3.1v-2.2h-6zm-3.8-10.6L25 39l-.1 1.2v.1h-.1v-.1l-.1-1.2-1.1-6.7h-2.9l2.4 10.6h3.6l2.4-10.6z%22 style=%22clip-path:url(%23b);fill:%23147350%22/%3E%3Cpath d=%22M37.7 0H0v15h19.9C24.4 8.5 30.5 3.3 37.7 0%22 style=%22clip-path:url(%23b);fill:%23ff6c00%22/%3E%3Cpath d=%22M15 59.9h15v-15H15zM45 15V0a40.7 40.7 0 0 0-28.9 30h15.3A25.8 25.8 0 0 1 45 15%22 style=%22clip-path:url(%23b);fill:%23eb0f2a%22/%3E%3C/svg%3E", ar: 0.751, mono: false },
|
|
@@ -21,6 +516,7 @@ var LOGOS = {
|
|
|
21
516
|
"farmaciasyza": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 141.31 65.39%22%3E%3Cg data-name=%22Grupo 3266%22%3E%3Cpath fill=%22%23009%22 d=%22M90.49 39.75a8 8 0 0 1-6.43 2.7c-4.17 0-6.01-2.16-6.4-4.51s-.63-8.66 7.77-8.66a13 13 0 0 1 5.05.83ZM69.71 30.1c-.95 2.13-2.29 7.57-.56 11.74 1.88 4.51 5.66 7.71 12.51 7.71s10.07-3.46 10.07-3.46c3.41 5.52 11.48 2.79 11.48 2.79l-.06-5.82h-1.92c-1.53 0-1.83-1.67-1.83-3.06V24.57c-3.88-1.88-13.5-2.54-18.1-1.78 0 0-8.81 1.09-11.59 7.32%22 data-name=%22Trazado 25280%22/%3E%3Cpath fill=%22%23009%22 d=%22M51.02 41.85 60.29 33a42 42 0 0 0 4.95-5.26l-.13-4.96H37.3v7.34h13.87C45.23 35.58 36.6 43.97 36.6 43.97v4.91h29.15l-.1-7.03Z%22 data-name=%22Trazado 25281%22/%3E%3Cpath fill=%22%233c3%22 d=%22M25.42 58.35h4v1.44h-2.26v1.43h1.48v1.34h-1.48v2.65H25.4Z%22 data-name=%22Trazado 25282%22/%3E%3Cpath fill=%22%233c3%22 d=%22M34.93 62.62h1.5l-.52-1.77-.13-.52h-.19l-.11.52Zm-.48-4.28h2.48L39 65.21h-1.8l-.34-1.15h-2.35l-.35 1.15h-1.78Z%22 data-name=%22Trazado 25283%22/%3E%3Cpath fill=%22%233c3%22 d=%22M45.98 59.97a.7.7 0 0 0-.54-.18h-.84v1.72h.84a.8.8 0 0 0 .54-.2 1 1 0 0 0 .2-.68 1 1 0 0 0-.2-.66m.74 2.66 1.6 2.58H46.3l-1.44-2.35h-.27v2.35h-1.74v-6.86h2.64a2.5 2.5 0 0 1 1.71.51 2.4 2.4 0 0 1 .71 1.8 2.2 2.2 0 0 1-.72 1.7 2 2 0 0 1-.47.28%22 data-name=%22Trazado 25284%22/%3E%3Cpath fill=%22%233c3%22 d=%22M56.18 64.34h-.86L54.2 61.9a5 5 0 0 1-.21-.63h-.14s.06.74.06 1.02v2.92h-1.75v-6.86h1.94l1.6 3.62h.1l1.6-3.62h1.94v6.86h-1.75V62.3c0-.29.06-1.02.06-1.02h-.14a5 5 0 0 1-.22.62Z%22 data-name=%22Trazado 25285%22/%3E%3Cpath fill=%22%233c3%22 d=%22M65.75 62.62h1.5l-.54-1.77-.12-.52h-.2l-.1.52Zm-.49-4.28h2.48l2.07 6.87h-1.79l-.34-1.15h-2.36l-.34 1.15h-1.79Z%22 data-name=%22Trazado 25286%22/%3E%3Cpath fill=%22%233c3%22 d=%22M78.25 64.9a4 4 0 0 1-2 .46 3.5 3.5 0 0 1-2.04-.61c-.54-.45-.95-1.18-.95-2.98 0-1.7.39-2.4.9-2.87a3 3 0 0 1 2.1-.72 5 5 0 0 1 1.77.33l-.3 1.36a4 4 0 0 0-1.2-.2 1.6 1.6 0 0 0-1.08.36c-.23.23-.43.68-.43 1.75 0 1.12.2 1.55.46 1.78a1.6 1.6 0 0 0 1.05.31 5 5 0 0 0 1.41-.27Z%22 data-name=%22Trazado 25287%22/%3E%3Cpath fill=%22%233c3%22 d=%22M82.14 58.35h1.75v6.85h-1.75z%22 data-name=%22Rect%C3%A1ngulo 1541%22/%3E%3Cpath fill=%22%233c3%22 d=%22M90.28 62.62h1.5l-.53-1.77-.12-.52h-.2l-.11.52Zm-.48-4.28h2.48l2.07 6.87h-1.79l-.34-1.15h-2.36l-.35 1.15h-1.78Z%22 data-name=%22Trazado 25288%22/%3E%3Cpath fill=%22%233c3%22 d=%22M100.66 65.36a6 6 0 0 1-2.54-.58l.31-1.4a5 5 0 0 0 2.04.5c.5 0 .86-.23.86-.7q.01-.51-.6-.66l-.74-.18c-1.11-.25-1.95-.69-1.95-2.02 0-1.28.86-2.13 2.5-2.13a5 5 0 0 1 2.08.48l-.48 1.39a4 4 0 0 0-1.53-.39c-.5 0-.78.26-.78.62a.5.5 0 0 0 .43.52l.82.2c1.2.28 2.03.76 2.03 2.08a2.13 2.13 0 0 1-2.46 2.27%22 data-name=%22Trazado 25289%22/%3E%3Cpath fill=%22%23009%22 d=%22m24.38 22.74-7.3 17.62-6.78-17.62H0l11.34 27.13a9 9 0 0 1-1.21.79 8 8 0 0 1-2.48.84 18 18 0 0 1-2.2.24q-1.06.04-2.07 0l-1.4 6.47q2.07.15 5.22.15a20 20 0 0 0 8.3-1.54 14 14 0 0 0 5.2-3.98 13 13 0 0 0 .85-1.1 9 9 0 0 0 .67-1.15l12.46-27.85Z%22 data-name=%22Trazado 25290%22/%3E%3Cpath fill=%22%233c3%22 d=%22M118.55 22.76v5.15a5.87 5.87 0 0 0 11.74 0v-5.15h5.15a5.87 5.87 0 0 0 0-11.74h-5.15V5.87a5.87 5.87 0 0 0-11.74 0v5.15h-5.15a5.87 5.87 0 0 0 0 11.74Z%22 data-name=%22Trazado 25291%22/%3E%3Cpath fill=%22%23009%22 d=%22M130.3 12.63a.53.53 0 1 1 .54.53.53.53 0 0 1-.53-.53%22 data-name=%22Trazado 25292%22/%3E%3Cpath fill=%22%23009%22 d=%22M132.54 12.63a.4.4 0 1 1 .4.41.4.4 0 0 1-.4-.4%22 data-name=%22Trazado 25293%22/%3E%3Cpath fill=%22%23009%22 d=%22M134.77 12.63a.29.29 0 1 1 .3.29.3.3 0 0 1-.3-.3%22 data-name=%22Trazado 25294%22/%3E%3Cpath fill=%22%23009%22 d=%22M137.03 12.63a.14.14 0 1 1 .14.14.14.14 0 0 1-.14-.14%22 data-name=%22Trazado 25295%22/%3E%3Cpath fill=%22%23009%22 d=%22M137.03 14.74a.14.14 0 1 1 .14.14.14.14 0 0 1-.14-.14%22 data-name=%22Trazado 25296%22/%3E%3Cpath fill=%22%23009%22 d=%22M137.03 16.86a.14.14 0 1 1 .14.14.14.14 0 0 1-.14-.14%22 data-name=%22Trazado 25297%22/%3E%3Cpath fill=%22%23009%22 d=%22M137.03 18.97a.14.14 0 1 1 .14.14.14.14 0 0 1-.14-.14%22 data-name=%22Trazado 25298%22/%3E%3Cpath fill=%22%23009%22 d=%22M137.03 21.09a.14.14 0 1 1 .14.14.14.14 0 0 1-.14-.14%22 data-name=%22Trazado 25299%22/%3E%3Cpath fill=%22%23009%22 d=%22M131.44 13.69a.44.44 0 1 1 .44.44.44.44 0 0 1-.44-.44%22 data-name=%22Trazado 25300%22/%3E%3Cpath fill=%22%23009%22 d=%22M133.68 13.69a.32.32 0 1 1 .32.32.3.3 0 0 1-.32-.32%22 data-name=%22Trazado 25301%22/%3E%3Cpath fill=%22%23009%22 d=%22M135.91 13.69a.2.2 0 1 1 .2.2.2.2 0 0 1-.2-.2%22 data-name=%22Trazado 25302%22/%3E%3Cpath fill=%22%23009%22 d=%22M130.3 14.74a.53.53 0 1 1 .54.54.53.53 0 0 1-.53-.54%22 data-name=%22Trazado 25303%22/%3E%3Cpath fill=%22%23009%22 d=%22M132.54 14.74a.4.4 0 1 1 .4.41.4.4 0 0 1-.4-.4%22 data-name=%22Trazado 25304%22/%3E%3Cpath fill=%22%23009%22 d=%22M134.77 14.74a.29.29 0 1 1 .09.2.3.3 0 0 1-.09-.2%22 data-name=%22Trazado 25305%22/%3E%3Cpath fill=%22%23009%22 d=%22M131.44 15.8a.44.44 0 1 1 .44.44.44.44 0 0 1-.44-.44%22 data-name=%22Trazado 25306%22/%3E%3Cpath fill=%22%23009%22 d=%22M133.68 15.8a.32.32 0 1 1 .32.32.3.3 0 0 1-.32-.32%22 data-name=%22Trazado 25307%22/%3E%3Cpath fill=%22%23009%22 d=%22M135.91 15.8a.2.2 0 1 1 .06.14.2.2 0 0 1-.06-.14%22 data-name=%22Trazado 25308%22/%3E%3Cpath fill=%22%23009%22 d=%22M130.3 16.86a.53.53 0 1 1 .54.53.53.53 0 0 1-.53-.53%22 data-name=%22Trazado 25309%22/%3E%3Cpath fill=%22%23009%22 d=%22M132.54 16.86a.4.4 0 1 1 .4.4.4.4 0 0 1-.4-.4%22 data-name=%22Trazado 25310%22/%3E%3Cpath fill=%22%23009%22 d=%22M134.77 16.86a.29.29 0 1 1 .3.29.3.3 0 0 1-.3-.3%22 data-name=%22Trazado 25311%22/%3E%3Cpath fill=%22%23009%22 d=%22M131.44 17.92a.44.44 0 1 1 .44.44.44.44 0 0 1-.44-.44%22 data-name=%22Trazado 25312%22/%3E%3Cpath fill=%22%23009%22 d=%22M133.68 17.92a.32.32 0 1 1 .32.32.3.3 0 0 1-.32-.32%22 data-name=%22Trazado 25313%22/%3E%3Cpath fill=%22%23009%22 d=%22M135.91 17.92a.2.2 0 1 1 .06.14.2.2 0 0 1-.06-.14%22 data-name=%22Trazado 25314%22/%3E%3Cpath fill=%22%23009%22 d=%22M130.3 18.98a.53.53 0 1 1 .54.53.53.53 0 0 1-.53-.53%22 data-name=%22Trazado 25315%22/%3E%3Cpath fill=%22%23009%22 d=%22M132.54 18.97a.4.4 0 1 1 .4.41.4.4 0 0 1-.4-.4%22 data-name=%22Trazado 25316%22/%3E%3Cpath fill=%22%23009%22 d=%22M134.77 18.97a.29.29 0 1 1 .3.3.3.3 0 0 1-.3-.3%22 data-name=%22Trazado 25317%22/%3E%3Cpath fill=%22%23009%22 d=%22M131.44 20.03a.44.44 0 1 1 .44.44.44.44 0 0 1-.44-.44%22 data-name=%22Trazado 25318%22/%3E%3Cpath fill=%22%23009%22 d=%22M133.68 20.03a.32.32 0 1 1 .32.32.3.3 0 0 1-.32-.32%22 data-name=%22Trazado 25319%22/%3E%3Cpath fill=%22%23009%22 d=%22M135.91 20.03a.2.2 0 1 1 .06.14.2.2 0 0 1-.06-.14%22 data-name=%22Trazado 25320%22/%3E%3Cpath fill=%22%23009%22 d=%22M130.3 21.09a.53.53 0 1 1 .54.53.53.53 0 0 1-.53-.53%22 data-name=%22Trazado 25321%22/%3E%3Cpath fill=%22%23009%22 d=%22M132.54 21.09a.4.4 0 1 1 .4.4.4.4 0 0 1-.4-.4%22 data-name=%22Trazado 25322%22/%3E%3Cpath fill=%22%23009%22 d=%22M134.77 21.1a.29.29 0 1 1 .3.28.3.3 0 0 1-.3-.29%22 data-name=%22Trazado 25323%22/%3E%3Cpath fill=%22%23009%22 d=%22M128.65 22.78a.53.53 0 1 1-.53.53.53.53 0 0 1 .53-.53%22 data-name=%22Trazado 25324%22/%3E%3Cpath fill=%22%23009%22 d=%22M128.65 25a.4.4 0 1 1-.4.42.4.4 0 0 1 .4-.41%22 data-name=%22Trazado 25325%22/%3E%3Cpath fill=%22%23009%22 d=%22M128.65 27.24a.29.29 0 1 1-.29.29.3.3 0 0 1 .3-.29%22 data-name=%22Trazado 25326%22/%3E%3Cpath fill=%22%23009%22 d=%22M128.65 29.5a.14.14 0 1 1-.14.14.14.14 0 0 1 .14-.14%22 data-name=%22Trazado 25327%22/%3E%3Cpath fill=%22%23009%22 d=%22M126.54 29.5a.14.14 0 1 1-.14.14.14.14 0 0 1 .14-.14%22 data-name=%22Trazado 25328%22/%3E%3Cpath fill=%22%23009%22 d=%22M124.42 29.5a.14.14 0 1 1-.14.14.14.14 0 0 1 .14-.14%22 data-name=%22Trazado 25329%22/%3E%3Cpath fill=%22%23009%22 d=%22M122.3 29.5a.14.14 0 1 1-.13.14.14.14 0 0 1 .14-.14%22 data-name=%22Trazado 25330%22/%3E%3Cpath fill=%22%23009%22 d=%22M120.2 29.5a.14.14 0 1 1-.15.14.14.14 0 0 1 .14-.14%22 data-name=%22Trazado 25331%22/%3E%3Cpath fill=%22%23009%22 d=%22M127.6 23.9a.44.44 0 1 1-.45.45.44.44 0 0 1 .44-.44%22 data-name=%22Trazado 25332%22/%3E%3Cpath fill=%22%23009%22 d=%22M127.6 26.14a.32.32 0 1 1-.32.33.3.3 0 0 1 .32-.33%22 data-name=%22Trazado 25333%22/%3E%3Cpath fill=%22%23009%22 d=%22M127.6 28.38a.2.2 0 1 1-.15.06.2.2 0 0 1 .14-.06%22 data-name=%22Trazado 25334%22/%3E%3Cpath fill=%22%23009%22 d=%22M126.54 22.78a.53.53 0 1 1-.54.53.53.53 0 0 1 .54-.53%22 data-name=%22Trazado 25335%22/%3E%3Cpath fill=%22%23009%22 d=%22M126.54 25a.4.4 0 1 1-.4.42.4.4 0 0 1 .4-.41%22 data-name=%22Trazado 25336%22/%3E%3Cpath fill=%22%23009%22 d=%22M126.54 27.24a.29.29 0 1 1-.3.29.3.3 0 0 1 .3-.29%22 data-name=%22Trazado 25337%22/%3E%3Cpath fill=%22%23009%22 d=%22M125.48 23.9a.44.44 0 1 1-.44.45.44.44 0 0 1 .44-.44%22 data-name=%22Trazado 25338%22/%3E%3Cpath fill=%22%23009%22 d=%22M125.48 26.14a.32.32 0 1 1-.32.33.3.3 0 0 1 .32-.33%22 data-name=%22Trazado 25339%22/%3E%3Cpath fill=%22%23009%22 d=%22M125.48 28.38a.2.2 0 1 1-.2.2.2.2 0 0 1 .2-.2%22 data-name=%22Trazado 25340%22/%3E%3Cpath fill=%22%23009%22 d=%22M124.42 22.78a.53.53 0 1 1-.53.53.53.53 0 0 1 .53-.53%22 data-name=%22Trazado 25341%22/%3E%3Cpath fill=%22%23009%22 d=%22M124.42 25a.4.4 0 1 1-.4.42.4.4 0 0 1 .4-.41%22 data-name=%22Trazado 25342%22/%3E%3Cpath fill=%22%23009%22 d=%22M124.42 27.24a.29.29 0 1 1-.29.29.3.3 0 0 1 .3-.29%22 data-name=%22Trazado 25343%22/%3E%3Cpath fill=%22%23009%22 d=%22M123.36 23.9a.44.44 0 1 1-.44.45.44.44 0 0 1 .44-.44%22 data-name=%22Trazado 25344%22/%3E%3Cpath fill=%22%23009%22 d=%22M123.36 26.14a.32.32 0 1 1-.32.33.3.3 0 0 1 .32-.33%22 data-name=%22Trazado 25345%22/%3E%3Cpath fill=%22%23009%22 d=%22M123.36 28.38a.2.2 0 1 1-.14.06.2.2 0 0 1 .14-.06%22 data-name=%22Trazado 25346%22/%3E%3Cpath fill=%22%23009%22 d=%22M122.3 22.78a.53.53 0 1 1-.53.53.53.53 0 0 1 .54-.53%22 data-name=%22Trazado 25347%22/%3E%3Cpath fill=%22%23009%22 d=%22M122.3 25a.4.4 0 1 1-.4.42.4.4 0 0 1 .4-.41%22 data-name=%22Trazado 25348%22/%3E%3Cpath fill=%22%23009%22 d=%22M122.3 27.24a.29.29 0 1 1-.28.29.3.3 0 0 1 .29-.29%22 data-name=%22Trazado 25349%22/%3E%3Cpath fill=%22%23009%22 d=%22M121.25 23.9a.44.44 0 1 1-.44.45.44.44 0 0 1 .44-.44%22 data-name=%22Trazado 25350%22/%3E%3Cpath fill=%22%23009%22 d=%22M121.25 26.14a.32.32 0 1 1-.23.1.3.3 0 0 1 .23-.1%22 data-name=%22Trazado 25351%22/%3E%3Cpath fill=%22%23009%22 d=%22M121.25 28.38a.2.2 0 1 1-.14.06.2.2 0 0 1 .14-.06%22 data-name=%22Trazado 25352%22/%3E%3Cpath fill=%22%23009%22 d=%22M120.2 22.78a.53.53 0 1 1-.54.53.53.53 0 0 1 .53-.53%22 data-name=%22Trazado 25353%22/%3E%3Cpath fill=%22%23009%22 d=%22M120.2 25a.4.4 0 1 1-.42.42.4.4 0 0 1 .41-.41%22 data-name=%22Trazado 25354%22/%3E%3Cpath fill=%22%23009%22 d=%22M120.2 27.24a.29.29 0 1 1-.21.08.3.3 0 0 1 .2-.08%22 data-name=%22Trazado 25355%22/%3E%3Cpath fill=%22%23009%22 d=%22M113.72 41.85h-1.14v1.9h1.06c.64 0 1.01-.19 1.01-.98 0-.62-.27-.92-.94-.92m-1.67-.5h1.86a1.28 1.28 0 0 1 1.31 1.44 1.36 1.36 0 0 1-1.12 1.44l1.54 2.18h-.67l-1.46-2.16h-.92v2.16h-.55Zm1.58-1.8a4.4 4.4 0 1 0 4.39 4.38 4.4 4.4 0 0 0-4.39-4.39m0 9.34a4.94 4.94 0 1 1 3.5-1.45 5 5 0 0 1-3.5 1.45%22 data-name=%22Trazado 25356%22/%3E%3C/g%3E%3C/svg%3E", ar: 2.161, mono: false },
|
|
22
517
|
"fedex": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 xml:space=%22preserve%22 viewBox=%22-0.81 -0.35 74.35 33.92%22%3E%3Cpath d=%22m59.95 7.77 2.98 3.28 2.87-3.28h6.12l-5.99 6.73L72 21.28h-6.37l-2.95-3.3-2.92 3.3h-6.15l6.01-6.75-6.01-6.76z%22 style=%22fill:%23ff5900%22 transform=%22translate(-.81 -.35)%22/%3E%3Cpath d=%22M53.61 7.77v4.57H46.8v4.19h6.81v4.75H41.79V0h11.82v4.74H46.8v3.03z%22 style=%22fill:%23ff5900%22 transform=%22translate(-.81 -.35)%22/%3E%3Cpath d=%22M36.81 0v8.71h-.05a5 5 0 0 0-4.09-1.7c-3.27 0-5.74 2.22-6.6 5.16-1-3.24-3.54-5.23-7.32-5.23-3.07 0-5.5 1.38-6.75 3.62V7.77H5.65V4.74h6.92V0H0v21.28h5.65v-8.94h5.64a9 9 0 0 0-.26 2.1c0 4.44 3.4 7.56 7.72 7.56 3.64 0 6.04-1.71 7.3-4.83h-4.84c-.65.94-1.15 1.22-2.46 1.22a2.9 2.9 0 0 1-2.83-2.9h9.87c.42 3.53 3.17 6.57 6.94 6.57 1.63 0 3.12-.8 4.03-2.15h.05v1.38h4.98V0zM16.08 12.4a2.7 2.7 0 0 1 2.67-2.23 2.6 2.6 0 0 1 2.7 2.23zm17.7 5.64c-1.83 0-2.97-1.7-2.97-3.5 0-1.9.99-3.74 2.98-3.74 2.06 0 2.88 1.83 2.88 3.74 0 1.81-.87 3.5-2.88 3.5m8.01 13.89V24.3H46v.57h-3.5v2.8h3.37v.58H42.5v3.1h3.68v.57zm4.87 0 2.05-2.74-1.95-2.6h.8l1.59 2.12 1.56-2.12h.78l-1.98 2.6 2.07 2.73h-.8l-1.7-2.26-1.63 2.26zm6.26 1.99h-.65V28.2q0-.8-.03-1.6h.63l.03.8c.4-.63.92-.92 1.71-.92 1.65 0 2.35 1.36 2.35 2.79s-.7 2.8-2.35 2.8q-1.11 0-1.7-.9zm3.36-4.66c0-1.14-.48-2.26-1.74-2.26-1.2 0-1.62.98-1.62 2.26s.43 2.25 1.62 2.25c1.26 0 1.74-1.11 1.74-2.25m3.98-2.17c-1.06 0-1.43.9-1.43 1.82v3.01h-.64v-3.76l-.03-1.57h.63l.04.77q.48-.9 1.55-.9l.3.03v.64zm1.2 2.29c0 1.2.57 2.19 1.74 2.19.9 0 1.33-.6 1.48-1.2h.62c-.29 1.11-.97 1.68-2.19 1.68-1.62 0-2.33-1.2-2.33-2.7 0-1.52.74-2.88 2.42-2.88 1.7 0 2.15 1.48 2.15 2.9zm.02-.49h3.18c0-1.04-.5-1.94-1.5-1.94-.92 0-1.55.7-1.68 1.94m6.38 3.16c-1.1 0-1.92-.52-1.92-1.68h.64c0 .8.53 1.2 1.3 1.2.74 0 1.3-.35 1.3-1.07 0-.64-.66-.8-1.35-1-.85-.25-1.76-.52-1.76-1.55 0-1.14.95-1.48 1.85-1.48 1.03 0 1.8.4 1.83 1.5h-.64c-.03-.63-.48-.98-1.17-.98-.54 0-1.19.2-1.19.9 0 .63.65.81 1.35 1 .84.23 1.77.49 1.77 1.52 0 1.2-.93 1.64-2.01 1.64m4.45 0c-1.1 0-1.91-.52-1.91-1.68h.64c0 .8.52 1.2 1.3 1.2.73 0 1.3-.35 1.3-1.07 0-.64-.66-.8-1.36-1-.84-.25-1.76-.52-1.76-1.55 0-1.14.96-1.48 1.86-1.48 1.03 0 1.8.4 1.83 1.5h-.64c-.03-.63-.49-.98-1.17-.98-.54 0-1.2.2-1.2.9 0 .63.66.81 1.36 1 .84.23 1.77.49 1.77 1.52 0 1.2-.93 1.64-2.02 1.64%22 style=%22fill:%232a007c%22 transform=%22translate(-.81 -.35)%22/%3E%3C/svg%3E", ar: 2.192, mono: false },
|
|
23
518
|
"hsbc": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 xml:space=%22preserve%22 viewBox=%220 0 315.9 85%22%3E%3Cpath fill=%22%23fff%22 d=%22M42.6 0h85v85h-85z%22/%3E%3Cpath fill=%22%23db0011%22 d=%22M170.1 42.6 127.6 0v85.1zm-85 0L127.6 0h-85z%22/%3E%3Cpath fill=%22%23db0011%22 d=%22m0 42.6 42.6 42.5V0zm85.1 0L42.6 85.1h85z%22/%3E%3Cpath d=%22M207.4 45.1H192v15.2h-7.7V24.7h7.7v14.6h15.4V24.7h7.7v35.6h-7.7zM233.7 61c-7.7 0-14-3.1-14.1-11.6h7.7c.1 3.8 2.3 6.1 6.5 6.1 3.1 0 6.7-1.6 6.7-5.1 0-2.8-2.4-3.6-6.4-4.8l-2.6-.7c-5.6-1.6-11.2-3.8-11.2-10.2 0-7.9 7.4-10.6 14.1-10.6 6.9 0 12.9 2.4 13 10.3h-7.7c-.3-3.2-2.2-5.1-5.8-5.1-2.9 0-5.7 1.5-5.7 4.7 0 2.6 2.4 3.4 7.4 5l3 .9c6.1 1.9 10 4 10 10-.1 8-7.9 11.1-14.9 11.1m19.2-36.2h12.4c2.3-.1 4.7 0 7 .4 4.3 1 7.6 3.8 7.6 8.6 0 4.6-2.9 6.9-7.1 8 4.8.9 8.4 3.3 8.4 8.6 0 8.1-8 9.9-14.2 9.9h-14zm12.4 14.8c3.4 0 6.9-.7 6.9-4.8 0-3.7-3.2-4.7-6.4-4.7h-5.4v9.5zM266 55c3.6 0 7.1-.8 7.1-5.2s-3-5.2-6.7-5.2h-6.1V55zm35.2 6c-11.5 0-16.6-7.3-16.6-18.2s5.7-18.8 17-18.8c7.1 0 14 3.2 14.2 11.2h-8c-.4-3.6-2.8-5.4-6.2-5.4-7 0-9.1 7.5-9.1 13.2s2.1 12.3 8.8 12.3c3.5 0 6.1-1.9 6.6-5.5h8c-.8 8.2-7.3 11.2-14.7 11.2%22/%3E%3C/svg%3E", ar: 3.716, mono: false },
|
|
519
|
+
"imile": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 id=%22Layer_1%22 version=%221.1%22 viewBox=%22112 310 856 460%22%3E%3Cdefs%3E%3Cstyle%3E.st1%7Bfill:%230032a0%7D%3C/style%3E%3C/defs%3E%3Cpath d=%22M618.99 684.65h-21.53v64.79h18.97c6.74 0 12.27-1.17 16.42-3.48 4.18-2.32 7.29-5.99 9.24-10.9 1.93-4.87 2.91-11.36 2.91-19.29 0-10.22-2.2-18.04-6.54-23.25-4.36-5.22-10.91-7.87-19.46-7.87Zm15.17 31.12c0 8.7-1.31 15.07-3.9 18.93-2.55 3.81-6.71 5.74-12.37 5.74h-9.6v-46.79h10.34c5.36 0 9.33 1.77 11.78 5.25 2.49 3.53 3.76 9.21 3.76 16.87ZM673.04 702c-6.79 0-12.22 2.18-16.12 6.49-3.89 4.29-5.87 10.28-5.87 17.78s1.96 13.46 5.82 17.69c3.87 4.24 9.34 6.4 16.26 6.4 4 0 7.72-.83 11.06-2.46 3.35-1.64 5.96-3.95 7.76-6.88l.19-.3-5.63-5.42-.3.38c-3.18 4.07-7.43 6.13-12.62 6.13-3.64 0-6.53-1.03-8.6-3.07-1.99-1.96-3.26-4.87-3.78-8.65h32.45v-3.91c0-7.56-1.83-13.54-5.45-17.77-3.63-4.25-8.74-6.41-15.17-6.41m-.36 8.27c3.57 0 6.41 1.09 8.45 3.24 2.04 2.16 3.08 5.19 3.08 9.01v.2h-23.09c.46-3.91 1.66-6.98 3.58-9.13 1.97-2.2 4.66-3.32 7.98-3.32M720.44 741.75c-1.82.76-3.36 1.15-4.58 1.15-1.45 0-2.49-.35-3.1-1.04-.62-.7-.94-1.96-.94-3.73v-57.32h-9.92v57.32c0 3.99.93 7.05 2.76 9.1 1.84 2.06 4.6 3.11 8.18 3.11 3.79 0 6.94-.89 9.39-2.64l.24-.18-1.58-5.99-.47.19ZM729.86 702.91h9.92v46.53h-9.92zM734.77 684.37c-1.99 0-3.6.56-4.78 1.67-1.18 1.12-1.78 2.64-1.78 4.52s.6 3.4 1.78 4.52c1.17 1.11 2.78 1.67 4.78 1.67s3.61-.56 4.82-1.67c1.21-1.12 1.83-2.64 1.83-4.52s-.62-3.4-1.83-4.52c-1.21-1.11-2.83-1.67-4.82-1.67M769 736.9l-11.92-33.99h-10.26l17.87 46.53h8.64l17.86-46.53h-10.35zM814.48 702c-6.79 0-12.22 2.18-16.12 6.49-3.89 4.29-5.87 10.28-5.87 17.78s1.96 13.46 5.82 17.69c3.87 4.24 9.34 6.4 16.26 6.4 4 0 7.72-.83 11.06-2.46 3.35-1.64 5.96-3.95 7.76-6.88l.19-.3-5.63-5.42-.3.38c-3.18 4.07-7.43 6.13-12.62 6.13-3.64 0-6.53-1.03-8.6-3.07-1.99-1.96-3.26-4.88-3.78-8.65h32.45v-3.91c0-7.56-1.83-13.54-5.45-17.77-3.63-4.25-8.74-6.41-15.17-6.41m11.16 20.52v.2h-23.09c.46-3.91 1.66-6.98 3.58-9.13 1.97-2.2 4.66-3.32 7.98-3.32 3.57 0 6.41 1.09 8.45 3.24 2.04 2.16 3.08 5.19 3.08 9.01M867.53 702c-3.66 0-6.89.9-9.6 2.68-2.33 1.53-4.14 3.6-5.39 6.16-.01-2.7-.14-5.24-.37-7.53l-.04-.39h-9.36l.04.47c.18 2.23.27 5.96.27 11.11v34.95H853v-22.26c0-3.08.65-5.95 1.92-8.52s3.03-4.63 5.24-6.13c2.2-1.49 4.62-2.25 7.2-2.25 1.76 0 2.45.09 2.71.17l.56.16v-8.23l-.34-.08c-.82-.19-1.75-.28-2.75-.28ZM903.55 702.91l-9.93 32.18-11.17-32.18h-10.64l17.16 43.36c-1.84 4.77-3.78 8.23-5.78 10.28-1.97 2.03-4.42 3.06-7.26 3.06-1.7 0-3.18-.24-4.41-.7l-.6-.23v8.01l.33.08c2.22.55 4.22.84 5.95.84 9.11 0 15.82-5.78 19.95-17.18l17.1-47.52h-10.72ZM177.13 498.76v79.92c0 17.18-13.99 31.17-31.17 31.17s-31.3-13.99-31.3-31.17v-79.92c0-17.18 13.99-31.3 31.3-31.3 8.52 0 16.38 3.46 22.11 9.19 5.59 5.73 9.06 13.59 9.06 22.11%22 class=%22st1%22/%3E%3Cpath d=%22M177.13 418.83v79.79c0 17.32-13.99 31.3-31.17 31.3s-31.3-13.99-31.3-31.3v-79.79c0-17.18 13.99-31.17 31.3-31.17 8.52 0 16.38 3.46 22.11 9.19 5.59 5.59 9.06 13.45 9.06 21.98%22 class=%22st1%22/%3E%3Ccircle cx=%22145.91%22 cy=%22343.62%22 r=%2231.24%22 class=%22st1%22/%3E%3Cpath d=%22M177.13 498.76c0 8.66-3.46 16.38-9.06 22.11-5.73 5.59-13.59 9.06-22.11 9.06-17.32 0-31.3-13.85-31.3-31.17 0-8.52 3.46-16.38 9.19-22.11s13.45-9.19 22.11-9.19 16.38 3.46 22.11 9.19c5.59 5.73 9.06 13.59 9.06 22.11%22 style=%22fill:%233ccbda%22/%3E%3Cpath d=%22M392.62 609.86h-45.66l-52.47-148.19v148.19h-63.68V329.5h66.48l95.32 280.36Z%22 class=%22st1%22/%3E%3Cpath d=%22M442.28 329.5h66.48v280.36h-63.68V461.67l-52.47 148.19h-45.66l95.32-280.36ZM562.43 409.6h56.87v200.26h-56.87zM682.58 599.85c-9.61-9.34-14.42-22.83-14.42-40.45V312.68h56.87V560.6c0 9.61 5.87 14.42 17.62 14.42 6.67 0 14.55-1.86 23.63-5.61l8.41 29.64c-12.81 9.88-29.78 14.82-50.87 14.82-17.89 0-31.64-4.67-41.25-14.02ZM965.34 530.56H827.56c2.4 12.01 7.41 20.97 15.02 26.83 7.61 5.88 17.95 8.81 31.04 8.81 11.48 0 21.49-1.86 30.04-5.61 8.54-3.74 17.08-10.14 25.63-19.22l30.44 28.84c-7.75 13.08-19.82 23.63-36.25 31.64-16.42 8.01-34.24 12.01-53.47 12.01-31.51 0-56.21-9.14-74.1-27.44-17.89-18.29-26.83-43.59-26.83-75.9s8.94-58.2 26.83-76.9c17.89-18.69 42.46-28.04 73.69-28.04s53.33 9.28 70.29 27.83c16.95 18.56 25.43 44.13 25.43 76.7v20.43Zm-56.07-40.46c0-11.74-3.61-21.03-10.82-27.83-7.21-6.81-17.09-10.21-29.64-10.21-11.21 0-20.43 3.54-27.64 10.61-7.21 7.08-12.01 17.02-14.42 29.84h82.51v-2.4ZM590.87 324.49c17.45 0 31.6 14.15 31.6 31.6s-14.15 31.6-31.6 31.6-31.6-14.15-31.6-31.6 14.15-31.6 31.6-31.6%22 class=%22st1%22/%3E%3C/svg%3E", ar: 1.861, mono: false },
|
|
24
520
|
"jtexpress": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220.63 0 998.75 209%22%3E%3Cg fill=%22red%22%3E%3Cpath d=%22M149.56 0h60.17c-15.74 69.29-31.6 138.55-47.44 207.82-53.78-.05-107.56.1-161.34.06 7.71-13.74 14.56-27.94 21.99-41.82 29.62.14 59.24.03 88.86.05C124.4 110.75 136.86 55.34 149.56 0m90.83 0h134.05c-10.56 19.06-20.98 38.2-31.6 57.24.02-5.07 1.03-10.15.33-15.19-1.03-5.79-6.09-9.84-11.33-11.84-9.46-3.61-20.81-3.55-29.5 2.08-11.92 7.26-17.2 23.7-11.15 36.4 5.61 11.14 13.97 20.6 22.57 29.52a317 317 0 0 0 33.23 29.24 23 23 0 0 0 4.07-7.44c2.91-8.48 4.75-17.29 6.45-26.08q20.77 5.93 41.54 11.89c-2.61 20.81-10.83 40.68-22.36 58.11 11.96 14.61 23.97 29.19 35.92 43.81-18.17.04-36.33-.02-54.49.03-3.93-4.09-7.7-8.33-11.63-12.41-18.28 8.5-38.43 12.66-58.52 13.31-23.29.34-47.55-4.97-66.47-19.1-10.68-10.48-16.99-25.92-15.08-40.96 1.47-12.06 7.38-23.11 14.69-32.63 9.51-12.22 21.35-22.51 34.22-31.06-14.01-15.65-23.53-36.72-20.95-58.04 1.83-9 3.98-17.93 6.01-26.88m19.88 138.34c-3.3 5.23-4.21 12.08-1.4 17.72 4.84 9.88 15.32 16.49 26.25 17.08 12.99.81 25.67-3.87 36.81-10.19-12.83-15.18-25.49-30.5-38.44-45.56-8.41 6.12-17.76 11.78-23.22 20.95%22/%3E%3Cpath d=%22M405.16 0h243.61c-4.7 4.53-9.26 9.21-13.92 13.77q-30.34-.05-60.67.01c-2.54 2.54-5.11 5.04-7.64 7.59 20.24.02 40.48-.02 60.72.02-3.96 3.57-7.31 8.09-11.63 11.08-20.3.21-40.61.07-60.91.06q-3.96 3.76-7.78 7.64c20.46.04 40.92 0 61.38.02q-8.32 8.34-16.7 16.61c-22.34.02-44.68.05-67.03-.02-12.67 50.32-25.09 100.7-37.71 151.04-19.59-.07-39.18.12-58.76-.1 11.83-50.46 25.07-100.58 37.51-150.9-30.51-.02-61.03.02-91.54-.02 10.39-18.92 20.59-37.94 31.07-56.8M889.2 138.19c4.89-7.7 13.89-11.85 22.72-12.95 8.51-.94 17.5-.27 25.24 3.68-1.82 4.86-3.68 9.7-5.45 14.57-6.69-3.04-14.53-4.87-21.71-2.52-4.16 1.26-7.57 6.15-5.31 10.38 2.65 4.41 7.7 6.42 11.92 9 6.43 3.45 12.81 8.45 14.83 15.79 2.1 8.77-.67 18.77-7.58 24.72-5.88 5.19-13.72 7.38-21.37 8.14h-7.78c-6.73-.68-13.6-1.97-19.37-5.7l5.86-14.39c7.19 3.88 15.62 6.17 23.79 4.67 4.19-.79 8.44-3.99 8.51-8.6.32-4.75-3.91-7.85-7.56-9.96-6.22-3.48-12.93-6.85-17.1-12.87-5-7.02-4.06-16.9.36-23.96m61.94-.04c4.91-7.7 13.91-11.82 22.74-12.92 8.5-.93 17.46-.23 25.2 3.68-1.82 4.86-3.69 9.7-5.45 14.58-6.12-2.81-13.05-4.44-19.75-3.11-3.45.72-7.01 2.96-7.81 6.6-.72 2.72.73 5.46 2.79 7.18 5.15 4.42 11.79 6.62 16.96 11.02 3.91 3.22 7.07 7.62 7.91 12.7 1.23 8.07-1.29 16.88-7.4 22.46-5.89 5.55-14 7.86-21.87 8.66h-7.8c-6.75-.68-13.63-1.97-19.42-5.7l5.88-14.39c7.21 3.9 15.67 6.18 23.86 4.66 4.14-.8 8.33-3.98 8.43-8.53.35-4.72-3.81-7.86-7.45-9.96-6.22-3.5-12.95-6.85-17.15-12.87-5.07-7.03-4.13-16.97.33-24.06m-391.76-11.96c16.18 0 32.35-.04 48.53.02-1.01 4.97-1.96 9.94-2.94 14.91h-30.82c-1.08 5.82-2.41 11.59-3.27 17.44 9.66-.14 19.33-.02 29-.06q-1.38 7.34-2.79 14.67c-9.7.04-19.41 0-29.12.02-1.24 6.58-2.59 13.13-3.7 19.73 10.86-.1 21.72-.02 32.58-.04l-2.8 14.93h-50.19c5.14-27.21 10.36-54.41 15.52-81.62m56.21-.01 18.53.01c3.06 9.57 6.23 19.13 8.64 28.9 1.12-.72 1.63-1.97 2.25-3.09 4.62-8.88 10.2-17.21 15.34-25.79 7-.05 14-.02 21.01-.02q-14.92 20.05-29.86 40.06c5.18 13.87 10.45 27.7 15.65 41.56-6.24-.02-12.48.06-18.72-.05-3.33-10.11-6.92-20.15-9.9-30.37a2578 2578 0 0 1-18.03 30.36c-7.06.14-14.13.03-21.19.06 10.16-13.97 20.55-27.78 30.61-41.83-4.88-13.22-9.55-26.53-14.33-39.8m75.28 1.54c9.93-2 20.24-2.83 30.31-1.47 8.21 1.14 16.8 5.46 20.08 13.51 4.28 11.17-.13 24.74-9.72 31.75-9.39 6.95-21.78 8.14-33.09 6.94l-5.58 29.37c-5.71.02-11.42-.06-17.12.04 4.88-26.74 10.1-53.43 15.12-80.14m14.89 12.35c-1.53 8.05-3.1 16.1-4.61 24.16 6.56 1.15 14.09.82 19.29-3.85 4.81-4.1 6.69-12.28 2.41-17.38-4.44-4.45-11.4-3.56-17.09-2.93m53.83-12.35c8.64-1.78 17.51-2.4 26.31-2 7.65.49 15.85 2.33 21.4 7.99 5.4 5.55 5.9 14.38 3.16 21.32-2.9 7.27-9.84 12.1-17.11 14.33 3.94 2.19 6.32 6.27 7.14 10.61 1.84 9.21 1.46 18.75 3.88 27.86-6.01-.04-12.02.01-18.02-.03-1.53-7.22-1.81-14.61-2.69-21.92-.45-3.51-1.69-7.49-5.1-9.18-3.41-1.55-7.27-.95-10.89-1.08q-3.06 16.1-6.08 32.19c-5.8.03-11.6-.03-17.39.04 5.02-26.73 10.25-53.42 15.39-80.13m14.89 12.39c-1.28 7.49-2.87 14.92-4.26 22.39 6.33.02 13.46.65 18.7-3.67 4.78-3.55 6.93-11.61 2.4-16.18-4.55-3.98-11.28-3.58-16.84-2.54m55.99-13.92h48.5q-1.44 7.47-2.91 14.93l-30.84.01c-1.11 5.79-2.26 11.57-3.36 17.36q14.53.02 29.1.01-1.37 7.35-2.79 14.68-14.56.01-29.11 0a3257 3257 0 0 0-3.76 19.7h32.63q-1.39 7.47-2.81 14.94h-50.18c5.15-27.22 10.36-54.42 15.53-81.63%22/%3E%3C/g%3E%3C/svg%3E", ar: 4.779, mono: false },
|
|
25
521
|
"mastercard": { src: "data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 1000 618%22%3E%3Cpath fill=%22%23EB001B%22 d=%22M308 0a309 309 0 1 0 2 0z%22/%3E%3Cpath fill=%22%23F79E1B%22 d=%22M690 0a309 309 0 1 0 2 0z%22/%3E%3Cpath fill=%22%23FF5F00%22 d=%22M500 66a309 309 0 0 0 0 486 309 309 0 0 0 0-486%22/%3E%3C/svg%3E", ar: 1.618, mono: false },
|
|
26
522
|
"mercadopago": { src: "data:image/png;base64,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", ar: 3.838, mono: false },
|
|
@@ -247,8 +743,8 @@ function BrandMark({ brand, logoUrl, size = 24, title, className }) {
|
|
|
247
743
|
const fg = found?.fg ?? "var(--sf-brand-mark-fg, #2B2F38)";
|
|
248
744
|
const lines = text.split("\n");
|
|
249
745
|
const longest = Math.max(...lines.map((l) => l.length));
|
|
250
|
-
const fontSize = lines.length > 1 ? longest <= 5 ? 11 : 9.5 : longest <= 2 ? 15 : longest <= 4 ?
|
|
251
|
-
const fit = (l) => l.length > 5 ? { textLength: 40, lengthAdjust: "spacingAndGlyphs" } : {};
|
|
746
|
+
const fontSize = lines.length > 1 ? longest <= 5 ? 11 : 9.5 : longest <= 2 ? 15 : longest <= 4 ? 16 : 10;
|
|
747
|
+
const fit = (l) => l.length > 5 ? { textLength: 40, lengthAdjust: "spacingAndGlyphs" } : l.length === 4 ? { textLength: 36, lengthAdjust: "spacingAndGlyphs" } : {};
|
|
252
748
|
const italic = found?.key === "visa" || found?.key === "fedex" ? "italic" : void 0;
|
|
253
749
|
const common = {
|
|
254
750
|
textAnchor: "middle",
|
|
@@ -263,19 +759,83 @@ function BrandMark({ brand, logoUrl, size = 24, title, className }) {
|
|
|
263
759
|
lines.length > 1 ? lines.slice(0, 2).map((l, i) => /* @__PURE__ */ jsxRuntime.jsx("text", { x: "24", y: i === 0 ? 15 : 25.5, ...common, ...fit(l), children: l }, i)) : /* @__PURE__ */ jsxRuntime.jsx("text", { x: "24", y: "16", dominantBaseline: "central", letterSpacing: longest <= 4 ? 0.3 : 0, ...common, ...fit(text), children: text })
|
|
264
760
|
] });
|
|
265
761
|
}
|
|
266
|
-
var StorefrontContext = react.createContext(null);
|
|
267
|
-
function useOptionalStorefront() {
|
|
268
|
-
return react.useContext(StorefrontContext);
|
|
269
|
-
}
|
|
270
762
|
|
|
271
|
-
// src/
|
|
272
|
-
|
|
273
|
-
const
|
|
274
|
-
return
|
|
763
|
+
// src/checkout/recommend.ts
|
|
764
|
+
var costOf = (r) => {
|
|
765
|
+
const n = Number(r.cost.amount);
|
|
766
|
+
return Number.isFinite(n) ? n : null;
|
|
767
|
+
};
|
|
768
|
+
var daysOf = (r) => r.eta_days_max ?? r.eta_days_min ?? null;
|
|
769
|
+
var norm = (s) => (s ?? "").trim().toLowerCase();
|
|
770
|
+
var carrierKey = (r) => r.carrier ? brandKey(r.carrier) : r.provider ? brandKey(r.provider) : "";
|
|
771
|
+
function dedupeRates(rates) {
|
|
772
|
+
const best = /* @__PURE__ */ new Map();
|
|
773
|
+
const keyOf = (r) => `${carrierKey(r)}|${norm(r.service_code) || norm(r.title)}|${daysOf(r) ?? ""}|${r.cost.currency_code}`;
|
|
774
|
+
for (const r of rates) {
|
|
775
|
+
const k = keyOf(r);
|
|
776
|
+
const prev = best.get(k);
|
|
777
|
+
const c = costOf(r);
|
|
778
|
+
if (!prev || c !== null && (costOf(prev) === null || c < costOf(prev))) best.set(k, r);
|
|
779
|
+
}
|
|
780
|
+
const keep = new Set(best.values());
|
|
781
|
+
return rates.filter((r) => keep.has(r));
|
|
782
|
+
}
|
|
783
|
+
function recommendRates(input, options = {}) {
|
|
784
|
+
const count = Math.max(1, options.count ?? 3);
|
|
785
|
+
const rates = options.dedupe === false ? [...input] : dedupeRates(input);
|
|
786
|
+
const collapseAfter = options.collapseAfter ?? count + 1;
|
|
787
|
+
const sameCurrency = new Set(rates.map((r) => r.cost.currency_code)).size <= 1;
|
|
788
|
+
const byCost = (a, b) => (costOf(a) ?? Infinity) - (costOf(b) ?? Infinity);
|
|
789
|
+
const byDays = (a, b) => (daysOf(a) ?? Infinity) - (daysOf(b) ?? Infinity);
|
|
790
|
+
const tags = /* @__PURE__ */ new Map();
|
|
791
|
+
const tag = (r, t) => tags.set(r, [...tags.get(r) ?? [], t]);
|
|
792
|
+
const cheapest = sameCurrency && rates.length > 1 ? [...rates].sort((a, b) => byCost(a, b) || byDays(a, b))[0] : void 0;
|
|
793
|
+
if (cheapest && costOf(cheapest) !== null) tag(cheapest, "cheapest");
|
|
794
|
+
const fastest = rates.length > 1 ? [...rates].sort((a, b) => byDays(a, b) || byCost(a, b))[0] : void 0;
|
|
795
|
+
if (fastest && daysOf(fastest) !== null && (!cheapest || fastest === cheapest || (daysOf(cheapest) ?? Infinity) > daysOf(fastest))) tag(fastest, "fastest");
|
|
796
|
+
const chosen = [];
|
|
797
|
+
for (const r of [cheapest, fastest]) if (r && tags.has(r) && !chosen.includes(r)) chosen.push(r);
|
|
798
|
+
if (rates.length > collapseAfter) {
|
|
799
|
+
const rank = (sorted, val) => {
|
|
800
|
+
const out = /* @__PURE__ */ new Map();
|
|
801
|
+
let pos = 0;
|
|
802
|
+
let last;
|
|
803
|
+
sorted.forEach((r, i) => {
|
|
804
|
+
const v = val(r);
|
|
805
|
+
if (v !== last) pos = i;
|
|
806
|
+
last = v;
|
|
807
|
+
out.set(r, v === null ? sorted.length : pos);
|
|
808
|
+
});
|
|
809
|
+
return out;
|
|
810
|
+
};
|
|
811
|
+
const priceRank = rank([...rates].sort(byCost), costOf);
|
|
812
|
+
const timeRank = rank([...rates].sort(byDays), daysOf);
|
|
813
|
+
const rest = rates.filter((r) => !chosen.includes(r)).sort((a, b) => priceRank.get(a) + timeRank.get(a) - (priceRank.get(b) + timeRank.get(b)) || byCost(a, b));
|
|
814
|
+
let first = true;
|
|
815
|
+
for (const r of rest) {
|
|
816
|
+
if (chosen.length >= count) break;
|
|
817
|
+
chosen.push(r);
|
|
818
|
+
if (first) tag(r, "best_value");
|
|
819
|
+
first = false;
|
|
820
|
+
}
|
|
821
|
+
} else {
|
|
822
|
+
for (const r of rates) if (!chosen.includes(r)) chosen.push(r);
|
|
823
|
+
}
|
|
824
|
+
const recommended = chosen.sort(byCost).map((rate) => ({ rate, tags: tags.get(rate) ?? [] }));
|
|
825
|
+
const groups = /* @__PURE__ */ new Map();
|
|
826
|
+
for (const r of [...rates].sort(byCost)) {
|
|
827
|
+
if (chosen.includes(r)) continue;
|
|
828
|
+
const key = carrierKey(r);
|
|
829
|
+
const g = groups.get(key) ?? { key, carrier: r.carrier ?? r.provider ?? null, rates: [] };
|
|
830
|
+
g.rates.push(r);
|
|
831
|
+
groups.set(key, g);
|
|
832
|
+
}
|
|
833
|
+
const more = [...groups.values()];
|
|
834
|
+
return { recommended, more, moreCount: more.reduce((n, g) => n + g.rates.length, 0) };
|
|
275
835
|
}
|
|
276
836
|
|
|
277
837
|
// src/checkout/delivery.ts
|
|
278
|
-
var
|
|
838
|
+
var ES4 = {
|
|
279
839
|
etaOne: "Llega en 1 d\xEDa h\xE1bil",
|
|
280
840
|
etaMany: "Llega en {n} d\xEDas h\xE1biles",
|
|
281
841
|
etaRange: "Llega en {min} a {max} d\xEDas h\xE1biles",
|
|
@@ -289,11 +849,16 @@ var ES = {
|
|
|
289
849
|
quoteTomorrow: "Precios de env\xEDo vigentes hasta ma\xF1ana a las {time}.",
|
|
290
850
|
quoteLater: "Precios de env\xEDo vigentes hasta el {date}.",
|
|
291
851
|
quoteSoon: "Los precios de env\xEDo vencen pronto ({time}).",
|
|
292
|
-
partial: "
|
|
852
|
+
partial: "Algunas paqueter\xEDas no respondieron a tiempo; estas son las opciones disponibles.",
|
|
293
853
|
loading: "Buscando opciones de env\xEDo\u2026",
|
|
294
|
-
requoted: "Las tarifas de env\xEDo cambiaron y ya est\xE1n actualizadas. Revisa tu env\xEDo antes de pagar."
|
|
854
|
+
requoted: "Las tarifas de env\xEDo cambiaron y ya est\xE1n actualizadas. Revisa tu env\xEDo antes de pagar.",
|
|
855
|
+
bestValue: "Recomendado",
|
|
856
|
+
moreOptions: "Ver m\xE1s opciones ({n})",
|
|
857
|
+
otherCarriers: "Otras opciones",
|
|
858
|
+
error: "No pudimos consultar las opciones de env\xEDo en este momento.",
|
|
859
|
+
retry: "Intentar de nuevo"
|
|
295
860
|
};
|
|
296
|
-
var
|
|
861
|
+
var EN4 = {
|
|
297
862
|
etaOne: "Arrives in 1 business day",
|
|
298
863
|
etaMany: "Arrives in {n} business days",
|
|
299
864
|
etaRange: "Arrives in {min} to {max} business days",
|
|
@@ -309,10 +874,15 @@ var EN = {
|
|
|
309
874
|
quoteSoon: "Shipping prices expire soon ({time}).",
|
|
310
875
|
partial: "We couldn't reach every carrier. These are the options available now.",
|
|
311
876
|
loading: "Looking for delivery options\u2026",
|
|
312
|
-
requoted: "Shipping rates changed and are now up to date. Check your delivery before paying."
|
|
877
|
+
requoted: "Shipping rates changed and are now up to date. Check your delivery before paying.",
|
|
878
|
+
bestValue: "Recommended",
|
|
879
|
+
moreOptions: "Show more options ({n})",
|
|
880
|
+
otherCarriers: "Other options",
|
|
881
|
+
error: "We couldn't get delivery options right now.",
|
|
882
|
+
retry: "Try again"
|
|
313
883
|
};
|
|
314
884
|
function deliveryMessages(locale, overrides) {
|
|
315
|
-
const base = (locale ?? "es-MX").toLowerCase().startsWith("en") ?
|
|
885
|
+
const base = (locale ?? "es-MX").toLowerCase().startsWith("en") ? EN4 : ES4;
|
|
316
886
|
return overrides ? { ...base, ...overrides } : base;
|
|
317
887
|
}
|
|
318
888
|
var fill = (tpl, vars) => tpl.replace(/\{(\w+)\}/g, (_, k) => String(vars[k] ?? "")).replace(/\.\.$/, ".");
|
|
@@ -332,7 +902,7 @@ function rateService(rate) {
|
|
|
332
902
|
}
|
|
333
903
|
return title;
|
|
334
904
|
}
|
|
335
|
-
function rateEta(rate, messages =
|
|
905
|
+
function rateEta(rate, messages = ES4) {
|
|
336
906
|
const { eta_days_min: min, eta_days_max: max } = rate;
|
|
337
907
|
if (typeof min === "number" && typeof max === "number") {
|
|
338
908
|
if (min === max) return min === 1 ? messages.etaOne : fill(messages.etaMany, { n: min });
|
|
@@ -342,11 +912,11 @@ function rateEta(rate, messages = ES) {
|
|
|
342
912
|
if (typeof min === "number") return min === 1 ? messages.etaOne : fill(messages.etaFrom, { min });
|
|
343
913
|
return rate.eta ?? null;
|
|
344
914
|
}
|
|
345
|
-
var
|
|
915
|
+
var costOf2 = (r) => {
|
|
346
916
|
const n = Number(r.cost.amount);
|
|
347
917
|
return Number.isFinite(n) ? n : null;
|
|
348
918
|
};
|
|
349
|
-
var
|
|
919
|
+
var daysOf2 = (r) => r.eta_days_max ?? r.eta_days_min ?? null;
|
|
350
920
|
function rateBadges(rates) {
|
|
351
921
|
const out = /* @__PURE__ */ new Map();
|
|
352
922
|
if (rates.length < 2) return out;
|
|
@@ -360,10 +930,10 @@ function rateBadges(rates) {
|
|
|
360
930
|
};
|
|
361
931
|
const currencies = new Set(rates.map((r) => r.cost.currency_code));
|
|
362
932
|
if (currencies.size === 1) {
|
|
363
|
-
const id = unique(rates.map((r) => [r.id,
|
|
933
|
+
const id = unique(rates.map((r) => [r.id, costOf2(r)]));
|
|
364
934
|
if (id) add(id, "cheapest");
|
|
365
935
|
}
|
|
366
|
-
const fast = unique(rates.map((r) => [r.id,
|
|
936
|
+
const fast = unique(rates.map((r) => [r.id, daysOf2(r)]));
|
|
367
937
|
if (fast) add(fast, "fastest");
|
|
368
938
|
return out;
|
|
369
939
|
}
|
|
@@ -382,7 +952,7 @@ function quoteNote(deadline, opts = {}) {
|
|
|
382
952
|
const now = opts.now ?? /* @__PURE__ */ new Date();
|
|
383
953
|
const left = deadline.getTime() - now.getTime();
|
|
384
954
|
if (left <= 0) return null;
|
|
385
|
-
const m = opts.messages ??
|
|
955
|
+
const m = opts.messages ?? ES4;
|
|
386
956
|
const locale = opts.locale ?? "es-MX";
|
|
387
957
|
const tz = opts.timeZone ? { timeZone: opts.timeZone } : {};
|
|
388
958
|
const time = new Intl.DateTimeFormat(locale, { hour: "numeric", minute: "2-digit", ...tz }).format(deadline);
|
|
@@ -402,13 +972,13 @@ function isQuoteChange(err) {
|
|
|
402
972
|
}
|
|
403
973
|
function matchRate(previous, rates) {
|
|
404
974
|
if (!previous) return null;
|
|
405
|
-
const
|
|
406
|
-
const sameCarrier = (r) =>
|
|
975
|
+
const norm2 = (s) => (s ?? "").trim().toLowerCase();
|
|
976
|
+
const sameCarrier = (r) => norm2(r.carrier) === norm2(previous.carrier);
|
|
407
977
|
if (previous.service_code) {
|
|
408
|
-
const hit = rates.find((r) => sameCarrier(r) &&
|
|
978
|
+
const hit = rates.find((r) => sameCarrier(r) && norm2(r.service_code) === norm2(previous.service_code));
|
|
409
979
|
if (hit) return hit;
|
|
410
980
|
}
|
|
411
|
-
return rates.find((r) => sameCarrier(r) &&
|
|
981
|
+
return rates.find((r) => sameCarrier(r) && norm2(r.title) === norm2(previous.title)) ?? null;
|
|
412
982
|
}
|
|
413
983
|
var SR_ONLY = { position: "absolute", width: 1, height: 1, overflow: "hidden", clip: "rect(0 0 0 0)", whiteSpace: "nowrap" };
|
|
414
984
|
var useHydrated = () => react.useSyncExternalStore(
|
|
@@ -442,7 +1012,10 @@ function DeliveryOptions(props) {
|
|
|
442
1012
|
renderAmount,
|
|
443
1013
|
classNames: cx = {},
|
|
444
1014
|
testId,
|
|
445
|
-
children
|
|
1015
|
+
children,
|
|
1016
|
+
layout = "list",
|
|
1017
|
+
error,
|
|
1018
|
+
onRetry
|
|
446
1019
|
} = props;
|
|
447
1020
|
const locale = useResolvedLocale(props.locale);
|
|
448
1021
|
const m = react.useMemo(() => deliveryMessages(locale, props.messages), [locale, props.messages]);
|
|
@@ -455,7 +1028,13 @@ function DeliveryOptions(props) {
|
|
|
455
1028
|
const deadline = mode === "never" ? null : quoteDeadline(rates);
|
|
456
1029
|
const note = hydrated && deadline ? quoteNote(deadline, { locale, messages: m, ...timeZone ? { timeZone } : {} }) : null;
|
|
457
1030
|
const shownNote = note && (mode === "always" || note.soon) ? note : null;
|
|
458
|
-
const
|
|
1031
|
+
const current = value ?? defaultValue ?? null;
|
|
1032
|
+
const plan = react.useMemo(
|
|
1033
|
+
() => layout === "recommended" ? recommendRates(rates, { count: props.recommendedCount ?? 3 }) : null,
|
|
1034
|
+
[layout, rates, props.recommendedCount]
|
|
1035
|
+
);
|
|
1036
|
+
const inMore = plan ? plan.more.some((g) => g.rates.some((r) => rateValue(r) === current)) : false;
|
|
1037
|
+
const radio = (v, describedBy) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
459
1038
|
"input",
|
|
460
1039
|
{
|
|
461
1040
|
type: "radio",
|
|
@@ -463,36 +1042,66 @@ function DeliveryOptions(props) {
|
|
|
463
1042
|
value: v,
|
|
464
1043
|
required,
|
|
465
1044
|
className: cx.radio,
|
|
1045
|
+
...{},
|
|
466
1046
|
...value !== void 0 ? { checked: value === v, onChange: () => onValueChange?.(v) } : { defaultChecked: v === defaultValue, ...onValueChange ? { onChange: () => onValueChange(v) } : {} },
|
|
467
1047
|
...testId ? { "data-testid": testId } : {}
|
|
468
1048
|
}
|
|
469
1049
|
);
|
|
470
|
-
|
|
471
|
-
|
|
1050
|
+
const tagText = (t) => t === "cheapest" ? m.cheapest : t === "fastest" ? m.fastest : m.bestValue;
|
|
1051
|
+
const rateRow = (rate, opts) => {
|
|
1052
|
+
const carrier = rateCarrier(rate);
|
|
1053
|
+
const service = rateService(rate);
|
|
1054
|
+
const eta = rateEta(rate, m);
|
|
1055
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx.option, "data-sf-delivery-option": true, "data-loading": loading || void 0, "data-grouped": opts.grouped || void 0, children: [
|
|
1056
|
+
radio(rateValue(rate)),
|
|
1057
|
+
marks && !opts.grouped ? (
|
|
1058
|
+
// Fixed slot: logos of different widths do not push the text column out of line.
|
|
1059
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { "data-sf-delivery-mark": true, "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx(BrandMark, { brand: rate.carrier ?? rate.provider ?? rate.title, size: 28, ...cx.mark ? { className: cx.mark } : {} }) })
|
|
1060
|
+
) : null,
|
|
1061
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: cx.body, "data-sf-delivery-body": true, children: [
|
|
1062
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.title, "data-sf-delivery-title": true, children: carrier ? opts.grouped ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1063
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: SR_ONLY, children: [
|
|
1064
|
+
carrier,
|
|
1065
|
+
" "
|
|
1066
|
+
] }),
|
|
1067
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.carrier, "data-sf-delivery-carrier": true, "data-sf-delivery-service-only": true, children: service })
|
|
1068
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1069
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.carrier, "data-sf-delivery-carrier": true, children: carrier }),
|
|
1070
|
+
" ",
|
|
1071
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.service, "data-sf-delivery-service": true, children: service })
|
|
1072
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.carrier, "data-sf-delivery-carrier": true, children: service }) }),
|
|
1073
|
+
eta ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.eta, "data-sf-delivery-eta": true, children: eta }) : null,
|
|
1074
|
+
opts.tags.length ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.badges, "data-sf-delivery-badges": true, children: opts.tags.map((b) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.badge, "data-sf-delivery-badge": b, children: tagText(b) }, b)) }) : null
|
|
1075
|
+
] }),
|
|
1076
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.price, "data-sf-delivery-price": true, children: amount(rate.cost) })
|
|
1077
|
+
] }, rate.id);
|
|
1078
|
+
};
|
|
1079
|
+
const errorText = error ? typeof error === "string" ? error : m.error : null;
|
|
1080
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cx.root, "data-sf-delivery": true, "data-layout": layout, "aria-busy": loading || void 0, children: [
|
|
1081
|
+
partial && !errorText ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", className: cx.partial, "data-sf-delivery-partial": true, children: m.partial }) : null,
|
|
472
1082
|
requoted ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "status", className: cx.partial, "data-sf-delivery-requoted": true, children: m.requoted }) : null,
|
|
473
1083
|
loading ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: SR_ONLY, role: "status", "data-sf-delivery-loading": true, children: m.loading }) : null,
|
|
1084
|
+
errorText && rates.length === 0 && !loading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "alert", className: cx.error, "data-sf-delivery-error": true, children: [
|
|
1085
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { children: errorText }),
|
|
1086
|
+
onRetry ? /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: cx.retry, onClick: onRetry, "data-sf-delivery-retry": true, children: m.retry }) : null
|
|
1087
|
+
] }) : null,
|
|
474
1088
|
children,
|
|
475
1089
|
loading && rates.length === 0 ? [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("div", { className: cx.skeleton, "data-sf-delivery-skeleton": true, "aria-hidden": "true" }, i)) : null,
|
|
476
|
-
rates.map((rate) => {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
own.length ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.badges, "data-sf-delivery-badges": true, children: own.map((b) => /* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.badge, "data-sf-delivery-badge": b, children: b === "cheapest" ? m.cheapest : m.fastest }, b)) }) : null
|
|
492
|
-
] }),
|
|
493
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cx.price, "data-sf-delivery-price": true, children: amount(rate.cost) })
|
|
494
|
-
] }, rate.id);
|
|
495
|
-
}),
|
|
1090
|
+
plan ? plan.recommended.map(({ rate, tags }) => rateRow(rate, { tags: showBadges ? tags : [] })) : rates.map((rate) => rateRow(rate, { tags: badges.get(rate.id) ?? [] })),
|
|
1091
|
+
plan && plan.moreCount > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("details", { className: cx.more, "data-sf-delivery-more": true, ...inMore ? { open: true } : {}, children: [
|
|
1092
|
+
/* @__PURE__ */ jsxRuntime.jsx("summary", { className: cx.moreSummary, "data-sf-delivery-more-summary": true, children: m.moreOptions.replace("{n}", String(plan.moreCount)) }),
|
|
1093
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { "data-sf-delivery-groups": true, children: plan.more.map((g) => {
|
|
1094
|
+
const carrierName = g.carrier ? rateCarrier({ carrier: g.carrier }) : null;
|
|
1095
|
+
const id = `${name}-group-${g.key || "other"}`;
|
|
1096
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { role: "group", "aria-labelledby": id, className: cx.group, "data-sf-delivery-group": g.key || "other", children: [
|
|
1097
|
+
/* @__PURE__ */ jsxRuntime.jsxs("p", { id, className: cx.groupTitle, "data-sf-delivery-group-title": true, children: [
|
|
1098
|
+
marks && g.carrier ? /* @__PURE__ */ jsxRuntime.jsx(BrandMark, { brand: g.carrier, size: 22 }) : null,
|
|
1099
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: carrierName ?? m.otherCarriers })
|
|
1100
|
+
] }),
|
|
1101
|
+
g.rates.map((rate) => rateRow(rate, { tags: [], grouped: Boolean(carrierName) }))
|
|
1102
|
+
] }, g.key || "other");
|
|
1103
|
+
}) })
|
|
1104
|
+
] }) : null,
|
|
496
1105
|
pickup.map((b) => /* @__PURE__ */ jsxRuntime.jsxs("label", { className: cx.option, "data-sf-delivery-option": true, "data-sf-delivery-pickup": true, children: [
|
|
497
1106
|
radio(pickupValue(b)),
|
|
498
1107
|
marks ? /* @__PURE__ */ jsxRuntime.jsx(PickupGlyph, { size: 28 }) : null,
|
|
@@ -506,21 +1115,34 @@ function DeliveryOptions(props) {
|
|
|
506
1115
|
] });
|
|
507
1116
|
}
|
|
508
1117
|
|
|
1118
|
+
exports.AddressFields = AddressFields;
|
|
509
1119
|
exports.BrandMark = BrandMark;
|
|
1120
|
+
exports.CheckoutField = CheckoutField;
|
|
1121
|
+
exports.ContactFields = ContactFields;
|
|
510
1122
|
exports.DeliveryOptions = DeliveryOptions;
|
|
1123
|
+
exports.ErrorSummary = ErrorSummary;
|
|
1124
|
+
exports.OrderSummary = OrderSummary;
|
|
1125
|
+
exports.OrderSummaryDisclosure = OrderSummaryDisclosure;
|
|
1126
|
+
exports.addressFieldsMessages = addressFieldsMessages;
|
|
511
1127
|
exports.brandKey = brandKey;
|
|
512
1128
|
exports.brandLogo = brandLogo;
|
|
513
1129
|
exports.brandName = brandName;
|
|
1130
|
+
exports.dedupeRates = dedupeRates;
|
|
514
1131
|
exports.deliveryMessages = deliveryMessages;
|
|
1132
|
+
exports.fieldMessages = fieldMessages;
|
|
515
1133
|
exports.findBrand = findBrand;
|
|
516
1134
|
exports.isQuoteChange = isQuoteChange;
|
|
517
1135
|
exports.listBrands = listBrands;
|
|
518
1136
|
exports.matchRate = matchRate;
|
|
1137
|
+
exports.orderSummaryMessages = orderSummaryMessages;
|
|
519
1138
|
exports.quoteDeadline = quoteDeadline;
|
|
520
1139
|
exports.quoteNote = quoteNote;
|
|
521
1140
|
exports.rateBadges = rateBadges;
|
|
522
1141
|
exports.rateCarrier = rateCarrier;
|
|
523
1142
|
exports.rateEta = rateEta;
|
|
524
1143
|
exports.rateService = rateService;
|
|
1144
|
+
exports.recommendRates = recommendRates;
|
|
1145
|
+
exports.useFieldErrors = useFieldErrors;
|
|
1146
|
+
exports.validationMessage = validationMessage;
|
|
525
1147
|
//# sourceMappingURL=checkout.cjs.map
|
|
526
1148
|
//# sourceMappingURL=checkout.cjs.map
|