{"version":3,"names":["$","pauseClickHandler","addClass","removeClass","trigger","focus","playClickHandler","customAnimationDuration","each","AnimationDurationMobile","this","attr","AnimationDurationDesktop","window","width","css","document","ready","videos","querySelectorAll","observer","IntersectionObserver","entries","forEach","entry","video","isIntersecting","target","getAttribute","src","removeAttribute","unobserve","observe","initLazyLoadForVideos","click","e","on","event","preventDefault","keyCode","which","resize","jQuery","analytics","eventConfig","push","codeId","events","eventTarget","eventType","tags","componentId","componentName","destinationUrl","elementText","elementType","parentName","rule","value"],"sources":["assets/feature/pagecontent/SocialMediaTicker/js/_SocialMediaTicker.js"],"sourcesContent":["(function ($) {\r\n function pauseClickHandler() {\r\n $('.ticker_pause_wrapper').addClass('btn_hide');\r\n $('.ticker_play_wrapper').removeClass('btn_hide');\r\n\r\n $('.ticker_new').addClass('stop_tikcer');\r\n\r\n $('.ticker-video').trigger('pause');\r\n $('#tickerplay').focus();\r\n }\r\n\r\n function playClickHandler() {\r\n $('.ticker_play_wrapper').addClass('btn_hide');\r\n $('.ticker_pause_wrapper').removeClass('btn_hide');\r\n\r\n $('.ticker_new').removeClass('stop_tikcer');\r\n $('.ticker-video').trigger('play');\r\n $('#tickerpause').focus();\r\n }\r\n\r\n function customAnimationDuration() {\r\n if ($(\".ticker_Collection\")) {\r\n $(\".ticker_list\").each(function () {\r\n var AnimationDurationMobile = $(this).attr(\"data-animationSpeed-mobile\");\r\n var AnimationDurationDesktop = $(this).attr(\"data-animationSpeed-desktop\");\r\n if (AnimationDurationMobile && AnimationDurationDesktop) {\r\n var screenWidth = $(window).width();\r\n if (screenWidth < 556) {\r\n $(this).css(\"animation-duration\", AnimationDurationMobile);\r\n }\r\n else {\r\n $(this).css(\"animation-duration\", AnimationDurationDesktop);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n\r\n function initLazyLoadForVideos() {\r\n const videos = document.querySelectorAll(\"video.ticker-video\");\r\n\r\n const lazyLoadVideo = (video) => {\r\n if (video.getAttribute('data-src')) {\r\n video.src = video.getAttribute('data-src');\r\n video.removeAttribute('data-src');\r\n }\r\n };\r\n\r\n const observer = new IntersectionObserver((entries, observer) => {\r\n entries.forEach(entry => {\r\n if (entry.isIntersecting) {\r\n lazyLoadVideo(entry.target);\r\n observer.unobserve(entry.target);\r\n }\r\n });\r\n });\r\n\r\n videos.forEach(video => {\r\n observer.observe(video);\r\n });\r\n }\r\n\r\n $(document).ready(function () {\r\n //ticker video lazy load\r\n initLazyLoadForVideos();\r\n\r\n customAnimationDuration();\r\n\r\n $('.ticker_pause_wrapper').click(function (e) {\r\n pauseClickHandler();\r\n });\r\n\r\n $('.ticker_play_wrapper').click(function (e) {\r\n playClickHandler();\r\n });\r\n\r\n $('.ticker_pause_wrapper').on(\"keydown\", function (event) {\r\n e.preventDefault();\r\n var keycode = (event.keyCode ? event.keyCode : event.which);\r\n if (keycode == '13') {\r\n pauseClickHandler();\r\n }\r\n });\r\n\r\n $('.ticker_play_wrapper').on(\"keydown\", function (event) {\r\n e.preventDefault();\r\n var keycode = (event.keyCode ? event.keyCode : event.which);\r\n if (keycode == '13') {\r\n playClickHandler();\r\n }\r\n });\r\n });\r\n\r\n $(window).resize(function () {\r\n customAnimationDuration();\r\n });\r\n})(window.jQuery);\r\n\r\n// GA for social link navigation\r\nanalytics.eventConfig.push(\r\n {\r\n \"target\": \".ticker_Collection\",\r\n \"codeId\": \"ticker\",\r\n \"events\": [\r\n {\r\n \"eventTarget\": \".ticker_social_link a[href*=\\\\http]\",\r\n \"eventType\": \"click\",\r\n \"tags\": {\r\n \"componentId\": \"si\",\r\n \"componentName\": \"social icon\",\r\n \"destinationUrl\": \"\",\r\n \"elementText\": \"\",\r\n \"elementType\": \"social icon\",\r\n \"event\": \"outbound\",\r\n \"eventType\": \"social icon outbound click\",\r\n \"parentName\": \"\",\r\n }\r\n },\r\n {\r\n \"eventTarget\": \".ticker_social_link a:not([href*=\\\\http])\",\r\n \"eventType\": \"click\",\r\n \"tags\": {\r\n \"componentId\": \"si\",\r\n \"componentName\": \"social icon\",\r\n \"destinationUrl\": \"\",\r\n \"elementText\": \"\",\r\n \"elementType\": \"social icon\",\r\n \"event\": \"navigation\",\r\n \"eventType\": \"social icon internal navigation click\",\r\n \"parentName\": \"\",\r\n }\r\n },\r\n {\r\n \"eventTarget\": \".ticker_btn button\",\r\n \"eventType\": \"click\",\r\n \"tags\": {\r\n \"componentId\": \"si\",\r\n \"componentName\": \"social icon\",\r\n \"destinationUrl\": \"\",\r\n \"elementText\": \"\",\r\n \"elementType\": \"social icon\",\r\n \"event\": \"video\",\r\n \"eventType\": [\r\n {\r\n \"rule\": \"$(context).hasClass('ticker_pause_wrapper')==1\",\r\n \"value\": \"social ticker pause button click\"\r\n },\r\n {\r\n \"rule\": \"$(context).hasClass('ticker_play_wrapper')==1\",\r\n \"value\": \"social ticker play button click\"\r\n },\r\n ],\r\n \"parentName\": \"\",\r\n }\r\n },\r\n ]\r\n },\r\n);"],"mappings":"CAAA,SAAWA,GACP,SAASC,IACLD,EAAE,yBAAyBE,SAAS,YACpCF,EAAE,wBAAwBG,YAAY,YAEtCH,EAAE,eAAeE,SAAS,eAE1BF,EAAE,iBAAiBI,QAAQ,SAC3BJ,EAAE,eAAeK,OACrB,CAEA,SAASC,IACLN,EAAE,wBAAwBE,SAAS,YACnCF,EAAE,yBAAyBG,YAAY,YAEvCH,EAAE,eAAeG,YAAY,eAC7BH,EAAE,iBAAiBI,QAAQ,QAC3BJ,EAAE,gBAAgBK,OACtB,CAEA,SAASE,IACDP,EAAE,uBACFA,EAAE,gBAAgBQ,MAAK,WACnB,IAAIC,EAA0BT,EAAEU,MAAMC,KAAK,8BACvCC,EAA2BZ,EAAEU,MAAMC,KAAK,+BACxCF,GAA2BG,IACTZ,EAAEa,QAAQC,QACV,IACdd,EAAEU,MAAMK,IAAI,qBAAsBN,GAGlCT,EAAEU,MAAMK,IAAI,qBAAsBH,GAG9C,GAER,CA0BAZ,EAAEgB,UAAUC,OAAM,YAxBlB,WACI,MAAMC,EAASF,SAASG,iB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