{"version":3,"sources":["category.ts"],"names":["$","on","e","itemID","this","data","undefined","catItems","selectItem","item_id","item_name","affiliation","price","discount","subscription","item_brand","item_category","index","item_list_id","item_list_name","event_items","stopDLPush","clicked_item","dataLayer","push","ecommerce","event","items"],"mappings":"aAAAA,EAAE,WACEA,EAAE,SAAS,EAAEC,GAAG,QAAS,SAAUC,GAC/B,IAAMC,EAAOH,EAAEI,IAAI,EAAEC,KAAK,QAAQ,EACXC,KAAAA,IAAnBC,SAASJ,IAcTK,WAbqB,CACjBC,QAASF,SAASJ,GAAQM,QAC1BC,UAAWH,SAASJ,GAAQO,UAC5BC,YAAaJ,SAASJ,GAAQQ,YAC9BC,MAAOL,SAASJ,GAAQS,MACxBC,SAAUN,SAASJ,GAAQU,SAC3BC,aAAcP,SAASJ,GAAQW,aAC/BC,WAAYR,SAASJ,GAAQY,WAC7BC,cAAcT,SAASJ,GAAQa,cAC/BC,MAAOV,SAASJ,GAAQc,MACxBC,aAAcX,SAASJ,GAAQe,aAC/BC,eAAgBZ,SAASJ,GAAQgB,cACrC,CACuB,CAE/B,CAAC,CACL,CAAC,EACD,IAAMZ,SAAS,GACTa,YAAc,GAChBC,WAAW,CAAA,EACf,SAASb,WAAWc,GACXD,aACDE,UAAUC,KAAK,CAAEC,UAAW,IAAK,CAAC,EAClCF,UAAUC,KAAK,CACXE,MAAO,cACPD,UAAW,CACPP,aAAcI,EAAaJ,aAC3BC,eAAgBG,EAAaH,eAC7BQ,MAAOL,CACX,CACJ,CAAC,GAELD,WAAW,CAAA,CACf","file":"../category.min.js","sourcesContent":["$(function () {\n $('.reveal').on('click', function (e) {\n const itemID=$(this).data('itemid');\n if (catItems[itemID]!==undefined){\n const clicked_item = {\n item_id: catItems[itemID].item_id,\n item_name: catItems[itemID].item_name,\n affiliation: catItems[itemID].affiliation,\n price: catItems[itemID].price,\n discount: catItems[itemID].discount,\n subscription: catItems[itemID].subscription,\n item_brand: catItems[itemID].item_brand,\n item_category:catItems[itemID].item_category,\n index: catItems[itemID].index,\n item_list_id: catItems[itemID].item_list_id,\n item_list_name: catItems[itemID].item_list_name,\n }\n selectItem(clicked_item);\n }\n })\n})\nconst catItems=[];\nconst event_items = [];\nlet stopDLPush=false;\nfunction selectItem(clicked_item: { item_id: string; item_name: string; affiliation: string; discount: number; price: number; index: number; item_brand: string; item_category: string; subscription: string; item_list_id: string; item_list_name: string; }){\n if (!stopDLPush){\n dataLayer.push({ ecommerce: null }); // Clear the previous ecommerce object.\n dataLayer.push({\n event: \"select_item\",\n ecommerce: {\n item_list_id: clicked_item.item_list_id,\n item_list_name: clicked_item.item_list_name,\n items: clicked_item\n }\n });\n }\n stopDLPush=true;\n}"]}