PageSourceSearch

https://www.foxracing.com/on/demandware.static/Sites-FoxUS-Site/-/en_US/v1791012333451/js/storeLocator.js

js foxracing.com collected 2026-10-03 20:25:19 UTC 6,021 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={300:t=>{function e(t,e){var o=t;return o+=(-1!==o.indexOf("?")?"&":"?")+Object.keys(e).map((function(t){return t+"="+encodeURIComponent(e[t])})).join("&")}function o(t){if(window.history&&window.history.replaceState){var e=window.location.search,o=encodeURIComponent(t);/([?&])radius=[^&]*/.test(e)?e=e.replace(/([?&])radius=[^&]*/,"$1radius="+o):e+=(-1!==e.indexOf("?")?"&":"?")+"radius="+o,window.history.replaceState(null,"",window.location.pathname+e)}}function s(t){var e,o=new google.maps.InfoWindow,s=$(".map-canvas").attr("data-locations"),a=new google.maps.LatLngBounds,n=4;1===(s=JSON.parse(s)).length&&(n=18);var r={scrollwheel:!1,zoom:n,center:t&&"FoxEU"===t?new google.maps.LatLng(54.526,15.2551):new google.maps.LatLng(37.09024,-95.712891)};e=new google.maps.Map($(".map-canvas")[0],r),Object.keys(s).forEach((function(t){var n=s[t],r=parseInt(t,10)+1,i=new google.maps.LatLng(n.latitude,n.longitude),l=new google.maps.Marker({position:i,type:n.storeType.value,map:e,title:n.name,icon:{url:n.backgroundImage,size:new google.maps.Size(45,45),scaledSize:new google.maps.Size(45,45),labelOrigin:new google.maps.Point(24,17)},label:{text:r.toString(),color:n.color,fontSize:"14px"}});l.addListener("click",(function(){o.setOptions({content:n.infoWindowHtml}),o.open(e,l)})),a.extend(l.position),1===s.length&&e.setCenter(i)})),s&&s.length>1&&e.fitBounds(a)}function a(t){var e=$(".js-store-results"),a=$(".map-canvas"),n=t.stores.length>0;n?($(".store-locator-no-results").hide(),$(".filter-results").show(),e.attr("data-has-results",!0)):($(".store-locator-no-results").show(),$(".filter-results").hide(),e.attr("data-has-results",!1)),e.empty().data("has-results",n).data("radius",t.radius).data("search-key",t.searchKey).data("store-type",t.storeType),a.attr("data-locations",t.locations),a.data("has-google-api")?s(t.siteCode):$(".js-store-locator-no-apiKey").show(),t.storesResultsHtml&&e.append(t.storesResultsHtml),n&&$.each(t.storeTypes,(function(e){var o=t.storeTypes[e].value||t.storeTypes[e].value;$('.results [data-store-type="'+o+'"]').length>0&&$('.filter-results [data-filter="'+o+'"]').show()})),o(t.radius)}t.exports={init:function(){$(".map-canvas").data("has-google-api")?s():$(".js-store-locator-no-apiKey").show()},detectLocation:function(){$(".js-detect-location").on("click",(function(){$.spinner().start(),navigator.geolocation?navigator.geolocation.getCurrentPosition((function(t){var o=$(".js-detect-location").data("action");o=e(o,{radius:$(".js-store-results").data("radius"),lat:t.coords.latitude,long:t.coords.longitude}),$.ajax({url:o,type:"get",dataType:"json",success:function(t){$.spinner().stop(),a(t),$(".select-store").prop("disabled",!0),$(".detect-location-invalid").removeClass("d-block")}}).fail((function(){$.spinner().stop()}))}),(function(){$.spinner().stop(),$(".js-detect-location-invalid").addClass("d-block")}),{timeout:5e3}):$.spinner().stop()}))},search:function(){$(".help-center .store-locator-form").submit((function(t){t.preventDefault(),$(".js-detect-location-invalid").removeClass("d-block").hide(),function(t){$.spinner().start();var o=$(".help-center .store-locator-form .js-radius").val()||$(".js-store-results").data("radius"),s=t.attr("action"),n={radius:o},r=t.is("form")?t.serialize():{postalCode:t.find('[name="postalCode"]').val()};s=e(s,n),$.ajax({url:s,type:t.attr("method"),data:r,dataType:"json",success:function(t){a(t),$(".select-store").prop("disabled",!0)},complete:function(){$.spinner().stop()}})}($(this))}))},postalCodeKeyup:function(){$("#postalCode").on("keyup",(function(){$(".js-detect-location-invalid").removeClass("d-block").hide()}))},changeRadius:function(){$(".help-center .store-locator-form .js-radius").change((function(){$(".js-detect-location-invalid").removeClass("d-block").hide();var t=$(this).val();o(t);var s=$(".js-store-results").data("search-key"),n=$(this).data("action-url"),r={};s.postalCode?r={radius:t,postalCode:s.postalCode}:s.lat&&s.long&&(r={radius:t,lat:s.lat,long:s.long}),$(".filter-results [data-filter]").removeClass("active btn-primary").addClass("btn-secondary").hide(),$('.filter-results [data-filter="all"]').addClass("active btn-primary").removeClass("btn-secondary").show(),n=e(n,r),$.spinner().start(),$.ajax({url:n,type:"get",dataType:"json",success:function(t){a(t),$(".select-store").prop("disabled",!0)},complete:function(){$.spinner().stop()}})}))},filterResults:function(){var t=$(".filter-results [data-filter]");t.on("click",(function(o){o.preventDefault(),t.removeClass("active btn-primary").addClass("btn-secondary"),$(this).addClass("active btn-primary").removeClass("btn-secondary");var s=$(this).attr("data-filter"),n=$(".js-store-results").data("radius"),r=$(".js-store-results").data("search-key"),i=$(".store-locator-container .filter-results").data("action-url"),l={};r.postalCode?l={radius:n,postalCode:r.postalCode,storeType:s}:r.lat&&r.long&&(l={radius:n,lat:r.lat,long:r.long,storeType:s}),i=e(i,l),$.spinner().start(),$.ajax({url:i,type:"get",dataType:"json",success:function(t){a(t),$(".select-store").prop("disabled",!0)},complete:function(){$.spinner().stop()}})}))},selectStore:function(){$(".store-locator-container").on("click",".select-store",(function(t){t.preventDefault();
1var e=$(":checked",".results-card .js-store-results"),o={storeID:e.val(),searchRadius:$("#radius").val(),searchPostalCode:$(".js-store-results").data("search-key").postalCode,storeDetailsHtml:e.siblings("label").find(".store-details").html(),event:t};$("body").trigger("store:selected",o)}))},updateSelectStoreButton:function(){$("body").on("change",".select-store-input",(function(){$(".select-store").prop("disabled",!1)}))}}},505:t=>{t.exports=function(t){"function"==typeof t?t():"object"==typeof t&&Object.keys(t).forEach((function(e){"function"==typeof t[e]&&t[e]()}))}}},e={};function o(s){var a=e[s];if(void 0!==a)return a.exports;var n=e[s]={exports:{}};return t[s](n,n.exports,o),n.exports}var s=o(505);$(document).ready((function(){s(o(300))}))})();

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.