window.CarBrainPurchaseSalesData = {
  isLive: false,
  asOf: 'Full Year 2026 YTD (thru Sep 28)',
  sourceNote: 'National Sale Performance Details (Copart/IAA, per-transaction) joined to APC export by Reference Number.',

  grandTotal: {
    nPurchased: 22084,
    bySegmentCount: {"SP": 12222, "Parts": 4703, "Priority": 3562, "Premium": 1597},
  },

  overall: {
      nPurchased: 9862,
      avgCost: 1655.66,
      highPrice: 61000.0,
      lowPrice: 85.0,
      nSold: 8648,
      avgSale: 2598.08,
      highSale: 104000.0,
      totalSale: 22468175.0,
      totalProfit: 7046029.0,
      margin: 31.4,
      avgProfit: 814.76,
  },

  spSummary: {
      nTransactions: 12222,
      avgAmount: 112.67,
      totalAmount: 1377061.5,
      highAmount: 1443.0,
      lowAmount: 10.0,
  },

  bySegment: {
    'Parts': {
        nPurchased: 4703,
        avgCost: 465.64,
        highPrice: 795.0,
        lowPrice: 85.0,
        nSold: 4187,
        avgSale: 857.69,
        highSale: 7100.0,
        totalSale: 3591150.0,
        totalProfit: 1117753.0,
        margin: 31.1,
        avgProfit: 266.96,
    },
    'Priority': {
        nPurchased: 3562,
        avgCost: 1585.92,
        highPrice: 3000.0,
        lowPrice: 800.0,
        nSold: 3126,
        avgSale: 2640.54,
        highSale: 12300.0,
        totalSale: 8254325.0,
        totalProfit: 2893005.0,
        margin: 35.0,
        avgProfit: 925.47,
    },
    'Premium': {
        nPurchased: 1597,
        avgCost: 5551.27,
        highPrice: 61000.0,
        lowPrice: 3005.0,
        nSold: 1335,
        avgSale: 7957.08,
        highSale: 104000.0,
        totalSale: 10622700.0,
        totalProfit: 3035271.0,
        margin: 28.6,
        avgProfit: 2273.61,
    },
  },

  byChannel: {
    'Affiliate': {
        nPurchased: 349,
        avgCost: 1370.45,
        highPrice: 9500.0,
        lowPrice: 115.0,
        nSold: 271,
        avgSale: 2069.74,
        highSale: 14200.0,
        totalSale: 560900.0,
        totalProfit: 155343.0,
        margin: 27.7,
        avgProfit: 573.22,
    },
    'Direct': {
        nPurchased: 1064,
        avgCost: 1756.84,
        highPrice: 18000.0,
        lowPrice: 100.0,
        nSold: 942,
        avgSale: 2744.37,
        highSale: 24000.0,
        totalSale: 2585200.0,
        totalProfit: 811270.0,
        margin: 31.4,
        avgProfit: 861.22,
    },
    'Organic Social': {
        nPurchased: 62,
        avgCost: 1950.96,
        highPrice: 8500.0,
        lowPrice: 200.0,
        nSold: 50,
        avgSale: 3176.0,
        highSale: 12600.0,
        totalSale: 158800.0,
        totalProfit: 54869.0,
        margin: 34.6,
        avgProfit: 1097.38,
    },
    'PMax': {
        nPurchased: 1915,
        avgCost: 1768.16,
        highPrice: 26000.0,
        lowPrice: 125.0,
        nSold: 1634,
        avgSale: 2718.05,
        highSale: 35750.0,
        totalSale: 4441300.0,
        totalProfit: 1344436.0,
        margin: 30.3,
        avgProfit: 822.79,
    },
    'PPC Search': {
        nPurchased: 2785,
        avgCost: 1723.02,
        highPrice: 24000.0,
        lowPrice: 100.0,
        nSold: 2515,
        avgSale: 2729.28,
        highSale: 44000.0,
        totalSale: 6864150.0,
        totalProfit: 2204816.0,
        margin: 32.1,
        avgProfit: 876.67,
    },
    'Paid Social': {
        nPurchased: 606,
        avgCost: 1401.76,
        highPrice: 11000.0,
        lowPrice: 100.0,
        nSold: 524,
        avgSale: 2072.14,
        highSale: 18700.0,
        totalSale: 1085800.0,
        totalProfit: 285578.0,
        margin: 26.3,
        avgProfit: 545.0,
    },
    'Referral': {
        nPurchased: 1178,
        avgCost: 1279.07,
        highPrice: 28000.0,
        lowPrice: 100.0,
        nSold: 1045,
        avgSale: 2048.01,
        highSale: 40000.0,
        totalSale: 2140175.0,
        totalProfit: 670294.0,
        margin: 31.3,
        avgProfit: 641.43,
    },
    'SEO': {
        nPurchased: 1844,
        avgCost: 1750.44,
        highPrice: 61000.0,
        lowPrice: 85.0,
        nSold: 1619,
        avgSale: 2801.56,
        highSale: 104000.0,
        totalSale: 4535725.0,
        totalProfit: 1495677.0,
        margin: 33.0,
        avgProfit: 923.83,
    },
    'Unknown': {
        nPurchased: 59,
        avgCost: 1387.4,
        highPrice: 10000.0,
        lowPrice: 265.0,
        nSold: 48,
        avgSale: 2002.6,
        highSale: 11400.0,
        totalSale: 96125.0,
        totalProfit: 23746.0,
        margin: 24.7,
        avgProfit: 494.71,
    },
  },

  byTheme: {
    'Accident': {
        nPurchased: 245,
        avgCost: 1448.69,
        highPrice: 14500.0,
        lowPrice: 150.0,
        nSold: 218,
        avgSale: 2216.86,
        highSale: 34750.0,
        totalSale: 483275.0,
        totalProfit: 139270.0,
        margin: 28.8,
        avgProfit: 638.85,
    },
    'Brand': {
        nPurchased: 1104,
        avgCost: 1624.44,
        highPrice: 17547.0,
        lowPrice: 100.0,
        nSold: 965,
        avgSale: 2653.99,
        highSale: 22200.0,
        totalSale: 2561100.0,
        totalProfit: 867209.0,
        margin: 33.9,
        avgProfit: 898.66,
    },
    'Damaged': {
        nPurchased: 352,
        avgCost: 1442.65,
        highPrice: 10000.0,
        lowPrice: 105.0,
        nSold: 339,
        avgSale: 2267.48,
        highSale: 15200.0,
        totalSale: 768675.0,
        totalProfit: 235983.0,
        margin: 30.7,
        avgProfit: 696.12,
    },
    'Engine': {
        nPurchased: 620,
        avgCost: 1908.59,
        highPrice: 16000.0,
        lowPrice: 125.0,
        nSold: 579,
        avgSale: 3009.89,
        highSale: 44000.0,
        totalSale: 1742725.0,
        totalProfit: 563697.0,
        margin: 32.3,
        avgProfit: 973.57,
    },
    'Junk': {
        nPurchased: 73,
        avgCost: 1039.78,
        highPrice: 5000.0,
        lowPrice: 205.0,
        nSold: 69,
        avgSale: 1566.3,
        highSale: 5900.0,
        totalSale: 108075.0,
        totalProfit: 27122.0,
        margin: 25.1,
        avgProfit: 393.07,
    },
    'Non-Running': {
        nPurchased: 121,
        avgCost: 1520.11,
        highPrice: 9000.0,
        lowPrice: 150.0,
        nSold: 111,
        avgSale: 2432.66,
        highSale: 13100.0,
        totalSale: 270025.0,
        totalProfit: 86691.0,
        margin: 32.1,
        avgProfit: 781.0,
    },
    'Other/Unmapped': {
        nPurchased: 5909,
        avgCost: 1585.13,
        highPrice: 61000.0,
        lowPrice: 85.0,
        nSold: 5192,
        avgSale: 2487.76,
        highSale: 104000.0,
        totalSale: 12916425.0,
        totalProfit: 4027953.0,
        margin: 31.2,
        avgProfit: 775.8,
    },
    'PMax General': {
        nPurchased: 313,
        avgCost: 900.74,
        highPrice: 7002.0,
        lowPrice: 150.0,
        nSold: 234,
        avgSale: 1392.09,
        highSale: 7500.0,
        totalSale: 325750.0,
        totalProfit: 85880.0,
        margin: 26.4,
        avgProfit: 367.01,
    },
    'PMax Priority': {
        nPurchased: 1125,
        avgCost: 2294.79,
        highPrice: 26000.0,
        lowPrice: 180.0,
        nSold: 941,
        avgSale: 3498.54,
        highSale: 35750.0,
        totalSale: 3292125.0,
        totalProfit: 1012224.0,
        margin: 30.7,
        avgProfit: 1075.69,
    },
  },
};
