(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6219],{86649:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSG:function(){return ft},default:function(){return xt}});var a=n(59499),i=n(67160),s=n(67294),o=n(46670),r=n(31036),l=(0,o.Pi)((function(e){return s.createElement(r.N,(0,i.pi)({},e,{addOgpMetas:!0,reInitOnBrowser:!0}))})),c=n(85756),d=n(51161),u=n(50029),m=n(16835),p=n(87794),h=n.n(p),f=n(20934),x=n(11163),g=n(633),v=n(57726),j=n(285),b=n(86423),y=n(7696),N=n(27812),C=n(57899),w=n(28900),k=n(61121),S=n(77607),T=n(37094),V=n(85893),I=(0,o.Pi)((function(e){var t=e.productDetail,n=e.attributes,a=e.isShowMoreButton,i=e.numberToCutDescription,o=e.isNumberToCutDescription,r=e.descriptionTitleIconColor,l=e.specialAttrFontSize,c=e.isBottomTabOnlySpeacilAttr,d=e.isSpecialAttrTabClickStack,u=e.productTabsArrowDesign,p=e.isCloseProductDescription,h=e.isOpenAllTabs,f=s.useState(p?-1:1),x=(0,m.Z)(f,2),g=x[0],j=x[1],b=s.useState(1e3),y=(0,m.Z)(b,2),I=y[0],P=y[1],B=s.useState([]),R=(0,m.Z)(B,2),D=R[0],E=R[1],O=s.useState(!1),A=(0,m.Z)(O,2),F=A[0],_=A[1],z=s.useState([0]),L=(0,m.Z)(z,2),H=L[0],M=L[1],Z=(0,S.$)().t;s.useEffect((function(){var e=document.querySelector("#show-all-description");e&&e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),P(t.description.length+1),_(!0)}))})),s.useEffect((function(){if(h){var e=n&&n.values&&n.values;if(e){var t=e.map((function(e,t){return t+2}));M([].concat((0,N.Z)(H),(0,N.Z)(t)))}}else M([0])}),[h]),s.useEffect((function(){var e=(new DOMParser).parseFromString(t.description,"text/html"),n=(0,N.Z)(e.body.children).map((function(e){return e.outerHTML}));E(n)}),[i]);var W=t.description.slice(0,I),U=o&&i?D.slice(0,i.value).join(" "):"";return(0,V.jsx)("div",{className:"grid grid-cols-1 product-detail-page-tabs unreset unreset-reset",children:(0,V.jsxs)("div",{children:[!!t.description&&(0,V.jsxs)("div",{className:"tab flex flex-col",children:[(0,V.jsxs)("div",{onClick:function(){j(1===g?-1:1)},className:"flex justify-between items-center",children:[(0,V.jsx)("span",{style:{color:r||"#000",fontSize:l?l.value:14},className:"title",children:Z("product-detail:productDescription")}),(0,V.jsx)("span",{children:1===g?u?(0,V.jsx)(T.Vmf,{size:l?l.value:18,color:r||"#000"}):(0,V.jsx)(k.pwh,{size:l?l.value:18,color:r||"#000"}):u?(0,V.jsx)(T.OId,{size:l?l.value:18,color:r||"#000"}):(0,V.jsx)(k.poH,{size:l?l.value:18,color:r||"#000"})})]}),1===g&&((i&&o?!a&&!F:t.description.length>I)&&!a?(0,V.jsx)("div",{className:"tab-content",dangerouslySetInnerHTML:{__html:"".concat(o&&i?U:W," ").concat(o&&i&&i.value>=D.length?"":'<span style="color:'.concat(r||"#000",'" id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex">').concat(Z("common:showMore"),"</span>"),"  ")}}):(0,V.jsx)("div",{className:"tab-content",dangerouslySetInnerHTML:{__html:t.description}}))]}),!c&&n&&n.values&&n.values.map((function(e,t){var n,a,i;return(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)("div",{className:"tab flex flex-col",children:[(0,V.jsxs)("div",{onClick:function(){if(d)if(H.some((function(e){return e===t+2}))){var e=H.filter((function(e){return e!==t+2}));M(e)}else{var n=[].concat((0,N.Z)(H),[t+2]);M(n)}else j(g===t+2?-1:t+2)},className:"flex justify-between items-center",children:[(0,V.jsx)("span",{style:{color:r||"#000",fontSize:l?l.value:14},className:"title",children:e.attribute.name}),(0,V.jsx)("span",{children:(d?H.some((function(e){return e===t+2})):g===t+2)?u?(0,V.jsx)(T.Vmf,{color:r||"#000",size:l?l.value:18}):(0,V.jsx)(k.pwh,{color:r||"#000",size:l?l.value:18}):u?(0,V.jsx)(T.OId,{color:r||"#000",size:l?l.value:18}):(0,V.jsx)(k.poH,{color:r||"#000",size:l?l.value:18})})]}),(d?H.some((function(e){return e===t+2})):g===t+2)?e.attribute.type===v.T.TABLE?(0,V.jsx)("div",{className:"flex w-full",children:(0,V.jsxs)("table",{className:"w-full product-detail-table mt-4",children:[(0,V.jsx)("thead",{children:(0,V.jsxs)("tr",{className:"border-b border-alto-grey text-sm font-bold",children:[(0,V.jsxs)("th",{className:"text-left py-3",children:[" ",e.attribute.name," "]}),e.attribute.tableTemplate&&e.attribute.tableTemplate.columns&&e.attribute.tableTemplate.columns.map((function(e){return(0,V.jsx)("th",{className:"text-left py-3",children:e.name})}))]})}),(0,V.jsx)("tbody",{children:e.attribute.tableTemplate&&e.attribute.tableTemplate.rows&&e.attribute.tableTemplate.rows.map((function(t){return(0,V.jsxs)("tr",{className:"border-b border-alto-grey text-sm md:text-base table-tr",children:[(0,V.jsx)("td",{className:"py-3",children:t.name}),e.attribute.tableTemplate&&e.attribute.tableTemplate.columns&&e.attribute.tableTemplate.columns.map((function(n){var a,i=null===(a=e.values[0].tableValue)||void 0===a?void 0:a.find((function(e){return e.colId===n.id&&t.id===e.rowId}));if(i)return(0,V.jsx)("td",{className:"py-3",children:i.value})}))]})}))})]})}):e.attribute.type===v.T.CHOICE||e.attribute.type===v.T.MULTIPLE_CHOICE?(0,V.jsx)("div",{className:"tab-content choice-render",children:e.attribute.type===v.T.CHOICE?null===(n=e.values[0].productAttributeOption)||void 0===n?void 0:n.name:e.values.map((function(t,n){var a;return"".concat(null===(a=t.productAttributeOption)||void 0===a?void 0:a.name).concat(n!==e.values.length-1?", ":"")}))}):e.attribute.type===v.T.IMAGE?(0,V.jsx)("div",{className:"tab-content image-render",children:e.values&&e.values.length&&e.values[0].images&&e.values[0].images.length?(0,V.jsx)("div",{className:"flex flex-wrap gap-4",children:null===(a=e.values[0].images)||void 0===a?void 0:a.map((function(e){return(0,V.jsx)("div",{className:"relative w-[150px] sm:w-[150px] md:w-[200px] lg:w-[200px] h-[150px] sm:h-[150px] md:h-[200px] lg:h-[200px]",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:"",image:e,sizes:"(max-width: 768px) 100vw, 50vw"})})}))}):null}):e.attribute.type===v.T.PRODUCT?(0,V.jsx)("div",{className:"mt-4 flex flex-wrap gap-2 unreset unreset-reset",children:null===(i=e.values[0].products)||void 0===i?void 0:i.map((function(e){var t,n,a;return(0,V.jsx)(w.Z,{passHref:!0,href:e.productHref,children:(0,V.jsxs)("a",{style:{color:"#333"},className:"flex space-y-2 !no-underline text-xs flex-col",children:[!(null===(t=e.selectedVariant.mainImage)||void 0===t||!t.image)&&(0,V.jsx)("div",{className:"relative w-[100px] h-[100px]",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:(null===(n=e.selectedVariant.mainImage)||void 0===n?void 0:n.image.altText)||"",image:null===(a=e.selectedVariant.mainImage)||void 0===a?void 0:a.image,sizes:"200px"})}),(0,V.jsx)("span",{className:"w-[100px] truncate",children:e.name})]})})}))}):(0,V.jsx)("div",{className:"tab-content text-render",dangerouslySetInnerHTML:{__html:v.T.DATETIME===e.attribute.type||v.T.DATE===e.attribute.type?v.T.DATE===e.attribute.type?new Date(parseInt(e.values[0].value||"")).toLocaleDateString():new Date(parseInt(e.values[0].value||"")).toLocaleString([],{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})||"":e.values[0].value||""}}):null]})})}))]})})})),P=n(68045),B=(n(27986),n(68660)),R=n(24299),D=n(45578),E=n(24233),O=n(97200),A=(0,o.Pi)((function(e){var t=e.router,n=e.onClose,a=e.description,i=s.useState(),o=(0,m.Z)(i,2),r=o[0],l=o[1],c=s.useState(!1),d=(0,m.Z)(c,2),p=d[0],f=d[1],x=(0,S.$)().t,g=s.useState(new E.U({message:{requiredRule:x("common:requiredInput"),emailRule:x("common:emailFormatRequired"),minRule:x("common:emailLenghtrequiredInput")}})),v=(0,m.Z)(g,1)[0],j=function(){var e=(0,u.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,f(!0),e.next=4,v.login();case 4:if(!(t=e.sent).isFormError){e.next=8;break}return f(!1),e.abrupt("return");case 8:if(t.isSuccess){e.next=12;break}return l({status:"error",title:x("product-detail:login.loginFail"),text:x("product-detail:login.loginFailSub")}),f(!1),e.abrupt("return");case 12:l({status:"success",title:x("product-detail:login.loginSuccessMsg"),text:x("product-detail:login.loginSuccessMsgSub")}),n(),e.next=20;break;case 16:e.prev=16,e.t0=e.catch(0),l({status:"error",title:"Hata!",text:"Beklenmedik bir hata olu\u015ftu."}),f(!1);case 20:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(){return e.apply(this,arguments)}}(),b=v.emailErrorMessage?"error":void 0,y=v.passwordErrorMessage?"error":void 0;return(0,V.jsxs)("div",{className:"login-main relative",children:[(0,V.jsx)("span",{className:"text-sm text-gray-700",children:a}),(0,V.jsx)("div",{className:"py-4 flex justify-center flex-wrap",children:(0,V.jsx)("span",{className:"login-modal font-bold",children:x("product-detail:login.login")})}),r&&(0,V.jsx)(O.Z,{status:r.status,title:r.title,text:r.text,onClose:function(){return l(void 0)}}),(0,V.jsx)(B.Z,{className:"login-inp-main",label:x("common:field.email"),required:!0,status:b,errorText:v.emailErrorMessage,children:(0,V.jsx)(R.Z,{type:"email",value:v.email,onChange:v.onEmailChange})}),(0,V.jsx)(B.Z,{className:"login-inp-main",label:x("common:field.password"),required:!0,status:y,errorText:v.passwordErrorMessage,children:(0,V.jsx)(R.Z,{secure:!0,type:"password",value:v.password,onChange:v.onPasswordChange})}),(0,V.jsx)(D.Z,{className:"mt-4 lg:mt-8 login-btn",text:x("product-detail:login.login"),loadingText:x("product-detail:login.loggingIn"),isLoading:p,onClick:j}),(0,V.jsxs)("div",{className:"flex flex-col  text-sm mt-5",children:[(0,V.jsxs)("span",{onClick:function(){t.push("/account/register"),n()},className:"cursor-pointer hover:underline font-bold mb-2",children:[(0,V.jsx)("span",{className:"font-normal",children:x("product-detail:login.dontHaveAccount")})," ",x("product-detail:login.signup")]}),(0,V.jsx)("span",{onClick:function(){t.push("/account/forgot-password"),n()},className:"cursor-pointer hover:underline",children:x("product-detail:login.forgotPassword")})]})]})})),F=n(30080),_=n(70148),z=(n(40993),n(97896)),L=(0,o.Pi)((function(e){var t=e.onSaveEmail,n=e.hideTitle,a=s.useState(""),i=(0,m.Z)(a,2),o=i[0],r=i[1],l=(0,S.$)().t;return(0,V.jsxs)("div",{className:"flex flex-col",children:[!n&&(0,V.jsx)("span",{className:"flex mb-4",children:l("common:backInStockLoginEmailRequired")}),(0,V.jsx)(B.Z,{className:"login-inp-main",label:l("common:field.email"),required:!0,status:void 0,errorText:"",children:(0,V.jsx)(R.Z,{type:"email",value:o,onChange:function(e){r(e)}})}),(0,V.jsx)("button",{disabled:!(0,z.oH)(o),className:"email-modal-button ".concat((0,z.oH)(o)?"active":"passive"),onClick:function(){return t(o)},children:l("common:field.save")})]})})),H=n(84655),M=n(39503),Z=n(90473),W=n(59359);const U=new Map,G=new WeakMap;let q,Q=0;function J(e){return Object.keys(e).sort().filter((t=>void 0!==e[t])).map((t=>{return`${t}_${"root"===t?(n=e.root,n?(G.has(n)||(Q+=1,G.set(n,Q.toString())),G.get(n)):"0"):e[t]}`;var n})).toString()}function $(e,t,n={},a=q){if("undefined"===typeof window.IntersectionObserver&&void 0!==a){const i=e.getBoundingClientRect();return t(a,{isIntersecting:a,target:e,intersectionRatio:"number"===typeof n.threshold?n.threshold:0,time:0,boundingClientRect:i,intersectionRect:i,rootBounds:i}),()=>{}}const{id:i,observer:s,elements:o}=function(e){let t=J(e),n=U.get(t);if(!n){const a=new Map;let i;const s=new IntersectionObserver((t=>{t.forEach((t=>{var n;const s=t.isIntersecting&&i.some((e=>t.intersectionRatio>=e));e.trackVisibility&&"undefined"===typeof t.isVisible&&(t.isVisible=s),null==(n=a.get(t.target))||n.forEach((e=>{e(s,t)}))}))}),e);i=s.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:s,elements:a},U.set(t,n)}return n}(n);let r=o.get(e)||[];return o.has(e)||o.set(e,r),r.push(t),s.observe(e),function(){r.splice(r.indexOf(t),1),0===r.length&&(o.delete(e),s.unobserve(e)),0===o.size&&(s.disconnect(),U.delete(i))}}s.Component;var Y=n(5152),K=n.n(Y),X=n(42664),ee=n(75997),te=(0,o.Pi)((function(e){var t=e.useFormatModel,n=(0,S.$)().t;return(0,V.jsxs)("div",{className:"mb-2",children:[(0,V.jsxs)("div",{className:"flex",children:[(0,V.jsxs)("div",{className:"width-input-main relative flex flex-col w-1/2",children:[(0,V.jsxs)("div",{className:"flex relative flex-col ",children:[(0,V.jsxs)("label",{className:"text-sm",children:[n("common:width")," ",(0,V.jsxs)("span",{className:"text-xs",children:["(",t.unit,")*"]})]}),(0,V.jsx)("input",{className:t.errorMessage?"error":"",type:"number",min:t.MIN_WIDTH,max:t.MAX_WIDTH,value:t.width,onChange:function(e){return t.setWidthInput(parseInt(e.target.value))}}),(0,V.jsxs)("div",{className:"number-box",children:[(0,V.jsx)("span",{onClick:function(){return t.setMinusWidth(t.width)},children:(0,V.jsx)(k.pwh,{size:16})}),(0,V.jsx)("span",{onClick:function(){return t.setPlusWidth(t.width)},children:(0,V.jsx)(k.poH,{size:16})})]})]}),(0,V.jsxs)("div",{className:"flex flex-col w-5/6 text-[10px] text-[#818181] mt-2",children:[(0,V.jsxs)("span",{children:["Min: ",t.MIN_WIDTH," Max: ",t.MAX_WIDTH]}),(0,V.jsxs)("span",{children:[n("common:inFormatInfoMessageInput")," "]})]})]}),(0,V.jsxs)("div",{className:"width-input-main relative  flex flex-col w-1/2",children:[(0,V.jsxs)("div",{className:"flex flex-col relative",children:[(0,V.jsxs)("label",{className:"text-sm",children:[n("common:length")," ",(0,V.jsxs)("span",{className:"text-xs",children:["(",t.unit,")*"]})]}),(0,V.jsx)("input",{className:t.errorMessage?"error":"",type:"number",min:t.MIN_LENGTH,max:t.MAX_LENGTH,value:t.length,onChange:function(e){return t.setLengthInput(parseInt(e.target.value))}}),(0,V.jsxs)("div",{className:"number-box",children:[(0,V.jsx)("span",{onClick:function(){return t.setMinusLength(t.length)},children:(0,V.jsx)(k.pwh,{size:16})}),(0,V.jsx)("span",{onClick:function(){return t.setPlusLength(t.length)},children:(0,V.jsx)(k.poH,{size:16})})]})]}),(0,V.jsxs)("div",{className:"flex flex-col w-5/6 text-[10px] text-[#818181] mt-2",children:[(0,V.jsxs)("span",{children:["Min: ",t.MIN_LENGTH," Max: ",t.MAX_LENGTH]}),(0,V.jsxs)("span",{children:[n("common:inFormatInfoMessageInput")," "]})]})]})]}),t.errorMessage&&(0,V.jsx)("span",{className:"flex mt-2 text-red-500 text-sm",children:n("common:inFormatError")})]})})),ne=n(56564),ae=n(91213),ie=(0,o.Pi)((function(e){var t=e.useFormatModel,n=(0,S.$)().t;return(0,V.jsxs)("div",{className:"mb-2",children:[(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsx)("div",{className:"width-input-main relative flex flex-col",children:(0,V.jsxs)("div",{className:"flex relative flex-col ",children:[(0,V.jsxs)("label",{className:"text-sm",children:[n("common:width")," ",(0,V.jsxs)("span",{className:"text-xs",children:["(",t.unit,")*"]})]}),t.selectOptions.length&&(0,V.jsx)("div",{className:"items-center mt-2 product-detail-page-variants flex flex-wrap",children:t.selectOptions.map((function(e){return(0,V.jsx)("div",{onClick:function(){return t.setWidthInput(e)},className:"py-1 px-4 mr-2 mb-2 variant-types relative border-transparent border-2 cursor-pointer ".concat(parseInt(e.value)===t.width?"selected-circle":""),children:(0,V.jsx)("span",{className:"variant-name",children:e.value})})}))}),t.errorMessageWidth&&(0,V.jsx)("span",{className:"flex mt-1 text-red-500 text-xs",children:n("common:m2FormatWidthError")})]})}),(0,V.jsxs)("div",{className:"width-input-main relative  flex flex-col mt-4",children:[(0,V.jsxs)("div",{className:"flex flex-col relative",children:[(0,V.jsxs)("label",{className:"text-sm",children:[n("common:length")," ",(0,V.jsxs)("span",{className:"text-xs",children:["(",t.unit,")*"]})]}),(0,V.jsx)("input",{className:t.errorMessageLength?"error":"",type:"number",min:t.MIN_LENGTH,max:t.MAX_LENGTH,value:t.length,onChange:function(e){return t.setLengthInput(parseInt(e.target.value))}}),(0,V.jsxs)("div",{className:"number-box",children:[(0,V.jsx)("span",{onClick:function(){return t.setMinusLength(t.length)},children:(0,V.jsx)(k.pwh,{size:16})}),(0,V.jsx)("span",{onClick:function(){return t.setPlusLength(t.length)},children:(0,V.jsx)(k.poH,{size:16})})]})]}),(0,V.jsxs)("div",{className:"flex flex-col w-5/6 text-[10px] text-[#818181] mt-2",children:[(0,V.jsxs)("span",{children:["Min: ",t.MIN_LENGTH," Max: ",t.MAX_LENGTH]}),(0,V.jsxs)("span",{children:[n("common:inFormatInfoMessageInput")," "]})]})]})]}),t.errorMessageLength&&(0,V.jsx)("span",{className:"flex mt-1 text-red-500 text-xs",children:n("common:inFormatError")})]})})),se=n(7006),oe=(0,o.Pi)((function(e){return(0,V.jsx)("div",{className:"placeholder-main",children:(0,V.jsx)("div",{className:"flex",children:(0,V.jsx)("div",{className:"flex w-full py-[18px] border-t border-gray-200",children:(0,V.jsxs)("div",{className:"flex space-x-4 w-full",children:[(0,V.jsx)("div",{className:"image shimmer-bg",children:" "}),(0,V.jsx)("div",{className:"flex  flex-1 w-full",children:(0,V.jsxs)("div",{className:"flex w-full",children:[(0,V.jsxs)("div",{className:"flex flex-col w-full",children:[(0,V.jsx)("div",{className:"line-content-w-80 shimmer-bg"}),(0,V.jsx)("div",{className:"line-content-w-30 shimmer-bg"})]}),(0,V.jsxs)("div",{className:"flex flex-row space-x-2 w-3/5",children:[(0,V.jsx)("div",{className:"line-content-w-50 shimmer-bg"}),(0,V.jsx)("div",{className:"line-content-w-50 shimmer-bg"})]})]})})]})})})})}));function re(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?re(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):re(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ce=(0,o.Pi)((function(e){var t=e.bundleSettings,n=e.onChangeItem,a=e.notUnderlineLink,i=e.bundleProductWithoutLink,s=e.isLoadingBundle,o=e.removeBundleImageBg,r=e.variantHeightColor,l=e.variantHeightColorMobile,c=e.isMob,d=e.bundleMainImageSize,u=(0,S.$)().t;return(0,V.jsx)("div",{className:"space-y-5",children:(0,V.jsx)("div",{className:"flex flex-col product-bundle-main",children:null===t||void 0===t?void 0:t.products.sort((function(e,t){return e.order-t.order})).map((function(e){var t,m,p,h,f,x,g,v,j,b,y,N=null===(t=e.product)||void 0===t?void 0:t.selectedVariant.stock;return 0!==e.minQuantity||null!==(m=e.product)&&void 0!==m&&m.selectedVariant.hasStock?void 0!==N&&N<10&&e.quantity>N&&(null===(p=e.product)||void 0===p||!p.selectedVariant.sellIfOutOfStock)&&e.setQuantity(N):e.setQuantity(0),s?(0,V.jsx)(oe,{}):(0,V.jsx)("div",{className:"flex flex-col sm:flex-col md:flex-row lg:flex-row product-bundle-items-main py-[18px] border-t border-gray-200",children:(0,V.jsxs)("div",{className:"flex w-full",children:[(null===(h=e.product)||void 0===h||null===(f=h.selectedVariant.mainImage)||void 0===f?void 0:f.image)&&(0,V.jsx)("div",{style:d?{width:d.value,height:d.value}:{},className:"relative w-[120px] img-main bundle-img__main h-[120px] flex items-center justify-center ".concat(o?"":"bg-[#fafafa]"),children:(0,V.jsx)("div",{style:d?{width:d.value-20,height:d.value-20}:{},className:"relative w-[100px] h-[100px] bundle__img",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:e.product.name,image:null===(x=e.product)||void 0===x?void 0:x.selectedVariant.mainImage.image,sizes:"120px",useBlur:!0})})}),(0,V.jsxs)("div",{className:"flex flex-col ml-4 space-y-4 w-full",children:[(0,V.jsxs)("div",{className:"flex justify-between",children:[i?(0,V.jsx)("span",{className:"flex text-sm  w-[45%] sm:w-[45%] md:w-[45%] lg:w-[45%] ",children:null===(g=e.product)||void 0===g?void 0:g.name}):(0,V.jsx)(w.Z,{passHref:!0,href:(null===(v=e.product)||void 0===v?void 0:v.productHref)||"",children:(0,V.jsx)("a",{className:"flex text-sm ".concat(a?"":"underline"," w-[45%] sm:w-[45%] md:w-[45%] lg:w-[45%] "),children:null===(j=e.product)||void 0===j?void 0:j.name})}),(0,V.jsx)("div",{className:"".concat(e.isQuantityEditable||1!==e.quantity?"text-xs":"text-sm"),children:e.shouldDisplayPrice?(0,V.jsxs)("div",{className:"flex space-x-2",children:[e.finalPrice!==e.sellPrice&&(0,V.jsx)("span",{className:"line-through text-gray-500",children:e.formattedSellPrice}),(0,V.jsx)("span",{children:e.formattedFinalPrice})]}):null})]}),(0,V.jsx)("div",{className:"flex flex-col space-y-4",children:null===(b=e.product)||void 0===b?void 0:b.displayedVariantTypes.map((function(t,a){var i,s,o=t.variantType,d=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsx)("span",{className:"flex mb-1 text-sm text-gray-600",children:o.name}),(0,V.jsx)("div",{className:"flex flex-wrap",children:o.selectionType===se.C.COLOR?(0,V.jsx)(V.Fragment,{children:d.map((function(t){var a=t.variantValue,i=t.hasStock,s=t.isSelected;t.variant;return a.colorCode?(0,V.jsx)("div",{className:"border border-transparent ".concat(s?"border border-black":""),children:(0,V.jsx)("span",{onClick:function(){var t;i&&(null===(t=e.product)||void 0===t||t.selectVariantValue(a,!0),n())},className:"w-8 h-8 flex relative cursor-pointer bundle-variant-color ".concat(s?"selected-bundle-variant":""," ").concat(i?"stock":"out-of-stock"),style:le({backgroundColor:a.colorCode},r||l?{width:l&&c?l.value:(null===r||void 0===r?void 0:r.value)||32,height:l&&c?l.value:(null===r||void 0===r?void 0:r.value)||32}:{})})}):a.thumbnailImage?(0,V.jsx)("div",{className:"border border-transparent ".concat(s?"border border-black":""),children:(0,V.jsx)("div",{onClick:function(){var t;i&&(null===(t=e.product)||void 0===t||t.selectVariantValue(a,!0),n())},className:"w-8 h-8 flex relative cursor-pointer bundle-variant-color ".concat(s?"selected-bundle-variant":""," ").concat(i?"stock":"out-of-stock"),style:le({},r||l?{width:l&&c?l.value:(null===r||void 0===r?void 0:r.value)||32,height:l&&c?l.value:(null===r||void 0===r?void 0:r.value)||32}:{}),children:(0,V.jsx)(C.E,{image:a.thumbnailImage,objectFit:"contain",sizes:"100px",layout:"fill"})})}):null}))}):(0,V.jsx)(V.Fragment,{children:d.length>1?(0,V.jsx)("select",{onChange:function(t){var a,i=d.find((function(e){return e.variantValue.id===t.target.value}));i&&(null===(a=e.product)||void 0===a||a.selectVariantValue(i.variantValue,!0));n()},className:"min-w-[120px] border text-sm border-gray-300 rounded-md px-2 py-1 outline-none",children:d.map((function(e){var t=e.variantValue,n=e.hasStock,a=e.isSelected;e.variant;return(0,V.jsx)("option",{disabled:!n,selected:a,value:t.id,children:t.name})}))}):null})}),o.selectionType===se.C.COLOR||1===d.length&&(0,V.jsx)("div",{className:"text-xs mt-2",children:null===(i=e.product)||void 0===i||null===(s=i.selectedVariantValues.find((function(e){return e.variantTypeId===o.id})))||void 0===s?void 0:s.name})]})}))}),e.isQuantityEditable||1!==e.quantity?(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)("div",{children:[(0,V.jsxs)("div",{className:"flex justify-between",children:[(0,V.jsx)("div",{className:"flex items-center space-x-2",children:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("span",{className:"flex text-xs",children:[u("common:field.quantity"),":"]}),(0,V.jsx)("div",{className:"item product-quantity items-center justify-center !text-xs",children:e.isQuantityEditable?(0,V.jsxs)("div",{className:"flex space-x-2 border border-gray-300 rounded-md px-2 items-center py-1",children:[(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(k.pwh,{size:14,onClick:function(){var t,a=e.quantity-1;null!==(t=e.product)&&void 0!==t&&t.selectedVariant.hasStock&&(e.setQuantity(a),n())}})}),(0,V.jsx)("span",{className:"text-xs text-[#323334]",children:e.quantity}),(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(k.poH,{size:14,onClick:function(){var t,a,i,s,o=e.quantity+1;null===(t=e.product)||void 0===t||!t.selectedVariant.hasStock||(null===(a=e.product)||void 0===a||!a.selectedVariant.sellIfOutOfStock)&&(null===(i=e.product)||void 0===i?void 0:i.selectedVariant.stock)<10&&(null===(s=e.product)||void 0===s?void 0:s.selectedVariant.stock)<o||(e.setQuantity(o),n())}})})]}):e.quantity})]})}),(0,V.jsx)("div",{className:"text-sm",children:e.shouldDisplayPrice?(0,V.jsxs)("div",{className:"flex  space-x-2",children:[e.finalPriceWithQuantity!==e.sellPriceWithQuantity&&(0,V.jsx)("span",{className:"line-through text-gray-500",children:e.formattedSellPriceWithQuantity}),(0,V.jsx)("span",{children:e.formattedFinalPriceWithQuantity})]}):null})]}),!(null!==(y=e.product)&&void 0!==y&&y.selectedVariant.hasStock)&&(0,V.jsx)("span",{className:"flex text-xs text-gray-400 mt-1",children:u("common:stockOutOfStock")})]})}):null]})]})})}))})})})),de=n(8704),ue=(0,o.Pi)((function(e){var t,n,a,i,o,r,l,c,d,m=e.productDetail,p=e.offers,f=e.isOffersAddButtonOn,x=e.isProductOffersSelected,v=e.offerTitleColor,j=e.offerTitleFontSize,b=e.offerTitleFontWeight,N=e.offerDescriptionColor,T=e.offerDescriptionFontSize,I=e.offerDescriptionFontWeight,P=e.offerDiscountPercentageColor,B=e.offerDiscountPercentageBgColor,R=e.oldDesign,D=e.campaignOfferButtonBgColor,E=e.campaignOfferButtonTextColor,O=e.showOfferInfoText,A=e.campaignOfferTextsColor,F=(0,g.o)(),_=X.Z.getInstance(),z=(0,S.$)().t;s.useEffect((function(){m.offers&&x&&m.offers.map((function(e){return e.isSelected=!0}))}),[m.offers,x]);var L=(null===(t=m.offers)||void 0===t?void 0:t.filter((function(e){return!e.isAccepted})).reduce((function(e,t){return e+(t.isSelected?1:0)}),0))||0,H=!!m.selectedVariant.campaignOffersDiscountPercentage;return R?f?(0,V.jsxs)(V.Fragment,{children:[p.map((function(e,t){var n;return(0,V.jsxs)("div",{className:"flex border border-[#cbcbcb] pl-2 relative ".concat(t!==p.length-1?"mb-2":""," "),children:[e.isAccepted&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"absolute inset-0 bg-white z-10 flex items-center justify-center opacity-70"}),(0,V.jsx)("div",{className:"absolute inset-0 flex z-20 justify-center",children:(0,V.jsx)("span",{className:"flex bg-white top-[50%] -translate-y-1/2 absolute font-medium",children:z("common:offerAccepted")})})]}),(0,V.jsxs)("div",{className:"flex flex-1 items-center border-[#cbcbcb] border-r py-3",children:[(0,V.jsx)("div",{className:"flex mr-6",children:(0,V.jsxs)("label",{className:"switch",children:[(0,V.jsx)("input",{onChange:function(t){return e.isSelected=t.target.checked},type:"checkbox",checked:e.isSelected}),(0,V.jsx)("span",{className:"checkbox__slider checkbox__round"})]})}),(0,V.jsxs)("div",{className:"flex flex-col w-full",children:[(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{style:{color:"#383838"},className:"flex text-sm text-left",children:e.product.name})}),(0,V.jsxs)("div",{className:"flex mt-2 space-x-2",children:[e.product.selectedVariant.hasDiscount&&(0,V.jsx)("span",{className:"line-through",children:e.product.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{className:"font-semibold",children:e.product.selectedVariant.formattedFinalPrice})]}),(0,V.jsx)("div",{className:"mt-2",children:e.product.displayedVariantTypes.map((function(t,n){var a=t.variantType,i=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"",children:[(0,V.jsx)("div",{className:"mb-2 variant-type",children:a.name}),(0,V.jsx)("div",{className:"flex w-[100px]",children:(0,V.jsx)(me,{selectVariant:function(t){return e.product.selectVariantValue(t,!0)},value:e.product.selectedVariantValues.find((function(e){return e.variantTypeId===a.id})),displayedVariantValues:i})})]},n)}))})]})]}),(0,V.jsx)("div",{className:"relative w-[80px] h-[80px] self-center",children:(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{children:(null===(n=e.product.selectedVariant.mainImage)||void 0===n?void 0:n.image)&&(e.product.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[120px] h-[120px]",children:(0,V.jsx)("source",{src:e.product.selectedVariant.mainImage.image.src})},e.product.selectedVariant.mainImage.image.id)}):(0,V.jsx)(C.E,{sizes:"120px",layout:"fill",image:e.product.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[6px]"}))})})})]})})),!!O&&(0,V.jsxs)("div",{style:{color:A||"#383838"},className:"flex space-x-2 items-center mt-2",children:[(0,V.jsx)(k.Fs0,{size:22}),(0,V.jsx)("span",{className:"flex flex-1 text-sm font-medium",children:z("common:offerDescription")})]})]}):(0,V.jsx)("div",{className:"container mx-auto  px-4",children:(0,V.jsxs)("div",{style:{backgroundColor:"#f8f9fa"},className:"p-4 sm:p-4 md:p-8 lg:p-12",children:[(0,V.jsx)("span",{style:{color:"#383838"},className:"text-xl font-medium",children:z("common:offerTitle")}),(0,V.jsxs)("div",{className:"flex mt-6 items-center justify-start sm:justify-start md:justify-start lg:justify-center flex-col sm:flex-col md:flex-col lg:flex-row space-y-2 sm:space-y-2 md:space-y-2 lg:space-y-0 ".concat(p.length>3?"flex-wrap":""),children:[(0,V.jsxs)("div",{className:"product-offer-item-main flex flex-col bg-white offer-main-item",children:[(0,V.jsx)("div",{className:"".concat(null!==(n=m.selectedVariant.mainImage)&&void 0!==n&&null!==(a=n.image)&&void 0!==a&&a.isVideo?"relative w-[180px] h-[180px]":"relative w-[120px] h-[120px]"),children:(0,V.jsx)(w.Z,{passHref:!0,href:m.productHref,children:(0,V.jsx)("a",{children:(null===(i=m.selectedVariant.mainImage)||void 0===i?void 0:i.image)&&(m.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[180px] h-[180px]",children:(0,V.jsx)("source",{src:m.selectedVariant.mainImage.image.src})})}):(0,V.jsx)(C.E,{sizes:"120px",layout:"fill",image:m.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[6px]"}))})})}),(0,V.jsx)(w.Z,{passHref:!0,href:m.productHref,children:(0,V.jsx)("a",{style:{color:"#383838"},className:"flex mt-4 text-sm font-medium max-w-[180px] text-left",children:m.name})}),(0,V.jsx)("span",{className:"flex mt-4 font-semibold",children:m.selectedVariant.formattedFinalPrice})]}),p.map((function(e,t){var n,a,i;return(0,V.jsxs)("div",{className:"flex items-center space-x-6 ml-6 product-offer-items relative",children:[(0,V.jsx)("span",{className:"b-[#383838] border rounded-full flex items-center justify-center w-10 h-10 offer-plus-icon offer-plus-icon-".concat(t),children:(0,V.jsx)(k.poH,{color:"#b7b7b7",size:22})}),(0,V.jsxs)("div",{className:"product-offer-item-main flex flex-col bg-white relative",children:[e.isAccepted&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"absolute inset-0 bg-white z-10 flex items-center justify-center opacity-30"}),(0,V.jsx)("div",{className:"absolute inset-0 flex z-20 justify-center",children:(0,V.jsx)("span",{className:"flex bg-white top-[20%] absolute font-medium",children:z("common:offerAccepted")})})]}),(0,V.jsx)("div",{className:"".concat(null!==(n=e.product.selectedVariant.mainImage)&&void 0!==n&&null!==(a=n.image)&&void 0!==a&&a.isVideo?"relative w-[180px] h-[180px]":"relative w-[120px] h-[120px]"),children:(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{children:(null===(i=e.product.selectedVariant.mainImage)||void 0===i?void 0:i.image)&&(e.product.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[180px] h-[180px]",children:(0,V.jsx)("source",{src:e.product.selectedVariant.mainImage.image.src})},e.product.selectedVariant.mainImage.image.id)}):(0,V.jsx)(C.E,{sizes:"120px",layout:"fill",image:e.product.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[6px]"}))})})}),(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{style:{color:"#383838"},className:"flex mt-4 text-sm w-[180px] text-left",children:e.product.name})}),(0,V.jsx)("div",{className:"mt-2",children:e.product.displayedVariantTypes.map((function(t,n){var a=t.variantType,i=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"",children:[(0,V.jsx)("div",{className:"mb-2 variant-type",children:a.name}),(0,V.jsx)("div",{className:"flex w-[100px]",children:(0,V.jsx)(me,{selectVariant:function(t){return e.product.selectVariantValue(t,!0)},value:e.product.selectedVariantValues.find((function(e){return e.variantTypeId===a.id})),displayedVariantValues:i})})]},n)}))}),(0,V.jsxs)("div",{className:"flex mt-4 space-x-2",children:[e.product.selectedVariant.hasDiscount&&(0,V.jsx)("span",{className:"line-through",children:e.product.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{className:"font-semibold",children:e.product.selectedVariant.formattedFinalPrice})]}),(0,V.jsx)("div",{children:(0,V.jsx)("div",{className:"flex text-sm",children:(0,V.jsx)("div",{onClick:function(){e.isSelected=!e.isSelected},className:"option-checkbox cursor-pointer flex-none mt-1 border-[#797979] border",children:e.isSelected&&(0,V.jsx)("span",{className:"filter-type-list-check",children:(0,V.jsx)(de.vyQ,{size:18})})})})})]})]})})),(0,V.jsxs)("div",{className:"product-offer-item-main flex flex-col ml-10 bg-white max-w-[300px]",children:[(0,V.jsxs)("div",{style:{color:"#383838"},className:"flex space-x-2 items-center",children:[(0,V.jsx)(k.Fs0,{size:22}),(0,V.jsx)("span",{className:"flex flex-1 text-sm font-medium",children:z("common:offerDescription")})]}),(0,V.jsxs)("div",{className:"flex flex-col space-y-2 font-semibold mt-4 justify-center text-center",children:[(0,V.jsxs)("span",{children:[" ",z("common:totalPrice")]}),(0,V.jsx)("span",{children:m.selectedVariant.formattedFinalPriceWithCampaignOffers})]}),(0,V.jsx)("div",{className:"flex mt-2",children:(0,V.jsx)("button",{onClick:(0,u.Z)(h().mark((function e(){var t,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m.selectedVariant.hasStock){e.next=12;break}if(!(t=F.cartStore.findExistingItem(m.selectedVariant,m))){e.next=8;break}return e.next=5,F.cartStore.changeItemQuantity(t,t.quantity+1,m.offers);case 5:n=e.sent,e.next=11;break;case 8:return e.next=10,F.cartStore.addItem(m.selectedVariant,m);case 10:n=e.sent;case 11:n.success&&_.setCartVisible(!0);case 12:case"end":return e.stop()}}),e)}))),style:{backgroundColor:D||"#000",color:E||"#fff"},className:"px-4 py-2 text-sm font-medium",children:"".concat(z("common:addCartTogether")," (").concat(1+L,")")})})]})]})]})}):f?(0,V.jsx)(V.Fragment,{children:(0,V.jsxs)("div",{className:"add-button-product-offer-container",children:[(0,V.jsxs)("div",{className:"flex flex-col space-y-2",children:[(0,V.jsx)("div",{style:{color:v||"#151b1c",fontSize:(null===j||void 0===j?void 0:j.value)||24,fontWeight:(null===b||void 0===b?void 0:b.value)||500},className:"add-button-offer-title",children:null===(o=m.appliedCampaignOffer)||void 0===o?void 0:o.title}),(0,V.jsx)("span",{style:{color:N||"#151b1c",fontSize:(null===T||void 0===T?void 0:T.value)||14,fontWeight:(null===I||void 0===I?void 0:I.value)||400},className:"add-button-offer-description",children:null===(r=m.appliedCampaignOffer)||void 0===r?void 0:r.description})]}),(0,V.jsx)("div",{className:"flex mt-4 flex-col space-y-4",children:p.map((function(e,t){var n;return(0,V.jsxs)("div",{className:"offer-product-container with-bg relative add-buttton-offer-product-container ".concat(e.isAccepted?"accepted":""),children:[e.isAccepted&&(0,V.jsxs)("div",{className:"product-offer-accepted-container flex space-x-1",children:[(0,V.jsx)("span",{children:(0,V.jsx)(y.ffJ,{size:16})}),(0,V.jsx)("span",{children:z("common:offerAccepted")})]}),(0,V.jsxs)("div",{className:"flex space-x-6 w-full",children:[(0,V.jsx)("div",{className:"relative w-[80px] h-[80px] add-button-offer-product-image-container",children:(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{children:(null===(n=e.product.selectedVariant.mainImage)||void 0===n?void 0:n.image)&&(e.product.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[80px] h-[80px]",children:(0,V.jsx)("source",{src:e.product.selectedVariant.mainImage.image.src})},e.product.selectedVariant.mainImage.image.id)}):(0,V.jsx)(C.E,{sizes:"180px",layout:"fill",image:e.product.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[8px]"}))})})}),(0,V.jsxs)("div",{className:"flex flex-col space-y-3 flex-1",children:[(0,V.jsxs)("div",{className:"flex justify-between",children:[(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{className:"flex offer-product-name max-w-[180px] text-left",children:e.product.name})}),(0,V.jsx)("div",{children:(0,V.jsxs)("label",{className:"switch",children:[(0,V.jsx)("input",{onChange:function(t){e.isAccepted||(e.isSelected=t.target.checked)},type:"checkbox",checked:e.isSelected||e.isAccepted}),(0,V.jsx)("span",{className:"checkbox__slider checkbox__round"})]})})]}),e.product.selectedVariant.hasDiscount&&(0,V.jsxs)("span",{style:{color:P||"#fff",backgroundColor:B||"#ef103e"},className:"product-offer-discount",children:["%",e.product.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex space-x-2",children:[e.product.selectedVariant.hasDiscount&&(0,V.jsx)("span",{className:"product-offer-discount-price",children:e.product.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{className:"product-offer-final-price",children:e.product.selectedVariant.formattedFinalPrice})]}),(0,V.jsx)("div",{className:"flex gap-x-2 gap-y-2 flex-wrap",children:e.product.displayedVariantTypes.map((function(t,n){var a=t.variantType,i=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"",children:[(0,V.jsx)("div",{className:"mb-2 variant-type",children:a.name}),(0,V.jsx)("div",{className:"flex w-[100px]",children:(0,V.jsx)(me,{selectVariant:function(t){return e.product.selectVariantValue(t,!0)},value:e.product.selectedVariantValues.find((function(e){return e.variantTypeId===a.id})),displayedVariantValues:i})})]},n)}))})]})]})]})}))}),(0,V.jsxs)("div",{className:"mt-6 flex flex-col",children:[(0,V.jsxs)("div",{style:A?{color:A}:{},className:"flex space-x-1 offer-summary-info ",children:[(0,V.jsx)(k.Fs0,{size:22}),(0,V.jsx)("span",{className:"flex flex-1",children:z("common:offerDescription")})]}),(0,V.jsxs)("div",{className:"mt-4 flex flex-col",children:[(0,V.jsx)("span",{style:{color:A||"#151b1c"},className:"flex font-medium",children:z(H?"common:field.advantageousTotal":"common:field.total")}),(0,V.jsxs)("div",{className:"mt-2 flex justify-between",children:[H&&(0,V.jsxs)("span",{style:{color:P||"#fff",backgroundColor:B||"#ef103e"},className:"product-offer-discount",children:["%",m.selectedVariant.campaignOffersDiscountPercentage]}),(0,V.jsxs)("div",{className:"flex space-x-2",children:[H&&(0,V.jsx)("span",{style:A?{color:A}:{},className:"product-offer-discount-price !text-base",children:m.selectedVariant.formattedSellPriceWithCampaignOffers}),(0,V.jsx)("span",{style:A?{color:A}:{},className:"product-offer-final-price !text-base",children:m.selectedVariant.formattedFinalPriceWithCampaignOffers})]})]})]})]})]})}):(0,V.jsxs)("div",{className:"container mx-auto  px-4",children:[(0,V.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,V.jsx)("div",{style:{color:v||"#151b1c",fontSize:(null===j||void 0===j?void 0:j.value)||24,fontWeight:(null===b||void 0===b?void 0:b.value)||500},className:"offer-title",children:null===(l=m.appliedCampaignOffer)||void 0===l?void 0:l.title}),(0,V.jsx)("span",{style:{color:N||"#151b1c",fontSize:(null===T||void 0===T?void 0:T.value)||14,fontWeight:(null===I||void 0===I?void 0:I.value)||400},className:"offer-description",children:null===(c=m.appliedCampaignOffer)||void 0===c?void 0:c.description})]}),(0,V.jsx)("div",{className:"mt-6",children:(0,V.jsxs)("div",{className:"grid grid-cols-12 gap-6",children:[(0,V.jsx)("div",{className:"col-span-12 sm:col-span-12 md:col-span-8 lg:col-span-8 grid",children:(0,V.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-2 gap-6",children:[(0,V.jsx)("div",{className:"offer-product-container",children:(0,V.jsxs)("div",{className:"flex space-x-6",children:[(0,V.jsx)("div",{className:"relative w-[140px] h-[140px] offer-product-image-container",children:(0,V.jsx)(w.Z,{passHref:!0,href:m.productHref,children:(0,V.jsx)("a",{children:(null===(d=m.selectedVariant.mainImage)||void 0===d?void 0:d.image)&&(m.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[140px] h-[140px]",children:(0,V.jsx)("source",{src:m.selectedVariant.mainImage.image.src})})}):(0,V.jsx)(C.E,{sizes:"180px",layout:"fill",image:m.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[8px]"}))})})}),(0,V.jsxs)("div",{className:"flex flex-col space-y-3",children:[(0,V.jsx)(w.Z,{passHref:!0,href:m.productHref,children:(0,V.jsx)("a",{className:"flex offer-product-name max-w-[180px] text-left",children:m.name})}),m.selectedVariant.hasDiscount&&(0,V.jsxs)("span",{style:{color:P||"#fff",backgroundColor:B||"#ef103e"},className:"product-offer-discount",children:["%",m.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex space-x-2",children:[m.selectedVariant.hasDiscount&&(0,V.jsx)("span",{className:"product-offer-discount-price",children:m.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{className:"product-offer-final-price",children:m.selectedVariant.formattedFinalPrice})]})]})]})}),p.map((function(e,t){var n;return(0,V.jsxs)("div",{className:"offer-product-container with-bg relative ".concat(e.isAccepted?"accepted":""),children:[e.isAccepted&&(0,V.jsxs)("div",{className:"product-offer-accepted-container flex space-x-1",children:[(0,V.jsx)("span",{children:(0,V.jsx)(y.ffJ,{size:16})}),(0,V.jsx)("span",{children:z("common:offerAccepted")})]}),(0,V.jsxs)("div",{className:"flex space-x-6 w-full",children:[(0,V.jsx)("div",{className:"relative w-[140px] h-[140px] offer-product-image-container",children:(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{children:(null===(n=e.product.selectedVariant.mainImage)||void 0===n?void 0:n.image)&&(e.product.selectedVariant.mainImage.image.isVideo?(0,V.jsx)("div",{children:(0,V.jsx)("video",{controls:!1,autoPlay:!0,loop:!0,muted:!0,playsInline:!0,className:"relative w-[140px] h-[140px]",children:(0,V.jsx)("source",{src:e.product.selectedVariant.mainImage.image.src})},e.product.selectedVariant.mainImage.image.id)}):(0,V.jsx)(C.E,{sizes:"180px",layout:"fill",image:e.product.selectedVariant.mainImage.image,objectFit:"contain",className:"rounded-[8px]"}))})})}),(0,V.jsxs)("div",{className:"flex flex-col space-y-3 flex-1",children:[(0,V.jsxs)("div",{className:"flex justify-between",children:[(0,V.jsx)(w.Z,{passHref:!0,href:e.product.productHref,children:(0,V.jsx)("a",{className:"flex offer-product-name max-w-[180px] text-left",children:e.product.name})}),(0,V.jsx)("div",{children:(0,V.jsxs)("label",{className:"switch",children:[(0,V.jsx)("input",{onChange:function(t){e.isAccepted||(e.isSelected=t.target.checked)},type:"checkbox",checked:e.isSelected||e.isAccepted}),(0,V.jsx)("span",{className:"checkbox__slider checkbox__round"})]})})]}),e.product.selectedVariant.hasDiscount&&(0,V.jsxs)("span",{style:{color:P||"#fff",backgroundColor:B||"#ef103e"},className:"product-offer-discount",children:["%",e.product.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex space-x-2",children:[e.product.selectedVariant.hasDiscount&&(0,V.jsx)("span",{className:"product-offer-discount-price",children:e.product.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{className:"product-offer-final-price",children:e.product.selectedVariant.formattedFinalPrice})]}),(0,V.jsx)("div",{className:"flex gap-x-2 gap-y-2 flex-wrap",children:e.product.displayedVariantTypes.map((function(t,n){var a=t.variantType,i=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"",children:[(0,V.jsx)("div",{className:"mb-2 variant-type",children:a.name}),(0,V.jsx)("div",{className:"flex w-[100px]",children:(0,V.jsx)(me,{selectVariant:function(t){return e.product.selectVariantValue(t,!0)},value:e.product.selectedVariantValues.find((function(e){return e.variantTypeId===a.id})),displayedVariantValues:i})})]},n)}))})]})]})]})}))]})}),(0,V.jsxs)("div",{className:"col-span-12 sm:col-span-12 md:col-span-4 lg:col-span-4 grid relative",children:[(0,V.jsxs)("div",{className:"offer-summary-box flex flex-col",children:[(0,V.jsxs)("div",{style:A?{color:A}:{},className:"flex space-x-1 offer-summary-info ",children:[(0,V.jsx)(k.Fs0,{size:22}),(0,V.jsx)("span",{className:"flex flex-1",children:z("common:offerDescription")})]}),(0,V.jsxs)("div",{className:"mt-4 flex flex-col",children:[(0,V.jsx)("span",{style:A?{color:A}:{},className:"flex font-medium text-[#151b1c]",children:z(H?"common:field.advantageousTotal":"common:field.total")}),(0,V.jsxs)("div",{className:"mt-2 flex justify-between",children:[H&&(0,V.jsxs)("span",{style:{color:P||"#fff",backgroundColor:B||"#ef103e"},className:"product-offer-discount",children:["%",m.selectedVariant.campaignOffersDiscountPercentage]}),(0,V.jsxs)("div",{className:"flex space-x-2",children:[H&&(0,V.jsx)("span",{style:A?{color:A}:{},className:"product-offer-discount-price !text-base",children:m.selectedVariant.formattedSellPriceWithCampaignOffers}),(0,V.jsx)("span",{style:A?{color:A}:{},className:"product-offer-final-price !text-base",children:m.selectedVariant.formattedFinalPriceWithCampaignOffers})]})]})]})]}),(0,V.jsx)("div",{className:"flex absolute bottom-6 product-offer-add-button left-6",children:(0,V.jsx)("button",{onClick:(0,u.Z)(h().mark((function e(){var t,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!m.selectedVariant.hasStock){e.next=12;break}if(!(t=F.cartStore.findExistingItem(m.selectedVariant,m))){e.next=8;break}return e.next=5,F.cartStore.changeItemQuantity(t,t.quantity+1,m.offers);case 5:n=e.sent,e.next=11;break;case 8:return e.next=10,F.cartStore.addItem(m.selectedVariant,m);case 10:n=e.sent;case 11:n.success&&_.setCartVisible(!0);case 12:case"end":return e.stop()}}),e)}))),style:{backgroundColor:D||"#000",color:E||"#fff"},className:"px-4 py-3 text-sm font-medium w-full",children:"".concat(z("common:addCartTogether")," (").concat(1+L,")")})})]})]})})]})})),me=function(e){var t=e.displayedVariantValues,n=e.selectVariant,a=e.value,i=e.isHideNoStockVariant;return(0,V.jsxs)("div",{className:"relative w-full product-offer-select-main",children:[(0,V.jsx)("span",{className:"select-arrow product-offer-select-arrow",children:(0,V.jsx)(F.Ix0,{size:20})}),(0,V.jsx)("select",{value:null===a||void 0===a?void 0:a.id,name:"product-detail-select-variant-type",className:"product-detail-select-variant-type product-offer-select !h-9 text-sm !px-2 !py-1",onChange:function(e){var a=t.find((function(t){return t.variantValue.id===e.target.value}));a&&n(a.variantValue)},children:t.map((function(e){var t=e.variantValue,n=e.hasStock,a=e.isSelected;return i&&!n?null:(0,V.jsx)("option",{disabled:!n,selected:a,value:t.id,children:t.name})}))})]})},pe=(0,o.Pi)((function(e){e.productDetail;var t=e.lengthOptionsModel,n=(0,S.$)().t;return(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsx)("label",{className:"mb-2 variant-type",children:n("common:chooseLength")}),(0,V.jsxs)("div",{className:"flex flex-wrap",children:[t.options.map((function(e,n){return(0,V.jsx)("div",{onClick:function(){return t.selectOption(e)},className:"length-options ".concat(t.isOpenFreeInput||t.freeInputValue!==e.value?"":"is-selected"),children:e.label},n)})),(0,V.jsx)("div",{onClick:function(){t.isOpenFreeInput||t.onClickFreeInput()},className:"length-options ".concat(t.isOpenFreeInput?"is-free-text":"","\n          ").concat(t.isOpenFreeInput?"is-selected":"","\n            "),children:t.isOpenFreeInput?(0,V.jsxs)("div",{className:"lenght-free-input-container",children:[(0,V.jsx)("input",{type:"number",step:"0.1",min:"0.5",max:"1000",value:t.freeInputValue,onChange:t.onChangeFreeInput,ref:t.inputRef}),(0,V.jsx)("span",{className:"length-unit",children:n("common:metre")})]}):n("common:freeInput")}),t.hasError&&(0,V.jsx)("div",{className:"length-error-message text-red-600 text-sm",children:n("common:lengthError",{step:t.STEP,min:t.MIN_LENGTH,max:t.MAX_LENGTH})})]})]})})),he=n(25197),fe=n(80100),xe=n(19042),ge=n(96825);function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var be=K()((function(){return Promise.resolve().then(n.bind(n,67901))}),{loadableGenerated:{webpack:function(){return[67901]}}}),ye=(0,o.Pi)((function(e){var t,n,a,i,o,r,l,c,d,p,f,N,B=e.productDetail,R=e.text1,D=e.text3,E=e.image1,O=e.image2,U=e.image3,G=e.text2,q=e.isProductDetailBottom,Q=e.productNameColor,J=e.productPriceColor,Y=e.attributes,K=e.showQuantityBox,se=e.isBrandShow,oe=e.isBigBrandName,re=e.descriptionText,le=e.descriptionSize,de=e.isDescriptionTextDecorationUnderline,me=e.isDescriptionTextFontBold,ve=e.isBuyNowButton,ye=e.buyNowButtonBgColor,Ne=e.buyNowButtonTextColor,Ce=(e.thumbnailPosition,e.descriptionBgIsGray),we=e.isShowMoreButton,ke=e.isChoicesNameShow,Se=e.isWpButtonShow,Te=e.wpButtonBorderColor,Ve=e.wpButtonTextColor,Ie=e.wpButtonPhoneNumber,Pe=e.wpMessageText,Be=e.isWpEndMessageUrl,Re=e.componentRenderer,De=e.isSkuHide,Ee=e.imageAspectRatio,Oe=e.isColorVariantValueFirstImage,Ae=e.isChoiceVariantValueFirstImage,Fe=e.isScrollVariantOptions,_e=e.isAddBasketButtonMobileSticky,ze=e.addBasketButtonBorderColor,Le=e.showShippingPolicy,He=e.shippingDescriptionText,Me=e.shippingPageLink,Ze=e.shippingPolicyTextColor,We=e.shippingPolicyLinkedText,Ue=e.imageSize,Ge=e.showRating,qe=e.whenHoveredVariantNameShow,Qe=e.isVariantDesingRaunded,Je=e.shippingInfo,$e=e.shippingInfoDescription,Ye=e.shippingInfoIfSellOutOfStockDescription,Ke=e.priceFontWeight,Xe=e.numberToCutDescription,et=e.isNumberToCutDescription,tt=e.discountRatioBg,nt=e.discountRatioColor,at=e.zoomPixel,it=e.unitTextFontSize,st=e.brandFontSize,ot=e.productNameFontSize,rt=e.priceFontSize,lt=e.discountPriceFontSize,ct=e.discountRateFontSize,dt=e.textColor,ut=(e.arrowBgColor,e.descriptionBgColor),mt=e.descriptionTitleIconColor,pt=e.hideAddButton,ht=e.hidePrice,ft=e.specialAttrText,xt=e.specialAttrTextBgColor,gt=e.specialAttrTextColor,vt=e.productSkuColor,jt=e.buttonBorderRadius,bt=e.isHideNoStockVariant,yt=e.componentIsUnderButton,Nt=e.showStockCount,Ct=e.showProductBarcode,wt=e.isAlignImageTextCenter,kt=e.ratingOnAddBasket,St=e.brandFontWeight,Tt=e.productFontWeight,Vt=e.customModalAttr,It=e.showRunningOutText,Pt=e.runningOutStockCount,Bt=e.specialAttrFontSize,Rt=e.featuresBgColor,Dt=e.featuresPadding,Et=e.isBottomTabOnlySpeacilAttr,Ot=e.isQuantityBoxDropdown,At=e.hideDiscountPercentage,Ft=e.isChoiceVariantsDropdown,_t=e.isColorVariantsDropdown,zt=e.modelName,Lt=e.showText,Ht=e.hideBasketDrawer,Mt=e.shareTgButton,Zt=e.shareWpButton,Wt=e.shareButtonsTextColor,Ut=e.shareButtonsIconsColor,Gt=e.brandHTagLevel,qt=e.variantHeight,Qt=e.isBundleFurniture,Jt=e.isEditableItem,$t=e.isBrandNamePTag,Yt=e.isFirstGroupImage,Kt=e.runningOutColor,Xt=e.hideFavoriteIcon,en=e.isInnerMagnify,tn=e.isOffersAddButtonOn,nn=e.isSpecialAttrTabClickStack,an=e.notUnderlineLink,sn=e.productTabsArrowDesign,on=e.bundleProductWithoutLink,rn=e.isProductOffersSelected,ln=e.discountPriceTextColor,cn=e.isLoadingBundle,dn=e.offerTitleColor,un=e.offerTitleFontSize,mn=e.offerTitleFontWeight,pn=e.offerDescriptionColor,hn=e.offerDescriptionFontSize,fn=e.offerDescriptionFontWeight,xn=e.offerDiscountPercentageColor,gn=e.offerDiscountPercentageBgColor,vn=e.oldDesign,jn=e.quantityBoxBgColor,bn=e.quantityBoxTextColor,yn=e.removeBundleImageBg,Nn=e.hideVariantTypeName,Cn=e.productOptionSelectSwatchIsScroll,wn=e.campaignOfferButtonBgColor,kn=e.campaignOfferButtonTextColor,Sn=e.addButtonAnimationBgColor,Tn=e.addButtonAnimationTextColor,Vn=e.brandWithoutLink,In=e.shareCopyButton,Pn=e.smallVariantImageMobile,Bn=e.hideBundleComponent,Rn=e.priceUnderSpecialAttr,Dn=e.showPriceUnderSpecialAttr,En=e.showOfferInfoText,On=e.customWpLink,An=e.isCloseProductDescription,Fn=e.wpButtonBgColor,_n=e.productGroupVariantBgColor,zn=e.productGroupVariantTextColor,Ln=e.dropdownVariantBorderRadius,Hn=e.starRatedColor,Mn=e.variantHeightColor,Zn=e.variantHeightColorMobile,Wn=e.isBrandUnderProductName,Un=e.isRunningOutShowBorder,Gn=e.runningOutBorderColor,qn=e.runningOutBgColor,Qn=e.discountPriceBorderRadius,Jn=e.condPriceHide,$n=e.isVariantDesingRaundedIsShowImage,Yn=e.shareFbButton,Kn=e.variantNameFontWeight,Xn=e.favoriteHearthColor,ea=e.isOpenAllTabs,ta=e.firstGroupImageWidth,na=e.hideUnitPrice,aa=e.variantNamesFontWeight,ia=e.addBasketButtonFontWeight,sa=e.colorVariantsFirstImageAspectRatio,oa=e.onlyShowGroupNames,ra=e.campaignOfferTextsColor,la=e.buyNowButtonHoverBgColor,ca=e.buyNowButtonHoverTextColor,da=e.isAddButtonOnBundle,ua=e.showOnlyColorVariantsName,ma=e.hideColorVariantName,pa=e.showTieredDiscountProducts,ha=e.tieredDiscountProductTextColor,fa=e.tieredDiscountProductBgColor,xa=e.tieredDiscountProductCheckColor,ga=e.tieredDiscountButtonBgColor,va=e.tieredDiscountButtonText,ja=e.tieredDiscountButtonTextColor,ba=e.bundleMainImageSize,ya=e.showBuyNowButtonForce,Na=e.productCodeFontWeight,Ca=(0,x.useRouter)(),wa=(0,S.$)().t,ka=(0,g.o)(),Sa=X.Z.getInstance(),Ta=s.useState(1),Va=(0,m.Z)(Ta,2),Ia=Va[0],Pa=Va[1],Ba=s.useState(!1),Ra=(0,m.Z)(Ba,2),Da=Ra[0],Ea=Ra[1],Oa=s.useState(!1),Aa=(0,m.Z)(Oa,2),Fa=Aa[0],_a=Aa[1],za=B.selectedVariant.hasStock,La=s.useState(!1),Ha=(0,m.Z)(La,2),Ma=Ha[0],Za=Ha[1],Wa=s.useState(null),Ua=(0,m.Z)(Wa,2),Ga=Ua[0],qa=Ua[1],Qa=s.useState(!1),Ja=(0,m.Z)(Qa,2),$a=Ja[0],Ya=Ja[1],Ka=(0,he.Z)({tags:B.tags}),Xa=s.useState(!1),ei=(0,m.Z)(Xa,2),ti=ei[0],ni=ei[1],ai=s.useRef(null),ii=(0,ge.Z)(W.tq),si=(0,m.Z)(ii,1)[0],oi=s.useState(!1),ri=(0,m.Z)(oi,2),li=ri[0],ci=ri[1],di=s.useState(!1),ui=(0,m.Z)(di,2),mi=ui[0],pi=ui[1],hi=s.useState(!1),fi=(0,m.Z)(hi,2),xi=fi[0],gi=fi[1],vi=s.useState([1,2,3,4,5,6,7,8,9,"+10"]),ji=(0,m.Z)(vi,2),bi=ji[0],yi=ji[1],Ni=s.useState(""),Ci=(0,m.Z)(Ni,2),wi=Ci[0],ki=Ci[1],Si=s.useState(Ot),Ti=(0,m.Z)(Si,2),Vi=Ti[0],Ii=Ti[1],Pi=fe.Y.getSalesChannelId(),Bi=null===(t=B.salesChannels)||void 0===t?void 0:t.find((function(e){return e.id===Pi})),Ri=s.useState(""),Di=(0,m.Z)(Ri,2),Ei=Di[0],Oi=Di[1],Ai=s.useState(""),Fi=(0,m.Z)(Ai,2),_i=Fi[0],zi=Fi[1],Li=s.useState(!1),Hi=(0,m.Z)(Li,2),Mi=Hi[0],Zi=Hi[1],Wi=Ca.query&&(null===(n=Ca.query)||void 0===n?void 0:n.editLineID);s.useEffect((function(){Zi(!!Jt)}),[Jt]);var Ui=s.useRef(null),Gi=(0,ae.Z)(!!ht,!!pt),qi=(0,m.Z)(Gi,3),Qi=(qi[0],qi[1]),Ji=qi[2],$i=Sa.b2bSettings,Yi=$i.isOnlyCustomersShowText,Ki=$i.onlyCustomersText,Xi=$i.underlineText,es=$i.onlyCustomerTextFontSize,ts=$i.onlyCustomerTextFontWeight,ns=$i.onlyCustomerTextTextColor,as=$i.onlyCustomerTextBgColor,is=$i.onlyCustomerTextBorderColor,ss=$i.onlyCustomerTextIsCenter,os=$i.onlyCustomerTextButtonWidth,rs=s.useState(0),ls=(0,m.Z)(rs,2),cs=ls[0],ds=ls[1],us=(null===Vt||void 0===Vt||null===(a=Vt.specialAttr)||void 0===a?void 0:a.values)&&(null===Vt||void 0===Vt||null===(i=Vt.specialAttr)||void 0===i?void 0:i.values.length)>0&&(null===Vt||void 0===Vt||null===(o=Vt.specialAttr)||void 0===o||null===(r=o.values[0].productAttribute)||void 0===r?void 0:r.type)===v.T.IMAGE&&Vt.specialAttr.values[0].images&&Vt.specialAttr.values[0].images.length>0&&Vt.specialAttr.values[0].images,ms=(null===Vt||void 0===Vt?void 0:Vt.isHtml)&&(null===Vt||void 0===Vt||null===(l=Vt.specialAttr)||void 0===l?void 0:l.values)&&(null===Vt||void 0===Vt||null===(c=Vt.specialAttr)||void 0===c?void 0:c.values.length)>0&&(null===Vt||void 0===Vt||null===(d=Vt.specialAttr)||void 0===d||null===(p=d.values[0].productAttribute)||void 0===p?void 0:p.type)===v.T.HTML&&Vt.specialAttr.values[0].value,ps=null!==zt&&void 0!==zt&&zt.values.length?zt.values[0].value:null;(0,z.ZP)(Ui,(function(){xi&&hs()}));var hs=function(){document.documentElement.style.overflow="unset",gi(!1)},fs=!!Mt||!!Zt||!!In||!!Yn,xs=(0,ee.Z)({tags:B.tags,options:null===(f=B.productOptionSet)||void 0===f?void 0:f.displayedOptions}),gs=(0,ne.Z)({tags:B.tags,options:null===(N=B.productOptionSet)||void 0===N?void 0:N.displayedOptions}),vs=0!==B.selectedVariant.stock&&!!Je&&!!$e,js=0===B.selectedVariant.stock&&!!Je&&!!Ye&&B.selectedVariant.sellIfOutOfStock,bs=function({threshold:e,delay:t,trackVisibility:n,rootMargin:a,root:i,triggerOnce:o,skip:r,initialInView:l,fallbackInView:c,onChange:d}={}){var u;const[m,p]=s.useState(null),h=s.useRef(),[f,x]=s.useState({inView:!!l,entry:void 0});h.current=d,s.useEffect((()=>{if(r||!m)return;let s;return s=$(m,((e,t)=>{x({inView:e,entry:t}),h.current&&h.current(e,t),t.isIntersecting&&o&&s&&(s(),s=void 0)}),{root:i,rootMargin:a,threshold:e,trackVisibility:n,delay:t},c),()=>{s&&s()}}),[Array.isArray(e)?e.toString():e,m,i,a,o,r,n,c,t]);const g=null==(u=f.entry)?void 0:u.target;s.useEffect((()=>{m||!g||o||r||x({inView:!!l,entry:void 0})}),[m,g,o,r,l]);const v=[p,f.inView,f.entry];return v.ref=v[0],v.inView=v[1],v.entry=v[2],v}({threshold:0}),ys=bs.ref,Ns=bs.inView;s.useEffect((function(){var e,t=null!==(e=null===Bi||void 0===Bi?void 0:Bi.minQuantityPerCart)&&void 0!==e?e:1;Ii(!(t>10)&&Ot)}),[Ot]),s.useEffect((function(){ka.customerStore.customer&&ks(),Za(!1)}),[B,ka.customerStore.customer]);var Cs=function(){var e=(0,u.Z)(h().mark((function e(t){var n,a,i,s,o;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!xs.useFormat||xs.isAddToCartEnabled()){e.next=2;break}return e.abrupt("return");case 2:if(!gs.useFormat||gs.isAddToCartEnabled()){e.next=4;break}return e.abrupt("return");case 4:if(a=Ia||1,!Ka.hasLengthFormat){e.next=12;break}if(void 0===(i=Ka.getProductQuantity())){e.next=11;break}a=i,e.next=12;break;case 11:return e.abrupt("return");case 12:if(xs.useFormat&&(a=xs.width*xs.length),gs.useFormat&&(a=gs.width*gs.length/10),pi(!0),B.isAddToCartEnabled){e.next=18;break}return _.Am.error(wa("common:errorAddCart"),{autoClose:4e3,position:"top-right",hideProgressBar:!1,closeOnClick:!0,className:"custom-toast-success",pauseOnHover:!1,draggable:!1,progress:void 0}),e.abrupt("return");case 18:if(ci(!0),ki(wa("common:adding")),setTimeout((function(){ki((0,V.jsx)(F.HhX,{size:25}))}),300),!tn&&(null===(n=B.offers)||void 0===n||n.map((function(e){return e.isSelected=!1}))),!(s=ka.cartStore.findExistingItem(B.selectedVariant,B))||Wi){e.next=29;break}return e.next=26,ka.cartStore.changeItemQuantity(s,s.quantity+a,B.offers);case 26:o=e.sent,e.next=32;break;case 29:return e.next=31,ka.cartStore.addItem(B.selectedVariant,B,a);case 31:o=e.sent;case 32:o.success?(Ss(),t||Ht||Sa.setCartVisible(!0),Ea(!Da),pi(!1),t&&Ca.push(ka.cartStore.checkoutUrl||""),xs.useFormat&&xs.clear(),Ka.hasLengthFormat&&Ka.clear()):(0,z.Le)(o.response),setTimeout((function(){ci(!1)}),1e3);case 34:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ws=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Fa){e.next=5;break}return e.next=3,ka.customerStore.addProductToFavorites(B.id);case 3:e.next=7;break;case 5:return e.next=7,ka.customerStore.removeProductFromFavorites(B.id);case 7:ks();case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ks=function(){var e=(0,u.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ka.customerStore.isProductFavorite(B.id);case 2:t=e.sent,_a(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();s.useEffect((function(){Oi(encodeURIComponent(window.location.href)),zi(window.location.href)}),[B,B.selectedVariant,Ca]),s.useEffect((function(){qa(null),ni(!1),Vs(),pi(!1),Ss()}),[B]);var Ss=function(){var e,t=null!==(e=null===Bi||void 0===Bi?void 0:Bi.minQuantityPerCart)&&void 0!==e?e:1;"number"===typeof t&&Pa(t),Ts()},Ts=function(){var e=null===Bi||void 0===Bi?void 0:Bi.minQuantityPerCart,t=null===Bi||void 0===Bi?void 0:Bi.maxQuantityPerCart;"number"===typeof e&&yi((function(t){return t.filter((function(t){return t>=e}))})),"number"===typeof t&&yi((function(e){return e.filter((function(e){return e<=t}))}))},Vs=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:ni(!0);try{qa({averageStar:B.averageRating,totalReview:B.reviewCount})}catch(t){console.log("error",t)}finally{ni(!1)}case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Is=function(e){(0,P._1)({customUI:function(t){var n=t.onClose;return(0,V.jsx)("div",{className:"favorite-modal relative",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:n,className:"absolute top-2 right-2 text-gray-600 cursor-pointer hover:text-gray-900 modal-close-button-product",children:(0,V.jsx)(F.FU5,{size:25})}),(0,V.jsx)(A,{description:e,onClose:n,router:Ca})]})})}})},Ps=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Ma){e.next=16;break}if(!B.selectedVariant.isBackInStockCustomerLoginRequired){e.next=13;break}if(!ka.customerStore.customer||!ka.customerStore.customer.email){e.next=10;break}return e.next=5,B.selectedVariant.saveBackInStockReminder(ka.customerStore.customer.email);case 5:e.sent,Za(!0),_.Am.success(wa("product-detail:successBackStock"),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0}),e.next=11;break;case 10:Is(wa("common:backInStockLoginRequired"));case 11:e.next=14;break;case 13:Bs();case 14:e.next=17;break;case 16:_.Am.info(wa("product-detail:infoBackStock"),{position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0});case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Bs=function(){(0,P._1)({customUI:function(e){var t=e.onClose;return(0,V.jsx)("div",{className:"favorite-modal relative",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:t,className:"absolute top-2 right-2 text-gray-600 cursor-pointer hover:text-gray-900 modal-close-button-product",children:(0,V.jsx)(F.FU5,{size:25})}),(0,V.jsx)(L,{onSaveEmail:function(){var e=(0,u.Z)(h().mark((function e(n){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B.selectedVariant.saveBackInStockReminder(n);case 2:t(),Za(!0),_.Am.success(wa("product-detail:successBackStock"),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})]})})}})},Rs=fe.Y.getCurrentLocale(),Ds=function(){var e,t,n,a,i,s,o,r,l,c,d,u,m,p,h,f,x,g;if($t)return(0,V.jsx)("p",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(x=B.brand)||void 0===x?void 0:x.name:null===(g=B.brand)||void 0===g?void 0:g.name.toLocaleUpperCase(Rs)});var v=(0,V.jsx)("h2",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(e=B.brand)||void 0===e?void 0:e.name:null===(t=B.brand)||void 0===t?void 0:t.name.toLocaleUpperCase(Rs)});switch(Gt){case H._p.h1:v=(0,V.jsx)("h1",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(n=B.brand)||void 0===n?void 0:n.name:null===(a=B.brand)||void 0===a?void 0:a.name.toLocaleUpperCase(Rs)});break;case H._p.h2:v=(0,V.jsx)("h2",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(i=B.brand)||void 0===i?void 0:i.name:null===(s=B.brand)||void 0===s?void 0:s.name.toLocaleUpperCase(Rs)});break;case H._p.h3:v=(0,V.jsx)("h3",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(o=B.brand)||void 0===o?void 0:o.name:null===(r=B.brand)||void 0===r?void 0:r.name.toLocaleUpperCase(Rs)});break;case H._p.h4:v=(0,V.jsx)("h4",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(l=B.brand)||void 0===l?void 0:l.name:null===(c=B.brand)||void 0===c?void 0:c.name.toLocaleUpperCase(Rs)});break;case H._p.h5:v=(0,V.jsx)("h5",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(d=B.brand)||void 0===d?void 0:d.name:null===(u=B.brand)||void 0===u?void 0:u.name.toLocaleUpperCase(Rs)});break;case H._p.h6:v=(0,V.jsx)("h6",{style:{color:Q||"#000",fontSize:st?st.value:16,fontWeight:St?St.value:800},className:"brand-name",children:oe?null===(m=B.brand)||void 0===m?void 0:m.name:null===(p=B.brand)||void 0===p?void 0:p.name.toLocaleUpperCase(Rs)});break;default:st&&st.value,St&&St.value,oe?null===(h=B.brand)||void 0===h||h.name:null===(f=B.brand)||void 0===f||f.name.toLocaleUpperCase(Rs)}return v},Es=function(){var e=(null===ta||void 0===ta?void 0:ta.value)||100;if(!Ee)return{width:e,height:e};switch(Ee){case H.Eg["_1:1"]:return{width:e,height:e};case H.Eg["_2:3"]:return{width:e,height:3*e/2};case H.Eg["_4:3"]:return{width:e,height:3*e/4};case H.Eg["_3:4"]:return{width:e,height:4*e/3};case H.Eg["_16:9"]:return{width:e,height:9*e/16};case H.Eg["_16:5"]:return{width:e,height:5*e/16};case H.Eg["_1:1.5"]:return{width:e,height:1.5*e/1};case H.Eg["_4:5"]:return{width:e,height:5*e/4};default:return{width:e,height:e}}},Os=!!B.selectedVariant.bundleSettings&&B.selectedVariant.bundleSettings.products.every((function(e){return 0===e.quantity})),As=B.selectedVariant.bundleSettings,Fs="\n  .buy-now-button:not(.wp-button):hover {\n    background-color:".concat(la||""," !important;\n    color:").concat(ca||""," !important;\n  }\n  "),_s=!!ve&&(!!ya||!Ji)&&za&&B.isAddToCartEnabled&&!Os;return(0,V.jsxs)(V.Fragment,{children:[(!!la||!!ca)&&(0,V.jsx)("style",{children:Fs}),(0,V.jsxs)("div",{ref:ai,className:"product-detail-page-detail-box relative col-span-2 sm:col-span-2 md:col-span-2 px-4 lg:col-span-1 xl:col-span-1",children:[Sa.magnifier.show&&!en&&(0,V.jsx)(Z.Z,{detailBoxRef:ai,zoomPixel:at}),(0,V.jsxs)("div",{className:"flex justify-between items-center",children:[(0,V.jsxs)("div",{className:"product-name-main w-11/12",children:[B.brand&&!se&&!Wn&&(Vn?Ds():(0,V.jsx)(w.Z,{passHref:!0,href:B.brand.href,children:(0,V.jsx)("a",{children:Ds()})})),(0,V.jsx)("h1",{style:{color:Q||"#000",fontSize:ot?ot.value:18,fontWeight:Tt?Tt.value:400},className:"product-name",children:B.name}),B.brand&&!se&&!!Wn&&(Vn?Ds():(0,V.jsx)(w.Z,{passHref:!0,href:B.brand.href,children:(0,V.jsx)("a",{children:Ds()})})),!!It&&B.selectedVariant.stock<=((null===Pt||void 0===Pt?void 0:Pt.value)||5)&&za&&(0,V.jsxs)("div",{style:je(je({color:Kt||"#c12f24"},Un?{border:"1px solid ".concat(Gn||"#333"),padding:"4px 10px"}:{}),{},{backgroundColor:qn||"#fff",width:"max-content"}),className:"flex space-x-2 items-center",children:[(0,V.jsx)("span",{children:(0,V.jsx)(k.Q7W,{size:26})}),(0,V.jsx)("span",{className:"text-sm font-medium",children:wa("common:runningOut")})]}),!!ps&&!!Lt&&(0,V.jsx)("span",{className:"mt-2 flex text-sm",children:ps})]}),!Xt&&(0,V.jsx)("span",{style:Xn&&Fa?{color:Xn}:{},onClick:function(){ka.customerStore.customer?ws():Is(wa("common:favoriteLoginRequired"))},className:"add-favorite-basket cursor-pointer",children:Fa?(0,V.jsx)(y.iB2,{size:25}):(0,V.jsx)(y.unI,{size:25})})]}),ti?(0,V.jsx)("div",{className:"snippet mb-4",children:(0,V.jsx)("div",{className:"stage",children:(0,V.jsx)("div",{className:"dot-pulse"})})}):Ga&&Ga.averageStar&&Ga.totalReview&&Ge&&!kt?(0,V.jsx)("div",{className:"mb-4",children:(0,V.jsxs)("div",{className:"flex items-center relative",children:[(0,V.jsx)("div",{onMouseEnter:function(){return Ya(!0)},onMouseLeave:function(){return Ya(!1)},className:"relative",children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:(null===Ga||void 0===Ga?void 0:Ga.averageStar)||0,starRatedColor:"".concat(Hn||"#f7c603"),numberOfStars:5,name:"rating",starDimension:"14px",starSpacing:"1px"})}),(0,V.jsx)("span",{onClick:function(){var e=document.getElementById("customer-reviews-main");null===e||void 0===e||e.scrollIntoView({behavior:"smooth"})},className:"ml-2 text-xs font-medium cursor-pointer hover:underline  flex mt-1 text-gray-500",children:wa("common:totalReviewSummary",{fieldName:null===Ga||void 0===Ga?void 0:Ga.totalReview})}),$a&&(0,V.jsx)("div",{className:"absolute top-8 left-6 avarage-tooltip",children:(null===Ga||void 0===Ga?void 0:Ga.averageStar)||0})]})}):null,(0,V.jsx)("div",{className:"product-detail-page-detail-categories",children:B.selectedVariant.sku&&!De&&(0,V.jsxs)("div",{className:"categories-detail mt-4",children:[(0,V.jsxs)("span",{style:je(je({},vt?{color:vt}:{}),Na?{fontWeight:Na.value}:{}),children:[wa("product-detail:productCode"),":"]}),(0,V.jsx)("span",{style:je(je({},vt?{color:vt}:{}),Na?{fontWeight:Na.value}:{}),children:B.selectedVariant.sku})]})}),!!Ct&&B.selectedVariant.barcodeList&&B.selectedVariant.barcodeList.length>=1&&(0,V.jsx)("div",{className:"product-detail-page-detail-categories",children:(0,V.jsxs)("div",{className:"categories-detail mt-4",children:[(0,V.jsxs)("span",{style:vt?{color:vt}:{},children:[wa("product-detail:barcode"),":"]}),(0,V.jsx)("span",{style:vt?{color:vt}:{},children:B.selectedVariant.barcodeList[0]})]})}),!!Nt&&(0,V.jsx)("div",{className:"product-detail-page-detail-categories",children:(0,V.jsxs)("div",{className:"mt-4 categories-detail",children:[(0,V.jsxs)("span",{style:vt?{color:vt}:{},children:[wa("common:stock"),":"]}),(0,V.jsx)("span",{style:vt?{color:vt}:{},children:B.selectedVariant.stock})]})}),!Qi&&!(!B.hasStock&&Jn)&&(0,V.jsx)("div",{className:"product-detail-page-detail-price-box flex items-center mt-4 ".concat(re||B.selectedVariantUnitPriceText?"":"mb-4"),children:(0,V.jsx)("div",{className:"price-main relative",style:{fontWeight:Ke?Ke.value:800,fontSize:rt?rt.value:18},children:gs.useFormat||Ka.hasLengthFormat?(0,V.jsx)("div",{style:{color:J||"#000"},className:"sell-price flex",children:B.selectedVariantUnitPriceText}):(0,V.jsx)(V.Fragment,{children:B.selectedVariant.hasDiscount?(0,V.jsxs)("div",{className:"discount-price-main flex flex-row",children:[!At&&(0,V.jsxs)("div",{style:{backgroundColor:tt||"#000",color:nt||"#fff",fontWeight:Ke?Ke.value:900,fontSize:ct?ct.value:12,width:ct?3*ct.value+2:38,height:ct?3*ct.value+2:38,borderRadius:(null===Qn||void 0===Qn?void 0:Qn.value)||0},className:"discount-percent",children:["%",B.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex discount-price flex-col",children:[(0,V.jsx)("span",{style:{fontSize:lt?lt.value:16,color:ln||"#aaa"},children:B.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{style:{color:J||"#000"},children:B.selectedVariant.formattedFinalPrice})]})]}):(0,V.jsx)("div",{style:{color:J||"#000"},className:"sell-price flex",children:B.selectedVariant.formattedFinalPrice})})})}),!!Rn&&!!Dn&&!!Rn.values[0]&&Rn.values[0].value&&(0,V.jsx)("div",{className:"mb-4 unreset",dangerouslySetInnerHTML:{__html:Rn.values[0].value}}),ft&&ft.values.length?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:ft.values[0].value||""},className:"mb-2 px-4 py-2 inline-block text-sm tracking-wide",style:{backgroundColor:xt||"#000",color:gt||"#fff"}}):null,!!re&&(0,V.jsx)("span",{style:{fontSize:le?le.value:12,textDecoration:de?"underline":"none",fontWeight:me?700:400,lineHeight:"18px"},className:"flex",children:re}),!!B.selectedVariantUnitPriceText&&!Qi&&!na&&(0,V.jsx)("div",{style:{fontSize:it?it.value:"12px"},className:"font-normal text-gray-600",children:gs.useFormat||Ka.hasLengthFormat?"":B.selectedVariantUnitPriceText}),!!Le&&(0,V.jsx)("div",{className:"shipping-policy ".concat(re||B.selectedVariantUnitPriceText?"mt-2":""),children:(0,V.jsx)("div",{style:{color:Ze||void 0},dangerouslySetInnerHTML:{__html:function(){if(Le)return He&&Me&&Me.href&&We&&He.includes(We)?He.replace(We,'<a target="_blank" class="underline" rel="noopener noreferrer" aria-label="'.concat(Me.label,'" href="').concat(Me.href,'">').concat(We,"</a>")):"<span>".concat(He,"</span>")}()||""}})}),B.displayedProductGroups.length?(0,V.jsx)("div",{className:"mt-6 mb-6 product-groups-main",children:B.displayedProductGroups.map((function(e,t){var n=0===t&&!!Yt||t===B.displayedProductGroups.length-1&&!Yt&&1!==B.displayedProductGroups.length;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("span",{className:"flex mb-2 variant-type",children:e.name}),(0,V.jsx)("div",{className:"flex flex-wrap product-detail-page-variants",children:e.items.map((function(e,a){return(0,V.jsx)("div",{className:"flex flex-col",children:(0,V.jsx)("div",{style:n&&!oa?{width:Es().width,height:Es().height}:{width:"unset",padding:"8px",backgroundColor:_n||"#fff",border:"1px solid ".concat(_n||"#ececec")},className:"".concat((0===t&&Yt||t===B.displayedProductGroups.length-1&&!Yt)&&!oa?"color-image-choice":"variant-types px-2 mb-2"," mr-2 secondary-border relative overflow-hidden cursor-pointer ").concat(Qe?"rounded-full":""," ").concat(e.isSelected?"transform primary-border mr-2":""," "),children:(0,V.jsx)(w.Z,{passHref:!0,href:e.href,scroll:!1,children:(0,V.jsx)("a",{className:"".concat(n?"":"h-full w-full flex items-center justify-center"),children:0===t?Yt&&!oa?e.image&&(0,V.jsx)(C.E,{image:e.image,objectFit:"contain",sizes:"100px",layout:"fill",alt:e.image.altText||""}):(0,V.jsx)("span",{style:zn?{color:zn}:{},className:"variant-name",children:e.value}):t!==B.displayedProductGroups.length-1||Yt||1===B.displayedProductGroups.length||oa?(0,V.jsx)("span",{style:zn?{color:zn}:{},className:"variant-name",children:e.value}):e.image&&(0,V.jsx)(C.E,{image:e.image,objectFit:"contain",sizes:"100px",layout:"fill",alt:e.image.altText||""})})})},e.value+a)})}))})]})}))}):null,(0,V.jsx)("div",{className:"mt-6 mb-6",children:B.displayedVariantTypes.map((function(e,t){var n=e.variantType,a=e.displayedVariantValues;return(0,V.jsx)("div",{className:"",children:(0,V.jsx)(b.Z,{variantType:n,displayedVariantValues:a,productDetail:B,isColorVariantValueFirstImage:Oe,isChoiceVariantValueFirstImage:Ae,imageAspectRatio:Ee,isScrollVariantOptions:Fe,whenHoveredVariantNameShow:qe,isVariantDesingRaunded:Qe,isHideNoStockVariant:bt,isChoiceVariantsDropdown:Ft,isColorVariantsDropdown:_t,variantHeight:qt,onChangeVariant:function(){return Zi(!0)},hideVariantTypeName:Nn,smallVariantImageMobile:Pn,isMob:si,dropdownVariantBorderRadius:Ln,variantHeightColor:Mn,variantHeightColorMobile:Zn,isVariantDesingRaundedIsShowImage:$n,variantNameFontWeight:Kn,variantNamesFontWeight:aa,colorVariantsFirstImageAspectRatio:sa,showOnlyColorVariantsName:ua,hideColorVariantName:ma})},t)}))}),B.selectedVariant.bundleSettings&&!Bn&&!da&&(0,V.jsx)("div",{className:"mt-6 mb-6",children:!Qt&&(0,V.jsx)(ce,{bundleSettings:B.selectedVariant.bundleSettings,onChangeItem:function(){return Zi(!0)},notUnderlineLink:an,bundleProductWithoutLink:on,isLoadingBundle:cn,removeBundleImageBg:yn,variantHeightColor:Mn,variantHeightColorMobile:Zn,isMob:si,bundleMainImageSize:ba})}),xs.useFormat&&(0,V.jsx)(te,{useFormatModel:xs}),gs.useFormat&&(0,V.jsx)(ie,{useFormatModel:gs}),Ka.hasLengthFormat&&(0,V.jsx)(pe,{productDetail:B,lengthOptionsModel:Ka}),B.productOptionSet&&(0,V.jsx)("div",{className:"flex flex-col",children:B.productOptionSet.displayedOptions.map((function(e,t){if((!xs.useFormat||e.name!==xs.OPTION_KEY_WIDTH&&e.name!==xs.OPTION_KEY_LENGTH)&&(!gs.useFormat||e.name!==gs.OPTION_KEY_WIDTH&&e.name!==gs.OPTION_KEY_LENGTH))return(0,V.jsx)("div",{className:"flex flex-col options-main",children:(0,V.jsx)(be,{option:e,productDetail:B,refresh:Da,isChoicesNameShow:ke,isFormSubmit:mi,productOptionSelectSwatchIsScroll:Cn})},t)}))}),!!Re&&!yt&&(0,V.jsx)("div",{className:"component-render",children:Re.render()}),vs?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:$e},className:"unreset unreset-reset"}):null,js?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:Ye},className:"unreset unreset-reset"}):null,ti?(0,V.jsx)("div",{className:"snippet mb-4",children:(0,V.jsx)("div",{className:"stage",children:(0,V.jsx)("div",{className:"dot-pulse"})})}):Ga&&Ga.averageStar&&Ga.totalReview&&Ge&&kt?(0,V.jsx)("div",{className:"",children:(0,V.jsxs)("div",{className:"flex  items-center relative",children:[(0,V.jsx)("div",{onMouseEnter:function(){return Ya(!0)},onMouseLeave:function(){return Ya(!1)},className:"relative",children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:(null===Ga||void 0===Ga?void 0:Ga.averageStar)||0,starRatedColor:"".concat(Hn||"#f7c603"),numberOfStars:5,name:"rating",starDimension:"14px",starSpacing:"1px"})}),(0,V.jsx)("span",{onClick:function(){var e=document.getElementById("customer-reviews-main");null===e||void 0===e||e.scrollIntoView({behavior:"smooth"})},className:"ml-2 text-xs font-medium cursor-pointer hover:underline  flex mt-1 text-gray-500",children:wa("common:totalReviewSummary",{fieldName:null===Ga||void 0===Ga?void 0:Ga.totalReview})}),$a&&(0,V.jsx)("div",{className:"absolute top-8 left-6 avarage-tooltip",children:(null===Ga||void 0===Ga?void 0:Ga.averageStar)||0})]})}):null,(null===Vt||void 0===Vt?void 0:Vt.isShowModal)&&(!!us||!!ms)&&(0,V.jsxs)("div",{onClick:function(){if(us)document.documentElement.style.overflow="hidden",gi(!0);else{if(null===Vt||void 0===Vt||!Vt.isHtml||!ms)return;document.documentElement.style.overflow="hidden",gi(!0)}},className:"flex space-x-2 items-center cursor-pointer",children:[Vt.icon&&(0,V.jsx)("div",{className:"w-[30px] h-[30px] relative",children:(0,V.jsx)(C.E,{sizes:"100px",layout:"fill",image:Vt.icon,objectFit:"contain"})}),(0,V.jsx)("span",{className:"underline text-sm text-gray-700",children:Vt.text})]}),B.selectedVariant.bundleSettings&&!Bn&&!!Qt&&(0,V.jsxs)("div",{className:"flex flex-col w-full ".concat(fs?"mb-4":""),children:[(0,V.jsxs)("div",{className:"flex text-sm justify-between items-center pb-2  border-b",children:[(0,V.jsx)("span",{className:"font-medium",children:wa("common:bundleSettings.productContent")}),(0,V.jsx)("span",{onClick:function(){var e=document.getElementById("bundle-for-furn");null===e||void 0===e||e.scrollIntoView({block:"nearest",behavior:"smooth"})},className:"underline cursor-pointer underline-offset-2",children:wa("common:bundleSettings.change")})]}),(0,V.jsx)("div",{className:"flex flex-col",children:B.selectedVariant.bundleSettings.products.filter((function(e){return 0!==e.quantity})).map((function(e){var t;return(0,V.jsxs)("div",{className:"flex justify-between text-sm items-center border-b last:border-0 py-4",children:[(0,V.jsx)("span",{className:"flex w-1/2",children:null===(t=e.product)||void 0===t?void 0:t.name}),(0,V.jsxs)("span",{children:[e.quantity," x ",e.formattedFinalPrice]})]})}))})]}),fs&&(0,V.jsxs)("div",{className:"flex space-x-2 items-center mt-2",children:[(0,V.jsxs)("span",{style:{color:Wt||"#000"},className:"flex",children:[wa("common:share"),":"," "]}),(0,V.jsxs)("div",{className:"flex space-x-2 items-center",children:[!!Zt&&(0,V.jsx)("a",{rel:"nofollow",href:"https://wa.me/?text=".concat(Ei),"data-action":"share/whatsapp/share",target:"_blank",children:(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(y.nmQ,{color:Ut||"#000",size:25})})}),!!Mt&&(0,V.jsx)("a",{rel:"nofollow",href:"https://telegram.me/share/url?url=".concat(Ei,"&text=").concat(Ei),children:(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(y.EPM,{color:Ut||"#000",size:27})})}),!!Yn&&(0,V.jsx)("a",{rel:"nofollow",href:"https://www.facebook.com/sharer/sharer.php?u=".concat(Ei),children:(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(y.SpX,{color:Ut||"#000",size:27})})}),!!In&&(0,V.jsx)("span",{onClick:function(){navigator.clipboard.writeText(_i),_.Am.info(wa("product-detail:successCopyLink"),{position:"top-right",autoClose:2e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0})},className:"cursor-pointer rounded-full ",style:{border:"2px solid ".concat(Ut||"#000"),padding:"2px"},children:(0,V.jsx)(xe.jis,{color:Ut||"#000",size:14})})]})]}),B.offers&&tn&&(0,V.jsx)("div",{className:"mt-6 mb-6",children:(0,V.jsx)(ue,{productDetail:B,offers:B.offers,isOffersAddButtonOn:!0,isProductOffersSelected:rn,offerTitleColor:dn,offerTitleFontSize:un,offerTitleFontWeight:mn,offerDescriptionColor:pn,offerDescriptionFontSize:hn,offerDescriptionFontWeight:fn,offerDiscountPercentageColor:xn,offerDiscountPercentageBgColor:gn,oldDesign:vn,campaignOfferButtonBgColor:wn,campaignOfferButtonTextColor:kn,showOfferInfoText:En,campaignOfferTextsColor:ra})}),(0,V.jsx)("div",{className:"flex flex-1 product-detail-page-buy-box ".concat(vs||js||Ga&&Ga.averageStar&&Ga.totalReview&&Ge&&kt?"mt-4":"mt-8"," ").concat("mb-2"," flex-col "),children:(0,V.jsxs)("div",{className:"flex",children:[!!K&&!Qi&&za&&!gs.useFormat&&!Ka.hasLengthFormat&&(Vi?(0,V.jsx)("div",{className:"flex mr-2 product-detail-select-quantity-main",children:(0,V.jsx)("select",{value:Ia,onChange:function(e){var t=e.target.value;if("+10"==t)return Pa(10),void Ii(!1);Pa(+t)},className:"font-medium",children:bi.map((function(e){return(0,V.jsx)("option",{value:e,children:e},e)}))})}):(0,V.jsxs)("div",{className:"flex mr-2 product-detail-quantity-boxes",children:[(0,V.jsx)("div",{onClick:function(){var e,t=null!==(e=null===Bi||void 0===Bi?void 0:Bi.minQuantityPerCart)&&void 0!==e?e:1;Ia>t&&Pa(Ia-1>1?Ia-1:1)},style:{backgroundColor:jn||"#fff",color:bn||"#000"},className:"product-detail-quantity-box ".concat(za&&B.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.pwh,{size:15})}),(0,V.jsx)("div",{style:{backgroundColor:jn||"#fff",color:bn||"#000"},className:"product-detail-quantity",children:(0,V.jsx)("input",{style:{backgroundColor:jn||"#fff",color:bn||"#000"},type:"number",className:"quantity-input",value:Ia,onChange:function(e){Pa(parseInt(e.target.value))}})}),(0,V.jsx)("div",{onClick:function(){var e=null===Bi||void 0===Bi?void 0:Bi.maxQuantityPerCart;Pa("number"===typeof e?Ia<e?Ia+1:e:Ia+1)},style:{backgroundColor:jn||"#fff",color:bn||"#000"},className:"product-detail-quantity-box ".concat(za&&B.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.poH,{size:15})})]})),Ji?null:Ma?(0,V.jsx)("div",{style:{borderRadius:(null===jt||void 0===jt?void 0:jt.value)||0},className:"add-to-cart flex-1 out-of-stock pointer-events-none",children:wa("product-detail:notifyBackStock")}):(0,V.jsx)("button",{ref:ys,onClick:function(){za?Cs():B.selectedVariant.isBackInStockEnabled&&!As&&Ps()},style:je(je({borderRadius:(null===jt||void 0===jt?void 0:jt.value)||0,fontWeight:(null===ia||void 0===ia?void 0:ia.value)||900},ze?{border:"1px solid ".concat(ze)}:{}),li&&(Sn||Tn)?{backgroundColor:Sn||"#ededed",color:Tn||"#000"}:{}),className:"add-to-cart flex-1 ".concat(Os?"out-of-stock pointer-events-none":""," ").concat(Wi?Mi?"":"out-of-stock pointer-events-none":""," ").concat(za?"stock ".concat(li?"loading":""," "):B.selectedVariant.isBackInStockEnabled?"":"out-of-stock pointer-events-none"," ").concat(B.isAddToCartEnabled?"":"out-of-stock disabled "," "),children:za?li?wi:wa(Wi?"product-detail:updateBasket":"product-detail:addBasket"):B.selectedVariant.isBackInStockEnabled&&!As?wa("product-detail:notifyBackStock"):wa("product-detail:outOfStock")}),Qi&&Yi&&Ki&&(0,V.jsx)(w.Z,{passHref:!0,href:"/account/login",children:(0,V.jsx)("a",{className:"flex w-full",children:(0,V.jsx)("div",{style:je(je(je(je(je({},es?{fontSize:es}:{}),ts?{fontWeight:ts}:{}),as?{backgroundColor:as}:{}),ns?{color:ns}:{}),{},{textAlign:ss?"center":"left",width:"".concat(os,"%"),border:"1px solid ".concat(is||"#f8f9fa")}),className:"text-sm mb-4 bg-[#f8f9fa] p-3 w-full",dangerouslySetInnerHTML:{__html:(Xi?Ki.replace(Xi,'<span class="underline">'.concat(Xi,"</span>")):"<span>".concat(Ki,"</span>"))||""}})})})]})}),!!pa&&za&&!!B.selectedVariant.tieredDiscountProducts.length&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{className:"my-4 flex flex-col space-y-2 cursor-pointer",children:B.selectedVariant.tieredDiscountProducts.map((function(e){return(0,V.jsxs)("div",{style:{backgroundColor:fa||"#F9F9F9",color:ha||"#151B1C",borderRadius:"8px"},onClick:function(){return Pa(e.lineItemQuantityRange.min)},className:"flex p-4 justify-between text-xs items-center",children:[(0,V.jsxs)("div",{className:"flex space-x-4 items-center",children:[(0,V.jsx)("div",{children:(0,V.jsx)("span",{className:"relative flex w-5 h-5 rounded-full border border-[#DAD8E3] bg-white",children:Ia===e.lineItemQuantityRange.min?(0,V.jsx)("span",{style:{backgroundColor:xa||"#000000"},className:"absolute flex w-3 h-3 -translate-x-1/2 left-1/2 top-1/2 rounded-full -translate-y-1/2"}):null})}),(0,V.jsx)("span",{children:"".concat(e.lineItemQuantityRange.min," al ").concat(e.type===j.LL.RATIO?"%":B.selectedVariant.price.currencySymbol||"-"," ").concat(e.amount," indirim kazan! ")})]}),(0,V.jsxs)("div",{className:"flex flex-col space-y-1",children:[e.type===j.LL.RATIO&&(0,V.jsxs)("div",{className:"flex space-x-2 justify-end",children:[(0,V.jsx)("span",{children:e.formattedFinalPrice}),(0,V.jsx)("span",{className:"line-through",children:e.formattedSellPrice})]}),(0,V.jsxs)("div",{className:"flex space-x-2 justify-end",children:[(0,V.jsx)("span",{children:wa("common:field.total")}),(0,V.jsx)("span",{children:e.formattedFinalPriceWithQuantity}),(0,V.jsx)("span",{className:"line-through",children:e.formattedSellPriceWithQuantity})]})]})]})}))}),!!va&&(0,V.jsx)("div",{className:"flex mt-2 mb-2",children:(0,V.jsx)("button",{onClick:function(){return Cs()},style:je({backgroundColor:ga||"#151B1C",color:ja||"#ffffff",borderRadius:(null===jt||void 0===jt?void 0:jt.value)||0,fontWeight:(null===ia||void 0===ia?void 0:ia.value)||400},li&&(Sn||Tn)?{backgroundColor:Sn||"#ededed",color:Tn||"#000"}:{}),className:"flex justify-center items-center w-full h-12 tiered-discount-add-button ".concat(li?"loading":""),children:li?wi:va||""})})]}),B.selectedVariant.bundleSettings&&!Bn&&!!da&&(0,V.jsx)("div",{className:"mt-6 mb-6",children:!Qt&&(0,V.jsx)(ce,{bundleSettings:B.selectedVariant.bundleSettings,onChangeItem:function(){return Zi(!0)},notUnderlineLink:an,bundleProductWithoutLink:on,isLoadingBundle:cn,removeBundleImageBg:yn,variantHeightColor:Mn,variantHeightColorMobile:Zn,isMob:si,bundleMainImageSize:ba})}),_s&&(0,V.jsx)("div",{onClick:function(){za&&Cs(!0)},style:{backgroundColor:ye||"black",color:Ne||"white",borderRadius:jt?jt.value:0},className:"buy-now-button ".concat(Se?"mb-2":""),children:wa("product-detail:buyNow")}),!!Se&&(0,V.jsx)(w.Z,{passHref:!0,href:"".concat(Ie?Be?"".concat(On||"https://wa.me","/").concat(Ie,"?text=").concat(Pe," ").concat(Be?Ei:""):"".concat(On||"https://wa.me","/").concat(Ie):"/"),children:(0,V.jsx)("a",{target:"_blank",rel:"nofollow",children:(0,V.jsxs)("div",{style:{backgroundColor:Fn||"#fff",border:"1px solid ".concat(Te||"black"),color:Ve||"black",borderRadius:jt?jt.value:0},className:"buy-now-button wp-button mb-2",children:[(0,V.jsx)("span",{className:"mr-2 ",children:(0,V.jsx)(y.nmQ,{size:22})}),(0,V.jsx)("span",{className:"tracking-wider",children:wa("product-detail:wpButtonText")})]})})}),!!Re&&!!yt&&(0,V.jsx)("div",{className:"component-render mt-4",children:Re.render()}),(E&&E.id||O&&O.id||U&&U.id)&&(0,V.jsx)("div",{style:{padding:Dt?Dt.value:0,backgroundColor:Rt||"#fff"},className:"product-detail-page-easy-refund ".concat(wt?"mobile-center":""," "),children:(0,V.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-2 ".concat(U&&U.id?"lg:grid-cols-3":"lg:grid-cols-2","  w-full gap-4 sm:gap-0 md:gap-0 lg:gap-0"),children:[E&&E.id&&(0,V.jsxs)("div",{className:"easy-refund",children:[(0,V.jsx)("span",{className:"easy-refund-image",style:{width:Ue?Ue.value:20,height:Ue?Ue.value:20},children:(0,V.jsx)(C.E,{width:Ue?Ue.value:20,height:Ue?Ue.value:20,sizes:Ue?Ue.value+"px":"20px",layout:"responsive",image:E,objectFit:"cover",alt:"features"})}),(0,V.jsx)("span",{style:dt?{color:dt}:{},children:R})]}),O&&O.id&&(0,V.jsxs)("div",{className:"easy-refund",children:[(0,V.jsx)("span",{className:"easy-refund-image",style:{width:Ue?Ue.value:20,height:Ue?Ue.value:20},children:(0,V.jsx)(C.E,{width:Ue?Ue.value:20,height:Ue?Ue.value:20,sizes:Ue?Ue.value+"px":"20px",layout:"responsive",image:O,objectFit:"cover",alt:"features"})}),(0,V.jsx)("span",{style:dt?{color:dt}:{},children:G})]}),U&&U.id&&(0,V.jsxs)("div",{className:"easy-refund",children:[(0,V.jsx)("span",{className:"easy-refund-image",style:{width:Ue?Ue.value:20,height:Ue?Ue.value:20},children:(0,V.jsx)(C.E,{width:Ue?Ue.value:20,height:Ue?Ue.value:20,sizes:Ue?Ue.value+"px":"20px",layout:"responsive",image:U,objectFit:"cover",alt:"features"})}),(0,V.jsx)("span",{style:dt?{color:dt}:{},children:D})]})]})}),!q&&(0,V.jsx)("div",{style:{backgroundColor:Ce?ut||"#fff":"#f8f8f8"},className:"product-detail-tabs-main",children:(0,V.jsx)(I,{productDetail:B,attributes:Y,isShowMoreButton:we,numberToCutDescription:Xe,isNumberToCutDescription:et,descriptionTitleIconColor:mt,specialAttrFontSize:Bt,isBottomTabOnlySpeacilAttr:Et,isSpecialAttrTabClickStack:nn,productTabsArrowDesign:sn,isCloseProductDescription:An,isOpenAllTabs:ea})})]}),!Ji&&B.isAddToCartEnabled&&(0,V.jsx)("div",{className:"product-detail-page-buy-box",children:(0,V.jsx)("div",{onClick:function(){za?Cs():B.selectedVariant.isBackInStockEnabled&&Ps()},className:"add-to-cart add-basket-fixed  ".concat(si&&_e&&!Ns?"in-view-show":"in-view-hide"," flex-1 ").concat(za?"stock":B.selectedVariant.isBackInStockEnabled?"":"out-of-stock pointer-events-none"," ").concat(B.isAddToCartEnabled?"":"out-of-stock disabled "," "),children:za?wa("product-detail:addBasket"):B.selectedVariant.isBackInStockEnabled?wa("product-detail:notifyBackStock"):wa("product-detail:outOfStock")})}),(0,V.jsx)("div",{className:"custom__image-modal-container ".concat(xi?"show":"hide"),children:(0,V.jsxs)("div",{ref:Ui,className:"custom__image-modal",children:[(0,V.jsx)("div",{className:"h-full flex relative overflow-hidden",children:us?us.map((function(e){return(0,V.jsx)("div",{className:"relative flex-shrink-0 w-full h-full",style:{transform:"translateX(-".concat(100*cs,"%)"),transition:"300ms all"},children:!!e&&(0,V.jsx)(C.E,{sizes:"100vw",layout:"fill",image:e,objectFit:"contain"})})})):null!==Vt&&void 0!==Vt&&Vt.isHtml&&ms?(0,V.jsx)("div",{className:"relative flex-shrink-0 w-full h-full unreset unreset-reset flex justify-center items-center",dangerouslySetInnerHTML:{__html:ms}}):null}),(0,V.jsx)("span",{className:"absolute custom__image-modal-close cursor-pointer",onClick:hs,children:(0,V.jsx)(F.FU5,{color:"#fff"})}),!!us&&us.length>1&&(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:function(){var e=cs-1;us&&us.length<e?ds(cs-1):ds(0)},className:"absolute cursor-pointer left-2 top-1/2 -translate-y-1/2 z-20",children:(0,V.jsx)(T.u1R,{size:30})}),(0,V.jsx)("span",{onClick:function(){var e=cs+1;us&&us.length>e?ds(cs+1):ds(us.length-1)},className:"absolute cursor-pointer  right-2 top-1/2 -translate-y-1/2 z-20",children:(0,V.jsx)(T.hjJ,{size:30})})]})]})})]})})),Ne=(0,o.Pi)((function(e){var t=e.productDetail,n=e.attributes,a=e.isShowMoreButton,i=e.numberToCutDescription,o=e.isNumberToCutDescription,r=e.isShowMoreButtonCenter,l=e.bottomTabFullWidth,c=e.isBottomTabOnlySpeacilAttr,d=e.descriptionTitleIconColor,u=e.isSliderTabs,p=s.useState(c?2:1),h=(0,m.Z)(p,2),f=h[0],x=h[1],g=(0,S.$)().t,j=s.useState(1e3),b=(0,m.Z)(j,2),y=b[0],k=b[1],T=s.useState([]),I=(0,m.Z)(T,2),P=I[0],B=I[1],R=s.useState(!1),D=(0,m.Z)(R,2),E=D[0],O=D[1];s.useEffect((function(){var e=document.querySelector("#show-all-description");e&&e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),k(t.description.length+1),O(!0)}))})),s.useEffect((function(){var e=(new DOMParser).parseFromString(t.description,"text/html"),n=(0,N.Z)(e.body.children).map((function(e){return e.outerHTML}));B(n)}),[i]);var A=t.description.slice(0,y),F=o&&i?P.slice(0,i.value).join(" "):"",_="".concat(d?".title.bottom-tab-active {\n        border-color:".concat(d,"\n      }\n      "):"");return(0,V.jsxs)("div",{className:"grid grid-cols-1 product-detail-page-bottom-tabs mt-8 sm:mt-20 md:mt-20 lg:mt-20 px-4 unreset unreset-reset",children:[!!d&&(0,V.jsx)("style",{children:_}),(0,V.jsxs)("div",{className:"flex w-full justify-center ".concat(l?"":"max-w-3xl","  mx-auto ").concat(u?"overflow-hidden overflow-x-auto":"flex-wrap"," "),children:[!!t.description&&!c&&(0,V.jsx)("div",{onClick:function(){x(1===f?-1:1)},className:"tab flex ".concat(u?"whitespace-nowrap":""),children:(0,V.jsx)("div",{className:"flex justify-between items-center",children:(0,V.jsx)("span",{style:{color:d||"#000"},className:"title ".concat(1===f?"bottom-tab-active":"bottom-tab-passive"),children:g("product-detail:productDescription")})})}),n&&n.values&&n.values.map((function(e,t){return(0,V.jsx)(V.Fragment,{children:(0,V.jsx)("div",{onClick:function(){x(f===t+2?-1:t+2)},className:"tab flex ".concat(u?"whitespace-nowrap":""),children:(0,V.jsx)("div",{className:"flex justify-between items-center",children:(0,V.jsx)("span",{style:{color:d||"#000"},className:"title ".concat(f===t+2?"bottom-tab-active":"bottom-tab-passive"),children:e.attribute.name})})})})}))]}),(0,V.jsxs)("div",{className:"flex w-full ".concat(l?"":"max-w-3xl"," mx-auto mt-8 sm:mt-10 md:mt-10 lg:mt-10"),children:[1===f&&((i&&o?!a&&!E:t.description.length>y)&&!a?(0,V.jsx)("div",{className:"tab-content",dangerouslySetInnerHTML:{__html:"".concat(o&&i?F:A," ").concat(o&&i&&i.value>=P.length?"":'<span id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex '.concat(r?"justify-center":"",' ">').concat(g("common:showMore"),"</span>"),"  ")}}):(0,V.jsx)("div",{className:"tab-content",dangerouslySetInnerHTML:{__html:t.description}})),n&&n.values&&n.values.map((function(e,t){var n,a,i;return(0,V.jsx)(V.Fragment,{children:f===t+2?e.attribute.type===v.T.TABLE?(0,V.jsx)("div",{className:"flex w-full",children:(0,V.jsxs)("table",{className:"w-full product-detail-table",children:[(0,V.jsx)("thead",{children:(0,V.jsxs)("tr",{className:"border-b border-alto-grey text-sm font-bold",children:[(0,V.jsxs)("th",{className:"text-left pb-3",children:[" ",e.attribute.name," "]}),e.attribute.tableTemplate&&e.attribute.tableTemplate.columns&&e.attribute.tableTemplate.columns.map((function(e){return(0,V.jsx)("th",{className:"text-left pb-3",children:e.name})}))]})}),(0,V.jsx)("tbody",{children:e.attribute.tableTemplate&&e.attribute.tableTemplate.rows&&e.attribute.tableTemplate.rows.map((function(t){return(0,V.jsxs)("tr",{className:"border-b border-alto-grey text-sm md:text-base table-tr",children:[(0,V.jsx)("td",{className:"py-3",children:t.name}),e.attribute.tableTemplate&&e.attribute.tableTemplate.columns&&e.attribute.tableTemplate.columns.map((function(n){var a,i=null===(a=e.values[0].tableValue)||void 0===a?void 0:a.find((function(e){return e.colId===n.id&&t.id===e.rowId}));if(i)return(0,V.jsx)("td",{className:"py-3",children:i.value})}))]})}))})]})}):e.attribute.type===v.T.CHOICE||e.attribute.type===v.T.MULTIPLE_CHOICE?(0,V.jsx)("div",{className:"tab-content",children:e.attribute.type===v.T.CHOICE?null===(n=e.values[0].productAttributeOption)||void 0===n?void 0:n.name:e.values.map((function(t,n){var a;return"".concat(null===(a=t.productAttributeOption)||void 0===a?void 0:a.name).concat(n!==e.values.length-1?", ":"")}))}):e.attribute.type===v.T.IMAGE?(0,V.jsx)("div",{className:"tab-content image-render",children:e.values&&e.values.length&&e.values[0].images&&e.values[0].images.length?(0,V.jsx)("div",{className:"flex flex-wrap gap-4",children:null===(a=e.values[0].images)||void 0===a?void 0:a.map((function(e){return(0,V.jsx)("div",{className:"relative w-[150px] sm:w-[150px] md:w-[200px] lg:w-[200px] h-[150px] sm:h-[150px] md:h-[200px] lg:h-[200px]",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:"",image:e,sizes:"(max-width: 768px) 100vw, 50vw"})})}))}):null}):e.attribute.type===v.T.PRODUCT?(0,V.jsx)("div",{className:"mt-4 flex flex-wrap gap-2 unreset unreset-reset",children:null===(i=e.values[0].products)||void 0===i?void 0:i.map((function(e){var t,n,a;return(0,V.jsx)(w.Z,{passHref:!0,href:e.productHref,children:(0,V.jsxs)("a",{style:{color:"#333"},className:"flex space-y-2 !no-underline text-xs flex-col",children:[!(null===(t=e.selectedVariant.mainImage)||void 0===t||!t.image)&&(0,V.jsx)("div",{className:"relative w-[100px] h-[100px]",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:(null===(n=e.selectedVariant.mainImage)||void 0===n?void 0:n.image.altText)||"",image:null===(a=e.selectedVariant.mainImage)||void 0===a?void 0:a.image,sizes:"200px"})}),(0,V.jsx)("span",{className:"w-[100px] truncate",children:e.name})]})})}))}):(0,V.jsx)("div",{className:"tab-content",dangerouslySetInnerHTML:{__html:v.T.DATETIME===e.attribute.type||v.T.DATE===e.attribute.type?v.T.DATE===e.attribute.type?new Date(parseInt(e.values[0].value||"")).toLocaleDateString():new Date(parseInt(e.values[0].value||"")).toLocaleString([],{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"})||"":e.values[0].value||""}}):null})}))]})]})})),Ce=n(77191),we=n(26126),ke=n(86204),Se=n(29797),Te=(0,o.Pi)((function(e){var t,n,a,i,o,r,l=e.images,c=e.isProductVideoAutoPlay,d=e.productDetail,u=e.isImageCover,p=e.imageAspectRatio,h=(e.isZoomOverlayModal,e.desktopZoomDisabled),f=e.mobileZoomDisabled,x=((0,S.$)().t,s.useState(!1)),g=(0,m.Z)(x,2),v=g[0],j=g[1],b=s.useState(0),y=(0,m.Z)(b,2),N=y[0],w=y[1],k=s.useState(!1),T=(0,m.Z)(k,2),I=T[0],P=T[1],B=s.useState(!1),R=(0,m.Z)(B,2),D=R[0],E=R[1],O=s.useRef(),A=s.useState({width:0,height:0}),F=(0,m.Z)(A,2),_=F[0],z=F[1];s.useEffect((function(){1===d.selectedVariant.images.length&&(j(!1),clearInterval(O.current)),O.current=setInterval((function(){v&&w((function(e){return e+1}))}),3e3)}),[v]),s.useEffect((function(){v&&d.selectedVariant.images.length-1===N&&(clearInterval(O.current),j(!1))}),[N]),s.useEffect((function(){var e=document.querySelector(".cursor-zoom-in.image");e&&z({width:e.clientWidth,height:e.clientHeight})}),[]);var L=function(e){return(0,Ce.Z)(e),(0,V.jsx)("div",{onClick:function(){N===d.selectedVariant.images.length-1||w(N+1)},className:"!fixed r-0",children:(0,V.jsx)(ke.dhL,{size:15,color:N===d.selectedVariant.images.length-1?"#c8c8c8":"#ffffff"})})},H=function(e){return(0,Ce.Z)(e),(0,V.jsx)("div",{onClick:function(){0===N||w(N-1)},className:"!fixed l-0",children:(0,V.jsx)(ke.Wuc,{size:15,color:0===N?"#c8c8c8":"#ffffff"})})};return l?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("div",{className:"relative",children:[(0,V.jsx)("div",{className:"mb-4 cursor-zoom-in",onClick:function(){h||f||(P(!0),w(0))},children:l.slice(0,1).map((function(e,t){var n,a,i;return e.isVideo?(0,V.jsx)("video",{controls:!c,autoPlay:!!c,loop:!!c,muted:!!c,playsInline:!0,className:"product-video-main",children:(0,V.jsx)("source",{src:null===(a=e.image)||void 0===a?void 0:a.src})},null===(n=e.image)||void 0===n?void 0:n.src):(0,V.jsx)(C.E,{className:"object-cover",image:e.image,layout:"responsive",width:p&&p.split(":")[0]||1,height:p&&p.split(":")[1]||1,sizes:"(max-width: 320px) 136px, (max-width: 450px) 400px, (max-width: 768px) 700px, 1080px",objectFit:u?"cover":"contain",alt:(null===e||void 0===e||null===(i=e.image)||void 0===i?void 0:i.altText)||d.name})}))}),(0,V.jsx)("div",{className:"grid grid-cols-2 gap-4 ",children:l.slice(1,l.length).map((function(e,t){var n,a,i;return(0,V.jsx)("div",{className:"".concat(e.isVideo?"video":"cursor-zoom-in image"),onClick:function(){e.isVideo||h||f||(P(!0),w(t+1))},children:e.isVideo?(0,V.jsx)("video",{controls:!c,autoPlay:!!c,loop:!!c,muted:!!c,playsInline:!0,className:"relative",style:{width:_.width,height:_.height},children:(0,V.jsx)("source",{src:null===(a=e.image)||void 0===a?void 0:a.src})},null===(n=e.image)||void 0===n?void 0:n.src):(0,V.jsx)(C.E,{className:"object-cover",image:e.image,layout:"responsive",width:p&&p.split(":")[0]||1,height:p&&p.split(":")[1]||1,sizes:"(max-width: 320px) 136px, (max-width: 450px) 400px, (max-width: 768px) 700px, 1080px",objectFit:u?"cover":"contain",alt:(null===e||void 0===e||null===(i=e.image)||void 0===i?void 0:i.altText)||d.name})})}))})]}),(null===(t=d.selectedVariant)||void 0===t?void 0:t.images)&&0!==(null===(n=d.selectedVariant)||void 0===n?void 0:n.images.length)&&(0,V.jsxs)(Se.Z,{id:d.selectedVariant.id,modalVisible:I,setModalVisible:function(e){P(e),j(!1),clearInterval(O.current)},setModalSliderOnPlay:function(){j(!v),v&&clearInterval(O.current),d.selectedVariant.images.length-1!==N||v||w(0)},playModalSlider:v,images:d.selectedVariant.images,zoomImageIndexModal:N,setZoomIndex:function(e){w(e)},children:[(0,V.jsx)("div",{children:(0,V.jsx)(we.d$,{onZoom:function(e,t){return E(!D)},doubleClick:{mode:D?"zoomOut":"zoomIn"},children:(0,V.jsx)(we.Uv,{contentClass:"".concat(D?"cursor-zoom-out":"cursor-zoom-in"," ").concat(d.selectedVariant.images[N].isVideo?"!h-[90vh]":"","\n                  "),children:d.selectedVariant.images[N].isVideo?(0,V.jsx)("video",{controls:!c,autoPlay:!!c,loop:!!c,muted:!!c,playsInline:!0,className:"product-video-main !relative",children:(0,V.jsx)("source",{src:null===(i=d.selectedVariant.images[N].image)||void 0===i?void 0:i.src})},(null===(a=d.selectedVariant.images[N].image)||void 0===a?void 0:a.src)||""):(0,V.jsx)("img",{src:(null===(o=d.selectedVariant.images[N])||void 0===o||null===(r=o.image)||void 0===r?void 0:r.getSrc(2560))||"",alt:"",className:"h-[90vh] object-contain"})})})}),(0,V.jsx)(L,{}),(0,V.jsx)(H,{})]})]}):null})),Ve=n(52091),Ie=(0,o.Pi)((function(e){var t=e.bundleSettings,n=e.onChangeItem,a=e.notUnderlineLink,i=e.bundleProductWithoutLink,o=e.showBundleFurnitureImage,r=e.removeBundleImageBg,l=(0,S.$)().t,c=s.useState(!0),d=(0,m.Z)(c,2),u=d[0],p=d[1],h=null===t||void 0===t?void 0:t.products.some((function(e){var t;return null===(t=e.product)||void 0===t?void 0:t.displayedVariantTypes.length}));return(0,V.jsx)("div",{className:"space-y-5",id:"bundle-for-furn",children:(0,V.jsxs)("div",{className:"flex flex-col product-bundle-main",children:[(0,V.jsxs)("div",{style:{borderBottom:u?"unset":""},onClick:function(){return p(!u)},className:"flex cursor-pointer font-medium bundle-header items-center justify-between",children:[(0,V.jsx)("span",{children:l("common:bundleSettings.productContentTitle")}),(0,V.jsx)("span",{children:u?(0,V.jsx)(Ve.iFH,{}):(0,V.jsx)(Ve.wEH,{})})]}),(0,V.jsxs)("div",{className:"justify-between bundle-title-main hidden sm:hidden md:flex lg:flex ".concat(h?"selectable-variant":""," ").concat(u?"":"!hidden"),children:[(0,V.jsx)("span",{children:l("common:bundleSettings.parts")}),(0,V.jsx)("span",{children:l("common:bundleSettings.unitPrice")}),(0,V.jsx)("span",{children:l("common:bundleSettings.quantity")}),h?(0,V.jsx)("span",{children:l("common:bundleSettings.features")}):null,(0,V.jsx)("span",{children:l("common:bundleSettings.totalPrice")})]}),(0,V.jsx)("div",{className:"product-bundle-items-main ".concat(u?"":"hidden"),children:null===t||void 0===t?void 0:t.products.sort((function(e,t){return e.order-t.order})).map((function(e){var t,s,c,d,u,m,p,f,x,g;return 0!==e.minQuantity||null!==(t=e.product)&&void 0!==t&&t.selectedVariant.hasStock||e.setQuantity(0),(0,V.jsx)("div",{className:"flex pb-[18px] main",children:(0,V.jsx)("div",{className:"flex w-full",children:(0,V.jsxs)("div",{className:"flex justify-between items-center w-full bundle-content-main ".concat(null!==(s=e.product)&&void 0!==s&&s.displayedVariantTypes.length?"selectable-variant":""),children:[(0,V.jsxs)("div",{className:"flex content space-x-2 items-center",children:[!!o&&(0,V.jsx)(V.Fragment,{children:(null===(c=e.product)||void 0===c||null===(d=c.selectedVariant.mainImage)||void 0===d?void 0:d.image)&&(0,V.jsx)("div",{className:"relative w-[100px] img-main h-[100px] flex items-center justify-center ".concat(r?"":"bg-[#fafafa]"),children:(0,V.jsx)("div",{className:"relative w-[80px] h-[80px]",children:(0,V.jsx)(C.E,{layout:"fill",objectFit:"contain",alt:e.product.name,image:null===(u=e.product)||void 0===u?void 0:u.selectedVariant.mainImage.image,sizes:"120px",useBlur:!0})})})}),i?(0,V.jsx)("span",{className:"flex text-sm w-3/4",children:null===(m=e.product)||void 0===m?void 0:m.name}):(0,V.jsx)(w.Z,{passHref:!0,href:(null===(p=e.product)||void 0===p?void 0:p.productHref)||"",children:(0,V.jsx)("a",{className:"flex text-sm ".concat(a?"":"underline"," w-3/4"),children:null===(f=e.product)||void 0===f?void 0:f.name})})]}),(0,V.jsx)("span",{className:"content unit-price",children:e.shouldDisplayPrice?(0,V.jsxs)("div",{className:"flex space-x-2",children:[e.finalPrice!==e.sellPrice&&(0,V.jsx)("span",{className:"line-through text-gray-500",children:e.formattedSellPrice}),(0,V.jsx)("span",{children:e.formattedFinalPrice})]}):null}),(0,V.jsx)("div",{className:"content ",children:(0,V.jsx)("div",{className:"item product-quantity items-center justify-center !text-xs",children:e.isQuantityEditable?0===e.quantity?(0,V.jsx)("span",{onClick:function(){e.setQuantity(e.quantity+1),n()},className:"flex font-medium text-xs underline cursor-pointer",children:l("common:bundleSettings.addProductItem")}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("div",{className:"flex space-x-2 border border-gray-300 rounded-md px-2 items-center py-1",style:{width:"68px"},children:[(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(k.pwh,{size:14,onClick:function(){var t;null!==(t=e.product)&&void 0!==t&&t.selectedVariant.hasStock&&(e.setQuantity(e.quantity-1),n())}})}),(0,V.jsx)("span",{className:"text-xs text-[#323334]",children:e.quantity}),(0,V.jsx)("span",{className:"cursor-pointer",children:(0,V.jsx)(k.poH,{size:14,onClick:function(){var t;null!==(t=e.product)&&void 0!==t&&t.selectedVariant.hasStock&&(e.setQuantity(e.quantity+1),n())}})})]}),!(null!==(x=e.product)&&void 0!==x&&x.selectedVariant.hasStock)&&(0,V.jsx)("span",{className:"flex text-xs text-gray-400 mt-1",children:l("common:stockOutOfStock")})]}):e.quantity})}),h?(0,V.jsx)("div",{className:"flex content",children:null===(g=e.product)||void 0===g?void 0:g.displayedVariantTypes.map((function(t,a){var i,s,o=t.variantType,r=t.displayedVariantValues;return(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsx)("span",{className:"flex mb-1 text-sm text-gray-600",children:o.name}),(0,V.jsx)("div",{className:"flex flex-wrap",children:o.selectionType===se.C.COLOR?(0,V.jsx)(V.Fragment,{children:r.map((function(t){var a=t.variantValue,i=t.hasStock,s=t.isSelected;t.variant;return a.colorCode?(0,V.jsx)("div",{className:"border border-transparent ".concat(s?"border border-black":""),children:(0,V.jsx)("span",{onClick:function(){var t;null===(t=e.product)||void 0===t||t.selectVariantValue(a,!0),n()},className:"w-8 h-8 flex relative cursor-pointer bundle-variant-color ".concat(s?"selected-bundle-variant":""," ").concat(i?"stock":"out-of-stock"),style:{backgroundColor:a.colorCode}})}):a.thumbnailImage?(0,V.jsx)("div",{className:"border border-transparent ".concat(s?"border border-black":""),children:(0,V.jsx)("div",{onClick:function(){var t;null===(t=e.product)||void 0===t||t.selectVariantValue(a,!0),n()},className:"w-8 h-8 flex relative cursor-pointer bundle-variant-color ".concat(s?"selected-bundle-variant":""," ").concat(i?"stock":"out-of-stock"),children:(0,V.jsx)(C.E,{image:a.thumbnailImage,objectFit:"contain",sizes:"100px",layout:"fill"})})}):null}))}):(0,V.jsx)(V.Fragment,{children:r.length>1?(0,V.jsx)("select",{onChange:function(t){var a,i=r.find((function(e){return e.variantValue.id===t.target.value}));i&&(null===(a=e.product)||void 0===a||a.selectVariantValue(i.variantValue,!0));n()},className:"min-w-[120px] border text-sm border-gray-300 rounded-md px-2 py-1 outline-none",children:r.map((function(e){var t=e.variantValue,n=e.hasStock,a=e.isSelected;e.variant;return(0,V.jsx)("option",{disabled:!n,selected:a,value:t.id,children:t.name})}))}):null})}),(0,V.jsx)("div",{className:"text-xs mt-2",children:null===(i=e.product)||void 0===i||null===(s=i.selectedVariantValues.find((function(e){return e.variantTypeId===o.id})))||void 0===s?void 0:s.name})]})}))}):null,(0,V.jsx)("div",{className:"content",children:e.shouldDisplayPrice?0===e.quantity?"-":(0,V.jsxs)("div",{className:"flex  space-x-2",children:[e.finalPriceWithQuantity!==e.sellPriceWithQuantity&&(0,V.jsx)("span",{className:"line-through text-gray-500",children:e.formattedSellPriceWithQuantity}),(0,V.jsx)("span",{children:e.formattedFinalPriceWithQuantity})]}):null})]})})})}))})]})})})),Pe=(0,o.Pi)((function(e){var t=e.productDetail,n=e.text2,a=e.text1,i=e.text3,o=e.image2,r=e.isProductDetailBottom,l=e.image1,c=e.image3,d=e.productNameColor,p=e.productPriceColor,x=e.attributes,g=e.showQuantityBox,v=e.isBrandShow,j=e.isBigBrandName,b=e.descriptionSize,y=e.descriptionText,N=e.isDescriptionTextDecorationUnderline,C=e.isDescriptionTextFontBold,k=e.imageAspectRatio,S=e.isBuyNowButton,I=e.buyNowButtonBgColor,P=e.buyNowButtonTextColor,B=e.thumbnailPosition,R=e.thumbnailWidth,D=e.descriptionBgIsGray,E=e.isShowMoreButton,O=e.isChoicesNameShow,A=e.isWpButtonShow,F=e.wpButtonBorderColor,_=e.wpButtonTextColor,z=e.wpButtonPhoneNumber,L=e.wpMessageText,H=e.isWpEndMessageUrl,M=e.componentRenderer,Z=e.isSkuHide,U=e.isColorVariantValueFirstImage,G=e.isChoiceVariantValueFirstImage,q=e.isScrollVariantOptions,Q=e.addBasketButtonColor,J=e.addBasketButtonHoverColor,$=e.addBasketButtonBgColor,Y=e.addBasketButtonHoverTextColor,K=e.addBasketButtonBorderColor,ee=e.isAddBasketButtonMobileSticky,te=e.mobileZoomDisabled,ne=e.isProductVideoAutoPlay,ae=e.showShippingPolicy,ie=e.shippingDescriptionText,se=e.shippingPageLink,oe=e.shippingPolicyTextColor,re=e.shippingPolicyLinkedText,le=e.imageSize,ce=e.desktopZoomDisabled,de=e.showRating,me=e.whenHoveredVariantNameShow,pe=e.thumbnailCount,he=e.isArrowsDesingWithBg,fe=e.isVariantDesingRaunded,xe=e.shippingInfo,ve=e.shippingInfoDescription,je=e.shippingInfoIfSellOutOfStockDescription,be=e.priceFontWeight,Ce=e.numberToCutDescription,we=e.isNumberToCutDescription,ke=e.bgColor,Se=e.isAcceptThumbnailImageAspectRatio,Ve=e.discountRatioBg,Pe=e.discountRatioColor,Be=e.zoomPixel,Re=e.hideBreadcrumb,De=e.unitTextFontSize,Ee=e.brandFontSize,Oe=e.productNameFontSize,Ae=e.priceFontSize,Fe=e.discountPriceFontSize,_e=e.discountRateFontSize,ze=e.textColor,Le=e.arrowBgColor,He=e.arrowColor,Me=e.descriptionBgColor,Ze=e.descriptionTitleIconColor,We=e.isZoomOverlayModal,Ue=e.hideAddButton,Ge=e.hidePrice,qe=e.specialAttrText,Qe=e.specialAttrTextBgColor,Je=e.specialAttrTextColor,$e=e.productSkuColor,Ye=e.buttonBorderRadius,Ke=e.isHideNoStockVariant,Xe=e.componentIsUnderButton,et=e.showStockCount,tt=e.showProductBarcode,nt=e.isAlignImageTextCenter,at=e.ratingOnAddBasket,it=e.isShowMoreButtonCenter,st=e.bottomTabFullWidth,ot=e.productFontWeight,rt=e.brandFontWeight,lt=e.customModalAttr,ct=e.showRunningOutText,dt=e.runningOutStockCount,ut=e.specialAttrFontSize,mt=e.arrowsBorderRadius,pt=e.showMobileArrow,ht=e.isImageCover,ft=e.featuresBgColor,xt=e.featuresPadding,gt=e.isBottomTabOnlySpeacilAttr,vt=e.productOptionsLabelColor,jt=e.productOptionsInputBgColor,bt=e.productOptionsInputTextColor,yt=e.isQuantityBoxDropdown,Nt=e.hideDiscountPercentage,Ct=e.isChoiceVariantsDropdown,wt=e.isColorVariantsDropdown,kt=e.thumbnailIconColor,St=e.modelName,Tt=e.showText,Vt=e.hideBasketDrawer,It=e.shareWpButton,Pt=e.shareTgButton,Bt=e.shareButtonsIconsColor,Rt=e.shareButtonsTextColor,Dt=e.brandHTagLevel,Et=e.variantHeight,Ot=e.isBundleFurniture,At=e.isBrandNamePTag,Ft=e.isFirstGroupImage,_t=e.runningOutColor,zt=e.showBreadcrumbProductName,Lt=e.hideFavoriteIcon,Ht=e.isInnerMagnify,Mt=e.isOffersAddButtonOn,Zt=e.isSpecialAttrTabClickStack,Wt=e.isVerticalScrollSlider,Ut=e.notUnderlineLink,Gt=e.productTabsArrowDesign,qt=e.removeImageBg,Qt=e.bundleProductWithoutLink,Jt=e.isProductOffersSelected,$t=e.discountPriceTextColor,Yt=e.offerTitleColor,Kt=e.offerTitleFontSize,Xt=e.offerTitleFontWeight,en=e.offerDescriptionColor,tn=e.offerDescriptionFontSize,nn=e.offerDescriptionFontWeight,an=e.offerDiscountPercentageColor,sn=e.offerDiscountPercentageBgColor,on=e.oldDesign,rn=e.quantityBoxBgColor,ln=e.quantityBoxTextColor,cn=e.removeBundleImageBg,dn=e.hideVariantTypeName,un=e.productOptionInputBorderRadius,mn=e.productOptionInputBorderColor,pn=e.productOptionSelectSwatchIsScroll,hn=e.campaignOfferButtonBgColor,fn=e.campaignOfferButtonTextColor,xn=e.addButtonAnimationBgColor,gn=e.addButtonAnimationTextColor,vn=e.brandWithoutLink,jn=e.shareCopyButton,bn=e.smallVariantImageMobile,yn=e.hideBundleComponent,Nn=e.showVariantsInGroup,Cn=e.priceUnderSpecialAttr,wn=e.showPriceUnderSpecialAttr,kn=e.showOfferInfoText,Sn=e.tagBadges,Tn=e.customWpLink,Vn=e.isCloseProductDescription,In=e.wpButtonBgColor,Pn=e.productGroupVariantBgColor,Bn=e.productGroupVariantTextColor,Rn=e.showBundleFurnitureImage,Dn=e.breadcrumbLink,En=e.dropdownVariantBorderRadius,On=e.starRatedColor,An=e.variantHeightColor,Fn=e.variantHeightColorMobile,_n=e.isBrandUnderProductName,zn=e.isRunningOutShowBorder,Ln=e.runningOutBorderColor,Hn=e.runningOutBgColor,Mn=e.discountPriceBorderRadius,Zn=e.condPriceHide,Wn=e.isVariantDesingRaundedIsShowImage,Un=e.shareFbButton,Gn=e.showImagesGridDesign,qn=e.variantNameFontWeight,Qn=e.isFreeShippingShow,Jn=e.favoriteHearthColor,$n=e.isOpenAllTabs,Yn=e.breadcrumbLinkColor,Kn=e.firstGroupImageWidth,Xn=e.hideUnitPrice,ea=e.variantNamesFontWeight,ta=e.addBasketButtonFontWeight,na=e.colorVariantsFirstImageAspectRatio,aa=e.onlyShowGroupNames,ia=e.campaignOfferTextsColor,sa=e.freeShippingLabelBgColor,oa=e.freeShippingLabelTextColor,ra=e.buyNowButtonHoverBgColor,la=e.buyNowButtonHoverTextColor,ca=e.isAddButtonOnBundle,da=e.showOnlyColorVariantsName,ua=e.hideColorVariantName,ma=e.isStickyImagesContainer,pa=e.productOptionLabelFontWeight,ha=e.showTieredDiscountProducts,fa=e.tieredDiscountProductTextColor,xa=e.tieredDiscountProductBgColor,ga=e.tieredDiscountProductCheckColor,va=e.tieredDiscountButtonBgColor,ja=e.tieredDiscountButtonText,ba=e.tieredDiscountButtonTextColor,ya=e.isSliderTabs,Na=e.bundleMainImageSize,Ca=e.showBuyNowButtonForce,wa=e.productCodeFontWeight,ka=e.isImageSize,Sa=e.imageType,Ta=X.Z.getInstance();s.useEffect((function(){Ta.setSearchShow(!1),document.documentElement.style.overflow="unset"}));var Va=s.useState(null),Ia=(0,m.Z)(Va,2),Pa=Ia[0],Ba=Ia[1],Ra=s.useState(!1),Da=(0,m.Z)(Ra,2),Ea=Da[0],Oa=Da[1],Aa=s.useState(!1),Fa=(0,m.Z)(Aa,2),_a=Fa[0],za=Fa[1],La=s.useState(!0),Ha=(0,m.Z)(La,2),Ma=Ha[0],Za=Ha[1],Wa=(0,ge.Z)(W.tq),Ua=(0,m.Z)(Wa,1)[0];s.useEffect((function(){(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qa();case 2:Za(!1);case 3:case"end":return e.stop()}}),e)})))()}),[t.selectedVariant,t]),s.useEffect((function(){(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ga();case 2:Za(!1);case 3:case"end":return e.stop()}}),e)})))()}),[t]),s.useEffect((function(){t.setShowVariantsInGroup(!!Nn)}),[t,Nn]);var Ga=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.selectedVariant.bundleSettings){e.next=3;break}return e.next=3,t.initBundleProducts();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qa=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.selectedVariant.bundleSettings){e.next=3;break}return e.next=3,t.getBundleProductsOfVariant(t.selectedVariant);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Qa="\n  ".concat(!!Q&&".product-detail-page-buy-box .add-to-cart {color: ".concat(Q,"}"),"\n  ").concat(!!$&&".product-detail-page-buy-box .add-to-cart {background-color: ".concat($,"}"),"\n  ").concat(!!J&&".product-detail-page-buy-box .add-to-cart:hover {background-color: ".concat(J,"; color:").concat(Y," }"),";\n  ");s.useEffect((function(){setTimeout((function(){var e=document.querySelector(".slider-main__main .slick-list");if(e){var n=e.style.getPropertyValue("height"),a=parseInt(n.replace("px",""));a="".concat((a+=70).toString(),"px"),Ba(a)}if(t.selectedVariant.images&&t.selectedVariant.images.length<=3){var i=document.querySelector(".slider__main__h");if(null!==i&&void 0!==i&&i.clientHeight){var s=document.querySelector(".product-detail-page-slider-main");s&&(s.style.minHeight="".concat((i.clientHeight+70).toString(),"px"))}}}),1e3)}),[pe,R]);var Ja="\n  .option-label {\n    color: ".concat(vt||"#3a3a3a","\n  }\n  .option-text-input {\n    color: ").concat(bt||"#333","\n  }\n  .option-text-input {\n    background-color: ").concat(jt||"#fff","\n  }\n  .option-text-input {\n    border-color: ").concat(mn||"#cccccc","\n  }\n  .option-text-input {\n    border-radius: ").concat((null===un||void 0===un?void 0:un.value)||0,"px !important\n  }\n  .option-text-area-input {\n    color: ").concat(bt||"#333","\n  }\n  .option-text-area-input {\n    background-color: ").concat(jt||"#fff","\n  }\n  .option-text-area-input {\n    border-color: ").concat(mn||"#cccccc","\n  }\n  .option-text-area-input {\n    border-radius: ").concat((null===un||void 0===un?void 0:un.value)||0,"px !important\n  }\n  .custom-date-picker {\n    color: ").concat(bt||"#333","\n  }\n  .custom-date-picker {\n    background-color: ").concat(jt||"#fff","\n  }\n  .custom-date-picker {\n    border-color: ").concat(mn||"#cccccc","\n  }\n  .custom-date-picker  {\n    border-radius: ").concat((null===un||void 0===un?void 0:un.value)||0,"px !important\n  }\n  .react-select__control {\n    background-color: ").concat(jt||"#fff","\n  }\n  .react-select__control {\n    border-color: ").concat(mn||"#cccccc"," !important\n  }\n  .react-select__control {\n    border-radius: ").concat((null===un||void 0===un?void 0:un.value)||0,"px !important\n  }\n  ");return(0,V.jsxs)("div",{style:ke?{backgroundColor:ke}:{},children:[(0,V.jsx)("style",{children:Qa}),(!!vt||!!jt||!!bt||!!mn||!!un)&&(0,V.jsx)("style",{children:Ja}),!!pa&&(0,V.jsx)("style",{children:".option-label {\n          font-weight: ".concat(pa.value,"\n        }\n        ")}),(0,V.jsxs)("div",{className:"container mx-auto mb-8",children:[(0,V.jsx)("div",{className:"breadcrumbs ".concat(t.categories.length>0&&t.categories[0].path.length>0&&!Re?"mb-4 pt-4 px-4":"mb-0 sm:mb-4 md:mb-4 lg:mb-4 xl:mb-4"),children:Re?null:(0,V.jsxs)("ul",{children:[!!Dn&&(0,V.jsx)("li",{className:"breadcrumb-item ",children:(0,V.jsx)(w.Z,{passHref:!0,href:Dn.href,children:(0,V.jsxs)("a",{style:Yn?{color:Yn}:{},className:"flex items-center",children:[Dn.label,(0,V.jsx)("span",{className:"ml-2",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})})]})})}),t.categories.length>0&&t.categories[0].path.map((function(e,n){return(0,V.jsx)("li",{className:"breadcrumb-item ",children:(0,V.jsx)(w.Z,{passHref:!0,href:e.href,children:(0,V.jsxs)("a",{className:"flex items-center",style:Yn?{color:Yn}:{},children:[e.name,n!==t.categories[0].path.length-1&&(0,V.jsx)("span",{className:"ml-2",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})})]})})},n)})),!!zt&&(0,V.jsx)("li",{className:"breadcrumb-item ",children:(0,V.jsxs)("span",{style:Yn?{color:Yn}:{},className:"flex items-center",children:[(0,V.jsx)("span",{className:"flex",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})}),(0,V.jsx)("span",{className:"ml-2 text-[#818181]",children:t.name})]})})]})}),(0,V.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3",children:[(0,V.jsx)("div",{className:"product-detail-page-slider-main col-span-2 px-0 sm:px-4 md:px-4 lg:px-4",style:Pa?{minHeight:Pa}:{},children:(0,V.jsx)("div",{className:ma?We&&_a?"":"product-images-container-sticky":"",children:!Gn||Ua?(0,V.jsx)(f.Z,{productDetail:t,imageAspectRatio:k,thumbnailPosition:B,thumbnailWidth:R,mobileZoomDisabled:te,desktopZoomDisabled:ce,isProductVideoAutoPlay:ne,thumbnailCount:pe,isArrowsDesingWithBg:he,isAcceptThumbnailImageAspectRatio:Se,zoomPixel:Be,arrowBgColor:Le,arrowColor:He,isZoomOverlayModal:We,showMobileArrow:pt,arrowsBorderRadius:mt,isImageCover:ht,thumbnailIconColor:kt,isInnerMagnify:Ht,isVerticalScrollSlider:Wt,removeImageBg:qt,tagBadges:Sn,isFreeShippingShow:Qn,freeShippingLabelBgColor:sa,freeShippingLabelTextColor:oa,isActiveImageZoomModalF:function(e){return za(e)},isImageSize:ka,imageType:Sa}):(0,V.jsx)(Te,{isProductVideoAutoPlay:ne,images:t.selectedVariant.images,productDetail:t,isImageCover:ht,imageAspectRatio:k,isZoomOverlayModal:We,desktopZoomDisabled:ce,mobileZoomDisabled:te})})}),(0,V.jsx)(ye,{text2:n,text1:a,text3:i,image1:l,image2:o,image3:c,productDetail:t,productPriceColor:p,productNameColor:d,isProductDetailBottom:r,attributes:x,showQuantityBox:g,isBigBrandName:j,isBrandShow:v,descriptionText:y,descriptionSize:b,isDescriptionTextDecorationUnderline:N,isDescriptionTextFontBold:C,isBuyNowButton:S,buyNowButtonBgColor:I,buyNowButtonTextColor:P,thumbnailPosition:B,descriptionBgIsGray:D,isShowMoreButton:E,isChoicesNameShow:O,isWpButtonShow:A,wpButtonBorderColor:F,wpButtonTextColor:_,wpButtonPhoneNumber:z,wpMessageText:L,isWpEndMessageUrl:H,componentRenderer:M,isSkuHide:Z,imageAspectRatio:k,isColorVariantValueFirstImage:U,isChoiceVariantValueFirstImage:G,isScrollVariantOptions:q,isAddBasketButtonMobileSticky:ee,addBasketButtonBorderColor:K,showShippingPolicy:ae,shippingDescriptionText:ie,shippingPageLink:se,shippingPolicyTextColor:oe,shippingPolicyLinkedText:re,imageSize:le,showRating:de,ratingOnAddBasket:at,whenHoveredVariantNameShow:me,isVariantDesingRaunded:fe,shippingInfo:xe,shippingInfoDescription:ve,shippingInfoIfSellOutOfStockDescription:je,priceFontWeight:be,numberToCutDescription:Ce,isNumberToCutDescription:we,discountRatioBg:Ve,discountRatioColor:Pe,zoomPixel:Be,unitTextFontSize:De,brandFontSize:Ee,productNameFontSize:Oe,priceFontSize:Ae,discountPriceFontSize:Fe,discountRateFontSize:_e,textColor:ze,arrowBgColor:Le,descriptionBgColor:Me,descriptionTitleIconColor:Ze,hideAddButton:Ue,hidePrice:Ge,specialAttrText:qe,specialAttrTextBgColor:Qe,specialAttrTextColor:Je,productSkuColor:$e,buttonBorderRadius:Ye,isHideNoStockVariant:Ke,componentIsUnderButton:Xe,showStockCount:et,showProductBarcode:tt,isAlignImageTextCenter:nt,brandFontWeight:rt,productFontWeight:ot,customModalAttr:lt,showRunningOutText:ct,runningOutStockCount:dt,specialAttrFontSize:ut,featuresBgColor:ft,featuresPadding:xt,isBottomTabOnlySpeacilAttr:gt,isQuantityBoxDropdown:yt,hideDiscountPercentage:Nt,isChoiceVariantsDropdown:Ct,isColorVariantsDropdown:wt,modelName:St,showText:Tt,hideBasketDrawer:Vt,shareWpButton:It,shareTgButton:Pt,shareButtonsIconsColor:Bt,shareButtonsTextColor:Rt,brandHTagLevel:Dt,variantHeight:Et,isBundleFurniture:Ot,isEditableItem:Ea,isBrandNamePTag:At,isFirstGroupImage:Ft,runningOutColor:_t,hideFavoriteIcon:Lt,isInnerMagnify:Ht,isOffersAddButtonOn:Mt,isSpecialAttrTabClickStack:Zt,notUnderlineLink:Ut,productTabsArrowDesign:Gt,bundleProductWithoutLink:Qt,isProductOffersSelected:Jt,discountPriceTextColor:$t,isLoadingBundle:Ma,offerTitleColor:Yt,offerTitleFontSize:Kt,offerTitleFontWeight:Xt,offerDescriptionColor:en,offerDescriptionFontSize:tn,offerDescriptionFontWeight:nn,offerDiscountPercentageColor:an,offerDiscountPercentageBgColor:sn,oldDesign:on,showOfferInfoText:kn,quantityBoxBgColor:rn,quantityBoxTextColor:ln,removeBundleImageBg:cn,hideVariantTypeName:dn,productOptionSelectSwatchIsScroll:pn,campaignOfferButtonBgColor:hn,campaignOfferButtonTextColor:fn,addButtonAnimationBgColor:xn,addButtonAnimationTextColor:gn,brandWithoutLink:vn,shareCopyButton:jn,smallVariantImageMobile:bn,hideBundleComponent:yn,priceUnderSpecialAttr:Cn,showPriceUnderSpecialAttr:wn,customWpLink:Tn,isCloseProductDescription:Vn,wpButtonBgColor:In,productGroupVariantBgColor:Pn,productGroupVariantTextColor:Bn,dropdownVariantBorderRadius:En,starRatedColor:On,variantHeightColor:An,variantHeightColorMobile:Fn,isBrandUnderProductName:_n,isRunningOutShowBorder:zn,runningOutBorderColor:Ln,runningOutBgColor:Hn,discountPriceBorderRadius:Mn,condPriceHide:Zn,isVariantDesingRaundedIsShowImage:Wn,shareFbButton:Un,variantNameFontWeight:qn,favoriteHearthColor:Jn,isOpenAllTabs:$n,firstGroupImageWidth:Kn,hideUnitPrice:Xn,variantNamesFontWeight:ea,addBasketButtonFontWeight:ta,colorVariantsFirstImageAspectRatio:na,onlyShowGroupNames:aa,campaignOfferTextsColor:ia,buyNowButtonHoverBgColor:ra,buyNowButtonHoverTextColor:la,isAddButtonOnBundle:ca,showOnlyColorVariantsName:da,hideColorVariantName:ua,showTieredDiscountProducts:ha,tieredDiscountProductTextColor:fa,tieredDiscountProductBgColor:xa,tieredDiscountProductCheckColor:ga,tieredDiscountButtonBgColor:va,tieredDiscountButtonText:ja,tieredDiscountButtonTextColor:ba,bundleMainImageSize:Na,showBuyNowButtonForce:Ca,productCodeFontWeight:wa})]}),t.selectedVariant.bundleSettings&&!yn&&(0,V.jsx)("div",{className:"mt-6 mb-6",children:!!Ot&&(0,V.jsx)(Ie,{bundleSettings:t.selectedVariant.bundleSettings,onChangeItem:function(){return Oa(!0)},notUnderlineLink:Ut,bundleProductWithoutLink:Qt,showBundleFurnitureImage:Rn,removeBundleImageBg:cn})}),t.offers&&!Mt&&(0,V.jsx)("div",{className:"mt-6 mb-6",children:(0,V.jsx)(ue,{productDetail:t,offers:t.offers,isProductOffersSelected:Jt,offerTitleColor:Yt,offerTitleFontSize:Kt,offerTitleFontWeight:Xt,offerDescriptionColor:en,offerDescriptionFontSize:tn,offerDescriptionFontWeight:nn,offerDiscountPercentageColor:an,offerDiscountPercentageBgColor:sn,oldDesign:on,campaignOfferButtonBgColor:hn,campaignOfferButtonTextColor:fn,campaignOfferTextsColor:ia})}),(!!r||!!gt)&&(0,V.jsx)(Ne,{productDetail:t,attributes:x,isShowMoreButton:E,numberToCutDescription:Ce,isNumberToCutDescription:we,isShowMoreButtonCenter:it,bottomTabFullWidth:st,isBottomTabOnlySpeacilAttr:gt,descriptionTitleIconColor:Ze,isSliderTabs:ya})]})]})})),Be=n(27762),Re=n(732),De=n(30719),Ee=n(71911),Oe=n(92777),Ae=n(82262),Fe=n(68949),_e=(0,o.Pi)((function(e){var t=e.viewModel;return s.useEffect((function(){return window.addEventListener("resize",t.handleResize),document.addEventListener("readystatechange",(function(e){"complete"===e.target.readyState&&t.handleResize()})),t.handleResize(),function(){return window.removeEventListener("resize",t.handleResize)}}),[]),(0,V.jsxs)("style",{children:[" ",t.styleVideoCss," "]})})),ze=function(){function e(){(0,Oe.Z)(this,e),(0,a.Z)(this,"styleVideoCss",void 0),this.styleVideoCss="",(0,Fe.ky)(this)}return(0,Ae.Z)(e,[{key:"handleResize",value:function(){var e,t=(null===(e=document.querySelector(".category__list__main .category-products-image"))||void 0===e?void 0:e.clientHeight)||0;t&&(this.styleVideoCss=".category__list__main .product-slider-video-container { height : ".concat(t,"px !important  }"))}}]),e}();function Le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Le(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me=(0,o.Pi)((function(e){var t,n,a,i,o,r,l,c,d,p,f,v=e.productDetail,b=e.hideVariantOptions,y=e.productNameColor,N=e.productPriceColor,T=e.showColors,I=e.isSquare,B=e.isImageContain,R=e.isBigBrandName,D=e.addBasketModalShow,E=e.isDrawerOpen,O=e.isCenter,A=e.isBrandShow,_=e.imageAspectRatio,L=e.addBasketModalShowWhenHovered,Z=e.secondImageShow,W=e.addBasketButtonPosition,U=e.isVideoAutoPlay,G=e.isVideoControlsHide,q=e.showRating,Q=e.showReviewCount,J=e.addBasketButtonBorderColor,$=e.addBasketButtonTextColor,Y=e.addBasketButtonBgColor,K=e.isAddBasketGoDetailPage,ee=e.showVariantOptionsName,te=e.brandFontWeight,ie=e.priceFontWeight,oe=e.isImageSize,re=e.imageType,le=e.isMobileProductImagesSwiper,ce=e.hideDiscountPercentage,de=e.isFreeShippingShow,ue=e.productNameFontSize,me=e.isPriceMainMinHeightFix,pe=e.hidePrice,xe=e.forceAddToCart,ge=e.showTag,ve=e.tagBgColor,je=e.tagColor,be=e.showTagsText,ye=e.buttonBorderRadius,Ne=e.buttonHoverBgColor,Ce=e.priceFontSize,we=e.isSingleLineProductName,ke=e.discountRatioBg,Se=e.discountRatioColor,Te=e.showPriceRange,Ve=e.htagLevel,Ie=e.isProductNamePTag,Pe=e.showModelTags,Be=e.modelTagTexts,Oe=e.isCenterTag,Ae=e.brandHtagLevel,Fe=e.isBrandNamePTag,_e=e.isColorVariantValueFirstImage,Le=e.isUnitPriceUnderProductName,Me=e.unitPriceFontSize,Ze=e.unitPriceFontWeight,We=e.hideUnitPrice,Ue=e.hideOverlay,Ge=e.borderColor,qe=e.showBorder,Qe=e.cartBorderRadius,Je=e.isBorderHoverEffect,$e=e.isColorVariantValueFirstImageModal,Ye=e.isExistSelectedVariantUnitPriceText,Ke=e.productNameFontWeight,Xe=e.discountPriceTextColor,et=e.addButtonAnimationBgColor,tt=e.addButtonAnimationTextColor,nt=e.addButtonHeight,at=e.isCustomProductNameHeight,it=e.productNameHeight,st=e.isCustomerReviewsStarAlignment,ot=e.productNameHeightMobile,rt=e.isMob,lt=e.showRatingPoint,ct=e.tagBadges,dt=e.condPriceHide,ut=e.variantsContainerMinHeight,mt=e.discountPriceBorderRadius,pt=e.rateStarColor,ht=e.isVariantDesingRaunded,ft=e.modelTagColor,xt=e.modelTagBgColor,gt=e.freeShippingLabelBgColor,vt=e.freeShippingLabelTextColor,jt=e.hideOutOfStock,bt=e.variantsSwatchSize,yt=e.tagImageMobileLeft,Nt=e.isUnderModelTagVariants,Ct=e.shippingInfo,wt=e.shippingInfoDescription,kt=e.shippingInfoIfSellOutOfStockDescription,St=e.variantCount,Tt=e.showQuantityBar,Vt=s.useState(!1),It=(0,m.Z)(Vt,2),Pt=It[0],Bt=It[1],Rt=s.useState(""),Dt=(0,m.Z)(Rt,2),Et=Dt[0],Ot=Dt[1],At=s.useState({show:!1,productId:""}),Ft=(0,m.Z)(At,2),_t=Ft[0],zt=Ft[1],Lt=s.useState(1),Ht=(0,m.Z)(Lt,2),Mt=Ht[0],Zt=Ht[1],Wt=s.useState(!1),Ut=(0,m.Z)(Wt,2),Gt=Ut[0],qt=Ut[1],Qt=s.useState(!0),Jt=(0,m.Z)(Qt,2),$t=Jt[0],Yt=Jt[1],Kt=fe.Y.getSalesChannelId(),Xt=null===(t=v.salesChannels)||void 0===t?void 0:t.find((function(e){return e.id===Kt})),en=(0,g.o)(),tn=X.Z.getInstance(),nn=(0,ae.Z)(!1),an=(0,m.Z)(nn,2),sn=(an[0],an[1]),on=s.useMemo((function(){return new ze}),[]),rn=null===(n=v.campaigns)||void 0===n?void 0:n.some((function(e){return e.campaign.type===j.LL.FREE_SHIPPING})),ln=tn.b2bSettings,cn=ln.isOnlyCustomersShowText,dn=ln.onlyCustomersText,un=ln.underlineText,mn=ln.onlyCustomerTextFontSize,pn=ln.onlyCustomerTextFontWeight,hn=v.variants.reduce((function(e,t){return e.finalPrice<t.finalPrice?e:t})),fn=v.variants.reduce((function(e,t){return e.finalPrice>t.finalPrice?e:t})),xn=(0,ne.Z)({tags:v.tags,options:null===(a=v.productOptionSet)||void 0===a?void 0:a.displayedOptions}),gn=(0,he.Z)({tags:v.tags});var vn=(0,x.useRouter)(),jn=s.useRef(null),bn=null===ct||void 0===ct?void 0:ct.filter((function(e){var t;return null===(t=v.tags)||void 0===t?void 0:t.find((function(t){return t.name===e.tag}))})),yn=0!==v.selectedVariant.stock&&!!Ct&&!!wt,Nn=0===v.selectedVariant.stock&&!!Ct&&!!kt&&v.selectedVariant.sellIfOutOfStock,Cn=function(e){var t=e.variant,n=e.displayedVariantValues,a=e.variantData;if(_e){var i,s,o=a.images?null===(i=a.images.find((function(e){return!e.isVideo})))||void 0===i?void 0:i.image:null;return(0,V.jsx)("div",{onMouseEnter:function(){v.selectVariantValue(t,!0),clearTimeout(jn.current)},onMouseLeave:function(){n&&n.length&&(jn.current=setTimeout((function(){v.variants[0].variantValues.length&&v.variants.length&&v.selectVariantValue(v.variants[0].variantValues[v.variants[0].variantValues.length-1],!0)}),1500))},className:"product-variant-choice-image mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1  relative ".concat(I?"choice-circle":"choice-square"),children:(null===(s=a.mainImage)||void 0===s?void 0:s.image)&&(0,V.jsx)(C.E,{image:a.mainImage.isVideo&&o?o:a.mainImage.image,objectFit:"contain",sizes:"100px",layout:"fill",alt:t.name})})}var r=(0,V.jsx)("div",{onClick:function(e){rt&&(e.preventDefault(),e.stopPropagation())},onMouseEnter:function(){v.selectVariantValue(t,!0),clearTimeout(jn.current)},onMouseLeave:function(){rt||n&&n.length&&(jn.current=setTimeout((function(){if(v.variants[0].variantValues.length&&v.variants.length){var e=v.variants[0].variantValues.findIndex((function(e){return!!e.colorCode||!!e.thumbnailImage}));v.selectVariantValue(v.variants[0].variantValues[-1!==e?e:0],!0)}}),1500))},className:"product-variant-choice-bg mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1 ".concat(I?"choice-circle":"choice-square"),style:{backgroundColor:t.colorCode||""}});return t.thumbnailImage&&(r=(0,V.jsx)("div",{onClick:function(e){rt&&(e.preventDefault(),e.stopPropagation())},onMouseEnter:function(){v.selectVariantValue(t,!0),clearTimeout(jn.current)},onMouseLeave:function(){n&&n.length&&(jn.current=setTimeout((function(){v.variants[0].variantValues.length&&v.variants.length&&v.selectVariantValue(v.variants[0].variantValues[v.variants[0].variantValues.length-1],!0)}),1500))},className:"product-variant-choice-image mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1  relative ".concat(I?"choice-circle":"choice-square"),children:(0,V.jsx)(C.E,{image:t.thumbnailImage,objectFit:"contain",sizes:"100px",layout:"fill",alt:t.name})})),r},wn=!v.hasStock,kn=(0,S.$)().t,Sn=v.selectedVariant.bundleSettings,Tn=function(e){if(e.preventDefault(),wn)return!1;if(Sn)vn.push(v.productHref);else{var t=v.displayedVariantTypes.every((function(e){return 1===e.displayedVariantValues.length}));if(xe&&t&&!v.productOptionSetId)Vn();else if(v.hasVariant||v.productOptionSetId)if(K)vn.push(v.productHref);else{if(v.groupVariantsByVariantTypeId&&1===v.displayedVariantTypes.length&&!v.productOptionSetId)return void Vn();Bn()}else Vn()}},Vn=function(){var e=(0,u.Z)(h().mark((function e(){var t,n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Bt(!0),Ot(kn("common:adding")),t=Mt||1,e.next=5,en.cartStore.addItem(v.selectedVariant,v,t);case 5:n=e.sent,setTimeout((function(){Ot((0,V.jsx)(F.HhX,{size:25}))}),300),setTimeout((function(){Bt(!1)}),1e3),n.success&&E&&tn.setCartVisible(!0),Zt(1),!n.success&&(0,z.Le)(n.response);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),In=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,v.getProductOptionSet();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Pn=function(){if(v.variants[0].variantValues.length&&v.variants.length){var e=v.variants[0].variantValues.findIndex((function(e){return!!e.colorCode||!!e.thumbnailImage}));v.selectVariantValue(v.variants[0].variantValues[-1!==e?e:0],!0)}},Bn=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,In();case 2:(0,P._1)({customUI:function(e){var t=e.onClose;return(0,V.jsx)("div",{className:"add-to-basket-modal relative",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:function(){Pn(),t()},className:"absolute top-2 right-2 text-gray-600 cursor-pointer hover:text-gray-900 modal-close-button-product",children:(0,V.jsx)(F.FU5,{size:25})}),(0,V.jsx)(Re.Z,{router:vn,onClose:function(){Pn(),t()},productDetail:v,isDrawerOpen:E,isCategoryPage:!0,isColorVariantValueFirstImageModal:$e,imageAspectRatio:_,discountRatioBg:ke,discountRatioColor:Se,productPriceColor:N,isVariantDesingRaunded:ht,productNameColor:y,buttonBorderRadius:ye})]})})},overlayClassName:"add-to-basket-overlay-modal",onClickOutside:function(){Pn()},onKeypressEscape:function(){Pn()}});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rn=function(e){var t,n,a;return e.isVideo?(0,V.jsx)("video",{controls:!G,autoPlay:!!U&&Gt,loop:!!U,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",poster:null===(n=e.image)||void 0===n?void 0:n.src,preload:"none",children:(0,V.jsx)("source",{src:null===(a=e.image)||void 0===a?void 0:a.src})},"".concat(null===(t=e.image)||void 0===t?void 0:t.src,"-").concat(Gt?Math.floor(4*Math.random()):"")):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:e.image,alt:v.name,useBlur:!tn.isBlurRemove,objectFit:B?"cover":"contain",width:(0,z.yU)(_).width,height:(0,z.yU)(_).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 360px,  (max-width: 768px) 216px, 400px"})},Dn=function(){return(0,V.jsx)("div",{style:He({textAlign:O?"center":"left",fontSize:(null===Me||void 0===Me?void 0:Me.value)||12,fontWeight:(null===Ze||void 0===Ze?void 0:Ze.value)||400},Ye?{minHeight:16}:{}),className:"text-xs font-normal text-gray-600 whitespace-nowrap ",children:xn.useFormat||gn.hasLengthFormat?"":v.selectedVariantUnitPriceText})},En=function(e){if(bn){for(var t=0,n=0;n<e;n++)t+=bn[n].imageHeight.value+15;return t}return 0},On=".add-to-cart-overlay .stock:hover { background-color: ".concat(Ne," !important } "),An="\n  .product-list-swiper.swiper__".concat(v.selectedVariant.id," .swiper-slide:not(.swiper-slide-active) {\n    display: ").concat($t?"none":"block",";\n  }\n\n  .product-list-swiper.swiper__").concat(v.selectedVariant.id," .swiper-slide:not(.swiper-slide-next) {\n    display: ").concat("block !important",";\n  }\n\n  .product-list-swiper.swiper__").concat(v.selectedVariant.id," .swiper-slide {\n    display: ").concat("block !important",";\n  }\n  ");return(0,V.jsxs)(V.Fragment,{children:[!!rt&&!!le&&(0,V.jsx)("style",{children:An}),!!Ne&&(0,V.jsxs)("style",{children:[" ",On]}),(0,V.jsx)(w.Z,{passHref:!0,href:v.productHref,children:(0,V.jsx)("a",{className:"".concat(qe?"grid":""),children:(0,V.jsxs)("div",{style:qe?{border:"1px solid ".concat(Ge||"#000"),padding:"12px",borderRadius:Qe?Qe.value:0}:{},className:"relative overflow-hidden product-container ".concat(D?"product-list-item":""," ").concat(rt?"mobile":""," ").concat(qe&&Je?"border-effect":""),children:[!!bn&&bn.map((function(e,t){return(0,V.jsx)("div",{style:{top:0===t?8:En(t),left:rt&&yt?yt.value:8},className:"absolute z-50",children:(0,V.jsx)("div",{style:{width:e.imageWidth.value,height:e.imageHeight.value},className:"relative",children:(0,V.jsx)(C.E,{image:e.image,layout:"fill",sizes:"200px",objectFit:"contain"})})})})),v.selectedVariant.mainImage?rt&&le?(0,V.jsx)(De.tq,{pagination:{clickable:!0,bulletClass:"swiper-pagination-bullet",renderBullet:function(e,t){return'<span class="'.concat(t,' feature-pagination"></span>')}},lazy:!0,modules:[Ee.tl,Ee.oM],slidesPerView:1,spaceBetween:0,preloadImages:!0,className:"product-list-swiper relative swiper__".concat(v.selectedVariant.id),onSlideChangeTransitionEnd:function(e){var t,n;(Yt(!1),null!==(t=v.selectedVariant.images)&&void 0!==t&&t.length)&&(null!==(n=v.selectedVariant.images)&&void 0!==n&&n.length&&v.selectedVariant.images[e.activeIndex].isVideo?qt(!0):qt(!1))},children:v.selectedVariant.images&&v.selectedVariant.images.map((function(e){var t;return(0,V.jsx)(De.o5,{children:(0,V.jsxs)("div",{className:"relative ".concat(e.isVideo?"product-slider-video-container":"product-slider-image-container"),onMouseEnter:function(){rt||Z&&(zt({show:!0,productId:v.selectedVariant.id}),on.handleResize())},onMouseLeave:function(){rt||Z&&(zt({show:!1,productId:""}),on.handleResize())},children:[wn&&!jt&&(0,V.jsx)("div",{className:"stock-status ".concat(Ue?"bg-transparent":""),children:(0,V.jsx)("span",{className:"absolute top-0 right-0",children:kn("common:soldOut")})}),rn&&de&&(0,V.jsx)("div",{className:"free-shipping-label",children:(0,V.jsx)("span",{style:He({color:vt||"#fff"},gt?{backgroundColor:gt}:{}),className:"absolute bottom-0 right-0",children:kn("common:freeShipping")})}),Rn(e),!!L&&!pe&&(0,V.jsx)("div",{className:"add-to-cart-overlay absolute mb-0 bottom-3 overlay-hover",style:{marginBottom:0},children:Pt?(0,V.jsx)("button",{style:{borderRadius:null!==(t=null===ye||void 0===ye?void 0:ye.value)&&void 0!==t?t:0,backgroundColor:et||"#ededed",color:tt||"#000"},className:"out-of-stock",children:wn?kn("common:outOfStock"):Et}):(0,V.jsx)("button",{style:wn?{borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44}:{borderColor:J||"#000",color:$||"#232323",backgroundColor:Y||"#fff",borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44},className:"".concat(wn&&!Pt?"out-of-stock":"stock"),onClick:function(e){Tn(e)},children:kn(wn?"common:outOfStock":"common:addBasket")})})]})})}))}):(0,V.jsxs)("div",{className:"relative ".concat(_t.show&&_t.productId===v.selectedVariant.id&&v.selectedVariant.images&&v.selectedVariant.images.length>0&&v.selectedVariant.images[1]?v.selectedVariant.images[1].isVideo?"product-slider-video-container":"product-slider-image-container":v.selectedVariant.mainImage.isVideo?"product-slider-video-container":"product-slider-image-container"),onMouseEnter:function(){rt||Z&&(zt({show:!0,productId:v.selectedVariant.id}),on.handleResize())},onMouseLeave:function(){rt||Z&&(zt({show:!1,productId:""}),on.handleResize())},children:[wn&&!jt&&(0,V.jsx)("div",{className:"stock-status ".concat(Ue?"bg-transparent":""),children:(0,V.jsx)("span",{className:"absolute top-0 right-0",children:kn("common:soldOut")})}),rn&&de&&(0,V.jsx)("div",{className:"free-shipping-label",children:(0,V.jsx)("span",{style:He({color:vt||"#fff"},gt?{backgroundColor:gt}:{}),className:"absolute bottom-0 right-0",children:kn("common:freeShipping")})}),function(){var e,t,n,a,i,s;return v.selectedVariant.mainImage?_t.show&&_t.productId===v.selectedVariant.id?v.selectedVariant.images&&v.selectedVariant.images.length>0&&v.selectedVariant.images[1]?v.selectedVariant.images[1].isVideo?(0,V.jsx)("video",{controls:!G,autoPlay:!!U,loop:!!U,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(t=v.selectedVariant.images[1].image)||void 0===t?void 0:t.src})},null===(e=v.selectedVariant.images[1].image)||void 0===e?void 0:e.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:v.selectedVariant.images[1].image,alt:v.name,useBlur:!tn.isBlurRemove,objectFit:B?"cover":"contain",width:(0,z.yU)(_).width,height:(0,z.yU)(_).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 200px,  (max-width: 768px) 400px, ".concat(oe&&re?"".concat(re,"px"):"400px")}):v.selectedVariant.mainImage.isVideo?(0,V.jsx)("video",{controls:!G,autoPlay:!!U,loop:!!U,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(a=v.selectedVariant.mainImage.image)||void 0===a?void 0:a.src})},null===(n=v.selectedVariant.mainImage.image)||void 0===n?void 0:n.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:v.selectedVariant.mainImage.image,alt:v.name,useBlur:!tn.isBlurRemove,objectFit:B?"cover":"contain",width:(0,z.yU)(_).width,height:(0,z.yU)(_).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 200px,  (max-width: 768px) 400px, ".concat(oe&&re?"".concat(re,"px"):"400px")}):v.selectedVariant.mainImage.isVideo?(0,V.jsx)("video",{controls:!G,autoPlay:!!U,loop:!!U,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(s=v.selectedVariant.mainImage.image)||void 0===s?void 0:s.src})},null===(i=v.selectedVariant.mainImage.image)||void 0===i?void 0:i.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:v.selectedVariant.mainImage.image,alt:v.name,useBlur:!tn.isBlurRemove,objectFit:B?"cover":"contain",width:(0,z.yU)(_).width,height:(0,z.yU)(_).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 200px,  (max-width: 768px) 400px, ".concat(oe&&re?"".concat(re,"px"):"400px")}):null}(),!!L&&!pe&&(0,V.jsx)("div",{className:"add-to-cart-overlay absolute mb-0 bottom-3 overlay-hover",style:{marginBottom:0},children:Pt?(0,V.jsx)("button",{style:{borderRadius:null!==(i=null===ye||void 0===ye?void 0:ye.value)&&void 0!==i?i:0,backgroundColor:et||"#ededed",color:tt||"#000"},className:"out-of-stock",children:wn?kn("common:outOfStock"):Et}):(0,V.jsx)("button",{style:wn?{borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44}:{borderColor:J||"#000",color:$||"#232323",backgroundColor:Y||"#fff",borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44},className:"".concat(wn&&!Pt?"out-of-stock":"stock"),onClick:function(e){Tn(e)},children:kn(wn?"common:outOfStock":"common:addBasket")})})]}):(0,V.jsx)("div",{className:"product-no-image"}),(0,V.jsxs)("div",{className:" category-products-info-main product-list-item-info relative",children:[!!D&&!pe&&W&&W===H.qF.TOP&&(0,V.jsx)("div",{className:"add-to-cart-overlay",children:Pt?(0,V.jsx)("button",{style:{borderRadius:null!==(o=null===ye||void 0===ye?void 0:ye.value)&&void 0!==o?o:0,backgroundColor:et||"#ededed",color:tt||"#000"},className:"out-of-stock",children:wn?kn("common:outOfStock"):Et}):(0,V.jsxs)("div",{className:"flex",children:[!!Tt&&!v.hasVariant&&(0,V.jsxs)("div",{className:"hidden sm:hidden  md:flex mr-2 category-list-quantity-boxes add-basket-modal-product-detail-quantity-boxes",children:[(0,V.jsx)("div",{onClick:function(e){var t;e.preventDefault(),e.stopPropagation();var n=null!==(t=null===Xt||void 0===Xt?void 0:Xt.minQuantityPerCart)&&void 0!==t?t:1;Mt>n&&Zt(Mt-1>1?Mt-1:1)},style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity-box ".concat(v.hasStock&&v.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.pwh,{size:12})}),(0,V.jsx)("div",{style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity",children:(0,V.jsx)("input",{style:{backgroundColor:"#fff",color:"#000"},type:"number",className:"quantity-input",value:Mt,onClick:function(e){e.preventDefault(),e.stopPropagation()},onChange:function(e){e.preventDefault(),e.stopPropagation(),Zt(parseInt(e.target.value))}})}),(0,V.jsx)("div",{onClick:function(e){e.preventDefault(),e.stopPropagation();var t=null===Xt||void 0===Xt?void 0:Xt.maxQuantityPerCart;Zt("number"===typeof t?Mt<t?Mt+1:t:Mt+1)},style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity-box ".concat(v.hasStock&&v.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.poH,{size:12})})]}),(0,V.jsx)("button",{style:wn?{borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44}:{borderColor:J||"#000",color:$||"#232323",backgroundColor:Y||"#fff",borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44},className:"".concat(wn&&!Pt?"out-of-stock":"stock"),onClick:function(e){Tn(e)},children:kn(wn?"common:outOfStock":"common:addBasket")})]})}),!!D&&!W&&!pe&&(0,V.jsx)("div",{className:"add-to-cart-overlay",children:Pt?(0,V.jsx)("button",{style:{borderRadius:null!==(r=null===ye||void 0===ye?void 0:ye.value)&&void 0!==r?r:0,backgroundColor:et||"#ededed",color:tt||"#000"},className:"out-of-stock",children:wn?kn("common:outOfStock"):Et}):(0,V.jsx)("button",{style:wn?{borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44}:{borderColor:J||"#000",color:$||"#232323",backgroundColor:Y||"#fff",borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44},className:"".concat(wn&&!Pt?"out-of-stock":"stock"),onClick:function(e){Tn(e)},children:kn(wn?"common:outOfStock":"common:addBasket")})}),!!A&&function(){var e,t,n,a,i,s,o,r,l;if(Fe)return(0,V.jsx)("p",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(l=v.brand)||void 0===l?void 0:l.name});var c=(0,V.jsx)("h3",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(e=v.brand)||void 0===e?void 0:e.name});switch(Ae){case H._p.h1:c=(0,V.jsx)("h1",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(t=v.brand)||void 0===t?void 0:t.name});break;case H._p.h2:c=(0,V.jsx)("h2",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(n=v.brand)||void 0===n?void 0:n.name});break;case H._p.h3:c=(0,V.jsx)("h3",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(a=v.brand)||void 0===a?void 0:a.name});break;case H._p.h4:c=(0,V.jsx)("h4",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(i=v.brand)||void 0===i?void 0:i.name});break;case H._p.h5:c=(0,V.jsx)("h5",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(s=v.brand)||void 0===s?void 0:s.name});break;case H._p.h6:c=(0,V.jsx)("h6",{className:"brand-name",style:{color:y||"#000",textTransform:R?"uppercase":"none",textAlign:O?"center":"unset",fontWeight:te?te.value:700},children:null===(o=v.brand)||void 0===o?void 0:o.name});break;default:te&&te.value,null===(r=v.brand)||void 0===r||r.name}return c}(),!!Pe&&!Nt&&(null===(l=v.tags)||void 0===l?void 0:l.filter((function(e){return null===Be||void 0===Be?void 0:Be.includes(e.name)})).map((function(e,t){var n;return(0,V.jsx)("span",{className:"flex",style:He(He({color:ft||"#000",textTransform:R?"uppercase":"none",justifyContent:Oe?"center":"unset",fontWeight:400,fontSize:14},xt?He({backgroundColor:xt,width:"max-content",padding:"4px 8px"},Oe?{margin:"0 auto"}:{}):{}),{},{marginBottom:1===(null===(n=v.tags)||void 0===n?void 0:n.filter((function(e){return null===Be||void 0===Be?void 0:Be.includes(e.name)})).length)?0:4}),children:"".concat(e.name," ")})}))),function(){if(Ie)return(0,V.jsx)("p",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});var e=(0,V.jsx)("h2",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});switch(Ve){case H._p.h1:e=(0,V.jsx)("h1",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});break;case H._p.h2:e=(0,V.jsx)("h2",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});break;case H._p.h3:e=(0,V.jsx)("h3",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});break;case H._p.h4:e=(0,V.jsx)("h4",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});break;case H._p.h5:e=(0,V.jsx)("h5",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:v.name});break;case H._p.h6:e=(0,V.jsx)("h6",{className:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:{color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},children:v.name});break;default:"product-name ".concat(q&&v.averageRating&&v.reviewCount?"mb-0":"mb-2"," ").concat(A&&v.brand?"":"mt-3"," ").concat(we?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),He({color:y||"#000",textAlign:O?"center":"unset",fontSize:ue?ue.value:14,fontWeight:Ke?Ke.value:400},at&&it?{height:(rt&&ot?ot.value:it.value)+(v.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),v.name}return e}(),!We&&Le&&!sn&&(0,V.jsx)(Dn,{}),q&&v.averageRating&&v.reviewCount?(0,V.jsxs)("div",{className:"flex flex-col sm:flex-col md:flex-row lg:flex-row items-start sm:items-start md:items-center lg:items-center -mt-1 space-x-0 sm:space-x-0 md:space-x-2 lg:space-x-2 ".concat(O?"items-center justify-center":""),style:{textAlign:O?"center":"unset"},children:[(0,V.jsx)("div",{children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:v.averageRating||0,starRatedColor:"".concat(pt||"#f7c603"),numberOfStars:5,name:"rating",starDimension:"16px",starSpacing:"1px"})}),!!Q&&(0,V.jsx)("span",{style:{color:y||"#000"},className:"text-xs mt-1 font-light",children:kn("common:totalReviewSummaryCard",{fieldName:v.reviewCount})}),!!lt&&(0,V.jsx)("span",{style:{color:y||"#000"},className:"text-xs mt-1 font-light",children:null===(c=v.averageRating)||void 0===c?void 0:c.toFixed(1)})]}):q&&st?(0,V.jsx)("span",{className:"flex ".concat(Q?"h-[32px] sm:h-[32px]":"h-[12px] sm:h-[12px]"," md:h-[12px] lg:h-[12px]")}):null,(0,V.jsxs)("div",{children:[!pe&&!(!v.hasStock&&dt)&&(0,V.jsx)("div",{className:"price-main ".concat(Te&&hn.finalPrice!==fn.finalPrice?"range-price":""," ").concat(Te?"price-range":""),style:{height:v.selectedVariant.hasDiscount||me?"40px":"20px",justifyContent:O?"center":"unset",fontWeight:ie?ie.value:900,fontSize:Ce?Ce.value:18},children:Te?(0,V.jsx)("div",{style:{color:N||"#000"},className:"sell-price",children:hn.finalPrice===fn.finalPrice?hn.formattedFinalPrice:(0,V.jsxs)(V.Fragment,{children:[hn.formattedFinalPrice," -"," ",fn.formattedFinalPrice]})}):(0,V.jsx)(V.Fragment,{children:xn.useFormat||gn.hasLengthFormat?(0,V.jsx)("div",{style:{color:N||"#000"},className:"sell-price",children:v.selectedVariantUnitPriceText}):(0,V.jsx)(V.Fragment,{children:v.selectedVariant.hasDiscount?(0,V.jsxs)("div",{className:"discount-price-main flex flex-row",children:[!ce&&(0,V.jsxs)("div",{style:{backgroundColor:ke||"#000",color:Se||"#fff",fontWeight:ie?ie.value:900,borderRadius:(null===mt||void 0===mt?void 0:mt.value)||0},className:"discount-percent",children:["%",v.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex discount-price flex-col",children:[(0,V.jsx)("span",{style:{fontSize:Ce?Ce.value:16,color:Xe||"#aaa"},children:v.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{style:{color:N||"#000"},children:v.selectedVariant.formattedFinalPrice})]})]}):(0,V.jsx)("div",{style:{color:N||"#000"},className:"sell-price",children:v.selectedVariant.formattedFinalPrice})})})}),!!ge&&(0,V.jsx)("div",{className:"flex min-h-[44px]",children:null===(d=v.tags)||void 0===d?void 0:d.map((function(e){if(null!==be&&void 0!==be&&be.includes(e.name))return(0,V.jsx)("span",{style:{backgroundColor:ve||"#000",color:je||"#fff"},className:"mr-1 px-2 py-1 text-sm mb-2  mt-2",children:e.name})}))}),!We&&!Le&&!sn&&(0,V.jsx)(Dn,{}),T&&v.displayedVariantTypes.length>0?(0,V.jsxs)("div",{style:He({justifyContent:O?"center":"unset"},ut?{minHeight:ut.value}:{}),className:"mt-2 flex flex-wrap",children:[!!bt&&(0,V.jsx)("style",{children:"\n                    .product-variant-choice-image {\n                      width:".concat(bt.value,"px;\n                      height:").concat(bt.value,"px;\n                    }\n                    ")}),v.displayedVariantTypes.map((function(e,t){var n=e.variantType,a=e.displayedVariantValues;return 0!==t?null:n.selectionType===se.C.COLOR&&a.map((function(e,t){var n=e.variantValue,i=(e.hasStock,e.isSelected,e.variant);if(t<((null===St||void 0===St?void 0:St.value)||4))return(0,V.jsx)(Cn,{variant:n,displayedVariantValues:a,variantData:i},n.id)}))})),v.displayedVariantTypes.map((function(e,t){var n=e.variantType,a=e.displayedVariantValues;return 0!==t?null:n.selectionType===se.C.COLOR&&a.length>((null===St||void 0===St?void 0:St.value)||4)?(0,V.jsx)("div",{className:"product-variant-choice-bg borderless  flex items-center justify-center  text-gray-400 text-sm ",children:"+"+(a.length-((null===St||void 0===St?void 0:St.value)||4))}):null}))]}):(0,V.jsxs)(V.Fragment,{children:[!b&&(0,V.jsx)("div",{style:{color:N||"#000",textAlign:O?"center":"unset"},className:"variant",children:function(){var e="";return v.displayedVariantTypes.map((function(t){return e+=t.displayedVariantValues.length+" "+t.variantType.name+" "})),e}()}),!!ee&&(0,V.jsx)("div",{style:{color:N||"#000",textAlign:O?"center":"unset"},className:"variant inline-block",children:function(){var e="";return v.displayedVariantTypes.map((function(t){return t.displayedVariantValues.map((function(t){return e+=t.variantValue.name+", "}))})),e.substring(0,e.length-2)}()})]}),!!Pe&&!!Nt&&(null===(p=v.tags)||void 0===p?void 0:p.filter((function(e){return null===Be||void 0===Be?void 0:Be.includes(e.name)})).map((function(e,t){var n;return(0,V.jsx)("span",{className:"flex",style:He(He({color:ft||"#000",textTransform:R?"uppercase":"none",justifyContent:Oe?"center":"unset",fontWeight:400,fontSize:14},xt?He({backgroundColor:xt,width:"max-content",padding:"4px 8px"},Oe?{margin:"0 auto"}:{}):{}),{},{marginBottom:1===(null===(n=v.tags)||void 0===n?void 0:n.filter((function(e){return null===Be||void 0===Be?void 0:Be.includes(e.name)})).length)?0:4}),children:"".concat(e.name," ")})}))),pe&&cn&&dn&&(0,V.jsx)(w.Z,{passHref:!0,href:"/account/login",children:(0,V.jsx)("a",{children:(0,V.jsx)("div",{style:He(He({},mn?{fontSize:mn}:{}),pn?{fontWeight:pn}:{}),className:"text-sm mt-4",dangerouslySetInnerHTML:{__html:(un?dn.replace(un,'<span class="underline">'.concat(un,"</span>")):"<span>".concat(dn,"</span>"))||""}})})}),yn?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:wt},className:"unreset unreset-reset"}):null,Nn?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:kt},className:"unreset unreset-reset"}):null,!!D&&!pe&&W&&W===H.qF.BOTTOM&&(0,V.jsx)("div",{className:"add-to-cart-overlay mt-2",children:Pt?(0,V.jsx)("button",{style:{borderRadius:null!==(f=null===ye||void 0===ye?void 0:ye.value)&&void 0!==f?f:0,backgroundColor:et||"#ededed",color:tt||"#000"},className:"out-of-stock",children:wn?kn("common:outOfStock"):Et}):(0,V.jsxs)("div",{className:"flex",children:[!!Tt&&!v.hasVariant&&(0,V.jsxs)("div",{className:"hidden sm:hidden  md:flex mr-2 category-list-quantity-boxes add-basket-modal-product-detail-quantity-boxes",children:[(0,V.jsx)("div",{onClick:function(e){var t;e.preventDefault(),e.stopPropagation();var n=null!==(t=null===Xt||void 0===Xt?void 0:Xt.minQuantityPerCart)&&void 0!==t?t:1;Mt>n&&Zt(Mt-1>1?Mt-1:1)},style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity-box ".concat(v.hasStock&&v.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.pwh,{size:12})}),(0,V.jsx)("div",{style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity",children:(0,V.jsx)("input",{style:{backgroundColor:"#fff",color:"#000"},type:"number",className:"quantity-input",value:Mt,onClick:function(e){e.preventDefault(),e.stopPropagation()},onChange:function(e){e.preventDefault(),e.stopPropagation(),Zt(parseInt(e.target.value))}})}),(0,V.jsx)("div",{onClick:function(e){e.preventDefault(),e.stopPropagation();var t=null===Xt||void 0===Xt?void 0:Xt.maxQuantityPerCart;Zt("number"===typeof t?Mt<t?Mt+1:t:Mt+1)},style:{backgroundColor:"#fff",color:"#000"},className:"category-list-quantity-box ".concat(v.hasStock&&v.isAddToCartEnabled?"":"pointer-events-none"),children:(0,V.jsx)(k.poH,{size:12})})]}),(0,V.jsx)("button",{style:wn?{borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44}:{borderColor:J||"#000",color:$||"#232323",backgroundColor:Y||"#fff",borderRadius:ye?ye.value:0,height:(null===nt||void 0===nt?void 0:nt.value)||44},className:"".concat(wn&&!Pt?"out-of-stock":"stock"),onClick:function(e){Tn(e)},children:kn(wn?"common:outOfStock":"common:addBasket")})]})})]})]})]})})})]})})),Ze=n(86055),We=n(85617),Ue=n(58533),Ge=n(2777),qe=n(443),Qe=n(60072),Je=n(78633),$e=(0,o.Pi)((function(e){var t=e.buttonLinks,n=e.isCenterAlign;return(0,V.jsx)("div",{className:"container mx-auto px-4 sm:px-4 md:px-4 lg:px-0 mt-8 mb-2",children:(0,V.jsx)("div",{className:"flex category-link-list-main ".concat(n?"justify-center":""),children:t.map((function(e){return(0,V.jsx)(w.Z,{passHref:!0,href:e.link.href,children:(0,V.jsx)("a",{children:(0,V.jsx)("div",{style:{borderRadius:"15px",border:e.borderColor?"1px solid ".concat(e.borderColor):"1px solid #000",fontSize:e.textFontSize?e.textFontSize.value:"12px",fontWeight:e.textFontWeight?e.textFontWeight.value:500,color:e.textColor?e.textColor:"#000",backgroundColor:e.bgColor?e.bgColor:"#fff",minWidth:e.btnWidth?e.btnWidth.value:110,padding:"7px 14px"},className:"btn-link__main whitespace-nowrap category_btn_link__main",children:e.text})})})}))})})}));function Ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ye(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Xe=(0,o.Pi)((function(e){var t,n,a=e.productsList,i=e.category,o=e.hideVariantOptions,r=e.titleColor,l=e.productNameColor,c=e.productPriceColor,d=e.showColors,p=e.isSquare,f=e.isImageContain,v=e.isBigBrandName,j=e.addBasketModalShow,b=e.isDrawerOpen,I=e.isCenter,P=e.isBrandShow,B=e.isFilterInShowSearch,R=e.imageAspectRatio,D=e.isSortHide,E=e.customTitle,O=e.isFilterHide,A=e.isSearchHide,_=e.columnGrid,L=e.showDescription,M=e.descriptionPosition,Z=e.showFullDescription,U=e.addBasketModalShowWhenHovered,G=e.secondImageShow,q=e.hideColumnSelector,Q=e.addBasketButtonPosition,J=e.isVideoAutoPlay,$=e.isVideoControlsHide,Y=e.showRating,K=e.showReviewCount,ee=e.addBasketButtonBorderColor,te=e.addBasketButtonTextColor,ne=e.addBasketButtonBgColor,ie=e.isAddBasketGoDetailPage,se=e.showVariantOptionsName,oe=e.isSingleProductShowMobile,re=e.brandFontWeight,le=e.priceFontWeight,ce=e.hideProductCount,de=e.hideSubCategoryProductCount,ue=e.pageBgColor,me=e.isImageSize,pe=e.imageType,he=e.hideDiscountPercentage,xe=e.isMobileProductImagesSwiper,ve=e.isFreeShipping,je=e.titleMobileFontSize,be=e.hideCategoryName,ye=(e.isPriceMainMinHeightFix,e.hideBreadcrumb),Ne=e.isPaginationPage,Ce=e.isDescriptionAlignFilterTop,we=e.linkList,ke=e.hidePrice,Se=e.forceAddToCart,Te=e.showTag,Ve=e.tagBgColor,Ie=e.productNameFontSize,Pe=e.tagColor,Be=e.showTagsText,Re=e.sortBarBg,De=e.sortBarTextColor,Ee=e.buttonBorderRadius,Oe=e.buttonHoverBgColor,Ae=e.priceFontSize,Fe=e.isSingleLineProductName,Le=e.isHideFilterCount,He=e.discountRatioBg,Ye=e.discountRatioColor,Xe=e.descriptionWidth,et=e.isShowMoreButtonCenter,tt=e.showCategoryImage,nt=e.aspectRatio,at=e.showPriceRange,it=e.isNumberToCutDescription,st=e.numberToCutDescription,ot=e.htagLevel,rt=e.isProductNamePTag,lt=e.showModelTags,ct=e.modelTagTexts,dt=e.isCenterTag,ut=e.brandHtagLevel,mt=e.sortBarSelectedBgColor,pt=e.sortBarSelectedTextColor,ht=e.isBrandNamePTag,ft=e.isColorVariantValueFirstImage,xt=e.showBreadcrumbCategoryName,gt=e.isUnitPriceUnderProductName,vt=e.unitPriceFontSize,jt=e.unitPriceFontWeight,bt=e.subCategoriesFontSize,yt=e.hideUnitPrice,Nt=e.hideOverlay,Ct=e.isSortDropdownDesign,wt=e.borderColor,kt=e.showBorder,St=e.cartBorderRadius,Tt=e.isBorderHoverEffect,Vt=e.isColorVariantValueFirstImageModal,It=e.productNameFontWeight,Pt=e.discountPriceTextColor,Bt=e.addButtonAnimationBgColor,Rt=e.addButtonAnimationTextColor,Dt=e.addButtonHeight,Et=e.isCustomProductNameHeight,Ot=e.productNameHeight,At=e.isCustomerReviewsStarAlignment,Ft=e.productNameHeightMobile,_t=e.showLastBreadCrumbPaths,zt=e.showRatingPoint,Lt=e.tagBadges,Ht=e.condPriceHide,Mt=e.variantsContainerMinHeight,Zt=e.discountPriceBorderRadius,Wt=e.rateStarColor,Ut=e.filtersColor,Gt=e.breadcrumbLink,qt=e.categoryNameHTagLevel,Qt=e.isCategoryNamePTag,Jt=e.priceRangeBarHeight,$t=e.priceRangeBarColor,Yt=e.breadcrumbLinkColor,Kt=e.isMobileThreeGrid,Xt=e.isSubCategoriesAlphabeticalSort,en=e.isVariantDesingRaunded,tn=e.modelTagColor,nn=e.modelTagBgColor,an=e.breadcrumbLinkFontWeight,sn=e.freeShippingLabelBgColor,on=e.freeShippingLabelTextColor,rn=e.hideOutOfStock,ln=e.productCountFontWeight,cn=e.isButtonsSticky,dn=e.variantsSwatchSize,un=e.tagImageMobileLeft,mn=e.isUnderModelTagVariants,pn=e.shippingInfo,hn=e.shippingInfoDescription,fn=e.shippingInfoIfSellOutOfStockDescription,xn=e.variantCount,gn=e.filterNameFontSize,vn=e.showQuantityBar,jn=s.useState(!0),bn=(0,m.Z)(jn,2),yn=bn[0],Nn=bn[1],Cn=s.useState(!1),wn=(0,m.Z)(Cn,2),kn=wn[0],Sn=wn[1],Tn=s.useState(!1),Vn=(0,m.Z)(Tn,2),In=Vn[0],Pn=Vn[1],Bn=s.useState(!0),Rn=(0,m.Z)(Bn,2),Dn=Rn[0],En=Rn[1],On=s.useState(!1),An=(0,m.Z)(On,2),Fn=An[0],_n=An[1],zn=s.useState(""),Ln=(0,m.Z)(zn,2),Hn=Ln[0],Mn=Ln[1],Zn=(0,x.useRouter)(),Wn=(0,S.$)().t,Un=s.createRef(),Gn=s.useState(1e3),qn=(0,m.Z)(Gn,2),Qn=qn[0],Jn=qn[1],$n=(0,ge.Z)(W.tq),Yn=(0,m.Z)($n,1)[0],Kn=X.Z.getInstance(),Xn=(0,g.o)(),ea=s.useMemo((function(){return new ze}),[]),ta=s.useState(null),na=(0,m.Z)(ta,2),aa=na[0],ia=na[1],sa=(0,ae.Z)(!!ke),oa=(0,m.Z)(sa,2),ra=oa[0],la=oa[1],ca=s.useState(!1),da=(0,m.Z)(ca,2),ua=da[0],ma=da[1],pa=s.useState(!1),ha=(0,m.Z)(pa,2),fa=ha[0],xa=ha[1],ga=s.useRef(null);(0,z.ZP)(ga,(function(){return fa&&xa(!1)}));var va=s.useState([]),ja=(0,m.Z)(va,2),ba=ja[0],ya=ja[1],Na=s.useRef(null),Ca=function(){return(0,V.jsx)("div",{className:"flex justify-center h-8",children:(0,V.jsxs)("span",{className:"flex text-sm",children:[Wn("common:loading"),(0,V.jsx)(k.E$Q,{size:20,className:"ml-2 loading-icon"})]})})},wa=function(){if(!nt)return{width:1080,height:475};var e={width:1,height:1};switch(nt){case H.aG["_1:1"]:e={width:1,height:1};break;case H.aG["_2:3"]:e={width:2,height:3};break;case H.aG["_4:3"]:e={width:4,height:3};break;case H.aG["_2:1"]:e={width:2,height:1};break;case H.aG["_16:9"]:e={width:16,height:9};break;case H.aG["_16:5"]:e={width:16,height:5};break;default:e={width:1,height:1}}return e};s.useEffect((function(){return Ne||window.addEventListener("scroll",Sa),function(){Ne||window.removeEventListener("scroll",Sa)}}),[a]);var ka=s.useRef(null),Sa=function(){if(ka.current&&ka.current.offsetTop<window.scrollY){var e=(window.scrollY-ka.current.offsetTop)/(window.innerWidth<768?350:450),t=Math.floor(e*(window.innerWidth<768?kn?1:2:4)/a.limit)+1;a.setVisibleInfiniteScrollPage(t+a.minPage-1)}};s.useEffect((function(){Sn(!!oe)}),[oe]),s.useEffect((function(){Jn(1e3)}),[i]),s.useEffect((function(){ia(a.sort)}),[a.sort]),s.useEffect((function(){var e=document.querySelector("#show-all-description");e&&e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),i.description&&Jn(i.description.length+1)}))}));var Ta=function(){return(0,V.jsxs)(V.Fragment,{children:[a.isFeaturedSortEnabled&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.FEATURED)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.FEATURED===aa?"active":"passive"," "),children:Wn("common:filters.featured")}),za(Ze.eV.NAME)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.A_Z)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.A_Z===aa?"active":"passive"," "),children:Wn("common:filters.nameAZ")}),za(Ze.eV.NAME)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.Z_A)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.Z_A===aa?"active":"passive"," "),children:Wn("common:filters.nameZA")}),za(Ze.eV.PRICE)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.INCREASING_PRICE)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.INCREASING_PRICE===aa?"active":"passive"," "),children:Wn("common:filters.increasedPrice")}),za(Ze.eV.PRICE)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.DECREASING_PRICE)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.DECREASING_PRICE===aa?"active":"passive"," "),children:Wn("common:filters.decreasingPrice")}),za(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.INCREASING_DISCOUNT)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.INCREASING_DISCOUNT===aa?"active":"passive"," "),children:Wn("common:filters.discountIncreasing")}),za(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.DECRASING_DISCOUNT)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.DECRASING_DISCOUNT===aa?"active":"passive"," "),children:Wn("common:filters.discountDecreasing")}),za(Ze.eV.CREATED_AT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.FIRST_ADDED)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.FIRST_ADDED===aa?"active":"passive"," "),children:Wn("common:filters.firstAdded")}),za(Ze.eV.CREATED_AT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.LAST_ADDED)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.LAST_ADDED===aa?"active":"passive"," "),children:Wn("common:filters.lastAdded")}),za(Ze.eV.AVERAGE_RATING)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.AVERAGE_RATING)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.AVERAGE_RATING===aa?"active":"passive"," "),children:Wn("common:filters.averageRating")}),za(Ze.eV.SALE_COUNT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.SALE_COUNT)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.SALE_COUNT===aa?"active":"passive"," "),children:Wn("common:filters.saleCount")}),za(Ze.eV.REVIEW_COUNT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.REVIEW_COUNT)},style:De?{color:De}:{},className:"sort-item ".concat(Ze.Rk.REVIEW_COUNT===aa?"active":"passive"," "),children:Wn("common:filters.reviewCount")})]})};s.useEffect((function(){var e=(new DOMParser).parseFromString(i.description||"","text/html"),t=(0,N.Z)(e.body.children).map((function(e){return e.outerHTML}));ya(t)}),[st]);var Va=(i.description||"").slice(0,Qn),Ia=it&&st?ba.slice(0,st.value).join(" "):"";s.useEffect((function(){if(Xn.currentPageType===We.Y.CATEGORY&&localStorage.getItem("lastClickedProductId")&&!ua){var e=localStorage.getItem("lastClickedProductId"),t=document.querySelector('[data-id="'.concat(e,'"]'));t&&(null===t||void 0===t||t.scrollIntoView(),window.scrollTo({top:window.pageYOffset-150}),localStorage.removeItem("lastClickedProductId"))}}));var Pa=a.data.some((function(e){return e.selectedVariantUnitPriceText}));function Ba(){if(O)return!1;var e=!0;return Array.isArray(a.filters)&&Array.isArray(a.filterCategories)?0===a.filters.length&&0===a.filterCategories.length&&(e=!1):null===a.filters&&void 0===a.filterCategories&&(e=!1),e}var Ra=function(e,t){if(!Ne){var n=Math.floor(t/a.limit)+1;a.setVisibleInfiniteScrollPage(n+a.minPage-1)}ma(!0),localStorage.setItem("lastClickedProductId",e)},Da=function(){if(!_)return"sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-".concat(yn?"4":"3","  xl:grid-cols-").concat(yn?"4":"3");switch(_){case H.oB._2:return"sm:grid-cols-2 md:grid-cols-2 lg:grid-cols-2  xl:grid-cols-2";case H.oB._3:return"sm:grid-cols-".concat(yn?"3":"2"," md:grid-cols-").concat(yn?"3":"2"," lg:grid-cols-").concat(yn?"3":"2","  xl:grid-cols-").concat(yn?"3":"2");case H.oB._4:return"sm:grid-cols-".concat(yn?"4":"3"," md:grid-cols-").concat(yn?"4":"3"," lg:grid-cols-").concat(yn?"4":"3","  xl:grid-cols-").concat(yn?"4":"3")}},Ea=i.path;_t||Ea.splice(-1);var Oa=function(){if(Na.current){var e=document.querySelector(".scrolled_list-main").getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:e,behavior:"smooth"})}},Aa=".sort-item:hover {\n    color: ".concat(De," !important;\n    border-bottom: 2px solid #232323;\n    background-color:  ").concat(Re," !important;\n  }\n  \n  .sort-item.active {\n    color: ").concat(Re," !important;\n  }\n\n  .sort-item.active:hover {\n    color: ").concat(De," !important;\n    border-bottom: 2px solid #232323;\n    background-color:  ").concat(Re," !important;\n  }\n  "),Fa="\n  .sort-item.active {\n    background-color:".concat(mt," !important;\n    color:").concat(pt," !important;\n  }\n  \n  "),_a=".filters-scrollable span.text-xs {\n    font-size:".concat(null===gn||void 0===gn?void 0:gn.value,"px\n} \n\n.desktop-filters span.font-medium.text-sm {\n  font-size:").concat(null===gn||void 0===gn?void 0:gn.value,"px\n}\n\n"),za=function(e){var t;return!(null!==(t=a.disabledSortTypes)&&void 0!==t&&t.some((function(t){return t===e})))},La=function(e){var t=a.queryParams,n="";return n=t.includes("page=")?t.replace(/page=\d+/,"page=".concat(e)):"".concat(t,"&page=").concat(e),(Zn.query&&(Zn.query.slug||""))+"?"+n};return(0,V.jsxs)("div",{style:ue?{backgroundColor:ue}:{},children:[(!!Re||!!De)&&(0,V.jsxs)("style",{children:[" ",Aa," "]}),(!!mt||!!pt)&&(0,V.jsx)("style",{children:Fa}),!!gn&&(0,V.jsx)("style",{children:_a}),(0,V.jsx)(_e,{viewModel:ea}),!!tt&&i.image&&(0,V.jsx)(C.E,{className:"",layout:"responsive",image:i.image,alt:i.name,width:wa().width,height:wa().height,sizes:"100vw"}),(0,V.jsxs)("div",{className:"container flex flex-col category-products-main mx-auto relative  mb-8",children:[i&&Ea&&Ea.length>0&&!ye&&(0,V.jsx)("div",{className:"breadcrumbs pt-4 px-4",children:(0,V.jsxs)("ul",{children:[!!Gt&&(0,V.jsx)("li",{className:"breadcrumb-item",children:(0,V.jsx)(w.Z,{passHref:!0,href:Gt.href,children:(0,V.jsxs)("a",{style:Yt?{color:Yt,fontWeight:(null===an||void 0===an?void 0:an.value)||400}:{fontWeight:(null===an||void 0===an?void 0:an.value)||400},className:"flex items-center",children:[Gt.label,(0,V.jsx)("span",{className:"ml-2",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})})]})})}),Ea.map((function(e,t){return(0,V.jsx)("li",{className:"breadcrumb-item",children:(0,V.jsx)(w.Z,{passHref:!0,href:e.href,children:(0,V.jsxs)("a",{style:Yt?{color:Yt,fontWeight:(null===an||void 0===an?void 0:an.value)||400}:{fontWeight:(null===an||void 0===an?void 0:an.value)||400},className:"flex items-center",children:[e.name,t!==Ea.length-1&&(0,V.jsx)("span",{className:"ml-2",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})})]})})},t)})),!!xt&&(0,V.jsx)("li",{className:"breadcrumb-item",children:(0,V.jsxs)("span",{style:Yt?{color:Yt,fontWeight:(null===an||void 0===an?void 0:an.value)||400}:{fontWeight:(null===an||void 0===an?void 0:an.value)||400},className:"flex items-center",children:[(0,V.jsx)("span",{className:"flex",children:(0,V.jsx)(T.hjJ,{fontSize:"small"})}),(0,V.jsx)("span",{style:{color:Yt||"#818181",fontWeight:(null===an||void 0===an?void 0:an.value)||400},className:"ml-2",children:i.name})]})})]})}),!!we&&(0,V.jsx)("div",{className:"flex ".concat(cn?"category-links-sticky":""),children:(0,V.jsx)($e,{buttonLinks:we,isCenterAlign:!0})}),(0,V.jsx)("div",{ref:Na,className:"flex mb-4 mt-4 sm:mt-8 md:mt-8 lg:mt-8 px-4 flex-row items-center scrolled_list-main",children:i&&i.name&&(0,V.jsxs)(V.Fragment,{children:[!be&&function(){if(Qt)return(0,V.jsx)("p",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});var e=(0,V.jsx)("h1",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});switch(qt){case H._p.h1:e=(0,V.jsx)("h1",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;case H._p.h2:e=(0,V.jsx)("h2",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;case H._p.h3:e=(0,V.jsx)("h3",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;case H._p.h4:e=(0,V.jsx)("h4",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;case H._p.h5:e=(0,V.jsx)("h5",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;case H._p.h6:e=(0,V.jsx)("h6",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name});break;default:e=(0,V.jsx)("h1",{style:Ke({color:r||"#000"},Yn&&je?{fontSize:je.value}:{}),ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center  brand-title",children:i.name})}return e}(),!ce&&(0,V.jsxs)("span",{style:ln?{fontWeight:ln.value}:{},className:"text-xs flex h-5 sm:h-6 md:h-7 lg:h-7 font-normal items-end  text-gray-500 ".concat(be?"":"ml-5"," "),children:[a.count," ",Wn("common:product")]})]})}),!!E&&(0,V.jsx)("div",{className:"flex flex-row  ",children:(0,V.jsx)("h1",{style:{color:r||"#000"},ref:Un,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center",children:E})}),!!L&&i.description&&M===H.In.TOP&&((null===(t=i.description)||void 0===t?void 0:t.length)>Qn&&Z?(0,V.jsx)("h4",{children:(0,V.jsx)("div",{style:Xe?{maxWidth:"".concat(Xe.value,"%"),margin:"auto"}:{},className:"unreset mb-4 px-4 unreset-reset ".concat(Ce?"ml-0 sm:ml-0 md:ml-0 lg:ml-64":""),dangerouslySetInnerHTML:{__html:"".concat(it&&st?Ia:Va," ").concat(it&&st&&st.value>=ba.length?"":'<span id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex '.concat(et?"justify-center":"",'">').concat(Wn("common:showMore"),"</span>"),"  ")}})}):(0,V.jsx)("h4",{children:(0,V.jsx)("div",{style:Xe?{maxWidth:"".concat(Xe.value,"%"),margin:"auto"}:{},className:"unreset !mb-4 px-4 unreset-reset category__desc ".concat(Ce?"ml-0 sm:ml-0 md:ml-0 lg:ml-64":""),dangerouslySetInnerHTML:{__html:i.description}})})),(!D||!O)&&!a.isStatic&&(O&&Ct?(0,V.jsx)("div",{className:"w-full justify-end space-x-4 items-center mobil-filters px-4 mb-4",children:(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:ga,onClick:function(){return xa(!fa)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:De||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(De||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(fa?"active":"passive"),children:(0,V.jsx)(Ta,{})})]})})}):(0,V.jsx)("div",{className:"mobil-filters-bg mobil-filters mx-4",style:Re?{backgroundColor:Re}:{},children:(0,V.jsxs)("div",{className:"mobil-filters w-full",children:[(0,V.jsx)("div",{style:{borderRight:"1px solid ".concat(De||"#d8d8d8"," ")},onClick:function(){return Sn(!kn)},className:"mobil-template justify-center w-1/5 flex items-center",children:kn?(0,V.jsx)(Ge.aCJ,{size:20,color:"".concat(De||"#484848")}):(0,V.jsx)(Ge.Dd2,{size:20,style:{transform:"rotate(90deg)"},color:"".concat(De||"#484848")})}),Ba()&&(0,V.jsxs)("div",{style:{borderRight:"".concat(Ct||D?"0":"1","px solid ").concat(De||"#d8d8d8"," ")},onClick:function(){return Kn.setFiltersShow(!0)},className:"mobil-filters ".concat(Ct||D?"w-full":"w-2/5","   items-center justify-center"),children:[(0,V.jsxs)("span",{className:"relative",children:[(0,V.jsx)(Ge.Ihx,{size:20,color:"".concat(De||"#484848")}),a.hasAppliedfilter&&(0,V.jsx)("span",{className:"is-sorting"})]}),(0,V.jsx)("span",{style:{color:"".concat(De||"#484848")},className:"ml-2",children:Wn("common:filter")})]}),!(Ct||D)&&(0,V.jsxs)("div",{onClick:function(){In?(Pn(!1),document.documentElement.style.overflow="unset"):(Pn(!0),document.documentElement.style.overflow="hidden")},className:"mobil-sorting-icon relative justify-center items-center ".concat(Ba()?"w-2/5":"w-4/5"," "),children:[(0,V.jsxs)("span",{className:"relative",children:[(0,V.jsx)(k.IMN,{size:20,color:"".concat(De||"#484848")}),Fn&&(0,V.jsx)("span",{className:"is-sorting"})]}),(0,V.jsx)("span",{style:{color:"".concat(De||"#484848")},className:"ml-2",children:Wn("common:sort")}),In&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{onClick:function(){Pn(!1),document.documentElement.style.overflow="unset"},className:"mobil-sorting-bg"}),(0,V.jsx)("div",{className:"mobile-sorting ",children:(0,V.jsxs)("div",{className:"mobile-sorting-content flex flex-col w-full",children:[(0,V.jsx)("span",{style:{color:"#484848"},className:" text-2xl px-4 py-2",children:Wn("common:sort")}),(0,V.jsx)("span",{className:"absolute right-2 top-2",children:(0,V.jsx)(F.FU5,{size:20,color:"#484848"})}),a.isFeaturedSortEnabled&&(0,V.jsxs)("span",{style:{background:Ze.Rk.FEATURED===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.FEATURED),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.FEATURED===aa?"font-normal":"font-light","  "),children:[(0,V.jsxs)("span",{children:[" ",Wn("common:filters.featured")]}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.FEATURED===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.NAME)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.A_Z===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.A_Z),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.A_Z===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.nameAZ")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.A_Z===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.NAME)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.Z_A===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.Z_A),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.Z_A===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.nameZA")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.Z_A===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.PRICE)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.INCREASING_PRICE===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.INCREASING_PRICE),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.INCREASING_PRICE===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.increasedPrice")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.INCREASING_PRICE===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.PRICE)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.DECREASING_PRICE===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.DECREASING_PRICE),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.DECREASING_PRICE===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.decreasingPrice")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.DECREASING_PRICE===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.INCREASING_DISCOUNT===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.INCREASING_DISCOUNT),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black flex items-center justify-between px-4 py-2 ".concat(Ze.Rk.INCREASING_DISCOUNT===aa?"font-normal":"font-light","  "),children:[(0,V.jsxs)("span",{children:[Wn("common:filters.discountIncreasing")," "]}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.INCREASING_DISCOUNT===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.DECRASING_DISCOUNT===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.DECRASING_DISCOUNT),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.DECRASING_DISCOUNT===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.discountDecreasing")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.DECRASING_DISCOUNT===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.CREATED_AT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.FIRST_ADDED===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.FIRST_ADDED),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.FIRST_ADDED===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.firstAdded")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.FIRST_ADDED===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.CREATED_AT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.LAST_ADDED===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.LAST_ADDED),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2  ".concat(Ze.Rk.LAST_ADDED===aa?"font-normal":"font-light"," "),children:[(0,V.jsx)("span",{children:Wn("common:filters.lastAdded")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.LAST_ADDED===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.AVERAGE_RATING)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.AVERAGE_RATING===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.AVERAGE_RATING),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.AVERAGE_RATING===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.averageRating")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.AVERAGE_RATING===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.SALE_COUNT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.SALE_COUNT===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.SALE_COUNT),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.SALE_COUNT===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.saleCount")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.SALE_COUNT===aa&&(0,V.jsx)("span",{})})]}),za(Ze.eV.REVIEW_COUNT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.REVIEW_COUNT===aa?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.REVIEW_COUNT),Pn(!1),document.documentElement.style.overflow="unset",_n(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.REVIEW_COUNT===aa?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:Wn("common:filters.reviewCount")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.REVIEW_COUNT===aa&&(0,V.jsx)("span",{})})]})]})})]})]})]})})),!D&&!O&&!!Ct&&(0,V.jsx)("div",{className:"w-full justify-end space-x-4 items-center mobil-filters px-4 mb-4",children:(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:ga,onClick:function(){return xa(!fa)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:De||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(De||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(fa?"active":"passive"),children:(0,V.jsx)(Ta,{})})]})})}),(0,V.jsxs)("div",{className:"flex items-centers flex-col sm:flex-row md:flex-row lg:flex-row",children:[!A&&(0,V.jsx)("div",{className:"search-main w-full sm:w-64 md:w-64 lg:w-64 ",children:(0,V.jsxs)("div",{className:"px-4 relative",children:[(0,V.jsx)("input",{type:"text",value:a.searchKeyword,onChange:function(e){return a.searchKeyword=e.target.value},className:"search-input outline-none",placeholder:Wn("common:searchPlaceholder")}),a.searchKeyword.length?(0,V.jsx)("span",{onClick:function(){a.searchKeyword=""},className:"search-icon",children:(0,V.jsx)(F.FU5,{})}):null]})}),D||a.isStatic||Ct?null:(0,V.jsxs)("div",{className:"template-list desktop-sort-template items-center ",style:Re?{backgroundColor:Re}:{},children:[(0,V.jsx)("div",{className:"flex flex-wrap w-11/12",children:(0,V.jsx)(Ta,{})}),_!==H.oB._2&&(0,V.jsxs)("div",{className:"flex absolute right-6 ".concat(q?"hidden":""),children:[(0,V.jsxs)("div",{onClick:function(){return Nn(!1)},style:De?{borderColor:De}:{},className:"relative  grid-template-choise-one ".concat(yn?"":"active"),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:De||""}),(0,V.jsx)("span",{className:"grid-template",children:(0,V.jsx)(Ge.aCJ,{size:14,color:De||""})})]}),(0,V.jsxs)("div",{onClick:function(){return Nn(!0)},style:De?{borderColor:De}:{},className:"flex grid-template-choise-two ".concat(yn?"active":""," "),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:De||""}),(0,V.jsx)("span",{className:"grid-template-two",children:(0,V.jsx)(Ge.aCJ,{size:14,color:De||""})})]})]})]}),!D&&Ct?(0,V.jsxs)("div",{className:"flex w-full justify-end space-x-4 items-center template-list",children:[(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:ga,onClick:function(){return xa(!fa)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:De||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(De||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(fa?"active":"passive"),children:(0,V.jsx)(Ta,{})})]})}),_!==H.oB._2&&(0,V.jsxs)("div",{className:"flex ".concat(q?"hidden":""),children:[(0,V.jsxs)("div",{onClick:function(){return Nn(!1)},style:De?{borderColor:De}:{},className:"relative  grid-template-choise-one ".concat(yn?"":"active"),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:De||""}),(0,V.jsx)("span",{className:"grid-template",children:(0,V.jsx)(Ge.aCJ,{size:14,color:De||""})})]}),(0,V.jsxs)("div",{onClick:function(){return Nn(!0)},style:De?{borderColor:De}:{},className:"flex grid-template-choise-two ".concat(yn?"active":""," "),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:De||""}),(0,V.jsx)("span",{className:"grid-template-two",children:(0,V.jsx)(Ge.aCJ,{size:14,color:De||""})})]})]})]}):null]}),(0,V.jsxs)("div",{className:"flex",children:[Ba()?(0,V.jsx)("div",{className:" w-64 p-4 desktop-filters",children:(0,V.jsxs)("div",{style:Ut?{color:Ut}:{},className:"sticky-filter",children:[a.filterCategories&&a.filterCategories.length>0&&(0,V.jsxs)("div",{children:[(0,V.jsxs)("div",{onClick:function(){En(!Dn)},className:"flex justify-between items-center cursor-pointer",children:[(0,V.jsx)("span",{className:"font-medium text-sm",children:Wn("common:subCategories")}),(0,V.jsx)("span",{children:Dn?(0,V.jsx)(k.jRD,{size:20}):(0,V.jsx)(k.OrA,{size:20})})]}),(0,V.jsxs)("div",{className:"flex my-4 sub-categories-main relative flex-row flex-wrap filters-scrollable ".concat(Dn?"active":"passive"," "),children:[!!B&&(0,V.jsxs)("div",{className:"mb-2 w-11/12 relative",children:[(0,V.jsx)("input",{type:"text",className:"filter-search-input",placeholder:Wn("common:filter"),value:Hn,onChange:function(e){return Mn(e.target.value)}}),(0,V.jsx)("span",{className:"filter-search-icon",children:(0,V.jsx)(y.Qcu,{size:15})})]}),a.filterCategories.sort((function(e,t){return Xt?e.name.toLowerCase().localeCompare(t.name):0})).filter((function(e){return e.name.toLocaleLowerCase().includes(Hn.toLocaleLowerCase())})).map((function(e){return e.resultCount?(0,V.jsxs)("span",{style:bt?{fontSize:bt.value}:{},onClick:function(){a.onFilterCategoryClick(e),Mn("")},className:"mb-3 hover:underline  w-full text-xs cursor-pointer",children:[e.name,(0,V.jsxs)("span",{style:bt?{fontSize:bt.value}:{},className:"text-xs  text-gray-500",children:[" ",de?null:(0,V.jsxs)(V.Fragment,{children:["( ",e.resultCount," )"]})]})]},e.id):e.name}))]})]}),(0,V.jsx)(Qe.Z,{onClickFilter:function(){Un.current&&Un.current.scrollIntoView()},mobile:!1,productsList:a,isFilterInShowSearch:B,isHideFilterCount:Le,filtersColor:Ut,priceRangeBarHeight:Jt,priceRangeBarColor:$t}),a.filters&&a.filters.length>0&&(0,V.jsx)("div",{onClick:function(){a.clearFilters()},className:"flex text-sm hover:underline cursor-pointer text-gray-400 mb-4",children:Wn("common:clearFilters")})]})}):null,(0,V.jsxs)("div",{ref:ka,style:fe.Y.isB2BStorefront()&&ra?{display:"none"}:{},className:"flex-1 pb-4 pl-4 pr-4 mt-4 category__list__main",children:[a.hasPrev&&!Ne&&(0,V.jsx)("div",{className:"prev-button-main",children:(0,V.jsx)("div",{onClick:function(){a.getPrev(),a.setVisibleInfiniteScrollPage(a.minPage-1)},className:"prev-button",children:a.isLoading?(0,V.jsxs)("span",{className:"flex text-sm",children:[Wn("common:loading"),(0,V.jsx)(k.E$Q,{size:20,className:"ml-2 loading-icon"})]}):Wn("common:getPrev")})}),Ne?(0,V.jsx)("div",{className:"",children:a.data.length?(0,V.jsx)("div",{className:"grid ".concat(kn?"grid-cols-1":Kt?"grid-cols-3":"grid-cols-2"," ").concat(Da()," gap-4"),children:a.data.map((function(e,t){return(0,V.jsx)("div",{"data-id":e.selectedVariant.id,onClick:function(){return Ra(e.selectedVariant.id,t+1)},className:"".concat(kt?"grid":""),children:(0,V.jsx)(Me,{productDetail:e,productPriceColor:c,productNameColor:l,hideVariantOptions:o,showColors:d,isSquare:p,isImageContain:f,isBigBrandName:v,addBasketModalShow:j,isDrawerOpen:b,isCenter:I,isBrandShow:P,imageAspectRatio:R,addBasketModalShowWhenHovered:U,secondImageShow:G,addBasketButtonPosition:Q,isVideoAutoPlay:J,isVideoControlsHide:$,showRating:Y,showReviewCount:K,addBasketButtonBorderColor:ee,addBasketButtonTextColor:te,addBasketButtonBgColor:ne,isAddBasketGoDetailPage:ie,showVariantOptionsName:se,brandFontWeight:re,priceFontWeight:le,isMobileProductImagesSwiper:xe,productNameFontSize:Ie,hideDiscountPercentage:he,isFreeShippingShow:ve,hidePrice:la,forceAddToCart:Se,showTag:Te,tagBgColor:Ve,tagColor:Pe,showTagsText:Be,buttonBorderRadius:Ee,buttonHoverBgColor:Oe,priceFontSize:Ae,isSingleLineProductName:Fe,discountRatioBg:He,discountRatioColor:Ye,showPriceRange:at,htagLevel:ot,isProductNamePTag:rt,showModelTags:lt,modelTagTexts:ct,isCenterTag:dt,brandHtagLevel:ut,isBrandNamePTag:ht,isColorVariantValueFirstImage:ft,isUnitPriceUnderProductName:gt,unitPriceFontSize:vt,unitPriceFontWeight:jt,hideUnitPrice:yt,hideOverlay:Nt,borderColor:wt,showBorder:kt,cartBorderRadius:St,isBorderHoverEffect:Tt,isColorVariantValueFirstImageModal:Vt,isExistSelectedVariantUnitPriceText:Pa,productNameFontWeight:It,discountPriceTextColor:Pt,addButtonAnimationBgColor:Bt,addButtonAnimationTextColor:Rt,addButtonHeight:Dt,isCustomProductNameHeight:Et,productNameHeight:Ot,isCustomerReviewsStarAlignment:At,productNameHeightMobile:Ft,isMob:Yn,showRatingPoint:zt,tagBadges:Lt,imageType:pe,isImageSize:me,condPriceHide:Ht,variantsContainerMinHeight:Mt,discountPriceBorderRadius:Zt,rateStarColor:Wt,isVariantDesingRaunded:en,modelTagColor:tn,modelTagBgColor:nn,freeShippingLabelBgColor:sn,freeShippingLabelTextColor:on,hideOutOfStock:rn,variantsSwatchSize:dn,tagImageMobileLeft:un,isUnderModelTagVariants:mn,shippingInfo:pn,shippingInfoDescription:hn,shippingInfoIfSellOutOfStockDescription:fn,variantCount:xn,showQuantityBar:vn},e.selectedVariant.id)},e.selectedVariant.id+t)}))}):(0,V.jsx)("div",{className:"flex mt-4 justify-center h-72  text-gray-700",children:Wn("common:notFoundProduct")})}):(0,V.jsx)(Ue.Z,{dataLength:a.page*a.limit,next:function(){if(a.isLoading)var e=setInterval((function(){a.isLoading||(a.getNext(),clearInterval(e))}),200);else a.getNext()},scrollThreshold:.6,hasMore:a.hasNext,loader:(0,V.jsx)(Ca,{}),children:(0,V.jsx)("div",{className:"",children:a.data.length?(0,V.jsx)("div",{className:"grid ".concat(kn?"grid-cols-1":Kt?"grid-cols-3":"grid-cols-2"," ").concat(Da()," gap-4"),children:a.data.map((function(e,t){return(0,V.jsx)("div",{"data-id":e.selectedVariant.id,onClick:function(){return Ra(e.selectedVariant.id,t+1)},className:"".concat(kt?"grid":""),children:(0,V.jsx)(Me,{productDetail:e,productPriceColor:c,productNameColor:l,hideVariantOptions:o,showColors:d,isSquare:p,isImageContain:f,isBigBrandName:v,addBasketModalShow:j,isDrawerOpen:b,isCenter:I,isBrandShow:P,imageAspectRatio:R,addBasketModalShowWhenHovered:U,secondImageShow:G,addBasketButtonPosition:Q,isVideoAutoPlay:J,isVideoControlsHide:$,showRating:Y,showReviewCount:K,addBasketButtonBorderColor:ee,addBasketButtonTextColor:te,addBasketButtonBgColor:ne,isAddBasketGoDetailPage:ie,showVariantOptionsName:se,brandFontWeight:re,priceFontWeight:le,isMobileProductImagesSwiper:xe,productNameFontSize:Ie,hideDiscountPercentage:he,isFreeShippingShow:ve,hidePrice:la,forceAddToCart:Se,showTag:Te,tagBgColor:Ve,tagColor:Pe,showTagsText:Be,buttonBorderRadius:Ee,buttonHoverBgColor:Oe,priceFontSize:Ae,isSingleLineProductName:Fe,discountRatioBg:He,discountRatioColor:Ye,showPriceRange:at,htagLevel:ot,isProductNamePTag:rt,showModelTags:lt,modelTagTexts:ct,isCenterTag:dt,brandHtagLevel:ut,isBrandNamePTag:ht,isColorVariantValueFirstImage:ft,isUnitPriceUnderProductName:gt,unitPriceFontSize:vt,unitPriceFontWeight:jt,hideUnitPrice:yt,hideOverlay:Nt,borderColor:wt,showBorder:kt,cartBorderRadius:St,isBorderHoverEffect:Tt,isColorVariantValueFirstImageModal:Vt,isExistSelectedVariantUnitPriceText:Pa,productNameFontWeight:It,discountPriceTextColor:Pt,addButtonAnimationBgColor:Bt,addButtonAnimationTextColor:Rt,addButtonHeight:Dt,isCustomProductNameHeight:Et,productNameHeight:Ot,isCustomerReviewsStarAlignment:At,productNameHeightMobile:Ft,isMob:Yn,showRatingPoint:zt,tagBadges:Lt,imageType:pe,isImageSize:me,condPriceHide:Ht,variantsContainerMinHeight:Mt,discountPriceBorderRadius:Zt,rateStarColor:Wt,isVariantDesingRaunded:en,modelTagColor:tn,modelTagBgColor:nn,freeShippingLabelBgColor:sn,freeShippingLabelTextColor:on,hideOutOfStock:rn,variantsSwatchSize:dn,tagImageMobileLeft:un,isUnderModelTagVariants:mn,shippingInfo:pn,shippingInfoDescription:hn,shippingInfoIfSellOutOfStockDescription:fn,variantCount:xn,showQuantityBar:vn},e.selectedVariant.id)},e.selectedVariant.id+t)}))}):(0,V.jsx)("div",{className:"flex mt-4 justify-center h-72  text-gray-700",children:Wn("common:notFoundProduct")})})}),!!Ne&&(0,V.jsx)("div",{className:"pagination-main mt-12 mb-6 flex justify-center sm:justify-center md:justify-center lg:justify-center items-center",children:(0,V.jsx)("div",{className:"paginations",children:(0,V.jsxs)("ul",{className:"flex  items-center",children:[a.page>=3&&(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(1);case 2:a.setVisibleInfiniteScrollPage(1),Oa();case 4:case"end":return e.stop()}}),e)}))),children:(0,V.jsx)(Je.URD,{color:"#585D6B"})}),(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.page-1);case 2:a.setVisibleInfiniteScrollPage(a.page),Oa();case 4:case"end":return e.stop()}}),e)}))),className:a.hasPrev?"":"page-passive",children:(0,V.jsx)(F.oTp,{color:a.hasPrev?"#585D6B":"#D4D8DF"})}),1!==a.page?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:La(a.page-1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(a.page-1);case 4:a.setVisibleInfiniteScrollPage(a.page),Oa();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:a.page-1})})}),(0,V.jsx)("li",{className:"page-active",children:(0,V.jsx)(w.Z,{passHref:!0,href:La(a.page),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(e){e.stopPropagation(),e.preventDefault()},children:a.page})})}),a.page+1<=a.pageCount&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:La(a.page+1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(a.page+1);case 4:a.setVisibleInfiniteScrollPage(a.page),Oa();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:a.page+1})})})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{className:"page-active",children:(0,V.jsx)(w.Z,{passHref:!0,href:La(1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(e){e.stopPropagation(),e.preventDefault()},children:1})})}),a.pageCount>1&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:La(2),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(2);case 4:a.setVisibleInfiniteScrollPage(2),Oa();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:2})})}),a.pageCount>2&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:La(3),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(3);case 4:a.setVisibleInfiniteScrollPage(3),Oa();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:3})})})]}),(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.page+1);case 2:a.setVisibleInfiniteScrollPage(a.page),Oa();case 4:case"end":return e.stop()}}),e)}))),className:a.hasNext?"":"page-passive",children:(0,V.jsx)(F.Djl,{color:a.hasNext?"#585D6B":"#D4D8DF"})}),a.page+1!==a.pageCount&&a.page!==a.pageCount&&a.pageCount>3&&(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.pageCount);case 2:a.setVisibleInfiniteScrollPage(a.pageCount),Oa();case 4:case"end":return e.stop()}}),e)}))),children:(0,V.jsx)(Je.ZC5,{color:"#585D6B"})})]})})}),!!L&&i.description&&M===H.In.BOTTOM&&((null===(n=i.description)||void 0===n?void 0:n.length)>Qn&&Z?(0,V.jsx)("div",{style:Xe?{maxWidth:"".concat(Xe.value,"%"),margin:"auto",marginTop:16}:{},className:"unreset !mb-4 mt-4 unreset-reset category__desc",dangerouslySetInnerHTML:{__html:"".concat(it&&st?Ia:Va," ").concat(it&&st&&st.value>=ba.length?"":'<span id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex '.concat(et?"justify-center":"",'">').concat(Wn("common:showMore"),"</span>")," ")}}):(0,V.jsx)("div",{style:Xe?{maxWidth:"".concat(Xe.value,"%"),margin:"auto",marginTop:16}:{},className:"unreset !mb-4 mt-4 unreset-reset category__desc",dangerouslySetInnerHTML:{__html:i.description}}))]})]})]}),(0,V.jsx)(qe.Z,{isVisible:Kn.filtersShow,setSearchText:function(){return a.searchKeyword=""},productsList:a,isFilterInShowSearch:B,onClose:function(){Kn.setFiltersShow(!1)},isHideFilterCount:Le,hideSubCategoryProductCount:de,priceRangeBarHeight:Jt,priceRangeBarColor:$t})]})}));function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function tt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var nt=(0,o.Pi)((function(e){var t,n,a,i,o,r,l,c,d=e.productDetail,p=e.hideVariantOptions,f=e.productNameColor,v=e.productPriceColor,b=e.showColors,y=e.isSquare,N=e.isImageContain,k=e.isBigBrandName,T=e.addBasketModalShow,I=e.isDrawerOpen,B=e.isCenter,R=e.isBrandShow,D=e.imageAspectRatio,E=e.addBasketModalShowWhenHovered,O=e.secondImageShow,A=e.addBasketButtonPosition,_=e.isVideoAutoPlay,L=e.isVideoControlsHide,Z=e.showRating,W=e.showReviewCount,U=e.discountRatioBg,G=e.discountRatioColor,q=e.addBasketButtonBorderColor,Q=e.addBasketButtonTextColor,J=e.addBasketButtonBgColor,$=e.isAddBasketGoDetailPage,Y=e.showVariantOptionsName,K=e.brandFontWeight,ee=e.priceFontWeight,te=e.isMobileProductImagesSwiper,ie=e.isFreeShippingShow,oe=e.hidePrice,re=e.showTag,le=e.tagBgColor,ce=e.tagColor,de=e.showTagsText,ue=e.buttonBorderRadius,me=e.buttonHoverBgColor,pe=e.isSingleLineProductName,fe=e.showPriceRange,xe=e.htagLevel,ge=e.showModelTags,ve=e.modelTagTexts,je=e.isCenterTag,be=e.brandHtagLevel,ye=e.isUnitPriceUnderProductName,Ne=e.unitPriceFontSize,Ce=e.unitPriceFontWeight,we=e.hideUnitPrice,ke=e.hideOverlay,Se=e.borderColor,Te=e.showBorder,Ve=e.cartBorderRadius,Ie=e.isBorderHoverEffect,Pe=e.isExistSelectedVariantUnitPriceText,Be=e.productNameFontWeight,Oe=e.discountPriceTextColor,Ae=e.addButtonAnimationBgColor,Fe=e.addButtonAnimationTextColor,_e=e.addButtonHeight,ze=e.isCustomProductNameHeight,Le=e.productNameHeight,He=e.isCustomerReviewsStarAlignment,Me=e.productNameHeightMobile,Ze=e.isMob,We=e.tagBadges,Ue=e.condPriceHide,Ge=e.variantsContainerMinHeight,qe=e.discountPriceBorderRadius,Qe=e.isColorVariantValueFirstImage,Je=e.modelTagColor,$e=e.modelTagBgColor,Ye=e.freeShippingLabelBgColor,Ke=e.freeShippingLabelTextColor,Xe=e.variantsSwatchSize,et=e.tagImageMobileLeft,nt=e.isProductNamePTag,at=e.shippingInfo,it=e.shippingInfoDescription,st=e.shippingInfoIfSellOutOfStockDescription,ot=e.variantCount,rt=s.useState(!1),lt=(0,m.Z)(rt,2),ct=lt[0],dt=lt[1],ut=s.useState(""),mt=(0,m.Z)(ut,2),pt=mt[0],ht=mt[1],ft=s.useState({show:!1,productId:""}),xt=(0,m.Z)(ft,2),gt=xt[0],vt=xt[1],jt=s.useState(!1),bt=(0,m.Z)(jt,2),yt=bt[0],Nt=bt[1],Ct=s.useState(!0),wt=(0,m.Z)(Ct,2),kt=wt[0],St=wt[1],Tt=(0,g.o)(),Vt=X.Z.getInstance(),It=(0,ae.Z)(!1),Pt=(0,m.Z)(It,2),Bt=(Pt[0],Pt[1]),Rt=Vt.b2bSettings,Dt=Rt.isOnlyCustomersShowText,Et=Rt.onlyCustomersText,Ot=Rt.underlineText,At=Rt.onlyCustomerTextFontSize,Ft=Rt.onlyCustomerTextFontWeight,_t=null===(t=d.campaigns)||void 0===t?void 0:t.some((function(e){return e.campaign.type===j.LL.FREE_SHIPPING})),zt=s.useState(""),Lt=(0,m.Z)(zt,2),Ht=Lt[0],Mt=Lt[1],Zt=d.variants.reduce((function(e,t){return e.finalPrice<t.finalPrice?e:t})),Wt=d.variants.reduce((function(e,t){return e.finalPrice>t.finalPrice?e:t})),Ut=(0,ne.Z)({tags:d.tags,options:null===(n=d.productOptionSet)||void 0===n?void 0:n.displayedOptions}),Gt=(0,he.Z)({tags:d.tags});var qt=(0,x.useRouter)(),Qt=s.useRef(null),Jt=null===We||void 0===We?void 0:We.filter((function(e){var t;return null===(t=d.tags)||void 0===t?void 0:t.find((function(t){return t.name===e.tag}))})),$t=0!==d.selectedVariant.stock&&!!at&&!!it,Yt=0===d.selectedVariant.stock&&!!at&&!!st&&d.selectedVariant.sellIfOutOfStock,Kt=function(e){var t=e.variant,n=e.displayedVariantValues,a=e.variantData;if(Qe){var i,s,o=a.images?null===(i=a.images.find((function(e){return!e.isVideo})))||void 0===i?void 0:i.image:null;return(0,V.jsx)("div",{onMouseEnter:function(){d.selectVariantValue(t,!0),clearTimeout(Qt.current)},onMouseLeave:function(){n&&n.length&&(Qt.current=setTimeout((function(){d.variants[0].variantValues.length&&d.variants.length&&d.selectVariantValue(d.variants[0].variantValues[d.variants[0].variantValues.length-1],!0)}),1500))},className:"product-variant-choice-image mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1  relative ".concat(y?"choice-circle":"choice-square"),children:(null===(s=a.mainImage)||void 0===s?void 0:s.image)&&(0,V.jsx)(C.E,{image:a.mainImage.isVideo&&o?o:a.mainImage.image,objectFit:"contain",sizes:"100px",layout:"fill",alt:t.name})})}var r=(0,V.jsx)("div",{onClick:function(e){Ze&&(e.preventDefault(),e.stopPropagation())},onMouseEnter:function(){d.selectVariantValue(t,!0),clearTimeout(Qt.current)},onMouseLeave:function(){Ze||n&&n.length&&(Qt.current=setTimeout((function(){if(d.variants[0].variantValues.length&&d.variants.length){var e=d.variants[0].variantValues.findIndex((function(e){return!!e.colorCode||!!e.thumbnailImage}));d.selectVariantValue(d.variants[0].variantValues[-1!==e?e:0],!0)}}),1500))},className:"product-variant-choice-bg mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1 ".concat(y?"choice-circle":"choice-square"),style:{backgroundColor:t.colorCode||""}});return t.thumbnailImage&&(r=(0,V.jsx)("div",{onClick:function(e){Ze&&(e.preventDefault(),e.stopPropagation())},onMouseEnter:function(){d.selectVariantValue(t,!0),clearTimeout(Qt.current)},onMouseLeave:function(){n&&n.length&&(Qt.current=setTimeout((function(){d.variants[0].variantValues.length&&d.variants.length&&d.selectVariantValue(d.variants[0].variantValues[d.variants[0].variantValues.length-1],!0)}),1500))},className:"product-variant-choice-image mr-1 sm:mr-2 md:mr-2 lg:mr-2 mb-1  relative ".concat(y?"choice-circle":"choice-square"),children:(0,V.jsx)(C.E,{image:t.thumbnailImage,objectFit:"contain",sizes:"100px",layout:"fill",alt:t.name})})),r},Xt=!d.hasStock,en=(0,S.$)().t,tn=d.selectedVariant.bundleSettings,nn=function(e){if(e.preventDefault(),Xt)return!1;if(tn)qt.push(d.productHref);else if(d.hasVariant||d.productOptionSetId)if($)qt.push(d.productHref);else{if(d.groupVariantsByVariantTypeId&&1===d.displayedVariantTypes.length&&!d.productOptionSetId)return void an();rn()}else an()},an=function(){var e=(0,u.Z)(h().mark((function e(){var t;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return dt(!0),ht(en("common:adding")),e.next=4,Tt.cartStore.addItem(d.selectedVariant,d);case 4:t=e.sent,setTimeout((function(){ht((0,V.jsx)(F.HhX,{size:25}))}),300),setTimeout((function(){dt(!1)}),1e3),t.success&&I&&Vt.setCartVisible(!0),!t.success&&(0,z.Le)(t.response);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),sn=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d.getProductOptionSet();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),on=function(){if(d.variants[0].variantValues.length&&d.variants.length){var e=d.variants[0].variantValues.findIndex((function(e){return!!e.colorCode||!!e.thumbnailImage}));d.selectVariantValue(d.variants[0].variantValues[-1!==e?e:0],!0)}},rn=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,sn();case 2:(0,P._1)({customUI:function(e){var t=e.onClose;return(0,V.jsx)("div",{className:"add-to-basket-modal relative",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:function(){on(),t()},className:"absolute top-2 right-2 text-gray-600 cursor-pointer hover:text-gray-900 modal-close-button-product",children:(0,V.jsx)(F.FU5,{size:25})}),(0,V.jsx)(Re.Z,{router:qt,onClose:function(){on(),t()},productDetail:d,isDrawerOpen:I,discountRatioBg:U,discountRatioColor:G,productPriceColor:v,productNameColor:f,buttonBorderRadius:ue})]})})},overlayClassName:"add-to-basket-overlay-modal",onClickOutside:function(){on()},onKeypressEscape:function(){on()}});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function ln(){var e,t=(null===(e=document.getElementsByClassName("category-products-image")[0])||void 0===e?void 0:e.clientHeight)||0;t&&Mt(".product-slider-video-container { height : ".concat(t,"px  }"))}s.useEffect((function(){return window.addEventListener("resize",ln),document.addEventListener("readystatechange",(function(e){"complete"===e.target.readyState&&ln()})),ln(),function(){return window.removeEventListener("resize",ln)}}),[]);var cn=function(e){var t,n,a;return e.isVideo?(0,V.jsx)("video",{controls:!L,autoPlay:!!_&&yt,loop:!!_,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",poster:null===(n=e.image)||void 0===n?void 0:n.src,preload:"none",children:(0,V.jsx)("source",{src:null===(a=e.image)||void 0===a?void 0:a.src})},"".concat(null===(t=e.image)||void 0===t?void 0:t.src,"-").concat(yt?Math.floor(4*Math.random()):"")):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:e.image,alt:d.name,useBlur:!Vt.isBlurRemove,objectFit:N?"cover":"contain",width:(0,z.yU)(D).width,height:(0,z.yU)(D).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 360px,  (max-width: 768px) 216px, 400px"})},dn=function(){return(0,V.jsx)("div",{style:tt({textAlign:B?"center":"left",fontSize:(null===Ne||void 0===Ne?void 0:Ne.value)||12,fontWeight:(null===Ce||void 0===Ce?void 0:Ce.value)||400},Pe?{minHeight:16}:{}),className:"text-xs font-normal text-gray-600 whitespace-nowrap ",children:Ut.useFormat||Gt.hasLengthFormat?"":d.selectedVariantUnitPriceText})},un=function(e){if(Jt){for(var t=0,n=0;n<e;n++)t+=Jt[n].imageHeight.value+15;return t}return 0},mn=".add-to-cart-overlay .stock:hover { background-color: ".concat(me," !important } "),pn="\n  .product-list-swiper.swiper__".concat(d.selectedVariant.id," .swiper-slide:not(.swiper-slide-active) {\n    display: ").concat(kt?"none":"block",";\n  }\n\n  .product-list-swiper.swiper__").concat(d.selectedVariant.id," .swiper-slide:not(.swiper-slide-next) {\n    display: ").concat("block !important",";\n  }\n\n  .product-list-swiper.swiper__").concat(d.selectedVariant.id," .swiper-slide {\n    display: ").concat("block !important",";\n  }\n  ");return(0,V.jsxs)(V.Fragment,{children:[!!Ze&&!!te&&(0,V.jsx)("style",{children:pn}),!!me&&(0,V.jsxs)("style",{children:[" ",mn]}),(0,V.jsx)(w.Z,{passHref:!0,href:d.productHref,children:(0,V.jsx)("a",{className:"".concat(Te?"grid":""),children:(0,V.jsxs)("div",{style:Te?{border:"1px solid ".concat(Se||"#000"),padding:"12px",borderRadius:Ve?Ve.value:0}:{},className:"relative overflow-hidden product-container  ".concat(T?"product-list-item":""," ").concat(Ze?"mobile":""," ").concat(Te&&Ie?"border-effect":""),children:[!!Jt&&Jt.map((function(e,t){return(0,V.jsx)("div",{style:{top:0===t?8:un(t),left:Ze&&et?et.value:8},className:"absolute z-50",children:(0,V.jsx)("div",{style:{width:e.imageWidth.value,height:e.imageHeight.value},className:"relative",children:(0,V.jsx)(C.E,{image:e.image,layout:"fill",sizes:"200px",objectFit:"contain"})})})})),d.selectedVariant.mainImage?Ze&&te?(0,V.jsx)(De.tq,{pagination:{clickable:!0},lazy:!0,modules:[Ee.tl,Ee.oM],slidesPerView:1,spaceBetween:0,className:"product-list-swiper relative swiper__".concat(d.selectedVariant.id),onSlideChangeTransitionEnd:function(e){var t,n;(St(!1),null!==(t=d.selectedVariant.images)&&void 0!==t&&t.length)&&(null!==(n=d.selectedVariant.images)&&void 0!==n&&n.length&&d.selectedVariant.images[e.activeIndex].isVideo?Nt(!0):Nt(!1))},children:d.selectedVariant.images&&d.selectedVariant.images.map((function(e){var t;return(0,V.jsx)(De.o5,{children:(0,V.jsxs)("div",{className:"relative ".concat(e.isVideo?"product-slider-video-container":"product-slider-image-container"),onMouseEnter:function(){Ze||O&&(vt({show:!0,productId:d.selectedVariant.id}),ln())},onMouseLeave:function(){Ze||O&&(vt({show:!1,productId:""}),ln())},children:[Xt&&(0,V.jsx)("div",{className:"stock-status ".concat(ke?"bg-transparent":""),children:(0,V.jsx)("span",{className:"absolute top-0 right-0",children:en("common:soldOut")})}),_t&&ie&&(0,V.jsx)("div",{className:"free-shipping-label",children:(0,V.jsx)("span",{style:tt({color:Ke||"#fff"},Ye?{backgroundColor:Ye}:{}),className:"absolute bottom-0 right-0",children:en("common:freeShipping")})}),cn(e),(0,V.jsxs)("style",{children:[" ",Ht," "]}),!!E&&!oe&&(0,V.jsx)("div",{className:"add-to-cart-overlay absolute mb-0 bottom-3 overlay-hover",style:{marginBottom:0},children:ct?(0,V.jsx)("button",{style:{borderRadius:null!==(t=null===ue||void 0===ue?void 0:ue.value)&&void 0!==t?t:0,backgroundColor:Ae||"#ededed",color:Fe||"#000"},className:"out-of-stock",children:Xt?en("common:outOfStock"):pt}):(0,V.jsx)("button",{style:Xt?{borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44}:{borderColor:q||"#000",color:Q||"#232323",backgroundColor:J||"#fff",borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44},className:"".concat(Xt&&!ct?"out-of-stock":"stock"),onClick:function(e){nn(e)},children:en(Xt?"common:outOfStock":"common:addBasket")})})]})})}))}):(0,V.jsxs)("div",{className:"relative ".concat(gt.show&&gt.productId===d.selectedVariant.id&&d.selectedVariant.images&&d.selectedVariant.images.length>0&&d.selectedVariant.images[1]?d.selectedVariant.images[1].isVideo?"product-slider-video-container":"product-slider-image-container":d.selectedVariant.mainImage.isVideo?"product-slider-video-container":"product-slider-image-container"),onMouseEnter:function(){Ze||O&&(vt({show:!0,productId:d.selectedVariant.id}),ln())},onMouseLeave:function(){Ze||O&&(vt({show:!1,productId:""}),ln())},children:[Xt&&(0,V.jsx)("div",{className:"stock-status ".concat(ke?"bg-transparent":""),children:(0,V.jsx)("span",{className:"absolute top-0 right-0",children:en("common:soldOut")})}),_t&&ie&&(0,V.jsx)("div",{className:"free-shipping-label",children:(0,V.jsx)("span",{style:tt({color:Ke||"#fff"},Ye?{backgroundColor:Ye}:{}),className:"absolute bottom-0 right-0",children:en("common:freeShipping")})}),function(){var e,t,n,a,i,s;return d.selectedVariant.mainImage?gt.show&&gt.productId===d.selectedVariant.id?d.selectedVariant.images&&d.selectedVariant.images.length>0&&d.selectedVariant.images[1]?d.selectedVariant.images[1].isVideo?(0,V.jsx)("video",{controls:!L,autoPlay:!!_,loop:!!_,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(t=d.selectedVariant.images[1].image)||void 0===t?void 0:t.src})},null===(e=d.selectedVariant.images[1].image)||void 0===e?void 0:e.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:d.selectedVariant.images[1].image,alt:d.name,useBlur:!Vt.isBlurRemove,objectFit:N?"cover":"contain",width:(0,z.yU)(D).width,height:(0,z.yU)(D).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 360px,  (max-width: 768px) 216px, 400px"}):d.selectedVariant.mainImage.isVideo?(0,V.jsx)("video",{controls:!L,autoPlay:!!_,loop:!!_,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(a=d.selectedVariant.mainImage.image)||void 0===a?void 0:a.src})},null===(n=d.selectedVariant.mainImage.image)||void 0===n?void 0:n.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:d.selectedVariant.mainImage.image,alt:d.name,useBlur:!Vt.isBlurRemove,objectFit:N?"cover":"contain",width:(0,z.yU)(D).width,height:(0,z.yU)(D).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 360px,  (max-width: 768px) 216px, 400px"}):d.selectedVariant.mainImage.isVideo?(0,V.jsx)("video",{controls:!L,autoPlay:!!_,loop:!!_,muted:!0,playsInline:!0,className:"product-video-list",controlsList:"nofullscreen",children:(0,V.jsx)("source",{src:null===(s=d.selectedVariant.mainImage.image)||void 0===s?void 0:s.src})},null===(i=d.selectedVariant.mainImage.image)||void 0===i?void 0:i.src):(0,V.jsx)(C.E,{className:"category-products-image",layout:"responsive",image:d.selectedVariant.mainImage.image,alt:d.name,useBlur:!Vt.isBlurRemove,objectFit:N?"cover":"contain",width:(0,z.yU)(D).width,height:(0,z.yU)(D).height,sizes:"(max-width: 320px) 136px, (max-width: 450px) 360px,  (max-width: 768px) 216px, 400px"}):null}(),(0,V.jsxs)("style",{children:[" ",Ht," "]}),!!E&&!oe&&(0,V.jsx)("div",{className:"add-to-cart-overlay absolute mb-0 bottom-3 overlay-hover",style:{marginBottom:0},children:ct?(0,V.jsx)("button",{style:{borderRadius:null!==(a=null===ue||void 0===ue?void 0:ue.value)&&void 0!==a?a:0,backgroundColor:Ae||"#ededed",color:Fe||"#000"},className:"out-of-stock",children:Xt?en("common:outOfStock"):pt}):(0,V.jsx)("button",{style:Xt?{borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44}:{borderColor:q||"#000",color:Q||"#232323",backgroundColor:J||"#fff",borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44},className:"".concat(Xt&&!ct?"out-of-stock":"stock"),onClick:function(e){nn(e)},children:en(Xt?"common:outOfStock":"common:addBasket")})})]}):(0,V.jsx)("div",{className:"product-no-image"}),(0,V.jsxs)("div",{className:" category-products-info-main product-list-item-info relative",children:[!!T&&!oe&&A&&A===H.qF.TOP&&(0,V.jsx)("div",{className:"add-to-cart-overlay",children:ct?(0,V.jsx)("button",{style:{borderRadius:null!==(i=null===ue||void 0===ue?void 0:ue.value)&&void 0!==i?i:0,backgroundColor:Ae||"#ededed",color:Fe||"#000"},className:"out-of-stock",children:Xt?en("common:outOfStock"):pt}):(0,V.jsx)("button",{style:Xt?{borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44}:{borderColor:q||"#000",color:Q||"#232323",backgroundColor:J||"#fff",borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44},className:"".concat(Xt&&!ct?"out-of-stock":"stock"),onClick:function(e){nn(e)},children:en(Xt?"common:outOfStock":"common:addBasket")})}),!!T&&!A&&!oe&&(0,V.jsx)("div",{className:"add-to-cart-overlay",children:ct?(0,V.jsx)("button",{style:{borderRadius:null!==(o=null===ue||void 0===ue?void 0:ue.value)&&void 0!==o?o:0,backgroundColor:Ae||"#ededed",color:Fe||"#000"},className:"out-of-stock",children:Xt?en("common:outOfStock"):pt}):(0,V.jsx)("button",{style:Xt?{borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44}:{borderColor:q||"#000",color:Q||"#232323",backgroundColor:J||"#fff",borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44},className:"".concat(Xt&&!ct?"out-of-stock":"stock"),onClick:function(e){nn(e)},children:en(Xt?"common:outOfStock":"common:addBasket")})}),!!R&&function(){var e,t,n,a,i,s,o,r,l=(0,V.jsx)("h3",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(e=d.brand)||void 0===e?void 0:e.name});switch(be){case H._p.h1:l=(0,V.jsx)("h1",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(t=d.brand)||void 0===t?void 0:t.name});break;case H._p.h2:l=(0,V.jsx)("h2",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(n=d.brand)||void 0===n?void 0:n.name});break;case H._p.h3:l=(0,V.jsx)("h3",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(a=d.brand)||void 0===a?void 0:a.name});break;case H._p.h4:l=(0,V.jsx)("h4",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(i=d.brand)||void 0===i?void 0:i.name});break;case H._p.h5:l=(0,V.jsx)("h5",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(s=d.brand)||void 0===s?void 0:s.name});break;case H._p.h6:l=(0,V.jsx)("h6",{className:"brand-name",style:{color:f||"#000",textTransform:k?"uppercase":"none",textAlign:B?"center":"unset",fontWeight:K?K.value:700},children:null===(o=d.brand)||void 0===o?void 0:o.name});break;default:K&&K.value,null===(r=d.brand)||void 0===r||r.name}return l}(),!!ge&&(null===(r=d.tags)||void 0===r?void 0:r.filter((function(e){return null===ve||void 0===ve?void 0:ve.includes(e.name)})).map((function(e){return(0,V.jsx)("span",{className:"flex",style:tt({color:Je||"#000",textTransform:k?"uppercase":"none",justifyContent:je?"center":"unset",fontWeight:400,fontSize:14},$e?tt({backgroundColor:$e,width:"max-content",padding:"4px 8px"},je?{margin:"0 auto"}:{}):{}),children:"".concat(e.name," ")})}))),function(){if(nt)return(0,V.jsx)("p",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});var e=(0,V.jsx)("h2",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});switch(xe){case H._p.h1:e=(0,V.jsx)("h1",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;case H._p.h2:e=(0,V.jsx)("h2",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;case H._p.h3:e=(0,V.jsx)("h3",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;case H._p.h4:e=(0,V.jsx)("h4",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;case H._p.h5:e=(0,V.jsx)("h5",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;case H._p.h6:e=(0,V.jsx)("h6",{className:"product-name ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),style:tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),children:d.name});break;default:"product-name  ".concat(Z&&d.averageRating&&d.reviewCount?"mb-0":"mb-2","  ").concat(R&&d.brand?"":"mt-3"," ").concat(pe?"whitespace-nowrap overflow-hidden overflow-ellipsis":""),tt({color:f||"#000",textAlign:B?"center":"unset",fontWeight:Be?Be.value:400},ze&&Le?{height:(Ze&&Me?Me.value:Le.value)+(d.selectedVariant.hasDiscount?0:20),overflow:"hidden"}:{}),d.name}return e}(),!we&&ye&&!Bt&&(0,V.jsx)(dn,{}),Z&&d.averageRating&&d.reviewCount?(0,V.jsxs)("div",{className:"flex flex-col sm:flex-col md:flex-row lg:flex-row items-start sm:items-start md:items-center lg:items-center -mt-1 space-x-0 sm:space-x-0 md:space-x-2 lg:space-x-2 ".concat(B?"items-center justify-center":""),style:{textAlign:B?"center":"unset"},children:[(0,V.jsx)("div",{children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:d.averageRating||0,starRatedColor:"#f7c603",numberOfStars:5,name:"rating",starDimension:"16px",starSpacing:"1px"})}),!!W&&(0,V.jsx)("span",{style:{color:f||"#000"},className:"text-xs mt-1 font-light",children:en("common:totalReviewSummaryCard",{fieldName:d.reviewCount})})]}):Z&&He?(0,V.jsx)("span",{className:"flex ".concat(W?"h-[32px] sm:h-[32px]":"h-[12px] sm:h-[12px]"," md:h-[12px] lg:h-[12px]")}):null,(0,V.jsxs)("div",{children:[!oe&&!(!d.hasStock&&Ue)&&(0,V.jsx)("div",{className:"price-main ".concat(fe&&Zt.finalPrice!==Wt.finalPrice?"range-price":""," ").concat(fe?"price-range":""),style:{height:d.selectedVariant.hasDiscount?"40px":"20px",justifyContent:B?"center":"unset",fontWeight:ee?ee.value:900},children:fe?(0,V.jsx)("div",{style:{color:v||"#000"},className:"sell-price",children:Zt.finalPrice===Wt.finalPrice?Zt.formattedFinalPrice:(0,V.jsxs)(V.Fragment,{children:[Zt.formattedFinalPrice," -"," ",Wt.formattedFinalPrice]})}):(0,V.jsx)(V.Fragment,{children:Ut.useFormat||Gt.hasLengthFormat?(0,V.jsx)("div",{style:{color:v||"#000"},className:"sell-price",children:d.selectedVariantUnitPriceText}):(0,V.jsx)(V.Fragment,{children:d.selectedVariant.hasDiscount?(0,V.jsxs)("div",{className:"discount-price-main flex flex-row",children:[(0,V.jsxs)("div",{style:{backgroundColor:U||"#000",color:G||"#fff",fontWeight:ee?ee.value:900,borderRadius:(null===qe||void 0===qe?void 0:qe.value)||0},className:"discount-percent",children:["%",d.selectedVariant.discountPercentage]}),(0,V.jsxs)("div",{className:"flex discount-price flex-col",children:[(0,V.jsx)("span",{style:{color:Oe||"#aaa"},children:d.selectedVariant.formattedSellPrice}),(0,V.jsx)("span",{style:{color:v||"#000"},children:d.selectedVariant.formattedFinalPrice})]})]}):(0,V.jsx)("div",{style:{color:v||"#000"},className:"sell-price",children:d.selectedVariant.formattedFinalPrice})})})}),!!re&&(0,V.jsx)("div",{className:"flex ",children:null===(l=d.tags)||void 0===l?void 0:l.map((function(e){if(null!==de&&void 0!==de&&de.includes(e.name))return(0,V.jsx)("span",{style:{backgroundColor:le||"#000",color:ce||"#fff"},className:"mr-1 px-2 py-1 text-sm mb-2  mt-2",children:e.name})}))}),!we&&!ye&&!Bt&&(0,V.jsx)(dn,{}),b&&d.displayedVariantTypes.length>0?(0,V.jsxs)("div",{style:tt({justifyContent:B?"center":"unset"},Ge?{minHeight:Ge.value}:{}),className:"mt-2 flex flex-wrap",children:[!!Xe&&(0,V.jsx)("style",{children:"\n                    .product-variant-choice-image {\n                      width:".concat(Xe.value,"px;\n                      height:").concat(Xe.value,"px;\n                    }\n                    ")}),d.displayedVariantTypes.map((function(e,t){var n=e.variantType,a=e.displayedVariantValues;return 0!==t?null:n.selectionType===se.C.COLOR&&a.map((function(e,t){var n=e.variantValue,i=(e.hasStock,e.isSelected,e.variant);if(t<((null===ot||void 0===ot?void 0:ot.value)||4))return(0,V.jsx)(Kt,{variant:n,displayedVariantValues:a,variantData:i},n.id)}))})),d.displayedVariantTypes.map((function(e,t){var n=e.variantType,a=e.displayedVariantValues;return 0!==t?null:n.selectionType===se.C.COLOR&&a.length>((null===ot||void 0===ot?void 0:ot.value)||4)?(0,V.jsx)("div",{className:"product-variant-choice-bg borderless  flex items-center justify-center  text-gray-400 text-sm ",children:"+"+(a.length-((null===ot||void 0===ot?void 0:ot.value)||4))}):null}))]}):(0,V.jsxs)(V.Fragment,{children:[!p&&(0,V.jsx)("div",{style:{color:v||"#000",textAlign:B?"center":"unset"},className:"variant",children:function(){var e="";return d.displayedVariantTypes.map((function(t){return e+=t.displayedVariantValues.length+" "+t.variantType.name+" "})),e}()}),!!Y&&(0,V.jsx)("div",{style:{color:v||"#000",textAlign:B?"center":"unset"},className:"variant inline-block",children:function(){var e="";return d.displayedVariantTypes.map((function(t){return t.displayedVariantValues.map((function(t){return e+=t.variantValue.name+", "}))})),e.substring(0,e.length-2)}()})]}),oe&&Dt&&Et&&(0,V.jsx)(w.Z,{passHref:!0,href:"/account/login",children:(0,V.jsx)("a",{children:(0,V.jsx)("div",{style:tt(tt({},At?{fontSize:At}:{}),Ft?{fontWeight:Ft}:{}),className:"text-sm mt-4",dangerouslySetInnerHTML:{__html:(Ot?Et.replace(Ot,'<span class="underline">'.concat(Ot,"</span>")):"<span>".concat(Et,"</span>"))||""}})})}),$t?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:it},className:"unreset unreset-reset"}):null,Yt?(0,V.jsx)("div",{dangerouslySetInnerHTML:{__html:st},className:"unreset unreset-reset"}):null,!!T&&!oe&&A&&A===H.qF.BOTTOM&&(0,V.jsx)("div",{className:"add-to-cart-overlay mt-2",children:ct?(0,V.jsx)("button",{style:{borderRadius:null!==(c=null===ue||void 0===ue?void 0:ue.value)&&void 0!==c?c:0,backgroundColor:Ae||"#ededed",color:Fe||"#000"},className:"out-of-stock",children:Xt?en("common:outOfStock"):pt}):(0,V.jsx)("button",{style:Xt?{borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44}:{borderColor:q||"#000",color:Q||"#232323",backgroundColor:J||"#fff",borderRadius:ue?ue.value:0,height:(null===_e||void 0===_e?void 0:_e.value)||44},className:"".concat(Xt&&!ct?"out-of-stock":"stock"),onClick:function(e){nn(e)},children:en(Xt?"common:outOfStock":"common:addBasket")})})]})]})]})})})]})}));function at(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function it(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?at(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):at(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var st=(0,o.Pi)((function(e){var t,n,a=e.productsList,i=e.brand,o=e.hideVariantOptions,r=e.titleColor,l=e.productNameColor,c=e.productPriceColor,d=e.showColors,p=e.isSquare,f=e.isImageContain,g=e.isBigBrandName,v=e.addBasketModalShow,j=e.isDrawerOpen,b=e.isCenter,N=e.isBrandShow,T=e.isFilterInShowSearch,I=e.imageAspectRatio,P=e.showDescription,B=e.descriptionPosition,R=e.showFullDescription,D=e.addBasketModalShowWhenHovered,E=e.secondImageShow,O=e.hideColumnSelector,A=e.addBasketButtonPosition,_=e.isVideoAutoPlay,L=e.isVideoControlsHide,M=e.showRating,Z=e.showReviewCount,U=e.discountRatioBg,G=e.discountRatioColor,q=e.addBasketButtonBorderColor,Q=e.addBasketButtonTextColor,J=e.addBasketButtonBgColor,$=e.isAddBasketGoDetailPage,Y=e.showVariantOptionsName,K=e.brandFontWeight,ee=e.priceFontWeight,te=e.pageBgColor,ne=e.isMobileProductImagesSwiper,ie=e.isFreeShipping,se=e.titleMobileFontSize,oe=e.isPaginationPage,re=e.hidePrice,le=e.showTag,ce=e.tagBgColor,ue=e.tagColor,me=e.showTagsText,pe=e.sortBarBg,he=e.sortBarTextColor,xe=e.buttonBorderRadius,ve=e.buttonHoverBgColor,je=e.isSingleLineProductName,be=e.showPriceRange,ye=e.htagLevel,Ne=e.showModelTags,Ce=e.modelTagTexts,we=e.isCenterTag,ke=e.brandHtagLevel,Se=e.sortBarSelectedBgColor,Te=e.sortBarSelectedTextColor,Ve=e.isUnitPriceUnderProductName,Ie=e.unitPriceFontSize,Pe=e.unitPriceFontWeight,Be=e.isSortHide,Re=e.isFilterHide,De=e.isSearchHide,Ee=e.hideUnitPrice,Oe=e.hideOverlay,Ae=e.isSortDropdownDesign,Fe=e.borderColor,_e=e.showBorder,ze=e.cartBorderRadius,Le=e.isBorderHoverEffect,He=e.productNameFontWeight,Me=e.discountPriceTextColor,We=e.addButtonAnimationBgColor,$e=e.addButtonAnimationTextColor,Ye=e.addButtonHeight,Ke=e.isCustomProductNameHeight,Xe=e.productNameHeight,et=e.isCustomerReviewsStarAlignment,tt=e.productNameHeightMobile,at=e.tagBadges,st=e.condPriceHide,ot=e.variantsContainerMinHeight,rt=e.discountPriceBorderRadius,lt=e.filtersColor,ct=e.priceRangeBarHeight,dt=e.priceRangeBarColor,ut=e.isMobileThreeGrid,mt=e.showBrandImage,pt=e.aspectRatio,ht=e.isColorVariantValueFirstImage,ft=e.hideSubCategories,xt=e.modelTagColor,gt=e.modelTagBgColor,vt=e.freeShippingLabelBgColor,jt=e.freeShippingLabelTextColor,bt=e.variantsSwatchSize,yt=e.tagImageMobileLeft,Nt=e.isProductNamePTag,Ct=e.shippingInfo,wt=e.shippingInfoDescription,kt=e.shippingInfoIfSellOutOfStockDescription,St=e.variantCount,Tt=s.useState(!0),Vt=(0,m.Z)(Tt,2),It=Vt[0],Pt=Vt[1],Bt=s.useState(!1),Rt=(0,m.Z)(Bt,2),Dt=Rt[0],Et=Rt[1],Ot=s.useState(!0),At=(0,m.Z)(Ot,2),Ft=At[0],_t=At[1],zt=s.useState(""),Lt=(0,m.Z)(zt,2),Ht=(Lt[0],Lt[1]),Mt=s.useState(!1),Zt=(0,m.Z)(Mt,2),Wt=Zt[0],Ut=Zt[1],Gt=s.useState(!1),qt=(0,m.Z)(Gt,2),Qt=qt[0],Jt=qt[1],$t=s.useState(""),Yt=(0,m.Z)($t,2),Kt=Yt[0],Xt=Yt[1],en=(0,S.$)().t,tn=s.createRef(),nn=(0,x.useRouter)(),an=(0,ge.Z)(W.tq),sn=(0,m.Z)(an,1)[0],on=X.Z.getInstance(),rn=s.useState(1e3),ln=(0,m.Z)(rn,2),cn=ln[0],dn=ln[1],un=s.useState(null),mn=(0,m.Z)(un,2),pn=mn[0],hn=mn[1],fn=(0,ae.Z)(!!re),xn=(0,m.Z)(fn,2),gn=xn[0],vn=xn[1],jn=s.useState(!1),bn=(0,m.Z)(jn,2),yn=bn[0],Nn=bn[1],Cn=s.useState(!1),wn=(0,m.Z)(Cn,2),kn=wn[0],Sn=wn[1],Tn=a.data.some((function(e){return e.selectedVariantUnitPriceText})),Vn=s.useRef(null);(0,z.ZP)(Vn,(function(){return kn&&Sn(!1)}));var In=s.useRef(null),Pn=function(){return(0,V.jsx)("div",{className:"flex justify-center h-8",children:(0,V.jsxs)("span",{className:"flex text-sm",children:[en("common:loading"),(0,V.jsx)(k.E$Q,{size:20,className:"ml-2 loading-icon"})]})})};s.useEffect((function(){hn(a.sort)}),[a.sort]),s.useEffect((function(){var e=document.querySelector("#show-all-description");e&&e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),i.description&&dn(i.description.length+1)}))})),s.useEffect((function(){if(localStorage.getItem("lastClickedProductId")&&!yn){var e=localStorage.getItem("lastClickedProductId"),t=document.querySelector('[data-id="'.concat(e,'"]'));t&&(null===t||void 0===t||t.scrollIntoView(),window.scrollTo({top:window.pageYOffset-150}),localStorage.removeItem("lastClickedProductId"))}})),s.useEffect((function(){return oe||window.addEventListener("scroll",Rn),function(){oe||window.removeEventListener("scroll",Rn)}}),[a]);var Bn=s.useRef(null),Rn=function(){if(Bn.current&&Bn.current.offsetTop<window.scrollY){var e=(window.scrollY-Bn.current.offsetTop)/(window.innerWidth<768?350:450),t=Math.floor(e*(window.innerWidth<768?Dt?1:2:4)/a.limit)+1;a.setVisibleInfiniteScrollPage(t+a.minPage-1)}},Dn=function(){return(0,V.jsxs)(V.Fragment,{children:[a.isFeaturedSortEnabled&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.FEATURED)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.FEATURED===pn?"active":"passive"," "),children:en("common:filters.featured")}),zn(Ze.eV.NAME)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.A_Z)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.A_Z===pn?"active":"passive"," "),children:en("common:filters.nameAZ")}),zn(Ze.eV.NAME)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.Z_A)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.Z_A===pn?"active":"passive"," "),children:en("common:filters.nameZA")}),zn(Ze.eV.PRICE)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.INCREASING_PRICE)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.INCREASING_PRICE===pn?"active":"passive"," "),children:en("common:filters.increasedPrice")}),zn(Ze.eV.PRICE)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.DECREASING_PRICE)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.DECREASING_PRICE===pn?"active":"passive"," "),children:en("common:filters.decreasingPrice")}),zn(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.INCREASING_DISCOUNT)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.INCREASING_DISCOUNT===pn?"active":"passive"," "),children:en("common:filters.discountIncreasing")}),zn(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.DECRASING_DISCOUNT)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.DECRASING_DISCOUNT===pn?"active":"passive"," "),children:en("common:filters.discountDecreasing")}),zn(Ze.eV.CREATED_AT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.FIRST_ADDED)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.FIRST_ADDED===pn?"active":"passive"," "),children:en("common:filters.firstAdded")}),zn(Ze.eV.CREATED_AT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.LAST_ADDED)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.LAST_ADDED===pn?"active":"passive"," "),children:en("common:filters.lastAdded")}),zn(Ze.eV.AVERAGE_RATING)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.AVERAGE_RATING)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.AVERAGE_RATING===pn?"active":"passive"," "),children:en("common:filters.averageRating")}),zn(Ze.eV.SALE_COUNT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.SALE_COUNT)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.SALE_COUNT===pn?"active":"passive"," "),children:en("common:filters.saleCount")}),zn(Ze.eV.REVIEW_COUNT)&&(0,V.jsx)("div",{onClick:function(){a.setSortType(Ze.Rk.REVIEW_COUNT)},style:he?{color:he}:{},className:"sort-item ".concat(Ze.Rk.REVIEW_COUNT===pn?"active":"passive"," "),children:en("common:filters.reviewCount")})]})};function En(){if(Re)return!1;var e=!0;return Array.isArray(a.filters)&&Array.isArray(a.filterCategories)?0===a.filters.length&&0===a.filterCategories.length&&(e=!1):null===a.filters&&void 0===a.filterCategories&&(e=!1),e}var On=function(e,t){if(!oe){var n=Math.floor(t/a.limit)+1;a.setVisibleInfiniteScrollPage(n+a.minPage-1)}Nn(!0),localStorage.setItem("lastClickedProductId",e)},An=function(){if(In.current){var e=document.querySelector(".scrolled_list-main").getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:e,behavior:"smooth"})}},Fn=".sort-item:hover {\n    color: ".concat(he," !important;\n    border-bottom: 2px solid #232323;\n    background-color:  ").concat(pe," !important;\n  }\n  \n  .sort-item.active {\n    color: ").concat(pe," !important;\n  }\n\n  .sort-item.active:hover {\n    color: ").concat(he," !important;\n    border-bottom: 2px solid #232323;\n    background-color:  ").concat(pe," !important;\n  }\n  "),_n="\n  .sort-item.active {\n    background-color:".concat(Se," !important;\n    color:").concat(Te," !important;\n  }\n  \n  "),zn=function(e){var t;return!(null!==(t=a.disabledSortTypes)&&void 0!==t&&t.some((function(t){return t===e})))},Ln=function(e){var t=a.queryParams,n="";return n=t.includes("page=")?t.replace(/page=\d+/,"page=".concat(e)):"".concat(t,"&page=").concat(e),(nn.query&&(nn.query.slug||""))+"?"+n},Hn=function(){if(!pt)return{width:1080,height:475};var e={width:1,height:1};switch(pt){case H.aG["_1:1"]:e={width:1,height:1};break;case H.aG["_2:3"]:e={width:2,height:3};break;case H.aG["_4:3"]:e={width:4,height:3};break;case H.aG["_2:1"]:e={width:2,height:1};break;case H.aG["_16:9"]:e={width:16,height:9};break;case H.aG["_16:5"]:e={width:16,height:5};break;default:e={width:1,height:1}}return e};return(0,V.jsxs)("div",{style:te?{backgroundColor:te}:{},children:[(!!pe||!!he)&&(0,V.jsxs)("style",{children:[" ",Fn," "]}),(!!Se||!!Te)&&(0,V.jsx)("style",{children:_n}),!!mt&&i.image&&(0,V.jsx)(C.E,{className:"",layout:"responsive",image:i.image,alt:i.name,width:Hn().width,height:Hn().height,sizes:"100vw"}),(0,V.jsxs)("div",{className:"container flex flex-col category-products-main mx-auto relative  mb-8",children:[(0,V.jsxs)("div",{ref:In,className:"flex mb-4 mt-4 sm:mt-8 md:mt-8 lg:mt-8 px-4  items-center scrolled_list-main",children:[(0,V.jsx)("h1",{style:it({color:r||"#000"},sn&&se?{fontSize:se.value}:{}),ref:tn,className:"relative text-2xl h-8 sm:text-2xl  md:text-3xl lg:text-3xl xl:text-3xl font-normal flex items-center brand-title",children:i.name}),(0,V.jsxs)("span",{className:"text-xs flex h-5 sm:h-6 md:h-7 lg:h-7 font-normal items-end ml-5 text-gray-500",children:[a.count," ",en("common:product")]})]}),!!P&&i.description&&B===H.In.TOP&&((null===(t=i.description)||void 0===t?void 0:t.length)>cn&&R?(0,V.jsx)("h4",{children:(0,V.jsx)("div",{className:"unreset mb-4 px-4 unreset-reset",dangerouslySetInnerHTML:{__html:"".concat(i.description.slice(0,cn),'  <span id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex">').concat(en("common:showMore"),"</span> ")}})}):(0,V.jsx)("h4",{children:(0,V.jsx)("div",{className:"unreset mb-4 px-4 unreset-reset",dangerouslySetInnerHTML:{__html:i.description}})})),(!Be||!Re)&&(Re&&Ae?(0,V.jsx)("div",{className:"w-full justify-end space-x-4 items-center mobil-filters px-4 mb-4",children:(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:Vn,onClick:function(){return Sn(!kn)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:he||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(he||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(kn?"active":"passive"),children:(0,V.jsx)(Dn,{})})]})})}):(0,V.jsx)("div",{className:"mobil-filters-bg mobil-filters mx-4",style:pe?{backgroundColor:pe}:{},children:(0,V.jsxs)("div",{className:"mobil-filters w-full",children:[(0,V.jsx)("div",{style:{borderRight:"1px solid ".concat(he||"#d8d8d8"," ")},onClick:function(){return Et(!Dt)},className:"mobil-template justify-center w-1/5 flex items-center",children:Dt?(0,V.jsx)(Ge.aCJ,{size:20,color:"".concat(he||"#484848")}):(0,V.jsx)(Ge.Dd2,{size:20,style:{transform:"rotate(90deg)"},color:"".concat(he||"#484848")})}),En()&&(0,V.jsxs)("div",{style:{borderRight:"".concat(Ae||Be?"0":"1","px solid ").concat(he||"#d8d8d8"," ")},onClick:function(){return on.setFiltersShow(!0)},className:"mobil-filters ".concat(Ae||Be?"w-full":"w-2/5","   items-center justify-center"),children:[(0,V.jsxs)("span",{className:"relative",children:[(0,V.jsx)(Ge.Ihx,{size:20,color:"".concat(he||"#484848")}),a.hasAppliedfilter&&(0,V.jsx)("span",{className:"is-sorting"})]}),(0,V.jsx)("span",{style:{color:"".concat(he||"#484848")},className:"ml-2",children:en("common:filter")})]}),!(Ae||Be)&&(0,V.jsxs)("div",{onClick:function(){Wt?(Ut(!1),document.documentElement.style.overflow="unset"):(Ut(!0),document.documentElement.style.overflow="hidden")},className:"mobil-sorting-icon relative justify-center items-center ".concat(En()?"w-2/5":"w-4/5"," "),children:[(0,V.jsxs)("span",{className:"relative",children:[(0,V.jsx)(k.IMN,{size:20,color:"".concat(he||"#484848")}),Qt&&(0,V.jsx)("span",{className:"is-sorting"})]}),(0,V.jsx)("span",{style:{color:"".concat(he||"#484848")},className:"ml-2",children:en("common:sort")}),Wt&&(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("div",{onClick:function(){Ut(!1),document.documentElement.style.overflow="unset"},className:"mobil-sorting-bg"}),(0,V.jsx)("div",{className:"mobile-sorting ",children:(0,V.jsxs)("div",{className:"mobile-sorting-content flex flex-col w-full",children:[(0,V.jsx)("span",{style:{color:"#484848"},className:" text-2xl px-4 py-2",children:en("common:sort")}),(0,V.jsx)("span",{className:"absolute right-2 top-2",children:(0,V.jsx)(F.FU5,{size:20,color:"#484848"})}),a.isFeaturedSortEnabled&&(0,V.jsxs)("span",{style:{background:Ze.Rk.FEATURED===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.FEATURED),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.FEATURED===pn?"font-normal":"font-light","  "),children:[(0,V.jsxs)("span",{children:[" ",en("common:filters.featured")]}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.FEATURED===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.NAME)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.A_Z===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.A_Z),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.A_Z===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.nameAZ")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.A_Z===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.NAME)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.Z_A===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.Z_A),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.Z_A===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.nameZA")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.Z_A===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.PRICE)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.INCREASING_PRICE===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.INCREASING_PRICE),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black px-4 items-center justify-between py-2 flex ".concat(Ze.Rk.INCREASING_PRICE===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.increasedPrice")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.INCREASING_PRICE===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.PRICE)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.DECREASING_PRICE===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.DECREASING_PRICE),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.DECREASING_PRICE===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.decreasingPrice")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.DECREASING_PRICE===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.INCREASING_DISCOUNT===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.INCREASING_DISCOUNT),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black flex items-center justify-between px-4 py-2 ".concat(Ze.Rk.INCREASING_DISCOUNT===pn?"font-normal":"font-light","  "),children:[(0,V.jsxs)("span",{children:[en("common:filters.discountIncreasing")," "]}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.INCREASING_DISCOUNT===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.DISCOUNT_RATIO)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.DECRASING_DISCOUNT===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.DECRASING_DISCOUNT),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.DECRASING_DISCOUNT===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.discountDecreasing")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.DECRASING_DISCOUNT===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.CREATED_AT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.FIRST_ADDED===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.FIRST_ADDED),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.FIRST_ADDED===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.firstAdded")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.FIRST_ADDED===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.CREATED_AT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.LAST_ADDED===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.LAST_ADDED),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2  ".concat(Ze.Rk.LAST_ADDED===pn?"font-normal":"font-light"," "),children:[(0,V.jsx)("span",{children:en("common:filters.lastAdded")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.LAST_ADDED===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.AVERAGE_RATING)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.AVERAGE_RATING===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.AVERAGE_RATING),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.AVERAGE_RATING===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.averageRating")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.AVERAGE_RATING===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.SALE_COUNT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.SALE_COUNT===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.SALE_COUNT),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.SALE_COUNT===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.saleCount")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.SALE_COUNT===pn&&(0,V.jsx)("span",{})})]}),zn(Ze.eV.REVIEW_COUNT)&&(0,V.jsxs)("span",{style:{background:Ze.Rk.REVIEW_COUNT===pn?"#f4f4f4":"#fff"},onClick:function(){a.setSortType(Ze.Rk.REVIEW_COUNT),Ut(!1),document.documentElement.style.overflow="unset",Jt(!0)},className:"text-primary-black items-center flex justify-between px-4 py-2 ".concat(Ze.Rk.REVIEW_COUNT===pn?"font-normal":"font-light","  "),children:[(0,V.jsx)("span",{children:en("common:filters.reviewCount")}),(0,V.jsx)("div",{className:"checkbox",children:Ze.Rk.REVIEW_COUNT===pn&&(0,V.jsx)("span",{})})]})]})})]})]})]})})),!Be&&!Re&&!!Ae&&(0,V.jsx)("div",{className:"w-full justify-end space-x-4 items-center mobil-filters px-4 mb-4",children:(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:Vn,onClick:function(){return Sn(!kn)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:he||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(he||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(kn?"active":"passive"),children:(0,V.jsx)(Dn,{})})]})})}),(0,V.jsxs)("div",{className:"flex items-centers flex-col sm:flex-row md:flex-row lg:flex-row",children:[!De&&(0,V.jsx)("div",{className:"search-main w-full sm:w-64 md:w-64 lg:w-64 ",children:(0,V.jsxs)("div",{className:"px-4 relative",children:[(0,V.jsx)("input",{type:"text",value:a.searchKeyword,onChange:function(e){return a.searchKeyword=e.target.value},className:"search-input outline-none",placeholder:en("common:searchPlaceholder")}),a.searchKeyword.length?(0,V.jsx)("span",{onClick:function(){a.searchKeyword=""},className:"search-icon",children:(0,V.jsx)(F.FU5,{})}):null]})}),Be||Ae?null:(0,V.jsxs)("div",{className:"template-list desktop-sort-template items-center ",style:pe?{backgroundColor:pe}:{},children:[(0,V.jsx)("div",{className:"flex flex-wrap w-11/12",children:(0,V.jsx)(Dn,{})}),(0,V.jsxs)("div",{className:"flex absolute right-6 ".concat(O?"hidden":""),children:[(0,V.jsxs)("div",{onClick:function(){return Pt(!1)},style:he?{borderColor:he}:{},className:"relative  grid-template-choise-one ".concat(It?"":"active"),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:he||""}),(0,V.jsx)("span",{className:"grid-template",children:(0,V.jsx)(Ge.aCJ,{size:14,color:he||""})})]}),(0,V.jsxs)("div",{onClick:function(){return Pt(!0)},style:he?{borderColor:he}:{},className:"flex grid-template-choise-two ".concat(It?"active":""," "),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:he||""}),(0,V.jsx)("span",{className:"grid-template-two",children:(0,V.jsx)(Ge.aCJ,{size:14,color:he||""})})]})]})]}),!Be&&Ae?(0,V.jsxs)("div",{className:"flex w-full justify-end space-x-4 items-center template-list",children:[(0,V.jsx)("div",{children:(0,V.jsxs)("div",{ref:Vn,onClick:function(){return Sn(!kn)},className:"border h-9 w-48 outline-none relative flex items-center px-4 justify-between cursor-pointer",children:[(0,V.jsx)("span",{style:{color:he||"#484848"},className:"text-sm whitespace-nowrap overflow-hidden overflow-ellipsis w-11/12",children:(0,z.jx)(a.sort)}),(0,V.jsx)("span",{className:"flex ml-4",children:(0,V.jsx)(Ge.Ihx,{color:"".concat(he||"#484848"),size:16})}),(0,V.jsx)("div",{className:"absolute border dropdown-sort ".concat(kn?"active":"passive"),children:(0,V.jsx)(Dn,{})})]})}),(0,V.jsxs)("div",{className:"flex ".concat(O?"hidden":""),children:[(0,V.jsxs)("div",{onClick:function(){return Pt(!1)},style:he?{borderColor:he}:{},className:"relative  grid-template-choise-one ".concat(It?"":"active"),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:he||""}),(0,V.jsx)("span",{className:"grid-template",children:(0,V.jsx)(Ge.aCJ,{size:14,color:he||""})})]}),(0,V.jsxs)("div",{onClick:function(){return Pt(!0)},style:he?{borderColor:he}:{},className:"flex grid-template-choise-two ".concat(It?"active":""," "),children:[(0,V.jsx)(Ge.aCJ,{size:14,color:he||""}),(0,V.jsx)("span",{className:"grid-template-two",children:(0,V.jsx)(Ge.aCJ,{size:14,color:he||""})})]})]})]}):null]}),(0,V.jsxs)("div",{className:"flex",children:[En()?(0,V.jsx)("div",{className:" w-64 p-4 desktop-filters",children:(0,V.jsxs)("div",{style:lt?{color:lt}:{},className:"sticky-filter",children:[a.filterCategories&&a.filterCategories.length>0&&!ft&&(0,V.jsxs)("div",{children:[(0,V.jsxs)("div",{onClick:function(){_t(!Ft)},className:"flex justify-between items-center cursor-pointer",children:[(0,V.jsx)("span",{className:"font-medium text-sm",children:en("common:subCategories")}),(0,V.jsx)("span",{children:Ft?(0,V.jsx)(k.jRD,{size:20}):(0,V.jsx)(k.OrA,{size:20})})]}),(0,V.jsxs)("div",{className:"flex my-4 sub-categories-main relative flex-row flex-wrap filters-scrollable ".concat(Ft?"active":"passive"," "),children:[!!T&&(0,V.jsxs)("div",{className:"mb-2 w-11/12 relative",children:[(0,V.jsx)("input",{type:"text",className:"filter-search-input",placeholder:en("common:filter"),value:Kt,onChange:function(e){return Xt(e.target.value)}}),(0,V.jsx)("span",{className:"filter-search-icon",children:(0,V.jsx)(y.Qcu,{size:15})})]}),a.filterCategories.filter((function(e){return e.name.toLocaleLowerCase().includes(Kt.toLocaleLowerCase())})).map((function(e){return(0,V.jsxs)("div",{className:"flex items-center mb-2  w-full relative cursor-pointer",onClick:function(){a.onFilterCategoryClick(e,!0),Xt("")},children:[(0,V.jsx)("span",{className:"cursor-pointer mr-2 filter-type-list-checkbox ".concat(e.isSelected?"checked":"un-checked"," ")}),(0,V.jsx)("span",{className:"text-xs",children:e.resultCount?(0,V.jsxs)("span",{children:[e.name,(0,V.jsxs)("span",{className:"text-xs text-gray-500",children:[" ","( ",e.resultCount," )"]})]}):e.name}),e.isSelected&&(0,V.jsx)("span",{className:"filter-type-list-check",children:(0,V.jsx)(de.vyQ,{size:18})})]})}))]})]}),(0,V.jsx)(Qe.Z,{onClickFilter:function(){tn.current&&tn.current.scrollIntoView()},mobile:!1,productsList:a,isFilterInShowSearch:T,filtersColor:lt,priceRangeBarHeight:ct,priceRangeBarColor:dt}),a.filters&&a.filters.length>0&&(0,V.jsx)("div",{onClick:function(){a.clearFilters()},className:"flex text-sm hover:underline cursor-pointer text-gray-400 mb-4",children:en("common:clearFilters")})]})}):null,(0,V.jsxs)("div",{style:fe.Y.isB2BStorefront()&&gn?{display:"none"}:{},ref:Bn,className:"flex-1 pb-4 pl-4 pr-4 mt-4",children:[a.hasPrev&&!oe&&(0,V.jsx)("div",{className:"prev-button-main",children:(0,V.jsx)("div",{onClick:function(){a.getPrev(),a.setVisibleInfiniteScrollPage(a.minPage-1)},className:"prev-button",children:a.isLoading?(0,V.jsxs)("span",{className:"flex text-sm",children:[en("common:loading"),(0,V.jsx)(k.E$Q,{size:20,className:"ml-2 loading-icon"})]}):en("common:getPrev")})}),oe?(0,V.jsx)("div",{className:"",children:a.data.length?(0,V.jsx)("div",{className:"grid ".concat(Dt?"grid-cols-1":ut?"grid-cols-3":"grid-cols-2"," sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-").concat(It?"4":"3"," xl:grid-cols-").concat(It?"4":"3"," gap-4"),children:a.data.map((function(e,t){return(0,V.jsx)("div",{"data-id":e.selectedVariant.id,onClick:function(){return On(e.selectedVariant.id,t+1)},className:"".concat(_e?"grid":""),children:(0,V.jsx)(nt,{productDetail:e,productPriceColor:c,productNameColor:l,hideVariantOptions:o,showColors:d,isSquare:p,isImageContain:f,isBigBrandName:g,addBasketModalShow:v,isDrawerOpen:j,isCenter:b,isBrandShow:N,imageAspectRatio:I,addBasketModalShowWhenHovered:D,discountRatioBg:U,discountRatioColor:G,secondImageShow:E,addBasketButtonPosition:A,isVideoAutoPlay:_,isVideoControlsHide:L,showRating:M,showReviewCount:Z,addBasketButtonBorderColor:q,addBasketButtonTextColor:Q,addBasketButtonBgColor:J,isAddBasketGoDetailPage:$,showVariantOptionsName:Y,brandFontWeight:K,priceFontWeight:ee,isMobileProductImagesSwiper:ne,isFreeShippingShow:ie,hidePrice:vn,showTag:le,tagBgColor:ce,tagColor:ue,showTagsText:me,buttonBorderRadius:xe,buttonHoverBgColor:ve,isSingleLineProductName:je,showPriceRange:be,htagLevel:ye,showModelTags:Ne,modelTagTexts:Ce,isCenterTag:we,brandHtagLevel:ke,isUnitPriceUnderProductName:Ve,unitPriceFontSize:Ie,unitPriceFontWeight:Pe,hideUnitPrice:Ee,hideOverlay:Oe,borderColor:Fe,showBorder:_e,cartBorderRadius:ze,isBorderHoverEffect:Le,isExistSelectedVariantUnitPriceText:Tn,productNameFontWeight:He,discountPriceTextColor:Me,addButtonAnimationBgColor:We,addButtonAnimationTextColor:$e,addButtonHeight:Ye,isCustomProductNameHeight:Ke,productNameHeight:Xe,isCustomerReviewsStarAlignment:et,productNameHeightMobile:tt,isMob:sn,tagBadges:at,condPriceHide:st,variantsContainerMinHeight:ot,discountPriceBorderRadius:rt,isColorVariantValueFirstImage:ht,modelTagColor:xt,modelTagBgColor:gt,freeShippingLabelBgColor:vt,freeShippingLabelTextColor:jt,variantsSwatchSize:bt,tagImageMobileLeft:yt,isProductNamePTag:Nt,shippingInfo:Ct,shippingInfoDescription:wt,shippingInfoIfSellOutOfStockDescription:kt,variantCount:St},e.selectedVariant.id)},e.selectedVariant.id+t)}))}):(0,V.jsx)("div",{className:"flex mt-4 justify-center h-72  text-gray-700",children:en("common:notFoundProduct")})}):(0,V.jsx)(Ue.Z,{dataLength:a.page*a.limit,next:function(){if(a.isLoading)var e=setInterval((function(){a.isLoading||(a.getNext(),clearInterval(e))}),200);else a.getNext()},scrollThreshold:.6,hasMore:a.hasNext,loader:(0,V.jsx)(Pn,{}),children:(0,V.jsx)("div",{className:"",children:a.data.length?(0,V.jsx)("div",{className:"grid ".concat(Dt?"grid-cols-1":ut?"grid-cols-3":"grid-cols-2"," sm:grid-cols-3 md:grid-cols-3 lg:grid-cols-").concat(It?"4":"3"," xl:grid-cols-").concat(It?"4":"3"," gap-4"),children:a.data.map((function(e,t){return(0,V.jsx)("div",{"data-id":e.selectedVariant.id,onClick:function(){return On(e.selectedVariant.id,t+1)},className:"".concat(_e?"grid":""),children:(0,V.jsx)(nt,{productDetail:e,productPriceColor:c,productNameColor:l,hideVariantOptions:o,showColors:d,isSquare:p,isImageContain:f,isBigBrandName:g,addBasketModalShow:v,isDrawerOpen:j,isCenter:b,isBrandShow:N,imageAspectRatio:I,addBasketModalShowWhenHovered:D,discountRatioBg:U,discountRatioColor:G,secondImageShow:E,addBasketButtonPosition:A,isVideoAutoPlay:_,isVideoControlsHide:L,showRating:M,showReviewCount:Z,addBasketButtonBorderColor:q,addBasketButtonTextColor:Q,addBasketButtonBgColor:J,isAddBasketGoDetailPage:$,showVariantOptionsName:Y,brandFontWeight:K,priceFontWeight:ee,isMobileProductImagesSwiper:ne,isFreeShippingShow:ie,hidePrice:vn,showTag:le,tagBgColor:ce,tagColor:ue,showTagsText:me,buttonBorderRadius:xe,buttonHoverBgColor:ve,isSingleLineProductName:je,showPriceRange:be,htagLevel:ye,showModelTags:Ne,modelTagTexts:Ce,isCenterTag:we,brandHtagLevel:ke,isUnitPriceUnderProductName:Ve,unitPriceFontSize:Ie,unitPriceFontWeight:Pe,hideUnitPrice:Ee,hideOverlay:Oe,borderColor:Fe,showBorder:_e,cartBorderRadius:ze,isBorderHoverEffect:Le,isExistSelectedVariantUnitPriceText:Tn,productNameFontWeight:He,discountPriceTextColor:Me,addButtonAnimationBgColor:We,addButtonAnimationTextColor:$e,addButtonHeight:Ye,isCustomProductNameHeight:Ke,productNameHeight:Xe,isCustomerReviewsStarAlignment:et,productNameHeightMobile:tt,isMob:sn,tagBadges:at,condPriceHide:st,variantsContainerMinHeight:ot,discountPriceBorderRadius:rt,isColorVariantValueFirstImage:ht,modelTagColor:xt,modelTagBgColor:gt,freeShippingLabelBgColor:vt,freeShippingLabelTextColor:jt,variantsSwatchSize:bt,tagImageMobileLeft:yt,isProductNamePTag:Nt,shippingInfo:Ct,shippingInfoDescription:wt,shippingInfoIfSellOutOfStockDescription:kt,variantCount:St},e.selectedVariant.id)},e.selectedVariant.id+t)}))}):(0,V.jsx)("div",{className:"flex mt-4 justify-center h-72  text-gray-700",children:en("common:notFoundProduct")})})}),!!oe&&(0,V.jsx)("div",{className:"pagination-main mt-12 flex justify-center sm:justify-center md:justify-center lg:justify-center items-center",children:(0,V.jsx)("div",{className:"paginations",children:(0,V.jsxs)("ul",{className:"flex  items-center",children:[a.page>=3&&(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(1);case 2:a.setVisibleInfiniteScrollPage(1),An();case 4:case"end":return e.stop()}}),e)}))),children:(0,V.jsx)(Je.URD,{color:"#585D6B"})}),(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.page-1);case 2:a.setVisibleInfiniteScrollPage(a.page),An();case 4:case"end":return e.stop()}}),e)}))),className:a.hasPrev?"":"page-passive",children:(0,V.jsx)(F.oTp,{color:a.hasPrev?"#585D6B":"#D4D8DF"})}),1!==a.page?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(a.page-1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(a.page-1);case 4:a.setVisibleInfiniteScrollPage(a.page),An();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:a.page-1})})}),(0,V.jsx)("li",{className:"page-active",children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(a.page),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(e){e.stopPropagation(),e.preventDefault()},children:a.page})})}),a.page+1<=a.pageCount&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(a.page+1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(a.page+1);case 4:a.setVisibleInfiniteScrollPage(a.page),An();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:a.page+1})})})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{className:"page-active",children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(1),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(e){e.stopPropagation(),e.preventDefault()},children:1})})}),a.pageCount>1&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(2),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(2);case 4:a.setVisibleInfiniteScrollPage(2),An();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:2})})}),a.pageCount>2&&(0,V.jsx)("li",{children:(0,V.jsx)(w.Z,{passHref:!0,href:Ln(3),children:(0,V.jsx)("a",{className:"flex justify-center items-center w-full h-full",onClick:function(){var e=(0,u.Z)(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.stopPropagation(),t.preventDefault(),e.next=4,a.getPage(3);case 4:a.setVisibleInfiniteScrollPage(3),An();case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:3})})})]}),(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.page+1);case 2:a.setVisibleInfiniteScrollPage(a.page),An();case 4:case"end":return e.stop()}}),e)}))),className:a.hasNext?"":"page-passive",children:(0,V.jsx)(F.Djl,{color:a.hasNext?"#585D6B":"#D4D8DF"})}),a.page+1!==a.pageCount&&a.page!==a.pageCount&&a.pageCount>3&&(0,V.jsx)("li",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.getPage(a.pageCount);case 2:a.setVisibleInfiniteScrollPage(a.pageCount),An();case 4:case"end":return e.stop()}}),e)}))),children:(0,V.jsx)(Je.ZC5,{color:"#585D6B"})})]})})})]})]}),!!P&&i.description&&B===H.In.BOTTOM&&((null===(n=i.description)||void 0===n?void 0:n.length)>cn&&R?(0,V.jsx)("div",{className:"unreset mb-4 mt-4 unreset-reset",dangerouslySetInnerHTML:{__html:"".concat(i.description.slice(0,cn),'  <span id="show-all-description" class="underline font-semibold text-black  mt-2 cursor-pointer text-sm flex">').concat(en("common:showMore"),"</span> ")}}):(0,V.jsx)("div",{className:"unreset mb-4 mt-4 unreset-reset",dangerouslySetInnerHTML:{__html:i.description}}))]}),(0,V.jsx)(qe.Z,{isVisible:on.filtersShow,setSearchText:function(){return Ht("")},productsList:a,isFilterInShowSearch:T,onClose:function(){on.setFiltersShow(!1)},priceRangeBarHeight:ct,priceRangeBarColor:dt})]})})),ot=n(8244),rt=n(70034),lt=n(6207),ct=function(){function e(e){var t=this;this.model={title:"",comment:"",star:0},this.onTitleChange=function(e){t.title=e},this.onCommentChange=function(e){t.comment=e},this.onStarChange=function(e){t.star=e},(0,Fe.rC)(this,{starErrorMessage:Fe.Fl,hasError:Fe.Fl,model:Fe.LO,validateAll:Fe.aD,submit:Fe.aD}),this.productId=e.productId,this.validator=new ot.c(this.model,[new lt.n2({fieldKey:"star",valuePath:"star",message:e.message.starRule}),new lt._S({fieldKey:"star",valuePath:"star",minValue:1,message:e.message.starRule}),new lt.ym({fieldKey:"star",valuePath:"star",maxValue:5,message:e.message.starRule})])}return Object.defineProperty(e.prototype,"title",{get:function(){return this.model.title},set:function(e){this.model.title=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"comment",{get:function(){return this.model.comment},set:function(e){this.model.comment=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"star",{get:function(){return this.model.star},set:function(e){this.model.star=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasError",{get:function(){return this.validator.hasError},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"starErrorMessage",{get:function(){return this.validator.results.star.errorMessage},enumerable:!1,configurable:!0}),e.prototype.validateAll=function(){return this.validator.validateAll()},e.prototype.submit=function(){return(0,i.mG)(this,void 0,void 0,(function(){var e;return(0,i.Jh)(this,(function(t){switch(t.label){case 0:return e={isFormError:!1,isSuccess:!1},[4,this.validateAll()];case 1:if(t.sent())return e.isFormError=!0,[2,e];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,rt.f.getInstance().customerStore.sendReview({title:this.model.title,comment:this.model.comment,star:this.model.star,productId:this.productId})];case 3:return t.sent()&&(e.isSuccess=!0),[2,e];case 4:return t.sent(),[2,e];case 5:return[2]}}))}))},e}(),dt=n(35282),ut=(0,o.Pi)((function(e){var t=e.productDetail,n=e.isEmptyCommentsHide,a=e.isPrimaryStarColor,i=e.isDateShow,o=e.showRating,r=e.merchantName,l=e.titleTextColor,c=e.dateTextColor,d=e.commentTextColor,p=e.starTextColor,f=e.onlyFirstLetterFullName,v=e.showOnlyImageReview,j=e.titleFontSize,b=e.orderedTextColor,y=e.showCheckIcon,N=e.optionalTitleReply,w=e.showProductName,T=e.titleHTag,I=s.useState(),B=(0,m.Z)(I,2),R=B[0],D=B[1],E=s.useState(),O=(0,m.Z)(E,2),z=O[0],L=O[1],Z=s.useState(!1),W=(0,m.Z)(Z,2),U=W[0],G=W[1],q=s.useState(""),Q=(0,m.Z)(q,2),J=Q[0],$=Q[1],Y=s.useState(!1),K=(0,m.Z)(Y,2),X=K[0],ee=K[1],te=s.useState([]),ne=(0,m.Z)(te,2),ae=ne[0],ie=ne[1],se=s.useState(!1),oe=(0,m.Z)(se,2),re=oe[0],le=oe[1],ce=(0,g.o)(),ue=(0,x.useRouter)();s.useEffect((function(){me()}),[t,re]);var me=function(){var e=(0,u.Z)(h().mark((function e(){var n;return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.getCustomerReviews({hasImage:!!re});case 2:n=e.sent,D(n);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=(0,S.$)().t,he=s.useState(new ct({productId:t.id,message:{starRule:pe("common:requiredInput")}})),xe=(0,m.Z)(he,2),ge=xe[0],ve=xe[1];s.useEffect((function(){var e=document.querySelector("html");$((null===e||void 0===e?void 0:e.style.getPropertyValue("--primary-color"))||""),ve(new ct({productId:t.id,message:{starRule:pe("common:requiredInput")}}))}),[t]),s.useEffect((function(){var e=function(){var e=(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{L({averageStar:t.averageRating,totalReview:t.reviewCount})}catch(n){console.log("error",n)}case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[t]);var je=function(e,t){!function(e,t){(0,P._1)({customUI:function(n){var s=n.onClose;return(0,V.jsxs)("div",{className:"image-preview-modal relative flex",children:[(0,V.jsx)("div",{onClick:s,className:"absolute image-preview-modal-close z-50 top-4 right-4 cursor-pointer",children:(0,V.jsx)(F.FU5,{size:20,color:"#6d6d6d"})}),(0,V.jsx)("div",{className:"image relative",children:e&&(0,V.jsx)(C.E,{objectFit:"contain",image:e,layout:"fill",useBlur:!0,sizes:"100vw",alt:""})}),(0,V.jsx)("div",{className:"comment w-full flex",children:(0,V.jsxs)("div",{style:{border:"none"},className:"flex flex-col comment__comments-main w-full ",children:[(0,V.jsxs)("div",{className:"flex",children:[new Array(t.star).fill(0).map((function(e){return(0,V.jsx)(Ve.QJe,{className:a?"comment__comment-star-primary":"comment__comment-star"})})),new Array(5-t.star).fill(0).map((function(e){return(0,V.jsx)(Ve.jJN,{className:a?"comment__comment-star-primary":"comment__comment-star"})}))]}),(0,V.jsx)("div",{className:"comment__comment-title",children:t.title}),!!i&&(0,V.jsx)("div",{className:"comment__comment-writing",children:new Date(t.createdAt).toLocaleString(fe.Y.getCurrentLocale(),{year:"numeric",month:"long",day:"numeric"})}),!!t.firstName&&(0,V.jsxs)("div",{className:"comment__comment-writing mt-1 text-gray-700",children:[f?"".concat(t.firstName.substring(0,1),"."):t.firstName," ",t.lastName]}),!!t.orderId&&(0,V.jsx)("div",{style:b?{color:b}:{},className:"comment__comment-writing  text-gray-700",children:(0,V.jsxs)("div",{style:b?{color:b}:{},className:"comment__comment-writing  text-gray-700 space-x-1 items-center flex",children:[!!y&&(0,V.jsx)("span",{children:(0,V.jsx)(dt.iwV,{})}),(0,V.jsx)("span",{children:pe("common:purchased")})]})}),(0,V.jsx)("div",{className:"comment__comment-content",children:t.comment})]})})]})},overlayClassName:"add-to-basket-overlay-modal"})}(e,t),document.getElementsByClassName("react-confirm-alert-blur")[0].classList.remove("react-confirm-alert-blur")},be=N?!ge.star:!ge.title||!ge.comment||!ge.star,ye=function(){var e=[];ge.title||N||e.push("title"),ge.comment||N||e.push("comment"),ge.star||e.push("star"),ie(e)};return(0,V.jsx)("div",{id:"customer-reviews-main",className:"mx-auto container mt-16 mb-8 px-4",children:(0,V.jsxs)("div",{className:"mt-16 flex flex-col product-detail-comments",children:[(0,V.jsxs)("div",{className:"flex justify-between",children:[T?function(){var e=(0,V.jsx)("span",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});switch(T){case H._p.h1:e=(0,V.jsx)("h1",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;case H._p.h2:e=(0,V.jsx)("h2",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;case H._p.h3:e=(0,V.jsx)("h3",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;case H._p.h4:e=(0,V.jsx)("h4",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;case H._p.h5:e=(0,V.jsx)("h5",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;case H._p.h6:e=(0,V.jsx)("h6",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})});break;default:e=(0,V.jsx)("h1",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})})}return e}():(0,V.jsx)("span",{style:{fontSize:(null===j||void 0===j?void 0:j.value)||"1.5rem"},className:"product-detail-comments-title flex items-center",children:(0,V.jsxs)("span",{style:{color:l},className:"font-medium tracking-wider",children:[!!w&&t.name," ",pe("common:field.comments")]})}),t.isCustomerReviewEnabled&&(0,V.jsxs)("div",{onClick:function(){var e;t.isCustomerReviewLoginRequired?null!==(e=ce.customerStore.customer)&&void 0!==e&&e.email?(ee(!X),ge.onCommentChange(""),ge.onStarChange(0),ge.onTitleChange("")):(0,P._1)({customUI:function(e){var t=e.onClose;return(0,V.jsx)("div",{className:"favorite-modal relative",children:(0,V.jsxs)("div",{children:[(0,V.jsx)("span",{onClick:t,className:"absolute top-2 right-2 text-gray-600 cursor-pointer hover:text-gray-900  modal-close-button-product",children:(0,V.jsx)(F.FU5,{size:25})}),(0,V.jsx)(A,{description:pe("common:commentLoginRequired"),onClose:t,router:ue})]})})}}):(ee(!X),ge.onCommentChange(""),ge.onStarChange(0),ge.onTitleChange(""))},className:"add-comment flex items-center cursor-pointer underline",children:[X?(0,V.jsx)(F.FU5,{size:20,color:l}):(0,V.jsx)(k.rKo,{color:l,size:20}),(0,V.jsx)("span",{style:l?{color:l}:{},className:"flex ml-2 font-medium ",children:pe(X?"common:field.close":"common:field.commentButton")})]})]}),R&&R.data.length&&z&&z.averageStar&&z.totalReview&&o?(0,V.jsxs)("div",{className:"flex  items-center relative",children:[(0,V.jsx)("div",{onMouseEnter:function(){return G(!0)},onMouseLeave:function(){return G(!1)},className:"relative",children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:(null===z||void 0===z?void 0:z.averageStar)||0,starRatedColor:"".concat(p||(a?J:"#f7c603")),numberOfStars:5,name:"rating",starDimension:"18px",starSpacing:"1px"})}),(0,V.jsx)("span",{className:"ml-2 text-sm font-medium  flex mt-2 text-gray-400",children:pe("common:totalReview",{fieldName:null===z||void 0===z?void 0:z.totalReview})}),U&&(0,V.jsx)("div",{className:"absolute top-8 left-6 avarage-tooltip",children:(null===z||void 0===z?void 0:z.averageStar)||0})]}):null,!!R&&!!R.data.length&&!!v&&(0,V.jsxs)("div",{onClick:function(){return le(!re)},className:"flex cursor-pointer justify-end text-sm option-main space-x-2 mt-4",children:[(0,V.jsx)("div",{className:"option-checkbox",children:re&&(0,V.jsx)("span",{className:"filter-type-list-check",children:(0,V.jsx)(de.vyQ,{size:18})})}),(0,V.jsx)("span",{className:"flex text-gray-900",children:pe("common:onlyHasImageReviews")})]}),X&&(0,V.jsxs)("div",{className:"comment-box mt-4",children:[(0,V.jsx)("div",{className:"flex flex-col ",children:(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsxs)("span",{style:l?{color:l}:{},className:"comment-title",children:[pe("common:field.star")," ",(0,V.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,V.jsx)("div",{className:"my-2",children:(0,V.jsx)(M.Z,{svgIconViewBox:"0 0 576 512",svgIconPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",rating:ge.star,starRatedColor:"#f7c603",changeRating:function(e){return ge.onStarChange(e)},numberOfStars:5,name:"rating",starDimension:"22px",starSpacing:"2px",starHoverColor:"#f7c603"})}),ae.some((function(e){return"star"===e}))&&(0,V.jsx)("div",{className:"text-xs mt-2 text-red-600",children:pe("common:requiredInput")})]})}),(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsx)("div",{className:"flex ",children:(0,V.jsxs)("span",{style:l?{color:l}:{},className:"comment-title",children:[pe("common:field.title")," ",(0,V.jsx)("span",{className:"text-red-500",children:N?"":"*"})]})}),(0,V.jsx)("input",{type:"text",className:"comment-input-title",onChange:function(e){return ge.onTitleChange(e.target.value)},value:ge.title}),ae.some((function(e){return"title"===e}))&&(0,V.jsx)("div",{className:"text-xs mt-2 text-red-600",children:pe("common:requiredInput")})]}),(0,V.jsxs)("div",{className:"flex flex-col",children:[(0,V.jsxs)("span",{style:l?{color:l}:{},className:"comment-title",children:[pe("common:field.comment")," ",(0,V.jsx)("span",{className:"text-red-500",children:N?"":"*"})]}),(0,V.jsx)("textarea",{className:"comment-textarea",onChange:function(e){return ge.onCommentChange(e.target.value)},value:ge.comment}),ae.some((function(e){return"comment"===e}))&&(0,V.jsx)("div",{className:"text-xs mt-2 text-red-600",children:pe("common:requiredInput")})]}),(0,V.jsx)("div",{className:"flex w-full justify-end",children:(0,V.jsx)("button",{onClick:(0,u.Z)(h().mark((function e(){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ye();case 2:if(!be){e.next=4;break}return e.abrupt("return");case 4:return e.next=6,ge.submit();case 6:e.sent.isSuccess?(ge.onCommentChange(""),ge.onStarChange(0),ge.onTitleChange(""),_.Am.success(pe("product-detail:successComment"),{position:"top-right",autoClose:3e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0})):_.Am.error(pe("product-detail:errorComment"),{position:"top-right",autoClose:5e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0});case 8:case"end":return e.stop()}}),e)}))),className:"comment-button mt-2 active",children:pe("common:field.commentButton")})})]}),(0,V.jsxs)("div",{className:"mt-4",children:[R&&R.data.length?R.data.filter((function(e){return!n||!!e.comment})).map((function(e){return(0,V.jsxs)("div",{className:"flex flex-col comment__comments-main p-5 ",children:[(0,V.jsxs)("div",{className:"flex",children:[new Array(e.star).fill(0).map((function(e){return(0,V.jsx)(Ve.QJe,{color:p,className:a?"comment__comment-star-primary":"comment__comment-star"})})),new Array(5-e.star).fill(0).map((function(e){return(0,V.jsx)(Ve.jJN,{color:p,className:a?"comment__comment-star-primary":"comment__comment-star"})}))]}),(0,V.jsx)("div",{className:"comment__comment-title",children:e.title}),!!i&&(0,V.jsx)("div",{style:c?{color:c}:{},className:"comment__comment-writing",children:new Date(e.createdAt).toLocaleString(fe.Y.getCurrentLocale(),{year:"numeric",month:"long",day:"numeric"})}),!!e.firstName&&(0,V.jsxs)("div",{style:d?{color:d}:{},className:"comment__comment-writing mt-1 text-gray-700",children:[f?"".concat(e.firstName.substring(0,1),"."):e.firstName," ",e.lastName]}),!!e.orderId&&(0,V.jsxs)("div",{style:b?{color:b}:{},className:"comment__comment-writing  text-gray-700 space-x-1 items-center flex",children:[!!y&&(0,V.jsx)("span",{children:(0,V.jsx)(dt.iwV,{})}),(0,V.jsx)("span",{children:pe("common:purchased")})]}),(0,V.jsx)("div",{style:d?{color:d}:{},className:"comment__comment-content",children:e.comment}),e.reply&&(0,V.jsxs)("div",{className:"comment__comment-reply flex flex-col",children:[r&&(0,V.jsx)("span",{className:"comment_merchant-name",children:r}),(0,V.jsx)("span",{children:e.reply})]}),e.images&&(0,V.jsx)("div",{className:"flex flex-wrap mt-2",children:e.images.map((function(t){return(0,V.jsx)("div",{className:"comment-image",onClick:function(){return je(t,e)},children:(0,V.jsx)(C.E,{objectFit:"contain",image:t,layout:"fill",sizes:"120px",alt:""})})}))})]})})):(0,V.jsx)("div",{style:l?{color:l}:{},className:"text-sm sm:text-base md:text-base lg:text-base",children:pe("common:emptyComment")}),R&&R.data.length?(0,V.jsx)("div",{className:"flex justify-end pagination-main",children:(0,V.jsx)("div",{className:"paginations",children:(0,V.jsxs)("ul",{className:"flex  items-center",children:[R.page>=3&&(0,V.jsx)("li",{onClick:function(){return R.getPage(1)},children:(0,V.jsx)(Ve.dL9,{color:"#585D6B"})}),(0,V.jsx)("li",{onClick:function(){return R.getPage(R.page-1)},className:R.hasPrev?"":"page-passive",children:(0,V.jsx)(Ve.x_l,{color:R.hasPrev?"#585D6B":"#D4D8DF"})}),1!==R.page?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{onClick:function(){return R.getPage(R.page-1)},children:R.page-1}),(0,V.jsxs)("li",{className:"page-active",children:[" ",R.page," "]}),R.page+1<=R.pageCount&&(0,V.jsx)("li",{onClick:function(){return R.getPage(R.page+1)},children:R.page+1})]}):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("li",{className:"page-active",children:1}),R.pageCount>1&&(0,V.jsx)("li",{onClick:function(){return R.getPage(2)},children:2}),R.pageCount>2&&(0,V.jsx)("li",{onClick:function(){return R.getPage(3)},children:3})]}),(0,V.jsx)("li",{onClick:function(){return R.getPage(R.page+1)},className:R.hasNext?"":"page-passive",children:(0,V.jsx)(Ve.Z1Y,{color:R.hasNext?"#585D6B":"#D4D8DF"})}),R.page+1!==R.pageCount&&R.page!==R.pageCount&&R.pageCount>3&&(0,V.jsx)("li",{onClick:function(){return R.getPage(R.pageCount)},children:(0,V.jsx)(Ve.hPV,{color:"#585D6B"})})]})})}):null]})]})})})),mt={"da441bc4-d943-44d7-9064-a806f7bdba5f":c.Z,"512d3468-59fa-48ed-8243-53ef81b37c91":d.Z,"9173a359-9199-4a2d-91fd-f6a9d5db7f15":Pe,"99134bcc-c4bc-499f-a58f-1c7f7d2e6f28":Be.Z,"49d62745-2cb4-443b-9d44-634640a6c43f":Xe,"419f29d5-4f47-461c-8a15-9b25ba06a89b":st,"d29aa1f3-f2d9-4dae-bf56-80b968737b3b":ut};function pt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}var ht=l,ft=!0,xt=function(e){return(0,V.jsx)(ht,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?pt(Object(n),!0).forEach((function(t){(0,a.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({components:mt},e))}},9104:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/[slug]",function(){return n(86649)}])}},function(e){e.O(0,[3662,461,4838,9317,4738,4396,3365,4817,648,509,2510,6957,7473,4321,1698,5970,34,3035,2855,6751,250,7762,443,5621,9774,2888,179],(function(){return t=9104,e(e.s=t);var t}));var t=e.O();_N_E=t}]);