"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[42],{103:(e,t,i)=>{i.d(t,{a:()=>g});var n=i(0),s=i(2),o=i(90),a=i(91),d=i(104),r=i(105),l=i(7),c=i(87),u=i(40),p=i(101),h=i(85);const{sliderContainer:m,sliderItem:v}=o.a;function w(e){(new Image).src=e.src}function f({image:e,index:t,isDesktop:i,embedded:s,showModelInformation:d,maxFullSizeWidth:r}){const{src:u,altText:p,model:h,width:m,height:w}=e,f=null==u?void 0:u.endsWith(".mp4");return(0,n.jsxs)("a",{class:[i?a.a.item:v,s?o.a.embeddedImage:""].join(" "),"data-pswp-type":f?"video":"image",href:u,"data-pswp-width":m,"data-pswp-height":w,target:"_blank",rel:"noreferrer",children:[f?(0,n.jsx)(c.a,{sources:[{url:u,mimeType:"video/mp4",width:m,height:w}],preload:"metadata",className:i?a.a.item:v}):(0,n.jsx)(l.a,{src:u,alt:p,initialWidth:300,fullSizeWidth:r,width:m,height:w}),d&&h&&(0,n.jsx)("div",{class:o.a.modelOverlay,children:h})]},t)}function g({product:e,selectedVariant:t,pdpVideo:i,showModelInformation:l,isDesktop:c,embedded:v,includeDefaultImages:g}){const b=function({product:e,selectedVariant:t,pdpVideo:i,isDesktop:n,includeDefaultImages:o}){return(0,s.useMemo)((()=>{var s,a;const d=(0,u.c)(e.imageMap,t,void 0,o),r=null==t?void 0:t.selectedOptions.Color;return i&&r&&(null===(s=e.productVideos)||void 0===s?void 0:s[r])?[...d.slice(0,n?2:1),{altText:r,src:null===(a=e.productVideos)||void 0===a?void 0:a[r]},...d.slice(n?2:1)]:d}),[t])}({product:e,selectedVariant:t,pdpVideo:i,isDesktop:c,includeDefaultImages:g}),x=(0,p.a)(),y=(0,s.useRef)(null),[I,j]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{b.forEach(w),Object.values(e.imageMap).forEach((e=>{e.slice(0,2).forEach(w)}));const t=new d.a({mainClass:a.a.pswpOverride,gallery:"#hero-slider",children:"a",pswpModule:r.a,bgOpacity:.9,arrowKeys:!0,showHideAnimationType:"none"});return i&&t.on("contentLoad",(e=>{var t;const{content:i}=e;if(null===(t=i.data.src)||void 0===t?void 0:t.endsWith(".mp4")){e.preventDefault(),i.element=document.createElement("div"),i.element.className="pswp__video-container";const t=document.createElement("video");t.setAttribute("playsinline",""),t.setAttribute("muted",""),t.setAttribute("loop",""),t.setAttribute("style","width: 100vw;"),t.setAttribute("autoplay",""),t.src=i.data.src,i.element.appendChild(t)}})),t.init(),I?!c&&y.current&&(y.current.scrollLeft=0):j(!0),()=>{null==t||t.destroy()}}),[b,g]),(0,n.jsxs)("section",{"aria-labelledby":"product-photos-heading",class:["pswp-gallery",c?a.a.container:m,v?o.a.embeddedContainer:""].join(" "),ref:y,id:"hero-slider",children:[(0,n.jsx)("h2",{id:"product-photos-heading",class:"visually-hidden",children:"Product Photos"}),(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:".pswp--touch .pswp__button--arrow { visibility: visible; };\n "+(i?" .pswp__video-container {\n position: relative;\n width: 100%;\n height: 100%;\n pointer-events: none;\n }\n .pswp__video-container video {\n background: #444;\n object-fit: cover;\n width: 100%;\n height: 100%;\n max-width: 800px;\n pointer-events: auto;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }":"")}}),(0,n.jsx)(h.a,{appearance:"pdp",location:"image",product:e,selectedVariant:t}),b.map(((e,t)=>(0,n.jsx)(f,{image:e,index:t,isDesktop:c,embedded:v,showModelInformation:l,maxFullSizeWidth:x},t)))]})}},52:(e,t,i)=>{i.d(t,{a:()=>d});var n=i(0),s=i(41),o=i(46),a=i(23);function d({isOpen:e,onClose:t,loginOnly:i=!0,returnTo:d}){return(0,n.jsx)(s.a,{isOpen:e,onClose:t,title:"Sign in",children:(0,n.jsx)("div",{class:a.a.loginFormContainer,children:(0,n.jsx)(o.a,{loginOnly:i,returnTo:d})})})}},87:(e,t,i)=>{i.d(t,{a:()=>o});var n=i(0),s=i(2);function o({sources:e,className:t,preload:i="metadata"}){const o=(0,s.useRef)(null);return(0,s.useEffect)((()=>{o.current&&o.current.load()}),[e]),(0,n.jsx)("video",{ref:o,class:t,preload:i,playsInline:!0,muted:!0,loop:!0,autoPlay:!0,children:e.map((e=>(0,n.jsx)("source",{src:e.url,type:e.mimeType,width:e.width,height:e.height},e.url)))})}},85:(e,t,i)=>{i.d(t,{a:()=>h});var n=i(0),s=i(3),o=i(2),a=i(69),d=i(22),r=i(39),l=i(24),c=i(51),u=i(52),p=i(4);function h(e){const{product:t,selectedVariant:i,appearance:s,location:o,isBundle:a}=e,{pdpWishlistLoc:d}=(0,p.d)((e=>({pdpWishlistLoc:e.pdpWishlistLoc})));return(0,c.a)()?"pdp"===s&&d!==o?null:i?t.isPack||a||!i||i.parentId?null:(0,n.jsx)(m,Object.assign({},e,{selectedVariant:i})):null:null}function m({appearance:e,product:t,selectedVariant:i,disabled:c=!1,location:h}){var m;const{isMobile:v}=(0,p.d)((e=>({isMobile:e.isMobile}))),{toggleWishlistItem:w,isModalOpen:f,closeLoginModal:g,wishlistItems:b,wishlistMode:x}=(0,a.g)(),y=(0,r.b)(t,i),I=(0,o.useMemo)((()=>{const e=i.childProductId;return parseInt(e||t.id)}),[i.childProductId,t.id]),j=(0,o.useMemo)((()=>parseInt(i.variantId)),[i.variantId]),M=(0,o.useMemo)((()=>"undefined"!=typeof window?window.location.origin+y:y),[y]),k=(0,o.useMemo)((()=>b.some((e=>e.variantId===j))),[j,b]),O=(0,o.useMemo)((()=>b.some((e=>e.productId===I))),[I,b]),C=(0,o.useMemo)((()=>{switch(x){case"variant":return k;case"product":return O;default:return!1}}),[x,k,O]),E=(0,o.useCallback)((()=>{void 0!==j&&void 0!==I&&(document.activeElement instanceof HTMLElement&&document.activeElement.blur(),w({epi:j,empi:I,du:M}))}),[w,j,I,M]),[V,D]=(0,o.useState)(!1);(0,o.useLayoutEffect)((()=>{D(!0)}),[]);const P=null!==(m=i.productTitle)&&void 0!==m?m:t.title,T=V&&C,W=T?"Remove":"Add",_=T?"from":"to",L=(0,o.useMemo)((()=>(0,l.b)(P,i.selectedOptions)),[P,i.selectedOptions]),S=L?`${W} ${L} ${_} wishlist`:`${W} ${_} wishlist`,A="pdp"===e?d.a.wishlistButtonPDP:d.a.wishlistButtonPLP,N="image"===h?v?d.a.pdpImageMobile:d.a.pdpImageDesktop:void 0,$=N?`${A} ${N}`:A;return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)("button",{onClick:E,class:$,"aria-pressed":V&&C,disabled:c,"aria-label":S,children:(0,n.jsx)("div",{className:d.a.wishlistButtonIcon})}),(0,n.jsx)(u.a,{isOpen:f,onClose:g,returnTo:"undefined"!=typeof window?window.location.pathname+window.location.search:void 0})]})}},51:(e,t,i)=>{i.d(t,{a:()=>s,b:()=>o});var n=i(4);function s(){return(0,n.d)((e=>e.wishlistEnabled))}function o(){return(0,n.d)((e=>e.wishlistProvider))}},101:(e,t,i)=>{i.d(t,{a:()=>o});var n=i(2),s=i(5);function o(){const e=(0,s.m)("maxFullSizeWidth","1200","300")();return(0,n.useMemo)((()=>{if(!e)return 1200;try{const t=parseInt(e);if(Number.isNaN(t))return;return t}catch(e){return}}),[e])}}}]);