1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3743],{14878:(e,t,r)=>{r.d(t,{b:()=>a});var n=r(71488);let a={HOME:{get:()=>"/"},MY_CART:{get:()=>"/mycart"},SAVE_FOR_LATER:{get:()=>"/mycart#saved-for-later"},CHECKOUT:{get:()=>"/checkout"},ORDER_CONFIRMATION:{get:()=>"/order-confirmation/[orderId]",set:e=>"/order-confirmation/".concat(e)},PRE_CHECKOUT:{get:()=>"/pre-checkout"},SIGNIN:{get:()=>"/signin"},SIGNUP:{get:()=>"/signup"},PDP:{get:()=>"/product/[name]/[PalID]/[sku]",set:(e,t,r)=>r?"/product/".concat(e,"/").concat(t,"/").concat(r):"/product/".concat(e,"/").concat(t)},PDP_GIFT_CARD:{get:()=>"/product/GiftCard"},CATEGORY:{set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",a=n.kW.category[r.startsWith("fr")?"fr":"en"],s=(null==e?void 0:e.startsWith("/"))?e.slice(1):e||"";return"/".concat(a,"/").concat(s,"/").concat(t)}},CATEGORY_LANDING:{set:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"en",a=r.startsWith("fr")?"fr":"en",s=n.kW.category[a],l=n.kW.landing[a];return"/".concat(s,"/").concat(l,"/").concat(e,"/").concat(t)}},BRAND:{get:()=>"/brands/[...path]/[categoryId]",set:(e,t)=>"/brands".concat(e.startsWith("/")?"":"/").concat(e,"/").concat(t)},PAYMENT_ACCOUNTS:{get:()=>"https://www.princessauto.com/en/payments-accounts"},MY_ACCOUNT:{get:()=>"/my-account"},MY_ACCOUNT_DASHBOARD:{get:()=>"/my-account/dashboard"},MY_ACCOUNT_PROFILE:{get:()=>"/my-account/profile"},EDIT_MY_ACCOUNT_PROFILE:{get:()=>"/my-account/profile/edit-profile-settings"},MY_ACCOUNT_ORDERS:{get:()=>"/my-account/orders"},MY_ACCOUNT_ORDER_DETAILS:{get:()=>"/my-account/orders/[id]",set:e=>"/my-account/orders/".concat(e)},MY_ACCOUNT_ADDRESSES:{get:()=>"/my-account/addresses"},MY_ACCOUNT_PAYMENT_METHODS:{get:()=>"/my-account/payment-methods"},ORDER_STATUS:{get:()=>"/order-status/",set:e=>"/order-status/".concat(e)},ADD_PAYMENT_METHOD:{get:()=>"/my-account/payment-methods/add-payment-method"},MY_ACCOUNT_EMAILS_NEWSLETTERS:{get:()=>"/my-account/emails-newsletters"},EDIT_EMAILS_NEWSLETTERS:{get:()=>"/my-account/emails-newsletters/edit"},MY_ACCOUNT_GIFT_CARDS:{get:()=>"/my-account/gift-cards"},MY_ACCOUNT_WISHLISTS:{get:()=>"/my-account/wishlists"},MY_ACCOUNT_PREFERRED_STORE:{get:()=>"/store-locator"},MY_ACCOUNT_CHANGE_PASSWORD:{get:()=>"/my-account/profile/change-password"},ADD_ADDRESS:{get:()=>"/my-account/addresses/add-address"},EDIT_ADDRESS:{get:()=>"/my-account/addresses/edit-address"},CREATE_WISHLIST:{get:()=>"/my-account/wishlists/create-wishlist"},WISHLIST_DETAILS:{get:()=>"/my-account/wishlists/[wishListId]",set:e=>"/my-account/wishlists/".concat(e)},WISHLIST_EDIT:{get:()=>"/my-account/wishlists/[wishListId]/edit",set:e=>"/my-account/wishlists/".concat(e,"/edit")},ADD_GIFT_CARD:{get:()=>"/my-account/gift-cards/add-gift-card"},STORE_LOCATOR:{get:()=>"/store-locator",set:e=>"/store-locator/".concat(e)},STORE_DETAILS:{get:()=>"/store-locator/store/[slug]",set:e=>"/store-locator/store/".concat(e)},RESOURCES_LANDING_PAGE:{get:()=>"/resources"},BUYING_GUIDES:{set:e=>"/buying-guides/".concat(e)},TECH_TIPS:{set:e=>"/tech-tips/".concat(e)},PROJECT_SHOWCASES:{set:e=>"/project-showcases/".concat(e)},SEARCH:{get:()=>"/search",set:e=>"/search?q=".concat(encodeURIComponent(e))},FLYER:{get:()=>"/flyers"},GIFT_CARDS:{get:()=>"/gift-cards"},NATIONAL_CALL_CENTRE:{get:()=>"/national-call-centre"},PAYPAL_LOADING:{get:()=>"/paypal-loading"},PAYPAL_POPUP_CALLBACK:{get:()=>"/paypal-popup-callback"},CONTACT_US:{get:()=>"/contact-us"}}},49321:(e,t,r)=>{r.d(t,{F:()=>g});var n=r(9660),a=r(81058),s=r(54877),l=r(40459);let o="https://api.princessauto.com",c=[{prefix:"/ecom/auth",envKey:"NEXT_PUBLIC_LOCAL_USER_URL"},{prefix:"/ecom/user",envKey:"NEXT_PUBLIC_LOCAL_USER_URL"},{prefix:"/ecom/cart",envKey:"NEXT_PUBLIC_LOCAL_CART_URL"},{prefix:"/ecom/orders",envKey:"NEXT_PUBLIC_LOCAL_ORDERS_URL"},{prefix:"/ecom/payments",envKey:"NEXT_PUBLIC_LOCAL_PAYMENTS_URL"}];var i=r(44550);let u={UNAUTHORIZED:401},d=async(e,t,r)=>{var a;let d,g="string"==typeof e?e:e.url,m=(d="string"==typeof g&&g.startsWith("http")?"":(e=>{let t=e.startsWith("/")?e:"/".concat(e);for(let{prefix:e,envKey:r}of c)if(t.startsWith(e)){let e=l.env[r];if(e)return e.replace(/\/+$/,"");break}return o.replace(/\/+$/,"")})(g),(0,n.cw)({baseUrl:d,prepareHeaders:async e=>{let t=await (0,s.H)(),r=null==t?void 0:t.bearer;return r&&e.set("Authorization",r),e}})),f=await m(e,t,r);if((null==(a=f.error)?void 0:a.status)===u.UNAUTHORIZED){(0,s.G)();let n=await (0,s.H)();(null==n?void 0:n.bearer)&&"RefreshAccessTokenError"!==n.error&&(n.userInfo&&t.dispatch((0,i.E8)({id:String(n.userInfo.id),firstName:String(n.userInfo.firstName),lastName:String(n.userInfo.lastName),email:String(n.userInfo.email),phone:String(n.userInfo.phone)||null,preferences:n.userInfo.preferences})),f=await m(e,t,r))}return f},g=(0,a.xP)({reducerPath:"api",baseQuery:d,tagTypes:["Auth","User","Cart","Orders","Wishlists","SalesForce"],endpoints:()=>({})})},71488:(e,t,r)=>{r.d(t,{WH:()=>a,kW:()=>n});let n={category:{en:"category",fr:"cat\xe9gorie"},landing:{en:"landing",fr:"page-de-renvoi"},"project-showcases":{en:"project-showcases",fr:"demonstration-de-projets"},"buying-guides":{en:"buying-guides",fr:"guide-d-achat"},"tech-tips":{en:"tech-tips",fr:"conseils-techniques"},resources:{en:"resources",fr:"ressources"},mycart:{en:"mycart",fr:"panier"},"order-status":{en:"order-status",fr:"suivi-commande"},brands:{en:"brands",fr:"marques"},compare:{en:"compare",fr:"comparer"},"gift-cards":{en:"gift-cards",fr:"cartes-cadeaux"},"contact-us":{en:"contact-us",fr:"nous-joindre"},"submit-project":{en:"submit-project",fr:"soumettre-projet"},"recycling-information":{en:"recycling-information",fr:"information-recyclage"},"sign-in-newsletter":{en:"sign-in-newsletter",fr:"inscription-infolettre"},"store-locator":{en:"store-locator",fr:"localisateur-de-magasin"},flyersView:{en:"flyersView",fr:"circulaires"}},a=(e,t)=>{let r=t.startsWith("fr")?"fr":"en";return n[e][r]}},74680:(e,t,r)=>{r.d(t,{Ke:()=>m,Mh:()=>g,Pl:()=>u,ZT:()=>i,aR:()=>d,by:()=>f,mj:()=>c});let n=e=>{let t=new Date(e);return t.setHours(0,0,0,0),t},a=(e,t)=>{var r,n;let a=null==e||null==(n=e.find(e=>{var r;return(null==e||null==(r=e.node)?void 0:r.key)===t}))||null==(r=n.node)?void 0:r.value;return null!=a?a:null},s=e=>{var t;if(!e)return null;let r=e.trim();if(!r)return null;let n=null!=(t=r.split(/\s+/)[0])?t:"";if(!n)return null;let a=n.split(/[/-]/);if(3!==a.length)return null;let[s,l,o]=a;
1if(!s||!l||!o)return null;let c=null;if(4===s.length?c=[Number(s),Number(l),Number(o)]:4===o.length&&(c=[Number(o),Number(s),Number(l)]),!c)return null;let[i,u,d]=c;if(Number.isNaN(i)||Number.isNaN(u)||Number.isNaN(d)||u<1||u>12||d<1||d>31)return null;let g=new Date(i,u-1,d);return g.getFullYear()!==i||g.getMonth()!==u-1||g.getDate()!==d?null:g},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=s(e);if(!r)return null;let a=n(r),l=n(t);return Math.max(0,Math.ceil((a.getTime()-l.getTime())/864e5))},o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,r=s(e);return!!r&&n(r)>n(t)},c=(e,t,r)=>{var n;let s=null==e?void 0:e.find(e=>(null==e?void 0:e.sku)===t);return a(null==s||null==(n=s.metafields)?void 0:n.edges,r)},i=(e,t,r)=>{var n;if(!t)return null;let s=null==e?void 0:e.find(e=>(null==e?void 0:e.entityId)===t);return a(null==s||null==(n=s.metafields)?void 0:n.edges,r)},u=(e,t)=>c(e,t,"arrivalDate"),d=(e,t)=>i(e,t,"arrivalDate"),g=e=>{let{productStatus:t,skuStatus:r,variantArrivalDate:n,productArrivalDate:a,now:c=new Date}=e,i=n||a||null,u=o(i,c),d=("O"===t||"O"===r)&&u;return{isComingSoon:d,arrivalDate:d?i:null,formattedArrivalDate:d?(e=>{let t=s(e);if(!t)return null;let r=t.getDate(),n=t.toLocaleString("en-US",{month:"short"}).toUpperCase(),a=t.getFullYear();return"".concat(r," ").concat(n," ").concat(a)})(i):null,daysUntilArrival:d?l(i,c):null}},m=e=>a(e,"productStatus"),f=e=>a(e,"arrivalDate")},88418:(e,t,r)=>{r.r(t),r.d(t,{ShopByCategories:()=>u});var n=r(54568),a=r(83985),s=r(97066),l=r(14878),o=r(9323);let c="/surplus",i=e=>{var t,r,n;return(null==(r=e.data)||null==(t=r.slug)?void 0:t.replace(/\/$/,""))===c||(null==(n=e.path)?void 0:n.replace(/\/$/,""))===c},u=e=>{var t,r;let{title:c,newArrivalsText:u,newArrivalsPath:d="/new-arrivals",className:g,sectionClassName:m,showProductCountFilter:f=!0}=e,_=null!=(r=null==(t=(0,o._4)())?void 0:t.children)?r:[],p=(0,s.c)();if(!_||0===_.length)return null;let A=_.filter(e=>{if(f&&"count"in e){var t;return(null!=(t=e.count)?t:0)>0&&!e.display_name.includes(p("category.filters.sale"))}return!e.display_name.includes(p("category.filters.sale"))}).toSorted((e,t)=>i(e)?1:i(t)?-1:0).map(e=>{var t,r,n,a;let s=null!=(n=e.display_name)?n:e.name;return{imageSrc:null!=(a=null==e||null==(t=e.data)?void 0:t.image_url)?a:"/images/default-img.svg",imageAlt:s,categoryName:s,categoryLink:l.b.CATEGORY.set(null==e||null==(r=e.data)?void 0:r.slug,e.group_id),variant:i(e)?"surplus":"default"}}),y={categoryLink:d,text:u||p("home.shopByCategory.allNewArrivals")},C=(0,n.jsx)(a.CategoryGroup,{title:c||p("home.shopByCategory.title"),categories:[...A,y],className:g});return m?(0,n.jsx)("section",{className:m,children:C}):C}}}]);
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.