var wtbManager=function(){function e(t){var o=!1;return void 0!==t&&null!=t&&""!=t&&(o=!0),o}function r(t){var o={swaven:{},storeLocator:{}};return o.swaven.action=t.action,o.swaven.productId=void 0,o.swaven.productName=void 0,o.swaven.productVariant=void 0,o.storeLocator.city=void 0,o.storeLocator.zipCode=void 0,o.storeLocator.country=void 0,o.storeLocator.storeId=void 0,o.storeLocator.storeName=void 0, // Swaven V1 e(t.compat)&&t.compat||e(t.prd)?(console.log("Swaven V1 detected"),e(t.prd)&&(e(t.prd.pid)&&(o.swaven.productId=t.prd.pid),e(t.prd.pname)&&(o.swaven.productName=t.prd.pname),e(t.prd.ppckg)&&(o.swaven.productVariant=t.prd.ppckg)),e(t.store)&&(e(t.store.pr)&&(o.swaven.productPrice=t.store.pr),e(t.store.scity)&&(o.storeLocator.city=t.store.scity),e(t.store.szc)&&(o.storeLocator.zipCode=t.store.szc),e(t.store.country)&&(o.storeLocator.country=t.store.country),e(t.store.rid)&&(o.storeLocator.storeId=t.store.rid),e(t.store.rname)&&(o.storeLocator.storeName=t.store.rname))):(console.log("Swaven V2 detected"),e(t.product)&&(e(t.product.id)&&(o.swaven.productId=t.product.id),e(t.product.name)&&(o.swaven.productName=t.product.name),e(t.product.pkg)&&(o.swaven.productVariant=t.product.pkg),e(t.product.price)&&(o.swaven.productPrice=t.product.price)),e(t.store)&&(e(t.store.location)&&(e(t.store.location.country)&&(o.storeLocator.country=t.store.location.country),e(t.store.location.city)&&(o.storeLocator.city=t.store.location.city),e(t.store.location.zipCode)&&(o.storeLocator.zipCode=t.store.location.zipCode)),e(t.store.id)&&(o.storeLocator.storeId=t.store.id),e(t.store.name)&&(o.storeLocator.storeName=t.store.name)),e(t.retailer)&&(e(t.retailer.id)&&(o.storeLocator.storeId=t.retailer.id),e(t.retailer.name)&&(o.storeLocator.storeName=t.retailer.name))),o}return{init:function(){return o=t=null,document.head.getAttribute("data-countryCode")&&document.head.getAttribute("languageCode")&&(t=document.head.dataset.countrycode.toUpperCase(),o=document.head.dataset.languagecode.toLowerCase()+"-"+t),null!=o&&(window.swnDataLayer.locale=o),null!=t&&(window.swnDataLayer.country=t),function(){try{var o=window.swnDataLayer=window.swnDataLayer||{};o.appId="5d284114eef3d22b9475ff1e",o.eventBuffer=o.eventBuffer||[],o.loadBuffer=o.loadBuffer||[],o.push=o.push||function(t){o.eventBuffer.push(t)},o.load=o.load||function(t){o.loadBuffer.push(t)};var t=document.getElementsByTagName("script")[0],e=document.createElement("script");e.async=!0,e.src="//wtb-tag.swaven.com/scripts/"+o.appId+"/tag.min.js",t.parentNode.insertBefore(e,t)}catch(t){console.log(t)}}(),void(swnDataLayer.widget_callback=function(t){if(document.head.getAttribute("data-currencyCode")&&document.head.dataset.currencycode,"undefined"!=typeof track){if("dploy"==t.action){(e={swaven:{}}).swaven.action=t.action;var o={event:"storeLocatorOpen",interaction:e};track.push(o)}if("close"==t.action){(e={swaven:{}}).swaven.action=t.action;o={event:"storeLocatorClose",interaction:e};track.push(o)}if("clk"==t.action){o={event:"storeLocatorProductDetail",interaction:e=r(t)};track.push(o)}if("buy"==t.action){o={event:"storeLocatorEtailerClick",interaction:e=r(t)};track.push(o)}if("clkloc"==t.action){o={event:"storeLocatorViewInfo",interaction:e=r(t)};track.push(o)}if("clkRoute"==t.action){o={event:"storeLocatorGetDirections",interaction:e=r(t)};track.push(o)}if("geoloc"==t.action){var e;o={event:"storeLocatorSearchSubmission",interaction:e=r(t)};track.push(o)}}});var t,o}}};wtbM=wtbManager(),wtbM.init();