"use strict";(self.webpackChunkui=self.webpackChunkui||[]).push([[22],{286:(e,a,t)=>{t.d(a,{a:()=>i});const i=(e,a)=>parseFloat((e-e*(a/100)).toFixed(2))},186:(e,a,t)=>{function i(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}function r(){"undefined"!=typeof window&&window.amzn&&window.amzn("trackEvent","PageView")}function s(e){if("undefined"!=typeof window&&window.amzn){const a=`Add_to_cart_${i(e)}`;window.amzn("trackEvent",a)}}function n(e){if("undefined"!=typeof window&&window.amzn){const a=`Product_View_${i(e)}`;window.amzn("trackEvent",a)}}function o(e){if("undefined"!=typeof window&&window.amzn){const a=`Collection_${i(e)}`;window.amzn("trackEvent",a)}}t.d(a,{a:()=>s,b:()=>o,c:()=>r,d:()=>n})},169:(e,a,t)=>{t.d(a,{a:()=>s});var i=t(4);const r={hanger:(0,i.A)(),"tshirt-pants":(0,i._)()},s=e=>r[e]},98:(e,a,t)=>{t.d(a,{a:()=>k});var i=t(0),r=t(1),s=t(2),n=t(21),o=t(337),l=t(171);const{wrapper:c,wrapperColorTileOutfit:d,wrapperColorTile:u,circle:p,circleOutfit:v,circleInput:m,active:w,activeOutfit:f,wrapperColors:h,wrapperColorsOutfit:j,crossLine:b,crossLineOutfit:x,color:g,colorColorOutfit:C,circleActive:O,wrapperPrice:S,wrapperPriceRed:N,wrapperNewColor:P,wrapperNewColorGrey:z,wrapperNewColorValid:M,wrapperColorsNewColor:y}=l.a,k=({currentVariant:e,currentColor:a,colors:t,variants:l,ref:k,onChangeHandler:V,currency:D,isDiscounted:A,showPrice:$,isOutfit:E,isNewColorLabelEnabled:F,PDPNewColorVariantColor:B})=>{const T=a.replace("/"," "),_=(0,s.useMemo)((()=>((e,a,t)=>{var i,r,s,o;const l=e.map((e=>e.colorName)),c=a.filter((e=>{var a;const[t,i]=(0,n.c)(e.optionMap),r=null!==(a=null==i?void 0:i.replace("/"," "))&&void 0!==a?a:"";if(l.includes(r))return e})),d=null!==(i=c.filter((e=>{if(e.id===t.id)return e})))&&void 0!==i?i:[],u=null!==(s=null===(r=c[0])||void 0===r?void 0:r.priceV2.amount)&&void 0!==s?s:"";return(null===(o=d[0])||void 0===o?void 0:o.priceV2.amount)||u})(t,l,e)),[e.id]),I="gray"===B;return(0,i.jsx)(r.Fragment,{children:t.length>0&&(0,i.jsxs)("div",Object.assign({ref:k,className:c},{children:[$&&(0,i.jsxs)("span",Object.assign({className:(0,o.a)(S,A&&N)},{children:[D,_]})),(0,i.jsx)("div",Object.assign({className:(0,o.a)(h,E&&j,F&&y)},{children:t.map((({colorUrl:e,colorName:a,isValid:t,availableForSale:s,newColor:n})=>{const l=F&&n&&s;return(0,i.jsxs)("div",Object.assign({className:(0,o.a)(u,E&&d)},{children:[(0,i.jsxs)("label",{children:[t?(0,i.jsx)(r.Fragment,{children:(0,i.jsxs)("div",Object.assign({className:(0,o.a)(E?(0,o.a)(g,C):g,a===T&&E?(0,o.a)(w,f):a===T?w:"")},{children:[!s&&(0,i.jsx)("span",{className:(0,o.a)(b,E&&x)}),(0,i.jsx)("img",{src:e,alt:a,className:(0,o.a)(E?(0,o.a)(p,v):p,a===T&&O)})]}))}):(0,i.jsx)("div",Object.assign({style:`background: ${e}`,className:(0,o.a)(g,E?(0,o.a)(p,v):p,a===T&&E?(0,o.a)(w,f):a===T?w:"")},{children:!s&&(0,i.jsx)("span",{className:(0,o.a)(b,E&&x)})})),(0,i.jsx)("input",{name:"colorPick",value:a,type:"radio",onChange:V,className:`${p} ${m}`})]}),l&&(0,i.jsx)("span",Object.assign({className:(0,o.a)(P,I&&z,!t&&M)},{children:"New"}))]}),e)}))}))]}))})}},172:(e,a,t)=>{t.d(a,{a:()=>p});var i=t(0),r=t(1),s=t(2),n=t(337),o=t(173);const{wrapper:l,active:c,disabled:d,wrapperOutfit:u}=o.a,p=({actualSize:e,sizeLabel:a,unavailableSizes:t,setCurrentVariantBySize:o,isOutfit:p,sizesNotExistInCurrentVariant:v,setCurrentSize:m})=>{const[w,f]=(0,s.useState)(!1);(0,s.useEffect)((()=>{if(e.toLowerCase()===a.toLowerCase())return f(!0);f(!1)}),[e,a]);const h=()=>{(null==v?void 0:v.includes(a))||o(a),m&&m(a)};return(0,i.jsx)(r.Fragment,{children:t.includes(a)?(0,i.jsx)("div",Object.assign({className:(0,n.a)(p?(0,n.a)(u,l):l,d,w?c:""),onClick:()=>h()},{children:a})):(0,i.jsx)("div",Object.assign({onClick:()=>h(),className:w?(0,n.a)(p?(0,n.a)(l,u):l,c):(0,n.a)(p?(0,n.a)(l,u):l)},{children:a}))})}},170:(e,a,t)=>{t.d(a,{a:()=>te});var i=t(1),r=t(0),s=t(8),n=t(337),o=t(98),l=t(172),c=t(174);const{wrapper:d,wrapperBadge:u,wrapperImage:p}=c.a,v=({imageMap:e,currentColor:a,alt:t,productLink:i,isDesktopDevice:s,selectedSize:n})=>{const o=["1X","2X","3X","4X","5X","6X","7X","8X","9X","10X"].includes(n)?`${a} Plus`:a;return(0,r.jsx)("div",Object.assign({className:d},{children:(0,r.jsxs)("div",Object.assign({className:p},{children:[i&&(0,r.jsx)("a",Object.assign({href:i,target:s?"_blank":"_self",className:u},{children:"View product details"})),(0,r.jsx)("img",{src:e[o]||e[a],alt:t})]}))}))};var m=t(286),w=t(175);const{wrapper:f,wrapperActualPrice:h,wrapperComparePrice:j,wrapperCrossedPrice:b,wrapperActualPriceRed:x,wrapperPercentage:g}=w.a,C=({currentVariant:e,currency:a="$",discountValue:t=0})=>{var i;if(!e)return(0,r.jsx)(r.Fragment,{});const s=(0,m.a)(Number(e.priceV2.amount),t).toFixed(2),o=(null===(i=e.compareAtPrice)||void 0===i?void 0:i.amount)||e.priceV2.amount,l=Number(o)>Number(s),c=((e,a)=>{if(e<=0||a<0||a>e)throw new Error("Invalid price values");return(e-a)/e*100})(Number(o),Number(s)),d=c>15;return(0,r.jsxs)("div",Object.assign({className:f},{children:[l&&(0,r.jsx)("p",Object.assign({className:(0,n.a)(j,b)},{children:`${a}${o}`})),(0,r.jsx)("p",Object.assign({className:(0,n.a)(h,l&&x)},{children:`${a}${s}`})),d&&(0,r.jsx)("p",Object.assign({className:g},{children:`(${c.toFixed(0)}% off)`}))]}))};var O=t(2),S=t(176);const{wrapper:N,wrapperTitle:P,wrapperDetails:z,wrapperSize:M,wrapperColor:y,wrapperParagraph:k}=S.a,V=({title:e,imageMap:a,options:t,variants:i,colors:s,handle:n,isMainProduct:c,mainProductCurrentVariant:d,outfitDiscount:u,vendor:p,id:m,handleSelectProduct:w,isDesktopDevice:f,handleSoldOutMissyAndPlus:h})=>{var j,b;const x=(null===(j=t[1])||void 0===j?void 0:j.values)||[],{selectedColor:g,selectedSize:S,selectedVariant:V,excludedSizes:D,availableSizes:A,handleColorChange:$,createProductLink:E,ref:F,setSelectedSize:B,isOutfit:T}=(({variants:e,handle:a,title:t,vendor:i,id:r,isMainProduct:s,mainProductCurrentVariant:n,handleSelectProduct:o,outfitDiscount:l,allSizes:c,handleSoldOutMissyAndPlus:d})=>{var u,p;const v=e.find((e=>e.availableForSale)),m=null!==(u=null==v?void 0:v.optionMap.Size)&&void 0!==u?u:"",w=null!==(p=null==v?void 0:v.optionMap.Color)&&void 0!==p?p:"",[f,h]=(0,O.useState)(s&&n?n.optionMap.Color||"":w),[j,b]=(0,O.useState)(s&&n?n.optionMap.Size||"":m),x=(0,O.useCallback)(((e,a)=>a?`/products/${e}?variant=${a}`:`/products/${e}`),[]),g=(0,O.useRef)(null),C=(0,O.useMemo)((()=>{var s;const n=e.find((e=>e.optionMap.Color===f&&e.optionMap.Size===j));return n?(d&&d(!1),Object.assign(Object.assign({},n),{title:(null==n?void 0:n.title)||t,vendor:i,url:x(a,n.id),productId:r,outfitDiscount:null!==(s=null==n?void 0:n.outfitDiscount)&&void 0!==s?s:l})):(d&&d(!0),g.current)}),[f,j,e,t,i,a,r,x]);(0,O.useEffect)((()=>{C&&(g.current=C)}),[null==C?void 0:C.id]);const{availableSizes:S,excludedSizes:N}=(0,O.useMemo)((()=>{const a=e.filter((e=>e.optionMap.Color===f)),t=new Set(c),i=[];return a.forEach((({optionMap:e,availableForSale:a})=>{const r=e.Size;r&&(t.add(r),a||i.push(r))})),{availableSizes:Array.from(t),excludedSizes:i}}),[f,e]),P=(0,O.useCallback)((e=>{h(e.target.value)}),[]);return(0,O.useEffect)((()=>{C&&o(C)}),[null==C?void 0:C.id]),{selectedColor:f,selectedSize:j,selectedVariant:C,excludedSizes:N,availableSizes:S,handleColorChange:P,createProductLink:x,ref:(0,O.useRef)(null),setSelectedSize:b,isOutfit:!0}})({variants:i,handle:n,title:e,vendor:p,id:m,isMainProduct:c,mainProductCurrentVariant:d,handleSelectProduct:w,outfitDiscount:u,allSizes:x,handleSoldOutMissyAndPlus:h}),_=(0,O.useMemo)((()=>{const e=i.filter((e=>e.optionMap.Color===g));return x.filter((a=>!e.some((e=>e.optionMap.Size===a))))}),[g,i]);return(0,r.jsxs)("div",Object.assign({className:N},{children:[(0,r.jsx)(v,{imageMap:a,currentColor:g,alt:e,productLink:c?"":E(n,null==V?void 0:V.id),isDesktopDevice:f,selectedSize:S}),(0,r.jsxs)("div",Object.assign({className:z},{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",Object.assign({className:P},{children:(null==V?void 0:V.title)||e})),(0,r.jsx)(C,{currentVariant:V,discountValue:null!==(b=null==V?void 0:V.outfitDiscount)&&void 0!==b?b:u})]}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",Object.assign({className:y},{children:[(0,r.jsx)("p",Object.assign({className:k},{children:"Color:"})),(0,r.jsx)(o.a,{colors:s,variants:i,currentVariant:null!=V?V:{availableForSale:!1,compareAtPrice:{amount:"",currencyCode:"USD"},id:"",optionMap:{Color:"",Size:""},priceCurrency:"USD",priceV2:{amount:"",currencyCode:"USD"},quantityAvailable:0,sku:""},currentColor:g,ref:F,onChangeHandler:$,currency:"$",isOutfit:T})]})),(0,r.jsxs)("div",Object.assign({className:M},{children:[(0,r.jsx)("p",Object.assign({className:k},{children:"Size:"})),A.map(((a,t)=>(0,r.jsx)(l.a,{actualSize:S,setCurrentVariantBySize:e=>B(e),unavailableSizes:[...D,..._],sizeLabel:a,isOutfit:T,sizesNotExistInCurrentVariant:_},a+e+t)))]}))]})]}))]}))};var D=t(4),A=t(177);const{wrapper:$,wrapperIcon:E,wrapperTitle:F,wrapperTitleNoModal:B}=A.a,T=({handleShowOutfit:e,discountTitle:a,noModal:t=!1})=>(0,r.jsxs)("div",Object.assign({className:$},{children:[!t&&(0,r.jsx)("div",Object.assign({onClick:e,className:E},{children:(0,r.jsx)(D.m,{})})),a&&(0,r.jsx)("h1",Object.assign({className:(0,n.a)(F,t&&B)},{children:a}))]}));var _=t(178);const{wrapper:I,wrapperButton:L,spinner:X,spinnerPath:R,btnBusy:U,wrapperButtonNoModal:q,wrapperNoModal:H,wrapperButtonNoModalMarginBottom:W}=_.a,G=({totalPriceWithDiscount:e,addToCartOutfit:a,selectedProduct:t,isDisabledAddToCartButton:i,isBusy:s,handleShowOutfit:o,noModal:l=!1,isSoldOutMissyAndPlus:c=!1})=>{const d=()=>{const e=(new Date).getTime();return t.map((a=>({id:a.id,quantity:1,properties:{_outfitId:e},image:"",product_title:a.title,variant_title:"",variant_id:Number(a.id),price:100*Number(a.priceV2.amount),final_price:100*Number(a.priceV2.amount),url:a.url,vendor:a.vendor,sku:a.sku})))},u=e>0,p=i||c;return(0,r.jsx)("div",Object.assign({class:(0,n.a)(I,l&&H)},{children:(0,r.jsxs)("button",Object.assign({disabled:p,onClick:()=>a({items:d()},o),className:(0,n.a)(L,l&&q,W)},{children:["Add outfit to cart "+(u?`(${e.toFixed(2)})`:""),s&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",Object.assign({className:X,viewBox:"0 0 50 50"},{children:(0,r.jsx)("circle",{className:(0,n.a)(R),cx:"25",cy:"25",r:"20",fill:"none","stroke-width":"5"})})),(0,r.jsx)("span",{className:U})]})]}))}))};var Y=t(179);const{wrapper:Z,overlay:J,overlayActive:K,wrapperOpen:Q,wrapperOutfitProducts:ee,wrapperRelative:ae}=Y.a,te=({outfitsProducts:e,handleShowOutfit:a,showOutfit:t,mainProductId:o,currentVariant:l,addToCartOutfit:c,isMobile:d,isBusy:u,pdpButtonText:p,isDesktopDevice:v,discountTitle:m,noModal:w=!1})=>{(0,s.a)(t);const{top:f}=((e,a)=>{const[t,i]=(0,O.useState)(0),r=(0,O.useMemo)((()=>140),[]),s=(0,O.useMemo)((()=>0),[]),n=(0,O.useCallback)((()=>{if(a)return;const t=window.scrollY;if(0===t)return void i(e?s:r);if(e)return void(t>s&&i("auto"));const n=Math.max(0,r-t);i(n)}),[e,r,s]);return(0,O.useEffect)((()=>(window.addEventListener("scroll",n),n(),()=>{window.removeEventListener("scroll",n)})),[n]),{top:t}})(d,t),[h,j]=(0,O.useState)([]),[b,x]=(0,O.useState)(!1),g=e=>{x(e)},C=e=>{if(!e.availableForSale)return void j(h.filter((a=>a.productId!==e.productId)));const a=h.findIndex((a=>a.productId===e.productId));if(-1===a)return void j((a=>[...a,e]));const t=[...h];t[a]=e,j(t)},S=!(e.length===h.length)||u,N=h.reduce(((e,a)=>{const t=a.priceV2.amount,i=a.outfitDiscount;return e+((r=Number(t))-r*i/100);var r}),0);return(0,r.jsxs)(i.Fragment,{children:[(0,r.jsx)("div",{className:(0,n.a)(J,t&&!w&&K),onClick:a}),(0,r.jsxs)("div",Object.assign({style:{top:f},className:(0,n.a)(Z,t&&Q,w&&ae)},{children:[(0,r.jsx)(T,{handleShowOutfit:a,discountTitle:m,noModal:w}),(0,r.jsx)("div",Object.assign({className:ee},{children:e.map(((e,a)=>(0,i.createElement)(V,Object.assign({},e,{key:e.title,isMainProduct:e.id===o,mainProductCurrentVariant:l,handleSelectProduct:C,isDesktopDevice:v,handleSoldOutMissyAndPlus:g}))))})),(0,r.jsx)(G,{selectedProduct:h,totalPriceWithDiscount:N,addToCartOutfit:c,isDisabledAddToCartButton:S,isBusy:u,handleShowOutfit:a,noModal:w,isSoldOutMissyAndPlus:b})]}))]})}}}]);