/*
EMERALD QUICK SHIP - BOOKCASES & STORAGE CARDS V1
November 18, 2026
One self-contained script for the Bookcases & Storage
category (EvoX category 1366570). Same card design as Desks and
Seating: two-line titles that name the finish or material, three
one-line benefit bullets, Category / Collection / Item Code, list
price with Emerald Savings when the item is sold each and the native
price is at least 36% below verified list, 140px image area.
Runs at both addresses of the category (/category/1366570-... and
/storage--64) by checking the page's category id.
Native prices, quantity box and Add to Cart are never changed.
Cards without a price or Add to Cart button (signed-out visitors)
stay native.
*/
(() => {
'use strict';
if (!document.body || !document.body.classList.contains('ex-categoryid-1366570')) return;
if (window.EQS_ST?.active) return;
const VERSION = 'EQS_STORAGE_V1A_2026_11_18';
// ---- Items removed from the Storage page, plus the empty EvoX placeholder tile (hidden for every visitor) ----
const HIDE_SKUS = [];
if (!document.getElementById('eqs-tables-hide')) {
const hs = document.createElement('style');
hs.id = 'eqs-tables-hide';
hs.textContent = HIDE_SKUS.map(k => `.griditems .tileparent.product[data-sku="${k}" i]`).concat('.griditems .tileparent.tileparent_placeholder').join(',') + '{display:none!important}';
(document.head || document.documentElement).appendChild(hs);
}
const CARD = '.tileparent.product';
const MIN_DISCOUNT = 36;
// Items sold as a set or carton: the native price covers this many chairs.
const PER_SET = {"COEOSWR3006CS":4,"COEOSWR3007CS":"per pack of 10"};
// sku: [title, bullet1, bullet2, bullet3, collection, listPrice, imgScale, imgX, imgY]
const DATA = {
"COEFL3072RE":["Markle 5-Shelf Bookcase, Espresso Wood Finish", "3 adjustable, 2 fixed shelves", "Rich espresso wood-look finish", "Displays books and decor", "Markle", 2463, 0.684, 0.3, 0.7],
"COEFL450RE":["Markle 2-Drawer Lateral File, Espresso Finish", "Holds letter and legal files", "Top drawer locks for security", "Crown molding adds detail", "Markle", 2876, 0.786, -0.4, 0.4],
"COEMNC3678DCT":["Artisan Bookcase/Storage Combo, Cement Finish", "Open shelves plus closed doors", "Three adjustable shelves", "Laminate resists daily wear", "Artisan", 3041, 0.742, -0.0, -0.4],
"COEMNM3678DNA":["Artisan Bookcase/Storage Combo, Natural Finish", "Open shelves plus closed doors", "Three adjustable shelves", "Laminate resists daily wear", "Artisan", 3041, 0.677, 0.3, 0.7],
"COEOS112AE":["2-Drawer Lateral File, American Elm Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.964, -0.0, 1.9],
"COEOS112AR":["2-Drawer Lateral File, Arcadia White Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.971, 0.5, 1.5],
"COEOS112CG":["2-Drawer Lateral File, Coastal Gray Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, 0.5, 1.4],
"COEOS112CH":["2-Drawer Lateral File, Cherry Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, -0.0, 1.4],
"COEOS112ES":["2-Drawer Lateral File, Espresso Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, 0.5, 1.4],
"COEOS112JV":["2-Drawer Lateral File, Java Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.964, 0.5, 1.9],
"COEOS112MA":["2-Drawer Lateral File, Maple Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, -0.0, 1.4],
"COEOS112MH":["2-Drawer Lateral File, Mahogany Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, 0.5, 1.4],
"COEOS112MW":["2-Drawer Lateral File, Modern Walnut Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.957, -0.0, 1.4],
"COEOS112WH":["2-Drawer Lateral File, White Laminate", "Two locking file drawers", "Desk-height top adds surface", "Matches OS Laminate desks", "OS Laminate", 1357, 0.964, 0.5, 1.0],
"COEOS114AE":["Lateral File Combo Cabinet, American Elm Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 1.023, -0.5, -12.3],
"COEOS114AR":["Lateral File Combo Cabinet, Arcadia White Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 1.023, -0.0, -12.3],
"COEOS114CG":["Lateral File Combo Cabinet, Coastal Gray Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.9, 0.9],
"COEOS114CH":["Lateral File Combo Cabinet, Cherry Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.9, 0.9],
"COEOS114ES":["Lateral File Combo Cabinet, Espresso Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 1.015, -0.5, -11.7],
"COEOS114JV":["Lateral File Combo Cabinet, Java Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 1.015, -0.5, -11.7],
"COEOS114MA":["Lateral File Combo Cabinet, Maple Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.4, 0.9],
"COEOS114MH":["Lateral File Combo Cabinet, Mahogany Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.9, 0.9],
"COEOS114MW":["Lateral File Combo Cabinet, Modern Walnut Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.9, 0.9],
"COEOS114WH":["Lateral File Combo Cabinet, White Laminate", "Box, file and lateral drawers", "Locking drawers keep files safe", "Desk-height top adds surface", "OS Laminate", 1352, 0.863, -0.0, 0.9],
"COEOS148AE":["3-Drawer Mobile Pedestal, American Elm Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.81, 3.6, 0.8],
"COEOS148AR":["3-Drawer Mobile Pedestal, Arcadia White Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.825, 2.9, 1.2],
"COEOS148CG":["3-Drawer Mobile Pedestal, Coastal Gray Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.825, 3.7, 1.2],
"COEOS148CH":["3-Drawer Mobile Pedestal, Cherry Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.754, 2.3, 1.5],
"COEOS148JV":["3-Drawer Mobile Pedestal, Java Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.815, 2.4, 1.2],
"COEOS148MA":["3-Drawer Mobile Pedestal, Maple Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.846, 4.2, 2.1],
"COEOS148MH":["3-Drawer Mobile Pedestal, Mahogany Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.852, 4.7, 1.7],
"COEOS148MW":["3-Drawer Mobile Pedestal, Modern Walnut Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.759, 1.5, -1.9],
"COEOS148WH":["3-Drawer Mobile Pedestal, White Laminate", "Box, box and file drawers", "Rolls under any desk", "Locks to secure your files", "OS Laminate", 1029, 0.82, -0.8, 3.3],
"COEOS152AE":["2-Door Storage Cabinet, American Elm Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.863, 2.6, -1.7],
"COEOS152AR":["2-Door Storage Cabinet, Arcadia White Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.857, 3.0, -3.0],
"COEOS152CG":["2-Door Storage Cabinet, Coastal Gray Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 3.5, -1.3],
"COEOS152CH":["2-Door Storage Cabinet, Cherry Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 3.5, -1.3],
"COEOS152ES":["2-Door Storage Cabinet, Espresso Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 3.9, -1.3],
"COEOS152JV":["2-Door Storage Cabinet, Java Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.863, 2.2, -2.6],
"COEOS152MA":["2-Door Storage Cabinet, Maple Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.863, 3.9, -1.7],
"COEOS152MH":["2-Door Storage Cabinet, Mahogany Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 3.5, -1.3],
"COEOS152MW":["2-Door Storage Cabinet, Modern Walnut Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 3.0, -1.3],
"COEOS152WH":["2-Door Storage Cabinet, White Laminate", "Two adjustable shelves inside", "Locking doors protect supplies", "Hides clutter behind doors", "OS Laminate", 1142, 0.868, 4.3, -2.2],
"COEOS154AE":["2-Shelf Bookcase, 30\" H, American Elm Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.936, 0.5, -3.7],
"COEOS154AR":["2-Shelf Bookcase, 30\" H, Arcadia White Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.936, 0.9, -3.7],
"COEOS154CG":["2-Shelf Bookcase, 30\" H, Coastal Gray Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, 0.5, -4.2],
"COEOS154CH":["2-Shelf Bookcase, 30\" H, Cherry Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, -0.9, -4.2],
"COEOS154JV":["2-Shelf Bookcase, 30\" H, Java Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.936, 0.5, -3.7],
"COEOS154MA":["2-Shelf Bookcase, 30\" H, Maple Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, 0.5, -4.2],
"COEOS154MH":["2-Shelf Bookcase, 30\" H, Mahogany Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, 0.5, -4.2],
"COEOS154MW":["2-Shelf Bookcase, 30\" H, Modern Walnut Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, -0.9, -4.2],
"COEOS154WH":["2-Shelf Bookcase, 30\" H, White Laminate", "Holds 50 lb. per shelf", "Low height fits under windows", "Matches OS Laminate desks", "OS Laminate", 390, 0.93, 1.4, -4.2],
"COEOS155AE":["4-Shelf Bookcase, 48\" H, American Elm Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 0.8, -2.5],
"COEOS155AR":["4-Shelf Bookcase, 48\" H, Arcadia White Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.825, 0.4, -2.1],
"COEOS155CG":["4-Shelf Bookcase, 48\" H, Coastal Gray Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 1.2, -2.5],
"COEOS155CH":["4-Shelf Bookcase, 48\" H, Cherry Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 1.2, -2.5],
"COEOS155ES":["4-Shelf Bookcase, 48\" H, Espresso Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 1.2, -2.5],
"COEOS155JV":["4-Shelf Bookcase, 48\" H, Java Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.825, 0.8, -2.1],
"COEOS155MA":["4-Shelf Bookcase, 48\" H, Maple Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 0.8, -2.5],
"COEOS155MH":["4-Shelf Bookcase, 48\" H, Mahogany Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 0.8, -2.5],
"COEOS155MW":["4-Shelf Bookcase, 48\" H, Modern Walnut Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.82, 1.2, -2.5],
"COEOS155WH":["4-Shelf Bookcase, 48\" H, White Laminate", "Holds 50 lb. per shelf", "Mid-height for books, binders", "Matches OS Laminate desks", "OS Laminate", 513, 0.898, 1.8, -1.8],
"COEOS156AE":["6-Shelf Bookcase, 71\" H, American Elm Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.781, 2.0, -0.0],
"COEOS156AR":["6-Shelf Bookcase, 71\" H, Arcadia White Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.786, 2.8, 0.4],
"COEOS156CG":["6-Shelf Bookcase, 71\" H, Coastal Gray Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.737, 1.1, 1.5],
"COEOS156CH":["6-Shelf Bookcase, 71\" H, Cherry Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.737, 0.7, 1.5],
"COEOS156ES":["6-Shelf Bookcase, 71\" H, Espresso Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.688, 1.0, -0.3],
"COEOS156JV":["6-Shelf Bookcase, 71\" H, Java Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.786, 2.0, 0.4],
"COEOS156MA":["6-Shelf Bookcase, 71\" H, Maple Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.688, 0.7, -0.3],
"COEOS156MH":["6-Shelf Bookcase, 71\" H, Mahogany Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.688, 0.7, -0.3],
"COEOS156MW":["6-Shelf Bookcase, 71\" H, Modern Walnut Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.737, 1.1, 1.5],
"COEOS156WH":["6-Shelf Bookcase, 71\" H, White Laminate", "Holds 50 lb. per shelf", "Tall design saves floor space", "Matches OS Laminate desks", "OS Laminate", 729, 0.695, 1.0, -0.3],
"COEOS183AE":["3-Drawer Lateral File, American Elm Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.031, -0.5, -7.7],
"COEOS183AR":["3-Drawer Lateral File, Arcadia White Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.1, -0.0, -7.2],
"COEOS183CG":["3-Drawer Lateral File, Coastal Gray Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.091, 0.5, -7.6],
"COEOS183CH":["3-Drawer Lateral File, Cherry Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.082, -0.0, -7.0],
"COEOS183ES":["3-Drawer Lateral File, Espresso Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.091, 0.5, -7.6],
"COEOS183JV":["3-Drawer Lateral File, Java Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.091, 0.5, -7.6],
"COEOS183MA":["3-Drawer Lateral File, Maple Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.091, -0.0, -7.6],
"COEOS183MH":["3-Drawer Lateral File, Mahogany Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.091, 0.5, -7.6],
"COEOS183MW":["3-Drawer Lateral File, Modern Walnut Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.082, 0.5, -7.0],
"COEOS183WH":["3-Drawer Lateral File, White Laminate", "Three locking file drawers", "Organizes large file volumes", "Matches OS Laminate desks", "OS Laminate", 3206, 1.1, 0.6, -8.2],
"COEOS184AE":["4-Drawer Lateral File, American Elm Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.737, -3.7, -0.0],
"COEOS184AR":["4-Drawer Lateral File, Arcadia White Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.742, -3.0, -0.4],
"COEOS184CG":["4-Drawer Lateral File, Coastal Gray Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.737, 0.7, -0.0],
"COEOS184CH":["4-Drawer Lateral File, Cherry Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.733, 1.1, -0.4],
"COEOS184ES":["4-Drawer Lateral File, Espresso Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.737, 1.1, -0.0],
"COEOS184JV":["4-Drawer Lateral File, Java Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.737, -2.6, -0.0],
"COEOS184MA":["4-Drawer Lateral File, Maple Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.733, 1.5, -0.4],
"COEOS184MH":["4-Drawer Lateral File, Mahogany Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.733, 1.1, -0.4],
"COEOS184MW":["4-Drawer Lateral File, Modern Walnut Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.733, 1.1, -0.4],
"COEOS184WH":["4-Drawer Lateral File, White Laminate", "Four locking file drawers", "Stores years of records", "Matches OS Laminate desks", "OS Laminate", 3928, 0.737, 1.8, -0.7],
"COEOS207AE":["Storage & Wardrobe Cabinet, American Elm Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.733, -0.0, -0.4],
"COEOS207AR":["Storage & Wardrobe Cabinet, Arcadia White Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.733, 0.4, -0.4],
"COEOS207CG":["Storage & Wardrobe Cabinet, Coastal Gray Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 1.1, -0.0],
"COEOS207CH":["Storage & Wardrobe Cabinet, Cherry Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.725, 1.1, 0.4],
"COEOS207ES":["Storage & Wardrobe Cabinet, Espresso Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 1.1, -0.0],
"COEOS207JV":["Storage & Wardrobe Cabinet, Java Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 0.4, -0.0],
"COEOS207MA":["Storage & Wardrobe Cabinet, Maple Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 0.4, -0.0],
"COEOS207MH":["Storage & Wardrobe Cabinet, Mahogany Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.725, 1.5, 0.4],
"COEOS207MW":["Storage & Wardrobe Cabinet, Modern Walnut Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 1.1, -0.0],
"COEOS207WH":["Storage & Wardrobe Cabinet, White Laminate", "Smooth-glide locking drawers", "Stores coats and supplies", "Matches OS Laminate desks", "OS Laminate", 2726, 0.729, 1.1, -0.0],
"COEOS8362BK":["2-Drawer Heavy-Duty Lateral File, Black Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Desk-height top adds surface", "OS Metal Files", 1308, 0.852, 0.9, -3.4],
"COEOS8362GT":["2-Drawer Heavy-Duty Lateral File, Light Gray Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Desk-height top adds surface", "OS Metal Files", 1308, 0.857, 0.9, -3.9],
"COEOS8363BK":["3-Drawer Heavy-Duty Lateral File, Black Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 1897, 0.68, 0.7, -1.0],
"COEOS8363GT":["3-Drawer Heavy-Duty Lateral File, Light Gray Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 1897, 0.688, 0.3, -0.3],
"COEOS8364BK":["4-Drawer Heavy-Duty Lateral File, Black Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 2304, 0.67, 0.7, -0.0],
"COEOS8364GT":["4-Drawer Heavy-Duty Lateral File, Light Gray Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 2304, 0.684, 0.3, 0.7],
"COEOS8365BK":["5-Drawer Heavy-Duty Lateral File, Black Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 3242, 0.68, 0.3, -1.0],
"COEOS8365GT":["5-Drawer Heavy-Duty Lateral File, Light Gray Metal", "Heavy-duty steel build", "36\" wide drawers hold more", "Interlock prevents tipping", "OS Metal Files", 3242, 0.706, -0.0, -0.0],
"COEOSCPSFFA9BK":["2-Drawer Locking Pedestal File, Black Metal", "Fits under most desks", "Interlock prevents tipping", "Ball-bearing slides glide smooth", "OS Metal Files", 735, 0.688, 0.3, 2.4],
"COEOSCPSFFA9SI":["2-Drawer Locking Pedestal File, Silver Metal", "Fits under most desks", "Interlock prevents tipping", "Ball-bearing slides glide smooth", "OS Metal Files", 735, 0.695, 0.3, 2.4],
"COEOSWR3001BK":["5-Shelf Black Wire Shelving, 36\" x 18\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Open wire lets air circulate", "OS Wire Shelving", 571, 0.754, 1.1, -0.0],
"COEOSWR3001CS":["5-Shelf Chrome Wire Shelving, 36\" x 18\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Chrome finish resists rust", "OS Wire Shelving", 571, 0.759, 0.8, -0.4],
"COEOSWR3002BK":["5-Shelf Black Wire Shelving, 48\" x 18\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Open wire lets air circulate", "OS Wire Shelving", 653, 0.742, -0.0, -1.1],
"COEOSWR3002CS":["5-Shelf Chrome Wire Shelving, 48\" x 18\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Chrome finish resists rust", "OS Wire Shelving", 653, 0.742, -0.0, -1.1],
"COEOSWR3003BK":["5-Shelf Black Wire Shelving, 36\" x 24\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Open wire lets air circulate", "OS Wire Shelving", 625, 0.746, 1.1, -0.7],
"COEOSWR3003CS":["5-Shelf Chrome Wire Shelving, 36\" x 24\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Chrome finish resists rust", "OS Wire Shelving", 625, 0.754, 1.9, -0.8],
"COEOSWR3004BK":["5-Shelf Black Wire Shelving, 48\" x 24\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Open wire lets air circulate", "OS Wire Shelving", 788, 0.737, 6.3, -1.5],
"COEOSWR3004CS":["5-Shelf Chrome Wire Shelving, 48\" x 24\" x 72\" H", "Holds 650 lb. per shelf", "Adjustable shelves fit any load", "Chrome finish resists rust", "OS Wire Shelving", 788, 0.737, 5.9, -1.5],
"COEOSWR3006CS":["4\" Casters for Chrome Wire Shelving, Set of 4", "Turns shelving into a cart", "Rolls heavy loads with ease", "Fits OS wire shelving units", "OS Wire Shelving", 92, 0.81, 21.5, 1.6],
"COEOSWR3007CS":["N-Shaped Chrome Connectors for Wire Shelving", "Links units side by side", "Shares posts to save space", "Fits OS wire shelving units", "OS Wire Shelving", 20, 0.746, 1.5, 0.7],
"COEOSXS2004CW":["Lucca 5-Shelf Bookcase, Cypress & Pearl Laminate", "1.5\" shelves carry heavy loads", "Three adjustable shelves", "Levelers steady uneven floors", "Lucca", 1359, 0.706, 1.4, 1.4],
"COEOSXS2005CW":["Lucca 3-Shelf Bookcase, Cypress & Pearl Laminate", "1.5\" shelves carry heavy loads", "Adjustable shelf storage", "Levelers steady uneven floors", "Lucca", 924, 0.698, 0.7, 1.4],
"FLAGCMBLK67GY":["Barn Door TV Stand, Gray Woodgrain Finish", "Fits TVs up to 65\"", "Top shelf holds 200 lb.", "4 cable cutouts tame cords", "Charlotte", 800, 1.184, 0.6, 0.6],
"FLAGCMBLK67LTGY":["Barn Door TV Stand, Light Gray Woodgrain Finish", "Fits TVs up to 65\"", "Top shelf holds 200 lb.", "4 cable cutouts tame cords", "Charlotte", 800, 1.108, 0.6, -1.7],
"FLAGCMBLK67WH":["Barn Door TV Stand, White & Brown Woodgrain Finish", "Fits TVs up to 65\"", "Top shelf holds 200 lb.", "4 cable cutouts tame cords", "Charlotte", 800, 1.184, 0.6, 0.6]
};
const DELIVERY = [
[/^COE/, '3\u20135 Day Delivery'],
[/^FLA/, '7\u201310 Days']
];
const CATEGORY_LABEL = { 'Executive & Conference Seating': 'Executive & Conference' };
const TRUCK = '';
const CART = '';
// ---- Retire the older P11 adapter if it is still loaded ----
// ---- Styles (scoped to styled Storage cards) ----
const S = 'html body .griditems.gridlist-grid > .tileparent.product.eqs-st';
const style = document.createElement('style');
style.id = 'eqs-tables-v1-style';
style.textContent = `
${S}{box-sizing:border-box!important;float:left!important;width:calc(25% - 12px)!important;height:455px!important;min-height:455px!important;margin:0 6px 14px!important;padding:0 6px!important;background:#fff!important;border:.667px solid rgb(203,216,212)!important;border-radius:14px!important;box-shadow:none!important;overflow:hidden!important}
@media (max-width:1199px){${S}{width:calc(33.333% - 12px)!important}}
@media (max-width:991px){${S}{width:calc(50% - 12px)!important}}
@media (max-width:767px){${S}{width:calc(100% - 12px)!important}}
${S} > .tile{display:flex!important;flex-direction:column!important;height:454px!important;min-height:0!important;padding:0 14px 8px!important;margin:0!important;border:0!important;background:transparent!important}
${S} .badges-wrapper,${S} .product-list-actions,${S} .addtoquicklist-wrapper,${S} .product-compare-action,${S} .emerald-closeout-deal-badge,${S} .live-inventory-v2-shipping,${S} .live-inventory-v2-wrapper,${S} .product-name,${S} .product-sku,${S} .product-category,${S} .indicators-grid,${S} .product-points,${S} .multiple-uom-label,${S} .eqs-p542-description,${S} .eqs-p3-collection,${S} .product-short-description,${S} .short-description{display:none!important}
${S} .footer-wrapper-price{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;margin:0!important;padding:0!important}
${S} .product-tile-image{position:relative!important;display:flex!important;justify-content:center!important;align-items:center!important;height:140px!important;min-height:140px!important;max-height:140px!important;overflow:hidden!important;margin:0!important;padding:0!important;flex:0 0 140px!important}
${S} .product-tile-image .text-center,${S} .product-tile-image .imgthumbnail{position:static!important;display:flex!important;justify-content:center!important;align-items:center!important;height:140px!important;width:100%!important;margin:0!important;padding:0!important;overflow:visible!important}
${S} .product-tile-image .thumb-align{display:none!important}
${S} .product-tile-image img{width:200px!important;height:200px!important;min-height:200px!important;max-width:none!important;max-height:none!important;object-fit:contain!important;transform-origin:center center!important;flex:0 0 200px!important;position:absolute!important;top:50%!important;left:50%!important;margin:-100px 0 0 -100px!important}
${S} .ebi-textile-badge{display:none!important}
${S} .footer{display:flex!important;flex-direction:column!important;flex:1 1 auto!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}
${S} .footer-wrapper{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;position:relative!important}
${S} .footer-wrapper-description{display:flex!important;flex-direction:column!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important}
${S} .eqs-st-brandrow{display:flex!important;justify-content:space-between!important;align-items:center!important;gap:7px!important;height:37px!important;min-height:37px!important;margin:12px 0 1px!important;padding:0!important}
${S} .eqs-st-brandrow .brand-label{display:flex!important;align-items:center!important;flex:0 1 auto!important;min-width:0!important;max-width:96px!important;margin:0!important;padding:0!important}
${S} .eqs-st-brandrow .brand-label a{display:flex!important;align-items:center!important;line-height:0!important;min-width:0!important;max-width:100%!important}
${S} .eqs-st-brandrow .brand-label img{width:auto!important;height:auto!important;max-width:100%!important;max-height:20px!important;object-fit:contain!important;object-position:left center!important;margin:0!important}
${S} .eqs-st-delivery{display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;gap:3px!important;flex:0 0 auto!important;white-space:nowrap!important;color:rgb(0,132,61)!important;font:700 11px/14px Arial,sans-serif!important}
${S} .eqs-st-delivery svg{width:32px!important;height:22px!important;flex:0 0 32px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important;stroke-linecap:round!important;stroke-linejoin:round!important}
${S} .eqs-st-title{display:block!important;height:38px!important;min-height:38px!important;max-height:38px!important;overflow:hidden!important;margin:0 0 4px!important;padding:0!important;color:rgb(2,2,2)!important;font:700 14px/19px Arial,sans-serif!important;text-decoration:none!important}
${S} .eqs-st-title:hover{text-decoration:underline!important}
${S} .eqs-st-features{display:flex!important;flex-direction:column!important;height:48px!important;min-height:48px!important;margin:0 0 4px!important;padding:0!important}
${S} .eqs-st-feature{display:flex!important;align-items:flex-start!important;gap:5px!important;height:16px!important;overflow:hidden!important;white-space:nowrap!important;color:rgb(17,17,17)!important;font:12px/16px Arial,sans-serif!important}
${S} .eqs-st-dot{flex:0 0 10px!important;width:10px!important;color:rgb(67,131,70)!important}
${S} .eqs-st-meta{display:flex!important;flex-direction:column!important;height:51px!important;min-height:51px!important;margin:0 0 2px!important;padding:0!important;color:rgb(100,116,139)!important;font:11px/17px Arial,sans-serif!important}
${S} .eqs-st-meta > div{height:17px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
${S} .eqs-st-meta b{font-weight:600!important;color:rgb(71,85,105)!important}
${S} .eqs-st-meta .eqs-st-cat{font-weight:500!important;color:rgb(67,138,98)!important}
${S} .eqs-st-meta .eqs-st-code{letter-spacing:-.2px!important}
${S} .eqs-st-pricebar{display:flex!important;justify-content:space-between!important;align-items:flex-end!important;gap:5px!important;height:55px!important;min-height:55px!important;margin:0 0 10px!important;padding:0!important;box-sizing:border-box!important}
${S} .eqs-st-list{height:14px!important;margin:0 0 1px!important;color:rgb(71,84,103)!important;font:11px/14px Arial,sans-serif!important;white-space:nowrap!important}
${S} .eqs-st-list s{color:rgb(102,112,133)!important}
${S} .eqs-st-price{display:flex!important;align-items:flex-start!important;height:31px!important;color:rgb(67,133,74)!important;font:800 26px/31px Arial,sans-serif!important;letter-spacing:-.5px!important;white-space:nowrap!important}
${S} .eqs-st-cents{display:block!important;margin:1px 0 0 1px!important;font:800 12px/12px Arial,sans-serif!important;letter-spacing:0!important}
${S} .eqs-st-savings{margin:0 0 2px!important;text-align:right!important;color:rgb(100,116,139)!important;white-space:nowrap!important}
${S} .eqs-st-savings-label{font:600 9px/12px Arial,sans-serif!important}
${S} .eqs-st-savings-pct{font:500 13px/17px Arial,sans-serif!important}
${S} .buttons.group{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:7px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;text-align:left!important}
${S} .inputquantity{width:50px!important;min-width:50px!important;flex:0 0 50px!important;height:44px!important;padding:5px!important;border:.667px solid rgb(216,222,230)!important;border-radius:5px!important;background:#fff!important;text-align:center!important;font:16px Arial,sans-serif!important;margin:0!important}
${S} .live-inventory-v2-add-to-cart-wrapper{display:flex!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;height:44px!important;margin:0!important}
${S} .btn-add-to-cart{display:flex!important;align-items:center!important;justify-content:center!important;gap:5px!important;width:100%!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0 6px!important;background:rgb(0,128,0)!important;color:#fff!important;border:0!important;border-radius:5px!important;font:700 14px Arial,sans-serif!important;white-space:nowrap!important}
${S} .eqs-st-carticon{display:inline-flex!important;width:20px!important;height:20px!important;flex:0 0 20px!important}
${S} .eqs-st-carticon svg{width:20px!important;height:20px!important;fill:none!important;stroke:currentColor!important;stroke-width:2!important}
${S} .eqs-st-per{align-self:flex-end!important;margin:0 0 4px 7px!important;color:rgb(71,84,103)!important;font:600 12px/14px Arial,sans-serif!important;letter-spacing:0!important;white-space:nowrap!important}
${S} .eqs-st-brandrow .brand-label:has(img[alt*="National Public" i]){max-width:112px!important;flex:0 0 112px!important}
${S} .eqs-st-brandrow .brand-label:has(img[alt*="National Public" i]) a{width:100%!important}
${S} .eqs-st-brandrow .brand-label img[alt*="National Public" i]{width:112px!important;height:auto!important;max-height:none!important;max-width:none!important}
${S} .eqs-st-brandrow .brand-label:has(img[alt*="Global" i]),${S} .eqs-st-brandrow .brand-label:has(img[src*="Global" i]){max-width:none!important;flex:0 0 auto!important;overflow:visible!important}
${S} .eqs-st-brandrow .brand-label:has(img[alt*="Global" i]) a,${S} .eqs-st-brandrow .brand-label:has(img[src*="Global" i]) a{overflow:visible!important}
${S} .eqs-st-brandrow .brand-label img[alt*="Global" i],${S} .eqs-st-brandrow .brand-label img[src*="Global" i]{max-height:46px!important;height:46px!important;width:auto!important;max-width:none!important;margin:-8px 0 -1px -8px!important;position:relative!important;z-index:1!important}
`;
document.head.append(style);
// ---- Helpers ----
const money = n => '$' + Number(n).toLocaleString('en-US', { minimumFractionDigits: 2, maximumFractionDigits: 2 });
const el = (tag, cls, text) => { const e = document.createElement(tag); if (cls) e.className = cls; if (text != null) e.textContent = text; return e; };
const skuOf = card => (card.dataset.sku || '').trim().toUpperCase();
const deliveryFor = sku => (DELIVERY.find(([re]) => re.test(sku)) || [null, ''])[1];
function nativePrice(card) {
const label = card.querySelector('.footer-wrapper-price .price-label');
if (!label) return NaN;
const raw = label.getAttribute('data-value');
let v = raw != null && raw.trim() !== '' ? Number(raw) : NaN;
if (!Number.isFinite(v)) {
const m = (label.textContent || '').replace(/,/g, '').match(/\$\s*(\d+(?:\.\d{1,2})?)/);
v = m ? Number(m[1]) : NaN;
}
return v;
}
const state = { runs: 0, errors: [], unknown: new Set(), skipped: new Set() };
function build(card, sku, d) {
const q = s => card.querySelector(s);
const desc = q('.footer-wrapper-description');
const fw = q('.footer-wrapper');
const nativeP = q('.footer-wrapper-price');
const button = q('.btn-add-to-cart');
const img = q('.product-tile-image img');
if (!desc || !fw || !nativeP || !button) return false;
// Clean up P11 leftovers
card.classList.remove('eqs-p11');
card.querySelectorAll('.eqs-p542-description,.eqs-p3-collection').forEach(n => n.remove());
// Brand row
let row = q('.eqs-st-brandrow') || q('.eqs-p542-brandrow');
if (!row) row = el('div');
row.className = 'eqs-st-brandrow';
row.querySelector('.eqs-p542-delivery')?.remove();
const logo = q('.brand-label');
if (logo && logo.parentElement !== row) row.prepend(logo);
let del = row.querySelector('.eqs-st-delivery');
if (!del) { del = el('div', 'eqs-st-delivery'); del.innerHTML = TRUCK + ''; row.append(del); }
del.querySelector('span').textContent = deliveryFor(sku);
if (row.parentElement !== desc || desc.firstChild !== row) desc.prepend(row);
// Title (links to the product page)
const href = q('.product-name a')?.getAttribute('href') || q('.product-tile-image')?.getAttribute('href') || '#';
let title = q('.eqs-st-title');
if (!title) { title = el('a', 'eqs-st-title'); row.after(title); }
title.setAttribute('href', href);
title.textContent = d[0];
title.title = d[0];
// Bullets
let feats = q('.eqs-st-features');
if (!feats) { feats = el('div', 'eqs-st-features'); title.after(feats); }
feats.replaceChildren(...[d[1], d[2], d[3]].map(t => {
const f = el('div', 'eqs-st-feature');
f.append(el('span', 'eqs-st-dot', '\u2022'), el('span', 'eqs-st-copy', t));
return f;
}));
// Category / Collection / Item Code
const rawCat = (q('.product-category a')?.textContent || '').replace(/\s+/g, ' ').trim();
const cat = CATEGORY_LABEL[rawCat] || rawCat || 'Storage';
let meta = q('.eqs-st-meta');
if (!meta) { meta = el('div', 'eqs-st-meta'); feats.after(meta); }
const r1 = el('div'); r1.append(el('b', '', 'Category: '), el('span', 'eqs-st-cat', cat));
const r2 = el('div'); r2.append(el('b', '', 'Collection: '), el('span', '', d[4]));
const r3 = el('div'); r3.append(el('b', '', 'Item Code: '), el('span', 'eqs-st-code', sku));
meta.replaceChildren(r1, r2, r3);
// Price bar
let bar = q('.eqs-st-pricebar');
if (!bar) {
bar = el('div', 'eqs-st-pricebar');
const left = el('div', 'eqs-st-left');
left.append(el('div', 'eqs-st-list'), el('div', 'eqs-st-price'));
const sav = el('div', 'eqs-st-savings');
sav.append(el('div', 'eqs-st-savings-label', 'Emerald Savings'), el('div', 'eqs-st-savings-pct'));
bar.append(left, sav);
fw.insertBefore(bar, nativeP);
}
// Cart icon
if (!button.querySelector('.eqs-st-carticon')) {
button.querySelector('.eqs-p542-carticon')?.remove();
const icon = el('span', 'eqs-st-carticon'); icon.innerHTML = CART; button.prepend(icon);
}
// Image sizing
if (img) {
const t = `translate(${d[7]}px,${d[8]}px) scale(${d[6]})`;
if (img.style.getPropertyValue('transform') !== t) img.style.setProperty('transform', t, 'important');
}
card.dataset.eqsSeat = sku;
card.classList.add('eqs-st');
return true;
}
function updatePrice(card, sku, d) {
const bar = card.querySelector('.eqs-st-pricebar');
if (!bar) return;
const sell = nativePrice(card);
const list = Number(d[5]);
const pack = (card.dataset.packUom || '').trim().toUpperCase();
const uom = (card.querySelector('.footer-wrapper-price .uomvalue')?.textContent || '').replace(/[\s/]/g, '').toUpperCase();
const disc = list > 0 && sell > 0 ? (1 - sell / list) * 100 : NaN;
const ok = Number.isFinite(disc) && disc >= MIN_DISCOUNT && pack === 'EA' && (!uom || uom === 'EA');
const listEl = bar.querySelector('.eqs-st-list');
const priceEl = bar.querySelector('.eqs-st-price');
const sav = bar.querySelector('.eqs-st-savings');
const perSet = PER_SET[sku] || 0;
const key = sell + '|' + (ok ? 1 : 0) + '|' + perSet;
if (bar.dataset.key === key) return;
bar.dataset.key = key;
if (sell > 0) {
const [whole, cents] = money(sell).split('.');
priceEl.replaceChildren(document.createTextNode(whole + '.'), el('span', 'eqs-st-cents', cents));
if (perSet) priceEl.append(el('span', 'eqs-st-per', perSet === 'set' ? 'per set' : (typeof perSet === 'string' ? perSet : 'per set of ' + perSet)));
} else {
priceEl.replaceChildren();
}
if (ok) {
listEl.replaceChildren(document.createTextNode('List Price: '), el('s', '', money(list)));
listEl.style.visibility = '';
sav.querySelector('.eqs-st-savings-pct').textContent = Math.round(disc) + '% off list';
sav.style.visibility = '';
} else {
listEl.replaceChildren();
listEl.style.visibility = 'hidden';
sav.style.visibility = 'hidden';
}
sav.style.display = perSet && !ok ? 'none' : '';
}
function run() {
state.runs++;
observer.disconnect();
try {
for (const card of document.querySelectorAll('.griditems ' + CARD)) {
const sku = skuOf(card);
const d = DATA[sku];
if (!d) { state.unknown.add(sku); continue; }
try {
if (card.dataset.eqsSeat !== sku || !card.querySelector('.eqs-st-title')) {
if (!build(card, sku, d)) { state.skipped.add(sku); continue; }
} else {
const img = card.querySelector('.product-tile-image img');
const t = `translate(${d[7]}px,${d[8]}px) scale(${d[6]})`;
if (img && img.style.getPropertyValue('transform') !== t) img.style.setProperty('transform', t, 'important');
}
updatePrice(card, sku, d);
} catch (e) {
if (state.errors.length < 20) state.errors.push(sku + ': ' + e.message);
}
}
} finally {
observer.observe(document.body, { childList: true, subtree: true, characterData: true, attributes: true, attributeFilter: ['data-value', 'src'] });
}
}
// Debounced (timer-based, so it also works in background tabs)
let timer = 0, first = 0, burst = [];
function schedule() {
const now = Date.now();
if (!first) first = now;
clearTimeout(timer);
const wait = now - first > 600 ? 0 : 120;
timer = setTimeout(() => {
first = 0;
burst = burst.filter(t => now - t < 10000);
if (burst.length >= 30) return; // safety brake
burst.push(now);
run();
}, wait);
}
const observer = new MutationObserver(muts => {
for (const m of muts) {
const t = m.target.nodeType === 1 ? m.target : m.target.parentElement;
if (!t) continue;
if (t.closest?.('.eqs-st-title,.eqs-st-features,.eqs-st-meta,.eqs-st-pricebar,.eqs-st-brandrow')) continue;
if (t.closest?.('.griditems') || [...(m.addedNodes || [])].some(n => n.nodeType === 1 && (n.matches?.(CARD) || n.querySelector?.(CARD)))) {
schedule(); return;
}
}
});
run();
const boot = setInterval(() => { if (document.querySelector('.griditems ' + CARD)) run(); }, 400);
setTimeout(() => clearInterval(boot), 8000);
window.EQS_ST = {
active: true,
version: VERSION,
rescan: run,
status: () => {
const cards = [...document.querySelectorAll('.griditems ' + CARD)];
return {
version: VERSION,
nativeCards: cards.length,
styledCards: cards.filter(c => c.classList.contains('eqs-st')).length,
withSavings: cards.filter(c => c.querySelector('.eqs-st-savings') && c.querySelector('.eqs-st-savings').style.visibility !== 'hidden').length,
cartButtons: cards.filter(c => c.querySelector('.btn-add-to-cart')).length,
unknownSkus: [...state.unknown],
skipped: [...state.skipped],
errors: state.errors.slice(),
runs: state.runs
};
},
remove: () => {
observer.disconnect(); clearInterval(boot); clearTimeout(timer);
style.remove();
document.querySelectorAll('.eqs-st').forEach(c => c.classList.remove('eqs-st'));
delete window.EQS_ST;
console.info('[EQS SEATING] Removed. Refresh to restore the original cards.');
}
};
console.info('[EQS SEATING]', VERSION, 'installed');
})();