1import{L as D}from"./DEPciJOg.js";import q from"./DgcmP9Y7.js";import{_ as T,m as Z,i as K,k as G,c as Q,l as J}from"./D5_LBXHT.js";import{M as i,N as u,S as W,T as Y,_ as ee,P as F,W as v,E as L,O as d,Q as j,R as O,ae as te,a5 as U,X as I,U as z,a2 as re,V as b,q as B,u as _}from"./DvIlu3FC.js";import{g as se}from"./C932wzq6.js";import{u as N}from"./BS-NTpyX.js";const oe={name:"VariantColorSelect",components:{},props:{product:{type:Object,default:()=>({})},selectedColor:{type:String,default:""},autoSelectFirstIfEmpty:{type:Boolean,default:!1},minimumColors:{type:Number,default:2}},data(){return{}},computed:{colors(){return Object.values(this.product.variants.reduce((o,r)=>{if(r.swatch_color&&r.selectedOptions&&r.selectedOptions.length>1){const s=r.selectedOptions[1].value,t=this.selectedColor&&this.selectedColor===s;o[s]={hex:r.swatch_color.value,name:s,variant:r,isSelected:t}}return o},{}))},hasColors(){return this.colors.length>=this.minimumColors}},mounted(){!this.selectedColor&&this.autoSelectFirstIfEmpty&&this.selectFirstColor()},methods:{updateSelectedColor(o){this.$emit("updateSelectedColor",o)},selectFirstColor(){const o=this.product.variants.find(s=>!!s.swatch_color),r=o&&o.selectedOptions&&o.selectedOptions.length>1&&o.selectedOptions[1].value?o.selectedOptions[1].value:"";this.updateSelectedColor(r)}}},le={key:0,class:"variant-color__select"},ne=["ariaLabel","onClick"];function ae(o,r,s,t,a,l){return l.hasColors?(i(),u("div",le,[(i(!0),u(W,null,Y(l.colors,p=>(i(),u("button",{key:p.name,style:ee({backgroundColor:p.hex}),ariaLabel:`Color Option ${p.name}`,class:F(["variant-color__circle",p.isSelected?"-selected":"-not-selected"]),type:"button",onClick:n=>l.updateSelectedColor(p.name)},null,14,ne))),128))])):v("",!0)}const ie=T(oe,[["render",ae]]);var R={exports:{}};(function(o,r){(function(){function s(){var t=window,a=document;if("scrollBehavior"in a.documentElement.style&&t.__forceSmoothScrollPolyfill__!==!0)return;var l=t.HTMLElement||t.Element,p=468,n={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:l.prototype.scroll||x,scrollIntoView:l.prototype.scrollIntoView},f=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now;function k(e){var c=["MSIE ","Trident/","Edge/"];return new RegExp(c.join("|")).test(e)}var w=k(t.navigator.userAgent)?1:0;function x(e,c){this.scrollLeft=e,this.scrollTop=c}function y(e){return .5*(1-Math.cos(Math.PI*e))}function h(e){if(e===null||typeof e!="object"||e.behavior===void 0||e.behavior==="auto"||e.behavior==="instant")return!0;if(typeof e=="object"&&e.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function P(e,c){if(c==="Y")return e.clientHeight+w<e.scrollHeight;if(c==="X")return e.clientWidth+w<e.scrollWidth}function H(e,c){var m=t.getComputedStyle(e,null)["overflow"+c];return m==="auto"||m==="scroll"}function $(e){var c=P(e,"Y")&&H(e,"Y"),m=P(e,"X")&&H(e,"X");return c||m}function M(e){for(;e!==a.body&&$(e)===!1;)e=e.parentNode||e.host;return e}function X(e){var c=f(),m,S,C,g=(c-e.startTime)/p;g=g>1?1:g,m=y(g),S=e.startX+(e.x-e.startX)*m,C=e.startY+(e.y-e.startY)*m,e.method.call(e.scrollable,S,C),(S!==e.x||C!==e.y)&&t.requestAnimationFrame(X.bind(t,e))}function V(e,c,m){var S,C,g,E,A=f();e===a.body?(S=t,C=t.scrollX||t.pageXOffset,g=t.scrollY||t.pageYOffset,E=n.scroll):(S=e,C=e.scrollLeft,g=e.scrollTop,E=x),X({scrollable:S,method:E,startTime:A,startX:C,startY:g,x:c,y:m})}t.scroll=t.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){n.scroll.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:t.scrollY||t.pageYOffset);return}V.call(t,a.body,arguments[0].left!==void 0?~~arguments[0].left:t.scrollX||t.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:t.scrollY||t.pageYOffset)}},t.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])){n.scrollBy.call(t,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}V.call(t,a.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset))}},l.prototype.scroll=l.prototype.scrollTo=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}var e=arguments[0].left,c=arguments[0].top;V.call(this,this,typeof e>"u"?this.scrollLeft:~~e,typeof c>"u"?this.scrollTop:~~c)}},l.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(h(arguments[0])===!0){n.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},l.prototype.scrollIntoView=function(){if(h(arguments[0])===!0){n.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}var e=M(this),c=e.getBoundingClientRect(),m=this.getBoundingClientRect();e!==a.body?(V.call(this,e,e.scrollLeft+m.left-c.left,e.scrollTop+m.top-c.top),t.getComputedStyle(e).position!=="fixed"&&t.scrollBy({left:c.left,top:c.top,behavior:"smooth"})):t.scrollBy({left:m.left,top:m.top,behavior:"smooth"})}}o.exports={polyfill:s}})()})(R);var ce=R.exports;const ue=se(ce),de={name:"Slider",props:{images:{type:Array,default:()=>[]}},mounted(){ue.polyfill()},methods:{nextSlide(){console.log("clicked");const o=document.querySelector(".cpc__slider-track");o==null||o.scrollBy({left:o.offsetWidth,behavior:"smooth"})},prevSlide(){const o=document.querySelector(".cpc__slider-track");o.scrollBy({left:-o.offsetWidth,behavior:"smooth"})}}},me={class:"cpc__slider-wrapper"},pe={class:"cpc__slider-track"};function he(o,r,s,t,a,l){const p=L("LazyImage");return i(),u("div",me,[d("span",{"aria-label":"Previous slide",tabindex:"0",onClick:r[0]||(r[0]=(...n)=>l.prevSlide&&l.prevSlide(...n)),onKeydown:r[1]||(r[1]=j((...n)=>l.prevSlide&&l.prevSlide(...n),["enter"]))},"Prev",32),d("span",{"aria-label":"Next slide",tabindex:"0",onClick:r[2]||(r[2]=(...n)=>l.nextSlide&&l.nextSlide(...n)),onKeydown:r[3]||(r[3]=j((...n)=>l.nextSlide&&l.nextSlide(...n),["enter"]))},"Next",32),d("div",pe,[(i(!0),u(W,null,Y(s.images,(n,f)=>(i(),u("div",{class:"cpc__slider-slide",key:`slider-image-${f}`},[O(p,{"lazy-src-set":n.src,"alt-text":n.alt},null,8,["lazy-src-set","alt-text"])]))),128))])])}const fe=T(de,[["render",he],["__scopeId","data-v-921e9dc1"]]),ge={name:"LoadingProductCard",props:{handle:{type:String,required:!0}},mounted(){this.computeIsInView();const o=()=>this.scrollY+this.winWidth;this.stopWatching=this.$watch(o,this.computeIsInView)},data(){return{stopWatching:null,finishedWatching:!1,isIn:!1,margin:100}},computed:{...Z(K,["scrollY","winWidth"]),inPort(){return this.scrollY&&this.winWidth}},methods:{...G(N,["getProduct"]),computeIsInView(){if(this.finishedWatching)return this.removeWatchers();this.inView()&&(this.getProduct(this.handle),this.removeWatchers())},removeWatchers(){this.stopWatching&&this.stopWatching(),this.finishedWatching=!0},inView(){const r=this.$el.getBoundingClientRect(),s=r.height,t=r.to
1p,a=t+s;return t<=window.innerHeight+this.margin&&a>=-this.margin}}},_e={class:"loading-product-card"};function ve(o,r,s,t,a,l){return i(),u("div",_e)}const ye=T(ge,[["render",ve]]),Se={name:"CollectionProductCard",data(){return{isHovered:!1,selectedColor:null}},props:{product:{type:Object,default:()=>({})},url:{type:String,default:()=>""},isUsingFeatured:{type:Boolean,default:()=>!1},isUsingVariantSelect:{type:Boolean,default:()=>!1},usesHover:{type:Boolean,default:()=>!1},usesSliderHover:{type:Boolean,default:()=>!1},isUsingStorefront:{type:Boolean,default:!1},usesVideo:{type:Boolean,default:!0},featuredImage:{type:Object,default:()=>null}},computed:{isSaleItem(){return this.product.compareAtPrice?this.product.compareAtPrice>this.product.price:this.product.variants[0].compareAtPrice&&this.product.variants[0].compareAtPrice>this.product.variants[0].price},sliderImages(){return this.product.images.slice(1)},displayImage(){return this.featuredImage&&this.isUsingFeatured?this.featuredImage:this.hasColors?this.selectedColor&&this.selectedVariant?this.selectedVariant.image.src||this.product.images[0]:"":this.isUsingStorefront?this.product.images?this.product.images[0]:"":this.product.images&&this.product.images[0]?this.product.images[0].src:""},hoverImage(){return this.product.images&&this.product.images[1]?this.product.images[1].src:""},video(){const o=this.product.media&&this.product.media.content?this.product.media.content.find(r=>r.mediaContentType==="VIDEO"):null;return o?o.sources.find(r=>r.format==="mp4"):null},colorCount(){return this.isUsingVariantSelect?Object.values(this.product.variants.reduce((o,r)=>{if(r.swatch_color&&r.selectedOptions&&r.selectedOptions.length>1){const s=r.selectedOptions[1].value;o[s]=s}return o},{})).length:0},hasColors(){return this.colorCount>=2},selectedVariant(){if(!(!this.hasColors||!this.selectedColor))return this.product.variants.find(o=>o.selectedOptions[1].value===this.selectedColor)},variantParamUrl(){return this.isUsingVariantSelect&&this.hasColors&&this.selectedVariant?`${this.url}?color=${this.selectedVariant.selectedOptions[1].value}`:this.url}},methods:{toggleHover(){this.isHovered=!this.isHovered},noZeros(o){return o.replace(".00","").toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}}},Ce={class:"cpc","data-testid":"cpc"},be={key:0},we=["src"],xe=["data-src"],Oe={class:"cpc__details"},ke={class:"cpc__details-title"},Ie={class:"cpc__details-price"},Pe={key:0},Ve={key:0,class:"cpc__details-sale-price"},Be={class:"cpc__details-price"},Le={key:1},Te={key:0,class:"cpc__available-colors-count"};function Ee(o,r,s,t,a,l){const p=ie,n=L("LazyImage"),f=fe,k=L("router-link"),w=ye,x=te("lazy");return i(),u("div",Ce,[s.product&&s.product.isLoaded?(i(),u("div",be,[U(o.$slots,"header"),d("div",{class:F(["cpc__image",a.isHovered?"hovering":"",s.usesHover?"uses-hover":""]),onMouseover:r[1]||(r[1]=y=>a.isHovered=!0),onMouseleave:r[2]||(r[2]=y=>a.isHovered=!1)},[s.isUsingVariantSelect?(i(),I(p,{key:0,product:s.product,selectedColor:a.selectedColor,autoSelectFirstIfEmpty:!0,onUpdateSelectedColor:r[0]||(r[0]=y=>this.selectedColor=y)},null,8,["product","selectedColor"])):v("",!0),O(k,{to:l.variantParamUrl},{default:z(()=>[l.video&&o.usesVideos?(i(),u("video",{key:0,src:l.video.url,class:"cpc__video",autoplay:"",crossorigin:"",loop:"",muted:"",playsinline:""},[re(d("source",{"data-src":l.video.url,type:"video/mp4"},null,8,xe),[[x]])],8,we)):(i(),I(n,{key:1,"lazy-src-set":l.displayImage,"alt-text":`${s.product.title} image`},null,8,["lazy-src-set","alt-text"])),s.usesHover?(i(),I(n,{key:2,"lazy-src-set":l.hoverImage,"alt-text":`${s.product.title} second image`,class:"cpc__hover-img"},null,8,["lazy-src-set","alt-text"])):s.usesSliderHover&&a.isHovered?(i(),I(f,{key:3,images:l.sliderImages},null,8,["images"])):v("",!0)]),_:1},8,["to"])],34),d("div",Oe,[d("div",ke,b(s.product.title),1),d("div",Ie,[s.product.availableForSale?(i(),u("span",Pe,[l.isSaleItem?(i(),u("span",Ve," $"+b(l.noZeros(s.product.compareAtPrice?s.product.compareAtPrice:s.product.variants[0].compareAtPrice.amount)),1)):v("",!0),d("span",Be," $"+b(l.noZeros(s.product.price?s.product.price:s.product.variants[0].price.amount)),1)])):(i(),u("span",Le," Sold Out "))]),U(o.$slots,"footer")]),s.isUsingVariantSelect&&l.colorCount>=2?(i(),u("div",Te," Available in "+b(l.colorCount)+" colors ",1)):v("",!0)])):(i(),I(w,{key:1,handle:s.product.handle},null,8,["handle"]))])}const ze=T(Se,[["render",Ee]]),We={class:"collection"},Ye={class:"content-wrap px-8 lg:px-20 py-24"},He={class:"collection__header flex flex-col items-center mt-8 mb-32"},Xe={key:0,class:"collection__header-image relative w-full"},je={class:"relative -mt-8 text-5xl z-10"},Ue={class:"inline-block script px-8 py-3 text-3xl md:text-5xl"},Fe=["v-if"],Ne={class:"md:grid grid-cols-4 gap-x-16 gap-y-32 text-sm"},Re={key:0,class:"w-full cpc__footer tracking-wider"},$e={key:0,class:"pt-32 flex justify-center items-center"},Ge={__name:"[handle]",setup(o){const r=Q(),s=N();J(()=>s.getCollection(r.params.handle),"$ZyFhCvGzub");const t=B(()=>{var n;return r.params&&((n=s.loadedCollections)==null?void 0:n.includes(r.params.handle))}),a=B(()=>s.collections[r.params.handle]?s.collections[r.params.handle]:{products:[]});B(()=>a.value.title);const l=B(()=>a.value?a.value.products.map(n=>s.allProducts[n]):[]);function p(n){return n.variants&&n.variants[0]&&n.variants[0].selectedOptions.length>1?n.variants[0].selectedOptions[1].value:""}return(n,f)=>{const k=D,w=L("LazyImage"),x=q,y=ze;return i(),u("div",We,[O(k,{rel:"canonical",href:`https://mamannyc.com/collections/${_(r).params.handle}`},null,8,["href"]),d("div",Ye,[d("div",He,[_(a).image?(i(),u("div",Xe,[f[0]||(f[0]=d("div",{class:"collection__header-image-overlay w-full h-full absolute overflow-hidden inset-0"},null,-1)),O(w,{"lazy-src-set":_(a).image.src},null,8,["lazy-src-set"])])):v("",!0),d("div",je,[O(x,null,{default:z(()=>[d("span",Ue,b(_(a).title),1)]),_:1})]),d("div",{class:"serif text-center text-xl mt-10 md:w-1/3","v-if":_(a).description!==""},b(_(a).description),9,Fe)]),d("div",Ne,[(i(!0),u(W,null,Y(_(l),(h,P)=>(i(),u("div",{key:h.handle+P,class:"w-full relative mb-10 md:mb-0"},[O(y,{product:h,url:`/products/${h.handle}`,"uses-hover":h.images&&h.images.length>1},{footer:z(()=>[h.variants?(i(),u("div",Re,b(p(h)),1)):v("",!0)]),_:2},1032,["product","url","uses-hover"])]))),128))]),_(t)?v("",!0):(i(),u("div",$e,f[1]||(f[1]=[d("div",{class:"loader"},null,-1)])))])])}}};export{Ge as default};
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.