1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3070],{49586:function(n,e,t){t.d(e,{k:function(){return H},A:function(){return G}});var i=t(85893),o=t(67294),r=t(73935),d=t(11163),l=t(55323),u=t(89343),a=t(98907),c=t(48246),s=t(22269),p=t(17e3),h=t(99397);let f=n=>n&&Array.isArray(n)?n:[],g=n=>null==n?0:"number"==typeof n?n:"object"==typeof n&&"price"in n?n.price:0,v=(n,e)=>{try{var t,i;let o=e.reduce((n,e)=>{var t,i,o,r,d,l;let u=null==e?void 0:null===(o=e.variations_definition)||void 0===o?void 0:null===(i=o.product_variations)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.price,a=g(u),c=f(null==e?void 0:e.discounts),s=null!==(d=null===(r=c[0])||void 0===r?void 0:r.definition)&&void 0!==d?d:{},p=Object.entries(s).find(n=>{let[t]=n;return t===(null==e?void 0:e.uuid)}),h=Number(null!==(l=null==p?void 0:p[1])&&void 0!==l?l:0);return n+Number((a*(1-h/100)).toFixed(2))},0),r=e.reduce((n,e)=>{var t,i,o;return n+Number(((null==e?void 0:null===(o=e.variations_definition)||void 0===o?void 0:null===(i=o.product_variations)||void 0===i?void 0:null===(t=i[0])||void 0===t?void 0:t.compare_at_price)||0).toFixed(2))},0);(null===(i=n.variations_definition)||void 0===i?void 0:null===(t=i.product_variations)||void 0===t?void 0:t[0])&&(n.variations_definition.product_variations[0].price=o,n.variations_definition.product_variations[0].compare_at_price=r)}catch(n){a.Y.error("[calculateBundlePrices] Error calculating prices:",n)}},_=(n,e)=>{let t=e.map(n=>{let{uuid:e}=n;return e}).slice().sort((n,e)=>n.localeCompare(e));return n.length&&(n=n.map(n=>[n.filter(n=>"bundle"===n.definition_type).find(n=>JSON.stringify(Object.keys(n.definition).slice().sort((n,e)=>n.localeCompare(e)))===JSON.stringify(t))])),e.forEach((e,t)=>{e.discounts=n[t]}),n},x=n=>n&&Array.isArray(n)&&n.length>0?n:null,m=(n,e)=>{let t=e.map(n=>x(null==n?void 0:n.discounts)).filter(Boolean);t.length&&(n.discounts=_(t,e),v(n,e)),n.metafields=[{storefrontId:null==n?void 0:n.id,key:"shogun_bundle_handles_ids",value:JSON.stringify(n.shogun_bundle_handles_ids||[]),namespace:"custom_fields"}]};var b=t(28360);let w=n=>{let{product:e,countryCode:t="US",locale:i="en-US",isEnabled:r=!0,onError:d}=n,l=null==e?void 0:e.bundle_handles,u=!!(null==l?void 0:l.length),c=r&&u&&!!e&&(0,h.Z)(),s=(0,o.useRef)(null),{data:f=[],isLoading:g,error:v,isError:_}=(0,p.a)(["bundle-composing-products",l,t,i],async()=>(null==l?void 0:l.length)?(await Promise.all(l.map(n=>(0,b.C)({productSlug:n,countryCode:t,locale:i})))).filter(Boolean):[],{enabled:c,staleTime:36e5,retry:!1,refetchOnWindowFocus:!1,useErrorBoundary:!1,onError:n=>{a.Y.error("[useBundleComposingProducts] Error fetching bundle products:",l,n),null==d||d(n)}});return(0,o.useEffect)(()=>{if(!e||!f.length)return;let n=f.map(n=>n.uuid).join("-"),t="".concat(e.uuid,"-").concat(n);s.current!==t&&(m(e,f),s.current=t)},[e,f]),{bundleComposingProducts:f,isLoading:!!c&&g,error:v,isError:_}};var k=t(55745),y=t(30238),j=t(28409),E=t(14126),C=t(62851),S=t(82729),O=t(26601);function Z(){let n=(0,S._)(["\n position: fixed;\n top: 0;\n left: 0;\n z-index: 48;\n height: 100vh;\n height: 100dvh;\n width: 100dvw;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n align-items: center;\n justify-content: center;\n overflow-y: auto;\n"]);return Z=function(){return n},n}function A(){let n=(0,S._)(["\n position: relative;\n background-color: #fff;\n border-radius: 16px;\n max-width: 1232px;\n max-height: 90vh;\n max-height: 90dvh;\n width: 100%;\n overflow-y: auto;\n margin: 16px;\n\n /* position dropdown options above the button to prevent\n scroll issues when options extend below the visible area */\n [data-testid='simple-dropdown'] + ul,\n [data-headlessui-state] ul[role='listbox'] {\n bottom: 100%;\n top: auto;\n margin-bottom: 4px;\n margin-top: 0;\n }\n\n @media (max-width: 768px) {\n margin: 0;\n }\n"]);return A=function(){return n},n}function N(){let n=(0,S._)(["\n all: unset;\n position: sticky;\n top: -16px;\n float: right;\n z-index: 10;\n background-color: #fff;\n width: calc(100% - 32px);\n height: 40px;\n display: flex;\n align-items: center;\n justify-content: flex-end;\n padding-top: 16px;\n padding-right: 16px;\n cursor: pointer;\n"]);return N=function(){return n},n}function P(){let n=(0,S._)(["\n padding: 16px;\n min-height: 300px;\n overflow-x: hidden;\n\n @media (max-width: 768px) {\n width: 100%;\n margin-top: 48px;\n }\n"]);return P=function(){return n},n}function V(){let n=(0,S._)(["\n width: 100%;\n height: 600px;\n background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);\n background-size: 200% 100%;\n animation: loading 1.5s ease-in-out infinite;\n border-radius: 8px;\n overflow: hidden;\n\n @keyframes loading {\n 0% {\n background-position: 200% 0;\n }\n 100% {\n background-position: -200% 0;\n }\n }\n"]);return V=function(){return n},n}function L(){let n=(0,S._)(["\n /* Hide the original fit guarantee badge */\n [data-testid='fit-guarantee-badge'] {\n display: none !important;\n }\n"]);return L=function(){return n},n}function q(){let n=(0,S._)(["\n width: 100%;\n display: block;\n margin: 0 auto;\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #292929;\n\n @media (max-width: 768px) {\n margin-top: 14px;\n padding-bottom: 32px;\n }\n"]);return q=function(){return n},n}function B(){let n=(0,S._)(["\n height: 24px;\n width: 100%;\n display: flex;\n align-items: center;\n gap: 10px;\n margin: 16px 0 0 8px;\n text-align: center;\n font-size: 16px;\n font-weight: 600;\n color: #292929;\n"]);return B=function(){return n},n}let F=O.Z.div(Z()),z=O.Z.div(A()),T=O.Z.button(N()),J=O.Z.div(P()),M=O.Z.div(V()),Q=O.Z.div(L());O.Z.a(q());let R=O.Z.a(B());var U=t(83566),Y=t(88675),D=t(74435),I=t(61867);let W=n=>{let{product:e,bundleComposingProducts:t=[],isLoading:r,onClose:u}=n,{translate:c,TRANSLATION_KEYS:s}=(0,E.T)(),p=s.PDP,{locale:h}=(0,d.useRouter)(),{localePrefix:f}=(0,I.Cm)(h),{isFeatureEnabled:g}=(0,l.e)("te_add_to_cart/pressed");return(0,o.useEffect)(()=>{g&&(a.Y.log("[QuickView Debug] Add to cart pressed, closing modal"),u())},[g,u]),(0,i.jsx)(C.Z,{isOpen:!0,onClose:u,returnFocus:!1,children:(0,i.jsx)(k.M,{children:(0,i.jsx)(y.q,{children:(0,i.jsx)(j.sk,{children:(0,i.jsx)(Y.y,{children:(0,i.jsx)(F,{onClick:n=>{n.target===n.currentTarget&&u()},children:(0,i.jsxs)(z,{children:[(0,i.jsx)(T,{onClick:u,"aria-label":c(s.COMMON.BUTTONS_CLOSE_MODAL),children:(0,i.jsx)(U.J.Actions.Close,{width:"20px",height:"20px","aria-hidden":"true"})}),(0,i.jsxs)(J,{children:[r&&(0,i.jsx)(M,{}),!r&&e&&(0,i.jsxs)(Q,{"data-product-slug":e.slug,children:[(0,i.jsx)(D.Z,{product:e,bundleComposingProducts:t,showBreadcrumbs:!1,showCouponBanner:!1,zoomMobileEnabled:!1,isQuickView:!0}),(0,i.jsxs)(R,{href:"".concat(f,"/products/").concat(e.slug),children:[(0,i.jsx)("span",{children:c(p.QUICK_VIEW_SEE_FULL_DETAILS)}),(0,i.jsx)(U.J.Arrows.ChevronRightVariant,{width:"24px",height:"24px","aria-hidden":"true"})]})]})]})]})})})})})})})},K={intent:"quickview_with_product_section_intent",opened:"quickview_with_product_section_opened",closed:"quickview_with_product_section_closed"},H="quickview-with-product-section/trigger",G=()=>{var n;let{locale:e}=(0,d.useRouter)(),{countryCode:t}=(0,I.Cm)(e),[p,h]=(0,o.useState)(""),[f,g]=(0,o.useState)(!1),[v,_]=(0,o.useState)(),{isFeatureEnabled:x,eventData:m}=(0,l.e)(H);(0,u.h)({isOpen:f});let{product:b,isLoading:k,error:y}=(0,s.K)({productSlug:p,countryCode:t,locale:e,isEnabled:f&&!!p}),{bundleComposingProducts:j,isLoading:E,error:C}=w({product:b,countryCode:t,locale:e,isEnabled:f&&!!b}),S=k||!!(null==b?void 0:null===(n=b.bundle_handles)||void 0===n?void 0:n.length)&&E;return((0,o.useEffect)(()=>{x&&(null==m?void 0:m.detail)&&(c.cp.track({event:K.intent,quickView_with_product_section_details:m.detail}),_(m.detail),g(!0),m.detail.product_slug&&h(m.detail.product_slug))},[x,m]),(0,o.useEffect)(()=>{b&&v&&c.cp.track({event:K.opened,quickView_with_product_section_details:v})},[b,v]),(0,o.useEffect)(()=>{y&&a.Y.error("[QuickViewWithProductSection] Error fetching product:",y),C&&a.Y.error("[QuickViewWithProductSection] Error fetching bundle products:",C)},[y,C]),x&&f)?(0,i.jsx)(i.Fragment,{children:(0,r.createPortal)((0,i.jsx)(W,{product:b,bundleComposingProducts:j,isLoading:S,onClose:()=>{v&&c.cp.track({event:K.closed,quickView_with_product_section_details:v}),g(!1),h(""),_(void 0)}},p),document.body)}):null}},65603:function(n,e,t){t.d(e,{C:function(){return d}});var i=t(77414),o=t(93123);let r={},d=()=>{var n;let e=null!==(n=(0,i.fV)().campaignContent)&&void 0!==n?n:r;return(n,t)=>(0,o.R)(e[n],t)}}}]);
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.