5701function t_catalog_popup_updateLazyLoad() {5702// TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538)5703// @ts-expect-error ST-2949_35704if (window.lazy === 'y' || document.getElementById('allrecords').getAttribute('data-tilda-lazy') === 'yes') {5705t_catalog_onFuncLoad('t_lazyload_update', function () {5706// TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592)5707// @ts-expect-error ST-2949_45708t_lazyload_update();5709});5710}5711}
// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_closePopupKeyDown(e) { var isGalleryOldLib = document.body.classList.contains('t-zoomer__show'); if (isGalleryOldLib) return; var isGalleryNewLib = document.body.classList.contains('t-zoomer__active'); if (isGalleryNewLib) return; if (e.keyCode === 27) { t_catalog_closePopup(false); }}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_addPopupEvents(el) { // set close events // @ts-expect-error ST-2949_2 var popupOutsideClickEvent = function (e) { // @ts-expect-error ST-2949_2 if (e.target === this) { t_catalog_closePopup(false); } }; el.querySelector('.t-popup').removeEventListener('click', popupOutsideClickEvent); el.querySelector('.t-popup').addEventListener('click', popupOutsideClickEvent); var popupCloseClickEvent = function () { t_catalog_closePopup(false); }; var closeSelector = el.querySelector('.t-popup .js-catalog-product-navigation') ? '.t-popup .t-popup__close, .t-popup .js-catalog-close-text' : '.t-popup__close, .js-catalog-close-text'; Array.prototype.forEach.call(el.querySelectorAll(closeSelector), function (elem) { elem.removeEventListener('click', popupCloseClickEvent); elem.addEventListener('click', popupCloseClickEvent); }); document.addEventListener('keydown', t_catalog_closePopupKeyDown); // Change nav opacity on scroll var fadeStart = 30; var fadeUntil = 200; var fading = el.querySelectorAll('.t-popup__close-opacity-scroll'); if (!fading.length) { return; } // TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015) // @ts-expect-error ST-2949_2 var scrollNav = function (el) { var offset = el.scrollTop(), opacity; if (offset >= fadeUntil) { opacity = 1; } else if (offset <= fadeStart) { opacity = 0; } else { opacity = offset / fadeUntil; } fading.style.backgroundClor = 'rgba(255,255,255,' + opacity + ')'; }; el.querySelector('.t-popup').removeEventListener('scroll', scrollNav); el.querySelector('.t-popup').addEventListener('scroll', scrollNav);}// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)// @ts-expect-error ST-2949_2function t_catalog_resetNavStyles(recid) { var rec = document.getElementById('rec' + recid); // @ts-expect-error ST-2949_3 var nav = rec.querySelector('.t-popup .js-catalog-product-navigation .t-popup__close') || rec.querySelector('.t-popup__close'); // Reset navbar background color // @ts-expect-error ST-2949_3 if (nav.classList.contains('t-popup__close-solid')) { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551) // @ts-expect-error ST-2949_1 nav.style.backgroundColor = 'rgba(255,255,255,1)'; // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 } else if (nav.classList.contains('t-popup__close-opacity-scroll')) { // TODO ST-2949_1: missing properties on Window/DOM/data objects (TS2339, TS2551)