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ASC,UAAU,CACfC,OAAO,EACPC,SAAU,IACVC,OAAQ,GACRC,UAAU,EACVC,WAAW,EACXC,WAAY,QACZC,UAAU,IAEdR,SAASS,UAAU,8DACnBT,SAASU,IAAI,aAGrB,GAGJpD,EAAWC,MAvFa,CAwF5B,G","sources":["webpack://@whistleout/webui/./Areas/Articles/js/ArticleItem.js"],"sourcesContent":["/* globals Galleria */\n\n(function () {\n 'use strict';\n\n var page = wo$('#article');\n\n function main() {\n\n\n if (!page.length) return;\n\n var controller = {\n\n init: function () {\n var productArea = page.data('product-area');\n var id = page.data('id');\n\n controller.bindGalleria();\n\n WhistleOut.getAds(productArea);\n page.find('[data-comments-link]').off('click').click(function (e) {\n e.preventDefault();\n WhistleOut.scrollTo('#comments-wrapper');\n });\n\n page.find('[data-sticky_column]').stick_in_parent({\n inner_scrolling: false,\n parent: page.find('[data-sticky_parent]'),\n offset_top: 70,\n\n // HACK: Refresh explicitly every several ticks to solve problem with incorrect height calculation for the visible parent\n // Smaller value might introduce unnecessary performance overhead as it will call the recalculation more frequently\n recalc_every: 50\n });\n\n var ads = page.find('[data-ads]');\n if (ads.length > 0) {\n wo$.ajax({\n url: '/Ajax/Shared/Ad/ArticleAds?productArea=' + productArea + '&articleId=' + id,\n type: 'GET',\n success: function (result) {\n var $result = wo$(result);\n WhistleOut.applyPromoAds($result);\n ads.append($result);\n }\n });\n }\n\n page.find('a[href*=\"://amzn.to/\"], a[href*=\"://rover.ebay.com/rover\"]')\n .off('click')\n .on('click', function () {\n var anchor = wo$(this);\n var href = anchor.attr('href');\n var label = '';\n if (href.contains('://amzn.to/')) {\n label = 'Amazon';\n }\n else if (href.contains('://rover.ebay.com/rover')) {\n label = 'eBay';\n }\n WhistleOut.trackEvent('AffiliateLink', 'Click', label);\n });\n\n controller.registerNotifications();\n },\n\n registerNotifications: function () {\n WhistleOut.notifications.add(function (notification) {\n if (notification === 'AdsLoaded') {\n var bottom = page.find('[data-adplacement=\"ArticleBottom\"]');\n var sidebar = page.find('[data-adplacement=\"ArticleSideBar\"]');\n if (bottom.is(':visible') && sidebar.is(':visible')) {\n bottom.addClass('hidden-xs');\n }\n }\n });\n },\n\n bindGalleria: function () {\n if (wo$('.galleria').length) {\n Galleria.configure({\n debug: false,\n autoplay: 5000,\n height: 0.8,\n lightbox: true,\n imageCrop: true,\n transition: 'slide',\n showInfo: false\n });\n Galleria.loadTheme('/js/jquery/galleria/themes/classic/galleria.classic.min.js');\n Galleria.run('.galleria');\n }\n\n }\n };\n\n controller.init();\n };\n\n WhistleOut.initModule(import.meta.url, main);\n\n}());"],"names":["page","wo$","WhistleOut","initModule","import","length","controller","init","productArea","data","id","bindGalleria","getAds","find","off","click","e","preventDefault","scrollTo","stick_in_parent","inner_scrolling","parent","offset_top","recalc_every","ads","ajax","url","type","success","result","$result","applyPromoAds","append","on","href","this","attr","label","contains","trackEvent","registerNotifications","notifications","add","notification","bottom","sidebar","is","addClass","Galleria","configure","debug","autoplay","height","lightbox","imageCrop","transition","showInfo","loadTheme","run"],"sourceRoot":""}