1jQuery(function(_){window.storeLocatorInit=function(){var t=_("#yith-store-locator:not(.yith-store-locator-initialized)"),o=!0;t.length&&(t.addClass("yith-store-locator-initialized"),window.yith_sl_store_locator=t.data("atts"),window.store_locator={options:yith_sl_store_locator,infowindows:[],is_google_suggestion:!1,radius_default_step:yith_sl_store_locator.filter_radius_default_step,latitude:"",longitude:"",filters:{},search_bar_address:_("#yith-sl-search-bar-address"),address:"",product:"",change_browser_url:yith_sl_store_locator.change_browser_url,urlArgs:{},queryArgsToKeep:yith_sl_store_locator.query_args_to_keep,moveMapToSelectedStoreEvent:yith_sl_store_locator.move_map_to_selected_store_event,sugestion_icon:yith_sl_store_locator.suggestion_icon,init:function(){store_locator.initStoreLocator(),"yes"===store_locator.change_browser_url&&_(document).on("yith_sl_search_stores_completed",store_locator.setQueryArg),_(document).on("yith_sl_store_locator_initialized",store_locator.getResultsOnChangeAddress),_(document).on("click","#yith-sl-geolocation",function(t){t.preventDefault(),_("#yith-sl-wrap-loader").show(),store_locator.useCurrentLocation()}),_(document).on("click","#yith-sl-search-icon",function(){store_locator.getResults()}),_(document).on("click","#yith-sl-show-all-stores",store_locator.showAllStores),_(document).on("click","#yith-sl-search-button",function(t){t.preventDefault(),store_locator.getResults()}),_(document).on("click","#yith-sl-view-all",store_locator.showAllResults),_(document).on("keypress",function(t){13===t.which&&store_locator.getResults()}),_(document).on("keypress change","#yith-sl-search-bar-address",store_locator.getResultsOnChangeAddress),"no"===store_locator.options.autosearch&&_(document).on("click change",".wrapper-filter[data-taxonomy="+yith_sl_store_locator.radius_taxonomy_slug+"] li, select#filter-radius",store_locator.showTooltip),"yes"===store_locator.options.full_width_layout&&_(window).on("resize",store_locator.makeLayoutFullwidth),_(document).on("click","#yith-sl-main-filters-container.layout-dropdown .type-dropdown .wrapper-options label",function(){var t=_(this).parents(".wrapper-filter");t.find("li").removeClass("active"),t.find("input").prop("checked",!1),_(this).closest("li").addClass("active"),store_locator.initFilters()}),_(document).on("change","#yith-sl-main-filters-container select, #yith-sl-main-filters-container input",function(){store_locator.initFilters()}),_(document).on("change","#yith-sl-main-filters-container input, select",function(){var t;_(this).is("select")?(t=_(this).val(),_(this).find("option[value="+t+"]").attr("selected","true")):(_(this).is(":checkbox")||_(this).is(":radio"))&&(t=_(this).is(":checked"),_(this).attr("checked",t))}),_(document).on("yith_sl_filters_initialized",function(){"yes"===store_locator.options.autosearch&&store_locator.getResults()}),_(document).on("click","#yith-sl-reset-all-filters",function(){store_locator.resetFilters(),store_locator.getResults()}),_(document).on("click","#wrapper-active-filters .remove-term",store_locator.removeFilter),_(document).on("click","#yith-sl-open-filters",function(){_(".wrap-filters-list").slideToggle()})},initStoreLocator:function(){localStorage.setItem("yith_store_locator_init",!0),localStorage.setItem("yith_store_locator_original_url",!0),store_locator.setProduct(),"yes"===store_locator.options.show_map&&store_locator.initMap(store_locator.latitude,store_locator.longitude),"yes"===store_locator.options.autogeolocation&&store_locator.useCurrentLocation(),"undefined"!=typeof google&&"undefined"!=typeof google.maps&&"undefined"!=typeof google.maps.places&&"undefined"!=typeof google.maps.places.Autocomplete?store_locator.initSearchAddressInput():console.error("Google Maps Javascript API error while using Autocomplete. Probably other plugins (or your theme) include Google Maps Javascript API without support to the Places library"),"yes"===store_locator.options.full_width_layout&&store_locator.makeLayoutFullwidth(),store_locator.initFilters(),"yes"===store_locator.change_browser_url&&store_locator.isQueryFiltered()?(store_locator.getAddress(store_locator.getResults),store_locator.getResults()):"no"===store_locator.options.autogeolocation&&"yes"===store_locator.options.show_stores_by_default&&store_locator.showAllStores(),_(document).on("yith_sl_store_locator_initialized"),localStorage.setItem("yith_store_locator_init",!1)},isQueryFiltered:function(){return 0<window.location.search.length},showTooltip:function(){var t=_("#yith-sl-search-bar-address").val(),o=_(this).find("input").val(),e=_(this).val(),s=_("#address-tooltip");""===t&&(o!==undefined&&0!==o&&"selectall"!==o||e!==undefined&&0!==e&&"selectall"!==e)&&(s.fadeIn(),setTimeout(function(){s.fadeOut()},4e3))},is_admin:function(){return _("body").hasClass("wp-admin")},makeLayoutFullwidth:function(){var t,o,e;0<_(".yith-sl-modal").length||store_locator.is_admin()||(o=(t=_("#yith-store-locator")).outerWidth(!0),e=_("body").width(),t.css("margin","0 -"+(e-o)/2+"px"),t.css({padding:store_locator.options.side_padding_full_width}))},getResultsOnChangeAddress:function(t){switch(t.type){case"keypress":13===t.which&&(t.stopPropagation(),store_locator.getAddress(store_locator.getResults));break;case"change":setTimeout(function(){store_locator.getAddress(store_locator.getResults)},500)}},getAddress:function(e){var t=_("#yith-sl-search-bar-address").val();""!==t&&(geocoder=new google.maps.Geocoder).geocode({address:t},function(t,o){null!=t&&0<t.length&&(store_locator.latitude=parseFloat(t[0].geometry.location.lat()),store_locator.longitude=parseFloat(t[0].geometry.location.lng()),store_locator.is_google_suggestion=!1,_("#yith-sl-geolocation-enabled").val("no"),"yes"===store_locator.options.autosearch)&&e()}),store_locator.address=t,_(document).trigger("yith_sl_address_initialized")},setQueryArg:function(t){if(!(0<_(".yith-sl-modal").length||store_locator.is_admin())){const e=store_locator.getBaseUrl();"true"===localStorage.getItem("yith_store_locator_original_url")&&null!==store_locator.product?localStorage.setItem("yith_store_locator_original_url",!1):(_.each(store_locator.urlArgs,function(t,o){0<o.length&&e.searchParams.append(t,o)}),0<store_locator.address.length&&e.searchParams.append("address",store_locator.address),e.searchParams.set("store-filter","yes"),history.replaceState({},null,e))}},getBaseUrl:function(){let s=new URL(window.location.origin+window.location.pathname);
1const r=new URL(window.location.href);return _.each(store_locator.queryArgsToKeep,function(t,o){var e=r.searchParams.get(o);undefined!==e&&null!==e&&""!==e&&s.searchParams.append(o,e)}),null!==store_locator.product&&s.searchParams.append("product_id",store_locator.product),s},showAllResults:function(t){t.preventDefault(),_(this).css({display:"none"});var o="one"===store_locator.options.results_columns?"block":"flex";_("#yith-sl-results").find(".additional-stores").slideDown({start:function(){_(this).css({display:o})}})},showAllStores:function(t){var o=t!==undefined;o&&t.preventDefault(),"all"===store_locator.options.stores_shown_by_default&&(store_locator.latitude="",store_locator.longitude=""),_("#yith-sl-search-bar-address").val(""),store_locator.geolocation="no",store_locator.resetFilters(),t!=undefined&&!o||store_locator.getResults(!0)},initSearchAddressInput:async function(){let{AutocompleteSuggestion:t,AutocompleteSessionToken:o}=await google.maps.importLibrary("places"),e=_("#yith-sl-search-bar-address"),r=_("#yith-sl-search-bar-suggestions"),s=r.parent();$sessionToken=new o,e.on("input",()=>{store_locator.getSuggestions(e,r,$sessionToken,t)}),e.on("keydown",function(o){var e=r.find(".suggestion-item");if(e.length){var s=e.filter(".selected");let t;switch(o.key){case"ArrowDown":o.preventDefault(),(t=s.length?s.removeClass("selected").next(".suggestion-item"):e.first()).addClass("selected")[0];break;case"ArrowUp":o.preventDefault(),(t=s.length?s.removeClass("selected").prev(".suggestion-item"):e.last()).addClass("selected")[0];break;case"Enter":o.preventDefault(),s.length&&(s.click(),_(this).trigger("change"))}}}),_(document).on("click",function(t){_(t.target).closest(s).length||r.hide()})},getSuggestions:async function(i,n,t,o){var e=_(i).val().trim();if(e){e={input:e,sessionToken:t};try{var s=(await o.fetchAutocompleteSuggestions(e)).suggestions;
1n.empty(),s.forEach(o=>{o=o.placePrediction;if(o){const r=o.text.text||"",l=o.mainText||"",a=l.matches||[];let e="",s=0;a.forEach(t=>{var o=t.startOffset,t=t.endOffset;e=(e+=l.text.substring(s,o))+`<strong>${l.text.substring(o,t)}</strong>`,s=t}),e+=l.text.substring(s);o=r.indexOf(l);let t=r;0<=o&&(t=r.substring(0,o)+e+r.substring(o+l.text.length));o=_("<div>").addClass("suggestion-item").html('<span class="store-icon"></span>'+t).on("click",function(){i.val(r),n.empty(),n.hide()});n.append(o),n.show()}})}catch(r){console.error("Error en AutoCompleteSuggestion: ",r),n.empty()}}else n.empty(),n.hide()},useCurrentLocation:function(){navigator.geolocation?navigator.geolocation.getCurrentPosition(store_locator.geolocationSuccess,store_locator.geolocationError,{enableHighAccuracy:!0}):(alert(store_locator.options.alert_geolocalization_not_supported),_("#yith-sl-wrap-loader").hide())},geolocationSuccess:function(t){store_locator.latitude=t.coords.latitude,store_locator.longitude=t.coords.longitude,store_locator.geolocation="yes";var t=new google.maps.Geocoder,o={lat:store_locator.latitude,lng:store_locator.longitude};t.geocode({location:o},function(t,o){"OK"===o?t[0]?(_("#yith-sl-wrap-loader").hide(),t=t[0].formatted_address,store_locator.search_bar_address.val(t),"yes"===store_locator.options.autosearch&&store_locator.getResults()):window.alert(store_locator.options.geocode_no_results):window.alert(store_locator.options.geocode_failed_to+" "+o)})},geolocationError:function(){alert(store_locator.options.alert_calculate_position_error),_("#yith-sl-wrap-loader").hide()},getResults:function(){0==o&&""===_("#yith-sl-search-bar-address").val()&&(store_locator.latitude="",store_locator.longitude=""),o=!1;var t={latitude:store_locator.latitude,longitude:store_locator.longitude,geolocation:store_locator.geolocation,radius:store_locator.filter_radius_step,filters:store_locator.filters,number_results_to_show:store_locator.options.number_results_to_show,results_info_to_show:store_locator.options.results_info_to_show,action:store_locator.options.action_get_results,product:store_locator.product,context:"frontend",language:_("#yith-sl-language").val()};store_locator.ajaxSearchStores(t)},ajaxSearchStores:function(o){_(document).trigger("yith_sl_starting_search_stores");var e=_("#yith-sl-results"),s=_("#yith-sl-active-filters");_("#yith-sl-wrap-loader").show(),jQuery.ajax({type:"POST",data:o,url:store_locator.options.ajaxurl,success:function(t){"yes"===store_locator.options.show_results&&(e.find(".title").show(),e.find(".stores-list").html(t.results),s.html(t.active_filters),"yes"===store_locator.options.autosearch)&&_("#yith-sl-search-button").hide(),"yes"===store_locator.options.show_map&&store_locator.initMap(o.latitude,o.longitude,t.markers,store_locator.options.map_zoom,o.geolocation),""!==_("#yith-sl-search-bar-address").val()&&0<s.find("li").length&&!jQuery.isEmptyObject(store_locator.filters)&&("no"===o.show_all||o.show_all===undefined)&&s.show(),0===s.find("li").length&&s.hide(),e.show(),_("#yith-sl-wrap-loader").hide()},complete:function(){_("#yith-sl-main-filters-container.layout-dropdown").find(".wrapper-options").hide(),"no"===store_locator.options.show_filters_with_results&&(_("#yith-sl-main-filters-container").find(".wrap-filters-list").hide(),_("#yith-sl-open-filters").show()),_(".wrapper-filter.active").removeClass("active"),_(document).trigger("yith_sl_search_stores_completed")},error:function(){}})},initMap:async function(t,o,e,s,r){let a=(await google.maps.importLibrary("marker")).AdvancedMarkerElement;var i,n,c,d;null!==document.getElementById("yith-sl-gmap")&&(null==e&&(e=""),null==s&&(s=store_locator.options.map_zoom),null==r&&(r="no"),""===t&&(t=store_locator.options.map_latitude,store_locator.latitude=store_locator.options.map_latitude),""===o&&(o=store_locator.options.map_longitude,store_locator.longitude=store_locator.options.map_longitude),i=new google.maps.LatLngBounds,n=new google.maps.Map(document.getElementById("yith-sl-gmap"),{zoom:Number(s),mapTypeId:store_locator.options.map_type,scrollWheelZoom:!0,styles:store_locator.options.map_style,minZoom:1,maxZoom:store_locator.options.map_max_zoom,streetViewControl:store_locator.options.map_street_view_control,gestureHandling:store_locator.options.map_gesture_handling,zoomControl:store_locator.options.map_zoom_control,restriction:{latLngBounds:{north:85,south:-85,west:-180,east:180}},mapId:"DEMO_MAP_ID"}),c={},0!==e.length?(d=[],jQuery.each(e,function(t,o){var e,s=_("<img/>").attr("src",o.pin_icon)[0],r=new google.maps.LatLng(o.latitude,o.longitude),l=new a({position:r,map:n,title:o.name});l.append(s),i.extend(l.position),"yes"===store_locator.options.enable_pin_modal&&"undefined"!==o.pin_modal&&(e=new google.maps.InfoWindow({content:o.pin_modal}),store_locator.infowindows.push(e),_(l.element).on(store_locator.options.pin_modal_trigger_event,function(t){var o="";t!==undefined&&t.rb!==undefined&&(o=Math.abs(t.rb.screenY-c.y)),store_locator.closeAllInfoWindows(),(t===undefined||300<o)&&n.panTo(l.getPosition()),e.open(n,l)})),(d[o.id]=l).setMap(n)}),(s=_(".wrap-store-details")).on(store_locator.moveMapToSelectedStoreEvent,function(){store_locator.closeAllInfoWindows();var t=_(this).data("id");_(d[t].element).trigger(store_locator.options.pin_modal_trigger_event)}),store_locator.options.autoclose_pin_on_mouseleave&&s.on("mouseleave",function(){store_locator.closeAllInfoWindows()}),"yes"===r&&(e=new google.maps.LatLng(t,o),(s=new a({position:e,map:n})).append(_("<img/>").attr("src",yith_sl_store_locator.map_user_icon)[0]),i.extend(s.position)),i.getNorthEast()!=undefined&&i.getNorthEast().equals(i.get
1SouthWest())&&(r=new google.maps.LatLng(i.getNorthEast().lat()+.1,i.getNorthEast().lng()+.1),i.extend(r)),"yes"===store_locator.options.show_radius_circle&&store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]&&t!==undefined&&o!==undefined&&t!==store_locator.options.map_latitude&&o!==store_locator.options.map_longitude&&(e=new google.maps.LatLng(t,o),s=new google.maps.Circle({strokeColor:store_locator.options.circle_border_color,center:e,strokeWeight:store_locator.options.circle_border_weight,fillColor:store_locator.options.circle_background_color,map:n,radius:"km"===store_locator.options.filter_radius_distance_unit?1e3*store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]:1.60934*store_locator.filters[yith_sl_store_locator.radius_taxonomy_slug]}),i.union(s.getBounds())),setTimeout(function(){n.fitBounds(i)},500)):(yith_sl_store_locator.show_default_location_for_no_results&&(t=yith_sl_store_locator.map_latitude,o=yith_sl_store_locator.map_longitude),r=new google.maps.LatLng(t,o),n.setCenter(r)))},closeAllInfoWindows:function(){for(var t=0;t<store_locator.infowindows.length;t++)store_locator.infowindows[t].close()},initFilters:function(){var t=_("#yith-sl-main-filters-container");t.find(".wrapper-filter").each(function(){_(this).removeClass("selected");var t=jQuery(this).data("taxonomy");store_locator.filters[t]=[],store_locator.urlArgs[t]=[]}),t.find("li.active input, input:checked, option:selected").each(function(){var t=_(this).parents(".wrapper-filter"),o=_(this).parents(".wrapper-filter").data("taxonomy"),e=_(this).val(),s=_(this).data("slug");o!==undefined&&("selectall"!==e?(t.addClass("selected"),store_locator.filters[o].push(e),store_locator.urlArgs[o].push(s)):(store_locator.filters[o]=[],store_locator.urlArgs[o]=[]))}),_(document).trigger("yith_sl_filters_initialized")},resetFilters:function(){var t=_("#yith-sl-main-filters-container").find(".wrapper-filter");"true"!==localStorage.getItem("yith_store_locator_init")&&(_(".open-dropdown").each(function(){var t=jQuery(this).data("title");_(this).find(".text").html(t)}),t.find("option:selected, input:checked").each(function(){_(this).prop("checked",!1),_(this).prop("selected",!1)}),t.find("li.active").removeClass("active"),t.find("select").prop("selectedIndex",0),t.removeClass("selected active"),_("#yith-sl-active-filters").hide(),t=new URL(window.location.href.split("?")[0]),history.replaceState({},null,t),_(document).trigger("yith_sl_reset_filters"),store_locator.initFilters())},removeFilter:function(){var t=_(this).data("taxonomy"),o=_(this).data("value"),t=_("#yith-sl-main-filters-container").find("[data-taxonomy='"+t+"'][data-value='"+o+"']"),o=t.parents(".wrapper-filter"),e=_(this).closest(".wrapper-terms").find("li").length;t.prop("checked",!1),t.prop("selected",!1),t.parents("li").removeClass("active"),o.removeClass("selected"),1<e&&_(this).parent("li").remove(),t.is(":radio")&&(e=o.find(".open-dropdown").data("title"),o.find(".text").html(e)),store_locator.initFilters(),0===_("#wrapper-active-filters").find("li").length&&_("#yith-sl-active-filters").hide(),"yes"===store_locator.options.autosearch&&store_locator.getResults()},setProduct:function(){var t;0<_(".yith-sl-modal").length?store_locator.product=_(".yith-sl-modal").data("product"):window.location.href.indexOf("product_id=")?(t=new URLSearchParams(window.location.search),store_locator.product=t.get("product_id")):store_locator.product=null}},store_locator.init())},storeLocatorInit(),_(function(){"elementorFrontend"in window&&window.elementorFrontend.hooks.addAction("frontend/element_ready/global",function(t){storeLocatorInit()})})});
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.