1var zt=r=>{throw TypeError(r)};var at=(r,n,i)=>n.has(r)||zt("Cannot "+i);var h=(r,n,i)=>(at(r,n,"read from private field"),i?i.call(r):n.get(r)),I=(r,n,i)=>n.has(r)?zt("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(r):n.set(r,i),L=(r,n,i,s)=>(at(r,n,"write to private field"),s?s.call(r,i):n.set(r,i),i),P=(r,n,i)=>(at(r,n,"access private method"),i);import{S as Ht,p as ct,q as $t,s as At,u as Tt,t as Ut,v as Gt,r as p,w as Vt,x as Jt,y as Kt,z as Yt,B as Dt,D as Qt,F as Wt,G as Xt,j as t,l as b,H as te,h as ee,g as oe,k as et,I as ne,J as ie,f as dt,m as lt,K as re}from"./reset-CYljzF-Q.js";import{T as pt}from"./tooltip-custom-DsERmvsg.js";function Zt(r,n){return r.filter(i=>!n.includes(i))}function se(r,n,i){const s=r.slice(0);return s[n]=i,s}var T,E,U,G,j,Q,W,X,tt,k,ut,ht,xt,ft,mt,Nt,ae=(Nt=class extends Ht{constructor(n,i,s){super();I(this,k);I(this,T);I(this,E);I(this,U);I(this,G);I(this,j);I(this,Q);I(this,W);I(this,X);I(this,tt,[]);L(this,T,n),L(this,G,s),L(this,U,[]),L(this,j,[]),L(this,E,[]),this.setQueries(i)}onSubscribe(){this.listeners.size===1&&h(this,j).forEach(n=>{n.subscribe(i=>{P(this,k,ft).call(this,n,i)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,h(this,j).forEach(n=>{n.destroy()})}setQueries(n,i){L(this,U,n),L(this,G,i),ct.batch(()=>{const s=h(this,j),c=P(this,k,xt).call(this,h(this,U));L(this,tt,c),c.forEach(y=>y.observer.setOptions(y.defaultedQueryOptions));const a=c.map(y=>y.observer),w=a.map(y=>y.getCurrentResult()),m=a.some((y,g)=>y!==s[g]);s.length===a.length&&!m||(L(this,j,a),L(this,E,w),this.hasListeners()&&(Zt(s,a).forEach(y=>{y.destroy()}),Zt(a,s).forEach(y=>{y.subscribe(g=>{P(this,k,ft).call(this,y,g)})}),P(this,k,mt).call(this)))})}getCurrentResult(){return h(this,E)}getQueries(){return h(this,j).map(n=>n.getCurrentQuery())}getObservers(){return h(this,j)}getOptimisticResult(n,i){const s=P(this,k,xt).call(this,n),c=s.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions));return[c,a=>P(this,k,ht).call(this,a??c,i),()=>P(this,k,ut).call(this,c,s)]}},T=new WeakMap,E=new WeakMap,U=new WeakMap,G=new WeakMap,j=new WeakMap,Q=new WeakMap,W=new WeakMap,X=new WeakMap,tt=new WeakMap,k=new WeakSet,ut=function(n,i){return i.map((s,c)=>{const a=n[c];return s.defaultedQueryOptions.notifyOnChangeProps?a:s.observer.trackResult(a,w=>{i.forEach(m=>{m.observer.trackProp(w)})})})},ht=function(n,i){return i?((!h(this,Q)||h(this,E)!==h(this,X)||i!==h(this,W))&&(L(this,W,i),L(this,X,h(this,E)),L(this,Q,$t(h(this,Q),i(n)))),h(this,Q)):n},xt=function(n){const i=new Map(h(this,j).map(c=>[c.options.queryHash,c])),s=[];return n.forEach(c=>{const a=h(this,T).defaultQueryOptions(c),w=i.get(a.queryHash);w?s.push({defaultedQueryOptions:a,observer:w}):s.push({defaultedQueryOptions:a,observer:new At(h(this,T),a)})}),s},ft=function(n,i){const s=h(this,j).indexOf(n);s!==-1&&(L(this,E,se(h(this,E),s,i)),P(this,k,mt).call(this))},mt=function(){var n;if(this.hasListeners()){const i=h(this,Q),s=P(this,k,ut).call(this,h(this,E),h(this,tt)),c=P(this,k,ht).call(this,s,(n=h(this,G))==null?void 0:n.combine);i!==c&&ct.batch(()=>{this.listeners.forEach(a=>{a(h(this,E))})})}},Nt);function de({queries:r,...n},i){const s=Tt(),c=Ut(),a=Gt(),w=p.useMemo(()=>r.map(v=>{const z=s.defaultQueryOptions(v);return z._optimisticResults=c?"isRestoring":"optimistic",z}),[r,s,c]);w.forEach(v=>{Vt(v),Jt(v,a)}),Kt(a);const[m]=p.useState(()=>new ae(s,w,n)),[y,g,Z]=m.getOptimisticResult(w,n.combine),q=!c&&n.subscribed!==!1;p.useSyncExternalStore(p.useCallback(v=>q?m.subscribe(ct.batchCalls(v)):Yt,[m,q]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),p.useEffect(()=>{m.setQueries(w,n)},[w,n,m]);const N=y.some((v,z)=>Dt(w[z],v))?y.flatMap((v,z)=>{const _=w[z];if(_){const S=new At(s,_);if(Dt(_,v))return Qt(_,S,a);Wt(v,c)&&Qt(_,S,a)}return[]}):[];if(N.length>0)throw Promise.all(N);const H=y.find((v,z)=>{const _=w[z];return _&&Xt({result:v,errorResetBoundary:a,throwOnError:_.throwOnError,query:s.getQueryCache().get(_.queryHash),suspense:_.suspense})});if(H!=null&&H.error)throw H.error;return g(Z())}var le={name:"1k4gcv6",styles:"background-color:rgba(21, 24, 30, 0.1);width:48px;height:4px;border-radius:2px"},pe={name:"eivff4",styles:"display:none"}
1,ce={name:"mvi3it",styles:"display:none;@media (max-width: 768px){display:flex;}"},ue={name:"1m14m7n",styles:"margin:auto 12px 12px"},he={name:"2jvx8k",styles:"margin:auto 0 0"},xe={name:"jdao77",styles:"border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:12px;border-top-right-radius:12px"};const qt=p.forwardRef((r,n)=>{const{initialOpen:i,onClose:s}=r,[c,a]=p.useState(i);return p.useImperativeHandle(n,()=>({openDialog:()=>a(!0),closeDialog:()=>a(!1)})),t("div",{onClick:m=>{m.target===m.currentTarget&&(a(!1),s())},css:b("display:",c?"flex":"none",";justify-content:center;align-items:center;position:fixed;inset:0;background-color:rgba(0, 0, 0, 0.15);z-index:1000;font-family:Pretendard;@media (max-width: 768px){align-items:flex-end;}","")},t("div",{css:b("display:flex;position:relative;padding:0;flex-direction:column;border-radius:16px;background-color:#ffffff;overflow:auto;width:",r.width??"380px",";max-height:calc(100vh - 40px - 40px);@media (max-width: 768px){width:100%;max-height:calc(100vh - 12px - 12px);",r.bottomSheet?xe:null," ",r.bottomSheet?he:ue,";}","")},t("div",{css:b("padding:10px 0 18px;justify-content:center;align-items:center;",r.bottomSheet?ce:pe,";","")},t("div",{css:le})),r.children))}),fe=(r=!1)=>({ct:te.useCallback((i,...s)=>typeof window.LOCALIZE>"u"||typeof window.LOCALIZE[i]>"u"?(console.warn(i,"ì ëí ë²ìì ì°¾ì ì ììµëë¤."),r?"":i):window.LOCALIZE[i].apply(null,s),[])});var me={name:"lj0woo",styles:"cursor:pointer;appearance:none;min-width:64px;height:40px;padding:9px 12px;border:0;color:rgba(75, 81, 91, 1);border-radius:calc(var(--unit-style-button_radius) * 1px);font-size:14px;font-weight:600;text-align:center;background-color:rgba(113, 118, 128, 0.1);@media (max-width: 768px){background-color:initial;flex:1;height:48px;font-size:16px;}"},ge={name:"turngy",styles:"cursor:pointer;appearance:none;min-width:64px;height:40px;padding:9px 12px;border:0;color:rgba(75, 81, 91, 1);border-radius:calc(var(--unit-style-button_radius) * 1px);font-size:14px;font-weight:600;text-align:center;background-color:#FFFFFF;border:1px solid rgba(219, 222, 227, 1);@media (max-width: 768px){display:none;}"},Ce={name:"1tkshmx",styles:"display:flex;justify-content:center;align-items:center;position:absolute;right:0;bottom:0;width:20px;height:20px;background-color:rgba(21, 24, 30, 1);border-radius:4px"},ye={name:"1dfdj57",styles:"width:48px;height:48px;object-fit:cover"},be={name:"61tpm1",styles:"display:flex;position:relative;align-items:center;justify-content:center;width:48px;height:48px;border-radius:8px;overflow:hidden"},we={name:"n7aq2x",styles:"cursor:not-allowed;&:hover [data-tooltip-container]{display:block;}"},ve={name:"1tkshmx",styles:"display:flex;justify-content:center;align-items:center;position:absolute;right:0;bottom:0;width:20px;height:20px;background-color:rgba(21, 24, 30, 1);border-radius:4px"},ke={name:"1dfdj57",styles:"width:48px;height:48px;object-fit:cover"},_e={name:"61tpm1",styles:"display:flex;position:relative;align-items:center;justify-content:center;width:48px;height:48px;border-radius:8px;overflow:hidden"},Le={name:"n7aq2x",styles:"cursor:not-allowed;&:hover [data-tooltip-container]{display:block;}"},Se={name:"6b3khd",styles:".slick-dots{display:flex!important;gap:8px;justify-content:center;margin-top:4px;padding:4px 0;list-style:none;bottom:unset;position:static;}.slick-dots li{margin:0;padding:0;width:auto;height:auto;}.slick-dots li.slick-active div{background-color:rgba(21, 24, 30, 1);}"},Me={name:"du36pa",styles:"width:6px;height:6px;border-radius:100%;background-color:rgba(0, 0, 0, 0.1);cursor:pointer;transition:background-color 0.2s"},Be={name:"1si1nbb",styles:"max-height:calc(100vh - 40px - 40px - 107px - 56px - 16px);@media (max-width: 768px){max-height:calc(100vh - 12px - 12px - 107px - 56px - 16px);}overflow-y:auto;overflow-x:hidden"},Oe={name:"1s2dyow",styles:"font-family:Pretendard;margin:12px 0 0;font-size:14px;font-weight:400;color:#717680;>span{color:var(--unit-style-brand_color);}@media (max-width: 768px){font-size:16px;margin:0 16px;font-weight:700;color:#15181E;}"},Ee={name:"mt1ocb",styles:"position:absolute;top:24px;right:24px;
1cursor:pointer;@media (max-width: 768px){display:none;}"},je={name:"1450ogw",styles:"font-family:Pretendard;font-size:24px;font-weight:700;line-height:32px;margin:0;@media (max-width: 768px){display:none;}"},Fe={name:"1pbno3c",styles:"padding:24px 24px 0;@media (max-width: 768px){padding:0;}"},Re={name:"1grh535",styles:"cursor:pointer;appearance:none;min-width:64px;height:40px;padding:9px 12px;border:0;border-radius:calc(var(--unit-style-button_radius) * 1px);font-size:14px;background-color:#FFFFFF;border:1px solid rgba(219, 222, 227, 1);font-weight:600;text-align:center;@media (max-width: 768px){font-weight:700;flex:1;height:48px;font-size:16px;}"},Ie={name:"1tkshmx",styles:"display:flex;justify-content:center;align-items:center;position:absolute;right:0;bottom:0;width:20px;height:20px;background-color:rgba(21, 24, 30, 1);border-radius:4px"},Pe={name:"1dfdj57",styles:"width:48px;height:48px;object-fit:cover"},ze={name:"61tpm1",styles:"display:flex;position:relative;align-items:center;justify-content:center;width:48px;height:48px;border-radius:8px;overflow:hidden"},De={name:"n7aq2x",styles:"cursor:not-allowed;&:hover [data-tooltip-container]{display:block;}"},Qe={name:"11db2t8",styles:"display:none;font-size:14px;@media (max-width: 768px){display:initial;margin-bottom:12px;}"},Ze={name:"qniw5k",styles:"@media (max-width: 768px){background-color:rgba(248, 249, 251, 1);margin:16px 16px 12px;padding:12px;border-radius:8px;}"},qe={name:"1si1nbb",styles:"max-height:calc(100vh - 40px - 40px - 107px - 56px - 16px);@media (max-width: 768px){max-height:calc(100vh - 12px - 12px - 107px - 56px - 16px);}overflow-y:auto;overflow-x:hidden"},Ne={name:"tivdft",styles:"width:100%;height:8px;position:relative;background-color:rgba(226, 229, 233, 1);border-radius:4px;overflow:hidden"},Ae={name:"ftgnu5",styles:"margin:8px 0;padding:4px 0;display:none;align-items:center;position:relative;overflow:hidden;@media (max-width: 768px){display:flex;margin:0 16px;}"},He={name:"1hu2z8a",styles:"display:none;font-family:Pretendard;margin:12px 0 0;font-size:14px;font-weight:400;color:#717680;>span{color:var(--unit-style-brand_color);}@media (max-width: 768px){display:initial;font-size:16px;margin:0 16px 32px;font-weight:700;color:#15181E;}"},$e={name:"194vyxb",styles:"font-family:Pretendard;margin:12px 0 0;font-size:14px;font-weight:400;color:#717680;>span{color:var(--unit-style-brand_color);}@media (max-width: 768px){display:none;font-size:16px;margin:0 16px 16px;font-weight:700;color:#15181E;}"},Te={name:"tivdft",styles:"width:100%;height:8px;position:relative;background-color:rgba(226, 229, 233, 1);border-radius:4px;overflow:hidden"},Ue={name:"dxyt6",styles:"margin:8px 0;padding:4px 0;display:flex;align-items:center;position:relative;overflow:hidden;@media (max-width: 768px){display:none;}"},Ge={name:"mt1ocb",styles:"position:absolute;top:24px;right:24px;cursor:pointer;@media (max-width: 768px){display:none;}"},Ve={name:"x0up1h",styles:"font-family:Pretendard;font-size:24px;font-weight:700;line-height:32px;margin:0;span{color:var(--unit-style-brand_color);}@media (max-width: 768px){display:none;}"},Je={name:"hpaz2i",styles:"padding:24px 24px 0;@media (max-width: 768px){padding:0 0 16px;}"},Ke={name:"c1r0fr",styles:"color:#FFFFFF;background-color:var(--unit-style-brand_color);border:calc(var(--unit-style-button_border_width) * 1px) solid var(--unit-style-brand_color);:hover:not(:disabled){background-color:var(--unit-style-brand_color);color:#FFFFFF;border:calc(var(--unit-style-button_hover_border_width) * 1px) solid var(--unit-style-brand_color);}"},Ye={name:"jnsago",styles:"color:var(--unit-style-button_sb_font_color);background-color:var(--unit-style-button_sb_background_color);border:calc(var(--unit-style-button_sb_border_width) * 1px) solid var(--unit-style-button_sb_border_color);:hover:not(:disabled){color:var(--unit-style-button_sb_hover_font_color);background-color:var(--unit-style-button_sb_hover_background_color);border:calc(var(--unit-style-button_sb_hover_border_width) * 1px) solid var(--unit-style-button_sb_hover_border_color);}"};const eo=()=>{var Mt,Bt,Ot,Et,jt,Ft,Rt,It,Pt;const r=p.useRef(null),n=p.useRef(null),{ct:i}=fe(),s=ee(),c=oe(),[a,w]=p.useState(()=>{var o,d;const e=(d=(o=window.SITE_SHOP_DETAIL)==null?void 0:o.getCurrentProdNo)==null?void 0:d.call(o);return e?[e]:[]}),[m,y]=p.useState(),[g,Z]=p.useState(),[q,gt]=p.useState([]),[N,H]=p.useState({callback:()=>{}}),{data:v}=et(ne.byId(a[0]??0)),z=(v??[]).length>0,{data:_}=et({...ie.detail(a),enabled:z&&a.length>0,select:e=>e.data.reduce((o,d)=>({...o,[d.idx]:d}),{})}),{data:S,isFetching:Ct,isPlaceholderData:yt}=et({...dt.apply(q),enabled:q.length>0}),ot=p.useMemo(()=>(S??[]).filter(e=>e.applyCondition&&e.applyCondition.freebies.some(o=>o.selectable)),[S]),bt=p.useMemo(()=>(S??[]).filter(e=>e.nextCondition&&e.nextCondition.freebies.some(o=>o.selectable)),[S]),wt=de({queries:(a??[]).map((e,o)=>{var d;return dt.rules(((d=(_??{})[e])==null?void 0:d.code)??(o===0?c:void 0))}),combine:e=>Object.values(e.reduce((o,d)=>d.isSuccess?{...o,...(d.data??[]).reduce((u,C)=>({...u,[C.promotionCode]:C}),{})}:o,{}))}),nt=p.useMemo(()=>(S??[]).filter(e=>!!e.applyCondition&&e.applyCondition.freebies.some(o=>o.selectable)&&e.applyCondition.selectCount===0),[S]),x=p.useMemo(()=>(S??[]).filter(e=>!!e.applyCondition&&e.applyCondition.freebies.some(o=>o.selectable)&&e.applyCondition.selectCount>0),[S]),vt=p.useMemo(()=>q.filter(e=>
1e.prodIdx===a[0]),[q,a]),{data:$,isFetching:kt,isPlaceholderData:_t}=et({...dt.apply(vt),enabled:vt.length>0,select:e=>e.filter(o=>o.nextCondition&&o.nextCondition.freebies.some(d=>d.selectable)).sort((o,d)=>{if(!o.nextCondition||!d.nextCondition)return 0;const u=o.nextCondition.minimumPrice||1/0,C=d.nextCondition.minimumPrice||1/0;return Number.isNaN(u-C)?o.nextCondition.minimumQty-d.nextCondition.minimumQty:u-C})}),V=window.getComputedStyle(window.document.documentElement).getPropertyValue("--unit-style-button_sb_use_set")==="Y",Lt=V?Ye:Ke,J=(x??[]).map(e=>{const o=(g==null?void 0:g[e.applyCondition.promotionBenefitCode??""])??[],d=e.applyCondition.freebies.filter(u=>u.selectable).length;return o.length===Math.min(e.applyCondition.selectCount,d)});p.useEffect(()=>{typeof v>"u"||w(e=>[...e,...v??[]])},[v]),p.useEffect(()=>{(x??[]).length!==0&&y(0)},[x]),p.useEffect(()=>{if(r.current===null)return;const e=o=>{Z({}),H({callback:o.detail.callback}),gt(o.detail.orderItems.map(d=>{var u;return{...d,prodCode:((u=_==null?void 0:_[d.prodIdx])==null?void 0:u.code)??c??"null"}}))};return document.addEventListener("@im/fo-prod-detail-freebie:openDialogSelectFreebie",e),()=>{document.removeEventListener("@im/fo-prod-detail-freebie:openDialogSelectFreebie",e)}},[r.current,_,ot,$]);const f=p.useMemo(()=>($??[]).filter(e=>(bt??[]).find(o=>o.promotionCode===e.promotionCode))[0],[$,bt]),it=typeof ot<"u"&&ot.length===0&&($??[]).length>0&&!!f,St=p.useMemo(()=>!Ct&&!yt&&!kt&&!_t,[Ct,yt,kt,_t]);if(p.useEffect(()=>{if(!(r.current===null||typeof g>"u"||typeof S>"u"||typeof $>"u")&&St)switch(!0){case((x??[]).length>0||it):{r.current.openDialog();break}case(x==null?void 0:x.length)===0:{const e=Object.values((nt??[]).reduce((o,d)=>({...o,[d.applyCondition.promotionBenefitCode]:d.applyCondition.freebies.filter(u=>u.selectable).map(u=>({prodCode:u.prodCode,qty:u.qty,promotionBenefitCode:d.applyCondition.promotionBenefitCode}))}),{})).flat();N.callback(e)}}},[S,x,nt,N,$,it,St]),p.useEffect(()=>{s(!0)},[]),it){const{minimumPrice:e,minimumQty:o,selectCount:d,valueForSatisfy:u}=(f==null?void 0:f.nextCondition)??{},C=(1-(u??0)/((e||o)??1/0))*100,F=Math.min(100,C).toFixed(2);return t(qt,{ref:r,width:"720px",initialOpen:!1,onClose:()=>{},bottomSheet:!0},t("div",{css:Je},t("h6",{css:Ve},((Mt=wt.find(l=>l.promotionCode===f.promotionCode))==null?void 0:Mt.conditionType)==="MINIMUM_PRICE"?t("span",null,`${window.LOCALIZE.getCurrencyFormat(String(u??0))}`):t("span",null,`${new Intl.NumberFormat().format(u??0)}ê°`),"ë§ ë 구매íë©´ ì¬ìíì ë°ì ì ìì´ì"),t("div",{css:Ge,onClick:()=>{var l;return(l=r.current)==null?void 0:l.closeDialog()}},t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12.6673 3.33203L3.33398 12.6654M3.33398 3.33203L12.6673 12.6654",stroke:"#4B515B","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t("div",{css:Ue},t("div",{css:Te},t("div",{css:b("position:absolute;top:0;left:0;width:",F,"%;height:100%;background-color:var(--unit-style-brand_color);transition:width 0.3s ease-in-out;","")}))),t("p",{css:$e},(((Bt=f==null?void 0:f.nextCondition)==null?void 0:Bt.freebies)??[]).length>1?(d??0)>0?`ìë ì¬ìí ì¤ ${d}ê° ì í ì ê³µ`:"ìë ì¬ìí 모ë ì ê³µ":null),t("p",{css:He},((Ot=wt.find(l=>l.promotionCode===f.promotionCode))==null?void 0:Ot.conditionType)==="MINIMUM_PRICE"?t("span",null,`${window.LOCALIZE.getCurrencyFormat(String(u??0))}`):t("span",null,`${new Intl.NumberFormat().format(u??0)}ê°`),"ë§ ë 구매íë©´"," ",t("span",null,"ì¬ìíì ë°ì ì ìì´ì"))),t("div",{css:Ae},t("div",{css:Ne},t("div",{css:b("position:absolute;top:0;left:0;width:",F,"%;height:100%;background-color:var(--unit-style-brand_color);transition:width 0.3s ease-in-out;","")}))),t("div",{css:qe},t("div",{key:f==null?void 0:f.promotionCode,"data-promotion-code":f==null?void 0:f.promotionCode,css:Ze},t("div",{css:Qe},(((Et=f==null?void 0:f.nextCondition)==null?void 0:Et.freebies)??[]).length>1?(d??0)>0?`ì¬ìí ì¤ ${d}ê° ì í ì ê³µ`:"ì¬ìí 모ë ì ê³µ":null),(jt=f==null?void 0:f.nextCondition)==null?void 0:jt.freebies.map(l=>{if(typeof(f==null?void 0:f.nextCondition)>"u")return null;const[M]=l.product.imageUrls,B=l.product.prodStatus==="soldout"||l.product.prodSoldoutStatus==="soldout",O=!l.selectable,D=B||O;return t("div",{key:l.prodCode,css:b("display:flex;min-height:48px;margin:16px 24px;position:relative;gap:12px;align-items:center;",D?De:"","@media (max-width: 768px){margin:12px 0 0;}","")},t("div",{css:ze},t("img",{src:M??lt,alt:l.product.prodName,css:Pe}),t("div",{css:Ie},t("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6.99935 4.08464H4.37435C3.98758 4.08464 3.61664 3.93099 3.34315 3.6575C3.06966 3.38401 2.91602 3.01308 2.91602 2.6263C2.91602 2.23953 3.06966 1.8686 3.34315 1.5951C3.61664 1.32161 3.98758 1.16797 4.37435 1.16797C6.41602 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464H9.62435C10.0111 4.08464 10.3821 3.93099 10.6555 3.6575C10.929 3.38401 11.0827 3.01308 11.0827 2.6263C11.0827 2.23953 10.929 1.8686 10.6555 1.5951C10.3821 1.32161 10.0111 1.16797 9.62435 1.16797C7.58268 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464L6.99935 12.8346M1.16602 8.16797H12.8327M1.16602 5.9513L1.16602 10.968C1.16602 11.6214 1.16602 11.9481 1.29317 12.1976C1.40503 12.4171 1.5835 12.5956 1.80303 12.7075C2.05259 12.8346 2.37929 12.8346 3.03268 12.8346L10.966 12.8346C11.6194 12.8346 11.9461 12.8346 12.1957 12.7075C12.4152 12.5956 12.5937 12.4171 12.7055 12.1976C12.8327 11.9481 12.8327 11.6214 12.8327 10.968V5.9513C12.8327 5.29791 12.8327 4.97121 12.7055 4.72165C12.5937 4.50213 12.4152 4.32365 12.1957 4.2118C11.9461 4.08464 11.6194 4.08464 10.966 4.08464L3.03268 4.08464C2.37929 4.08464 2.05259 4.08464 1.80303 4.21179C1.5835 4.32365 1.40503 4.50212 1.29317 4.72165C1.16602 4.97121 1.16602 5.29791 1.16602 5.9513Z",stroke:"white","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})))),t("div",{css:b("flex:1;font-size:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;",D?"color: var(--semantic-text-disabled );":"",";","")},l.product.prodName,t("p",null,`${l.qty}ê°`)),t(pt,{wrapFor:null,followCursor:!0},l.disableReason||"ì´ ìíì ì íí ì ìì´ì."))}))),t("div",{css:b("display:flex;padding:16px 24px 16px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;background-color:#ffffff;justify-content:flex-end;align-items:center;gap:8px;","",";z-index:1002;@media (max-width: 768px){padding:12px 16px 20px;}","")},t("button",{css:Re,onClick:()=>{var l;window.SITE_SHOP_DETAIL.addCart(),(l=r.current)==null||l.closeDialog()}},"ê³ì ì¼íí기"),t("button",{css:b("cursor:pointer;appearance:none;height:40px;padding:9px 12px;border:0;border-radius:calc(var(--unit-style-button_radius) * 1px);font-size:14px;font-weight:700;text-align:center;",Lt,";@media (max-width: 768px){flex:1;height:48px;font-size:16px;}",""),onClick:()=>{var l;N.callback([]),(l=r.current)==null||l.closeDialog()}},"ë°ë¡ 구매í기")))}return t(qt,{ref:r,width:"720px",initialOpen:!1,onClose:()=>{var e;Z(void 0),(e=n.current)==null||e.slickGoTo(0)},bottomSheet:!0},t("div",{css:Fe},t("h6",{css:je},"ì§ê¸ 구매íë©´ ì¬ìíì ë°ì ì ìì´ì"),t("div",{css:Ee,onClick:()=>{var e;return(e=r.current)==null?void 0:e.closeDialog()}},t("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12.6673 3.33203L3.33398 12.6654M3.33398 3.33203L12.6673 12.6654",stroke:"#4B515B","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t("p",{css:Oe,dangerouslySetInnerHTML:{__html:typeof m=="number"?`ì¬ìí ì¤ ${(Ft=(x??[])[m])==null?void 0:Ft.applyCondition.selectCount}ê°ë¥¼ ì íí´ ì£¼ì¸ì`:""}})),t("div",{css:Be},(x??[]).length>1?t("div",null,t(re,{ref:n,beforeChange:(e,o)=>y(o),dots:!0,dotsClass:"slick-dots",customPaging:()=>t("div",{css:Me}),css:Se},(x??[]).map(e=>e.applyCondition.freebies.length===0?null:t("div",{key:e.promotionCode,"data-promotion-code":e.promotionCode}
1,e.applyCondition.freebies.map(o=>{var l,M;const d=o.product.prodStatus==="soldout"||o.product.prodSoldoutStatus==="soldout",u=!o.selectable,C=d||u,[F]=o.product.imageUrls;return t("div",{key:o.prodCode,css:b("display:flex;min-height:48px;margin:16px 24px;position:relative;gap:12px;align-items:center;",C?Le:"","@media (max-width: 768px){margin:12px 16px;}",""),onClick:()=>{C||Z((B={})=>{var Y;const O=e.applyCondition.promotionBenefitCode,D={prodCode:o.prodCode,qty:o.qty,promotionBenefitCode:O},R=B[O]??[],rt=R.some(A=>A.prodCode===o.prodCode),K=((Y=e.applyCondition)==null?void 0:Y.selectCount)??0,st=K>0;return rt?{...B,[O]:R.filter(A=>A.prodCode!==o.prodCode)}:st&&R.length>=K?{...B,[O]:[...R.slice(1),D]}:{...B,[O]:[...R,D]}})}},t("div",{css:b("cursor:pointer;width:24px;height:24px;padding:1.4px;display:flex;justify-content:center;align-items:center;",C?"cursor: not-allowed;":""," svg{width:100%;height:100%;}@media (max-width: 768px){display:none;}","")},(l=g==null?void 0:g[e.applyCondition.promotionBenefitCode])!=null&&l.some(B=>B.prodCode===o.prodCode)?t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{fill:V?"var(--unit-style-button_sb_background_color)":"var(--unit-style-brand_color)",d:"M11.998 1.39844C17.8521 1.39844 22.5984 6.14401 22.5986 11.998C22.5986 17.8523 17.8523 22.5986 11.998 22.5986C6.14401 22.5984 1.39844 17.8521 1.39844 11.998C1.39865 6.14414 6.14414 1.39865 11.998 1.39844ZM16.9219 8.5752C16.6876 8.34088 16.3085 8.34088 16.0742 8.5752L10.498 14.1514L7.92188 11.5752L7.82812 11.498C7.59524 11.3443 7.27924 11.3702 7.07422 11.5752C6.86959 11.7802 6.84339 12.0964 6.99707 12.3291L7.07422 12.4229L10.0742 15.4229L10.168 15.5C10.4007 15.6537 10.7168 15.6275 10.9219 15.4229L16.9219 9.42285C17.1562 9.18855 17.1561 8.80951 16.9219 8.5752Z"})):t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#BCC0C6","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t("div",{css:_e},t("img",{src:F??lt,alt:o.product.prodName,css:ke}),t("div",{css:ve},t("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6.99935 4.08464H4.37435C3.98758 4.08464 3.61664 3.93099 3.34315 3.6575C3.06966 3.38401 2.91602 3.01308 2.91602 2.6263C2.91602 2.23953 3.06966 1.8686 3.34315 1.5951C3.61664 1.32161 3.98758 1.16797 4.37435 1.16797C6.41602 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464H9.62435C10.0111 4.08464 10.3821 3.93099 10.6555 3.6575C10.929 3.38401 11.0827 3.01308 11.0827 2.6263C11.0827 2.23953 10.929 1.8686 10.6555 1.5951C10.3821 1.32161 10.0111 1.16797 9.62435 1.16797C7.58268 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464L6.99935 12.8346M1.16602 8.16797H12.8327M1.16602 5.9513L1.16602 10.968C1.16602 11.6214 1.16602 11.9481 1.29317 12.1976C1.40503 12.4171 1.5835 12.5956 1.80303 12.7075C2.05259 12.8346 2.37929 12.8346 3.03268 12.8346L10.966 12.8346C11.6194 12.8346 11.9461 12.8346 12.1957 12.7075C12.4152 12.5956 12.5937 12.4171 12.7055 12.1976C12.8327 11.9481 12.8327 11.6214 12.8327 10.968V5.9513C12.8327 5.29791 12.8327 4.97121 12.7055 4.72165C12.5937 4.50213 12.4152 4.32365 12.1957 4.2118C11.9461 4.08464 11.6194 4.08464 10.966 4.08464L3.03268 4.08464C2.37929 4.08464 2.05259 4.08464 1.80303 4.21179C1.5835 4.32365 1.40503 4.50212 1.29317 4.72165C1.16602 4.97121 1.16602 5.29791 1.16602 5.9513Z",stroke:"white","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})))),t("div",{css:b("flex:1;font-size:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;",C?"color: var(--semantic-text-disabled );":"",";","")},o.product.prodName,t("p",null,`${o.qty}ê°`)),t("div",{css:b("cursor:pointer;width:24px;height:24px;padding:1.4px;display:none;justify-content:center;align-items:center;",C?"cursor: not-allowed;":""," svg{width:100%;height:100%;}@media (max-width: 768px){display:flex;}","")},(M=g==null?void 0:g[e.applyCondition.promotionBenefitCode])!=null&&M.some(B=>B.prodCode===o.prodCode)?t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"}
1,t("path",{fill:V?"var(--unit-style-button_sb_background_color)":"var(--unit-style-brand_color)",d:"M11.998 1.39844C17.8521 1.39844 22.5984 6.14401 22.5986 11.998C22.5986 17.8523 17.8523 22.5986 11.998 22.5986C6.14401 22.5984 1.39844 17.8521 1.39844 11.998C1.39865 6.14414 6.14414 1.39865 11.998 1.39844ZM16.9219 8.5752C16.6876 8.34088 16.3085 8.34088 16.0742 8.5752L10.498 14.1514L7.92188 11.5752L7.82812 11.498C7.59524 11.3443 7.27924 11.3702 7.07422 11.5752C6.86959 11.7802 6.84339 12.0964 6.99707 12.3291L7.07422 12.4229L10.0742 15.4229L10.168 15.5C10.4007 15.6537 10.7168 15.6275 10.9219 15.4229L16.9219 9.42285C17.1562 9.18855 17.1561 8.80951 16.9219 8.5752Z"})):t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#BCC0C6","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t(pt,{wrapFor:null,followCursor:!0},C?o.disableReason||"ì´ ìíì ì íí ì ìì´ì.":null))}))))):(x??[]).length===1?t("div",{key:(Rt=(x??[])[0])==null?void 0:Rt.promotionCode,"data-promotion-code":(It=(x??[])[0])==null?void 0:It.promotionCode},(Pt=(x??[])[0])==null?void 0:Pt.applyCondition.freebies.map(e=>{var F,l;const[o]=e.product.imageUrls,d=e.product.prodStatus==="soldout"||e.product.prodSoldoutStatus==="soldout",u=!e.selectable,C=d||u;return t("div",{key:e.prodCode,css:b("display:flex;min-height:48px;margin:16px 24px;gap:12px;position:relative;align-items:center;",C?we:"","@media (max-width: 768px){margin:12px 16px;}",""),onClick:()=>{C||Z((M={})=>{var Y;const B=(x??[])[0],O=B.applyCondition.promotionBenefitCode,D={prodCode:e.prodCode,qty:e.qty,promotionBenefitCode:O},R=M[O]??[],rt=R.some(A=>A.prodCode===e.prodCode),K=((Y=B.applyCondition)==null?void 0:Y.selectCount)??0,st=K>0;return rt?{...M,[O]:R.filter(A=>A.prodCode!==e.prodCode)}:st&&R.length>=K?{...M,[O]:[...R.slice(1),D]}:{...M,[O]:[...R,D]}})}},t("div",{css:b("cursor:pointer;width:24px;height:24px;padding:1.4px;display:flex;justify-content:center;align-items:center;",C?"cursor: not-allowed;":""," svg{width:100%;height:100%;}@media (max-width: 768px){display:none;}","")},(F=g==null?void 0:g[(x??[])[0].applyCondition.promotionBenefitCode])!=null&&F.some(M=>M.prodCode===e.prodCode)?t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{fill:V?"var(--unit-style-button_sb_background_color)":"var(--unit-style-brand_color)",d:"M11.998 1.39844C17.8521 1.39844 22.5984 6.14401 22.5986 11.998C22.5986 17.8523 17.8523 22.5986 11.998 22.5986C6.14401 22.5984 1.39844 17.8521 1.39844 11.998C1.39865 6.14414 6.14414 1.39865 11.998 1.39844ZM16.9219 8.5752C16.6876 8.34088 16.3085 8.34088 16.0742 8.5752L10.498 14.1514L7.92188 11.5752L7.82812 11.498C7.59524 11.3443 7.27924 11.3702 7.07422 11.5752C6.86959 11.7802 6.84339 12.0964 6.99707 12.3291L7.07422 12.4229L10.0742 15.4229L10.168 15.5C10.4007 15.6537 10.7168 15.6275 10.9219 15.4229L16.9219 9.42285C17.1562 9.18855 17.1561 8.80951 16.9219 8.5752Z"})):t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#BCC0C6","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t("div",{css:be},t("img",{src:o??lt,alt:e.product.prodName,css:ye}),t("div",{css:Ce},t("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M6.99935 4.08464H4.37435C3.98758 4.08464 3.61664 3.93099 3.34315 3.6575C3.06966 3.38401 2.91602 3.01308 2.91602 2.6263C2.91602 2.23953 3.06966 1.8686 3.34315 1.5951C3.61664 1.32161 3.98758 1.16797 4.37435 1.16797C6.41602 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464H9.62435C10.0111 4.08464 10.3821 3.93099 10.6555 3.6575C10.929 3.38401 11.0827 3.01308 11.0827 2.6263C11.0827 2.23953 10.929 1.8686 10.6555 1.5951C10.3821 1.32161 10.0111 1.16797 9.62435 1.16797C7.58268 1.16797 6.99935 4.08464 6.99935 4.08464ZM6.99935 4.08464L6.99935 12.8346M1.16602 8.16797H12.8327M1.16602 5.9513L1.16602 10.968C1.16602 11.6214 1.16602 11.9481 1.29317 12.1976C1.40503 12.4171 1.5835 12.5956 1.80303 12.7075C2.05259 12.8346 2.37929 12.8346 3.03268 12.8346L10.966 12.8346C11.6194 12.8346 11.9461 12.8346 12.1957 12.7075C12.4152 12.5956 12.5937 12.4171 12.7055 12.1976C12.8327 11.9481 12.8327 11.6214 12.8327 10.968V5.9513C12.8327 5.29791 12.8327 4.97121 12.7055 4.72165C12.5937 4.50213 12.4152 4.32365 12.1957 4.2118C11.9461 4.08464 11.6194 4.08464 10.966 4.08464L3.03268 4.08464C2.37929 4.08464 2.05259 4.08464 1.80303 4.21179C1.5835 4.32365 1.40503 4.50212 1.29317 4.72165C1.16602 4.97121 1.16602 5.29791 1.16602 5.9513Z",stroke:"white","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})))),t("div",{css:b("flex:1;font-size:14px;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;",C?"color: var(--semantic-text-disabled );":"",";","")},e.product.prodName,t("p",null,`${e.qty}ê°`)),t("div",{css:b("cursor:pointer;width:24px;height:24px;padding:1.4px;display:none;justify-content:center;align-items:center;
1",C?"cursor: not-allowed;":""," svg{width:100%;height:100%;}@media (max-width: 768px){display:flex;}","")},(l=g==null?void 0:g[(x??[])[0].applyCondition.promotionBenefitCode])!=null&&l.some(M=>M.prodCode===e.prodCode)?t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{fill:V?"var(--unit-style-button_sb_background_color)":"var(--unit-style-brand_color)",d:"M11.998 1.39844C17.8521 1.39844 22.5984 6.14401 22.5986 11.998C22.5986 17.8523 17.8523 22.5986 11.998 22.5986C6.14401 22.5984 1.39844 17.8521 1.39844 11.998C1.39865 6.14414 6.14414 1.39865 11.998 1.39844ZM16.9219 8.5752C16.6876 8.34088 16.3085 8.34088 16.0742 8.5752L10.498 14.1514L7.92188 11.5752L7.82812 11.498C7.59524 11.3443 7.27924 11.3702 7.07422 11.5752C6.86959 11.7802 6.84339 12.0964 6.99707 12.3291L7.07422 12.4229L10.0742 15.4229L10.168 15.5C10.4007 15.6537 10.7168 15.6275 10.9219 15.4229L16.9219 9.42285C17.1562 9.18855 17.1561 8.80951 16.9219 8.5752Z"})):t("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t("path",{d:"M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",stroke:"#BCC0C6","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}))),t(pt,{followCursor:!0,wrapFor:null},C?e.disableReason||"ì´ ìíì ì íí ì ìì´ì.":null))})):null),t("div",{css:b("display:flex;padding:16px 24px 16px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;background-color:#ffffff;justify-content:flex-end;align-items:center;gap:8px;","",";z-index:1002;@media (max-width: 768px){padding:12px 16px 20px;}","")},t("button",{css:ge,onClick:()=>{var e,o;(e=n.current)==null||e.slickGoTo(0),(o=r.current)==null||o.closeDialog()}},i("ë²í¼_ì·¨ì")),(m??-1)>0?t("button",{css:me,onClick:()=>{var e;(e=n.current)==null||e.slickPrev()}},i("ë²í¼_ì´ì ")):null,t("button",{disabled:!J[m??-1],css:b("cursor:pointer;appearance:none;height:40px;padding:9px 12px;border-radius:calc(var(--unit-style-button_radius) * 1px);font-size:14px;font-weight:700;text-align:center;",Lt,";border:0;:disabled{border:0;background-color:rgba(219, 222, 227, 1);color:rgba(21, 24, 30, 0.5);cursor:not-allowed;}:hover{border:0;}@media (max-width: 768px){flex:1;height:48px;font-size:16px;}",""),onClick:()=>{var e,o,d;if(J.every(Boolean)&&J.length-1===m){const u=Object.values((nt??[]).reduce((C,F)=>({...C,[F.applyCondition.promotionBenefitCode]:F.applyCondition.freebies.filter(l=>l.selectable).map(l=>({prodCode:l.prodCode,qty:l.qty,promotionBenefitCode:F.applyCondition.promotionBenefitCode}))}),g??{})).flat();Z(void 0),N.callback(u),(e=n.current)==null||e.slickGoTo(0),(o=r.current)==null||o.closeDialog();return}J[m??-1]&&((d=n.current)==null||d.slickNext())}},((x==null?void 0:x.length)??0)>1?J.length-1===m?"ì¬ìí ì í ìë£":`ë¤ì(${(m??-1)+1}/${(x==null?void 0:x.length)??0})`:"ì¬ìí ì í ìë£")))};export{eo as DialogSelectFreebie};
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.