{"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","stopDLPush","clicked_item","dataLayer","push","ecommerce","event","items"],"mappings":"aAAAA,EAAE,WACDA,EAAE,WAAW,EAAEC,GAAG,QAAS,SAAUC,GAC9B,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,CAElC,CAAC,CACF,CAAC,EAED,IAAMZ,SAAW,GACba,WAAW,CAAA,EACf,SAASZ,WAAWa,GACdD,aACJE,UAAUC,KAAK,CAAEC,UAAW,IAAK,CAAC,EAClCF,UAAUC,KAAK,CACdE,MAAO,cACPD,UAAW,CACVN,aAAcG,EAAaH,aAC3BC,eAAgBE,EAAaF,eAC7BO,MAAOL,CACR,CACD,CAAC,GAEFD,WAAW,CAAA,CACZ","file":"../category.min.js","sourcesContent":["$(function () {\n\t$('.itemLink').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\t})\n})\n\nconst catItems = []\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\tif (!stopDLPush) {\n\t\tdataLayer.push({ ecommerce: null }) // Clear the previous ecommerce object.\n\t\tdataLayer.push({\n\t\t\tevent: 'select_item',\n\t\t\tecommerce: {\n\t\t\t\titem_list_id: clicked_item.item_list_id,\n\t\t\t\titem_list_name: clicked_item.item_list_name,\n\t\t\t\titems: clicked_item\n\t\t\t}\n\t\t})\n\t}\n\tstopDLPush=true\n}"]}