PageSourceSearch

https://www.alterabrand.com/wp-content/plugins/themesky/js/themesky.js?ver=1.2.0

js alterabrand.com collected 2026-10-08 03:23:36 UTC 23,317 bytes, 684 lines download raw bytes

1jQuery(function($){
2	"use strict";
3	
4	ts_register_carousel( null, $ );
5	
6	/* Elementor Lazy Load */
7	if( $('.ts-elementor-lazy-load').length ){
8		var ts_elementor_lazy_load_loaded_widget = []; /* prevent double load same widget */
9		$(window).on('scroll ts_elementor_lazy_load', function(){
10			var scroll_top = $(this).scrollTop();
11			var window_height = $(this).height();
12			var number_request = 0;
13			$('.ts-elementor-lazy-load:not(.loaded)').each(function(i, e){
14				if( $(e).offset().top > scroll_top + window_height + 600 ){
15					return false;
16				}
17				var timeout = number_request * 200 + 10; /* dont show many requests same time */
18				number_request++;
19				var el = $(e);
20				var widget_id = el.closest('.elementor-element[data-id]').attr('data-id');
21				var widget = $('.elementor-element[data-id="' + widget_id + '"]'); /* may added many */
22				widget.find('.ts-elementor-lazy-load').addClass('loaded');
23				var post_id = el.parents('[data-elementor-id]').attr('data-elementor-id');
24				
25				setTimeout(function(){
26					if( ts_elementor_lazy_load_loaded_widget.includes( widget_id ) ){
27						return;
28					}
29					ts_elementor_lazy_load_loaded_widget.push( widget_id );
30					
31					$.ajax({
32						type : "POST",
33						timeout : 30000,
34						url : themesky_params.ajax_uri,
35						data : {action: 'ts_elementor_lazy_load', widget_id: widget_id, post_id: post_id},
36						error: function(xhr,err){
37							
38						},
39						success: function( response ){
40							if( response ){
41								widget.replaceWith( response.data );
42								
43								/* Generate slider */
44								_ts_generate_slider_timeout = false;
45								ts_register_carousel( null, $ );
46								
47								widget = $('.elementor-element[data-id="' + widget_id + '"]'); /* new widget */
48								/* Countdown */
49								if( widget.find('.counter-wrapper').length ){
50									ts_counter( widget.find('.counter-wrapper') );
51								}
52								
53								/* Blog Masonry */
54								if( widget.find('.ts-blogs-wrapper.ts-masonry').length ){
55									ts_register_masonry( null, $ );
56								}
57								
58								/* Tabs shop more button */
59								var el_tabs = widget.find('.ts-product-in-category-tab-wrapper');
60								if( el_tabs.length ){
61									ts_product_in_category_tab_shop_more_handle( el_tabs, el_tabs.data('atts') );
62								}
63								
64								$(window).trigger('ts_elementor_lazy_load_loaded', [widget_id]);
65							}
66						}
67					});
68				}, timeout);
69			});
70		});
71		
72		if( $('#main .ts-elementor-lazy-load').length && $('#main .ts-elementor-lazy-load:first').offset().top < $(window).scrollTop() + $(window).height() ){
73			$(window).trigger('ts_elementor_lazy_load');
74		}
75		
76		if( $('.menu-item.ts-megamenu .ts-elementor-lazy-load').length ){
77			$('.menu-item.ts-megamenu').on('mouseenter', function(){
78				$(window).trigger('ts_elementor_lazy_load');
79			});
80		}
81	}
82	
83	/*** Load Products In Category Tab ***/
84	var ts_product_in_category_tab_data = [];
85	
86	/* Change tab */
87	$(document).on('click', '.ts-product-in-category-tab-wrapper .column-tabs .tab-item, .ts-product-in-product-type-tab-wrapper .column-tabs .tab-item', function(){
88		var element = $(this).parents('.ts-product-in-category-tab-wrapper');
89		var is_product_type_tab = false;
90		if( element.length == 0 ){
91			element = $(this).parents('.ts-product-in-product-type-tab-wrapper');
92			is_product_type_tab = true;
93		}
94		
95		var element_top = element.offset().top;
96		if( element_top > $(window).scrollTop() ){
97			var admin_bar_height = $('#wpadminbar').length > 0?$('#wpadminbar').outerHeight():0;
98			var sticky_height = $('.is-sticky .header-sticky').length > 0?$('.is-sticky .header-sticky').outerHeight():0;
99			$('body, html').animate({
100				scrollTop: element_top - sticky_height - admin_bar_height - 20
101			}, 500);
102		}
103		
104		if( $(this).hasClass('current') || element.find('.column-products').hasClass('loading') ){
105			return;
106		}
107		
108		element.removeClass('generated-slider');
109		
110		var element_id = element.attr('id');
111		var atts = element.data('atts');
112		if( !is_product_type_tab ){
113			var product_cat = $(this).data('product_cat');
114			var shop_more_link = $(this).data('link');
115			var is_general_tab = $(this).hasClass('general-tab')?1:0;
116		}
117		else{
118			var product_cat = atts.product_cats;
119			var is_general_tab = 0;
120			atts.product_type = $(this).data('product_type');
121			element.find('.column-products').removeClass('recent sale featured best_selling top_rated mixed_order').addClass(atts.product_type);
122		}
123		
124		if( !is_product_type_tab && element.find('a.shop-more-button').length > 0 ){
125			element.find('a.shop-more-button').attr('href', shop_more_link);
126		}
127		
128		element.find('.column-tabs .tab-item').removeClass('current');
129		$(this).addClass('current');
130		
131		/* Check cache */
132		var tab_data_index = element_id + '-' + product_cat.toString().split(',').join('-');
133		if( is_product_type_tab ){
134			tab_data_index += '-' + atts.product_type;
135		}
136		if( ts_product_in_category_tab_data[tab_data_index] != undefined ){
137			element.find('.column-products .products').remove();
138			element.find('.column-products').append( ts_product_in_category_tab_data[tab_data_index] ).hide().fadeIn(600);
139			
140			/* Shop more button handle */
141			if( !is_product_type_tab ){
142				ts_product_in_category_tab_shop_more_handle( element, atts );
143			}
144			
145			/* Generate slider */
146			ts_register_carousel( element.parent(), $ );
147			
148			$(window).trigger('ts_product_name_min_height');
149			
150			return;
151		}
152		
153		element.find('.column-products').addClass('loading');
154		
155		$.ajax({
156			type : "POST",
157			timeout : 30000,
158			url : themesky_params.ajax_uri,
159			data : {action: 'ts_get_product_content_in_category_tab', atts: atts, product_cat: product_cat, is_general_tab: is_general_tab},
160			error: function(xhr,err){
161				
162			},
163			success: function(response) {
164				if( response ){
165					element.find('.column-products .products').remove();
166					element.find('.column-products').append( response ).hide().fadeIn(600);
167					
168					/* save cache */
169					if( element.find('.counter-wrapper').length == 0 ){
170						ts_product_in_category_tab_data[tab_data_index] = response;
171					}
172					else{
173						ts_counter( element.find('.counter-wrapper') );
174					}
175					/* Shop more button handle */
176					if( !is_product_type_tab ){
177						ts_product_in_category_tab_shop_more_handle( element, atts );
178					}
179					/* Generate slider */
180					ts_register_carousel( element.parent(), $ );
181					
182					$(window).trigger('ts_product_name_min_height');
183				}
184				element.find('.column-products').removeClass('loading');
185			}
186		});
187	});
188	
189	function ts_product_in_category_tab_shop_more_handle(element, atts){
190		var hide_shop_more = element.find('.hide-shop-more').length;
191		element.find('.hide-shop-more').remove();
192		
193		if( element.find('.tab-item.current').hasClass('general-tab') && atts.show_shop_more_general_tab == 0 ){
194			hide_shop_more = true;
195		}
196		
197		if( element.find('.products .product').length == 0 ){
198			hide_shop_more = true;
199		}
200		
201		if( atts.show_shop_more_button == 1 ){
202			if( hide_shop_more ){
203				element.find('.shop-more').addClass('hidden');
204				element.removeClass('has-shop-more-button');
205			}
206			else{
207				element.find('.shop-more').removeClass('hidden');
208				element.addClass('has-shop-more-button');
209			}
210		}
211	}
212	
213	$('.ts-product-in-category-tab-wrapper').each(function(){
214		var element = $(this);
215		var atts = element.data('atts');
216		ts_product_in_category_tab_shop_more_handle( element, atts );
217	});
218	
219	/*** Blog Shortcode ***/
220	$(document).on('click', '.ts-blogs-wrapper a.load-more', function(){
221		var element = $(this).parents('.ts-blogs-wrapper');
222		var atts = element.data('atts');
223		
224		var is_masonry = typeof $.fn.isotope == 'function' && element.hasClass('ts-masonry') ? true : false;
225		
226		var button = $(this);
227		if( button.hasClass('loading') ){
228			return false;
229		}
230		
231		button.addClass('loading');
232		var paged = button.attr('data-paged');
233		var total_pages = button.attr('data-total_pages');
234		
235		$.ajax({
236			type : "POST",
237			timeout : 30000,
238			url : themesky_params.ajax_uri,
239			data : {action: 'ts_blogs_load_items', paged: paged, atts : atts},
240			error: function(xhr,err){
241				
242			},
243			success: function(response) {
244				if( paged == total_pages ){
245					button.parent().remove();
246				}
247				else{
248					button.removeClass('loading');
249					button.attr('data-paged', ++paged);
250				}
251				if( response != 0 && response != '' ){
252					if( is_masonry ){										
253						element.find('.blogs').isotope('insert', $(response));
254						setTimeout(function(){
255							element.find('.blogs').isotope('layout');
256						}, 500);
257					}
258					else{
259						element.find('.blogs').append(response);
260					}
261					
262					ts_register_carousel( element.parent(), $ );
263				}
264				else{ /* No results */
265					button.parent().remove();
266				}
267			}
268		});
269		
270		return false;
271	});
272	
273	/*** Counter ***/
274	ts_counter( $('.product .counter-wrapper, .ts-countdown .counter-wrapper') );
275	
276	/*** Widgets ***/
277	
278	/* Product Categories widget */
279	$('.ts-product-categories-widget .icon-toggle').on('click', function(){
280		var parent_li = $(this).parent('li.cat-parent');
281		if( !parent_li.hasClass('active') ){
282			parent_li.addClass('active');
283			parent_li.find('ul.children:first').slideDown();
284		}
285		else{
286			parent_li.find('ul.children').slideUp();
287			parent_li.removeClass('active');
288			parent_li.find('li.cat-parent').removeClass('active');
289		}
290	});
291	
292	$('.ts-product-categories-widget').each(function(){
293		var element = $(this);
294		element.find('ul.children').parent('li').addClass('cat-parent');
295		element.find('li.current.cat-parent > .icon-toggle').trigger('click');
296		element.find('li.current').parents('ul.children').siblings('.icon-toggle').trigger('click');
297	});
298	
299	$('.ts-product-categories-widget .all-categories > span').on('click', function(){
300		$(this).toggleClass('active');
301		$(this).siblings().slideToggle();
302	});
303	
304	/* Product Filter By Availability */
305	$('.product-filter-by-availability-wrapper > ul input[type="checkbox"]').on('change', function(){
306		$(this).parent('li').siblings('li').find('input[type="checkbox"]').attr('checked', false);
307		var val = '';
308		if( $(this).is(':checked') ){
309			val = $(this).val();
310		}
311		var form = $(this).closest('ul').siblings('form');
312		if( val != '' ){
313			form.find('input[name="stock"]').val(val);
314		}
315		else{
316			form.find('input[name="stock"]').remove();
317		}
318		form.submit();
319	});
320	
321	/* Product Filter By Price */
322	$('.product-filter-by-price-wrapper li').on('click', function(){
323		var form = $(this).parent().siblings('form');
324		if( !$(this).hasClass('chosen') ){
325			var min_price = $(this).data('min');
326			var max_price = $(this).data('max');
327			
328			if( min_price !== '' ){
329				form.find('input[name="min_price"]').val(min_price);
330			}
331			else{
332				form.find('input[name="min_price"]').remove();
333			}
334			if( max_price !== '' ){
335				form.find('input[name="max_price"]').val(max_price);
336			}
337			else{
338				form.find('input[name="max_price"]').remove();
339			}
340		}
341		else{
342			form.find('input[name="min_price"]').remove();
343			form.find('input[name="max_price"]').remove();
344		}
345		form.submit();
346	});
347	
348	/* Product Filter By Brand */
349	$('.product-filter-by-brand-wrapper ul input[type="checkbox"]').on('change', function(){
350		var wrapper = $(this).parents('.product-filter-by-brand-wrapper');
351		var query_type = wrapper.find('> .query-type').val();
352		var checked = $(this).is(':checked');
353		var val = new Array();
354		if( query_type == 'or' ){
355			wrapper.find('ul input[type="checkbox"]').attr('checked', false);
356			if( checked ){
357				$(this).off('change');
358				$(this).attr('checked', true);
359				val.push( $(this).val() );
360			}
361		}
362		else{
363			wrapper.find('ul input[type="checkbox"]:checked').each(function(index, ele){
364				val.push( $(ele).val() );
365			});
366		}
367		val = val.join(',');
368		var form = wrapper.find('form');
369		if( val != '' ){
370			form.find('input[name="prod_brand"]').val( val );
371		}
372		else{
373			form.find('input[name="prod_brand"]').remove();
374		}
375		form.submit();
376	});
377});
378
379function zeroise( str, max ){
380	str = str.toString();
381	return str.length < max ? zeroise('0' + str, max) : str;
382}
383
384function ts_set_cookie( name, value, attributes ){
385	if( typeof attributes.expires === 'number' ){
386		attributes.expires = new Date(Date.now() + attributes.expires * 24 * 60 * 60 * 1000);
387	}
388	if( attributes.expires ){
389		attributes.expires = attributes.expires.toUTCString();
390	}
391	
392	var stringified_attributes = '';
393	
394	for( var attribute_name in attributes ){
395		if( !attributes[attribute_name] ){
396			continue;
397		}
398
399		stringified_attributes += ';' + attribute_name;
400
401		if( attributes[attribute_name] === true ){
402			continue;
403		}
404		
405		stringified_attributes += '=' + attributes[attribute_name];
406	}
407	
408	document.cookie = name + '=' + encodeURIComponent(value) + stringified_attributes;
409}
410
411function ts_get_cookie( name ){
412	if( typeof name === 'undefined' ){
413		return;
414	}
415	
416	var cookies = document.cookie ? document.cookie.split('; ') : [];
417	for( var i = 0; i < cookies.length; i++ ){
418		var parts = cookies[i].split('=');
419		if( name == parts[0] ){
420			return decodeURIComponent(parts[1]);
421		}
422	}
423
424	return '';
425}
426
427function ts_counter( elements ){
428	if( elements.length ){
429		var interval = setInterval(function(){
430			elements.each(function(index, element){
431				var wrapper = jQuery(element);
432				var second = parseInt( wrapper.find('.seconds .number').text() );
433				if( second > 0 ){
434					second--;
435					second = ( second < 10 )? zeroise(second, 2) : second.toString();
436					wrapper.find('.seconds .number').text(second);
437					return;
438				}
439				
440				var delta = 0;
441				var time_day = 60 * 60 * 24;
442				var time_hour = 60 * 60;
443				var time_minute = 60;
444				
445				var day = parseInt( wrapper.find('.days .number').text() );
446				var hour = parseInt( wrapper.find('.hours .number').text() );
447				var minute = parseInt( wrapper.find('.minutes .number').text() );
448				
449				if( day != 0 || hour != 0  || minute != 0 || second != 0 ){
450					delta = (day * time_day) + (hour * time_hour) + (minute * time_minute) + second;
451					delta--;
452					
453					day = Math.floor(delta / time_day);
454					delta -= day * time_day;
455					
456					hour = Math.floor(delta / time_hour);
457					delta -= hour * time_hour;
458					
459					minute = Math.floor(delta / time_minute);
460					delta -= minute * time_minute;
461					
462					second = delta > 0?delta:0;
463					
464					day = ( day < 10 )? zeroise(day, 2) : day.toString();
465					hour = ( hour < 10 )? zeroise(hour, 2) : hour.toString();
466					minute = ( minute < 10 )? zeroise(minute, 2) : minute.toString();
467					second = ( second < 10 )? zeroise(second, 2) : second.toString();
468					
469					wrapper.find('.days .number').text(day);
470					wrapper.find('.hours .number').text(hour);
471					wrapper.find('.minutes .number').text(minute);
472					wrapper.find('.seconds .number').text(second);
473				}
474				
475			});
476		}, 1000);
477	}
478}
479
480class TS_Carousel{
481	register( $scope, $ ){
482		var carousel = this;
483		
484		/* [wrapper selector, slider selector, slider options (remove dynamic columns at last)] */
485		var data = [
486			['.ts-product-wrapper', '.products', { breakpoints:{0:{slidesPerView:1},320:{slidesPerView:2},610:{slidesPerView:3},700:{slidesPerView:4}} }]
487			,['.ts-product-deals-wrapper', '.products', { breakpoints:{0:{slidesPerView:1},320:{slidesPerView:2},610:{slidesPerView:3},810:{slidesPerView:4}} }]
488			,['.ts-product-category-wrapper', '.products', { breakpoints:{0:{slidesPerView:1},440:{slidesPerView:2},610:{slidesPerView:3},700:{slidesPerView:4}} }]
489			,['.ts-product-brand-wrapper', '.content-wrapper', { breakpoints:{0:{slidesPerView:1},300:{slidesPerView:2},690:{slidesPerView:3}} }]
490			,['.ts-products-widget-wrapper', null, { spaceBetween: 10, breakpoints:{0:{slidesPerView:1}} }]
491			,['.ts-blogs-wrapper', '.content-wrapper > .blogs', { breakpoints:{0:{slidesPerView:1},570:{slidesPerView:2},790:{slidesPerView:3}} }]
492			,['.ts-logo-slider-wrapper', '.items', { breakpoints:{0:{slidesPerView:1},300:{slidesPerView:2},400:{slidesPerView:3},640:{slidesPerView:4},840:{slidesPerView:5}} }]
493			,['.ts-team-members', '.items', { breakpoints:{0:{slidesPerView:1},350:{slidesPerView:2},690:{slidesPerView:3}} }]
494			,['.ts-instagram-wrapper', '.items', { spaceBetween: 0, breakpoints: {0:{slidesPerView:1},320:{slidesPerView:2},500:{slidesPerView:3},640:{slidesPerView:4},840:{slidesPerView:5}} }]
495			,['.ts-testimonial-wrapper', '.items', { breakpoints:{0:{slidesPerView:1},521:{slidesPerView:2},960:{slidesPerView:3}} }]
496			,['.ts-blogs-widget-wrapper', null, { spaceBetween: 10, breakpoints: {0:{slidesPerView:1}} }]
497			,['.ts-recent-comments-widget-wrapper', null, { spaceBetween: 10, breakpoints: {0:{slidesPerView:1}} }]
498			,['.ts-product-in-category-tab-wrapper, .ts-product-in-product-type-tab-wrapper', '.products', { breakpoints:{0:{slidesPerView:1},320:{slidesPerView:2},610:{slidesPerView:3},700:{slidesPerView:4}} }]
499			,['.ts-blogs-wrapper .thumbnail.gallery', 'figure', { autoplay: true, effect: 'fade', spaceBetween: 10, simulateTouch: false, allowTouchMove: false, breakpoints:{0:{slidesPerView:1}} }]
500		];
501		
502		$.each(data, function(index, value){
503			carousel.run( value, $ );
504		});
505	}
506	
507	run( data, $ ){
508		$(data[0]).each(function(index){
509			if( ! $(this).hasClass('ts-slider') || $(this).hasClass('generated-slider') ){
510				return;
511			}
512			$(this).addClass('generated-slider');
513			
514			var element = $(this);
515			var show_nav = typeof element.attr('data-nav') != 'undefined' && element.attr('data-nav') == 1?true:false;
516			var show_dots = typeof element.attr('data-dots') != 'undefined' && element.attr('data-dots') == 1?true:false;
517			var auto_play = typeof element.attr('data-autoplay') != 'undefined' && element.attr('data-autoplay') == 1?true:false;
518			var columns = typeof element.attr('data-columns') != 'undefined'?parseInt(element.attr('data-columns')):5;
519			var disable_responsive = typeof element.attr('data-disable_responsive') != 'undefined' && element.attr('data-disable_responsive') == 1?true:false;
520			var prev_nav_text = typeof element.attr('data-prev_nav_text') != 'undefined'?element.attr('data-prev_nav_text'):'';
521			var next_nav_text = typeof element.attr('data-next_nav_text') != 'undefined'?element.attr('data-next_nav_text'):'';
522				
523			if( typeof data[1] != 'undefined' && data[1] != null ){
524				var swiper = element.find(data[1]);
525			}
526			else{
527				var swiper = element;
528			}
529			
530			if( swiper.find('> *').length <= 1 ){
531				element.removeClass('loading').find('.loading').removeClass('loading');
532				return;
533			}
534			
535			var unique_class = 'swiper-' + Math.floor(Math.random() * 10000) + '-' + index;
536			
537			swiper.addClass('swiper ' + unique_class);
538			swiper.find('> *').addClass('swiper-slide');
539			swiper.wrapInner('<div class="swiper-wrapper"></div>');
540			
541			if( $('body').hasClass('rtl') ){
542				swiper.attr('dir', 'rtl');
543			}
544			
545			var slider_options = {
546					loop: true
547					,spaceBetween: 0
548					,breakpointsBase: 'container'
549					,breakpoints:{0:{slidesPerView:1},320:{slidesPerView:2},580:{slidesPerView:3},810:{slidesPerView:columns}}
550					,on: {
551						init: function(){
552							element.removeClass('loading').find('.loading').removeClass('loading');
553						}
554					}
555				};
556			
557			if( show_nav ){
558				swiper.append('<div class="swiper-button-prev">' + prev_nav_text + '</div><div class="swiper-button-next">' + next_nav_text + '</div>');
559				
560				slider_options.navigation = {
561					prevEl: '.swiper-button-prev'
562					,nextEl: '.swiper-button-next'
563				};
564			}
565			
566			if( show_dots ){
567				swiper.append('<div class="swiper-pagination"></div>');
568				
569				slider_options.pagination = {
570					el: '.swiper-pagination'
571					,clickable: true
572				};
573			}
574			
575			if( auto_play ){
576				slider_options.autoplay = {
577					delay: 5000
578					,disableOnInteraction: false
579					,pauseOnMouseEnter: true
580				};
581			}
582			
583			if( typeof data[2] != 'undefined' && data[2] != null ){
584				$.extend( slider_options, data[2] );
585				
586				if( typeof data[2].breakpoints != 'undefined' ){ /* change breakpoints => add dynamic columns at last */
587					switch( data[0] ){
588						case '.ts-product-deals-wrapper':
589						case '.ts-blogs-wrapper':
590						case '.ts-product-wrapper':
591							if( element.hasClass('show-counter') ){
592								slider_options.breakpoints = {0:{slidesPerView:1},340:{slidesPerView:2},690:{slidesPerView:3}};
593							}
594							slider_options.breakpoints[1200] = {slidesPerView:columns};
595						break;
596						case '.ts-product-category-wrapper':
597						case '.ts-product-brand-wrapper':
598							slider_options.breakpoints[810] = {slidesPerView:columns};
599							if( element.hasClass('style-simple') ){
600								 slider_options.breakpoints = {0:{slidesPerView:1},340:{slidesPerView:2},610:{slidesPerView:3},700:{slidesPerView:4},810:{slidesPerView:columns}};
601							}
602						break;
603						case '.ts-team-members':
604							slider_options.breakpoints[810] = {slidesPerView:columns};
605						break;
606						case '.ts-testimonial-wrapper':
607							slider_options.breakpoints[1000] = {slidesPerView:columns};
608						break;
609						case '.ts-instagram-wrapper':
610							slider_options.breakpoints[1170] = {slidesPerView:columns};
611						break;
612						case '.ts-product-in-category-tab-wrapper, .ts-product-in-product-type-tab-wrapper':
613							slider_options.breakpoints[1200] = {slidesPerView:columns};
614							if( element.hasClass('item-layout-list') ){
615								slider_options.breakpoints = {0:{slidesPerView:1},620:{slidesPerView:2},1200:{slidesPerView:columns}};
616							}
617						break;
618						default:
619					}
620				}
621			}
622			
623			if( element.hasClass('use-logo-setting') ){ /* Product Brands - Logos */
624				var break_point = element.data('break_point');
625				var item = element.data('item');
626				if( break_point.length > 0 ){
627					slider_options.breakpoints = {};
628					for( var i = 0; i < break_point.length; i++ ){
629						slider_options.breakpoints[break_point[i]] = {slidesPerView: item[i]};
630					}
631				}
632			}
633			
634			if( disable_responsive ){
635				slider_options.breakpoints = {0:{slidesPerView:columns}};
636			}
637			
638			if( columns == 1 ){
639				slider_options.breakpoints = {0:{slidesPerView:1},320:{slidesPerView:2},700:{slidesPerView:3}};
640			}
641			
642			new Swiper( '.' + unique_class, slider_options );
643		});
644	}
645}
646
647var _ts_generate_slider_timeout = true;
648function ts_register_carousel( $scope, $ ){
649	var carousel = new TS_Carousel();
650	
651	if( _ts_generate_slider_timeout ){
652		setTimeout(function(){
653			carousel.register( $scope, $ );
654		}, 100);
655	}
656	else{
657		carousel.register( $scope, $ );
658	}
659}
660
661function ts_register_masonry( $scope, $ ){
662	if( typeof $.fn.isotope == 'function' ){
663		setTimeout(function(){
664			/* Blog */
665			$('.ts-blogs-wrapper.ts-masonry .blogs').isotope();
666			$('.ts-blogs-wrapper.ts-masonry').removeClass('loading');
667		}, 200);
668	}
669}
670
671jQuery(window).on('elementor/frontend/init', function(){
672	var elements = ['ts-products', 'ts-product-deals', 'ts-product-categories', 'ts-product-brands', 'ts-blogs'
673					,'ts-logos', 'ts-team-members', 'ts-testimonial'
674					,'ts-products-in-category-tabs', 'ts-products-in-product-type-tabs'
675					,'wp-widget-ts_products', 'wp-widget-ts_blogs', 'wp-widget-ts_recent_comments', 'wp-widget-ts_instagram'];
676	jQuery.each(elements, function(index, name){
677		elementorFrontend.hooks.addAction( 'frontend/element_ready/' + name + '.default', ts_register_carousel );
678	});
679	
680	elements = ['ts-blogs'];
681	jQuery.each(elements, function(index, name){
682		elementorFrontend.hooks.addAction( 'frontend/element_ready/' + name + '.default', ts_register_masonry );
683	});
684});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.