'use strict';(function(){function k(d,a,b){!b&&e(f,a)&&(d.collections.click=e(f,a));e(g,a)&&(d.collections.promotions={list:[e(b?g.concat(f):g,a)]});e(l,a)&&(d.collections.eventInfo=e(l,a));e(m,a)&&(d.collections.content=e(m,a))}function e(d,a){if(a){var b={};d.forEach(function(c){a[c]&&(b[c]=a[c],"linkURL"===c&&(b[c]=b[c].replace("{TRACKING_HOST_ORIGIN}",q)))});return b&&0===Object.keys(b).length&&Object.getPrototypeOf(b)===Object.prototype?null:b}return null}function r(d){d.forEach(function(a){a.isIntersecting&&
!n.includes(a.target)&&(n.push(a.target),window.dataLayerService.push(p.get(a.target)))})}var g="creativeName creativeSlot locationId promotionId promotionName type adId locationName".split(" "),f=["linkName","linkType","linkURL"],l=["eventAction","eventCategory","eventInteractionType"],m=["contentID","contentType","contentLabel"],n=[],p=new Map,q=window.location.origin;(function(){window.dataLayerService=window.dataLayerService||[];var d=new IntersectionObserver(r,{threshold:.5});document.querySelectorAll("[data-unified-navigation-impression]").forEach(function(a){d.observe(a);
var b=a.getAttribute("data-unified-navigation-impression");if(b&&(b=b?JSON.parse(decodeURIComponent(b)):void 0)&&0<Object.keys(b).length){var c={scenarioName:b.eventType||"General_Promotion_View",collections:{}};k(c,b,!0);p.set(a,c)}});document.querySelectorAll("[data-unified-navigation-click]").forEach(function(a){var b=a.getAttribute("data-unified-navigation-click");if(b){var c=b?JSON.parse(decodeURIComponent(b)):void 0;c&&0<Object.keys(c).length&&a.addEventListener("click",function(h){h={scenarioName:c.eventType||
"General_Navigation_Click",collections:{}};k(h,c);window.dataLayerService.push(h)})}})})()})();