@azzas/azzas-tracker-web 2.0.0-preview.7 → 2.0.0-preview.8

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/mod.js CHANGED
@@ -1390,24 +1390,7 @@ var metaAdapters = {
1390
1390
  }
1391
1391
  };
1392
1392
 
1393
- // src/params/adapters/deco/utils.ts
1394
- var getItemCategory3 = (item) => {
1395
- var _a;
1396
- const value = item == null ? void 0 : item.category;
1397
- if (!value) return "Cole\xE7\xE3o";
1398
- const text = Array.isArray(value) ? value.join(" ") : String(value);
1399
- const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1400
- return match != null ? match : "Cole\xE7\xE3o";
1401
- };
1402
- var getItemCategory22 = (item) => {
1403
- var _a, _b, _c, _d;
1404
- const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1405
- const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1406
- const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1407
- const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1408
- const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1409
- return capitalize(deepest);
1410
- };
1393
+ // src/core/farm.ts
1411
1394
  var BRAND_CODES2 = {
1412
1395
  farm: "farmrio",
1413
1396
  "farm etc": "farmetc",
@@ -1440,6 +1423,25 @@ function normalizeBrand2(input) {
1440
1423
  return uniqueSortedCodes.length > 0 ? uniqueSortedCodes.join("_") : null;
1441
1424
  }
1442
1425
 
1426
+ // src/params/adapters/deco/utils.ts
1427
+ var getItemCategory3 = (item) => {
1428
+ var _a;
1429
+ const value = item == null ? void 0 : item.category;
1430
+ if (!value) return "Cole\xE7\xE3o";
1431
+ const text = Array.isArray(value) ? value.join(" ") : String(value);
1432
+ const match = (_a = text.match(/outlet|bazar|sale/i)) == null ? void 0 : _a[0].toLowerCase();
1433
+ return match != null ? match : "Cole\xE7\xE3o";
1434
+ };
1435
+ var getItemCategory22 = (item) => {
1436
+ var _a, _b, _c, _d;
1437
+ const AVOID_CATEGORIES = /^(outlet|bazar|sale)$/i;
1438
+ const categories = (_b = (_a = item.category) == null ? void 0 : _a.split(">")) != null ? _b : [];
1439
+ const last = (_c = categories[categories.length - 1]) != null ? _c : "";
1440
+ const validHierarchy = last.split("/").filter((c) => c && !AVOID_CATEGORIES.test(c));
1441
+ const deepest = (_d = validHierarchy[validHierarchy.length - 1]) != null ? _d : "";
1442
+ return capitalize(deepest);
1443
+ };
1444
+
1443
1445
  // src/params/adapters/deco/index.ts
1444
1446
  var IN_STOCK_SCHEMA = "https://schema.org/InStock";
1445
1447
  var LIST_PRICE_SCHEMA = "https://schema.org/ListPrice";
@@ -1766,9 +1768,14 @@ var pickupAdapter = {
1766
1768
  }
1767
1769
  return null;
1768
1770
  },
1771
+ brand: (context, config2) => {
1772
+ if (config2 == null ? void 0 : config2.brand) return config2.brand;
1773
+ if (context == null ? void 0 : context.brand) return context.brand;
1774
+ return null;
1775
+ },
1769
1776
  zipcode: (context) => {
1770
1777
  var _a;
1771
- return (_a = context.zipcode) != null ? _a : null;
1778
+ return (_a = context.meta.zipcode) != null ? _a : null;
1772
1779
  }
1773
1780
  };
1774
1781
 
@@ -1886,7 +1893,7 @@ var orderFormAdapter = {
1886
1893
  },
1887
1894
  zipcode: (context) => {
1888
1895
  var _a;
1889
- return (_a = context.zipcode) != null ? _a : null;
1896
+ return (_a = context.meta.zipcode) != null ? _a : null;
1890
1897
  },
1891
1898
  flag_pickup: (context) => {
1892
1899
  var _a;