1"use strict";(self.webpackChunkroot=self.webpackChunkroot||[]).push([[653],{69993:(e,t,a)=>{a.d(t,{Ak:()=>s,aE:()=>r,v_:()=>o});var n=a(56178);const i="/api/v1/dealers";function o(e){return(0,n.Jt)(`${i}/`,e)}function s(e){return(0,n.Jt)(`${i}/${e.id}`)}function r(e){return(0,n.Jt)(`${i}/getbypath/`,e)}},15112:(e,t,a)=>{a.d(t,{EB:()=>c,NI:()=>r,Nf:()=>s,Yu:()=>i,tX:()=>o});var n=a(16118);function i(e,t){return(0,n.MS)(e.data.dealers,t)}function o(e){return e.data.dealers.defaultLocation}function s(e,t){return(0,n.Hc)(e.data.dealers,t)}function r(e,t){return(0,n.Hc)(e.data.dealers,t,(t=>e.data.dealers.idByPath[t]))}const c=(0,a(96540).createContext)({value:void 0,isLoading:!1,errorStatusCode:void 0,id:void 0})},58612:(e,t,a)=>{a.d(t,{A:()=>r});var n=a(31635),i=a(73746),o=a(72868),s=a(96540);const r=e=>{var{location:t,onOpenLocationContent:a}=e,r=(0,n.Tt)(e,["location","onOpenLocationContent"]);return t.htmlContent?s.createElement(o.Ay,Object.assign({onClick:e=>{e.preventDefault(),a(t)}},r),(0,i.Ay)("Hours")):null}},45710:(e,t,a)=>{a.d(t,{A:()=>f});var n=a(84587),i=a(48158),o=a(48195),s=a(73746),r=a(83103),c=a(56065),l=a(15823),d=a(58612),g=a(14063),u=a(41118),m=a(39881),h=a(96540),p=a(73802);const A={googleMap:{zoom:14,mapContainerStyle:{height:"642px",width:"100%"}},infoWindowGridContainer:{gap:0},infoWindowLeftGridItem:{width:8,css:p.AH`flex-direction:column;`},infoWindowRightGridItem:{width:4,css:p.AH`flex-direction:column;`},selectedLocationName:{color:"primary",weight:"bold"},currentLocationInfoWindowGridContainer:{gap:0},currentLocationInfoWindowHeaderGridItem:{width:12,css:p.AH`justify-content:center;`},currentLocationInfoWindowSearchFilterGridItem:{width:12,css:p.AH`justify-content:center;`}},f=(0,o.A)((({extendedStyles:e,currentLocation:t,locationSearchFilter:a,distanceUnitOfMeasure:o,setGoogleMap:p,mapMarkerElements:f,locationInfoWindow:b,currentLocationInfoWindow:L,handleOpenLocationContent:E,GoogleMap:O,InfoWindow:y,Marker:S})=>{const[w]=h.useState((()=>(0,n.A)(A,e)));return h.createElement(O,Object.assign({},w.googleMap,{center:t,onLoad:e=>{p(e)},onUnmount:e=>{p(void 0)}}),f.map((e=>{return h.createElement(S,Object.assign({},e,{key:e.key},"CURRENT_LOCATION"===(t=e.type)?w.currentLocationMarker:"SELECTED"===t?w.selectedMarker:w.locationMarker));var t})),b&&h.createElement(y,Object.assign({},w.locationInfoWindow,{key:(0,i.aq)(),position:null==b?void 0:b.position}),b&&h.createElement(g.Ay,Object.assign({},w.infoWindowGridContainer),h.createElement(u.A,Object.assign({},w.infoWindowLeftGridItem),h.createElement(m.A,Object.assign({},w.selectedLocationName),b.location.name),h.createElement(r.A,Object.assign({},b.location,{extendedStyles:w.selectedLocationAddressDisplay}))),h.createElement(u.A,Object.assign({},w.infoWindowRightGridItem),b.location.htmlContent&&h.createElement(d.A,Object.assign({},w.infoWindowLocationContentLink,{location:b.location,onOpenLocationContent:E})),h.createElement(l.A,Object.assign({},w.infoWindowGoogleMapsDirectionLink,b.location)),b.location.distance>.01&&h.createElement(c.A,Object.assign({},w.infoWindowDistanceDisplay,{distance:b.location.distance,unitOfMeasure:o}))))),L&&h.createElement(y,Object.assign({},w.currentLocationInfoWindow,{key:(0,i.aq)(),position:L.position}),h.createElement(g.Ay,Object.assign({},w.currentLocationInfoWindowGridContainer),h.createElement(u.A,Object.assign({},w.currentLocationInfoWindowHeaderGridItem),h.createElement(m.A,Object.assign({},w.currentLocationInfoWindowHeaderText),(0,s.Ay)("Current Location"))),h.createElement(u.A,Object.assign({},w.currentLocationInfoWindowSearchFilterGridItem),h.createElement(m.A,Object.assign({},w.currentLocationInfoWindowSearchFilterText),a)))))}))},8226:(e,t,a)=>{a.r(t),a.d(t,{LocationFinderPageContext:()=>r,default:()=>s});var n=a(3653),i=a(38126),o=a(96540);const s={component:({id:e})=>o.createElement(i.A,null,o.createElement(n.A,{contentId:e,zoneName:"Content"})),definition:{hasEditableUrlSegment:!0,hasEditableTitle:!0,pageType:"System"}},r="LocationFinderPage"},61137:(e,t,a)=>{a.r(t),a.d(t,{default:()=>ie,locationFinderStyles:()=>ae});var n=a(58315),i=a(24857),o=a(96540);const s=e=>e*(Math.PI/180),r=({onSearch:e,loadLocations:t,defaultRadius:a,currentLocation:n,selectedLocation:i,setSelectedLocation:r,setShowSelectedLocation:c,createFilter:l})=>
1{const[d,g]=o.useState(void 0),[u,m]=o.useState(""),[h,p]=o.useState(a),[A,f]=o.useState(1),[b,L]=o.useState(void 0);return o.useEffect((()=>{d&&t(d)}),[d]),o.useEffect((()=>{n&&g(l(n,u.trim(),h))}),[n,A,b]),o.useEffect((()=>{if(!d||!i)return;const e=((e,t,a,n)=>{let i=Math.cos(s(e))*Math.cos(s(a))*Math.cos(s(n)-s(t))+Math.sin(s(e))*Math.sin(s(a));return i>1&&(i=1),i=3960*Math.acos(i),i})(d.latitude,d.longitude,i.latitude,i.longitude),t=e<a;c(t),t&&e!==i.distance&&r(Object.assign(Object.assign({},i),{distance:e}))}),[d,i,a]),{doSearch:(t,a)=>{e(t,a),n&&g(l(n,t.trim(),a))},locationSearchFilter:u,setLocationSearchFilter:m,radiusSearchFilter:h,setRadiusSearchFilter:p,page:A,setPage:f,pageSize:b,setPageSize:L}};var c=a(17126),l=a(22572),d=a(37860),g=a(48195),u=a(31374),m=a(28887),h=a(15112),p=a(25387),A=a(69993);const f=[e=>{e.dispatch({type:"Data/Dealers/BeginLoadDealers",parameter:e.parameter})},e=>{e.apiParameter=Object.assign({},e.parameter)},async e=>{e.apiResult=await(0,A.v_)(e.apiParameter)},e=>{e.dispatch({type:"Data/Dealers/CompleteLoadDealers",collection:e.apiResult,parameter:e.parameter})}],b=(0,p.hK)(f,{name:"",latitude:0,longitude:0,pageSize:5},"LoadDealers"),L=(0,p.hK)([e=>{e.dispatch({type:"Data/Dealers/Reset"})}],{},"ResetDealers");var E=a(27581);const O=(0,p.hK)([e=>{e.dispatch({type:"Pages/LocationFinder/BeginLoadDealers",parameter:e.parameter})}],{name:"",latitude:0,longitude:0,pageSize:5},"LocationFinderSetParameter");var y=a(73746),S=a(45710),w=a(84587),I=a(83103),G=a(56065),j=a(15823),C=a(58612),D=a(31635),v=a(38593);const M=e=>{var{locations:t,locationsPagination:a,setPageSize:n,setPage:i}=e,s=(0,D.Tt)(e,["locations","locationsPagination","setPageSize","setPage"]);const[r,c]=o.useState(!1);return o.useEffect((()=>{c(t.length>0&&!!a&&a.totalItemCount>a.pageSize)}),[t,a]),r?o.createElement(v.Ay,Object.assign({currentPage:a.currentPage,resultsPerPage:a.pageSize,resultsCount:a.totalItemCount,resultsPerPageOptions:a.pageSizeOptions,onChangePage:e=>{i(e)},onChangeResultsPerPage:e=>{i(1),n(Number(e.currentTarget.value))},prevPage:a.prevPageUri,nextPage:a.nextPageUri},s)):null};var R=a(2804),P=a(14063),k=a(41118),x=a(72868),F=a(91135),T=a(64479),H=a(8202),W=a(87282),U=a(39881),N=a(23573),_=a(71468),z=a(73802);const B={centeringWrapper:{css:z.AH`width:100%;display:flex;align-items:center;`},spinner:{css:z.AH`margin:auto;`},form:{css:z.AH`width:100%;`},searchContainer:{css:z.AH`display:grid;height:642px;`},searchInputGridContainer:{gap:10},searchGeoLocationGridItem:{width:[12,12,12,12,12]},searchLocationsGridItem:{width:[12,12,12,12,5]},searchRadiusGridItem:{width:[12,12,12,12,4]},searchButtonGridItem:{width:[12,12,12,12,3],css:z.AH`padding-top:10px;display:inline-block;width:100%;flex-direction:row;text-align:right;align-self:flex-end;& > div{display:inline-flex;}`},searchResultsText:{css:z.AH`margin-top:10px;`},searchResultsTextGridItem:{width:4},distanceUnitOfMeasureGridItem:{width:8,align:"middle"},distanceUnitOfMeasureRadioGroup:{css:z.AH`display:inline-block;width:100%;flex-direction:row;text-align:right;& > div{display:inline-flex;}`},siteMessageGridItem:{width:12},siteMessageGeocodeErrorText:{color:"danger",weight:"bold"},siteMessageResultsErrorText:{color:"danger",weight:"bold"},searchResultGridItem:{width:12},searchResultRow:{css:z.AH`overflow-y:auto;overflow-x:hidden;`},searchResultGridContainer:{gap:10},searchResultLocationDetailsGridContainer:{gap:10},searchResultDisplayNumberGridItem:{width:1,css:z.AH`justify-content:center;`},locationDisplayNumberText:{color:"primary",weight:"bold"},searchResultInformationGridItem:{width:11},searchResultInformationGridContainer:{gap:10},searchResultLocationGridItem:{width:11},locationNameText:{color:"primary",weight:"bold",ellipsis:!0},locationNameLink:{color:"primary",typographyProps:{weight:"bold",ellipsis:!0}},searchResultAddressInfoGridItem:{width:11},searchResultPhoneGridItem:{width:6},searchResultLinksAndDistanceContainer:{gap:0,css:z.AH`width:100%;padding:0;margin:0;`},searchResultContentGridItem:{width:6},searchResultGoogleMapsDirectionLinkGridItem:{width:6},searchResultDistanceGridItem:{width:6},searchResultDividerGridItem:{width:12},searchResultDivider:{css:z.AH`margin:24px 0;border:1px solid rgba(74, 74, 74, 0.2);width:100%;`},pagination:{cssOverrides:{pagination:z.AH`justify-content:center;`,perPageSelect:z.AH`${({theme:e})=>(0,N.Ay)(e,[z.AH` 2 display: none; 3 `,null,null,null,null],"min")}`}}},$=(0,c.v)("form"),K=(0,c.v)("hr"),q=c.A,V=c.A,J=(0,_.Ng)((e=>({session:e.context.session,settings:(0,m.SB)(e)})),{})((({extendedStyles:e,onSearch:t,onLocationSelected:a,locationKnown:n,getLocationNumberFromPagination:i,openLocationContentDisplay:s,resultCount:r,locationSearchFilter:l,radiusSearchFilter:d,geoLocationSearchText:g,showGeoLocationErrorMessage:m,geoLocationErrorMessage:h,isLoading:p,distanceUnitOfMeasure:A,setDistanceUnitOfMeasure:f,locations:b,locationsPagination:L,setPage:E,setPageSize:O,siteMessageResultsErrorMessage:S}
3)=>{const[D]=o.useState((()=>(0,w.A)(B,e))),[v,N]=o.useState(l),[_,z]=o.useState(d),[J,X]=o.useState(g);o.useEffect((()=>{N(l)}),[l]),o.useEffect((()=>{z(d)}),[d]),o.useEffect((()=>{X(g)}),[g]);const Y=e=>()=>s(e);return o.createElement($,Object.assign({},D.form,{onSubmit:e=>{e.preventDefault(),p||(L&&E(1),t(J,v,_))},noValidate:!0}),o.createElement(q,Object.assign({},D.searchContainer),o.createElement(V,Object.assign({},D.searchInputRow),o.createElement(P.Ay,Object.assign({},D.searchInputGridContainer),o.createElement(k.A,Object.assign({},D.searchGeoLocationGridItem),o.createElement(W.A,Object.assign({id:"searchGeoLocation"},D.searchGeoLocationText,{label:(0,y.Ay)("Search by Postal Code, Province or Country"),required:!0,value:J,onChange:e=>{X(e.target.value)},placeholder:(0,y.Ay)("Search by Postal Code, Province or Country"),"data-test-selector":"locationSearchForm_searchGeoLocation",error:m?h:void 0}))),o.createElement(k.A,Object.assign({},D.searchLocationsGridItem),o.createElement(W.A,Object.assign({id:"searchLocations"},D.searchLocationsText,{label:(0,y.Ay)("Search for Location"),value:v,onChange:e=>{N(e.target.value)},placeholder:(0,y.Ay)("Search for Location"),"data-test-selector":"locationSearchForm_searchLocations"}))),o.createElement(k.A,Object.assign({},D.searchRadiusGridItem),o.createElement(W.A,Object.assign({id:"searchRadius"},D.searchRadiusText,{label:(0,y.Ay)("Search Radius"),value:_,onChange:e=>{z(Number(e.target.value))},type:"number",min:0,placeholder:(0,y.Ay)("Search Radius")}))),o.createElement(k.A,Object.assign({},D.searchButtonGridItem),o.createElement(R.Ay,Object.assign({},D.searchButton,{type:"submit","data-test-selector":"locationSearchForm_searchButton"}),(0,y.Ay)("Search"))),o.createElement(k.A,Object.assign({},D.searchResultsTextGridItem),o.createElement(U.A,Object.assign({},D.searchResultsText),(0,y.Ay)("{0} Results").replace("{0}",`${r}`))),o.createElement(k.A,Object.assign({},D.distanceUnitOfMeasureGridItem),o.createElement(H.A,Object.assign({},D.distanceUnitOfMeasureRadioGroup,{id:"distanceUoM",name:"distanceUoM",value:A,onChangeHandler:e=>{const t=e.target.value;f(t)}}),o.createElement(T.A,Object.assign({},D.distanceUnitOfMeasureImperialRadio,{value:"Imperial"}),(0,y.Ay)("Miles")),o.createElement(T.A,Object.assign({},D.distanceUnitOfMeasureMetricRadio,{value:"Metric"}),(0,y.Ay)("Kilometers")))),o.createElement(k.A,Object.assign({},D.siteMessageGridItem),!p&&!n&&g.length>0&&o.createElement(U.A,Object.assign({},D.siteMessageGeocodeErrorText),(0,u.Ay)("PickUpLocation_GeocodeErrorMessage")),!p&&n&&0===b.length&&S&&o.createElement(U.A,Object.assign({},D.siteMessageResultsErrorText,{"data-test-selector":"locationSearchForm_siteErrorMessage"}),S)))),o.createElement(V,Object.assign({},D.searchResultRow),o.createElement(P.Ay,Object.assign({},D.searchResultGridContainer),p&&0===b.length&&o.createElement(k.A,Object.assign({},D.searchResultGridItem),o.createElement(c.A,Object.assign({},D.centeringWrapper),o.createElement(F.A,Object.assign({},D.spinner)))),b.map(((e,t)=>{return o.createElement(k.A,Object.assign({key:e.id},D.searchResultGridItem),o.createElement(P.Ay,Object.assign({},D.searchResultGridContainer,{"data-test-selector":"locationSearchForm_location","data-test-key":`${e.id}`}),o.createElement(k.A,Object.assign({},D.searchResultDisplayNumberGridItem),o.createElement(U.A,Object.assign({},D.locationDisplayNumberText),i(t))),o.createElement(k.A,Object.assign({},D.searchResultInformationGridItem),o.createElement(P.Ay,Object.assign({},D.searchResultInformationGridContainer),o.createElement(k.A,Object.assign({},D.searchResultLocationGridItem),o.createElement(x.Ay,Object.assign({},D.locationNameLink,{onClick:t=>((e,t)=>{e.preventDefault(),a(t)})(t,e),"data-test-selector":"findLocationModal_locationSelect","data-markerNumber":t+1}),e.name)),o.createElement(k.A,Object.assign({},D.searchResultAddressInfoGridItem),o.createElement(I.A,Object.assign({},D.locationAddressInfoCondensed,e))),e.htmlContent&&o.createElement(k.A,Object.assign({},D.searchResultContentGridItem),o.createElement(C.A,Object.assign({},D.locationContentLink,{location:e,onOpenLocationContent:Y(e)}))),o.createElement(k.A,Object.assign({},D.searchResultGoogleMapsDirectionLinkGridItem),o.createElement(j.A,Object.assign({},D.locationGoogleMapsDirectionLink,e))),e.phone&&o.createElement(k.A,Object.assign({},D.searchResultPhoneGridItem),o.createElement(x.Ay,Object.assign({href:`tel:${e.phone}`},D.searchResultPhoneLink,{target:"_blank"}),e.phone)),o.createElement(k.A,Object.assign({},D.searchResultDistanceGridItem),o.createElement(G.A,Object.assign({},D.locationDistanceDisplayText,{distance:e.distance,unitOfMeasure:A}))))),(n=t,!!L&&L.pageSize>n+1&&o.createElement(k.A,Object.assign({},D.searchResultDividerGridItem),o.createElement(K,Object.assign({},D.searchResultDivider))))));var n})))),o.createElement(V,Object.assign({},D.paginationRow),o.createElement(M,Object.assign({},D.pagination,{locations:b,locationsPagination:L,setPage:E,setPageSize:O})))))}
3));var X=a(51939),Y=a(96852),Z=a(31074),Q=a(76895),ee=a(10900);const te={loadDealers:b,setParameter:O,resetDealers:L},ae={container:{gap:30},leftColumnGridItem:{width:[12,12,12,6,6],css:z.AH`${({theme:e})=>(0,N.Ay)(e,[z.AH` 4 order: 2; 5 `,z.AH` 6 order: 2; 7 `,z.AH` 8 order: 2; 9 `,null,null])}`},selectedDealerDisplayBackToResultsGridItem:{width:12},selectedDealerDisplayBackToResultsLink:{icon:{iconProps:{src:Y.default},position:"left"}},selectedDealerDisplayGridItem:{width:12},rightColumnGridItem:{width:[12,12,12,6,6],css:z.AH`${({theme:e})=>(0,N.Ay)(e,[z.AH` 10 order: 1; 11 `,z.AH` 12 order: 1; 13 `,z.AH` 14 order: 1; 15 `,null,null])}`},locationContentModal:{sizeVariant:"small",cssOverrides:{modalTitle:z.AH`padding:10px 20px;`,modalContent:z.AH`padding:20px;`}},contentContainer:{css:z.AH``}},ne=ae,ie={component:(0,_.Ng)((e=>{var t;return{session:e.context.session,settings:(0,m.SB)(e),getDealersParameter:e.pages.locationFinder.getDealersParameter,dealersDataView:(0,h.Yu)(e,e.pages.locationFinder.getDealersParameter),dealersDefaultLocation:(0,h.tX)(e),dealerDetailsUrl:null===(t=(0,E.U)(e,"DealerDetailsPage"))||void 0===t?void 0:t.url}}),te)((0,Q.$k)((0,g.A)((({settings:e,dealersDataView:t,dealersDefaultLocation:a,getDealersParameter:s,loadDealers:g,resetDealers:m,setParameter:h,history:p,dealerDetailsUrl:A,useLoadScript:f})=>{const[b,L]=o.useState(!1),[E,O]=o.useState("Imperial"),[w,I]=o.useState(!1),[G,j]=o.useState(void 0),C=e=>{I(!!e.htmlContent),j(e)};o.useEffect((()=>(s&&g(s),()=>m())),[s]);const{googleMapsApiKey:D}=e.websiteSettings,{isLoaded:v}=f({googleMapsApiKey:D}),{googleMap:M,setGoogleMap:R,currentLocation:F,setCurrentLocation:T,isGoogleMapsScriptsLoaded:H,setBounds:W,setMapCenter:U,locationKnown:N}=(0,i.A)({isShown:!0,isLoaded:v}),[_,z]=o.useState(void 0),[B,$]=o.useState(!1),[K,q]=o.useState(0),[V,Y]=o.useState([]),[Q,te]=o.useState(0),[ae,ie]=o.useState(),{doSearch:oe,locationSearchFilter:se,setLocationSearchFilter:re,radiusSearchFilter:ce,setRadiusSearchFilter:le,page:de,setPage:ge,pageSize:ue,setPageSize:me}=r({onSearch:(e,t)=>{re(e),le(t)},loadLocations:e=>{h(e)},currentLocation:F,defaultRadius:K,selectedLocation:_,setSelectedLocation:e=>z(e),setShowSelectedLocation:$,createFilter:(e,t,n)=>{let i={latitude:0,longitude:0};return e&&0!==e.lat()&&0!==e.lng()&&(i={latitude:e.lat(),longitude:e.lng()}),0===i.latitude&&0===i.longitude&&_&&(i=Object.assign({},_)),0===i.latitude&&0===i.longitude&&0!==a.latitude&&0!==a.latitude&&(i=a),{name:t,latitude:i.latitude,longitude:i.longitude,radius:n,page:de,pageSize:ue}}});o.useEffect((()=>{if(H)if(t.value&&!t.isLoading){const{pagination:e,value:a,defaultRadius:n,defaultLatitude:i,defaultLongitude:o}=t;re(se),ie(e||void 0),te((null==e?void 0:e.totalItemCount)||0),q(n),le(n),U(new google.maps.LatLng(i,o)),Y(a||[]),L(!1)}else L(!0)}),[t,H]),o.useEffect((()=>{const e=[];Le(),V.forEach((t=>{e.push({lat:t.latitude,lng:t.longitude})})),B&&_&&e.push({lat:_.latitude,lng:_.longitude}),F&&0!==F.lat()&&0!==F.lng()&&e.push({lat:F.lat(),lng:F.lng()}),W(e)}),[M,V,_,B,F]);const[he,pe]=o.useState(void 0),[Ae,fe]=o.useState(void 0),{mapMarkersElements:be,closeInfoWindows:Le,getLocationNumber:Ee}=(({locations:e,locationSearchFilter:t,locationsPagination:a,currentLocation:n,selectedLocation:i,showSelectedLocation:s,locationType:r,setLocationOfInfoWindow:c,setCurrentLocationInfoWindow:l})=>{const[d,g]=o.useState([]),u=e=>()=>{l(void 0),c(e)},m=()=>{n&&l({position:n}),c(void 0)},h=e=>a?e+1+a.pageSize*(a.page-1):0,p=()=>{c(void 0),l(void 0)};return o.useEffect((()=>{const t=e.map(((e,t)=>({key:e.id,locationId:e.id,position:new google.maps.LatLng(e.latitude,e.longitude),type:r||"LOCATION",icon:`https://mt.google.com/vt/icon/text=${h(t)}&psize=16&color=ff330000&name=icons/spotlight/spotlight-waypoint-b.png&ax=44&ay=48&scale=1`,onClick:u(e)})));s&&i&&t.push({key:"selected",position:new google.maps.LatLng(i.latitude,i.longitude),type:"SELECTED",icon:"https://mt.google.com/vt/icon?name=icons/sp
15otlight/spotlight-waypoint-blue.png",onClick:u(i)}),n&&0!==n.lat()&&0!==n.lng()&&t.push({key:"current-location",position:n,type:"CURRENT_LOCATION",icon:"https://www.gstatic.com/images/icons/material/system_gm/2x/place_gm_blue_24dp.png",onClick:m}),g(t)}),[e,n,t,a,i,s,r]),{mapMarkersElements:d,clearLocationGoogleMarkers:()=>{g([]),p()},closeInfoWindows:p,getLocationNumber:h}})({locations:V,locationSearchFilter:se,locationsPagination:ae,currentLocation:F,selectedLocation:_,showSelectedLocation:B,setLocationOfInfoWindow:e=>{fe(e?{position:new google.maps.LatLng(e.latitude,e.longitude),location:e}:void 0)},setCurrentLocationInfoWindow:pe}),[Oe,ye]=o.useState(""),[Se,we]=o.useState(!1);return o.useEffect((()=>{F&&(0,l.Z)(F.lat(),F.lng()).then((e=>{e.find((e=>e.formatted_address===Oe))||ye(e[0].formatted_address)}))}),[F]),o.createElement(P.Ay,Object.assign({},ne.container,{"data-test-selector":"locationFinder"}),o.createElement(k.A,Object.assign({},ne.leftColumnGridItem),_&&o.createElement(P.Ay,Object.assign({},ne.selectedDealerDisplayContainer),o.createElement(k.A,Object.assign({},ne.selectedDealerDisplayBackToResultsGridItem),o.createElement(x.Ay,Object.assign({onClick:()=>{z(void 0)}},ne.selectedDealerDisplayBackToResultsLink),(0,y.Ay)("Back to Results"))),o.createElement(k.A,Object.assign({},ne.selectedDealerDisplayGridItem),o.createElement(X.default,Object.assign({},ne.selectedDealerDisplay,{dealer:_,distanceUnitOfMeasure:E})))),!_&&o.createElement(J,{extendedStyles:ne.locationSearchForm,isLoading:b,onSearch:(e,t,a)=>{if(e){if(we(!1),Oe!==e)return re(t),le(a),void(e=>{we(!1),ye(e),(0,l.X)(e).then((e=>{const t=e[0];t.formatted_address&&ye(t.formatted_address),ge(1),T(t.geometry.location)})).catch((()=>{we(!0)}))})(e);oe(t,a)}else we(!0)},onLocationSelected:e=>{const t=e.detailPagePath?new URL(e.detailPagePath).pathname:`${A}?id=${e.id}`;p.push(t)},locationKnown:N,showSelectedLocation:B,getLocationNumberFromPagination:Ee,openLocationContentDisplay:C,resultCount:Q,locationSearchFilter:se,radiusSearchFilter:ce,geoLocationSearchText:Oe,showGeoLocationErrorMessage:Se,geoLocationErrorMessage:(0,u.Ay)("DealerLocator_GeocodeErrorMessage"),distanceUnitOfMeasure:E,setDistanceUnitOfMeasure:O,locations:V,locationsPagination:ae,setPage:ge,setPageSize:me,siteMessageResultsErrorMessage:(0,u.Ay)("DealerLocator_NoResultsMessage")})),o.createElement(k.A,Object.assign({},ne.rightColumnGridItem),H&&o.createElement(S.A,{extendedStyles:ne.locationGoogleMap,currentLocation:F,locationSearchFilter:se,distanceUnitOfMeasure:E,setGoogleMap:R,mapMarkerElements:be,locationInfoWindow:Ae,currentLocationInfoWindow:he,handleOpenLocationContent:C})),o.createElement(Z.A,Object.assign({},ne.locationContentModal,{headline:(0,y.Ay)("Hours"),isOpen:w,handleClose:()=>{I(!1),j(void 0)}}),o.createElement(c.A,Object.assign({},ne.contentContainer),(0,ee.Ay)((0,d.A)((null==G?void 0:G.htmlContent)||""),n.q))))})))),definition:{allowedContexts:["CreateAccountPage","LocationFinderPage"],group:"Location Finder"}}},51939:(e,t,a)=>{a.r(t),a.d(t,{default:()=>b,locationFinderDealerDisplayStyles:()=>f});var n=a(58315),i=a(84587),o=a(17126),s=a(37860),r=a(73746),c=a(83103),l=a(56065),d=a(15823),g=a(14063),u=a(41118),m=a(72868),h=a(39881),p=a(10900),A=a(96540);const f={container:{gap:10},nameGridItem:{width:12},nameText:{color:"primary",weight:"bold",ellipsis:!0},addressInfoGridItem:{width:12},phoneGridItem:{width:12},distanceGridItem:{width:12},htmlContentGridItem:{width:12},googleMapsDirectionLinkGridItem:{width:3},visitWebsiteLinkGridItem:{width:3}},b=({extendedStyles:e,dealer:t,distanceUnitOfMeasure:a})=>{const[b]=A.useState((()=>(0,i.A)(f,e)));return A.createElement(g.Ay,Object.assign({},b.container,{"data-test-selector":"locationFinderDealerDisplay","data-test-key":`${t.id}`}),A.createElement(u.A,Object.assign({},b.nameGridItem),A.createElement(h.A,Object.assign({},b.nameText),t.name)),A.createElement(u.A,Object.assign({},b.addressInfoGridItem),A.createElement(c.A,Object.assign({},b.addressInfoCondensed,t))),t.phone&&A.createElement(u.A,Object.assign({}
15,b.phoneGridItem),A.createElement(m.Ay,Object.assign({href:`tel:${t.phone}`},b.phoneLink,{target:"_blank"}),t.phone)),t.htmlContent&&A.createElement(A.Fragment,null,A.createElement(u.A,Object.assign({},b.htmlContentGridItem),A.createElement(o.A,Object.assign({},b.container,{"data-test-selector":"locationFinderDealerDisplay_htmlContent"}),(0,p.Ay)((0,s.A)(t.htmlContent),n.q)))),A.createElement(u.A,Object.assign({},b.googleMapsDirectionLinkGridItem),A.createElement(d.A,Object.assign({},b.googleMapsDirectionLink,t))),A.createElement(u.A,Object.assign({},b.visitWebsiteLinkGridItem),A.createElement(m.Ay,Object.assign({href:t.webSiteUrl,target:"_blank"},b.visitWebsiteLink),(0,r.Ay)("Visit Website"))),A.createElement(u.A,Object.assign({},b.distanceGridItem),A.createElement(l.A,Object.assign({},b.distanceDisplayText,{distance:t.distance,unitOfMeasure:a}))))}}}]); 16//# sourceMappingURL=locationfinderChunk_b3963312600e6f3d7387.chunk.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.