301tCatalogGridContainer.classList.remove('t-catalog__grid-cont_hidden');302}303}304return;305}306307var slice = 1;308var customUrlParams = {};309// TODO ST-2949_2: implicit any on params, vars, this, and index access (TS7006, TS7005, TS7008, TS7034, TS2683, TS7053, TS7015)310// @ts-expect-error ST-2949_2311var optsBasedOnURL;312
// show loader in 1s setTimeout(function () { if (gridPreloader) { gridPreloader.classList.remove('t-catalog__grid-cont-preloader_hidden'); } }, 1000); // before load Products check url for filters params customUrlParams = t_catalog__paramsToObj(recid, options); // 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 if (customUrlParams[recid]) { // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 optsBasedOnURL = t_catalog__updateOptionsBasedOnUrl(options, customUrlParams, recid); if (optsBasedOnURL) { options = optsBasedOnURL; } } if (options.sidebar) { // add sidebar wrapper for a positioning purpose // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 var sidebar = rec.querySelector('.js-catalog-parts-select-container'); if (sidebar) { var el_sidebar = sidebar.querySelector('.t-catalog__sidebar'); if (!el_sidebar) { const wrappers = ` <div class="js-sidebar-parts"></div> <div class="js-sidebar-filters"></div> `; sidebar.insertAdjacentHTML('beforeend', wrappers); } if (rec && sidebar.classList.contains('t-catalog__sidebar_sticky')) { t_catalog_stickySidebarInit(rec); } if ( rec && (sidebar.classList.contains('t-catalog__sidebar_pos_hidden-left') || sidebar.classList.contains('t-catalog__sidebar_pos_hidden-right')) ) { t_catalog_hiddenSidebarInit(rec); } } } var drawAllProductsGrid = function () { // 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 if (customUrlParams[recid] && customUrlParams[recid].page) { // Check if page is in URLParams // Data could be stored as array :( // @ts-expect-error ST-2949_2 slice = Array.isArray(customUrlParams[recid].page) ? // @ts-expect-error ST-2949_2 customUrlParams[recid].page.join('') : // @ts-expect-error ST-2949_2 customUrlParams[recid].page; } // draw all products grid // TODO ST-2949_5: assignability, arguments, calls, return types (TS2345, TS2322, TS2554, TS2769, TS2740, TS2739, TS2353, TS2349, TS2355, TS2366, TS2774, TS18046) // @ts-expect-error ST-2949_5 t_catalog_loadProducts('', recid, options, slice); t_catalog_mobileHoriz_checkBtnVisibility(recid, options); }; var onLoadFilters = function () { // 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 if (customUrlParams[recid] && optsBasedOnURL) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 rec.addEventListener('controlsDrawn', function () { // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) // @ts-expect-error ST-2949_4 t_catalog_filters_render_selected(options, recid); }); } if (options.sidebar) { // TODO ST-2949_3: null / undefined (TS18047, TS18048, TS2531, TS2722, TS2454, TS2538) // @ts-expect-error ST-2949_3 rec.addEventListener('controlsDrawn', function () { // TODO ST-2949_4: cannot find name / missing jQuery types (TS2304, TS2592) // @ts-expect-error ST-2949_4