(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5405],{75557:function(e,l,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/",function(){return t(62528)}])},31919:function(e,l,t){"use strict";var o=t(85893),n=t(5379),i=t.n(n),a=t(67294),r=t(86523),d=t(22546),s=t(35705);t(96964),r.ZP.use([r.W_,r.Gk]),l.Z=e=>{let{children:l,title:t,isLanding:n}=e,[r,u]=(0,a.useState)(),[c,x]=(0,a.useState)(),[m,p]=(0,a.useState)(!1),[v,b]=(0,a.useState)(!0),f=(0,a.useRef)({}),g=(0,s.i)(),updatePadding=()=>{let e=document.querySelector(".slider-main-title"),l=e.getBoundingClientRect().left;window.innerWidth<640&&u(l+16),window.innerWidth>=640&&u(l+32),window.innerWidth>=768&&u(l+64),window.innerWidth>=1024&&u(l+128),window.innerWidth>=1280&&u(l+128),window.innerWidth>=1536&&u(l+256);let t=document.querySelector(".swiper-container"),o=t.getBoundingClientRect().width,n=o-l-412;x(n)};(0,a.useEffect)(()=>{updatePadding()},[g.width]);let updateButtonsState=e=>{e.isBeginning?(p(!1),e.params.slidesPerGroup=1):p(!0),e.isEnd?(b(!1),e.params.slidesPerGroup=1):b(!0)};return(0,o.jsxs)("div",{className:"jsx-1fef19987ea3af7 swiper-container",children:[(0,o.jsx)("div",{className:"jsx-1fef19987ea3af7",children:(0,o.jsx)("h2",{className:"jsx-1fef19987ea3af7 "+"".concat(n?"pl-[16px]":"pl-[32px]"," slider-main-title capitalize text-left mt-4 mb-6 sm:pl-[32px] md:pl-[64px] lg:pl-[128px] xl:pl-[128px] 2xl:pl-[256px]"),children:(0,o.jsx)("span",{className:"jsx-1fef19987ea3af7 text-lg lg:text-2xl font-helvetica-text font-medium antialiased",children:t})})}),(0,o.jsx)(d.tq,{onSwiper:e=>{e&&(f.current=e,e.on("init",()=>{updateButtonsState(e)}),e.on("slideChange",()=>{updateButtonsState(e)}))},slidesPerView:"auto",spaceBetween:16,resistance:!0,resistanceRatio:0,mousewheel:{forceToAxis:!0},autoplay:!1,breakpoints:{1280:{slidesPerView:4},1024:{slidesPerView:4},768:{slidesPerView:3},640:{slidesPerView:2},280:{slidesPerView:2}},children:a.Children.map(l,(e,t)=>(0,o.jsx)(d.o5,{className:"xl:w-[412px] lg:w-[350px] md:w-[300px]",style:{marginLeft:0===t?r+"px":0,marginRight:t===l.length-1?c+"px":0},children:(0,o.jsx)("div",{className:"jsx-1fef19987ea3af7 "+"".concat(t===l.length-1?"hidden":"block"),children:e})},t))}),m&&(0,o.jsx)("div",{onClick:()=>f.current&&f.current.slidePrev(),className:"jsx-1fef19987ea3af7 swiper-button-prev rounded-full bg-white border border-gray-normal lg:hover:border-2"}),v&&(0,o.jsx)("div",{onClick:()=>f.current&&f.current.slideNext(),className:"jsx-1fef19987ea3af7 swiper-button-next rounded-full bg-white border border-gray-normal lg:hover:border-2"}),(0,o.jsx)(i(),{id:"1fef19987ea3af7",children:".swiper-button-prev.jsx-1fef19987ea3af7,.swiper-button-next.jsx-1fef19987ea3af7{display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;width:48px;height:48px;background:white;-webkit-box-shadow:0 3px 12px rgba(0,0,0,.15);-moz-box-shadow:0 3px 12px rgba(0,0,0,.15);box-shadow:0 3px 12px rgba(0,0,0,.15);-webkit-animation:fadeIn.3s;-moz-animation:fadeIn.3s;-o-animation:fadeIn.3s;animation:fadeIn.3s;-webkit-transition:opacity.4s;-moz-transition:opacity.4s;-o-transition:opacity.4s;transition:opacity.4s;cursor:pointer;top:45%!important;z-index:20!important}.swiper-button-prev.jsx-1fef19987ea3af7:hover,.swiper-button-next.jsx-1fef19987ea3af7:hover{border-width:2px}.swiper-button-prev.jsx-1fef19987ea3af7::after,.swiper-button-next.jsx-1fef19987ea3af7::after{font-size:18px;color:black}@media(max-width:1023px){.swiper-button-prev.jsx-1fef19987ea3af7,.swiper-button-next.jsx-1fef19987ea3af7{display:none}}"})]})}},62528:function(e,l,t){"use strict";t.r(l),t.d(l,{__N_SSP:function(){return q},default:function(){return Home}});var o=t(85893),n=t(67294),i=t(18202),a=t(99470),r=t(37887),d=t(87902),s=t(58159),u=t(41609),c=t.n(u);let useAuth=()=>{var e;let{logoutMutation:l}=(0,s._)(),{loading:t,error:o,data:n}=(0,r.a)(d.Z,{notifyOnNetworkStatusChange:!0,onCompleted:()=>{var e;let t=localStorage.getItem("classic-user");!c()(t)&&n&&(null==n?void 0:null===(e=n.checkCookies)||void 0===e?void 0:e.status)==!1&&(l(),location.reload())}});return t?null:{results:null==n?void 0:null===(e=n.checkCookies)||void 0===e?void 0:e.status}};var x=t(31919),m=t(41480),middle_publicity=e=>{let{options:l}=e;return"checked"==l.activePubMiddle?(0,o.jsxs)("div",{className:"middle-container flex flex-col justify-center items-center py-12 px-4 lg:px-0",style:{backgroundColor:null==l?void 0:l.pubMiddleBackgroundColor},children:[(0,o.jsx)("div",{className:"flex justify-center items-center text-center font-helvetica-text font-normal",style:{backgroundColor:null==l?void 0:l.pubMiddleBackgroundColor,color:null==l?void 0:l.pubMiddleColor,fontSize:l&&(null==l?void 0:l.pubTextMiddlePx)?(null==l?void 0:l.pubTextMiddlePx)+"px":"24px"},children:(null==l?void 0:l.pubTextMiddle)?null==l?void 0:l.pubTextMiddle:""}),(0,o.jsxs)("div",{className:"flex justify-center items-center text-center mt-4",children:[(null==l?void 0:l.pubButtonMiddle1)?(0,o.jsx)("div",{className:"min-w-min px-2 text-sm underline tracking-wider cursor-pointer",onClick:()=>{window.location=null==l?void 0:l.pubButtonMiddle1},style:{color:null==l?void 0:l.pubMiddleColor},children:(0,o.jsx)("span",{children:l&&(null==l?void 0:l.pubButton1TextMiddle)?null==l?void 0:l.pubButton1TextMiddle:""})}):"",(null==l?void 0:l.pubButtonMiddle2)?(0,o.jsx)("div",{className:"".concat((null==l?void 0:l.pubButtonMiddle1)&&(null==l?void 0:l.pubButtonMiddle2)?"pl-6":"px-2"," min-w-min text-sm underline tracking-wider cursor-pointer"),onClick:()=>{window.location=null==l?void 0:l.pubButtonMiddle2},style:{color:null==l?void 0:l.pubMiddleColor},children:(0,o.jsx)("span",{children:l&&(null==l?void 0:l.pubButton2TextMiddle)?null==l?void 0:l.pubButton2TextMiddle:""})}):""]})]}):(0,o.jsx)(o.Fragment,{})},p=t(5379),v=t.n(p),b=t(25675),f=t.n(b),g=t(86510),main_hero=e=>{let{options:l,isMobile:t}=e;return"checked"==l.activePubMain?(0,o.jsx)("div",{className:"banner flex flex-col sm:flex-row justify-between overflow-hidden relative w-full h-full",children:(0,o.jsxs)("div",{className:"banner-img flex items-center justify-between flex-wrap mx-auto content-center font-helvetica-text font-normal inset-0",children:[(0,o.jsx)("div",{className:"relative",children:t?(0,o.jsx)(f(),{src:(0,g.N4)(l.mainImageMobile,":best",1080,1920),alt:"Classic Jeans promo principal",width:1080,height:1920,placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/UIRC#uoz?ws:VYj[o}fkRjkCjYayozayf5of",quality:95,priority:!0,unoptimized:!0}):(0,o.jsx)(f(),{src:(0,g.N4)(l.mainImageDesktop,":best",1920,1080),alt:"Classic Jeans promo principal",width:1920,height:1080,placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/UIRC#uoz?ws:VYj[o}fkRjkCjYayozayf5of",quality:95,priority:!0,unoptimized:!0})}),(0,o.jsx)("div",{className:"wp-block-cover__inner-container ".concat(l&&(null==l?void 0:l.positionSelect)||(null==l?void 0:l.positionSelectMobile)?t?null==l?void 0:l.positionSelectMobile:null==l?void 0:l.positionSelect:""),children:(0,o.jsxs)("div",{className:"".concat(l&&(null==l?void 0:l.positionSelect)=="cj-center-top"||(null==l?void 0:l.positionSelect)=="cj-center-absolute"||(null==l?void 0:l.positionSelect)=="cj-center-bottom"||(null==l?void 0:l.positionSelectMobile)=="cj-center-top"||(null==l?void 0:l.positionSelectMobile)=="cj-center-absolute"||(null==l?void 0:l.positionSelectMobile)=="cj-center-bottom"?"flex flex-col justify-center items-center text-center":(null==l?void 0:l.positionSelectMobile)=="cj-center-bottom-outline"?"flex flex-col justify-center text-center items-center mt-10 px-8":"justify-start text-left"),children:[l&&(null==l?void 0:l.mainText11)?t?(0,o.jsx)("p",{className:"has-large-font-size antialiased",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText11mPx)?(null==l?void 0:l.mainText11mPx)+"px":"50px"},children:null==l?void 0:l.mainText11}):(0,o.jsx)("p",{className:"has-large-font-size antialiased",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText11Px)?(null==l?void 0:l.mainText11Px)+"px":"90px"},children:null==l?void 0:l.mainText11}):"",l&&(null==l?void 0:l.mainText12)?t?(0,o.jsx)("p",{className:"has-extra-large-font-size antialiased pt-2",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText12mPx)?(null==l?void 0:l.mainText12mPx)+"px":"30px"},children:null==l?void 0:l.mainText12}):(0,o.jsx)("p",{className:"has-extra-large-font-size antialiased pt-4",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText12Px)?(null==l?void 0:l.mainText12Px)+"px":"50px"},children:null==l?void 0:l.mainText12}):"",l&&(null==l?void 0:l.mainText13)?t?(0,o.jsx)("p",{className:"has-extra-large-font-size pt-2 antialiased",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText13mPx)?(null==l?void 0:l.mainText13mPx)+"px":"25px"},children:null==l?void 0:l.mainText13}):(0,o.jsx)("p",{className:"has-extra-large-font-size pt-4 antialiased",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText13Px)?(null==l?void 0:l.mainText13Px)+"px":"40px"},children:null==l?void 0:l.mainText13}):"",l&&(null==l?void 0:l.mainText14)?t?(0,o.jsx)("p",{className:"has-large-font-size antialiased pt-2",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText14mPx)?(null==l?void 0:l.mainText14mPx)+"px":"25px"},children:null==l?void 0:l.mainText14}):(0,o.jsx)("p",{className:"has-large-font-size antialiased pt-4",style:{color:l&&(null==l?void 0:l.mainColor)?null==l?void 0:l.mainColor:"#FFFFFF",fontSize:l&&(null==l?void 0:l.mainText14Px)?(null==l?void 0:l.mainText14Px)+"px":"40px"},children:null==l?void 0:l.mainText14}):"",(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"flex gap-6 mt-8",children:[(null==l?void 0:l.pubButton1TextMain)?(0,o.jsxs)("button",{style:{color:l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",backgroundColor:l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"},onClick:()=>{window.location=null==l?void 0:l.pubButton1Main},className:v().dynamic([["6087b05aaf9929de",[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"]]])+" w-35 py-3 rounded-full text-sm hover:bg-[#323232] antialiased",children:[(0,o.jsx)("span",{className:v().dynamic([["6087b05aaf9929de",[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"]]]),children:l&&(null==l?void 0:l.pubButton1TextMain)?null==l?void 0:l.pubButton1TextMain:""}),(0,o.jsx)(v(),{id:"6087b05aaf9929de",dynamic:[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"],children:"button.__jsx-style-dynamic-selector:hover{color:".concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;background-color:").concat(l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF","!important;-webkit-box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;-moz-box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important}")})]}):"",(null==l?void 0:l.pubButton2TextMain)?(0,o.jsxs)("button",{style:{color:l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",backgroundColor:l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"},onClick:()=>{window.location=null==l?void 0:l.pubButton2Main},className:v().dynamic([["6087b05aaf9929de",[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"]]])+" w-35 py-3 rounded-full text-sm hover:bg-[#323232] antialiased",children:[(0,o.jsx)("span",{className:v().dynamic([["6087b05aaf9929de",[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"]]]),children:l&&(null==l?void 0:l.pubButton2TextMain)?null==l?void 0:l.pubButton2TextMain:""}),(0,o.jsx)(v(),{id:"6087b05aaf9929de",dynamic:[l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000",l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF",l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000"],children:"button.__jsx-style-dynamic-selector:hover{color:".concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;background-color:").concat(l&&(null==l?void 0:l.btnColor)?null==l?void 0:l.btnColor:"#FFFFFF","!important;-webkit-box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;-moz-box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important;box-shadow:0 0px 8px 2px ").concat(l&&(null==l?void 0:l.btnBgColor)?null==l?void 0:l.btnBgColor:"#000000","!important}")})]}):""]})})]})})]})}):(0,o.jsx)(o.Fragment,{})};function HomeDefault(e){useAuth();let{mujer:l,hombre:t,options:n,isMobile:i}=e;return(0,o.jsxs)(a.Z,{urlPage:"",stickyMenu:!0,setting:null==e?void 0:e.setting,seo:null==e?void 0:e.seo,categories:null==e?void 0:e.categories,footerMenu:null==e?void 0:e.footerMenu,menu:null==e?void 0:e.menu,children:[(0,o.jsx)("h1",{className:"absolute -top-10",children:"Tienda Online Classic Jeans Shop"}),(null==n?void 0:n.activePubMiddle)=="checked"&&(0,o.jsx)(middle_publicity,{options:n}),(null==n?void 0:n.activePubMain)=="checked"&&(0,o.jsx)(main_hero,{options:n,isMobile:i}),(0,o.jsx)("div",{className:"products mt-18 relative",children:(null==l?void 0:l.length)?(0,o.jsx)(x.Z,{title:"Lo M\xe1s Nuevo En Mujeres",isLanding:!0,children:l.map(e=>(0,o.jsx)(m.Z,{product:e,isMobile:i,hideFilter:!0},e.id))}):""}),(0,o.jsx)("div",{className:"products my-18 relative",children:(null==t?void 0:t.length)?(0,o.jsx)(x.Z,{title:"Lo M\xe1s Nuevo En Hombres",isLanding:!0,children:t.map(e=>(0,o.jsx)(m.Z,{product:e,isMobile:i,hideFilter:!0},e.id))}):""})]})}var h=t(5152),j=t.n(h),y=t(73359),C=t(50319),w=t(34386),F=t(25934),k=t(29506),N=t(25650),B=t(40930),S=t(22352),P=t(87324),M=t(6688),T=t(71118),I=t(2305),_=t(77444),z=t(60321),V=t(18253),E=t(10571),skeleton_SkeletonItem=()=>(0,o.jsxs)("div",{className:"w-fit product-desktop self-start h-max",children:[(0,o.jsx)("div",{className:"relative",children:(0,o.jsx)("div",{children:(0,o.jsx)(E.Z,{src:"",alt:"skeleton",width:614,height:614,quality:100})})}),(0,o.jsxs)("div",{className:"product-info px-1 lg:px-0 relative mt-3",children:[(0,o.jsx)("div",{className:"mb-1.5 w-34 h-3 bg-gray-lightest"}),(0,o.jsx)("div",{className:"font-helvetica-text font-normal text-sm md:text-base text-gray-light antialiased mb-1.5 w-12 h-3 bg-gray-lightest"}),(0,o.jsx)("div",{className:"font-helvetica-text font-normal text-sm md:text-base text-gray-light antialiased mb-3 w-20 h-3 bg-gray-lightest"}),(0,o.jsx)("div",{className:"mb-2 w-30 h-3 bg-gray-lightest"}),(0,o.jsx)("div",{className:"flex justify-between px-1 pb-2 relative",children:(0,o.jsx)("div",{className:"coloresMayor flex flex-row flex-wrap relative",children:[void 0,void 0,void 0].map(function(e,l){return(0,o.jsx)("div",{style:{backgroundColor:"#c1c1c1"},role:"button",className:"ring-1 ring-gray-light ring-offset-2 w-4.7 h-4.7\n border border-solid cursor-pointer transition-all duration-300 ease-linear inline-block rounded-full mr-2 mt-2"},l)})})})]})]}),skeleton=()=>(0,o.jsx)("div",{className:"flex mt-8",children:(0,o.jsx)("div",{className:"px-2 lg:px-0 grid grid-cols-2 md:grid-cols-2 xl:grid-cols-3 gap-x-2 lg:gap-x-4 gap-y-10 justify-items-start content-start place-content-stretch place-self-start overflow-hidden",children:[void 0,void 0,void 0].map((e,l)=>(0,o.jsx)(skeleton_SkeletonItem,{},"skt-"+l))})}),Z=t(1852);function HomeBuilder(e){return useAuth(),(0,o.jsxs)(a.Z,{urlPage:"",stickyMenu:!0,setting:null==e?void 0:e.setting,seo:null==e?void 0:e.seo,categories:null==e?void 0:e.categories,footerMenu:null==e?void 0:e.footerMenu,menu:null==e?void 0:e.menu,children:[(0,o.jsx)("h1",{className:"absolute -top-10",children:"Tienda Online Classic Jeans Shop"}),(0,o.jsx)(i.VD,{model:"homepage",content:e.homepage})]})}i.Ib.registerComponent(j()(()=>t.e(4047).then(t.bind(t,84047)),{loadableGenerated:{webpack:()=>[84047]}}),{name:"Heading",inputs:[{name:"title",type:"text",defaultValue:"Texto promocional"},{name:"txtColor",type:"string",defaultValue:"#000000"},{name:"fontSize",type:"string",defaultValue:"24px"}],image:"https://tabler-icons.io/static/tabler-icons/icons-png/3d-cube-sphere-off.png"}),i.Ib.registerComponent(j()(()=>t.e(7134).then(t.bind(t,47134)),{loadableGenerated:{webpack:()=>[47134]}}),{name:"MyButton",inputs:[{name:"content",type:"text",defaultValue:"Click Me!"},{name:"link",type:"url",defaultValue:"#"},{name:"bgColor",type:"string",defaultValue:"#FFFFFF"},{name:"txtColor",type:"string",defaultValue:"#000000"},{name:"hoverColor",type:"string",defaultValue:"#323232"}]}),i.Ib.registerComponent(e=>{let{productId:l,isMobile:t,hideFilter:i}=e,[a,r]=(0,n.useState)(null),[d,s]=(0,n.useContext)(k.I),[u,c]=(0,n.useState)(!1),[x,m]=(0,n.useState)(!1),[p,v]=(0,n.useState)(),[b,f]=(0,n.useState)(),[h,j]=(0,n.useState)((null==a?void 0:null===(er=a.image)||void 0===er?void 0:er.guid)?(0,g.N4)(null==a?void 0:null===(ed=a.image)||void 0===ed?void 0:ed.guid,":best",614,614):""),[Z,q]=(0,n.useState)(0),[L,O]=(0,n.useState)(),[R,A]=(0,n.useState)(),[D,W]=(0,n.useState)(),[G,H]=(0,n.useState)(),[J,Q]=(0,n.useState)(!1),[U,X]=(0,n.useState)(!1);(0,n.useEffect)(()=>{(async function(){if(!l)return;let e=await fetch("/api/product/".concat(l)),t=await e.json();r(t)})()},[l]);let[Y,{loading:$,error:K,data:ee}]=(0,y.t)(_.Z,{fetchPolicy:"no-cache",onCompleted:()=>{let e=(0,g.W3)(ee);if(localStorage.setItem("classic-cart",JSON.stringify(e)),s(e),et&&e){var l;let t=parseFloat((null==e?void 0:null===(l=e.totalProductsPrice)||void 0===l?void 0:l.replace("$","")).replace(".","").replace(",","")),o=(0,P.s)(e),n=(0,M.q)(e),i=(0,T.el)(e);(0,P.B)("add_to_cart",{value:t,currency:"COP",items:o}),(0,M.w)("AddToCart",{value:t,currency:"COP",contents:n,content_type:"product"}),(0,T.PG)("AddToCart",{value:t,currency:"COP",contents:i}),Q(!0),1==e.totalProductsCount&&X(!0)}},onError:e=>{}}),[el,{data:et,loading:eo,error:en}]=(0,C.D)(z.Z,{onCompleted:()=>{Y()},onError:e=>{if(e){var l;(null==e?void 0:null===(l=e.graphQLErrors[0])||void 0===l?void 0:l.message)=="Expired token"&&(localStorage.getItem("classic-cart")&&localStorage.setItem("classic-cart",null),localStorage.removeItem("woo-session"))}}}),ei=(null==a?void 0:null===(es=a.variations)||void 0===es?void 0:es.nodes)?null==a?void 0:null===(eu=a.variations)||void 0===eu?void 0:eu.nodes:"";var ea,er,ed,es,eu,ec,ex,em,ep=[],ev=[];(0,n.useEffect)(()=>{if(null==ei?void 0:ei.length){for(var e=[],l=ei.map(function(e,l){(null==e?void 0:null===(o=e.attributes)||void 0===o?void 0:null===(t=o.nodes[0])||void 0===t?void 0:t.name)=="pa_color"?(i=null==e?void 0:null===(d=e.attributes)||void 0===d?void 0:null===(r=d.nodes[0])||void 0===r?void 0:r.value,a=null==e?void 0:null===(u=e.attributes)||void 0===u?void 0:null===(s=u.nodes[1])||void 0===s?void 0:s.value):(i=null==e?void 0:null===(x=e.attributes)||void 0===x?void 0:null===(c=x.nodes[1])||void 0===c?void 0:c.value,a=null==e?void 0:null===(p=e.attributes)||void 0===p?void 0:null===(m=p.nodes[0])||void 0===m?void 0:m.value);var t,o,n,i,a,r,d,s,u,c,x,m,p,v,b,f=null==e?void 0:null===(n=e.sku)||void 0===n?void 0:n.split("-");if(f)return ev[l]={id:null==e?void 0:e.variationId,color:i,idColor:f[0],codigoColor:f[1],talla:a,stockQuantity:null==e?void 0:e.stockQuantity},{id:f[0],color:i,codigoColor:f[1],image:(null==e?void 0:null===(v=e.image)||void 0===v?void 0:v.guid)?(0,g.N4)(null==e?void 0:null===(b=e.image)||void 0===b?void 0:b.guid,":best",614,614):N.Z.productImagePlaceholder282}}),t=0;te-l);var n=[];["XS-P","XS","S","M","L","XL","2XL"].map(function(l){(null==e?void 0:e.includes(l))&&n.push(l)}),H(ev),n.length>0?A(n):A(e)}},[a]);let handleClick=(e,l,t)=>{v(e),q(e),j((0,g.N4)(l,":best",614,614)),f(t),ep=[];for(var o=ev.length>0?ev:G,n=0;n<(null==o?void 0:o.length);n++)o[n].idColor==e&&o[n].stockQuantity&&ep.push(o[n].talla);ep.sort((e,l)=>e-l),W(ep)},handleClickTalla=e=>{for(var l=ev.length>0?ev:G,t=0;t{let e="/producto/"+(null==a?void 0:a.slug)+"/?idColor="+Z;window.location=e};return a?void 0!==a&&"GroupProduct"!==a.__typename&&(null==ei?void 0:ei.length)?(0,o.jsxs)("div",{className:"w-fit product-desktop place-self-start h-max",children:[(0,o.jsxs)("div",{className:"relative",onMouseEnter:()=>m(!0),onMouseLeave:()=>m(!1),children:[(0,o.jsx)(S.Z,{salesPrice:null==a?void 0:a.salePrice,regularPrice:null==a?void 0:a.regularPrice}),(0,o.jsx)("div",{onClick:()=>{redirectToProduct()},children:(0,o.jsx)(E.Z,{src:h,alt:null==a?void 0:a.name,width:614,height:614,quality:100,srcSet:(ea=null==a?void 0:null===(ec=a.image)||void 0===ec?void 0:ec.guid,[200,300,400,419,468,501,614].map(e=>"".concat((0,g.N4)(ea,":best",e,e)," ").concat(e,"w")).join(", "))},Z)}),(0,o.jsx)("div",{className:"".concat(!0===x?"visible":"hidden"," bg-white bg-white/100 flex flex-col bottom-4 inset-x-4 absolute shadow-lg pb-2 px-1.5 rounded-lg items-center justify-center"),children:!0===u?(0,o.jsx)("div",{className:"flex flex-wrap items-center justify-center w-full",onMouseLeave:()=>c(!1),children:null==R?void 0:R.map(function(e,l){return(null==D?void 0:D.includes(e))?(0,o.jsx)("span",{role:"button",onClick:()=>handleClickTalla(e),className:"mt-2 w-9 p-2 hover:bg-gray-light2 rounded-md text-center font-helvetica-text font-normal text-xs antialiased cursor-pointer inline-block transition-all duration-300 ease-linear",children:e},"talla"+l):(0,o.jsx)("span",{role:"button",className:"relative mt-2 w-9 rounded-md text-center font-helvetica-text font-normal text-xs antialiased cursor-not-allowed select-none inline-block transition-all duration-300 ease-linear custom-line-through",children:e},"talla"+l)})}):(0,o.jsx)("div",{className:"p-2 text-sm font-helvetica-text font-medium antialiased flex flex-row items-center justify-center w-full h-10 pb-0 relative",onMouseEnter:()=>c(!0),onTouchEnd:()=>c(!0),children:"Agregar al Carrito"})})]}),(0,o.jsxs)("div",{className:"product-info px-1 lg:px-0 relative mt-3",children:[(0,o.jsx)(V.Z,{fechaAdmision:null==a?void 0:a.admissionDate}),(0,o.jsx)("h3",{className:"product-title font-helvetica-text font-medium text-sm md:text-base antialiased text-black",children:(0,o.jsx)("a",{href:"/producto/".concat(a.slug,"/?idColor=").concat(Z),children:(null==a?void 0:a.name)?null==a?void 0:a.name:""})}),(0,o.jsx)("p",{className:"font-helvetica-text font-normal text-sm md:text-base text-gray-light mb-1.5 antialiased",children:null==a?void 0:null===(em=a.paLineaPorPrecioActuals)||void 0===em?void 0:null===(ex=em.nodes[0])||void 0===ex?void 0:ex.name}),(0,o.jsxs)("p",{className:"font-helvetica-text font-normal text-sm md:text-base text-gray-light mb-3 antialiased",children:["Item No. ",null==a?void 0:a.sku]}),(0,o.jsx)("div",{className:"mb-2",children:(0,o.jsx)(B.Z,{salesPrice:null==a?void 0:a.salePrice,regularPrice:null==a?void 0:a.regularPrice,isDetail:!1})}),(0,o.jsx)("div",{className:"flex justify-between px-1 pb-2 relative",children:(0,o.jsx)("div",{className:"coloresMayor flex flex-row flex-wrap relative",children:null==L?void 0:L.map(function(e,l){return(0,o.jsx)(w.Z,{disableInteractive:!0,placement:"bottom",arrow:!0,title:e.color,children:(0,o.jsx)("div",{style:{backgroundColor:e.codigoColor},role:"button",onClick:()=>handleClick(e.id,e.image,e.color),className:"".concat(e.id===Z?"ring-1 ring-gray-light ring-offset-2 w-4.7 h-4.7":"border-gray-light2 w-5 h-5"," border border-solid cursor-pointer transition-all duration-300 ease-linear inline-block rounded-full mr-2 mt-2")},l)},"color_"+e.id)})})})]}),J?(0,o.jsx)(I.Z,{open:U,handleClose:X}):""]}):"":(0,o.jsx)("div",{children:"Cargando..."})},{name:"ProductQuickAddForBuilder",inputs:[{name:"productId",type:"string",required:!0},{name:"isMobile",type:"boolean",defaultValue:!1},{name:"hideFilter",type:"boolean",defaultValue:!1}]}),i.Ib.registerComponent(e=>{let{categoryId:l,title:t,isLanding:i,isMobile:a,hideFilter:r}=e,[d,s]=(0,n.useState)([]),[u,c]=(0,n.useState)(!0),[p,v]=(0,n.useState)(null);return((0,n.useEffect)(()=>{(async function(){c(!0);try{let e=await fetch("/api/products-by-category",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({categoryId:l,first:10,after:null})});if(!e.ok)throw Error("Error: ".concat(e.statusText));let t=await e.json();s((0,g.aI)(t.productCategory.products.edges.map(e=>e.node),9))}catch(e){console.error("Error al cargar los productos:",e),v(e)}finally{c(!1)}})()},[l]),u)?(0,o.jsx)(skeleton,{}):p?(0,o.jsx)("div",{children:"Error al cargar los productos"}):(0,o.jsx)(x.Z,{title:t,isLanding:i,children:d.map(e=>(0,o.jsx)(m.Z,{product:e,isMobile:a,hideFilter:r},e.id))})},{name:"ProductSlider",inputs:[{name:"categoryId",type:"string",required:!0},{name:"title",type:"string",required:!1},{name:"isLanding",type:"boolean",defaultValue:!1},{name:"isMobile",type:"boolean",defaultValue:!1},{name:"hideFilter",type:"boolean",defaultValue:!1}]}),i.Ib.registerComponent(e=>{let{quantity:l=9,title:t="Lo m\xe1s nuevo",textSize:i="24px",textWeight:a="medium",textAlign:r="center",horizontalMargin:d="auto"}=e,[s,u]=(0,n.useState)([]),[c,x]=(0,n.useState)(!0),[p,v]=(0,n.useState)(null),b=(0,Z.useMediaQuery)({maxWidth:767},void 0,e=>{});return(0,n.useEffect)(()=>{(async function(){x(!0);try{let e=await fetch("/api/products-more-news",{method:"GET",headers:{"Content-Type":"application/json"}});if(!e.ok)throw Error("Error: ".concat(e.statusText));let t=await e.json();u((0,g.aI)(t.products.nodes,l))}catch(e){console.error("Error al cargar los productos:",e),v(e)}finally{x(!1)}})()},[]),(0,o.jsxs)("div",{className:"my-18",children:[(0,o.jsx)("h3",{className:"all-news-title text-[".concat(i,"] font-").concat(a," w-full text-").concat(r," mb-6"),children:t}),(0,o.jsx)("div",{className:"product-more-news mx-".concat(d," grid grid-cols-2 md:grid-cols-3 xl:grid-cols-3 gap-x-2 lg:gap-x-4 gap-y-10 justify-items-stretch overflow-hidden scroll-smooth"),children:s.length>0&&s.map(e=>(0,o.jsx)(m.Z,{product:e,hideFilter:!0,isMobile:b},null==e?void 0:e.id))})]})},{name:"ProductsMoreNews",inputs:[{name:"quantity",type:"number"},{name:"title",type:"string",required:!1,defaultValue:"Lo m\xe1s nuevo"},{name:"textSize",type:"string",defaultValue:"24px"},{name:"textWeight",type:"string",defaultValue:"bold"}]}),i.Ib.registerComponent(e=>{let{title:l,url:t,image:n,description:i}=e;return(0,o.jsxs)("div",{className:"product-desktop w-71 h-107.5 place-self-center",children:[(0,o.jsx)("div",{className:"h-71",children:(0,o.jsx)("a",{href:t,children:n?(0,o.jsx)(f(),{src:n,alt:l,className:"rounded-lg",width:282,height:282,placeholder:"blur",blurDataURL:"data:image/jpeg;base64,/9j/UIRC#uoz?ws:VYj[o}fkRjkCjYayozayf5of",quality:90}):c()(N.Z.productImagePlaceholder282)?null:(0,o.jsx)(f(),{src:N.Z.productImagePlaceholder282,alt:l,className:"rounded-lg",width:282,height:282,quality:100})})}),(0,o.jsx)("div",{className:"product-info h-37",children:(0,o.jsxs)("div",{className:"flex flex-col",children:[(0,o.jsx)("h3",{className:"product-title mt-3 mb-1.5 font-helvetica-text text-sm tracking-widest font-normal text-black",children:(0,o.jsx)("a",{href:t,children:l||""})}),(0,o.jsx)("p",{className:"font-helvetica-text text-sm text-gray-description",children:i})]})})]})},{name:"BasicCard",inputs:[{name:"title",type:"string",required:!0,defaultValue:"titulo o nombre"},{name:"url",type:"url",defaultValue:!1},{name:"image",type:"string",required:!0,defaultValue:!1},{name:"description",type:"longText",defaultValue:"Aqui va la descripcion"}]}),i.Ib.registerComponent(E.Z,{name:"MyImageComponent",inputs:[{name:"src",type:"string",required:!0,defaultValue:""},{name:"alt",type:"longText",defaultValue:"Aqui va la descripcion"},{name:"width",type:"number",defaultValue:300},{name:"height",type:"number",required:!0,defaultValue:300},{name:"quality",type:"number",required:!0,defaultValue:90},{name:"srcSet",type:"string",required:!0,defaultValue:""}]}),i.fl.init("".concat("d9c19293b0d04406b3667c1ca41779ce")),i.fl.init("".concat("d9c19293b0d04406b3667c1ca41779ce"));var q=!0;function Home(e){var l;return(null==e?void 0:null===(l=e.setting)||void 0===l?void 0:l.typeDesign)==="builder"?(0,o.jsx)(HomeBuilder,{...e}):(0,o.jsx)(HomeDefault,{...e})}},87902:function(e,l,t){"use strict";var o=t(82729),n=t(75063);function _templateObject(){let e=(0,o._)(["query {\n checkCookies {\n status\n }\n}\n"]);return _templateObject=function(){return e},e}let i=(0,n.ZP)(_templateObject());l.Z=i}},function(e){e.O(0,[773,6871,5810,4386,1852,4319,4521,9470,6359,9774,2888,179],function(){return e(e.s=75557)}),_N_E=e.O()}]);