import{R as Mt,d as It,e as Kt,j as e,f as We,S as Dt,g as Ut,s as Ee,h as ge,r as Ft,t as $t,m as ae,k as S,n as f,p as a,u as P,o as xe,q as Yt,v as Ht,w as qt,x as ze,M,l as he,y as le,z as Gt,P as Z,A as Wt,B as zt,C as Vt,D as ee,X as Qt,E as Xt,F as Zt,G as Jt,H as en}from"./index-BB3C6ia3.js";import{b as u,u as L,L as E,k as te,h as Ve,O as tn}from"./vendor-q1sfVHxQ.js";import{u as Qe}from"./useEvents-Cw131G6Y.js";import{I as nn}from"./IconChevronLeft-Cl7_Ttnz.js";import{l as be}from"./cs-DzvwOdO5.js";import{u as Xe}from"./useHasAnyDraw-k_ifRQKZ.js";import{D as rn}from"./DesignPopup-BHW4RIvo.js";import{T as sn}from"./TermsDetail-DfPIUr8e.js";import{V as R}from"./VisibleComponent-Z_EpiyVS.js";import{L as an,u as Ze}from"./LayoutProvider-CX1zjqgz.js";import{H as F}from"./Helmet-BeeQgTXu.js";import{p as on}from"./common-DmGOsUXB.js";import{u as ln,P as cn}from"./ProductDetailProvider-CwG6v2iu.js";import{I as Je}from"./input-DwHLYME0.js";import{S as et,a as tt}from"./swiper.min-BjDUzMMs.js";import{f as dn}from"./free-mode.min-D8ybSzIe.js";import{S as ye,s as Ne,u as mn}from"./useBrandSummary-CO2CEp49.js";import{o as je,a as H,n as $,s as A}from"./schemas-DINLhTQO.js";import{P as Te}from"./PLPThumbCard-zCF9nsYq.js";import{u as ne}from"./useQuery-pLogcDCk.js";import{A as un}from"./autoplay-DIDtct3s.js";import{B as fn}from"./button-5G120b2h.js";import{N as pn}from"./NarrowContainer-CtPJjDZ3.js";import{u as gn}from"./useBrandLikeList-CZFAGgfa.js";import{C as xn,u as hn}from"./CartProvider-Dn3cCCMn.js";import{S as bn}from"./SearchAddressProvider-CXElF4cI.js";import"./draw-OykQxEIe.js";import"./draw.qk-9WwBdHBG.js";import"./Sanitized-DU1vp84v.js";import"./sanitizeHtml-CNVhPZBl.js";import"./select-DTAWDWnr.js";import"./IconChevronDown-K0V3QdSs.js";import"./index-Bm2nI4FA.js";import"./provider-DbDMk8E0.js";import"./noImage-CNGZMR77.js";import"./PeriodOverlay-CBs1wfM9.js";import"./StartCountdown-CMlTkPB0.js";import"./useSalePeriodStatus-Dw-ZGDdg.js";import"./product-D_O9OGFi.js";import"./Button-CJM3HEil.js";import"./IconBtn-Cs7b2ih8.js";import"./Icon-GfCZmpos.js";import"./useBaseQuery-Ca_aEWrW.js";import"./useMutation-BVMH2cjZ.js";import"./brand-info.qk-CXZBUvFx.js";var yn={recentKeyword:{Helper:Mt,QUERY_KEY:Kt,MUTATION_KEY:It}},Nn=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o,s,i=r.call(t),l=[];try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)l.push(o.value)}catch(c){s={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return l},jn={OFFCANVAS_STATUS:{visible:!1}},vn=u.createContext(null),Cn=u.createContext(null),ve=function(t){var n=t.children,r=Nn(u.useState(jn.OFFCANVAS_STATUS),2),o=r[0],s=r[1],i=L(),l=u.useMemo((function(){return{openCanvas:function(){s((function(){return{visible:!0}}))},closeCanvas:function(){s((function(){return{visible:!1}}))}}}),[]);return u.useEffect((function(){l.closeCanvas()}),[i.pathname]),e.jsx(vn.Provider,{value:o,children:e.jsx(Cn.Provider,{value:l,children:n})})},wn=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o,s,i=r.call(t),l=[];try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)l.push(o.value)}catch(c){s={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return l},Ce=yn.recentKeyword,Ae=Ce.Helper,Sn=Ce.QUERY_KEY,oe=Ce.MUTATION_KEY,kn={keywords:[]},En=u.createContext(null),nt=u.createContext(null),Tn=function(t){var n=t.children,r=t.maxSize,o=r===void 0?Ae.MAX_SIZE:r,s=wn(u.useState(kn.keywords),2),i=s[0],l=s[1],c=u.useMemo((function(){return i.length}),[i]),d=u.useMemo((function(){return We(new Ae({maxSize:o}))}),[]),p=d.executeQuery,g=d.executeMutation,x=g(oe.POST_KEYWORD).mutate,m=g(oe.DELETE_KEYWORD).mutate,y=g(oe.DELETE_ALL_KEYWORDS).mutate,b=u.useMemo((function(){return{add:function(N){x({payload:{keyword:N},onSuccess:function(v){var C=v.data;l(C)}})},delete:function(N){m({payload:{keyword:N},onSuccess:function(v){var C=v.data;l(C)}})},deleteAll:function(){y({onSuccess:function(N){var v=N.data;l(v)}})}}}),[]);return u.useEffect((function(){p(Sn.QUERY_KEYWORDS_BY_LATEST,{onSuccess:function(N){var v=N.data;l(v)}})}),[]),e.jsx(En.Provider,{value:{size:c,keywords:i},children:e.jsx(nt.Provider,{value:b,children:n})})},An=function(){var t=u.useContext(nt);if(!t)throw new Error("INVALID_RecentKeywordActionContext");return t},Le=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o=r.call(t),s,i=[],l;try{for(;(n===void 0||n-- >0)&&!(s=o.next()).done;)i.push(s.value)}catch(c){l={error:c}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(l)throw l.error}}return i},Ln=function(t){var n=t.clientId,r=t.mallProfile,o=r===void 0?"real":r,s=Le(u.useState(!1),2),i=s[0],l=s[1],c=Le(u.useState(null),2),d=c[0],p=c[1];return u.useEffect(function(){n&&o&&!i&&!d&&p(new Dt({clientId:n,mallProfile:o,onScriptLoaded:function(){return l(!0)}}))},[n,o,i,d]),{isScriptLoaded:i,record:d?.record.bind(d)}},Pe=function(t,n){var r=typeof Symbol=="function"&&t[Symbol.iterator];if(!r)return t;var o,s,i=r.call(t),l=[];try{for(;(n===void 0||n-- >0)&&!(o=i.next()).done;)l.push(o.value)}catch(c){s={error:c}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(s)throw s.error}}return l},rt=Ut.banner,Pn=rt.Helper,_n=rt.QUERY_KEY,st=u.createContext(null),at=u.createContext(null),_e={bannerMap:new Map,isLoading:!0},Bn=function(t){var n=t===void 0?{}:t,r=n.backgroundColor,o=r===void 0?"#f5f6f8":r,s=n.mainColor,i=s===void 0?"#f92626":s;Ee("--background-color",o),Ee("--point-color",i)},On=function(t){var n=t.children,r=Pe(u.useState(_e.bannerMap),2),o=r[0],s=r[1],i=Pe(u.useState(_e.isLoading),2),l=i[0],c=i[1],d=u.useMemo((function(){return We(new Pn)}),[]).executeQuery,p={fetchBanner:function(g){return d(_n.QUERY_BANNER,{payload:g,onSuccess:function(x){var m=x.data;s(m.bannerMap),c(!1),Bn(m?.decorationConfig)}})}};return e.jsx(at.Provider,{value:p,children:e.jsx(st.Provider,{value:{bannerMap:o,isLoading:l},children:n})})},Rn=function(){var t=u.useContext(st);if(!t)throw new Error("INVALID_BannerStateContext");return t},Mn=function(){var t=u.useContext(at);if(!t)throw new Error("INVALID_BannerActionContext");return t};const In=()=>{const t=L(),{profile:n}=ge();u.useEffect(()=>{if(!n||Ft?.keepLogin()||!$t?.keepDefaultTokenTime)return;const r=ae.get();r&&ae.set({value:r,expires:ae.defaultExpires()})},[t.pathname,n])},z=f("flex flex-1 items-center justify-center h-full pb-[0.8rem]","font-fig-mixed font-normal text-[1.2rem] leading-[1.8rem] text-black","no-underline whitespace-nowrap"),Be=f(z,"border-none bg-transparent cursor-pointer"),Kn=["/my-page","/orders","/claims"],ot=({onSearchClick:t,isSearchOpen:n,onCategoryClick:r,isCategoryOpen:o,onNavigate:s})=>{const{pathname:i}=L(),{t:l}=S("common"),c=o||n,d=!c&&Kn.some(g=>i.startsWith(g)),p=!c&&i.startsWith("/cart");return e.jsxs("nav",{className:f("fixed bottom-0 left-0 right-0 w-full bg-white z-50","flex items-stretch justify-between h-[5.6rem] px-[1.6rem]","lg:hidden"),children:[e.jsx(E,{to:"/",className:z,onClick:s,children:l("home")}),e.jsx("button",{type:"button",className:f(Be,o&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),onClick:r,children:l("category")}),e.jsx(E,{to:"/cart",onClick:s,className:f(z,p&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),children:l("shoppingBag")}),e.jsx("button",{type:"button",className:f(Be,n&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),onClick:t,children:l("search")}),e.jsx(E,{to:"/orders",onClick:s,className:f(z,d&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),children:l("myPage")})]})};ot.propTypes={onSearchClick:a.func,isSearchOpen:a.bool,onCategoryClick:a.func,isCategoryOpen:a.bool,onNavigate:a.func};function it({size:t=16,className:n,...r}){return e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:t,height:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",className:n,...r,children:e.jsx("polyline",{points:"6,4 10,8 6,12"})})}const Oe="exhibition1",Dn=[{labelKey:"archive",href:"/archive",light:!0}],Y=({label:t,href:n,logo:r,red:o,chevron:s,italic:i,engFont:l,light:c,disabled:d,onClick:p})=>{const g=f("flex items-center justify-start w-[50%] no-underline","font-fig-mixed text-[1.2rem] leading-[1.8rem] text-fig-btn-default-primary font-bold",s&&"justify-between",l&&"font-fig-en",i&&"italic",o&&"text-[#DE3162]",c&&"font-normal"),x=r?e.jsx("img",{src:r,alt:t,className:"h-[1.6rem] w-auto"}):e.jsx("span",{children:t});return d?e.jsx("span",{"aria-disabled":"true",className:f(g,"text-fig-btn-disabled pointer-events-none select-none cursor-default"),children:x}):e.jsxs(E,{to:n,onClick:p,className:g,children:[x,s&&e.jsx(it,{size:14,className:"text-fig-btn-default-primary"})]})};Y.propTypes={label:a.string.isRequired,href:a.string,logo:a.string,red:a.bool,chevron:a.bool,italic:a.bool,engFont:a.bool,light:a.bool,disabled:a.bool,onClick:a.func};const lt=({category:t,isOpen:n,onToggle:r,onNavigate:o})=>{const{t:s}=S("common"),i=xe(t.label)?be:null,l=t.children??[];if(l.length===0)return e.jsx(Y,{label:t.label,logo:i,href:`/products?categoryNo=${t.categoryNo}`,chevron:!0,onClick:o});const c=[{categoryNo:t.categoryNo,label:s("all")},...l];return e.jsxs("div",{className:"w-full flex items-start",children:[e.jsxs("button",{type:"button",onClick:r,"aria-expanded":n,className:f("flex w-[50%] items-center justify-between","font-fig-mixed text-[1.2rem] leading-[1.8rem] text-fig-btn-default-primary font-bold"),children:[i?e.jsx("img",{src:i,alt:t.label,className:"h-[1.6rem] w-auto"}):e.jsx("span",{children:t.label}),n?e.jsx(nn,{size:14,className:"shrink-0 text-fig-btn-default-primary"}):e.jsx(it,{size:14,className:"shrink-0 text-fig-btn-default-primary"})]}),e.jsx("div",{className:f("w-[50%] grid transition-[grid-template-rows] duration-300 ease-out",n?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:e.jsx("div",{className:"overflow-hidden min-h-0 pl-[0.8rem]",children:e.jsx("ul",{className:"flex flex-col items-start gap-[1.6rem] list-none m-0 p-0",children:c.map(d=>e.jsx("li",{className:"w-full",children:e.jsx(E,{to:`/products?categoryNo=${d.categoryNo}`,onClick:o,className:"block no-underline font-fig-mixed text-[1.2rem] leading-[1.8rem] text-fig-btn-default-primary",children:d.label})},d.categoryNo))})})})]})};lt.propTypes={category:a.shape({categoryNo:a.number,label:a.string,children:a.arrayOf(a.shape({categoryNo:a.number,label:a.string}))}).isRequired,isOpen:a.bool,onToggle:a.func.isRequired,onNavigate:a.func};const ct=({isOpen:t,onClose:n,onBrandClick:r})=>{const{t:o}=S("common"),{categories:s}=P(),i=s?.multiLevelCategories??[],[l,c]=u.useState(null),{events:d}=Qe([Oe],{filterBy:"id"}),p=d?.[0]?.progressStatus==="ING"?d[0]:null,{hasAnyDraw:g}=Xe();return t?e.jsx("div",{className:f("fixed top-0 left-0 right-0 bottom-[5.6rem] z-[51] bg-white overflow-y-auto","lg:hidden"),children:e.jsxs("div",{className:f("px-[1.6rem] py-[6rem]","flex flex-col items-start gap-[6rem]"),children:[e.jsx("button",{type:"button",onClick:n,className:"text-left font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-btn-enabled",children:o("close")}),e.jsx(Y,{label:o("draw"),href:"/draw",engFont:!0,light:!0,disabled:!g,onClick:n}),p&&e.jsx(Y,{label:p.label,href:`/exhibition?id=${Oe}`,red:!0,onClick:n}),e.jsxs("div",{className:"w-full flex flex-col items-start gap-[1.6rem]",children:[i.map(x=>e.jsx(lt,{category:x,isOpen:l===x.categoryNo,onToggle:()=>c(m=>m===x.categoryNo?null:x.categoryNo),onNavigate:n},x.categoryNo)),e.jsx("button",{type:"button",onClick:r,className:f("flex items-center justify-start w-[50%] no-underline","font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-btn-default-primary font-bold"),children:e.jsx("span",{children:o("brand")})})]}),e.jsx("div",{className:"w-full flex flex-col items-start gap-[1.6rem]",children:Dn.map(x=>e.jsx(Y,{label:o(x.labelKey),href:x.href,light:x.light,onClick:n},x.labelKey))})]})}):null};ct.propTypes={isOpen:a.bool.isRequired,onClose:a.func.isRequired,onBrandClick:a.func};const Un=[{handle:"@boontheshop_official",url:"https://www.instagram.com/boontheshop_official"},{handle:"@casestudy_official",url:"https://www.instagram.com/casestudy_official"},{handle:"@boontheshop_men",url:"https://www.instagram.com/boontheshop_men"},{handle:"@boonjr_official",url:"https://www.instagram.com/boonjr_official"},{handle:"@xyts_official",url:"https://www.instagram.com/xyts_official"}],ie=f("font-normal text-[1.2rem] leading-[1.8rem] text-black whitespace-nowrap","bg-transparent border-none cursor-pointer p-0"),ce=({isOpen:t,children:n})=>e.jsx("div",{className:f("grid overflow-hidden transition-[grid-template-rows,grid-template-columns] duration-300 ease-out","grid-cols-[1fr] lg:grid-rows-[1fr]",t?"grid-rows-[1fr] lg:grid-cols-[1fr]":"grid-rows-[0fr] lg:grid-cols-[0fr]"),"aria-hidden":!t,children:e.jsx("div",{className:"min-h-0 min-w-0 overflow-hidden",children:n})});ce.propTypes={isOpen:a.bool,children:a.node};const dt=({className:t})=>{const{t:n}=S("common"),[r,o]=u.useState(!1);return e.jsxs("div",{className:f("flex flex-col items-start justify-start","lg:flex-row lg:items-center lg:justify-start",t),children:[e.jsx(ce,{isOpen:!r,children:e.jsx("button",{type:"button",className:ie,tabIndex:r?-1:0,onClick:()=>o(!0),children:n("instagram")})}),e.jsx(ce,{isOpen:r,children:e.jsxs("div",{className:f("flex flex-col items-start justify-start","lg:w-max lg:flex-row lg:items-center lg:justify-start lg:gap-[0.8rem]"),children:[Un.map(({handle:s,url:i})=>e.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:f(ie,"uppercase"),tabIndex:r?0:-1,children:s},s)),e.jsx("button",{type:"button",className:ie,tabIndex:r?0:-1,onClick:()=>o(!1),children:n("close")})]})})]})};dt.propTypes={className:a.string};const W=f("font-normal text-[1.2rem] leading-[1.8rem] text-black","bg-transparent border-none cursor-pointer p-0"),V="font-normal text-[1.2rem] leading-[1.8rem] text-[#898989]",Re=f(V,"font-fig-en"),mt=({terms:t})=>{const[n,r]=u.useState(null),[o,s]=u.useState(t),{serviceBasicInfo:i,businessRegistrationNumberInformation:l}=P(),{fetchTerms:c}=Yt(),{t:d,i18n:p}=S(),g=()=>{const m=p.language==="ko"?"en":"ko";p.changeLanguage(m)};u.useEffect(()=>{s(t)},[t]);const x=async m=>{if(!o.find(b=>b.key===m)?.content){const{data:b}=await c([m]),{contents:N}=b[m];s(v=>v.map(C=>({...C,content:C.key===m?N:C?.content})))}r(m)};return e.jsxs(e.Fragment,{children:[e.jsxs("nav",{className:f("flex flex-wrap items-center justify-start gap-x-[0.8rem] gap-y-[0.4rem] w-full","lg:flex-nowrap"),children:[o.map(({key:m,label:y,content:b})=>e.jsxs("div",{children:[e.jsx("button",{className:W,onClick:()=>x(m),children:y}),n===m&&e.jsx(sn,{termsKey:m,title:y,onClose:()=>r(null),content:b})]},m)),e.jsx("button",{className:W,onClick:g,children:p.language==="ko"?"KOREAN":"English"}),e.jsx(E,{to:"/guide",className:W,children:d("common:guide")}),e.jsx(E,{to:"/store",className:W,children:d("common:infoNavStore")}),e.jsx(dt,{className:"basis-full lg:basis-auto lg:flex-1 lg:min-w-0"})]}),e.jsx("p",{className:f(Re,"uppercase"),children:d("common:recaptchaProtected")}),e.jsxs("div",{className:"flex flex-col items-start",children:[e.jsxs("div",{className:f("flex flex-wrap items-center justify-start gap-x-[0.8rem] [&>p]:whitespace-nowrap",V),children:[e.jsx(R,{shows:i.companyName,TruthyComponent:e.jsx("p",{children:i.companyName})}),e.jsx(R,{shows:i.representativeName,TruthyComponent:e.jsxs("p",{children:[d("common:ceo")," ",i.representativeName]})}),e.jsx(R,{shows:i.address,TruthyComponent:e.jsxs("p",{children:[i.address," ",i.addressDetail]})})]}),l?.no&&e.jsxs("p",{className:V,children:[d("common:businessRegistrationNo")," ",l.no]}),e.jsx(R,{shows:i.onlineMarketingBusinessDeclarationNo,TruthyComponent:e.jsxs("p",{className:V,children:[d("common:onlineMarketingDeclarationNo")," ",i.onlineMarketingBusinessDeclarationNo]})}),e.jsxs("div",{className:f("flex flex-wrap items-center justify-start gap-x-[0.8rem] [&>p]:whitespace-nowrap",Re),children:[e.jsx(R,{shows:i?.representEmail,TruthyComponent:e.jsx("p",{className:"uppercase",children:i?.representEmail})}),e.jsx(R,{shows:i?.representPhoneNo,TruthyComponent:e.jsx("p",{children:i?.representPhoneNo})})]})]}),e.jsx("p",{className:"font-fig-en font-normal text-[1.2rem] leading-[1.8rem] text-black",children:"© BOONTHESHOP"})]})};mt.propTypes={terms:a.array};const Fn={PI_PROCESS:"privacyPolicy",USE:"termsOfUse"},ut=()=>{const{t}=S("common"),{termsUsed:n}=Ht(),r=u.useMemo(()=>Object.entries(Fn).map(([o,s])=>({key:o,label:t(s),used:n?.termsList?.includes(o)})).filter(({used:o})=>o)??[],[n,t]);return e.jsx("footer",{className:f("relative z-[1] bg-[unset] flex align-baseline flex-col gap-[0.4rem] items-start pb-[7.2rem] lg:pb-[2rem]","pt-[6rem] lg:pt-[8rem]"),children:e.jsx(mt,{terms:r})})},Me={labelKey:"draw",href:"/draw"},ft="exhibition1",$n=`/exhibition?id=${ft}`,pt=4,Yn=[{labelKey:"archive",href:"/archive"},{labelKey:"myPage",href:"/orders"},{labelKey:"shoppingBag",href:"/cart"},{labelKey:"search",href:"/search"}],Hn=["/my-page","/orders","/claims"],J="hover:underline decoration-[0.5px] underline-offset-[0.1rem]",qn=(t,n)=>f("group text-[1.2rem] leading-[1.8rem] no-underline whitespace-nowrap transition-colors duration-150",J,t.accent&&"font-bold text-[#DE3162] hover:text-[#DE3162]",!t.accent&&t.bold&&"font-bold text-black hover:text-black",!t.accent&&!t.bold&&"font-normal text-black hover:text-black",n&&!t.accent&&"text-black underline decoration-[0.5px] underline-offset-[0.1rem]",n&&t.accent&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),Q=({item:t,isActive:n,t:r,onNavigate:o,disabled:s})=>{let i=t.labelKey?r(t.labelKey):t.label;return s?e.jsx("span",{"aria-disabled":"true",className:f("text-[1.2rem] leading-[1.8rem] whitespace-nowrap select-none cursor-default","text-fig-btn-disabled pointer-events-none"),children:i}):(!t.labelKey&&xe(t.label)&&(i=e.jsx("span",{className:f("inline-block align-middle border-b-[0.5px] border-transparent","group-hover:border-black",n&&!t.accent&&"border-black"),children:e.jsx("img",{src:be,alt:"Casestudy",className:"h-[1.5rem] w-auto block -mb-[0.1rem]"})})),e.jsx(E,{to:t.href,onClick:o,className:qn(t,n),children:i}))};Q.propTypes={item:a.shape({href:a.string,bold:a.bool,accent:a.bool,label:a.string,labelKey:a.string,categoryNo:a.number}),isActive:a.bool,t:a.func,onNavigate:a.func,disabled:a.bool};const gt=({onSearchClick:t,isSearchOpen:n,onBrandClick:r,isBrandOpen:o,onNavigate:s})=>{const{pathname:i}=L(),[l]=te(),{t:c,i18n:d}=S("common"),{categories:p}=P(),{hasAnyDraw:g}=Xe(),m=(p?.multiLevelCategories??[]).slice(0,pt).map(h=>({label:ze(h.label,d.language),href:`/products?categoryNo=${h.categoryNo}`,categoryNo:h.categoryNo,bold:!0})),{events:y}=Qe([ft],{filterBy:"id"}),b=y?.[0],N=b?.progressStatus==="ING"?{label:b.label,href:$n,accent:!0,isExhibition:!0}:null,v=[...N?[N]:[],...m],C=Hn.some(h=>i.startsWith(h)),T=h=>o?!1:h.labelKey==="myPage"?C:h.labelKey==="draw"?i.startsWith("/draw"):h.isExhibition?i.startsWith("/exhibition"):h.categoryNo?i==="/products"&&l.get("categoryNo")===String(h.categoryNo):h.href&&h.href!=="#"?i.startsWith(h.href):!1;return e.jsx("nav",{className:"hidden lg:flex items-center pointer-events-auto",children:e.jsxs("ul",{className:"flex items-center gap-[0.8rem] list-none m-0 p-0",children:[e.jsx("li",{className:"flex items-center",children:e.jsx(Q,{item:Me,t:c,isActive:T(Me),onNavigate:s,disabled:!g})}),e.jsx("li",{className:"text-black text-[1.2rem] leading-[1.8rem] select-none","aria-hidden":"true",children:"|"}),v.map(h=>e.jsx("li",{className:"flex items-center",children:e.jsx(Q,{item:h,t:c,isActive:T(h),onNavigate:s})},h.categoryNo||h.labelKey||h.isExhibition&&"exhibition")),e.jsx("li",{className:"flex items-center",children:e.jsx("button",{type:"button",onClick:r,className:f("text-[1.2rem] leading-[1.8rem] whitespace-nowrap","font-bold text-black border-none bg-transparent cursor-pointer p-0 transition-colors duration-150 hover:text-black",J,o&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),children:c("brand")})}),e.jsx("li",{className:"text-black text-[1.2rem] leading-[1.8rem] select-none","aria-hidden":"true",children:"|"}),Yn.map(h=>h.labelKey==="search"?e.jsx("li",{className:"flex items-center",children:e.jsx("button",{className:f("text-[1.2rem] leading-[1.8rem] whitespace-nowrap","font-normal text-black border-none bg-transparent cursor-pointer p-0 transition-colors duration-150 hover:text-black",J,n&&"text-black underline decoration-[0.5px] underline-offset-[0.1rem]"),onClick:t,children:c(h.labelKey)})},h.labelKey):e.jsx("li",{className:"flex items-center",children:e.jsx(Q,{item:h,t:c,isActive:T(h),onNavigate:s})},h.labelKey))]})})};gt.propTypes={onSearchClick:a.func,isSearchOpen:a.bool,onBrandClick:a.func,isBrandOpen:a.bool,onNavigate:a.func};const xt=({onNavigate:t})=>{const{pathname:n}=L(),[r]=te(),{i18n:o}=S("common"),{categories:s}=P(),i=(s?.multiLevelCategories??[]).slice(0,pt);return e.jsx("nav",{className:"flex items-center justify-center h-[1.8rem] mb-[2rem] lg:hidden",children:e.jsx("ul",{className:"flex items-center justify-center gap-[1.2rem] list-none m-0 p-0",children:i.map(l=>{const c=n==="/products"&&r.get("categoryNo")===String(l.categoryNo);return e.jsx("li",{className:"flex items-center justify-center",children:e.jsx(E,{to:`/products?categoryNo=${l.categoryNo}`,onClick:t,className:f("group font-fig-mixed font-normal text-[1.2rem] leading-[1.8rem] text-black no-underline whitespace-nowrap",J,c&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),children:xe(l.label)?e.jsx("span",{className:f("inline-block align-middle border-b-[0.5px] border-transparent","group-hover:border-black",c&&"border-black"),children:e.jsx("img",{src:be,alt:"Casestudy",className:"h-[1.6rem] w-auto block -mb-[0.1rem]"})}):ze(l.label,o.language)})},l.categoryNo)})})})};xt.propTypes={onNavigate:a.func};const re=({onSearchClick:t,isSearchOpen:n,onBrandClick:r,isBrandOpen:o,onNavigate:s})=>{const{pathname:i}=L(),l=i==="/";return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:f("sticky top-0 z-50 w-full pointer-events-none","flex items-center justify-center","pt-[1rem] pb-[1.6rem]","lg:justify-between lg:pt-[1.2rem] lg:pb-[3.2rem]"),children:[e.jsx("h1",{className:"m-0 p-0 leading-none pointer-events-auto",children:e.jsx(E,{to:"/",onClick:s,children:e.jsx("img",{className:"w-[20rem] h-[2rem] object-contain",src:qt,alt:"BOONTHESHOP"})})}),e.jsx(gt,{onSearchClick:t,isSearchOpen:n,onBrandClick:r,isBrandOpen:o,onNavigate:s})]}),l&&e.jsx(xt,{onNavigate:s})]})};re.propTypes={onSearchClick:a.func,isSearchOpen:a.bool,onBrandClick:a.func,isBrandOpen:a.bool,onNavigate:a.func};const Gn=t=>{const n=t?.googleAnalytics,r="//www.googletagmanager.com";return n?e.jsxs(e.Fragment,{children:[e.jsx(F,{children:e.jsx("script",{children:`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https:${r}/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);console.log('google test');
})(window,document,'script','dataLayer','${n}')`})}),e.jsx(F,{children:e.jsx("iframe",{src:`https:${r}/ns.html?id=${n}`,height:"0",width:"0",style:"display:none;visibility:hidden"})}),e.jsx(F,{children:e.jsx("script",{type:"text/javascript",async:!0,src:`${r}/gtag/js?id=${n}`})}),e.jsx(F,{children:e.jsx("script",{type:"text/javascript",children:`window.dataLayer = window.dataLayer || [];
function gtag(...args) {
window.dataLayer.push(args);
}
gtag('js', new Date());
gtag('config', "${n}");`})})]}):e.jsx(e.Fragment,{})},Wn=()=>{const{externalServiceConfig:t}=P();return e.jsx(e.Fragment,{children:Gn(t)})},zn=/]*\/?>/g,Vn=/
]*>[^<]*<\/title>/g;let ht=null;const Qn=`${location.origin.split("://").at(0)}`,Ie=t=>t?`${Qn}:${t}`:"",Ke=`${location.origin}/og-image.jpg`,Xn={[M.PRODUCT]:({imageUrls:t,unescapedProductName:n})=>({type:"product",title:le(Gt(n)),image:Ie(t?.at(0)),url:location.href}),[M.COMMON]:({mallName:t})=>({type:"website",title:t,image:Ke,url:location.origin}),[M.EVENT]:({eventInfo:t,mallName:n})=>{const r=t?.label?t.label:n,o=he.isMobile?t?.mobileImageUrl:t?.pcImageUrl;return{type:"product",title:r,image:o?Ie(o):Ke,url:location.href}}},Zn=({isProductDetailPage:t,isEventPage:n})=>t?M.PRODUCT:n?M.EVENT:M.COMMON,Jn=({product:t,mallName:n,url:r,bannerMap:o,eventInfo:s,isProductDetailPage:i,isEventPage:l}={})=>{const c=Zn({isProductDetailPage:i,isEventPage:l});return Xn[c]({...t,mallName:n,bannerMap:o,url:r,eventInfo:s})},er=({mallName:t,title:n,image:r,type:o,url:s,productDetail:i})=>{const l={author:{attr:"name",content:t},description:{attr:"name",content:t},keywords:{attr:"name",content:t},"twitter:card":{attr:"name",content:"summary"},"twitter:title":{attr:"name",content:n},"twitter:description":{attr:"name",content:"여기를 눌러 링크를 확인하세요."},"twitter:image":{attr:"name",content:r},"og:site_name":{attr:"property",content:t},"og:type":{attr:"property",content:o},"og:title":{attr:"property",content:n},"og:image":{attr:"property",content:r},"og:url":{attr:"property",content:s},"og:description":{attr:"property",content:"여기를 눌러 링크를 확인하세요."},"og:image:width":{attr:"property",content:"1200"},"og:image:height":{attr:"property",content:"630"}};return i?.baseInfo?.urlDirectDisplayYn==="Y"&&(l.robots={attr:"name",content:"noindex,nofollow"}),l},De=t=>document.createRange().createContextualFragment(t).children[0],tr=t=>t.reduce((n,{pageType:r,content:o})=>{if(r!=="COMMON_HEAD")return n;const s=o.match(zn)?.map(De)??[];return ht=o.match(Vn)?.map(De)?.at(0),[...n,...s]},[]),nr=t=>t.flatMap(n=>{const r=n.getAttribute("name"),o=n.getAttribute("property");return[r,o].filter(Boolean)}),rr=t=>t?.length?nr(tr(t)):[],sr=({productDetail:t,bannerMap:n,mallName:r,mallUrl:o,pageScripts:s,eventInfo:i,isProductDetailPage:l,isEventPage:c})=>{const d=Jn({product:{...t?.baseInfo,unescapedProductName:t?.unescapedProductName},bannerMap:n,mallName:r,url:o,isProductDetailPage:l,isEventPage:c,eventInfo:i}),p=er({...d,mallName:r,productDetail:t}),g=rr(s);return{metas:Object.entries(p).reduce((x,[m,{attr:y,...b}])=>(g.includes(m)||x.push({...b,[y]:m}),x),[]),titleContent:d.title}},ar=()=>ht,or=({location:t,isProfileLoading:n,renderableMetas:r,loadedTitle:o})=>{if(t?.state?.shouldRedirect||n||!r?.length||!o)return!1;const{pathname:s,search:i}=t;return!(s==="/orders"&&!i||s==="/claims"&&(!i.includes("claimType")||!i.includes("start"))||s==="/my-page/accumulation"&&!i)},ir=()=>{const[t]=te(),{mallName:n,mall:r,externalServiceConfig:o,isLoading:s}=P(),{productDetail:i}=ln(),{bannerMap:l,isLoading:c}=Rn(),d=he.isMobile?Z.MOBILE_WEB:Z.PC,p=r.url?.[d.toLocaleLowerCase()],[g,x]=u.useState(document.title),m=L(),{profile:y,isProfileLoading:b}=ge(),{clientId:N,mallProfile:v}=P(),{isScriptLoaded:C,record:T}=Ln({clientId:N,mallProfile:v}),{configuration:h}=Wt(),I=Number(t.get("productNo")),K=zt(),q=o?.naverWebmaster,D=window.location.href.includes("product-detail"),_=window.location.href.includes("/event"),U=u.useMemo(()=>D&&(!i?.baseInfo?.productName||Number(i.baseInfo.productNo)!==I)||_&&!K?.eventNo?!1:!s&&!c,[D,i?.baseInfo?.productNo,I,_,K?.eventNo,s,c,m.pathname,m.search]),{metas:B,titleContent:O}=u.useMemo(()=>U?sr({productDetail:i,bannerMap:l,eventInfo:K,mallName:n,mallUrl:p,pageScripts:ShopbyExternalScript?.scripts,isProductDetailPage:D,isEventPage:_}):{},[U,m.pathname,m.search]),j=ar();return u.useEffect(()=>{Vt({naverWebmaster:q,configuration:h})},[q,h]),u.useEffect(()=>{C&&!b&&T(y?.memberNo)},[C,b,m.pathname,I]),u.useEffect(()=>{or({location:m,isProfileLoading:b,renderableMetas:B,loadedTitle:g})&&ShopbyExternalScript?.setGlobalObjectSb({getPlatform:()=>on,profile:y})},[B,y,b,m,g]),u.useEffect(()=>{!j?.textContent&&O&&(document.title=O,x(O))},[O]),e.jsxs(e.Fragment,{children:[e.jsx(F,{children:B?.map((w,k)=>{const G=j?.textContent,{name:se,property:ke}=w;return G&&(se?.includes("title")||ke?.includes("title"))&&(w.content=G),e.jsx("meta",{...w},`${k}-${se||ke}`)})}),e.jsx(Wn,{})]})},lr=t=>{const[n,r]=u.useState(t),{add:o}=An();return{searchProductsByKeyword:c=>{o(c),r(n)},removeKeyword:()=>r(""),updateKeyword:c=>r(c),keyword:n}},Ue=f("mt-[0.8rem] grid grid-cols-1 gap-y-[0.8rem]","lg:grid-cols-2 lg:gap-x-[0.8rem] lg:gap-y-0"),de="list-none m-0 p-0 flex flex-col items-stretch justify-start gap-[0.8rem] lg:gap-0 w-full",Fe="flex items-center justify-start gap-0 w-full min-w-0",me=({count:t,keyPrefix:n})=>e.jsx("ul",{className:de,children:Array.from({length:t}).map((r,o)=>e.jsxs("li",{className:"w-full min-w-0 h-[1.8rem] flex items-center",children:[e.jsx("span",{className:"w-[1.6rem] shrink-0"}),e.jsx("span",{className:"h-[1.2rem] w-[60%] rounded-[0.2rem] bg-[#f0f0f0] animate-pulse"})]},`${n}-${o}`))});me.propTypes={count:a.number,keyPrefix:a.string};const bt=({keywords:t=[],isLoading:n=!1,onKeywordClick:r})=>{const{t:o}=S("common"),s=t.slice(0,5),i=t.slice(5,10),l=()=>n?e.jsxs("div",{className:Ue,children:[e.jsx(me,{count:5,keyPrefix:"skl-kw-l"}),e.jsx(me,{count:5,keyPrefix:"skl-kw-r"})]}):t.length?e.jsxs("div",{className:Ue,children:[e.jsx("ul",{className:de,children:s.map((c,d)=>e.jsx("li",{className:"w-full min-w-0 text-left",children:e.jsxs("button",{className:f(Fe,"bg-transparent border-none cursor-pointer p-0 text-left","font-fig-mixed text-[1.2rem] leading-[1.8rem] text-black","hover:opacity-70 transition-opacity duration-150"),onClick:()=>r?.(c),children:[e.jsx("span",{className:"font-fig-en font-medium text-[1.2rem] leading-[1.8rem] text-fig-text-secondary w-[1.6rem] shrink-0",children:d+1}),e.jsx("span",{className:"truncate",children:c})]})},c))}),i.length>0&&e.jsx("ul",{className:de,children:i.map((c,d)=>e.jsx("li",{className:"w-full min-w-0 text-left",children:e.jsxs("button",{className:f(Fe,"bg-transparent border-none cursor-pointer p-0 text-left","font-fig-mixed text-[1.2rem] leading-[1.8rem] text-black","hover:opacity-70 transition-opacity duration-150"),onClick:()=>r?.(c),children:[e.jsx("span",{className:"font-fig-en font-medium text-[1.2rem] leading-[1.8rem] text-fig-text-secondary w-[1.6rem] shrink-0",children:d+6}),e.jsx("span",{className:"truncate",children:c})]})},c))})]}):e.jsx("p",{className:"mt-[0.8rem] font-fig-mixed text-[1.2rem] leading-[1.8rem] text-fig-text-secondary text-left",children:o("noPopularKeywords")});return e.jsxs("section",{children:[e.jsx("h3",{className:f("font-fig-mixed font-bold text-left","text-[1.2rem] leading-[1.8rem] text-black"),children:o("popularKeywords")}),l()]})};bt.propTypes={keywords:a.arrayOf(a.string),isLoading:a.bool,onKeywordClick:a.func};const $e=f("mt-[0.8rem] grid grid-cols-1 gap-y-[0.8rem]","lg:grid-cols-2 lg:gap-x-[0.8rem] lg:gap-y-0"),ue="list-none m-0 p-0 flex flex-col items-stretch justify-start gap-[0.8rem] lg:gap-0 w-full",fe=({count:t,keyPrefix:n})=>e.jsx("ul",{className:ue,children:Array.from({length:t}).map((r,o)=>e.jsxs("li",{className:"w-full min-w-0 h-[1.8rem] flex items-center",children:[e.jsx("span",{className:"w-[1.6rem] shrink-0"}),e.jsx("span",{className:"h-[1.2rem] w-[75%] rounded-[0.2rem] bg-[#f0f0f0] animate-pulse"})]},`${n}-${o}`))});fe.propTypes={count:a.number,keyPrefix:a.string};const yt=({products:t=[],isLoading:n=!1,onProductClick:r})=>{const{t:o}=S("common"),s=t.slice(0,5),i=t.slice(5,10),l=(d,p)=>e.jsx("li",{className:"w-full min-w-0 text-left",children:e.jsxs("button",{className:f("flex items-center justify-start gap-0 bg-transparent border-none cursor-pointer p-0 text-left w-full min-w-0","text-[1.2rem] leading-[1.8rem] text-black","hover:opacity-70 transition-opacity duration-150"),onClick:()=>r?.(d),children:[e.jsx("span",{className:"font-[var(--font-en)] font-medium text-[1.2rem] leading-[1.8rem] text-fig-text-secondary w-[1.6rem] shrink-0",children:p+1}),e.jsxs("span",{className:"truncate min-w-0",children:[d.brandName&&e.jsx("span",{className:"font-[var(--font-en)] uppercase mr-[0.4rem]",children:d.brandName}),e.jsx("span",{children:d.productName})]})]})},d.productNo),c=()=>n?e.jsxs("div",{className:$e,children:[e.jsx(fe,{count:5,keyPrefix:"skl-pp-l"}),e.jsx(fe,{count:5,keyPrefix:"skl-pp-r"})]}):t.length?e.jsxs("div",{className:$e,children:[e.jsx("ul",{className:ue,children:s.map((d,p)=>l(d,p))}),i.length>0&&e.jsx("ul",{className:ue,children:i.map((d,p)=>l(d,p+5))})]}):e.jsx("p",{className:"mt-[0.8rem] text-[1.2rem] leading-[1.8rem] text-fig-text-secondary text-left",children:o("noPopularProducts")});return e.jsxs("section",{children:[e.jsx("h3",{className:f("font-fig-mixed font-bold text-left","text-[1.2rem] leading-[1.8rem] text-black"),children:o("popularProducts")}),c()]})};yt.propTypes={products:a.arrayOf(a.shape({productNo:a.number,productName:a.string,brandName:a.string,imageUrl:a.string})),isLoading:a.bool,onProductClick:a.func};const cr=je({productNo:$(),productName:A(),brandName:A().optional(),brandNameEn:A().optional(),salePrice:$().optional(),immediateDiscountAmt:$().optional(),additionDiscountAmt:$().optional(),imageUrls:H(A()).optional(),listImageUrls:H(A()).optional()}).passthrough(),we="searchProducts",dr={getList:async()=>{const n=(await ee({url:ye.RECOMMENDED_SECTION(we),query:{soldout:!0,saleStatus:"ONSALE"}}))?.products??[],r=cr;return n.slice(0,4).map(o=>r.parse(o))}},Ye=()=>e.jsxs("article",{className:"flex flex-col items-start w-full min-w-0 overflow-hidden",children:[e.jsx("div",{className:"relative w-full aspect-[4/5] bg-[#f7f7f7] animate-pulse"}),e.jsx("div",{className:"flex flex-col items-start w-full pt-[0.8rem]",children:["35%","70%","30%","25%"].map((t,n)=>e.jsx("div",{className:"h-[1.8rem] w-full flex items-center",children:e.jsx("span",{className:"h-[1.2rem] rounded-[0.2rem] bg-[#f0f0f0] animate-pulse",style:{width:t}})},n))})]}),Nt=({products:t=[],isLoading:n=!1,onClose:r})=>{const{t:o}=S("common");return!n&&!t.length?null:e.jsxs("section",{className:"w-full",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("h3",{className:f("font-fig-mixed font-bold","text-[1.2rem] leading-[1.8rem] text-black"),children:o("recommendedProducts")}),e.jsx(E,{to:`/display/${we}`,onClick:()=>r?.(),className:f("font-fig-mixed text-[1.2rem] leading-[1.8rem] text-fig-btn-enabled no-underline","hover:text-black transition-colors duration-150"),children:o("seeMore")})]}),n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:f("mt-[0.8rem] flex gap-[0.8rem]","lg:hidden"),children:[0,1].map(s=>e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(Ye,{})},s))}),e.jsx("div",{className:f("mt-[0.8rem] gap-[0.8rem]","hidden lg:grid lg:grid-cols-4"),children:[0,1,2,3].map(s=>e.jsx(Ye,{},s))})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:f("mt-[0.8rem]","lg:hidden"),children:e.jsx(et,{className:"swiper--bleed",modules:[dn],freeMode:!0,threshold:10,slidesPerView:2,spaceBetween:8,children:t.map(s=>e.jsx(tt,{children:e.jsx(Te,{productNo:s.productNo,productName:s.productName,brandName:s.brandName,brandNameEn:s.brandNameEn,imageUrls:s.imageUrls,listImageUrls:s.listImageUrls,salePrice:s.salePrice,immediateDiscountAmt:s.immediateDiscountAmt,additionDiscountAmt:s.additionDiscountAmt,isSoldOut:s.isSoldOut,liked:s.liked,nested:!0})},s.productNo))})}),e.jsx("div",{className:f("mt-[0.8rem] gap-[0.8rem]","hidden lg:grid lg:grid-cols-4"),children:t.map(s=>e.jsx(Te,{productNo:s.productNo,productName:s.productName,brandName:s.brandName,brandNameEn:s.brandNameEn,imageUrls:s.imageUrls,listImageUrls:s.listImageUrls,salePrice:s.salePrice,immediateDiscountAmt:s.immediateDiscountAmt,additionDiscountAmt:s.additionDiscountAmt,isSoldOut:s.isSoldOut,liked:s.liked},s.productNo))})]})]})};Nt.propTypes={products:a.arrayOf(a.shape({productNo:a.number,productName:a.string,brandName:a.string,brandNameEn:a.string,salePrice:a.number})),isLoading:a.bool,onClose:a.func};const mr=H(A()),ur={getList:async()=>{const t=await ee({url:ye.FAVORITE_KEYWORDS}),n=Array.isArray(t)?t:[];return mr.parse(n)}},fr=()=>{const{data:t=[],isLoading:n}=ne({queryKey:Ne.favoriteKeywords(),queryFn:ur.getList,staleTime:18e5,select:r=>r.slice(0,10)});return{keywords:t,isLoading:n}},pr=je({productNo:$(),productName:A(),brandName:A().optional(),brandNameEn:A().optional(),imageUrls:H(A()).optional()}).passthrough(),gr=je({items:H(pr).optional()}).passthrough(),xr={getList:async()=>{const t=await ee({url:ye.PRODUCTS_SEARCH,query:{"order.by":"POPULAR","order.direction":"DESC",pageNumber:1,pageSize:10,saleStatus:"ONSALE"}});return(gr.parse(t).items??[]).map(r=>({productNo:r.productNo,productName:le(r.productName),brandName:le(r.brandNameEn||r.brandName||""),imageUrl:r.imageUrls?.[0]??""}))}},hr=()=>{const{data:t=[],isLoading:n}=ne({queryKey:Ne.popularProducts(),queryFn:xr.getList,staleTime:6e5});return{products:t,isLoading:n}},br=()=>{const{data:t=[],isLoading:n}=ne({queryKey:Ne.recommendedProducts(we),queryFn:dr.getList,staleTime:6e5});return{products:t,isLoading:n}},jt=({openModal:t})=>{const{t:n}=S("common"),{keyword:r,searchProductsByKeyword:o,removeKeyword:s,updateKeyword:i}=lr(""),{keywords:l,isLoading:c}=fr(),{products:d,isLoading:p}=hr(),{products:g,isLoading:x}=br(),m=b=>{o(b),location.href=`/products?keyword=${encodeURIComponent(b)}`},y=b=>{location.href=`/product-detail?productNo=${b.productNo}`};return e.jsx(e.Fragment,{children:e.jsxs("div",{className:f("w-full pt-[2rem] pb-[8rem] flex flex-col items-start gap-[2rem]","lg:max-w-[125rem] lg:mx-auto","xl:max-w-[65.1vw]"),children:[e.jsx("div",{className:"w-full",children:e.jsxs("div",{className:"relative w-full",children:[e.jsx(Je,{type:"text",value:r,placeholder:n("searchPlaceholder"),onChange:({target:b})=>i(b.value),onKeyDown:b=>b.key==="Enter"&&m(r),className:"pr-[3rem]"}),r.length>0&&e.jsx("button",{type:"button",onClick:s,className:"absolute right-[1rem] top-1/2 -translate-y-1/2 p-0 bg-transparent border-none cursor-pointer text-fig-text-secondary hover:text-black transition-colors",children:e.jsx(Qt,{size:14,strokeWidth:1.5})})]})}),e.jsxs("div",{className:"w-full flex items-start justify-start gap-[0.8rem] pb-[4rem]",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(bt,{keywords:l,isLoading:c,onKeywordClick:m})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx(yt,{products:d,isLoading:p,onProductClick:y})})]}),e.jsx(Nt,{products:g,isLoading:x,onClose:()=>t(!1)})]})})};jt.propTypes={openModal:a.func};const vt=({isOpen:t,openModal:n,onSearchClick:r,onBrandClick:o})=>{const[s,i]=u.useState(t),[l,c]=u.useState(!1);u.useEffect(()=>{t&&i(!0)},[t]),u.useEffect(()=>{if(!s||!t)return;let p;const g=requestAnimationFrame(()=>{p=requestAnimationFrame(()=>c(!0))});return()=>{cancelAnimationFrame(g),p&&cancelAnimationFrame(p)}},[s,t]),u.useEffect(()=>{t||c(!1)},[t]),u.useEffect(()=>{if(t)return;const p=setTimeout(()=>i(!1),350);return()=>clearTimeout(p)},[t]);const d=p=>{p.propertyName==="transform"&&!t&&i(!1)};return s?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:f("fixed inset-0 z-[49] bg-black/40 transition-opacity duration-300 ease-out",l?"opacity-100":"opacity-0 pointer-events-none"),onClick:()=>n(!1)}),e.jsxs("div",{onTransitionEnd:d,className:f("search-keyword-modal fixed top-0 left-0 right-0 z-[50] bg-white h-[100dvh] overflow-y-auto overflow-x-hidden px-[2rem]","lg:h-auto lg:max-h-[100dvh]","transition-transform duration-300 ease-out",l?"translate-y-0":"-translate-y-full"),children:[e.jsx(ve,{children:e.jsx(re,{onSearchClick:r??(()=>n(!1)),isSearchOpen:!0,onBrandClick:o,isBrandOpen:!1})}),e.jsx(Tn,{children:e.jsx(jt,{openModal:n})})]})]}):null};vt.propTypes={isOpen:a.bool,openModal:a.func,onSearchClick:a.func,onBrandClick:a.func};const yr=t=>{const{data:n=[],isLoading:r}=ne({queryKey:["display","banners",t],queryFn:async()=>{const o=await ee({url:`display/banners/id/${t}`});return Array.isArray(o)?o.flatMap(s=>(s.accounts||[]).flatMap(i=>i.banners||[])).sort((s,i)=>(s.displayOrder??0)-(i.displayOrder??0)):[]},enabled:!0});return{banners:n,isLoading:r}},Ct="headerTopBanner",He=`top-announce-dismissed-${Ct}`,Nr=t=>t?.leftSpaceColor||t?.rightSpaceColor||"#fff",wt=t=>t?.nameColor||"#000",qe=t=>{const n=t.name||t.description||"",r=t.browerTargetType==="NEW"?"_blank":"_self";return e.jsx("div",{className:"flex items-center justify-center w-full h-full",children:e.jsx("a",{href:t.landingUrl||"#",target:r,...r==="_blank"&&{rel:"noopener noreferrer"},className:"text-[1.2rem] leading-[2.4rem]",style:{color:wt(t)},children:n})})},St=()=>{const{banners:t}=yr(Ct),[n,r]=u.useState(!1);if(!t.length||sessionStorage.getItem(He)==="1"||n)return null;const o=c=>{c.preventDefault(),c.stopPropagation(),sessionStorage.setItem(He,"1"),r(!0)},[s]=t,i=Nr(s),l=wt(s);return e.jsxs("div",{className:f("relative h-[2.4rem] hidden -mx-[1.6rem]","lg:block lg:-mx-[2rem]"),style:{backgroundColor:i},children:[t.length===1?qe(t[0]):e.jsx(et,{direction:"vertical",loop:!0,threshold:10,autoplay:{delay:4e3,disableOnInteraction:!1},modules:[un],className:"w-full h-full",children:t.map(c=>e.jsx(tt,{children:qe(c)},c.bannerNo))}),e.jsx("button",{type:"button",onClick:o,className:"absolute right-[2rem] top-1/2 -translate-y-1/2 text-[1rem] font-normal z-10",style:{color:l},children:"닫기"})]})},jr="ABCDEFGHIJKLMNOPQRSTUVWXYZ".split(""),kt=({activeLetter:t,onSelect:n,availableLetters:r})=>e.jsx("div",{className:"w-full overflow-x-auto scrollbar-hide",children:e.jsx("div",{className:"flex items-center gap-[0.8rem] w-max mx-auto",children:jr.map(o=>{const s=!r.has(o),i=t===o;return e.jsx("button",{type:"button",disabled:s,onClick:()=>n(i?"":o),className:f("font-fig-en text-[1.2rem] leading-[1.8rem] transition-colors",i&&"text-fig-text-primary underline decoration-[0.5px] underline-offset-[0.2rem]",!i&&!s&&"text-fig-text-primary hover:text-fig-btn-hover-primary",s&&"text-fig-btn-disabled cursor-default"),children:o},o)})})});kt.propTypes={activeLetter:a.string,onSelect:a.func.isRequired,availableLetters:a.instanceOf(Set).isRequired};const Et=({categories:t,selectedCategoryNo:n,onSelect:r})=>{const{t:o}=S("common"),s=[{categoryNo:"",label:o("all")},...t];return e.jsx("div",{className:"w-full overflow-x-auto scrollbar-hide",children:e.jsx("div",{className:"flex items-center gap-[0.8rem] w-max mx-auto",children:s.map(({categoryNo:i,label:l})=>{const c=String(n)===String(i);return e.jsx("button",{type:"button",onClick:()=>r(String(i)),className:f("font-fig-kr text-[1.2rem] leading-[1.8rem] whitespace-nowrap transition-colors",c?"text-fig-text-primary underline decoration-[0.5px] underline-offset-[0.2rem]":"text-fig-text-secondary hover:text-fig-text-primary"),children:l},i||"all")})})})};Et.propTypes={categories:a.arrayOf(a.shape({categoryNo:a.number,label:a.string})),selectedCategoryNo:a.string,onSelect:a.func.isRequired};const Tt=({checked:t})=>e.jsx("span",{className:"flex items-center justify-center w-[1.6rem] h-[1.6rem] shrink-0",children:e.jsx("span",{className:f("w-[1.2rem] h-[1.2rem] border border-fig-btn-default-primary",t&&"bg-fig-btn-default-primary")})});Tt.propTypes={checked:a.bool};const Se=({brand:t,isSelected:n,onToggleSelect:r,isLiked:o,onToggleLike:s,onNavigate:i})=>{const{t:l}=S("common"),{brandNo:c,name:d,nameEn:p,count:g}=t,x=p||d;return e.jsxs("div",{className:"flex items-center justify-between w-full gap-[0.8rem]",children:[e.jsxs("div",{className:"flex items-center justify-start gap-[0.8rem] flex-1 min-w-0",children:[e.jsx("button",{type:"button",onClick:()=>r(c),className:"flex items-center justify-center shrink-0","aria-pressed":n,"aria-label":x,children:e.jsx(Tt,{checked:n})}),e.jsx("button",{type:"button",onClick:()=>i?i(t):r(c),className:"font-fig-en font-medium text-[1.2rem] leading-[1.8rem] uppercase text-fig-text-primary truncate text-left hover:underline hover:decoration-[0.5px] hover:underline-offset-[0.1rem]",children:x}),g>0&&e.jsx("span",{className:"font-fig-en text-[0.8rem] leading-[1.8rem] text-fig-text-secondary shrink-0",children:g})]}),e.jsx("button",{type:"button",onClick:()=>s(c),className:f("shrink-0 font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-text-secondary",!o&&"underline decoration-[0.5px] underline-offset-[0.1rem]"),children:l(o?"delete":"wishlist")})]})};Se.propTypes={brand:a.shape({brandNo:a.number,name:a.string,nameEn:a.string,count:a.number}).isRequired,isSelected:a.bool,onToggleSelect:a.func.isRequired,isLiked:a.bool,onToggleLike:a.func.isRequired,onNavigate:a.func};const pe=t=>(t.nameEn||t.name||"").trim().charAt(0).toUpperCase(),Ge="",At=({brands:t,selectedBrandNos:n,onToggleSelect:r,isLiked:o,onToggleLike:s,onNavigate:i,isLoading:l})=>{const{t:c}=S("common"),d=u.useMemo(()=>{const m=new Map;return t.forEach(y=>{const b=pe(y),N=/^[A-Z]$/.test(b)?b:Ge;m.has(N)||m.set(N,[]),m.get(N).push(y)}),[...m.entries()].sort(([y],[b])=>y.localeCompare(b))},[t]),p=u.useMemo(()=>t.filter(m=>o(m.brandNo)),[t,o]);if(!l&&t.length===0)return e.jsx("p",{className:"font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-btn-enabled",children:c("noSearchResultsFound")});const g=[...p.length>0?[{key:"__wishlist__",title:c("wishlist"),items:p}]:[],...d.map(([m,y])=>({key:m,title:m===Ge?c("brandGroupEtc"):m,items:y}))],x=m=>e.jsx(Se,{brand:m,isSelected:n.includes(m.brandNo),onToggleSelect:r,isLiked:o(m.brandNo),onToggleLike:s,onNavigate:i},m.brandNo);return e.jsx("div",{className:"flex flex-col items-start gap-[4rem] w-full",children:g.map(m=>e.jsxs(u.Fragment,{children:[e.jsx("p",{className:"font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-text-primary uppercase",children:m.title}),e.jsx("div",{className:f("w-full grid grid-cols-1 gap-x-[2rem] gap-y-[0.8rem] content-start","lg:grid-cols-2"),children:m.items.map(x)})]},m.key))})};At.propTypes={brands:a.arrayOf(a.shape({brandNo:a.number,name:a.string,nameEn:a.string,count:a.number})),selectedBrandNos:a.arrayOf(a.number),onToggleSelect:a.func.isRequired,isLiked:a.func.isRequired,onToggleLike:a.func.isRequired,onNavigate:a.func,isLoading:a.bool};const X="brandPanelOpen",Lt=({onClose:t})=>{const{t:n}=S("common"),r=Ve(),o=L(),s=j=>{r({pathname:o.pathname,search:o.search,hash:o.hash},{replace:!0,state:{...o.state,[X]:!0}}),r(j)},{categories:i}=P(),l=i?.multiLevelCategories??[],[c,d]=u.useState(""),[p,g]=u.useState(""),[x,m]=u.useState(""),[y,b]=u.useState([]),{brands:N,isLoading:v}=mn(c),{isLiked:C,toggleLike:T,showLoginModal:h,closeLoginModal:I,confirmLogin:K}=gn();u.useEffect(()=>{m("")},[c]);const q=u.useMemo(()=>new Set(N.map(pe).filter(Boolean)),[N]),D=u.useMemo(()=>{const j=p.trim().toLowerCase();return N.filter(w=>{const k=!x||pe(w)===x,G=!j||(w.nameEn||"").toLowerCase().includes(j)||(w.name||"").toLowerCase().includes(j);return k&&G})},[N,x,p]),_=u.useMemo(()=>y.map(j=>N.find(w=>w.brandNo===j)).filter(Boolean),[y,N]),U=j=>{b(w=>w.includes(j)?w.filter(k=>k!==j):[...w,j])},B=j=>{const w=j.name||j.nameEn;if(!w)return;const k=new URLSearchParams;k.set("brands",w),s(`/products?${k.toString()}`)},O=()=>{if(y.length>0){const j=N.filter(k=>y.includes(k.brandNo)).map(k=>k.name||k.nameEn).filter(Boolean),w=new URLSearchParams;w.set("brands",j.join(",")),s(`/products?${w.toString()}`);return}t()};return e.jsxs(pn,{className:f("w-full pb-[3.2rem] flex flex-col items-start gap-[4rem]","lg:pb-[4rem]"),children:[e.jsx(Je,{type:"text",value:p,placeholder:n("brandSearch"),onChange:j=>g(j.target.value),className:"font-fig-kr"}),e.jsx(kt,{activeLetter:x,onSelect:m,availableLetters:q}),e.jsx(Et,{categories:l,selectedCategoryNo:c,onSelect:d}),_.length>0&&e.jsx("div",{className:f("w-full grid grid-cols-1 gap-x-[2rem] gap-y-[0.8rem] content-start","lg:grid-cols-2"),children:_.map(j=>e.jsx(Se,{brand:j,isSelected:!0,onToggleSelect:U,isLiked:C(j.brandNo),onToggleLike:T,onNavigate:B},j.brandNo))}),e.jsx(fn,{type:"button",variant:"solid",size:"fig-default",onClick:O,disabled:y.length===0,className:"w-full font-fig-kr",children:n("selectComplete")}),e.jsx(At,{brands:D,selectedBrandNos:y,onToggleSelect:U,isLiked:C,onToggleLike:T,onNavigate:B,isLoading:v}),e.jsx(Xt,{open:h,onClose:I,type:"confirm",message:n("loginRequired"),confirmLabel:n("goToLogin"),cancelLabel:n("close"),onConfirm:K})]})};Lt.propTypes={onClose:a.func.isRequired};const Pt=({onClose:t,onBack:n,onSearchClick:r,onBrandClick:o})=>{const{t:s}=S("common");return e.jsxs("div",{className:f("brand-select-panel fixed inset-0 z-[50] bg-white overflow-y-auto px-[1.6rem] pb-[4rem]","lg:px-[2rem] lg:pb-0"),children:[e.jsx("button",{type:"button",onClick:n??t,className:f("block text-left pt-[6rem] pb-[2rem] font-fig-kr text-[1.2rem] leading-[1.8rem] text-fig-btn-default-primary","lg:hidden"),children:s("back")}),e.jsxs("div",{className:"hidden lg:block",children:[e.jsx(St,{}),e.jsx(ve,{children:e.jsx(re,{onNavigate:t,onBrandClick:o??t,isBrandOpen:!0,onSearchClick:r,isSearchOpen:!1})})]}),e.jsx(Lt,{onClose:t}),e.jsx("div",{className:"hidden lg:block",children:e.jsx(ut,{})})]})};Pt.propTypes={onClose:a.func.isRequired,onBack:a.func,onSearchClick:a.func,onBrandClick:a.func};const vr=he.isMobile?Z.MOBILE_WEB:Z.PC,_t=({children:t})=>{const{fetchBanner:n}=Mn(),{fetchOrderConfig:r}=en();return u.useEffect(()=>{n({cacheOption:{type:"MEMORY",timeBySeconds:180}}),r({cacheOption:{type:"MEMORY",timeBySeconds:180}})},[]),e.jsx(e.Fragment,{children:t})};_t.propTypes={children:a.node};const Bt=({children:t})=>{const{profile:n}=ge(),{fetchCartCount:r}=hn();return u.useEffect(()=>{r({memberStatus:n?.memberStatus})},[location?.href,n?.memberStatus]),e.jsx(e.Fragment,{children:t})};Bt.propTypes={children:a.node};const Cr=()=>{const[t]=te(),{fetchBoardConfiguration:n}=Zt(),{fetchConfiguration:r}=Jt(),o=u.useRef(),s=u.useRef(),[i,l]=u.useState(!1),[c,d]=u.useState(!1),[p,g]=u.useState(!1),x=Number(t.get("productNo")),m=L(),y=Ve();In();const b=()=>{l(!1),d(!1),g(!1)};u.useEffect(()=>{if(m.state?.[X]){l(!1),d(!1),g(!0);return}b()},[m.pathname,m.search]);const N=()=>{g(!1),m.state?.[X]&&y({pathname:m.pathname,search:m.search,hash:m.hash},{replace:!0,state:{...m.state,[X]:!1}})};u.useEffect(()=>{const h=i||c||p;return document.body.style.overflow=h?"hidden":"",()=>{document.body.style.overflow=""}},[i,c,p]);const v=()=>{d(!1),g(!1),l(h=>!h)},C=()=>{if(d(!1),l(!1),p){N();return}g(!0)},T=()=>{l(!1),g(!1),d(h=>!h)};return u.useEffect(()=>{r({cacheOption:{type:"MEMORY",timeBySeconds:180}}),n()},[]),e.jsx(an,{children:e.jsxs("div",{className:"page",ref:o,children:[e.jsx(rn,{refs:{pageInnerRef:s,pageRef:o}}),e.jsx(On,{children:e.jsx(_t,{children:e.jsx(xn,{children:e.jsx(Bt,{children:e.jsxs(cn,{productNo:x,children:[e.jsx(ir,{}),e.jsx("div",{className:"page-inner",ref:s,children:e.jsx(ve,{children:e.jsxs("div",{className:"page__content site bg-[unset]",children:[e.jsx(Ot,{onSearchClick:v,isSearchOpen:i,onBrandClick:C,isBrandOpen:p,onNavigate:b}),e.jsx(wr,{}),e.jsx(ut,{}),e.jsx(vt,{isOpen:i,openModal:l,onSearchClick:v,onBrandClick:C}),p&&e.jsx(Pt,{onClose:N,onBack:()=>{N(),d(!0)},onSearchClick:v,onBrandClick:C}),e.jsx(bn,{children:e.jsx(Rt,{onSearchClick:v,isSearchOpen:i,onCategoryClick:T,isCategoryOpen:c,onNavigate:b})}),e.jsx(ct,{isOpen:c,onClose:()=>d(!1),onBrandClick:()=>{d(!1),l(!1),g(!0)}})]})})})]})})})})})]})})},wr=()=>e.jsx("main",{className:f("flex-1","pb-[1.6rem]","lg:pb-0"),children:e.jsx(tn,{context:vr})}),Ot=({onSearchClick:t,isSearchOpen:n,onBrandClick:r,isBrandOpen:o,onNavigate:s})=>{const{hasHeader:i}=Ze();return i?e.jsxs(e.Fragment,{children:[e.jsx(St,{}),e.jsx(re,{onSearchClick:t,isSearchOpen:n,onBrandClick:r,isBrandOpen:o,onNavigate:s})]}):null};Ot.propTypes={onSearchClick:a.func,isSearchOpen:a.bool,onBrandClick:a.func,isBrandOpen:a.bool,onNavigate:a.func};const Rt=({onSearchClick:t,isSearchOpen:n,onCategoryClick:r,isCategoryOpen:o,onNavigate:s})=>{const{hasBottomNav:i}=Ze();return i?e.jsx(ot,{onSearchClick:t,isSearchOpen:n,onCategoryClick:r,isCategoryOpen:o,onNavigate:s}):null};Rt.propTypes={onSearchClick:a.func,isSearchOpen:a.bool,onCategoryClick:a.func,isCategoryOpen:a.bool,onNavigate:a.func};Cr.propTypes={isMain:a.bool,hasBottomNav:a.bool,hasHomeBtn:a.bool,hasBackBtn:a.bool,hasCartBtn:a.bool};export{Cr as default};