// source --> https://fivestarmech.com/wp-content/plugins/kapp-core/widgets/instagram/assets/js/instagram-ajax.js?ver=f4c0cf52f4ef3335ceeca54b21202965 
﻿
/**
 * LOADS INSTAGRAM POSTS FROM INSTAGRAM'S API
 * @version 1.0
 */
(function ($) {

    "use strict";

    $(document).ready(function () {
        $.ajax({
            type: "get",
            url: kappIG.ajaxurl,
            data: { action: "get_ig_posts" },
            cache : true,
            success: function (response) {
                if (response.length > 0) {

                    try {
                        response = JSON.parse(response);
                        $(".ig-posts-wrapper").html("").hide(200);
                        $.each(response.data, function (key, post) {
                            kappIG.renderIGPost(post);
                        });
                        $(".ig-posts-wrapper").fadeIn(300);
                    } catch (ex) {
                        console.error(ex);
                    }

                }
            }

        });
    });

    kappIG.renderIGPost = function (post) {

        if (typeof post !== "undefined"){

            if ($(".ig-posts-wrapper").length > 1) {
                
                $(".ig-posts-wrapper").each(function () {
                    var wrapper = $('<div class="col-xs-4">');
                    var img = $("<img>");
                    $(img).attr({
                        "src": post.images.thumbnail.url
                    })
                    .appendTo(wrapper);
                    $(this).append(wrapper);
                });
                

            } else {

                var wrapper = $('<div class="col-xs-4">');
                var img = $("<img>");
                $(img).attr({
                    "src": post.images.thumbnail.url
                })
                .appendTo(wrapper);
                $(".ig-posts-wrapper").append(wrapper);
            }

            
        }
    }
})(jQuery);
// source --> https://fivestarmech.com/wp-content/plugins/g-business-reviews-rating/wp/js/js.js?ver=f4c0cf52f4ef3335ceeca54b21202965 
// JavaScript Document

function google_business_reviews_rating(e, i) {
	if (typeof e == 'undefined') {
		var e = null;
	}
	else if (typeof e == 'string' && e.match(/^[\d]+$/)) {
		e = parseInt(e);
	}
		
	if (typeof i == 'undefined') {
		var i = null;
	}
	else if (typeof i == 'string') {
		i = parseInt(i.replace(/[^\d]/, ''));
	}
	
	if ((typeof e == 'number' || typeof e == 'object' || typeof e == 'string') && typeof i == 'number') {
		if (typeof e == 'object') {
			e = jQuery('.google-business-reviews-rating').index(e);
		}
		else if (typeof e == 'string') {
			e = jQuery('.google-business-reviews-rating').index(jQuery('#' + e));
		}
		
		jQuery('.review-full-text:eq(0)', '.google-business-reviews-rating:eq(' + e + ') li:eq(' + i + ')').show();
		jQuery('.review-more-link:eq(0)', '.google-business-reviews-rating:eq(' + e + ') li:eq(' + i + ')').remove();
		return;
	}

	const observer = new IntersectionObserver(stars => {
			stars.forEach(item => {
				if (item.isIntersecting) {
					item.target.classList.add('animation-start');
					return;
				}

				item.target.classList.remove('animation-pause');
				return;
			});
		}, { threshold: 0.5 }),
		safari = (navigator.userAgent.match(/^((?!chrome|android).)*safari/i) != null);
	
	var stars_width_multiplier = null,
		rating = null,
		rating_width = null,
		clear_styles = (jQuery('#stylesheet-none').length && jQuery('#stylesheet-none').is(':checked')),
		star_html = false,
		star_css = false,
		star_inline = false,
		star_image = null,
		overall_link = null,
		reviews_window = null,
		view = null;

	jQuery('.google-business-reviews-rating').each(function(index) {
		var e = jQuery(this),
			view = (jQuery(this).hasClass('carousel') && typeof jQuery(this).data('view') == 'number' && jQuery(this).data('view') >= 1 && jQuery(this ).data('view') <= 50) ? jQuery(this).data('view') : null,
			star_html = (typeof jQuery(this).attr('class') == 'string' && (jQuery(this).hasClass('stars-html') || jQuery(this).attr('class').match(/\bversion[_-]?1\b/i))),
			star_css = (!star_html && typeof jQuery(this).attr('class') == 'string' && (jQuery(this).hasClass('stars-css') || jQuery(this).hasClass('stars-gray-css'))),
			star_inline = (!star_html && !star_css && typeof jQuery(e).data('stars') == 'string' && jQuery(e).data('stars').match(/^inline|inline$/i) != null),
			star_color = (!star_html && !star_css && !star_inline && (typeof jQuery(e).data('stars') == 'string' || typeof jQuery(e).data('stars-gray') == 'string')),
			stars_width_multiplier = 0.196,
			rating = (jQuery('.number', this).length) ? parseFloat(jQuery('.number:eq(0)', this).text().replace(/,/g, '.').replace(/(\d+(?:\.\d+)?)/, '$1')) : null,
			overall_link = (typeof jQuery(this).data('href') == 'string' && jQuery(this).data('href').length && !jQuery('.buttons', this).length && (!jQuery('.listing', this).length || jQuery('.listing', this).length && !jQuery('.listing > *', this).length)) ? jQuery(this).data('href') : null;
		
		if (clear_styles) {
			jQuery(this).removeAttr('class');
		}
		else if ((typeof jQuery(this).attr('id') != 'string' || !jQuery(this).attr('id').length)) {
			jQuery(this).attr('id', 'google-business-reviews-rating' + ((index > 1) ? '-' + index : ''));
		}
		
		if (!clear_styles && jQuery(this).hasClass('no-styles')) {
			jQuery(this).removeAttr('class');
		}
		
		if (jQuery(this).hasClass('link')) {
			if (overall_link != null) {
				jQuery(this).on('click', { overall_link: overall_link }, function(event) {
					if (!jQuery(event.target).is('a')) {
						event.preventDefault();
						event.stopPropagation();
						if (event.data.overall_link.match(/^\/.*$/)) {
							document.location.href = event.data.overall_link;
						}
						else {
							reviews_window = window.open(event.data.overall_link, '_blank');
							reviews_window.focus();
						}
						return false;
					}
				});
			}
			else {
				jQuery(this).removeClass('link');
			}
			
			jQuery(this).removeData('href').removeAttr('data-href');
		}

		if (this.getAttribute('data-animate') == 'immediate') {
			this.querySelector(':scope .all-stars.animate').classList.add('animation-start');
		}
		else if (this.querySelector(':scope .all-stars.animate') != null) {
			observer.observe(this.querySelector(':scope .all-stars.animate'));
		}

		if (!star_html && jQuery('.star', jQuery('.all-stars', e)).length) {
			if (star_css) {
				if (!jQuery('.rating-stars', e).length) {
					jQuery('.all-stars', e).append('<span class="rating-stars star temporary" style="display: none;">.</span>');
				}
				
				if (!jQuery('.star.gray', e).css('color')) {
					jQuery('.all-stars', e).append('<span class="star gray temporary" style="display: none;">.</span>');
				}
				
				if (typeof jQuery('.star.gray', e).css('color') == 'string' && !jQuery('.rating-stars', e).css('color').match(/^(?:#(?:F7B\d0\d|E7711B)|rgba?\s*\(23[12],\s*11[34],\s*2[78](?:,\s*1(?:\.0+)?)?\))$/i)) {
					jQuery(e).data('stars', jQuery('.rating-stars', e).css('color'));
					star_color = true;
				}
				
				if (typeof jQuery('.star.gray', e).css('color') == 'string' && (!jQuery(e).hasClass('dark') && !jQuery('.star.gray', e).css('color').match(/^(?:#(?:A4A4A4|C1C1C1|C9C9C9)|rgba?\s*\(193,\s*193,\s*193(?:,\s*1(?:\.0+)?)?\))$/i) || jQuery(e).hasClass('dark') && !jQuery('.star.gray', e).css('color').match(/^(?:#B4B4B4|rgba?\s*\(180,\s*180,\s*180(?:,\s*0?\.8)?\))$/i))) {
					jQuery(e).data('stars-gray', jQuery('.star.gray', e).css('color'));
					star_color = true;
				}
				
				if (jQuery('.temporary', jQuery('.all-stars', e)).length) {
					jQuery('.temporary', jQuery('.all-stars', e)).remove();
				}
			}
			
			if (star_color && (typeof jQuery(e).data('stars') == 'string' && jQuery(e).data('stars').length && !jQuery(e).data('stars').match(/^#(?:F7B\d0\d|E7711B)$/i) || typeof jQuery(e).data('stars-gray') == 'string' && jQuery(e).data('stars-gray').length && !jQuery(e).data('stars-gray').match(/^#(?:A4A4A4|C1C1C1|C9C9C9)$/i))) {
				if (star_css && (typeof jQuery(e).data('stars-gray') != 'string' || typeof jQuery(e).data('stars-gray') == 'string' && jQuery(e).data('stars-gray') == 'css') && !jQuery('.star.gray', jQuery('.all-stars', e)).length) {
					jQuery('.all-stars', e).append('<span class="temporary" style="display: none;">.</span>');
				}
				
				jQuery('.star', jQuery('.all-stars', e)).each(function() {
					try {
						star_image = atob(jQuery(this).css('background-image').replace(/^url\(["']data:image\/svg\+xml;charset=UTF-8;base64,(.+)["']\)$/, '$1'));
						
						if (typeof jQuery(e).data('stars') == 'string' && jQuery(e).data('stars').length && !jQuery(e).data('stars').match(/^#(?:F7B\d0\d|E7711B)$/i)) {
							star_image = star_image.replace(/#(?:F7B\d0\d|E7711B)/g, jQuery(e).data('stars'));
						}
	
						if (typeof jQuery(e).data('stars-gray') == 'string' && jQuery(e).data('stars-gray').length && !jQuery(e).data('stars-gray').match(/^#(?:A4A4A4|C1C1C1|C9C9C9)$/i)) {
							star_image = star_image.replace(/#(?:A4A4A4|C1C1C1|C9C9C9)/g, jQuery(e).data('stars-gray'));
						}
	
						jQuery(this).css('background-image', 'url(\'data:image\/svg+xml;charset=UTF-8;base64,' + btoa(star_image) + '\')');
					}
					catch (err) {
						return;
					}
				});
			}
		}
		
		if (jQuery('.review-more-placeholder', e).length) {
			jQuery('.review-more-placeholder', e).each(function(more) {
				if (jQuery(this).siblings('.review-full-text').length && !jQuery(this).siblings('.review-full-text').html().length) {
					jQuery(this).parent().removeClass('text-excerpt');
					jQuery(this).siblings('.review-full-text').remove();
					jQuery(this).remove();
				}
				else if (jQuery(e).hasClass('js-links')) {
					jQuery(this).after('<a href="javascript:google_business_reviews_rating(' + index + ', ' + jQuery('li', jQuery(e)).index(jQuery(this).closest('li')) + ');" class="review-more-link">' + jQuery(this).html() + '</a>');
					jQuery(this).remove();
				}
				else {
					jQuery(this).after('<a href="#' + jQuery(e).attr('id') + '" class="review-more-link">' + jQuery(this).html() + '</a>');
					jQuery('.review-more-link', jQuery(this).parent()).on('click', function(event) {
						event.preventDefault();
						event.stopPropagation();
						jQuery(this).next('.review-full-text').show();
						
						if (view == null) {
							jQuery(this).remove();
							return false;
						}
	
						jQuery(this).hide();
						google_business_reviews_rating_carousel(this, null);
						return false;						
					});
					
					jQuery(this).remove();
				}
			});
		}
		
		if (jQuery('.fixed-height', e).length && jQuery(e).hasClass('bubble')) {
			jQuery('.text', e).each(function() {
				if (jQuery(this).prev().length && (jQuery(this).prev().hasClass('author-avatar') || jQuery(this).prev().hasClass('review-meta') && (jQuery('.author-name', jQuery(this).prev()).length))) {
					jQuery('.text', e).before('<span class="arrow arrow-up"></span>');
					return;
				}
				
				if (jQuery(this).next().length && (jQuery(this).next().hasClass('author-avatar') || jQuery(this).next().hasClass('review-meta') && (jQuery('.author-name', jQuery(this).next()).length))) {
					jQuery('.text', e).after('<span class="arrow arrow-down"></span>');
					return;
				}
            });
		}
		
		if (!star_html && !star_inline && jQuery('.all-stars', e).length && jQuery('.all-stars', e).hasClass('animate') && typeof rating == 'number' && rating > 1.5 && jQuery('.number:eq(0)', e).length) {
			jQuery('.all-stars', e)
				.after(jQuery('<span>')
					.addClass('all-stars')
					.addClass('backdrop')
					.css({
						width: Math.ceil(jQuery('.all-stars', e).width() + 0.1) + 'px',
						margin: (jQuery('body').hasClass('rtl')) ? '0 ' + (-1 * jQuery('.all-stars', e).width() - 0.1) + 'px 0 0' :'0 0 0 ' + (-1 * jQuery('.all-stars', e).width() - 0.1) + 'px' 
						})
					.html('<span class="star gray"></span><span class="star gray"></span><span class="star gray"></span><span class="star gray"></span><span class="star gray"></span>'));
					
			if (jQuery('.all-stars:eq(0)', e).position().top - jQuery('.all-stars.backdrop', e).position().top != 0) {
				jQuery('.all-stars.backdrop', e).css('margin-top', (jQuery('.all-stars:eq(0)', e).position().top - jQuery('.all-stars.backdrop', e).position().top) + 'px');
			}

			if (typeof jQuery(e).data('stars-gray') == 'string' && jQuery(e).data('stars-gray').length && !jQuery(e).data('stars-gray').match(/^#(?:A4A4A4|C1C1C1|C9C9C9)$/i)) {
				jQuery('.star', jQuery('.all-stars.backdrop', e)).each(function() {
					try {
						star_image = atob(jQuery(this).css('background-image').replace(/^url\(["']data:image\/svg\+xml;charset=UTF-8;base64,(.+)["']\)$/, '$1'));
						star_image = star_image.replace(/#(?:A4A4A4|C1C1C1|C9C9C9)/g, jQuery(e).data('stars-gray'));
						jQuery(this).css('background-image', 'url(\'data:image\/svg+xml;charset=UTF-8;base64,' + btoa(star_image) + '\')');
					}
					catch (err) {
						return;
					}
				});
			}

			jQuery('.star:last', jQuery('.all-stars:eq(0)', e)).on('webkitAnimationEnd oanimationend msAnimationEnd animationend', function(event) {
				if (jQuery('.all-stars.backdrop', e).length) {
					jQuery('.all-stars.backdrop', jQuery(this).closest('.rating')).fadeOut(300, function() { jQuery(this).remove(); });
				}
			});
			
			setTimeout(
				function(e) {
					if (jQuery('.all-stars.backdrop', e).length) {
						jQuery('.all-stars.backdrop', e).fadeOut(300, function() { jQuery(this).remove(); });
					}
				}, 4800, jQuery('.all-stars.backdrop', e).length);
		}
		else if (star_html && typeof rating == 'number') {
			if (safari) {
				jQuery('.all-stars', e).addClass('safari');
			}
				
			if (rating == 5) {
				setTimeout(
					function() {
							jQuery('.all-stars', e).css('color', 'rgba(0, 0, 0, 0)');
					}, 2400);
			}
			else if (rating == 0) {
				jQuery('.rating-stars', e).remove();
			}
			
			if (jQuery('.rating-stars', e) && jQuery('.all-stars', e).length) {
				if (typeof jQuery('.rating-stars', e).data('multiplier') == 'number') {
					stars_width_multiplier = jQuery('.rating-stars', e).data('multiplier');
				}
				
				rating_width = Math.round(jQuery('.all-stars', e).width() * rating * stars_width_multiplier + stars_width_multiplier * 0.05 * Math.sin(rating * 2 * Math.PI) + 0.5 * stars_width_multiplier * (Math.round(rating + 0.49) - rating));
				jQuery('.rating-stars', e).width(rating_width).css({ margin: (jQuery('body').hasClass('rtl')) ? '0 0 0 ' + (-1 * rating_width) + 'px' : '0 ' + (-1 * rating_width) + 'px 0 0' });
			}
		}
		
		if (view == null || view > jQuery('.listing', e).children().length) {
			return;
		}
		
		google_business_reviews_rating_carousel(e);
	});
	return;
}

function google_business_reviews_rating_carousel(e, i, auto) {
	if (typeof e != 'object') {
		return;
	}
	
	if (typeof i != 'number') {
		var i = (!jQuery(e).hasClass('google-business-reviews-rating') && !jQuery(this).hasClass('review-more-link') && jQuery(e).closest('.bullet').length) ? jQuery(e).closest('.bullet').index() : null;
	}
	
	if (typeof auto != 'boolean') {
		var auto = false;
	}
	
	e = (jQuery(e).hasClass('google-business-reviews-rating')) ? e : jQuery(e).closest('.google-business-reviews-rating');
	
	var view = (jQuery(e).hasClass('carousel') && typeof jQuery(e).data('view') == 'number' && jQuery(e).data('view') >= 1 && jQuery(e).data('view') <= 50) ? jQuery(e).data('view') : null,
		slide = (view != null && typeof jQuery(e).data('slide') == 'number' && jQuery(e).data('slide') >= 2) ? jQuery(e).data('slide') : 1,
		iterations = (view != null && typeof jQuery(e).data('loop') != 'number' && typeof jQuery(e).data('iterations') == 'number') ? jQuery(e).data('iterations') : null,
		loop = (view != null && typeof jQuery(e).data('loop') == 'number' && typeof jQuery(e).data('loop') || typeof jQuery(e).data('loop') == 'boolean') ? ((typeof jQuery(e).data('loop') == 'number' && jQuery(e).data('loop') < 1) ? true : jQuery(e).data('loop')) : ((iterations != null) ? Math.round(iterations * view) : false),
		loop_counter = (view != null && loop && typeof jQuery(e).data('counter') == 'number') ? jQuery(e).data('counter') : null,
		interval = (view != null && loop && typeof jQuery(e).data('interval') == 'number') ? jQuery(e).data('interval') : null,
		interval_id = (view != null && loop && typeof jQuery(e).data('interval-id') == 'number') ? jQuery(e).data('interval-id') : null,
		new_slide = (i != null) ? i + 1 : ((auto) ? slide + 1 : null),
		transition = (view != null && typeof jQuery(e).data('transition') == 'string') ? jQuery(e).data('transition') : null,
		transition_duration = (view != null && transition == 'string' && typeof jQuery(e).data('transition-duration') == 'number') ? jQuery(e).data('transition-duration') : null,
		bounds = null,
		list_area = [null, null, null, null],
		list_visible = view,
		list_width = 0,
		list_height = 0;
		
	if (view == null || new_slide != null && view > jQuery('.listing:eq(0)', e).children().length || auto && jQuery(e).is(':hover')) {
		return;
	}
	
	if (new_slide != null && (view < 1 || slide == new_slide || (!auto || auto && (typeof loop == 'boolean' && !loop || typeof loop == 'number' && (loop_counter != null && loop_counter > loop))) && (new_slide < 1 || new_slide > Math.ceil(jQuery('.listing:eq(0) > *', e).length / view)))) {
		if (auto && interval_id != null) {
			clearInterval(interval_id);
		};
		
		return;
	}
	
	if (auto && (new_slide < 1 || new_slide > Math.ceil(jQuery('.listing:eq(0) > *', e).length / view))) {
		new_slide = (new_slide < 1) ? Math.ceil(jQuery('.listing:eq(0) > *', e).length / view) : 1;
		
		if (!jQuery('.navigation', e).length) {
			jQuery(e).data('slide', new_slide);
		}
	}
	
	if (new_slide != null) {
		switch (transition)
		{
		default:
			jQuery('.listing:eq(0) > *', e).each(function(j) {
				if (Math.ceil((jQuery(this).data('index') + 1) / view) == slide) {
					if (jQuery('.review-more-link', this).length && jQuery('.review-full-text', this).length) {
						jQuery('.review-full-text', this).hide();
						jQuery('.review-more-link', this).show();
					}
	
					jQuery(this).removeClass('visible').addClass('hidden');
					return;
				}
				
				if (Math.ceil((jQuery(this).data('index') + 1) / view) == new_slide) {
					jQuery(this).removeClass('hidden').addClass('visible');
					return;
				}
			});
			
			break;
		}
		
		if (jQuery('.navigation', e).length) {
			jQuery('a:eq(' + (new_slide - 1) + ')', jQuery('.navigation', e)).parent().addClass('current').siblings().removeClass('current');
		}
		
		slide = new_slide;
		jQuery(e).data('slide', slide);
	}
	
	jQuery('.listing:eq(0) > .visible', e).each(function(j) {
		bounds = this.getBoundingClientRect();
		
		if (list_area[0] == null || list_area[0] > bounds.top) {
			list_area[0] = bounds.top;
		}
		
		if (list_area[1] == null || list_area[1] < bounds.right) {
			list_area[1] = bounds.right;
		}
		
		if (list_area[2] == null || list_area[2] < bounds.top) {
			list_area[2] = bounds.bottom;
		}
		
		if (list_area[3] == null || list_area[3] > bounds.right) {
			list_area[3] = bounds.left;
		}
	});
	
	if (list_area[0] != null && list_area[1] != null && list_area[2] != null && list_area[3] != null) {
		list_width = parseInt(list_area[1] - list_area[3]) + parseInt(jQuery('.listing:eq(0) > .visible:eq(0)', e).css('margin-left')) + parseInt(jQuery('.listing:eq(0) > .visible:last', e).css('margin-right'));
		list_height = parseInt(list_area[2] - list_area[0]) + parseInt(jQuery('.listing:eq(0) > .visible:eq(0)', e).css('margin-top')) + parseInt(jQuery('.listing:eq(0) > .visible:last', e).css('margin-bottom'));
		if (list_width == 0 || list_height == 0) {
			if (jQuery('.navigation', e)) {
				jQuery('a', jQuery('.navigation', e)).each(function() {
					jQuery(this).on('click', function(event) {
						event.preventDefault();
						event.stopPropagation();
					});
				});
			}
			
			if (typeof jQuery(e).data('reattempt') != 'number' || jQuery(e).data('reattempt') < 1) {
				interval_id = setTimeout(google_business_reviews_rating_carousel, 10, e);
				jQuery(e).data('reattempt', interval_id);
				return;
			}
			
			return;
		}
	}
	
	if (auto && typeof loop == 'number' && loop >= 1) {
		if (typeof loop_counter != 'number' || loop_counter < 1) {
			loop_counter = 1;
		}
		
		loop_counter++;
		jQuery(e).data('counter', loop_counter);
		
		if (auto && interval_id != null && typeof loop == 'number' && loop_counter > loop) {
			clearInterval(interval_id);
			return;
		};
	}
	
	if (typeof jQuery('.listing:eq(0)', e).data('initial-height') == 'number' || list_area[0] == null || list_height == 0) {
		return;
	}
	
	jQuery('.listing:eq(0)', e).data('initial-height', parseInt(list_height));
	
	if (jQuery('.navigation', e).length) {
		jQuery('a', jQuery('.navigation', e)).each(function(index) {
			jQuery(this).on('click', function(event) {
				event.preventDefault();
				event.stopPropagation();
				
				if (jQuery(this).hasClass('current')) {
					return;
				}
				
				google_business_reviews_rating_carousel(this)
			});
		});
	}
	
	if (!auto && interval_id == null && (typeof loop == 'boolean' && loop || typeof loop == 'number' && loop >= 1) && typeof interval == 'number' && interval >= 0.3 && interval <= 999) {
		interval_id = setInterval(google_business_reviews_rating_carousel, interval * 1000, e, null, true);
		jQuery(e).data('interval-id', interval_id);
	}
	
	if (typeof jQuery(e).data('draggable') == 'boolean' && !jQuery(e).data('draggable') || typeof jQuery(e).data('draggable') == 'number' && jQuery(e).data('draggable') <= 0) {
		return;
	}

	jQuery('.listing:eq(0)', e).on('touchstart', function(event) {
		var e = jQuery(this).closest('.google-business-reviews-rating'),
			click_start = event.originalEvent.touches[0].pageX,
			view = (jQuery(e).hasClass('carousel') && typeof jQuery(e).data('view') == 'number' && jQuery(e).data('view') >= 1 && jQuery(e).data('view') <= 50) ? jQuery(e).data('view') : null,
			slide = (view != null && typeof jQuery(e).data('slide') == 'number' && jQuery(e).data('slide') >= 2) ? jQuery(e).data('slide') : 1;
		
		jQuery(this).one('touchmove', function(event) {
			var move_x = event.originalEvent.touches[0].pageX,
				pixel_sensitivity = 7;
	
			if (!jQuery('body').hasClass('rtl') && Math.ceil(move_x - click_start) > pixel_sensitivity || jQuery('body').hasClass('rtl') && Math.ceil(click_start - move_x) > pixel_sensitivity) {
				if (!jQuery('.navigation', e).length) {
					if (slide <= 1) {
						return
					}
					
					google_business_reviews_rating_carousel(e, slide - 2);
					return;
				}
				if (jQuery('.current', jQuery('.navigation', e)).index() <= 0) {
					return;
				}				
				
				google_business_reviews_rating_carousel(jQuery('.current > a', jQuery('.navigation', e)), jQuery('.current', jQuery('.navigation', e)).index() - 1);
				return;
			}
			
			if (!jQuery('body').hasClass('rtl') && Math.ceil(click_start - move_x) > pixel_sensitivity || jQuery('body').hasClass('rtl') && Math.ceil(move_x - click_start) > pixel_sensitivity) {
				if (!jQuery('.navigation', e).length) {
					if (slide >= Math.ceil(jQuery('.listing:eq(0)', e).children().length/view)) {
						return
					}
					
					google_business_reviews_rating_carousel(e, slide);
					return;
				}
				
				if (jQuery('.current', jQuery('.navigation', e)).index() >= jQuery('.bullet', jQuery('.navigation', e)).length - 1) {
					return;
				}
				
				google_business_reviews_rating_carousel(jQuery('.current > a', jQuery('.navigation', e)), jQuery('.current', jQuery('.navigation', e)).index() + 1);
				return;
			}
			
		});
		
		jQuery(this).on('touchend', function() {
			jQuery(this).off('touchmove');
		});
	});	
	
	return;
}

function google_business_reviews_rating_actions(event) {
	if (!jQuery('.google-business-reviews-rating.carousel').length || event.type != 'keydown' || event.keyCode != 37 && event.keyCode != 39) {
		return;
	}
		
	var i = 0,
		bounds = null,
		active = false,
		view = null,
		slide = null;
	
	for (i = 0; i < 2; i++) {
		jQuery('.google-business-reviews-rating.carousel').each(function() {
			if (active || typeof jQuery(this).data('cursor') == 'boolean' && !jQuery(this).data('cursor') || typeof jQuery(this).data('cursor') == 'number' && jQuery(this).data('cursor') <= 0) {
				return false;
			}
			
			if (i == 0 && !jQuery(this).is(':hover') || !jQuery('.listing', this).length) {
				return;
			}
			
			bounds = this.querySelector('.listing').getBoundingClientRect();
			
			if (typeof bounds != 'object' || bounds.bottom < 0 || bounds.top > (window.innerHeight || document.documentElement.clientHeight)) {
				return;
			}
			
			active = true;
			view = (jQuery(this).hasClass('carousel') && typeof jQuery(this).data('view') == 'number' && jQuery(this).data('view') >= 1 && jQuery(this).data('view') <= 50) ? jQuery(this).data('view') : null;
			slide = (view != null && typeof jQuery(this).data('slide') == 'number' && jQuery(this).data('slide') >= 2) ? jQuery(this).data('slide') : 1;
					
			if (!jQuery('body').hasClass('rtl') && event.keyCode == 37 || jQuery('body').hasClass('rtl') && event.keyCode == 39) {
				if (!jQuery('.navigation', this).length) {
					if (slide <= 1) {
						return false;
					}
					
					google_business_reviews_rating_carousel(this, slide - 2);
					return;
				}
				if (jQuery('.current', jQuery('.navigation', this)).index() <= 0) {
					return false;
				}
				
				google_business_reviews_rating_carousel(jQuery('.current > a', jQuery('.navigation', this)), jQuery('.current', jQuery('.navigation', this)).index() - 1);
				return false;
			}
			
			if (!jQuery('body').hasClass('rtl') && event.keyCode == 39 || jQuery('body').hasClass('rtl') && event.keyCode == 37) {
				if (!jQuery('.navigation', this).length) {
					if (slide >= Math.ceil(jQuery('.listing:eq(0)', this).children().length/view)) {
						return false;
					}
					
					google_business_reviews_rating_carousel(this, slide);
					return;
				}
				
				if (jQuery('.current', jQuery('.navigation', this)).index() >= jQuery('.bullet', jQuery('.navigation', this)).length - 1) {
					return false;
				}
				
				google_business_reviews_rating_carousel(jQuery('.current > a', jQuery('.navigation', this)), jQuery('.current', jQuery('.navigation', this)).index() + 1);
				return false;
			}
			
			return false;
		});
	}
}

jQuery(document).ready(function($){
	google_business_reviews_rating();
	return;
});

jQuery(window).on('keydown', function(event) {
	google_business_reviews_rating_actions(event);
	return;
});
// source --> https://fivestarmech.com/wp-content/plugins/widget-google-reviews/assets/6.9.6/js/public-main.js 
var rpi=rpi||{};
rpi.Time={getFormatTime:function(a,e,c){a=new Date(this._ms(a));var m=c||"en";c=function(p){return 10>p?"0"+p:""+p};var f=a.getHours(),h=((new Intl.DateTimeFormat(m,{day:"numeric",month:"short"})).formatToParts(a).find(function(p){return"month"===p.type})||{}).value;m=(new Intl.DateTimeFormat(m,{day:"numeric",month:"long"})).formatToParts(a).find(function(p){return"month"===p.type}).value;var n=a.getFullYear(),l=String(n).slice(-2),g={yyyy:n,Y:n,yy:l,y:l,MMMM:m,MMM:h,M:h,MM:c(a.getMonth()+1),m:c(a.getMonth()+
1),dd:c(a.getDate()),d:c(a.getDate()),HH:c(f),H:f,hh:c(f%12||12),h:f%12||12,mm:c(a.getMinutes()),i:c(a.getMinutes()),ss:c(a.getSeconds()),s:c(a.getSeconds()),a:12<=f?"pm":"am",A:12<=f?"PM":"AM"};return e.replace(/(MMMM|MMM|yyyy|HH|hh|MM|mm|dd|ss|yy|H|h|M|m|d|Y|y|i|s|a|A)/g,p=>null!=g[p]?g[p]:p)},getTimeAgo:function(a,e){a=(this._ms(a)-Date.now())/1E3;var c=Math.abs(a);e=new Intl.RelativeTimeFormat(e||"en",{numeric:"auto"});return 60>c?e.format(Math.round(a),"second"):3600>c?e.format(Math.round(a/
60),"minute"):86400>c?e.format(Math.round(a/3600),"hour"):2592E3>c?e.format(Math.round(a/86400),"day"):31536E3>c?e.format(Math.round(a/2592E3),"month"):e.format(Math.round(a/31536E3),"year")},_ms:function(a){a=parseInt(a,10);return 1E10>a?1E3*a:a}};rpi=rpi||{};
rpi.Utils={__:function(a,e){return e&&e[a]||a},isVisible:function(a){let e=window.getComputedStyle(a);return!!(a.offsetWidth||a.offsetHeight||a.getClientRects().length)&&"hidden"!==e.visibility&&"none"!==e.display},isInViewport:function(a,e=0){a=a.getBoundingClientRect();return a.top<window.innerHeight*(1+e)&&a.bottom>-window.innerHeight*e&&a.left<window.innerWidth*(1+e)&&a.right>-window.innerWidth*e},isRTL:function(){return"rtl"==(window.getComputedStyle?window.getComputedStyle(document.body,null).getPropertyValue("direction"):
document.body.currentStyle.direction)},getParent:function(a,e="rplg"){e=Array.isArray(e)?e:[e];return a?a.closest("."+e.join(",.")):null},lang:function(){var a=navigator;return(a.language||a.systemLanguage||a.userLanguage||"en").substr(0,2).toLowerCase()},popup:function(a,e,c){var m=document.documentElement;a=window.open(a,"","scrollbars=yes, width="+e+", height="+c+", top="+((window.innerHeight?window.innerHeight:m.clientHeight?m.clientHeight:screen.height)/2-c/2+(void 0!=window.screenTop?window.screenTop:
window.screenY))+", left="+((window.innerWidth?window.innerWidth:m.clientWidth?m.clientWidth:screen.width)/2-e/2+(void 0!=window.screenLeft?window.screenLeft:window.screenX)));window.focus&&a.focus();return a},ajax:function(a,e,c,m){const f=new XMLHttpRequest;f.open(e,a,!0);f.setRequestHeader("Content-Type","application/json");f.onreadystatechange=function(){if((f.readyState===XMLHttpRequest.DONE||f.readyState===f.DONE)&&200===f.status){const h=JSON.parse(f.responseText);"function"===typeof m?m(h):
"function"===typeof c&&c(h)}};f.send(c&&"function"!==typeof c?JSON.stringify(c):null)},anchor:function(a,e,c,m,f){const h=[];c.open_link&&h.push("noopener");c.nofollow_link&&h.push("nofollow");return'<a href="'+a+'"'+(m?' class="'+m+'"':"")+(c.open_link?' target="_blank"':"")+(h.length?' rel="'+h.join(" ")+'"':"")+(f?' aria-label="'+f+'"':"")+">"+e+"</a>"},rm:function(a){a&&a.parentNode&&a.parentNode.removeChild(a)},capit:function(a){return a.charAt(0).toUpperCase()+a.slice(1)},url:function(a){try{return(new URL(a,
window.location.origin)).href}catch(e){return""}},clear:function(){this.rm(document.getElementById("rpi-style"));if(rpi.Instances)for(;rpi.Instances.length;)rpi.Instances.pop().clear()}};rpi=rpi||{};
rpi.Column=function(a,e,c){const m=a.getAttribute("data-id"),f=new RegExp(c.col+"-[xsml]+"),h=new RegExp('$|(\\[data-id="'+m+'"\\]\\s+.'+c.card+"\\s*{\\s*--col:\\s*\\d+\\s*!important\\s*;?(\\s*--gap:\\s*\\d+\\s*!important;?)?})"),n=a.getElementsByClassName(c.cnt)[0];var l=null;return l={init:function(g,p){rpi.Utils.isVisible(n)?(g&&g(),l.resize(),window.addEventListener("resize",l.resize),p&&p(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(l)):setTimeout(l.init,300)},resize:function(){let g=
l.getSize();n.className=n.className.replace(f,c.col+"-"+g);if(e.breakpoints){let p=n.offsetWidth,r=e.breakpoints.split(",");r.sort(l.brsort);for(let t=0;t<r.length;t++){let v=r[t].split(":");if(p<parseInt(v[0])){l.setCol(v[1]);break}}}return g},getSize:function(){let g=n.offsetWidth;return 510>g?"xs":750>g?"x":1050>g?"s":1450>g?"m":1800>g?"l":"xl"},setCol:function(g){const p=this.getStyle();p.innerHTML=p.innerHTML.replace(h,(m?'[data-id="'+m+'"] ':"")+"."+c.card+"{--col:"+g+"!important;--gap:"+(g-
1)+"!important}")},getCol:function(){let g=this.getStyle().innerHTML.match(/--col:\s*(\d+)/);return g&&1<g.length?g[1]:!1},getStyle:function(){let g=document.getElementById("rpi-style");g||(g=document.createElement("style"),g.id="rpi-style",document.head.appendChild(g));return g},setBreakpoints:function(g){e.breakpoints=g},brsort:function(g,p){return parseInt(g.split(":")[0])>parseInt(p.split(":")[0])?1:-1},clear:function(){window.removeEventListener("resize",l.resize)}}};rpi=rpi||{};rpi.AVA="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7";
rpi.Common=function(a,e,c){let m=null;const f=rpi.Utils.lang();return m={init(){let h=a.getElementsByClassName(c.time),n=a.getElementsByClassName(c.text);for(const l of h)m.setTime(l);for(const l of n)m.setText(l)},initOnce(h){let n=h.getElementsByClassName(c.time)[0];h=h.getElementsByClassName(c.text)[0];m.setTime(n);m.setText(h)},setText(h){if(h&&h.textContent){var n=m.trimtext(h.textContent);h.textContent=n[0];n[1]&&(h.appendChild(rpi.el({tag:"span",cl:"rpi-s",text:"... "})),h.appendChild(rpi.el({tag:"span",
cl:c.readmore,text:rpi.Utils.__("read more",e.trans),data:{hidden:n[1]}})),h.lastChild.onclick=m.opentext)}},trimtext(h){const n=parseInt(e.text_size,10);if(!h||!n||h.length<=n)return[h||"",""];h=Array.from(h);let l=h.slice(0,n).join("").lastIndexOf(" ");l=-1===l?n:l;return[h.slice(0,l).join("").trimEnd(),h.slice(l).join("")]},opentext(){let h=this.parentNode,n=this.dataset.hidden||"";rpi.Utils.rm(this.previousElementSibling);rpi.Utils.rm(this);h.appendChild(document.createTextNode(n))},setTime(h){h&&
(h.textContent=m.time(h.dataset.time))},time(h){return e.time_format?rpi.Time.getFormatTime(h,e.time_format,f):rpi.Time.getTimeAgo(h,f)}}};
rpi.el=function(a={},...e){const c=document.createElement("string"===typeof a?a:a.tag||"div");"string"!==typeof a&&(a.id&&(c.id=a.id),a.cl&&c.classList.add(...[].concat(a.cl).join(" ").split(/\s+/).filter(Boolean)),null!=a.text&&(c.textContent=a.text),a.data&&Object.assign(c.dataset,Object.fromEntries(Object.entries(a.data).filter(([,m])=>void 0!==m&&null!==m))),a.style&&(c.style.cssText=a.style),a.atts&&Object.keys(a.atts).forEach(m=>{const f=a.atts[m];null!==f&&void 0!==f&&!1!==f&&c.setAttribute(m,
f)}),a.html&&(c.innerHTML=a.html),e=a.children?[].concat(a.children).concat(e):e);e.flat().forEach(m=>{m&&c.appendChild(m instanceof Node?m:document.createTextNode(String(m)))});return c};rpi=rpi||{};
rpi.Media=function(a,e={},{root:c="rpi",card:m="rpi-card"}={}){let f,h=null,n=null;return n={init:function(){h=a.getElementsByClassName("rpi-thumb");for(let l=0;l<h.length;l++)h[l].setAttribute("data-idx",l),function(g,p){g.onclick=function(){n.show(g,p);return!1}}(h[l],l)},thumbs:function(l){if(Array.isArray(l)){var g=[];for(const p of l)l=document.createElement("img"),l.className="rpi-thumb rpi-clickable",l.src=p.thumbnailUrl,l.alt=rpi.Utils.__("Photo from customer review",e.trans),l.loading="lazy",
g.push(l);return g}},clicks:function(l){l=l.getElementsByClassName("rpi-thumb");for(let g=0;g<l.length;g++)(function(p,r){p.onclick=function(){let t=parseInt(p.getAttribute("data-idx"));n.show(h[t],t);return!1}})(l[g],g)},show:function(l,g){if(!(0>g||g>=h.length)){var p=l.src.replace(/=s[0-9]{1,3}/g,"=s500");l=(l=rpi.Utils.getParent(l,[m,"rpi-review"]))?l.outerHTML:"";if(f){let r=f.querySelector(".rpi-lightbox-media img"),t=f.querySelector(".rpi-lightbox-review"),v=f.querySelector(".rpi-lightbox-prev"),
d=f.querySelector(".rpi-lightbox-next");r.src=p;t.innerHTML!==l&&(t.innerHTML=l,n.clicks(t));v.onclick=function(u){n.show(h[g-1],g-1)};d.onclick=function(u){n.show(h[g+1],g+1)}}else f=document.createElement("div"),f.className="rpi-lightbox",f.innerHTML='<div class="rpi-x"></div><div class="rpi-lightbox-inner"><div class="rpi-lightbox-xxx"><div class="rpi-lightbox-content"><div class="rpi-lightbox-media"><div class="rpi-lightbox-btn rpi-lightbox-prev"></div><img src="'+p+'" alt=""><div class="rpi-lightbox-btn rpi-lightbox-next"></div></div><div class="'+
c+' rpi-lightbox-review">'+l+"</div></div></div></div>",p=f.querySelector(".rpi-x"),l=f.querySelector(".rpi-lightbox-prev"),next=f.querySelector(".rpi-lightbox-next"),p.onclick=function(){f.style.display="none"},f.onclick=function(r){f==r.target&&(f.style.display="none")},l.onclick=function(r){n.show(h[g-1],g-1)},next.onclick=function(r){n.show(h[g+1],g+1)},n.clicks(f),document.body.appendChild(f);f.style.display="flex"}}}};rpi=rpi||{};
rpi.Slider=function(a,e,c,m){a.getAttribute("data-id");const f=a.getElementsByClassName(c.cnt)[0],h=a.getElementsByClassName(c.content)[0],n=h?h.getElementsByClassName(c.cards)[0]:null,l=h?h.getElementsByClassName(c.dotsWrap)[0]:null,g=h?h.getElementsByClassName(c.dots)[0]:null,p=n?parseInt(n.getAttribute("data-count")):0,{autoplay:r=!0,speed:t=5,mousestop:v=!0}=e;var d=null,u=h?h.getElementsByClassName(c.card):null,E="",F="",A=null,y=null,x=null,B=null,C=!1,z=!1,D=0,G=0;return d={init:function(b,
k){rpi.Utils.isVisible(f)?(b&&b(),d.resize(),d.actions(),u.length&&d.swipeAutoStart(),k&&k(),rpi.Instances=rpi.Instances||[],rpi.Instances.push(d)):setTimeout(d.init,300)},resize:function(b){let k=m.column.resize(),q=m.column.getCol();b&&n.scrollLeft!=b*d.reviewWidth()&&n.scrollTo(u[b].offsetLeft,0);!u.length||E==k&&F==q||(d.hasDots()&&(d.dotsInit(),d.dotSwipe(b,!0)),E=k,F=q)},actions:function(){v&&d.addMouseEvents();window.addEventListener("resize",d.resizeListener);n&&(n.addEventListener("scroll",
d.scrollListener,!1),e.wheelscroll&&h.addEventListener("wheel",d.wheelListener,!1));var b=f.getElementsByClassName(c.btnPrev)[0];b&&(b.onclick=function(k){k.preventDefault();k.stopPropagation();d.btnClick(-1)});if(b=f.getElementsByClassName(c.btnNext)[0])b.onclick=function(k){k.preventDefault();k.stopPropagation();d.btnClick(1)}},resizeListener:function(){var b=G;clearTimeout(A);A=setTimeout(d.resize,150,b)},scrollListener:function(){clearTimeout(y);clearTimeout(x);x=setTimeout(d.scrollEnd,150)},
wheelListener:function(b){var k=b.target;if((k=-1<k.className.indexOf(c.text)?k:-1<k.parentNode.className.indexOf(c.text)?k.parentNode:null)&&k.scrollHeight>k.clientHeight)return!0;b.preventDefault();D++;clearTimeout(B);B=setTimeout(d.wheelEnd,150,b)},addMouseEvents:function(){f.addEventListener("mouseover",d.mouseOver,!1);f.addEventListener("mouseleave",d.mouseLeave,!1)},delMouseEvents:function(){f.removeEventListener("mouseover",d.mouseOver);f.removeEventListener("mouseleave",d.mouseLeave)},mouseOver:function(){C=
1;d.swipeAutoStop()},mouseLeave:function(){C=0;d.swipeAutoStart()},btnClick:function(b){d.swipeManual(b*d.swipePerBtn())},wheelEnd:function(b){d.swipeManual(Math.sign(b.wheelDelta)*D*d.swipeStep());D=0},scrollEnd:function(){G=d.reviewsIdx();z?z=!1:d.loadNextReviews();(!v||C)&&v||(!e.clickstop||z)&&e.clickstop||d.swipeAutoStart();d.hasDots()&&d.dotSwipe(void 0,!0)},loadNextReviews:function(b){b=b?d.reviewsIdx()+parseInt(b):d.hasDots()?(b=g.getElementsByClassName("active")[0])?parseInt(b.getAttribute("data-index"))*
d.swipePerDot():d.reviewsIdx():d.reviewsIdx();b=d.getAjaxSize(b);0<b&&m.view.loadNextReviews(b)},getAjaxSize:function(b){let k=0;const q=parseInt(n.getAttribute("data-offset")),w=parseInt(e.pagination);if(p>q){let H=b-q;Math.abs(H)<3*d.swipePerDot()?k=w:H&&(k=Math.ceil(b/w)*w-q)}b=q+k-p;return 0<b?k-b:k},dotsInit:function(){if(g){var b=Math.round(p/d.swipePerDot());g.innerHTML="";for(let k=0;k<b;k++){let q=document.createElement("button");q.className=c.dot;q.setAttribute("data-index",k);q.setAttribute("title",
k);q.setAttribute("aria-label","Go to page "+k);q.onclick=d.dotClick;g.appendChild(q)}d.dotsPadding()}},dotClick:function(b){b.preventDefault();b.stopPropagation();b=parseInt(this.getAttribute("data-index"));var k=g.getElementsByClassName("active")[0];k=parseInt(k.getAttribute("data-index"));d.swipeManual(Math.abs(b-k)*d.swipePerDot()*Math.sign(b-k))},dotsPadding:function(){let b=l.getBoundingClientRect().height;f.style.paddingBottom=b+"px"},dotSwipe:function(b,k){b=Math.round((void 0!==b?b:d.reviewsIdx())/
d.swipePerDot());b=0>b?0:b>=g.childNodes.length?g.childNodes.length-1:b;b=g.querySelector("."+c.dot+'[data-index="'+b+'"]');let q=g.getElementsByClassName("active")[0];d.dotActivate(q,b);d.dotScroll(b,k)},dotScroll:function(b,k){let q=Math.round(g.scrollWidth/g.childNodes.length),w=Math.floor(Math.round(g.offsetWidth/q)/2);k?g.scrollTo(b.offsetLeft-w*q,0):g.scrollTo({left:b.offsetLeft-w*q,behavior:"smooth"})},dotActivate:function(b,k){b&&(b.classList.remove("active"),b.classList.remove("s1"),b.previousSibling&&
(b.previousSibling.classList.remove("s2"),b.previousSibling.previousSibling&&b.previousSibling.previousSibling.classList.remove("s3")),b.nextSibling&&(b.nextSibling.classList.remove("s2"),b.nextSibling.nextSibling&&b.nextSibling.nextSibling.classList.remove("s3")));k&&(k.classList.add("active"),k.classList.add("s1"),k.previousSibling&&(k.previousSibling.classList.add("s2"),k.previousSibling.previousSibling&&k.previousSibling.previousSibling.classList.add("s3")),k.nextSibling&&(k.nextSibling.classList.add("s2"),
k.nextSibling.nextSibling&&k.nextSibling.nextSibling.classList.add("s3")))},swipeManual:function(b){z=!0;d.loadNextReviews(b);d.scroll(b);e.clickstop&&(d.swipeAutoStop(),d.delMouseEvents())},swipeAuto:function(){if(rpi.Utils.isInViewport(f))if(d.isScrollEnd())d.scroll(-(p-d.reviewsPerView()));else{let b=d.swipeStep()<d.reviewsAhead()?d.swipeStep():d.reviewsAhead();d.scroll(b)}d.swipeAutoStart()},scroll:function(b){b=d.reviewsIdx()+parseInt(b);let k=rpi.Utils.isRTL()?b+d.reviewsPerView()-1:b;k=0>k?
0:k>=u.length?u.length-1:k;-1<k&&k<u.length&&(n.scrollTo({left:u[k].offsetLeft,behavior:"smooth"}),d.hasDots()&&d.dotSwipe(b))},swipeAutoStart:function(){r&&(y=setTimeout(d.swipeAuto,1E3*parseInt(t)))},swipeAutoStop:function(){clearTimeout(y);x&&setTimeout(function(){clearTimeout(x)},100)},isScrollEnd:function(){var b=n.querySelector("."+c.card+":last-child"),k=b.getBoundingClientRect();b=b.parentNode.getBoundingClientRect();return(2>Math.abs(b.left-k.left)||b.left<=k.left)&&k.left<b.right&&(2>Math.abs(b.right-
k.right)||b.right>=k.right)&&k.right>b.left},swipeStep:function(){return e.swipe_step||d.reviewsPerView()},swipePerBtn:function(){return e.swipe_per_btn||d.reviewsPerView()},swipePerDot:function(){return e.swipe_per_dot||d.reviewsPerView()},reviewWidth:function(){return Math.round(n.scrollWidth/u.length)},reviewHeight:function(){return u[0].offsetHeight},reviewsPerView:function(){return Math.round(n.offsetWidth/d.reviewWidth())},reviewsIdx:function(){let b=rpi.Utils.isRTL()?-n.scrollLeft:n.scrollLeft;
return Math.round(b/d.reviewWidth())},reviewsAhead:function(){return u.length-(d.reviewsIdx()+d.reviewsPerView())},hasDots:function(){return g&&!e.hide_dots&&0<d.swipePerDot()},setBreakpoints:function(b){m.column.setBreakpoints(b);d.resize()},clear:function(){clearTimeout(A);clearTimeout(y);clearTimeout(x);clearTimeout(B);window.removeEventListener("resize",d.resizeListener);n.removeEventListener("scroll",d.scrollListener);h.removeEventListener("wheel",d.wheelListener)}}};
function rplg_badge_init(a,e,c){var m=a.querySelector(".wp-"+e+"-badge"),f=a.querySelector(".wp-"+e+"-form");m&&f&&(a=document.createElement("div"),a.className=c+" wpac",-1<m.className.indexOf("-fixed")&&a.appendChild(m),a.appendChild(f),document.body.appendChild(a),m.onclick=function(){f.style.display="block"})}
function rplg_next_reviews(a,e){var c=this.parentNode,m="."+a+"-review."+a+"-hide";reviews=c.querySelectorAll(m);for(var f=0;f<e&&f<reviews.length;f++)reviews[f]&&(reviews[f].className=reviews[f].className.replace(a+"-hide"," "));reviews=c.querySelectorAll(m);1>reviews.length&&c.removeChild(this);return!1}function rplg_leave_review_window(){rpi.Utils.popup(this.getAttribute("href"),620,500);return!1}
function grw_init(a,e){a=rpi.Utils.getParent(a,"wp-gr");if("true"!=a.getAttribute("data-exec")){a.setAttribute("data-exec","true");var c=JSON.parse(a.getAttribute("data-options"));rpi.Common(a,c,{time:"wp-google-time",text:"wp-google-text",readmore:"wp-more-toggle"}).init();rpi.Media(a,{},{root:"wp-gr",card:"grw-review"}).init();!a.getElementsByClassName("grw-review")[0]||"slider"!=e&&"grid"!=e||(e=a.getElementsByClassName("grw-row")[0],e=JSON.parse(e.getAttribute("data-options")),c=rpi.Column(a,
e,{cnt:"grw-row",col:"grw-row",card:"grw-review"}),rpi.Slider(a,e,{cnt:"grw-row",col:"grw-row",content:"grw-content",cards:"grw-reviews",card:"grw-review",text:"wp-google-text",btnPrev:"grw-prev",btnNext:"grw-next",dotsWrap:"rpi-dots-wrap",dots:"rpi-dots",dot:"rpi-dot"},{column:c}).init())}}function grw_boot(){const a=document.querySelectorAll('.wp-gr[data-exec="false"]');for(let c=0;c<a.length;c++){var e=a[c];grw_init(e,e.getAttribute("data-layout"))}}
document.addEventListener("DOMContentLoaded",grw_boot);