1/*! For license information please see 179.bundle.js.LICENSE.txt */ 2"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[179],{89179(e,t,n){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function r(){var e,t,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function c(n,o,r,i){var c=o&&o.prototype instanceof s?o:s,u=Object.create(c.prototype);return a(u,"_invoke",function(n,o,r){var a,i,c,s=0,u=r||[],p=!1,d={p:0,n:0,v:e,a:f,f:f.bind(e,4),d:function(t,n){return a=t,i=0,c=e,d.n=n,l}};function f(n,o){for(i=n,c=o,t=0;!p&&s&&!r&&t<u.length;t++){var r,a=u[t],f=d.p,m=a[2];n>3?(r=m===o)&&(c=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=e):a[0]<=f&&((r=n<2&&f<a[1])?(i=0,d.v=o,d.n=a[1]):f<m&&(r=n<3||a[0]>o||o>m)&&(a[4]=n,a[5]=o,d.n=m,i=0))}if(r||n>1)return l;throw p=!0,o}return function(r,u,m){if(s>1)throw TypeError("Generator is already running");for(p&&1===u&&f(u,m),i=u,c=m;(t=i<2?e:c)||!p;){a||(i?i<3?(i>1&&(d.n=-1),f(i,c)):d.n=c:d.v=c);try{if(s=2,a){if(i||(r="next"),t=a[r]){if(!(t=t.call(a,c)))throw TypeError("iterator result is not an object");if(!t.done)return t;c=t.value,i<2&&(i=0)}else 1===i&&(t=a.return)&&t.call(a),i<2&&(c=TypeError("The iterator does not provide a '"+r+"' method"),i=1);a=e}else if((t=(p=d.n<0)?c:n.call(o,d))!==l)break}catch(t){a=e,i=1,c=t}finally{s=1}}return{value:t,done:p}}}(n,r,i),!0),u}var l={};function s(){}function u(){}function p(){}t=Object.getPrototypeOf;var d=[][o]?t(t([][o]())):(a(t={},o,function(){return this}),t),f=p.prototype=s.prototype=Object.create(d);function m(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,a(e,i,"GeneratorFunction")),e.prototype=Object.create(f),e}return u.prototype=p,a(f,"constructor",p),a(p,"constructor",u),u.displayName="GeneratorFunction",a(p,i,"GeneratorFunction"),a(f),a(f,i,"Generator"),a(f,o,function(){return this}),a(f,"toString",function(){return"[object Generator]"}),(r=function(){return{w:c,m}})()}function a(e,t,n,o){var r=Object.defineProperty;try{r({},"",{})}catch(e){r=0}a=function(e,t,n,o){function i(t,n){a(e,t,function(e){return this._invoke(t,n,e)})}t?r?r(e,t,{value:n,enumerable:!o,configurable:!o,writable:!o}):e[t]=n:(i("next",0),i("throw",1),i("return",2))},a(e,t,n,o)}function i(e,t,n,o,r,a,i){try{var c=e[a](i),l=c.value}catch(e){return void n(e)}c.done?t(l):Promise.resolve(l).then(o,r)}function c(e){return function(){var t=this,n=arguments;return new Promise(function(o,r){var a=e.apply(t,n);function c(e){i(a,o,r,c,l,"next",e)}function l(e){i(a,o,r,c,l,"throw",e)}c(void 0)})}}function l(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,s(o.key),o)}}function s(e){var t=function(e,t){if("object"!=o(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==o(t)?t:t+""}n.d(t,{default:()=>p});var u=function(){return e=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$el=t,this.lang,document.querySelector("html").lang?this.lang=document.querySelector("html").lang:this.lang="en",this.fetchData().then(function(e){console.log("LocationHomepage - Map configuration:",e.map_provider,e.freshpaint_environment_id),"freshpaint"===e.map_provider?(console.log("LocationHomepage - Using Freshpaint Maps (MapLibre GL)"),n.initMapLibre(e)):(console.log("LocationHomepage - Using Google Maps"),setTimeout(function(){window.initMap=n.initMap;var t=document.createElement("script");t.type="text/javascript",t.src="https://maps.googleapis.com/maps/api/js?callback=initMap&key=".concat(e.google_maps_key,"&libraries=places&language=")+n.lang,document.getElementsByTagName("head")[0].appendChild(t)}))})},t=[{key:"initMapLibre",value:(u=c(r().m(function e(t){return r().w(function(e){for(;;)switch(e.n){case 0:if(window.maplibregl){e.n=1;break}return e.n=1,this.loadMapLibreGL();case 1:this.setupFreshpaintAutocomplete(t),this.initMap();case 2:return e.a(2)}},e,this)})),function(e){return u.apply(this,arguments)})},{key:"loadMapLibreGL",value:(s=c(r().m(function e(){return r().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,t){if(window.maplibregl)e();else{console.log("Loading MapLibre GL for LocationHomepage...");var n=document.createElement("link");
2n.href="https://freshpaint-hipaa-maps.com/[email protected]/dist/maplibre-gl.css",n.rel="stylesheet",n.type="text/css",document.head.appendChild(n);var o=document.createElement("script");o.src="https://freshpaint-hipaa-maps.com/[email protected]/dist/maplibre-gl.js",o.type="text/javascript",o.onload=function(){console.log("MapLibre GL loaded successfully for LocationHomepage"),e()},o.onerror=function(e){console.error("Failed to load MapLibre GL for LocationHomepage:",e),t(new Error("Failed to load MapLibre GL"))},document.head.appendChild(o)}}))},e)})),function(){return s.apply(this,arguments)})},{key:"setupFreshpaintAutocomplete",value:function(e){var t=this,n=document.querySelector(".location-finder input");if(n){var o=null,r=document.createElement("div");r.className="freshpaint-autocomplete-dropdown",r.style.cssText="\n position: absolute;\n top: 100%;\n left: 0;\n right: 0;\n background: white;\n border: 1px solid #ccc;\n border-top: none;\n max-height: 200px;\n overflow-y: auto;\n z-index: 1000;\n display: none;\n box-shadow: 0 2px 4px rgba(0,0,0,0.1);\n ",n.style.position="relative",n.parentNode.appendChild(r),n.addEventListener("input",function(a){var i=a.target.value.trim();o&&clearTimeout(o),i.length<2?r.style.display="none":o=setTimeout(function(){t.fetchAutocompleteSuggestions(i,r,n,e)},300)}),document.addEventListener("click",function(e){n.contains(e.target)||r.contains(e.target)||(r.style.display="none")}),n.addEventListener("focus",function(){r.children.length>0&&(r.style.display="block")})}}},{key:"fetchAutocompleteSuggestions",value:(i=c(r().m(function e(t,n,o,a){var i,c,l,s;return r().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,i=a.freshpaint_environment_id||"cd45437f-0c6f-4da8-870c-575e8876fad1",e.n=1,fetch("https://freshpaint-hipaa-maps.com/v2/autocomplete?token=".concat(i),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({QueryText:t,MaxResults:5,Filter:{IncludeCountries:["US"]},Language:"en"})});case 1:if((c=e.v).ok){e.n=2;break}throw new Error("HTTP error! status: ".concat(c.status));case 2:return e.n=3,c.json();case 3:l=e.v,this.displayAutocompleteResults(l.ResultItems||[],n,o),e.n=5;break;case 4:e.p=4,s=e.v,console.error("Autocomplete error:",s),n.style.display="none";case 5:return e.a(2)}},e,this,[[0,4]])})),function(e,t,n,o){return i.apply(this,arguments)})},{key:"displayAutocompleteResults",value:function(e,t,n){t.innerHTML="",0!==e.length?(e.forEach(function(e,o){var r,a,i=document.createElement("div");i.className="autocomplete-item",i.style.cssText="\n padding: 10px;\n cursor: pointer;\n border-bottom: 1px solid #eee;\n font-size: 14px;\n ";var c=document.createElement("div");c.textContent=e.Title||(null===(r=e.Address)||void 0===r?void 0:r.Label)||"Unknown location",c.style.fontWeight="500";var l=document.createElement("div");l.textContent=(null===(a=e.Address)||void 0===a?void 0:a.Label)||"",l.style.color="#666",l.style.fontSize="12px",i.appendChild(c),l.textContent&&i.appendChild(l),i.addEventListener("mouseenter",function(){i.style.backgroundColor="#f5f5f5"}),i.addEventListener("mouseleave",function(){i.style.backgroundColor="white"}),i.addEventListener("click",function(){var o,r=(null===(o=e.Address)||void 0===o?void 0:o.Label)||e.Title;n.value=r,n.selectedResult=e,t.style.display="none",setTimeout(function(){document.querySelector(".location-finder .button").click()},100)}),t.appendChild(i)}),t.style.display="block"):t.style.display="none"}},{key:"loadGoogleMapsAPI",value:(a=c(r().m(function e(t){return r().w(function(e){for(;;)if(0===e.n)return e.a(2,new Promise(function(e,n){if(window.google&&window.google.maps)e();else{var o=document.createElement("script");o.src="https://maps.googleapis.com/maps/api/js?key=".concat(t,"&libraries=places"),o.onload=function(){return e()},o.onerror=function(){return n(new Error("Failed to load Google Maps API"))},document.head.appendChild(o)}}))},e)})),function(e){return a.apply(this,arguments)})},{key:"initMap",value:function(){var e=window.google,t=document.querySelector(".location-finder"),n=t.querySelector("input"),o=document.querySelector(".location-homepage .error");new e.maps.places.Autocomplete(n,{componentRestrictions:{country:"us"}}),t.addEventListener("submit",function(t){return t.preventDefault(),""===n.value?location.href="../urgent-care-locations":(new e.maps.Geocoder).geocode({address:n.value},function(t,r){if(r==e.maps.GeocoderStatus.OK){var a=new URL(window.location.origin+"/urgent-care-locations");a.searchParams.set("location","".concat(t[0].formatted_address)),window.history.pushState({},"",a),location.href="../urgent-care-locations?location=".concat(t[0].formatted_address)}else"ZERO_RESULTS"===r?document.querySelector(".pac-item")?(n.classList.add("error"),o.style.display="block"):(console.log("Geocode was not successful for the following reason: "+r),n.classList.add("error"),o.style.display="block"):"INVALID_REQUEST"===r?location.href="../urgent-care-locations":(console.log("Geocode was not successful for the following reason: "+r),n.classList.add("error"),o.style.display="block")}),!1})}},{key:"fetchData",value:(o=c(r().m(function e(){var t,n,o,a;return r().w(function(e){for(;;)switch(e.n){case 0:return e.p=0,t=location.href.includes("localhost")?"https://citymddev.prod.acquia-sites.com":location.origin,e.n=1,fetch("".concat(t,"/locations/resource?_format=json"),{method:"get",headers:{Accept:"application/json","Content-Type":"application/json","Access-Control-Allow-Origin":"http://localhost:3000"}});case 1:return n=e.v,e.n=2,n.json();case 2:return o=e.v,e.a(2,o);case 3:e.p=3,a=e.v,console.error(a);case 4:return e.a(2)}},e,null,[[0,3]])}
2)),function(){return o.apply(this,arguments)})}],t&&l(e.prototype,t),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n,o,a,i,s,u}();const p=u}}]);
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.