1function gm_authFailure(){var e=slplus.notifications.inline(slplus.messages.slp_system_message,slplus.messages.no_api_key);jQuery("#map").prepend(e)}slp_Filter=function(e){let s,t;return(t=e&&slp.topics[e])||(t=void 0!==jQuery.Callbacks?{publish:(s=jQuery.Callbacks()).fire,subscribe:s.add,unsubscribe:s.remove}:(slp.log("jQuery 1.7.0+ required, "+jQuery.fn.version+" used instead."),{publish:function(e){return e}}),e&&(slp.topics[e]=t)),t},(slp={initMap:function(){},generic_object:{a:document.createElement("a")},important_object:{address_div:{},address_input:{},find_button:{},map:{},results:{},search_form:{},slp_div:{}},topics:{},sensor:{},filter:function(e){slp_Filter(e)},init:function(){"undefined"!=typeof slplus&&window.location.protocol!==slplus.ajaxurl.substring(0,slplus.ajaxurl.indexOf(":")+1)&&(slplus.ajaxurl=slplus.ajaxurl.replace(slplus.ajaxurl.substring(0,slplus.ajaxurl.indexOf(":")+1),window.location.protocol));const d=/radio|checkbox/i,u=/[^\[\]]+/g,_=/^[\-+]?[0-9]*\.?[0-9]+([eE][\-+]?[0-9]+)?$/;jQuery.fn.extend({formParams:function(e){return("form"===this[0].nodeName.toLowerCase()&&this[0].elements?jQuery(jQuery.makeArray(this[0].elements)):jQuery("input[name], textarea[name], select[name]",this[0])).getParams(e)},getParams:function(l){var n,p={};return l=void 0===l||l,this.each(function(){var e=this,s=e.type&&e.type.toLowerCase();if("submit"!==s&&e.name){var t=e.name,o=jQuery.data(e,"value")||jQuery.fn.val.call([e]),i=d.test(e.type),r=t.match(u),t=!i||!!e.checked;l&&("number"==typeof(i=o)||"string"==typeof i&&i.match(_)?o=parseFloat(o):"true"!==o&&"false"!==o||(o=Boolean(o))),n=p;for(var a=0;a<r.length-1;a++)n[r[a]]||(n[r[a]]={}),n=n[r[a]];(e=r[r.length-1])in n&&"checkbox"===s?(Array.isArray(n[e])||(n[e]=void 0===n[e]?[]:[n[e]]),t&&n[e].push(o)):!t&&n[e]||(n[e]=t?o:void 0)}}),p}})},run:function(){slp_Filter("ready").publish(this),slp.init(),slp.start_map()},log:function(e){window.console&&console.log(e)},notification:function(){this.inline=function(e,s){return'<div class="container fluid grid-list-lg" style="min-height: 0px;"><div class="layout row wrap"><div class="flex xs12"><div class="white--text card blue-grey darken-2" data-ripple="false" style="height: auto;"><div class="card__title card__title--primary"><div class="headline">'+e+"</div><div>"+s+"</div></div></div></div></div></div>"}},setup_helpers:function(){slp.important_object={address_row:jQuery("#addy_in_address"),address_input:jQuery("#addressInput"),map:jQuery("#map"),results:jQuery("#map_sidebar"),search_form:jQuery("#searchForm"),slp_div:jQuery("div.store_locator_plus")},String.prototype.replace_shortcodes=function(){var c=arguments[0];return this.replace(/\[(\w+)\s+([\w\.]+)\s*(\w*)(?:[\s="]*)([\w|\.]*)(?:[\s"]*)\s*(\w*)(?:[\s="]*)([\w|\.]*)(?:[\s"]*)\]/g,function(e,s,t,o,i,r,a){let l="",n="",p="";switch(s){case"slp_location":if("longitude"===(t="latitude"===t?"lat":t)&&(t="lng"),n="",l="",c[t])n=c[t],l=t;else{if(!(1<t.indexOf(".")))return"";var d=t.match(/(\w+)/gi),u=d[0];if(!c[u])return"";d=d[1];if(!(n=c[u][d]))return"";l=u+"_"+d}return p=n.shortcode_modifier({modifier:o,modarg:i,field_name:l,marker:c}),p=r?p.shortcode_modifier({modifier:r,modarg:a,field_name:l,marker:c}):p;case"slp_option":var _=slplus.options;return slp_Filter("replace_shortcodes_options").publish(_),"name"===t&&(t=i,i=""),_.hasOwnProperty(t)?slp.shortcode_output(c,l,_[t],o,i,r,a):(jQuery.ajax({url:slplus.rest_url+"options/"+t,dataType:"json",success:function(e){e="string"==typeof e?jQuery.parseJSON(e):e;_[t]=e.value,p=slp.shortcode_output(c,l,_[t],o,i,r,a),jQuery('span[data-option="'+t+'"][data-locationid="'+c.id+'"]').html(p).show()},error:function(){return""}}),'<span data-option="'+t+'" data-locationid="'+c.id+'"></span>');case"html":switch(p="",t){case"br":p="<br/>";break;case"closing_anchor":p="</a>"}return p=p.shortcode_modifier({modifier:o,modarg:i,field_name:"raw_html",marker:c}),p=r?p.shortcode_modifier({modifier:r,modarg:a,field_name:"raw_html",marker:c}):p;case"slp_addon":return"";default:return e+" not supported"}})},String.prototype.shortcode_modifier=function(){function e(e,s){var t=e.split(".");return 1===t.length?s[e]||s.data[e]:s.data[t[1]]}var s=arguments[0],t=s.modifier,o=s.modarg,i=s.field_name,r=!0,a=("hours"===i&&(r=!1),this),l="",n="";
1if(t)switch(t){case"ifset":if(e(o,s.marker))break;return"";case"ifnotset":if(e(o,s.marker))return"";break;case"suffix":switch(o){case"br":n="<br/>";break;case"comma":n=",";break;case"comma_space":n=", ";break;case"space":n=" "}break;case"wrap":switch(o){case"directions":l='<a href="https://'+slplus.options.map_domain+"/maps?saddr="+encodeURIComponent(cslmap.getSearchAddress(cslmap.address))+"&daddr="+encodeURIComponent(s.marker.fullAddress)+'" target="_blank" class="storelocatorlink">',n="</a> ";break;case"img":l='<img src="',n='" class="sl_info_bubble_main_image">';break;case"mailto":l='<a href="mailto:',n='" target="_blank" class="storelocatorlink">';break;case"website":l='<a href="',n='" target="'+("0"!==slplus.options.use_same_window?"_self":"_blank")+'" id="slp_marker_website" class="storelocatorlink" >';break;case"fullspan":l='<span class="results_line location_'+i+'">',n="</span>"}break;case"format":switch(o){case"decimal1":a=parseFloat(a).toFixed(1);break;case"decimal2":a=parseFloat(a).toFixed(2);break;case"sanitize":a=a.replace(/\W/g,"_");break;case"text":a=jQuery("<div/>").html(a).text()}break;case"raw":r=!0}return l+(r?a:jQuery("<div/>").html(a).text())+n}},setup_map:function(){var e;cslmap=new slp_Map,slp_Filter("slp_map_ready").publish(cslmap),slplus.options.use_sensor||(cslmap.usingSensor=!1,null!=slplus.options.id_addr&&(cslmap.address=slplus.options.id_addr),!cslmap.address&&slplus.options.map_center&&(cslmap.address=slplus.options.map_center),slplus.options.map_center_lat&&slplus.options.map_center_lng?"function"==typeof cslmap.build_map&&(e=new google.maps.LatLng(slplus.options.map_center_lat,slplus.options.map_center_lng),cslmap.build_map(e)):cslmap.doGeocode())},shortcode_output:function(e,s,t,o,i,r,a){t=t.shortcode_modifier({modifier:o,modarg:i,field_name:s,marker:e});return t=r?t.shortcode_modifier({modifier:r,modarg:a,field_name:s,marker:e}):t},start_map:function(){jQuery("#map").length&&("undefined"!=typeof slplus?"undefined"!=typeof google?(slp.setup_helpers(),slp.setup_map(),slp.subscriptions.initalize(),slplus.notifications=new slp.notification):jQuery("#map").html("Looks like you turned off Store Locator Plus® Maps under General Settings but need them here."):jQuery("#map").html("Store Locator Plus® did not initialize properly."))},subscriptions:{},geocoder:{geocode:function(e,t){jQuery.getJSON(encodeURI(slplus.rest_url+"geocode/"+slplus.apikey+"/"+e.region+"/"+e.address)).done(function(e){var s;e.error_message?e.error_message.includes(s=", with referer")&&(e.error_message=e.error_message.substring(0,e.error_message.indexOf(s))):e.error_message="",t(e.results,e.status,e.error_message)}).fail(function(e){t(e,google.maps.GeocoderStatus.ERROR)})}},option:{get_from_server:function(e,s){void 0!==slplus.shortcode_attributes[e]?s({value:slplus.shortcode_attributes[e]}):jQuery.getJSON(encodeURI(slplus.rest_url+"options/filtered/"+e)).done(function(e){e.error_message?console.log(e.error_message):e.error_message="",s(e)}).fail(function(){console.log("get_from_server failed")})}}}).subscriptions=function(){var e="loading_locations";return this.initialize=function(){slp_Filter("load_marker_action").subscribe(show_locations_processing),slp_Filter("location_search_responded").subscribe(remove_locations_processing)},this.show_locations_processing=function(){slp.important_object.slp_div.addClass(e)},this.remove_locations_processing=function(){slp.important_object.slp_div.removeClass(e)},{initalize:initialize}}(),slp_Marker=function(e,s,t,o,i){this.__map=e,this.__title=s,this.__position=t,this.__gmarker=null,this.__markerImage=o,this.__location_id=i,this.__init=function(){slp_Filter("marker").publish(this),this.__gmarker=new google.maps.Marker({position:this.__position,map:this.__map.gmap,title:this.__title,icon:this.protocol_tweaker(this.__markerImage)})},this.protocol_tweaker=function(e){return slp.generic_object.a.href=e,slp.generic_object.a.hostname!==window.location.hostname?e:(slp.generic_object.a.protocol=window.location.protocol,slp.generic_object.a.href)},this.__init()},slp_Map=function(){const n=this,t=(this.auto_bound=!0,this.infowindow=new google.maps.InfoWindow,this.geocoder=slp.geocoder,this.geocoder_request={},this.gmap=null,this.map_hidden=!0,this.default_radius="40000",this.address=null,this.draggable=!0,this.markers=null,this.usingSensor=!1,this.mapHomeIconUrl=null,this.mapType=null,this.options=null,this.centerMarker=null,this.active_marker=null,this.marker=null,this.bounds=null,this.homePoint=null,this.lastCenter=null,this.lastRadius=null,this.latest_response=null,this.search_options=null,this.__init=function(){if("undefined"==typeof slplus)return e=slplus.notifications.inline(slplus.messages.slp_system_message,slplus.messages.script_not_loaded),void jQuery(".store_locator_plus").prepend(e);this.mapType=slplus.options.map_type,this.mapHomeIconUrl=slplus.options.map_home_icon;var e=this.getSearchAddress();this.address=void 0===e?slplus.options.map_center:e,google.maps.event.addListener(this.infowindow,"domready",function(){jQuery(".slp_info_bubble").parent().addClass("slp_bubble_level_1"),jQuery(".slp_info_bubble").parent().parent().addClass("slp_bubble_level_2"),jQuery(".slp_info_bubble").parent().parent().parent().addClass("slp_bubble_level_3"),jQuery(".slp_info_bubble").parent().parent().parent().parent().addClass("slp_bubble_level_4"),jQuery(".slp_bubble_level_4").children("div:first-child").addClass("slp_bubble_elements"),jQuery(".slp_bubble_level_4").children("div:last-child").addClass("slp_bubble_closer"),jQuery(".slp_bubble_elements").children("div:first-child").addClass("slp_bubble_tail_behind"),jQuery(".slp_bubble_elements").children("div:nth-child(2)").addClass("slp_bubble_behind"),jQuery(".slp_bubble_elements").children("div:nth-child(3)").addClass("slp_bubble_tail_pieces"),jQuery(".slp_bubble_tail_pieces").children("div:first-child").addClass("slp_bubble_left_tail"),jQuery(".slp_bubble_left_tail").children("div:first-child").addClass("slp_bubble_left_tail_back"),jQuery(".slp_bubble_tail_pieces").children("div:last-child").addClass("slp_bubble_right_tail"),jQuery(".slp_bubble_right_tail").children("div:first-child").addClass("slp_bubble_right_tail_back"),jQuery(".slp_bubble_elements").children("div:nth-child(4)").addClass("slp_bubble_background"),jQuery(".slp_info_bubble").parent().parent().parent().parent().parent().addClass("slp_bubble_level_5"),jQuery(".slp_info_bubble").parent().parent().parent().parent().parent().parent().addClass("slp_bubble_level_6")})},void 0!==slplus.options.hide_map&&"1"===slplus.options.hide_map||
1(this.build_map=function(e,s){s=s||document.getElementById("map"),null===this.gmap&&(this.options={center:e,mapTypeId:this.mapType,minZoom:1,zoom:parseInt(slplus.options.zoom_level)},slplus.options.google_map_style&&jQuery.extend(this.options,{styles:JSON.parse(slplus.options.google_map_style)}),slp_Filter("map_options").publish(this.options),this.gmap=new google.maps.Map(s,this.options),google.maps.event.addListener(this.gmap,"bounds_changed",function(){n.__waitForTileLoad.call(n)}),this.show_home_marker()&&(this.homePoint=e,this.addMarkerAtCenter()),"0"!==slplus.options.immediately_show_locations&&(s=null,slplus.options.initial_radius=slplus.options.initial_radius.replace(/\D/g,""),/^[0-9]+$/.test(slplus.options.initial_radius)&&(s=slplus.options.initial_radius),this.search_options=null,this.load_markers(e,s)),slp_Filter("map_built").publish())}),this.set_active_marker_to_location=function(t){jQuery.each(this.markers,function(e,s){if(parseInt(s.__location_id,10)===parseInt(t,10))return cslmap.active_marker=s,!1})},this.show_home_marker=function(){return this.usingSensor||"0"!==slplus.options.immediately_show_locations&&"1"!==slplus.options.no_homeicon_at_start},this.__waitForTileLoad=function(){null===this.__tilesLoaded&&(this.__tilesLoaded=google.maps.event.addListener(this.gmap,"tilesloaded",function(){n.__tilesAreLoaded.call(n)}))},this.__tilesAreLoaded=function(){jQuery("#map").find("img").css({"max-width":"none"}),google.maps.event.removeListener(this.__tilesLoaded),this.__tilesLoaded=null},this.addMarkerAtCenter=function(){this.centerMarker&&this.centerMarker.__gmarker.setMap(null),this.homePoint&&(this.centerMarker=new slp_Marker(this,"",this.homePoint,this.mapHomeIconUrl,0))},this.clearMarkers=function(){if(this.markers){for(markerNumber in this.markers)void 0!==this.markers[markerNumber]&&void 0!==this.markers[markerNumber].__gmarker&&this.markers[markerNumber].__gmarker.setMap(null);this.markers.length=0,this.saneValue("addressInput","")||(this.centerMarker=null,this.homePoint=null)}},this.putMarkers=function(e){var s,t,o;if(this.markers=[],(o=document.getElementById("map_sidebar")).innerHTML="",0===(t=e?e.length:0))this.homePoint&&this.auto_bound&&this.gmap.panTo(this.homePoint),slp.option.get_from_server("message_no_results",function(e){e.value?document.getElementById("map_sidebar").innerHTML='<div class="no_results_found"><h2>'+e.value+"</h2></div>":console.log("No results found. No message set.")});else{var i={content:"",insert_rows_at:"#map_sidebar"},r=(slp_Filter("location_results_header").publish(i),i.content.trim()&&slp.important_object.results.append(i.content),new google.maps.LatLngBounds);this.homePoint&&r.extend(this.homePoint);for(var a,l=0;l<t;++l)null==e[l]?slp.log("SLP marker number "+l+" is null. "):(s=void 0!==e[l].data?e[l].data:e[l],e[l].position||(e[l].position=new google.maps.LatLng(e[l].lat,e[l].lng)),r.extend(e[l].position),this.markers.push(new slp_Marker(this,s.sl_store,e[l].position,n.is_valid_icon(e[l].icon)?e[l].icon:slplus.options.map_end_icon,s.sl_id)),google.maps.event.addListener(this.markers[l].__gmarker,"click",function(e,s){return function(){n.show_map_bubble.call(n,e,s)}}(e[l],this.markers[l])),o&&(jQuery(i.insert_rows_at).append(this.createSidebar(e[l])),jQuery(i.insert_rows_at+" span:empty").hide(),jQuery("#slp_results_wrapper_"+e[l].id).on("click",null,{info:e[l],marker:this.markers[l]},n.handle_location_result_click)));this.gmap&&(this.bounds=r,this.auto_bound&&(this.gmap.fitBounds(this.bounds),"1"===slplus.options.no_autozoom?this.gmap.setZoom(parseInt(slplus.options.zoom_level)):(a=this.gmap.getZoom()-parseInt(slplus.options.zoom_tweak),t<2&&(a=Math.min(a,15)),this.gmap.setZoom(a))))}slp.important_object.results.trigger("contentchanged")},this.handle_location_result_click=function(e){jQuery(this).trigger("result_clicked",e),n.show_map_bubble(e.data.info,e.data.marker)},this.is_valid_icon=function(e){return null!=e&&4<e.length},this.show_map_bubble=function(e,s){this.options={show_bubble:"1"!==slplus.options.hide_bubble},slp_Filter("map_options").publish(this.options),this.options.show_bubble&&(this.infowindow.setContent(this.createMarkerContent(e)),this.infowindow.open(this.gmap,s.__gmarker))},this.process_geocode_response=function(e,s,t){s===google.maps.GeocoderStatus.OK&&0<e.length?(s={all:e,request:n.geocoder_request,best:e[0]},slp_Filter("geocode_results").publish(s),typeof s.best.geometry.location!==google.maps.LatLng&&(s.best.geometry.location=new google.maps.LatLng(s.best.geometry.location.lat,s.best.geometry.location.lng)),null===n.gmap?"function"==typeof n.build_map&&n.build_map(s.best.geometry.location):(n.homePoint=s.best.geometry.location,n.addMarkerAtCenter(),n.load_markers(s.best.geometry.location,n.saneValue("radiusSelect","40000")))):null===n.gmap?"function"==typeof n.build_map&&(slp.log("Map set to fallback lat/lng: "+slplus.options.map_center_lat+" , "+slplus.options.map_center_lng),n.homePoint=new google.maps.LatLng(slplus.options.map_center_lat,slplus.options.map_center_lng),n.build_map(n.homePoint),n.addMarkerAtCenter()):(slp.option.get_from_server("message_bad_address",function(e){e.value?document.getElementById("map_sidebar").innerHTML=e.value+'<br/><p class="geocode_message">Google Maps API error: <br/>'+t+'<br/>Tired of fighting the Google Maps API? Try <a href="https://storelocatorplus.com/">our SaaS offering</a>.':console.log("Bad address. No message set.")}),n.clearMarkers())},this.doGeocode=function(){n.geocoder_request.address=n.address,n.geocoder_request.region=void 0!==slplus.options.map_region&&slplus.options.map_region?slplus.options.map_region:"us","currentmap"===slplus.options.searchnear&&n.gmap&&(n.geocoder_request.bounds=n.gmap.getBounds()),slp_Filter("geocoder_request").publish(n.geocoder_request),n.geocoder.geocode(n.geocoder_request,n.process_geocode_response)},this.__createAddress=function(e){var s="";return""!==e.address&&(s+=e.address),""!==e.address2&&(s+=", "+e.address2),""!==e.city&&(s+=", "+e.city),""!==e.state&&(s+=", "+e.state),""!==e.zip&&(s+=", "+e.zip),""!==e.country&&(s+=", "+e.country),s},this.createMarkerContent=function(e){return e.fullAddress=this.__createAddress(e),slplus.options.bubblelayout.replace_shortcodes(e)},()=>{if(null===this.search_options){const s=JSON.parse(JSON.stringify(slplus.options)),e=["initial_results_returned","max_results_returned","map_center_lat","map_center_lng","active_locations","city","country","distance_unit","ignore_radius","initial_radius","map_domain","map_end_icon","state","territory"];this.search_options={}
1,e.forEach(e=>{this.search_options[e]=s[e]})}return this.search_options});this.getSearchAddress=function(e){var s=jQuery("#addressInput").val();return s=s||("undefined"!=typeof cslmap&&cslmap.usingSensor&&0!==slp.sensor.lat&&0!==slp.sensor.lng?slp.sensor.lat+","+slp.sensor.lng:e)},this.saneValue=function(e,s){let t=document.getElementById(e);return t=(null===t?s:t.value).trim()},this.load_markers=function(e,s){null===e&&(e=this.gmap.getCenter()),this.lastCenter=e,this.lastRadius=s,e={action:"csl_ajax_search",address:this.saneValue("addressInput","no address entered"),formdata:jQuery("#searchForm").serialize(),lat:e.lat(),lng:e.lng(),options:t(),radius:s,nonce:slplus.nonce},""!==(s=this.saneValue("nameSearch",""))&&(e.store_name=s),""!==(s=this.saneValue("tag_to_search_for",""))&&(e.tags=s),slp_Filter("load_marker_action").publish(e),"0"!==slplus.options.immediately_show_locations&&(e.action="csl_ajax_onload",slplus.options.immediately_show_locations="0",this.search_options=null),slp.send_ajax(e,n.process_ajax_response)},this.process_ajax_response=function(e){valid_response=(valid_response=void 0!==e.response)&&e.success,slp_Filter("location_search_responded").publish(e),valid_response?(cslmap.latest_response=e,cslmap.clearMarkers(),slp_Filter("locations_found").publish(e),cslmap.putMarkers(e.response),jQuery("#map").trigger("markers_dropped")):window.console&&(slp.log("SLP server did not send back a valid JSONP response."),void 0!==e&&slp.log("Response: "+e),void 0!==e.message&&(document.getElementById("map_sidebar").innerHTML=e.message)),slp_Filter("location_search_processed").publish()},this.searchLocations=function(){var e=void 0!==slplus.options.append_to_search&&slplus.options.append_to_search?" "+slplus.options.append_to_search.trim():"",e=this.saneValue("addressInput","")+e;this.unhide_map(),google.maps.event.trigger(this.gmap,"resize"),e?(this.address=e,this.doGeocode()):this.load_markers(null,this.saneValue("radiusSelect","40000"))},this.createSidebar=function(e){(e.pro_tags="")!==e.tags.trim()&&(s=e.tags.replace(/\W/g,"_"),e.pro_tags='<br/><div class="'+s+' slp_result_table_tags"><span class="tagtext">'+e.tags+"</span></div>"),e.phone_with_label=""!==e.phone.trim()?slplus.options.label_phone+e.phone:"",e.fax_with_label=""!==e.fax.trim()?slplus.options.label_fax+e.fax:"";var s=this.__createAddress(e),s=(e.location_address=encodeURIComponent(s),e.search_address=encodeURIComponent(this.getSearchAddress(this.address)),e.hours_sanitized=jQuery("<div/>").html(e.hours).text(),{content:slplus.options.resultslayout.replace_shortcodes(e),finished:!1});return slp_Filter("wrap_location_results").publish(s),s.finished||(s.content='<div class="results_wrapper" id="slp_results_wrapper_'+e.id+'">'+s.content+"</div>"),s.content},this.unhide_map=function(){this.map_hidden&&(jQuery("#map_box_image").hide(),jQuery("#map_box_map").show(),this.map_hidden=!1)},this.__init()}; 2//# sourceMappingURL=slp_core.min.js.map
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.