import{r as c,j as e,L as J,R as X}from"./vendor-react-C630P38J.js";import"./vendor-utils-Cb1MAKRV.js";import{b9 as Y,ba as U,h as e1,J as a1,c as x,Q as s1,a3 as h,az as t1,a4 as r1,j as V,cR as n1,dW as o1,u as S,t as W,dX as i1,B as g}from"./feature-order-D50We4Wa.js";import{P as l1}from"./vendor-overlay-B61Jbn6n.js";import{L as q,c as c1,d as d1}from"./useProductSectionProductList-q6fB0cw6.js";import{p as m1,t as u1,m as v1,q as p1}from"./vendor-fxts-IS4CCBC4.js";import{S as I,b as P}from"./vendor-swiper-CwUwDtZu.js";import{f as y}from"./vendor-query-BjC2S-sR.js";import{f as x1,h as h1}from"./index-BZJRYIww.js";import{u as j1}from"./vendor-i18n-D_F5k183.js";const f1=({searchParams:a,options:t})=>y({queryKey:Y.detailByProductNos(a),queryFn:async()=>{const{data:s}=await U.getProductsInfoByProductNos(a);return s},...t}),C1=a=>c.createElement("svg",{width:23,height:29,viewBox:"0 0 23 29",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},c.createElement("path",{d:"M7.33398 6.6527V4.76847C7.33398 2.6872 8.97561 1 11.0007 1C13.0257 1 14.6673 2.6872 14.6673 4.76847V6.6527",stroke:"black",strokeWidth:2,strokeLinecap:"round"}),c.createElement("path",{d:"M2.1817 8.59362C2.2128 8.06506 2.6505 7.65234 3.17998 7.65234H19.048C19.5717 7.65234 20.0067 8.05635 20.0453 8.5786L21.3762 26.5786C21.4191 27.1584 20.9603 27.6523 20.379 27.6523H2.12111C1.54574 27.6523 1.08905 27.168 1.12284 26.5936L2.1817 8.59362Z",stroke:"black",strokeWidth:2})),N1=a=>c.createElement("svg",{width:14,height:19,viewBox:"0 0 14 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",...a},c.createElement("path",{d:"M4.66797 4.59717V3.39812C4.66797 2.07367 5.71264 1 7.0013 1C8.28997 1 9.33464 2.07367 9.33464 3.39812V4.59717",stroke:"white",strokeWidth:2,strokeLinecap:"round"}),c.createElement("path",{d:"M2.68991 5.59766H11.1317C11.6554 5.59766 12.0904 6.00167 12.129 6.52392L12.8439 16.1932C12.8868 16.7729 12.428 17.2669 11.8467 17.2669H2.12111C1.54574 17.2669 1.08905 16.7826 1.12284 16.2082L1.69164 6.53893C1.72273 6.01037 2.16044 5.59766 2.68991 5.59766Z",fill:"black",fillOpacity:.12,stroke:"white",strokeWidth:2}));var w1="_10olj101",_1="_10olj102",b1="_10olj103",S1="_10olj104",O="_10olj105",g1="_10olj106",I1="_10olj107",P1="_10olj108",y1="_10olj109",$="_10olj10a",b={like:"_10olj10b",default:"_10olj10c"},H="_10olj10d",B1="_10olj10e",L1="_10olj10f",E1="_10olj10g",A1="_10olj10h",k1="_10olj10i",R1="_10olj10j",T1="_10olj10k";const D1=({className:a})=>e.jsxs("svg",{className:a,width:22,height:22,viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-label":"19세 이상 이용가",children:[e.jsx("circle",{cx:11,cy:11,r:10.3,stroke:"white",strokeWidth:1.4}),e.jsx("path",{d:"M14.1743 5.5C14.8688 5.5 15.5086 5.65699 16.0938 5.97096C16.6837 6.28018 17.1642 6.80347 17.5352 7.54084C17.911 8.27344 18.0989 9.23915 18.0989 10.438C18.0989 11.632 17.9348 12.6548 17.6066 13.5064C17.2783 14.3579 16.8097 15.0073 16.2008 15.4544C15.5967 15.8968 14.8831 16.1181 14.0601 16.1181C13.4369 16.1181 12.8755 15.9991 12.376 15.7613C11.8813 15.5186 11.4769 15.1809 11.163 14.748C10.8537 14.3151 10.6587 13.8203 10.5778 13.2637H12.1334C12.2428 13.7109 12.464 14.0701 12.797 14.3412C13.1301 14.6076 13.5511 14.7432 14.0601 14.748C14.5881 14.748 15.0401 14.6005 15.4159 14.3056C15.7965 14.0059 16.0866 13.5753 16.2864 13.014C16.491 12.4526 16.5957 11.7795 16.6004 10.9946H16.472C16.1913 11.4322 15.8179 11.7747 15.3517 12.0221C14.8902 12.2695 14.3836 12.3932 13.8317 12.3932C13.2181 12.3932 12.6567 12.2481 12.1477 11.9579C11.6387 11.6629 11.2343 11.2586 10.9346 10.7448C10.6397 10.2263 10.4922 9.64352 10.4922 8.99654C10.4922 8.3448 10.6444 7.75253 10.9489 7.21973C11.2533 6.68692 11.6839 6.26829 12.2405 5.96383C12.8018 5.65461 13.4464 5.5 14.1743 5.5ZM12.0192 8.95372C12.0192 9.34857 12.112 9.71249 12.2975 10.0455C12.4831 10.3737 12.7376 10.633 13.0611 10.8233C13.3893 11.0136 13.7604 11.1087 14.1743 11.1087C14.5786 11.1087 14.9497 11.0112 15.2874 10.8162C15.63 10.6164 15.8987 10.35 16.0938 10.017C16.2888 9.68395 16.3863 9.32954 16.3863 8.95372C16.3863 8.58266 16.2912 8.23301 16.1009 7.90476C15.9106 7.57176 15.649 7.30773 15.316 7.11269C14.983 6.91289 14.6119 6.81299 14.2028 6.81299C13.7984 6.81299 13.4298 6.91051 13.0968 7.10555C12.7637 7.29584 12.4997 7.55511 12.3047 7.88335C12.1144 8.20684 12.0192 8.56363 12.0192 8.95372Z",fill:"white"}),e.jsx("path",{d:"M8.02232 15.9752H6.43818V7.21245H6.38109L3.91211 8.82514V7.32662L6.48099 5.64258H8.02232V15.9752Z",fill:"white"})]}),p=c.memo(({adult:a,liked:t,productNo:s,salePrice:r,immediateDiscountAmt:d,additionDiscountAmt:l,productImageComponent:n,brandNameComponent:u,productNameComponent:o,productPriceComponent:f,productReviewComponent:K,imageUrls:i,brandName:j,brandNameKo:B,brandNameEn:L,brandNameType:C,reviewRating:E,promotionText:A,productName:k,productInformationClassName:G,style:Z,isSoldOut:N,rank:w,isChecked:Q,onProductCheckClick:m,isMobile:v,isVisibleActions:R=!0,isVisiblePromotionText:F})=>{const T=_=>{_.preventDefault(),l1.open(M=>v?e.jsx(n1,{productNo:s,...M}):e.jsx(o1,{productNo:s,...M}))},D=c.useMemo(()=>C==="NAME_KO"?B||j:C==="NAME_EN"&&L||j,[C,B,L,j]);return e.jsxs(J,{className:w1,style:Z,to:`${e1.PRODUCTS.MAIN}/${s}`,children:[e.jsxs("div",{className:b1,children:[m&&e.jsx("label",{className:_1,onClick:_=>{_.preventDefault(),m==null||m(s)},children:e.jsx(a1,{variant:"imageOverlay",id:`${s}`,checked:Q,onCheckedChange:()=>{m==null||m(s)}})}),a&&e.jsxs("div",{className:I1,children:[e.jsx(D1,{className:P1}),e.jsx("p",{className:y1,children:"성인인증 필요"})]}),R&&!v&&!N&&!a&&e.jsx("div",{className:x(O,"layer","hover-layer"),children:e.jsxs("div",{className:$,children:[e.jsx(q,{isMobile:v,liked:t,productNo:s,variant:"product-card",size:"large",className:t?b.like:b.default}),e.jsx("button",{className:b.default,onClick:T,children:e.jsx(C1,{})})]})}),N&&e.jsx("div",{className:x(O,v?void 0:"layer hover-layer"),children:e.jsx("div",{className:g1,children:e.jsx("p",{children:"SOLD OUT"})})}),n??e.jsxs("div",{className:x(S1,"layer","primary-layer"),children:[w&&e.jsx("span",{className:x(R1,w<=3?T1:void 0),children:w}),e.jsx(s1,{src:h(i==null?void 0:i[0],700,700),srcSet:[`${h(i==null?void 0:i[0],300,300)} 300w`,`${h(i==null?void 0:i[0],450,450)} 450w`,`${h(i==null?void 0:i[0],600,600)} 600w`,`${h(i==null?void 0:i[0],700,700)} 700w`].join(", "),alt:k})]}),R&&v&&!a&&e.jsxs("div",{className:$,children:[e.jsx(q,{isMobile:v,liked:t,productNo:s,variant:"product-card",size:"small",className:H}),e.jsx("button",{disabled:N,className:H,onClick:T,children:e.jsx(N1,{})})]})]}),e.jsxs("div",{className:x(B1,G),children:[!!D&&(u??e.jsx("p",{className:L1,children:D})),o??e.jsx("p",{className:E1,children:k}),F&&!!A&&e.jsx("p",{className:A1,children:A}),f??e.jsx(t1,{salePrice:r,immediateDiscountAmt:d,additionDiscountAmt:l}),!!E&&(K??e.jsxs("div",{className:k1,children:[e.jsx(r1,{color:V.primary,size:16,fill:V.primary}),e.jsx("span",{children:E??0})]}))]})]})});p.displayName="PureProductCard";var M1="_1rla7zn0";const V1=({isMobile:a,products:t,showRank:s=!1})=>e.jsx("div",{className:M1,children:t.map((r,d)=>e.jsx(p,{isMobile:a,rank:s?d+1:void 0,...r},r.productNo))}),q1=X.memo(V1),O1=a=>`AD_${a}`,$1=({sectionId:a,options:t})=>y(c1({sectionId:a,options:t})),H1=({type:a="id",sectionId:t,searchParams:s,options:r})=>y(d1({type:a,sectionId:t,searchParams:s,options:r}));var z1="_3avxo0",W1="_3avxo1",K1="_3avxo2",G1="_3avxo3",Z1="_3avxo4",Q1="_3avxo5",F1="_3avxo6",J1="_3avxo7";const X1=({categoryNo:a})=>{const{isMobile:t}=S(),s=O1(a),{data:r}=$1({sectionId:s,options:{retry:!1}}),{data:d}=H1({type:"id",sectionId:s,searchParams:{by:"ADMIN_SETTING",direction:"DESC",soldout:!0,saleStatus:"ONSALE",hasOptionValues:!1,includeStopProduct:!1,hasTotalCount:!0,pageNumber:1,pageSize:30},options:{retry:!1}}),l=c.useMemo(()=>m1(d.products??[],v1(W),u1),[d.products]);if(l.length===0)return null;const n=t?l.length>2:l.length>4;return e.jsxs("section",{className:z1,"aria-label":"광고 상품 진열",children:[e.jsxs("div",{className:W1,children:[e.jsxs("div",{className:K1,children:[e.jsx("h2",{className:G1,children:r.label}),!!r.promotionText&&e.jsx("p",{className:Z1,children:r.promotionText})]}),e.jsxs("span",{className:Q1,children:["광고",e.jsx(i1,{"aria-hidden":!0,size:14,strokeWidth:1.5})]})]}),e.jsx(I,{className:F1,enabled:n,slidesPerView:2.3,spaceBetween:10,breakpoints:{[g.SM+1]:{slidesPerView:4.2,spaceBetween:15}},children:l.map(u=>e.jsx(P,{className:J1,children:e.jsx(p,{isMobile:t,...u})},u.productNo))})]})};var Y1="_13qwtxd0",U1="_13qwtxd1",ee="_13qwtxd2",ae="_13qwtxd3",z="_13qwtxd4",se="_13qwtxd5",te="_13qwtxd6";const re=({title:a,products:t})=>{const{isMobile:s}=S(),r=c.useRef(null),[d,l]=c.useState(!0),[n,u]=c.useState(!1);return t.length===0?null:e.jsxs("div",{className:Y1,children:[e.jsxs("div",{className:U1,children:[e.jsx("h2",{className:ee,children:a}),!s&&e.jsxs("div",{className:ae,children:[e.jsx("button",{type:"button",className:z,onClick:()=>{var o;return(o=r.current)==null?void 0:o.slidePrev()},disabled:d,"aria-label":"이전 랭킹 상품",children:e.jsx(x1,{})}),e.jsx("button",{type:"button",className:z,onClick:()=>{var o;return(o=r.current)==null?void 0:o.slideNext()},disabled:n,"aria-label":"다음 랭킹 상품",children:e.jsx(h1,{})})]})]}),e.jsx(I,{className:se,slidesPerView:2,spaceBetween:10,breakpoints:{[g.SM+1]:{slidesPerView:4,spaceBetween:15}},onBeforeInit:o=>{r.current=o},onSlideChange:o=>{l(o.isBeginning),u(o.isEnd)},children:t.map((o,f)=>e.jsx(P,{className:te,children:e.jsx(p,{isMobile:s,rank:f+1,...o})},`RANK-${o.productNo}`))})]})};var ne="o9q8mg0",oe="o9q8mg1",ie="o9q8mg2";const le={slidesPerView:2.3,spaceBetween:5,breakpoints:{[g.SM]:{slidesPerView:4.5,spaceBetween:15}}},ce=({productNos:a})=>{const{t}=j1(),{isMobile:s}=S(),{data:r}=f1({searchParams:{productNos:a}}),d=c.useMemo(()=>{var l;return(l=r==null?void 0:r.products)==null?void 0:l.map(n=>W({adult:n.baseInfo.adult,productNo:n.baseInfo.productNo,liked:n.baseInfo.liked,brandName:n.baseInfo.brandName,productName:n.baseInfo.productName,brandNameKo:n.baseInfo.brandNameKo,brandNameEn:n.baseInfo.brandNameEn,brandNameType:n.baseInfo.brandNameType,reviewRating:n.baseInfo.reviewRating,listImageUrls:n.baseInfo.listImageUrls,salePrice:n.price.salePrice,immediateDiscountAmt:n.price.immediateDiscountAmt,additionDiscountAmt:n.price.additionDiscountAmt}))},[r]);return p1(d)?null:e.jsxs("section",{className:ne,children:[e.jsx("h4",{className:oe,children:t("다른 고객들이 많이 본 상품")}),e.jsx(I,{...le,className:ie,children:d.map(l=>e.jsx(P,{children:e.jsx(p,{...l,isRelatedProduct:!0,isMobile:s})},l.productNo))})]})};var Ne="_1gp4fcv0",we="_1gp4fcv1",_e="_1gp4fcv2",be="_1gp4fcv3",Se="_1gp4fcv4",ge="_1gp4fcv5",Ie="_1gp4fcv6";const Pe=Object.freeze(Object.defineProperty({__proto__:null,ProductCardGrid:q1,ProductListAdvertisementSection:X1,ProductRankList:re,PureProductCard:p,RelatedProductList:ce},Symbol.toStringTag,{value:"Module"}));export{p as P,be as a,Se as b,ge as c,_e as d,q1 as e,re as f,X1 as g,Pe as i,Ne as l,Ie as p,we as s};