1import{B as R,i as z,b as O,a0 as j,s as V,a as G,E as q,d as U,ar as Y,f as J,bG as K,A as k,q as Q,x as X}from"./1790860044-DxlI33Wu.js";import{h as Z,u as P,L as I,a as F,_ as H,S as A}from"./1790860044-BEUbWBLn.js";import{F as w,_ as s,a6 as C,aa as tt,a2 as et,H as o,a7 as f,a8 as r,a9 as n,am as ot,af as b,ai as c,f as g,i as nt,as as at,M as p,ao as st,at as M,ad as L,a4 as W,ac as D,ah as it,a5 as ct,a0 as N,I as lt}from"./1790860044-Y33Dst8O.js";import rt from"./1790860044-BHzfn_Lj.js";import{_ as dt}from"./1790860044-BWpDZtxq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"0a80434845740dea0ce96d25c78aab9af64c58f7"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="bc96a2e8-5ed0-4e2c-8858-2923f9b09c6c",t._sentryDebugIdIdentifier="sentry-dbid-bc96a2e8-5ed0-4e2c-8858-2923f9b09c6c")}catch{}})();const ut=["aria-label"],mt={class:"max-w-[300px] text-center text-sm"},pt=w({__name:"LabelIconTooltip",props:{label:{}},setup(t){const e=t,l=g(()=>({backgroundColor:e.label.color,color:e.label.textColor}));return(i,u)=>{const m=z,x=R;return s(),C(tt(t.label.href?"a":"div"),et(t.label.href?{href:t.label.href}:{},{class:{"cursor-pointer":t.label.href},onClick:u[0]||(u[0]=d=>o(Z)(d,t.label.href))}),{default:f(()=>[r(x,{placement:"top","text-color":t.label.textColor,"background-color":t.label.color},{content:f(()=>[n("div",mt,c(t.label.text||t.label.tooltip),1)]),default:f(()=>[n("button",{type:"button",class:"flex items-center justify-center w-8 h-8 rounded-full shadow-sm transition-opacity hover:opacity-90",style:ot(o(l)),"aria-label":t.label.text||t.label.name},[t.label.icon?(s(),C(m,{key:0,src:t.label.icon,class:"w-4 h-4 object-contain",alt:""},null,8,["src"])):b("",!0)],12,ut)]),_:1},8,["text-color","background-color"])]),_:1},16,["class"])}}}),gt=Object.assign(pt,{__name:"MarketLabelIconTooltip"}),xt=w({__name:"Wishlist",props:{isOnWishlist:{type:Boolean}},emits:["add-to-wishlist","remove-from-wishlist"],setup(t,{emit:e}){const{t:l}=O(),i=t,u=e,{handleWishlistAction:m}=j(),{isPendingList:x}=V(j()),{isLoggedIn:d}
1=V(G()),a=nt("product"),{ModalComponent:h,openModal:y}=q("LazyMarketLoginModal",{loginSuccessCallback:m.bind(null,"POST",a),title:l("am.loginWishlist"),isHeaderAndFooterVisible:!0}),v=g(()=>x.value.includes(a.sku)),B={residualPercentage:a.residualPercentage??0,residualValueNet:a?.residualValueNet};async function S(){d.value?(await m(i.isOnWishlist?"DELETE":"POST",a,B),i.isOnWishlist?u("remove-from-wishlist"):u("add-to-wishlist")):y()}return(E,_)=>{const $=U,T=at("loading");return s(),p("div",null,[st(r($,{variant:"secondary-round",size:"small",class:L({"bg-pko-turquoise-500":t.isOnWishlist}),classes:{button:"border-0 hover:shadow-productCard",icon:t.isOnWishlist?"text-sm text-pko-white":"text-sm text-pko-turquoise-500"},icon:"health/heart-line",onClick:M(S,["stop","prevent"])},null,8,["class","classes"]),[[T,o(v)]]),r(o(h))])}}}),ft=Object.assign(xt,{__name:"MarketWishlist"}),ht=Y("/images/placeholder.png"),bt={class:"relative"},yt={key:0,class:"absolute top-[0.7rem] left-4 flex flex-col gap-y-[10px] z-20"},vt={key:0,class:"absolute top-0 left-0 z-20 flex flex-col items-center justify-center w-full h-full gap-5 text-lg font-semibold pointer-events-none bg-white/85"},wt={key:1,class:"h-[210px] object-cover w-full",src:ht},kt=w({__name:"ProductCardImage",props:{product:{},isOnWishlist:{type:Boolean},to:{},preconnect:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const l=t,i=e,{getLabelsForSection:u}=P(),m=g(()=>l.product),x=g(()=>u({product:m.value,context:{component:F.PRODUCT_TILE,section:I.IMAGE},promo:l.product.promo}));return(d,a)=>{const h=gt,y=ft,v=J,B=U,S=z,E=rt;return s(),p("div",bt,[o(x).length?(s(),p("div",yt,[(s(!0),p(W,null,D(o(x),_=>(s(),C(h,{key:_.code,label:_},null,8,["label"]))),128))])):b("",!0),r(v,null,{default:f(()=>[r(y,{class:"!absolute top-[0.7rem] right-4 z-20","is-on-wishlist":t.isOnWishlist,sku:t.product.sku},null,8,["is-on-wishlist","sku"])]),_:1}),r(o(K),null,{default:f(({isOutside:_})=>[t.product.image.list.length?(s(),C(E,{key:0,items:t.product.image.list,"show-indicators":"",loop:"","show-arrows":t.product.image.list.length>1,"arrow-class":"rounded-full bg-pko-grey-550 text-[26px]","arrow-button-class":[{"md:hidden":_,"!opacity-30 w-[26px] !z-[11]":!0}],"indicators-class":[{"md:hidden !z-[11]":_,"!z-[11]":!0}],"button-next-class":"right-[11px]","button-prev-class":"left-[11px]","active-indicator-class":"w-[11px] h-[11px] md:w-[11px] md:h-[11px] lg:w-[11px] lg:h-[11px] bg-pko-green-300","inactive-indicator-class":"w-[11px] h-[11px] md:w-[11px] md:h-[11px] lg:w-[11px] lg:h-[11px] bg-pko-grey-500","display-single-indicators":!1,"item-class":"h-[210px] object-cover w-full rounded-t-xl",onClick:a[2]||(a[2]=M(()=>{},["stop","prevent"]))},{item:f(({item:$})=>[n("div",{class:"relative",onClick:a[1]||(a[1]=T=>i("select"))},[t.product.image.list.length>1&&$.index===t.product.image.list.length-1?(s(),p("div",vt,[n("span",null,c(d.$t("am.productCard.seeMore")),1),r(B,{to:t.to,size:"small","append-icon":"automarket/chevron-right",class:"pointer-events-auto",onClick:a[0]||(a[0]=M(T=>i("select"),["stop"]))},{default:f(()=>[it(c(d.$t("am.productCard.checkOffer")),1)]),_:1},8,["to"])])):b("",!0),r(S,{src:$.src,"image-width":372,"image-height":210,alt:t.product.image.name,loading:t.preconnect?void 0:"lazy",fetchpriority:t.preconnect?"high":void 0,preset:t.product.imagePreset,class:"h-[210px] object-cover w-full",sources:[{media:"(max-width: 399px)",imageWidth:365,imageHeight:210},{media:"(max-width: 479px)",imageWidth:445,imageHeight:210},{media:"(max-width: 575px)",imageWidth:541,imageHeight:210,extension:"webp"}
1,{media:"(max-width: 767px)",imageWidth:733,imageHeight:210,extension:"webp"}]},null,8,["src","alt","loading","fetchpriority","preset"])])]),_:1},8,["items","show-arrows","arrow-button-class","indicators-class"])):(s(),p("img",wt))]),_:1})])}}}),_t=Object.assign(kt,{__name:"MarketProductCardImage"}),Ct={key:0,class:"flex pt-2.5 pb-2 justify-end gap-1 md:gap-3 flex-wrap min-h-[42px]"},Bt=w({__name:"TopBarBadges",props:{product:{}},setup(t){const e=t,{getLabelsForSection:l}=P(),i=g(()=>{const{promotionFlag:a,discount:h,omnibus:y}=e.product;return a?.discountLabel&&h?.value&&y?.period?h.value*y.period:0}),u=g(()=>i.value>0?k.formatDecimal(i.value):null),m=g(()=>({...e.product,isOmnibus:u.value!==null?1:0,isLeasingBadge:e.product.leasingBadge?1:0})),x=g(()=>({[A.SAVINGS]:u.value,[A.LEASING_SUBSIDY]:e.product.leasingBadge})),d=g(()=>l({product:m.value,context:{component:F.PRODUCT_TILE,section:I.HEADER},computedValues:x.value,promo:e.product.promo}));return(a,h)=>{const y=H;return o(d).length?(s(),p("div",Ct,[(s(!0),p(W,null,D(o(d),v=>(s(),C(y,{key:v.code,label:v},null,8,["label"]))),128))])):b("",!0)}}}),Lt=Object.assign(Bt,{__name:"MarketProductCardTopBarBadges"}),$t={key:0,class:"flex flex-wrap gap-1 md:gap-3"},St=w({__name:"BottomBarBadges",props:{product:{}},setup(t){const e=t,{getLabelsForSection:l}=P(),i=g(()=>e.product),u=g(()=>l({product:i.value,context:{component:F.PRODUCT_TILE,section:I.DESCRIPTION},promo:e.product.promo}));return(m,x)=>{const d=H;return o(u).length?(s(),p("div",$t,[(s(!0),p(W,null,D(o(u),a=>(s(),C(d,{key:a.code,label:a},null,8,["label"]))),128))])):b("",!0)}}}),Tt=Object.assign(St,{__name:"MarketProductCardBottomBarBadges"}),Mt={class:"flex flex-col pb-3 px-5 shrink-0"},Ot={class:"flex flex-col text-pko-secondary border-t border-pko-grey-300 first:mt-[42px] pt-1"},Pt=["title"],It=["title"],Ft=["title"],Wt=w({__name:"Details",props:{name:{},year:{},description:{},isNew:{type:Boolean},mileageWithSuffix:{},mileage:{},gearboxType:{},fuelType:{},promo:{},locationCity:{},locationRegion:{},savingsAmount:{},period:{}},setup(t){const{t:e}=O(),l=ct(),i=t,u=g(()=>i.mileage===0?e("am.carVehicleState.new"):i.mileageWithSuffix),m=g(()=>i.gearboxType.charAt(0).toUpperCase()),x=g(()=>`${i.locationCity} (${i.locationRegion})`);return(d,a)=>{const h=dt;return s(),p("div",Mt,[o(l).topBadges?N(d.$slots,"topBadges",{key:0}):b("",!0),n("div",Ot,[n("h4",{class:"text-xl font-semibold truncate whitespace-nowrap",title:t.name},c(t.name),9,Pt),n("span",{class:"max-w-full mt-1 text-sm break-words text-pko-grey-800 line-clamp-1",title:t.description},c(t.description),9,It)]),r(h,{"gearbox-type":o(m),"fuel-type":t.fuelType,year:t.year,"mileage-with-suffix":o(u)},null,8,["gearbox-type","fuel-type","year","mileage-with-suffix"]),o(l).bottomBadges?N(d.$slots,"bottomBadges",{key:1}):b("",!0),n("span",{class:"text-xs mt-1 text-pko-grey-800 line-clamp-1",title:o(x)},c(o(x)),9,Ft)])}}}),Dt=Object.assign(Wt,{__name:"MarketProductCardDetails"}),Et={key:0,class:"flex flex-col px-5 shrink-0 text-pko-grey-800"},jt={class:"text-xs"},Vt={class:"text-2xl"},At={class:"ml-1 text-xs"},Nt={key:0,class:"bg-pko-lemon-green-500 text-xs leading-[14px] rounded-md text-white py-[2px] px-2"},Rt={class:"flex items-center gap-x-1"},zt={class:"text-[11px] min-[370px]:text-xs leading-4"},Ut={class:"max-w-[300px] text-center"},Ht={key:0,class:"text-[11px] flex items-center gap-x-0.5 md:text-xs mt-1.5"},Gt={class:"line-through"},qt={class:"max-w-[300px] text-center"},Yt={key:1,class:"flex flex-col px-5 shrink-0 text-pko-grey-800"},Jt={class:"text-xs"},Kt={class:"font-semibold text-pko-secondary"},Qt={class:"text-2xl"},Xt={class:"ml-1 text-xs"},Zt={class:"flex items-center gap-x-1"},te={class:"text-[11px] min-[370px]:text-xs leading-4"},ee={class:"max-w-[300px] text-center"},oe=w({__name:"Offer",props:{promo:{},discount:{},price:{},omnibus:{},isCompany:{type:Boolean},isBuyFinancing:{type:Boolean},isRentalFinancing:{type:Boolean},isLoanFinancing:{type:Boolean},isLeasingFinancing:{type:Boolean},carValue:{},variantInfo:{},isForWishlist:{type:Boolean},promotionFlag:{}},setup(t){const{t:e}=O(),l=t,i=g(()=>l.isRentalFinancing?e("am.productCard.rental.tooltip"):l.isLoanFinancing?e("am.productCard.loan.tooltip"):l.isLeasingFinancing?e("am.productCard.leasing.tooltip"):e("am.productCard.financing.tooltip")),u=g(()=>l.isCompany?e("am.productCard.carValueTooltipNet"):e("am.productCard.carValueTooltipGross"));return(m,x)=>{const d=Q,a=R;return s(),p("div",{class:L(["flex items-center",{"bg-pko-red-50":t.promotionFlag.discountLabel,"bg-pko-grey-100":!t.promotionFlag.discountLabel,"justify-between":t.price,"justify-end":!t.price}])},[t.price?(s(),p("div",Et,[n("span",jt,c(o(e)("am.productCard.financing.label")),1),n("div",{class:L(["flex items-center gap-x-1",{"justify-between":!t.discount}])},[n("div",{class:L(["font-semibold",t.promotionFlag.colorPrice?"text-pko-red-600":"text-pko-secondary"])},[n("span",Vt,c(o(k).formatDecimal(t.price.value,!1)),1),n("span",At,c(o(k).currency.symbol),1)],2),t.promotionFlag.discountLabel?(s(),p("span",Nt," -"+c(o(k).formatDecimal(t.discount?.value??0)),1)):b("",!0)],2),n("div",Rt,[n("span",zt,c(o(e)("am.productCard.price"))+" "+c(t.isCompany?o(e)("am.productCard.net"):o(e)("am.productCard.gross")),1
1),r(a,{placement:"top","trigger-classes":"w-3 h-3 flex items-center justify-center"},{content:f(()=>[n("div",Ut,c(t.isForWishlist?t.variantInfo:o(i)),1)]),default:f(()=>[r(d,{name:"system/info",class:"w-3 h-3 text-pko-grey-800"})]),_:1})]),t.promotionFlag.omnibusDisclaimer?(s(),p("div",Ht,[n("span",Gt,c(o(k).formatDecimal(t.omnibus?.price.value??0)),1),n("span",null,c(o(e)("am.productCard.omnibusLowestPrice")),1),r(a,{placement:"top","trigger-classes":"w-3 h-3 flex items-center justify-center"},{content:f(()=>[n("div",qt,c(o(e)("am.productCard.omnibus")),1)]),default:f(()=>[r(d,{name:"system/info",class:"w-3 h-3 text-pko-grey-800"})]),_:1})])):b("",!0)])):b("",!0),typeof t.carValue=="number"?(s(),p("div",Yt,[n("span",Jt,c(o(e)("am.productCard.buy"))+":",1),n("div",{class:L(["flex items-center gap-x-1",{"justify-between":!t.discount}])},[n("div",Kt,[n("span",Qt,c(o(k).formatDecimal(t.carValue,!1)),1),n("span",Xt,c(o(k).currency.symbol),1)])],2),n("div",Zt,[n("span",te,c(o(e)("am.productCard.price"))+" "+c(t.isCompany?o(e)("am.productCard.net"):o(e)("am.productCard.gross")),1),r(a,{placement:"top","trigger-classes":"w-3 h-3 flex items-center justify-center"},{content:f(()=>[n("div",ee,c(t.isForWishlist?t.variantInfo:o(u)),1)]),default:f(()=>[r(d,{name:"system/info",class:"w-3 h-3 text-pko-grey-800"})]),_:1})])])):b("",!0)],2)}}}),ne=Object.assign(oe,{__name:"MarketProductCardOffer"}),ae={class:"relative isolate flex flex-col md:h-full overflow-hidden bg-white border rounded-xl border-pko-grey-500 hover:shadow-productCard"},se=w({__name:"ProductCard",props:{product:{},to:{},isOnWishlist:{type:Boolean},isForWishlist:{type:Boolean},preconnect:{type:Boolean}},emits:["select"],setup(t,{emit:e}){const l=t,i=e;return lt("product",l.product),(u,m)=>{const x=X,d=_t,a=Lt,h=Tt,y=Dt,v=ne;return s(),p("article",ae,[r(x,{to:t.to,class:"absolute inset-0 z-10 rounded-xl","aria-label":t.product.name,onClick:m[0]||(m[0]=B=>i("select"))},null,8,["to","aria-label"]),r(d,{product:t.product,"is-on-wishlist":t.isOnWishlist,to:t.to,preconnect:t.preconnect,onSelect:m[1]||(m[1]=B=>i("select"))},null,8,["product","is-on-wishlist","to","preconnect"]),r(y,{name:t.product.name,year:t.product.year,description:t.product.description,"is-new":t.product.isNew,"gearbox-type":t.product.gearboxType,"fuel-type":t.product.fuelType,promo:t.product.promo,period:t.product.omnibus?.period,mileage:t.product.mileage,"mileage-with-suffix":t.product.mileageWithSuffix,"location-city":t.product.locationCity,"location-region":t.product.locationRegion},{topBadges:f(()=>[r(a,{product:t.product},null,8,["product"])]),bottomBadges:f(()=>[r(h,{product:t.product},null,8,["product"])]),_:1},8,["name","year","description","is-new","gearbox-type","fuel-type","promo","period","mileage","mileage-with-suffix","location-city","location-region"]),r(v,{class:"min-h-28 mt-auto",promo:t.product.promo,discount:t.product.discount,price:t.product.price,omnibus:t.product.omnibus,"is-company":t.product.isCompany,"is-buy-financing":t.product.isBuyFinancing,"is-rental-financing":t.product.isRentalFinancing,"is-loan-financing":t.product.isLoanFinancing,"is-leasing-financing":t.product.isLeasingFinancing,"promotion-flag":t.product.promotionFlag,"is-for-wishlist":t.isForWishlist,"variant-info":t.product.variantInfo,"car-value":t.product.carValue},null,8,["promo","discount","price","omnibus","is-company","is-buy-financing","is-rental-financing","is-loan-financing","is-leasing-financing","promotion-flag","is-for-wishlist","variant-info","car-value"])])}}}),ue=Object.assign(se,{__name:"MarketProductCard"});export{ue as _};
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.