PageSourceSearch

https://www.coversandall.com/_next/static/chunks/8824-93765655b6fbfbd0.js

js coversandall.com collected 2026-10-03 19:20:26 UTC 51,733 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8824],{1691:(e,t,l)=>{"use strict";l.d(t,{Tabs:()=>s,TabsContent:()=>u,TabsList:()=>o,TabsTrigger:()=>d});var a=l(95155),r=l(12115),i=l(32321),n=l(2582);let s=e=>{let{defaultValue:t,children:l,className:n,onValueChange:s}=e,[o,d]=(0,r.useState)(t),u=e=>{d(e),s&&s(e)};return(0,a.jsx)("div",{className:(0,i.cn)("flex flex-col items-center gap-2",n),"data-tabs":o,children:r.Children.map(l,e=>(0,i.sW)(e,{activeValue:o,setActiveValue:u}))})},o=e=>{let{children:t,activeValue:l,setActiveValue:n,className:s}=e;return(0,a.jsx)("div",{role:"tablist","aria-label":"Tabs",className:(0,i.cn)("flex w-fit items-center justify-center gap-x-2 rounded-lg border border-gray-500 p-2",s),children:r.Children.map(t,e=>(0,i.sW)(e,{activeValue:l,setActiveValue:n}))})},d=e=>{let{value:t,children:l,activeValue:r,setActiveValue:s,className:o,activeClassName:d,mobileLink:u,title:c,onClick:m}=e,p=t===r,{isDesktop:g}=(0,n.Q)();return!g&&u?(0,a.jsx)("a",{title:c,href:u,className:(0,i.cn)("flex cursor-pointer items-center rounded-lg border border-transparent px-4 py-2",o,{[d||"bg-primary text-white"]:p}),children:l}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("input",{type:"radio",id:"tab-".concat(t),name:"tabs",className:"hidden",checked:p,onChange:()=>{null==m||m(),null==s||s(t)}}),(0,a.jsx)("label",{htmlFor:"tab-".concat(t),role:"tab",title:c,"aria-selected":p?"true":"false",className:(0,i.cn)("cursor-pointer rounded-lg border border-transparent px-4 py-2",o,{[d||"bg-primary text-white"]:p}),children:l})]})},u=e=>{let{value:t,children:l,activeValue:r,className:n="",lazy:s=!1}=e,o=t===r;if(s&&!o)return null;let d="function"==typeof l?l():l;return(0,a.jsx)("div",{role:"tabpanel",className:(0,i.cn)(o?"block ".concat(n):"hidden"),"data-state":o?"active":"inactive",children:d})}},21464:(e,t,l)=>{"use strict";l.d(t,{A:()=>o});var a=l(95155),r=l(12115),i=l(99386),n=l(33634);let s=["1","2","3","4","5","6","7","8","9","0","."];function o(e){let{onKeyPress:t,onDelete:l,productOptions:o}=e,d=(0,r.useRef)(null);return(0,a.jsxs)("div",{ref:d,className:"sticky bottom-0 z-[1002] w-full border-t border-gray-600 bg-white p-4 pb-[calc(env(safe-area-inset-bottom)+0.5rem)] shadow-lg [@media_(max-width:360px)]:pt-2",children:[(0,a.jsx)(n.A,{productOptions:o,className:"border-t-transparent !pt-0 pb-3"}),(0,a.jsxs)("div",{className:"mb-2 grid grid-cols-6 gap-2",children:[s.map(e=>(0,a.jsx)("button",{className:"rounded-lg border border-gray-600 py-2 text-sm shadow-[0_2px_0_rgba(0,0,0,0.25)] hover:bg-gray-50",onClick:()=>t(e),type:"button",children:e},e)),(0,a.jsx)("button",{type:"button",onClick:l,className:"flex items-center justify-center rounded-lg border border-gray-600 py-2 text-xs shadow-[0_2px_0_rgba(0,0,0,0.25)] hover:bg-gray-50",children:(0,a.jsx)(i.f,{size:16})})]})]})}},26395:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var a=l(95155),r=l(32321),i=l(22325),n=l(89690),s=l(52827),o=l(70104);let d=e=>{let{className:t="space-y-2",children:l,visibleCount:d,mode:u,labelClassName:c,buttonClassName:m,showLabel:p="Show More",hideLabel:g="Show Less",iconPosition:h="right"}=e,{expanded:v,toggle:f,renderedChildren:x,shouldShowToggle:b}=(0,s.b)({children:l,visibleCount:d,mode:u}),_=v?i.S:n.b,y=(0,a.jsxs)("button",{onClick:f,className:(0,r.cn)(m,"group flex items-center gap-1"),children:["left"===h&&(0,a.jsx)(_,{size:16,className:"transition-transform",weight:"bold"}),(0,a.jsx)(o.default,{className:(0,r.cn)(c),children:v?g:p}),"right"===h&&(0,a.jsx)(_,{size:16,className:"transition-transform",weight:"bold"})]});return(0,a.jsxs)("div",{className:(0,r.cn)(t),children:["hidden"===u&&b&&y,x,"collapsed"===u&&b&&y]})}},29562:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var a=l(95155),r=l(67909),i=l(12115),n=l(46429);let s=(0,r.default)(()=>Promise.all([l.e(7284),l.e(9172),l.e(2194),l.e(5544)]).then(l.bind(l,95544)),{loadableGenerated:{webpack:()=>[95544]},ssr:!1,loading:()=>(0,a.jsx)("div",{className:"h-full w-full animate-pulse rounded bg-gray-100"})}),o=(0,i.forwardRef)((e,t)=>{let{deferUntilVisible:l=!0,intersectionRootMargin:r="280px 0px",...i}=e,o=!1===l,{ref:d,inView:u}=(0,n.Wx)({triggerOnce:!0,rootMargin:r,skip:o,initialInView:o}),c=(0,a.jsx)("div",{className:"h-full w-full animate-pulse rounded bg-gray-100","aria-hidden":!0});return(0,a.jsx)("div",{ref:d,className:"h-full w-full",children:u?(0,a.jsx)(s,{...i,ref:t}):c})});o.displayName="SwiperCarouselLazy";let d=o},40942:(e,t,l)=>{"use strict";l.d(t,{F:()=>r});var a=l(30926);let r=(0,a.createServerReference)("403dad995c9b15a7a38156bdabd919ecb78885b034",a.callServer,void 0,a.findSourceMapURL,"addQuotationProductWithMagentoCookies")},41821:(e,t,l)=>{"use strict";l.d(t,{A:()=>d});var a=l(95155),r=l(12115),i=l(48093),n=l(5512),s=l(58921),o=l(32321);let d=e=>{let{children:t,className:l="",itemWidth:d,gap:u=8,showArrows:c=!0,parentClassName:m="",arrowClassName:p="",arrowSVGClassName:g="",arrowSVGSize:h=20,arrowWeight:v="regular",itemSelector:f}=e,x=void 0===d,{scrollRef:b,canScrollLeft:_,canScrollRight:y,scrollToLeft:C,scrollToRight:w,checkScrollPosition:N,calculateItemWidth:A,mouseHandlers:j,isScrollable:T}=(0,s.r)({itemWidth:d,gap:u,autoCalculateWidth:x,itemSelector:f});return(0,r.useEffect)(()=>{let e=setTimeout(()=>{x&&A(),N()},1e3);return()=>clearTimeout(e)},[t,x,A,N]),(0,a.jsxs)("div",{className:(0,o.cn)("relative",m),children:[c&&T&&(0,a.jsx)("button",{disabled:!_,onClick:C,className:(0,o.cn)("bg-primary absolute top-1/2 left-0 z-10 -translate-x-2 -translate-y-1/2 roun
1ded-full border p-2 shadow-md disabled:opacity-40",p),"aria-label":"Scroll left",children:(0,a.jsx)(i.e,{size:h,weight:v,className:(0,o.cn)("text-white",g)})}),(0,a.jsx)("div",{ref:b,className:(0,o.cn)("no-scrollbar cursor-grab overflow-x-scroll active:cursor-grabbing",l),...j,children:t}),c&&T&&(0,a.jsx)("button",{disabled:!y,onClick:w,className:(0,o.cn)("bg-primary absolute top-1/2 right-0 z-10 translate-x-2 -translate-y-1/2 rounded-full border p-2 shadow-md disabled:opacity-40",p),"aria-label":"Scroll right",children:(0,a.jsx)(n.J,{size:h,weight:v,className:(0,o.cn)("text-white",g)})})]})}},57569:(e,t,l)=>{"use strict";l.d(t,{B:()=>w});var a=l(95155),r=l(12115),i=l(36219),n=l(75355),s=l(17539),o=l(70104),d=l(32321),u=l(50498),c=l(85143),m=l(29976),p=l(49322),g=l(36489);let h=()=>(0,a.jsxs)("span",{className:"pointer-events-none absolute right-3 flex items-center gap-1","aria-hidden":!0,children:[(0,a.jsx)("span",{className:"bg-primary animate-dot-blink h-1.5 w-1.5 rounded-full",style:{animationDelay:"0ms"}}),(0,a.jsx)("span",{className:"bg-primary animate-dot-blink h-1.5 w-1.5 rounded-full",style:{animationDelay:"150ms"}}),(0,a.jsx)("span",{className:"bg-primary animate-dot-blink h-1.5 w-1.5 rounded-full",style:{animationDelay:"300ms"}}),(0,a.jsx)("span",{className:"bg-primary animate-dot-blink h-1.5 w-1.5 rounded-full",style:{animationDelay:"450ms"}})]});var v=l(59991),f=l(74744),x=l(76409),b=l(2582);let _=(0,a.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":!0,children:(0,a.jsx)("path",{d:"M4 10h12m0 0l-4-4m4 4l-4 4",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})}),y=(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mt-0.5 shrink-0 sm:mt-0",children:(0,a.jsx)("path",{d:"M0.577525 12C0.470348 12 0.372914 11.9695 0.285224 11.9086C0.197534 11.8478 0.12933 11.7671 0.0806133 11.6666C0.0318965 11.5662 0.00519969 11.4578 0.000522874 11.3413C-0.00415394 11.2249 0.0225429 11.1111 0.0806133 11L5.48818 0.333333C5.54664 0.222222 5.62225 0.138889 5.71501 0.0833332C5.80776 0.0277777 5.90267 0 5.99971 0C6.09675 0 6.19185 0.0277777 6.285 0.0833332C6.37814 0.138889 6.45356 0.222222 6.51124 0.333333L11.9188 11C11.9773 11.1111 12.0042 11.2251 11.9995 11.342C11.9948 11.4589 11.9679 11.5671 11.9188 11.6666C11.8697 11.7662 11.8015 11.8469 11.7142 11.9086C11.6269 11.9704 11.5295 12.0009 11.4219 12H0.577525ZM1.58596 10.6666H10.4135L5.99971 2L1.58596 10.6666ZM5.99971 9.99998C6.16535 9.99998 6.30429 9.93598 6.41653 9.80798C6.52877 9.67999 6.5847 9.52176 6.58431 9.33332C6.58392 9.14487 6.5278 8.98665 6.41595 8.85865C6.30409 8.73065 6.16535 8.66665 5.99971 8.66665C5.83407 8.66665 5.69533 8.73065 5.58347 8.85865C5.47162 8.98665 5.4155 9.14487 5.41511 9.33332C5.41472 9.52176 5.47084 9.68021 5.58347 9.80865C5.69611 9.93709 5.83485 10.0009 5.99971 9.99998ZM5.99971 7.99999C6.16535 7.99999 6.30429 7.93599 6.41653 7.80799C6.52877 7.67999 6.5847 7.52177 6.58431 7.33332V5.33332C6.58431 5.14444 6.52819 4.98621 6.41595 4.85866C6.3037 4.7311 6.16496 4.6671 5.99971 4.66666C5.83446 4.66621 5.69572 4.73021 5.58347 4.85866C5.47123 4.9871 5.41511 5.14533 5.41511 5.33332V7.33332C5.41511 7.52221 5.47123 7.68065 5.58347 7.80865C5.69572 7.93665 5.83446 8.00043 5.99971 7.99999Z",fill:"currentColor"})}),C=(0,a.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"mt-0.5 shrink-0 sm:mt-0",children:(0,a.jsx)("path",{d:"M8.18453 4.06547C8.22521 4.1061 8.25748 4.15435 8.2795 4.20746C8.30151 4.26057 8.31285 4.31751 8.31285 4.375C8.31285 4.43249 8.30151 4.48942 8.2795 4.54254C8.25748 4.59565 8.22521 4.6439 8.18453 4.68453L5.12203 7.74703C5.0814 7.78771 5.03315 7.81998 4.98004 7.84199C4.92693 7.86401 4.87 7.87534 4.8125 7.87534C4.75501 7.87534 4.69808 7.86401 4.64497 7.84199C4.59185 7.81998 4.5436 7.78771 4.50297 7.74703L3.19047 6.43453C3.10838 6.35244 3.06226 6.2411 3.06226 6.125C3.06226 6.0089 3.10838 5.89756 3.19047 5.81547C3.27256 5.73338 3.38391 5.68726 3.5 5.68726C3.6161 5.68726 3.72744 5.73338 3.80953 5.81547L4.8125 6.81898L7.56547 4.06547C7.6061 4.02479 7.65435 3.99252 7.70747 3.9705C7.76058 3.94849 7.81751 3.93716 7.875 3.93716C7.9325 3.93716 7.98943 3.94849 8.04254 3.9705C8.09565 3.99252 8.1439 4.02479 8.18453 4.06547ZM11.375 5.687
15C11.375 6.81238 11.0414 7.912 10.4165 8.8473C9.79153 9.78261 8.90327 10.5116 7.86401 10.9421C6.82476 11.3725 5.68119 11.4852 4.57793 11.2657C3.47466 11.0463 2.46124 10.5046 1.66583 9.70917C0.870421 8.91376 0.32874 7.90034 0.109286 6.79708C-0.110167 5.69381 0.00246431 4.55024 0.432938 3.51099C0.863411 2.47173 1.59239 1.58347 2.5277 0.958517C3.463 0.333566 4.56262 0 5.6875 0C7.19543 0.0015924 8.64114 0.601321 9.70741 1.66759C10.7737 2.73386 11.3734 4.17957 11.375 5.6875ZM10.5 5.6875C10.5 4.73568 10.2178 3.80523 9.68895 3.01382C9.16014 2.22241 8.40854 1.60558 7.52917 1.24133C6.6498 0.877083 5.68216 0.781779 4.74863 0.967471C3.8151 1.15316 2.95759 1.61151 2.28455 2.28455C1.61151 2.95759 1.15316 3.81509 0.967473 4.74863C0.781782 5.68216 0.877085 6.64979 1.24133 7.52916C1.60558 8.40853 2.22241 9.16014 3.01382 9.68895C3.80523 10.2178 4.73568 10.5 5.6875 10.5C6.96341 10.4986 8.18665 9.99106 9.08885 9.08885C9.99106 8.18665 10.4986 6.96341 10.5 5.6875Z",fill:"currentColor"})}),w=e=>{let{zipCode:t,appointmentDate:l,appointmentTimeslot:w,onZipCodeChange:N,onDateChange:A,onSlotChange:j,onSlotTimesChange:T,onAvailabilityData:D,onAvailabilityChange:O,onZipCodeChecked:E,onDateSelected:k,onSlotSelected:I,onEmailChange:S,compact:R=!1,autoCheckWhenZipcodePresent:M=!1,className:L}=e,[P,U]=(0,r.useState)({value:"",error:null,submitting:!1,message:null}),[z]=(0,m.x)(),{storeCode:V}=(0,p.v)(),{data:B}=(0,g.useSession)(),{isMobile:F}=(0,b.Q)(),Q=async()=>{var e,l,a,r;let i=P.value.trim();if(!i)return void f.oR.error("Please enter your email address.");if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.trim()))return void f.oR.error("Please enter a valid email address.");U(e=>({...e,error:null,submitting:!0,message:null}));try{let a=await z({storeCode:V,zipcode:t,email_address:i,status:Y?"success":"error",unique_id:null!=(e=null==B?void 0:B.sessionId)?e:""}).unwrap();U(e=>{var t;return{...e,message:{text:null!=(t=null==a?void 0:a.message)?t:"Email submitted successfully.",isSuccess:!0}}}),f.oR.success(null!=(l=null==a?void 0:a.message)?l:"Email submitted successfully.")}catch(e){U(t=>{var l,a;return{...t,message:{text:null!=(a=null==e||null==(l=e.data)?void 0:l.message)?a:"Something went wrong. Please try again.",isSuccess:!1}}}),f.oR.error(null!=(r=null==e||null==(a=e.data)?void 0:a.message)?r:"Something went wrong. Please try again.")}finally{U(e=>({...e,submitting:!1}))}},q=(0,r.useRef)(!1),G=(0,r.useRef)(!1),{checkAvailability:H,handleZipcodeBlur:K,availabilityData:Z,availabilityFetching:W,availabilitySuccess:X,availabilityError:$,availabilityMessage:J,isAvailabilitySuccess:Y,zipcodeError:ee,hasCurrentZipAvailability:et,setZipcodeError:el,setAvailabilityMessage:ea,setIsAvailabilitySuccess:er}=(0,c.L)({zipCode:t,onAvailabilityData:D}),ei=(0,r.useMemo)(()=>{var e,t;return et&&null!=(t=null==Z||null==(e=Z.available_dates)?void 0:e.filter(e=>e.available))?t:[]},[et,null==Z?void 0:Z.available_dates]),en=ei.find(e=>(0,u.Sh)(e.date)===l),es=(0,r.useMemo)(()=>{var e;return null!=(e=null==en?void 0:en.slots)?e:[]},[en]),eo=(0,r.useRef)(void 0);(0,r.useEffect)(()=>{let e=void 0!==eo.current&&eo.current!==t;eo.current=t,e&&(A(""),j(""),null==T||T("",""))},[t,A,j,T]),(0,r.useEffect)(()=>{var e;if(!(null==Z||null==(e=Z.available_dates)?void 0:e.length))return;let t=new Set(Z.available_dates.filter(e=>e.available).map(e=>(0,u.Sh)(e.date))),a=(0,u.Sh)(l);a&&!t.has(a)&&(A(""),j(""),null==T||T("",""))},[Z,l,A,j,T]),(0,r.useEffect)(()=>{if(!l||!en)return;let e=new Set(es.map(e=>e.label));w&&!e.has(w)&&(j(""),null==T||T("",""))},[l,en,w,es,j,T]);let ed=(0,r.useMemo)(()=>!!(M&&t.trim()&&!G.current),[M,t]);return(0,r.useEffect)(()=>{ed&&(G.current=!0,H())},[ed,H]),(0,r.useEffect)(()=>{if(W){q.current=!0;return}if(!q.current||!t.trim())return;q.current=!1;let e=X&&!$&&Array.isArray(null==Z?void 0:Z.available_dates)&&Z.available_dates.some(e=>e.available);null==E||E(e?"Y":"N")},[W,t,E,Z,X,$]),(0,r.useEffect)(()=>{null==O||O(Y)},[Y,O]),(0,a.jsxs)("div",{className:(0,d.cn)("text-primary-900 w-full",L),children:[(0,a.jsxs)("div",{className:"mb-4 flex items-center gap-1",children:[(0,a.jsx)(x.k,{size:18}),(0,a.jsxs)(o.default,{variant:"body-sm",className:"text-primary-900",weight:"bold",element:"h3",children:["Book your slot"," "]})]}),(0,a.jsxs)("div",{className:"mb-3 sm:mb-5",children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsxs)(o.default,{weight:"normal",variant:"body-xs",className:"text-primary-900",children:["Check availability from Zip Code"," "]}),(0,a.jsxs)("div",{className:"flex items-stretch overflow-hidden rounded-lg border border-gray-500 bg-white",children:[(0,a.jsxs)("div",{className:"text-primary-900 relative flex min-w-0 flex-1 items-center rounded-l-lg",children:[(0,a.jsx)(n.default,{type:"text",inputMode:"numeric",maxLength:10,placeholder:"Enter zipcode",value:t,onChange:e=>{el(null),ea(null),er(!1),N(e.target.value)},onBlur:()=>{K()},onKeyDown:e=>"Enter"===e.key&&H(),className:(0,d.cn)("text-primary-900 w-full rounded-l-lg border-0 bg-transparent py-3 !text-xs outline-none placeholder:text-gray-500",W?"pr-12 pl-4":"px-4"),"aria-label":"Zipcode","aria-invalid":!!ee,"aria-describedby":ee?"z
1ipcode-error":void 0}),W&&(0,a.jsx)(h,{})]}),(0,a.jsx)(i.A,{type:"button",variant:"primary",size:"small",onClick:()=>H(),disabled:!t.trim()||W,className:"mt-2 mr-3 h-6 w-6 min-w-0 shrink-0 rounded-[50%] !p-0","aria-label":"Check availability",children:_})]}),F&&(0,a.jsxs)(a.Fragment,{children:[ee&&(0,a.jsxs)(o.default,{id:"zipcode-error",element:"p",variant:"body-sm",weight:"normal",className:"itest-start mt-2 flex gap-2 text-xs text-[#B50303] md:items-center",role:"alert",children:[y," ",ee]}),J&&(0,a.jsxs)(o.default,{element:"p",variant:"body-sm",weight:"normal",className:(0,d.cn)("item-start mt-2 flex gap-2 text-xs md:items-center",Y?"text-[#1B7A00]":"text-[#B50303]"),children:[Y?C:y,J]})]})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(o.default,{weight:"normal",variant:"body-xs",className:"text-primary-900",children:"Share your email address"}),(0,a.jsxs)("div",{className:"flex items-stretch overflow-hidden rounded-lg border border-gray-500 bg-white",children:[(0,a.jsxs)("div",{className:"text-primary-900 relative flex min-w-0 flex-1 items-center rounded-l-lg",children:[(0,a.jsx)(n.default,{type:"email",inputMode:"email",placeholder:"Enter email address",value:P.value,disabled:!t,onChange:e=>{U(t=>({...t,error:null,message:null,value:e.target.value})),null==S||S(e.target.value)},onBlur:()=>{P.value.trim()&&Q()},onKeyDown:e=>"Enter"===e.key&&Q(),className:(0,d.cn)("text-primary-900 w-full rounded-l-lg border-0 bg-transparent py-3 !text-xs outline-none placeholder:text-gray-500",P.submitting?"pr-12 pl-4":"px-4"),"aria-label":"Email address","aria-invalid":!!P.error,"aria-describedby":P.error?"email-error":void 0}),P.submitting&&(0,a.jsx)(h,{})]}),(0,a.jsx)(i.A,{type:"button",variant:"primary",size:"small",onClick:Q,disabled:!P.value.trim()||P.submitting,className:"mt-2 mr-3 h-6 w-6 min-w-0 shrink-0 rounded-[50%] !p-0","aria-label":"Submit email",children:_})]})]})]}),!F&&(0,a.jsxs)(a.Fragment,{children:[ee&&(0,a.jsxs)(o.default,{id:"zipcode-error",element:"p",variant:"body-sm",weight:"normal",className:"itest-start mt-2 flex gap-2 text-xs text-[#B50303] md:items-center",role:"alert",children:[y," ",ee]}),J&&(0,a.jsxs)(o.default,{element:"p",variant:"body-sm",weight:"normal",className:(0,d.cn)("item-start mt-2 flex gap-2 text-xs md:items-center",Y?"text-[#1B7A00]":"text-[#B50303]"),children:[Y?C:y,J]})]})]}),Y&&(0,a.jsxs)("div",{className:(0,d.cn)("grid gap-4",R?"grid-cols-1":"grid-cols-1 sm:grid-cols-2"),children:[(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(o.default,{weight:"normal",variant:"body-xs",className:"text-primary-900",children:"Preferred date"}),(0,a.jsx)(v.A,{appointmentDate:l,onDateChange:e=>{A(e);let t=e.trim();t&&(null==k||k(t))},onSlotChange:e=>{j(e),e||null==T||T("","")},availableDates:ei})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)(o.default,{weight:"normal",variant:"body-xs",className:"text-primary-900",children:"Preferred time"}),(0,a.jsx)("div",{className:(0,d.cn)("relative",0===es.length&&"pointer-events-none opacity-60"),children:(0,a.jsx)(s.l,{value:w,onChange:e=>(e=>{var t,l;let a=String(null!=e?e:"");j(a),a&&(null==I||I(a));let r=es.find(e=>e.label===a);null==T||T(null!=(t=null==r?void 0:r.start_time)?t:"",null!=(l=null==r?void 0:r.end_time)?l:"")})(String(null!=e?e:"")),options:es.map(e=>({value:e.label,label:e.label})),placeholder:"Select a time slot",className:(0,d.cn)("w-full rounded-lg border border-gray-500 bg-white px-4 py-3 text-xs outline-none focus:border-gray-600",0===es.length?"text-gray-700":"border-gray-600 text-[#222D37]"),optionContainerClassName:"rounded-lg border border-gray-500 bg-white text-xs z-30 max-h-40 overflow-y-auto",textClassNameForSelector:0===es.length?"text-gray-700":"text-primary-900",placeholderClassName:"text-gray-900",children:es.map(e=>(0,a.jsx)(s.c,{value:e.label,className:"hover:bg-primary px-4 py-3 hover:text-white",activeClassName:"bg-primary text-white",children:e.label},(0,u.MG)(e)))})})]})]})]})}},59991:(e,t,l)=>{"use strict";l.d(t,{A:()=>m});var a=l(95155),r=l(12115),i=l(47650),n=l(68108),s=l(36219),o=l(70104),d=l(32321),u=l(50498);function c(){return(0,a.jsx)("svg",{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M14.625 2.25H12.9375V1.6875C12.9375 1.53832 12.8782 1.39524 12.7727 1.28975C12.6673 1.18426 12.5242 1.125 12.375 1.125C12.2258 1.125 12.0827 1.18426 11.9773 1.28975C11.8718 1.39524 11.8125 1.53832 11.8125 1.6875V2.25H6.187
15V1.6875C6.1875 1.53832 6.12824 1.39524 6.02275 1.28975C5.91726 1.18426 5.77418 1.125 5.625 1.125C5.47582 1.125 5.33274 1.18426 5.22725 1.28975C5.12176 1.39524 5.0625 1.53832 5.0625 1.6875V2.25H3.375C3.07663 2.25 2.79048 2.36853 2.5795 2.5795C2.36853 2.79048 2.25 3.07663 2.25 3.375V14.625C2.25 14.9234 2.36853 15.2095 2.5795 15.4205C2.79048 15.6315 3.07663 15.75 3.375 15.75H14.625C14.9234 15.75 15.2095 15.6315 15.4205 15.4205C15.6315 15.2095 15.75 14.9234 15.75 14.625V3.375C15.75 3.07663 15.6315 2.79048 15.4205 2.5795C15.2095 2.36853 14.9234 2.25 14.625 2.25ZM5.0625 3.375V3.9375C5.0625 4.08668 5.12176 4.22976 5.22725 4.33525C5.33274 4.44074 5.47582 4.5 5.625 4.5C5.77418 4.5 5.91726 4.44074 6.02275 4.33525C6.12824 4.22976 6.1875 4.08668 6.1875 3.9375V3.375H11.8125V3.9375C11.8125 4.08668 11.8718 4.22976 11.9773 4.33525C12.0827 4.44074 12.2258 4.5 12.375 4.5C12.5242 4.5 12.6673 4.44074 12.7727 4.33525C12.8782 4.22976 12.9375 4.08668 12.9375 3.9375V3.375H14.625V5.625H3.375V3.375H5.0625ZM14.625 14.625H3.375V6.75H14.625V14.625ZM9.84375 9.28125C9.84375 9.44813 9.79426 9.61126 9.70155 9.75001C9.60884 9.88877 9.47706 9.99691 9.32289 10.0608C9.16871 10.1246 8.99906 10.1413 8.83539 10.1088C8.67172 10.0762 8.52138 9.99587 8.40338 9.87787C8.28538 9.75987 8.20502 9.60953 8.17246 9.44586C8.13991 9.28219 8.15662 9.11254 8.22048 8.95836C8.28434 8.80419 8.39248 8.67241 8.53124 8.5797C8.66999 8.48698 8.83312 8.4375 9 8.4375C9.22378 8.4375 9.43839 8.52639 9.59662 8.68463C9.75485 8.84286 9.84375 9.05747 9.84375 9.28125ZM12.9375 9.28125C12.9375 9.44813 12.888 9.61126 12.7953 9.75001C12.7026 9.88877 12.5708 9.99691 12.4166 10.0608C12.2625 10.1246 12.0928 10.1413 11.9291 10.1088C11.7655 10.0762 11.6151 9.99587 11.4971 9.87787C11.3791 9.75987 11.2988 9.60953 11.2662 9.44586C11.2337 9.28219 11.2504 9.11254 11.3142 8.95836C11.3781 8.80419 11.4862 8.67241 11.625 8.5797C11.7637 8.48698 11.9269 8.4375 12.0938 8.4375C12.3175 8.4375 12.5321 8.52639 12.6904 8.68463C12.8486 8.84286 12.9375 9.05747 12.9375 9.28125ZM6.75 12.0938C6.75 12.2606 6.70052 12.4238 6.6078 12.5625C6.51509 12.7013 6.38331 12.8094 6.22914 12.8733C6.07496 12.9371 5.90531 12.9538 5.74164 12.9213C5.57797 12.8887 5.42763 12.8084 5.30963 12.6904C5.19163 12.5724 5.11127 12.422 5.07871 12.2584C5.04616 12.0947 5.06287 11.925 5.12673 11.7709C5.19059 11.6167 5.29873 11.4849 5.43749 11.3922C5.57624 11.2995 5.73937 11.25 5.90625 11.25C6.13003 11.25 6.34464 11.3389 6.50287 11.4971C6.66111 11.6554 6.75 11.87 6.75 12.0938ZM9.84375 12.0938C9.84375 12.2606 9.79426 12.4238 9.70155 12.5625C9.60884 12.7013 9.47706 12.8094 9.32289 12.8733C9.16871 12.9371 8.99906 12.9538 8.83539 12.9213C8.67172 12.8887 8.52138 12.8084 8.40338 12.6904C8.28538 12.5724 8.20502 12.422 8.17246 12.2584C8.13991 12.0947 8.15662 11.925 8.22048 11.7709C8.28434 11.6167 8.39248 11.4849 8.53124 11.3922C8.66999 11.2995 8.83312 11.25 9 11.25C9.22378 11.25 9.43839 11.3389 9.59662 11.4971C9.75485 11.6554 9.84375 11.87 9.84375 12.0938ZM12.9375 12.0938C12.9375 12.2606 12.888 12.4238 12.7953 12.5625C12.7026 12.7013 12.5708 12.8094 12.4166 12.8733C12.2625 12.9371 12.0928 12.9538 11.9291 12.9213C11.7655 12.8887 11.6151 12.8084 11.4971 12.6904C11.3791 12.5724 11.2988 12.422 11.2662 12.2584C11.2337 12.0947 11.2504 11.925 11.3142 11.7709C11.3781 11.6167 11.4862 11.4849 11.625 11.3922C11.7637 11.2995 11.9269 11.25 12.0938 11.25C12.3175 11.25 12.5321 11.3389 12.6904 11.4971C12.8486 11.6554 12.9375 11.87 12.9375 12.0938Z",fill:"currentColor"})})}l(22509),l(90491);let m=e=>{var t,l,m;let{appointmentDate:p,onDateChange:g,onSlotChange:h,availableDates:v,errorMessage:f}=e,[x,b]=(0,r.useState)(!1),[_,y]=(0,r.useState)(null),C=(0,r.useRef)(null),w=(0,r.useRef)(null),N=(0,r.useMemo)(()=>new Set(v.map(e=>(0,u.Sh)(e.date))),[v]),A=(0,r.useMemo)(()=>{let e=(null==v?void 0:v.length)>0?v[0]:null;if(!(null==e?void 0:e.date))return new Date;let t=(0,u.lA)((0,u.Sh)(e.date));return t?new Date(t.getFullYear(),t.getMonth(),1):new Date},[v]),j=(0,r.useMemo)(()=>{let e=(null==v?void 0:v.length)>0?v[v.length-1]:null;if(!(null==e?void 0:e.date))return new Date;let t=(0,u.lA)((0,u.Sh)(e.date));return t?new Date(t.getFullYear(),t.getMonth(),1):new Date},[v]),[T,D]=(0,r.useState)(A);(0,r.useEffect)(()=>{0===v.length&&b(!1)},[v.length]),(0,r.useEffect)(()=>{let e=p?(0,u.lA)(p):null;if(e)return void D(new Date(e.getFullYear(),e.getMonth(),1));D(A)},[p,A]);let O=(0,r.useCallback)(()=>
1{let e=window.visualViewport;return e?{top:e.offsetTop,height:e.height,width:e.width,left:e.offsetLeft}:{top:0,height:window.innerHeight,width:window.innerWidth,left:0}},[]),E=(0,r.useCallback)(()=>{let e,t=C.current,l=w.current;if(!t||!l)return;let a=t.getBoundingClientRect(),r=l.getBoundingClientRect(),i=r.height,n=r.width,s=O(),o=s.top,d=s.top+s.height,u=s.width,c=s.left,m=a.width,p=Math.max(c+8,Math.min(a.left,c+u-Math.max(m,n)-8)),g=a.top-o-8,h=d-a.bottom-8;y({top:e=Math.max(o+8,Math.min(e=h>=i?a.bottom-1:g>=i||g>h?a.top-i+1:a.bottom-1,d-i-8)),left:p,width:m})},[O]);(0,r.useLayoutEffect)(()=>{x&&E()},[x,E]),(0,r.useEffect)(()=>{if(!x)return;let e=e=>{var t,l;let a=e.target;(null==(t=C.current)?void 0:t.contains(a))||(null==(l=w.current)?void 0:l.contains(a))||b(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[x]),(0,r.useEffect)(()=>{if(!x)return;let e=0,t=()=>{cancelAnimationFrame(e),e=requestAnimationFrame(E)},l=()=>{b(!1)};window.addEventListener("resize",t,{passive:!0});let a=window.visualViewport;return a&&(a.addEventListener("resize",t,{passive:!0}),a.addEventListener("scroll",t,{passive:!0})),document.addEventListener("scroll",l,{passive:!0,capture:!0}),()=>{window.removeEventListener("resize",t),a&&(a.removeEventListener("resize",t),a.removeEventListener("scroll",t)),document.removeEventListener("scroll",l,!0),cancelAnimationFrame(e)}},[x,E]);let k=p?(()=>{let e=(0,u.lA)(p);return e?(0,u.VU)(e):""})():"",I=(0,a.jsx)("div",{ref:C,children:(0,a.jsx)(s.A,{type:"button",variant:"dashed",size:"small",className:(0,d.cn)("w-full justify-start border-solid border-gray-500 bg-white px-4 py-3 pr-10 text-left text-xs font-normal outline-none focus:border-gray-500 disabled:cursor-not-allowed disabled:bg-gray-200",!k&&"text-gray-700",0===v.length?"pointer-events-none text-gray-700":"text-[#222D37]",f&&"border-red-500"),"aria-label":"Choose date","aria-haspopup":"dialog","aria-expanded":x,onClick:()=>b(e=>!e),children:k||"mm-dd-yyyy"})}),S=x?(0,i.createPortal)((0,a.jsx)("div",{ref:w,className:"rdp-service-calendar max-h-[min(85dvh,calc(100vh-16px))] overflow-y-auto overscroll-contain rounded-lg border border-gray-600 bg-white px-2 py-1 shadow-md",style:{position:"fixed",top:null!=(t=null==_?void 0:_.top)?t:0,left:null!=(l=null==_?void 0:_.left)?l:0,visibility:_?"visible":"hidden",zIndex:9999,"--rdp-accent-color":"#2c71de","--rdp-accent-background-color":"#2c71de","--rdp-day_button-border-radius":"50%"},children:(0,a.jsx)(n.h,{mode:"single",navLayout:"around",month:T,onMonthChange:D,fromMonth:A,toMonth:j,selected:p&&null!=(m=(0,u.lA)(p))?m:void 0,onSelect:e=>{if(!e)return void b(!1);g((0,u.$T)(e)),h(""),b(!1)},disabled:e=>!N.has((0,u.$T)(e)),weekStartsOn:1,formatters:{formatWeekdayName:e=>(0,u.gQ)(e)}})}),document.body):null;return 0===v.length?(0,a.jsxs)("div",{className:"relative",children:[I,(0,a.jsx)(o.default,{element:"span",className:"pointer-events-none absolute top-1/2 right-3 z-0 h-4 w-4 -translate-y-1/2 text-gray-500",children:(0,a.jsx)(c,{})}),f?(0,a.jsx)(o.default,{element:"span",variant:"body-xs",className:"mt-1 block text-red-600",children:f}):null]}):(0,a.jsxs)("div",{className:"relative",children:[I,(0,a.jsx)(o.default,{element:"span",className:"pointer-events-none absolute top-5 right-3 z-0 h-4 w-4 -translate-y-1/2 text-[#8B9FB3]",children:(0,a.jsx)(c,{})}),S,f?(0,a.jsx)(o.default,{element:"span",variant:"body-xs",className:"mt-1 block text-red-600",children:f}):null]})}},78101:(e,t,l)=>{"use strict";l.d(t,{A:()=>i});var a=l(95155),r=l(70104);let i=e=>{let{trackValue:t,max:l=5,height:i=8,className:n="",bgColor:s="#3B82F6",trackColor:o="#E5E7EB"}=e,d=100*Math.min(Math.max(t/l,0),1);return(0,a.jsx)("div",{className:"overflow-hidden ".concat(n),style:{backgroundColor:o,height:i},children:(0,a.jsx)("div",{className:"flex h-full items-center rounded-[3px] transition-all",style:{width:"".concat(d,"%"),backgroundColor:s},children:(0,a.jsxs)(r.default,{className:"pl-1 text-[9px] font-semibold text-white",children:[t,"/",l]})})})}},79501:(e,t,l)=>{"use strict";l.d(t,{A:()=>K});var a=l(95155),r=l(22544),i=l(36219),n=l(6829),s=l(49322),o=l(23071),d=l(71420),u=l(12115),c=l(1019),m=l(1213),p=l(42054),g=l(60264),h=l(74774),v=l(32321),f=l(48213),x=l(802),b=l(21648),_=l(89256),y=l(87826),C=l(72471),w=l(22306),N=l(81836),A=l(70104),j=l(47650),T=l(1815),D=l(40848),O=l(68290),E=l(74644),k=l(20063),I=l(20389),S=l(83339),R=l(66656),M=l(2582),L=l(16760),P=l(50498),U=l(28720),z=l(28492),V=l(14660),B=l(61382),F=l(73902),Q=l(80134),q=l(95002),G=l(76095),H=l(64536);let K=e=>{var t,l,N,A,K,W,X,$,J,Y,ee,et,el,ea;let{isQuotationProduct:er,productId:ei,className:en="mt-4",buttonClassName:es="w-full rounded px-4 py-2 disabled:opacity-50",showrightIcon:eo=!1,rules:ed,idProductOutOfStock:eu,productName:ec,isAdminFlow:em,isLoading:ep,productData:eg,productFabric:eh,productWarranty:ev,productRating:ef,productReviews:ex,disableAddToCartCTA:eb,isServiceBookingEnabled:e_=!1,asSideBar:e
1y=!1,initialPriceResponse:eC}=e,ew=(0,s.v)(),{setCartIdTrack:eN}=(0,O.v)(),{isMobile:eA}=(0,M.Q)(),[ej,eT]=(0,u.useState)(!1),eD=(0,z.A)(),[eO,eE]=(0,u.useState)(""),{handleSubmit:ek,formState:eI,getValues:eS}=(0,r.xW)(),[eR]=(0,R.uF)(),eM=(0,k.useSearchParams)(),eL=eM.get("qid"),eP=null!=(et=eM.get("bookingId"))?et:eM.get("booking_id"),eU=null!=(el=eM.get("bookingItemId"))?el:eM.get("booking_item_id"),ez=eM.get("updated"),eV=eM.get("callback"),{finalPriceResponse:eB}=(0,b.dW)(),{finalPricePayload:eF,addons:eQ,productUploadReference:eq,warrantyItem:eG,selectedVehicleState:eH,productOptions:eK,fabricData:eZ,accordionCompleted:eW,openAccordionId:eX}=(0,m.d4)(e=>e.productDetails),{personalization:e$,updatePersonalization:eJ,dispatch:eY}=(0,b.sB)(),e0=(0,m.wA)(),e1=(0,m.d4)(e=>e.auth.customer),e5=null==e1||null==(t=e1.customer_extra_fields)?void 0:t.is_quotation_customer,{selectedProductId:e2,selectedQuotationId:e4,adminQuoteId:e9,adminQouteItemId:e8,userId:e3}=(0,C.F)(),e6=!!(e2||e4||e8),e7=!(e2||eL||e9||e8),{mutations:te,loading:tt,data:tl}=(0,d._)(),{triggerAddToCartEvent:ta,triggerAddToCartEventFailed:tr,triggerAddToCartMiniCartOpened:ti,triggerAddToCartSuccess:tn,triggerMasBookEvent:ts}=(0,D.Ir)(eg,ef,ex,eC,eh,ev),{cartItems:to=[]}=tl||{},td=(0,H.w)(),tu=null!=(ea=null==tl?void 0:tl.useWalletAmount)?ea:0,tc=(0,n.Ri)("source_masked_id"),tm=(null==tl?void 0:tl.shippingDateOnCart)&&""!==tl.shippingDateOnCart.trim()?tl.shippingDateOnCart:null,{triggerAdobeCartEvent:tp}=(0,D.nM)({eventName:E.Q.ADB_CART_EDIT_UPDATE_CART,cartItems:to,walletDiscount:tu,extraPayload:{ecommerce:{cartId:tc,currency:(null==eg?void 0:eg.currency)||"NAIDL",cartValue:Number(Number(null==tl?void 0:tl.grandTotal).toFixed(2))||0,couponcode:(null==tl||null==(l=tl.coupon)?void 0:l.code)||"",deliveryavailable:!!tm,Deliverydate:(null==tl?void 0:tl.shippingDateOnCart)||"",discount:Number(Number(null==tl?void 0:tl.totalSaving).toFixed(2))||0,revenueCheckout:Number(Number(null==tl?void 0:tl.grandTotal).toFixed(2))||0,courierCharges:Number(Number(null==tl||null==(N=tl.customCharge)?void 0:N.amount).toFixed(2))||0,shippingCost:Number(Number(null==tl?void 0:tl.shippingAmount).toFixed(2))||0,shippingmethod:(null==tl||null==(X=tl.cart)||null==(W=X.shipping_addresses)||null==(K=W.at(0))||null==(A=K.selected_shipping_method)?void 0:A.method_title)?"Shipping and Handling - ".concat(null==tl||null==(ee=tl.cart)||null==(Y=ee.shipping_addresses)||null==(J=Y.at(0))||null==($=J.selected_shipping_method)?void 0:$.method_title):(null==tl?void 0:tl.standardShippingMethod)?"Shipping and Handling - ".concat(null==tl?void 0:tl.standardShippingMethod):"NAIDL",subTotal:Number(Number(null==tl?void 0:tl.subtotal).toFixed(2))||0,totalQty:Number(null==eF?void 0:eF.quantity)||0},source:td}}),{addToCart:tg,updateCartItem:th,createQuotation:tv,addToQuote:tf,updateQuoteItem:tx,addToAdminCart:tb,updateAdminCartItem:t_}=(0,C.y)(),{updateQtyHandler:ty}=(0,b.xC)();(0,u.useEffect)(()=>{"true"===ez&&setTimeout(()=>{eY((0,p.XL)({tab:"product"}))},200)},[]);let tC=eI.isSubmitting,tw=(0,u.useMemo)(()=>(0,Q.l)(!!er,!!e5,e2,e4||e8||null,eu,!!e9,em,e_),[er,e5,e2,e9,e8,em,e_]),tN=async e=>{try{let a=await th(e).unwrap();if(tp(),null==a?void 0:a.length){var t,l;ey?(await te.fetchCart(!1,!0),eY((0,G.TC)())):eD?window.location.assign(U.A.AGENT_CHECKOUT):eV?((0,n.lc)("mini_cart_edit_refresh","true",1/1440),window.location.assign(decodeURIComponent(eV))):((0,n.lc)("mini_cart_edit_refresh","true",1/1440),window.location.assign("".concat(window.location.pathname,"?updated=true")));let a=(null==e||null==(l=e.options)||null==(t=l.other_options)?void 0:t.vehicle_product_name)||ec;(0,o.VX)("".concat(a," was updated in your shopping cart."))}}catch(e){S.A.error("Error updating cart item",{component:"AddtoCart",error:e}),(0,o.UG)((null==e?void 0:e.message)||"Please try again!!!"),eT(!1)}},tA=async e=>{try{let t=em?t_:tx,l=await t(e).unwrap();if(e9&&(null==l?void 0:l.status)){(0,o.VX)("".concat(em?"Order":"Quotation"," updated successfully!")),window.location.assign(l.url);return}(null==l?void 0:l.item_id)&&(window.location.assign("/quotation/quote/presubmit"),eT(!1),(0,o.VX)("We have updated quote item"))}catch(e){throw S.A.error("Error updating cart item",{component:"AddtoCart",error:e}),e}},tj=async e=>{var t,l,a,r,i,s,d,u,c,m,p,g,h,v,f;if(!e_)return{error:!0};try{let e=eS(),f=null!=(d=null==(t=e.serviceBookingZipCode)?void 0:t.trim())?d:"",x=null!=(u=null==(l=e.appointment_date)?void 0:l.trim())?u:"",b=null!=(c=null==(a=e.appointment_timeslot)?void 0:a.trim())?c:"",_=null!=(m=null==(r=e.appointment_start_time)?void 0:r.trim())?m:"",y=null!=(p=null==(i=e.appointment_end_time)?void 0:i.trim())?p:"";
1if(!f)return(0,o.UG)("Enter your zip code to check service availability."),{error:!0};let C=null==e?void 0:e.serviceBookingAvailable,w=null!=(g=null==(s=e.serviceBookingEmail)?void 0:s.trim())?g:"";if(!w)return(0,o.UG)("Please enter your email address to book the service."),{error:!0};if(!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(w))return(0,o.UG)("Please enter a valid email address."),{error:!0};if(!C)return(0,o.UG)("Unfortunately, we don't offer this service at your location."),{error:!0};if(!x||!b)return(0,o.UG)("Please select a date and time slot for the service."),{error:!0};if(!_||!y)return(0,o.UG)("Please select a time slot again; the selected slot details are missing."),{error:!0};if(!(null==eF?void 0:eF.sku))return(0,o.UG)("Product options are missing. Please configure the product first."),{error:!0};let N=(0,P.ZG)(),A=e.serviceBookingLocation,j=(0,P.Qo)({mode:"pdp",productId:String(ei),productSku:eF.sku,productName:ec||(null==eg?void 0:eg.name)||"Custom Cover",itemCatId:(0,P.h_)(eg),appointmentDate:x,appointmentTimeslot:b,startTime:_,endTime:y,bookingId:N,zipCode:f||void 0,county:null==A?void 0:A.county}),T=await eR(j).unwrap(),{booking_id:D}=(0,P.UQ)(T);D&&(0,n.TV)(L.wQ.BOOKING_ID,D,30),(0,P.TL)(),e0(R.uo.util.invalidateTags(["MeasurementBookingCart"]));let O=Number(null!=(h=null==eB?void 0:eB.final_price)?h:0),E=null!=(v=null==ew?void 0:ew.currencyCode)?v:"USD";return ts({currency:E,cartValue:O,appointmentDate:x,appointmentTimeslot:b}),(0,o.VX)("Measurement service added to your cart."),{data:{data:{booking_id:D},booking_id:D},error:!1}}catch(t){let e=(null==t||null==(f=t.data)?void 0:f.message)||(null==t?void 0:t.message);return(0,o.UG)(e||"Unable to add service to cart. Please try again."),S.A.error("Add measurement booking cart item failed",{err:t}),{error:!0}}finally{eT(!1)}},tT=async e=>{},tD={[c.u.ADD_TO_CART]:tg,[c.u.ADD_TO_QUOTE]:tf,[c.u.ADD_TO_ADMIN_CART]:tb,[c.u.BOOK_SERVICE]:tj},tO={[c.u.ADD_TO_CART]:tN,[c.u.ADD_TO_QUOTE]:tA,[c.u.ADD_TO_ADMIN_CART]:tA,[c.u.BOOK_SERVICE]:tT},tE=async e=>{let t,l=(0,n.Ri)("source_masked_id")||"";if(!(null==eF?void 0:eF.sku)||e===c.u.BOOK_SERVICE&&!e_)return void eT(!1);e===c.u.ADD_TO_CART&&(0,B.sx)("ATC_CLICK",{product_id:String(ei),sku:eF.sku,price:null==eB?void 0:eB.final_price});try{if(1===e$.is_enabled&&e$.personalize_type_option===c.Dp.LOGO&&(!e$.files||0===e$.files.length)){let e="This is a required field";eJ({errorMessage:e}),(0,F.m)({stage:"ATC",step:"VALIDATION",eventName:"ATC_VALIDATION_FAIL",errorMessage:e,cartId:l||void 0,dedupeKey:"atc_logo_required_".concat(ei),retryable:!0}),eT(!1);return}if(eq.isRefRequired){let e=eq.files.length?"":"Add at least one reference image to continue.",t=eq.referenceText.trim()?"":"Add a short description so our team can shape the model.";if(e||t){e0((0,g.Ur)({errorMessage:e,commentError:t})),e0((0,g.a$)("upload-photo")),eT(!1);return}}}catch(e){(0,F.m)({stage:"ATC",step:"VALIDATION",eventName:"CLIENT_STEP_ERROR",error:e,cartId:l||void 0,source:"AddToCart:logoValidation",retryable:!0})}try{ei&&(0,_.$V)(["".concat(ei)],(null==ew?void 0:ew.storeCode)||y.wh.USA)}catch(e){S.A.error("Algolia Product AddToCart",{component:"AddtoCart",error:e})}try{var a,r,i,s,d,u,m,h,b,C,w,N,A,j,T,D,O,E,k;t={...eF,options:{...(null==eF?void 0:eF.options)||{}}};let n=eS("measurements");if((0,v.RI)(eH)&&(null==(r=t.options)||null==(a=r.dimensions)?void 0:a.length)&&n){let e=(0,v.sz)(t.options.dimensions,n);if(e){let l=e.some((e,l)=>{var a,r;return e.value!==(null==(r=t.options.dimensions)||null==(a=r[l])?void 0:a.value)});t.options.dimensions=e,l&&(t.options.default_dimensions=!1)}}if(e===c.u.ADD_TO_CART&&(t.cart_id=l),eZ&&Object.keys(eZ).length>0&&t.options){t.options={...t.options||{},fabric_data:{fabric_type_id:(null==eZ?void 0:eZ.fabric_type_id)||"",personalize_color_id:(null==eZ?void 0:eZ.personalize_color_id)||""}};let e=null==eZ||null==(i=eZ.gallery_images)?void 0:i.find(e=>e.is_baseimage);(null==e?void 0:e.url)&&(t.options.other_options={...t.options.other_options||{},selected_gallery_image:e.url})}if(eZ&&Object.keys(eZ).length>0&&t.options){t.options={...t.options||{}
1,fabric_data:{fabric_type_id:(null==eZ?void 0:eZ.fabric_type_id)||"",personalize_color_id:(null==eZ?void 0:eZ.personalize_color_id)||""}};let e=null==eZ||null==(s=eZ.gallery_images)?void 0:s.find(e=>e.is_baseimage);(null==e?void 0:e.url)&&(t.options.other_options={...t.options.other_options||{},selected_gallery_image:e.url})}try{if(e===c.u.ADD_TO_CART&&eD){let e=(null==eP?void 0:eP.trim())||(null==(d=sessionStorage.getItem(L.wQ.AGENT_MEASUREMENT_BOOKING_ID))?void 0:d.trim())||"";e&&(t.options={...t.options||{},measurement:{booking_id:e,...(null==eU?void 0:eU.trim())?{booking_item_id:eU.trim()}:{}}})}}catch(e){}try{1===e$.is_enabled&&(0===Number(null!=(u=null==eZ?void 0:eZ.is_personalize)?u:"1")?null==t||null==(m=t.options)||delete m.personalization:t.options={...t.options||{},personalization:(0,v.$1)(e$)})}catch(e){}try{e9&&(em?(t.orderId=Number(e9),t.userId=e3):t.is_admin=!0,e8||em?em||(t.is_admin=1):t.quotation_id=Number(e9),em&&e8&&(t.itemId=Number(e8)))}catch(e){}try{if(eq.files.length>0){let e=(0,x.lm)(ed,eK);if(!(null==e?void 0:e[f.F.UPLOAD_IMAGE])){let e=eq.files.map(e=>({main_image:(0,v.zO)(e.main_image)||"",thumb_image:(0,v.zO)(e.thumb_image)||""}));(null==(h=t.options.product_options)?void 0:h.find(e=>"cutout_for_obstruction"===e.option_code))?t.options.product_options=[...t.options.product_options,{option_code:f.F.UPLOAD_IMAGE,value_code:"browse",uploaded_image:null==e?void 0:e.at(0)}]:t.options.other_options={...t.options.other_options||{},reference_image_upload:e}}}}catch(e){}try{""!==eq.referenceText&&(t.options.other_options={...t.options.other_options||{},personlize_comment:eq.referenceText})}catch(e){}try{eq.recordings.length>0&&(t.options.other_options={...t.options.other_options||{},voiceNotes:eq.recordings.map(e=>({duration:e.duration,filePath:(0,v.zO)(e.filePath||"")}))})}catch(e){}try{(null==eH?void 0:eH.customProductName)&&(t.options.other_options={...t.options.other_options||{},vehicle_product_name:eH.customProductName})}catch(e){}try{if(eQ&&"is_addon_insert_redirect"in eQ&&t.options&&"boolean"==typeof eQ.is_addon_insert_redirect){let e=eQ.is_addon_insert_redirect;eE((null==eQ?void 0:eQ.addonName)||""),t.options={...t.options||{},is_addon_insert_redirect:e}}}catch(e){}try{t.options&&"insert_product"in t.options&&delete t.options.insert_product}catch(e){}try{eG?(t.options={...t.options||{},warranty_year_id:eG.warranty_year_id},delete t.options.warranty):t.options&&(delete t.options.warranty_year_id,delete t.options.warranty)}catch(e){}try{t.addon&&"sku"in t.addon&&(t.addon={sku:t.addon.sku,quantity:(null==(b=t.addon)?void 0:b.quantity)||1,options:{...(null==(C=t.addon)?void 0:C.options)||{}}})}catch(e){}try{(null==t?void 0:t.accessories)&&(t.accessories=(0,v.$g)(t.accessories))}catch(e){}try{if(eS("vehicle_options")){let e=eS("vehicle_options");(null==e?void 0:e["custom_vehicle-make"])&&Object.entries(e).every(e=>{let[t,l]=e;return!t.startsWith("custom_")||!!l})&&(t.options.other_options={...(null==t||null==(w=t.options)?void 0:w.other_options)||{},is_provide_manually_select:!0})}}catch(e){}if(eW&&Object.keys(eW).length>0){let e={...eW,...eX&&!(eX in eW)?{[eX]:!0}:{}};t.options.pdp_tickmark_json=JSON.parse(JSON.stringify(e))}try{if(e2||e4||e8){em||(t.item_id=Number(e2||e4||e8));let l=tO[e];await l(t);return}}catch(e){throw(0,F.m)({stage:"ATC",step:"API",eventName:"ATC_API_FAIL",error:e,cartId:l||void 0,retryable:!0}),e}let _=tD[e],y=await _(t);if(y&&"error"in y&&(null==y?void 0:y.error)){(0,F.m)({stage:"ATC",step:"API",eventName:"ATC_API_FAIL",errorMessage:V.z.getErrorMessage(null==y?void 0:y.error)||"Add to cart failed",cartId:l||void 0,retryable:!0}),e7&&e===c.u.ADD_TO_CART&&tr({currency:(null==eg?void 0:eg.currency)||"NAIDL",cartValue:(null==eB?void 0:eB.final_price)||0}),e!==c.u.BOOK_SERVICE&&(0,o.UG)(V.z.getErrorMessage(null==y?void 0:y.error)||"Please try again!!!"),eT(!1);return}let S=null==y?void 0:y.data;if(e7&&e===c.u.ADD_TO_CART)try{ta({currency:(null==eg?void 0:eg.currency)||"NAIDL",cartValue:(null==eB?void 0:eB.final_price)||0,searchParams:eM.toString()}),await (0,q.j)(500),tn({currency:(null==eg?void 0:eg.currency)||"NAIDL",cartValue:(null==eB?void 0:eB.final_price)||0,searchParams:eM.toString()})}catch(e){}if((Array.isArray(null==S?void 0:S.data)?S.data.length>0:null==S?void 0:S.data)&&e===c.u.ADD_TO_CART){eN(),e0((0,g.J7)());let l=await te.fetchCart(!1,!0);if(tt.isMutationLoading||(null==(N=t.options)?void 0:N.is_addon_insert_redirect)||(eT(!1),eY((0,p.XL)({tab:"product"}))),e===c.u.ADD_TO_CART&&l&&(0,B.sx)("ATC_STATE_UPDATED",{cart_count:null!=(j=l.total_quantity)?j:Array.isArray(l.items)?l.items.length:0}),l&&e7&&((0,I.c0)({itemList:l.items,totals:{subtotal_excluding_tax:null==l||null==(T=l.prices)?void 0:T.subtotal_excluding_tax.value,grand_total:null==l||null==(D=l.prices)?void 0:D.grand_total.value},storedata:{domain:ew.domain},pathname:window.location.pathname}),!(null==(O=(null==S?void 0:S.data)[0])?void 0:O.insert_redirect_product_url)))try{ti({currency:(null==eg?void 0:eg.currency)||"NAIDL",cartValue:(null==eB?void 0:eB.final_price)||0})}catch(e){}if(l&&!tt.fetchCart&&(null==(A=t.options)?void 0:A.is_addon_insert_redirect)&&Array.isArray(null==S?void 0:S.data)){let e=null==(E=S.data[0])?void 0:E.insert_redirect_product_url;e&&window.location.assign("/"+e)}}else if(e!==c.u.BOOK_SERVICE||(null==y?void 0:y.error))if(e!==c.u.ADD_TO_QUOTE||e9){if(e9&&!e8){let e=null==S||null==(k=S.data)?void 0:k.url;e&&((0,o.VX)("".concat(em?"Order":"Quotation"," successfully saved!")),window.location.assign(e))}}else window.location.assign("/quotation/quote/presubmit"),eT(!1);else eT(!1),eY((0,p.XL)({tab:"service"}))}catch(e){(0,F.m)({stage:"ATC",step:"API",eventName:"CLIENT_STEP_ERROR",error:e,cartId:l||void 0,source:"AddToCart:addToCartHandler",retryable:!0}),(0,F.m)({stage:"ATC",step:"API",eventName:"ATC_API_FAIL",error:e,cartId:l||void 0,retryable:!0})}},tk=async e=>{var t,l,a,r,i;let n={customshapeRequest:{product_id:ei,qty:(null==eF?void 0:eF.quantity)||1,contact_comment:"",product_dimensions:{},customize:{},...e,...eK}};if(null==eF||null==(l=eF.options)||null==(t=l.dimensions)?void 0:t.length){let e=eF.options.dimensions;n.customshapeRequest.product_dimensions=e.reduce((e,t)=>
1{if(t.dimension_label){var l;e[null==(l=t.dimension_label)?void 0:l.toLowerCase()]="string"==typeof t.value?t.value:""}return e},{})}if(null==eF||null==(a=eF.options)?void 0:a.fabric_data){let e=eF.options.fabric_data;n.customshapeRequest.hidden_fabric=e.fabric_name,n.customshapeRequest.hidden_color=e.color_label}(null==eq||null==(r=eq.files)?void 0:r.length)&&(n.customshapeRequest.reference_image_upload_hidden=eq.files.map(e=>(0,v.zO)(e.main_image)).join(",")),(null==(i=eq.referenceText)?void 0:i.trim())&&(n.customshapeRequest.personlize_comment=eq.referenceText);let s=await tv(n).unwrap();(null==s?void 0:s.status)==="success"&&(eT(!1),(0,o.VX)("Thank you for your inquiry. One of our representatives will respond soon to your request.",6e3))},tI=ej||tC||eu||ep||eb;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,v.cn)("flex flex-col gap-y-4 lg:sticky lg:bottom-0 lg:bg-white lg:py-4",e5&&"w-full justify-between",en,e_&&"w-auto lg:w-full"),children:null==tw?void 0:tw.map(e=>(0,a.jsxs)(i.A,{type:"button",variant:e.variant,"data-fs-label":(0,Q.t)(e.dataKey,e6),onClick:()=>{var t;tI||(t=e.dataKey,ek(e=>{((e,t)=>{if(!ew.storeCode)return(0,o.UG)("Store information not available.");eT(!0);try{er?tk(e):tE(t)}catch(t){var l,a,r,i;let e;if(null==eF||null==(a=eF.sku)||null==(l=a.toLowerCase())?void 0:l.includes("swatchkit")){ty(1),(0,o.UG)((null==t?void 0:t.message)||(null==t||null==(i=t.data)?void 0:i.message)||T.UU.SOMETHING_WENT_WRONG),eT(!1);return}if((null==(r=t.data)?void 0:r.message)&&(e=t.data.message,t.data.message.includes("%")&&t.data.parameters))for(let l=0;l<t.data.parameters.length;l++)e=e.replace("%".concat(l+1),t.data.parameters[l]);(0,o.UG)(e||T.UU.SOMETHING_WENT_WRONG),eT(!1)}})(e.customer,t)})())},className:(0,v.cn)(es,e5&&"flex-1","Add to Cart"===e.label&&"active:lg:orange-200 lg:bg-orange-200 hover:lg:bg-orange-200 focus:lg:bg-orange-200",e_&&"rounded-lg p-3"),disabled:tI,children:[ey?"Save Changes":e.label,e_&&e.dataKey===c.u.BOOK_SERVICE?eA?"":" Now":"",eo&&(0,a.jsx)(w.f,{})]},e.dataKey))}),ej&&!eO&&(0,j.createPortal)((0,a.jsx)(h.A,{className:ey?"z-[1002]":""}),document.body),ej&&eO&&(0,a.jsx)(Z,{productName:ec||"",addonName:eO})]})};function Z(e){let{productName:t,addonName:l}=e;return(0,j.createPortal)((0,a.jsx)("div",{className:"fixed inset-0 z-[999] flex h-dvh w-full items-center justify-center bg-black/20 opacity-100 transition-opacity",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-y-4 rounded-lg bg-white px-4 py-6",children:[(0,a.jsx)(N.r,{size:32,weight:"bold",className:"text-primary animate-spin"}),(0,a.jsxs)("div",{className:"grid items-center gap-y-2",children:[(0,a.jsxs)(A.default,{weight:"bold",children:[t," added to your shopping cart"]}),(0,a.jsxs)(A.default,{variant:"body-xs",className:"text-center",children:["Redirecting to ",l]})]})]})}),document.body)}},80134:(e,t,l)=>{"use strict";l.d(t,{l:()=>n,t:()=>i});var a=l(1019),r=l(69668);function i(e,t){switch(e){case a.u.ADD_TO_CART:return t?r.p.PDP_UPDATE_CART:r.p.PDP_ADD_TO_CART;case a.u.ADD_TO_QUOTE:return t?r.p.PDP_UPDATE_QUOTE_ITEM:r.p.PDP_ADD_TO_QUOTE;case a.u.ADD_TO_ADMIN_CART:return t?r.p.PDP_UPDATE_ADMIN_ORDER_ITEM:r.p.PDP_ADD_TO_ADMIN_ORDER;default:return r.p.PDP_CTA_FALLBACK}}let n=(e,t,l,r,i,n,s,o)=>{let d=(e,t,l)=>({label:e,variant:t,dataKey:l});return o?[d("Book Service","primary",a.u.BOOK_SERVICE)]:s&&!r?[d("Add to Order","primary",a.u.ADD_TO_ADMIN_CART)]:s&&r?[d("Update Order","primary",a.u.ADD_TO_ADMIN_CART)]:n&&!r?[d("Add to Quote","primary",a.u.ADD_TO_QUOTE)]:n&&r?[d("Update Quote Item","primary",a.u.ADD_TO_QUOTE)]:!t||r||l||e?t&&r?[d("Update Quote Item","primary",a.u.ADD_TO_QUOTE)]:e&&!l?[d("Request a Quote","primary",a.u.ADD_TO_QUOTE)]:e||r||!l?[d(i?"Out of Stock":"Add to Cart","primary",a.u.ADD_TO_CART)]:[d("Update Cart","primary",a.u.ADD_TO_CART)]:[d(i?"Out of Stock":"Add to Cart","primary",a.u.ADD_TO_CART),d("Add to Quote","secondary",a.u.ADD_TO_QUOTE)]}},83658:(e,t,l)=>{"use strict";l.d(t,{fr:()=>n,v5:()=>i,yk:()=>r});var a=l(95155);let r=()=>(0,a.jsx)("div",{className:"tablet-view w-full",children:(0,a.jsx)("div",{className:"flex flex-col gap-y-4",children:(0,a.jsx)("div",{className:"flex animate-pulse flex-col bg-white lg:gap-6 lg:p-4 lg:pt-0!",children:(0,a.jsxs)("div",{className:"bo col-span-1 flex flex-col gap-4 p-4 pl-0 lg:col-auto lg:p-0",children:[(0,a.jsx)("div",{className:"h-0.5 w-full rounded bg-gray-400"}),(0,a.jsx)("div",{className:"mt-3 h-5 w-full rounded bg-gray-400 lg:w-3/4"}),(0,a.jsxs)("div",{className:"flex gap-4 pb-5 lg:gap-6",children:[(0,a.jsx)("div",{className:"h-40 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-40 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-40 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-40 w-full rounded-xl bg-gray-400 lg:w-1/4"})]})]})})})}),i=()=>(0,a.jsx)("div",{className:"tablet-view w-full",children:(0,a.jsx)("div",{className:"flex flex-col gap-y-4",children:(0,a.jsx)("div",{className:"flex animate-pulse flex-col bg-white lg:gap-6 lg:p-4",children:(0,a.jsxs)("div",{className:"bo col-span-1 flex flex-col gap-4 p-4 pl-0 lg:col-auto lg:p-0",children:[(0,a.jsx)("div",{className:"h-0.5 w-full rounded bg-gray-400"}),(0,a.jsx)("div",{className:"mt-3 h-6 w-full rounded bg-gray-400 lg:w-3/4"}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("div",{className:"flex gap-4 lg:gap-10",children:[(0,a.jsx)("div",{className:"h-10 w-full rounded bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-10 w-full rounded bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-10 w-full rounded bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-10 w-full rounded bg-gray-400 lg:w-1/4"})]}),(0,a.jsx)("div",{className:"my-5 h-0.5 w-full rounded bg-gray-400"}),(0,a.jsx)("div",{className:"h-6 w-full rounded bg-gray-400 lg:w-3/4"}),(0,a.jsx)("div",{className:"mt-3 mb-4 h-6 w-full rounded bg-gray-400 lg:w-1/4"}),(0,a.jsxs)("div",{className:"flex gap-4 p-4 pt-4 lg:p-0",children:[(0,a.jsx)("div",{className:"h-5 w-25 rounded bg-gray-400"}),(0,a.jsx)("div",{className:"h-5 w-25 rounded bg-gray-400"}),(0,a.jsx)("div",{className:"h-5 w-25 rounded bg-gray-400"})]})]})]})})})}),n=()=>(0,a.jsx)("div",{className:"tablet-view w-full",children:(0,a.jsx)("div",{className:"flex flex-col gap-y-4",children:(0,a.jsx)("div",{className:"flex animate-pulse flex-col bg-white lg:gap-6 lg:p-4",children:(0,a.jsxs)("div",{className:"bo col-span-1 flex flex-col gap-4 p-4 pl-0 lg:col-auto lg:p-0",children:[(0,a.jsx)("div",{className:"h-0.5 w-full rounded bg-gray-400"}),(0,a.jsxs)("div",{className:"my-3 flex flex-wrap justify-between",children:[(0,a.jsx)("div",{className:"h-6 w-full rounded bg-gray-400 lg:w-2/4"}),(0,a.jsx)("div",{className:"h-6 w-full rounded bg-gray-400 lg:w-1/4"})]}),(0,a.jsxs)("div",{className:"flex gap-4 pb-3 lg:gap-6",children:[(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"})]}),(0,a.jsxs)("div",{className:"flex gap-4 pb-3 lg:gap-6",children:[(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"}),(0,a.jsx)("div",{className:"h-35 w-full rounded-xl bg-gray-400 lg:w-1/4"})]})]})})})})},90491:()=>{}}]);

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.