1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3523],{42652:function(e,t,l){(window.__NEXT_P=window.__NEXT_P||[]).push(["/compares/[[...compare]]",function(){return l(9e4)}])},35235:function(e,t,l){"use strict";var r=l(85893);l(67294);var i=l(77462);t.Z=function(e){let{children:t,handleClose:l,height:s,status:a=!0,per:n,fitContent:o,rounded:d=!0,mainClassName:c}=e;return(0,r.jsxs)("div",{className:"fixed bottom-0 left-0 z-[9999] flex h-full w-full select-none items-end justify-center\n duration-500 ".concat(!a&&"translate-y-full"),children:[(0,r.jsx)("div",{onClick:l,className:"fixed top-0 z-30 h-screen ".concat(d?"rounded-t-sm":""," ").concat(a?"bg-[#000000] opacity-40 delay-500 duration-200":" bg-white opacity-10"," w-full ")}),(0,r.jsx)("div",{style:{height:o?"fit-content":"".concat(s).concat(n?"%":"px")},className:(0,i.cn)("relative z-30 flex w-full justify-center",d&&"rounded-t-[16px]","bg-white px-[20px] py-[24px]",c),children:t})]})}},46060:function(e,t,l){"use strict";l.d(t,{Z:function(){return SimplePagination}});var r=l(85893),i=l(72594),s=l(67294);let range=(e,t)=>{let l=t-e+1;return Array.from({length:l},(t,l)=>l+e)},usePagination=e=>{let{totalCount:t,pageSize:l,siblingCount:r=1,currentPage:i}=e,a=(0,s.useMemo)(()=>{let e=Math.ceil(t/l),s=r+5;if(s>=e)return range(1,e);let a=Math.max(i-r,1),n=Math.min(i+r,e),o=a>2,d=n<e-2;if(!o&&d){let t=3+2*r,l=range(1,t);return[...l,"...",e]}if(o&&!d){let t=3+2*r,l=range(e-t+1,e);return[1,"...",...l]}if(o&&d){let t=range(a,n);return[1,"...",...t,"...",e]}},[t,l,r,i]);return a};var SimplePagination=e=>
1{let{onPageChange:t,totalCount:l,siblingCount:s=1,currentPage:a,pageSize:n}=e,o=usePagination({currentPage:a,totalCount:l,siblingCount:s,pageSize:n});if(0===a||(null==o?void 0:o.length)<2)return null;let d=o[(null==o?void 0:o.length)-1];return(0,r.jsxs)("ul",{className:"pagination-container mt-5",children:[(0,r.jsx)("li",{className:" pagination-item\n ".concat(1===a&&"disabled"),onClick:()=>{t(a-1)},children:(0,r.jsx)("div",{className:"arrow left",children:(0,r.jsx)(i.Z,{})})}),o.map((e,l)=>"..."===e?(0,r.jsx)("li",{className:"pagination-item dots",children:"â¦"},l):(0,r.jsx)("li",{className:" pagination-item ".concat(e===a&&"selected"),onClick:()=>t(e),children:e},l)),(0,r.jsx)("li",{className:"pagination-item ".concat(a===d&&"disabled"),onClick:()=>{t(a+1)},children:(0,r.jsx)("div",{className:"arrow right",children:(0,r.jsx)("span",{className:"rotate-180",children:(0,r.jsx)(i.Z,{})})})})]})}},62250:function(e,t,l){"use strict";l.d(t,{Z:function(){return Product_Compare_Icon}});var r=l(85893);function Product_Compare_Icon(){return(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M9.97559 16.3191H18.2593C18.6409 16.3191 18.9506 16.0116 18.9506 15.6318V4.36832C18.9506 3.98897 18.6414 3.68103 18.2593 3.68103H9.97559V16.3191Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M9.97506 16.3191H1.69139C1.30978 16.3191 1 16.0116 1 15.6318V4.36832C1 3.98897 1.30928 3.68103 1.69139 3.68103H9.97506V16.3191V16.3191Z",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"4 4"}),(0,r.jsx)("path",{d:"M9.97559 1V19",stroke:"currentColor",strokeWidth:"1.5",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})}l(67294)},9e4:function(e,t,l){"use strict";l.r(t),l.d(t,{__N_SSP:function(){return b},default:function(){return _compare_}});var r=l(85893),i=l(11163),s=l(67294),a=l(84627),n=l(41664),o=l.n(n),d=l(25675),c=l.n(d),u=l(63955),x=l(16314);function PopularCard(e){var t;let{item:l}=e,s=(0,i.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("section",{dir:"rtl",className:"relative flex h-[290px] w-[156px] flex-col items-center justify-between rounded-[16px] border border-[#E1E1E1] bg-white py-[20px]",children:[(0,r.jsx)("button",{onClick:()=>{var e,t;"object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&s.push({pathname:"/compares",query:{dglp:null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.filter(e=>l.productId!=e)}},void 0,{shallow:!0})},className:"group absolute top-[2px] right-[2px] z-10 flex h-[24px] w-[24px] items-center justify-center rounded-full bg-light_grey ",children:(0,r.jsx)("div",{className:"z-10 scale-75 text-pastal_grey group-hover:text-red-primary",children:(0,r.jsx)(x.Z,{})})}),(0,r.jsxs)("div",{className:" flex w-full flex-col items-center gap-[14px] px-[14px]",children:[(0,r.jsx)("div",{className:"relative h-[146px] w-[146px] ",children:(0,r.jsx)(c(),{className:"aspect-auto h-full w-full",quality:100,fill:!0,src:"".concat("https://storage.dgland.dev","/api/file/PrdImages/").concat(l.imageName),alt:l.productName})}),(0,r.jsx)("div",{className:" font-mainEn text-[11px] font-normal line-clamp-2",children:l.productName})]}),l.isAvailable?(0,r.jsx)("div",{className:"flex w-full items-center justify-between gap-[4px] px-[14px] ",children:l.netPrice?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex min-h-[24px] min-w-[24px] items-center justify-center rounded-full bg-red-primary p-1 text-[10px] font-semibold text-white ".concat(l.discountPercent?"visible":"invisible"," "),children:[l.discountPercent," %"]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1 leading-none",children:[l.basePrice!=l.netPrice&&(0,r.jsxs)("div",{className:"text-[12px] font-semibold text-medium_grey line-through",children:[l.basePrice&&(0,u.m)(Number(l.basePrice))," ",(0,r.jsx)("span",{className:"text-[10px]",children:"تÙÙ
اÙ"})]}),(0,r.jsxs)("div",{className:"flex gap-[5px] text-[16px] font-semibold text-red-primary",children:[l.netPrice&&(0,u.m)(Number(l.netPrice)),(0,r.jsx)("span",{className:"text-[11px]",children:"تÙÙ
اÙ"})]})]})]}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"}),(0,r.jsx)("div",{className:"mt-[4px] w-full px-[10px]",children:(0,r.jsx)(o(),{href:"/product/dglp-".concat(l.productId,"/").concat(null!==(t=l.productName&&l.slug)&&void 0!==t?t:l.productName.replaceAll(" ","-").replaceAll("/","").trim()),children:(0,r.jsx)("div",{children:(0,r.jsx)("button",{className:"h-[42px] w-full rounded-[8px] bg-red-primary text-white",children:"Ù
Ø´Ø§ÙØ¯Ù"})})})})]})})}var p=l(77549);function AddProduct_icon(){return(0,r.jsxs)("svg",{width:"68",height:"68",viewBox:"0 0 68 68",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M34 2L34 66",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),(0,r.jsx)("path",{d:"M66 34H2",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]})}var m=l(60279),f=l(93586);let queryParams=e=>{var t,l,r,i;return"string"==typeof(null==e?void 0:null===(t=e.query)||void 0===t?void 0:t.dglp)?"productId=".concat(null==e?void 0:null===(r=e.query)||void 0===r?void 0:r.dglp):"object"==typeof(null==e?void 0:null===(l=e.query)||void 0===l?void 0:l.dglp)?null==e?void 0:null===(i=e.query)||void 0===i?void 0:i.dglp.map(e=>"productId=".concat(e)).join("&"):void 0};var HeroBox_AddProductCard=()=>{var e,t,l;let s=(0,i.useRouter)(),a=(0,p.T)(),{isFetching:n}=(0,f.aF)(queryParams(s),{skip:!queryParams(s)});return(0,r.jsx)(r.Fragment,{children:!n&&("object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&(null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.length)<2||"string"==typeof(null==s?void 0:null===(l=s.query)||void 0===l?void 0:l.dglp))&&(0,r.jsxs)("button",{onClick:()=>{var e,t,l;("object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&(null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.length)<2||"string"==typeof(null==s?void 0:null===(l=s.query)||void 0===l?void 0:l.dglp))&&(document.body.style.overflow="hidden",a((0,m.nV)(!0)))},dir:"rtl",className:"relative flex h-[290px] w-[156px] cursor-pointer flex-col items-center justify-center rounded-[16px] border border-red-primary bg-white py-[20px] text-red-primary hover:border-[#B00000] hover:text-[#B00000] focus:border-[#0085FF] focus:text-[#750000] active:border-[#750000] active:text-[#750000]",children:[(0,r.jsx)(AddProduct_icon,{}),(0,r.jsx)("div",{className:"mt-[23px] w-8/12 select-none text-center text-[14px]",children:"اضاÙÙ Ú©Ø±Ø¯Ù Ú©Ø§ÙØ§Û Ø¬Ø¯ÛØ¯ Ø¨Ø±Ø§Û Ù
ÙØ§ÛسÙ"})]})})},compare_HeroBox=()=>{var e,t;let l=(0,i.useRouter)(),{data:s}=f.Fr.endpoints.getCompare.useQueryState(queryParams(l),{skip:!(null==l?void 0:null===(e=l.query)||void 0===e?void 0:e.dglp)});return(0,r.jsxs)("section",{className:"flex w-full flex-row items-center justify-center gap-[24px] pt-[32px]",children:[null==s?void 0:null===(t=s.products)||void 0===t?void 0:t.map((e,t)=>(0,r.jsx)("div",{children:(0,r.jsx)(PopularCard,{item:e})},t)),(0,r.jsx)(HeroBox_AddProductCard,{})]})},compare_Specifications=function(){var e;let t=(0,i.useRouter)(),{data:l}=f.Fr.endpoints.getCompare.useQueryState(queryParams(t),{skip:!(null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.dglp)});return(0,r.jsx)("article",{className:"flex w-full flex-col items-center",children:null==l?void 0:l.productC
1ompareRowShoppingDtos.map((e,t)=>(0,r.jsxs)("div",{className:"flex h-full min-h-[56px] w-full flex-col items-center gap-[16px] border-b",children:[(0,r.jsx)("div",{className:"mt-[12px] w-full text-center font-bold text-[#888888]",children:e.attributeTitle}),(0,r.jsx)("div",{className:"flex w-full flex-row items-start justify-center gap-[16px]",children:(null==e?void 0:e.productSpecifications)&&(null==e?void 0:e.productSpecifications.map(e=>(0,r.jsx)("div",{className:"flex h-fit w-[156px] items-start justify-center py-[5px] text-center text-[14px] text-[#292929]",children:e.specificationValue},e.productId)))})]},t))})},h=l(13693);function PopularCard_PopularCard(e){let{item:t}=e,l=(0,i.useRouter)(),s=(0,p.T)();return(0,r.jsxs)("div",{onClick:()=>{l.push("".concat(l.asPath,"&dglp=").concat(t.productId),void 0,{shallow:!0}),document.body.style.overflow="unset",s((0,m.nV)(!1))},dir:"rtl",className:"relative flex h-[256px] w-[165px] cursor-pointer flex-col items-center justify-between rounded-[16px] bg-white py-[12px] duration-150 hover:shadow-md",children:[(0,r.jsxs)("div",{className:"mt-[16px] flex w-full flex-col items-center gap-[14px] px-[14px]",children:[(0,r.jsx)("div",{className:"relative h-[130px] w-[130px]",children:(0,r.jsx)(c(),{className:"aspect-auto h-full w-full",quality:100,fill:!0,src:"".concat("https://storage.dgland.dev","/api/file/PrdImages/").concat(t.imageName),alt:t.productName})}),(0,r.jsx)("div",{className:" font-mainEn text-[11px] font-normal text-[#292929] line-clamp-2",children:t.productName})]}),t.isAvailable?(0,r.jsx)("div",{className:"flex w-full items-center justify-between gap-[4px] px-[14px] ",children:t.netPrice?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex min-h-[34px] min-w-[34px] items-center justify-center rounded-full bg-red-primary p-1 text-[16px] font-semibold text-white ".concat(t.discountPercent?"visible":"invisible"," "),children:[t.discountPercent," %"]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1 leading-none",children:[t.basePrice!=t.netPrice&&(0,r.jsxs)("div",{className:"text-[12px] font-semibold text-medium_grey line-through",children:[t.basePrice&&(0,u.m)(Number(t.basePrice))," ",(0,r.jsx)("span",{className:"text-[10px]",children:"تÙÙ
اÙ"})]}),(0,r.jsxs)("div",{className:"flex gap-[5px] text-[16px] font-semibold text-red-primary",children:[t.netPrice&&(0,u.m)(Number(t.netPrice)),(0,r.jsx)("span",{className:"text-[11px]",children:"تÙÙ
اÙ"})]})]})]}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})]})}var v=l(35235),j=l(46060),g=l(77748);let selectedFirstQueryParams=e=>{var t,l,r,i,s;return e&&"string"==typeof(null==e?void 0:null===(t=e.query)||void 0===t?void 0:t.dglp)?Number(null==e?void 0:null===(r=e.query)||void 0===r?void 0:r.dglp):e&&"object"==typeof(null==e?void 0:null===(l=e.query)||void 0===l?void 0:l.dglp)?Number(null==e?void 0:null===(s=e.query)||void 0===s?void 0:null===(i=s.dglp)||void 0===i?void 0:i.slice(0,1)):void 0};var compare_SimilarProductsBottomSheet=function(){var e,t,l;
1let s=(0,i.useRouter)(),a=(0,p.T)(),n=(0,p.C)(m.YT),o=(0,p.C)(m.Ry),d=(0,p.C)(m.y7),{data:c}=(0,f.MK)({ProductId:selectedFirstQueryParams(s),SearchValue:d,PageNumber:n,PageSize:20},{skip:!selectedFirstQueryParams(s),refetchOnMountOrArgChange:!0}),handleOnCloseModal=()=>{document.body.style.overflow="unset",a((0,m.nV)(!1)),a((0,m.v)("")),a((0,m.oW)(1))};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(v.Z,{handleClose:()=>{document.body.style.overflow="unset",handleOnCloseModal()},per:!0,status:o,height:90,children:(0,r.jsxs)("section",{dir:"rtl",className:"flex h-full w-full flex-col items-center overflow-auto rounded-[16px] bg-[#F9F9F9] px-[10px] pb-[120px] font-mainFa",children:[(0,r.jsxs)("header",{className:"mt-[33px] flex w-full items-center justify-between font-mainFa",children:[(0,r.jsx)("span",{className:" text-[14px] text-[#6B6B6B]",children:"Ø§ÙØªØ®Ø§Ø¨ Ú©Ø§ÙØ§ Ø¨Ø±Ø§Û Ù
ÙØ§ÛسÙ"}),(0,r.jsx)("button",{onClick:handleOnCloseModal,children:(0,r.jsx)(x.Z,{})})]}),(0,r.jsxs)("form",{className:"group mt-[40px] flex min-h-[44px] w-full flex-row items-center gap-[10px] rounded-[22px] bg-white px-[12px]",children:[(0,r.jsx)("span",{className:"text-pastal_grey duration-150 group-focus-within:text-red-primary",children:(0,r.jsx)(g.Z,{})}),(0,r.jsx)("input",{value:d,onChange:e=>a((0,m.v)(e.currentTarget.value)),type:"search",placeholder:"جستج٠در Ù
ÛØ§Ù Ú©Ø§ÙØ§Ùا...",className:"w-full"})]}),(0,r.jsx)("div",{className:"mt-[16px] flex w-full flex-wrap justify-center gap-[10px]",children:null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.items.map(e=>(0,r.jsx)(PopularCard_PopularCard,{item:e},e.productId))}),!!(null==c?void 0:null===(t=c.data)||void 0===t?void 0:t.totalCount)&&(0,r.jsx)(j.Z,{className:"pagination-bar",currentPage:n,totalCount:null==c?void 0:null===(l=c.data)||void 0===l?void 0:l.totalCount,pageSize:20,onPageChange:e=>{a((0,m.oW)(e))}})]})})})},y=l(63742),N=l(62250),compare=()=>{let e=(0,i.useRouter)(),t=(0,y.Z)(),{isFetching:l}=(0,f.aF)(queryParams(e),{skip:!queryParams(e)});return(0,r.jsxs)("section",{className:" flex w-full flex-col items-center gap-[32px] scroll-smooth desktop:hidden",children:[(0,r.jsx)(h.Z,{handleBack:()=>{e.push("/")},icon:(0,r.jsx)(N.Z,{}),label:"Ù
ÙØ§Ûس٠Ù
ØØµÙÙ"}),(0,r.jsx)(compare_HeroBox,{}),(0,r.jsx)(compare_Specifications,{}),("laptop"==t||"mobile"==t||"tablet"==t)&&(0,r.jsx)(compare_SimilarProductsBottomSheet,{}),l&&(0,r.jsx)(a.Z,{})]})};function Compare_icon(){return(0,r.jsxs)("svg",{width:"61",height:"62",viewBox:"0 0 61 62",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,r.jsx)("path",{d:"M30.4844 50.6171H56.7742C57.9854 50.6171 58.9685 49.6414 58.9685 48.4359V12.6891C58.9685 11.4851 57.9869 10.5078 56.7742 10.5078H30.4844V50.6171Z",stroke:"#888888",strokeWidth:"4",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"}),(0,r.jsx)("path",{d:"M30.4841 50.6171H4.19425C2.98314 50.6171 2 49.6414 2 48.4359V12.6891C2 11.4851 2.98156 10.5078 4.19425 10.5078H30.4841V50.6171V50.6171Z",stroke:"#888888",strokeWidth:"4",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round",strokeDasharray:"7 7"}),(0,r.jsx)("path",{d:"M30.4844 2V59.1265",stroke:"#888888",strokeWidth:"4",strokeMiterlimit:"10",strokeLinecap:"round",strokeLinejoin:"round"})]})}var HeroBox_TitleCard=()=>(0,r.jsx)("article",{className:"flex h-[386px] w-[216px] flex-col items-center justify-center",children:(0,r.jsxs)("div",{className:"flex flex-col items-center",children:[(0,r.jsx)(Compare_icon,{}),(0,r.jsx)("span",{className:"mt-[16px] font-bold text-[#888888]",children:"Ù
ÙØ§Ûس٠Ù
ØØµÙÙØ§Øª"})]})});function HeroBox_PopularCard_PopularCard(e){var t;let{item:l}=e,s=(0,i.useRouter)();return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("section",{dir:"rtl",className:"relative flex h-[386px] w-[240px] flex-col items-center justify-between rounded-[16px] border border-[#E1E1E1] bg-white py-[20px]",children:[(0,r.jsx)("button",{onClick:()=>{var e,t;"object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&s.push({pathname:"/compares",query:{dglp:null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.filter(e=>l.productId!=e)}},void 0,{shallow:!0})},className:"group absolute top-[2px] right-[2px] z-10 flex h-[24px] w-[24px] items-center justify-center rounded-full bg-light_grey ",children:(0,r.jsx)("div",{className:"z-10 scale-75 text-pastal_grey group-hover:text-red-primary",children:(0,r.jsx)(x.Z,{})})}),(0,r.jsxs)("div",{className:" flex w-full flex-col items-center gap-[14px] px-[14px]",children:[(0,r.jsx)("div",{className:"relative h-[192px] w-[192px] ",children:(0,r.jsx)(c(),{className:"aspect-auto h-full w-full",quality:100,fill:!0,src:"".concat("https://storage.dgland.dev","/api/file/PrdImages/").concat(l.imageName),alt:l.productName})}),(0,r.jsx)("div",{className:" font-mainEn text-[14px] font-normal line-clamp-2",children:l.productName})]}),l.isAvailable?(0,r.jsx)("div",{className:"flex w-full items-center justify-between gap-[4px] px-[14px] ",children:l.netPrice?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex min-h-[34px] min-w-[34px] items-center justify-center rounded-full bg-red-primary p-1 text-[16px] font-semibold text-white ".concat(l.discountPercent?"visible":"invisible"," "),children:[l.discountPercent," %"]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1 leading-none",children:[l.basePrice!=l.netPrice&&(0,r.jsxs)("div",{className:"text-[14px] font-semibold text-medium_grey line-through",children:[l.basePrice&&(0,u.m)(Number(l.basePrice))," ",(0,r.jsx)("span",{className:"text-[12px]",children:"تÙÙ
اÙ"})]}),(0,r.jsxs)("div",{className:"flex gap-[5px] text-[18px] font-semibold text-red-primary",children:[l.netPrice&&(0,u.m)(Number(l.netPrice)),(0,r.jsx)("span",{className:"text-[12px]",children:"تÙÙ
اÙ"})]})]})]}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"}),(0,r.jsx)("div",{className:"mt-[4px] w-full px-[10px]",children:(0,r.jsx)(o(),{href:"/product/dglp-".concat(l.productId,"/").concat(null!==(t=l.productName&&l.slug)&&void 0!==t?t:l.productName.replaceAll(" ","-").replaceAll("/","").trim()),children:(0,r.jsx)(r.Fragment,{children:(0,r.jsx)("button",{className:"h-[48px] w-full rounded-[8px] bg-red-primary text-white",children:"Ù
Ø´Ø§ÙØ¯Ù"})})})})]})})}var compare_HeroBox_AddProductCard=()=>{var e,t,l;let s=(0,i.useRouter)(),a=(0,p.T)();return(0,r.jsxs)(r.Fragment,{children:[("object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&(null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.length)<3||"string"==typeof(null==s?void 0:null===(l=s.query)||void 0===l?void 0:l.dglp))&&(0,r.jsxs)("button",{onClick:()=>{var e,t,l;("object"==typeof(null==s?void 0:null===(e=s.query)||void 0===e?void 0:e.dglp)&&(null==s?void 0:null===(t=s.query)||void 0===t?void 0:t.dglp.length)<3||"string"==typeof(null==s?void 0:null===(l=s.query)||void 0===l?void 0:l.dglp))&&a((0,m.nV)(!0))},dir:"rtl",className:"relative flex h-[386px] w-[240px] cursor-pointer flex-col items-center justify-center rounded-[16px] border border-red-primary bg-white py-[20px] text-red-primary hover:border-[#B00000] hover:text-[#B00000] focus:border-[#0085FF] focus:text-[#750000] active:border-[#750000] active:text-[#750000]",children:[(0,r.jsx)(AddProduct_icon,{}),(0,r.jsx)("div",{className:"mt-[23px] w-8/12 select-none text-center text-[14px]",children:"اضاÙÙ Ú©Ø±Ø¯Ù Ú©Ø§ÙØ§Û Ø¬Ø¯ÛØ¯ Ø¨Ø±Ø§Û Ù
ÙØ§ÛسÙ"})]})," "]})},desktop_compare_HeroBox=()=>{var e,t;let l=(0,i.useRouter)(),{data:s}=f.Fr.endpoints.getCompare.useQueryState(queryParams(l),{skip:!(null==l?void 0:null===(e=l.query)||void 0===e?void 0:e.dglp)});return(0,r.jsxs)("section",{className:"flex w-full flex-row items-center gap-[24px] pt-[32px]",children:[(0,r.jsx)(HeroBox_TitleCard,{}),null==s?void 0:null===(t=s.products)||void 0===t?void 0:t.map((e,t)=>(0,r.jsx)("div",{children:(0,r.jsx)(HeroBox_PopularCard_PopularCard,{item:e})},t)),(0,r.jsx)(compare_HeroBox_AddProductCard,{})]})},desktop_compare_Specifications=function(){var e;let t=(0,i.useRouter)(),{data:l}=f.Fr.endpoints.getCompare.useQueryState(queryParams(t),{skip:!(null==t?void 0:null===(e=t.query)||void 0===e?void 0:e.dglp)});return(0,r.jsx)("article",{className:"flex w-full flex-col items-start",children:null==l?void 0:l.productC
1ompareRowShoppingDtos.map((e,t)=>(0,r.jsxs)("div",{className:"flex h-full min-h-[56px] flex-row items-center gap-[24px] border-b",children:[(0,r.jsx)("div",{className:"w-[212px] font-bold text-[#888888]",children:e.attributeTitle}),(null==e?void 0:e.productSpecifications)&&(null==e?void 0:e.productSpecifications.map(e=>(0,r.jsx)("div",{className:"flex h-fit w-[242px] items-start justify-center py-[5px] text-center text-[14px] text-[#292929]",children:e.specificationValue},e.productId)))]},t))})},w=l(31190);function SimilarProductsModal_PopularCard_PopularCard(e){let{item:t}=e,l=(0,i.useRouter)(),s=(0,p.T)();return(0,r.jsxs)("div",{onClick:()=>{l.push("".concat(l.asPath,"&dglp=").concat(t.productId),void 0,{shallow:!0}),s((0,m.nV)(!1))},dir:"rtl",className:"relative flex h-[388px] w-[240px] cursor-pointer flex-col items-center justify-between rounded-[16px] bg-white py-[24px] duration-150 hover:shadow-md",children:[(0,r.jsxs)("div",{className:"mt-[31px] flex w-full flex-col items-center gap-[14px] px-[14px]",children:[(0,r.jsx)("div",{className:"relative h-[200px] w-[200px]",children:(0,r.jsx)(c(),{className:"aspect-auto h-full w-full",quality:100,fill:!0,src:"".concat("https://storage.dgland.dev","/api/file/PrdImages/").concat(t.imageName),alt:t.productName})}),(0,r.jsx)("div",{className:" font-mainEn text-[14px] font-normal line-clamp-2",children:t.productName})]}),t.isAvailable?(0,r.jsx)("div",{className:"flex w-full items-center justify-between gap-[4px] px-[14px] ",children:t.netPrice?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"flex min-h-[34px] min-w-[34px] items-center justify-center rounded-full bg-red-primary p-1 text-[16px] font-semibold text-white ".concat(t.discountPercent?"visible":"invisible"," "),children:[t.discountPercent," %"]}),(0,r.jsxs)("div",{className:"flex flex-col items-end gap-1 leading-none",children:[t.basePrice!=t.netPrice&&(0,r.jsxs)("div",{className:"text-[14px] font-semibold text-medium_grey line-through",children:[t.basePrice&&(0,u.m)(Number(t.basePrice))," ",(0,r.jsx)("span",{className:"text-[12px]",children:"تÙÙ
اÙ"})]}),(0,r.jsxs)("div",{className:"flex gap-[5px] text-[18px] font-semibold text-red-primary",children:[t.netPrice&&(0,u.m)(Number(t.netPrice)),(0,r.jsx)("span",{className:"text-[12px]",children:"تÙÙ
اÙ"})]})]})]}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})}):(0,r.jsx)("div",{className:"flex w-full justify-center text-semi_dark",children:"ÙØ§Ù
ÙØ¬Ùد"})]})}var compare_SimilarProductsModal=function(){var e,t,l,s;let a=(0,i.useRouter)(),n=(0,p.T)(),o=(0,p.C)(m.YT),d=(0,p.C)(m.Ry),c=(0,p.C)(m.y7),{data:u}=(0,f.MK)({ProductId:selectedFirstQueryParams(a),SearchValue:c,PageNumber:o,PageSize:20},{skip:!selectedFirstQueryParams(a),refetchOnMountOrArgChange:!0}),handleOnCloseModal=()=>{n((0,m.nV)(!1)),n((0,m.v)("")),n((0,m.oW)(1))};return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(w.Z,{open:d,onClose:handleOnCloseModal,showCloseIcon:!1,styles:{modal:{borderRadius:"10px",background:"#F9F9F9",maxWidth:"1023px",minWidth:!(null==u?void 0:null===(e=u.data)||void 0===e?void 0:e.items[0])&&"1023px"}},animationDuration:0,classNames:{modal:"rounded-[16px]"},children:(0,r.jsxs)("section",{dir:"rtl",className:"flex h-full w-full flex-col items-center rounded-[16px] font-mainFa",children:[(0,r.jsxs)("header",{className:"flex w-full items-center justify-between font-mainFa",children:[(0,r.jsx)("span",{className:"text-[14px] text-[#6B6B6B]",children:"Ø§ÙØªØ®Ø§Ø¨ Ú©Ø§ÙØ§ Ø¨Ø±Ø§Û Ù
ÙØ§ÛسÙ"}),(0,r.jsx)("button",{onClick:handleOnCloseModal,children:(0,r.jsx)(x.Z,{})})]}),(0,r.jsxs)("form",{className:"group mt-[40px] flex h-[44px] w-full flex-row items-center gap-[10px] rounded-[22px] bg-white px-[12px]",children:[(0,r.jsx)("span",{className:"text-pastal_grey duration-150 group-focus-within:text-red-primary",children:(0,r.jsx)(g.Z,{})}),(0,r.jsx)("input",{value:c,onKeyDown:e=>{"Enter"===e.key&&e.preventDefault()},onChange:e=>n((0,m.v)(e.currentTarget.value)),type:"search",placeholder:"جستج٠در Ù
ÛØ§Ù Ú©Ø§ÙØ§Ùا...",className:"w-full"})]}),(0,r.jsx)("div",{className:"mt-[16px] grid w-full grid-cols-4 gap-[16px]",children:null==u?void 0:null===(t=u.data)||void 0===t?void 0:t.items.map(e=>(0,r.jsx)(SimilarProductsModal_PopularCard_PopularCard,{item:e},e.productId))}),!!(null==u?void 0:null===(l=u.data)||void 0===l?void 0:l.totalCount)&&(0,r.jsx)(j.Z,{className:"pagination-bar",currentPage:o,totalCount:null==u?void 0:null===(s=u.data)||void 0===s?void 0:s.totalCount,pageSize:20,onPageChange:e=>{n((0,m.oW)(e))}})]})})})},desktop_compare=()=>{let e=(0,i.useRouter)(),t=(0,y.Z)(),{isFetching:l}=(0,f.aF)(queryParams(e),{skip:!queryParams(e)});return(0,r.jsxs)("section",{className:"container mx-auto hidden w-full flex-col items-center gap-[32px] scroll-smooth desktop:flex",children:[(0,r.jsx)(desktop_compare_HeroBox,{}),(0,r.jsx)(desktop_compare_Specifications,{}),("desktop"==t||"ultra"==t)&&(0,r.jsx)(compare_SimilarProductsModal,{}),l&&(0,r.jsx)(a.Z,{})]})},b=!0,_compare_=()=>{let e=(0,i.useRouter)(),t=(0,y.Z)(),{refetch:l}=(0,f.aF)(queryParams(e),{skip:!queryParams(e)});return(0,s.useEffect)(()=>{(null==e?void 0:e.query.dglp)&&l()},[e]),(0,r.jsx)(r.Fragment,{children:"ultra"==t?(0,r.jsx)(desktop_compare,{}):(0,r.jsx)(compare,{})})}}},function(e){e.O(0,[9774,2888,179],function(){return e(e.s=42652)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.