1import{k as e,aF as r,E as t,d7 as o,z as i,U as n,y as a,bS as s,aE as l,af as c,X as d,f4 as u,f5 as p,V as h,l as g,q as m,f6 as y,n as v,df as f,ae as S,f7 as w,as as b,a7 as x,a3 as C,p as k,aL as L,az as F,f8 as M,a0 as P,m as E,f9 as N,aR as R,fa as Y,fb as I,cn as K,aH as D,aP as O}from"./index-Db6MqYYx.js";import{u as T,W as j,P as A,a as B,B as _,S as z}from"./PCWingFilter-C4RvGzx-.js";import{r as W}from"./vendor-Cqib3ghv.js";import{P as H,U as V,a as G}from"./UtilsWrapper-DkQWKgvP.js";import{u as X}from"./useFirstMountState-CEFD8MN0.js";import{u as q}from"./useListViewType-DxxOJfJz.js";import{P as U,L as J}from"./LoadingAndMore-ByU3cEnT.js";import{L as Q,O as Z}from"./OpenWingFilterButton-Cst7odpi.js";import{S as $}from"./SortPopupContainer-BuqjTycS.js";import{V as ee}from"./ViewTypeSpinner-zaGHjl82.js";import{S as re}from"./StickyFilterWrapper-JsUQk-8C.js";import{I as te}from"./ItemCounter-DrC8ufrf.js";import"./useAppExternalFunction-BhKwnA46.js";import"./useBodyScrollLock-CRLxGcES.js";function oe({isOpen:l,keyword:c,categoryId:d,categoryDepth:u,originalSearchYn:p,searchType:h,onOpen:g,onClose:m}){const y=e(),v=r(),f=t(e=>e.expressCategory.categories),S=t(e=>e.expressSearch.originCount),w=W.useMemo(()=>S>H,[S]),b=W.useMemo(()=>f.find(e=>{var r;return e.lcateCd===String(d)||(null==(r=null==e?void 0:e.categoryList)?void 0:r.some(e=>e.mcateCd===String(d)))}),[f,d]),x=W.useMemo(()=>{var e;return null==(e=null==b?void 0:b.categoryList)?void 0:e.find(e=>e.mcateCd===String(d))},[b,d]),C=W.useMemo(()=>o(c,v.addSubCategoryYn),[c,v]),k=t(e=>{var r;return null==(r=e.expressSearch.result)?void 0:r[C]}),{filters:L,displayedFilters:F,selectFilterItem:M,selectCategoryItem:P,deleteFilterItem:E,resetFilter:N}=T(null==k?void 0:k.filter,{depth1:"expressSearch",depth2:"wing"}),R=W.useMemo(()=>{const e=[];return b?(e.push({cateCd:Number(b.lcateCd)||0,cateNm:b.lcateNm||"",depth:1,children:[]}),x?(e.push({cateCd:Number(x.mcateCd)||0,cateNm:x.mcateNm||"",depth:2,children:[]}),e):e):e},[b,x]),Y=W.useMemo(()=>{var e,r;return u?((null==R?void 0:R.length)||0)>1?null==(e=null==k?void 0:k.filterSubCategories)?void 0:e[String(R[0].cateCd)]:(null==(r=null==k?void 0:k.filterSubCategories)?void 0:r[String(d)])||[]:L.categoryList||[]},[k,u,d,R]),I=W.useMemo(()=>((null==L?void 0:L.benefitList)||[]).filter(e=>"FREE"!==e.code),[null==L?void 0:L.benefitList]),[K,D]=W.useState(["category"]),O=W.useCallback(e=>{K.includes(e)?D(K.filter(r=>r!==e)):D([e])},[K,D]);return W.useEffect(()=>{R.forEach((e,r)=>{var t;1<r||(null==(t=null==k?void 0:k.filterSubCategories)?void 0:t[String(R[r].cateCd)])||y.expressSearch.fetchSubcategory({keyword:c,categoryDepth:r+1,categoryId:e.cateCd,originalSearchYn:p,searchType:h})})},[R]),W.useEffect(()=>{(null==f?void 0:f.length)||y.expressCategory.fetchCategories()},[]),W.useEffect(()=>{l&&D(["category"])},[l]),l?a(n,{children:[i(j,{attributeList:null==L?void 0:L.attributeList,brandList:null==L?void 0:L.brandList,partnerList:null==L?void 0:L.partnerList,priceRangeList:w?null==L?void 0:L.priceRangeList:[],benefitList:I,rankList:null==L?void 0:L.rankList,selectedGroup:K,value:F,locationList:R,locationMaxDepth:1,categorySubList:Y,currentCategoryId:d,onClose:m,onClickGroup:O,onSelectCategory:P,onChange:M,onDelete:E,onReset:()=>{N(),D(["category"])}}),i(s,{zIndex:3099,onClick:m})]}):i(n,{})}const ie={name:"zlg2ax",styles:"display:flex;align-items:center;justify-content:center;min-height:calc(100vh - 514px);padding:40px 0 0;font-size:13px;line-height:18px;text-align:center;color:#999;p{color:inherit;font-size:inherit;}"};function ne({children:e}){return i("div",{css:ie,children:e})}const ae=l("div",{target:"eu9haks2"})(c.desktop,"{padding:50px 0;}",c.mobile,"{padding:30px 0;}border-bottom:1px solid #eee;text-align:center;display:flex;align-items:center;justify-content:center;"),se=l("div",{target:"eu9haks1"})({name:"n2qhdu",styles:"overflow:hidden;position:absolute;clip:rect(1px, 1px, 1px, 1px);clip-path:inset(50%);height:1px;width:1px;margin:-1px;padding:0"}),le=l("div",{target:"eu9haks0"})({name:"1e64pcf",styles:"p{margin:0 auto;padding-right:20px;padding-left:20px;font-size:18px;}strong{color:#df0011;word-break:break-all;}span{display:block;margin-top:10px;font-size:13px;color:#999;}span:first-of-type{margin-top:0;display:inline-block;font-size:18px;color:#000;}button{border:0px;background:none;cursor:pointer;outline:0px;user-select:none;-webkit-tap-highlight-color:transparent;margin-top:10px;font-size:13px;color:rgb(0, 145, 255);text-decoration:underline;}"});function ce({title:e,message:r,style:t}){return a(ae,{style:t,children:[e&&i(se,{children:"string"==typeof e?i("p",{children:e}):e}),r&&i(le,{children:"string"==typeof r?i("p",{children:r}):r})]})}const de=d("padding-bottom:0;",c.desktop,"{.search-exp-container-wrap{width:100%;margin-top:12px;display:flex;flex-direction:row;flex-wrap:nowrap;}.search-exp-filter-list-wrap{flex:0.3;}.search-exp-prod-list-wrap{flex:0.9;overflow:hidden;.unitItem:not(.typeHorizontal){flex:0 1 calc((100% - (12px * (3 - 1))) / 3);}}}","");function ue({keyword:a,categoryId:s,categoryDepth:l,originalSearchYn:c,searchType:d}){const u=e(),p=r(),h=t(e=>e.expressCategory.categories),g=t(e=>e.expressSearch.originCount),m=W.useMemo(()=>g>H,[g]),y=W.useMemo(()=>h.find(e=>{var r;return e.lcateCd===String(s)||(null==(r=null==e?void 0:e.categoryList)?void 0:r.some(e=>e.mcateCd===String(s)))}),[h,s]),v=W.useMemo(()=>{var e;return null==(e=null==y?void 0:y.categoryList)?void 0:e.find(e=>e.mcateCd===String(s))},[y,s]),f=W.useMemo(()=>o(a,p.addSubCategoryYn),[a,p]),S=t(e=>{var r;return null==(r=e.expressSearch.result)?void 0:r[f]}),{filters:w,displayedFilters:b,selectFilterItem:x,selectCategoryItem:C,deleteFilterItem:k,resetFilter:L}=T(null==S?void 0:S.filter,{depth1:"expressSearch",depth2:"wing"}),F=W.useMemo(()=>{const e=[];
1return y?(e.push({cateCd:Number(y.lcateCd)||0,cateNm:y.lcateNm||"",depth:1,children:[]}),v?(e.push({cateCd:Number(v.mcateCd)||0,cateNm:v.mcateNm||"",depth:2,children:[]}),e):e):e},[y,v]),M=W.useMemo(()=>{var e,r;return l?((null==F?void 0:F.length)||0)>1?null==(e=null==S?void 0:S.filterSubCategories)?void 0:e[String(F[0].cateCd)]:(null==(r=null==S?void 0:S.filterSubCategories)?void 0:r[String(s)])||[]:w.categoryList||[]},[S,l,s,F]),P=W.useMemo(()=>((null==w?void 0:w.benefitList)||[]).filter(e=>"FREE"!==e.code),[null==w?void 0:w.benefitList]),[E,N]=W.useState(["category"]),R=W.useCallback(e=>{E.includes(e)?N(E.filter(r=>r!==e)):N([e])},[E,N]);return W.useEffect(()=>{F.forEach((e,r)=>{var t;1<r||(null==(t=null==S?void 0:S.filterSubCategories)?void 0:t[String(F[r].cateCd)])||u.expressSearch.fetchSubcategory({keyword:a,categoryDepth:r+1,categoryId:e.cateCd,originalSearchYn:c,searchType:d})})},[F]),W.useEffect(()=>{(null==h?void 0:h.length)||u.expressCategory.fetchCategories()},[]),i(n,{children:i(A,{attributeList:null==w?void 0:w.attributeList,brandList:null==w?void 0:w.brandList,partnerList:null==w?void 0:w.partnerList,priceRangeList:m?null==w?void 0:w.priceRangeList:[],benefitList:P,rankList:null==w?void 0:w.rankList,selectedGroup:E,value:b,categorySubList:M,currentCategoryId:s,onClickGroup:R,onSelectCategory:C,onChange:x,onDelete:k,onReset:()=>{L(),N(["category"])}})})}const pe={arrayFormat:"separator",arrayFormatSeparator:":",skipNull:!0,skipEmptyString:!0},he=["sort","categoryDepth","categoryId","addSubCategoryYn","attribute","brand","benefit","delivery","minPrice","maxPrice","reKeyword","review"];const ge=u(function(){var n,s,l,c,d;const u=p(),E=h(),N=g();E.app;const R=e(),Y=X(),I=function(e){const t=r(),o=W.useRef(!e.some(e=>t[e]));return W.useEffect(()=>{o.current&&e.some(e=>t[e])&&(o.current=!1)},[t]),o}(he),{isMobile:K,isDesktop:D}=m(),O=r(),j=W.useRef(null),A=W.useRef(null),z=y(),[H]=v(),V=H.get("page"),G=W.useMemo(()=>{const e={sort:O.sort||"RANK",originalSearchYn:O.originalSearchYn||"N",categoryDepth:(()=>{const e=Number(O.categoryDepth);return 1===e||2===e||3===e?e:void 0})(),categoryId:Number(O.categoryId)||void 0,addSubCategoryYn:O.addSubCategoryYn,attribute:O.attribute,brand:O.brand,benefit:O.benefit,delivery:O.delivery,minPrice:Number(O.minPrice)||void 0,maxPrice:Number(O.maxPrice)||void 0,reKeyword:O.reKeyword,review:O.review,inputKeyword:O.inputKeyword||O.keyword,searchKeyword:O.searchKeyword||O.keyword};return A.current&&f(A.current,e)?A.current:(A.current=e,e)},[O]),U=W.useMemo(()=>o(O.keyword,O.originalSearchYn),[O]),J=W.useRef(""),Q=W.useMemo(()=>O.keyword||"",[O.keyword]),Z=t(e=>e.expressSearch),ee=W.useMemo(()=>Z.pending,[Z]),re=W.useMemo(()=>{var e;return null==(e=Z.result)?void 0:e[U]},[Z,U]);W.useMemo(()=>{var e;return(null==(e=null==re?void 0:re.data)?void 0:e.dataList)||[]},[re]);const te=W.useMemo(()=>{var e;return(null==(e=null==re?void 0:re.data)?void 0:e.totalCount)||0},[re]);W.useMemo(()=>null==re?void 0:re.shownFilter,[null==re?void 0:re.shownFilter]);const{displayedFilters:ie}=T(null==re?void 0:re.filter);q({isLocalStorage:!0});const[ne,ae]=W.useState(!1),[se,le,ce]=B(),[pe,ge]=W.useState(!1),fe=W.useMemo(()=>!te&&!ie.length,[te,null==(n=null==re?void 0:re.filter)?void 0:n.categoryList,ie]);W.useEffect(()=>{!ne&&!se||(null==re?void 0:re.filter)||ee||R.expressSearch.fetchFilter({...G,keyword:Q})},[ne,se,null==re?void 0:re.filter,Q,D,ee]),W.useEffect(()=>{R.common.SET_SEARCH_KEYWORD({searchKeyword:O.keyword}),R.common.SEARCH_KEY({searchKey:O.keyword}),D&&ae(!0)},[D]);const Se=W.useCallback(async(e,r,t,o)=>{var i,n;const a=await R.expressSearch.search({keyword:e,options:r,withFilter:t,hasFilter:o,...V&&{page:Number(V)},isChangedForSearchKey:J.current!==U});a&&I.current&&(S.searchResultView({items:null==(i=null==a?void 0:a.items)?void 0:i.dataList,query:O.keyword,searchType:w[O.entry],storeType:"EXP"}),b(null==(n=null==a?void 0:a.items)?void 0:n.dataList)&&x("ê²ì ìë£",{input_query:O.keyword,result_count:0,store_type:"EXP"}))},[O]),we=[C.EXPRESS_SEARCH,C.EXPRESS_CATEGORY,C.EXPRESS_CATEGORY_MAP].some(e=>k(e,N.pathname));return W.useEffect(()=>{const e=[...he,"originalSearchYn"].every(e=>{var r;return G[e]===(null==(r=null==re?void 0:re.options)?void 0:r[e])});if(!Q)return;if(Y&&"POP"===u&&re&&e)return;const r=J.current!==U,t=[...he].some(e=>!!["attribute","benefit","brand","delivery","maxPrice","minPrice","review","partner","reKeyword","categoryId","categoryDepth"].includes(e)&&Boolean(G[e]));Se(Q,G,r&&t,t),J.current=U,window.scrollTo(0,0)},[U,G,V]),W.useEffect(()=>{Q&&(document.title="".concat(Q," | ííë¬ì¤ ìµì¤íë ì¤"),z.addKeyword(Q))},[Q]),a(W.Fragment,{children:[a("div",{className:L("content-container",{exp:we}),ref:j,css:de,children:[i("h1",{css:F,children:Q}),i(P,{moComp:a(W.Fragment,{children:[i("div",{css:ve,children:i(M,{isSearch:!0})}),i(oe,{isOpen:ne,keyword:Q,categoryId:G.categoryId,categoryDepth:G.categoryDepth,originalSearchYn:G.originalSearchYn,searchType:null==(l=null==(s=null==re?void 0:re.data)?void 0:s.search)?void 0:l.type,onClose:()=>ae(!1)}),i(me,{keyword:Q,isNotFound:fe}),!fe&&i(ye,{keyword:Q,setIsOpenWingFilter:ae,isOpenBenefitPopupFilter:se,openBenefitPopupFilter:le,setIsOpenSortPopup:ge,isOpenSortPopup:pe})]}),pcComp:a(W.Fragment,{children:[i(me,{keyword:Q,isNotFound:fe}),!fe&&a("div",{className:"search-exp-container-wrap",children:[i("div",{className:"search-exp-filter-list-wrap",children:i(ue,{keyword:Q,categoryId:G.categoryId,categoryDepth:G.categoryDepth,originalSearchYn:G.originalSearchYn,searchType:null==(d=null==(c=null==re?void 0:re.data)?void 0:c.search)?void 0:d.type})}),i("div",{className:"search-exp-prod-list-wrap",children:i(ye,{keyword:Q,setIsOpenWingFilter:ae,isOpenBenefitPopupFilter:se,openBenefitPopupFilter:le,setIsOpenSortPopup:ge,isOpenSortPopup:pe})})]})]})})]}),se&&i(_,{filterData:null==re?void 0:re.filter,onClose:ce,from:"expressSearch"}),K&&pe&&i($,{value:G.sort||"RANK",filterData:null==re?void 0:re.filter,onClose:()=>ge(!1)})]})}),me=n=>{const{keyword:s,isNotFound:l}=n,c=e(),d=E(),u=r(),p=t(e=>e.expressSearch),h=W.useMemo(()=>o(u.keyword,u.originalSearchYn),[u]),g=W.useMemo(()=>{var e;return null==(e=p.result)?void 0:e[h]},[p,h]),m=W.useMemo(()=>p.pending,[p]),{popularKeyword:y}=N(),v=W.useMemo(()=>null==y?void 0:y.popularList,[y]),f=W.useMemo(()=>{var e,r;if("Y"!==(null==u?void 0:u.originalSearchYn))return null==(r=null==(e=null==g?void 0:g.data)?void 0:e.search)?void 0:r.changeKeyword},[g,null==u?void 0:u.originalSearchYn]),S=W.useCallback((e,r)=>{d("/express/search?"+R.stringify({keyword:e,entry:r}),{replace:!0}),c.common.SET_SEARCH_KEYWORD({searchKeyword:u.keyword}),c.common.SEARCH_KEY({searchKey:u.keyword})}
1,[c.common,d,u.keyword]),w=W.useCallback(e=>e?"".concat(e.substring(0,4),".").concat(e.substring(4,6),".").concat(e.substring(6,8)," ").concat(e.substring(8,10),"ì 기ì¤"):"",[]),b=W.useMemo(()=>{var e;return"Y"===(null==(e=null==g?void 0:g.data)?void 0:e.stopWord)},[g]);return i(W.Fragment,{children:m?i(W.Fragment,{}):a(W.Fragment,{children:[f&&i(ce,{title:"ëì²´ ê²ìê²°ê³¼ ìë´",message:a(W.Fragment,{children:[a("p",{children:["'",i("strong",{children:f}),"'(ì¼)ë¡ ê²ìí ê²°ê³¼ì
ëë¤."]}),a("button",{onClick:()=>{d({...location,search:R.stringify({keyword:s,originalSearchYn:"Y"},pe)},{replace:!0})},className:"originalSearch",children:[s," ê²ì결과보기"]})]})}),l&&[i(ce,{title:"ê²ìê²°ê³¼ ìë´",message:a("p",b?{children:["'",i("strong",{children:s}),"' ê²ìê²°ê³¼ë ì ê³µíì§ ìê³ ììµëë¤."]}:{children:[a("span",{children:["'",i("strong",{children:s}),"'"]})," ",!1,"ê²ìê²°ê³¼ê° ììµëë¤.",i("span",{children:"ê²ìì´ë¥¼ ë¤ì í ë² íì¸ í ê²ìí´ì£¼ì¸ì."})]}),style:{borderBottom:"8px solid #f6f6f6"}},"searchResultMessage"),i("section",{className:"searchResultContainer",css:Y,children:a("article",{className:"searchArea searchPopular",children:[i("h1",{children:"ì¸ê¸° ê²ìì´"}),i("ol",{className:"popularList",children:v&&v.map((e,r)=>i("li",{children:a("button",{type:"button",onClick:()=>S(e.keyword,"popular"),children:[i("strong",{className:"express",children:r+1})," ",e.keyword]})},r))}),i("span",{className:"etc date",children:w(null==y?void 0:y.makeDt)})]})},"searchResultContainer")]]})})},ye=n=>{var s;const{keyword:l,setIsOpenWingFilter:c,setIsOpenSortPopup:d,openBenefitPopupFilter:u,isOpenSortPopup:p,isOpenBenefitPopupFilter:h}=n,g=r(),y=e(),S=W.useRef(null),{isMobile:w,isDesktop:b}=m(),[x]=v(),C=!!x.get("page"),k=W.useMemo(()=>o(g.keyword,g.originalSearchYn),[g]),L=t(e=>e.expressSearch),M=W.useMemo(()=>{var e;return null==(e=L.result)?void 0:e[k]},[L,k]),P=W.useMemo(()=>(null==M?void 0:M.page)||0,[M]),E=W.useMemo(()=>{var e;return(null==(e=null==M?void 0:M.data)?void 0:e.totalCount)||0},[M]),{displayedFilters:N,filters:R,selectFilterItem:Y}=T(null==M?void 0:M.filter),j={setHide:d,dataSet:(null!=(s=null==R?void 0:R.sortList)?s:[]).map(e=>{var r;return{...e,onClick:r=>{var t;const o={action:"checked",group:"sort",groupName:"sort",value:e};Y("sort",[null!=(t=null==e?void 0:e.code)?t:""],o),d(!1)},title:null!=(r=e.name)?r:""}}),pos:{top:10,right:-8}},A=W.useMemo(()=>{const e={sort:g.sort||"RANK",originalSearchYn:g.originalSearchYn||"N",categoryDepth:(()=>{const e=Number(g.categoryDepth);return 1===e||2===e||3===e?e:void 0})(),categoryId:Number(g.categoryId)||void 0,addSubCategoryYn:g.addSubCategoryYn,attribute:g.attribute,brand:g.brand,benefit:g.benefit,delivery:g.delivery,minPrice:Number(g.minPrice)||void 0,maxPrice:Number(g.maxPrice)||void 0,reKeyword:g.reKeyword,review:g.review,inputKeyword:g.inputKeyword||g.keyword,searchKeyword:g.searchKeyword||g.keyword};return S.current&&f(S.current,e)?S.current:(S.current=e,e)},[g]),{displayedViewType:B,nextViewType:_,changeViewType:H}=q({isLocalStorage:!0}),X=W.useMemo(()=>{var e;return(null==(e=null==M?void 0:M.data)?void 0:e.dataList)||[]},[M]),$=W.useCallback(()=>{X.length>=E||y.expressSearch.searchMore()},[P,X,E]),{page:oe,totalPage:ie}=(null==M?void 0:M.data)||{page:1,totalPage:0},ae=X.length>0,se=W.useMemo(()=>({itemListName:"ìµì¤íë ì¤ê²ìê²°ê³¼"}),[]),le=W.useMemo(()=>({showEmblem:!0,showEventFlag:!0,showRecommend:!0,showCrossout:!0,showDcRate:!0,showUnitPrice:!0,showEventItemsButton:!0,showDeliveryFlag:!0,showRating:!0}),[]);return a(W.Fragment,{children:[w&&a(re,{stickyTop:I,from:"express",children:[i(Q,{filterData:null==M?void 0:M.filter,isOpenBenefit:h,onOpenBenefit:u,from:"expressSearch"}),i(Z,{count:N.length,onClick:()=>c(!0)})]},"search filter"),i(z,{filterData:null==M?void 0:M.filter,from:"expressSearch"},"selected filters"),a(V,{children:[i(te,{count:E,searchKeyword:l}),i(G,{value:A.sort||"RANK",onMouseDown:e=>{e.stopPropagation(),d(!p)},children:b&&p&&i(K,{...j})}),i(ee,{prev:B,next:_,onClick:H})]},"utils"),C?ae&&a(W.Fragment,{children:[i(D,{dataList:X,displayType:B,...se,...le}),i(U,{page:oe||0,totalPage:ie||0})]}):ae?a(W.Fragment,{children:[i("h2",{css:F,children:"매ì§ëì°"}),i(O,{dataLength:(null==X?void 0:X.length)||0,next:$,hasMore:X.length<E,loader:i(J,{isFetching:L.pending,fetchNextPage:$,page:P}),style:{overflowY:"hidden",paddingBottom:"40px"},children:i(D,{dataList:X,displayType:B,...se,...le})})]}):i(ne,{children:a("p",{children:["ì íí íí°ì ëí ê²ì ê²°ê
1³¼ê° ììµëë¤.",i("br",{}),"ë¤ë¥¸ íí°ë¥¼ ì íí´ë³´ì¸ì."]})})]})},ve={name:"1dbk6xh",styles:"position:sticky;top:var(--app-banner-height, 0px);height:50px;z-index:3200;overflow:hidden;-webkit-overflow-scrolling:touch;-webkit-backface-visibility:hidden"};export{ge as default};
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.