1(()=>{function t(){var n,o,r="function"==typeof Symbol?Symbol:{},a=r.iterator||"@@iterator",i=r.toStringTag||"@@toStringTag";function c(t,r,a,i){var c=r&&r.prototype instanceof l?r:l,d=Object.create(c.prototype);return e(d,"_invoke",function(t,e,r){var a,i,c,l=0,d=r||[],u=!1,p={p:0,n:0,v:n,a:f,f:f.bind(n,4),d:function(t,e){return a=t,i=0,c=n,p.n=e,s}};function f(t,e){for(i=t,c=e,o=0;!u&&l&&!r&&o<d.length;o++){var r,a=d[o],f=p.p,m=a[2];t>3?(r=m===e)&&(c=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=n):a[0]<=f&&((r=t<2&&f<a[1])?(i=0,p.v=e,p.n=a[1]):f<m&&(r=t<3||a[0]>e||e>m)&&(a[4]=t,a[5]=e,p.n=m,i=0))}if(r||t>1)return s;throw u=!0,e}return function(r,d,m){if(l>1)throw TypeError("Generator is already running");for(u&&1===d&&f(d,m),i=d,c=m;(o=i<2?n:c)||!u;){a||(i?i<3?(i>1&&(p.n=-1),f(i,c)):p.n=c:p.v=c);try{if(l=2,a){if(i||(r="next"),o=a[r]){if(!(o=o.call(a,c)))throw TypeError("iterator result is not an object");if(!o.done)return o;c=o.value,i<2&&(i=0)}else 1===i&&(o=a.return)&&o.call(a),i<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),i=1);a=n}else if((o=(u=p.n<0)?c:t.call(e,p))!==s)break}catch(t){a=n,i=1,c=t}finally{l=1}}return{value:o,done:u}}}(t,a,i),!0),d}var s={};function l(){}function d(){}function u(){}o=Object.getPrototypeOf;var p=[][a]?o(o([][a]())):(e(o={},a,function(){return this}),o),f=u.prototype=l.prototype=Object.create(p);function m(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,u):(t.__proto__=u,e(t,i,"GeneratorFunction")),t.prototype=Object.create(f),t}return d.prototype=u,e(f,"constructor",u),e(u,"constructor",d),d.displayName="GeneratorFunction",e(u,i,"GeneratorFunction"),e(f),e(f,i,"Generator"),e(f,a,function(){return this}),e(f,"toString",function(){return"[object Generator]"}),(t=function(){return{w:c,m}})()}function e(t,n,o,r){var a=Object.defineProperty;try{a({},"",{})}catch(t){a=0}e=function(t,n,o,r){function i(n,o){e(t,n,function(t){return this._invoke(n,o,t)})}n?a?a(t,n,{value:o,enumerable:!r,configurable:!r,writable:!r}):t[n]=o:(i("next",0),i("throw",1),i("return",2))},e(t,n,o,r)}function n(t,e,n,o,r,a,i){try{var c=t[a](i),s=c.value}catch(t){return void n(t)}c.done?e(s):Promise.resolve(s).then(o,r)}if(window._distributorLocatorInitialized);else{var o,r=function(){var e,r=(e=t().m(function e(){var n,r,u,p,f,m,h,b;return t().w(function(t){for(;;)switch(t.p=t.n){case 0:if(n=document.getElementById("address").value.trim(),r=document.getElementById("radius").value.trim(),n&&r){t.n=1;break}return alert(distributorLocatorMapTranslations.no_stores_found),t.a(2);case 1:return s(),l(),document.querySelector(".distributor-locator-map").classList.remove("show-results"),t.p=2,t.n=3,fetch("/wp-json/distributor-locator/v1/search-stores",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({address:n,radius:r})});case 3:if((u=t.v).ok){t.n=5;break}return t.n=4,u.text();case 4:throw new Error("Failed to fetch store data.");case 5:return t.n=6,u.json();case 6:if(p=t.v,f=p.stores,m=p.formatted_address,f.length>0){a(f,m,r),document.querySelector(".distributor-locator-map").classList.add("show-results");try{h=f.find(function(t){return!isNaN(parseFloat(t.Latitude))&&!isNaN(parseFloat(t.Longitude))}),o&&h&&(b={lat:parseFloat(h.Latitude),lng:parseFloat(h.Longitude)},o.setCenter(b),o.setZoom(d(r))),c(f)}catch(t){console.warn("Map display error:",t)}}else i();t.n=8;break;case 7:t.p=7,t.v,i();case 8:return t.a(2)}},e,null,[[2,7]])}),function(){var t=this,o=arguments;return new Promise(function(r,a){var i=e.apply(t,o);function c(t){n(i,r,a,c,s,"next",t)}function s(t){n(i,r,a,c,s,"throw",t)}c(void 0)})});return function(){return r.apply(this,arguments)}}(),a=function(t,e,n){var o=document.getElementById("results"),r=t.length,a=1===r?distributorLocatorMapTranslations.locations_found_singular:distributorLocatorMapTranslations.locations_found_plural,i=document.createDocumentFragment(),c=document.createElement("p");c.textContent=a.replace("{count}",r).replace("{radius}",n).replace("{unit}",f).replace("{address}",e||"N/A"),i.appendChild(c),t.forEach(function(t,e){var n=document.createElement("div"),o=document.createElement("h2");if(o.dataset.index=e+1,t.Web){var r=document.createElement("a");r.href=t.Web,r.target="_blank",r.textContent=t.Distributor||"N/A",o.appendChild(r)}else o.textContent=t.Distributor||"N/A";n.appendChild(o);var a=document.createElement("p");a.textContent=t["Full Address"]||"N/A",n.appendChild(a);var c=document.createElement("p");if(t.Phone){var s=document.createElement("a");s.href="tel:".concat(t.Phone),s.textContent=t.Phone,c.innerHTML="".concat(distributorLocatorMapTranslations.phone_label,": "),c.appendChild(s)}else{var l=document.createElement("span");l.textContent="N/A",c.innerHTML="".concat(distributorLocatorMapTranslations.phone_label,": "),c.appendChild(l)}n.appendChild(c);var d=document.createElement("p");
1t.Fax&&(d.textContent="".concat(distributorLocatorMapTranslations.fax_label,": ").concat(t.Fax)),n.appendChild(d);var u=document.createElement("p");u.textContent=distributorLocatorMapTranslations.distance_away.replace("{distance}",t.Distance?t.Distance.toFixed(1):distributorLocatorMapTranslations.na).replace("{unit}",f),n.appendChild(u);var p=document.createElement("p"),m=document.createElement("a");if(m.href=t["Full Address"]?"https://www.google.com/maps/dir/?api=1&destination=".concat(encodeURIComponent(t["Full Address"])):"#",m.target="_blank",m.textContent=t["Full Address"]?distributorLocatorMapTranslations.directions:"N/A",p.appendChild(m),n.appendChild(p),t.Custom){var h=document.createElement("div");h.innerHTML=t.Custom,n.appendChild(h)}i.appendChild(n)}),o.innerHTML="",o.appendChild(i)},i=function(){document.getElementById("no-results").style.display="block",document.getElementById("results").textContent=distributorLocatorMapTranslations.no_stores_found},c=function(t){s(),o&&t.forEach(function(t){var e=parseFloat(t.Latitude),n=parseFloat(t.Longitude);if(isNaN(e)||isNaN(n))console.warn("Invalid coordinates for store ID ".concat(t.ID,": ").concat(t.Latitude,", ").concat(t.Longitude));else{var r=new google.maps.Marker({map:o,position:{lat:e,lng:n},title:t.Distributor}),a='\n <div class="info-window">\n <h3><strong>'.concat(t.Distributor,"</strong></h3><br>\n ").concat(t["Full Address"],'<br>\n PHONE: <a href="tel:').concat(t.Phone,'">').concat(t.Phone,"</a>\n ").concat(t.Fax?"<br>FAX: ".concat(t.Fax):"","\n ").concat(t.Web?'<br><a href="'.concat(t.Web,'" target="_blank">Visit Website</a>'):"","\n </div>"),i=new google.maps.InfoWindow({content:a});r.addListener("click",function(){p&&p.close(),i.open(o,r),p=i}),u.push(r)}})},s=function(){u.forEach(function(t){return t.setMap(null)}),u=[]},l=function(){document.getElementById("results").innerHTML="",document.getElementById("no-results").style.display="none"},d=function(t){return(t=parseInt(t,10))<=5?12:t<=10?11:t<=25?10:t<=50?9:t<=100?8:6};window._distributorLocatorInitialized=!0;var u=[],p=null,f="miles"===(void 0!==window.distanceUnitLabel&&window.distanceUnitLabel?window.distanceUnitLabel:"miles").toLowerCase()?distributorLocatorMapTranslations.unit_miles:distributorLocatorMapTranslations.unit_kilometers;window.initMap=function(){if(!o){var t=document.getElementById("map");if(t)try{o=new google.maps.Map(t,{zoom:8,center:{lat:40.7128,lng:-74.006}})}catch(t){console.warn("Google Maps initialization error:",t)}}},document.addEventListener("DOMContentLoaded",function(){var t=document.querySelector(".distributor-locator-container");if(t){var e=t.querySelector("#address");e&&e.focus();var n=document.getElementById("search-form");n&&n.addEventListener("submit",function(t){t.preventDefault(),r()});var o=document.getElementById("find-location");if(o&&o.addEventListener("click",r),"undefined"!=typeof google&&google.maps)initMap();else if(!document.querySelector('script[src*="maps.googleapis.com/maps/api/js"]')){var a=document.createElement("script");a.src="https://maps.googleapis.com/maps/api/js?key=".concat(apiKey,"&libraries=geometry&callback=initMap&loading=async"),a.async=!0,a.defer=!0,document.head.appendChild(a)}}})}})();
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.