PageSourceSearch

https://www.dewalt.pt/_next/static/immutable/chunks/1qbvavjkbeduu.js

js dewalt.pt collected 2026-10-08 02:30:00 UTC 28,890 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,392828,e=>{e.v(t=>Promise.all(["static/immutable/chunks/3pxv7-icjg_mr.js"].map(t=>e.l(t))).then(()=>t(976780)))},33420,e=>{e.v(t=>Promise.all(["static/immutable/chunks/1wj5yvbnhmpxz.js"].map(t=>e.l(t))).then(()=>t(282812)))},648863,e=>{e.v(t=>Promise.all(["static/immutable/chunks/25ex3rnszxri_.js"].map(t=>e.l(t))).then(()=>t(863070)))},815310,e=>{e.v(t=>Promise.all(["static/immutable/chunks/1n8xu56m014kd.js"].map(t=>e.l(t))).then(()=>t(8179)))},122541,e=>{e.v(t=>Promise.all(["static/immutable/chunks/0dwby5gqwaw1x.js","static/immutable/chunks/1yy60jfokhx_p.js","static/immutable/chunks/3xs2ug1ff2nz2.css"].map(t=>e.l(t))).then(()=>t(219468)))},369028,e=>{e.v(t=>Promise.all(["static/immutable/chunks/0mw4ev4ltkpds.js"].map(t=>e.l(t))).then(()=>t(443811)))},537037,e=>{e.v(t=>Promise.all(["static/immutable/chunks/1bz6_ul3yevj3.js"].map(t=>e.l(t))).then(()=>t(396967)))},860093,e=>{"use strict";var t=e.i(972363),r=e.i(192492),a=e.i(2411),i=e.i(468347),s=e.i(428173),n=e.i(564338),l=e.i(525346),o=e.i(627764),c=e.i(726490),u=e.i(433901),d=e.i(321715),m=e.i(533020),h=e.i(704197),p=e.i(826510),f=e.i(506867),v=e.i(357969);let b="sbd_store_avail_",g="sbd-store-availability";function y(e){return!!e&&"object"==typeof e&&"boolean"==typeof e.hasDealer&&"boolean"==typeof e.hasStoreRetailer&&"boolean"==typeof e.hasOnlineRetailer&&"boolean"==typeof e.hasServiceCenter&&"number"==typeof e.storedAt}function C(e,t){window.localStorage.setItem(`${b}${e}`,JSON.stringify(t))}let S=!1;function w(){if(!S){S=!0;let e=window.localStorage.getItem(g);if(e)try{let t=JSON.parse(e),r=t&&"object"==typeof t&&"state"in t&&t.state&&"object"==typeof t.state&&"byLocale"in t.state?t.state.byLocale:t&&"object"==typeof t&&"byLocale"in t?t.byLocale:void 0;if(r&&"object"==typeof r)for(let[e,t]of Object.entries(r))y(t)&&C(e,t)}catch{}finally{window.localStorage.removeItem(g)}}}let k=(0,v.create)()((e,t)=>({byLocale:{},getValidAvailability:r=>{w();let a=t().byLocale[r],i=a??function(e){try{let t=window.localStorage.getItem(`${b}${e}`);if(!t)return null;let r=JSON.parse(t);return y(r)?r:null}catch{return null}}(r);return i?(a||e(e=>({byLocale:{...e.byLocale,[r]:i}})),function(e){if(Date.now()-e.storedAt>864e5)return null;let{hasDealer:t,hasStoreRetailer:r,hasOnlineRetailer:a,hasServiceCenter:i}=e;return{hasDealer:t,hasStoreRetailer:r,hasOnlineRetailer:a,hasServiceCenter:i}}(i)):null},setAvailability:(t,r)=>{w();let a={...r,storedAt:Date.now()};C(t,a),e(e=>({byLocale:{...e.byLocale,[t]:a}}))},fetchAvailability:async(e,r)=>{if("u">typeof document)for(let e of document.cookie.split(";")){var a;let t=e.split("=")[0]?.trim();t&&((a=t).startsWith(b)||"NEXT_LOCALE"===a)&&(document.cookie=`${t}=; path=/; max-age=0; SameSite=Lax`)}let i=t().getValidAvailability(e);if(i)return i;try{let a=await fetch(`/api/store-availability?locale=${e}`,{signal:r});if(!a.ok)return null;let i=await a.json();if(!(i&&"object"==typeof i&&"boolean"==typeof i.hasDealer&&"boolean"==typeof i.hasStoreRetailer&&"boolean"==typeof i.hasOnlineRetailer&&"boolean"==typeof i.hasServiceCenter))return null;return t().setAvailability(e,i),i}catch{return null}}}));var L=e.i(705418),_=e.i(445863),T=e.i(282385),j=e.i(116843);let x={AU:"Australia",CA:"Canada",FR:"France",NZ:"New Zealand",US:"United States"},R={"store-retailer":"internalClick.StoreLocator.localRetailersClick","online-retailer":"internalClick.StoreLocator.onlineRetailersClick","service-center":"internalClick.StoreLocator.serviceCentersClick",dealers:"internalClick.StoreLocator.dealersClick"},D=(e,t,r,a=!1)=>"online-retailer"===e||a?r?.length??0:t??0,F=(e,t)=>"store-name"===e&&"string"==typeof t&&t.trim().length>0;e.s(["StoreLocatorSection",0,({globalStrings:e,storeLocatorPageType:v,locale:b,isCurated:g,purpose_codes:y,description:C,title:S,category:w,limit:$})=>{let{StoreLocator:A,Routes:N}=e,O=(0,r.useTranslations)("Dealer"),I=(0,d.useRouter)(),[U,P]=(0,a.useState)(null),E=(0,p.useCartCount)(),z=(0,f.useDeliveryLocationStore)(e=>e.preferredDealer?.locationId),M=(0,j.useFeatureFlags)(),W=M.dealers,B=M.store_locator_dealers,H=M.FSC_priority,q=(0,a.useMemo)(()=>M.store_locator_categories?[]:["store_locator_categories"],[M.store_locator_categories]),[G,X]=(0,a.useState)({hasDealer:!0,hasStoreRetailer:!0,hasOnlineRetailer:!0,hasServiceCenter:!0}),{hasDealer:Z,hasStoreRetailer:J,hasOnlineRetailer:K,hasServiceCenter:V}=G,[Y,Q]=(0,a.useState)(!0),[ee,et]=(0,a.useState)(!1),[er,ea]=(0,a.useState)(),[ei,es]=(0,a.useState)(),[en,el]=(0,a.useState)(),[eo,ec]=(0,a.useState)(!1),[eu,ed]=(0,a.useState)(n.DEFAULT_TAB_STATE),em="store-retailer"===v&&!J&&K?"online-retailer":v??"store-retailer",[eh,ep]=(0,a.useState)(em),[ef,ev]=(0,a.useState)(!1),[eb,eg]=(0,a.useState)(),[ey,eC]=(0,a.useState)(),[eS,ew]=(0,a.useState)("online-retailer"!==em),ek=(0,a.useRef)(void 0),eL=(0,a.useRef)(n.DEFAULT_TAB_STATE),e_=(0,a.useRef)(""),eT=(0,a.useRef)({has_featured:void 0,has_FSC:void 0}),ej=(0,a.useRef)(null),ex=(0,a.useRef)(em),eR=(0,a.useRef)({}),eD=(0,a.useRef)({}),eF=(0,a.useCallback)(e=>{if(!e)return;let t=eR.current[e];if(t?.searchOptionType==="store-name"&&"string"==typeof t.name&&t.name.trim().length>0)return{searchedName:t.name,searchOptionType:"store-name"}},[]);(0,a.useEffect)(()=>{ex.current=eh},[eh]);let e$=(0,a.useRef)(null),eA=(0,a.useCallback)(({hasFeatured:e,hasFactoryServiceCenter:t})=>{let r=[],a=[];(e||t)&&(e&&a.push({id:"featured",name:(0,_.isCubCadetBrand)()?A.eliteDealer:A.featured}),t&&a.push({id:"FSC",name:A.factoryServiceCenter}),eT.current.has_featured=!!e,eT.current.has_FSC=!!t,r.push({title:A.storeType,items:a})),eg(r)},[A.eliteDealer,A.factoryServiceCenter,A.featured,A.storeType]),eN=(0,a.useCallback)(async({coordinates:t,variant:r,radius:a,limit:i,name:s,searchedName:n,id:o,distance_unit:c,is_premium:u,purpose_codes:d,currentLocation:m,isSuggestion:p,isEstablishmentSearch:f,isLoading:v,searchOptionType:C,showDistance:S,zip_code:k})=>{if(!r)return;let L=p?eD.current[r]??0:(eD.current[r]??0)+1;p||(eD.current[r]=L,eE(r,{...eL.current[r],isLoading:void 0===v||v,totalResult:0,results:[]}));let _=await (0,l.fetchStoreLocatorApi)({purpose:g?void 0:r,coordinates:t,radius:a,limit:i,name:s,distance_unit:c,is_premium:u,purpose_codes:y??d,lang:b,zip_code:H&&"store-name"!==C?k:void 0,category:w??void 0,...eP(r)});if(!_||_.error)return p?ev(!1):eD.current[r]!==L||eE(r,{...eL.current[r],totalResult:0,results:void 0,showLoadMore:!1,isLoading:!1}),null;if(s&&p){ev(!1),el(_.result?.items?.map(e=>({name:e.name,subName:`${e.address?.city}${e.address?.state?`, ${e.address?.state}`:""}${e.address?.postal_code?` ${e.address?.postal_code}`:""}`,coordinates:e.address?.coordinates,id:e.id})));return}if((o||"store-name"===C)&&ev(!1),_.result?.items?.length===0)return eD.current[r]!==L?null:void eE(r,{...eL.current[r],totalResult:0,results:[],isLoading:!1,showLoadMore:!1});let T=n??s;T&&"store-name"===C&&(eR.current[r]={name:T,searchOptionType:C});let j=h.StoreLocatorService.transformData({rawData:_.result,variant:r,currentLocation:m,dealersEnabled:W,globalStrings:e,id:o,searchOptionType:C,searchedName:T,isEstablishmentSearch:f,showDistance:S,locale:b});if(eA({hasFactoryServiceCenter:j?.hasFactoryServiceCenter??eT.current.has_FSC,hasFeatured:j?.hasFeatured??eT.current.has_featured}),eD.current[r]!==L)return null;eE(r,{...eL.current[r],totalResult:D(r,_.result?.grand_total??_.result?.total,j?.locationResults,F(C,T)),showLoadMore:!!_.result?.next,results:j?.locationResults,nextUrl:_.result?.next,isLoading:!1,searchOptionType:C})},[W,eA,e,b,H,w,g,y]),eO=(0,a.useCallback)(t=>{let r=document.querySelector("[data-activebreadcrumb]");if(r)switch(t){case"dealers":r.textContent=e.FindADealer?.heroTitle??"";break;case"online-retailer":case"store-retailer":r.textContent=e.FindARetailer?.heroTitle??"";break;case"service-center":r.textContent=e.FindAServiceCenter?.heroTitle??""}},[e.FindADealer?.heroTitle,e.FindARetailer?.heroTitle,e.FindAServiceCenter?.heroTitle]),eI=(0,a.useCallback)(e=>{if(e)return"online-retailer"!==e&&!ey&&eL.current[e].isInitialLoad},[ey]),eU=(0,a.useCallback)((t,r=!1)=>
1{if((el(void 0),t)&&t!==eh){if("online-retailer"===t?ew(!1):ew(!0),ep(t),eO(t),!r){let r=window.location.pathname.split("/")[1],a=N?.["/find-a-retailer"]??"/find-a-retailer",i=N?.["/service-center"]??"/service-center",s=N?.["/dealers"]??"/dealers";switch(t){case"dealers":document.title=e.FindARetailer?.heroTitle??"",history.pushState(null,"",`/${r}${s}`),(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:A.localRetailers??""}});break;case"store-retailer":document.title=e.FindARetailer?.heroTitle??"",history.pushState(null,"",`/${r}${a}`),(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:A.localRetailers??""}});break;case"online-retailer":document.title=e.FindARetailer?.heroTitle??"",history.pushState(null,"",`/${r}${a}?or=true`),(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:A.onlineRetailers??""}});break;case"service-center":document.title=e.FindAServiceCenter?.heroTitle??"",history.pushState(null,"",`/${r}${i}`),(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:A.serviceCenters??""}})}}if(void 0!==eL.current[t].results)return void eE(t,{...eL.current[t],showLoadMore:!!eL.current[t].nextUrl});eE(t,{...eL.current[t],totalResult:0,results:[],isInitialLoad:eI(t)}),eN({variant:t,coordinates:ey&&"online-retailer"!==t?`${ey.latitude},${ey.longitude}`:void 0})}},[N,A.localRetailers,A.onlineRetailers,A.serviceCenters,ey,eI,eN,e.FindARetailer?.heroTitle,e.FindAServiceCenter?.heroTitle,eh,eO]);(0,a.useEffect)(()=>{ej.current=eU},[eU]),(0,a.useEffect)(()=>{let e=()=>{let e=window.location,t=e.pathname.split("/")[2];if("true"===new URLSearchParams(e.search).get("or")&&"find-a-retailer"===t&&K){ej.current?.("online-retailer",!0),eE("online-retailer",{...eL.current["online-retailer"],isInitialLoad:!1});return}if("find-a-retailer"===t){let e=!J&&K?"online-retailer":"store-retailer";ej.current?.(e,!0);return}if("service-center"===t)return void ej.current?.("service-center",!0)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[K,J]);let eP=e=>"service-center"===e?{has_FSC:eT.current.has_FSC,has_featured:eT.current.has_featured}:{},eE=(e,t)=>{e&&(eL.current={...eL.current,[e]:t},ed(r=>({...r,[e]:t})))},ez=(0,a.useCallback)(async e=>{let t=eF(e);try{let r=ek.current;r||(r=await (0,i.getCurrentPosition)()),e&&eE(e,{totalResult:0,results:[],isInitialLoad:!1}),ek.current=r,eC(r),eN({variant:e,coordinates:`${r?.latitude},${r?.longitude}`,searchedName:t?.searchedName,searchOptionType:t?.searchOptionType})}catch(i){let r=e??v??"store-retailer",a=t??eF(r);eN({variant:r,searchedName:a?.searchedName,searchOptionType:a?.searchOptionType})}},[eF,eN,v]),eM=(0,a.useCallback)(async e=>{let t=await (0,i.checkGeoPermission)();t?.state==="granted"?ez(e):eN({variant:e??"store-retailer",limit:$??(0,_.isCubCadetBrand)()?12:100,showDistance:!1})},[ez,eN,$]);(0,a.useEffect)(()=>{e$.current=eM},[eM]),(0,a.useEffect)(()=>{Y||(async()=>{if("true"===new URLSearchParams(window.location.search).get("or")&&K){"online-retailer"!==ex.current?ej.current?.("online-retailer",!0):void 0===eL.current["online-retailer"].results&&(eE("online-retailer",{...eL.current["online-retailer"],results:[],totalResult:0,isInitialLoad:!1}),eN({variant:"online-retailer"})),eE("online-retailer",{...eL.current["online-retailer"],isInitialLoad:!1}),ew(!1);return}})()},[eN,K,Y]),(0,a.useEffect)(()=>{if(!b)return void Q(!1);let e=new AbortController;return(async()=>{let t=await k.getState().fetchAvailability(b,e.signal);if(e.signal.aborted||(Q(!1),!t))return;X(t);let r="true"===new URLSearchParams(window.location.search).get("or"),a={dealers:t.hasDealer,"store-retailer":t.hasStoreRetailer,"online-retailer":t.hasOnlineRetailer,"service-center":t.hasServiceCenter},i=ex.current??"store-retailer",s=a[i]?i:Object.keys(a).find(e=>a[e??"store-retailer"]);if(r&&t.hasOnlineRetailer?("online-retailer"!==ex.current&&(ep("online-retailer"),ex.current="online-retailer"),ew(!1)):a[i]||(ep(s),ex.current=s),s&&void 0===eL.current[s].results){if(r&&t.hasOnlineRetailer)return;eE(s,{...eL.current[s]}),e$.current?.(s)}})(),()=>e.abort()},[b,v]);let eW=async t=>{if(!t)return;ec(!0);let r=await (0,l.fetchStoreLocatorApi)({param:eL.current[t].nextUrl,lang:b,purpose:g?void 0:t});if(!r)return null;let{latitude:a,longitude:i}=eX(e_.current),s=eR.current[t]??{},n=h.StoreLocatorService.transformData({rawData:r.result,variant:t,currentLocation:{latitude:a,longitude:i},dealersEnabled:W,globalStrings:e,showDistance:eL.current[t].showDistance,locale:b,searchOptionType:s.searchOptionType,searchedName:s.name});if(!n?.locationResults)return null;let o=e=>"tags"in e&&Array.isArray(e.tags)&&e.tags.some(e=>"featured"===e.id),c=eL.current[t].results?[...eL.current[t].results.map(e=>({...e,isSelected:!1})),...n.locationResults]:void 0;"dealers"===t&&c&&(c=[...c].sort((e,t)=>
1{let r=+!!o(e);return!!o(t)-r})),eE(t,{...eL.current[t],totalResult:D(t,r.result?.grand_total??r.result?.total,c,F(s.searchOptionType,s.name)),showLoadMore:!!r.result?.next,nextUrl:r?.result?.next,results:c}),ec(!1)},eB={dialogTitle:A.filter??"",isOpen:ee,onClose:e=>et(e)},eH=e=>{let t=e?.some(e=>"FSC"===e.id),r=e?.some(e=>"featured"===e.id),a=[];return t&&a.push("FSC"),{hasFeatured:r,purposeCodes:a}},eq=e=>{let{purposeCodes:t,hasFeatured:r}=eH(e),a=eF("service-center");eN({variant:eh,purpose_codes:t.length?t.join(","):void 0,is_premium:r||void 0,coordinates:e_.current||void 0,searchedName:a?.searchedName,searchOptionType:a?.searchOptionType})},eG=(0,a.useCallback)(async e=>{if(e.variant){if(!e.value){e_.current="",el(void 0),ev(!1);return}ev(!0),eN({variant:e.variant,name:e.value,radius:null,distance_unit:null,isSuggestion:!0,isLoading:!1,limit:5})}},[eN]),eX=e=>{let[t,r]=e.split(",");return{latitude:Number(t),longitude:Number(r)}},eZ=(0,a.useMemo)(()=>{let e=[],r=e=>Y||eh===e&&eu[e].isLoading;return Z&&B&&e.push({label:O("dealers"),showIcon:!1,showSearch:!0,variant:"dealers",showFilter:!!eb?.length,leftIcon:r("dealers")?(0,t.jsx)(c.SpinnerSvg,{className:"size-4"}):void 0}),J&&e.push({label:A.localRetailers??"",showIcon:!1,showSearch:!0,variant:"store-retailer",leftIcon:r("store-retailer")?(0,t.jsx)(c.SpinnerSvg,{className:"size-4"}):void 0}),K&&e.push({label:A.onlineRetailers??"",showIcon:!1,variant:"online-retailer",leftIcon:r("online-retailer")?(0,t.jsx)(c.SpinnerSvg,{className:"size-4"}):void 0}),V&&e.push({label:A.serviceCenters??"",showIcon:!1,showSearch:!0,showFilter:!!eb?.length,variant:"service-center",leftIcon:r("service-center")?(0,t.jsx)(c.SpinnerSvg,{className:"size-4"}):void 0}),e},[Z,B,J,K,V,Y,eh,eu,O,A.localRetailers,A.onlineRetailers,A.serviceCenters,eb?.length]),eJ=(0,a.useMemo)(()=>{if(eh)return!g&&!Y&&"online-retailer"!==eh&&eu[eh].isInitialLoad},[eh,g,Y,eu]),eK=(0,a.useMemo)(()=>Y&&eh?{...eu,[eh]:{...eu[eh],isLoading:!0}}:eu,[Y,eh,eu]),eV=(0,a.useMemo)(()=>(0,T.getGeocodingCountryCode)(),[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(u.StoreLocator,{countryCode:eV,currentCoordinates:ey,description:C,disabledFeatures:q,fallBackCountry:x.PT,filterChips:er,filterModal:eB,filters:eb,geocodingBounds:(0,T.getGeocodingBounds)(),googleMapsApiKey:"AIzaSyBdlXF7ajyir1RB2WhgSDXWN3YE4Z-WeRA",hideTabs:g,isDropdownListLoading:ef,isInitialLoad:eJ,locationSuggestions:{list:en},onApplyFilters:e=>{ea(e),eq(e),eh&&eE(eh,{...eL.current[eh],isInitialLoad:!1})},onChangeLocationInput:eG,onClearAllFilterChip:()=>{ea(void 0);let e=eF("service-center");eN({variant:"service-center",searchedName:e?.searchedName,searchOptionType:e?.searchOptionType}),e_.current=""},onClickCard:(e,t)=>{e&&eE(e,{...eL.current[e],results:eL.current[e].results?.map(e=>({...e,isSelected:e.id===t?.id})),isInitialLoad:!1})},onClickCta:e=>{if(!e.variant)return;let t=e.variant;if("dealers"===t&&E>0&&e.link){let t=(0,m.dealerLocationIdFromHref)(e.link);if(t&&t!==z){e.event?.preventDefault(),P(e.link);return}}switch(t){case"store-retailer":(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:(0,L.concatenate)(A.localRetailers,`${e.retailerName} | ${e.link}`)}});break;case"online-retailer":(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:(0,L.concatenate)(A.onlineRetailers,`${e.retailerName}`)}});break;case"service-center":(0,L.pushToDataLayer)({eventUseCase:R[t],data:{clickText:(0,L.concatenate)(A.serviceCenters,`${e.retailerName} | ${e.link}`)}})}},onClickEnableLocation:e=>{ez(e)},onClickFilter:()=>{et(!0)},onClickFilterChip:e=>{let t=er?.filter(t=>t.id!==e);eq(t),ea(t)},onClickSearchThisArea:(e,t)=>{if(eC(void 0),!e)return;e_.current=t?`${t.latitude},${t.longitude}`:"";let{purposeCodes:r,hasFeatured:a}=eH(er),i=eF(e);eE(e,{...eL.current[e],isInitialLoad:!1,showDistance:!0}),eN({variant:e,coordinates:e_.current,purpose_codes:r.length&&"service-center"===e?r.join(","):void 0,is_premium:"service-center"===e?a:void 0,showDistance:!0,currentLocation:t?.latitude?{latitude:t?.latitude,longitude:t?.longitude}:void 0,searchedName:i?.searchedName,searchOptionType:i?.searchOptionType})},onClickSuggestion:e=>{if(!e?.variant)return;el(void 0),eC(void 0),e.name&&"store-name"===e.type||(eR.current[e.variant]={name:void 0,searchOptionType:void 0}),eE(e.variant,{...eL.current[e.variant],results:[],totalResult:0,showDistance:!e.name,isInitialLoad:!1});let{hasFeatured:t,purposeCodes:r}=eH(er);
1if("string"==typeof e.value){e_.current=e.value;let{latitude:a,longitude:i}=eX(e.value);eN({variant:e?.variant,coordinates:e.value,isEstablishmentSearch:e.isEstablishment,purpose_codes:r.length?r.join(","):void 0,is_premium:t||void 0,currentLocation:{latitude:a,longitude:i},showDistance:!0,zip_code:"service-center"===e.variant?e.postalCode:void 0});return}let[a,i]=e.value?.coordinates??[],s=e.value?.coordinates?`${a},${i}`:void 0;e_.current=s??"",e.name&&ev(!1),eN({variant:e?.variant,coordinates:s,id:e.value?.id,purpose_codes:r.length?r.join(","):void 0,is_premium:t||void 0,currentLocation:e.value?.coordinates?{latitude:Number(a),longitude:Number(i)}:void 0,searchedName:"store-name"===e.type?e.name:void 0,searchOptionType:"store-name"===e.type?"store-name":"location",showDistance:"store-name"!==e.type})},onClickTab:eU,onLoadMore:eW,onNoResult:e=>{e&&eE(e,{totalResult:0,results:[]})},productSearchDialog:{onProductSearchInput:e=>{if(!e)return es(void 0);setTimeout(()=>{es(o.PRODUCT_SEARCH_RESULT_EXAMPLE)},1e3)},productSearchResult:ei},showSpinner:eo,showViewOption:eS,storeLocatorPageType:eh,tabItems:eZ,tabState:eK,textCopies:A,themeClass:"onLight",title:S??A.findALocation}),(0,t.jsx)(s.ConfirmModal,{cancelText:A.dealerChangeCancelCta??"",confirmText:A.dealerCta??"",description:A.dealerChangeDescription??"",isOpen:!!U,onCancel:()=>P(null),onConfirm:()=>{let e=(0,m.dealerHrefWithoutLocale)(U??void 0);P(null),e&&I.push(e)},primaryAction:"cancel",themeClass:"onLight",title:A.dealerChangeTitle??""})]})}],860093)},805702,e=>{e.v(t=>Promise.all(["static/immutable/chunks/2omjt2vz_kags.js"].map(t=>e.l(t))).then(()=>t(842960)))},583742,e=>{e.v(t=>Promise.all(["static/immutable/chunks/1i27a77uac_b4.js"].map(t=>e.l(t))).then(()=>t(183868)))},40168,e=>{e.v(t=>Promise.all(["static/immutable/chunks/34ld-rcyp-x7f.js","static/immutable/chunks/2nx0l7-iaiok8.js","static/immutable/chunks/320_o25mxkes-.js"].map(t=>e.l(t))).then(()=>t(715330)))},53195,e=>{e.v(t=>Promise.all(["static/immutable/chunks/2mdqah__34xo8.js"].map(t=>e.l(t))).then(()=>t(759725)))},275807,e=>{e.v(t=>Promise.all(["static/immutable/chunks/3f3dr0z_6e-ow.js"].map(t=>e.l(t))).then(()=>t(579146)))},870389,e=>{e.v(t=>Promise.all(["static/immutable/chunks/3boc56gjfiwqc.js","static/immutable/chunks/0fmdj3aabpx5n.js","static/immutable/chunks/0_5t8vgatk29x.js","static/immutable/chunks/23vv0yhc-i74s.js","static/immutable/chunks/03rddt8ytmxcn.js","static/immutable/chunks/1yy60jfokhx_p.js","static/immutable/chunks/2091ytgbjjc8g.js","static/immutable/chunks/032zlx3p402o8.js","static/immutable/chunks/3g85-wzpbta1d.js","static/immutable/chunks/320_o25mxkes-.js"].map(t=>e.l(t))).then(()=>t(78140)))},704197,250630,e=>{"use strict";var t=e.i(468347),r=e.i(787777);let a="/api/dealer-logo",i=new Set(["localhost"]),s=e=>{let t=e.match(/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/);if(!t)return!1;let r=t.slice(1).map(Number);if(r.some(e=>e>255))return!1;let[a,i]=r;return 10===a||127===a||172===a&&i>=16&&i<=31||192===a&&168===i||169===a&&254===i||100===a&&i>=64&&i<=127||0===a},n=e=>{let t=e?.trim()??"";if(!t)return"";if(t.startsWith(`${a}?`)||t.startsWith("/")&&!t.startsWith("//"))return t;let r=(e=>{let t=e.trim();if(!t||t.startsWith("/")&&!t.startsWith("//"))return null;try{if(t.startsWith("//"))return new URL(`https:${t}`);return new URL(t)}catch{return null}})(t);if(!r)return"";let n="http:"===r.protocol?new URL(r.toString().replace(/^http:/i,"https:")):r;return(e=>{let t,r;if("https:"!==e.protocol||e.username||e.password)return!1;let a=e.hostname.replace(/^\[(.*)\]$/,"$1").toLowerCase();return!(i.has(a)||a.endsWith(".localhost")||a.endsWith(".local")||s(a)||(null!==(r=(e=>{let t=e.match(/(?:^|:)ffff:(\d{1,3}(?:\.\d{1,3}){3})$/);if(t?.[1])return t[1];let r=e.match(/(?:^|:)ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/);if(r){let e=Number.parseInt(r[1],16),t=Number.parseInt(r[2],16);return`${e>>8&255}.${255&e}.${t>>8&255}.${255&t}`}return null})(t=a.toLowerCase()))?s(r):!!("::1"===t||"0:0:0:0:0:0:0:1"===t||"::"===t||"0:0:0:0:0:0:0:0"===t||t.startsWith("fe80:")||t.startsWith("fc")||t.startsWith("fd"))))})(n)?`${a}?url=${encodeURIComponent(n.toString())}`:""};e.s(["proxyDealerLogoUrl",0,n],250630);let l=["full_line","limited_line"];var o=e.i(445863),c=e.i(777622),u=e.i(584633);e.i(525346);var d=e.i(52255),m=e.i(112873);let h=u.default.env.NEXT_PUBLIC_STORE_LOCATOR_DEALER_CODE??"OD",p=/[&,#?/%]/g,f=(e,t="en")=>e.normalize("NFC").trim().toLocaleLowerCase(t),v=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],b=e=>{if(!e||!e.opening||!e.closing)return;let[t,r]=e.opening.split(":").map(Number),[a,i]=e.closing.split(":").map(Number),s=new Date,n=new Date,l=new Date;return s.setHours(t,r),n.setHours(a,i),n.getTime()<s.getTime()&&n.setDate(n.getDate()+1),l.getTime()>=s.getTime()&&l.getTime()<n.getTime()},g=(e,t,a)=>{if(!e)return;let i=a?b(e):void 0;return e.opening&&!1!==i?`${(0,r.to12HourFormat)(e.opening)} - ${(0,r.to12HourFormat)(e.closing||"")}`:t??""},y=v[new Date().getDay()];e.s(["StoreLocatorService",0,{transformData:({rawData:e,currentLocation:r,variant:a,id:i,searchOptionType:s,searchedName:u,isEstablishmentSearch:b,showDistance:C,globalStrings:S,locale:w,dealersEnabled:k=!0})=>{if(!e?.items)return null;let{StoreLocator:L,Routes:_}=S??{},T="online-retailer"===a?e.items.filter(e=>e.purpose_codes?.includes("OR")):e.items;if(0===T.length)return{hasFeatured:e.has_featured,hasFactoryServiceCenter:e.has_FSC,locationResults:[],themeClass:"onLight"};let j="store-name"===s&&"string"==typeof u&&u.trim().length>0,x=j?f(u,w):void 0,R=j?new Set(T.filter(e=>f(e.name??"",w)===x).map(e=>e.id)):new Set,D=j&&i&&T.some(e=>e.id===i)?i:void 0;D&&R.add(D);let F=new Map(T.map(e=>[e.id,e.purpose_codes])),$=e=>F.get(e??"")?.includes("FSC")??!1,A=new Map(T.map(e=>[e.id,e.premium])),N=e=>!0===A.get(e??""),O=j?T.filter(e=>!$(e.id)||R.has(e.id)):T;if(0===O.length)return{hasFeatured:e.has_featured,hasFactoryServiceCenter:e.has_FSC,locationResults:[],themeClass:"onLight"};let I=e=>{let t=[],r=(0,o.isCubCadetBrand)();e.premium&&t.push({name:r?L?.eliteDealer:L?.featured,isFeatured:!0,id:"featured",showIcon:!r}),!1===e.premium&&r&&t.push({name:L?.localDealer,id:"local-dealer"});let a=(e=>{if("string"!=typeof e)return null;let t=e.trim().toLowerCase().replace(/[\s-]+/g,"_");return l.includes(t)?t:null})(e.dealer_offering_code);return"full_line"===a&&L?.fullLineAvailable&&t.push({name:L.fullLineAvailable,id:"full-line-
1available",color:"primary"}),"limited_line"===a&&L?.limitedLineAvailable&&t.push({name:L.limitedLineAvailable,id:"limited-line-available",color:"secondary"}),e.purpose_codes?.includes("FSC")&&t.push({name:L?.factoryServiceCenter,id:"factory-service-center"}),t},U=O.map((e,l)=>{let u={id:e.id,coordinates:{latitude:Number(e.address?.coordinates?.[0]),longitude:Number(e.address?.coordinates?.[1])},logo:{url:n(e.organization_data?.logo),alt:e.organization_data?.name},textCopies:L,name:e.name,address:{location:`${e.address?.address1} ${e.address?.address2}, ${e.address?.city}, ${e.address?.state}`,distance:((e,a)=>{if(!C)return"";let i=(0,t.calculateNearbyDistance)(r??a,e);if(!i)return"";let s=(0,o.getDistanceUnit)();return"mi"===s?`${i.toFixed(2)} ${s}`:"km"===s?`${(1.60934*i).toFixed(2)} ${s}`:void 0})({latitude:Number(e.address?.coordinates?.[0]),longitude:Number(e.address?.coordinates?.[1])},{latitude:Number(O[0]?.address?.coordinates?.[0]),longitude:Number(O[0]?.address?.coordinates?.[1])})},email:e.contact?.email,phoneNumber:{value:e.contact?.phone,display:(0,c.formatPhoneNumber)(e.contact?.phone,e.market_or_country)},variant:a,themeClass:"onLight",openHours:(e=>{if(e)return Object.values(e).some(e=>e.opening)})(e.open_hours)?{displayTime:g(e.open_hours?.[y],L?.closed,!0),weeklyHours:Object.fromEntries(v.map((t,r)=>[((e,t,r,a)=>{if(r?.[e])return r[e];let i=new Date(Date.UTC(2024,0,7+t));try{return new Intl.DateTimeFormat(a||"en",{weekday:"long",timeZone:"UTC"}).format(i)}catch{return new Intl.DateTimeFormat("en",{weekday:"long",timeZone:"UTC"}).format(i)}})(t,r,L,w),g(e.open_hours?.[t],L?.closed)]))}:void 0,dealerCta:(e=>{if(k&&e.purpose_codes?.includes(h)){let{name:t,address:{city:r,state:a}={}}=e;return{external:!1,text:L?.dealerCta??"",url:`/${w}${_?.["/dealers"]??"/dealers"}/${e.id}/${(({state:e,city:t,name:r})=>{let a=[r??"",t??"",e??""].filter(Boolean).join("-"),i=(0,d.lowerCaseWithDashString)(a);return void 0===i?i:i.replace(p,"").replace(/-{2,}/g,"-").replace(/^-|-$/g,"")})({state:a,city:r,name:t})}`}}})(e)};switch(a){case"dealers":return{...u,tags:I(e),directionCta:e.address?.coordinates?{url:(0,m.getGoogleMapPlaceUrl)(e.address?.coordinates)??"",text:L?.directionCta??"",external:!0}:void 0,websiteCta:e.contact?.website?{url:e.contact?.website,text:L?.websiteCta??"",external:!0}:void 0};case"store-retailer":return{...u,websiteCta:e.contact?.website?{url:e.contact?.website,text:L?.websiteCta??"",external:!0}:void 0,directionCta:e.address?.coordinates?{url:(0,m.getGoogleMapPlaceUrl)(e.address.coordinates)??"",text:L?.directionCta??"",external:!0}:void 0,isSelected:"store-name"===s?0===l:i===e.id,tags:I(e)};case"service-center":return{...u,additionalDetails:e.categories_products?.length?[{title:L?.categories,items:e.categories_products}]:[],tags:I(e),websiteCta:e.contact?.website?{url:e.contact?.website,text:L?.websiteCta??"",external:!0}:void 0,directionCta:e.address?.coordinates?{url:(0,m.getGoogleMapPlaceUrl)(e.address?.coordinates)??"",text:L?.directionCta??"",external:!0}:void 0,isSelected:"store-name"===s?0===l:i===e.id,purposeCodes:e.purpose_codes};case"online-retailer":{let t=(0,m.normalizeExternalWebsiteUrl)(e.contact?.website);return{...u,websiteCta:t?{external:!0,url:t,text:""}:void 0}}default:return u}}),P=(e,t)=>{let r;return(("store-retailer"===e.variant||"service-center"===e.variant||"dealers"===e.variant)&&(r=e.address?.distance),""===r||null==r)?t?-1:1/0:parseFloat(r)},E=!j&&!0===b,z=U.sort((e,t)=>{let r=$(e.id),i=$(t.id),s=r&&!E&&(!j||R.has(e.id??"")),n=i&&!E&&(!j||R.has(t.id??""));if(D){let r=e.id===D,a=t.id===D;if(r&&!a)return -1;if(!r&&a)return 1}if("dealers"===a){let r=N(e.id),a=N(t.id);if(r&&!a)return -1;if(!r&&a)return 1}if(s&&!n)return -1;if(!s&&n)return 1;if(j){let a=R.has(e.id??""),s=R.has(t.id??"");if(a&&!s)return -1;if(!a&&s)return 1;let n=r&&!a,l=i&&!s;if(n&&!l)return 1;if(!n&&l)return -1}return P(e,s)-P(t,n)}),M=-1;j&&(M=z.findIndex(e=>R.has(e.id??"")));let W=z.map((e,t)=>{if("store-retailer"!==e.variant&&"service-center"!==e.variant)return e;let r=j?D?e.id===D:t===M:i===e.id;return{...e,isSelected:r}}),B="online-retailer"===a?W.filter(e=>e.websiteCta?.url):W;return{hasFeatured:e.has_featured,hasFactoryServiceCenter:e.has_FSC,locationResults:B,theme
1Class:"onLight"}}},"checkIfStoreOpened",0,b,"getCurrentDay",0,y,"getWeeklyHour",0,g],704197)},860218,e=>{e.v(t=>Promise.all(["static/immutable/chunks/3oralffw6e91r.js","static/immutable/chunks/320_o25mxkes-.js","static/immutable/chunks/0rxw4-vrhv3ao.js","static/immutable/chunks/3g85-wzpbta1d.js","static/immutable/chunks/39bjkpxy3w_q4.js","static/immutable/chunks/1yy60jfokhx_p.js","static/immutable/chunks/2rwwcc12hul2u.js","static/immutable/chunks/27eh7m_rowtmc.js","static/immutable/chunks/2091ytgbjjc8g.js","static/immutable/chunks/16imdl_6rhqz8.js","static/immutable/chunks/0xnyspk-r1n8q.js","static/immutable/chunks/0xb-1kzydpb0w.js","static/immutable/chunks/3xs2ug1ff2nz2.css"].map(t=>e.l(t))).then(()=>t(716952)))}]);

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.