"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[33],{132:(e,t,n)=>{n.d(t,{a:()=>N});var o=n(0),i=n(4),a=n(26),l=n(3),s=n(60),r=n(123);function d({groupColorsByOptionName:e=!1,newColorSectionName:t,coreColorSectionName:n,sizeGuideCodeBasedFlag:d=!1,defaultSizeGuideOptionName:c="",product:u,selectedVariant:p,setSelectedVariantId:v,compact:m=!1,productApp:U}){var f;const h=null==U?void 0:U.product.value,S=null==U?void 0:U.selectedVariant.value,{getOptionNameForColor:O,getHexForOptionColor:x}=(0,l.d)((e=>({getOptionNameForColor:e.getOptionNameForColor,getHexForOptionColor:e.getHexForOptionColor}))),g=null!=u?u:h,j=null!=p?p:S,C=null!=v?v:e=>{e&&U&&U.setSelectedVariantId({variantId:e})},b=(0,r.b)({product:g,newColorSectionName:t,coreColorSectionName:n,clearanceColors:null===(f=null==U?void 0:U.product.value)||void 0===f?void 0:f.clearanceColors,getOptionNameForColor:e?O:()=>{}});if(!g||!b)return(0,o.jsx)(i.Fragment,{});const N="sizeGuide"in g?g.sizeGuide:void 0;return(0,o.jsx)("div",{class:a.a.container,children:b.map((e=>{var t;return(0,o.jsx)(s.a,{product:g,option:e,getHexForOptionColor:x,selectedVariant:j,findProductVariantWithOption:e=>{var t,n;return null===(n=null==U?void 0:(t=U.findProductVariantWithOption).value)||void 0===n?void 0:n.call(t,e,g,j)},setSelectedVariantId:C,sizeGuide:N,sizeGuideCodeBasedFlag:d,defaultSizeGuideOptionName:c,compact:m,productApp:U},`${g.handle}-${null!==(t=e.optionName)&&void 0!==t?t:e.name}`)}))})}var c=n(1),u=n(61),p=n(2),v=n(68);function m(e,t){const n=U[`${e} (${t})`];if(!n)return e;for(const e of n.split(" / "))if(e.includes("US"))return e.split(" (")[0];return e}const U={"DD (US)":"DD (US,UK) / E (EU)","E (US)":"DD (US,UK) / E (EU)","DD (UK)":"DD (US,UK) / E (EU)","E (EU)":"DD (US,UK) / E (EU)","DDD (US)":"DDD (US) / E (UK) / F (EU)","F (US)":"DDD (US) / E (UK) / F (EU)","E (UK)":"DDD (US) / E (UK) / F (EU)","F (EU)":"DDD (US) / E (UK) / F (EU)","G (US)":"G (US,EU) / F (UK)","G (EU)":"G (US,EU) / F (UK)","F (UK)":"G (US,EU) / F (UK)","H (US)":"H (US,EU) / FF (UK)","FF (US)":"H (US,EU) / FF (UK)","H (EU)":"H (US,EU) / FF (UK)","FF (UK)":"H (US,EU) / FF (UK)","I (US)":"I (US,EU) / G (UK)","I (EU)":"I (US,EU) / G (UK)","G (UK)":"I (US,EU) / G (UK)","J (US)":"J (US,EU) / GG (UK)","GG (US)":"J (US,EU) / GG (UK)","J (EU)":"J (US,EU) / GG (UK)","GG (UK)":"J (US,EU) / GG (UK)","K (US)":"K (US,EU) / H (UK)","K (EU)":"K (US,EU) / H (UK)","H (UK)":"K (US,EU) / H (UK)","L (US)":"L (US,EU) / HH (UK)","L (EU)":"L (US,EU) / HH (UK)","HH (UK)":"L (US,EU) / HH (UK)","M (US)":"M (US,EU) / J (UK)","M (EU)":"M (US,EU) / J (UK)","J (UK)":"M (US,EU) / J (UK)","N (US)":"N (US,EU) / JJ (UK)","N (EU)":"N (US,EU) / JJ (UK)","JJ (UK)":"N (US,EU) / JJ (UK)","O (US)":"O (US,EU) / K (UK)","O (EU)":"O (US,EU) / K (UK)","K (UK)":"O (US,EU) / K (UK)","P (US)":"P (US,EU) / KK (UK)","KK (US)":"P (US,EU) / KK (UK)","P (EU)":"P (US,EU) / KK (UK)","KK (UK)":"P (US,EU) / KK (UK)","Q (US)":"Q (US,EU) / L (UK)","Q (EU)":"Q (US,EU) / L (UK)","L (UK)":"Q (US,EU) / L (UK)"};function f({option:e,displayedOptions:t,fieldsetName:n,placeholder:a,isUnselectedSize:s,isVariantUnavailable:r}){var d,U,f,S,O,x;const g=(0,l.d)((e=>e.device)),[j,C]=(0,c.useState)(!1),b=t.find((e=>e.isSelected)),N=null==b?void 0:b.value,K=r||b&&!b.availableForSale&&!s,E=null!==(d=null!=a?a:e.optionName)&&void 0!==d?d:e.name,w=s?E:null!=N?N:E,z=e.sizing,F=e.name.toLowerCase().includes("cup"),V=!!z&&"US"!==z&&F,I=(0,o.jsxs)("div",{className:u.a.dropdownOptions,children:[V&&(0,o.jsxs)("div",{className:u.a.dropdownColumnHeader,children:[(0,o.jsx)("span",{children:z}),(0,o.jsx)("span",{children:"US"})]}),t.map((e=>(0,o.jsx)("button",{type:"button",className:[u.a.dropdownOption,V?u.a.dropdownOptionRow:"",e.isSelected&&!s?u.a.dropdownOptionSelected:"",e.availableForSale?"":u.a.dropdownOptionUnavailable].filter(Boolean).join(" "),onClick:()=>(e=>{var t,n,o;e.setSelectedVariantId(null===(t=e.variant)||void 0===t?void 0:t.variantId),"stayOpen"!==(0,p.getAssignment)(`${g}_sizeDropdownSelect`)&&("desktop"!==g?C(!1):null===(o=null===(n=document.activeElement)||void 0===n?void 0:n.blur)||void 0===o||o.call(n))})(e),role:"option","aria-selected":e.isSelected&&!s,children:V?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("span",{children:e.value}),(0,o.jsx)("span",{className:u.a.usEquivalent,children:m(e.value,z)})]}):e.value},e.value)))]});return(0,o.jsxs)(i.Fragment,{children:[(0,o.jsxs)("div",{className:u.a.dropdownContainerDesktop,children:[(0,o.jsxs)("button",{type:"button",className:[u.a.dropdownTrigger,!N||s?u.a.placeholder:"",K?u.a.dropdownTriggerUnavailable:""].filter(Boolean).join(" "),onMouseDown:e=>{const t=e.currentTarget;document.activeElement===t?(t.blur(),e.preventDefault()):t.focus()},"aria-haspopup":"listbox",children:[(0,o.jsx)("span",{className:u.a.dropdownTriggerText,children:w}),(0,o.jsx)(h,{})]}),(0,o.jsx)("div",{className:u.a.dropdownPanel,role:"listbox",children:I}),(0,o.jsx)("input",{type:"hidden",name:n,value:null!==(f=null===(U=null==b?void 0:b.variant)||void 0===U?void 0:U.variantId)&&void 0!==f?f:""})]}),(0,o.jsxs)("div",{className:u.a.dropdownContainerMobile,children:[(0,o.jsxs)("button",{type:"button",className:[u.a.dropdownTrigger,!N||s?u.a.placeholder:"",K?u.a.dropdownTriggerUnavailable:""].filter(Boolean).join(" "),onClick:()=>{"desktop"!==g&&C(!j)},"aria-haspopup":"listbox","aria-expanded":j,children:[(0,o.jsx)("span",{className:u.a.dropdownTriggerText,children:w}),(0,o.jsx)(h,{className:j?u.a.chevronUp:""})]}),(0,o.jsx)(v.a,{isOpen:j,onClose:()=>C(!1),title:`Select ${null!==(S=e.optionName)&&void 0!==S?S:e.name}`,children:I}),(0,o.jsx)("input",{type:"hidden",name:n,value:null!==(x=null===(O=null==b?void 0:b.variant)||void 0===O?void 0:O.variantId)&&void 0!==x?x:""})]})]})}function h({className:e}){return(0,o.jsx)("svg",{className:[u.a.chevronIcon,e].filter(Boolean).join(" "),width:"10",height:"6",viewBox:"0 0 10 6",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,o.jsx)("path",{d:"M1 1L5 5L9 1",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}var S=n(138),O=n(28);function x({product:e,sizeOptions:t,selectedVariant:n,setSelectedVariantId:i,sizeGuide:a,sizeGuideCodeBasedData:l,sizeGuideId:s,combinedSizeOptions:r,productApp:d}){var c;const p=r&&r.length>0&&r.every((e=>t.some((t=>t.name.toLowerCase()===e.toLowerCase())))),v=null===(c=t.find((e=>e.sizing)))||void 0===c?void 0:c.sizing,m=!!v&&"US"!==v;return(0,o.jsxs)("fieldset",{className:u.a.sizeSection,children:[(0,o.jsxs)("legend",{className:u.a.visuallyHidden,children:[e.title," Size Selection"]}),(0,o.jsxs)("div",{className:u.a.sizeHeader,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:u.a.sizeLabel,children:"Size"}),m&&(0,o.jsxs)("span",{className:u.a.sizingSubtext,children:["This product is sold in ",v," sizes"]})]}),(0,o.jsx)(S.a,{sizeGuide:a,sizeGuideCodeBasedData:l,sizeGuideId:s})]}),(0,o.jsx)("div",{className:u.a.sizeDropdowns,children:p?(0,o.jsx)(j,{product:e,combinedOptionNames:r,sizeOptions:t,selectedVariant:n,setSelectedVariantId:i,productApp:d}):t.map(((a,l)=>(0,o.jsx)(g,{product:e,option:a,selectedVariant:n,precedingOptions:t.slice(0,l),allOtherOptions:t.filter(((e,t)=>t!==l)),setSelectedVariantId:i,productApp:d},a.name)))})]})}function g({product:e,option:t,selectedVariant:n,precedingOptions:a,allOtherOptions:l,setSelectedVariantId:s,productApp:r}){var d,u,p,v;const m=r?(e,t)=>{var n;if(t){const o=null===(n=t.mappedSizes)||void 0===n?void 0:n[e],i=1===(null==o?void 0:o.length)?o[0]:t.selectedOptions[e];r.selectOption({optionName:e,value:i})}}:void 0,U=null!==(d=null==r?void 0:r.selectedOptions.value)&&void 0!==d?d:{},h=null!==(u=null==r?void 0:r.defaultUnselected.value)&&void 0!==u&&u,S=(0,O.a)(r,n,t.name),x=null!==(p=null==n?void 0:n.selectedOptions[t.name])&&void 0!==p?p:null===(v=null==n?void 0:n.displayOptions)||void 0===v?void 0:v[t.name],g=(0,c.useMemo)((()=>{const e={};for(const t of a){const o=null==n?void 0:n.selectedOptions[t.name];o&&(e[t.name]=o)}return e}),[a,null==n?void 0:n.selectedOptions]),j=(0,c.useMemo)((()=>{const e={};for(const t of l){const o=null==n?void 0:n.selectedOptions[t.name];o&&(e[t.name]=o)}return e}),[l,null==n?void 0:n.selectedOptions]),C=null==n?void 0:n.selectedOptions.Color,b=(0,c.useMemo)((()=>{const e={};for(const t of l){const o=null==n?void 0:n.selectedOptions[t.name];o&&(h&&void 0===U[t.name]||(e[t.name]=o))}return e}),[l,null==n?void 0:n.selectedOptions,h,U]),N=(0,c.useMemo)((()=>t.values.map((n=>{var o;const i=e.variants.find((e=>{if(e.selectedOptions[t.name]!==n)return!1;if(e.oos)return!1;for(const[t,n]of Object.entries(g))if(e.selectedOptions[t]!==n)return!1;return!0})),a=C?e.variants.find((e=>{if(e.selectedOptions[t.name]!==n)return!1;if(e.oos)return!1;for(const[t,n]of Object.entries(b))if(e.selectedOptions[t]!==n)return!1;return e.selectedOptions.Color===C})):i,l=e.variants.find((e=>{if(e.selectedOptions[t.name]!==n)return!1;for(const[t,n]of Object.entries(j))if(e.selectedOptions[t]!==n)return!1;return!C||e.selectedOptions.Color===C})),r=e.variants.find((e=>{if(e.selectedOptions[t.name]!==n)return!1;for(const[t,n]of Object.entries(j))if(e.selectedOptions[t]!==n)return!1;return!0})),d=null!==(o=null!=l?l:r)&&void 0!==o?o:i;return{value:n,variant:d,isSelected:x===n&&!S,matchesSelectedValue:x===n,availableForSale:!!a,setSelectedVariantId:e=>{null==m||m(t.name,d),l?s(l.variantId):r?s(r.variantId):i?s(i.variantId):d&&s(d.variantId)}}}))),[t.values,t.name,e.variants,x,g,j,b,C,S,m,s]),K=(0,c.useMemo)((()=>!(S||!C||!x||e.variants.some((e=>{if(e.selectedOptions[t.name]!==x)return!1;if(e.oos)return!1;for(const[t,n]of Object.entries(b))if(e.selectedOptions[t]!==n)return!1;return e.selectedOptions.Color===C})))),[S,C,x,e.variants,t.name,b]);if(0===N.length)return(0,o.jsx)(i.Fragment,{});const E=`${e.handle}-${t.name}`.replaceAll(" ","-");return(0,o.jsx)(f,{displayedOptions:N,option:t,fieldsetName:E,isUnselectedSize:S,isVariantUnavailable:K})}function j({product:e,combinedOptionNames:t,sizeOptions:n,selectedVariant:a,setSelectedVariantId:l,productApp:s}){var r;const d=s?(e,t)=>{var n;if(t){const o=null===(n=t.mappedSizes)||void 0===n?void 0:n[e],i=1===(null==o?void 0:o.length)?o[0]:t.selectedOptions[e];s.selectOption({optionName:e,value:i})}}:void 0,u=(0,O.a)(s,a),p=(0,c.useMemo)((()=>t.map((e=>n.find((t=>t.name.toLowerCase()===e.toLowerCase())))).filter((e=>!!e))),[t,n]),v=null===(r=p.find((e=>e.sizing)))||void 0===r?void 0:r.sizing,U=!!v&&"US"!==v,h=(0,c.useMemo)((()=>p.map((e=>{var t;return null!==(t=null==a?void 0:a.selectedOptions[e.name])&&void 0!==t?t:""})).join("")),[p,null==a?void 0:a.selectedOptions]),S=null==a?void 0:a.selectedOptions.Color,x=(0,c.useMemo)((()=>{const t=new Map;for(const n of e.variants){const e={};let o="";for(const t of p){const i=n.selectedOptions[t.name];i&&(e[t.name]=i,o+=i)}Object.keys(e).length===p.length&&(t.get(o)||n.unavailable||t.set(o,{combinedValue:o,optionValues:e,variant:n,availableForSale:!n.oos}))}const n=Array.from(t.values());return n.sort(((e,t)=>{for(const n of p){const o=n.values.indexOf(e.optionValues[n.name]),i=n.values.indexOf(t.optionValues[n.name]);if(o!==i)return o-i}return 0})),n.map((t=>{const n=h===t.combinedValue&&!u;let o=t.variant,i=t.availableForSale;if(S){const n=e.variants.find((e=>{for(const[n,o]of Object.entries(t.optionValues))if(e.selectedOptions[n]!==o)return!1;return e.selectedOptions.Color===S}));n?(o=n,i=!n.oos):i=!1}let a=t.combinedValue;if(U&&v){const e=p.map((e=>{const n=t.optionValues[e.name];return e.name.toLowerCase().includes("cup")?m(n,v):n})).join("");e!==t.combinedValue&&(a=`${t.combinedValue} (${e} US)`)}return{value:a,variant:o,isSelected:n,matchesSelectedValue:h===t.combinedValue,availableForSale:i,setSelectedVariantId:()=>{for(const e of Object.keys(t.optionValues))null==d||d(e,o);l(o.variantId)}}}))}),[e.variants,p,h,u,S,d,l]),g=(0,c.useMemo)((()=>{if(u||!S||!h)return!1;const e=x.find((e=>e.isSelected));return!!e&&!e.availableForSale}),[u,S,h,x]);if(0===x.length)return(0,o.jsx)(i.Fragment,{});const j={name:"Size",values:x.map((e=>e.value))},C=`${e.handle}-combined-size`.replaceAll(" ","-");return(0,o.jsx)(f,{displayedOptions:x,option:j,fieldsetName:C,isUnselectedSize:u,isVariantUnavailable:g})}function C({groupColorsByOptionName:e=!1,newColorSectionName:t,coreColorSectionName:n,sizeGuideCodeBasedFlag:d=!1,defaultSizeGuideOptionName:u="",combinedSizeOptions:p,product:v,selectedVariant:m,setSelectedVariantId:U,compact:f=!1,productApp:h}){var S;const O=null==h?void 0:h.product.value,g=null==h?void 0:h.selectedVariant.value,{getOptionNameForColor:j,getHexForOptionColor:C}=(0,l.d)((e=>({getOptionNameForColor:e.getOptionNameForColor,getHexForOptionColor:e.getHexForOptionColor}))),b=null==h?void 0:h.findProductVariantWithOption.value,N=null!=v?v:O,K=null!=m?m:g,E=null!=U?U:e=>{e&&h&&h.setSelectedVariantId({variantId:e})},w=(0,r.b)({product:N,newColorSectionName:t,coreColorSectionName:n,clearanceColors:null===(S=null==h?void 0:h.product.value)||void 0===S?void 0:S.clearanceColors,getOptionNameForColor:e?j:()=>{}}),{sizeOptions:z,nonSizeOptions:F}=(0,c.useMemo)((()=>w?{sizeOptions:w.filter((e=>e.name.toLowerCase().includes("size"))),nonSizeOptions:w.filter((e=>!e.name.toLowerCase().includes("size")))}:{sizeOptions:[],nonSizeOptions:[]}),[w]);if(!N||!w)return(0,o.jsx)(i.Fragment,{});const V="sizeGuide"in N?N.sizeGuide:void 0,I=d?N.sizeGuideCodeBasedData:void 0;return(0,o.jsxs)("div",{className:a.a.container,children:[z.length>0&&(0,o.jsx)(x,{product:N,sizeOptions:z,selectedVariant:K,findProductVariantWithOption:e=>null==b?void 0:b(e,N,K),setSelectedVariantId:E,sizeGuide:V,sizeGuideCodeBasedData:I,sizeGuideId:N.sizeGuideId,compact:f,combinedSizeOptions:p}),F.map((e=>{var t;return(0,o.jsx)(s.a,{product:N,option:e,getHexForOptionColor:C,selectedVariant:K,findProductVariantWithOption:e=>null==b?void 0:b(e,N,K),setSelectedVariantId:E,compact:f,productApp:h},`${N.handle}-${null!==(t=e.optionName)&&void 0!==t?t:e.name}`)}))]})}var b=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(o=Object.getOwnPropertySymbols(e);i{n.d(t,{a:()=>i});var o=n(0);function i({direction:e,onClick:t,className:n,ariaLabel:i,disabled:a}){return(0,o.jsx)("button",{className:n,onClick:t,disabled:a,"data-orly-type":"left"===e?"carousel-prev-btn":"carousel-next-btn","aria-label":i||("left"===e?"Previous":"Next")+" slide",children:(0,o.jsx)("svg",{width:"6",height:"10",viewBox:"0 0 6 10",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{transform:"right"===e?"rotate(180deg)":"none"},"aria-hidden":"true",children:(0,o.jsx)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.35408 9.2621C5.40065 9.21566 5.43759 9.16048 5.4628 9.09974C5.488 9.03899 5.50098 8.97387 5.50098 8.9081C5.50098 8.84233 5.488 8.77721 5.4628 8.71647C5.43759 8.65572 5.40065 8.60055 5.35408 8.5541L1.70708 4.9081L5.35408 1.2621C5.44797 1.16822 5.50071 1.04088 5.50071 0.908102C5.50071 0.775327 5.44797 0.647989 5.35408 0.554102C5.2602 0.460216 5.13286 0.407471 5.00008 0.407471C4.86731 0.407471 4.73997 0.460216 4.64608 0.554102L0.646083 4.5541C0.59952 4.60055 0.562577 4.65572 0.53737 4.71647C0.512164 4.77721 0.499189 4.84234 0.499189 4.9081C0.499189 4.97387 0.512164 5.03899 0.53737 5.09974C0.562577 5.16048 0.59952 5.21566 0.646083 5.2621L4.64608 9.2621C4.69253 9.30867 4.7477 9.34561 4.80845 9.37081C4.86919 9.39602 4.93432 9.409 5.00008 9.409C5.06585 9.409 5.13097 9.39602 5.19172 9.37081C5.25246 9.34561 5.30764 9.30867 5.35408 9.2621Z",fill:"currentColor"})})})}},68:(e,t,n)=>{n.d(t,{a:()=>d});var o=n(0),i=n(1),a=n(14),l=n(87),s=n(110),r=n(137);function d({isOpen:e,onClose:t,children:n,title:d,showTitle:c=!1,size:u="default"}){const[p,v]=(0,i.useState)(!1),m=(0,i.useRef)(null),U=(0,i.useRef)(!1);(0,r.a)(e);const f=(0,i.useCallback)((()=>{U.current=!0,v(!0)}),[]),h=(0,i.useCallback)((e=>{U.current&&e.target===m.current&&(U.current=!1,v(!1),t())}),[t]),S=(0,i.useCallback)((()=>{f()}),[f]);return(0,o.jsx)(s.a,{isOpen:e,onEscape:f,children:(0,o.jsxs)("div",{className:a.a.modalOverlayBottomSheet,"aria-hidden":!e,children:[(0,o.jsx)("div",{className:a.a.modalBackground,onClick:S,role:"presentation"}),(0,o.jsxs)("div",{ref:m,"data-animate":!0,role:"dialog","aria-modal":!0,tabIndex:-1,"aria-label":d,className:[a.a.modalBottomSheet,p?a.a.closing:"","large"===u?a.a.large:""].join(" "),onAnimationEnd:h,children:[c?(0,o.jsxs)("div",{className:a.a.bottomSheetHeader,children:[(0,o.jsx)("h2",{className:a.a.bottomSheetTitle,children:d}),(0,o.jsx)("button",{className:a.a.bottomSheetCloseBtn,onClick:f,"aria-label":"Close dialog",children:(0,o.jsx)(l.a,{size:"16px",iconClass:a.a.closeIconSVG})})]}):(0,o.jsx)("button",{className:a.a.bottomSheetCloseBtnFloating,onClick:f,"aria-label":"Close dialog",children:(0,o.jsx)(l.a,{size:"20px",iconClass:a.a.closeIconSVG})}),(0,o.jsx)("div",{className:a.a.bottomSheetContent,children:n})]})]})})}},88:(e,t,n)=>{n.d(t,{a:()=>j});var o=n(0),i=n(1),a=n(3),l=n(132),s=n(53),r=n(7),d=n(64),c=n(31),u=n(11),p=n(25),v=n(65),m=n(39),U=n(111),f=n(5),h=n(86),S=n(38),O=n(2),x=n(9),g=function(e,t,n,o){return new(n||(n=Promise))((function(i,a){function l(e){try{r(o.next(e))}catch(e){a(e)}}function s(e){try{r(o.throw(e))}catch(e){a(e)}}function r(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,s)}r((o=o.apply(e,t||[])).next())}))};function j(e){var t,n,j,C;const{product:b,onClose:N,buttonMessage:K,addToCartProperties:E,hidePrice:w=!1,initialVariantId:z,cartApp:F}=e,V=m.a,{pathname:I,isMobile:D,showVendor:k,themeColor:G,getHexForOptionColor:y}=(0,a.d)((e=>({pathname:e.pathname,isMobile:e.isMobile,showVendor:e.showVendor,themeColor:e.themeColor,getHexForOptionColor:e.getHexForOptionColor}))),M=e=>g(this,void 0,void 0,(function*(){var t;try{return null!==(t=yield(0,O.getLazyState)("refreshProduct",{handle:e}))&&void 0!==t?t:void 0}catch(e){return}})),L=null!==(t=(0,O.getAssignment)("productModalDropdown"))&&void 0!==t?t:"disabled",H="enabled"===L||"combined"===L,[B,A]=(0,i.useState)(null),[P,$]=(0,i.useState)(null),T=(e,t)=>{if(!t)return e;const n=t.selectedOptions.Color;if(!n)return e;const o=e.filter((e=>e.selectedOptions.Color===n));return o.length>0?o:e};(0,i.useEffect)((()=>{if(!e.skipFetch){let e=!1;return(()=>{g(this,void 0,void 0,(function*(){try{const t=yield M(b.handle);if(!e&&t){A(t);const e=z?t.variants.find((e=>e.variantId===z)):void 0,n=T(t.variants,e),o=(0,S.a)(n);o&&$(o)}}catch(e){console.error("Failed to fetch full product:",e)}}))})(),()=>{e=!0}}{const t=e.product;A(t);const n=z?t.variants.find((e=>e.variantId===z)):void 0,o=T(t.variants,n),i=(0,S.a)(o);i&&$(i)}}),[b.handle,e.skipFetch,e.product,z,M]);const J=B,W=(0,i.useMemo)((()=>{if("combined"!==L||!J)return;const e=J.options.filter((e=>e.name.toLowerCase().includes("size"))).map((e=>e.name));return e.length>1?e:void 0}),[L,J]),R=z&&b.variants.find((e=>e.variantId===z))||(0,U.c)(b)||b.variants[0],Q=(0,i.useMemo)((()=>J&&P?(0,c.c)(J.imageMap,P):R?(0,c.c)(b.imageMap,R):[]),[null==J?void 0:J.imageMap,P,b.imageMap,R]),q=!!J&&!!P,[Z,_]=(0,i.useState)(0),X=(0,i.useRef)(null);(0,i.useEffect)((()=>{_(0),X.current&&(X.current.scrollLeft=0)}),[null==P?void 0:P.variantId]);const Y=e=>{const t=X.current;t&&t.scrollTo({left:e*t.offsetWidth,behavior:"smooth"})},{title:ee,subtitle:te}=(0,u.c)(null!==(n=null==J?void 0:J.title)&&void 0!==n?n:b.title),ne=(0,p.b)(null!=J?J:b,null!=P?P:void 0),oe=(0,i.useMemo)((()=>K||"Add to Cart"),[K]),ie=(0,i.useMemo)((()=>{var e;if(G||!P)return;const{hexColor:t,color:n}=(0,f.c)({selectedVariant:P,getHexForOptionColor:y,colorOption:(0,h.a)(null!==(e=null==J?void 0:J.options)&&void 0!==e?e:[])});return{"--a2c-background-color":t,"--a2c-text-color":n}}),[G,P,y]),ae=(0,i.useRef)(!1),le=F.cartStatus.value;if((0,i.useEffect)((()=>{le.status===x.a.updating&&le.variantId===(null==P?void 0:P.variantId)?ae.current=!0:ae.current&&le.status===x.a.ready&&(ae.current=!1,N())}),[le.status,le.variantId,null==P?void 0:P.variantId,N]),0===Q.length)return null;const se=P&&E?Object.assign(Object.assign({},P),{addToCartProperties:Object.assign(Object.assign({},P.addToCartProperties),E)}):P,re=Q.length>1;return(0,o.jsxs)("div",{className:V.productCard,"data-layout":D?"mobile":"desktop",style:ie,children:[(0,o.jsxs)("div",{className:V.productImageContainer,children:[re&&!D&&(0,o.jsx)(d.a,{direction:"left",onClick:()=>Y(Math.max(0,Z-1)),disabled:0===Z,className:`${V.imageArrow} ${V.imageArrowLeft} ${0===Z?V.imageArrowDisabled:""}`,ariaLabel:"Previous image"}),(0,o.jsx)("div",{className:V.imageGallery,ref:X,onScroll:()=>{const e=X.current;if(!e||Q.length<=1)return;const t=e.scrollLeft,n=e.offsetWidth,o=Math.round(t/n);_(Math.min(o,Q.length-1))},"data-has-multiple":re,children:Q.map(((e,t)=>{var n,i,a;return(0,o.jsx)("div",{className:V.imageSlide,children:(0,o.jsx)(r.a,{src:e.src,initialWidth:400,cssClass:V.productImage,alt:`${null!==(n=null==J?void 0:J.title)&&void 0!==n?n:b.title}: ${null!==(a=null!==(i=e.model)&&void 0!==i?i:e.altText)&&void 0!==a?a:""}`,height:400,width:400,fullSizeWidth:400})},e.src)}))}),re&&!D&&(0,o.jsx)(d.a,{direction:"right",onClick:()=>Y(Math.min(Q.length-1,Z+1)),disabled:Z===Q.length-1,className:`${V.imageArrow} ${V.imageArrowRight} ${Z===Q.length-1?V.imageArrowDisabled:""}`,ariaLabel:"Next image"}),re&&(0,o.jsx)("div",{className:V.imageDots,children:Q.map(((e,t)=>(0,o.jsx)("button",{type:"button",className:`${V.imageDot} ${t===Z?V.imageDotActive:""}`,onClick:()=>Y(t),"aria-label":`View image ${t+1}`},t)))})]}),(0,o.jsxs)("div",{className:V.productDetails,children:[k&&(null!==(j=null==J?void 0:J.vendor)&&void 0!==j?j:b.vendor)&&(0,o.jsx)("div",{className:V.productBrand,children:null!==(C=null==J?void 0:J.vendor)&&void 0!==C?C:b.vendor}),(0,o.jsx)("h3",{className:V.productTitle,children:ee}),te&&(0,o.jsx)("div",{className:V.productSubtitle,children:te}),!w&&(0,o.jsx)("div",{className:V.productPriceContainer,children:q?(0,o.jsx)(s.c,{selectedVariant:P,product:J}):(0,o.jsx)("div",{className:V.skeletonPrice})}),(0,o.jsx)("div",{className:V.productOptions,children:q?(0,o.jsx)(l.a,{useSizeDropdowns:H,combinedSizeOptions:W,product:J,selectedVariant:P,setSelectedVariantId:e=>{const t=J.variants.find((t=>t.variantId===e));t&&$(t)}}):(0,o.jsxs)("div",{className:V.skeletonOptions,children:[(0,o.jsx)("div",{className:V.skeletonOptionLabel}),(0,o.jsxs)("div",{className:V.skeletonOptionButtons,children:[(0,o.jsx)("div",{className:V.skeletonButton}),(0,o.jsx)("div",{className:V.skeletonButton}),(0,o.jsx)("div",{className:V.skeletonButton})]}),(0,o.jsx)("div",{className:V.skeletonOptionLabel}),(0,o.jsxs)("div",{className:V.skeletonOptionButtons,children:[(0,o.jsx)("div",{className:V.skeletonButton}),(0,o.jsx)("div",{className:V.skeletonButton}),(0,o.jsx)("div",{className:V.skeletonButton}),(0,o.jsx)("div",{className:V.skeletonButton})]})]})}),q&&se?(0,o.jsx)(v.a,{selectedVariant:se,pathname:I,cartApp:F,buttonMessage:oe}):(0,o.jsx)("div",{className:V.skeletonAddToCart}),(0,o.jsx)("a",{href:ne,className:V.viewDetailsLink,children:"View Full Details"})]})]})}}}]);