1import{C as N}from"./5vnSYvES.js";import{_ as Q,h as $,aF as x}from"./CEhJ1apW.js";import{af as z,$ as o,I as r,a2 as a,O as A,a3 as c,a4 as E,B as u,a5 as m,N as O,ad as V,an as q,ac as L,ae as g,ab as k,p as v}from"./BJhQhrjU.js";import{t as U,q as l}from"./Cy_crsZq.js";import{u as j}from"./DU0Ua6vB.js";import{n as H}from"./Dvzpxjdy.js";import"./5AY1y8Ax.js";import"./Cls4L_nr.js";import"./CEm3BxBr.js";import"./DqTQD2UP.js";const M={class:"product-pic"},R={class:"product-overlay"},G={class:"overlay-desc text-ellipsis-3"},J={key:0,class:"overlay-price"},K={key:1,class:"overlay-tags"},W={class:"product-footer"},X={class:"product-name"},Y={key:0,class:"product-views"},Z={key:0,class:"sale-state"},_={class:"checkbox-label"},ee={__name:"ProductItem",props:{item:{type:Object,default:()=>({})},showCompare:{type:Boolean,default:!1}},emits:["toProductDetail","addCompare","collection"],setup(e,{emit:h}){const b=e,y=h,{t:C}=$(),S=x(),w={down:2},F=v(()=>j()),D=s=>H(s),p=v(()=>{var t;return(((t=b.item)==null?void 0:t.attribute)||[]).filter(i=>i==null?void 0:i.name).slice(0,3)}),f={[l.new]:{bg:"#28C8A6",key:"productSummary_newQr"},[l.hot]:{bg:"#FD7630",key:"productSummary_hotQr"},[l.seckill]:{bg:"#FF3764",key:"productSummary_seckillQr"},[l.specialOffer]:{bg:"#FF3764",key:"productSummary_specialOfferQr"},[l.plummet]:{bg:"#FF3764",key:"productSummary_plummetQr"},[l.hot2]:{bg:"#FD7630",key:"productSummary_hot2Qr"}},B=s=>{var t;return((t=f[s])==null?void 0:t.bg)||""},P=s=>{const t=f[s];return t?C(t.key):""},T=s=>{y("toProductDetail",s);const{id:t,aggType:i,name:d}=s,n=U({id:t,type:i,name:d});S.push(n)},I=s=>
1{y("addCompare",s)};return(s,t)=>{const i=N,d=z("sanitize");return o(),r("div",{class:"product-item",onClick:t[2]||(t[2]=n=>T(e.item))},[a("div",M,[A(i,{src:e.item.coverUrl||"",alt:e.item.name,"oss-w":300,"oss-h":300,fit:"cover"},null,8,["src","alt"]),a("div",R,[a("div",G,c(e.item.description),1),e.item.referPrice?(o(),r("div",J,[E(c(s.$t("productSummary_guidePrice"))+" ",1),a("span",null,c(u(F))+c(e.item.referPrice),1)])):m("",!0),u(p).length?(o(),r("div",K,[(o(!0),r(O,null,V(u(p),n=>(o(),r("div",{key:n.id,class:"tag-item"},c(n.name),1))),128))])):m("",!0)])]),a("div",W,[q(a("span",X,null,512),[[d,{html:e.item.name}]]),e.item.pv?(o(),r("span",Y,[t[3]||(t[3]=a("i",{class:"iconfont eye-icon"},"î¡»",-1)),a("span",null,c(D(e.item.pv)),1)])):m("",!0)]),e.item.saleState===w.down?(o(),r("div",Z,c(s.$t("productSummary_saleDown")),1)):m("",!0),e.item.tag?(o(),r("div",{key:1,class:"tag-state",style:L({backgroundColor:B(e.item.tag)})},c(P(e.item.tag)),5)):m("",!0),e.item.paramsConf&&e.showCompare?(o(),r("span",{key:2,class:k(["compare-check",{checked:!!e.item.checked}]),onClick:t[1]||(t[1]=g(()=>{},["stop"]))},[a("label",{class:"custom-checkbox",onClick:t[0]||(t[0]=g(n=>I(e.item),["prevent"]))},[a("span",{class:k(["checkbox-inner",{active:e.item.checked}])},null,2),a("span",_,c(s.$t("productSummary_compare")),1)])],2)):m("",!0)])}}},de=Q(ee,[["__scopeId","data-v-c6979f8b"]]);export{de 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.