https://www.cosmonet.co.za/wp-content/plugins/agile-store-locator/public/js/site_script.js?ver=1.8.7
1var ASLEvent={isGoogleObject_:function(n){return!n||typeof google=="undefined"||!google.maps||typeof ASLMVCObject!="undefined"&&n instanceof ASLMVCObject?!1:google.maps.MVCObject&&n instanceof google.maps.MVCObject?!0:typeof asl_configuration!="undefined"&&String(asl_configuration.map_vendor||"google").toLowerCase()==="google"&&typeof n.addListener=="function"},addListener:function(n,a,d){if(!n||typeof d!="function")return null;if(this.isGoogleObject_(n)&&google.maps.event)return google.maps.event.addListener(n,a,d);n.aslListeners_=n.aslListeners_||{},n.aslListeners_[a]=n.aslListeners_[a]||[];var l={target:n,name:a,callback:d,once:!1};return n.aslListeners_[a].push(l),l},addListenerOnce:function(n,a,d){if(this.isGoogleObject_(n)&&google.maps.event)return google.maps.event.addListenerOnce(n,a,d);var l=this.addListener(n,a,d);return l&&(l.once=!0),l},addDomListener:function(n,a,d){return!n||!n.addEventListener?null:(n.addEventListener(a,d),{target:n,name:a,callback:d,dom:!0})},removeListener:function(n){if(n){if(n.remove&&typeof n.remove=="function"){n.remove();return}if(n.dom){n.target.removeEventListener(n.name,n.callback);return}var a=n.target&&n.target.aslListeners_&&n.target.aslListeners_[n.name];if(a){var d=a.indexOf(n);d!==-1&&a.splice(d,1)}}},trigger:function(n,a){var d=Array.prototype.slice.call(arguments,2);if(this.isGoogleObject_(n)&&google.maps.event){google.maps.event.trigger.apply(google.maps.event,[n,a].concat(d));return}var l=n&&n.aslListeners_&&n.aslListeners_[a];l&&l.slice().forEach(function(b){b.callback.apply(n,d),b.once&&ASLEvent.removeListener(b)})}};typeof window!="undefined"&&(window.ASLEvent=ASLEvent);function ASLMVCObject(){this.aslValues_=this.aslValues_||{},this.aslBindings_=this.aslBindings_||{}}ASLMVCObject.prototype.get=function(n){var a=this.aslBindings_&&this.aslBindings_[n];return a?a.target.get(a.targetKey):(this.aslValues_||{})[n]},ASLMVCObject.prototype.set=function(n,a){var d=this.aslBindings_&&this.aslBindings_[n];return d?d.target.set(d.targetKey,a):(this.aslValues_=this.aslValues_||{},this.aslValues_[n]=a,this.notify(n)),this},ASLMVCObject.prototype.setValues=function(n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&this.set(a,n[a]);return this},ASLMVCObject.prototype.notify=function(n){return typeof this[n+"_changed"]=="function"&&this[n+"_changed"](),ASLEvent.trigger(this,n+"_changed",this.get(n)),this},ASLMVCObject.prototype.bindTo=function(n,a,d,l){return this.unbind(n),this.aslBindings_=this.aslBindings_||{},this.aslBindings_[n]={target:a,targetKey:d||n,listener:ASLEvent.addListener(a,(d||n)+"_changed",this.notify.bind(this,n))},l||this.notify(n),this},ASLMVCObject.prototype.unbind=function(n){var a=this.aslBindings_&&this.aslBindings_[n];if(!a)return this;var d=a.target.get(a.targetKey);return ASLEvent.removeListener(a.listener),delete this.aslBindings_[n],this.aslValues_=this.aslValues_||{},this.aslValues_[n]=d,this},ASLMVCObject.prototype.unbindAll=function(){for(var n=Object.keys(this.aslBindings_||{}),a=0;a<n.length;a++)this.unbind(n[a]);return this},ASLMVCObject.prototype.addListener=function(n,a){return ASLEvent.addListener(this,n,a)},typeof window!="undefined"&&(window.ASLMVCObject=ASLMVCObject);function asl_has_google_maps(){return typeof window!="undefined"&&window.google&&window.google.maps}function asl_shared_uses_maplibre(){return typeof asl_configuration!="undefined"&&String(asl_configuration.map_vendor||"google").toLowerCase()==="maplibre"}function asl_requires_google_runtime(){if(typeof asl_configuration=="undefined")return!0;var n=String(asl_configuration.map_vendor||"google").toLowerCase(),a=String(asl_configuration.search_provider||"automatic").toLowerCase();return n==="google"||["google","google_new","google_legacy"].indexOf(a)!==-1}function asl_is_maplibre(){return asl_shared_uses_maplibre()}function ASLLatLng(n,a){if(asl_has_google_maps()&&!asl_shared_uses_maplibre())return new google.maps.LatLng(n,a);this._lat=Number(n),this._lng=Number(a)}ASLLatLng.prototype.lat=function(){return this._lat},ASLLatLng.prototype.lng=function(){return this._lng},ASLLatLng.prototype.toJSON=function(){return{lat:this._lat,lng:this._lng}};
1function ASLLatLngBounds(n,a){if(asl_has_google_maps()&&!asl_shared_uses_maplibre())return new google.maps.LatLngBounds(n,a);this._south=1/0,this._west=1/0,this._north=-1/0,this._east=-1/0,n&&this.extend(n),a&&this.extend(a)}ASLLatLngBounds.prototype.extend=function(n){var a=Number(typeof n.lat=="function"?n.lat():n.lat),d=Number(typeof n.lng=="function"?n.lng():n.lng);return!Number.isFinite(a)||!Number.isFinite(d)?this:(this._south=Math.min(this._south,a),this._west=Math.min(this._west,d),this._north=Math.max(this._north,a),this._east=Math.max(this._east,d),this)},ASLLatLngBounds.prototype.getSouthWest=function(){return new ASLLatLng(this._south,this._west)},ASLLatLngBounds.prototype.getNorthEast=function(){return new ASLLatLng(this._north,this._east)},ASLLatLngBounds.prototype.getCenter=function(){return new ASLLatLng((this._south+this._north)/2,(this._west+this._east)/2)},ASLLatLngBounds.prototype.isEmpty=function(){return!Number.isFinite(this._south)},ASLLatLngBounds.prototype.contains=function(n){if(this.isEmpty())return!1;var a=Number(typeof n.lat=="function"?n.lat():n.lat),d=Number(typeof n.lng=="function"?n.lng():n.lng);return a>=this._south&&a<=this._north&&d>=this._west&&d<=this._east};function asl_normalize_bounds(n){if(!n||typeof n.getSouthWest!="function"||typeof n.getNorthEast!="function")return null;if(!asl_shared_uses_maplibre())return n;
1var a=n.getSouthWest(),d=n.getNorthEast(),l=Number(typeof a.lat=="function"?a.lat():a.lat),b=Number(typeof a.lng=="function"?a.lng():a.lng),P=Number(typeof d.lat=="function"?d.lat():d.lat),Q=Number(typeof d.lng=="function"?d.lng():d.lng);return[l,b,P,Q].every(Number.isFinite)?new ASLLatLngBounds(new ASLLatLng(l,b),new ASLLatLng(P,Q)):null}function asl_bounds_contains(n,a){if(!n||!a||typeof n.contains!="function")return!1;var d=Number(typeof a.lat=="function"?a.lat():a.lat),l=Number(typeof a.lng=="function"?a.lng():a.lng);return Number.isFinite(d)&&Number.isFinite(l)&&n.contains({lat:d,lng:l})}function ASLPoint(n,a){if(asl_has_google_maps()&&!asl_shared_uses_maplibre())return new google.maps.Point(n,a);this.x=Number(n),this.y=Number(a)}function ASLSize(n,a){if(asl_has_google_maps()&&!asl_shared_uses_maplibre())return new google.maps.Size(n,a);this.width=Number(n),this.height=Number(a)}function ASLMarkerImage(n,a,d,l,b){return asl_has_google_maps()&&!asl_shared_uses_maplibre()?new google.maps.MarkerImage(n,a,d,l,b):{url:n,size:a,origin:d,anchor:l,scaledSize:b}}var ASLControlPosition=asl_has_google_maps()&&!asl_shared_uses_maplibre()?google.maps.ControlPosition:{TOP_LEFT:1,TOP_CENTER:2,TOP_RIGHT:3,LEFT_TOP:4,RIGHT_TOP:5,LEFT_CENTER:6,RIGHT_CENTER:7,LEFT_BOTTOM:8,RIGHT_BOTTOM:9,BOTTOM_LEFT:10,BOTTOM_CENTER:11,BOTTOM_RIGHT:12},ASLAnimation=asl_has_google_maps()&&!asl_shared_uses_maplibre()?google.maps.Animation:{BOUNCE:"BOUNCE",DROP:"DROP"},ASLUnitSystem=asl_has_google_maps()&&!asl_shared_uses_maplibre()?google.maps.UnitSystem:{METRIC:0,IMPERIAL:1},asl_gdpr=function(n){window.asl_async_callback=function(){asl_store_locator()};var a=!1;function d(){if(!a){if(a=!0,!asl_requires_google_runtime()){window.asl_async_callback();return}var b=document.createElement("script");b.type="text/javascript",b.src="https://maps.googleapis.com/maps/api/js?libraries=places&callback=asl_async_callback&key="+asl_configuration.api_key,document.body.appendChild(b)}}function l(){window.localStorage&&window.localStorage.setItem("asl-gdpr",1),asl_configuration.gdpr=!1,d(),jQuery(".asl-cont #sl-btn-gdpr").parent().parent().parent().remove()}if(n){asl_configuration.gdpr=!1,d();return}jQuery(".asl-cont #sl-btn-gdpr").on("click",l),window.localStorage&&window.localStorage.getItem("asl-gdpr")=="1"&&l()};asl_configuration.gdpr=="1"&&(asl_configuration.gdpr_enabled=!0,asl_gdpr()),window.asl_init_callback=function(){asl_store_locator()};function asl_store_locator(){if(asl_configuration.gdpr=="1")return;if(asl_requires_google_runtime()&&!asl_has_google_maps()){asl_configuration.google_maps_wait_started||(asl_configuration.google_maps_wait_started=Date.now()),Date.now()-asl_configuration.google_maps_wait_started<15e3?(window.clearTimeout(asl_configuration.google_maps_wait_timer),asl_configuration.google_maps_wait_timer=window.setTimeout(asl_store_locator,100)):asl_configuration.google_maps_load_failed||(asl_configuration.google_maps_load_failed=!0,asl_configuration.gdpr_enabled||console.warn("Store Locator Error! Google Maps library did not load within 15 seconds. Check browser blocking, network, CSP, API key, or cache settings."));return}if(window.clearTimeout(asl_configuration.google_maps_wait_timer),asl_configuration.google_maps_wait_timer=null,jQuery(".storelocator-main").length>=2&&console.warn("Store Locator Error! Multiple instances of store locator loaded on the page."),window._asl_map_customize||(window._asl_map_customize=null),asl_configuration.is_loaded)return;asl_configuration.is_loaded=!0;var asl_locator=function(){},do_geocoding=null;if(asl_locator.show_map_error=function(n){var a=document.getElementById("asl-map-canv");if(a){var d=a.querySelector(".asl-map-error");d&&d.remove();var l=document.createElement("div");l.className="asl-map-error alert alert-danger",l.setAttribute("role","alert"),l.textContent=n,l.style.cssText="position:absolute;z-index:10;top:12px;left:12px;right:12px;margin:0;",window.getComputedStyle(a).position==="static"&&(a.style.position="relative"),a.appendChild(l)}},!jQuery.fn.adropdown){/*! 2* Bootstrap v4.6.1 (https://getbootstrap.com/) 3* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 4* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 5*/(function(n,a){typeof exports=="object"&&typeof module!="undefined"?a(exports,require("jquery")):typeof define=="function"&&define.amd?define(["exports","jquery"],a):a((n=typeof globalThis!="undefined"?globalThis:n||self).bootstrap={},n.jQuery)})(this,(function(n,a){"use strict";function d(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var l=d(a);function b(r,f){for(var c=0;c<f.length;c++){var _=f[c];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(r,_.key,_)}}function P(r,f,c){return f&&b(r.prototype,f),c&&b(r,c),r}function Q(){return Q=Object.assign||function(r){for(var f=1;f<arguments.length;f++){var c=arguments[f];for(var _ in c)Object.prototype.hasOwnProperty.call(c,_)&&(r[_]=c[_])}return r},Q.apply(this,arguments)}var H="bs4_transitionend",V={TRANSITION_END:H,getUID:function(r){do r+=~~(1e6*Math.random());while(document.getElementById(r));return r},getSelectorFromElement:function(r){var f=r.getAttribute("data-target");if(!f||f==="#"){var c=r.getAttribute("href");f=c&&c!=="#"?c.trim():""}try{return document.querySelector(f)?f:null}catch(_){return null}},getTransitionDurationFromElement:function(r){if(!r)return 0;var f=l.default(r).css("transition-duration"),c=l.default(r).css("transition-delay"),_=parseFloat(f),x=parseFloat(c);return _||x?(f=f.split(",")[0],c=c.split(",")[0],1e3*(parseFloat(f)+parseFloat(c))):0},reflow:function(r){return r.offsetHeight},triggerTransitionEnd:function(r){l.default(r).trigger(H)},supportsTransitionEnd:function(){return!!H},isElement:function(r){return(r[0]||r).nodeType},typeCheckConfig:function(r,f,c){for(var _ in c)if(Object.prototype.hasOwnProperty.call(c,_)){var x=c[_],E=f[_],A=E&&V.isElement(E)?"element":(Z=E)===null||typeof Z=="undefined"?""+Z:{}.toString.call(Z).match(/\s([a-z]+)/i)[1].toLowerCase();if(!new RegExp(x).test(A))throw new Error(r.toUpperCase()+': Option "'+_+'" provided type "'+A+'" but expected type "'+x+'".')}var Z},findShadowRoot:function(r){if(!document.documentElement.attachShadow)return null;if(typeof r.getRootNode=="function"){var f=r.getRootNode();return f instanceof ShadowRoot?f:null}return r instanceof ShadowRoot?r:r.parentNode?V.findShadowRoot(r.parentNode):null},jQueryDetection:function(){typeof l.default=="undefined"&&console.log("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var r=l.default.fn.jquery.split(" ")[0].split(".");(r[0]<2&&r[1]<9||r[0]===1&&r[1]===9&&r[2]<1||r[0]>=4)&&console.log("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}};V.jQueryDetection(),l.default.fn.emulateTransitionEnd=function(r){var f=this,c=!1;return l.default(this).one(H,(function(){c=!0})),setTimeout((function(){c||V.triggerTransitionEnd(f)}),r),this},l.default.event.special.bs4_transitionend={bindType:H,delegateType:H,handle:function(r){if(l.default(r.target).is(this))return r.handleObj.handler.apply(this,arguments)}};var ut="colision",wt="bs.colision",It=l.default.fn[ut],mt="show",ct="colision",Ct="collapsing",Dt="colisiond",zt="width",Gt='[data-toggle="colision"]',oe={toggle:!0,parent:""},Wt={toggle:"boolean",parent:"(string|element)"},t=(function(){function r(c,_){this._isTransitioning=!1,this._element=c,this._config=this._getConfig(_),this._triggerArray=[].slice.call(document.querySelectorAll('[data-toggle="colision"][href="#'+c.id+'"],[data-toggle="colision"][data-target="#'+c.id+'"]'));for(var x=[].slice.call(document.querySelectorAll(Gt)),E=0,A=x.length;E<A;E++){var Z=x[E],tt=V.getSelectorFromElement(Z),_t=[].slice.call(document.querySelectorAll(tt)).filter((function(Rt){return Rt===c}));tt!==null&&_t.length>0&&(this._selector=tt,this._triggerArray.push(Z))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndaCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var f=r.prototype;return f.toggle=function(){l.default(this._element).hasClass(mt)?this.hide():this.show()},f.show=function(){var c,_,x=this;if(!(this._isTransitioning||l.default(this._element).hasClass(mt)||(this._parent&&(c=[].slice.call(this._parent.querySelectorAll(".show, .collapsing")).filter((function(_t){return typeof x._config.parent=="string"?_t.getAttribute("data-parent")===x._config.parent:_t.classList.contains(ct)}))).length===0&&(c=null),c&&(_=l.default(c).not(this._selector).data(wt))&&_._isTransitioning))){var E=l.default.Event("show.bs.colision");if(l.default(this._element).trigger(E),!E.isDefaultPrevented()){c&&(r._jQueryInterface.call(l.default(c).not(this._selector),"hide"),_||l.default(c).data(wt,null));var A=this._getDimension();l.default(this._element).removeClass(ct).addClass(Ct),this._element.style[A]=0,this._triggerArray.length&&l.default(this._triggerArray).removeClass(Dt).attr("aria-expanded",!0),this.setTransitioning(!0);var Z="scroll"+(A[0].toUpperCase()+A.slice(1)),tt=V.getTransitionDurationFromElement(this._element);l.default(this._element).one(V.TRANSITION_END,(function(){l.default(x._element).removeClass(Ct).addClass("colision show"),x._element.style[A]="",x.setTransitioning(!1),l.default(x._element).trigger("shown.bs.colision")})).emulateTransitionEnd(tt),this._element.style[A]=this._element[Z]+"px"}}},f.hide=function(){var c=this;if(!this._isTransitioning&&l.default(this._element).hasClass(mt)){var _=l.default.Event("hide.bs.colision");if(l.default(this._element).trigger(_),!_.isDefaultPrevented()){var x=this._getDimension();this._element.style[x]=this._element.getBoundingClientRect()[x]+"px",V.reflow(this._element),l.default(this._element).addClass(Ct).removeClass("colision show");var E=this._triggerArray.length;if(E>0)for(var A=0;A<E;A++){var Z=this._triggerArray[A],tt=V.getSelectorFromElement(Z);tt!==null&&(l.default([].slice.call(document.querySelectorAll(tt))).hasClass(mt)||l.default(Z).addClass(Dt).attr("aria-expanded",!1))}this.setTransitioning(!0),this._element.style[x]="";var _t=V.getTransitionDurationFromElement(this._element);l.default(this._element).one(V.TRANSITION_END,(function(){c.setTransitioning(!1),l.default(c._element).removeClass(Ct).addClass(ct).trigger("hidden.bs.colision")})).emulateTransitionEnd(_t)}}},f.setTransitioning=function(c){this._isTransitioning=c},f.dispose=function(){l.default.removeData(this._element,wt),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},f._getConfig=function(c){return(c=Q({},oe,c)).toggle=!!c.toggle,V.typeCheckConfig(ut,c,Wt),c},f._getDimension=function(){return l.default(this._element).hasClass(zt)?zt:"height"},f._getParent=function(){var c,_=this;V.isElement(this._config.parent)?(c=this._config.parent,typeof this._config.parent.jquery!="undefined"&&(c=this._config.parent[0])):c=document.querySelector(this._config.parent);var x='[data-toggle="colision"][data-parent="'+this._config.parent+'"]',E=[].slice.call(c.querySelectorAll(x));return l.default(E).each((function(A,Z){_._addAriaAndaCollapsedClass(r._getTargetFromElement(Z),[Z])})),c},f._addAriaAndaCollapsedClass=function(c,_){var x=l.default(c).hasClass(mt);_.length&&l.default(_).toggleClass(Dt,!x).attr("aria-expanded",x)},r._getTargetFromElement=function(c){var _=V.getSelectorFromElement(c);return _?document.querySelector(_):null},r._jQueryInterface=function(c){return this.each((function(){var _=l.default(this),x=_.data(wt),E=Q({},oe,_.data(),typeof c=="object"&&c?c:{});if(!x&&E.toggle&&typeof c=="string"&&/show|hide/.test(c)&&(E.toggle=!1),x||(x=new r(this,E),_.data(wt,x)),typeof c=="string"){if(typeof x[c]=="undefined")throw new TypeError('No method n
5amed "'+c+'"');x[c]()}}))},P(r,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return oe}}]),r})();l.default(document).on("click.bs.colision.data-api",Gt,(function(r){r.currentTarget.tagName==="A"&&r.preventDefault();var f=l.default(this),c=V.getSelectorFromElement(this),_=[].slice.call(document.querySelectorAll(c));l.default(_).each((function(){var x=l.default(this),E=x.data(wt)?"toggle":f.data();t._jQueryInterface.call(x,E)}))})),l.default.fn[ut]=t._jQueryInterface,l.default.fn[ut].Constructor=t,l.default.fn[ut].noConflict=function(){return l.default.fn[ut]=It,t._jQueryInterface};var e=typeof window!="undefined"&&typeof document!="undefined"&&typeof navigator!="undefined",o=(function(){for(var r=["Edge","Trident","Firefox"],f=0;f<r.length;f+=1)if(e&&navigator.userAgent.indexOf(r[f])>=0)return 1;return 0})(),s=e&&window.Promise?function(r){var f=!1;return function(){f||(f=!0,window.Promise.resolve().then((function(){f=!1,r()})))}}:function(r){var f=!1;return function(){f||(f=!0,setTimeout((function(){f=!1,r()}),o))}};function u(r){return r&&{}.toString.call(r)==="[object Function]"}function p(r,f){if(r.nodeType!==1)return[];var c=r.ownerDocument.defaultView.getComputedStyle(r,null);return f?c[f]:c}function h(r){return r.nodeName==="HTML"?r:r.parentNode||r.host}function g(r){if(!r)return document.body;switch(r.nodeName){case"HTML":case"BODY":return r.ownerDocument.body;case"#document":return r.body}var f=p(r),c=f.overflow,_=f.overflowX,x=f.overflowY;return/(auto|scroll|overlay)/.test(c+x+_)?r:g(h(r))}function w(r){return r&&r.referenceNode?r.referenceNode:r}var C=e&&!(!window.MSInputMethodContext||!document.documentMode),R=e&&/MSIE 10/.test(navigator.userAgent);function z(r){return r===11?C:r===10?R:C||R}function it(r){if(!r)return document.documentElement;for(var f=z(10)?document.body:null,c=r.offsetParent||null;c===f&&r.nextElementSibling;)c=(r=r.nextElementSibling).offsetParent;var _=c&&c.nodeName;return _&&_!=="BODY"&&_!=="HTML"?["TH","TD","TABLE"].indexOf(c.nodeName)!==-1&&p(c,"position")==="static"?it(c):c:r?r.ownerDocument.documentElement:document.documentElement}function k(r){return r.parentNode!==null?k(r.parentNode):r}function at(r,f){if(!(r&&r.nodeType&&f&&f.nodeType))return document.documentElement;var c=r.compareDocumentPosition(f)&Node.DOCUMENT_POSITION_FOLLOWING,_=c?r:f,x=c?f:r,E=document.createRange();E.setStart(_,0),E.setEnd(x,0);var A,Z,tt=E.commonAncestorContainer;if(r!==tt&&f!==tt||_.contains(x))return(Z=(A=tt).nodeName)==="BODY"||Z!=="HTML"&&it(A.firstElementChild)!==A?it(tt):tt;var _t=k(r);return _t.host?at(_t.host,f):at(r,k(f).host)}function M(r){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",c=f==="top"?"scrollTop":"scrollLeft",_=r.nodeName;if(_==="BODY"||_==="HTML"){var x=r.ownerDocument.documentElement,E=r.ownerDocument.scrollingElement||x;return E[c]}return r[c]}function q(r,f){var c=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=M(f,"top"),x=M(f,"left"),E=c?-1:1;return r.top+=_*E,r.bottom+=_*E,r.left+=x*E,r.right+=x*E,r}function W(r,f){var c=f==="x"?"Left":"Top",_=c==="Left"?"Right":"Bottom";return parseFloat(r["border"+c+"Width"])+parseFloat(r["border"+_+"Width"])}function Y(r,f,c,_){return Math.max(f["offset"+r],f["scroll"+r],c["client"+r],c["offset"+r],c["scroll"+r],z(10)?parseInt(c["offset"+r])+parseInt(_["margin"+(r==="Height"?"Top":"Left")])+parseInt(_["margin"+(r==="Height"?"Bottom":"Right")]):0)}function bt(r){var f=r.body,c=r.documentElement,_=z(10)&&getComputedStyle(c);return{height:Y("Height",f,c,_),width:Y("Width",f,c,_)}}var yt=function(r,f){if(!(r instanceof f))throw new TypeError("Cannot call a class as a function")},Tt=(function(){function r(f,c){for(var _=0;_<c.length;_++){var x=c[_];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(f,x.key,x)}}return function(f,c,_){return c&&r(f.prototype,c),_&&r(f,_),f}})(),Nt=function(r,f,c){return f in r?Object.defineProperty(r,f,{value:c,enumerable:!0,configurable:!0,writable:!0}):r[f]=c,r},gt=Object.assign||function(r){for(var f=1;f<arguments.length;f++){var c=arguments[f];for(var _ in c)Object.prototype.hasOwnProperty.call(c,_)&&(r[_]=c[_])}return r};function Et(r){return gt({}
5,r,{right:r.left+r.width,bottom:r.top+r.height})}function qt(r){var f={};try{if(z(10)){f=r.getBoundingClientRect();var c=M(r,"top"),_=M(r,"left");f.top+=c,f.left+=_,f.bottom+=c,f.right+=_}else f=r.getBoundingClientRect()}catch(pt){}var x={left:f.left,top:f.top,width:f.right-f.left,height:f.bottom-f.top},E=r.nodeName==="HTML"?bt(r.ownerDocument):{},A=E.width||r.clientWidth||x.width,Z=E.height||r.clientHeight||x.height,tt=r.offsetWidth-A,_t=r.offsetHeight-Z;if(tt||_t){var Rt=p(r);tt-=W(Rt,"x"),_t-=W(Rt,"y"),x.width-=tt,x.height-=_t}return Et(x)}function m(r,f){var c=arguments.length>2&&arguments[2]!==void 0&&arguments[2],_=z(10),x=f.nodeName==="HTML",E=qt(r),A=qt(f),Z=g(r),tt=p(f),_t=parseFloat(tt.borderTopWidth),Rt=parseFloat(tt.borderLeftWidth);c&&x&&(A.top=Math.max(A.top,0),A.left=Math.max(A.left,0));var pt=Et({top:E.top-A.top-_t,left:E.left-A.left-Rt,width:E.width,height:E.height});if(pt.marginTop=0,pt.marginLeft=0,!_&&x){var Mt=parseFloat(tt.marginTop),jt=parseFloat(tt.marginLeft);pt.top-=_t-Mt,pt.bottom-=_t-Mt,pt.left-=Rt-jt,pt.right-=Rt-jt,pt.marginTop=Mt,pt.marginLeft=jt}return(_&&!c?f.contains(Z):f===Z&&Z.nodeName!=="BODY")&&(pt=q(pt,f)),pt}function y(r){var f=arguments.length>1&&arguments[1]!==void 0&&arguments[1],c=r.ownerDocument.documentElement,_=m(r,c),x=Math.max(c.clientWidth,window.innerWidth||0),E=Math.max(c.clientHeight,window.innerHeight||0),A=f?0:M(c),Z=f?0:M(c,"left"),tt={top:A-_.top+_.marginTop,left:Z-_.left+_.marginLeft,width:x,height:E};return Et(tt)}function v(r){var f=r.nodeName;if(f==="BODY"||f==="HTML")return!1;if(p(r,"position")==="fixed")return!0;var c=h(r);return!!c&&v(c)}function L(r){if(!r||!r.parentElement||z())return document.documentElement;for(var f=r.parentElement;f&&p(f,"transform")==="none";)f=f.parentElement;return f||document.documentElement}function D(r,f,c,_){var x=arguments.length>4&&arguments[4]!==void 0&&arguments[4],E={top:0,left:0},A=x?L(r):at(r,w(f));if(_==="viewport")E=y(A,x);else{var Z=void 0;_==="scrollParent"?(Z=g(h(f))).nodeName==="BODY"&&(Z=r.ownerDocument.documentElement):Z=_==="window"?r.ownerDocument.documentElement:_;var tt=m(Z,A,x);if(Z.nodeName!=="HTML"||v(A))E=tt;else{var _t=bt(r.ownerDocument),Rt=_t.height,pt=_t.width;
vendor: 1,260 bytes, line 5
5E.top+=tt.top-tt.marginTop,E.bottom=Rt+tt.top,E.left+=tt.left-tt.marginLeft,E.right=pt+tt.left}}var Mt=typeof(c=c||0)=="number";return E.left+=Mt?c:c.left||0,E.top+=Mt?c:c.top||0,E.right-=Mt?c:c.right||0,E.bottom-=Mt?c:c.bottom||0,E}function U(r){return r.width*r.height}function G(r,f,c,_,x){var E=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(r.indexOf("auto")===-1)return r;var A=D(c,_,E,x),Z={top:{width:A.width,height:f.top-A.top},right:{width:A.right-f.right,height:A.height},bottom:{width:A.width,height:A.bottom-f.bottom},left:{width:f.left-A.left,height:A.height}},tt=Object.keys(Z).map((function(Mt){return gt({key:Mt},Z[Mt],{area:U(Z[Mt])})})).sort((function(Mt,jt){return jt.area-Mt.area})),_t=tt.filter((function(Mt){var jt=Mt.width,Kt=Mt.height;return jt>=c.clientWidth&&Kt>=c.clientHeight})),Rt=_t.length>0?_t[0].key:tt[0].key,pt=r.split("-")[1];return Rt+(pt?"-"+pt:"")}function N(r,f,c){var _=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,x=_?L(f):at(f,w(c));return m(c,x,_)}function B(r){var f=r.ownerDocument.defaultView.getComputedStyle(r),c=parseFloat(f.marginTop||0)+parseFloat(f.marginBottom||0),_=parseFloat(f.marginLeft||0)+parseFloat(f.marginRight||0);return{width:r.offsetWidth+_,height:r.offsetHeight+c}}
vendor: 4,134 bytes, line 5
5function S(r){var f={left:"right",right:"left",bottom:"top",top:"bottom"};return r.replace(/left|right|bottom|top/g,(function(c){return f[c]}))}function F(r,f,c){c=c.split("-")[0];var _=B(r),x={width:_.width,height:_.height},E=["right","left"].indexOf(c)!==-1,A=E?"top":"left",Z=E?"left":"top",tt=E?"height":"width",_t=E?"width":"height";return x[A]=f[A]+f[tt]/2-_[tt]/2,x[Z]=c===Z?f[Z]-_[_t]:f[S(Z)],x}function J(r,f){return Array.prototype.find?r.find(f):r.filter(f)[0]}function K(r,f,c){return(c===void 0?r:r.slice(0,(function(_,x,E){if(Array.prototype.findIndex)return _.findIndex((function(Z){return Z.name===E}));var A=J(_,(function(Z){return Z.name===E}));return _.indexOf(A)})(r,0,c))).forEach((function(_){_.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var x=_.function||_.fn;_.enabled&&u(x)&&(f.offsets.popper=Et(f.offsets.popper),f.offsets.reference=Et(f.offsets.reference),f=x(f,_))})),f}function Lt(){if(!this.state.isDestroyed){var r={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};r.offsets.reference=N(this.state,this.popper,this.reference,this.options.positionFixed),r.placement=G(this.options.placement,r.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),r.originalPlacement=r.placement,r.positionFixed=this.options.positionFixed,r.offsets.popper=F(this.popper,r.offsets.reference,r.placement),r.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",r=K(this.modifiers,r),this.state.isCreated?this.options.onUpdate(r):(this.state.isCreated=!0,this.options.onCreate(r))}}function St(r,f){return r.some((function(c){var _=c.name;return c.enabled&&_===f}))}function st(r){for(var f=[!1,"ms","Webkit","Moz","O"],c=r.charAt(0).toUpperCase()+r.slice(1),_=0;_<f.length;_++){var x=f[_],E=x?""+x+c:r;if(typeof document.body.style[E]!="undefined")return E}return null}function vt(){return this.state.isDestroyed=!0,St(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[st("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function lt(r){var f=r.ownerDocument;return f?f.defaultView:window}function Pt(r,f,c,_){var x=r.nodeName==="BODY",E=x?r.ownerDocument.defaultView:r;E.addEventListener(f,c,{passive:!0}),x||Pt(g(E.parentNode),f,c,_),_.push(E)}function X(r,f,c,_){c.updateBound=_,lt(r).addEventListener("resize",c.updateBound,{passive:!0});var x=g(r);return Pt(x,"scroll",c.updateBound,c.scrollParents),c.scrollElement=x,c.eventsEnabled=!0,c}function et(){this.state.eventsEnabled||(this.state=X(this.reference,this.options,this.state,this.scheduleUpdate))}function xt(){var r,f;this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=(r=this.reference,f=this.state,lt(r).removeEventListener("resize",f.updateBound),f.scrollParents.forEach((function(c){c.removeEventListener("scroll",f.updateBound)})),f.updateBound=null,f.scrollParents=[],f.scrollElement=null,f.eventsEnabled=!1,f))}function dt(r){return r!==""&&!isNaN(parseFloat(r))&&isFinite(r)}function ht(r,f){Object.keys(f).forEach((function(c){var _="";["width","height","top","right","bottom","left"].indexOf(c)!==-1&&dt(f[c])&&(_="px"),r.style[c]=f[c]+_}))}var O=e&&/Firefox/i.test(navigator.userAgent);function ot(r,f,c){var _=J(r,(function(Z){return Z.name===f})),x=!!_&&r.some((function(Z){return Z.name===c&&Z.enabled&&Z.order<_.order}));if(!x){var E="`"+f+"`",A="`"+c+"`";console.warn(A+" modifier is required by "+E+" modifier in order to work, be sure to include it before "+E+"!")}return x}var nt=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],Ft=nt.slice(3);function At(r){var f=arguments.length>1&&arguments[1]!==void 0&&arguments[1],c=Ft.indexOf(r),_=Ft.slice(c+1).c
5oncat(Ft.slice(0,c));return f?_.reverse():_}var Vt={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:{shift:{order:100,enabled:!0,fn:function(r){var f=r.placement,c=f.split("-")[0],_=f.split("-")[1];if(_){var x=r.offsets,E=x.reference,A=x.popper,Z=["bottom","top"].indexOf(c)!==-1,tt=Z?"left":"top",_t=Z?"width":"height",Rt={start:Nt({},tt,E[tt]),end:Nt({},tt,E[tt]+E[_t]-A[_t])};r.offsets.popper=gt({},A,Rt[_])}return r}},offset:{order:200,enabled:!0,fn:function(r,f){var c,_=f.offset,x=r.placement,E=r.offsets,A=E.popper,Z=E.reference,tt=x.split("-")[0];return c=dt(+_)?[+_,0]:(function(_t,Rt,pt,Mt){var jt=[0,0],Kt=["right","left"].indexOf(Mt)!==-1,Jt=_t.split(/(\+|\-)/).map((function(Yt){return Yt.trim()})),ee=Jt.indexOf(J(Jt,(function(Yt){return Yt.search(/,|\s/)!==-1})));Jt[ee]&&Jt[ee].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var ce=/\s*,\s*|\s+/,ie=ee!==-1?[Jt.slice(0,ee).concat([Jt[ee].split(ce)[0]]),[Jt[ee].split(ce)[1]].concat(Jt.slice(ee+1))]:[Jt];return ie=ie.map((function(Yt,ue){var le=(ue===1?!Kt:Kt)?"height":"width",ne=!1;return Yt.reduce((function(re,se){return re[re.length-1]===""&&["+","-"].indexOf(se)!==-1?(re[re.length-1]=se,ne=!0,re):ne?(re[re.length-1]+=se,ne=!1,re):re.concat(se)}),[]).map((function(re){return(function(se,ye,me,ve){var ge=se.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),_e=+ge[1],fe=ge[2];return _e?fe.indexOf("%")===0?Et(fe==="%p"?me:ve)[ye]/100*_e:fe==="vh"||fe==="vw"?(fe==="vh"?Math.max(document.documentElement.clientHeight,window.innerHeight||0):Math.max(document.documentElement.clientWidth,window.innerWidth||0))/100*_e:_e:se})(re,le,Rt,pt)}))})),ie.forEach((function(Yt,ue){Yt.forEach((function(le,ne){dt(le)&&(jt[ue]+=le*(Yt[ne-1]==="-"?-1:1))}))})),jt})(_,A,Z,tt),tt==="left"?(A.top+=c[0],A.left-=c[1]):tt==="right"?(A.top+=c[0],A.left+=c[1]):tt==="top"?(A.left+=c[0],A.top-=c[1]):tt==="bottom"&&(A.left+=c[0],A.top+=c[1]),r.popper=A,r},offset:0},preventOverflow:{order:300,enabled:!0,fn:function(r,f){var c=f.boundariesElement||it(r.instance.popper);r.instance.reference===c&&(c=it(c));var _=st("transform"),x=r.instance.popper.style,E=x.top,A=x.left,Z=x[_];x.top="",x.left="",x[_]="";var tt=D(r.instance.popper,r.instance.reference,f.padding,c,r.positionFixed);x.top=E,x.left=A,x[_]=Z,f.boundaries=tt;var _t=f.priority,Rt=r.offsets.popper,pt={primary:function(Mt){var jt=Rt[Mt];return Rt[Mt]<tt[Mt]&&!f.escapeWithReference&&(jt=Math.max(Rt[Mt],tt[Mt])),Nt({},Mt,jt)},secondary:function(Mt){var jt=Mt==="right"?"left":"top",Kt=Rt[jt];return Rt[Mt]>tt[Mt]&&!f.escapeWithReference&&(Kt=Math.min(Rt[jt],tt[Mt]-(Mt==="right"?Rt.width:Rt.height))),Nt({},jt,Kt)}};return _t.forEach((function(Mt){var jt=["left","top"].indexOf(Mt)!==-1?"primary":"secondary";Rt=gt({},Rt,pt[jt](Mt))})),r.offsets.popper=Rt,r},priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:function(r){var f=r.offsets,c=f.popper,_=f.reference,x=r.placement.split("-")[0],E=Math.floor,A=["top","bottom"].indexOf(x)!==-1,Z=A?"right":"bottom",tt=A?"left":"top",_t=A?"width":"height";return c[Z]<E(_[tt])&&(r.offsets.popper[tt]=E(_[tt])-c[_t]),c[tt]>E(_[Z])&&(r.offsets.popper[tt]=E(_[Z])),r}},arrow:{order:500,enabled:!0,fn:function(r,f){var c;if(!ot(r.instance.modifiers,"arrow","keepTogether"))return r;var _=f.element;if(typeof _=="string"){if(!(_=r.instance.popper.querySelector(_)))return r}else if(!r.instance.popper.contains(_))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),r;var x=r.placement.split("-")[0],E=r.offsets,A=E.popper,Z=E.reference,tt=["left","right"].indexOf(x)!==-1,_t=tt?"height":"width",Rt=tt?"Top":"Left",pt=Rt.toLowerCase(),Mt=tt?"left":"top",jt=tt?"bottom":"right",Kt=B(_)[_t];Z[jt]-Kt<A[pt]&&(r.offsets.popper[pt]-=A[pt]-(Z[jt]-Kt)),Z[pt]+Kt>A[jt]&&(r.offsets.popper[pt]+=Z[pt]+Kt-A[jt]),r.offsets.popper=Et(r.offsets.popper);var Jt=Z[pt]+Z[_t]/2-Kt/2,ee=p(r.instance.popper),ce=parseFloat(ee["margin"+
5Rt]),ie=parseFloat(ee["border"+Rt+"Width"]),Yt=Jt-r.offsets.popper[pt]-ce-ie;return Yt=Math.max(Math.min(A[_t]-Kt,Yt),0),r.arrowElement=_,r.offsets.arrow=(Nt(c={},pt,Math.round(Yt)),Nt(c,Mt,""),c),r},element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:function(r,f){if(St(r.instance.modifiers,"inner")||r.flipped&&r.placement===r.originalPlacement)return r;var c=D(r.instance.popper,r.instance.reference,f.padding,f.boundariesElement,r.positionFixed),_=r.placement.split("-")[0],x=S(_),E=r.placement.split("-")[1]||"",A=[];switch(f.behavior){case"flip":A=[_,x];break;case"clockwise":A=At(_);break;case"counterclockwise":A=At(_,!0);break;default:A=f.behavior}return A.forEach((function(Z,tt){if(_!==Z||A.length===tt+1)return r;_=r.placement.split("-")[0],x=S(_);var _t=r.offsets.popper,Rt=r.offsets.reference,pt=Math.floor,Mt=_==="left"&&pt(_t.right)>pt(Rt.left)||_==="right"&&pt(_t.left)<pt(Rt.right)||_==="top"&&pt(_t.bottom)>pt(Rt.top)||_==="bottom"&&pt(_t.top)<pt(Rt.bottom),jt=pt(_t.left)<pt(c.left),Kt=pt(_t.right)>pt(c.right),Jt=pt(_t.top)<pt(c.top),ee=pt(_t.bottom)>pt(c.bottom),ce=_==="left"&&jt||_==="right"&&Kt||_==="top"&&Jt||_==="bottom"&&ee,ie=["top","bottom"].indexOf(_)!==-1,Yt=!!f.flipVariations&&(ie&&E==="start"&&jt||ie&&E==="end"&&Kt||!ie&&E==="start"&&Jt||!ie&&E==="end"&&ee),ue=!!f.flipVariationsByContent&&(ie&&E==="start"&&Kt||ie&&E==="end"&&jt||!ie&&E==="start"&&ee||!ie&&E==="end"&&Jt),le=Yt||ue;(Mt||ce||le)&&(r.flipped=!0,(Mt||ce)&&(_=A[tt+1]),le&&(E=(function(ne){return ne==="end"?"start":ne==="start"?"end":ne})(E)),r.placement=_+(E?"-"+E:""),r.offsets.popper=gt({},r.offsets.popper,F(r.instance.popper,r.offsets.reference,r.placement)),r=K(r.instance.modifiers,r,"flip"))})),r},behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:function(r){var f=r.placement,c=f.split("-")[0],_=r.offsets,x=_.popper,E=_.reference,A=["left","right"].indexOf(c)!==-1,Z=["top","left"].indexOf(c)===-1;return x[A?"left":"top"]=E[c]-(Z?x[A?"width":"height"]:0),r.placement=S(f),r.offsets.popper=Et(x),r}},hide:{order:800,enabled:!0,fn:function(r){if(!ot(r.instance.modifiers,"hide","preventOverflow"))return r;var f=r.offsets.reference,c=J(r.instance.modifiers,(function(_){return _.name==="preventOverflow"})).boundaries;if(f.bottom<c.top||f.left>c.right||f.top>c.bottom||f.right<c.left){if(r.hide===!0)return r;r.hide=!0,r.attributes["x-out-of-boundaries"]=""}else{if(r.hide===!1)return r;r.hide=!1,r.attributes["x-out-of-boundaries"]=!1}return r}},computeStyle:{order:850,enabled:!0,fn:function(r,f){var c=f.x,_=f.y,x=r.offsets.popper,E=J(r.instance.modifiers,(function(Yt){return Yt.name==="applyStyle"})).gpuAcceleration;E!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var A,Z,tt=E!==void 0?E:f.gpuAcceleration,_t=it(r.instance.popper),Rt=qt(_t),pt={position:x.position},Mt=(function(Yt,ue){var le=Yt.offsets,ne=le.popper,re=le.reference,se=Math.round,ye=Math.floor,me=function(Le){return Le},ve=se(re.width),ge=se(ne.width),_e=["left","right"].indexOf(Yt.placement)!==-1,fe=Yt.placement.indexOf("-")!==-1,be=ue?_e||fe||ve%2==ge%2?se:ye:me,we=ue?se:me;return{left:be(ve%2==1&&ge%2==1&&!fe&&ue?ne.left-1:ne.left),top:we(ne.top),bottom:we(ne.bottom),right:be(ne.right)}})(r,window.devicePixelRatio<2||!O),jt=c==="bottom"?"top":"bottom",Kt=_==="right"?"left":"right",Jt=st("transform");if(Z=jt==="bottom"?_t.nodeName==="HTML"?-_t.clientHeight+Mt.bottom:-Rt.height+Mt.bottom:Mt.top,A=Kt==="right"?_t.nodeName==="HTML"?-_t.clientWidth+Mt.right:-Rt.width+Mt.right:Mt.left,tt&&Jt)pt[Jt]="translate3d("+A+"px, "+Z+"px, 0)",pt[jt]=0,pt[Kt]=0,pt.willChange="transform";else{var ee=jt==="bottom"?-1:1,ce=Kt==="right"?-1:1;pt[jt]=Z*ee,pt[Kt]=A*ce,pt.willChange=jt+", "+Kt}var ie={"x-placement":r.placement};return r.attributes=gt({},ie,r.attributes),r.styles=gt({},pt,r.styles),r.arrowStyles=gt({},r.offsets.arrow,r.arrowStyles),r},gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:function(r){var f,c;return ht(r.instance.popper,r.styles),f=r.instance.popper,c=r.attributes,Object.keys(c).forEac
5h((function(_){c[_]!==!1?f.setAttribute(_,c[_]):f.removeAttribute(_)})),r.arrowElement&&Object.keys(r.arrowStyles).length&&ht(r.arrowElement,r.arrowStyles),r},onLoad:function(r,f,c,_,x){var E=N(x,f,r,c.positionFixed),A=G(c.placement,E,f,r,c.modifiers.flip.boundariesElement,c.modifiers.flip.padding);return f.setAttribute("x-placement",A),ht(f,{position:c.positionFixed?"fixed":"absolute"}),c},gpuAcceleration:void 0}}},Ht=(function(){function r(f,c){var _=this,x=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};yt(this,r),this.scheduleUpdate=function(){return requestAnimationFrame(_.update)},this.update=s(this.update.bind(this)),this.options=gt({},r.Defaults,x),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=f&&f.jquery?f[0]:f,this.popper=c&&c.jquery?c[0]:c,this.options.modifiers={},Object.keys(gt({},r.Defaults.modifiers,x.modifiers)).forEach((function(A){_.options.modifiers[A]=gt({},r.Defaults.modifiers[A]||{},x.modifiers?x.modifiers[A]:{})})),this.modifiers=Object.keys(this.options.modifiers).map((function(A){return gt({name:A},_.options.modifiers[A])})).sort((function(A,Z){return A.order-Z.order})),this.modifiers.forEach((function(A){A.enabled&&u(A.onLoad)&&A.onLoad(_.reference,_.popper,_.options,A,_.state)})),this.update();var E=this.options.eventsEnabled;E&&this.enableEventListeners(),this.state.eventsEnabled=E}return Tt(r,[{key:"update",value:function(){return Lt.call(this)}},{key:"destroy",value:function(){return vt.call(this)}},{key:"enableEventListeners",value:function(){return et.call(this)}},{key:"disableEventListeners",value:function(){return xt.call(this)}}]),r})();Ht.Utils=(typeof window!="undefined"?window:global).PopperUtils,Ht.placements=nt,Ht.Defaults=Vt;var Zt=Ht,T="adropdown",I="bs.adropdown",j="."+I,ft=l.default.fn[T],rt=new RegExp("38|40|27"),kt="disabled",Ot="show",Bt="adropdown-menu-right",Ut="hide"+j,Qt="hidden"+j,$t="click.bs.adropdown.data-api",Xt="keydown.bs.adropdown.data-api",de='[data-toggle="adropdown"]',pe=".adropdown-menu",he={offset:0,flip:!0,boundary:"scrollParent",reference:"toggle",display:"dynamic",popperConfig:null},te={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)",reference:"(string|element)",display:"string",popperConfig:"(null|object)"},ae=(function(){function r(c,_){this._element=c,this._popper=null,this._config=this._getConfig(_),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var f=r.prototype;return f.toggle=function(){if(!this._element.disabled&&!l.default(this._element).hasClass(kt)){var c=l.default(this._menu).hasClass(Ot);r._clearMenus(),c||this.show(!0)}},f.show=function(c){if(c===void 0&&(c=!1),!(this._element.disabled||l.default(this._element).hasClass(kt)||l.default(this._menu).hasClass(Ot))){var _={relatedTarget:this._element},x=l.default.Event("show.bs.adropdown",_),E=r._getParentFromElement(this._element);if(l.default(E).trigger(x),!x.isDefaultPrevented()){if(!this._inNavbar&&c){if(typeof Zt=="undefined")throw new TypeError("Bootstrap's adropdowns require Popper (https://popper.js.org)");var A=this._element;this._config.reference==="parent"?A=E:V.isElement(this._config.reference)&&(A=this._config.reference,typeof this._config.reference.jquery!="undefined"&&(A=this._config.reference[0])),this._config.boundary!=="scrollParent"&&l.default(E).addClass("position-static"),this._popper=new Zt(A,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&l.default(E).closest(".navbar-nav").length===0&&l.default(document.body).children().on("mouseover",null,l.default.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),l.default(this._menu).toggleClass(Ot),l.default(E).toggleClass(Ot).trigger(l.default.Event("shown.bs.adropdown",_))}}},f.hide=function(){if(!this._element.disabled&&!l.default(this._element).hasClass(kt)&&l.default(this._menu).hasClass(Ot)){var c={relatedTarget:this._element},_=l.default.Event(Ut,c),x=r._getParentFromElement(this._element);l.default(x).trigger(_),_.isDefaultPrevented()||(this._popper&&this._popper.destroy(),l.default(this._menu).toggleClass(Ot),l.default(x).toggleClass(Ot).trigger(l.default.Event(Qt,c)))}},f.dispose=function(){l.default.removeData(this._element,I),l.default(this._element).off(j),this._element=null,this._menu=null,this._popper!==null&&(this._popper.destroy(),this._popper=null)},f.update=function(){this._inNavbar=this._detectNavbar(),this._popper!==null&&this._popper.scheduleUpdate()},f._addEventListeners=function(){var c=this;l.default(this._element).on("click.bs.adropdown",(function(_){_.preventDefault(),_.stopPropagation(),c.toggle()}))},f._getConfig=function(c){return c=Q({},this.constructor.Default,l.default(this._element).data(),c),V.typeCheckConfig(T,c,this.constructor.DefaultType),c},f._getMenuElement=function(){if(!this._menu){var c=r._getParentFromElement(this._element);c&&(this._menu=c.querySelector(pe))}return this._menu},f._getPlacement=function(){var c=l.default(this._element.parentNode),_="bottom-start";return c.hasClass("dropup")?_=l.default(this._menu).hasClass(Bt)?"top-end":"top-start":c.hasClass("dropright")?_="right-start":c.hasClass("dropleft")?_="left-start":l.default(this._menu).hasClass(Bt)&&(_="bottom-end"),_},f._detectNavbar=function(){return l.default(this._element).closest(".
5navbar").length>0},f._getOffset=function(){var c=this,_={};return typeof this._config.offset=="function"?_.fn=function(x){return x.offsets=Q({},x.offsets,c._config.offset(x.offsets,c._element)),x}:_.offset=this._config.offset,_},f._getPopperConfig=function(){var c={placement:this._getPlacement(),modifiers:{offset:this._getOffset(),flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}};return this._config.display==="static"&&(c.modifiers.applyStyle={enabled:!1}),Q({},c,this._config.popperConfig)},r._jQueryInterface=function(c){return this.each((function(){var _=l.default(this).data(I);if(_||(_=new r(this,typeof c=="object"?c:null),l.default(this).data(I,_)),typeof c=="string"){if(typeof _[c]=="undefined")throw new TypeError('No method named "'+c+'"');_[c]()}}))},r._clearMenus=function(c){if(!c||c.which!==3&&(c.type!=="keyup"||c.which===9))for(var _=[].slice.call(document.querySelectorAll(de)),x=0,E=_.length;x<E;x++){var A=r._getParentFromElement(_[x]),Z=l.default(_[x]).data(I),tt={relatedTarget:_[x]};if(c&&c.type==="click"&&(tt.clickEvent=c),Z){var _t=Z._menu;if(l.default(A).hasClass(Ot)&&!(c&&(c.type==="click"&&/input|textarea/i.test(c.target.tagName)||c.type==="keyup"&&c.which===9)&&l.default.contains(A,c.target))){var Rt=l.default.Event(Ut,tt);l.default(A).trigger(Rt),Rt.isDefaultPrevented()||("ontouchstart"in document.documentElement&&l.default(document.body).children().off("mouseover",null,l.default.noop),_[x].setAttribute("aria-expanded","false"),Z._popper&&Z._popper.destroy(),l.default(_t).removeClass(Ot),l.default(A).removeClass(Ot).trigger(l.default.Event(Qt,tt)))}}}},r._getParentFromElement=function(c){var _,x=V.getSelectorFromElement(c);return x&&(_=document.querySelector(x)),_||c.parentNode},r._dataApiKeydownHandler=function(c){if(!(/input|textarea/i.test(c.target.tagName)?c.which===32||c.which!==27&&(c.which!==40&&c.which!==38||l.default(c.target).closest(pe).length):!rt.test(c.which))&&!this.disabled&&!l.default(this).hasClass(kt)){var _=r._getParentFromElement(this),x=l.default(_).hasClass(Ot);if(x||c.which!==27){if(c.preventDefault(),c.stopPropagation(),!x||c.which===27||c.which===32)return c.which===27&&l.default(_.querySelector(de)).trigger("focus"),void l.default(this).trigger("click");var E=[].slice.call(_.querySelectorAll(".adropdown-menu .adropdown-item:not(.disabled):not(:disabled)")).filter((function(Z){return l.default(Z).is(":visible")}));if(E.length!==0){var A=E.indexOf(c.target);c.which===38&&A>0&&A--,c.which===40&&A<E.length-1&&A++,A<0&&(A=0),E[A].focus()}}}},P(r,null,[{key:"VERSION",get:function(){return"4.6.1"}},{key:"Default",get:function(){return he}},{key:"DefaultType",get:function(){return te}}]),r})();l.default(document).on(Xt,de,ae._dataApiKeydownHandler).on(Xt,pe,ae._dataApiKeydownHandler).on($t+" keyup.bs.adropdown.data-api",ae._clearMenus).on($t,de,(function(r){r.preventDefault(),r.stopPropagation(),ae._jQueryInterface.call(l.default(this),"toggle")})).on($t,".adropdown form",(function(r){r.stopPropagation()})),l.default.fn[T]=ae._jQueryInterface,l.default.fn[T].Constructor=ae,l.default.fn[T].noConflict=function(){return l.default.fn[T]=ft,ae._jQueryInterface},n.Util=V,n.aCollapse=t,n.aDropdown=ae,Object.defineProperty(n,"__esModule",{value:!0})}))}if(!asl_shared_uses_maplibre()){let n=function(a){a=a||{},google.maps.OverlayView.apply(this,arguments),this.content_=a.content||"",this.disableAutoPan_=a.disableAutoPan||!1,this.maxWidth_=a.maxWidth||0,this.pixelOffset_=a.pixelOffset||new google.maps.Size(0,0),this.position_=a.position||new google.maps.LatLng(0,0),this.zIndex_=a.zIndex||null,this.boxClass_=a.boxClass||"infoBox",this.boxStyle_=a.boxStyle||{},this.closeBoxMargin_=a.closeBoxMargin||"2px",this.closeBoxURL_=a.closeBoxURL||"https://www.google.com/intl/en_us/mapfiles/close.gif",a.closeBoxURL===""&&(this.closeBoxURL_=""),this.infoBoxClearance_=a.infoBoxClearance||new google.maps.Size(1,1),typeof a.visible=="undefined"&&(typeof a.isHidden=="undefined"?a.visible=!0:a.visible=!a.isHidden),this.isHidden_=!a.visible,this.alignBottom_=a.al
5ignBottom||!1,this.pane_=a.pane||"floatPane",this.enableEventPropagation_=a.enableEventPropagation||!1,this.div_=null,this.closeListener_=null,this.moveListener_=null,this.contextListener_=null,this.eventListeners_=null,this.fixedWidthSet_=null};var InfoBox=n;n.prototype=new google.maps.OverlayView,n.prototype.createInfoBoxDiv_=function(){var a,d,l,b=this,P=function(H){H.cancelBubble=!0,H.stopPropagation&&H.stopPropagation()},Q=function(H){H.returnValue=!1,H.preventDefault&&H.preventDefault(),b.enableEventPropagation_||P(H)};if(!this.div_){if(this.div_=document.createElement("div"),this.setBoxStyle_(),typeof this.content_.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+this.content_:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(this.content_)),this.getPanes()[this.pane_].appendChild(this.div_),this.addClickHandler_(),this.div_.style.width?this.fixedWidthSet_=!0:this.maxWidth_!==0&&this.div_.offsetWidth>this.maxWidth_?(this.div_.style.width=this.maxWidth_,this.div_.style.overflow="auto",this.fixedWidthSet_=!0):(l=this.getBoxWidths_(),this.div_.style.width=this.div_.offsetWidth-l.left-l.right+"px",this.fixedWidthSet_=!1),this.panBox_(this.disableAutoPan_),!this.enableEventPropagation_){for(this.eventListeners_=[],d=["mousedown","mouseover","mouseout","mouseup","click","dblclick","touchstart","touchend","touchmove"],a=0;a<d.length;a++)this.eventListeners_.push(this.div_.addEventListener(d[a],P));this.eventListeners_.push(this.div_.addEventListener("mouseover",function(H){this.style.cursor="default"}))}this.contextListener_=this.div_.addEventListener("contextmenu",Q),ASLEvent.trigger(this,"domready")}},n.prototype.getCloseBoxImg_=function(){var a="";return this.closeBoxURL_!==""&&(a="<img",a+=" src='"+this.closeBoxURL_+"'",a+=" align=right",a+=" style='",a+=" position: relative;",a+=" cursor: pointer;",a+=" margin: "+this.closeBoxMargin_+";",a+="'>"),a},n.prototype.addClickHandler_=function(){var a;this.closeBoxURL_!==""?(a=this.div_.firstChild,this.closeListener_=a.addEventListener("click",this.getCloseClickHandler_())):this.closeListener_=null},n.prototype.getCloseClickHandler_=function(){var a=this;return function(d){d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation(),ASLEvent.trigger(a,"closeclick"),a.close()}},n.prototype.panBox_=function(a){var d,l,b=0,P=0;if(!a&&(d=this.getMap(),d instanceof google.maps.Map)){d.getBounds().contains(this.position_)||d.setCenter(this.position_),l=d.getBounds();var Q=d.getDiv(),H=Q.offsetWidth,V=Q.offsetHeight,ut=this.pixelOffset_.width,wt=this.pixelOffset_.height,It=this.div_.offsetWidth,mt=this.div_.offsetHeight,ct=this.infoBoxClearance_.width,Ct=this.infoBoxClearance_.height,Dt=this.getProjection().fromLatLngToContainerPixel(this.position_);if(Dt.x<-ut+ct?b=Dt.x+ut-ct:Dt.x+It+ut+ct>H&&(b=Dt.x+It+ut+ct-H),this.alignBottom_?Dt.y<-wt+Ct+mt?P=Dt.y+wt-Ct-mt:Dt.y+wt+Ct>V&&(P=Dt.y+wt+Ct-V):Dt.y<-wt+Ct?P=Dt.y+wt-Ct:Dt.y+mt+wt+Ct>V&&(P=Dt.y+mt+wt+Ct-V),!(b===0&&P===0)){var zt=d.getCenter();d.panBy(b,P)}}},n.prototype.setBoxStyle_=function(){var a,d;if(this.div_){this.div_.className=this.boxClass_,this.div_.style.cssText="",d=this.boxStyle_;for(a in d)d.hasOwnProperty(a)&&(this.div_.style[a]=d[a]);this.div_.style.WebkitTransform="translateZ(0)",typeof this.div_.style.opacity!="undefined"&&this.div_.style.opacity!==""&&(this.div_.style.MsFilter='"progid:DXImageTransform.Microsoft.Alpha(Opacity='+this.div_.style.opacity*100+')"',this.div_.style.filter="alpha(opacity="+this.div_.style.opacity*100+")"),this.div_.style.position="absolute",this.div_.style.visibility="hidden",this.zIndex_!==null&&(this.div_.style.zIndex=this.zIndex_)}},n.prototype.getBoxWidths_=function(){var a,d={top:0,bottom:0,left:0,right:0},l=this.div_;return document.defaultView&&document.defaultView.getComputedStyle?(a=l.ownerDocument.defaultView.getComputedStyle(l,""),a&&(d.top=parseInt(a.borderTopWidth,10)||0,d.bottom=parseInt(a.borderBottomWidth,10)||0,d.left=parseInt(a.borderLeftWidth,10)||0,d.right=parseInt(a.borderRightWidth,10)||0)):document.documentElement.currentStyle&&l.currentStyle&&(d.top=parseInt(l.currentStyle.borderTopWidth,10)||0,d.bottom=parseInt(l.currentStyle.borderBottomWidth,10)||0,d.left=parseInt(l.currentStyle.borderLeftWidth,10)||0,d.right=parseInt(l.currentStyle.borderRightWidth,10)||0),d},n.prototype.onRemove=function(){this.div_&&(this.div_.parentNode.removeChild(this.div_),this.div_=null)},n.prototype.draw=function(){this.createInfoBoxDiv_();var a=this.getProjection().fromLatLngToDivPixel(this.position_);this.div_.style.left=a.x+this.pixelOffset_.width+"px",this.alignBottom_?this.div_.style.bottom=-(a.y+this.pixelOffset_.height)+"px":this.div_.style.top=a.y+this.pixelOffset_.height+"px",this.isHidden_?this.div_.style.visibility="hidden":this.div_.style.visibility="visible"},n.prototype.setOptions=function(a){typeof a.boxClass!="undefined"&&(this.boxClass_=a.boxClass,this.setBoxStyle_()),typeof a.boxStyle!="undefined"&&(this.boxStyle_=a.boxStyle,this.setBoxStyle_()),typeof a.content!="undefined"&&this.setContent(a.content),typeof a.disableAutoPan!="undefined"&&(this.disableAutoPan_=a.disableAutoPan),typeof a.maxWidth!="undefined"&&(this.maxWidth_=a.maxWidth),typeof a.pixelOffset!="undefined"&&(this.pixelOffset_=a.pixelOffset),typeof a.alignBottom!="undefined"&&(this.alignBottom_=a.al
5ignBottom),typeof a.position!="undefined"&&this.setPosition(a.position),typeof a.zIndex!="undefined"&&this.setZIndex(a.zIndex),typeof a.closeBoxMargin!="undefined"&&(this.closeBoxMargin_=a.closeBoxMargin),typeof a.closeBoxURL!="undefined"&&(this.closeBoxURL_=a.closeBoxURL),typeof a.infoBoxClearance!="undefined"&&(this.infoBoxClearance_=a.infoBoxClearance),typeof a.isHidden!="undefined"&&(this.isHidden_=a.isHidden),typeof a.visible!="undefined"&&(this.isHidden_=!a.visible),typeof a.enableEventPropagation!="undefined"&&(this.enableEventPropagation_=a.enableEventPropagation),this.div_&&this.draw()},n.prototype.setContent=function(a){this.content_=a,this.div_&&(this.closeListener_&&(ASLEvent.removeListener(this.closeListener_),this.closeListener_=null),this.fixedWidthSet_||(this.div_.style.width=""),typeof a.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a)),this.fixedWidthSet_||(this.div_.style.width=this.div_.offsetWidth+"px",typeof a.nodeType=="undefined"?this.div_.innerHTML=this.getCloseBoxImg_()+a:(this.div_.innerHTML=this.getCloseBoxImg_(),this.div_.appendChild(a))),this.addClickHandler_()),ASLEvent.trigger(this,"content_changed")},n.prototype.setPosition=function(a){this.position_=a,this.div_&&this.draw(),ASLEvent.trigger(this,"position_changed")},n.prototype.setZIndex=function(a){this.zIndex_=a,this.div_&&(this.div_.style.zIndex=a),ASLEvent.trigger(this,"zindex_changed")},n.prototype.setVisible=function(a){this.isHidden_=!a,this.div_&&(this.div_.style.visibility=this.isHidden_?"hidden":"visible")},n.prototype.getContent=function(){return this.content_},n.prototype.getPosition=function(){return this.position_},n.prototype.getZIndex=function(){return this.zIndex_},n.prototype.getVisible=function(){var a;return typeof this.getMap()=="undefined"||this.getMap()===null?a=!1:a=!this.isHidden_,a},n.prototype.show=function(){this.isHidden_=!1,this.div_&&(this.div_.style.visibility="visible")},n.prototype.hide=function(){this.isHidden_=!0,this.div_&&(this.div_.style.visibility="hidden")},n.prototype.open=function(a,d){var l=this;d&&(this.position_=d.getPosition(),this.moveListener_=ASLEvent.addListener(d,"position_changed",function(){l.setPosition(this.getPosition())})),this.setMap(a),this.div_&&this.panBox_()},n.prototype.close=function(){var a;if(this.closeListener_&&(ASLEvent.removeListener(this.closeListener_),this.closeListener_=null),this.eventListeners_){for(a=0;a<this.eventListeners_.length;a++)ASLEvent.removeListener(this.eventListeners_[a]);this.eventListeners_=null}this.moveListener_&&(ASLEvent.removeListener(this.moveListener_),this.moveListener_=null),this.contextListener_&&(ASLEvent.removeListener(this.contextListener_),this.contextListener_=null),this.setMap(null)}}(function(n,a){typeof exports=="object"&&typeof module=="object"?module.exports=a():typeof define=="function"&&define.amd?define([],a):typeof exports=="object"?exports.ASLRouteAPI=a():n.ASLRouteAPI=a()})(this,(()=>(()=>{"use strict";var n={d:(m,y)=>{for(var v in y)n.o(y,v)&&!n.o(m,v)&&Object.defineProperty(m,v,{enumerable:!0,get:y[v]})},o:(m,y)=>Object.prototype.hasOwnProperty.call(m,y)},a={};function d(m,y){var v=Object.keys(m);if(Object.getOwnPropertySymbols){var L=Object.getOwnPropertySymbols(m);y&&(L=L.filter((function(D){return Object.getOwnPropertyDescriptor(m,D).enumerable}))),v.push.apply(v,L)}return v}function l(m){for(var y=1;y<arguments.length;y++){var v=arguments[y]!=null?arguments[y]:{};y%2?d(Object(v),!0).forEach((function(L){b(m,L,v[L])})):Object.getOwnPropertyDescriptors?Object.defineProperties(m,Object.getOwnPropertyDescriptors(v)):d(Object(v)).forEac
vendor: 5,281 bytes, line 5
5h((function(L){Object.defineProperty(m,L,Object.getOwnPropertyDescriptor(v,L))}))}return m}function b(m,y,v){return(y=(function(L){var D=(function(U,G){if(V(U)!="object"||!U)return U;var N=U[Symbol.toPrimitive];if(N!==void 0){var B=N.call(U,G||"default");if(V(B)!="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return(G==="string"?String:Number)(U)})(L,"string");return V(D)=="symbol"?D:D+""})(y))in m?Object.defineProperty(m,y,{value:v,enumerable:!0,configurable:!0,writable:!0}):m[y]=v,m}function P(){P=function(){return y};var m,y={},v=Object.prototype,L=v.hasOwnProperty,D=Object.defineProperty||function(T,I,j){T[I]=j.value},U=typeof Symbol=="function"?Symbol:{},G=U.iterator||"@@iterator",N=U.asyncIterator||"@@asyncIterator",B=U.toStringTag||"@@toStringTag";function S(T,I,j){return Object.defineProperty(T,I,{value:j,enumerable:!0,configurable:!0,writable:!0}),T[I]}try{S({},"")}catch(T){S=function(I,j,ft){return I[j]=ft}}function F(T,I,j,ft){var rt=I&&I.prototype instanceof lt?I:lt,kt=Object.create(rt.prototype),Ot=new Ht(ft||[]);return D(kt,"_invoke",{value:nt(T,j,Ot)}),kt}function J(T,I,j){try{return{type:"normal",arg:T.call(I,j)}}catch(ft){return{type:"throw",arg:ft}}}y.wrap=F;var K="suspendedStart",Lt="suspendedYield",St="executing",st="completed",vt={};function lt(){}function Pt(){}function X(){}var et={};S(et,G,(function(){return this}));var xt=Object.getPrototypeOf,dt=xt&&xt(xt(Zt([])));dt&&dt!==v&&L.call(dt,G)&&(et=dt);var ht=X.prototype=lt.prototype=Object.create(et);function O(T){["next","throw","return"].forEach((function(I){S(T,I,(function(j){return this._invoke(I,j)}))}))}function ot(T,I){function j(rt,kt,Ot,Bt){var Ut=J(T[rt],T,kt);if(Ut.type!=="throw"){var Qt=Ut.arg,$t=Qt.value;return $t&&V($t)=="object"&&L.call($t,"__await")?I.resolve($t.__await).then((function(Xt){j("next",Xt,Ot,Bt)}),(function(Xt){j("throw",Xt,Ot,Bt)})):I.resolve($t).then((function(Xt){Qt.value=Xt,Ot(Qt)}),(function(Xt){return j("throw",Xt,Ot,Bt)}))}Bt(Ut.arg)}var ft;D(this,"_invoke",{value:function(rt,kt){function Ot(){return new I((function(Bt,Ut){j(rt,kt,Bt,Ut)}))}return ft=ft?ft.then(Ot,Ot):Ot()}})}function nt(T,I,j){var ft=K;return function(rt,kt){if(ft===St)throw Error("Generator is already running");if(ft===st){if(rt==="throw")throw kt;return{value:m,done:!0}}for(j.method=rt,j.arg=kt;;){var Ot=j.delegate;if(Ot){var Bt=Ft(Ot,j);if(Bt){if(Bt===vt)continue;return Bt}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(ft===K)throw ft=st,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);ft=St;var Ut=J(T,I,j);if(Ut.type==="normal"){if(ft=j.done?st:Lt,Ut.arg===vt)continue;return{value:Ut.arg,done:j.done}}Ut.type==="throw"&&(ft=st,j.method="throw",j.arg=Ut.arg)}}}function Ft(T,I){var j=I.method,ft=T.iterator[j];if(ft===m)return I.delegate=null,j==="throw"&&T.iterator.return&&(I.method="return",I.arg=m,Ft(T,I),I.method==="throw")||j!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+j+"' method")),vt;var rt=J(ft,T.iterator,I.arg);if(rt.type==="throw")return I.method="throw",I.arg=rt.arg,I.delegate=null,vt;var kt=rt.arg;return kt?kt.done?(I[T.resultName]=kt.value,I.next=T.nextLoc,I.method!=="return"&&(I.method="next",I.arg=m),I.delegate=null,vt):kt:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,vt)}function At(T){var I={tryLoc:T[0]};1 in T&&(I.catchLoc=T[1]),2 in T&&(I.finallyLoc=T[2],I.afterLoc=T[3]),this.tryEntries.push(I)}function Vt(T){var I=T.completion||{};I.type="normal",delete I.arg,T.completion=I}function Ht(T){this.tryEntries=[{tryLoc:"root"}],T.forEach(At,this),this.reset(!0)}function Zt(T){if(T||T===""){var I=T[G];if(I)return I.call(T);if(typeof T.next=="function")return T;if(!isNaN(T.length)){var j=-1,ft=function rt(){for(;++j<T.length;)if(L.call(T,j))return rt.value=T[j],rt.done=!1,rt;return rt.value=m,rt.done=!0,rt};return ft.next=ft}}throw new TypeError(V(T)+" is not iterable")}return Pt.prototype=X,D(ht,"constructor",{value:X,configurable:!0}),D(X,"constructor",{value:Pt,configurable:!0}),Pt.displayName=S(X,B,"GeneratorFunction"),y.isGeneratorFunction=function(T){var I=typeof T=="function"&&T.constructor;return!!I&&(I===Pt||(I.displayName||I.name)==="GeneratorFunction")},y.mark=function(T){return Object.setPrototypeOf?Object.setPrototypeOf(T,X):(T.__proto__=X,S(T,B,"GeneratorFunction")),T.prototype=Object.create(ht),T},y.awrap=function(T){return{__await:T}},O(ot.prototype),S(ot.prototype,N,(function(){return this})),y.AsyncIterator=ot,y.async=function(T,I,j,ft,rt){rt===void 0&&(rt=Promise);var kt=new ot(F(T,I,j,ft),rt);return y.isGeneratorFunction(I)?kt:kt.next().then((function(Ot){return Ot.done?Ot.value:kt.next()}))},O(ht),S(ht,B,"Generator"),S(ht,G,(function(){return this})),S(ht,"toString",(function(){return"[object Generator]"})),y.keys=function(T){var I=Object(T),j=[];for(var ft in I)j.push(ft);return j.reverse(),function rt(){for(;j.length;){var kt=j.pop();if(kt in I)return rt.value=kt,rt.done=!1,rt}return rt.done=!0,rt}},y.values=Zt,Ht.prototype={constructor:Ht,reset:function(T){if(this.prev=0,this.next=0,this.sent=this._sent=m,this.done=!1,this.delegate=null,this.method="next",this.arg=m,this.tryEntries.forEac
5h(Vt),!T)for(var I in this)I.charAt(0)==="t"&&L.call(this,I)&&!isNaN(+I.slice(1))&&(this[I]=m)},stop:function(){this.done=!0;var T=this.tryEntries[0].completion;if(T.type==="throw")throw T.arg;return this.rval},dispatchException:function(T){if(this.done)throw T;var I=this;function j(Ut,Qt){return kt.type="throw",kt.arg=T,I.next=Ut,Qt&&(I.method="next",I.arg=m),!!Qt}for(var ft=this.tryEntries.length-1;ft>=0;--ft){var rt=this.tryEntries[ft],kt=rt.completion;if(rt.tryLoc==="root")return j("end");if(rt.tryLoc<=this.prev){var Ot=L.call(rt,"catchLoc"),Bt=L.call(rt,"finallyLoc");if(Ot&&Bt){if(this.prev<rt.catchLoc)return j(rt.catchLoc,!0);if(this.prev<rt.finallyLoc)return j(rt.finallyLoc)}else if(Ot){if(this.prev<rt.catchLoc)return j(rt.catchLoc,!0)}else{if(!Bt)throw Error("try statement without catch or finally");if(this.prev<rt.finallyLoc)return j(rt.finallyLoc)}}}},abrupt:function(T,I){for(var j=this.tryEntries.length-1;j>=0;--j){var ft=this.tryEntries[j];if(ft.tryLoc<=this.prev&&L.call(ft,"finallyLoc")&&this.prev<ft.finallyLoc){var rt=ft;break}}rt&&(T==="break"||T==="continue")&&rt.tryLoc<=I&&I<=rt.finallyLoc&&(rt=null);var kt=rt?rt.completion:{};return kt.type=T,kt.arg=I,rt?(this.method="next",this.next=rt.finallyLoc,vt):this.complete(kt)},complete:function(T,I){if(T.type==="throw")throw T.arg;return T.type==="break"||T.type==="continue"?this.next=T.arg:T.type==="return"?(this.rval=this.arg=T.arg,this.method="return",this.next="end"):T.type==="normal"&&I&&(this.next=I),vt},finish:function(T){for(var I=this.tryEntries.length-1;I>=0;--I){var j=this.tryEntries[I];if(j.finallyLoc===T)return this.complete(j.completion,j.afterLoc),Vt(j),vt}},catch:function(T){for(var I=this.tryEntries.length-1;I>=0;--I){var j=this.tryEntries[I];if(j.tryLoc===T){var ft=j.completion;if(ft.type==="throw"){var rt=ft.arg;Vt(j)}return rt}}throw Error("illegal catch attempt")},delegateYield:function(T,I,j){return this.delegate={iterator:Zt(T),resultName:I,nextLoc:j},this.method==="next"&&(this.arg=m),vt}},y}function Q(m,y){var v=typeof Symbol!="undefined"&&m[Symbol.iterator]||m["@@iterator"];if(!v){if(Array.isArray(m)||(v=(function(B,S){if(B){if(typeof B=="string")return H(B,S);var F={}.toString.call(B).slice(8,-1);return F==="Object"&&B.constructor&&(F=B.constructor.name),F==="Map"||F==="Set"?Array.from(B):F==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(F)?H(B,S):void 0}})(m))||y&&m&&typeof m.length=="number"){v&&(m=v);var L=0,D=function(){};return{s:D,n:function(){return L>=m.length?{done:!0}:{done:!1,value:m[L++]}},e:function(B){throw B},f:D}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. 6In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var U,G=!0,N=!1;return{s:function(){v=v.call(m)},n:function(){var B=v.next();return G=B.done,B},e:function(B){N=!0,U=B},f:function(){try{G||v.return==null||v.return()}finally{if(N)throw U}}}}function H(m,y){(y==null||y>m.length)&&(y=m.length);for(var v=0,L=Array(y);v<y;v++)L[v]=m[v];return L}function V(m){return V=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(y){return typeof y}:function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},V(m)}function ut(m,y,v,L,D,U,G){try{var N=m[U](G),B=N.value}catch(S){return void v(S)}N.done?y(B):Promise.resolve(B).then(L,D)}function wt(m){return function(){var y=this,v=arguments;return new Promise((function(L,D){var U=m.apply(y,v);function G(B){ut(U,L,D,G,N,"next",B)}function N(B){ut(U,L,D,G,N,"throw",B)}G(void 0)}))}}n.d(a,{default:()=>qt});var It={lat:25.2048,lng:55.2708},mt={lat:25.3463,lng:55.4209},ct={lat:(It.lat+mt.lat)/2,lng:(It.lng+mt.lng)/2},Ct=null,Dt=null,zt=null;function Gt(){return Gt=wt(P().mark((function m(){var y,v,L,D,U,G,N,B,S,F,J,K,Lt,St,st,vt,lt,Pt,X=arguments;return P().wrap((function(et){for(;;)switch(et.prev=et.next){case 0:if(G=X.length>0&&X[0]!==void 0?X[0]:{},(N=window.google)!=null&&(y=N.maps)!==null&&y!==void 0&&y.importLibrary){et.next=4;break}return et.abrupt("return");case 4:if(B=yt({element:G.panelElement||G.panelNode||G.panelContainer||null,elementId:G.panelElementId,fallbackId:G.fallbackPanelId||"panel"})){et.next=8;break}return et.abrupt("return");case 8:return zt=B,S=G.route||{origin:It,destination:mt},F=Nt({languageCode:G.languageCode||G.language||G.locale||((v=window)===null||v===void 0||(v=v.asl_configuration)===null||v===void 0?void 0:v.languageCode)||((L=window)===null||L===void 0||(L=L.asl_configuration)===null||L===void 0?void 0:L.language),regionCode:G.regionCode||G.region||((D=window)===null||D===void 0||(D=D.asl_configuration)===null||D===void 0?void 0:D.regionCode)||((U=window)===null||U===void 0||(U=U.asl_configuration)===null||U===void 0?void 0:U.region)}),et.prev=11,et.next=14,N.maps.importLibrary("routes").catch((function(){return null}));case 14:return Lt=et.sent,St=(Lt==null?void 0:Lt.RoutesService)||((J=N.maps)===null||J===void 0?void 0:J.RoutesService)||((K=N.maps)===null||K===void 0||(K=K.routes)===null||K===void 0?void 0:K.RoutesService)||null,et.next=18,W({googleNamespace:N,providedMap:G.mapInstance||window.__asl_main_map||null,mapElement:G.mapElement||G.mapContainer||null,mapElementId:G.mapElementId,defaultCenter:G.initialCenter||ct,zoom:G.zoom||11,mapOptions:G.mapOptions||{}});case 18:if(st=et.sent){et.next=22;break}return B.textContent="Unable to load directions at this time.",et.abrupt("return");case 22:return et.next=24,N.maps.importLibrary("geometry").catch((function(){return{}}));case 24:return vt=et.sent,lt=vt.encoding,Pt=St?new St:null,et.next=29,oe({map:st,panelElement:B,routeC
6onfig:S,localeOptions:F,routesService:Pt,geometryLibrary:lt});case 29:et.next=35;break;case 31:et.prev=31,et.t0=et.catch(11),B.textContent="Unable to load directions at this time.";case 35:case"end":return et.stop()}}),m,null,[[11,31]])}))),Gt.apply(this,arguments)}function oe(m){return Wt.apply(this,arguments)}function Wt(){return(Wt=wt(P().mark((function m(y){var v,L,D,U,G,N,B,S,F,J;return P().wrap((function(K){for(;;)switch(K.prev=K.next){case 0:return L=y.map,D=y.panelElement,U=y.routeConfig,G=y.localeOptions,N=y.routesService,B=y.geometryLibrary,S=t(U,G),K.next=4,e({request:S,routesService:N});case 4:if(F=K.sent,J=F==null||(v=F.routes)===null||v===void 0?void 0:v[0]){K.next=8;break}throw new Error("Routes API returned no routes for the supplied request.");case 8:h({map:L,route:J,routeConfig:U,geometryLibrary:B}),w({panelElement:D,route:J,map:L,geometryLibrary:B,routeConfig:U});case 10:case"end":return K.stop()}}),m)})))).apply(this,arguments)}function t(m){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},v={origin:p(m.origin),destination:p(m.destination),travelMode:"DRIVE",routingPreference:"TRAFFIC_AWARE",computeAlternativeRoutes:!1,polylineQuality:"HIGH_QUALITY",polylineEncoding:"ENCODED_POLYLINE"};return y.languageCode&&(v.languageCode=y.languageCode),y.regionCode&&(v.regionCode=y.regionCode),v}function e(m){return o.apply(this,arguments)}function o(){return(o=wt(P().mark((function m(y){var v,L,D;return P().wrap((function(U){for(;;)switch(U.prev=U.next){case 0:if(v=y.request,!(L=y.routesService)){U.next=16;break}if(typeof(D=typeof L.route=="function"?L.route:L.computeRoutes)!="function"){U.next=15;break}return U.prev=4,U.next=7,D.call(L,v);case 7:return U.abrupt("return",U.sent);case 10:U.prev=10,U.t0=U.catch(4);case 13:U.next=16;break;case 15:case 16:return U.abrupt("return",s(v));case 17:case"end":return U.stop()}}),m,null,[[4,10]])})))).apply(this,arguments)}function s(m){return u.apply(this,arguments)}function u(){return(u=wt(P().mark((function m(y){var v,L,D,U;return P().wrap((function(G){for(;;)switch(G.prev=G.next){case 0:if(L=(v=window)===null||v===void 0||(v=v.asl_configuration)===null||v===void 0?void 0:v.api_key){G.next=3;break}throw new Error("Routes API fallback requires window.asl_configuration.api_key to be set.");case 3:return G.next=5,fetch("https://routes.googleapis.com/directions/v2:computeRoutes",{method:"POST",headers:{"Content-Type":"application/json","X-Goog-Api-Key":L,"X-Goog-FieldMask":"routes.distanceMeters,routes.duration,routes.polyline.encodedPolyline,routes.legs.steps.navigationInstruction,routes.legs.steps.polyline.encodedPolyline,routes.legs.distanceMeters,routes.legs.duration"},body:JSON.stringify(y)});case 5:if((D=G.sent).ok){G.next=11;break}return G.next=9,D.text();case 9:throw U=G.sent,new Error("Routes REST API request failed (".concat(D.status,"): ").concat(U));case 11:return G.abrupt("return",D.json());case 12:case"end":return G.stop()}}),m)})))).apply(this,arguments)}function p(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!it(m))throw new Error("Route endpoints must include numeric latitude and longitude values.");return{location:{latLng:{latitude:m.lat,longitude:m.lng}}}}function h(m){var y=m.map,v=m.route,L=m.routeConfig,D=m.geometryLibrary;if(y){var U=(function(S,F){var J,K,Lt=(S==null||(J=S.polyline)===null||J===void 0?void 0:J.encodedPolyline)||(S==null||(K=S.legs)===null||K===void 0||(K=K[0])===null||K===void 0||(K=K.polyline)===null||K===void 0?void 0:K.encodedPolyline);return k(Lt,F)})(v,D);if(!U.length)throw new Error("Unable to decode route polyline.");g();var G=new google.maps.Polyline({path:U,strokeColor:"#1a73e8",strokeOpacity:.9,strokeWeight:6,map:y}),N=new google.maps.LatLngBounds;U.forEach((function(S){return N.extend(S)})),N.isEmpty()||y.fitBounds(N);var B=(function(S,F){var J=[{position:F.origin,label:"A"},{position:F.destination,label:"B"}].filter((function(K){return it(K.position)}));return J.map((function(K){return new google.maps.Marker({map:S,position:K.position,label:K.label})}))})(y,L);Ct={polyline:G,markers:B},at()}}function g(){Ct&&(Ct.polyline&&Ct.polyline.setMap(null),Array.isArray(Ct.markers)&&Ct.markers.forEac
6h((function(m){return m.setMap(null)})),Ct=null,at())}function w(m){var y,v,L=m.panelElement,D=m.route,U=m.map,G=m.geometryLibrary,N=m.routeConfig,B=N===void 0?{}:N;if(L){var S=D==null||(y=D.legs)===null||y===void 0?void 0:y[0];if(L.innerHTML="",S){var F=document.createElement("div");F.className="rendered-directions",F.id="asl-rendered-dir",F.style.direction=(function(){var st,vt,lt;if(typeof document=="undefined")return"ltr";var Pt=((st=document.documentElement)===null||st===void 0?void 0:st.getAttribute("dir"))||((vt=document.documentElement)===null||vt===void 0?void 0:vt.dir)||((lt=document.body)===null||lt===void 0?void 0:lt.dir);return Pt&&Pt.toLowerCase()==="rtl"?"rtl":"ltr"})();var J,K=document.createElement("div"),Lt=document.createElement("div");Lt.className="adp",Lt.appendChild(((J=document.createElement("div")).className="adp-warnbox",J.style.display="none",[{tag:"div",className:"warnbox-c2"},{tag:"div",className:"warnbox-c1"},{tag:"div",className:"warnbox-content"},{tag:"div",className:"warnbox-c1"},{tag:"div",className:"warnbox-c2"}].forEach((function(st){var vt=document.createElement(st.tag);vt.className=st.className,J.appendChild(vt)})),J)),Lt.appendChild(C({label:"A",text:R({location:S.startLocation,fallback:B.origin}),legIndex:0}));var St=document.createElement("div");St.className="adp-leg",St.appendChild((function(st){var vt,lt,Pt,X,et=st.leg,xt=st.route,dt=document.createElement("div");dt.className="adp-summary";var ht=z((vt=et==null?void 0:et.distanceMeters)!==null&&vt!==void 0?vt:xt==null?void 0:xt.distanceMeters),O=et==null||(lt=et.localizedValues)===null||lt===void 0||(lt=lt.distance)===null||lt===void 0?void 0:lt.text,ot=(function(j){if(!j)return"";var ft=j;if(typeof j=="string"?ft=Number.parseInt(j.replace("s",""),10):V(j)==="object"&&typeof(j==null?void 0:j.seconds)=="number"&&(ft=j.seconds),!Number.isFinite(ft))return"";var rt=Math.round(ft/60);if(rt<60)return"".concat(rt," min");var kt=Math.floor(rt/60),Ot=rt%60;return Ot?"".concat(kt," hr ").concat(Ot," min"):"".concat(kt," hr")})((Pt=et==null?void 0:et.duration)!==null&&Pt!==void 0?Pt:xt==null?void 0:xt.duration),nt=et==null||(X=et.localizedValues)===null||X===void 0||(X=X.duration)===null||X===void 0?void 0:X.text,Ft=ht||O||"",At=ot||nt||"";if(!Ft&&!At)return dt.textContent="Route summary unavailable",dt;if(Ft){var Vt=document.createElement("span");Vt.textContent=Ft,dt.appendChild(Vt)}if(Ft&&At){var Ht=document.createElement("span");Ht.textContent=". ",dt.appendChild(Ht)}if(At){var Zt=document.createElement("span");Zt.textContent="About ";var T=document.createElement("span");T.textContent=At,Zt.appendChild(T),dt.appendChild(Zt)}var I=document.createElement("span");return I.style.display="none",dt.appendChild(I),dt})({leg:S,route:D})),St.appendChild((function(st){var vt=st.legIndex,lt=st.steps,Pt=st.map,X=st.geometryLibrary,et=document.createElement("div"),xt=document.createElement("table");xt.className="adp-directions";var dt=document.createElement("tbody");if(Array.isArray(lt)&<.length>0)lt.forEach((function(ot,nt){var Ft,At=document.createElement("tr");At.dataset.legIndex=String(vt),At.dataset.stepIndex=String(nt),At.tabIndex=0,At.setAttribute("jsaction","directionsPanel.selectLegAndStep"),At.className="asl-route-step";var Vt=document.createElement("td");Vt.className="adp-substep";var Ht=document.createElement("div");Ht.className="adp-stepicon";var Zt=(function(Bt){var Ut,Qt,$t=(Bt==null||(Ut=Bt.navigationInstruction)===null||Ut===void 0?void 0:Ut.maneuver)||(Bt==null?void 0:Bt.maneuver)||(Bt==null||(Qt=Bt.navigationInstruction)===null||Qt===void 0?void 0:Qt.type);return!$t||typeof $t!="string"?"":"adp-".concat($t.toLowerCase().replace(/[^a-z0-9]+/g,"-"))})(ot);if(Zt){var T=document.createElement("div");T.className="".concat(Zt," adp-maneuver"),Ht.appendChild(T)}else{Ht.style.display="none";var I=document.createElement("div");I.className="adp-maneuver",Ht.appendChild(I)}Vt.appendChild(Ht);var j=document.createElement("td");j.className="adp-substep",j.textContent="".concat(nt+1,".");var ft=document.createElement("td");ft.className="adp-substep",ft.innerHTML=(ot==null||(Ft=ot.navigationInstruction)===null||Ft===void 0?void 0:Ft.instructions)||(ot==null?void 0:ot.description)||"Continue";var rt=document.createElement("td");rt.className="adp-substep";var kt=document.createElement("div");kt.className="adp-distance",kt.textContent=(function(Bt){var Ut,Qt;return Bt?typeof Bt.distanceMeters=="number"&&!Number.isNaN(Bt.distanceMeters)?z(Bt.distanceMeters):typeof(Bt==null||(Ut=Bt.localizedValues)===null||Ut===void 0||(Ut=Ut.distance)===null||Ut===void 0?void 0:Ut.text)=="str
6ing"?Bt.localizedValues.distance.text:typeof(Bt==null||(Qt=Bt.navigationInstruction)===null||Qt===void 0?void 0:Qt.distance)=="string"?Bt.navigationInstruction.distance:"":""})(ot),rt.appendChild(kt),At.appendChild(Vt),At.appendChild(j),At.appendChild(ft),At.appendChild(rt);var Ot=function(){return(function(Bt){var Ut=Bt.step,Qt=Bt.listElement,$t=Bt.listItem,Xt=Bt.map,de=Bt.geometryLibrary;if(!(!Qt||!$t)){Qt.querySelectorAll(".asl-route-step--active").forEach((function(te){te.classList.remove("asl-route-step--active")})),$t.classList.add("asl-route-step--active");var pe=(function(te,ae){var r,f,c,_=(te==null||(r=te.polyline)===null||r===void 0?void 0:r.encodedPolyline)||(te==null||(f=te.polyline)===null||f===void 0?void 0:f.points)||(te==null||(c=te.polyline)===null||c===void 0?void 0:c.encodedPoints)||null;return _?k(_,ae):[]})(Ut,de);if(pe.length)return void(function(te,ae){if(!(!te||!Array.isArray(ae)||ae.length===0)){at(),Dt=new google.maps.Polyline({path:ae,map:te,strokeColor:"#fbbc05",strokeOpacity:.9,strokeWeight:8,zIndex:1e3});var r=new google.maps.LatLngBounds;ae.forEach((function(f){return r.extend(f)})),r.isEmpty()||(typeof te.fitBounds=="function"?te.fitBounds(r,80):te.panTo(r.getCenter()))}})(Xt,pe);var he=M(Ut==null?void 0:Ut.startLocation)||M(Ut==null?void 0:Ut.endLocation);he&&Xt&&(Xt.panTo(he),typeof Xt.getZoom=="function"&&Xt.getZoom()<15&&Xt.setZoom(15))}})({step:ot,listElement:dt,listItem:At,map:Pt,geometryLibrary:X})};At.addEventListener("click",Ot),At.addEventListener("keydown",(function(Bt){Bt.key!=="Enter"&&Bt.key!==" "||(Bt.preventDefault(),Ot())})),dt.appendChild(At)}));else{var ht=document.createElement("tr"),O=document.createElement("td");O.colSpan=4,O.textContent="Turn-by-turn instructions are unavailable.",ht.appendChild(O),dt.appendChild(ht)}return xt.appendChild(dt),et.appendChild(xt),et})({legIndex:0,steps:S.steps,map:U,geometryLibrary:G})),St.appendChild(C({label:"B",text:R({location:S.endLocation||(D==null||(v=D.legs)===null||v===void 0||(v=v[D.legs.length-1])===null||v===void 0?void 0:v.endLocation),fallback:B.destination}),legIndex:1})),Lt.appendChild(St),Lt.appendChild((function(){var st=document.createElement("div");st.className="adp-legal";var vt=new Date().getFullYear();return st.textContent="Powered by Google, \xA9".concat(vt," Google"),st})()),K.appendChild(Lt),F.appendChild(K),L.appendChild(F)}else L.textContent="Directions are unavailable for the requested route."}}function C(m){var y=m.label,v=m.text,L=m.legIndex,D=document.createElement("button");D.type="button",D.dataset.legIndex=String(L!=null?L:0),D.setAttribute("jsaction","directionsPanel.selectLeg");var U=document.createElement("table");U.className="adp-placemark";var G=document.createElement("tbody"),N=document.createElement("tr"),B=document.createElement("td"),S=document.createElement("img");S.className="adp-marker2",S.src=(function(J){var K=String(J||"").trim().charAt(0)||"A",Lt='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 37"><g fill="none"><path d="M13 0C5.817 0 0 5.773 0 12.918c0 7.655 5.59 10.526 9.555 17.16C12.09 34.321 11.342 37 13 37c1.723 0 .975-2.743 3.445-6.858C20.085 23.86 26 20.605 26 12.918 26 5.773 20.183 0 13 0z" fill="#C5221F"/><path d="M13.017 35c-.233 0-.3-.065-.7-1.275-.332-1.046-.832-2.648-2.13-4.61-1.265-1.928-2.596-3.498-3.861-5.002C3.363 20.517 1 17.706 1 12.64 1.033 6.199 6.393 1 13.017 1S25 6.23 25 12.639c0 5.06
67-2.33 7.911-5.326 11.507-1.232 1.504-2.53 3.073-3.795 4.97-1.265 1.928-1.797 3.498-2.13 4.544-.4 1.275-.5 1.34-.732 1.34z" fill="#EA4335"/><text text-anchor="middle" dy=".3em" x="13" y="14" font-family="Roboto, Arial, sans-serif" font-size="16px" fill="#FFF">'.concat(K,"</text></g></svg>");return"data:image/svg+xml,".concat(encodeURIComponent(Lt))})(y),S.alt=y||"Marker",B.appendChild(S);var F=document.createElement("td");return F.className="adp-text",F.textContent=v||"Route point",N.appendChild(B),N.appendChild(F),G.appendChild(N),U.appendChild(G),D.appendChild(U),D}function R(m){var y,v,L=m.location,D=m.fallback;if(typeof(L==null?void 0:L.description)=="string"&&L.description.trim())return L.description.trim();if(typeof(L==null?void 0:L.label)=="string"&&L.label.trim())return L.label.trim();var U=(L==null||(y=L.address)===null||y===void 0?void 0:y.text)||(L==null||(v=L.address)===null||v===void 0?void 0:v.formattedAddress)||(L==null?void 0:L.placeId)||(L==null?void 0:L.name);if(typeof U=="string"&&U.trim())return U.trim();var G=q((L==null?void 0:L.latLng)||L)||q(D);if(G){var N=Number(G.lat).toFixed(4),B=Number(G.lng).toFixed(4);return"".concat(N,", ").concat(B)}return"Route point"}function z(m){return typeof m!="number"||Number.isNaN(m)?"":m>=1e3?"".concat((m/1e3).toFixed(1)," km"):"".concat(Math.round(m)," m")}function it(m){return m&&typeof m.lat=="number"&&!Number.isNaN(m.lat)&&typeof m.lng=="number"&&!Number.isNaN(m.lng)}function k(m,y){var v;if(!m)return[];var L=(y==null?void 0:y.decodePath)||((v=google)===null||v===void 0||(v=v.maps)===null||v===void 0||(v=v.geometry)===null||v===void 0||(v=v.encoding)===null||v===void 0?void 0:v.decodePath)||null;return typeof L!="function"?[]:L(m).map((function(D){return typeof(D==null?void 0:D.toJSON)=="function"?D.toJSON():D}))}function at(){Dt&&(Dt.setMap(null),Dt=null)}function M(m){return m?it(m)?m:m.latLng?q(m.latLng):q(m):null}function q(m){if(!m)return null;if(it(m))return m;var y=typeof m.lat=="number"?m.lat:m.latitude,v=typeof m.lng=="number"?m.lng:m.longitude;return typeof y=="number"&&typeof v=="number"?{lat:y,lng:v}:null}function W(m){return Y.apply(this,arguments)}function Y(){return(Y=wt(P().mark((function m(y){var v,L,D,U,G,N,B,S,F,J;return P().wrap((function(K){for(;;)switch(K.prev=K.next){case 0:if(v=y.googleNamespace,L=y.providedMap,D=y.mapElement,U=y.mapElementId,G=y.defaultCenter,N=y.zoom,B=y.mapOptions,!(Lt=L)||V(Lt)!=="object"||typeof Lt.getCenter!="function"||typeof Lt.setCenter!="function"||typeof Lt.panTo!="function"){K.next=3;break}return K.abrupt("return",L);case 3:if(S=bt({element:D,elementId:U,fallbackIds:["asl-map","map"]})){K.next=7;break}return K.abrupt("return",null);case 7:return K.next=9,v.maps.importLibrary("maps");case 9:return F=K.sent,J=F.Map,K.abrupt("return",new J(S,l({center:G,zoom:N},B)));case 12:case"end":return K.stop()}var Lt}),m)})))).apply(this,arguments)}function bt(m){var y=m.element,v=m.elementId,L=m.fallbackIds,D=L===void 0?[]:L;if(Tt(y))return y;if(typeof v=="string"){var U=document.getElementById(v);if(U)return U}var G,N=Q(D);try{for(N.s();!(G=N.n()).done;){var B=G.value;if(B){var S=document.getElementById(B);if(S)return S}}}catch(F){N.e(F)}finally{N.f()}return null}function yt(m){var y=m.element,v=m.elementId,L=m.fallbackId;if(Tt(y))return y;if(typeof v=="string"){var D=document.getElementById(v);if(D)return D}return L&&document.getElementById(L)||null}function Tt(m){return typeof Element!="undefined"&&m instanceof Element}function Nt(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=typeof navigator!="undefined"?navigator.language:null,v=(function(L){if(typeof L!="string")return null;var D=L.trim();return D?D.split(",")[0]:null})(m.languageCode||m.language||m.locale||y);return{languageCode:v||void 0,regionCode:gt(m.regionCode||m.region)||(function(L){if(typeof L!="string")return null;var D=L.split(/[-_]/);return D.length>=2?gt(D[1]):null})(v)||void 0}}function gt(m){if(typeof m!="string")return null;var y=m.trim().toUpperCase();return/^[A-Z]{2}$/.test(y)?y:null}var Et={initRouteAPI:function(){return Gt.apply(this,arguments)},clearRouteDisplay:function(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},y=yt({element:m.panelElement||m.panelNode||m.panelContainer||null,elementId:m.panelElementId,fallbackId:m.fallbackPanelId||null})||zt;y?(function(v){if(g(),!!v){zt=v,v.innerHTML="";var L=document.createElement("p");L.className="asl-route-cleared",L.textContent="Route cleared.",v.appendChild(L)}})(y):g()}};typeof window!="undefined"&&(window.ASLRouteAPI=Et);const qt=Et;return a=a.default})()));function _isMobileDevice(){var n=window.innerWidth<768;return(function(a){(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
6sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))&&(n=!0)})(navigator.userAgent||navigator.vendor||window.opera),n}function _isIOSDevice(){if(typeof navigator=="undefined")return!1;const n=navigator.userAgent||"";return/iPhone|iPad|iPod/i.test(n)}Date.prototype.addHours=function(n){return this.setTime(this.getTime()+n*60*60*1e3),this},Date.prototype.subDays=function(n){return this.setTime(this.getTime()-n*60*60*1e3*24),this};function getDecimal(n){return Math.ceil((n-Math.floor(n))*100)}if(asl_configuration.gdpr_enabled){var head=document.getElementsByTagName("head")[0],insertBefore=head.insertBefore;head.insertBefore=function(n,a){n.href&&n.href.indexOf("https://fonts.googleapis.com/css?family=Roboto")===0||insertBefore.call(head,n,a)}}var asl_drawing={shapes:[],shapes_index:0,current_map:null,loadData:function(n,a){var d=this;d.current_map=a;for(var l in n.shapes)n.shapes[l]&&(n.shapes[l].type=="polygon"?d.shapes.push(d.create_polygon.call(d,n.shapes[l].coord,a,n.shapes[l])):n.shapes[l].type=="polyline"?d.shapes.push(d.create_polyline.call(d,n.shapes[l].coord,a,n.shapes[l])):n.shapes[l].type=="circle"?d.shapes.push(d.create_circle.call(d,n.shapes[l],a)):n.shapes[l].type=="rectangle"&&d.shapes.push(d.create_rectangle.call(d,n.shapes[l],a)))},create_rectangle:function(n){var a=this.current_map;return new google.maps.Rectangle({strokeColor:n.strokeColor,fillColor:n.color,strokeWeight:1,type:"rectangle",editable:asl_drawing.allow_edit?asl_drawing.allow_edit:!1,map:a,bounds:new google.maps.LatLngBounds(new google.maps.LatLng(n.sw[0],n.sw[1]),new google.maps.LatLng(n.ne[0],n.ne[1]))})},create_circle:function(n,d){var d=this.current_map;return new google.maps.Circle({strokeColor:n.strokeColor,fillColor:n.color,type:"circle",strokeWeight:1,map:d,editable:asl_drawing.allow_edit?asl_drawing.allow_edit:!1,center:new google.maps.LatLng(n.center[0],n.center[1]),radius:n.radius})},create_polyline:function(n,l,d){var l=this.current_map,b=[];for(var P in n)b.push({lat:n[P][0],lng:n[P][1]});return new google.maps.Polyline({path:b,strokeColor:d.strokeColor||"#000000",strokeWeight:3,editable:!1,type:"polyline",map:l})},create_polygon:function(n,l,d){var l=this.current_map,b=[];for(var P in n)b.push({lat:n[P][0],lng:n[P][1]});return new google.maps.Polygon({paths:b,fillColor:d.color,strokeColor:d.strokeColor,strokeWeight:1,editable:!!asl_drawing.allow_edit,type:"polygon",map:l})}},ASL_CLOSE_BUTTON='<button aria-label="'+asl_configuration.words.clear+'" title="'+asl_configuration.words.clear+'" class="asl-search-clr asl-clear-btn hide" type="button"><svg width="12" height="12" viewBox="0 0 12 12" xmlns="https://www.w3.org/2000/svg"><path d="M.566 1.698L0 1.13 1.132 0l.565.566L6 4.868 10.302.566 10.868 0 12 1.132l-.566.565L7.132 6l4.302 4.3.566.568L10.868 12l-.565-.566L6 7.132l-4.3 4.302L1.13 12 0 10.868l.566-.565L4.868 6 .566 1.698z"></path></svg></button>',ASL_PICKUP_ROW=asl_configuration.pickup||asl_configuration.ship_from?'<div class="sl-row mt-2 sl-pickup-row"><div class="pol"><a class="btn btn-block btn-asl sl-pickup">'+(asl_configuration.ship_from?asl_configuration.words.ship_from:asl_configuration.words.pickup)+"</a></div></div>":null;(function(n){n.templates||(n.templates=asl_jQuery.templates),n.views||(n.templates=asl_jQuery.views),n.views&&n.views.tags&&(n.views.tags("cssClass",function(t){return typeof t=="string"?t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9\-_]/g,""):""}),n.views.tags("hasCategory",function(t,e){for(var o=0;o<e.length;o++)if(e[o].id===t)return this.tagCtx.render();return""}),n.views.tags("equal",function(t,e){return t==e}),n.views.tags("list",function(t){var e="";if(t){var o=t.split(",");if(o.length){for(var s=0;s<o.length;s++)e+="<li><span>"+o[s]+"</span></li>";e='<ul class="sl-list-props">'+e+"</ul>"}}return e}),n.views.tags("stars",function(t){if(!isNaN(t)){t=Math.round(parseFloat(t)*4)/4;var e=t/5*100,o=Math.round(e/5)*5+"%";return'<span class="sl-stars"><div class="sl-stars-out icon-star"><div style="width:'+o+'" class="sl-stars-in icon-star"></div></div></span>'}}),n.views.tags("removeBR",function(t){return t.replace(/<br\s*\/?>/gi,"")})),asl_configuration.debug=="1"&&(function(){var e=window.console;if(!e)return;function o(p){var h=e[p];e[p]=function(){if(arguments[0]&&arguments[0].indexOf("Google")!==-1){var g=n('<div class="alert alert-danger asl-geo-err"></div>');g.html(arguments[0]),g.appendTo(".asl-cont .asl-map"),window.setTimeout(function(){g.remove()},5e3)}if(h.apply)h.apply(e,arguments);else{var w=Array.prototype.slice.apply(arguments).join(" ");h(w)}}}for(var s=["error"],u=0;u<s.length;u++)o(s[u])})();function a(t){if(this.options=t||{},this.map=null,this.div=t.div[0],this.panel=t.panel[0],!this.div)throw new Error("ASLInfoBar: Sidebar element not found");this.isVisible=!1,this.panel.style.position="absolute",this.panel.style.zIndex=1e3,this.panel.style.display="none";const e=this.panel.querySelector(".sl-info-panel-close-btn");e&&e.addEventListener("click",()=>{this.close(),this.options.onCloseClick&&this.options.onCloseClick()})}a.prototype.open=function(t,e){this.isVisible=!0,this.panel.style.display="block"},a.prototype.getContent=function(){return this.content_},a.prototype.setContent=function(t){this.content_=t,this.div.replaceChildren(t)},a.prototype.close=function(){this.isVisible=!1,this.panel.style.display="none"},a.prototype.setPosition=function(t){},a.prototype.getVisible=function(){return this.isVisible},asl_locator.hook_event=function(t){if(window.asl_event_hook&&typeof window.asl_event_hook=="function")return asl_event_hook.call(this,t)},asl_locator.add_clear_button=function(t){var e=n(ASL_CLOSE_BUTTON);t.after(e);function o(){asl_view.clear_search(t),e.addClass("hide")}return n(t).on("keyup",function(s){var u=n.trim(this.value);u===""&&o()}),e.on("click",o),e},asl_locator.save_analytics=function(t,e){function o(){var W=null;try{W=window.sessionStorage.getItem("asl_analytics_session"),W||(W=window.crypto&&window.crypto.randomUUID?window.crypto.randomUUID():String(Date.now())+"-"+Math.random().toString(36).slice(2),window.sessionStorage.setItem("asl_analytics_session",W))}catch(Y){W=String(Date.now())+"-"+Math.random().toString(36).slice(2)}return W}function s(W,Y){for(var bt=W.address_components||W.addressComponents||[],yt=0;yt<bt.length;yt++){var Tt=bt[yt],Nt=Tt.types||[];if(Nt.indexOf(Y)!==-1)return Tt.short_name||Tt.shortText||Tt.long_name||Tt.longText||""}return""}function u(W){if(W.analytics_kind)return W.analytics_kind;var Y=W.types||[];return Y.indexOf("locality")!==-1||Y.indexOf("postal_town")!==-1?"city":Y.indexOf("administrative_area_level_1")!==-1?"state":Y.indexOf("country")!==-1?"country":Y.indexOf("postal_code")!==-1?"postal_code":"place"}var p={action:"asl_search_log",nonce:ASL_REMOTE.nonce,visitor_id:o()};if(e)p.is_search=0,p.store_id=t.id_;else{var h=t.place_id||t.placeId||t.id||null,g=t.geometry&&t.geometry.location?t.geometry.location:null,w=g?typeof g.lat=="function"?g.lat():g.lat:t.latitude,C=g?typeof g.lng=="function"?g.lng():g.lng:t.longitude,R=t.analytics_source||"google_place",z=u(t),it=t.country_code||s(t,"country"),k=t.analytics_label||t.formatted_address||t.formattedAddress||t.title||"",at=t.analytics_key||(h?"google:"+h:"search:"+R+":"+z+":"+k.toLowerCase());if(!n.trim(k)||R.indexOf("google_")===0&&(!h||w==null||C==null))return;var M=Date.now(),q=asl_locator.last_analytics_search;if(q&&q.key===at&&M-q.time<3e4)return;asl_locator.last_analytics_search={key:at,time:M},p.is_search=1,p.place_id=h,p.search_str=k,p.search_source=R,p.search_kind=z,p.search_key=at,p.country_code=it,p.latitude=w,p.longitude=C,p.result_count=t.result_count}n.ajax({url:ASL_REMOTE.ajax_url,data:p,type:"POST",success:function(W){}})},asl_locator.toRad_=function(t){return t*Math.PI/180},asl_locator.Store=function(t,e,o,s){this.id_=t,this.location_=e,this.categories_=o,this.props_=s||{},this.v_id=s.vendor_id},asl_locator.Store.prototype.setMarker=function(t){this.marker_=t,ASLEvent.trigger(this,"marker_changed",t)},asl_locator.Store.prototype.getMarker=function(){return this.marker_},asl_locator.Store.prototype.getId=function(){return this.id_},asl_locator.Store.prototype.getLocation=function(){return this.location_},asl_locator.Store.prototype.hasCategory=function(t){return this.categories_.indexOf(t)!=-1},asl_locator.Store.prototype.hasAnyCategory=function(t){if(t&&!t.array_.length)return asl_configuration.on_select;for(var e=t.asList(),o=0,s=e.length;o<s;o++)if(this.categories_.indexOf(e[o].id_)!=-1)return!0;return!1},asl_locator.Store.prototype.hasAllCategory=function(t){if(!t.array_.length)return asl_configuration.on_select;for(var e=t.asList(),o=0,s=e.length;o<s;o++)if(this.categories_.indexOf(e[o].id_)==-1)return!1;return!0},asl_locator.Store.prototype.getDetails=function(){return this.props_},asl_locator.Store.prototype.generateFieldsHTML_=function(t){for(var e=[],o=0,s=t.length;o<s;o++){var u=t[o];this.props_[u]&&(e.push('<div class="'),e.push(u),e.push('">'),e.push(u+": "),e.push(isNaN(this.props_[u])?this.props_[u]:numberWithCommas(this.props_[u])),e.push("</div>"))}return e.join("")},asl_locator.Store.prototype.generateFeaturesHTML_=function(){var t=[];t.push('<ul class="features">');for(var e=this.categories_.asList(),o=0,s;s=e[o];o++)t.push("<li>"),t.push(s.getDisplayName()),t.push("</li>");return t.push("</ul>"),t.join("")},asl_locator.Store.prototype.getStoreContent=function(){if(!this.content_){var t=window.asl_tmpl_list_item?window.asl_tmpl_list_item:n.templates(window.asl_tmpls&&window.asl_tmpls.list||"#tmpl_list_item");window.asl_tmpl_list_item=t,this.props_.target=asl_configuration.target_blank,this.content_=t.render(this.props_)}var e=n(this.content_);return(asl_configuration.pickup||asl_configuration.ship_from)&&e.a
6ppend(ASL_PICKUP_ROW),e},asl_locator.Store.prototype.advMkrContent=function(){var t=window.asl_tmpl_adv_mkr?window.asl_tmpl_adv_mkr:n.templates(window.asl_tmpls&&window.asl_tmpls.adv_mkr||"#asl_tmpl_adv_mkr");window.asl_tmpl_adv_mkr=t,this.props_.target=asl_configuration.target_blank;const e=document.createElement("div");return e.className="adv-mkr-cont",e.innerHTML=t.render(this.props_),e},asl_locator.Store.prototype.getcontent_=function(t){var e=window.asl_too_tip_tmpl?window.asl_too_tip_tmpl:n.templates(window.asl_tmpls&&window.asl_tmpls.infobox||"#asl_too_tip");window.asl_too_tip_tmpl=e,t.props_.show_categories=asl_configuration.show_categories;var o=e.render(t.props_);return o},asl_locator.Store.prototype.getInfoWindowContent=function(t){var e='<div class="infoWindow'+(asl_configuration.template=="5"?"-tmpl-5":"")+'" id="style_'+(asl_configuration.infobox_layout?asl_configuration.infobox_layout:"1")+'">';return e+=this.getcontent_(this),e+="</div>",e},asl_locator.Store.infoPanelCache_={},asl_locator.Store.prototype.getInfoPanelItem=function(){var t=this,e=asl_locator.Store.infoPanelCache_,o=t.id_;if(!e[o]){var s=t.getStoreContent();e[o]=s[0]}return e[o]};/** 7 * Gets the distance between this Store and a certain location. 8 * @param {google.maps.LatLng} point the point to calculate distance to/from. 9 * @return {number} the distance from this store to a given point. 10 * @license 11 * Latitude/longitude spherical geodesy formulae & scripts 12 * (c) Chris Veness 2002-2010 13 * www.movable-type.co.uk/scripts/latlong.html 14 */asl_locator.Store.prototype.distanceTo=function(t){var e=6371,o=this.getLocation(),s=asl_locator.toRad_(o.lat()),u=asl_locator.toRad_(o.lng()),p=asl_locator.toRad_(t.lat()),h=asl_locator.toRad_(t.lng()),g=p-s,w=h-u,C=Math.sin(g/2)*Math.sin(g/2)+Math.cos(s)*Math.cos(p)*Math.sin(w/2)*Math.sin(w/2),R=2*Math.atan2(Math.sqrt(C),Math.sqrt(1-C)),z=e*R;return asl_configuration.distance_unit=="Miles"?z*.621371:z},asl_locator.View=function(t,e,o){if(this.map_=t,this.data_=e,this._cont=o.container,this.settings_=n.extend({updateOnPan:!0,geolocation:!1,features:new asl_locator.FeatureSet},o),this.init_(),ASLEvent.trigger(this,"load"),this.set("featureFilter",new asl_locator.FeatureSet),asl_configuration.icon_size){var s=asl_configuration.icon_size.split("x"),u=parseInt(s[0]),p=parseInt(s[1]),h=null;asl_configuration.label_origin?(h=asl_configuration.label_origin.split("x"),h[0]=parseInt(h[0]),h[1]=parseInt(h[1])):h=[u/2,p/2-10];var g=null;asl_configuration.infowin_anchor?(g=asl_configuration.infowin_anchor.split("x"),g[0]=parseInt(g[0]),g[1]=parseInt(g[1])):g=[u/2,p/2+8],this.icon={scaledSize:new ASLSize(u,p),origin:new ASLPoint(0,0),anchor:new ASLPoint(g[0],g[1]),labelOrigin:new ASLPoint(h[0],h[1])}}if(asl_configuration.active_marker){var w=asl_configuration.URL+"icon/"+asl_configuration.active_marker;this.active_marker={m:null,picon:null,icon:this.icon?Object.assign({},this.icon,{url:w}):new ASLMarkerImage(w,null,null)}}this.display_list=asl_configuration.display_list,this.cat_in_tooltip=asl_configuration.title_only!="1"},asl_locator.View=asl_locator.View,asl_locator.View.prototype=Object.create(ASLMVCObject.prototype),asl_locator.View.prototype.constructor=asl_locator.View,asl_locator.View.prototype.secondary_match=function(t){if(asl_configuration.search_2_contain){for(let e of asl_configuration.search_2){let o=t[e]?t[e].toLowerCase():"",s=this.second_filter.title.toLowerCase();if(o.includes(s))return!0}return!1}else return t[this.second_filter.type]===this.second_filter.title;return!0},asl_locator.View.prototype.clear_search=function(t){if(asl_configuration.search_type=="1"&&(this.filter_text=null),this._cont.removeClass("asl-search-prfmd"),this._panel&&this._panel.hideNoStoresModal&&this._panel.hideNoStoresModal(),this.search_text=this.second_filter=this.locality=this.prop_filter=this._location=null,asl_locator.hook_event({type:"beforeclear",data:null}),asl_configuration.search_2){var e=this._cont.find(".asl-name-search .asl-search-name");e.val(""),e.parent().find(".asl-clear-btn").addClass("hide")}this.reset_measure(t);
14var o=new ASLLatLng(asl_configuration.default_lat,asl_configuration.default_lng);if(l()?this.getMap().panToWithOffset(o,0,0,null,parseInt(asl_configuration.zoom)):(this.getMap().panTo(o),this.getMap().setZoom(parseInt(asl_configuration.zoom))),asl_configuration.category_accordion){var s=this._cont.find("#asl-list li.item-state > a:not(.colisiond)");s[0]&&(s.addClass("colisiond"),s.next().removeClass("in"))}asl_configuration.first_load=="5"&&this._cont.addClass("sl-search-only"),asl_locator.hook_event({type:"clear",data:null})},asl_locator.View.prototype.reset_all=function(t,e){var o=this.getMap();if(asl_configuration.filter_ddl){for(var s in asl_configuration.filter_ddl)if(asl_configuration.filter_ddl.hasOwnProperty(s)){var u=asl_configuration.filter_ddl[s],p=asl_engine.controls[u];p&&typeof p.clear=="function"?p.clear():p&&typeof p.val=="function"&&p.val(""),asl_engine.select_controls&&asl_engine.select_controls[u]&&asl_engine.select_controls[u].multiselect("deselect","",!0).multiselect("clearSelection")}}if(this._panel.$category_ddl){var h=asl_view._panel.$category_ddl.val();h&&h.length>0&&this._panel.$category_ddl.multiselect("deselect",this._panel.$category_ddl.val(),!0).multiselect("clearSelection")}if(asl_configuration.address_ddl){for(var g in this._panel.address_ddls)if(this._panel.address_ddls.hasOwnProperty(g)){var w=this._panel.address_ddls[g];w.val(""),w.multiselect("deselect","",!0).multiselect("clearSelection").multiselect("refresh")}}if(this.highlight(null),asl_configuration.is_mob&&n("html, body").stop().animate({scrollTop:this._cont.offset().top},900,"swing"),!e){let R=this;var C=new ASLLatLng(asl_configuration.default_lat,asl_configuration.default_lng);l()?o.panToWithOffset(C,0,0,function(){R.refreshView()},parseInt(asl_configuration.zoom)):(o.panTo(C),o.setZoom(parseInt(asl_configuration.zoom)),ASLEvent.addListenerOnce(o,"idle",function(){R.refreshView()},asl_configuration))}t&&t.apply(this)},asl_locator.View.prototype.render_branch_list=function(t){this.data_.setBranchList(t),this.parent_branch_position(t),this.branch_view=!0,this.refreshView(),this._cont.find(".Num_of_store .sl-head-title").html(t.props_.title),this._cont.find(".Num_of_store .sl-hide-branches").removeClass("d-none")},asl_locator.View.prototype.reset_branch_list=function(){this.branch_view=!1,this.data_.setBranchList(null),this.parent_branch_position(null),this.refreshView(),this._cont.find(".Num_of_store .sl-head-title").html(asl_configuration.head_title),this._cont.find(".Num_of_store .sl-hide-branches").addClass("d-none")},asl_locator.View.prototype.parent_branch_position=function(t){var e=this;t?(t.real_location&&(e.markerCache_[t.id_]&&e.markerCache_[t.id_].setPosition(t.real_location),t.props_.distance=t.props_.real_distance,t.props_.dist_str=t.props_.real_distance_str),this.parent_branch=t):this.parent_branch&&(t=this.parent_branch,t.closest_store&&(e.markerCache_[t.id_]&&e.markerCache_[t.id_].setPosition(t.closest_store.location_),t.props_.distance=t.closest_store.props_.distance,t.props_.dist_str=t.closest_store.props_.distance_str),this.parent_branch=null),t&&asl_locator.Store.infoPanelCache_&&delete asl_locator.Store.infoPanelCache_[t.id_]},asl_locator.View.prototype.measure_distance=function(t,e,o,s){var u=this;this.clear_infobox(),!asl_locator.isMapLibre()&&asl_configuration.adv_mkr&&(u.clearMarkers(),delete u.markerCache_,u.markerCache_={});var p=new ASLLatLng(t.lat(),t.lng());u._panel.dest_coords=u.dest_coords=p;var h=!!(u.dest_coords||u.prop_filter||u.get("featureFilter").count()||!asl_engine.helper.is_empty(u.address_values));if(h&&(asl_configuration.user_center?asl_configuration.user_center=!1:this._cont.addClass("asl-search-prfmd")),asl_configuration.sort_random&&(asl_configuration.sort_random=!1),asl_configuration.first_load=="5"?u._cont.removeClass("sl-search-only"):asl_configuration.first_load=="3"?u.display_list||(u._cont.removeClass("map-full"),u.display_list=!0):asl_configuration.first_load=="4"&&(u.list_shown||(u._cont.removeClass("map-full"),u.list_shown=!0)),asl_configuration.filter_address){var g={};if(Array.isArray(s)&&(s=s[0]),s&&s.address_components){for(var w in s.address_components)if(s.address_components.hasOwnProperty(w))if(s.address_components[w].types.indexOf("sublocality")!=-1||s.address_components[w].types.indexOf("sublocality_level_1")!=-1||s.address_components[w].types.indexOf("locality")!=-1||s.address_components[w].types.indexOf("administrative_area_level_2")!=-1){var C=[s.address_components[w].long_name.toLowerCase(),s.address_components[w].short_name.toLowerCase()];g.city=g.city?g.city.concat(C):C}else s.address_components[w].types.indexOf("administrative_area_level_1")!=-1?g.state=[s.address_components[w].long_name.toLowerCase(),s.address_components[w].short_name.toLowerCase()]:s.address_components[w].types.indexOf("country")!=-1?g.country=[s.address_components[w].long_name.toLowerCase(),s.address_components[w].short_name.toUpperCase()]:s.address_components[w].types.indexOf("postal_code")!=-1&&(g.postal_code=[s.address_components[w].long_name.toLowerCase(),s.address_components[w].short_name.toLowerCase()])}g.city&&delete g.state,u.locality=g.city||g.state||g.country||g.postal_code?g:null}var R=100,z=1e3,it=null,k=asl_configuration.distance_unit=="KM"?asl_configuration.words.Km:asl_configuration.words.Miles,at=u.data_.stores_;for(var M in at)if(at.hasOwnProperty(M)){var q=at[M].distanceTo(u.dest_coords);at[M].content_=null,at[M].props_.distance=q,at[M].props_.dist_str=asl_engine.helper.format_count(q)+" "+k,q>R&&(R=q),q<z&&(it=at[M],z=q)}if(asl_configuration.branches){for(var M in at)if(at.hasOwnProperty(M)){var W=at[M];if(W.props_.childs){var Y=u.data_.getClosestBranch(W);W.closest_store=Y[1],W.props_.real_distance=W.props_.distance,W.props_.real_distance_str=W.props_.dist_str,W.props_.distance=Y[0],W.props_.dist_str=asl_engine.helper.format_count(Y[0])+" "+k,W.real_location=W.location_,W.location_=W.closest_store.location_,u.markerCache_[W.id_]&&u.markerCache_[W.id_].setPosition(W.location_)}}}if(delete asl_locator.Store.infoPanelCache_,asl_locator.Store.infoPanelCache_={},u.my_marker)u.my_marker.setPosition(p);else{var bt=asl_locator.isMapLibre()?asl_locator.MapLibreMarker:google.maps.Marker;u.my_marker=new bt({title:asl_configuration.words.your_cur_loc,position:p,zIndex:0,animation:ASLAnimation.DROP,draggable:!0,map:asl_configuration.geo_marker=="0"?null:u.getMap()});var yt=asl_configuration.URL+"icon/me-pin.png";asl_configuration.geo_marker_id&&asl_markers[asl_configuration.geo_marker_id]&&(yt=asl_configuration.URL+"icon/"+asl_markers[asl_configuration.geo_marker_id].icon);var Tt=new ASLMarkerImage(yt,null,null,null);u.my_marker.setIcon(Tt),u.my_marker.addListener("dragend",function(gt){u.measure_distance(gt.latLng)})}if(e&&asl_configuration.search_destin=="1"&&it&&(p=it.getLocation()),asl_configuration.radius_cir
14cle)u.draw_radius_center(u.dest_coords),u.refreshView();else if(!o){if(asl_configuration.search_zoom=="0"&&u.bbox)u.bbox.isEmpty()||u.getMap().fitBounds(u.bbox);else{var Nt=parseInt(asl_configuration.search_zoom);asl_locator.isMapLibre()?u.getMap().panToWithOffset(p,0,0,null,Number.isFinite(Nt)&&Nt>0?Nt:null):(u.getMap().setCenter(p),asl_configuration.search_zoom&&u.getMap().setZoom(Nt)),ASLEvent.trigger(u,"load")}u.refreshView()}u._panel.geo_modal&&u._panel.hideGeoModal()},asl_locator.View.prototype.fit_distance_range=function(t){if(t){var e=parseInt(asl_configuration.radius_range);if(!(!Number.isFinite(e)||e<=0)){e*=1e3,asl_configuration.distance_unit!="KM"&&(e*=1.60934);var o=asl_locator.isMapLibre()?asl_locator.MapLibreCircle:google.maps.Circle,s=new o({radius:e,center:t}),u=s.getBounds();u&&this.getMap().fitBounds(u)}}},asl_locator.View.prototype.draw_radius_center=function(t){var e=this,o=null;if(t){if(o=parseInt(asl_configuration.radius_range),o=o*1e3,asl_configuration.distance_unit!="KM"&&(o=o*1.60934),e.$circle)e.$circle.setOptions({radius:o,center:t});else{var s=asl_locator.isMapLibre()?asl_locator.MapLibreCircle:google.maps.Circle;e.$circle=new s({strokeColor:asl_configuration.radius_color||"#FFFF00",strokeOpacity:.7,strokeWeight:2,fillColor:asl_configuration.radius_color||"#FFFF00",fillOpacity:asl_configuration.radius_fill||.2,map:e.getMap(),radius:o,center:t})}e.getMap().fitBounds(e.$circle.getBounds())}},asl_locator.View.prototype.setup_distance_control=function(){var t=this;if(String(asl_configuration.hide_search||"0")!=="1"){asl_configuration.radius_range=100,asl_configuration.fixed_radius&&(asl_configuration.radius_range=parseInt(asl_configuration.fixed_radius));var e=asl_configuration.dropdown_range.split(",");if(!asl_configuration.boundary_box){if(asl_configuration.distance_slider&asl_configuration.advance_filter&&asl_configuration.distance_control=="1"){var o=asl_configuration.distance_unit=="KM"?asl_configuration.words.Km:asl_configuration.words.Miles,s="";if(asl_configuration.template=="2"&&(o=asl_configuration.distance_unit=="KM"?asl_configuration.words.km_short||"km":asl_configuration.words.mi_short||"mi"),t.$dist_control)asl_configuration.radius_range=parseInt(t.$dist_control.val());else{for(var u=0;u<e.length;u++){var p=e[u],h=!!(p&&p[0]=="*");h?(p=p.replace("*",""),s+='<option selected="selected" value="'+p+'">'+p+" "+o+"</option>"):s+='<option value="'+p+'">'+p+" "+o+"</option>"}var g=asl_configuration.template!="1"?'<label for="asl-ctrl-ddl-range" class="asl-cntrl-lbl">'+asl_configuration.words.distance+"</label>":"";t._cont.find(".range_filter").html('<div class="asl-filter-cntrl">'+g+'<div class="sl-dropdown-cont"> <select id="asl-ctrl-ddl-range" class="asl-dist-ddl">'+s+"</select></div></div>").removeClass("hide"),asl_configuration.template=="1"&&t._cont.find(".range_filter").prepend('<label for="asl-ctrl-ddl-range">'+asl_configuration.words.in+"</label>"),t.$dist_control=t._cont.find(".asl-dist-ddl");var w={};asl_configuration.template=="2"&&(w={templates:{button:'<button type="button" class="multiselect adropdown-toggle style-btn" data-toggle="adropdown"><i class="icon-clock"></i><span class="multiselect-selected-text"></span><i class="icon-down-open"></i></button>'},buttonText:function(z){return z.length?(asl_configuration.words.within||"Within")+" "+z.first().text():asl_configuration.words.select_distance}}),t.$dist_control.multiselect(n.extend({enableFiltering:!1,nonSelectedText:asl_configuration.words.select_distance,numberDisplayed:1,maxHeight:asl_configuration.ddl_max_height?parseInt(asl_configuration.ddl_max_height):250,onChange:function(z,it){var k=parseInt(z.val());isNaN(k)&&(k=1e3),asl_configuration.radius_range=k,t.refreshView(),t.$circle?t.draw_radius_center(t.dest_coords):t.fit_distance_range(t.dest_coords)}},w)),asl_configuration.radius_range=parseInt(t.$dist_control.val())}}else if(asl_configuration.distance_slider&asl_configuration.advance_filter&&asl_configuration.distance_control=="0")if(t._cont.find(".range_filter").removeClass("hide"),t.$dist_control)t.$dist_control.aslSlider("setAttribute","max",asl_configuration.radius_range),t.$dist_control.aslSlider("setValue",asl_configuration.radius_range),t._cont.find("#asl-radius-input").html(asl_configuration.radius_range);else{var C=asl_configuration.slider_val_radius?parseInt(asl_configuration.slider_val_radius):asl_configuration.radius_range;t._cont.find("#asl-radius-input").html(C);var R=t._cont.find("#asl-radius-slide");if(!R.length||typeof R.aslSlider!="function")return;R.aslSlider({value:C,min:asl_configuration.slider_min_radius?parseInt(asl_configuration.slider_min_radius):1,max:asl_configuration.radius_range}),t.$dist_control=R,t.$dist_control.on("slide",function(z){t._cont.find("#asl-radius-input").html(z.value),asl_configuration.radius_range=z.value}).on("slideStop",function(z){t._cont.find("#asl-radius-input").html(z.value),asl_configuration.radius_range=z.value,t.refreshView(),t.$circle?t.draw_radius_center(t.dest_coords):t.fit_distance_range(t.dest_coords)}),asl_configuration.radius_range=C}}}},asl_locator.View.prototype.reset_measure=function(t){var e=this;
14this.clear_infobox(),asl_configuration.adv_mkr&&(e.clearMarkers(),delete e.markerCache_,e.markerCache_={}),e.bbox=e._panel.dest_coords=e.dest_coords=null;var o=asl_configuration.radius_range,s=1e3,u=null,p=e.data_.stores_;for(var h in p)p.hasOwnProperty(h)&&(p[h].content_=null,p[h].props_.label=p[h].props_.dist_str=p[h].props_.distance=null);if(asl_configuration.branches){for(var h in p)if(p.hasOwnProperty(h)){var g=p[h];g.props_.childs&&(g.location_=g.real_location,g.real_distance_str=g.real_distance=g.closest_store=g.real_location=null,e.markerCache_[g.id_]&&e.markerCache_[g.id_].setPosition(g.location_))}}e._cont.find("#asl-radius-input").html(asl_configuration.radius_range),delete asl_locator.Store.infoPanelCache_,asl_locator.Store.infoPanelCache_={},e.my_marker&&(e.my_marker.setMap(null),delete e.my_marker,e.my_marker=null),e.$circle&&(e.$circle.setMap(null),delete e.$circle,e.$circle=null),e.refreshView(),n(t).val("")},asl_locator.View.prototype.add_search_text=function(t){var e=this;e._panel.search_control&&(e._panel.search_control.value=t,n(e._panel.search_control).next().removeClass("hide"))},asl_locator.View.prototype.geolocate_=function(){var t=this;if(window.navigator&&navigator.geolocation){let o=function(s){var u=n('<div class="alert alert-danger asl-geo-err"></div>');switch(s.code){case"http":u.html("Error! site is loading with HTTP connection");break;case s.PERMISSION_DENIED:u.html(asl_configuration.words.geo_location_error||s.message||"User denied the request for Geolocation.");break;case s.POSITION_UNAVAILABLE:u.html("Location information is unavailable.");break;case s.TIMEOUT:u.html("The request to get user location timed out.");break;case s.UNKNOWN_ERROR:u.html("An unknown error occurred.");break;default:u.html(s.message)}u.appendTo(".asl-cont .asl-map"),window.setTimeout(function(){u.remove()},5e3)};var e=o;if(window.location.protocol=="http:"){o({code:"http"});return}navigator.geolocation.getCurrentPosition(function(s){t.measure_distance(new ASLLatLng(s.coords.latitude,s.coords.longitude)),asl_locator.hook_event({type:"geolocation",data:s.coords}),t.add_search_text(asl_configuration.words.current_location)},o,{maximumAge:60*1e3,timeout:10*1e3})}},asl_locator.View.prototype.geo_service=function(){var t=this,e="https://get.geojs.io/v1/ip/geo.json",o=t._cont.find("#auto-complete-search,.asl-search-address");n.ajax({url:e,type:"GET",dataType:"json",success:function(s){if(s&&s.latitude&&s.longitude){var u=parseFloat(s.latitude),p=parseFloat(s.longitude),h=new ASLLatLng(u,p),g=[];s.city&&g.push(s.city),s.region&&g.push(s.region),s.country&&g.push(s.country);var w=g.join(", ");o.val(w),o.next().removeClass("hide"),t.measure_distance(h),asl_locator.hook_event({type:"geolocation",data:h})}},error:function(s){console.warn("Error Store Locator! GeoJS API: ",s)}})},asl_locator.View.prototype.clear_infobox=function(){this.get("selectedStore")&&this.highlight(null)},asl_locator.View.prototype.fitBound=function(t){var e=t||this.get("stores");if(e.length){var o=new ASLLatLngBounds;for(var s in e)e.hasOwnProperty(s)&&o.extend(e[s].getLocation());var u=asl_configuration.max_bound_zoom,p=asl_configuration.min_bound_zoom||2;l()?this.getMap().fitBounds(o,{padding:40,minZoom:p,maxZoom:u}):(ASLEvent.addListenerOnce(this.getMap(),"bounds_changed",function(){this.setZoom(Math.max(p,Math.min(this.getZoom(),u)))}),this.getMap().fitBounds(o))}},asl_locator.View.prototype.init_=function(){this.settings_.geolocation&&this.geolocate_(),this.markerCache_={};var t=asl_configuration.infobox_width||320,e=asl_configuration.PLUGIN_URL+(asl_configuration.close_white?"public/img/cross-white.png":"public/img/cross.png"),o="11px 10px -27px 0px";(asl_configuration.infobox_layout=="2"||asl_configuration.template=="1"&&asl_configuration.infobox_layout=="0")&&(e=asl_configuration.PLUGIN_URL+"public/img/close-white.svg"),asl_configuration.template=="5"?this.infoWindow_=new a({panel:this._cont.find("#asl-infobar-panel"),div:this._cont.find(".sl-infobar-section"),onCloseClick:()=>{this._panel.SListCont_.removeClass("sl-item-highlighted")}}):l()?this.infoWindow_=new mt({width:t,markerHeight:Number(asl_configuration.marker_height)||35,closeBoxMargin:o}):this.infoWindow_=new InfoBox({boxStyle:{width:t+"px",margin:"0 0 "+asl_configuration.marker_height+"px -"+t/2+"px"},alignBottom:!0,pane:!1,disableAutoPan:!0,closeBoxMargin:o,closeBoxURL:e,infoBoxClearance:new ASLSize(1,1)});var s=this,u=this.getMap();this.set("updateOnPan",this.settings_.updateOnPan),ASLEvent.addListener(this.infoWindow_,"closeclick",function(){s.highlight(null)}),ASLEvent.addListener(u,"click",function(){s.get("selectedStore")&&(s.highlight(null),s.infoWindow_.close())}
14),s._cont.find(".Num_of_store .sl-hide-branches").on("click",s.reset_branch_list.bind(s)),s.setup_distance_control(),asl_configuration.adv_mkr&&(asl_configuration.marker_label=asl_configuration.do_bounce=asl_configuration.active_marker=asl_configuration.cluster=!1,s.active_marker="",this.createMarker=function(p){var h=new google.maps.marker.AdvancedMarkerElement({content:p.advMkrContent(),position:p.getLocation(),title:p.props_.title});return h},google.maps.marker.AdvancedMarkerElement.prototype.getPosition=function(){return this.position},google.maps.marker.AdvancedMarkerElement.prototype.getMap=function(){return this.map}),asl_configuration["default-addr"]&&asl_engine.helper.query_parameter("sl-addr")&&!asl_configuration.disable_page_scroll&&n("html, body").animate({scrollTop:s._cont.offset().top},1e3)};function d(){for(var t=0;t<arguments.length;t++){var e=arguments[t];if(e!=null){var o=String(e).trim().replace(/\s+/g,"-").replace(/[^A-Za-z0-9\-_]/g,"").toLowerCase();if(o)return o}}return"item-"+Math.random().toString(36).slice(2,8)}asl_locator.View.prototype.template_6_setup=function(){var t=this,e=this.data_.scroll_data||[];if(t.scrollTargetIdMap={},!!e.length){var o=asl_configuration.words&&(asl_configuration.words.scroll_shortcuts||asl_configuration.words.scroll_sections)||"Store navigation shortcuts";o=String(o||"");var s=asl_configuration.words&&(asl_configuration.words.scroll_prev||asl_configuration.words.previous||asl_configuration.words.prev)||"Scroll left",u=asl_configuration.words&&(asl_configuration.words.scroll_next||asl_configuration.words.next)||"Scroll right";s=String(s||""),u=String(u||"");var p=n("<div>",{class:"sticky-top py-3 px-4"}),h=n("<div>",{class:"sl-row sl-scroll-panel"}),g=n("<ul>",{class:"pol-10 d-flex flex-md-wrap gap-2 list-unstyled asl-scroll-chip-list",role:"list"}).attr("aria-label",o).css({listStyle:"none",margin:0,padding:0,display:"flex"});if(h.append(g),p.append(h),e.forEach(function(q){var W=String(q.value).trim(),Y=q.type+"::"+W,bt=d(W,q.title,Y),yt="scroll-"+bt,Tt="#"+yt;t.scrollTargetIdMap[Y]=yt,t.scrollTargetIdMap[q.type+"::"+String(q.value)]=yt;var Nt=n("<li>",{class:"asl-panel-scroll-item",role:"listitem",style:"display:flex; flex:0 0 auto;"}),gt=n("<button>",{type:"button",class:"asl-panel-scroll-btn","data-target":Tt,"data-value":q.value,"data-prop":q.type,"aria-controls":yt,"aria-pressed":"false",html:t.getScrollIcon()+" "+q.title});Nt.append(gt),g.append(Nt)}),this._panel.mainPanel.prepend(p),e.length>=4){var w=document.getElementById("asl-scroll-chip-slider-template"),C=n();if(w)if(w.content&&w.content.firstElementChild)C=n(w.content.firstElementChild.cloneNode(!0));else{var R=(w.innerHTML||"").trim();R&&(C=n(R))}(!C||!C.length)&&(C=n("<div>",{class:"sl-scroll-slider","data-chip-slider":"true"}),C.append(n("<button>",{class:"sl-nav left is-hidden","data-left":"","aria-label":"Scroll left"}).append(n("<span>",{class:"icon-left-open-big","aria-hidden":"true"}),n("<span>",{class:"sr-only",text:"Scroll left"})),n("<ul>",{class:"sl-scroll-track list-unstyled gap-2","data-track":"","data-scroll-chip-list":"true",role:"list","aria-label":"Store navigation shortcuts"}).css({listStyle:"none",margin:0,padding:0,display:"flex",flexWrap:"nowrap"}),n("<button>",{class:"sl-nav right is-hidden","data-right":"","aria-label":"Scroll right"}).append(n("<span>",{class:"icon-right-open-big","aria-hidden":"true"}),n("<span>",{class:"sr-only",text:"Scroll right"}))));var z=C.find("[data-track]").first();z.length?(z.attr("data-track")||z.attr("data-track",""),z.attr("data-scroll-chip-list")||z.attr("data-scroll-chip-list","true")):(z=n("<ul>",{class:"sl-scroll-track list-unstyled gap-2",role:"list"}).attr("data-track","").attr("data-scroll-chip-list","true").css({listStyle:"none",margin:0,padding:0,display:"flex",flexWrap:"nowrap"}),C.append(z)),z.attr("aria-label",o);var it=C.find("[data-left]").first();if(!it.length)it=n("<button>",{class:"sl-nav left is-hidden","aria-label":s}).attr("data-left","").append(n("<span>",{class:"icon-left-open-big","aria-hidden":"true"}),n("<span>",{class:"sr-only",text:s})),C.prepend(it);else{it.attr("aria-label",s),it.attr("data-left")||it.attr("data-left","");var k=it.find(".sr-only").first();k.length?k.text(s):it.append(n("<span>",{class:"sr-only",text:s}))}var at=C.find("[data-right]").first();if(!at.length)at=n("<button>",{class:"sl-nav right is-hidden","aria-label":u}).attr("data-right","").append(n("<span>",{class:"icon-right-open-big","aria-hidden":"true"}),n("<span>",{class:"sr-only",text:u})),C.append(at);else{at.attr("aria-label",u),at.attr("data-right")||at.attr("data-right","");var M=at.find(".sr-only").first();M.length?M.text(u):at.append(n("<span>",{class:"sr-only",text:u}))}z.append(g.children()),g.replaceWith(C),(function(W){const Y=W.find("[data-track]").get(0),bt
14=W.find("[data-left]"),yt=W.find("[data-right]"),Tt=W.find(".asl-panel-scroll-btn"),Nt=t._panel.mainPanel,gt=Nt.get(0),Et=gt&>.scrollHeight>gt.clientHeight,qt=(X,et)=>String(X)+"::"+String(et),m=new Map,y=new Set;Tt.each(function(X){const et=n(this),xt=et.data("prop"),dt=et.data("value");y.add(String(xt)),m.set(qt(xt,dt),X)});const v=Array.from(y);let L=0,D=null,U=!1;function G(){return Tt.toArray()}function N(X){return G().indexOf(X)}function B(){return Tt.length-1}function S(){return Y.scrollWidth>Y.clientWidth+1}function F(){const X=S();bt.toggleClass("is-hidden",!X||L<=0),yt.toggleClass("is-hidden",!X||L>=B())}function J(){const X=Y.scrollLeft,et=G();for(let xt=0;xt<et.length;xt++)if(et[xt].offsetLeft>=X-1)return xt;return B()}function K(X,et,xt){const dt=t._panel.storeList_.find(".sl-store-scroll-lbl").filter(function(){return n(this).data(String(et))==String(X)});if(!dt.length)return;const ht=dt.first(),O=Et?Nt:n("html, body"),ot=Et?ht.position().top+Nt.scrollTop()-100:ht.offset().top-100;!xt&&U||(U=!0,O.stop(!0).animate({scrollTop:ot},400,function(){U=!1}))}function Lt(X,et=!0,xt=!0,dt=!1){X=Math.max(0,Math.min(X,B())),L=X;const ht=G()[X];if(ht){if(Tt.removeClass("sl-actv").attr("aria-pressed","false").removeAttr("aria-current"),n(ht).addClass("sl-actv").attr("aria-pressed","true").attr("aria-current","true"),et&&Y.scrollTo({left:ht.offsetLeft,behavior:"smooth"}),xt){const O=n(ht);K(O.data("value"),O.data("prop"),dt)}F()}}function St(){clearTimeout(D),D=setTimeout(()=>{const X=J();Lt(X,!1,!0,!1)},100)}bt.on("click",()=>Lt(L-1,!0,!0,!1)),yt.on("click",()=>Lt(L+1,!0,!0,!1)),W.off("click.aslChip").on("click.aslChip",".asl-panel-scroll-btn",function(X){X.stopPropagation(),X.preventDefault(),Lt(N(this),!0,!0,!0);const et=n(this),xt=String(et.data("value")),dt=String(et.data("prop"));t.zoomToFilteredStores(xt,dt)}),Y.addEventListener("wheel",X=>{Math.abs(X.deltaY)>Math.abs(X.deltaX)&&(X.preventDefault(),Y.scrollLeft+=X.deltaY),St()},{passive:!1});let st=!1,vt=0,lt=0;Y.addEventListener("pointerdown",X=>{X.target&&X.target.closest(".asl-panel-scroll-btn")||(st=!0,vt=X.clientX,lt=Y.scrollLeft,Y.setPointerCapture&&Y.setPointerCapture(X.pointerId),W.find("[data-track]").addClass("is-dragging"))}),Y.addEventListener("pointermove",X=>{st&&(Y.scrollLeft=lt-(X.clientX-vt),St())}),["pointerup","pointercancel","pointerleave"].forEach(X=>{Y.addEventListener(X,()=>{st=!1,W.find("[data-track]").removeClass("is-dragging")})});const Pt=()=>{if(U)return;const X=Et?gt.getBoundingClientRect():{top:0,bottom:window.innerHeight};let et=null;if(t._panel.storeList_.find(".sl-store-scroll-lbl").each(function(){if(this.getBoundingClientRect().bottom>X.top+10)return et=this,!1}),!et)return;const xt=n(et);for(const dt of v){const ht=xt.data(dt);if(ht!==void 0){const O=m.get(qt(dt,String(ht)));O!==void 0&&Lt(O,!0,!1,!1);break}}};Et?Nt.off("scroll.aslListSync").on("scroll.aslListSync",Pt):n(window).off("scroll.aslListSync").on("scroll.aslListSync",Pt),window.ResizeObserver?new ResizeObserver(()=>{const et=G()[L];et&&Y.scrollTo({left:et.offsetLeft}),F()}).observe(W.get(0)):window.addEventListener("resize",()=>{const X=G()[L];X&&Y.scrollTo({left:X.offsetLeft}),F()}),Lt(0,!1,!1,!1),F(),setTimeout(Pt,0)})(C),this._panel.mainPanel.off("click.aslScrollBtn")}else this._panel.mainPanel.off("click.aslScrollBtn").on("click.aslScrollBtn",".asl-panel-scroll-btn",function(){var q=n(this),W=String(q.data("value")),Y=String(q.data("prop")),bt=q.closest('[role="list"]');bt.find(".asl-panel-scroll-btn").not(q).removeClass("sl-actv").attr("aria-pressed","false").removeAttr("aria-current"),q.addClass("sl-actv").attr("aria-pressed","true").attr("aria-current","true");var yt=t._panel.storeList_.find(".sl-store-scroll-lbl").filter(function(){return n(this).data(Y)==W});if(yt.length){var Tt=yt.first(),Nt=t._panel.mainPanel,gt=Nt.get(0),Et=gt&>.scrollHeight>gt.clientHeight,qt=Et?Tt.position().top+Nt.scrollTop()-100:Tt.offset().top-100;(Et?Nt:n("html, body")).stop(!0).animate({scrollTop:qt},400)}t.zoomToFilteredStores(W,Y)})}},asl_locator.View.prototype.zoomToFilteredStores=function(t,e){var o=this;this.getFilterStore(t,e,function(s){if(s.length){var u=o.getMap();if(u){var p=new ASLLatLngBounds;if(s.forEach(function(g){p.extend(g.getLocation())}),s.length===1){var h=s[0].getLocation();u.panTo(h),typeof asl_configuration.zoom_li!="undefined"&&asl_configuration.zoom_li&&u.setZoom(parseInt(asl_configuration.zoom_li))}else u.fitBounds(p)}}})},asl_locator.View.prototype.getScrollIcon=function(){var t=document.querySelector("#asl-icon-scroll");return t?t.innerHTML.trim():""},asl_locator.View.prototype.updateOnPan_changed=function(){this.updateOnPanListener_&&ASLEvent.removeListener(this.updateOnPanListener_);var t=this;if(this.get("updateOnPan")&&this.getMap()){var t=this,e=this.getMap(),o=function(u){asl_configuration.reset_button&&n(".asl-reset-map")[0]&&n(".asl-reset-map")[0].style!="block"&&(n(".asl-reset-map")[0].style.display="block"),asl_configuration.sort_by_bound&&t.scheduleRefreshView()};this.updateOnPanListener_=ASLEvent.addListener(e,"dragend",o)}},asl_locator.View.prototype.addStoreToMap=function(t){var e=this.getMarker(t);t.setMarker(e);var o=this;e.clickListener_||(e.clickListener_=ASLEvent.addListener(e,asl_configuration.mouseover?"mouseover":"click",function(){if(asl_configuration.branches=="2"&&t.parent_store){o.render_branch_list(t.parent_store),o.highlight(t,!1);return}if(asl_configuration.click_redirect){var u=t.props_[asl_configuration.click_redirect];u&&(window.location.href=u);return}o.marker_clicked=!0,o.halt_fetch=!0,o.marker_center=e.getPosition(),o.highlight(t,!1)}));var s=!!asl_configuration.cluster;!s&&e.getMap()!=this.getMap()&&e.setMap(this.getMap())},asl_locator.View.prototype.createMarker=function(t){var e=asl_configuration.URL+"icon/",o=0;
14if(asl_configuration.category_marker){var s=this.selected_category||this.data_.flat_categories[t.categories_[0]];s?(e=asl_configuration.URL+"svg/",o=parseInt(s.ordr),e+=s.icon||"default.png"):e+="default.png"}else e+=asl_markers[t.props_.marker_id]&&asl_markers[t.props_.marker_id].icon||"default.png",o=t.props_.ordr||0;var u=asl_configuration.marker_title?this.cat_in_tooltip&&t.props_.c_names?t.props_.c_names+" | "+t.props_.title:t.props_.title:null,p={title:asl_engine.helper.html_entites(u),position:t.getLocation(),zIndex:asl_configuration.marker_index?o:null,optimized:!asl_configuration.icon_size||!/\.svg(?:[?#]|$)/i.test(e)&&!/\.svg(?:[?#]|$)/i.test(asl_configuration.active_marker||""),animation:null,icon:{url:e}};return this.icon&&(p.icon=Object.assign({},this.icon),p.icon.url=e),asl_configuration.marker_label&&t.props_.label&&(p.label={text:t.props_.label,color:asl_configuration.label_color||"#eb3a44",fontSize:"16px",fontWeight:"bold"}),l()?new ut(p):new google.maps.Marker(p)},asl_locator.View.prototype.getMarker=function(t){var e=this.markerCache_,o=t.id_;return e[o]||(e[o]=this.createMarker(t)),e[o]},asl_locator.View.prototype.getInfoWindow=function(t,e){if(!t)return this.infoWindow_;var o=n(t.getInfoWindowContent(e));return this.infoWindow_.setContent(o[0]),this.infoWindow_},asl_locator.View.prototype.getViewFeatures=function(){return this.settings_.features},asl_locator.View.prototype.getFeatureById=function(t){if(!this.featureById_){this.featureById_={};for(var e=this.getViewFeatures().asList(),o=0,s;s=e[o];o++)this.featureById_[s.id_]=s}return this.featureById_[t]},asl_locator.View.prototype.featureFilter_changed=function(){this.get("stores")&&this.clearMarkers()},asl_locator.View.prototype.clearMarkers=function(){for(var t in this.markerCache_){var e=this.markerCache_[t];if(e){e.setMap(null);var o=e.clickListener_;o&&(ASLEvent.removeListener(o),e.clickListener_=null)}}},asl_locator.View.prototype.storesWithCategory=function(t){var e=this.get("stores"),o=[];if(e)for(var s=0,u=e.length;s<u;s++)e[s].hasCategory(t)&&o.push(e[s]);return o},asl_locator.View.prototype.categoryClearAll=function(){var t=this.get("featureFilter");for(var e in t.array_)t.array_.pop()},asl_locator.View.prototype.categoryAccFilter=function(t,e){var o=this.get("featureFilter"),s=t&&e?this.getFeatureById(t):null;s&&o.add(s),this.set("featureFilter",o),this.refreshView(),this.fitBound()},asl_locator.View.prototype.doBounce=function(t,e){if(!asl_configuration.marker_label){var o=t.getMarker();!o||typeof o.setAnimation!="function"||(o.setAnimation(null),e&&o.setAnimation(ASLAnimation.BOUNCE))}},asl_locator.View.prototype.panTo=function(t){var e=t.getMarker();this.getMap().panTo(e.getPosition())},asl_locator.View.prototype.reloadLocator=function(t,e){asl_configuration.load_all="1",this.clearMarkers(),asl_configuration.cluster&&asl_locator.marker_clusters.clearMarkers(),this.data_.stores_=[],this.refreshView(),delete asl_locator.Store.infoPanelCache_,asl_locator.Store.infoPanelCache_={},this.data_.fetch_remote_data(null,t,e)},asl_locator.View.prototype.scheduleRefreshView=function(){var t=this;window.clearTimeout(this.refreshViewTimer_),this.refreshViewTimer_=window.setTimeout(function(){t.refreshViewTimer_=null,t.refreshView()},100)},asl_locator.View.prototype.refreshView=function(){var t=this,e=this.getMap().getBounds(),o={},s=!1;if(asl_configuration.filter_ddl){for(var u in asl_configuration.filter_ddl)if(asl_configuration.filter_ddl.hasOwnProperty(u)){var p=asl_configuration.filter_ddl[u],h=asl_engine.controls[p];h&&typeof h.val=="function"?(o[p]=h.val(),asl_configuration.single_cat_select=="1"&&(o[p]=o[p]=="0"||!o[p]?null:[o[p]])):h&&typeof h.values=="function"?o[p]=Array.from(h.values()):o[p]=[],o[p]&&o[p].length&&(s=!0)}}if(t._panel&&t._panel.geo_modal&&typeof t._panel.hideGeoModal=="function"){var g=t.get("featureFilter").count()||s||!asl_engine.helper.is_empty(t.address_values)||t.prop_filter||t.second_filter||t.search_text;g&&t._panel.hideGeoModal()}if(!asl_configuration.first_load||asl_configuration.first_load!="1"&&asl_configuration.first_load!="4"){var w=asl_configuration.first_load=="6"?t.dest_coords||t.prop_filter||t.get("featureFilter").count()||s||!asl_engine.helper.is_empty(t.address_values):!1;if(!w&&!t.dest_coords&&!t.prop_filter&&!t.second_filter&&!t.search_text){t.search_performed=!1,t.set("stores",[]),t._panel.set("stores",[!0]);return}}t.search_performed=!0,this.data_.getStores(e,this.get("featureFilter"),function(C){var R=t.get("stores");if(R)for(var z=0,it=R.length;z<it;z++){var k=R[z].getMarker();if(k&&(k.clickListener_&&(ASLEvent.removeListener(k.clickListener_),k.clickListener_=null),asl_configuration.adv_m
14kr)){var at=k;at.setMap(null)}}var M=[],q=[],W=0,Y=t.filter_text?t.filter_text:null,bt=!!(C&&C[0]&&C[0].props_.dist_str),yt=!!(bt&&(asl_configuration.distance_slider||asl_configuration.fixed_radius)),Tt=!!(asl_configuration.boundary_box&&t.bbox),Nt=!!(asl_configuration.ignore_priority_with_distance&&bt),gt=!!(asl_configuration.store_radius&&bt),Et=asl_configuration.sort_by;asl_configuration.search_dist_sort&&t.dest_coords&&(Et=""),asl_configuration.distance_filter_off=="1"&&(yt=!1);var qt=Object.keys(asl_categories),m=asl_configuration.filter_ddl;for(var y in qt)asl_categories[qt[y]]&&(asl_categories[qt[y]].len=0);for(var y in qt)asl_categories[qt[y]]&&(asl_categories[qt[y]].len=0);for(var v in C)if(C.hasOwnProperty(v)){var L=C[v].props_,D=asl_locator.hook_event({type:"store_filter",data:L,context:t});if(D!==!1&&!(asl_configuration.address_ddl&&(t.address_values.country&&t.address_values.country!=L.country||t.address_values.state&&t.address_values.state!=L.state||t.address_values.city&&t.address_values.city!=L.city))){if(m){var U=!0;for(var G in m){var N=o[m[G]];if(N&&N.length>0){var B=L[m[G]]||[];if(asl_configuration.and_filter?U=N.every(function(st){return B.indexOf(st)!=-1}):U=N.some(function(st){return B.indexOf(st)!=-1}),!U)break}}if(!U)continue}if(!(t.prop_filter&&t.prop_filter.type&&L[t.prop_filter.type]!=t.prop_filter.title)&&!(t.second_filter&&!t.secondary_match(L))&&!(asl_configuration.additional_search&&t.search_text&&(!C[v].props_.description_2||C[v].props_.description_2.indexOf(t.search_text)==-1))){if(asl_configuration.filter_address){if(t.locality==null){if(asl_configuration.default_city&&L.city.toLowerCase()!=asl_configuration.default_city.toLowerCase())continue}else if(t.locality){var S=!1;if((t.locality.city&&L.city&&t.locality.city.indexOf(L.city.toLowerCase())!=-1||t.locality.postal_code&&L.postal_code&&t.locality.postal_code.indexOf(L.postal_code.toLowerCase())!=-1||t.locality.state&&L.state&&t.locality.state.indexOf(L.state.toLowerCase())!=-1)&&(S=!0),!S)continue}}if(gt){if(L.distance>=parseFloat(L.radius))continue}else if(Tt){if(!asl_bounds_contains(t.bbox,C[v].getLocation()))continue}else if(asl_configuration.advance_filter){if(yt&&L.distance>=asl_configuration.radius_range||asl_configuration.time_switch&&asl_configuration.show_opened&&L.open!=!0)continue}else if(asl_configuration.fixed_radius&&L.distance&&L.distance>=asl_configuration.fixed_radius)continue;for(var y in C[v].categories_)C[v].categories_.hasOwnProperty(y)&&asl_categories[C[v].categories_[y]]&&asl_categories[C[v].categories_[y]].len++;W++,!(asl_configuration.branches&&t.shouldSkipStoreBasedOnBranch(L))&&(L.ordr>0&&!Nt?q.push(C[v]):M.push(C[v]))}}}if(asl_configuration.template=="2"&&asl_configuration.advance_filter){var F=t._cont.find(".asl-categories-list .round-box");F.each(function(st){n(this).attr("data-c",asl_categories[n(this).attr("data-id")].len),this.children[0].children[1].children[0].children[1].innerHTML=asl_engine.helper.locations_count(asl_categories[n(this).attr("data-id")].len)})}if(M.length==0&&q.length==0){var J=asl_locator.hook_event({type:"no_stores_filter",data:C,center:t.dest_coords,context:t});Array.isArray(J)&&(M=J)}else asl_locator.hook_event({type:"stores_filtered",data:M,center:t.dest_coords,context:t});if(q.length>0&&(t.dest_coords&&t.data_.sortDistance(t.dest_coords,q),t.data_.sortByDesc("ordr",q)),asl_configuration.sort_random?t.data_.sortRandom(M):e&&asl_configuration.sort_by_bound&&asl_configuration.sort_by_bound_always?t.data_.sortDistance(e.getCenter(),M):Et?t.data_.sortBy(Et,M):M&&t.dest_coords?t.data_.sortDistance(t.dest_coords,M):e&&asl_configuration.sort_by_bound&&t.data_.sortDistance(e.getCenter(),M),q.length>0&&(M=q.concat(M)),t.total_stores=M.length,asl_configuration.stores_limit&&(M=M.slice(0,asl_configuration.stores_limit)),(asl_configuration.adv_mkr||asl_configuration.marker_label)&&bt){for(var K=M.length,Lt=0;Lt<K;Lt++)M[Lt].props_.label=String(Lt+1);delete t.markerCache_,t.markerCache_={}}if(!M.length){var St=t.getFallbackStoreId();St&&(M=C.filter(function(st){return st.props_.id===St}),M&&t.fitBound(M))}t.set("stores",M),t._panel.set("stores",[!0]),asl_configuration.select_category&&asl_configuration.category_bound&&(asl_configuration["default-addr"]||t.fitBound(null),console.log("File: view.js, Line: 2629"),asl_configuration.select_category=null)})},asl_locator.View.prototype.getFallbackStoreId=function(){var t=asl_configuration.region_fallback_stores||null,e=null;if(typeof t=="string"&&t.trim())try{var o=t.replace(/"/g,'"').replace(/'/g,"'").replace(/&/g,"&");t=JSON.parse(o)}catch(it){t=null}if(t&&typeof t=="object"){var s=n(this._panel.search_control),u=s&&s.val()?String(s.val()).toLowerCase().trim():"",p=u.replace(/\s+/g," ");
14if(p){for(var h in t)if(t.hasOwnProperty(h)){var g=String(h).toLowerCase().trim();if(g){var w=g.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/\s+/g,"\\s+"),C=new RegExp("(^|[^a-z0-9])"+w+"([^a-z0-9]|$)","i");if(C.test(p)){var R=parseInt(t[h],10);if(!isNaN(R)){e=R;break}}}}}}if(!e&&asl_configuration.default_store){var z=parseInt(asl_configuration.default_store,10);isNaN(z)||(e=z)}return e},asl_locator.View.prototype.getFilterStore=function(t,e,o){var s=this,u=this.getMap().getBounds();this.data_.getStores(u,this.get("featureFilter"),function(p){var h=p.filter(function(g){return g.props_&&g.props_[e]===t});typeof o=="function"&&o(h)})},asl_locator.View.prototype.shouldSkipStoreBasedOnBranch=function(t){return asl_configuration.branches==="1"?this.branch_view?!t.branch:!!t.branch:asl_configuration.branches==="2"&&this.branch_view?!t.branch:!1},asl_locator.View.prototype.countWithBranches=function(t){for(var e=t.length,o=0;o<t.length;o++)t[o].props_.childs&&(e+=t[o].props_.childs.length);return e},asl_locator.View.prototype.stores_changed=function(){asl_configuration.category_marker&&asl_configuration.single_cat_select=="1"&&(this.selected_category=this.get("featureFilter").getSelected(),this.clearMarkers(),delete this.markerCache_,this.markerCache_={});var t=this.get("stores"),e=[];asl_configuration.cluster||this.clearMarkers();var o=this,s=this.markerBuildGeneration_=(this.markerBuildGeneration_||0)+1;function u(){s===o.markerBuildGeneration_&&asl_configuration.cluster&&(asl_locator.marker_clusters.clearMarkers(!asl_locator.isMapLibre()),asl_locator.marker_clusters.addMarkers(e))}function p(R){o.addStoreToMap(t[R]),e.push(t[R].marker_)}if(asl_configuration.cluster&&!asl_locator.isMapLibre()&&t.length>100){var h=0,g=window.requestIdleCallback?function(R){window.requestIdleCallback(R,{timeout:50})}:function(R){window.setTimeout(function(){R(null)},0)},w=function(R){if(s===o.markerBuildGeneration_){for(var z=0;h<t.length&&z<50&&(p(h++),z++,!(R&&R.timeRemaining()<3)););h<t.length?g(w):u()}};g(w);return}for(var C=0;C<t.length;C++)p(C);
14u()},asl_locator.View.prototype.getMap=function(){return this.map_},asl_locator.View.prototype.map_recenter=function(t,e,o,s,u){if(asl_configuration.disable_pan){typeof s=="function"&&s();return}var p=this.getMap();if(l()){var h=Number(o)||0;asl_configuration.infobox_layout=="1"&&(h-=50),p.panToWithOffset(t,e,h,s,u);return}if(!(!p||!p.getProjection())){var g=p.getProjection().fromLatLngToPoint(t instanceof google.maps.LatLng?t:p.getCenter()),w=new google.maps.Point((typeof e=="number"?e:0)/Math.pow(2,p.getZoom())||0,(typeof o=="number"?o:0)/Math.pow(2,p.getZoom())||0);p.panTo(p.getProjection().fromPointToLatLng(new google.maps.Point(g.x-w.x,g.y+w.y)))}},asl_locator.View.prototype.highlightAdvMkrTmpl5=function(t){var e=this.get("selectedStore");if(e){var o=e.getMarker();n(o.targetElement).removeClass("asl-mkr-actv"),o.zIndex=null}if(t){var o=t.getMarker();n(o.targetElement).addClass("asl-mkr-actv"),o.zIndex=1}},asl_locator.View.prototype.highlightAdvMkr=function(t,e){var o=this.getMap(),s=this,u=this.get("selectedStore");if(u){var p=u.getMarker();n(p.targetElement).removeClass("asl-mkr-actv"),p.zIndex=null}if(t){var h=this.get("stores");asl_configuration.analytics&&asl_locator.save_analytics(t,1),asl_configuration.zoom_li&&!l()&&o.setZoom(parseInt(asl_configuration.zoom_li)),this.map_recenter(t.getLocation(),asl_configuration.info_x_offset,asl_configuration.info_y_offset),asl_locator.hook_event({type:"select",data:t.props_}),o.getStreetView().getVisible()&&o.getStreetView().setPosition(t.getLocation());var p=t.getMarker();n(p.targetElement).addClass("asl-mkr-actv"),p.zIndex=1}this.set("selectedStore",t),this.display_list&&!e&&t&&!asl_configuration.accordion&&window.setTimeout(function(){var g=s._panel.mainPanel,w=s._panel.storeList_.find('.sl-item[data-id="'+t.id_+'"]'),C=w.position().top,R=typeof asl_configuration.scroll_offset!="undefined"?parseInt(asl_configuration.scroll_offset,10):0;w[0]&&g.animate({scrollTop:C+R},"fast")},50)},asl_locator.View.prototype.highlight=function(t,e){var o=null,s=this.getMap(),u=this;if(asl_configuration.adv_mkr){if(asl_configuration.template=="5")this.highlightAdvMkrTmpl5(t);else if(this.highlightAdvMkr(t,e),asl_configuration.template!="7")return}if(asl_configuration.template=="5"&&(t?this._panel.SListCont_.addClass("sl-item-highlighted"):this._panel.SListCont_.removeClass("sl-item-highlighted")),t){var p=this.get("stores");o=this.getInfoWindow(t,p);var h=t.getMarker(),g=function(){h?o.open(s,h):(o.setPosition(t.getLocation()),o.open(s))};l()?o.close():g(),h&&asl_configuration.analytics&&asl_locator.save_analytics(t,1);var w=!1;if(l()&&s.getBounds){var C=s.getBounds();w=C&&C.contains(t.getLocation())}if(asl_configuration.zoom_li&&!l()&&s.setZoom(parseInt(asl_configuration.zoom_li)),l()){var R=Number(asl_configuration.zoom_li);R=Number.isFinite(R)?R:null;var z=asl_configuration.cluster&&asl_locator.marker_clusters,it=z&&typeof z.getExpansionZoomForMarker=="function"?z.getExpansionZoomForMarker(h):Promise.resolve(null);it.then(function(k){if(u.get("selectedStore")===t){var at=w?null:R;Number.isFinite(Number(k))&&(at=Math.max(R===null?s.getZoom():R,Number(k))),u.map_recenter(t.getLocation(),asl_configuration.info_x_offset,asl_configuration.info_y_offset,g,at)}})}else this.map_recenter(t.getLocation(),asl_configuration.info_x_offset,asl_configuration.info_y_offset,null,null);asl_locator.hook_event({type:"select",data:t.props_}),s.getStreetView().getVisible()&&s.getStreetView().setPosition(t.getLocation())}else this.getInfoWindow().close(),asl_locator.hook_event({type:"unselect",data:null});this.set("selectedStore",t),this.display_list&&!e&&t&&!asl_configuration.accordion&&window.setTimeout(function(){if(!asl_configuration.disable_list_scroll){var k=u._panel.storeList_.find('.sl-item[data-id="'+t.id_+'"]');if(k[0]){var at=parseInt(asl_configuration.scroll_offset_y,10)||60,M=u._panel.mainPanel,q=M.get(0),W=q&&q.scrollHeight>q.clientHeight,Y=asl_configuration.template=="6"&&!W;M=Y?n("html, body"):M;var bt=Y?k.offset().top:k.position().top+(asl_configuration.template=="6"?u._panel.mainPanel.scrollTop():0);bt=Math.max(bt-at,0),M.animate({scrollTop:bt},"fast")}}},500)},asl_locator.View.prototype.selectedStore_changed=function(){},asl_locator.ViewOptions=function(){},asl_locator.ViewOptions.prototype.updateOnPan,asl_locator.ViewOptions.prototype.geolocation,asl_locator.ViewOptions.prototype.features,asl_locator.ViewOptions.prototype.markerIcon,asl_locator.Feature=function(t,e,o,s){this.id_=t,this.name_=e,this.img_=o,this.order=s},asl_locator.Feature=asl_locator.Feature,asl_locator.Feature.prototype.getId=function(){return this.id_},asl_locator.Feature.prototype.getDisplayName=function(){return this.name_},asl_locator.Feature.prototype.toString=function(){return this.getDisplayName()},asl_locator.FeatureSet=function(t){this.array_=[],this.hash_={};for(var e=0,o;o=arguments[e];e++)this.add(o)},asl_locator.FeatureSet=asl_locator.FeatureSet,asl_locator.FeatureSet.prototype.toggle=function(t){this.hash_[t.id_]?this.remove(t):this.add(t)},asl_locator.FeatureSet.prototype.add=function(t){t&&(this.array_.push(t),this.hash_[t.id_]=1)},asl_locator.FeatureSet.prototype.count=function(){return this.array_.length}
14,asl_locator.FeatureSet.prototype.remove=function(t){var e=t.id_;this.hash_[e]&&(delete this.hash_[e],this.array_=this.array_.filter(function(o){return o&&o.id_!=e}))},asl_locator.FeatureSet.prototype.asList=function(){for(var t=[],e=0,o=this.array_.length;e<o;e++){var s=this.array_[e];s!==null&&t.push(s)}return t},asl_locator.FeatureSet.prototype.getSelected=function(){var t=null,e=asl_view.data_.flat_categories;if(asl_configuration.has_child_categories){var o=asl_engine.select_controls&&asl_engine.select_controls.c_ids,s=o&&typeof o.val=="function"?o.val():null;s===null||typeof s=="undefined"||s===""?s=[]:Array.isArray(s)||(s=[s]),t=s.length>0?e[s[0]]:null}return t||(t=this.array_&&this.array_.length>0?this.array_[0]:null,t&&(t={id:t.id_,name:t.name_,icon:t.img_,order:t.order})),t},asl_locator.FeatureSet.NONE=new asl_locator.FeatureSet;function l(){return String(asl_configuration.map_vendor||"google").toLowerCase()==="maplibre"}function b(t){return t?{lat:typeof t.lat=="function"?t.lat():Number(t.lat),lng:typeof t.lng=="function"?t.lng():Number(t.lng)}:{lat:0,lng:0}}function P(t,e){var o=ASLControlPosition,s={"top-left":["TOP_LEFT","LEFT_TOP"],"top-right":["TOP_RIGHT","RIGHT_TOP","TOP_CENTER"],"bottom-left":["BOTTOM_LEFT","LEFT_BOTTOM"],"bottom-right":["BOTTOM_RIGHT","RIGHT_BOTTOM","RIGHT_CENTER","BOTTOM_CENTER"]};for(var u in s)for(var p=0;p<s[u].length;p++)if(o[s[u][p]]!==void 0&&String(o[s[u][p]])===String(t))return u;return e||"bottom-right"}function Q(t,e){var o=["streets-v12","outdoors-v12","light-v11","dark-v11","satellite-v9","satellite-streets-v12"],s=o.indexOf(e)!==-1?e:"streets-v12",u="https://api.mapbox.com/styles/v1/mapbox/"+s+"/tiles/512/{z}/{x}/{y}?access_token="+encodeURIComponent(t);return{version:8,name:"Mapbox "+s,sources:{"mapbox-raster":{type:"raster",tiles:[u],tileSize:512,maxzoom:22,attribution:'<a href="https://www.mapbox.com/about/maps/" target="_blank" rel="noopener">\xA9 Mapbox</a> <a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">\xA9 OpenStreetMap</a>'}},layers:[{id:"mapbox-raster",type:"raster",source:"mapbox-raster"}]}}function H(){return{version:8,name:"OpenStreetMap Standard",sources:{"osm-raster":{type:"raster",tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256,maxzoom:19,attribution:'<a href="https://www.openstreetmap.org/copyright" target="_blank" rel="noopener">\xA9 OpenStreetMap contributors</a>'}},layers:[{id:"osm-raster",type:"raster",source:"osm-raster"}]}}asl_locator.get_map_provider_error=function(){var t=String(asl_configuration.tile_provider||"geoapify").toLowerCase(),e=String(asl_configuration.maplibre_style_url||"");return window.maplibregl?e?null:t==="mapbox"&&!asl_configuration.mapbox_access_token?"A Mapbox access token is required for Mapbox tiles.":t==="maptiler"&&!asl_configuration.tile_provider_api_key?"A MapTiler API key is required for MapTiler tiles.":t==="geoapify"&&!asl_configuration.geoapify_api_key?"A Geoapify API key is required for Geoapify tiles.":t==="custom"&&!e?"A MapLibre style URL is required for the custom tile provider.":null:"MapLibre GL JS could not be loaded."};function V(t,e){var o=b(e.center),s=String(asl_configuration.tile_provider||"geoapify").toLowerCase(),u=String(asl_configuration.tile_provider_style||"default").toLowerCase(),p=null,h=String(asl_configuration.maplibre_style_url||""),g=s==="geoapify"?asl_configuration.geoapify_api_key:s==="mapbox"?asl_configuration.mapbox_access_token:asl_configuration.tile_provider_api_key;if(h&&(p=h.split("{api_key}").join(encodeURIComponent(g||"")).split("{access_token}").join(encodeURIComponent(g||""))),!p&&s==="geoapify"){var w=["osm-bright-smooth","osm-carto","positron","dark-matter"],C=w.indexOf(u)!==-1?u:"osm-bright-smooth";p="https://maps.geoapify.com/v1/styles/"+C+"/style.json?apiKey="+encodeURIComponent(asl_configuration.geoapify_api_key||"")}else if(!p&&s==="osm")p=H();else if(!p&&s==="mapbox"){if(!asl_configuration.mapbox_access_token)throw new Error("A Mapbox access token is required for Mapbox tiles.");p=Q(asl_configuration.mapbox_access_token,u)}else if(!p&&s==="maptiler"){if(!asl_configuration.tile_provider_api_key)throw new Error("A MapTiler API key is required for MapTiler tiles.");var R=["streets-v4","basic-v2","bright-v2","outdoor-v2","topo-v2","satellite"],z=R.indexOf(u)!==-1?u:"streets-v4";p="https://api.maptiler.com/maps/"+z+"/style.json?key="+encodeURIComponent(asl_configuration.tile_provider_api_key)}else!p&&s==="custom"&&(p=asl_configuration.maplibre_style_url);if(!window.maplibregl)throw new Error("MapLibre GL JS is not loaded.");if(!p)throw new Error("A tile provider or MapLibre style URL is required.");this._element=t,this._map=new maplibregl.Map({container:t,style:p,center:[o.lng,o.lat],zoom:Number(e.zoom)||9,minZoom:e.minZoom,maxZoom:e.maxZoom,attributionControl:!1,cooperativeGestures:e.gestureHandling==="cooperative"});var it=new maplibregl.AttributionControl({compact:!0,customAttribution:'<a href="https://maplibre.org/" target="_blank" rel="noopener">MapLibre</a>'});this._map.addControl(it,"bottom-right"),this._zoomControl=null,this._fullscreenControl=null,this._zoomControlPosition=P(e.zoomControlOptions&&e.zoomControlOptions.position,"bottom-right"),this._fullscreenControlPosition=P(e.fullscreenControlOptions&&e.fullscreenControlOptions.position,"bottom-right"),e.zoomControl!==!1&&(this._zoomControl=new maplibregl.NavigationControl({showZoom:!0,showCompass:!1}),this._map.addControl(this._zoomControl,this._zoomControlPosition)),e.fullscreenControl!==!1&&(this._fullscreenControl=new maplibregl.FullscreenControl,this._map.addControl(this._fullscreenControl,this._fullscreenControlPosition));var k=t.querySelector(".maplibregl-ctrl-attrib");k&&(k.classList.remove("maplibregl-compact-show"),k.removeAttribute("open")),this.controls={},this._streetView={getVisible:function(){return!1},setPosition:function(){}}
14,Object.keys(ASLControlPosition).forEach(function(M){this.controls[ASLControlPosition[M]]={push:function(q){q.classList.add("asl-maplibre-custom-control"),t.appendChild(q)}}},this);var at=this;["click","dragend","idle","zoomend","moveend"].forEach(function(M){at._map.on(M,function(q){var W=M==="zoomend"?"zoom_changed":M==="moveend"?"bounds_changed":M;ASLEvent.trigger(at,W,q)})})}V.prototype.getCenter=function(){var t=this._map.getCenter();return new ASLLatLng(t.lat,t.lng)},V.prototype.setCenter=V.prototype.panTo=function(t){var e=b(t);this._map.easeTo({center:[e.lng,e.lat]})},V.prototype.panToWithOffset=function(t,e,o,s,u){var p=b(t),h=(this._cameraTransitionId||0)+1;if(this._cameraTransitionId=h,this._map.stop(),typeof s=="function"){var g=this;this._map.once("moveend",function(){g._cameraTransitionId===h&&s()})}var w={center:[p.lng,p.lat],offset:[-(Number(e)||0),-(Number(o)||0)],duration:450,essential:!0};u!=null&&u!==""&&Number.isFinite(Number(u))&&(w.zoom=Number(u)),this._map.easeTo(w)},V.prototype.panBy=function(t,e){this._map.panBy([t,e])},V.prototype.getZoom=function(){return this._map.getZoom()},V.prototype.setZoom=function(t){this._map.setZoom(t)},V.prototype.getDiv=function(){return this._element},V.prototype.getStreetView=function(){return this._streetView},V.prototype.set=function(){},V.prototype.setOptions=function(t){t.center&&this.setCenter(t.center),t.zoom!=null&&this.setZoom(t.zoom),t.zoomControl===!0&&!this._zoomControl?(this._zoomControl=new maplibregl.NavigationControl({showZoom:!0,showCompass:!1}),this._map.addControl(this._zoomControl,this._zoomControlPosition)):t.zoomControl===!1&&this._zoomControl&&(this._map.removeControl(this._zoomControl),this._zoomControl=null),t.fullscreenControl===!0&&!this._fullscreenControl?(this._fullscreenControl=new maplibregl.FullscreenControl,this._map.addControl(this._fullscreenControl,this._fullscreenControlPosition)):t.fullscreenControl===!1&&this._fullscreenControl&&(this._map.removeControl(this._fullscreenControl),this._fullscreenControl=null)},V.prototype.getProjection=function(){return null},V.prototype.getBounds=function(){var t=this._map.getBounds();return new ASLLatLngBounds(new ASLLatLng(t.getSouth(),t.getWest()),new ASLLatLng(t.getNorth(),t.getEast()))},V.prototype.fitBounds=function(t,e){if(!(!t||typeof t.isEmpty=="function"&&t.isEmpty())){var o=t.getSouthWest
14(),s=t.getNorthEast(),u=typeof e=="number"?{padding:e}:e||{},p=u.padding!==void 0?u.padding:40,h=[[o.lng(),o.lat()],[s.lng(),s.lat()]],g=Number.isFinite(Number(u.minZoom)),w=Number.isFinite(Number(u.maxZoom));if(!g&&!w){this._map.stop(),this._map.fitBounds(h,{padding:p,duration:u.duration!==void 0?u.duration:450,essential:!0});return}var C=this._map.cameraForBounds(h,{padding:p});if(C){var R=C.zoom;g&&(R=Math.max(Number(u.minZoom),R)),w&&(R=Math.min(Number(u.maxZoom),R)),this._map.stop(),this._map.easeTo({center:C.center,zoom:R,duration:u.duration!==void 0?u.duration:450,essential:!0})}}};function ut(t){var e=b(t.position),o=document.createElement("button");o.type="button",o.className="asl-maplibre-marker",o.title=t.title||"";var s=document.createElement("img");if(s.className="asl-maplibre-marker-image",s.alt="",s.draggable=!1,o.appendChild(s),t.label&&t.label.text){var u=document.createElement("span");u.textContent=t.label.text,u.style.color=t.label.color||"",o.appendChild(u)}this._element=o,this._image=s,this._icon=t.icon||null,this.applyIcon_(this._icon),this._position=new ASLLatLng(e.lat,e.lng),this._marker=new maplibregl.Marker({element:o,anchor:"bottom",draggable:!!t.draggable}).setLngLat([e.lng,e.lat]),this._map=null,this._visible=!0;var p=this;o.addEventListener("click",function(h){h.stopPropagation(),ASLEvent.trigger(p,"click",h)}),this._marker.on("dragend",function(){var h=p._marker.getLngLat();p._position=new ASLLatLng(h.lat,h.lng),ASLEvent.trigger(p,"dragend",{latLng:p._position})}),t.map&&this.setMap(t.map)}ut.prototype.getPosition=function(){return this._position},ut.prototype.addListener=function(t,e){return ASLEvent.addListener(this,t,e)},ut.prototype.setPosition=function(t){var e=b(t);this._position=new ASLLatLng(e.lat,e.lng),this._marker.setLngLat([e.lng,e.lat])},ut.prototype.getMap=function(){return this._map},ut.prototype.setMap=function(t){if(!t){this._marker.remove(),this._map=null;return}this._map!==t&&this._marker.addTo(t._map),this._map=t},ut.prototype.setVisible=function(t){t=!!t,this._visible!==t&&(this._visible=t,this._element.style.display=t?"":"none")},ut.prototype.setAnimation=function(t){var e=!!(t&&window.google&&t===ASLAnimation.BOUNCE);this._element.classList.toggle("asl-maplibre-marker-bounce",e)},ut.prototype.getIcon=function(){return this._icon},ut.prototype.applyIcon_=function(t){var e=typeof t=="string"?t:t&&t.url,o=t&&typeof t=="object"?t.scaledSize:null,s=o&&Number(typeof o.width=="function"?o.width():o.width),u=o&&Number(typeof o.height=="function"?o.height():o.height);e?this._image.src=e:this._image.removeAttribute("src"),this._image.style.width=s>0?s+"px":"",this._image.style.height=u>0?u+"px":""},ut.prototype.setIcon=function(t){this._icon=t||null,this.applyIcon_(this._icon)},ut.prototype.setZIndex=function(t){this._element.style.zIndex=t==null?"":t};function wt(t,e,o){this.map_=t,this.options_=o||{},this.markers_=[],this.sourceId_="asl-maplibre-clusters",this.ready_=!1,this.visibilityUpdateId_=null,this.data_={type:"FeatureCollection",features:[]};var s=this;t._map.isStyleLoaded()?this.setup_():t._map.once("load",function(){s.setup_()}),t._map.on("moveend",function(){s.scheduleVisibilityUpdate_()}),t._map.on("idle",function(){s.scheduleVisibilityUpdate_()}),t._map.on("sourcedata",function(u){u.sourceId===s.sourceId_&&s.scheduleVisibilityUpdate_()}),e&&e.length&&this.addMarkers(e)}wt.prototype.setup_=function(){if(!(this.ready_||this.map_._map.getSource(this.sourceId_))){var t=this.map_._map,e=this.sourceId_,o=this,s=window.getComputedStyle(this.map_._element.closest(".asl-cont")||this.map_._element).getPropertyValue("--sl-primary").trim()||"#4a90e2";t.addSource(e,{type:"geojson",data:this.data_,cluster:!0,clusterMaxZoom:parseInt(this.options_.maxZoom)||9,clusterRadius:parseInt(this.options_.gridSize)||90}),t.addLayer({id:e+"-circles",type:"circle",source:e,filter:["has","point_count"],paint:{"circle-color":s,"circle-opacity":.9,"circle-radius":["step",["get","point_count"],15,10,20,50,25],"circle-stroke-color":"#ffffff","circle-stroke-width":2}}),t.addLayer({id:e+"-counts",type:"symbol",source:e,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-size":12},paint:{"text-color":"#ffffff"}}),t.on("click",e+"-circles",function(u){var p=u.features&&u.features[0];if(p){var h=t.getSource(e),g=function(w){t.easeTo({center:p.geometry.coordinates,zoom:w,duration:400}),typeof o.options_.onClusterClick=="function"&&o.options_.onClusterClick(u,p,o.map_)};h.getClusterExpansionZoom(p.properties.cluster_id).then(g).catch(function(w){console.error("Unable to expand MapLibre cluster.",w)})}}),t.on("mouseenter",e+"-circles",function(){t.getCanvas().style.cursor="pointer"}),t.on("mouseleave",e+"-circles",function(){t.getCanvas().style.cursor=""}),this.ready_=!0,t.getSource(e).setData(this.data_),this.scheduleVisibilityUpdate_()}},wt.prototype.setData_=function(){this.data_={type:"FeatureCollection",features:this.markers_.map(function(e,o){var s=b(e.getPosition());return e._clusterId=String(o),{type:"Feature",id:o,properties:{marker_id:String(o)},geometry:{type:"Point",coordinates:[s.lng,s.lat]}}})};var t=this.ready_&&this.map_._map.getSource(this.sourceId_);t&&(t.setData(this.data_),this.scheduleVisibilityUpdate_())},wt.prototype.scheduleVisibilityUpdate_=function(){if(this.visibilityUpdateId_===null){var t=this,e=window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(o){return window.setTimeout(o,16)};this.visibilityUpdateId_=e(function(){t.visibilityUpdateId_=null,t.updateMarkerVisibility_()})}},wt.prototype.updateMarkerVisibility_=function(){if(!(!this.ready_||!this.markers_.length)){for(var t={},e=this.map_._map.querySourceFeatures(this.sourceId_),o=0;o<e.length;o++)!e[o].properties.cluster&&e[o].properties.marker_id!==void 0&&(t[String(e[o].properties.marker_id)]=!0);for(var s=0;s<this.markers_.length;s++){var u=this.markers_[s],p=!!t[u._clusterId];p?(u.getMap()!==this.map_&&u.setMap(this.map_),u.setVisible(!0)):(u.setVisible(!1),u.getMap()&&u.setMap(null))}}},wt.prototype.getExpansionZoomForMarker=function(t){var e=this.ready_&&this.map_._map.getSource(this.sourceId_),o=t&&t._clusterId;if(!e||o===void 0||o===null)return Promise.resolve(null);var s=this.map_._map.querySourceFeatures(this.sourceId_).filter(function(h){return h.properties&&h.properties.cluster&&h.properties.cluster_id!==void 0}),u={},p=s.reduce(function(h,g){var w=g.properties.cluster_id;return u[w]||(u[w]=!0,h.push(e.getClusterLeaves(w,g.properties.point_count||10,0).then(function(C){var R=C.some(function(z){return String(z.properties.marker_id)===String(o)});return R?e.getClusterExpansionZoom(w):null}).catch(function(){return null}))),h},[]);return Promise.all(p).then(function(h){var g=h.filter(function(w){return Number.isFinite(Number(w))});return g.length?Math.max.apply(Math,g.map(Number)):null})},wt.prototype.clearMarkers=function(){for(var t=0;t<this.markers_.length;t++)this.markers_[t].setMap(null);this.markers_=[],this.setData_()},wt.prototype.addMarkers=function(t){this.markers_=(t||[]).filter(
14Boolean);for(var e=0;e<this.markers_.length;e++)this.markers_[e].setVisible(!1),this.markers_[e].getMap()&&this.markers_[e].setMap(null);this.setData_()};function It(t){this._options=t||{},this._map=null,this._id="asl-radius-"+Math.random().toString(36).slice(2),this._options.map&&this.setMap(this._options.map)}It.prototype.getBounds=function(){var t=b(this._options.center),e=Number(this._options.radius)||0,o=e/111320,s=e/(111320*Math.max(Math.cos(t.lat*Math.PI/180),.01));return new ASLLatLngBounds(new ASLLatLng(t.lat-o,t.lng-s),new ASLLatLng(t.lat+o,t.lng+s))},It.prototype.geometry_=function(){for(var t=b(this._options.center),e=Number(this._options.radius)||0,o=[],s=t.lat*Math.PI/180,u=0;u<=64;u++){var p=u*Math.PI*2/64,h=t.lat+e/111320*Math.sin(p),g=t.lng+e/(111320*Math.max(Math.cos(s),.01))*Math.cos(p);o.push([g,h])}return{type:"Feature",properties:{},geometry:{type:"Polygon",coordinates:[o]}}},It.prototype.render_=function(){if(!(!this._map||!this._map._map.isStyleLoaded())){var t=this._map._map,e=t.getSource(this._id),o=this.geometry_();if(e){e.setData(o);return}t.addSource(this._id,{type:"geojson",data:o}),t.addLayer({id:this._id+"-fill",type:"fill",source:this._id,paint:{"fill-color":this._options.fillColor||"#FFFF00","fill-opacity":Number(this._options.fillOpacity==null?.2:this._options.fillOpacity)}}),t.addLayer({id:this._id+"-stroke",type:"line",source:this._id,paint:{"line-color":this._options.strokeColor||"#FFFF00","line-opacity":Number(this._options.strokeOpacity==null?.7:this._options.strokeOpacity),"line-width":Number(this._options.strokeWeight||2)}})}},It.prototype.setOptions=function(t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(this._options[e]=t[e]);this.render_()},It.prototype.setMap=function(t){if(!t){if(this._map){var e=this._map._map;e.getLayer(this._id+"-stroke")&&e.removeLayer(this._id+"-stroke"),e.getLayer(this._id+"-fill")&&e.removeLayer(this._id+"-fill"),e.getSource(this._id)&&e.removeSource(this._id)}this._map=null;return}this._map=t;var o=this;t._map.isStyleLoaded()?this.render_():t._map.once("load",function(){o.render_()})};function mt(t){t=t||{},this._options=t,this._popup=new maplibregl.Popup({anchor:"bottom",offset:Number(t.markerHeight)||35,closeButton:!0,closeOnClick:!1,className:"infoBox asl-maplibre-infobox",maxWidth:(Number(t.width)||320)+"px"}),this._content=null,this._position=null,this._map=null,this._zIndex=null,this._closingProgrammatically=!1;var e=this;this._popup.on("close",function(){e._closingProgrammatically||ASLEvent.trigger(e,"closeclick")})}mt.prototype.applyPresentation_=function(){var t=this._popup.getElement();if(t){t.style.setProperty("--asl-infobox-width",(Number(this._options.width)||320)+"px");var e=t.querySelector(".maplibregl-popup-close-button");e&&(e.innerHTML='<i aria-hidden="true" class="icon-cancel-1"></i>',e.style.removeProperty("background-image"),e.style.margin=this._options.closeBoxMargin||"")}},mt.prototype.setContent=function(t){this._content=t,ASLEvent.trigger(this,"content_changed")},mt.prototype.getContent=function(){return this._content},mt.prototype.setPosition=function(t){if(this._position=t,this.getVisible()){var e=b(t);this._popup.setLngLat([e.lng,e.lat])}ASLEvent.trigger(this,"position_changed")},mt.prototype.getPosition=function(){return this._position},mt.prototype.open=function(t,e){var o=e?e.getPosition():this._position,s=b(o);this._map=t,this._position=o,this._content&&this._content.nodeType?this._popup.setDOMContent(this._content):this._popup.setHTML(this._content==null?"":String(this._content)),this._popup.setLngLat([s.lng,s.lat]).addTo(t._map),this.applyPresentation_(),this.setZIndex(this._zIndex),ASLEvent.trigger(this,"domready")},mt.prototype.getVisible=function(){return this._popup.isOpen()},mt.prototype.setVisible=function(t){t?this._map&&this._position&&this.open(this._map):this.close()},mt.prototype.show=function(){this.setVisible(!0)},mt.prototype.hide=function(){this.setVisible(!1)},mt.prototype.getMap=function(){return this._map},mt.prototype.setZIndex=function(t){this._zIndex=t;var e=this._popup.getElement();e&&(e.style.zIndex=t==null?"":t),ASLEvent.trigger(this,"zindex_changed")},mt.prototype.getZIndex=function(){return this._zIndex},mt.prototype.setOptions=function(t){t=t||{},Object.prototype.hasOwnProperty.call(t,"content")&&this.setContent(t.content),Object.prototype.hasOwnProperty.call(t,"position")&&this.setPosition(t.position),Object.prototype.hasOwnProperty.call(t,"zIndex")&&this.setZIndex(t.zIndex),Ob
14ject.prototype.hasOwnProperty.call(t,"visible")&&this.setVisible(t.visible)},mt.prototype.close=function(){this._closingProgrammatically=!0,this._popup.remove(),this._closingProgrammatically=!1,this._map=null},asl_locator.isMapLibre=l,asl_locator.MapLibreMap=V,asl_locator.MapLibreMarker=ut,asl_locator.MapLibreClusterer=wt,asl_locator.MapLibreCircle=It,asl_locator.MapLibreInfoWindow=mt,asl_locator.searchProviders={},asl_use_new_place_api=function(t){var e=t||asl_configuration||{};return e.search_type=="4"},asl_locator.resolveSearchProvider=function(t){return t=String(t||asl_configuration.search_provider||"automatic").toLowerCase(),t==="auto"&&(t="automatic"),t==="automatic"&&(asl_configuration.search_type=="0"||asl_configuration.search_type=="3"?t="google":asl_locator.isMapLibre&&asl_locator.isMapLibre()?asl_configuration.geoapify_api_key?t="geoapify":asl_configuration.mapbox_access_token?t="mapbox":t=asl_configuration.search_type=="1"||asl_configuration.search_type=="2"?"disabled":"nominatim":t="google"),t},asl_locator.registerSearchProvider=function(t,e){asl_locator.searchProviders[t]=e};function ct(t,e){return asl_locator.createSearchLatLng?asl_locator.createSearchLatLng(Number(t),Number(e)):new ASLLatLng(Number(t),Number(e))}function Ct(t){return t?(Array.isArray(t)||(t=String(t).split(",")),t.map(function(e){return String(e).trim().toLowerCase()}).filter(function(e,o,s){return/^[a-z]{2}$/.test(e)&&s.indexOf(e)===o})):[]}function Dt(t){if(!t||t.length!==4)return null;var e=ct(t[1],t[0]),o=ct(t[3],t[2]);return asl_locator.createSearchBounds?asl_locator.createSearchBounds(e,o):new ASLLatLngBounds(e,o)}function zt(t,e,o){return t?{long_name:String(t),short_name:String(e||t),types:[o]}:null}function Gt(t){return[zt(t.city||t.town||t.village||t.suburb,null,"locality"),zt(t.state,t.state_code,"administrative_area_level_1"),zt(t.country,t.country_code&&t.country_code.toUpperCase(),"country"),zt(t.postcode,null,"postal_code")].filter(Boolean)}function oe(t){var e=t.properties||{},o=e.context||{};function s(u,p,h){var g=o[u]||{};return zt(g.name||g.text,g[h]||g.short_code,p)}return[s("place","locality"),s("locality","locality"),s("region","administrative_area_level_1","region_code"),s("country","country","country_code"),s("postcode","postal_code")].filter(Boolean)}function Wt(t,e){return fetch(t,{signal:e}).then(function(o){if(!o.ok)throw new Error("Address API request failed with status "+o.status);return o.json()})}asl_locator.registerSearchProvider("google",{geocode:function(t,e){if(t.bounds&&asl_shared_uses_maplibre()&&asl_has_google_maps()&&typeof t.bounds.getSouthWest=="function"){var o=t.bounds.getSouthWest
14(),s=t.bounds.getNorthEast();t=Object.assign({},t,{bounds:new google.maps.LatLngBounds({lat:Number(o.lat()),lng:Number(o.lng())},{lat:Number(s.lat()),lng:Number(s.lng())})})}new google.maps.Geocoder().geocode(t,e)},search:function(t,e,o,s){return google.maps.importLibrary("places").then(function(u){if(o&&o.aborted)throw new DOMException("Aborted","AbortError");s.googleSessionToken_||(s.googleSessionToken_=new u.AutocompleteSessionToken);var p={input:t,includedPrimaryTypes:["geocode"],language:asl_configuration.language||"en-US",sessionToken:s.googleSessionToken_};return e.countries.length&&(p.includedRegionCodes=e.countries.map(function(h){return h.toUpperCase()})),e.proximity&&(p.locationBias={center:e.proximity,radius:5e4}),u.AutocompleteSuggestion.fetchAutocompleteSuggestions(p).then(function(h){return(h.suggestions||[]).map(function(g){return{label:g.placePrediction.text.toString(),raw:g,provider:"google"}})})})},resolve:function(t,e){var o=t.raw&&t.raw.placePrediction;if(!o||!o.toPlace)return Promise.reject(new Error("Invalid Google place prediction."));var s=o.toPlace({sessionToken:e.googleSessionToken_});return s.fetchFields({fields:["formattedAddress","types","location","viewport","addressComponents","id"]}
14).then(function(){return e.googleSessionToken_=null,{formatted_address:s.formattedAddress||t.label,formattedAddress:s.formattedAddress||t.label,place_id:s.id||o.placeId||null,placeId:s.id||o.placeId||null,geometry:{location:s.location,viewport:s.viewport||null},address_components:(s.addressComponents||[]).map(function(u){return{long_name:u.longText,short_name:u.shortText||u.longText,types:u.types||[]}}),types:s.types||[],properties:s,provider:"google"}})}}),asl_locator.registerSearchProvider("nominatim",{geocode:function(t,e){var o=Ct(asl_get_country_restrictions(asl_configuration));o.length||(o=Ct(t.componentRestrictions&&t.componentRestrictions.country)),window.ASLNominatim.search(t.address||"",o).then(function(s){var u=s.map(function(p){var h=p.boundingbox;return{formatted_address:p.display_name,place_id:p.place_id,geometry:{location:ct(p.lat,p.lon),viewport:h?Dt([+h[2],+h[0],+h[3],+h[1]]):null},address_components:Gt(p.address||{}),provider:"nominatim"}});e(u,u.length?"OK":"ZERO_RESULTS")}).catch(function(s){console.error("Nominatim geocoding failed.",s),e([],"ERROR")})}}),asl_locator.registerSearchProvider("disabled",{geocode:function(t,e){e([],"PROVIDER_NOT_CONFIGURED")}}),asl_locator.showSearchProviderAlert=function(t){var e=t&&t.jquery?t:n(t);if(!(!e.length||e.find(".asl-search-provider-alert").length)){var o=asl_configuration.words&&asl_configuration.words.search_provider_missing||"Address search is unavailable because no geocoding provider is configured.",s=n('<div class="alert alert-warning asl-search-provider-alert" role="alert"></div>').text(o);
14e.prepend(s),window.setTimeout(function(){s.fadeOut(200,function(){s.remove()})},7e3)}},asl_locator.registerSearchProvider("geoapify",{search:function(t,e,o){var s=asl_configuration.geoapify_api_key,u=Ct(e.countries);if(!s)return Promise.reject(new Error("Geoapify API key is missing."));var p=new URLSearchParams({text:t,apiKey:s,limit:String(e.limit||5),format:"json"});u.length&&p.set("filter","countrycode:"+u.join(",")),e.proximity&&p.set("bias","proximity:"+e.proximity.lng+","+e.proximity.lat);var h=e.autocomplete===!1?"search":"autocomplete",g="https://api.geoapify.com/v1/geocode/"+h+"?"+p.toString();return Wt(g,o).then(function(w){return(w.results||[]).map(function(C){var R=C.bbox?[C.bbox.lon1,C.bbox.lat1,C.bbox.lon2,C.bbox.lat2]:null;return{formatted_address:C.formatted||C.address_line1||t,place_id:C.place_id||null,geometry:{location:ct(C.lat,C.lon),viewport:Dt(R)},address_components:Gt(C),properties:C,provider:"geoapify"}})})}}),asl_locator.registerSearchProvider("mapbox",{search:function(t,e,o){var s=asl_configuration.mapbox_access_token,u=Ct(e.countries);if(!s)return Promise.reject(new Error("Mapbox access token is missing."));var p=new URLSearchParams({q:t,access_token:s,limit:String(e.limit||5),autocomplete:e.autocomplete===!1?"false":"true"});u.length&&p.set("country",u.join(",")),e.proximity&&p.set("proximity",e.proximity.lng+","+e.proximity.lat);var h="https://api.mapbox.com/search/geocode/v6/forward?"+p.toString();return Wt(h,o).then(function(g){return(g.features||[]).map(function(w){var C=w.properties||{},R=C.coordinates||{},z=w.geometry&&w.geometry.coordinates||[R.longitude,R.latitude];return{formatted_address:C.full_address||C.name||w.place_name||w.name||t,place_id:w.id||C.mapbox_id||null,geometry:{location:ct(z[1],z[0]),viewport:Dt(w.bbox||C.bbox)},address_components:oe(w),properties:w,provider:"mapbox"}}).filter(function(w){return!isNaN(w.geometry.location.lat())&&!isNaN(w.geometry.location.lng())})})}}),["geoapify","mapbox"].forEach(function(t){asl_locator.searchProviders[t].geocode=function(e,o){var s=e&&e.componentRestrictions&&e.componentRestrictions.country,u=Ct(asl_get_country_restrictions(asl_configuration)),p=u.length?u:Ct(s);this.search(e&&e.address||"",{autocomplete:!1,countries:p||[],limit:5}).then(function(h){o(h,h.length?"OK":"ZERO_RESULTS")}).catch(function(h){console.error(t+" geocoding failed.",h),o([],"ERROR")})}}),asl_locator.getSearchProvider=function(){return asl_locator.searchProviders[asl_locator.resolveSearchProvider()]||asl_locator.searchProviders.google},asl_locator.AddressAPI=function(t,e){this.input=t,this.options=e||{},this.listeners=[],this.boundEvents=[],this.providerName=asl_locator.resolveSearchProvider(this.options.provider),this.provider=asl_locator.searchProviders[this.providerName],this.abortController=null,this.timer=null,this.menu=null,this.place=null,!(!t||!this.provider||this.providerName==="disabled")&&this.providerName!=="nominatim"&&(this.providerName==="google"&&asl_configuration.places_ui_kit=="1"?this.initPlacesUI_():this.providerName==="google"&&!asl_use_new_place_api(asl_configuration)?this.initGoogle_():this.initRemote_())},asl_locator.AddressAPI.prototype.addPlaceListener=function(t){return this.listeners.push(t),this},asl_locator.AddressAPI.prototype.getPlace=function(){return this.place},asl_locator.AddressAPI.prototype.bindTo=function(t,e){t==="bounds"&&(this.options.map=e,this.widget&&typeof this.widget.setMap=="function"&&this.widget.setMap(e))},asl_locator.AddressAPI.prototype.initPlacesUI_=function(){if(!window.ASLPlacesUIAutocomplete)throw new Error("ASL Places UI Kit adapter is not loaded.");var t=this,e=asl_configuration.google_search_type;this.widget=new window.ASLPlacesUIAutocomplete(this.input,{countries:Ct(this.options.countries||asl_get_country_restrictions(asl_configuration)),language:asl_configuration.map_language,region:asl_configuration.map_region,types:e==="cities"||e==="regions"?["("+e+")"]:e&&e!=="geocode"&&e!=="address"&&e!=="establishment"?[e]:[],map:this.options.map,onPlaceSelected:function(o){t.emit_(o)}})},asl_locator.AddressAPI.prototype.emit_=function(t){this.place=t;for(var e=0;e<this.listeners.length;e++)this.listeners[e].call(this,t);typeof this.options.onSelect=="function"&&this.options.onSelect(t)},asl_locator.AddressAPI.prototype.initGoogle_=function(){var t=this;this.instance=asl_create_autocomplete_instance(this.input,this.options.googleOptions||{},this.options.newGoogleOptions||{},asl_configuration);var e=this.options.countries||asl_get_country_restrictions(asl_configuration);e.length&&asl_apply_country_limits(this.instance,e,asl_configuration),this.options.fields&&this.instance&&typeof this.instance.setFields=="function"&&this.instance.setFields(this.options.fields),this.options.map&&!asl_locator.isMapLibre()&&this.instance&&typeof this.instance.bindTo=="function"&&!asl_use_new_place_api(asl_configuration)&&this.instance.bindTo("bounds",this.options.map),asl_add_place_listener(this.instance,function(){var o=asl_normalize_place_result(this,t.input.value,asl_configuration);o&&(o.provider="google",t.emit_(o))},asl_configuration)},asl_locator.AddressAPI.prototype.getContext_=function(t){var e={autocomplete:t,countries:Ct(this.options.countries||asl_get_country_restrictions(asl_configuration)),limit:5},o=this.options.map;if(o&&typeof o.getCenter=="function"){var s=o.getCenter();e.proximity={lat:typeof s.lat=="function"?s.lat():s.lat,lng:typeof s.lng=="function"?s.lng():s.lng}}return e},asl_locator.AddressAPI.prototype.initRemote_=function(){var t=this;if(!window.ASLSearchAutocomplete)throw new Error("ASL autocomplete widget is not loaded.");this.widget=new window.ASLSearchAutocomplete(this.input,{fetchSuggestions:function(e,o){return t.provider.search(e,t.getContext_(!0),o,t)},resolveSuggestion:function(e){return t.provider.resolve?t.provider.resolve(e,t):e},onPlaceSelected:function(e){t.emit_(e)}})},asl_locator.AddressAPI.prototype.fetch_=function(t){var e=this;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.provider.search(t,this.getContext_(!0),this.abortController.signal).then(function(o){e.input.value.trim()===t&&e.render_(o)}).catch(function(o){o.name!=="AbortError"&&console.error(e.providerName+" autocomplete failed.",o)})},asl_locator.AddressAPI.prototype.render_=function(t){var e=this;this.menu.innerHTML="",t.forEach(function(o){var s=document.createElement("button");s.type="button",s.textContent=o.formatted_address,s.style.cssText="display:block;width:100%;padding:9px 12px;border:0;border-bottom:1px solid #eee;background:#fff;text-align:left;cursor:pointer",s.addEventListener("mousedown",function(u){u.preventDefault(),e.input.value=o.formatted_address,e.hide_(),e.emit_(o)}),e.menu.appendChild(s)}),this.menu.style.display=t.length?"block":"none"},asl_locator.AddressAPI.prototype.hide_=function(){this.menu&&(this.menu.style.display="none")},asl_locator.AddressAPI.prototype.geocode=function(t,e){this.provider.geocode(t,e)},asl_locator.AddressAPI.prototype.geocodeText=function(t,e){this.provider.geocode({address:t},e)},asl_locator.AddressAPI.prototype.clear=function(){this.input.value="",this.place=null,this.widget&&this.widget.clear(),this.hide_()},asl_locator.AddressAPI.prototype.destroy=function(){clearTimeout(this.timer),this.abortController&&this.abortController.abort(),this.widget&&(this.widget.destroy(),this.widget=null);for(var t=0;t<this.boundEvents.length;t++)this.input.removeEventListener(this.boundEvents[t][0],this.boundEvents[t][1]);this.menu&&this.menu.parentNode&&this.menu.parentNode.removeChild(this.menu)},asl_locator.Panel=function(t,e){var o=this;this.el_=n(t),this._cont=e.container,this.el_.addClass("asl_locator-panel"),this.settings_=n.extend({locationSearch:!0,locationSearchLabel:"Enter Location/ZipCode: ",featureFilter:!0,directions:!0,view:null},e),this.directionsRenderer_=null,this.directionsService_=null,e.view._panel=this,this.init_();var s=o.get("view");this.filter_=o._cont.find(".header-search"),asl_configuration.template=="6"&&asl_configuration.advance_filter&&s.template_6_setup(),o._cont.find(".asl-print-btn").on("click",function(u){var p="asl-list";o._cont.find(".panel-inner").css("display")=="none"&&(p="asl-rendered-dir",o._cont.find("#asl-list").find(".rendered-directions").attr("id",p));var h={printable:p,type:"html",css:asl_configuration.PLUGIN_URL+"public/css/print.css"};asl_configuration.print_header&&(h.header=asl_configuration.print_header),printJS(h)}),this.lead_form_modal()},asl_locator.Panel=asl_locator.Panel,asl_locator.Panel.prototype=Object.create(ASLMVCObject.prototype),asl_locator.Panel.prototype.constructor=asl_locator.Panel,asl_locator.Panel.prototype.init_=function(){var t=this;this.itemCache_={},this.settings_.view&&this.set("view",this.settings_.view);var e=t.get("view"),o=e.getMap();if(this.filter_=e._cont.find(".header-search"),asl_configuration.cluster){var s=asl_locator.isMapLibre()?asl_locator.MapLibreClusterer:MarkerClusterer;
14asl_locator.marker_clusters=new s(o,[],{maxZoom:parseInt(asl_configuration.cluster_max_zoom)||9,gridSize:parseInt(asl_configuration.cluster_grid_size)||90,styles:[{width:30,height:30,className:"asl-cluster-1"},{width:40,height:40,className:"asl-cluster-2"},{width:50,height:50,className:"asl-cluster-3"}],clusterClass:"asl-cluster",onClusterClick:function(O,ot,nt){asl_configuration.sort_by_bound&&ASLEvent.addListenerOnce(nt,"idle",function(){e.scheduleRefreshView()}),asl_locator.hook_event({type:"cluster_click",data:{event:O,cluster:ot,map:nt}})}})}if(this.settings_.locationSearch){if(this.locationSearch_=this.filter_,asl_locator.getSearchProvider()){var u=t._cont.find("#auto-complete-search,.asl-search-address")[0];(asl_configuration.search_type=="0"||asl_configuration.search_type=="4")&&this.initAutocomplete_(u),asl_configuration.search_type=="2"&&this.geoCoder(u,null,!0),t._cont.find(".asl-reset-btn").on("click",function(O){e.clear_search(u),u&&n(u).parent().find(".asl-clear-btn").addClass("hide"),e.reset_all(null,!0)})}else this.filter_.submit(function(){t.searchPosition(n("input",t.locationSearch_).val())});this.filter_.submit(function(){return!1}),ASLEvent.addListener(this,"geocode",function(O){if(t.searchPositionTimeout_&&window.clearTimeout(t.searchPositionTimeout_),!O.geometry){t.searchPosition(O.name);return}this.directionsFrom_=O.geometry.location,t.directionsVisible_&&t.renderDirections_();var ot=t.get("view");ot.highlight(null);var nt=ot.getMap();O.geometry.viewport?nt.fitBounds(O.geometry.viewport):(nt.setCenter(O.geometry.location),asl_configuration.zoom_li&&nt.setZoom(parseInt(asl_configuration.zoom_li))),ot.refreshView(),t.listenForStoresUpdate_()})}var p=this;this.featureFilter_=e._cont.find("#filter-options"),this.featureFilter_.show(),asl_configuration.show_categories||e._cont.find(".sl-category-filter.drop_box_filter").remove(),asl_configuration.advance_filter&&e._cont.find(".asl-advance-filters").removeClass("hide");var h=e._cont.find("#asl-open-close");asl_configuration.time_switch&&h[0]&&(h[0].checked=asl_configuration.show_opened,h.on("change",function(O){asl_configuration.show_opened=this.checked,t.get("view").refreshView()}),e._cont.find(".Status_filter").addClass("asl-block"));var g=e._cont.find("#asl-list-sort, #sl-sort-by");if(g[0]){var w=function(O){return O=String(O||"").toLowerCase(),O=="nearest"||O=="distance"?"":O=="cities"?"city":O=="states"?"state":O=="name a-z"||O=="name"?"title":O};g.each(function(){n(this).val(asl_configuration.sort_by||(n(this).find('option[value="nearest"]')[0]?"nearest":""))}),g.on("change",function(){asl_configuration.sort_by=w(n(this).val()),e.refreshView()})}var C=this.get("view").getViewFeatures().asList(),R=this.featureFilter_.find(".inner-filter");this.storeList_=this.el_.find(".sl-list"),this.SListCont_=this.el_.find(".asl-panel-inner"),this.mainPanel=this.el_.find(".sl-main-cont-box"),C=asl_configuration.cat_sort=="name_"?asl_engine.helper.sortBy(C,"name_",!0):asl_engine.helper.sortBy(C,"order");var z=asl_configuration.single_cat_select=="1"?"":'multiple="multiple"',it=function(O){var ot=O.attr("id")+"-search",nt=asl_configuration.words.search||"Search",Ft=n('<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="icon-search-2"></i></span></div></li>');
14return Ft.find(".input-group").append(n("<label></label>").attr("for",ot).addClass("sl-visually-hidden").text(nt)).append(n('<input type="text" class="form-control multiselect-search">').attr("id",ot)),Ft.prop("outerHTML")};if(asl_configuration.template=="2"&&asl_configuration.advance_filter&&asl_configuration.show_categories){for(var k=e._cont.find(".asl-categories-panel"),at=k.find(".asl-categories-list"),M=asl_configuration.URL+"svg/",q=0,W=C.length;q<W;q++){var Y=C[q],bt=asl_categories[Y.id_].color,yt=n('<div class="round-box" data-c="'+asl_categories[Y.id_].len+'" data-id="'+Y.id_+'"><div class="iner-box"><div class="box-icon"> <span style="background-image:url('+M+Y.img_+')"></span></div><div class="cat-name"><span>'+Y.getDisplayName()+"<br><span>"+asl_engine.helper.locations_count(asl_categories[Y.id_].len)+"</span></span></div></div></div>");bt&&yt.find(".box-icon").css("background-color",bt),at.append(yt),yt.data("feature",Y)}e._cont.find(".Num_of_store .back-button").on("click",function(O){var ot=t.get("featureFilter");for(var nt in ot.array_)ot.array_.pop();t.get("view").refreshView(),k.removeClass("hide"),k.closest(".asl-panel").removeClass("sl-cat-selected");var Ft=new ASLLatLng(asl_configuration.default_lat,asl_configuration.default_lng);l()?o.panToWithOffset(Ft,0,0,null,parseInt(asl_configuration.zoom)):(o.panTo(Ft),o.setZoom(parseInt(asl_configuration.zoom)))}),at.find(".round-box").on("click",function(O){var ot=n(this),nt=t.get("featureFilter");for(var Ft in nt.array_)nt.array_.pop();var At=ot.data("feature");nt.add(At),t.set("featureFilter",nt);var Vt=e._cont.find(".sl-cat-header"),Ht=ot.find(".box-icon");Vt.find(".sl-cat-header-title").text(At.getDisplayName()),Vt.find(".sl-cat-header-icon").css("background-color",Ht.css("background-color")).find("span").css("background-image",Ht.find("span").css("background-image")),k.closest(".asl-panel").addClass("sl-cat-selected"),t.get("view").refreshView(),asl_configuration.category_bound&&e.fitBound(null),k.addClass("hide"),t.el_.removeClass("hide").animate({scrollTop:0},0)})}else{var Tt=asl_configuration.filter_ddl,Nt=asl_configuration.brand_special_cascade==="1"||asl_configuration.brand_special_cascade===!0||asl_configuration.brand_special_cascade==="true";asl_engine.controls={},asl_engine.select_controls={};var gt=function(O){return!O||O=="0"?[]:(Array.isArray(O)||(O=[O]),O.map(function(ot){return String(ot)}).filter(function(ot){return ot&&ot!="0"}))},Et=function(O,ot,nt){for(var Ft=asl_configuration.filter_sort?asl_configuration.filter_sort:"name",At=asl_engine.helper.sortBy(Object.values(asl_attributes[ot]),Ft,Ft!="ordr"),Vt=0,Ht=At.length;Vt<Ht;Vt++){var Zt=At[Vt];if(Nt&&ot=="special"&&nt&&nt.length){var T=Zt.brand_id?String(Zt.brand_id):"";if(!T||T=="0"||nt.indexOf(T)==-1)continue}var I=n('<option value="'+Zt.id+'">'+Zt.name+"</option>");I.data("feature",Zt),O.append(I)}},qt=function(){if(!(!Nt||!asl_engine.controls.brand||!asl_engine.controls.special||!asl_attributes.special)){var O=asl_engine.controls.special,ot=asl_configuration.words.all_special||asl_configuration.words.none,nt=gt(O.val()),Ft=gt(asl_engine.controls.brand.val()),At=[];O.empty(),asl_configuration.single_cat_select=="1"&&O.append(n('<option value="0">'+ot+"</option>")),Et(O,"special",Ft),O.find("option").each(function(){At.push(String(n(this).val()))}),nt=nt.filter(function(Vt){return At.indexOf(Vt)!=-1}),asl_configuration.single_cat_select=="1"?O.val(nt.length?nt[0]:"0"):O.val(nt),asl_engine.select_controls.special&&O.multiselect("rebuild")}};if(Tt){for(var m in Tt){var y=Tt[m];e._cont.find("#"+y+"_filter").append('<select data-type="'+y+'" id="asl-'+y+'" '+z+' style="width:350px"></select>');var v=e._cont.find("#asl-"+y);asl_engine.controls[y]=v;var L=asl_configuration.words["all_"+y]||asl_configuration.words.none;if(asl_configuration.single_cat_select=="1"){var yt=n('<option value="0">'+L+"</option>");v.append(yt)}if(Et(v,y,[]),asl_configuration["select_"+y]){var D=asl_configuration["select_"+y];D=D.split(",");var U=D.length==1?D[0]:D;v.val(U)}asl_engine.select_controls[y]=v.multiselect({enableFiltering:asl_configuration.ddl_search,disableIfEmpty:!0,enableCaseInsensitiveFiltering:asl_configuration.ddl_search,enableFiltering:asl_configuration.ddl_search,templates:{filter:it(v)},nonSelectedText:asl_configuration.words.select_option,filterPlaceholder:asl_configuration.words.search||"Search",nonSelectedText:L||"None Selected",nSelectedText:asl_configuration.words.selected||"selected",allSelectedText:L||"All selected",includeSelectAllOption:!1,numberDis
14played:1,maxHeight:asl_configuration.ddl_max_height?parseInt(asl_configuration.ddl_max_height):250,onChange:function(O,ot){var nt=this.$select.val(),Ft=this.$select.data("type");Nt&&Ft=="brand"&&qt(),e.refreshView(),asl_configuration.category_bound&&(e.fitBound(null),console.log("File: panel.js, Line: 486"))}})}Nt&&qt()}if(asl_configuration.show_categories){var G=e._cont.find("#categories_filter");if(G.append('<select id="asl-categories" '+z+' style="width:350px"></select>'),t.$category_ddl=e._cont.find("#asl-categories"),asl_configuration.single_cat_select=="1"){var yt=n('<option value="0">'+asl_configuration.words.all_categories+"</option>");t.$category_ddl.append(yt)}asl_configuration.select_category&&(asl_configuration.select_category=asl_configuration.select_category.split(","));for(var q=0,W=C.length;q<W;q++){var Y=C[q],yt=n('<option value="'+Y.id_+'">'+Y.getDisplayName()+"</option>");if(yt.data("feature",Y),t.$category_ddl.append(yt),asl_configuration.select_category&&jQuery.inArray(Y.id_,asl_configuration.select_category)!=-1){var N=t.get("featureFilter");N.add(Y),t.set("featureFilter",N)}}if(asl_configuration.select_category){var U=asl_configuration.select_category.length==1?asl_configuration.select_category[0]:asl_configuration.select_category;t.$category_ddl.val(U)}var B={},S=function(O){Object.values(O||{}).forEach(function(ot){B[String(ot.id)]=ot,ot.children&&ot.children.length&&S(ot.children)})},F=function(O,ot){var nt=B[String(O.value)],Ft=nt&&/^#[0-9a-f]{6}$/i.test(nt.color||"")?nt.color:"";return Ft?'<span class="asl-category-color" style="background-color:'+Ft+'" aria-hidden="true"></span>'+ot:ot},J=function(O){var ot=n("<div>").text(O.text).html();return F(O,'<span class="asl-category-name">'+ot+"</span>")};S(asl_categories);var K={enableFiltering:asl_configuration.ddl_search,includeFilterClearBtn:!1,disableIfEmpty:!0,enableHTML:!0,optionLabel:J,enableCaseInsensitiveFiltering:asl_configuration.ddl_search,nonSelectedText:asl_configuration.words.select_option,filterPlaceholder:asl_configuration.words.search||"Search",templates:{filter:it(t.$category_ddl)},nonSelectedText:asl_configuration.words.all_categories||"None Selected",nSelectedText:asl_configuration.words.selected||"selected",allSelectedText:asl_configuration.words.all_categories||"All selected",includeSelectAllOption:!1,numberDisplayed:1,maxHeight:asl_configuration.ddl_max_height?parseInt(asl_configuration.ddl_max_height):250,onChange:function(O,ot){var nt=t.get("featureFilter");if(asl_configuration.single_cat_select=="1"){for(var Ft in nt.array_)nt.array_.pop();var At=O.data("feature");nt.add(At),t.set("featureFilter",nt)}else{var At=O.data("feature");t.toggleFeatureFilter_(At)}asl_configuration.has_child_categories&&t._make_sub_categories(nt.array_),e.halt_fetch=!1,e.refreshView(),asl_configuration.category_bound&&e.fitBound(null),asl_locator.hook_event({type:"category",data:nt.array_})}},Lt=null,St=null;if(asl_configuration.image_filter){var Lt=function(nt){if(e.data_.flat_categories[nt.value])if(e.data_.flat_categories[nt.value].icon){var Ft=asl_configuration.URL+"svg/"+e.data_.flat_categories[nt.value].icon,At=e.data_.flat_categories[nt.value].name;return F(nt,'<img src="'+Ft+'" alt="'+At+'" >'+(asl_configuration.image_filter_title?'<span class="sl-img-filter-title">'+At+"</span>":""))}else return J(nt);return J(nt)},St=function(nt){if(e.data_.flat_categories[nt.value]&&e.data_.flat_categories[nt.value].icon){var Ft=asl_configuration.URL+"svg/"+e.data_.flat_categories[nt.value].icon;return F(nt,"<span>"+e.data_.flat_categories[nt.value].name+'</span><img src="'+Ft+'" alt="'+e.data_.flat_categories[nt.value].name+'" >')}return J(nt)};K.enableHTML=!0,K.optionLabel=asl_configuration.tabs_layout?Lt:St,G.addClass(asl_configuration.tabs_layout?"asl-image-filter":"asl-ddl-image-filter")}if(t.$category_ddl.multiselect(K),asl_configuration.has_child_categories){var y="c_ids",st=e._cont.find("#asl-sub_cats-filter");if(st[0]){var vt=n('<select id="asl-sub-categories" '+z+' data-type="'+y+'"></select>');st.append(vt);var lt=Object.assign({},K);lt.templates={filter:it(vt)},lt.allSelectedText=asl_configuration.words.all_sub_categories,lt.nonSelectedText=asl_configuration.words.all_sub_categories,lt.onChange=function(ot,nt){e.halt_fetch=!1,e.refreshView(),asl_configuration.category_bound&&e.fitBound(null),asl_locator.hook_event({type:"category",data:t.get("featureFilter").array_})},asl_configuration.filter_ddl?asl_configuration.filter_ddl.push(y):asl_configuration.filter_ddl=[y],asl_configuration.image_filter&&(lt.enableHTML=!0,lt.optionLabel=asl_configuration.tabs_layout?Lt:St),asl_engine.controls[y]=vt,asl_engine.select_controls[y]=vt.multiselect(lt)}if(asl_configuration.select_category&&asl_configuration.select_category.length){var Pt=null;asl_configuration.select_sub_category&&(Pt=asl_configuration.select_sub_category.split(",")),t._make_sub_categories(t.get("featureFilter").array_,Pt)}}}}this.directionsPanel_=e._cont.find("#agile-modal-direction");var X=this.directionsPanel_.find(".frm-place");X.val(""),t.dest_coords&&(dt.directionsFrom_=t.dest_coords);var et=this.directionsPanel_.find(".frm-place")[0],xt=asl_use_new_place_api(asl_configuration)?["location","formattedAddress"]:["geometry"],dt=this;if(this.input_search=new asl_locator.AddressAPI(et,{fields:xt,map:e.getMap(),onSelect:function(O){O&&O.geometry&&O.geometry.location&&(dt.directionsFrom_=O.geometry.location)}}),this.directionsPanel_.find(".directions-to").attr("readonly","readonly"),this.directionsVisible_=!1,this.directionsPanel_.find(".btn-submit").on("click",function(O){return t.dest_coords&&X.val()==asl_configuration.words.current_location&&(t.directionsFrom_=t.dest_coords||null),t.renderDirections_(),!1}
14),asl_configuration.distance_unit=="KM"?(t.distance_type=ASLUnitSystem.METRIC,t.directionsPanel_.find("#rbtn-km")[0].checked=!0):t.distance_type=ASLUnitSystem.IMPERIAL,t.directionsPanel_.find("input[name=dist-type]").change(function(){t.distance_type=this.value==1?ASLUnitSystem.IMPERIAL:ASLUnitSystem.METRIC}),this.el_.find(".directions-cont .close").on("click",function(){t.hideDirections(),e._cont.find(".count-row").removeClass("hide"),e._cont.find("#filter-options").removeClass("hide")}),this.directionsPanel_.find(".close-directions").on("click",function(){t.hideDirections(),e._cont.find(".count-row").removeClass("hide"),e._cont.find("#filter-options").removeClass("hide")}),asl_configuration.template=="5"){var ht=e._cont.find("#asl-filter-sec-cont");e._cont.find(".asl-filter-popup-tog").on("click",function(O){ht.removeClass("asl-hide")}),ht.find("#asl-filter-sec-close").on("click",function(){ht.addClass("asl-hide")}),ht.find(".asl-collapse-arw").on("click",function(O){var ot=n(this);ot.parent().toggleClass("asl-collapsed-arw")}),ht.find(".sl-filter-clr-btn").on("click",function(O){e.reset_all()}),e._cont.find(".sl-panel-collapse-btn").on("click",function(){const O=e._cont.find(".sl-panel-cont"),ot=e._cont.find(".asl-map");O.hasClass("sl-panel-collapsed")?(O.removeClass("sl-panel-collapsed"),ot.removeClass("sl-map-expanded")):(O.addClass("sl-panel-collapsed"),ot.addClass("sl-map-expanded"))})}asl_locator.hook_event({type:"init",data:e.data_.stores_})},asl_locator.Panel.prototype.lead_form_modal=function(){if(asl_configuration.wpforms){let o=function(){n(t).removeClass("show"),n(t).hide()};var e=o,t="#asl-lead-form-modal";n(document).on("keydown",function(s){n(t).hasClass("show")&&s.keyCode===27&&o()}),this._cont.find('#asl-lead-form-modal button[data-dismiss="modal"]').on("click",function(s){o()})}},asl_locator.Panel.prototype._make_sub_categories=function(t,e){for(var o=[],s=asl_configuration.words.all_sub_categories,u=0;u<t.length;u++){var p=asl_categories[t[u].id_],h=p&&p.children?p.children:[];h&&Array.isArray(h)&&h.forEach(function(w,C){var R=!1;e&&e.length&&e.indexOf(w.id)!=-1&&(R=!0),o.push({label:w.name,title:w.name,value:parseInt(w.id),selected:R,ordr:parseInt(w.ordr)})})}o=asl_configuration.cat_sort=="name_"?asl_engine.helper.sortBy(o,"title",!0):asl_engine.helper.sortBy(o,"ordr"),o.length&&asl_configuration.single_cat_select=="1"&&o.unshift({label:s,title:s,value:""});var g=asl_engine.select_controls&&asl_engine.select_controls.c_ids;g&&typeof g.multiselect=="function"&&g.multiselect("dataprovider",o),asl_configuration.template=="5"&&(o.length>0?this._cont.find(".asl-ddl-filter-sub-cats").removeClass("d-none"):this._cont.find(".asl-ddl-filter-sub-cats").addClass("d-none"))},asl_locator.Panel.prototype.address_dropdowns=function(t,e){this.address_object=t,this.address_ddls={},asl_view.address_values={},asl_view.have_countries=e;var o=!0,s=Object.keys(t),u=[],p=[];if(asl_view.have_countries)var h=this._make_dropdown(s,"country","countries");else u=s,u&&u.length==1&&(o=!1);if(o)var g=this._make_dropdown(u,"state","states");else{var w=Object.keys(t);p=t[w[0]]}var C=this._make_dropdown(p,"city","cities")},asl_locator.Panel.prototype._to_multi_data=function(t,e){var o=[],s=asl_configuration.words["ph_"+e]||"All "+e;return o.push({label:s,title:s,value:""}),t&&Array.isArray(t)&&(t.sort(function(u,p){return u.localeCompare(p)}),t.forEach(function(u,p){var h=asl_engine.helper.html_entites(u);o.push({label:h,title:h,value:u})})),o},asl_locator.Panel.prototype._make_dropdown=function(t,e,o){var s=this._cont.find(".asl-advance-filters > div:first-child");t||(t=[]);var u=asl_configuration.words["label_"+e]||e,p=asl_configuration.words["ph_"+o]||"All "+o,h=(asl_configuration.words.search||"Search")+" "+u,g="sl-addr-ddl-"+e+"-search",w=n('<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="icon-search-2"></i></span></div></li>');w.find(".input-group").append(n("<label></label>").attr("for",g).addClass("sl-visually-hidden").text(h)).append(n('<input type="text" class="form-control multiselect-search">').attr("id",g));
14var C=n('<select id="sl-addr-ddl-'+e+'" data-type="'+e+'"></select>'),R=(asl_configuration.template=="4"?"":"pol-lg-4 ")+"pol-md-6 pol-sm-12 asl-ddl-filters";asl_configuration.template=="1"?R="sl-form-group asl-ddl-filters":asl_configuration.template=="5"&&(R="asl-tabs-ddl asl-ddl-filters",s=this._cont.find(".asl-advance-filters .sl-filter-scrol-panel")),R+=" sl-ddl-"+e;var z=n('<div class="'+R+'"><div class="asl-filter-cntrl"><label for="sl-addr-ddl-'+e+'" class="asl-cntrl-lbl">'+u+'</label><div class="sl-dropdown-cont"></div></div></div>');return z.find(".sl-dropdown-cont").append(C),s.append(z),C.multiselect({enableFiltering:asl_configuration.ddl_search,disableIfEmpty:!0,filterPlaceholder:asl_configuration.words.search||"Search",templates:{filter:w.prop("outerHTML")},enableCaseInsensitiveFiltering:!0,nonSelectedText:asl_configuration.words.select_option,nonSelectedText:p||"Select",includeSelectAllOption:!1,numberDisplayed:1,maxHeight:asl_configuration.ddl_max_height?parseInt(asl_configuration.ddl_max_height):250,onChange:this.address_selected}),this.address_ddls[e]=C,t.length?C.multiselect("dataprovider",this._to_multi_data(t,o)):C.multiselect("disable"),C},asl_locator.Panel.prototype.address_selected=function(t,e){var o=this.$select.val(),s=this.$select.data("type"),u=asl_view._panel,p=asl_view;if(asl_locator.hook_event({type:"addr_ddl_event",data:{type:s,value:o}}),s=="country"){if(p.address_values.country=p.address_values.state=p.address_values.city=null,o!=""){var h=Object.keys(u.address_object[o]);u.address_ddls.state.multiselect("dataprovider",u._to_multi_data(h,"states")),u.address_ddls.state.multiselect("enable"),p.address_values.country=o,h&&h.length==1&&h[0]==""&&(s="state",o="")}else u.address_ddls.state.multiselect("dataprovider",[]),u.address_ddls.state.multiselect("disable");u.address_ddls.city.multiselect("dataprovider",[]),u.address_ddls.city.multiselect("disable")}if(s=="state"){var g=p.have_countries?u.address_object[p.address_values.country][o]:u.address_object[o];u.address_ddls.city.multiselect("dataprovider",u._to_multi_data(g,"cities")),u.address_ddls.city.multiselect(g&&g.length?"enable":"disable"),p.address_values.state=o,p.address_values.city=null}s=="city"&&(p.address_values.city=o||null),asl_view.refreshView(),asl_view.fitBound()},asl_locator.Panel.prototype.toggleFeatureFilter_=function(t){var e=this.get("featureFilter");e.toggle(t),this.set("featureFilter",e)},asl_locator.geocoder_=asl_locator.getSearchProvider(),asl_locator.Panel.prototype.listenForStoresUpdate_=function(){var t=this,e=this.get("view");this.storesChangedListener_&&ASLEvent.removeListener(this.storesChangedListener_)},asl_locator.Panel.prototype.searchPosition=function(t){var e=this,o={address:t,bounds:this.get("view").getMap().getBounds()};asl_locator.geocoder_.geocode(o,function(s,u){u==="OK"&&ASLEvent.trigger(e,"geocode",s[0])})},asl_locator.Panel.prototype.setView=function(t){this.set("view",t)},asl_locator.Panel.prototype.view_changed=function(){var t=this,e=this.get("view");this.bindTo("selectedStore",e),this.geolocationListener_&&ASLEvent.removeListener(this.geolocationListener_),this.zoomListener_&&ASLEvent.removeListener(this.zoomListener_),this.idleListener_&&ASLEvent.removeListener(this.idleListener_);var o=e.getMap().getCenter(),s=function(){t.listenForStoresUpdate_()};this.geolocationListener_=ASLEvent.addListener(e,"load",s),this.zoomListener_=ASLEvent.addListener(e.getMap(),"zoom_changed",s),this.idleListener_=ASLEvent.addListener(e.getMap(),"idle",function(){return t.idle_(e.getMap())}),s(),this.bindTo("featureFilter",e),this.autoComplete_&&this.autoComplete_.bindTo("bounds",e.getMap())},asl_locator.Panel.prototype.getSearchCoordinates=function(t){var e=asl_configuration.search_coordinates;if(!e||typeof e!="object"||!t)return null;var o=n.trim(String(t)).toLowerCase(),s=e[o];return!s||isNaN(s.lat)||isNaN(s.lng)?null:new ASLLatLng(parseFloat(s.lat),parseFloat(s.lng))},asl_locator.Panel.prototype.geoCoder=function(t,h,o){var s=this,u=s.get("view"),p=s.addressAPI_||asl_locator.getSearchProvider(),h=h||function(w,C){C=="OK"?(w.search_text=t.value,u.bbox=w[0].geometry&&w[0].geometry.viewport?asl_normalize_bounds(w[0].geometry.viewport):null,asl_locator.hook_event({type:"before_search",data:w}),u.measure_distance(w[0].geometry.location,!0,null,w),asl_locator.hook_event({type:"search",data:w}),asl_configuration.analytics&&w[0]&&(w[0].analytics_source=asl_locator.resolveSearchProvider()+"_geocode",asl_locator.save_analytics(w[0])),asl_configuration.load_all=="2"&&u._cont.find(".asl-reload-map").trigger("click"),n(t).next().removeClass("hide")):s.handleGeocodeFailure(C)};do_geocoding=function(w){var C=w?s.getSearchCoordinates(w):null;if(C){h([{formatted_address:w,geometry:{location:C,viewport:null}}],"OK");return}if(asl_configuration.no_geocode!="1"&&(s.geo_modal&&s.hideGeoModal(),w)){var R={address:w};if(R.componentRestrictions={},asl_configuration.country_restrict){var z=asl_configuration.country_restrict.toLowerCase();z=z.split(","),R.componentRestrictions.country=z[0]}if(asl_configuration.region_search_bound)try{var it=asl_configuration.region_search_bound.split(",").map(parseFloat);if(it.length===4){var k=new ASLLatLng(it[0],it[1]),at=new ASLLatLng(it[2],it[3]);R.bounds=new ASLLatLngBounds(k,at)}}catch(M){console.warn("Invalid region_search_bound format",M)}u.data_.all_states&&(R.componentRestrictions.administrativeArea=u.data_.all_states.join("|")),p.geocode(R,h)}},n(t).on("click",function(w){t.select()});var g=asl_configuration["default-addr"];t&&g&&window.setTimeout(function(){if(asl_configuration.search_type=="2"){if(asl_view.data_&&asl_view.data_.ds_items){var w=asl_view.data_.ds_items.find(function(C){return C.title===g});w?(n(t).val(g),n(t).trigger("typeahead:selected",w)):asl_configuration.no_geocode=="1"?(n(t).val(g),n(t).trigger("typeahead:selected",{type:"title",title:g})):do_geocoding(asl_configuration["default-addr"])}}else asl_configuration.req_coords?do_geocoding(asl_configuration["default-addr"]):(s.get("view").measure_distance(new ASLLatLng(
14asl_configuration.default_lat,asl_configuration.default_lng),!0,null,null),asl_configuration.load_all=="2"&&n(".asl-reload-map").trigger("click"));n(t).next().removeClass("hide")},800),!o&&(n(t).on("keyup",function(w){if(w.keyCode==13){var C=n.trim(this.value);do_geocoding(C)}}),u._cont.find(".asl-search-event").on("click",function(w){var C=n.trim(t.value);C&&do_geocoding(C)}))},asl_locator.Panel.prototype.handleAddressPlace_=function(t,e){if(t){var o=this.getSearchCoordinates(e.value);if(o&&(t.geometry=t.geometry||{},t.geometry.location=o,t.geometry.viewport=null),!(!t.geometry||!t.geometry.location)){var s=this.get("view");asl_configuration.analytics&&(t.formatted_address||(t.formatted_address=e.value),t.analytics_source=(t.provider||asl_locator.resolveSearchProvider())+"_place",asl_locator.save_analytics(t)),s.bbox=asl_normalize_bounds(t.geometry.viewport),asl_locator.hook_event({type:"before_search",data:t}),s.measure_distance(t.geometry.location,!0,null,t),t.search_text=e.value,asl_locator.hook_event({type:"search",data:t}),n(e).next().removeClass("hide"),asl_configuration.load_all=="2"&&s._cont.find(".asl-reload-map").trigger("click")}}},asl_locator.Panel.prototype.initAutocomplete_=function(t){var e=this;if(!asl_configuration.geocoding_only&&asl_locator.resolveSearchProvider()!=="disabled"){var o=asl_use_new_place_api(asl_configuration),s={};!o&&asl_configuration.google_search_type&&(s.types=asl_configuration.google_search_type=="cities"||asl_configuration.google_search_type=="regions"?["("+asl_configuration.google_search_type+")"]:[asl_configuration.google_search_type]);var u=o?["location","formattedAddress","id","types"]:["geometry","place_id","formatted_address","types"];(asl_configuration.filter_address||asl_configuration.analytics)&&u.push(o?"addressComponents":"address_components"),this.addressAPI_=new asl_locator.AddressAPI(t,{googleOptions:s,newGoogleOptions:{},countries:asl_get_country_restrictions(asl_configuration),fields:u,map:this.get("view")?this.get("view").getMap():null,onSelect:function(p){e.handleAddressPlace_(p,t)}}),this.autoComplete_=this.addressAPI_}e.search_control=t,e.geoCoder(t)},asl_locator.Panel.prototype.idle_=function(t){this.center_?t.getBounds().contains(this.center_)||(this.center_=t.getCenter(),this.listenForStoresUpdate_()):this.center_=t.getCenter()},asl_locator.Panel.prototype.hideGeoModal=function(){var t=this._cont.find("#asl-geolocation-agile-modal");t.removeClass("in"),window.setTimeout(function(){t.css("display","none")},300),this.geo_modal=!1},asl_locator.Panel.prototype.hideNoStoresModal=function(){var t=this._cont.find("#no-stores-modal");t.removeClass("in"),window.setTimeout(function(){t.css("display","none")},300)},asl_locator.Panel.prototype.showNoStoresModal=function(){if(asl_configuration.no_stores_modal){var t=this._cont.find("#no-stores-modal");t.css("display","block"),window.setTimeout(function(){t.addClass("in")},300)}},asl_locator.Panel.prototype.handleGeocodeFailure=function(t){if(t=="PROVIDER_NOT_CONFIGURED"){asl_locator.showSearchProviderAlert(this._cont);return}var e=this.get("view");console.log("Geocode was not successful for the following reason: "+t),e&&(e.search_performed=!0),this.geo_modal&&this.hideGeoModal(),this._cont.find(".Num_of_store .count-result").html("0");var o=this._cont.find(".sl-no-found-section");this.storeList_.html(o[0]?o.html():'<div class="asl-overlay-on-item" id="asl-no-item-found"><div class="white"></div><div class="sl-no-item"><p>'+asl_configuration.no_item_text+"</p></div></div>"),asl_locator.hook_event({type:"no_stores",data:{element:this.storeList_}}),this.showNoStoresModal()},asl_locator.Panel.prototype.hideDescModal=function(){var t=this._cont.find("#asl-desc-agile-modal");t.removeClass("in"),window.setTimeout(function(){t.css("display","none")},300),this.isDescModal=!1},asl_locator.Panel.prototype.descriptionModal=function(t){var e=this._cont.find("#asl-desc-agile-modal");e.find(".sl-title").html(t.props_.title);var o="<h5>"+asl_configuration.words.desc_title+"</h5><p>"+t.props_.description+"</p>";t.props_.description_2&&(o+='<br><h5 class="sl-addit-desc">'+asl_configuration.words.add_desc_title+"</h5><p>"+t.props_.description_2+"</p>"),e.find(".sl-desc").html(o),e.css("display","block"),e.addClass("in"),asl_configuration.is_mob&&n("html, body").stop().animate({scrollTop:e.offset().top},900,"swing"),this.isDescModal=!0},asl_locator.Panel.prototype.stores_changed=function(t){var e=this;if(e.isDescModal&&e.hideDescModal(),!!this.get("stores")){var o=this.get("view");if(!(o.showing_direction||!o.display_list)&&!(asl_configuration.accordion&&o.is_updated)){o.is_updated=!0;var s=o.get("stores"),u=this.get("selectedStore");if(asl_configuration.highlight_first&&t){for(var p=[],h=[],g=0;g<s.length;g++)s[g].id_==t.id_?p.push(s[g]):h.push(s[g]);s=p.concat(h)}if(asl_configuration.accordion||this.storeList_.empty(),asl_configuration.template=="2"){var w=s.length?o.total_stores||s.length:0,C=this._cont.find(".sl-cat-header .sl-cat-store-lbl");this._cont.find(".sl-cat-header .sl-cat-count").html(w),C.html(C.data(w==1?"single":"plural")),this._cont.find(".sl-radius-val").html(asl_configuration.radius_range),this._cont.find(".sl-pill-status").toggleClass("sl-pill-inactive",!asl_configuration.show_opened)}if(s.length)this._cont.find(".Num_of_store .count-result").html(o.total_stores||s.length);else{this._cont.find(".Num_of_store .count-result").html("0");
14var R=this._cont.find(".sl-no-found-section");e.storeList_.html(o.search_performed&&R[0]?R.html():'<div class="asl-overlay-on-item" id="asl-no-item-found"><div class="white"></div><div class="sl-no-item"><p>'+(o.search_performed?asl_configuration.no_item_text:asl_configuration.words.perform_search)+"</p></div></div>"),asl_locator.hook_event({type:"no_stores",data:{element:e.storeList_}}),o.search_performed?e.showNoStoresModal():e.hideNoStoresModal()}var z=function(N){var B=n(N.target);if(o.halt_fetch=!0,asl_configuration.accordion&&N.stopPropagation(),asl_configuration.branches&&this.store&&this.store.props_.childs&&this.store.props_.childs.length){N.preventDefault(),o.render_branch_list(this.store);return}if(B.hasClass("asl-lead-cta-btn")){N.preventDefault(),e.lead_event_fn.call(e,this.store);return}if(B.hasClass("sl-btn-custom")){N.preventDefault(),asl_locator.hook_event({type:"custom_btn",data:this.store});return}if(!B.hasClass("sl-stop-action")){if(B.hasClass("s-direction")){N.preventDefault();return}if(B.hasClass("sl-link")){N.preventDefault(),e.descriptionModal(this.store);return}if(B.hasClass("sl-pickup")){N.preventDefault(),asl_locator.hook_event({type:asl_configuration.ship_from?"ship_from":"pickup",data:this.store});return}if(e.isDescModal&&e.hideDescModal(),e.geo_modal&&e.hideGeoModal(),N.target.className=="A"||asl_configuration.disable_list_click){asl_locator.hook_event({type:"highlight",data:this.store});return}if(B.is('a[href^="mailto:"]')?asl_locator.hook_event({type:"asl_email_click",data:this.store}):B.is('a[href^="tel:"]')&&asl_locator.hook_event({type:"asl_phone_click",data:this.store}),B.hasClass("btn-asl")){asl_locator.hook_event({type:"highlight",data:this.store});return}if(asl_configuration.template=="1"){var S=o.get("selectedStore");if(S&&this.store&&S.id_==this.store.id_){o.highlight(null,B);return}}if(o.noRefreshList=!0,o.highlight(this.store,B),asl_configuration.is_mob||asl_configuration.template=="4"){if(asl_configuration.disable_scroll)return;var F=n(o.getMap().getDiv()).offset().top,J=typeof asl_configuration.scroll_offset!="undefined"?parseInt(asl_configuration.scroll_offset,10):0;n("html, body").stop().animate({scrollTop:F+J},900,"swing")}}};if(this.storeList_.off(".aslStoreItems"),this.storeList_.on("click.aslStoreItems",".sl-item .s-direction",function(N){N.preventDefault(),N.stopImmediatePropagation();var B=this.closest(".sl-item"),S=B&&B.store;S&&(e.directionsTo_=S,e.showDirections(S))}),this.storeList_.on("click.aslStoreItems",".sl-item .sl-show-branches",function(N){N.preventDefault(),N.stopImmediatePropagation();var B=this.closest(".sl-item"),S=B&&B.store;S&&o.render_branch_list(S)}),this.storeList_.on(asl_configuration.list_event+".aslStoreItems",".sl-item",function(N){z.call(this,N)}),this.storeList_.on("keyup.aslStoreItems",".sl-item",function(N){if(N.key=="Enter")z.call(this,N);else if(N.key=="Tab")o.get("selectedStore")&&o.highlight(null);else if(N.key=="d"||N.key=="D"){var B=this.store;if(!B)return;e.directionsTo_=B,e.showDirections(B)}}),(asl_configuration.hover_center||asl_configuration.do_bounce)&&(this.storeList_.on("mouseenter.aslStoreItems",".sl-item",function(){var N=this.store;N&&(asl_configuration.hover_center&&(o.panTo(N),asl_configuration.zoom_li&&asl_map.setZoom(parseInt(asl_configuration.zoom_li))),asl_configuration.do_bounce&&o.doBounce(N,!0))}),asl_configuration.do_bounce&&this.storeList_.on("mouseleave.aslStoreItems",".sl-item",function(){var N=this.store;N&&o.doBounce(N,!1)})),asl_configuration.accordion){var it=this.get("view").data_,k=it.stateCities,at=this.storeList_,M="";if(asl_configuration.category_accordion?(M=it.generateHTMLCategories(),at.attr("id","p-catlist")):it.countries?(M=it.generateHTMLCountriesStates(it.stateCities),at.attr("id","p-countlist")):M=it.generateHTMLStates(it.stateCities),at.html(M),e._cont.find(".
14item-state > a span:empty").each(function(N){var B=n(this).parent().next().find("li.item-state");B.appendTo(B.parent().parent().parent().parent()),n(this).parent().remove()}),at.children().length==1){var q=at.children().first(),W=q.find(">div>ul>li");if(W.length){var Y=at.attr("id");W.appendTo(at),W.children("a.colisiond").each(function(){Y?n(this).attr("data-parent","#"+Y):n(this).removeAttr("data-parent")}),q.remove()}}}for(var bt=asl_configuration.branches=="2",yt=asl_configuration.scroll_field,Tt=null,Nt=new Map,gt=function(N,B){var S=N&&N.jquery?N[0]:N;if(!(!S||!B)){var F=Nt.get(S);F||(F=document.createDocumentFragment(),Nt.set(S,F)),B.jquery?B.each(function(){F.appendChild(this)}):F.appendChild(B)}},Et=0,qt=s.length;Et<qt;Et++){var m=s[Et].getInfoPanelItem();m.store=s[Et];var y=s[Et];if(bt){let N=y.props_;if(o.branch_view){if(!N.branch)continue}else if(N.branch)continue}if(u&&s[Et].id_==u.id_?n(m).addClass("highlighted"):n(m).removeClass("highlighted"),asl_configuration.category_accordion)if(s[Et].props_.c_ids.length){var v="#sl-cat-"+s[Et].props_.c_ids[0];gt(n(v),m);for(var L=1;L<s[Et].props_.c_ids.length;L++){var v="#sl-cat-"+s[Et].props_.c_ids[L],D=m.cloneNode(!0);D.store=m.store,gt(n(v),D)}}else gt(e.storeList_,m);else if(asl_configuration.accordion){var v="#city-list-"+(s[Et].props_.state.replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase()+"-"+s[Et].props_.city.replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase());gt(n(v),m)}else{var U=s[Et].props_[yt];if(yt&&U!==Tt){Tt=U;var G=e.createScrollLabel(U,yt);gt(e.storeList_,G)}gt(e.storeList_,m)}}Nt.forEach(function(N,B){B.appendChild(N)}),asl_configuration.category_accordion&&e._cont.find("li.item-state").off("click.aslcat").on("click.aslcat",function(N){var B=n(this),S=B.data("id"),F=B.children(".colision"),J=B.parents("li.item-state").children(".colision"),K=J;if(F.length&&(K=K.add(F)),asl_view._panel.storeList_.find(".colision.show").not(K).colision("hide"),asl_view.categoryClearAll(),S){var Lt=!F.length||!F.hasClass("show");o.categoryAccFilter(String(S),Lt)}}),e.mainPanel.scrollTop()>0&&e.mainPanel.stop().animate({scrollTop:0},100,"swing")}}},asl_locator.Panel.prototype.createScrollLabel=function(t,e){var o=document.createElement("li");o.className="sl-store-scroll-lbl";var s=this.get("view"),u=String(t).trim(),p=e+"::"+u,h=e+"::"+String(t),g=s&&s.scrollTargetIdMap,w=g&&(g[p]||g[h])||"scroll-"+d(u,e);o.id=w;var C=document.createElement("span");C.className="sl-scroll-divider",C.setAttribute("aria-hidden","true");var R=document.createElement("span");R.className="sl-scroll-name",R.textContent=t;var z=document.createElement("span");return z.className="sl-scroll-divider",z.setAttribute("aria-hidden","true"),o.appendChild(C),o.appendChild(R),o.appendChild(z),o.setAttribute("data-id",t),o.setAttribute("data-type",e),o.setAttribute(`data-${e}`,t),o},asl_locator.Panel.prototype.lead_event_fn=function(t){var e="#asl-lead-form-modal",o=this._cont.find(e);if(t)if(t=t.props_,o.find(".asl_store_id input")[0])o.find(".asl_store_id input").val(t.id);else{var s=o.find("label").filter(function(){return n(this).text().trim()==="asl_store_id"}).first();if(s.length){var u=s.attr("for");u&&o.find("#"+u).val(t.id)}}asl_locator.hook_event({type:"lead_event",data:{store:t}}),o.toggleClass("show"),o.css("display","block")},asl_locator.Panel.prototype.selectedStore_changed=function(){var t=this,e=this.get("selectedStore"),o=t.get("view"),s=n(".highlighted",this.storeList_),u=!1,p=o.marker_clicked;if(o.marker_clicked=!1,asl_configuration.template=="1"&&(s[0]&&e&&s.data("id")==e.id_&&(u=!0),u||s.find(".sl-addr-sec").slideUp()),s.removeClass("highlighted"),!asl_configuration.adv_mkr&&o.active_marker&&o.active_marker.m&&(o.active_marker.m.setIcon(o.active_marker.picon),o.active_marker.m=null),!!e){var h=e.getMarker();o.active_marker&&(o.active_marker.picon=h.getIcon(),o.active_marker.m=h,h.setIcon(o.active_marker.icon)),this.directionsTo_=e;var g=this.storeList_.find('li.sl-item[data-id="'+e.id_+'"]');if(g.length>1&&(g=g.eq(0)),g&&(asl_configuration.template=="1"&&!g.hasClass("highlighted")&&(u||g.find(".sl-addr-sec").slideDown()),g.addClass("highlighted"),asl_configuration.accordion&&p)){var w=t._cont.find(".asl-panel-inner").find(".colision.in"),C=g.parentsUntil(".asl-panel-inner","div.colision");if(w.length&&w[w.length-1].id!=C[0].id&&w.colision("hide"),C){t.accordion_showing=g;for(var R=C.length-1;R>=0;R--)n(C[R]).colision("show"),window.setTimeout(function(){var bt=t.accordion_showing.position().top;t.mainPanel.animate({scrollTop:bt},"fast")},800)}}this.settings_.directions&&this.directionsPanel_.find(".directions-to").val(e.getDetails().title);var z=t.get("view").getInfoWindow().getContent(),it=n(z),k=it.find(".asl-buttons"),at=n("<a/>").text(asl_configuration.words.direction).attr("href","javascript:void(0)").attr("title",asl_configuration.words.direction_title||"link to Google Maps").addClass("action").addClass("directions"),M=n("<a/>").text(asl_configuration.words.zoom).attr("href","javascript:void(0)").addClass("action").addClass("zoomhere"),q=e.props_.link;if(at.on("click",function(){return t.showDirections(),!1}),M.on("click",function(){t.get("view").getMap().setOptions({center:e.getLocation(),zoom:asl_map.getZoom()+1})}),k.append(at).append(M),asl_configuration.pickup||asl_configuration.ship_from){var W=n("<a/>").text(asl_configuration.ship_from?asl_configuration.words.ship_from:asl_configuration.words.pickup).addClass("action").addClass("sl-pickup");k.append(W),W.on("click",function(bt){asl_locator.hook_event({type:asl_configuration.ship_from?"ship_from":"pickup",data:e})})}k.find(".asl-lead-cta-btn").on("click",function(bt){bt.preventDefault(),t.lead_event_fn.call(t,e)}),k.find(".sl-btn-custom").on("click",function(bt){bt.preventDefault(),asl_locator.hook_event({type:"custom_btn",data:e})});var Y=n("<a/>").text(asl_configuration.words.detail).addClass("action").addClass("a-website");window.asl_website_click?(Y.on("click",function(){asl_website_click(e.props_,q)}),k.append(Y)):q&&(k.append(Y),Y.attr("href",decodeURIComponent(q)),Y.attr("target",asl_configuration.target_blank)),asl_configuration.template=="5"&&(at.html(asl_configuration.words.direction+'<i class="icon-direction"></i>'),Y.append('<i class="icon-link-ext"></i>'),M.append('<i class="icon-zoom-in"></i>')),Y.off("click.aslTrack").on("click.aslTrack",function(bt){var yt=n(this).attr("href"),Tt=n(this).attr("target")||"_self";bt.preventDefault(),asl_locator.hook_event({type:"asl_event_cta",data:e}),yt&&yt!=="#"&&setTimeout(function(){Tt==="_blank"?window.open(yt,Tt):window.location.href=yt},50)}
14),it.find('a[href^="mailto:"]').off("click.aslTrack").on("click.aslTrack",function(bt){asl_locator.hook_event({type:"asl_email_click",data:e})}),it.find('a[href^="tel:"]').off("click.aslTrack").on("click.aslTrack",function(bt){asl_locator.hook_event({type:"asl_phone_click",data:e})})}},asl_locator.Panel.prototype.hideDirections=function(){this.directionsVisible_=!1,this.directionsPanel_.removeClass("in"),this.el_.find(".directions-cont").addClass("hide"),this.storeList_.fadeIn(),this.directionsRenderer_&&this.directionsRenderer_.setMap(null),asl_configuration.direction_redirect==="3"&&window.ASLRouteAPI&&typeof window.ASLRouteAPI.clearRouteDisplay=="function"&&window.ASLRouteAPI.clearRouteDisplay();var t=this.get("view");t.showing_direction=!1},asl_locator.Panel.prototype.showDirections=function(t){var e=t||this.get("selectedStore");if(e){if(asl_locator.hook_event({type:"direction",data:e.props_}),asl_locator.isMapLibre()||asl_configuration.is_mob&&asl_configuration.direction_redirect=="1"||asl_configuration.direction_redirect=="2"){var o=asl_configuration.title_in_dir?[e.props_.title]:[],s="";asl_configuration.template=="1"&&e.props_.street&&o.push(e.props_.street),o.push(e.props_.address),o=o.join(", ").replace(/<\/?[^>]+(>|$)/g," "),o=encodeURIComponent(o);const u=asl_configuration.coords_direction&&e.location_?`${e.location_.lat()},${e.location_.lng()}`:null,p=(asl_configuration.direction_mode||"DRIVING").toUpperCase(),h=["WALKING","TRANSIT","BICYCLING","DRIVING"].indexOf(p)!==-1?p:"DRIVING",g=h==="WALKING"?"walking":h==="TRANSIT"?"transit":h==="BICYCLING"?"bicycling":"driving",w=h==="WALKING"?"w":h==="TRANSIT"?"r":"d",C=u?encodeURIComponent(u):o;if(asl_configuration.is_ios&&asl_configuration.native_direction){const z=q=>window.open(q,"_blank","noopener,noreferrer"),it=`maps://?daddr=${C}&dirflg=${w}`,k=`https://maps.apple.com/?daddr=${C}&dirflg=${w}`,at=`https://www.google.com/maps/dir/?api=1&destination=${C}&travelmode=${g}`,M=`comgooglemaps://?daddr=${C}&directionsmode=${g}`;if(h==="BICYCLING"){z(M),setTimeout(()=>z(at),400);return}z(it),setTimeout(()=>z(k),400);return}const R=`https://www.google.com/maps/dir/?api=1&destination=${C}&travelmode=${g}`;window.open(R);return}this.directionsPanel_.find(".frm-place").val(this.dest_coords?asl_configuration.words.current_location:""),this.directionsPanel_.find(".directions-to").val(e.getDetails().title),this.directionsPanel_.addClass("in"),this.renderDirections_(),(asl_configuration.is_mob||asl_configuration.template=="4")&&n("html, body").stop().animate({scrollTop:n(this.get("view").getMap().getDiv()).offset().top},900,"swing"),this.directionsVisible_=!0}},asl_locator.Panel.prototype.renderDirections_=function(){var t=this;if(!(!this.directionsFrom_||!this.directionsTo_)){this.el_.find("#map-loading").show(),this.el_.find(".directions-cont").removeClass("hide"),this.storeList_.fadeOut(),t.directionsPanel_.removeClass("in");var e=this.el_.find(".rendered-directions").empty(),o="DRIVING";if(asl_configuration.direction_mode){var s=asl_configuration.direction_mode.toUpperCase();["DRIVING","WALKING","BICYCLING","TRANSIT"].indexOf(s)!==-1&&(o=s)}var u=asl_configuration.direction_redirect==="3"&&window.ASLRouteAPI&&typeof window.ASLRouteAPI.initRouteAPI=="function",p=function(){var M=t.get("view");t._cont.find(".count-row").addClass("hide"),t._cont.find("#filter-options").addClass("hide"),M.showing_direction=!0,M.infoWindow_.getVisible()&&M.infoWindow_.close()},h=function(M){return M?typeof M.lat=="function"&&typeof M.lng=="function"?{lat:M.lat(),lng:M.lng()}:typeof M.lat=="number"&&typeof M.lng=="number"?{lat:M.lat,lng:M.lng}:typeof M.latitude=="number"&&typeof M.longitude=="number"?{lat:M.latitude,lng:M.longitude}:null:null},g=function(){if(!t.directionsService_||!t.directionsRenderer_){if(!asl_has_google_maps()||!google.maps.DirectionsService||!google.maps.DirectionsRenderer){it("Legacy directions are unavailable."),t.el_.find("#map-loading").hide();return}t.directionsService_=new google.maps.DirectionsService,t.directionsRenderer_=new google.maps.DirectionsRenderer({draggable:!0})}t.directionsService_.route({origin:t.directionsFrom_,destination:t.directionsTo_.getLocation(),travelMode:o,unitSystem:t.distance_type},function(M,q){if(t.el_.find("#map-loading").hide(),q!=="OK"){var W=M&&(M.error_message||M.errorMessage),Y=W&&W.trim()||(q==="REQUEST_DENIED"?"Directions request denied: legacy Directions API not enabled for this project.":"Directions request failed: "+q);it(Y);return}p();var bt=t.directionsRenderer_;bt.setPanel(e[0]),bt.setMap(t.get("view").getMap()),bt.setDirections(M)}),t.directionsFrom_=null},w=e[0]||null,C=t.get("view").getMap(),R=h(this.directionsFrom_),z=h(this.directionsTo_.getLocation()),it=function(M){if(w){w.innerHTML="";var q=document.createElement("div");q.className="sl-container";var W=document.createElement("p");W.className="asl-route-error alert alert-danger",W.textContent=M||"Unable to load directions at this time.",q.appendChild(W),w.appendChild(q)}};if(u&&w&&C&&R&&z){var k=function(M){M&&console.error("ASLRouteAPI failed.",M);var q=M&&M.message?M.message:"Unable to load directions at this time.";it(q),t.el_.find("#map-loading").hide()};try{var at=window.ASLRouteAPI.initRouteAPI({panelElement:w,mapInstance:C,route:{origin:R,destination:z}});at&&typeof at.then=="function"?at.then(function(){p(),t.el_.find("#map-loading").hide(),t.directionsFrom_=null}).catch(k):(p(),t.el_.find("#map-loading").hide(),t.directionsFrom_=null)}catch(M){k(M)}return}if(asl_configuration.direction_redirect==="3"){it("Route API is unavailable for this request."),t.el_.find("#map-loading").hide();return}g()}},asl_locator.Panel.prototype.featureFilter_changed=function(){this.listenForStoresUpdate_()},asl_locator.PanelOptions=function(){},asl_locator.prototype.locationSearch,asl_locator.PanelOptions.prototype.locationSearchLabel,asl_locator.PanelOptions.prototype.featureFilter,asl_locator.PanelOptions.prototype.directions,asl_locator.PanelOptions.prototype.view})(jQuery),(function($){var charMap={a:/[à áâÄÃÃÃÄ]/gi,c:/[çÃ]/gi,s:/[ÈÅÅ]/gi,e:/[èéêëÃÃÃÃ]/gi,t:/[ÈŢţ]/gi,i:/[ïîîÃÃÃ]/gi,o:/[ôÃÃ]/gi,oe:/[Å]/gi,u:/[üÃÃ]/gi},normalize=function(n){return $.each(charMap,function(a,d){n=n.replace(d,a)}),n},queryTokenizer=function(n){var a=normalize(n);return Bloodhound.tokenizers.whitespace(a)},asl_search={address_ta:null,address_td:null,address_inst:null,title_ta:null,title_td:null,title_inst:null,ds:null,add_prop_search:function(n,a,d,l){n=(n||[]).filter(function(ct){return ct&&String(ct.title==null?"":ct.title).trim().length>0});var b=this,P=this[d+"_td"],Q=this[d+"_ta"],H=this[d+"_inst"],V=n&&n[0]&&n[0].value?"value":"title";if(P){P.local=[],P.clear(),P.add(n);return}Q=a,P=new Bloodhound({datumTokenizer:function(ct){var Ct=[];for(var Dt in ct)ct.hasOwnProperty(Dt)&&typeof ct[Dt]=="string"&&(Ct=Ct.concat(queryTokenizer(ct[Dt])));return Ct},queryTokenizer,local:n,sorter:function(ct,Ct){var Dt=Q.val().trim().toLowerCase(),zt=ct.title.toLowerCase()===Dt,Gt=Ct.title.toLowerCase()===Dt;return zt&&!Gt?-1:!zt&&Gt?1:ct.title.localeCompare(Ct.title)}});function ut(ct){if(wt(),asl_configuration.no_geocode=="1"){for(var Ct=[],Dt=normalize(a.val().trim()),zt=0;zt<P.local.length;zt++)normalize(P.local[zt].title)===Dt&&Ct.push(P.local[zt]);if(asl_view.prop_filter=null,!Ct.length){var Gt={title:a.val(),type:"title"};asl_view.prop_filter=Gt,a.next().removeClass("hide"),asl_view.refreshView(),asl_locator.hook_event({type:"search",data:{search:Gt,stores:[]}}
14),asl_configuration.analytics&&asl_locator.save_analytics({analytics_source:"database",analytics_kind:"raw_query",analytics_key:"db:raw_query:"+normalize(Gt.title),analytics_label:Gt.title,result_count:0});return}}if(l&&asl_configuration.search_2_contain){Q.typeahead("close"),b.contains_search(a,l);return}Q.parent().find(".tt-suggestion.tt-cursor")[0]?Q.parent().find(".tt-suggestion.tt-cursor").trigger("click"):Q.parent().find(".tt-suggestion:first-child").trigger("click"),!l&&asl_configuration.search_type=="2"&&!Q.parent().find(".tt-suggestion:first-child")[0]&&do_geocoding(a.val())}function wt(){asl_view&&asl_view._panel&&asl_view._panel.geo_modal&&asl_view._panel.hideGeoModal()}var It=Q.closest(".sl-search-group, .search_filter, .asl-name-search, .Filter_section").find(".asl-search-btn.asl-search-event, .asl-search-event").first();asl_configuration.template=="4"&&!l&&(It=Q.parents(".Filter_section").find(".asl-search-event").first()),It[0]&&It.off("click.aslSearchBtn").on("click.aslSearchBtn",function(ct){ct.preventDefault(),ut(ct)}),P.initialize(),H=Q.typeahead({hint:!1,highlight:!0,minLength:1},{name:"title",limit:asl_configuration.search_name_limit?parseInt(asl_configuration.search_name_limit):5,displayKey:"title",source:P.ttAdapter(),templates:{empty:function(ct){return'<p class="tt-empty">'+asl_configuration.words.no_search_item+"</p>"}}}),Q.on("typeahead:selected",l?this.selected_secondary:this.selected);var mt=asl_locator.add_clear_button(Q);Q.on("keyup",function(ct){!this.value&&!mt.hasClass("hide")&&mt.trigger("click"),ct.which==13&&Q.parent().find(".tt-menu.tt-open").length&&ut(ct)}),l&&mt.off("click").on("click",function(){asl_view.second_filter=null,mt.addClass("hide"),asl_view._panel&&asl_view._panel.hideNoStoresModal&&asl_view._panel.hideNoStoresModal(),Q.val(""),asl_view.refreshView(),asl_map.panTo(new ASLLatLng(asl_lat,asl_lng)),asl_map.setZoom(parseInt(asl_configuration.zoom))}),this[d+"_td"]=P,this[d+"_ta"]=Q,this[d+"_inst"]=H},contains_search:function(n,a){asl_view&&asl_view._panel&&asl_view._panel.geo_modal&&asl_view._panel.hideGeoModal(),asl_view.second_filter={title:n.val()},n.next().removeClass("hide"),asl_view.refreshView();var d=asl_view.get("stores");asl_view.fitBound(d),asl_locator.hook_event({type:"search",data:{search:asl_view.second_filter,stores:d}})},selected:function(n,a,d){asl_view&&asl_view._panel&&asl_view._panel.geo_modal&&asl_view._panel.hideGeoModal();var l=$(n.target),b=asl_view.get("stores");if(a.type){if(asl_configuration.additional_search){b=[];var P=asl_view.data_.stores_;for(var Q in P)P.hasOwnProperty(Q)&&P[Q].props_.description_2.indexOf(a.title)!=-1&&b.push(P[Q]);asl_view._location=null,asl_view.search_text=a.title,asl_locator.hook_event({type:"search",data:{search:a,stores:b}})}else asl_view.prop_filter=a;l.next().removeClass("hide"),asl_view.refreshView();var b=asl_view.get("stores");asl_view.fitBound(b),asl_locator.hook_event({type:"search",data:{search:a,stores:b}}),asl_configuration.analytics&&(a.analytics_source=a.analytics_source||"database",a.analytics_kind=a.analytics_kind||a.type||"raw_query",a.analytics_label=a.analytics_label||a.title||"",a.analytics_key=a.analytics_key||["db",a.analytics_kind,normalize(a.analytics_label)].join(":"),a.result_count=b.length,asl_locator.save_analytics(a));return}},selected_secondary:function(n,a,d){asl_view&&asl_view._panel&&asl_view._panel.geo_modal&&asl_view._panel.hideGeoModal();var l=$(n.target);asl_view.second_filter=a,l.next().removeClass("hide"),asl_view.refreshView();var b=asl_view.get("stores");asl_view.fitBound(b),asl_locator.hook_event({type:"search",data:{search:a,stores:b}})},category_accordion:function(n){if(asl_configuration.category_accordion&&n.id){var a=$('.asl-cont #asl-list li.item-state[data-id="'+n.id+'"]');return a[0]&&(a.children(0).trigger("click"),$("#asl-storelocator #asl-list").animate({scrollTop:a.position().top},"fast")),_input.next().removeClass("hide"),!0}return!1}},map=null,asl_engine={config:{},helper:{}};if(window.asl_engine=asl_engine,!window.asl_configuration)return;asl_configuration.layout="0",asl_configuration.category_accordion=!1,asl_configuration.accordion=!1,asl_configuration.analytics=asl_configuration.analytics=="1",asl_configuration.sort_by_bound=asl_configuration.sort_by_bound=="1",asl_configuration.distance_slider=asl_configuration.distance_slider=="1",asl_configuration.show_categories=asl_configuration.show_categories!="0",asl_configuration.time_switch=!1,asl_configuration.category_marker=asl_configuration.category_marker!="0",asl_configuration.advance_filter=asl_configuration.advance_filter!="0",asl_configuration.time_24=asl_configuration.time_format=="1",asl_configuration.user_center=asl_configuration.user_center=="1",asl_configuration.distance_unit=asl_configuration.distance_unit=="KM"?asl_configuration.distance_unit:"Miles",asl_configuration.filter_address=asl_configuration.filter_address=="1",asl_configuration.regex=asl_configuration.no_regex?/#|\./ig:/[^a-z0-9\s]/gi;var info_x_offset=parseInt(asl_configuration.info_x_offset,10),info_y_offset=parseInt(asl_configuration.info_y_offset,10);asl_configuration.info_x_offset=isNaN(info_x_offset)?0:info_x_offset,asl_configuration.info_y_offset=isNaN(info_y_offset)?0:info_y_offset,asl_configuration.enter_key=!0,asl_configuration.category_sort=!0,asl_configuration.stores_limit=asl_configuration.stores_limit&&!isNaN(asl_configuration.stores_limit)?parseInt(asl_configuration.stores_limit):null,asl_configuration.radius_cir
14cle=asl_configuration.radius_circle=="1",asl_configuration.marker_height=asl_configuration.marker_height?asl_configuration.marker_height:"43",asl_configuration.and_filter=asl_configuration.and_filter=="1",asl_configuration.category_bound=asl_configuration.category_bound=="1",asl_configuration.fit_bound=asl_configuration.fit_bound=="1",asl_configuration.sort_random=asl_configuration.sort_random=="1",asl_configuration.filter_ddl=null,asl_configuration.boundary_box=asl_configuration.distance_control=="2",asl_configuration.store_radius=asl_configuration.store_radius=="1",asl_configuration.marker_title=asl_configuration.marker_title!="0",asl_configuration.hide_logo=asl_configuration.hide_logo=="1",asl_configuration.hide_hours=asl_configuration.hide_hours=="1",asl_configuration.do_bounce=asl_configuration.do_bounce!=="0",asl_configuration.list_event=asl_configuration.mouseover_list==="1"?"mouseover":"click",asl_configuration.pickup=asl_configuration.pickup==="1",asl_configuration.ship_from=asl_configuration.ship_from==="1",asl_configuration.address_ddl=!1,asl_configuration.tabs_layout=asl_configuration.tabs_layout==="1",asl_configuration.ddl_search=!!asl_configuration.ddl_search,asl_configuration.target_blank=asl_configuration.target_blank=="1"?"_blank":"_self",asl_configuration.cluster=asl_configuration.cluster!="0",asl_configuration.display_list=asl_configuration.display_list=="1",asl_configuration.branches=asl_configuration.branches=="0"?!1:asl_configuration.branches,asl_configuration.closed_label=asl_configuration.closed_label=="1",asl_configuration.adv_mkr=!!asl_configuration.advanced_marker,asl_configuration.search_zoom=parseInt(asl_configuration.search_zoom),asl_configuration.scroll_wheel=asl_configuration.scroll_wheel==1?!0:asl_configuration.scroll_wheel==0?!1:(asl_configuration.scroll_wheel==="default",null),asl_locator.isMapLibre()&&(asl_configuration.advanced_marker=!1,asl_configuration.adv_mkr=!1,asl_configuration.mouseover=!1),asl_configuration.advance_filter||$(".asl-cont").addClass("no-asl-filters"),asl_configuration.display_list||(asl_configuration.sort_by_bound=!1),asl_configuration.template=="2"?(asl_configuration.address_ddl=!1,asl_configuration.filter_ddl=""):asl_configuration.template=="6"&&(asl_configuration.distance_slider=!1,asl_configuration.address_ddl=!1,asl_configuration.time_switch=!1,asl_configuration.filter_ddl="",asl_configuration.load_all=1,(asl_configuration.search_type=="1"||asl_configuration.search_type=="2")&&(asl_configuration.scroll_field="",asl_configuration.sort_by="")),asl_configuration.distance_slider||(asl_configuration.radius_circle=!1),asl_configuration.on_select=!0,asl_configuration["default-addr"]&&(asl_configuration.prompt_location="0"),asl_configuration.search_type=="1"&&asl_configuration.template!="2"&&asl_configuration.search_2&&(asl_configuration.search_type="0"),asl_configuration.sort_random&&asl_configuration.user_center&&(asl_configuration.user_center=!1,console.log("Warning! Sort Random disable the default location marker")),(asl_configuration.search_type=="1"||asl_configuration.search_type=="2")&&(asl_configuration.user_center=!1,asl_configuration.distance_slider=!1),asl_configuration.first_load!="1"&&(asl_configuration.user_center=!1,asl_configuration.load_all="1"),asl_configuration.info_y_offset||(asl_configuration.info_y_offset=-150,asl_configuration.template=="2"&&(asl_configuration.info_y_offset=-150),asl_configuration.infobox_layout=="1"&&(asl_configuration.info_y_offset=-150)),asl_configuration.fixed_radius=asl_configuration.fixed_radius&&!isNaN(asl_configuration.fixed_radius)?parseInt(asl_configuration.fixed_radius):null,asl_configuration.is_mob=_isMobileDevice(),asl_configuration.is_ios=_isIOSDevice(),asl_configuration.is_mob&&(asl_configuration.mobile_zoom&&(asl_configuration.zoom=parseInt(asl_configuration.mobile_zoom)),asl_configuration.mobile_search_zoom&&(asl_configuration.search_zoom=parseInt(asl_configuration.mobile_search_zoom)),asl_configuration.mobile_click_zoom&&(asl_configuration.zoom_li=parseInt(asl_configuration.mobile_click_zoom)),asl_configuration.list_event="click",asl_configuration.mouseover=!1),asl_configuration.max_bound_zoom=asl_configuration.max_bound_zoom?parseInt(asl_configuration.max_bound_zoom):asl_configuration.search_zoom!="0"?asl_configuration.search_zoom:asl_configuration.zoom,asl_configuration.search_type=="3"&&(asl_configuration.search_type="0",asl_configuration.geocoding_only=!0),asl_configuration.full_height&&asl_configuration.is_mob,asl_configuration.is_mob&&asl_configuration.mobile_load_bound&&(asl_configuration.load_all="2",asl_configuration.search_type="0"),asl_configuration.search_type!="0"&&asl_configuration.search_type!="4"&&(console.log("Radius Circle Works with Google Search Only and Distance Control."),asl_configuration.radius_cir
14cle=!1),asl_configuration.additional_search&&(asl_configuration.search_type="2"),asl_configuration.is_mob&&asl_configuration.mobile_stores_limit&&(asl_configuration.stores_limit=asl_configuration.mobile_stores_limit&&!isNaN(asl_configuration.mobile_stores_limit)?parseInt(asl_configuration.mobile_stores_limit):null),asl_configuration.accordion?(asl_configuration.load_all="1",asl_configuration.address_ddl=asl_configuration.sort_by_bound=asl_configuration.filter_address=asl_configuration.advance_filter=!1):asl_configuration.mobile_stores_limit=asl_configuration.mobile_stores_limit?parseInt(asl_configuration.mobile_stores_limit):100,asl_configuration.advance_filter||(asl_configuration.filter_ddl=asl_configuration.address_ddl=asl_configuration.sort_by_bound=asl_configuration.filter_address=!1),asl_configuration.load_all!="1"&&(asl_configuration.cache=asl_configuration.radius_circle=!1,console.log("Radius Circle Works with load all only"));var asl_lat=asl_configuration.default_lat?parseFloat(asl_configuration.default_lat):39.9217698526,asl_lng=asl_configuration.default_lng?parseFloat(asl_configuration.default_lng):-75.5718432,categories={},asl_date=new Date;asl_configuration.default_lat=asl_lat,asl_configuration.default_lng=asl_lng,asl_configuration.show_opened=asl_configuration.show_opened===!0||asl_configuration.show_opened=="1",$("#asl-dist-unit").html(asl_configuration.distance_unit);var COUNT_FORMATS=[{letter:"",limit:1e3},{letter:"K",limit:1e6}];asl_engine.helper.query_parameter=function(n){const a=window.location.search;return new URLSearchParams(a).get(n)},asl_engine.helper.html_entites=function(n){var a=document.createElement("div");return a.innerHTML=n,a.innerText},asl_engine.helper.is_empty=function(n){if(n==null)return!0;if(typeof n!="object"||Array.isArray(n))return!1;for(let a in n)if(n[a]!==null&&n[a]!==void 0)return!1;return!0},asl_engine.helper.locations_count=function(n){var a=asl_configuration.words||{},d=n==1?a.location||"Location":a.locations||"Locations";return n+" "+d},asl_engine.helper.format_count=function(n){var a=1e6;return asl_configuration.distance_value_full?n.toLocaleString(void 0,{minimumFractionDigits:2,maximumFractionDigits:2}):n<a&&n>1e3?(n=1e3*n/a,n=Math.round(n*10)/10,n+"K"):n.toFixed(2)},asl_engine.helper.flattenCategories=function(n){const a={};function d(l,b){if(l.value=[l.id],l.len=0,b&&l.value.push(b.id),a[l.id]=l,l.children.length)for(const P of l.children)d(P,l)}for(const l in n){const b=n[l];d(b,null)}return a},asl_engine.helper.uniqe_merge=function(n,a){var d=new Set(n.concat(a));return Array.from(d)},asl_engine.helper.pluck=function(n,a){for(var d=new Set,l=0;l<a.length;l++)d.add(a[l][n]);var b=[];return d.forEach(function(P){b.push(P)}),b},asl_engine.helper.uniq=function(n,a,d){for(var l=[],b=[],P=0;P<n.length;P++)l[n[P][a]]||(b.push(d?{type:a,title:n[P][a]}:{type:a,title:n[P][a],value:normalize(n[P][a])}),l[n[P][a]]=1);return b},asl_engine.helper.analytics_search_items=function(n,a){for(var d=asl_engine.helper.uniq(n,a),l=0;l<d.length;l++){var b=d[l],P=n.filter(function(ct){return String(ct[a]||"")===String(b.title||"")}),Q=[],H=[],V=[],ut=0,wt=0,It=0;P.forEach(function(ct){ct.country_code&&Q.indexOf(ct.country_code)===-1&&Q.push(ct.country_code),ct.country&&H.indexOf(ct.country)===-1&&H.push(ct.country),ct.state&&V.indexOf(ct.state)===-1&&V.push(ct.state),!isNaN(parseFloat(ct.lat))&&!isNaN(parseFloat(ct.lng))&&(ut+=parseFloat(ct.lat),wt+=parseFloat(ct.lng),It++)});var mt=[b.title];(a==="city"||a==="postal_code")&&V.length===1&&mt.push(V[0]),a!=="country"&&H.length===1&&mt.push(H[0]),b.analytics_source="database",b.analytics_kind=a==="title"?"store_title":a,b.analytics_label=mt.filter(Boolean).join(", "),b.country_code=Q.length===1?Q[0]:"",b.latitude=It?ut/It:null,b.longitude=It?wt/It:null,b.analytics_key=["db",b.analytics_kind,normalize(b.title||""),normalize(V.length===1?V[0]:""),b.country_code].join(":")}return d},asl_engine.helper.merge=function(n,a){var d={},l;for(l=0;l<n.length;l++)d[n[l]]=!0;for(l=0;l<a.length;l++)d[a[l]]=!0;return Object.keys(d)},asl_engine.helper.asl_leadzero=function(n){return asl_configuration.no_leadzero||n>9?""+n:"0"+n},asl_engine.helper.asl_timeConvert=function(n){if(!n)return 0;var a=$.trim(n).toUpperCase();if(/(1[012]|[0-9]):[0-5][0-9]$/.test(a)){var d=Number(a.match(/^(\d+)/)[1]),l=Number(a.match(/:(\d+)/)[1]);return d+l/100}else if(/(1[012]|[1-9]):[0-5][0-9][ ]?(AM|PM)/.test(a)){var d=Number(a.match(/^(\d+)/)[1]),l=Number(a.match(/:(\d+)/)[1]),b=a.indexOf("PM")!=-1?"PM":"AM";return b=="PM"&&d<12&&(d=d+12),b=="AM"&&d==12&&(d=d-12),d+l/100}else return 0},asl_engine.helper.between=function(n,a,d){return n>a&&n<d},asl_engine.helper.implode=function(n,a){for(var d=[],l=0,b=n.length;l<b;l++)n[l]&&d.push(n[l]);return d.join(a)},asl_engine.helper.toObject_=function(n,a){for(var d={},l=0,b=a.length;l<b;l++)d[n[l]]=a[l];return d},asl_engine.helper.distanceCalc=function(n){var a=6371,d=this.getLocation(),l=asl_locator.toRad_(d.lat()),b=asl_locator.toRad_(d.lng()),P=asl_locator.toRad_(n.lat()),Q=asl_locator.toRad_(n.lng()),H=P-l,V=Q-b,ut=Math.sin(H/2)*Math.sin(H/2)+Math.cos(l)*Math.cos(P)*Math.sin(V/2)*Math.sin(V/2),wt=2*Math.atan2(Math.sqrt(ut),Math.sqrt(1-ut));return a*wt},asl_engine.helper.multi_sort=function(n,a,d){n.sort(function(l,b){var P=l[a],Q=b[a],H=l[d],V=b[d];return P==Q?H<V?-1:H>V?1:0:P<Q?-1:1})},asl_engine.helper.sortBy=function(n,a,d){var l=null;return d?asl_configuration.sort_order=="desc"?l=function(b,P){return b[a]&&P[a]?-b[a].localeCompare(P[a]):0}:l=function(b,P){return b[a]&&P[a]?b[a].localeCompare(P[a]):0}:asl_configuration.sort_order=="desc"?l=function(b,P){return parseInt(P[a])-parseInt(b[a])}:l=function(b,P){return parseInt(b[a])-parseInt(P[a])},n.sort(l)},asl_engine.dataSource=function(){this.stores_=[],this.parent_store=null,this.remote_url=ASL_REMOTE.ajax_url},asl_engine.dataSource.prototype.getCountriesStateCities=function(n){for(var a={},d=0;d<n.length;d++)a[n[d].props_.country]||(a[n[d].props_.country]={}),a[n[d].props_.country][n[d].props_.state]||(a[n[d].props_.country][n[d].props_.state]=[]),a[n[d].props_.country][n[d].props_.state].indexOf(n[d].props_.city)==-1&&a[n[d].props_.country][n[d].props_.state].push(n[d].props_.city);return a},asl_engine.dataSource.prototype.getStateCities=function(n){for(var a={},d=0;d<n.length;d++)a[n[d].props_.state]||(a[n[d].props_.state]=[]),a[n[d].props_.state].indexOf(n[d].props_.city)==-1&&a[n[d].props_.state].push(n[d].props_.city);return a},asl_engine.dataSource.prototype.generateHTMLCategories=function(){var n=asl_configuration.cat_sort=="name_"?"name":asl_configuration.cat_sort,a=Object.values(asl_categories);a=n=="ordr"?asl_engine.helper.sortBy(a,"ordr"):asl_engine.helper.sortBy(a,n,!0);var d=function(b){if(!b||!b.length)return[];var P=b.slice();return n=="ordr"?asl_engine.helper.sortBy(P,"ordr"):asl_engine.helper.sortBy(P,n,!0)},l=function(b,P){var Q="";if(!b||!b.length)return Q;for(var H=0;H<b.length;H++){var V=b[H];if(V){var ut=d(V.children||[]);if(!V.id){ut.length&&(Q+=l(ut,P));continue}var wt=!!V.len,It=ut.length>0;if(!(!wt&&!It)){var mt=V.id,ct="colision"+mt,Ct="sl-cat-"+mt;Q+='<li data-id="'+mt+'" class="item-state asl-state-li"> <button type="button" class="colisiond" data-target="#'+ct+'" aria-controls="'+ct+'" aria-expanded="false" data-parent="'+P+'" data-toggle="colision"><span>'+V.name+'</span></button> <div id="'+ct+'" class="colision" role="tabpanel"> <ul class="sl-acc-layout" id="'+Ct+'">',Q+=l(ut,"#"+Ct),Q+="</ul></div></li>"}}}return Q};return l(a,"#p-catlist")},asl_engine.dataSource.prototype.generateHTMLCountriesStates=function(n){var a="",d=Object.keys(n).sort();for(var l in d)if(d.hasOwnProperty(l)){var b=d[l],P=b.replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase();a+='<li data-id="'+P+'" class="item-state asl-country-li"> <button type="button" class="colisiond" data-target="#colision-'+l+'" aria-controls="colision-'+l+'" aria-expanded="false" data-parent="#p-countlist" data-toggle="colision"><span>'+b+'</span></button> <div id="colision-'+l+'" class="colision" role="tabpanel"> <ul id="p-statelist-'+l+'">';var Q=Object.keys(n[d[l]]).sort();for(var H in Q)if(Q.hasOwnProperty(H)){var V=Q[H],ut=V.replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase();a+='<li data-id="'+ut+'" class="item-state asl-state-li"> <button type="button" class="colisiond" data-target="#colision'+H+"-"+l+'" aria-controls="colision'+H+"-"+l+'" aria-expanded="false" data-parent="#p-statelist-'+l+'" data-toggle="colision"><span>'+V+'</span></button> <div id="colision'+H+"-"+l+'" class="colision" role="tabpanel"> <ul id="item-city-'+H+"-"+l+'">';var wt=n[d[l]][Q[H]].sort();for(var It in wt)if(wt.hasOwnProperty(It)){var mt=Q[H].replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase()+"-"+wt[It].replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase();a+='<li data-id="'+mt+'" class="item-state"><button type="button" class="colisiond" data-target="#colision'+l+"-"+H+"-"+It+'" aria-controls="colision'+l+"-"+H+"-"+It+'" aria-expanded="false" data-parent="#item-city-'+H+"-"+l+'" data-toggle="colision"><span>'+wt[It]+'</span></button> <div class="colision" id="colision'+l+"-"+H+"-"+It+'" role="tabpanel"><div id="city-list-'+mt+'"></div></div></li>'}a+="</ul></div></li>"}a+="</ul></div></li>"}return a},asl_engine.dataSource.prototype.generateHTMLStates=function(n){var a="",d=Object.keys(n).sort();for(var l in d)if(d.hasOwnProperty(l)){var b=d[l],P=b.replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase();a+='<li data-id="'+P+'" class="item-state"> <button type="button" class="colisiond" data-target="#colision'+l+'" aria-controls="colision'+l+'" aria-expanded="false" data-parent="#p-statelist" data-toggle="colision"><span>'+d[l]+'</span></button> <div id="colision'+l+'" class="colision" role="tabpanel"> <ul id="item-city-'+l+'">';var Q=n[d[l]].sort();for(var H in Q)if(Q.hasOwnProperty(H)){var V=d[l].replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase()+"-"+Q[H].replace(asl_configuration.regex,"").replace(/[ ]/ig,"-").toLowerCase();a+='<li data-id="'+V+'" class="item-state"><button type="button" class="colisiond" data-target="#colision'+l+"-"+H+'" aria-controls="colision'+l+"-"+H+'" aria-expanded="false" data-parent="#item-city-'+l+'" data-toggle="colision"><span>'+Q[H]+'</span></button> <div class="colision" id="colision'+l+"-"+H+'" role="tabpanel"><div id="city-list-'+V+'"></div></div></li>'}a+="</ul></div></li>"}return a},asl_engine.dataSource.prototype.sortDistance=function(n,a){a=a.sort(function(d,l){return d.distanceTo(n)-l.distanceTo(n)})},asl_engine.dataSource.prototype.sortRandom=function(n){n=n.sort(function(a,d){return Math.random()-.5})},asl_engine.dataSource.prototype.sortBy=function(n,a){var d=null;if(!(!a||!a.length)){var l=typeof a[0].props_[n]=="number";n=="cat"?d=function(b,P){var Q=b.props_.cat,H=P.props_.cat,V=b.props_.distance,ut=P.props_.distance;return Q==H?V<ut?-1:V>ut?1:0:Q>H?-1:1}:l?d=function(b,P){return b.props_[n]>P.props_[n]?1:P.props_[n]>b.props_[n]?-1:0}:asl_configuration.sort_order=="desc"?d=function(b,P){return b.props_[n].toLowerCase()<P.props_[n].toLowerCase()?1:P.props_[n].toLowerCase()<b.props_[n].toLowerCase()?-1:0}:d=function(b,P){return b.props_[n].toLowerCase()&&P.props_[n].toLowerCase()?b.props_[n].toLowerCase().localeCompare(P.props_[n].toLowerCase(),"is"):0},a.sort(d)}},asl_engine.dataSource.prototype.sortByDesc=function(n,a){a.sort(function(d,l){return d.props_[n]<l.props_[n]?1:l.props_[n]<d.props_[n]?-1:0})},asl_engine.dataSource.prototype.load_kml=function(n){if(!asl_locator.isMapLibre()){var a=asl_configuration.kml_files;for(var d in a)if(a.hasOwnProperty(d))var l=asl_configuration.URL+"kml/"+a[d],b=new google.maps.KmlLayer(l,{preserveViewport:!0,map:n})}};var not_initial_load=!1,asl_view=null,asl_panel=null;asl_engine.dataSource.prototype.fetch_remote_data=function(n,a,d){var l=this,b=$("#asl-storelocator");window.clearTimeout(l.remoteFetchTimer_),l.remoteFetchTimer_=null;var P=(l.fetchGeneration_||0)+1;l.fetchGeneration_=P,l.activeRequest_&&l.activeRequest_.readyState!==4&&l.activeRequest_.abort(),b.find(".asl-overlay").show(),!a&&asl_configuration.reload_params&&(a=asl_configuration.reload_params,asl_configuration.reload_params=null);var Q=!1,H={action:"asl_load_stores",nonce:ASL_REMOTE.nonce,asl_lang:asl_configuration.lang,load_all:asl_configuration.load_all,layout:asl_configuration.layout?1:0};if(a&&(H=Object.assign(H,a)),asl_configuration.stores&&(H.stores=asl_configuration.stores,Q=!0),asl_configuration.branches&&(H.branches="1"),asl_configuration.load_all!="1"){var V=map.getBounds(),ut=V.getNorthEast(),wt=V.getSouthWest
14(),It=V.getCenter();H.lat=It.lat(),H.lng=It.lng(),H.nw=[ut.lat(),wt.lng()],H.se=[wt.lat(),ut.lng()]}for(var mt=["category","exclude_categories","brand","special","state","city","postal_code","title","country"],ct=0;ct<mt.length;ct++){var Ct=mt[ct];asl_configuration[Ct]&&(H[Ct]=asl_configuration[Ct],Q=!0)}l.on_call=!0;var Dt=asl_configuration.cache=="1"&&!Q?asl_configuration.URL+"locator-data"+(asl_configuration.lang?"-"+asl_configuration.lang:"")+".json?v="+asl_configuration.cache_ver:ASL_REMOTE.ajax_url;l.activeRequest_=$.ajax({url:Dt,data:H,type:asl_configuration.stores?"POST":"GET",dataType:"json",success:function(zt){if(P===l.fetchGeneration_){delete asl_locator.Store.infoPanelCache_,asl_locator.Store.infoPanelCache_={},l.stores_=l.parseData(zt);var Gt=b.find("#auto-complete-search,#sl-main-search,.asl-search-address");if(asl_configuration.load_all=="2"&&b.find(".asl-reload-map").find("i").removeClass("animate-spin"),asl_configuration.search_type=="1"||asl_configuration.search_type=="2"){var oe=null,Wt=[];if(asl_configuration.search_type=="1"){oe="title";var t=asl_engine.helper.analytics_search_items(zt,"title");Wt=Wt.concat(t)}else if(asl_configuration.search_type=="2"){oe="address";var e=asl_engine.helper.analytics_search_items(zt,"city"),o=asl_engine.helper.analytics_search_items(zt,"state"),s=asl_engine.helper.analytics_search_items(zt,"country"),u=asl_engine.helper.analytics_search_items(zt,"postal_code");if(asl_configuration.search_title){var t=asl_engine.helper.analytics_search_items(zt,"title");Wt=Wt.concat(t)}if(asl_configuration.db_search_exclude_cities||(Wt=Wt.concat(e)),asl_configuration.db_search_exclude_states||(Wt=Wt.concat(o)),asl_configuration.db_search_exclude_postal||(Wt=Wt.concat(u)),asl_configuration.category_accordion)for(var p in asl_categories)asl_categories.hasOwnProperty(p)&&Wt.push({type:"category",id:asl_categories[p].id,title:asl_categories[p].name});else Wt=Wt.concat(s);if(asl_configuration.additional_search){var h=[];Wt=[];for(var p in zt)if(zt.hasOwnProperty(p)){var g=zt[p].description_2;g?(g=g.split("|").map(function(y){return y.trim()}).filter(function(y){return y.length}),h=asl_engine.helper.uniqe_merge(h,g),zt[p].description_2=g):zt[p].description_2=[]}for(var w=0;w<h.length;w++)Wt.push({type:"search_2",title:h[w]})}}asl_configuration["default-addr"]&&(l.ds_items=Wt),asl_search.add_prop_search(Wt,Gt,oe)}else not_initial_load||asl_locator.add_clear_button(Gt);if(asl_configuration.search_2){var C=asl_configuration.search_2=="1"?["title"]:asl_configuration.search_2.split(","),R=b.find(".asl-name-search .asl-search-name"),Wt=[];if(R[0]){for(var z in C){if(!C.hasOwnProperty(z))continue;let y=asl_engine.helper.uniq(zt,C[z],!0);Wt=Wt.concat(y)}asl_search.add_prop_search(Wt,R,"name",!0)}asl_configuration.search_2=C}asl_configuration.scroll_field&&(asl_configuration.scroll_field=asl_configuration.scroll_field?asl_configuration.scroll_field:"state",l.scroll_data=asl_engine.helper.uniq(zt,asl_configuration.scroll_field),l.scroll_data=asl_engine.helper.sortBy(l.scroll_data,"value",!0));var it=l.stores_,k=it[0]?it[0].props_.country:null;l.countries=!1;for(var at=0;at<it.length;at++)if(k!=it[at].props_.country){l.countries=!0;break}if((asl_configuration.accordion||asl_configuration.address_ddl)&&(l.stateCities=l.countries?l.getCountriesStateCities(it):l.getStateCities(it)),asl_configuration.state_restrict&&(l.all_states=asl_engine.helper.pluck("state",zt)),!not_initial_load){not_initial_load=!0,asl_view=new asl_locator.View(map,l,{geolocation:!1,container:b,features:l.getDSFeatures()}),asl_panel=new asl_locator.Panel(b.find("#asl-panel")[0],{view:asl_view,container:b}),window.asl_view=asl_view,asl_configuration.kml_files&&l.load_kml(map),b.find("#asl-desc-agile-modal").find(".sl-close").on("click",asl_panel.hideDescModal.bind(asl_panel)),b.find("#no-stores-modal").find(".sl-close").on("click",asl_panel.hideNoStoresModal.bind(asl_panel));var M=b.find("#asl-geolocation-agile-modal");if(M.find(".sl-close").on("click",asl_panel.hideGeoModal.bind(asl_panel)),asl_configuration.prompt_location=="3"?asl_view.geolocate_():asl_configuration.prompt_location=="4"?asl_view.geo_service():asl_configuration.prompt_location!="0"&&(M.css("display","block"),window.setTimeout(function(){M.addClass("in")},300),b.find("#asl-btn-geolocation").on("click",function(){asl_view.geolocate_(),M.removeClass("in").css("display","none")}),asl_panel.geo_modal=!0),asl_configuration.prompt_location=="2"){let m=function(v){asl_locator.hook_event({type:"before_search",data:v}),asl_view.measure_distance(v.geometry.location,!0,null,v),M.removeClass("in").css("display","none"),v.search_text=q.val(),asl_locator.hook_event({type:"search",data:v}),asl_view.add_search_text(v.search_text),asl_configuration.analytics&&asl_locator.save_analytics(v)},y=function(){var v=$.trim(q.val());if(v){var L={address:v};if(asl_configuration.country_restrict){var D=asl_configuration.country_restrict.toLowerCase();D=D.split(","),L.componentRestrictions={country:D[0]}}Y.geocode(L,bt)}};var Et=m,qt=y,q=b.find("#asl-current-loc"),W=null,Y=asl_locator.getSearchProvider(),bt=bt||function(v,L){L=="OK"?(W=v[0],m(W)):asl_panel.handleGeocodeFailure(L)};if(q.on("keyup",function(v){v.keyCode==13&&y()}),b.find("#asl-btn-locate").on("click",function(v){if(W){m(W);return}else y()}),asl_locator.resolveSearchProvider()!=="disabled"){var yt=asl_use_new_place_api(asl_configuration),Tt={};!yt&&asl_configuration.google_search_type&&(Tt.types=["("+asl_configuration.google_search_type+")"]);var Nt=yt?["location","formattedAddress"]:["geometry"];asl_configuration.filter_address&&Nt.push(yt?"addressComponents":"address_components"),new asl_locator.AddressAPI(q[0],{googleOptions:Tt,newGoogleOptions:{},countries:asl_get_country_restrictions(asl_configuration),fields:Nt,map:asl_view.getMap(),onSelect:function(v){W=v,W&&(W.search_text=q.val())}})}}b.find(".asl-geolocate-btn,.asl-geo-event").on("click",function(m){asl_view.geolocate_()}),asl_configuration.address_ddl&&asl_panel.address_dropdowns(l.stateCities,l.countries),asl_configuration.user_center&&asl_view.measure_distance(new ASLLatLng(
14asl_configuration.default_lat,asl_configuration.default_lng))}if(asl_configuration.load_all!="1"&&asl_view.dest_coords&&asl_view.measure_distance(asl_view.dest_coords,null,!0),asl_view.refreshView(),b.find(".asl-overlay").hide(),n&&map.panTo(n),l.on_call=!1,window.asl_loaded&&typeof window.asl_loaded=="function"&&asl_loaded.call(this),asl_configuration.load_all=="1"){var gt=window.location.hash.replace("#","");gt&&!isNaN(gt)&&window.setTimeout(function(){var m=asl_view.data_.findStore(gt);asl_view.highlight(m)},500)}asl_locator.hook_event({type:"load",data:null}),d&&typeof d=="function"&&d.call(this)}},error:function(zt,Gt){P===l.fetchGeneration_&&(l.on_call=!1,Gt!=="abort"&&b.find(".asl-overlay").hide())},dataType:"json"}),l.pos=It},asl_engine.dataSource.prototype.schedule_remote_fetch=function(n){var a=this;window.clearTimeout(this.remoteFetchTimer_),this.remoteFetchTimer_=window.setTimeout(function(){a.remoteFetchTimer_=null,a.fetch_remote_data(n)},200)},asl_engine.dataSource.prototype.load_locator=function(){var that=this;function mapControlEnabled(n,a){return n==null||n===""?a:n===!0||n===1||n==="1"||n==="true"}if(!document.getElementById("asl-map-canv"))return!1;var maps_params={center:new ASLLatLng(asl_lat,asl_lng),zoom:parseInt(asl_configuration.zoom),gestureHandling:asl_configuration.gesture_handling||"cooperative",mapTypeId:asl_configuration.map_type};if(asl_configuration.scroll_wheel!==null&&(maps_params.scrollwheel=asl_configuration.scroll_wheel),asl_configuration.advanced_marker&&(maps_params.mapId=asl_configuration.map_id||"asl-maps-id-tag"),maps_params.zoomControl=mapControlEnabled(asl_configuration.zoomcontrol,!0),maps_params.cameraControl=mapControlEnabled(asl_configuration.cameracontrol,!1),maps_params.mapTypeControl=mapControlEnabled(asl_configuration.maptypecontrol,!0),maps_params.fullscreenControl=mapControlEnabled(asl_configuration.fullscreencontrol,!0),maps_params.streetViewControl=mapControlEnabled(asl_configuration.streetviewcontrol,!0),maps_params.cameraControl&&(maps_params.zoomControl=!1),asl_configuration.scalecontrol=="false"&&(maps_params.scaleControl=!1),asl_configuration.rotatecontrol=="false"&&(maps_params.rotateControl=!1),maps_params.fullscreenControlOptions={position:ASLControlPosition.RIGHT_CENTER},asl_configuration.position_maptype&&(maps_params.mapTypeControlOptions={position:parseInt(asl_configuration.position_maptype)}),asl_configuration.position_fullscreen&&(maps_params.fullscreenControlOptions={position:parseInt(asl_configuration.position_fullscreen)}),asl_configuration.position_zoom&&(maps_params.zoomControlOptions={position:parseInt(asl_configuration.position_zoom)}),asl_configuration.position_streetview&&(maps_params.streetViewControlOptions={position:parseInt(asl_configuration.position_streetview)}),asl_configuration.maxzoom&&!isNaN(asl_configuration.maxzoom)&&(maps_params.maxZoom=parseInt(asl_configuration.maxzoom)),asl_configuration.minzoom&&!isNaN(asl_configuration.minzoom)&&(maps_params.minZoom=parseInt(asl_configuration.minzoom)),asl_locator.isMapLibre()){var provider_error=asl_locator.get_map_provider_error();if(provider_error)return asl_locator.show_map_error(provider_error),!1;try{map=new asl_locator.MapLibreMap(document.getElementById("asl-map-canv"),maps_params)}catch(n){return asl_locator.show_map_error(n&&n.message?n.message:"The selected map provider could not be loaded."),!1}}else map=new google.maps.Map(document.getElementById("asl-map-canv"),maps_params);if(window.asl_map=map,asl_configuration.reset_button=!0,asl_configuration.reset_button){let n=function(a,d){$reset_btn=$('<span class="asl-reset-map" style="display:none">'+asl_configuration.words.reset_map+"</span>"),a.appendChild($reset_btn[0]),$reset_btn[0].addEventListener("click",function(){asl_view.reset_all(),$reset_btn[0].style.display="none"})};var ASLResetMAP=n,$reset_btn=null,centerControlDiv=document.createElement("div"),centerControl=new n(centerControlDiv,map
14);centerControlDiv.index=1,map.controls[ASLControlPosition.TOP_RIGHT].push(centerControlDiv)}if(!asl_locator.isMapLibre()&&!asl_configuration.advanced_marker&&asl_configuration.map_layout){var map_style=eval("("+asl_configuration.map_layout+")");map.set("styles",map_style)}window._asl_map_customize&&(_asl_map_customize=JSON.parse(_asl_map_customize),asl_configuration.advanced_marker&&(_asl_map_customize.marker_animations=!1),!asl_locator.isMapLibre()&&_asl_map_customize.trafic_layer&&_asl_map_customize.trafic_layer==1&&(trafic_layer=new google.maps.TrafficLayer,trafic_layer.setMap(map)),!asl_locator.isMapLibre()&&_asl_map_customize.bike_layer&&_asl_map_customize.bike_layer==1&&(bike_layer=new google.maps.BicyclingLayer,bike_layer.setMap(map)),!asl_locator.isMapLibre()&&_asl_map_customize.transit_layer&&_asl_map_customize.transit_layer==1&&(transit_layer=new google.maps.TransitLayer,transit_layer.setMap(map)),!asl_locator.isMapLibre()&&_asl_map_customize.drawing&&asl_drawing.loadData(_asl_map_customize.drawing,map));var _features=[];for(var i in asl_categories){var cat=asl_categories[i];cat.id&&cat.name&&that.FEATURES_.add(new asl_locator.Feature(cat.id,cat.name,cat.icon,cat.ordr&&!isNaN(cat.ordr)?parseInt(cat.ordr):0))}if(asl_configuration.load_all=="1")that.fetch_remote_data();else if(asl_configuration.load_all=="2"){let n=function(l,b){$reload_btn=$('<span class="asl-reload-map" display="none"><i class="icon-arrows-cw"></i>'+asl_configuration.words.reload_map+"</span>"),l.appendChild($reload_btn[0]),$reload_btn[0].addEventListener("click",function(){$reload_btn.find("i").addClass("animate-spin"),that.fetch_remote_data(_set_position)})};var ASLReloadMAP=n,$reload_btn=null,_set_position=null,first_loaded=!1,centerControlDiv=document.createElement("div"),centerControl=new n(centerControlDiv,map
14);centerControlDiv.index=1,map.controls[ASLControlPosition.TOP_CENTER].push(centerControlDiv),ASLEvent.addListener(map,"idle",function(){asl_view&&asl_view.halt_fetch&&(_set_position=asl_view.marker_center,asl_view.halt_fetch=!1),$reload_btn[0].style.display="block",first_loaded||(first_loaded=!0,that.fetch_remote_data())})}else ASLEvent.addListener(map,"idle",function(){var n=null;if(asl_view&&asl_view.halt_fetch){n=asl_view.marker_center,asl_view.halt_fetch=!1;return}that.schedule_remote_fetch(n)})},asl_engine.dataSource.prototype.FEATURES_=new asl_locator.FeatureSet,asl_engine.dataSource.prototype.getDSFeatures=function(){return this.FEATURES_},asl_engine.dataSource.prototype.filterBranches=function(n,a,d){for(var l=[],b=0,P;P=n[b];b++)a.indexOf(P.id_)!=-1&&(n[b].props_.branch=!0,n[b].parent_store=d,l.push(n[b]));return l},asl_engine.dataSource.prototype.addChildrenFeatures=function(){for(var n in asl_categories)if(asl_categories.hasOwnProperty(n)&&asl_categories[n].children.length)for(var a=0;a<asl_categories[n].children.length;a++){var d=asl_categories[n].children[a];this.FEATURES_.add(new asl_locator.Feature(d.id,d.name,d.icon,d.ordr&&!isNaN(d.ordr)?parseInt(d.ordr):0))}},asl_engine.dataSource.prototype.parseData=function(n){var a=[],d=asl_date.getHours()+asl_date.getMinutes()/100,V=asl_date.getDay(),l=asl_categories;asl_categories={};var b=Object.keys(l);for(var P in b)typeof l[b[P]]=="object"&&(asl_categories[String(b[P])]=l[b[P]],[b[P]].len=0);var Q={1:"mon",2:"tue",3:"wed",4:"thu",5:"fri",6:"sat",0:"sun"},H=["mon","tue","wed","thu","fri","sat","sun"],V=Q[V],ut=new Date,wt={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6},It=asl_configuration.week_hours=="2";function mt(){this.start=null,this.end=null,this.hours=[]}function ct(S,F){if(asl_configuration.time_24){var J=Math.floor(F)%24,K=getDecimal(F);return asl_engine.helper.asl_leadzero(J)+":"+asl_engine.helper.asl_leadzero(K)}return String(S).replace("AM",asl_configuration.words.am).replace("PM",asl_configuration.words.pm)}function Ct(S,F){if(S.status_available=!1,S.status_time="",!!F){for(var J=typeof F=="string"?JSON.parse(F):F,K=[],Lt=new Date(ut.getFullYear(),ut.getMonth(),ut.getDate()),St=-1;St<=7;St++){var st=new Date(Lt.getTime());st.setDate(Lt.getDate()+St);var vt=Q[String(st.getDay())],lt=J[vt];if(!(lt=="0"||!lt)){if(lt=="1"){var Pt=new Date(st.getTime());Pt.setDate(Pt.getDate()+1),K.push({start:st,end:Pt,startLabel:ct("12:00 AM",0),endLabel:""});continue}for(var X in lt)if(lt.hasOwnProperty(X)){var et=lt[X].split(" - "),xt=et[0],dt=et[1],ht=xt!=0?asl_engine.helper.asl_timeConvert(xt):0,O=dt!=0?asl_engine.helper.asl_timeConvert(dt):24,ot=new Date(st.getTime()),nt=new Date(st.getTime());O==0&&(O=24),ot.setHours(Math.floor(ht),getDecimal(ht),0,0),nt.setHours(Math.floor(O)%24,getDecimal(O),0,0),(O==24||O<=ht)&&nt.setDate(nt.getDate()+1),K.push({start:ot,end:nt,startLabel:ct(xt,ht),endLabel:ct(dt,O)})}}}if(K.sort(function(Vt,Ht){return Vt.start-Ht.start}),!!K.length){var Ft=K.find(function(Vt){return ut>=Vt.start&&ut<Vt.end});if(Ft){S.open=!0,S.status_available=!0,S.status_time=Ft.endLabel;return}var At=K.find(function(Vt){return Vt.start>ut});S.open=!1,S.status_available=!0,S.status_time=At?At.startLabel:""}}}function Dt(S){if(S.open_hours){S.open=!1,S.days=[],S.open_hours=JSON.parse(S.open_hours);var F=asl_configuration.days,J=It?{}:[],K=function(kt){var Ot=S.open_hours[kt+"_label"];return typeof Ot!="string"||(Ot=$.trim(Ot),!Ot)?"":'<span class="asl-day-note">'+asl_engine.helper.html_entites(Ot)+"</span>"};for(var Lt in H){var St=H[Lt],st=S.open_hours[St],vt=St==V,lt=K(St);if(st=="1")vt&&(S.open=!0),S.days.push(F[St]),It||J.push('<span class="asl-lbl-day-hr"><span class="asl-day-lbl">'+F[St]+':</span><span class="asl-time-hrs">'+asl_configuration.words.opened+lt+"</span></span>");else if(st=="0")vt&&(S.open=!1),asl_configuration.closed_label?It?(J[St]=[asl_configuration.words.closed],lt&&J[St].push(lt)):J.push('<span class="asl-lbl-day-hr"><span class="asl-day-lbl">'+F[St]+':</span><span class="asl-time-hrs">'+asl_configuration.words.closed+"</span>"+lt+"</span>"):lt&&(It?J[St]=[lt]:J.push('<span class="asl-lbl-day-hr"><span class="asl-day-lbl">'+F[St]+':</span><span class="asl-time-hrs">
14'+lt+"</span></span>"));else if(st){S.days.push(F[St]);var Pt=[];for(var X in st)if(st.hasOwnProperty(X)){var et=st[X].split(" - "),xt=et[0],dt=et[1],ht=xt!=0?asl_engine.helper.asl_timeConvert(xt):0,O=dt!=0?asl_engine.helper.asl_timeConvert(dt):24;if(O==0&&(O=24),!S.open)if(ht<O)!S.open&&vt&&(S.open=ht&&O?asl_engine.helper.between(d,ht,O):!1);else{var ot=24-ht+O,nt=new Date;nt.setHours(Math.floor(ht)),nt.setMinutes(getDecimal(ht)),ut.getDay()!=wt[St]&&nt.subDays(1);var Ft=new Date(nt.getTime());Ft.addHours(ot),Ft.setMinutes(getDecimal(O)),ut>nt&&ut<Ft&&(S.open=!0)}if(asl_configuration.time_24){ht+=.01,ht=parseFloat(ht).toFixed(2);var At=String(ht).split(".");At[0]=asl_engine.helper.asl_leadzero(parseInt(At[0])),At[1]=asl_engine.helper.asl_leadzero(parseInt(At[1])-1),xt=At.join(":"),O+=.01,O=parseFloat(O).toFixed(2);var Vt=String(O).split(".");Vt[0]=asl_engine.helper.asl_leadzero(parseInt(Vt[0])),Vt[1]=asl_engine.helper.asl_leadzero(parseInt(Vt[1])-1),dt=Vt.join(":")}else{var Ht=xt.split(":"),Zt=dt.split(":");Ht[0]&&(Ht[0]=asl_engine.helper.asl_leadzero(parseInt(Ht[0]))),xt=Ht.join(":"),Zt[0]&&(Zt[0]=asl_engine.helper.asl_leadzero(parseInt(Zt[0]))),dt=Zt.join(":"),xt=xt.replace("AM",asl_configuration.words.am).replace("PM",asl_configuration.words.pm),dt=dt.replace("AM",asl_configuration.words.am).replace("PM",asl_configuration.words.pm)}Pt.push(xt+" - "+dt)}lt&&Pt.push(lt),It?J[St]=Pt:J.push('<span><span class="asl-day-lbl">'+F[St]+':</span><span class="asl-time-hrs">'+Pt.map(function(kt){return"<span>"+kt+"</span>"}).join("")+"</span></span>")}else lt&&(It?J[St]=[lt]:J.push('<span><span class="asl-day-lbl">'+F[St]+':</span><span class="asl-time-hrs">'+lt+"</span></span>"))}if(It){for(var T=[],I=null,j=!1,ft=0;ft<H.length;ft++)!I||j||JSON.stringify(I.hours)!=JSON.stringify(J[H[ft]])?J[H[ft]]?(I=new mt,I.start=H[ft],I.hours=J[H[ft]],T.push(I),j=!1):j=!0:I.end=H[ft];if(T.length>0){var rt="";T.forEach(function(kt){rt+='<span class="asl-group-slots"><span class="asl-day-lbl">'+F[kt.start]+(kt.end?" - "+F[kt.end]:"")+':</span><span class="asl-time-hrs">'+kt.hours.map(function(Ot){return"<span>"+Ot+"</span>"}).join("")+"</span></span>"})}S.open_hours=rt}else S.open_hours=J.length>0?'<span class="asl-week-hrs">'+J.join("")+"</span>":null;S.days=S.days.join(", ")}else S.open=!0}function zt(S){if(S.open_hours){S.open=!1,S.open_hours=JSON.parse(S.open_hours);var F=S.open_hours[V],J=S.open_hours[V+"_label"],K="";if(typeof J=="string"&&(J=$.trim(J),J&&(K='<span class="asl-day-note">'+asl_engine.helper.html_entites(J)+"</span>")),S.open_hours=null,F=="1")S.open=!0,S.open_hours=K||null;else if(F=="0")S.open=!1,S.open_hours=K||null;else if(F){S.open_hours=[];for(var Lt in F)if(F.hasOwnProperty(Lt)){var St=F[Lt].split(" - "),st=St[0],vt=St[1],lt=st!=0?asl_engine.helper.asl_timeConvert(st):0,Pt=vt!=0?asl_engine.helper.asl_timeConvert(vt):24;if(Pt==0&&(Pt=24),!S.open)if(lt<Pt)S.open||(S.open=lt&&Pt?asl_engine.helper.between(d,lt,Pt):!1);else{var X=24-lt+Pt,et=new Date;et.setHours(Math.floor(lt)),et.setMinutes(getDecimal(lt)),ut.getDay()!=wt[V]&&et.subDays(1);var xt=new Date(et.getTime());xt.addHours(X),xt.setMinutes(getDecimal(Pt)),ut>et&&ut<xt&&(S.open=!0)}if(asl_configuration.time_24){lt+=.01,lt=parseFloat(lt).toFixed(2);var dt=String(lt).split(".");dt[0]=asl_engine.helper.asl_leadzero(parseInt(dt[0])),dt[1]=asl_engine.helper.asl_leadzero(parseInt(dt[1])-1),st=dt.join(":"),Pt+=.01,Pt=parseFloat(Pt).toFixed(2);var ht=String(Pt).split(".");ht[0]=asl_engine.helper.asl_leadzero(parseInt(ht[0])),ht[1]=asl_engine.helper.asl_leadzero(parseInt(ht[1])-1),vt=ht.join(":")}else{var O=st.split(":"),ot=vt.split(":");O[0]&&(O[0]=asl_engine.helper.asl_leadzero(parseInt(O[0]))),st=O.join(":"),ot[0]&&(ot[0]=asl_engine.helper.asl_leadzero(parseInt(ot[0]))),vt=ot.join(":"),st=st.replace("AM",asl_configuration.words.am).replace("PM",asl_configuration.words.pm),vt=vt.replace("AM",asl_configuration.words.am).replace("PM",asl_configuration.words.pm)}S.open_hours.push(st+" - "+vt)}K&&S.open_hours.push(K),S.open_hours=S.open_hours.length>0?S.open_hours.join(" <br> "):null}else K&&(S.open_hours=K)}else S.open=!0}var Gt=asl_configuration.show_categories||asl_configuration.category_accordion,oe=asl_configuration.query_redirect_url?String(asl_configuration.query_redirect_url).trim():"",Wt=function(S){if(!S)return"";var F=String(S).toLowerCase().trim();return F.normalize&&(F=F.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),F=F.replace(/&/g," and "),F=F.replace(/[^a-z0-9]+/g,"-"),F=F.replace(/^-+|-+$/g,""),F},t=function(S,F){if(!S||!F)return"";var J=S.split("#")[0].split("?")[0],K=Wt(F);return K?(J.slice(-1)!=="/"&&(J+="/"),J+K+"/"):""},e=asl_configuration.slug_link=="1",o=asl_configuration.rewrite_slug+"/",s=!!(asl_configuration.link_type=="1"&&asl_configuration.rewrite_slug),u=asl_configuration.additional_info!="0",p=asl_configuration.additional_info=="2",h=asl_configuration.template=="1",g=Object.keys(asl_attributes)||null,w=asl_configuration.sort_by=="cat",C=w||asl_configuration.template=="0",R=!1;C&&(R=Object.values(asl_categories).some(function(S){return parseInt(S.ordr)>0}));var z=asl_configuration.has_child_categories?asl_engine.helper.flattenCategories(asl_categories):asl_categories;(asl_configuration.image_filter||asl_configuration.category_marker)&&(this.flat_categories=z);for(var it=0;
14it<n.length;it++){var k=n[it];if(k.id=parseInt(k.id),k.ordr=!k.ordr||isNaN(k.ordr)?0:parseInt(k.ordr),k.lat=parseFloat(k.lat),k.lng=parseFloat(k.lng),k.logo_id=k.logo_id&&!isNaN(k.logo_id)?parseInt(k.logo_id):k.logo_id,!Number.isFinite(k.lat)||!Number.isFinite(k.lng)||k.lat<-90||k.lat>90||k.lng<-180||k.lng>180){asl_configuration.debug=="1"&&window.console&&console.warn("ASL skipped a store with invalid coordinates.",{id:k.id,lat:k.lat,lng:k.lng});continue}var at=new ASLLatLng(k.lat,k.lng);k.open_hours=k.open_hours?k.open_hours:null,k.state||(k.state="");var M=asl_engine.helper.implode([k.city,k.state,k.postal_code],", "),q=[k.street,M];h&&q.shift(),k.address=asl_engine.helper.implode(q," <br>");var W=k.categories?k.categories.split(","):[],Y=[];if(Gt){var bt=[],yt=[],Tt=[];for(var Nt in W){var gt=W[Nt].toString();z[gt]?(z[gt].len++,Y.push(z[gt]),bt.push(z[gt].name),yt.push(z[gt].id),Tt.push(z[gt].id),asl_configuration.has_child_categories&&(z[gt].children.length?Tt=asl_engine.helper.uniqe_merge(Tt,asl_engine.helper.pluck("id",z[gt].children)):Tt=asl_engine.helper.uniqe_merge(Tt,z[gt].value))):delete W[Nt]}if(asl_configuration.has_child_categories&&(W=Tt),C){var Et=Y.slice();Et.length>1&&R&&Et.sort(function(S,F){return parseInt(F.ordr)-parseInt(S.ordr)}),R?k.cat=Et[0]?parseInt(Et[0].ordr):-1:k.cat=Et[0]?Et[0].name:"z"}k.c_ids=yt,k.c_names=asl_engine.helper.implode(bt,", ");var qt=asl_configuration.filter_sort||"ordr";Y.sort(function(S,F){return qt=="ordr"?(parseInt(S.ordr,10)||0)-(parseInt(F.ordr,10)||0):String(S[qt]||"").localeCompare(String(F[qt]||""))}),k.categories=Y,k.display_categories=Y.filter(function(S){return S&&String(S.name||"").trim()!==""})}if(g)for(var m in g){var y=g[m],v=k[y]?k[y].split(","):[];k[y]=v;var L=[];for(var D in v)v.hasOwnProperty(D)&&asl_attributes[y][v[D]]&&L.push(asl_attributes[y][v[D]].name);L.length&&(k["str_"+y]=L.join(", "))}k.city=k.city?String(k.city).trim():"",k.country=k.country?String(k.country).trim():"",k.state||(k.state=""),k.marker_id=k.marker_id?k.marker_id.toString():"";var U=k.open_hours;k.show_store_status=asl_configuration.week_hours=="0",asl_configuration.hide_hours?k.days_str=k.open_hours=null:(asl_configuration.week_hours=="0"?zt(k):Dt(k),["0","2"].indexOf(String(asl_configuration.template))!==-1&&Ct(k,U)),asl_configuration.hide_logo&&(k.path=null),u?k.desc_link=p:k.description=null,e&&(k.link=s?o+k.slug+"/":k.website),k.action_button_display=asl_configuration.template=="0"&&["text","both"].indexOf(asl_configuration.action_button_display)!==-1?asl_configuration.action_button_display:"icons",oe&&(k.city_url=t(oe,k.city),k.state_url=t(oe,k.state));var G=new asl_locator.Store(k.id,at,W,k);a.push(G)}if(asl_configuration.branches){for(var N=0;N<a.length;N++)if(a[N].props_.childs){var B=a[N].props_.childs.split(",");a[N].props_.childs=this.filterBranches(a,B.map(Number),a[N]),a[N].props_.have_childs=!0}}return a};var data_source=new asl_engine.dataSource;data_source.getClosestBranch=function(n){for(var a=n,d=n.props_.distance,l=0;l<n.props_.childs.length;l++)n.props_.childs[l].props_.distance<d&&(d=n.props_.childs[l].props_.distance,a=n.props_.childs[l]);return[d,a]},data_source.getStores=function(n,a,d){for(var l=this,b=[],P=asl_configuration.and_filter?"hasAllCategory":"hasAnyCategory",Q=l.parent_store?l.parent_store.props_.childs.concat(l.parent_store):this.stores_,H=0,V;V=Q[H];H++)V[P](a)&&b.push(V);d(b)},data_source.setBranchList=function(n){if(!n){this.parent_store&&(this.parent_store.props_.branch=null,this.parent_store.props_.have_childs=!0,this.parent_store.content_=null,asl_locator.Store.infoPanelCache_[this.parent_store.id_]=null),this.parent_store=null;return}this.parent_store=n,this.parent_store.props_.branch=!0,this.parent_store.props_.have_childs=void 0,this.parent_store.content_=null,asl_locator.Store.infoPanelCache_[this.parent_store.id_]=null},data_source.getActiveStoreList=function(){return this.parent_store?this.parent_store.props_.childs:this.stores_},data_source.findStore=function(n){n=parseInt(n);for(var a=0,d;d=this.stores_[a];a++)if(d.id_==n)return d;return null},data_source.allStores=function(){return this.stores_};function getSafariVersion(){const n=navigator.userAgent,a=n.match(/Version\/(\d+\.\d+)/);return!!n.match(/Safari/)&&!n.match(/Chrome/)&&a?parseFloat(a[1]):null}const safariVersion=getSafariVersion();safariVersion&&safariVersion<15.4&&console.warn(`Warning! Older version of Safari detected (Version: ${safariVersion}).`),!asl_locator.isMapLibre()&&asl_configuration.advanced_marker?google.maps.importLibrary("marker").then(function(){data_source.load_locator()}):data_source.load_locator()})(jQuery)}jQuery(function(){asl_store_locator()});
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.