@faststore/api 4.8.1-dev.0 → 4.8.1-dev.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/es/index.mjs CHANGED
@@ -42,7 +42,7 @@ const et = () => function(n = {}) {
42
42
  return n;
43
43
  }
44
44
  })
45
- }, it = "cacheControl", to = (e, n) => {
45
+ }, it = "cacheControl", ro = (e, n) => {
46
46
  const {
47
47
  scope: t = "private",
48
48
  sMaxAge: r = 0,
@@ -80,7 +80,7 @@ const et = () => function(n = {}) {
80
80
  resolvers: n
81
81
  })
82
82
  );
83
- }, cn = "@faststore/api", ln = "4.8.0", Ee = {
83
+ }, cn = "@faststore/api", ln = "4.8.1-dev.1", Ee = {
84
84
  name: cn,
85
85
  version: ln
86
86
  }, ct = qn("@faststore/api"), lt = (e, n = "Unknown Graphql Resolver") => (t, r, i, a) => {
@@ -141,7 +141,7 @@ class $ extends Z {
141
141
  super({ status: 404, type: "NotFoundError" }, n);
142
142
  }
143
143
  }
144
- const ro = (e) => e?.name === "FastStoreError", io = (e) => e?.extensions?.type === "BadRequestError", ao = (e) => e?.extensions?.type === "UnauthorizedError", dt = (e) => e?.extensions?.type === "ForbiddenError", Y = (e) => e?.extensions?.type === "NotFoundError", ut = `${Ee.name}@${Ee.version}`, y = async (e, n, t) => {
144
+ const io = (e) => e?.name === "FastStoreError", ao = (e) => e?.extensions?.type === "BadRequestError", oo = (e) => e?.extensions?.type === "UnauthorizedError", dt = (e) => e?.extensions?.type === "ForbiddenError", Y = (e) => e?.extensions?.type === "NotFoundError", ut = `${Ee.name}@${Ee.version}`, y = async (e, n, t) => {
145
145
  const r = await jn(e, {
146
146
  ...n,
147
147
  headers: {
@@ -314,7 +314,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
314
314
  accept: "application/json",
315
315
  "content-type": "application/json",
316
316
  "x-vtex-rec-origin": `${e}/${yt}`
317
- }), b = (l = {}) => {
317
+ }), v = (l = {}) => {
318
318
  const p = L(me(i) ?? "", e);
319
319
  return s({
320
320
  ...l,
@@ -427,8 +427,8 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
427
427
  index: p,
428
428
  deliveryMode: m,
429
429
  selectedAddresses: S
430
- }, v) => {
431
- const w = v ? {
430
+ }, O) => {
431
+ const w = O ? {
432
432
  startDateUtc: m?.deliveryWindow?.startDate,
433
433
  endDateUtc: m?.deliveryWindow?.endDate
434
434
  } : null, C = {
@@ -496,11 +496,11 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
496
496
  channel: m = i.storage.channel,
497
497
  preserveSalesChannel: S = !1
498
498
  }) => {
499
- const { salesChannel: v } = m, w = s({
499
+ const { salesChannel: O } = m, w = s({
500
500
  "content-type": "application/json",
501
501
  "X-FORWARDED-HOST": g
502
502
  }), C = new URLSearchParams();
503
- (!S || !l) && C.set("sc", v), l && C.set("refreshOutdatedData", p.toString());
503
+ (!S || !l) && C.set("sc", O), l && C.set("refreshOutdatedData", p.toString());
504
504
  const k = l ? `/${l}` : "", I = `${a}/api/checkout/pub/orderForm${k}?${C}`;
505
505
  return y(
506
506
  I,
@@ -531,7 +531,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
531
531
  orderItems: p,
532
532
  allowOutdatedData: m = "paymentData",
533
533
  salesChannel: S = i.storage.channel.salesChannel,
534
- shouldSplitItem: v = !0
534
+ shouldSplitItem: O = !0
535
535
  }) => {
536
536
  const w = new URLSearchParams({
537
537
  allowOutdatedData: m,
@@ -546,7 +546,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
546
546
  headers: C,
547
547
  body: JSON.stringify({
548
548
  orderItems: p,
549
- noSplitItem: !v
549
+ noSplitItem: !O
550
550
  }),
551
551
  method: "PATCH"
552
552
  },
@@ -559,14 +559,14 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
559
559
  key: m,
560
560
  value: S
561
561
  }) => {
562
- const v = s({
562
+ const O = s({
563
563
  "content-type": "application/json",
564
564
  "X-FORWARDED-HOST": g
565
565
  });
566
566
  return y(
567
567
  `${a}/api/checkout/pub/orderForm/${l}/customData/${p}/${m}`,
568
568
  {
569
- headers: v,
569
+ headers: O,
570
570
  body: JSON.stringify({ value: S }),
571
571
  method: "PUT"
572
572
  }
@@ -578,15 +578,15 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
578
578
  country: m,
579
579
  salesChannel: S
580
580
  }) => {
581
- const v = new URLSearchParams({
581
+ const O = new URLSearchParams({
582
582
  country: m,
583
583
  sc: S ?? ""
584
584
  });
585
- l ? v.append("postalCode", l) : v.append(
585
+ l ? O.append("postalCode", l) : O.append(
586
586
  "geoCoordinates",
587
587
  `${p?.longitude};${p?.latitude}`
588
588
  );
589
- const w = `${a}/api/checkout/pub/regions/?${v.toString()}`, C = s({
589
+ const w = `${a}/api/checkout/pub/regions/?${O.toString()}`, C = s({
590
590
  "content-type": "application/json",
591
591
  "X-FORWARDED-HOST": g
592
592
  });
@@ -677,6 +677,25 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
677
677
  { storeCookies: o }
678
678
  );
679
679
  },
680
+ storeFront: {
681
+ /**
682
+ * Attached contracts of an Org Unit from the buyer-portal store-front BFF
683
+ * (requires the `buyer-portal-graphql` IO app). Buyer cookie forwarded;
684
+ * no app keys involved.
685
+ */
686
+ attachedContracts: (l) => {
687
+ const p = s({
688
+ "content-type": "application/json"
689
+ });
690
+ return y(
691
+ `https://${e}.myvtex.com/_v/store-front/units/${encodeURIComponent(
692
+ l
693
+ )}/contracts/attached?details=true`,
694
+ { headers: p },
695
+ { storeCookies: o }
696
+ );
697
+ }
698
+ },
680
699
  subscribeToNewsletter: (l) => y(
681
700
  `${a}/api/dataentities/NL/documents/`,
682
701
  {
@@ -719,7 +738,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
719
738
  status: p,
720
739
  dateInitial: m,
721
740
  dateFinal: S,
722
- text: v,
741
+ text: O,
723
742
  clientEmail: w,
724
743
  perPage: C,
725
744
  pendingMyApproval: k
@@ -743,7 +762,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
743
762
  );
744
763
  S = new Date(A).toISOString();
745
764
  }
746
- v && I.append("text", v), p && p.length > 0 && I.append("status", p.filter(Boolean).join(",")), m && S ? I.append(
765
+ O && I.append("text", O), p && p.length > 0 && I.append("status", p.filter(Boolean).join(",")), m && S ? I.append(
747
766
  "creation_date",
748
767
  `creationDate:[${m} TO ${S}]`
749
768
  ) : m ? I.append("creation_date", `creationDate:[${m} TO *]`) : S && I.append("creation_date", `creationDate:[* TO ${S}]`), w && I.append("clientEmail", w), l && I.append("page", l.toString()), C && I.append("per_page", C.toString()), k && I.append("my_pending_approvals", String(!0));
@@ -782,7 +801,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
782
801
  ruleId: m,
783
802
  approved: S
784
803
  }) => {
785
- const v = s({
804
+ const O = s({
786
805
  "content-type": "application/json",
787
806
  "X-FORWARDED-HOST": g
788
807
  }), k = {
@@ -796,7 +815,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
796
815
  `${a}/${e}/commercial-authorizations/${l}/callback`,
797
816
  {
798
817
  method: "POST",
799
- headers: v,
818
+ headers: O,
800
819
  body: JSON.stringify(k)
801
820
  },
802
821
  { storeCookies: o }
@@ -948,7 +967,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
948
967
  }) => {
949
968
  if (!l)
950
969
  throw new E("Missing contractId to fetch CL fields.");
951
- const p = b({
970
+ const p = v({
952
971
  Accept: "application/json",
953
972
  "content-type": "application/json"
954
973
  });
@@ -1024,24 +1043,24 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
1024
1043
  const S = s({
1025
1044
  "content-type": "application/json",
1026
1045
  "X-FORWARDED-HOST": g
1027
- }), v = `----FastStoreUploadBoundary${Date.now()}`, w = `\r
1046
+ }), O = `----FastStoreUploadBoundary${Date.now()}`, w = `\r
1028
1047
  `, k = /^[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_]*\/[a-zA-Z0-9][a-zA-Z0-9!#$&\-.^_+]*$/.test(m) ? m : "application/octet-stream", I = p.replaceAll(/[\r\n"]/g, "_"), D = [
1029
- `--${v}`,
1048
+ `--${O}`,
1030
1049
  `Content-Disposition: form-data; name="file"; filename="${I}"`,
1031
1050
  `Content-Type: ${k}`,
1032
1051
  "",
1033
1052
  ""
1034
- ].join(w), A = `${w}--${v}--${w}`, _ = Buffer.from(D), P = Buffer.from(A), R = new Uint8Array(
1053
+ ].join(w), A = `${w}--${O}--${w}`, _ = Buffer.from(D), P = Buffer.from(A), R = new Uint8Array(
1035
1054
  _.byteLength + l.byteLength + P.byteLength
1036
1055
  );
1037
- let O = 0;
1038
- return R.set(_, O), O += _.byteLength, R.set(l, O), O += l.byteLength, R.set(P, O), y(
1056
+ let b = 0;
1057
+ return R.set(_, b), b += _.byteLength, R.set(l, b), b += l.byteLength, R.set(P, b), y(
1039
1058
  `${a}/api/order-entry/upload?an=${e}`,
1040
1059
  {
1041
1060
  method: "POST",
1042
1061
  headers: {
1043
1062
  ...S,
1044
- "content-type": `multipart/form-data; boundary=${v}`
1063
+ "content-type": `multipart/form-data; boundary=${O}`
1045
1064
  },
1046
1065
  body: R.buffer
1047
1066
  },
@@ -1056,7 +1075,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
1056
1075
  const S = s({
1057
1076
  "content-type": "application/json",
1058
1077
  "X-FORWARDED-HOST": g
1059
- }), v = JSON.stringify({
1078
+ }), O = JSON.stringify({
1060
1079
  objectKey: l,
1061
1080
  orderFormId: p,
1062
1081
  operation: "CreateCart",
@@ -1067,7 +1086,7 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
1067
1086
  {
1068
1087
  method: "POST",
1069
1088
  headers: S,
1070
- body: v
1089
+ body: O
1071
1090
  },
1072
1091
  {}
1073
1092
  );
@@ -1130,10 +1149,10 @@ const wt = ({ account: e, environment: n, incrementAddress: t, subDomainPrefix:
1130
1149
  userId: p,
1131
1150
  products: m = [],
1132
1151
  salesChannel: S,
1133
- locale: v
1152
+ locale: O
1134
1153
  }) => {
1135
1154
  const w = new URLSearchParams({ an: e, campaignVrn: l });
1136
- return p && w.append("userId", p), m.length > 0 && w.append("products", m.join(",")), S && w.append("salesChannel", S), v && w.append("locale", v), y(
1155
+ return p && w.append("userId", p), m.length > 0 && w.append("products", m.join(",")), S && w.append("salesChannel", S), O && w.append("locale", O), y(
1137
1156
  `${f}/recommendations?${w.toString()}`,
1138
1157
  { headers: h },
1139
1158
  { storeCookies: o }
@@ -1313,11 +1332,11 @@ function Ne(e, n, t, r) {
1313
1332
  h.append("from", p.toString()), h.append("to", m.toString());
1314
1333
  }
1315
1334
  i && h.append("query", i), r.includeSort && s && h.append("sort", s);
1316
- const b = Bt(
1335
+ const v = Bt(
1317
1336
  t.segmentParams,
1318
1337
  c
1319
1338
  );
1320
- if (mn(h, b ?? t.segmentParams), Wt(c, h), u && h.append("show-invisible-items", "true"), n?.hideUnavailableItems !== void 0) {
1339
+ if (mn(h, v ?? t.segmentParams), Wt(c, h), u && h.append("show-invisible-items", "true"), n?.hideUnavailableItems !== void 0) {
1321
1340
  const p = c.find(({ key: S }) => S === Pt), m = p ? p.value : g?.toString() ?? n.hideUnavailableItems.toString();
1322
1341
  h.append("hideUnavailableItems", m);
1323
1342
  }
@@ -1413,7 +1432,7 @@ const Jt = ({
1413
1432
  hideUnavailableItems: t,
1414
1433
  simulationBehavior: r,
1415
1434
  showSponsored: i
1416
- }), g = new Headers(o.headers).get("x-forwarded-host") ?? o.headers?.host ?? "", f = a && a.map((I) => I + ".").find((I) => g.includes(I)) || "", h = g.replace(f, ""), b = c({
1435
+ }), g = new Headers(o.headers).get("x-forwarded-host") ?? o.headers?.host ?? "", f = a && a.map((I) => I + ".").find((I) => g.includes(I)) || "", h = g.replace(f, ""), v = c({
1417
1436
  "content-type": "application/json",
1418
1437
  "X-FORWARDED-HOST": h
1419
1438
  }), l = ({ type: I, ...D }) => {
@@ -1425,7 +1444,7 @@ const Jt = ({
1425
1444
  });
1426
1445
  return y(
1427
1446
  `${s}/api/intelligent-search/v1/${A}/${_.path}?${_.params.toString()}`,
1428
- { headers: b }
1447
+ { headers: v }
1429
1448
  );
1430
1449
  }, p = (I) => l({ ...I, type: "product_search" }), m = ({
1431
1450
  field: I,
@@ -1446,7 +1465,7 @@ const Jt = ({
1446
1465
  });
1447
1466
  return y(
1448
1467
  `${s}/api/intelligent-search/v1/products?${P.params.toString()}`,
1449
- { headers: b }
1468
+ { headers: v }
1450
1469
  );
1451
1470
  };
1452
1471
  return {
@@ -1462,11 +1481,11 @@ const Jt = ({
1462
1481
  const P = De(Gt);
1463
1482
  return (await Promise.all(
1464
1483
  D.map(
1465
- (O) => P(async () => {
1484
+ (b) => P(async () => {
1466
1485
  try {
1467
1486
  return await m({
1468
1487
  field: I,
1469
- value: O,
1488
+ value: b,
1470
1489
  hideUnavailableItems: _,
1471
1490
  showInvisibleItems: A
1472
1491
  });
@@ -1476,7 +1495,7 @@ const Jt = ({
1476
1495
  })
1477
1496
  )
1478
1497
  )).filter(
1479
- (O) => O !== null
1498
+ (b) => b !== null
1480
1499
  );
1481
1500
  },
1482
1501
  suggestedTerms: (I) => {
@@ -1488,7 +1507,7 @@ const Jt = ({
1488
1507
  });
1489
1508
  return y(
1490
1509
  `${s}/api/intelligent-search/v1/search-suggestions?${D.params.toString()}`,
1491
- { headers: b }
1510
+ { headers: v }
1492
1511
  );
1493
1512
  },
1494
1513
  topSearches: () => {
@@ -1499,7 +1518,7 @@ const Jt = ({
1499
1518
  });
1500
1519
  return y(
1501
1520
  `${s}/api/intelligent-search/v1/top-searches?${I.params.toString()}`,
1502
- { headers: b }
1521
+ { headers: v }
1503
1522
  );
1504
1523
  },
1505
1524
  productCount: (I) => {
@@ -1511,7 +1530,7 @@ const Jt = ({
1511
1530
  });
1512
1531
  return y(
1513
1532
  `${s}/api/intelligent-search/v1/catalog-count/${D.path}?${D.params.toString()}`,
1514
- { headers: b }
1533
+ { headers: v }
1515
1534
  );
1516
1535
  }
1517
1536
  };
@@ -2181,9 +2200,9 @@ const We = (e) => {
2181
2200
  preserveSalesChannel: !!u
2182
2201
  }), g = d.orderFormId;
2183
2202
  d.messages.length !== 0 && await jr(g, r);
2184
- const f = Q(r?.headers?.cookie ?? "")?.vtex_session, h = V(f), { acceptedOffer: b, shouldSplitItem: l } = n;
2203
+ const f = Q(r?.headers?.cookie ?? "")?.vtex_session, h = V(f), { acceptedOffer: v, shouldSplitItem: l } = n;
2185
2204
  if (qr(d, h)) {
2186
- const O = Xe(
2205
+ const b = Xe(
2187
2206
  r,
2188
2207
  d
2189
2208
  ), N = await He(
@@ -2196,31 +2215,31 @@ const We = (e) => {
2196
2215
  N,
2197
2216
  o,
2198
2217
  l,
2199
- O
2218
+ b
2200
2219
  );
2201
2220
  }
2202
2221
  const m = Xe(
2203
2222
  r,
2204
2223
  d
2205
- ), S = je(b), v = je(d.items.map(le)), w = Array.from(v.entries()), C = Array.from(S.entries()), { itemsToAdd: k, itemsToUpdate: I } = C.reduce(
2206
- (O, [N, Pe]) => {
2207
- const _e = v.get(N);
2224
+ ), S = je(v), O = je(d.items.map(le)), w = Array.from(O.entries()), C = Array.from(S.entries()), { itemsToAdd: k, itemsToUpdate: I } = C.reduce(
2225
+ (b, [N, Pe]) => {
2226
+ const _e = O.get(N);
2208
2227
  if (!_e)
2209
- return Pe.forEach((W) => O.itemsToAdd.push(W)), O;
2228
+ return Pe.forEach((W) => b.itemsToAdd.push(W)), b;
2210
2229
  const [te, ...Fn] = _e;
2211
2230
  if (An(d.items, te.itemOffered.sku) || Dn(d.items, te.itemOffered.sku))
2212
- return O.itemsToUpdate.push(te), O;
2231
+ return b.itemsToUpdate.push(te), b;
2213
2232
  const Nn = Pe.reduce((W, Ln) => W + Ln.quantity, 0);
2214
- return O.itemsToUpdate.push({
2233
+ return b.itemsToUpdate.push({
2215
2234
  ...te,
2216
2235
  quantity: Nn
2217
- }), Fn.forEach((W) => O.itemsToUpdate.push({ ...W, quantity: 0 })), O;
2236
+ }), Fn.forEach((W) => b.itemsToUpdate.push({ ...W, quantity: 0 })), b;
2218
2237
  },
2219
2238
  {
2220
2239
  itemsToAdd: [],
2221
2240
  itemsToUpdate: []
2222
2241
  }
2223
- ), D = w.filter(([O]) => !S.has(O)).flatMap(([, O]) => O.map((N) => ({ ...N, quantity: 0 }))), A = [...k, ...I, ...D].map(
2242
+ ), D = w.filter(([b]) => !S.has(b)).flatMap(([, b]) => b.map((N) => ({ ...N, quantity: 0 }))), A = [...k, ...I, ...D].map(
2224
2243
  Vr
2225
2244
  ), { updateShipping: _ } = t ? Cn(d, t) : { updateShipping: !1 };
2226
2245
  if (A.length === 0 && !_)
@@ -2236,15 +2255,15 @@ const We = (e) => {
2236
2255
  orderItems: A,
2237
2256
  shouldSplitItem: l
2238
2257
  }).then(
2239
- (O) => Ge(O, t, r)
2258
+ (b) => Ge(b, t, r)
2240
2259
  ) : P = await Ge(
2241
2260
  d,
2242
2261
  t,
2243
2262
  r
2244
- ), P = await Promise.resolve(P).then((O) => {
2263
+ ), P = await Promise.resolve(P).then((b) => {
2245
2264
  if (t?.marketingData) {
2246
2265
  const N = {
2247
- ...O.marketingData,
2266
+ ...b.marketingData,
2248
2267
  ...t.marketingData
2249
2268
  };
2250
2269
  return a.checkout.marketingData({
@@ -2252,14 +2271,14 @@ const We = (e) => {
2252
2271
  marketingData: N
2253
2272
  });
2254
2273
  }
2255
- return O;
2256
- }).then((O) => c && O.clientPreferencesData?.locale !== c ? a.checkout.clientPreferencesData({
2257
- id: O.orderFormId,
2274
+ return b;
2275
+ }).then((b) => c && b.clientPreferencesData?.locale !== c ? a.checkout.clientPreferencesData({
2276
+ id: b.orderFormId,
2258
2277
  clientPreferencesData: {
2259
- ...O.clientPreferencesData,
2278
+ ...b.clientPreferencesData,
2260
2279
  locale: c
2261
2280
  }
2262
- }) : O).then((O) => He(O, a, h)).then(We);
2281
+ }) : b).then((b) => He(b, a, h)).then(We);
2263
2282
  const R = Ae(
2264
2283
  d.messages,
2265
2284
  P.messages
@@ -2296,18 +2315,23 @@ const Xr = (e) => {
2296
2315
  }, Jr = (e) => {
2297
2316
  const n = e?.availableContracts?.value;
2298
2317
  return Array.isArray(n) ? n.filter(Yr) : [];
2299
- }, Kr = (e) => e?.customerId ? !!((e.contractName ?? "").trim() && e.isActive) : !1, Je = (e) => e?.namespaces?.shopper?.activeContractId?.value?.trim() ?? e?.namespaces?.authentication?.customerId?.value?.trim() ?? e?.namespaces?.profile?.id?.value?.trim() ?? "", Qr = (e, n = "") => {
2300
- const t = n.trim();
2301
- return e.filter(Kr).map((r) => ({
2302
- id: r.customerId,
2303
- corporateName: r.contractName.trim(),
2304
- isActive: t ? r.customerId === t : r.isCurrent
2318
+ }, Kr = (e) => e?.customerId ? !!((e.contractName ?? "").trim() && e.isActive) : !1, Je = (e) => e?.namespaces?.shopper?.activeContractId?.value?.trim() ?? e?.namespaces?.authentication?.customerId?.value?.trim() ?? e?.namespaces?.profile?.id?.value?.trim() ?? "", Qr = (e) => {
2319
+ if (!Array.isArray(e) || e.length === 0) return "";
2320
+ const n = e.find((t) => t?.isDefault === !0) ?? e[0];
2321
+ return String(n?.id ?? "").trim();
2322
+ }, Zr = (e, n = "", t = "") => {
2323
+ const r = n.trim(), i = t.trim();
2324
+ return e.filter(Kr).map((a) => ({
2325
+ id: a.customerId,
2326
+ corporateName: a.contractName.trim(),
2327
+ isActive: r ? a.customerId === r : a.isCurrent,
2328
+ isDefault: i !== "" && a.customerId === i
2305
2329
  }));
2306
2330
  }, _n = (e, n) => {
2307
2331
  const t = Xr(e);
2308
2332
  return t || (n?.firstName?.value ?? "").trim();
2309
2333
  };
2310
- async function Zr(e, n, t) {
2334
+ async function ei(e, n, t) {
2311
2335
  try {
2312
2336
  const r = await e.commerce.checkout.address({
2313
2337
  postalCode: t,
@@ -2324,7 +2348,7 @@ async function Zr(e, n, t) {
2324
2348
  ), r;
2325
2349
  }
2326
2350
  }
2327
- function ei(e, n, t, r, i, a) {
2351
+ function ni(e, n, t, r, i, a) {
2328
2352
  const o = new URLSearchParams(e);
2329
2353
  return o.has("facets") && o.delete("facets"), o.set("sc", o.get("sc") ?? n.salesChannel), t && o.set("postalCode", t), r && o.set("country", r), i && o.set(
2330
2354
  "geoCoordinates",
@@ -2332,7 +2356,7 @@ function ei(e, n, t, r, i, a) {
2332
2356
  // long,lat is the format expected
2333
2357
  ), o.set("locale", a), o;
2334
2358
  }
2335
- function ni(e, n) {
2359
+ function ti(e, n) {
2336
2360
  return {
2337
2361
  utmCampaign: e.get("utm_campaign") ?? n?.utmCampaign ?? "",
2338
2362
  utmMedium: e.get("utm_medium") ?? n?.utmMedium ?? "",
@@ -2342,7 +2366,7 @@ function ni(e, n) {
2342
2366
  utmiPart: e.get("utmi_pc") ?? n?.utmiPart ?? ""
2343
2367
  };
2344
2368
  }
2345
- async function ti(e, n, t) {
2369
+ async function ri(e, n, t) {
2346
2370
  const r = V(L(n ?? "", t));
2347
2371
  let i = !1;
2348
2372
  if (r)
@@ -2357,7 +2381,7 @@ async function ti(e, n, t) {
2357
2381
  unitId: i ? r?.unitId : void 0
2358
2382
  };
2359
2383
  }
2360
- async function ri(e, n, t, r, i, a) {
2384
+ async function ii(e, n, t, r, i, a) {
2361
2385
  return !n.seller || !(t || r) ? void 0 : (await e.commerce.checkout.region({
2362
2386
  postalCode: t,
2363
2387
  geoCoordinates: r,
@@ -2368,7 +2392,7 @@ async function ri(e, n, t, r, i, a) {
2368
2392
  function Ke(e) {
2369
2393
  return typeof e?.value == "string" ? e.value : "";
2370
2394
  }
2371
- function ii(e) {
2395
+ function ai(e) {
2372
2396
  if (!e.isRepresentative)
2373
2397
  return null;
2374
2398
  const n = Ke(e.shopper?.firstName), t = Ke(e.shopper?.lastName);
@@ -2386,7 +2410,7 @@ function ii(e) {
2386
2410
  organizationManager: e.shopper?.organizationManager?.value ?? !1
2387
2411
  };
2388
2412
  }
2389
- function ai(e) {
2413
+ function oi(e) {
2390
2414
  return e?.id ? {
2391
2415
  id: e.id?.value ?? "",
2392
2416
  email: e.email?.value ?? "",
@@ -2394,31 +2418,31 @@ function ai(e) {
2394
2418
  familyName: e.lastName?.value ?? ""
2395
2419
  } : null;
2396
2420
  }
2397
- const oi = async (e, { session: n, search: t }, { clients: r, headers: i, account: a }) => {
2421
+ const si = async (e, { session: n, search: t }, { clients: r, headers: i, account: a }) => {
2398
2422
  const o = ee.parse(n.channel ?? ""), s = String(n.postalCode ?? ""), c = n.country ?? "";
2399
2423
  let u = n.city ?? null, d = n.geoCoordinates ?? null;
2400
2424
  if ((!u || !d) && s !== "" && c !== "") {
2401
- const P = await Zr(
2425
+ const P = await ei(
2402
2426
  r,
2403
2427
  c,
2404
2428
  s
2405
2429
  );
2406
2430
  u = P.city, d = P.geoCoordinates;
2407
2431
  }
2408
- const f = ei(
2432
+ const f = ni(
2409
2433
  t,
2410
2434
  o,
2411
2435
  s,
2412
2436
  c,
2413
2437
  d,
2414
2438
  n.locale
2415
- ), h = ni(f, n.marketingData), { isRepresentative: b, customerId: l, unitId: p } = await ti(
2439
+ ), h = ti(f, n.marketingData), { isRepresentative: v, customerId: l, unitId: p } = await ri(
2416
2440
  r,
2417
2441
  i?.cookie,
2418
2442
  a
2419
- ), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, v = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, C = m?.namespaces.authentication ?? null, k = m?.namespaces.checkout ?? null, I = m?.namespaces.public ?? null;
2443
+ ), m = await r.commerce.session(f.toString()).catch(() => null), S = m?.namespaces.profile ?? null, O = m?.namespaces.shopper ?? null, w = m?.namespaces.store ?? null, C = m?.namespaces.authentication ?? null, k = m?.namespaces.checkout ?? null, I = m?.namespaces.public ?? null;
2420
2444
  let D = null;
2421
- if (b && S?.id?.value)
2445
+ if (v && S?.id?.value)
2422
2446
  try {
2423
2447
  D = await r.commerce.masterData.getContractById({
2424
2448
  contractId: S.id.value
@@ -2429,7 +2453,7 @@ const oi = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
2429
2453
  `
2430
2454
  );
2431
2455
  }
2432
- const A = await ri(
2456
+ const A = await ii(
2433
2457
  r,
2434
2458
  o,
2435
2459
  s,
@@ -2455,10 +2479,10 @@ const oi = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
2455
2479
  * - Unit data: `authentication` namespace
2456
2480
  * - Contract data: `profile` namespace (those info will be available inside Faststore's Session `person` object)
2457
2481
  */
2458
- b2b: ii({
2459
- isRepresentative: b,
2482
+ b2b: ai({
2483
+ isRepresentative: v,
2460
2484
  authentication: C,
2461
- shopper: v,
2485
+ shopper: O,
2462
2486
  publicData: I,
2463
2487
  profile: S,
2464
2488
  contract: D,
@@ -2466,14 +2490,14 @@ const oi = async (e, { session: n, search: t }, { clients: r, headers: i, accoun
2466
2490
  unitId: p
2467
2491
  }),
2468
2492
  marketingData: h,
2469
- person: ai(S),
2493
+ person: oi(S),
2470
2494
  geoCoordinates: d?.latitude && d?.longitude && d || null,
2471
2495
  city: u
2472
2496
  };
2473
2497
  return Ae(n, _) ? null : _;
2474
- }, si = {
2498
+ }, ci = {
2475
2499
  validateCart: Hr,
2476
- validateSession: oi,
2500
+ validateSession: si,
2477
2501
  subscribeToNewsletter: kr,
2478
2502
  cancelOrder: wr,
2479
2503
  processOrderAuthorization: Ar,
@@ -2485,7 +2509,7 @@ var Ce;
2485
2509
  (function(e) {
2486
2510
  e.NAME = "Name", e.DOCUMENT = "Document", e.OPERATION_DEFINITION = "OperationDefinition", e.VARIABLE_DEFINITION = "VariableDefinition", e.SELECTION_SET = "SelectionSet", e.FIELD = "Field", e.ARGUMENT = "Argument", e.FRAGMENT_SPREAD = "FragmentSpread", e.INLINE_FRAGMENT = "InlineFragment", e.FRAGMENT_DEFINITION = "FragmentDefinition", e.VARIABLE = "Variable", e.INT = "IntValue", e.FLOAT = "FloatValue", e.STRING = "StringValue", e.BOOLEAN = "BooleanValue", e.NULL = "NullValue", e.ENUM = "EnumValue", e.LIST = "ListValue", e.OBJECT = "ObjectValue", e.OBJECT_FIELD = "ObjectField", e.DIRECTIVE = "Directive", e.NAMED_TYPE = "NamedType", e.LIST_TYPE = "ListType", e.NON_NULL_TYPE = "NonNullType", e.SCHEMA_DEFINITION = "SchemaDefinition", e.OPERATION_TYPE_DEFINITION = "OperationTypeDefinition", e.SCALAR_TYPE_DEFINITION = "ScalarTypeDefinition", e.OBJECT_TYPE_DEFINITION = "ObjectTypeDefinition", e.FIELD_DEFINITION = "FieldDefinition", e.INPUT_VALUE_DEFINITION = "InputValueDefinition", e.INTERFACE_TYPE_DEFINITION = "InterfaceTypeDefinition", e.UNION_TYPE_DEFINITION = "UnionTypeDefinition", e.ENUM_TYPE_DEFINITION = "EnumTypeDefinition", e.ENUM_VALUE_DEFINITION = "EnumValueDefinition", e.INPUT_OBJECT_TYPE_DEFINITION = "InputObjectTypeDefinition", e.DIRECTIVE_DEFINITION = "DirectiveDefinition", e.SCHEMA_EXTENSION = "SchemaExtension", e.SCALAR_TYPE_EXTENSION = "ScalarTypeExtension", e.OBJECT_TYPE_EXTENSION = "ObjectTypeExtension", e.INTERFACE_TYPE_EXTENSION = "InterfaceTypeExtension", e.UNION_TYPE_EXTENSION = "UnionTypeExtension", e.ENUM_TYPE_EXTENSION = "EnumTypeExtension", e.INPUT_OBJECT_TYPE_EXTENSION = "InputObjectTypeExtension";
2487
2511
  })(Ce || (Ce = {}));
2488
- const ci = (e) => typeof e == "string" ? kn(e) : null;
2512
+ const li = (e) => typeof e == "string" ? kn(e) : null;
2489
2513
  function kn(e) {
2490
2514
  try {
2491
2515
  return JSON.parse(e);
@@ -2493,15 +2517,15 @@ function kn(e) {
2493
2517
  return e;
2494
2518
  }
2495
2519
  }
2496
- const li = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string" ? e : null, di = new Mn({
2520
+ const di = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string" ? e : null, ui = new Mn({
2497
2521
  name: "ObjectOrString",
2498
2522
  description: "A string or the string representation of an object (a stringified object).",
2499
- parseValue: ci,
2500
- serialize: li,
2523
+ parseValue: li,
2524
+ serialize: di,
2501
2525
  parseLiteral(e) {
2502
2526
  return e.kind === Ce.STRING ? kn(e.value) : null;
2503
2527
  }
2504
- }), T = (e) => "Price" in e && "seller" in e && "product" in e, U = (e) => "skuName" in e, ui = {
2528
+ }), T = (e) => "Price" in e && "seller" in e && "product" in e, U = (e) => "skuName" in e, pi = {
2505
2529
  priceCurrency: async (e, n, t) => {
2506
2530
  const {
2507
2531
  loaders: { salesChannelLoader: r },
@@ -2537,7 +2561,7 @@ const li = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
2537
2561
  quantity: (e) => T(e) ? e.AvailableQuantity ?? 0 : U(e) ? e.quantity : null,
2538
2562
  isGift: (e) => U(e) ? e.isGift ?? !1 : null,
2539
2563
  priceToken: (e) => T(e) ? e.PriceToken ?? null : null
2540
- }, pi = ({ linkText: e }) => `/${e}/p`, gi = ({
2564
+ }, gi = ({ linkText: e }) => `/${e}/p`, mi = ({
2541
2565
  offer: e,
2542
2566
  seller: n,
2543
2567
  product: t
@@ -2545,26 +2569,26 @@ const li = (e) => typeof e == "object" ? JSON.stringify(e) : typeof e == "string
2545
2569
  ...e,
2546
2570
  product: t,
2547
2571
  seller: n
2548
- }), mi = 1e11, hi = (e) => /^\d+$/.test(e), fi = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/, Si = (e) => {
2549
- if (!hi(e))
2572
+ }), hi = 1e11, fi = (e) => /^\d+$/.test(e), Si = /^\d{4}-\d{2}-\d{2}[T ]\d{2}:\d{2}(:\d{2}(\.\d+)?)?$/, yi = (e) => {
2573
+ if (!fi(e))
2550
2574
  return new Date(
2551
- fi.test(e) ? `${e}Z` : e
2575
+ Si.test(e) ? `${e}Z` : e
2552
2576
  );
2553
2577
  const n = Number(e);
2554
- return new Date(n >= mi ? n : n * 1e3);
2555
- }, yi = (e) => {
2578
+ return new Date(n >= hi ? n : n * 1e3);
2579
+ }, Ii = (e) => {
2556
2580
  if (e == null)
2557
2581
  return "";
2558
2582
  const n = String(e).trim();
2559
2583
  if (n === "")
2560
2584
  return "";
2561
- const t = Si(n);
2585
+ const t = yi(n);
2562
2586
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
2563
- }, Ii = {
2587
+ }, vi = {
2564
2588
  imageText: "image",
2565
2589
  imageUrl: "https://storecomponents.vtexassets.com/assets/faststore/images/image___117a6d3e229a96ad0e0d0876352566e2.svg",
2566
2590
  imageLabel: "label"
2567
- }, ae = (e, n) => `${e}-${n}`, Qe = (e, n) => `/${ae(e, n)}/p`, vi = (e) => Array.isArray(e) && e.length > 0 ? e : null;
2591
+ }, ae = (e, n) => `${e}-${n}`, Qe = (e, n) => `/${ae(e, n)}/p`, Oi = (e) => Array.isArray(e) && e.length > 0 ? e : null;
2568
2592
  function we(e) {
2569
2593
  return e.replace(/^\/+|\/+$/g, "");
2570
2594
  }
@@ -2593,10 +2617,10 @@ async function oe(e, n, t) {
2593
2617
  })();
2594
2618
  return i.set(r, o), o;
2595
2619
  }
2596
- const Oi = (e, n) => {
2620
+ const bi = (e, n) => {
2597
2621
  const t = e.findIndex((r) => we(r).split("/").at(-1) === n);
2598
2622
  return t < 0 ? 0 : t;
2599
- }, bi = {
2623
+ }, Ci = {
2600
2624
  productID: ({ itemId: e }) => e,
2601
2625
  name: ({ isVariantOf: e, name: n }) => n ?? e.productName,
2602
2626
  slug: ({ isVariantOf: { linkText: e }, itemId: n }) => ae(e, n),
@@ -2604,7 +2628,7 @@ const Oi = (e, n) => {
2604
2628
  seo: ({ isVariantOf: e }) => ({
2605
2629
  title: e.productTitle || e.productName,
2606
2630
  description: e.metaTagDescription || e.description,
2607
- canonical: pi(e)
2631
+ canonical: gi(e)
2608
2632
  }),
2609
2633
  brand: ({ isVariantOf: { brand: e } }) => ({ name: e }),
2610
2634
  unitMultiplier: ({ unitMultiplier: e }) => e,
@@ -2619,28 +2643,28 @@ const Oi = (e, n) => {
2619
2643
  productId: c
2620
2644
  },
2621
2645
  itemId: u
2622
- } = e, d = Oi(s, o), g = r[d], f = we(g).split("/"), h = t.storage.locale;
2646
+ } = e, d = bi(s, o), g = r[d], f = we(g).split("/"), h = t.storage.locale;
2623
2647
  if (q(t) && h) {
2624
- const b = await oe(t, c, h);
2625
- if (b) {
2648
+ const v = await oe(t, c, h);
2649
+ if (v) {
2626
2650
  const l = new Set(
2627
2651
  we(s[d]).split("/").filter(Boolean)
2628
- ), p = b.categories.filter((S) => l.has(S.id.toString())).sort(
2629
- (S, v) => S.fullPath.split("/").length - v.fullPath.split("/").length
2652
+ ), p = v.categories.filter((S) => l.has(S.id.toString())).sort(
2653
+ (S, O) => S.fullPath.split("/").length - O.fullPath.split("/").length
2630
2654
  );
2631
2655
  if (p.length === f.length)
2632
2656
  return {
2633
2657
  itemListElement: [
2634
2658
  // Category items: both name and slug come from Catalog Dataplane, ensuring
2635
2659
  // they are always consistent with each other for the requested locale.
2636
- ...p.map((S, v) => ({
2660
+ ...p.map((S, O) => ({
2637
2661
  name: S.name,
2638
2662
  item: `/${S.fullPathUriName}/`,
2639
- position: v + 1
2663
+ position: O + 1
2640
2664
  })),
2641
2665
  {
2642
2666
  name: i,
2643
- item: Qe(b.linkId, u),
2667
+ item: Qe(v.linkId, u),
2644
2668
  position: f.length + 1
2645
2669
  }
2646
2670
  ],
@@ -2650,10 +2674,10 @@ const Oi = (e, n) => {
2650
2674
  }
2651
2675
  return {
2652
2676
  itemListElement: [
2653
- ...f.map((b, l) => {
2677
+ ...f.map((v, l) => {
2654
2678
  const p = `/${f.slice(0, l + 1).map(se).join("/")}/`;
2655
2679
  return {
2656
- name: b,
2680
+ name: v,
2657
2681
  item: p,
2658
2682
  position: l + 1
2659
2683
  };
@@ -2668,7 +2692,7 @@ const Oi = (e, n) => {
2668
2692
  };
2669
2693
  },
2670
2694
  image: ({ images: e }, n) => {
2671
- const t = (vi(e) ?? [Ii]).map(
2695
+ const t = (Oi(e) ?? [vi]).map(
2672
2696
  ({ imageUrl: s, imageText: c, imageLabel: u }) => ({
2673
2697
  alternateName: c ?? "",
2674
2698
  url: s.replace("vteximg.com.br", "vtexassets.com"),
@@ -2691,7 +2715,7 @@ const Oi = (e, n) => {
2691
2715
  review: () => [],
2692
2716
  aggregateRating: () => ({}),
2693
2717
  offers: (e) => e.sellers.map(
2694
- (n) => gi({
2718
+ (n) => mi({
2695
2719
  offer: n.commertialOffer,
2696
2720
  seller: n,
2697
2721
  product: e
@@ -2722,7 +2746,7 @@ const Oi = (e, n) => {
2722
2746
  hasSpecifications: ({ isVariantOf: e }) => !!e.skuSpecifications?.length,
2723
2747
  skuSpecifications: ({ isVariantOf: { skuSpecifications: e } }) => e ?? [],
2724
2748
  specificationGroups: ({ isVariantOf: { specificationGroups: e } }) => e,
2725
- releaseDate: ({ isVariantOf: { releaseDate: e } }) => yi(e),
2749
+ releaseDate: ({ isVariantOf: { releaseDate: e } }) => Ii(e),
2726
2750
  advertisement: ({ isVariantOf: { advertisement: e } }) => e,
2727
2751
  deliveryPromiseBadges: ({ isVariantOf: { deliveryPromisesBadges: e } }) => e,
2728
2752
  otherLocales: async (e, n, t) => {
@@ -2748,13 +2772,13 @@ const Oi = (e, n) => {
2748
2772
  ))?.availableLinkIds?.[r] ?? a;
2749
2773
  return ae(c, o);
2750
2774
  }
2751
- }, Ci = /* @__PURE__ */ new Set(["allSpecifications"]), wi = {
2775
+ }, wi = /* @__PURE__ */ new Set(["allSpecifications"]), Di = {
2752
2776
  hasVariant: (e) => e.isVariantOf.items.map((n) => F(n, e.isVariantOf)),
2753
2777
  productGroupID: ({ isVariantOf: e }) => e.productId,
2754
2778
  name: (e) => e.isVariantOf.productName,
2755
2779
  skuVariants: (e) => e,
2756
2780
  additionalProperty: ({ isVariantOf: { specificationGroups: e } }) => e.filter(
2757
- (n) => !Ci.has(n.name)
2781
+ (n) => !wi.has(n.name)
2758
2782
  ).flatMap(
2759
2783
  ({ specifications: n }) => n.flatMap(
2760
2784
  ({ name: t, values: r }) => r.map((i) => ({
@@ -2764,7 +2788,7 @@ const Oi = (e, n) => {
2764
2788
  }))
2765
2789
  )
2766
2790
  )
2767
- }, Di = {
2791
+ }, Ai = {
2768
2792
  propertyID: (e) => e.propertyID || bn(e),
2769
2793
  name: ({ name: e }) => e,
2770
2794
  value: ({ value: e }) => e,
@@ -2780,11 +2804,11 @@ const Oi = (e, n) => {
2780
2804
  ({ offer: r }, { offer: i }) => fn(r, i)
2781
2805
  );
2782
2806
  return t ? t.sku : e[0];
2783
- }, En = (e) => e !== "" && !Number.isNaN(Number(e)), Ai = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/, Pi = async (e, { campaignVrn: n, userId: t, products: r }, i) => {
2807
+ }, En = (e) => e !== "" && !Number.isNaN(Number(e)), Pi = /^vrn:recommendations:[^:]+:[^:]+:[^:]+$/, _i = async (e, { campaignVrn: n, userId: t, products: r }, i) => {
2784
2808
  const {
2785
2809
  clients: { commerce: a }
2786
2810
  } = i, { salesChannel: o } = i.storage.channel, s = n?.trim();
2787
- if (!s || !Ai.test(s))
2811
+ if (!s || !Pi.test(s))
2788
2812
  throw new E(`Invalid campaignVrn: "${n}"`);
2789
2813
  const c = t?.trim();
2790
2814
  if (t != null && !c)
@@ -2802,8 +2826,8 @@ const Oi = (e, n) => {
2802
2826
  }), { campaign: d, correlationId: g } = u;
2803
2827
  return {
2804
2828
  products: (u.products ?? []).map((h) => {
2805
- const b = de(h.items);
2806
- return b ? F(b, h) : null;
2829
+ const v = de(h.items);
2830
+ return v ? F(v, h) : null;
2807
2831
  }).filter((h) => !!h),
2808
2832
  correlationId: g,
2809
2833
  campaign: d
@@ -2817,11 +2841,11 @@ const Oi = (e, n) => {
2817
2841
  release_desc: "release:desc",
2818
2842
  discount_desc: "discount:desc",
2819
2843
  score_desc: ""
2820
- }, _i = async (e, { operationId: n }, { clients: { commerce: t } }) => {
2844
+ }, ki = async (e, { operationId: n }, { clients: { commerce: t } }) => {
2821
2845
  if (!n)
2822
2846
  throw new E("Missing operationId");
2823
2847
  return t.orderEntry.getOperation({ operationId: n });
2824
- }, ki = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
2848
+ }, Ei = async (e, { orderFormId: n }, { clients: { commerce: t } }) => {
2825
2849
  if (!n)
2826
2850
  throw new E("Missing orderFormId");
2827
2851
  const { items: r } = await t.orderEntry.getOrderFormItems({ orderFormId: n });
@@ -2837,17 +2861,17 @@ const Oi = (e, n) => {
2837
2861
  unitMultiplier: i.unitMultiplier ?? 1
2838
2862
  }));
2839
2863
  };
2840
- async function Ei(e, n, t, r) {
2864
+ async function Ti(e, n, t, r) {
2841
2865
  const i = n.slice(0, n.lastIndexOf("-"));
2842
2866
  return (await oe(e, t, r))?.linkId === i;
2843
2867
  }
2844
- const Tn = "Invalid SkuId", Un = "Slug was set but the fetched sku does not satisfy the slug condition.", Ti = "UseAdHocCard", Ui = (e) => Y(e) || e instanceof Error && (e.message === Tn || e.message.startsWith(Un));
2845
- async function Ri(e, n, t, r) {
2868
+ const Tn = "Invalid SkuId", Un = "Slug was set but the fetched sku does not satisfy the slug condition.", Ui = "UseAdHocCard", Ri = (e) => Y(e) || e instanceof Error && (e.message === Tn || e.message.startsWith(Un));
2869
+ async function Fi(e, n, t, r) {
2846
2870
  const { linkText: i, productId: a } = n.isVariantOf;
2847
- if (!(!t || !i || t.startsWith(i) || q(e) && r && En(t.split("-").pop() ?? "") && await Ei(e, t, a, r)))
2871
+ if (!(!t || !i || t.startsWith(i) || q(e) && r && En(t.split("-").pop() ?? "") && await Ti(e, t, a, r)))
2848
2872
  throw new Error(`${Un} slug: ${t}, linkText: ${i}`);
2849
2873
  }
2850
- async function Fi(e, n) {
2874
+ async function Ni(e, n) {
2851
2875
  if (n == null)
2852
2876
  throw new E("Missing slug or id");
2853
2877
  const {
@@ -2863,7 +2887,7 @@ async function Fi(e, n) {
2863
2887
  throw new $(`No product found for id ${i.id}`);
2864
2888
  return F(de(a.items), a);
2865
2889
  }
2866
- const Ni = {
2890
+ const Li = {
2867
2891
  product: async (e, { locator: n }, t) => {
2868
2892
  const r = qe(n), i = xe(n), a = Ir(n), o = yr(n);
2869
2893
  r && ce(t, r), i && ve(t, i);
@@ -2875,11 +2899,11 @@ const Ni = {
2875
2899
  if (!En(c))
2876
2900
  throw new Error(Tn);
2877
2901
  const u = await s.load(c);
2878
- return await Ri(t, u, o, i), u;
2902
+ return await Fi(t, u, o, i), u;
2879
2903
  } catch (c) {
2880
- if (!Ui(c))
2904
+ if (!Ri(c))
2881
2905
  throw c;
2882
- return Fi(t, o);
2906
+ return Ni(t, o);
2883
2907
  }
2884
2908
  },
2885
2909
  collection: (e, { slug: n }, t) => {
@@ -2984,11 +3008,11 @@ const Ni = {
2984
3008
  } = r, a = t ? Number(t) : 0, [o, s] = await Promise.all([
2985
3009
  i.catalog.brand.list(),
2986
3010
  i.catalog.category.tree()
2987
- ]), c = [], u = (h, b) => {
3011
+ ]), c = [], u = (h, v) => {
2988
3012
  c.push({
2989
3013
  id: h.id,
2990
3014
  name: h.name,
2991
- fatherCategoryId: b,
3015
+ fatherCategoryId: v,
2992
3016
  linkId: se(h.name),
2993
3017
  title: h.Title,
2994
3018
  description: null,
@@ -3020,9 +3044,9 @@ const Ni = {
3020
3044
  endCursor: (Math.min(n, f.length - a) - 1).toString(),
3021
3045
  totalCount: f.length
3022
3046
  },
3023
- edges: f.slice(a, a + n).map((h, b) => ({
3047
+ edges: f.slice(a, a + n).map((h, v) => ({
3024
3048
  node: h,
3025
- cursor: (a + b).toString()
3049
+ cursor: (a + v).toString()
3026
3050
  }))
3027
3051
  };
3028
3052
  },
@@ -3188,7 +3212,7 @@ const Ni = {
3188
3212
  } = t, s = V(L(i?.cookie ?? "", r))?.userId ?? "";
3189
3213
  if (!s)
3190
3214
  return !0;
3191
- const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey: Ti }).catch(() => null);
3215
+ const c = await a.licenseManager.isResourceGranted({ userId: s, resourceKey: Ui }).catch(() => null);
3192
3216
  return typeof c == "boolean" ? c : !0;
3193
3217
  },
3194
3218
  listUserQuotes: async (e, n, t) => {
@@ -3252,7 +3276,7 @@ const Ni = {
3252
3276
  name: h,
3253
3277
  email: f?.storeUserEmail?.value ?? "",
3254
3278
  phone: g?.phone ?? "",
3255
- role: d?.Roles?.map((b) => b.Name) ?? [],
3279
+ role: d?.Roles?.map((v) => v.Name) ?? [],
3256
3280
  orgUnit: f?.unitName?.value ?? ""
3257
3281
  };
3258
3282
  },
@@ -3281,9 +3305,9 @@ const Ni = {
3281
3305
  p
3282
3306
  );
3283
3307
  }
3284
- const b = `${(d?.firstName?.value ?? "").trim()} ${(d?.lastName?.value ?? "").trim()}`.trim();
3308
+ const v = `${(d?.firstName?.value ?? "").trim()} ${(d?.lastName?.value ?? "").trim()}`.trim();
3285
3309
  return {
3286
- name: _n(h, u) || b || "",
3310
+ name: _n(h, u) || v || "",
3287
3311
  email: u?.email?.value || g?.storeUserEmail?.value || "",
3288
3312
  id: u?.id?.value || g?.customerId?.value || o?.customerId?.trim() || ""
3289
3313
  // createdAt: '',
@@ -3322,8 +3346,15 @@ const Ni = {
3322
3346
  );
3323
3347
  const d = Jr(
3324
3348
  o?.namespaces.shopper
3325
- ), g = Je(o) || c?.customerId?.trim() || "";
3326
- return Qr(d, g);
3349
+ ), g = Je(o) || c?.customerId?.trim() || "", f = await a.storeFront.attachedContracts(n).catch((v) => (console.warn(
3350
+ "availableContracts: default contract lookup failed",
3351
+ v
3352
+ ), null)), h = Qr(f?.contracts);
3353
+ return Zr(
3354
+ d,
3355
+ g,
3356
+ h
3357
+ );
3327
3358
  },
3328
3359
  pickupPoints: async (e, { geoCoordinates: n }, t) => {
3329
3360
  const {
@@ -3333,10 +3364,10 @@ const Ni = {
3333
3364
  geoCoordinates: n
3334
3365
  });
3335
3366
  },
3336
- orderEntryOperation: _i,
3337
- orderFormItems: ki,
3338
- recommendations: Pi
3339
- }, Li = {
3367
+ orderEntryOperation: ki,
3368
+ orderFormItems: Ei,
3369
+ recommendations: _i
3370
+ }, Bi = {
3340
3371
  reviewRating: () => ({
3341
3372
  ratingValue: 5,
3342
3373
  bestRating: 5
@@ -3344,7 +3375,7 @@ const Ni = {
3344
3375
  author: () => ({
3345
3376
  name: ""
3346
3377
  })
3347
- }, Bi = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, $i = {
3378
+ }, $i = (e, n, t) => n ? e.key === "category-1" : t ? e.key === "brand" : !1, Mi = {
3348
3379
  suggestions: async (e, n, t) => {
3349
3380
  const {
3350
3381
  clients: { search: r }
@@ -3395,7 +3426,7 @@ const Ni = {
3395
3426
  t.storage.searchArgs = e;
3396
3427
  const { facets: i = [] } = await r.facets(e), a = !e.query, o = e.selectedFacets?.length ? e.selectedFacets[0].key === "category-1" : !1, s = e.selectedFacets?.length ? e.selectedFacets[0].key === "brand" : !1;
3397
3428
  return i.filter(
3398
- (u) => !a || !Bi(u, o, s)
3429
+ (u) => !a || !$i(u, o, s)
3399
3430
  );
3400
3431
  },
3401
3432
  metadata: async ({ productSearchPromise: e }) => {
@@ -3407,12 +3438,12 @@ const Ni = {
3407
3438
  };
3408
3439
  },
3409
3440
  searchId: async ({ productSearchPromise: e }) => (await e).searchId
3410
- }, Mi = {
3441
+ }, zi = {
3411
3442
  title: ({ title: e }) => e ?? "",
3412
3443
  description: ({ description: e }) => e ?? "",
3413
3444
  canonical: ({ canonical: e }) => e ?? "",
3414
3445
  titleTemplate: () => ""
3415
- }, zi = ["bd", "d", "h", "m"], Vi = (e) => zi.includes(e), xi = {
3446
+ }, Vi = ["bd", "d", "h", "m"], xi = (e) => Vi.includes(e), qi = {
3416
3447
  bd: {
3417
3448
  0: "Today",
3418
3449
  1: "In 1 business day",
@@ -3434,12 +3465,12 @@ const Ni = {
3434
3465
  other: "Up to # minutes"
3435
3466
  }
3436
3467
  }, Rn = (e) => {
3437
- const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = Vi(t);
3468
+ const [n, t] = [e.split(/\D+/)[0], e.split(/[0-9]+/)[1]], r = n !== "" && !Number.isNaN(Number(n)), i = xi(t);
3438
3469
  if (!r || !i)
3439
3470
  return "";
3440
3471
  const a = Number(n) < 2 ? Number(n) : "other";
3441
- return xi[t][a].replace("#", n) ?? "";
3442
- }, qi = {
3472
+ return qi[t][a].replace("#", n) ?? "";
3473
+ }, ji = {
3443
3474
  carrier: (e) => e?.friendlyName ?? e?.name ?? "",
3444
3475
  price: (e) => e?.price ? e.price / 100 : e?.price,
3445
3476
  localizedEstimates: (e) => e?.shippingEstimate ? Rn(e.shippingEstimate) : ""
@@ -3455,7 +3486,7 @@ function nn(e, n) {
3455
3486
  );
3456
3487
  return i || e[0];
3457
3488
  }
3458
- function ji(e, n, t) {
3489
+ function Wi(e, n, t) {
3459
3490
  const r = {};
3460
3491
  return e.forEach((i) => {
3461
3492
  const a = i.variations;
@@ -3473,24 +3504,24 @@ function tn(e) {
3473
3504
  n[t.name] = t.values[0];
3474
3505
  }), n;
3475
3506
  }
3476
- function Wi(e) {
3507
+ function Hi(e) {
3477
3508
  const n = {};
3478
3509
  return e?.forEach((t) => {
3479
3510
  n[t.field.originalName ?? t.field.name] = t.values.map((r) => r.originalName ?? r.name);
3480
3511
  }), n;
3481
3512
  }
3482
- function Hi(e, n) {
3513
+ function Gi(e, n) {
3483
3514
  return Number.isNaN(Number(e) - Number(n)) ? e < n ? -1 : e > n ? 1 : 0 : Number(e) - Number(n);
3484
3515
  }
3485
- function Gi(e) {
3516
+ function Xi(e) {
3486
3517
  const n = e;
3487
3518
  for (const t in e)
3488
3519
  e[t].every(
3489
3520
  (i) => !Number.isNaN(Number(i.value))
3490
- ) && e[t].sort((i, a) => Hi(i.value, a.value));
3521
+ ) && e[t].sort((i, a) => Gi(i.value, a.value));
3491
3522
  return n;
3492
3523
  }
3493
- function Xi(e, n, t) {
3524
+ function Yi(e, n, t) {
3494
3525
  const r = {}, i = /* @__PURE__ */ new Set();
3495
3526
  return e.forEach((a) => {
3496
3527
  if (a.variations.length === 0)
@@ -3531,38 +3562,38 @@ function Xi(e, n, t) {
3531
3562
  };
3532
3563
  r[c.name] ? r[c.name].push(g) : r[c.name] = [g];
3533
3564
  });
3534
- }), Gi(r);
3565
+ }), Xi(r);
3535
3566
  }
3536
- const Yi = {
3567
+ const Ji = {
3537
3568
  activeVariations: (e) => tn(e.variations),
3538
- allVariantsByName: (e) => Wi(e.isVariantOf.skuSpecifications),
3539
- slugsMap: (e, n) => ji(
3569
+ allVariantsByName: (e) => Hi(e.isVariantOf.skuSpecifications),
3570
+ slugsMap: (e, n) => Wi(
3540
3571
  e.isVariantOf.items,
3541
3572
  n.dominantVariantName ?? e.variations[0]?.name,
3542
3573
  e.isVariantOf.linkText
3543
3574
  ),
3544
3575
  availableVariations: (e, n) => {
3545
3576
  const t = n.dominantVariantName ?? e.variations[0]?.name, i = tn(e.variations)[t];
3546
- return Xi(
3577
+ return Yi(
3547
3578
  e.isVariantOf.items,
3548
3579
  t,
3549
3580
  i
3550
3581
  );
3551
3582
  },
3552
3583
  allVariantProducts: (e) => e.isVariantOf.items.map((n) => F(n, e.isVariantOf))
3553
- }, Ji = {
3584
+ }, Ki = {
3554
3585
  "pickup-in-point": "Pickup",
3555
3586
  delivery: "Delivery",
3556
3587
  pickup: "Pickup",
3557
3588
  "take-away": "Take away",
3558
3589
  "": ""
3559
- }, Ki = {
3590
+ }, Qi = {
3560
3591
  deliveryOptionsData: (e) => {
3561
3592
  const { shippingData: n, items: t } = e, r = n?.logisticsInfo || [], i = n?.selectedAddresses || n?.availableAddresses || [n?.address], a = r.reduce(
3562
3593
  (u, d) => {
3563
- const g = d?.selectedSla || "", f = d?.selectedDeliveryChannel || d?.deliveryChannel || "", h = d?.deliveryCompany || "", b = d?.deliveryWindow, l = d?.pickupStoreInfo, p = d?.shippingEstimate || "", m = d?.shippingEstimate ? Rn(d?.shippingEstimate) : "", S = d?.shippingEstimateDate || "", v = d?.addressId || "", w = d?.itemIndex ?? 0, C = t?.[w], k = C?.seller || "", I = `${g}|${f}|${h}|${k}|${p}|${S}|${v}|${b?.startDateUtc}|${b?.endDateUtc}`, D = i?.find(
3564
- (O) => O?.addressId === v
3565
- ), A = `${Ji[f] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: _, taxPriceTags: P } = Qi(
3594
+ const g = d?.selectedSla || "", f = d?.selectedDeliveryChannel || d?.deliveryChannel || "", h = d?.deliveryCompany || "", v = d?.deliveryWindow, l = d?.pickupStoreInfo, p = d?.shippingEstimate || "", m = d?.shippingEstimate ? Rn(d?.shippingEstimate) : "", S = d?.shippingEstimateDate || "", O = d?.addressId || "", w = d?.itemIndex ?? 0, C = t?.[w], k = C?.seller || "", I = `${g}|${f}|${h}|${k}|${p}|${S}|${O}|${v?.startDateUtc}|${v?.endDateUtc}`, D = i?.find(
3595
+ (b) => b?.addressId === O
3596
+ ), A = `${Ki[f] || ""} ${m} ${D?.neighborhood ? `to ${D?.neighborhood}` : ""}`.trim(), { taxPriceTagsTotal: _, taxPriceTags: P } = Zi(
3566
3597
  C?.priceTags ?? []
3567
3598
  ), R = (C?.sellingPrice ?? 0) * (C?.quantity ?? 0) + (C?.tax ?? 0) + (_ ?? 0);
3568
3599
  return u[I] || (u[I] = {
@@ -3570,7 +3601,7 @@ const Yi = {
3570
3601
  selectedSla: g,
3571
3602
  deliveryChannel: f,
3572
3603
  deliveryCompany: h,
3573
- deliveryWindow: b,
3604
+ deliveryWindow: v,
3574
3605
  shippingEstimate: p,
3575
3606
  shippingEstimateDate: S,
3576
3607
  seller: k,
@@ -3620,7 +3651,7 @@ const Yi = {
3620
3651
  ) || [];
3621
3652
  }
3622
3653
  };
3623
- function Qi(e) {
3654
+ function Zi(e) {
3624
3655
  const t = e.filter(
3625
3656
  (i) => i?.name?.includes("TAX")
3626
3657
  ), r = t.reduce(
@@ -3632,28 +3663,28 @@ function Qi(e) {
3632
3663
  taxPriceTagsTotal: r
3633
3664
  };
3634
3665
  }
3635
- const Zi = {
3666
+ const ea = {
3636
3667
  StoreCollection: Sn,
3637
3668
  StoreAggregateOffer: ur,
3638
- StoreProduct: bi,
3639
- StoreSeo: Mi,
3669
+ StoreProduct: Ci,
3670
+ StoreSeo: zi,
3640
3671
  StoreFacet: vr,
3641
3672
  StoreFacetBoolean: Or,
3642
3673
  StoreFacetRange: br,
3643
3674
  StoreFacetValueBoolean: Cr,
3644
- StoreOffer: ui,
3675
+ StoreOffer: pi,
3645
3676
  StoreAggregateRating: pr,
3646
- StoreReview: Li,
3647
- StoreProductGroup: wi,
3648
- StoreSearchResult: $i,
3649
- StorePropertyValue: Di,
3650
- SkuVariants: Yi,
3651
- ShippingSLA: qi,
3652
- UserOrderResult: Ki,
3653
- ObjectOrString: di,
3654
- Query: Ni,
3655
- Mutation: si
3656
- }, ea = () => Zi, na = `"""
3677
+ StoreReview: Bi,
3678
+ StoreProductGroup: Di,
3679
+ StoreSearchResult: Mi,
3680
+ StorePropertyValue: Ai,
3681
+ SkuVariants: Ji,
3682
+ ShippingSLA: ji,
3683
+ UserOrderResult: Qi,
3684
+ ObjectOrString: ui,
3685
+ Query: Li,
3686
+ Mutation: ci
3687
+ }, na = () => ea, ta = `"""
3657
3688
  Address information.
3658
3689
  """
3659
3690
  type Address {
@@ -3698,7 +3729,7 @@ type Address {
3698
3729
  """
3699
3730
  geoCoordinates: [Float]
3700
3731
  }
3701
- `, ta = `"""
3732
+ `, ra = `"""
3702
3733
  Advertisement information about a specific product in a campaign
3703
3734
  """
3704
3735
  type Advertisement {
@@ -3723,7 +3754,7 @@ type Advertisement {
3723
3754
  """
3724
3755
  adResponseId: String!
3725
3756
  }
3726
- `, ra = `"""
3757
+ `, ia = `"""
3727
3758
  Aggregate offer information, for a given SKU that is available to be fulfilled by multiple sellers.
3728
3759
  """
3729
3760
  type StoreAggregateOffer {
@@ -3752,7 +3783,7 @@ type StoreAggregateOffer {
3752
3783
  """
3753
3784
  offers: [StoreOffer!]!
3754
3785
  }
3755
- `, ia = `"""
3786
+ `, aa = `"""
3756
3787
  Average rating, based on multiple ratings or reviews.
3757
3788
  """
3758
3789
  type StoreAggregateRating {
@@ -3765,7 +3796,7 @@ type StoreAggregateRating {
3765
3796
  """
3766
3797
  reviewCount: Int!
3767
3798
  }
3768
- `, aa = `"""
3799
+ `, oa = `"""
3769
3800
  information about the author of a product review or rating.
3770
3801
  """
3771
3802
  type StoreAuthor {
@@ -3774,7 +3805,7 @@ type StoreAuthor {
3774
3805
  """
3775
3806
  name: String!
3776
3807
  }
3777
- `, oa = `"""
3808
+ `, sa = `"""
3778
3809
  Brand of a given product.
3779
3810
  """
3780
3811
  type StoreBrand {
@@ -3783,7 +3814,7 @@ type StoreBrand {
3783
3814
  """
3784
3815
  name: String!
3785
3816
  }
3786
- `, sa = `"""
3817
+ `, ca = `"""
3787
3818
  Item of a list.
3788
3819
  """
3789
3820
  type StoreListItem {
@@ -3814,7 +3845,7 @@ type StoreBreadcrumbList {
3814
3845
  """
3815
3846
  numberOfItems: Int!
3816
3847
  }
3817
- `, ca = `"""
3848
+ `, la = `"""
3818
3849
  Shopping cart message.
3819
3850
  """
3820
3851
  type StoreCartMessage {
@@ -3851,7 +3882,7 @@ input IStoreCart {
3851
3882
  """
3852
3883
  order: IStoreOrder!
3853
3884
  }
3854
- `, la = `"""
3885
+ `, da = `"""
3855
3886
  Product collection type. Possible values are \`Department\`, \`Category\`, \`Brand\` or \`Collection\`.
3856
3887
 
3857
3888
  \`SubCategory\` and \`Cluster\` are still declared for backward compatibility but are
@@ -3977,7 +4008,7 @@ type StoreCollectionLocale {
3977
4008
  """
3978
4009
  slug: String!
3979
4010
  }
3980
- `, da = `"""
4011
+ `, ua = `"""
3981
4012
  Delivery Promise badge.
3982
4013
  """
3983
4014
  type DeliveryPromiseBadge {
@@ -3986,7 +4017,7 @@ type DeliveryPromiseBadge {
3986
4017
  """
3987
4018
  typeName: String
3988
4019
  }
3989
- `, ua = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
4020
+ `, pa = `union StoreFacet = StoreFacetRange | StoreFacetBoolean
3990
4021
 
3991
4022
  """
3992
4023
  Search facet range information.
@@ -4063,7 +4094,7 @@ type StoreFacetValueBoolean {
4063
4094
  """
4064
4095
  quantity: Int
4065
4096
  }
4066
- `, pa = `"""
4097
+ `, ga = `"""
4067
4098
  Image.
4068
4099
  """
4069
4100
  type StoreImage {
@@ -4090,7 +4121,7 @@ input IStoreImage {
4090
4121
  """
4091
4122
  alternateName: String!
4092
4123
  }
4093
- `, ga = `type Mutation {
4124
+ `, ma = `type Mutation {
4094
4125
  """
4095
4126
  Checks for changes between the cart presented in the UI and the cart stored in the ecommerce platform. If changes are detected, it returns the cart stored on the platform. Otherwise, it returns \`null\`.
4096
4127
  """
@@ -4132,7 +4163,7 @@ input IStoreImage {
4132
4163
  """
4133
4164
  startRecommendationSession: Boolean!
4134
4165
  }
4135
- `, ma = `"""
4166
+ `, ha = `"""
4136
4167
  Newsletter information.
4137
4168
  """
4138
4169
  type PersonNewsletter {
@@ -4155,8 +4186,8 @@ input IPersonNewsletter {
4155
4186
  """
4156
4187
  email: String!
4157
4188
  }
4158
- `, ha = `scalar ObjectOrString
4159
- `, fa = `"""
4189
+ `, fa = `scalar ObjectOrString
4190
+ `, Sa = `"""
4160
4191
  Offer information.
4161
4192
  """
4162
4193
  type StoreOffer {
@@ -4249,7 +4280,7 @@ input IStoreOffer {
4249
4280
  """
4250
4281
  priceToken: String
4251
4282
  }
4252
- `, Sa = `"""
4283
+ `, ya = `"""
4253
4284
  Information of a specific order.
4254
4285
  """
4255
4286
  type StoreOrder {
@@ -4290,7 +4321,7 @@ input IStoreOrder {
4290
4321
  """
4291
4322
  shouldSplitItem: Boolean
4292
4323
  }
4293
- `, ya = `"""
4324
+ `, Ia = `"""
4294
4325
  Commercial Authorization response.
4295
4326
  """
4296
4327
  type CommercialAuthorizationResponse {
@@ -4689,7 +4720,7 @@ type ProcessOrderAuthorizationRule {
4689
4720
  """
4690
4721
  rule: CommercialAuthorizationRule!
4691
4722
  }
4692
- `, Ia = `"""
4723
+ `, va = `"""
4693
4724
  Input for uploading a file to the Order Entry Service.
4694
4725
  The file is transmitted as a Base64-encoded string so it can travel
4695
4726
  through the standard GraphQL JSON pipeline without multipart support.
@@ -4750,7 +4781,7 @@ type StoreOrderFormCartItem {
4750
4781
  seller: String!
4751
4782
  unitMultiplier: Float
4752
4783
  }
4753
- `, va = `"""
4784
+ `, Oa = `"""
4754
4785
  Organization.
4755
4786
  """
4756
4787
  type StoreOrganization {
@@ -4786,8 +4817,12 @@ type StoreContract {
4786
4817
  Indicates whether this contract is the one currently active in the session.
4787
4818
  """
4788
4819
  isActive: Boolean!
4820
+ """
4821
+ Indicates whether this contract is the Organization Unit's default contract.
4822
+ """
4823
+ isDefault: Boolean!
4789
4824
  }
4790
- `, Oa = `"""
4825
+ `, ba = `"""
4791
4826
  Whenever you make a query that allows for pagination, such as \`allProducts\` or \`allCollections\`, you can check \`StorePageInfo\` to learn more about the complete set of items and use it to paginate your queries.
4792
4827
  """
4793
4828
  type StorePageInfo {
@@ -4812,7 +4847,7 @@ type StorePageInfo {
4812
4847
  """
4813
4848
  totalCount: Int!
4814
4849
  }
4815
- `, ba = `"""
4850
+ `, Ca = `"""
4816
4851
  Input type for setting a new password.
4817
4852
  """
4818
4853
  input ISetPassword {
@@ -4855,7 +4890,7 @@ type SetPasswordResponse {
4855
4890
  """
4856
4891
  message: String
4857
4892
  }
4858
- `, Ca = `"""
4893
+ `, wa = `"""
4859
4894
  Client profile data.
4860
4895
  """
4861
4896
  type StorePerson {
@@ -4898,7 +4933,7 @@ input IStorePerson {
4898
4933
  """
4899
4934
  familyName: String!
4900
4935
  }
4901
- `, wa = `type PickupPointAddress {
4936
+ `, Da = `type PickupPointAddress {
4902
4937
  """
4903
4938
  Address city.
4904
4939
  """
@@ -4977,7 +5012,7 @@ type PickupPoints {
4977
5012
  """
4978
5013
  pickupPointsHash: String
4979
5014
  }
4980
- `, Da = `"""
5015
+ `, Aa = `"""
4981
5016
  Product information. Products are variants within product groups, equivalent to VTEX [SKUs](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
4982
5017
  """
4983
5018
  type StoreProduct {
@@ -5153,7 +5188,7 @@ input IStoreProduct {
5153
5188
  """
5154
5189
  additionalProperty: [IStorePropertyValue!]
5155
5190
  }
5156
- `, Aa = `"""
5191
+ `, Pa = `"""
5157
5192
  Product group information. Product groups are catalog entities that may contain variants. They are equivalent to VTEX [Products](https://help.vtex.com/en/tutorial/what-is-a-product--2zrB2gFCHyQokCKKE8kuAw#), whereas each variant is equivalent to a VTEX [SKU](https://help.vtex.com/en/tutorial/what-is-an-sku--1K75s4RXAQyOuGUYKMM68u#). For example, you may have a **Shirt** product group with associated products such as **Blue shirt size L**, **Green shirt size XL** and so on.
5158
5193
  """
5159
5194
  type StoreProductGroup {
@@ -5180,7 +5215,7 @@ type StoreProductGroup {
5180
5215
  """
5181
5216
  skuVariants: SkuVariants
5182
5217
  }
5183
- `, Pa = `type Profile {
5218
+ `, _a = `type Profile {
5184
5219
  """
5185
5220
  Collection of user's address
5186
5221
  """
@@ -5241,7 +5276,7 @@ type ProfileAddress {
5241
5276
  """
5242
5277
  geoCoordinate: [Float]
5243
5278
  }
5244
- `, _a = `"""
5279
+ `, ka = `"""
5245
5280
  Properties that can be associated with products and products groups.
5246
5281
  """
5247
5282
  type StorePropertyValue {
@@ -5281,7 +5316,7 @@ input IStorePropertyValue {
5281
5316
  """
5282
5317
  valueReference: ObjectOrString!
5283
5318
  }
5284
- `, ka = `"""
5319
+ `, Ea = `"""
5285
5320
  Each product edge contains a \`node\`, with product information, and a \`cursor\`, that can be used as a reference for pagination.
5286
5321
  """
5287
5322
  type StoreProductEdge {
@@ -5930,7 +5965,7 @@ type StoreAccountProfile {
5930
5965
  email: String
5931
5966
  id: String
5932
5967
  }
5933
- `, Ea = `"""
5968
+ `, Ta = `"""
5934
5969
  Summary of a quote returned in list results.
5935
5970
  """
5936
5971
  type UserQuoteSummary {
@@ -5995,7 +6030,7 @@ type UserQuoteListPaging {
5995
6030
  """
5996
6031
  perPage: Int!
5997
6032
  }
5998
- `, Ta = `type RecommendationResponse {
6033
+ `, Ua = `type RecommendationResponse {
5999
6034
  products: [StoreProduct!]!
6000
6035
  correlationId: String!
6001
6036
  campaign: RecommendationCampaign!
@@ -6006,7 +6041,7 @@ type RecommendationCampaign {
6006
6041
  title: String
6007
6042
  type: String!
6008
6043
  }
6009
- `, Ua = `"""
6044
+ `, Ra = `"""
6010
6045
  Information of a given review rating.
6011
6046
  """
6012
6047
  type StoreReviewRating {
@@ -6033,7 +6068,7 @@ type StoreReview {
6033
6068
  """
6034
6069
  author: StoreAuthor!
6035
6070
  }
6036
- `, Ra = `"""
6071
+ `, Fa = `"""
6037
6072
  Whether a saved card is personally owned by the buyer or shared by their
6038
6073
  Organization/Contract. Resolved server-side by the Saved-cards service from
6039
6074
  the buyer's \`useAdHocCard\` role — never inferred client-side.
@@ -6097,7 +6132,7 @@ type SavedCardListResult {
6097
6132
  """
6098
6133
  list: [SavedCard!]
6099
6134
  }
6100
- `, Fa = `"""
6135
+ `, Na = `"""
6101
6136
  Search Engine Optimization (SEO) tags data.
6102
6137
  """
6103
6138
  type StoreSeo {
@@ -6118,7 +6153,7 @@ type StoreSeo {
6118
6153
  """
6119
6154
  canonical: String!
6120
6155
  }
6121
- `, Na = `"""
6156
+ `, La = `"""
6122
6157
  Currency information.
6123
6158
  """
6124
6159
  type StoreCurrency {
@@ -6393,7 +6428,7 @@ input IStoreSession {
6393
6428
  """
6394
6429
  refreshAfter: String
6395
6430
  }
6396
- `, La = `"""
6431
+ `, Ba = `"""
6397
6432
  Shipping Simulation item input.
6398
6433
  """
6399
6434
  input IShippingItem {
@@ -6724,7 +6759,7 @@ type MessageFields {
6724
6759
  """
6725
6760
  skuName: String
6726
6761
  }
6727
- `, Ba = `type SkuVariants {
6762
+ `, $a = `type SkuVariants {
6728
6763
  """
6729
6764
  SKU property values for the current SKU.
6730
6765
  """
@@ -6819,7 +6854,7 @@ Example:
6819
6854
  \`\`\`
6820
6855
  """
6821
6856
  scalar FormattedVariants
6822
- `, $a = `"""
6857
+ `, Ma = `"""
6823
6858
  Status used to indicate a message type. For instance, a shopping cart informative or error message.
6824
6859
  """
6825
6860
  enum StoreStatus {
@@ -6827,7 +6862,7 @@ enum StoreStatus {
6827
6862
  WARNING
6828
6863
  ERROR
6829
6864
  }
6830
- `, Ma = `scalar JSONObject
6865
+ `, za = `scalar JSONObject
6831
6866
 
6832
6867
  type UserOrder {
6833
6868
  orderId: String
@@ -7651,69 +7686,69 @@ type UserOrderBudgetAllocationLinkedEntity {
7651
7686
  type: String
7652
7687
  id: String
7653
7688
  }
7654
- `, za = /* @__PURE__ */ Object.assign({
7655
- "./address.graphql": na,
7656
- "./advertisement.graphql": ta,
7657
- "./aggregateOffer.graphql": ra,
7658
- "./aggregateRating.graphql": ia,
7659
- "./author.graphql": aa,
7660
- "./brand.graphql": oa,
7661
- "./breadcrumb.graphql": sa,
7662
- "./cart.graphql": ca,
7663
- "./collection.graphql": la,
7664
- "./deliveryPromisesBadge.graphql": da,
7665
- "./facet.graphql": ua,
7666
- "./image.graphql": pa,
7667
- "./mutation.graphql": ga,
7668
- "./newsletter.graphql": ma,
7669
- "./objectOrString.graphql": ha,
7670
- "./offer.graphql": fa,
7671
- "./order.graphql": Sa,
7672
- "./orderCommercialAuthorizaton.graphql": ya,
7673
- "./orderEntry.graphql": Ia,
7674
- "./organization.graphql": va,
7675
- "./pageInfo.graphql": Oa,
7676
- "./password.graphql": ba,
7677
- "./person.graphql": Ca,
7678
- "./pickupPoints.graphql": wa,
7679
- "./product.graphql": Da,
7680
- "./productGroup.graphql": Aa,
7681
- "./profile.graphql": Pa,
7682
- "./propertyValue.graphql": _a,
7683
- "./query.graphql": ka,
7684
- "./quote.graphql": Ea,
7685
- "./recommendation.graphql": Ta,
7686
- "./review.graphql": Ua,
7687
- "./savedCard.graphql": Ra,
7688
- "./seo.graphql": Fa,
7689
- "./session.graphql": Na,
7690
- "./shipping.graphql": La,
7691
- "./skuVariants.graphql": Ba,
7692
- "./status.graphql": $a,
7693
- "./userOrder.graphql": Ma
7694
- }), Va = zn(
7695
- Object.values(za).map((e) => Vn(e)).reduce(
7689
+ `, Va = /* @__PURE__ */ Object.assign({
7690
+ "./address.graphql": ta,
7691
+ "./advertisement.graphql": ra,
7692
+ "./aggregateOffer.graphql": ia,
7693
+ "./aggregateRating.graphql": aa,
7694
+ "./author.graphql": oa,
7695
+ "./brand.graphql": sa,
7696
+ "./breadcrumb.graphql": ca,
7697
+ "./cart.graphql": la,
7698
+ "./collection.graphql": da,
7699
+ "./deliveryPromisesBadge.graphql": ua,
7700
+ "./facet.graphql": pa,
7701
+ "./image.graphql": ga,
7702
+ "./mutation.graphql": ma,
7703
+ "./newsletter.graphql": ha,
7704
+ "./objectOrString.graphql": fa,
7705
+ "./offer.graphql": Sa,
7706
+ "./order.graphql": ya,
7707
+ "./orderCommercialAuthorizaton.graphql": Ia,
7708
+ "./orderEntry.graphql": va,
7709
+ "./organization.graphql": Oa,
7710
+ "./pageInfo.graphql": ba,
7711
+ "./password.graphql": Ca,
7712
+ "./person.graphql": wa,
7713
+ "./pickupPoints.graphql": Da,
7714
+ "./product.graphql": Aa,
7715
+ "./productGroup.graphql": Pa,
7716
+ "./profile.graphql": _a,
7717
+ "./propertyValue.graphql": ka,
7718
+ "./query.graphql": Ea,
7719
+ "./quote.graphql": Ta,
7720
+ "./recommendation.graphql": Ua,
7721
+ "./review.graphql": Ra,
7722
+ "./savedCard.graphql": Fa,
7723
+ "./seo.graphql": Na,
7724
+ "./session.graphql": La,
7725
+ "./shipping.graphql": Ba,
7726
+ "./skuVariants.graphql": $a,
7727
+ "./status.graphql": Ma,
7728
+ "./userOrder.graphql": za
7729
+ }), xa = zn(
7730
+ Object.values(Va).map((e) => Vn(e)).reduce(
7696
7731
  (e, n) => rn([e, n], { sort: !0 })
7697
7732
  )
7698
- ), xa = Va, oo = async (e) => (n) => (n.storage = {
7733
+ ), qa = xa, so = async (e) => (n) => (n.storage = {
7699
7734
  channel: ee.parse(e.channel),
7700
7735
  flags: e.flags ?? {},
7701
7736
  locale: e.locale,
7702
7737
  cookies: /* @__PURE__ */ new Map()
7703
7738
  }, n.account = e.account, n.OTEL_ENABLED = e.OTEL_ENABLED, n.discoveryConfig = e.discoveryConfig, n.clients = Kt(e, n), n.loaders = sr(e, n), n);
7704
- function qa() {
7705
- const e = ea(), n = {};
7739
+ function ja() {
7740
+ const e = na(), n = {};
7706
7741
  for (const [t, r] of Object.entries(e))
7707
7742
  n[t] = Object.fromEntries(
7708
7743
  Object.entries(r).map(([i, a]) => typeof a != "function" ? [i, a] : [i, lt(a, `${t}(${i})`)])
7709
7744
  );
7710
7745
  return n;
7711
7746
  }
7712
- function so(e) {
7747
+ function co(e) {
7713
7748
  const t = st([
7714
7749
  ot,
7715
7750
  rt
7716
- ])(qa(), xa);
7751
+ ])(ja(), qa);
7717
7752
  return e && xn(e) ? $n({
7718
7753
  schemas: [t, e]
7719
7754
  }) : t;
@@ -7726,8 +7761,8 @@ export {
7726
7761
  Xn as CommercialAuthorizationStatus,
7727
7762
  Z as FastStoreError,
7728
7763
  J as ForbiddenError,
7729
- oo as GraphqlVtexContextFactory,
7730
- so as GraphqlVtexSchema,
7764
+ so as GraphqlVtexContextFactory,
7765
+ co as GraphqlVtexSchema,
7731
7766
  $ as NotFoundError,
7732
7767
  Yn as StoreCollectionType,
7733
7768
  Jn as StoreFacetType,
@@ -7736,13 +7771,13 @@ export {
7736
7771
  ie as UnauthorizedError,
7737
7772
  Zn as UserOrderInvoiceType,
7738
7773
  L as getAuthCookie,
7739
- io as isBadRequestError,
7740
- ro as isFastStoreError,
7774
+ ao as isBadRequestError,
7775
+ io as isFastStoreError,
7741
7776
  dt as isForbiddenError,
7742
7777
  Y as isNotFoundError,
7743
- ao as isUnauthorizedError,
7744
- to as stringifyCacheControl,
7745
- xa as typeDefs,
7778
+ oo as isUnauthorizedError,
7779
+ ro as stringifyCacheControl,
7780
+ qa as typeDefs,
7746
7781
  nt as validateUserAuthentication,
7747
7782
  st as withDirectives
7748
7783
  };