PageSourceSearch

https://www.princessauto.com/_next/static/chunks/1961-7c6ab2e7f4ac5101.js

js princessauto.com collected 2026-10-03 21:40:21 UTC 36,163 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1961,6141],{1622:(e,t,s)=>{"use strict";s.d(t,{AQ:()=>o,H4:()=>l,a7:()=>a,fW:()=>i});let o=10,a=12,i=4,l={lat:56.1304,lng:-106.3468}},4576:(e,t,s)=>{"use strict";s.d(t,{Qt:()=>o,RR:()=>l,YA:()=>a,_G:()=>i});let o=500,a=50,i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,[s,o]=e.split(",").map(e=>e.trim());if(!s||s.length<t)throw Error("City name too short");return{city:s,province:o}},l=e=>{if(e&&"object"==typeof e&&"errorCode"in e){let{errorCode:t}=e;if("SERVICE_ERROR"===t)return"configError"}let t=e instanceof Error?e.message:"";return t.includes("GOOGLE_GEOCODE_KEY")?"configError":("NOT_IN_CANADA"===t||t.includes("Geocoding failed"),"notFound")}},6304:e=>{e.exports={"existing-store__expanded-content":"styles_existing-store__expanded-content__AQsPB","existing-store__expanded-content--text-inverse":"styles_existing-store__expanded-content--text-inverse__PAQ0J","existing-store__expanded-content--fullSize":"styles_existing-store__expanded-content--fullSize__AEmyc","existing-store__holiday-hours":"styles_existing-store__holiday-hours__QrLLI","existing-store__holiday-hours__title":"styles_existing-store__holiday-hours__title__1bOK_","existing-store__table":"styles_existing-store__table__BLSbF","existing-store__table--header":"styles_existing-store__table--header__20PtO"}},18974:(e,t,s)=>{"use strict";s.d(t,{VK:()=>i,c0:()=>a,iW:()=>r,wu:()=>l});var o=s(21526);let a=(e,t)=>t.map(t=>{if(null==t.latitude||null==t.longitude)return{...t,distanceKm:void 0};let s=(0,o.ky)(e,{lat:t.latitude,lng:t.longitude});return{...t,distanceKm:s}}),i=e=>[...e].sort((e,t)=>null==e.distanceKm&&null==t.distanceKm?0:null==e.distanceKm?1:null==t.distanceKm?-1:e.distanceKm-t.distanceKm),l=e=>[...e].sort((e,t)=>{let s=e.name.toLowerCase(),o=t.name.toLowerCase();return s.localeCompare(o)}),r=(e,t)=>{if(!t)return e;let s=e.find(e=>e.id===t);if(!(null==s?void 0:s.latitude)||!(null==s?void 0:s.longitude))return e;let o={lat:s.latitude,lng:s.longitude};return[s,...i(a(o,e.filter(e=>e.id!==t)))]}},19560:(e,t,s)=>{"use strict";s.d(t,{USER_GEOLOCATION_STORAGE_KEY:()=>a,m:()=>i});var o=s(7620);let a="user_geolocation_state",i=()=>{let e={loaded:!1},[t,s]=(0,o.useState)(()=>{try{let e=window.sessionStorage.getItem(a);if(e)return JSON.parse(e)}catch(e){console.warn("Failed to parse geolocation from session storage:",e),window.sessionStorage.removeItem(a)}return e});return(0,o.useEffect)(()=>{try{window.sessionStorage.setItem(a,JSON.stringify(t))}catch(e){console.warn("Failed to save geolocation to session storage:",e)}},[t]),{location:t,requestLocation:(0,o.useCallback)(()=>{if(!navigator.geolocation){let e="Geolocation is not supported by your browser.";return s({loaded:!0,error:e}),Promise.reject(Error(e))}return new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(t=>{let o={lat:t.coords.latitude,lng:t.coords.longitude};s({loaded:!0,coordinates:o}),e(o)},e=>{let o=e.message;s({loaded:!0,error:o}),t(Error(o))})})},[])}}},21526:(e,t,s)=>{"use strict";s.d(t,{$W:()=>l,ky:()=>o,uG:()=>n});let o=(e,t)=>{let s=(t.lat-e.lat)*Math.PI/180,o=(t.lng-e.lng)*Math.PI/180;return 12742*Math.asin(Math.min(1,Math.sqrt(Math.sin(s/2)**2+Math.cos(e.lat*Math.PI/180)*Math.cos(t.lat*Math.PI/180)*Math.sin(o/2)**2)))},a=/^[A-Za-z]\d[A-Za-z]\s?\d[A-Za-z]\d$/,i=/^[A-Za-z]\d[A-Za-z]$/,l=e=>{let t=e.trim();return a.test(t)||i.test(t)},r=/^[A-Za-zÀ-ÿ'.\- ]+(?:,\s?(?:AB|BC|MB|NB|NL|NS|NT|NU|ON|PE|QC|SK|YT))?$/,n=e=>r.test(e.trim())},28368:(e,t,s)=>{"use strict";s.d(t,{Y:()=>_});var o=s(54568),a=s(72276),i=s(83985),l=s(25150),r=s.n(l),n=s(78641),d=s(7620),c=s(93804),u=s.n(c);let _=e=>{let{storeCards:t,error:s,setError:l,className:c,selectedStoreId:_=null,onStoreCardClick:g}=e,m=(0,n.c)(),h=(0,d.useRef)(null),p=(0,d.useRef)({}),b=(0,d.useRef)(null),x=!(0,i.useMediaQuery)("(min-width: ".concat(a.aSD,")")),[y,f]=(0,d.useState)(6),v=(0,d.useMemo)(()=>x?t.slice(0,y):t,[t,y,x]),C=t.length-y,w=x&&C>0,S=Math.min(C,20),j=(0,d.useCallback)(()=>{f(e=>e+20)},[]),N=(0,d.useCallback)(()=>{null==l||l("")},[l]),k=(0,d.useCallback)(e=>{null==g||g(e)},[g]),L=(0,d.useCallback)((e,t)=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),null==g||g(e))},[g]);(0,d.useEffect)(()=>{f(6)},[t]),(0,d.useEffect)(()=>
1{if(_!==b.current)if(_&&p.current[_]){var e;null==(e=p.current[_])||e.scrollIntoView({behavior:"smooth",block:"center"}),b.current=_}else null===_&&h.current&&(h.current.scrollTo({top:0,behavior:"smooth"}),b.current=null)},[_,t]),(0,d.useEffect)(()=>{p.current={}},[t]);let A=(0,d.useMemo)(()=>t.map(e=>e.props.storeId).join(","),[t]);return(0,d.useEffect)(()=>{var e;null==(e=h.current)||e.scrollTo({top:0,behavior:"smooth"})},[s,A]),(0,o.jsxs)("div",{className:r()(u()["store-list"],c),"data-testid":"store-list-container",ref:h,children:[s&&(0,o.jsx)("div",{className:u()["store-list__error"],children:(0,o.jsx)(i.Alert,{type:"error",variant:"inline",message:s,onClose:l&&N})}),(0,o.jsx)("section",{"aria-label":m("storeLocator.storeListAria.label"),className:u()["store-list__content"],children:v.map(e=>{let{storeId:t}=e.props,s=_===t;return(0,o.jsx)("div",{ref:e=>{p.current[t]=e},className:r()(u()["store-list__card"],{[u()["store-list__card--selected"]]:s}),onClick:()=>k(t),onKeyDown:e=>L(t,e),role:"button",tabIndex:0,"aria-pressed":s,children:e},t)})}),w&&(0,o.jsx)("div",{className:u()["store-list__load-more"],children:(0,o.jsx)(i.LoadMore,{content:m("storeLocator.storeList.loadMoreCTA.label",{loadMoreCount:S}),onClick:j})})]})};_.displayName="StoreList"},29773:(e,t,s)=>{"use strict";s.d(t,{Ef:()=>i,SL:()=>r});let{useGetPickupOptionsQuery:o,useLazyGetPickupOptionsQuery:a,useGetProductsInventoryQuery:i,useLazyGetProductsInventoryQuery:l,useGetPickupMethodsQuery:r,useLazyGetPickupMethodsQuery:n}=s(91634).Z.injectEndpoints({endpoints:e=>({getPickupOptions:e.query({query:e=>({url:"/pickup-options",method:"POST",body:e}),providesTags:["Stores"]}),getProductsInventory:e.query({query:e=>({url:"/products-inventory",method:"POST",body:e}),providesTags:["Stores"]}),getPickupMethods:e.query({query:()=>({url:"/pickup-methods",method:"GET"}),providesTags:["Stores"]})})})},30877:(e,t,s)=>{"use strict";s.d(t,{H9:()=>l,HL:()=>d,M0:()=>r,le:()=>c,ug:()=>i});var o=s(2661);let a=(e,t)=>{var s,o,a;return null==(a=e.metafields)||null==(o=a.edges)||null==(s=o.find(e=>e.node.key===t))?void 0:s.node.value},i=(e,t,s)=>{var i;let l=a(e,o.F9.DISPLAY_NAME_FR),r="fr"===s&&l?l:e.name;return"".concat(t+1,". ").concat(r,", ").concat(null==e||null==(i=e.address)?void 0:i.stateOrProvince)},l=e=>{if(!e)return e;let t=e.replaceAll(/\D/g,"");return 10===t.length?t.replace(/^(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3"):11===t.length?t.replace(/^(\d)(\d{3})(\d{3})(\d{4})$/,"$1-$2-$3-$4"):e},r=(e,t)=>{let s=null==e?void 0:e.address;if(!s)return;let i=a(e,o.F9.ADDRESS1_FR);return["fr"===t&&i?i:s.address1,s.city,s.stateOrProvince,s.postalCode].filter(Boolean).join(", ")},n=e=>{let t=e.split(/[-/]/);if(3!==t.length)return console.warn("Invalid date format: ".concat(e,'. Expected "yyyy/mm/dd" or "yyyy-mm-dd".')),null;let[s,o,a]=t,i=Number(s),l=Number(o),r=Number(a);return(null==s?void 0:s.length)!==4||Number.isNaN(i)||Number.isNaN(l)||Number.isNaN(r)||l<1||l>12||r<1||r>31?(console.warn("Invalid date format: ".concat(e,'. Expected "yyyy/mm/dd" or "yyyy-mm-dd".')),null):{year:i,month:l,day:r}},d=(e,t)=>{let s=n(e);if(!s)return"";let{year:o,month:a,day:i}=s,l=new Date(o,a-1,i),r=l.toLocaleString(t,{month:"short"}),d=l.getDate();return"".concat(d," ").concat(r," ").concat(o)},c=e=>{let t=n(e);if(!t)return 0;let{year:s,month:o,day:a}=t,i=new Date(s,o-1,a),l=new Date;return Math.ceil((i.getTime()-l.getTime())/864e5)}},31233:(e,t,s)=>{"use strict";s.d(t,{P:()=>a,o:()=>o});let o=e=>e.filter(e=>"gift_card"!==e.productType).map(e=>({productId:e.productEntityId,variantId:e.variantEntityId,quantity:e.quantity})),a=(e,t)=>{let s=new Map;e.forEach(e=>
1{e.node.variants.edges.forEach(e=>{((e,t)=>{let s=e.node.entityId;e.node.inventory.byLocation.edges.forEach(e=>{var o;let{locationEntityId:a,isInStock:i,availableToSell:l}=e.node;t.has(a)||t.set(a,new Map),null==(o=t.get(a))||o.set(s,i?l:0)})})(e,s)})});let o=new Set;return s.forEach((e,s)=>{t.every(t=>{var s;return(null!=(s=e.get(t.variantId))?s:0)>=t.quantity})&&o.add(s)}),o}},36141:(e,t,s)=>{"use strict";s.r(t),s.d(t,{LocatorMap:()=>c});var o=s(54568),a=s(72276),i=s(83985),l=s(81658),r=s(7620),n=s(1622);let d="store-locator-map",c=e=>{let{locations:t,center:s,focusCenter:c,focusZoom:u,focusRadiusKm:_,shellSizeKey:g,selectedId:m,preferredStoreId:h,onSelect:p,onLoadedState:b,onClearFocus:x,noMarkerLabel:y,clusteredPins:f=!1,isStoreIcon:v=!0,ariaLabel:C="Map showing store locations"}=e,{isLoaded:w,loadError:S}=(0,l.RH)({googleMapsApiKey:"AIzaSyCsMuH9uXbCxXkscbN2c9oec84nujVr3B4",region:"CA"});(0,r.useEffect)(()=>{null==b||b({isLoaded:w,loadError:S})},[w,S,b]),(0,r.useEffect)(()=>{if(!w)return;let e=document.getElementById(d);e&&(e.setAttribute("role","img"),e.setAttribute("aria-label",C))},[C,w]);let j=(0,r.useRef)(null),N=(0,r.useCallback)(e=>{if(c)return;if(h){let s=t.find(e=>e.id===h);if((null==s?void 0:s.latitude)&&(null==s?void 0:s.longitude)){let t={lat:s.latitude,lng:s.longitude};e.setCenter(t),e.setZoom(n.AQ);return}}let o=new google.maps.LatLngBounds,a=0;for(let e of t)null!=e.latitude&&null!=e.longitude&&(o.extend({lat:e.latitude,lng:e.longitude}),a=1);a>0?e.fitBounds(o,60):(e.setCenter(s),e.setZoom(n.fW))},[t,s,h,c]),k=(0,r.useCallback)(e=>{j.current=e,N(e)},[N]);(0,r.useEffect)(()=>{let e=j.current;if(e&&c&&(e.panTo(c),null!=u&&e.setZoom(u),null!=_)){let t=new google.maps.Circle({center:c,radius:1e3*_}).getBounds();t&&e.fitBounds(t)}},[c,u,_]),(0,r.useEffect)(()=>{let e=j.current;e&&(c||N(e))},[t,N,c]),(0,r.useEffect)(()=>{let e=j.current;if(!e||!m||c)return;let s=t.find(e=>e.id===m);(null==s?void 0:s.latitude)&&(null==s?void 0:s.longitude)&&(e.panTo({lat:s.latitude,lng:s.longitude}),e.setZoom(n.AQ))},[m,t,c]);let L=(0,r.useCallback)(e=>{if(m===e.id){null==x||x(),null==p||p(null);return}null==p||p(e.id)},[x,p,m]),A=(0,r.useCallback)(e=>(0,o.jsx)(o.Fragment,{children:t.map((t,s)=>{if(null==t.latitude||null==t.longitude)return null;let i=m===t.id,r={position:{lat:t.latitude,lng:t.longitude},icon:{url:(e=>{let{label:t,isSelected:s,isStoreDefault:o=!1,fillColor:i=a.s3S,selectedFillColor:l=a.ehg,size:r=42,isStoreIcon:n=!0}=e,d=s?l:i,c=n?'\n      <svg width="42" height="61" viewBox="0 0 42 61" fill="none" xmlns="http://www.w3.org/2000/svg">\n        <g clip-path="url(#clip0_2166_98071)">\n          <g filter="url(#filter0_i_2166_98071)">\n            <path d="M21 0C32.5982 0 42 8.69999 42 23.615C42 34.962 29.8435 51.347 24.0289 58.534C23.2016 59.521 22.0964 61 21 61C19.8799 61.001 18.7688 59.502 17.9723 58.534C12.159 51.351 0 34.965 0 23.615C0 8.69999 9.40182 0 21 0Z" fill="'.concat(d,'"/>\n          </g>\n          <mask id="mask0_2166_98071" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="10" y="8" width="22" height="26">\n            <path d="M32 8H10V34H32V8Z" fill="white"/>\n          </mask>\n          <g mask="url(#mask0_2166_98071)">\n            <path d="M31.4694 14.1225L21.53 8.14756C21.53 8.14756 20.9993 7.81556 20.4726 8.14756C19.4859 8.74156 10.5319 14.1245 10.5319 14.1245C10.5319 14.1245 10.0039 14.4415 10.0039 14.9945L10 17.0836V27.0046C10 27.5556 10.5306 27.8756 10.5306 27.8756L20.47 33.8515C20.47 33.8515 21.0007 34.1835 21.5274 33.8515C22.5141 33.2575 31.4681 27.8745 31.4681 27.8745C31.4681 27.8745 31.9961 27.5556 31.9961 27.0056L32 24.9155V14.9945C32 14.4435 31.4707 14.1225 31.4707 14.1225" fill="white"/>\n            <path d="M21 27C24.3137 27 27 24.3137 27 21C27 17.6863 24.3137 15 21 15C17.6863 15 15 17.6863 15 21C15 24.3137 17.6863 27 21 27Z" fill="').concat(d,'"/>\n            <path d="M21 30.5C26.2467 30.5 30.5 26.2467 30.5 21C30.5 15.7533 26.2467 11.5 21 11.5C15.7533 11.5 11.5 15.7533 11.5 21C11.5 26.2467 15.7533 30.5 21 30.5Z" stroke="').concat(d,'"/>\n          </g>\n        </g>\n        <defs>\n          <filter id="filter0_i_2166_98071" x="0" y="0" width="42" height="62" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
1\n            <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n            <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>\n            <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n            <feOffset dy="1"/>\n            <feGaussianBlur stdDeviation="0.5"/>\n            <feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n            <feColorMatrix type="matrix" values="0 0 0 0 0.211765 0 0 0 0 0.552941 0 0 0 0 0.8 0 0 0 1 0"/>\n            <feBlend mode="normal" in2="shape" result="effect1_innerShadow_2166_98071"/>\n          </filter>\n          <clipPath id="clip0_2166_98071">\n            <rect width="42" height="61" fill="white"/>\n          </clipPath>\n        </defs>\n      </svg>\n    ').trim():'<svg width="42" height="61" viewBox="0 0 42 61" fill="none" xmlns="http://www.w3.org/2000/svg">\n        <g filter="url(#filter0_i_35562_61429)">\n        <path d="M21 0C32.5982 0 42 8.70013 42 23.6146C42 34.9621 29.8435 51.3469 24.0289 58.5345C23.2016 59.5206 22.0964 60.9995 21 61C19.8799 61.0005 18.7688 59.5017 17.9723 58.5345C12.159 51.3507 0 34.9646 0 23.6146C0 8.70013 9.40182 0 21 0Z" fill="'.concat(d,'"/>\n</g>\n<path d="M28 13.3008C29.1392 13.3008 30.076 14.1669 30.1885 15.2764L30.2002 15.501V16.001C30.2002 16.1368 30.1857 16.2694 30.1621 16.3984C31.2897 17.4056 32 18.8701 32 20.501V28.001C32 29.1055 31.1046 30.001 30 30.001H21.9932C22.3761 29.429 22.5996 28.7411 22.5996 28.001V20.501C22.5996 18.2827 21.5817 16.3029 19.9883 15.001H23.8594C24.086 14.0271 24.9572 13.3008 26 13.3008H28ZM15.5 15.001C18.5376 15.001 21 17.4634 21 20.501V28.001C21 29.1055 20.1046 30.001 19 30.001H12C10.8954 30.001 10 29.1055 10 28.001V20.501C10 17.4634 12.4624 15.001 15.5 15.001ZM14.5 21.001C13.9477 21.001 13.5 21.4487 13.5 22.001C13.5 22.5533 13.9477 23.001 14.5 23.001H16.5C17.0523 23.001 17.5 22.5533 17.5 22.001C17.5 21.4487 17.0523 21.001 16.5 21.001H14.5ZM25.8789 14.5078C25.8638 14.5096 25.8489 14.5131 25.834 14.5156C25.8069 14.5202 25.7802 14.5256 25.7539 14.5322C25.7438 14.5348 25.7336 14.5372 25.7236 14.54C25.648 14.5618 25.5759 14.5919 25.5088 14.6299C25.4972 14.6364 25.4859 14.6434 25.4746 14.6504C25.4471 14.6674 25.4202 14.6855 25.3945 14.7051C25.3901 14.7084 25.3862 14.7124 25.3818 14.7158C25.3191 14.7653 25.2622 14.8218 25.2129 14.8848C25.2079 14.8912 25.2031 14.8978 25.1982 14.9043C25.074 15.0709 25 15.2772 25 15.501V19.2012C25.0001 19.6428 25.3581 20.0009 25.7998 20.001C26.2416 20.001 26.5995 19.6429 26.5996 19.2012V17.001H28C28.5523 17.001 29 16.5533 29 16.001V15.501C29 14.9487 28.5523 14.501 28 14.501H26C25.959 14.501 25.9186 14.503 25.8789 14.5078Z" fill="white"/>\n<defs>\n<filter id="filter0_i_35562_61429" x="0" y="0" width="42" height="62" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">\n<feFlood flood-opacity="0" result="BackgroundImageFix"/>\n<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>\n<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n<feOffset dy="1"/>\n<feGaussianBlur stdDeviation="0.5"/>\n<feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n<feColorMatrix type="matrix" values="0 0 0 0 0.374908 0 0 0 0 0.700041 0 0 0 0 0.935482 0 0 0 1 0"/>\n<feBlend mode="normal" in2="shape" result="effect1_innerShadow_35562_61429"/>\n</filter>\n</defs>\n</svg>').trim(),u=o?c:'\n      <svg width="'.concat(r,'" height="').concat(1.45*r,'" viewBox="0 0 42 61" fill="none" xmlns="http://www.w3.org/2000/svg">\n        <g filter="url(#filter0_i)">\n          <path d="M21 0C32.5982 0 42 8.70013 42 23.6146C42 34.9621 29.8435 51.3469 24.0289 58.5345C23.2016 59.5206 22.0964 60.9995 21 61C19.8799 61.0005 18.7688 59.5017 17.9723 58.5345C12.159 51.3507 0 34.9646 0 23.6146C0 8.70013 9.40182 0 21 0Z" fill="').concat(d,'"/>\n        </g>\n        <circle cx="21" cy="21" r="11" fill="white"/>\n        <text x="21" y="21" text-anchor="middle" dominant-baseline="central" fill="').concat(i,'" font-size="14" font-weight="600" font-family="Arial, sans-serif">').concat(t,'</text>\n        <defs>\n          <filter id="filter0_i" x="0" y="0" width="42" height="62" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
1\n            <feFlood flood-opacity="0" result="BackgroundImageFix"/>\n            <feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>\n            <feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>\n            <feOffset dy="1"/>\n            <feGaussianBlur stdDeviation="0.5"/>\n            <feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"/>\n            <feColorMatrix type="matrix" values="0 0 0 0 0.211765 0 0 0 0 0.552941 0 0 0 0 0.8 0 0 0 1 0"/>\n            <feBlend mode="normal" in2="shape" result="effect1_innerShadow"/>\n          </filter>\n        </defs>\n      </svg>\n    ').trim();return"data:image/svg+xml;charset=UTF-8,".concat(encodeURIComponent(u))})({label:y?"":String(s+1),isSelected:m===t.id,isStoreDefault:t.id===h,isStoreIcon:v}),scaledSize:new google.maps.Size(40,40)},onClick:()=>L(t),...i?{zIndex:Number(a.OGO)}:{}};return(0,o.jsx)(l.pH,{title:t.name,...r,...e?{clusterer:e}:{}},t.id)})}),[t,m,y,h,v,L]);return S?(0,o.jsx)("p",{className:"p-4 text-red-600",children:"Map failed to load."}):w?(0,o.jsx)(l.u6,{id:d,mapContainerStyle:{width:"100%",height:"100%"},center:s,zoom:null!=u?u:n.a7,onLoad:k,options:{streetViewControl:!1,mapTypeControl:!1},onClick:()=>{null==x||x(),null==p||p(null)},children:f?(0,o.jsx)(l.w1,{options:{gridSize:35,minimumClusterSize:3},children:e=>A(e)}):A()},g):(0,o.jsx)(i.Loader,{isOpen:!0})};c.displayName="LocatorMap"},40440:(e,t,s)=>{"use strict";s.d(t,{G:()=>d});var o=s(7620),a=s(36520),i=s(41159),l=s(98722),r=s(44550),n=s(88180);let d=()=>{let e=(0,i.jL)(),t=(0,i.GV)(r.Ep),s=(0,i.GV)(l.UW),d=(0,n.G)({mode:"language"}),[c]=(0,a.oZ)();return(0,o.useCallback)(async o=>{if(e((0,l.OA)(o)),t&&null!==o)try{await c({payload:{preferred_store:{store_id:o}},language:d}).unwrap()}catch(t){throw console.error("Failed to update preferred store on backend:",t),e((0,l.OA)(s)),t}},[e,t,d,c,s])}},40576:(e,t,s)=>{"use strict";s.d(t,{g:()=>i});var o=s(72276),a=s(7620);let i=()=>{let[e,t]=(0,a.useState)("default");return(0,a.useEffect)(()=>{let e=()=>{let e=window.innerWidth;e<parseInt(o.aSD,10)?t("mobile"):e<parseInt(o.AXY,10)?t("tablet"):t("desktop")};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}},44366:(e,t,s)=>{"use strict";s.d(t,{a:()=>O});var o=s(54568),a=s(7620),i=s(70484),l=s(78641),r=s(72276),n=s(10790),d=s(83985),c=s(25150),u=s.n(c),_=s(75981),g=s(77432),m=s.n(g);let h=e=>{let{onClick:t,className:s}=e,a=(0,l.c)();return(0,o.jsx)(_.$n,{IconLeft:n.Cross,variant:"text",onClick:t,className:u()(m()["store-card-close-button"],s),"aria-label":a("storeLocator.closeSelectedStorePopup.label")})};var p=s(64562),b=s.n(p);let x=e=>{let{distance:t,address:s="",storeName:i="",expectedOpenDate:c="",handleViewStoreButtonClick:_,leftTime:g="",variant:m="default",onClose:p}=e,x=(0,l.c)(),y=(0,a.useId)(),f="map-popup"===m;return(0,o.jsxs)("div",{role:"region",id:y,"aria-label":"".concat(i||x("storeLocator.comingSoonStore.banner")),className:b()["coming-soon-store__container"],"data-testid":"coming-soon-store",children:[(0,o.jsxs)("div",{className:b()["coming-soon-store__header-container"],children:[(0,o.jsxs)("div",{className:b()["coming-soon-store__header"],"data-testid":"header",children:[t&&(0,o.jsxs)(d.NeutralLabel,{"data-testid":"distance-label",children:[t," ",x("storeLocator.keywords.away")]}),(0,o.jsx)("div",{className:u()("body-xs-bold",b()["coming-soon-store__header--banner"]),"data-testid":"banner-label",children:x("storeLocator.comingSoonStore.banner")}),f&&(0,o.jsx)(h,{onClick:p})]}),(0,o.jsx)("div",{className:u()(b()["coming-soon-store__name"],"heading-level-4-special"),"data-testid":"store-name",children:i})]}),(0,o.jsxs)("div",{className:b()["coming-soon-store__details"],"data-testid":"store-details",children:[s&&(0,o.jsxs)("div",{className:b()["coming-soon-store__details--address"],"data-testid":"store-address",children:[(0,o.jsx)(n.PlaceSolid,{role:"img","aria-label":x("storeLocator.store.icon.address"),width:r.mDK,height:r.mDK,color:r.FYT}),(0,o.jsx)("div",{className:"body-s-regular",children:s})]}),c&&(0,o.jsxs)("div",{className:b()["coming-soon-store__details--expected"],"data-testid":"expected-open-date",children:[(0,o.jsx)(n.CalendarOutline,{role:"img","aria-label":x("storeLocator.store.icon.openingDate"),width:r.mDK,color:r.FYT}),(0,o.jsx)("div",{className:"body-s-bold",children:x("storeLocator.schedule.opensOn")}),c,(0,o.jsx)(d.PositiveLabel,{"data-testid":"left-time",children:g})]})]}),(0,o.jsx)(d.Button,{className:b()["coming-soon-store__button"],role:"button",onClick:e=>{e.stopPropagation(),null==_||_()},variant:"text",IconRight:n.ArrowRight,"data-testid":"view-store-button",children:x("storeLocator.button.viewStoreDetails")}),!f&&(0,o.jsx)(d.Divider,{"data-testid":"divider"})]})};var y=s(72077),f=s.n(y),v=s(52140);let C=e=>{let{weeklySchedule:t={},holidayHours:s=[],distance:i,availabilityStatusDisplay:c,address:_="",ph
1oneNumber:g="",storeName:m="",isStoreOpened:p=!1,isStoreDefault:b=!0,timeOpens:x="9:00",timeCloses:y="6:00",handleStoreButtonClick:C,handleViewStoreButtonClick:w,handleDefaultStoreButtonClick:S,variant:j="default",onClose:N,isSelectButtonDisabled:k=!1,...L}=e,A=(0,l.c)(),E=(0,a.useId)(),M="map-popup"===j,I=(e,t)=>{e.stopPropagation(),null==t||t()},O=(0,o.jsxs)(o.Fragment,{children:[b?(0,o.jsx)(d.Button,{onClick:S,className:f()["existing-store__default-store-button"],IconLeft:()=>(0,o.jsx)(n.PaLogoIcon32,{stroke:r.s3S}),disabled:!0,children:(0,o.jsx)("span",{className:"body-l-regular",children:A("storeLocator.button.myDefaultStore")})}):(0,o.jsx)(d.Button,{onClick:e=>I(e,C),className:f()["existing-store__select-button"],variant:"primary",disabled:k,children:A("storeLocator.button.selectThisStore")}),(0,o.jsx)(d.Button,{onClick:e=>I(e,w),className:f()["existing-store__view-details-button"],variant:"text",IconRight:n.ArrowRight,children:A("storeLocator.button.viewStoreDetails")})]});return(0,o.jsxs)("div",{role:"region",id:E,className:f()["existing-store__container"],...L,children:[(0,o.jsxs)("div",{className:f()["existing-store__header-container"],children:[(0,o.jsxs)("div",{className:f()["existing-store__header"],children:[i&&(0,o.jsx)("div",{className:f()["existing-store__header--distance"],children:(0,o.jsxs)(d.NeutralLabel,{children:[i," ",A("storeLocator.keywords.away")]})}),c&&(0,o.jsx)("div",{className:f()["existing-store__availability-status"],children:c}),M&&(0,o.jsx)(h,{onClick:N})]}),(0,o.jsx)("div",{className:u()(f()["existing-store__name"],"heading-level-4-special"),children:m})]}),(0,o.jsxs)("div",{className:f()["existing-store__details"],children:[(0,o.jsxs)("div",{className:f()["existing-store__details--address"],children:[(0,o.jsx)(n.PlaceSolid,{role:"img","aria-label":A("storeLocator.store.icon.address"),color:r.FYT,width:r.mDK,height:r.mDK}),(0,o.jsx)("div",{className:"body-s-regular",children:_})]}),(0,o.jsxs)("div",{className:f()["existing-store__details--phone"],children:[(0,o.jsx)(n.PhoneSolid,{role:"img","aria-label":A("storeLocator.store.icon.phone"),color:r.FYT,width:r.mDK,height:r.mDK}),(0,o.jsx)(d.Link,{href:"tel:".concat(g),className:"body-s-regular","aria-label":A("storeLocator.store.phoneLink.ariaLabel",{storeName:m.replace(/^\d+\.\s*/,""),phoneNumber:g}),children:g})]}),(0,o.jsx)(v.H,{baseId:E,isStoreOpened:p,timeCloses:y,timeOpens:x,weeklySchedule:t,holidayHours:s})]}),(0,o.jsx)("div",{className:f()["existing-store__actions"],children:O}),!M&&(0,o.jsx)(d.Divider,{"data-testid":"divider"})]})},w=e=>{let{isComingSoon:t,...s}=e;return t?(0,o.jsx)(x,{...s}):(0,o.jsx)(C,{...s})};var S=s(2661),j=s(36302),N=s(97101),k=s(77540),L=s(41159),A=s(98722),E=s(88180),M=s(40440),I=s(30877);let O=e=>{let{storeLocations:t,setSelectedId:s,showAvailability:r=!1,isPdpContext:n=!1}=e,d=(0,N.rd)(),c=(0,E.G)(),u=(0,l.c)(),_=(0,L.jL)(),g=(0,L.GV)(A.UW),m=(0,M.G)(),{isStoreSelectorSidebarOpen:h}=(0,L.GV)(e=>e.locations),p=(0,a.useCallback)(()=>{h&&_((0,A.Xe)())},[h,_]),b=(0,a.useCallback)((e,t)=>{d.push((0,j.Tp)(e,t))},[d]),x=(0,a.useCallback)(e=>{m(e),s(e),p()},[m,s,p]);return(0,a.useMemo)(()=>t.map((e,t)=>{var s,l,d;let _=null==(d=e.metafields)||null==(l=d.edges)||null==(s=l.find(e=>e.node.key===S.F9.DATE_OPENED))?void 0:s.node.value,m=(0,I.le)(_||"0"),h=e.allItemsAvailable,p=(0,k.p)(null==e?void 0:e.weeklySchedule,null==e?void 0:e.holidayHours,null==e?void 0:e.timeZone),y={storeId:e.id,storeName:(0,I.ug)(e,t,c),distance:e.distanceKm?"".concat(e.distanceKm.toFixed(1)," km"):void 0,address:(0,I.M0)(e,c),handleViewStoreButtonClick:()=>b(e.name,e.id),availabilityStatusDisplay:null!=h&&(0,o.jsx)(i.Up,{label:u(((e,t)=>t?e?"storeCard.itemAvailable.label":"storeCard.itemNotAvailable.label":e?"storeCard.allItemsAvailable.label":"storeCard.notAllItemsAvailable.label")(h,n)),size:"xs",dotVariant:h?"positive":"negative"}),isSelectButtonDisabled:r&&!n&&!h};return m>0?(0,a.createElement)(w,{...y,key:e.id,isComingSoon:!0,expectedOpenDate:(0,I.HL)(_||"0",c),leftTime:"".concat(m," ").concat(u("storeLocator.store.daysLeft.label"))}):(0,a.createElement)(w,{...y,key:e.id,isComingSoon:!1,isStoreDefault:e.id===g,isStoreOpened:p.open,timeOpens:p.opening,timeCloses:p.closing,phoneNumber:(0,I.H9)(null==e?void 0:e.phone),weeklySchedule:null==e?void 0:e.weeklySchedule,holidayHours:null==e?void 0:e.holidayHours,handleStoreButtonClick:()=>x(e.id)})}),[t,c,u,r,n,g,b,x])}},48287:e=>{e.exports={"share-geo-button":"styles_share-geo-button__Po0Do"}},52140:(e,t,s)=>{"use strict";s.d(t,{H:()=>x});
1var o=s(54568),a=s(72276),i=s(83985),l=s(25150),r=s.n(l),n=s(78641),d=s(7620),c=s(88180),u=s(2826),_=s(6304),g=s.n(_),m=s(10790),h=s(64315),p=s.n(h);let b=e=>{let{contentId:t,isStoreOpenedLocal:s,isStoreOpened:i,timeCloses:l,timeOpens:d,isExpanded:_,handleToggleClick:g}=e,h=(0,n.c)(),b=(0,c.G)();return(0,o.jsxs)("div",{className:p()["table-accordion__availability"],"data-testid":"timing-table-header",children:[(0,o.jsx)(m.ClockSolid,{role:"img","aria-label":h("storeLocator.store.icon.hours"),className:p()["table-accordion__clock-icon"],"data-testid":"clock-icon"}),(0,o.jsxs)("div",{className:p()["table-accordion__availability--container"],"data-testid":"timing-status-container",children:[(0,o.jsxs)("span",{className:p()["table-accordion__availability-text"],"data-testid":"timing-status-text",children:[(0,o.jsx)("span",{className:r()("body-s-bold",p()["table-accordion__availability--status"]),role:"status","aria-live":"polite","aria-atomic":"true","data-testid":"timing-status",children:(0,o.jsx)("span",{className:p()["table-accordion__availability--status--".concat(s)],"data-testid":"store-is-".concat(s),children:h("storeSelector.status.".concat(s))})}),(0,o.jsx)("span",{className:"body-s-regular",children:","})]}),(0,o.jsx)("span",{className:"body-s-regular","data-testid":"store-time-text",children:i?"".concat(h("storeSelector.status.closes")," ").concat((0,u.So)(l,b)):"".concat(h("storeSelector.status.opens")," ").concat((0,u.So)(d,b))})]}),(0,o.jsx)("button",{type:"button",className:r()(p()["table-accordion__availability--toggle"]),onClick:g,"aria-controls":t,"aria-expanded":_,"aria-label":h("storeLocator.store.icon.hours"),"data-testid":"timing-table-toggle",children:_?(0,o.jsx)(m.ChevronUp,{width:a.Y6Q,height:a.Y6Q,className:"table-accordion__chevron-icon","data-testid":"chevron-up","aria-hidden":"true"}):(0,o.jsx)(m.ChevronDown,{width:a.Y6Q,height:a.Y6Q,className:"table-accordion__chevron-icon","data-testid":"chevron-down","aria-hidden":"true"})})]})};b.displayName="TableAccordion";let x=e=>{let{weeklySchedule:t,holidayHours:s,isStoreOpened:l,timeOpens:_="9:00",timeCloses:m="6:00",fullSize:h=!1,baseId:p}=e,x=(0,n.c)(),y=(0,c.G)(),f=!(0,i.useMediaQuery)("(min-width: ".concat(a.AXY,")")),[v,C]=(0,d.useState)(h),[w,S]=(0,d.useState)(!0),[j,N]=(0,d.useState)("0px"),k="table-content-".concat(p),L=(0,d.useRef)(null),A="holiday-hours-".concat(p),E=Object.entries(t).map(e=>{let[t,s]=e;return{day:x("storeLocator.schedule.".concat(t).concat(h?".long":".short")),...s,opening:s.open?(0,u.So)(s.opening,y):x("storeLocator.store.status.closed.label"),closing:s.open?(0,u.So)(s.closing,y):""}}),M=[{header:x("storeLocator.tableHeader.day"),field:"day",isPrimary:!0},{header:x("storeLocator.tableHeader.openTime"),field:"opening"},{header:x("storeLocator.tableHeader.closeTime"),field:"closing"}],I=[{header:x("storeLocator.tableHeader.holiday.label"),field:"label",isPrimary:!0,width:h&&!f?"242px":"auto"},{header:x("storeLocator.tableHeader.openTime"),field:"opening"},{header:x("storeLocator.tableHeader.closeTime"),field:"closing"}],O=s.map(e=>({label:(0,u.a_)(x("storeLocator.holiday.".concat(e.label.toLowerCase()).split(" ").join("-")),e.opening,y),opening:e.open?(0,u.So)((0,u.W3)(e.opening),y):x("storeLocator.store.status.closed.label"),closing:e.open?(0,u.So)((0,u.W3)(e.closing),y):""}));return(0,d.useEffect)(()=>{if(L.current){let{scrollHeight:e}=L.current;N(v?"".concat(e,"px"):"0px")}w&&S(!1)},[v,w]),(0,o.jsxs)(o.Fragment,{children:[!h&&(0,o.jsx)(b,{contentId:k,isStoreOpenedLocal:l?"open":"close",isStoreOpened:l,timeCloses:m,timeOpens:_,isExpanded:v,handleToggleClick:e=>{var t;null!=(t=L.current)&&t.contains(e.target)||(()=>{if(!L.current)return;let{scrollHeight:e}=L.current;N(v?"0px":"".concat(e,"px")),C(e=>!e)})()}}),(t||s)&&(0,o.jsxs)("div",{ref:L,id:k,className:r()(g()["existing-store__expanded-content".concat(h?"--fullSize":"")]),hidden:!v,style:w?{}:{height:h?"auto":j,opacity:+!!v},"data-testid":"timing-table-content",children:[(0,o.jsxs)("section",{"aria-labelledby":k,children:[h&&(0,o.jsx)("div",{className:g()["existing-store__holiday-hours__title"],id:A,children:(0,o.jsx)("h2",{className:"body-l-bold",children:x("storeLocator.store.storeHours.title.label").toUpperCase()})}),(0,o.jsx)(i.Table,{className:g()["existing-store__table"],columns:M,data:E,"data-testid":"operating-timing-table",tableHeaderClassName:g()["existing-store__table--header"]})]}),(0,o.jsxs)("section",{className:"existing-store__holiday-hours","aria-labelledby":A,children:[(0,o.jsx)("div",{className:g()["existing-store__holiday-hours__title"],id:A,children:h?(0,o.jsx)("h2",{className:"body-l-bold",children:x("storeLocator.store.holidayHours.title.label").toUpperCase()}):(0,o.jsx)("h3",{className:"body-l-bold",children:x("storeLocator.store.holidayHours.title.label")})}),(0,o.jsx)(i.Table,{className:g()["existing-store__table"],columns:I,data:O,"data-testid":"holiday-timing-table",tableHeaderClassName:g()["existing-store__table--header"]})]})]})]})}},53019:(e,t,s)=>{"use strict";s.d(t,{_:()=>a});var o=s(12247);let a=(0,o.createServerReference)("7fb423b313882238bfea1a70e8c7de7770d4e4d3d3",o.callServer,void 0,o.findSourceMapURL,"geocodeCityViewportRadiusCA")},64315:e=>{e.exports={"table-accordion__availability":"styles_table-accordion__availability__XWEPm","table-accordion__availability--toggle":"styles_table-accordion__availability--toggle__ibHKc","table-accordion__availability--container":"styles_table-accordion__availability--container__VYveg","table-accordion__availability-text":"styles_table-accordion__availability-text__vHYAl","table-accordion__availability--status":"styles_table-accordion__availability--status__a0aUq","table-accordion__availability--status--open":"styles_table-accordion__availability--status--open__YnVfi","table-accordion__availability--status--close":"styles_table-accordion__availability--status--close__wypvG","table-accordion__clock-icon":"styles_table-accordion__clock-icon__Ao3e7"}},64562:e=>{e.exports={"coming-soon-store__container":"styles_coming-soon-store__container__cK1Ec","coming-soon-store__header-container":"styles_coming-soon-store__header-container__kY1Ty","coming-soon-store__header":"styles_coming-soon-store__header__w_954","coming-soon-store__header--banner":"styles_coming-soon-store__header--banner__A1Xru","coming-soon-store__name":"styles_coming-soon-store__name__kKwyh","coming-soon-store__details":"styles_coming-soon-store__details__Gx3Fv","coming-soon-store__details--address":"styles_coming-soon-store__details--address__GC2_g","coming-soon-store__details--expected":"styles_coming-soon-store__details--expected__MAV1A","coming-soon-store__button":"styles_coming-soon-store__button__yV_qm"}},68733:(e,t,s)=>{"use strict";s.d(t,{A:()=>a});var o=s(12247);let a=(0,o.createServerReference)("7f1e8883c1abb20644e348d543c7a0ea591a8a178f",o.callServer,void 0,o.findSourceMapURL,"geocodePostalCA")},70484:(e,t,s)=>{"use strict";s.d(t,{Up:()=>o.AvailabilityStatus});var o=s(83985)},72077:e=>{e.exports={"existing-store__container":"styles_existing-store__container__ycLjq","existing-store__header-container":"styles_existing-store__header-container__6renj","existing-store__header":"styles_existing-store__header__T0pE0","existing-store__header--distance":"styles_existing-store__header--distance__B5FOp","existing-store__availability-status":"styles_existing-store__availability-status__I7mZO","existing-store__name":"styles_existing-store__name__MDGwp","existing-store__details":"styles_existing-store__details__yivv_","existing-store__details--address":"styles_existing-store__details--address__m4KnZ","existing-store__details--phone":"styles_existing-store__details--phone__MRWL_","existing-store__actions":"styles_existing-store__actions__2JE6M","existing-store__select-button":"styles_existing-store__select-button__Xa2jl","existing-store__view-details-button":"styles_existing-store__view-details-button__TY3Vb","existing-store__default-store-button":"styles_existing-store__default-store-button__GF4qI","existing-store__table":"styles_existing-store__table__9h5O7"}},77432:e=>{e.exports={"store-card-close-button":"styles_store-card-close-button__W_iBA"}},88626:(e,t,s)=>{"use strict";s.d(t,{h:()=>_});var o=s(54568),a=s(72276),i=s(10790),l=s(1488),r=s(25150),n=s.n(r),d=s(78641),c=s(48287),u=s.n(c);let _=e=>{let{className:t,...s}=e,r=(0,d.c)();return(0,o.jsx)(l.K0,{Icon:()=>(0,o.jsx)(i.LocationOutline,{color:a.FYT}),variant:"secondary",className:n()(u()["share-geo-button"],t),"aria-label":r("storeLocator.geoAccess.button.label"),...s})}},92256:(e,t,s)=>{"use strict";s.d(t,{H:()=>a,f:()=>o});let o=e=>{if(!e)return{};let t={};
1return Object.entries(e).forEach(e=>{let[s,o]=e;o&&"object"==typeof o&&"open"in o&&(t[s]={open:o.open,opening:o.opening||"",closing:o.closing||""})}),t},a=e=>e&&Array.isArray(e)?e.map(e=>({label:e.label,open:e.open,opening:e.opening||"",closing:e.closing||""})):[]},93804:e=>{e.exports={"store-list":"styles_store-list____rS1","store-list__error":"styles_store-list__error__tRQD7","store-list__content":"styles_store-list__content__eQHWR","store-list__card":"styles_store-list__card__Jn4pg","store-list__card--selected":"styles_store-list__card--selected__YB_Tk","store-list__load-more":"styles_store-list__load-more__efdxN"}},95026:(e,t,s)=>{"use strict";s.d(t,{Q:()=>a});var o=s(92256);let a=e=>{var t,s,a,i,l,r,n,d,c,u,_;return{id:e.entityId,code:e.code,name:e.label,phone:null==(t=e.address)?void 0:t.phone,address:{address1:null==(s=e.address)?void 0:s.address1,address2:null==(a=e.address)?void 0:a.address2,city:null==(i=e.address)?void 0:i.city,stateOrProvince:null==(l=e.address)?void 0:l.stateOrProvince,postalCode:null==(r=e.address)?void 0:r.postalCode,countryCode:null==(n=e.address)?void 0:n.countryCode},latitude:null!=(u=null==(d=e.address)?void 0:d.latitude)?u:null,longitude:null!=(_=null==(c=e.address)?void 0:c.longitude)?_:null,distanceKm:null,weeklySchedule:(0,o.f)(e.operatingHours),holidayHours:(0,o.H)(e.specialHours),timeZone:e.timeZone,metafields:e.metafields}}}}]);

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.