// source --> https://store.lealoghan.fr/store/wp-content/plugins/wp-social/assets/js/front-main.js?ver=3.2.0 
function check_instagram_cache(){jQuery.ajax({data:{route:"",_token:""},type:"post",url:window.rest_config.rest_url+"wslu/v1/check_cache/instagram/",beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",rest_config.nonce)},success:function(e){e.success&&e.expired&&fetch_and_cache_instagram_count(e.unm),console.log("Instagram data cache was initiated - ",e)},error:function(e){},complete:function(){}})}function fetch_and_cache_instagram_count(e){jQuery.get("https://www.instagram.com/"+e+"/?__a=1",(function(t){console.log(t.graphql.user.edge_followed_by),console.log(t);var s=0;t.graphql.user.edge_followed_by&&(s=t.graphql.user.edge_followed_by),jQuery.ajax({type:"POST",url:window.rest_config.rest_url+"wslu/v1/save_cache/instagram/",data:{content:s},success:function(t){console.log("Instagram data fetch for user - "+e,t)},error:function(t){console.log("Instagram data fetch failed for user - "+e,t)}})}))}jQuery(document).ready((function(e){var t;e(window).on("resize.wslu",(function(){let s=(t=e(".xs_social_share_widget.wslu-share-horizontal.wslu-main_content")).parent(),a=t.find(".wslu-share-count"),n=s.width(),o=t.find("ul").outerWidth(!0)||null;if(a.length&&(o=a.outerWidth(!0)||null),o&&o>n){let s=a.length?a.outerWidth(!0):0;temLength=s||0;let o,r=t.find("ul li");for(let t=0;t<=r.length;t++)if(temLength+=e(r).eq(t).outerWidth(!0),temLength>n){temLength-=e(r).eq(t).outerWidth(!0),o=e(r).eq(t-2).outerWidth(!0);break}shareBTN=76;let l=Math.floor((temLength-s)/o),c=shareBTN>o?Math.ceil(shareBTN/o):1;t.find("ul li").slice(l-c).wrapAll("<div class='wslu-share-more'><ul></ul></div>")}})).trigger("resize.wslu"),t.find(".wslu-share-more").prepend('<span class="wslu-share-more-btn-close met-social met-social-cross"></span><h3 class="wslu-share-more-btn-title">Share this with:</h3>').before('<li class="wslu-share-more-btn"><a href="#"><div class="wslu-both-counter-text"><span class="wslu-share-more-btn--icon met-social met-social-share-1"></span> Share</div></a></li>'),e(".xs_social_share_widget").on("click",".wslu-share-more-btn",(function(){e(this).addClass("active").next().addClass("active")})),e(".xs_social_share_widget").on("click",".wslu-share-more-btn-close",(function(){e(this).parent().removeClass("active").prev().removeClass("active")})),"1"==rest_config.insta_enabled&&setTimeout((function(e){}),1200)}));
// source --> https://store.lealoghan.fr/store/wp-content/plugins/woocommerce-pdf-vouchers/includes/meta-boxes/js/datetimepicker/jquery-ui-slider-Access.js?ver=5.2.2 
/*
 * jQuery UI Slider Access
 * By: Trent Richardson [http://trentrichardson.com]
 * Version 0.3
 * Last Modified: 10/20/2012
 * 
 * Copyright 2011 Trent Richardson
 * Dual licensed under the MIT and GPL licenses.
 * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
 * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
 * 
 */
 (function($){

	$.fn.extend({
		sliderAccess: function(options){
			options = options || {};
			options.touchonly = options.touchonly !== undefined? options.touchonly : true; // by default only show it if touch device

			if(options.touchonly === true && !("ontouchend" in document)){
				return $(this);
			}
				
			return $(this).each(function(i,obj){
						var $t = $(this),
							o = $.extend({},{ 
											where: 'after',
											step: $t.slider('option','step'), 
											upIcon: 'ui-icon-plus', 
											downIcon: 'ui-icon-minus',
											text: false,
											upText: '+',
											downText: '-',
											buttonset: true,
											buttonsetTag: 'span',
											isRTL: false
										}, options),
							$buttons = $('<'+ o.buttonsetTag +' class="ui-slider-access">'+
											'<button data-icon="'+ o.downIcon +'" data-step="'+ (o.isRTL? o.step : o.step*-1) +'">'+ o.downText +'</button>'+
											'<button data-icon="'+ o.upIcon +'" data-step="'+ (o.isRTL? o.step*-1 : o.step) +'">'+ o.upText +'</button>'+
										'</'+ o.buttonsetTag +'>');

						$buttons.children('button').each(function(j, jobj){
							var $jt = $(this);
							$jt.button({ 
											text: o.text, 
											icons: { primary: $jt.data('icon') }
										})
								.click(function(e){
											var step = $jt.data('step'),
												curr = $t.slider('value'),
												newval = curr += step*1,
												minval = $t.slider('option','min'),
												maxval = $t.slider('option','max'),
												slidee = $t.slider("option", "slide") || function(){},
												stope = $t.slider("option", "stop") || function(){};

											e.preventDefault();
											
											if(newval < minval || newval > maxval){
												return;
											}
											
											$t.slider('value', newval);

											slidee.call($t, null, { value: newval });
											stope.call($t, null, { value: newval });
										});
						});
						
						// before or after					
						$t[o.where]($buttons);

						if(o.buttonset){
							$buttons.removeClass('ui-corner-right').removeClass('ui-corner-left').buttonset();
							$buttons.eq(0).addClass('ui-corner-left');
							$buttons.eq(1).addClass('ui-corner-right');
						}

						// adjust the width so we don't break the original layout
						var bOuterWidth = $buttons.css({
									marginLeft: ((o.where === 'after' && !o.isRTL) || (o.where === 'before' && o.isRTL)? 10:0), 
									marginRight: ((o.where === 'before' && !o.isRTL) || (o.where === 'after' && o.isRTL)? 10:0)
								}).outerWidth(true) + 5;
						var tOuterWidth = $t.outerWidth(true);
						$t.css('display','inline-block').width(tOuterWidth-bOuterWidth);
					});		
		}
	});

})(jQuery);