PageSourceSearch

https://www.roverkob.dk/Dist/assets/productImage-3a3ae53d.js

js roverkob.dk collected 2026-10-10 01:47:37 UTC 11,991 bytes, 1 lines download raw bytes

1import{d as I}from"./index-ae8cc837.js";import{e as z,i as C}from"./indeklima-60859e57.js";import{s as N}from"./svane-c05b8455.js";import{a as P,x as D}from"./basketService-4fd2e2fd.js";import{_ as k,r as w,o as a,a as r,c as x,D as v,f as c,F as b,g as y,l as B,d,h as f,b as _,i as F,t as j}from"./index-d2a6a22a.js";const p="/Dist/assets/foto-mangler-506ea0de.webp",O="/Dist/assets/fodevaregodkendt-64478515.svg",L="/Dist/assets/sustainable-bf7bbe72.webp",T="/Dist/assets/danishDesign-dfefbc78.webp",V={props:{productNo:{type:String,required:!0}},data(){return{favorites:P()}},methods:{addOrRemoveFavorite:D,isFavorite(s){return this.favorites.includes(s)}}};function q(s,t,e,m,i,o){const u=w("font-awesome-icon");return a(),r("div",{onClick:t[0]||(t[0]=v(l=>o.addOrRemoveFavorite(e.productNo),["prevent"])),class:"text-3xl cursor-pointer"},[o.isFavorite(e.productNo)?(a(),x(u,{key:0,"fixed-width":"",icon:"fa-solid fa-heart",class:"text-[#374151]"})):(a(),x(u,{key:1,class:"text-[#374151]",icon:"fa-regular fa-heart","fixed-width":""}))])}const E=k(V,[["render",q]]);const g=[{fileName:"xs",width:90,height:90},{fileName:"sm",width:200,height:200},{fileName:"md",width:280,height:280},{fileName:"lg",width:380,height:380},{fileName:"xl",width:600,height:600},{fileName:"xxl",width:800,height:800}],U={props:{no:{type:String,required:!0},images:{type:Array,required:!0},customPrimaryImage:{type:String,default:null},customBackgroundColor:{type:String,default:null},rounded:{type:Boolean,default:!1},alt:{type:String,default:""}},data(){return{currentIndex:0,hovering:!1,maxLoaded:0,bestSize:g[g.length-1]}},computed:{resolvedImages(){return[this.customPrimaryImage,...this.images].filter(Boolean)},imageSrcs(){return this.resolvedImages.length===0?[p]:this.resolvedImages.map(s=>s===this.customPrimaryImage?s:`/ProductImages/${this.no}/${s}/${this.bestSize.fileName}.webp`)}},mounted(){this.updateBestSize(),this.debouncedResize=I.debounce(()=>this.updateBestSize(),250),this.observer=new ResizeObserver(()=>this.debouncedResize()),this.$refs.container&&this.observer.observe(this.$refs.container)},beforeUnmount(){this.observer&&this.observer.disconnect()},methods:{updateBestSize(){var t;const s=((t=this.$refs.container)==null?void 0:t.clientWidth)||0;for(const e of g)if(s<=e.width){this.bestSize=e;return}this.bestSize=g[g.length-1]},shouldLoad(s){return s<=this.maxLoaded+1},onScroll(){const s=this.$refs.container;s&&(this.currentIndex=Math.round(s.scrollLeft/s.clientWidth),this.currentIndex>this.maxLoaded&&(this.maxLoaded=this.currentIndex))},goTo(s){const t=this.$refs.container;t&&t.scrollTo({left:s*t.clientWidth,behavior:"smooth"})},prev(s){s.preventDefault();const t=this.imageSrcs.length;this.goTo((this.currentIndex-1+t)%t)},next(s){s.preventDefault(),this.goTo((this.currentIndex+1)%this.imageSrcs.length)}}},R=["src","alt"],W={key:0,class:"absolute bottom-0 inset-x-0 flex gap-1 px-3 pb-1 z-10 lg:hidden"},H={key:1,class:"absolute bottom-0 inset-x-0 gap-1 px-3 pb-1 z-10 hidden lg:flex"},M=["onClick"];function A(s,t,e,m,i,o){const u=w("font-awesome-icon");return a(),r("div",{onMouseenter:t[3]||(t[3]=l=>i.hovering=!0),onMouseleave:t[4]||(t[4]=l=>i.hovering=!1),class:"relative w-full aspect-square"},[c("div",{ref:"container",onScroll:t[0]||(t[0]=(...l)=>o.onScroll&&o.onScroll(...l)),class:f([e.rounded&&"rounded-lg overflow-hidden","flex w-full h-full overflow-x-auto snap-x snap-mandatory scrollbar-hide"])},[(a(!0),r(b,null,y(o.imageSrcs,(l,n)=>(a(),r("div",{key:n,class:"w-full flex-shrink-0 aspect-square snap-start",style:B({backgroundColor:e.customBackgroundColor})},[o.shouldLoad(n)?(a(),r("img",{key:0,src:l,alt:e.alt,class:"w-full h-full object-cover",draggable:"false"},null,8,R)):d("",!0)],4))),128))],34),o.imageSrcs.length>1?(a(),r("div",W,[(a(!0),r(b,null,y(o.imageSrcs,(l,n)=>(a(),r("div",{key:n,class:f(["flex-1 h-1 rounded-full transition-all duration-300 border",n===i.currentIndex?"bg-gray-700 border-gray-400":"bg-gray-200 border-gray-400"])},null,2))),128))])):d("",!0),i.hovering&&o.imageSrcs.length>1?(a(),r("div",H,[(a(!0),r(b,null,y(o.imageSrcs,(l,n)=>(a(),r("button",{key:n,onClick:v(h=>o.goTo(n),["prevent","stop"]),class:f(["flex-1 h-1 rounded-full transition-all duration-300 border",n===i.currentIndex?"bg-gray-700 border-gray-400":"bg-gray-200 border-gray-400"])},null,10,M))),128))])):d("",!0),i.hovering&&o.imageSrcs.length>1?(a(),r(b,{key:2},[c("button",{onClick:t[1]||(t[1]=v((...l)=>o.prev&&o.prev(...l),["prevent","stop"])),class:"hidden lg:flex absolute left-1 top-1/2 -translate-y-1/2 h-7 w-7 items-center justify-center rounded-full bg-white border border-gray-400 transition z-10"},[_(u,{class:"h-3 w-3 text-gray-700",icon:"fa-solid fa-chevron-left"})]),c("button",{onClick:t[2]||(t[2]=v((...l)=>o.next&&o.next(...l),["prevent","stop"])),class:"hidden lg:flex absolute right-1 top-1/2 -translate-y-1/2 h-7 w-7 items-center justify-center rounded-full bg-white border border-gray-400 transition z-10"},[_(u,{class:"h-3 w-3 text-gray-700",icon:"fa-solid fa-chevron-right"})])],64)):d("",!0)],32)}const G=k(U,[["render",A],["__scopeId","data-v-c5330af5"]]),S=[{fileName:"xs",width:90,height:90},{fileName:"sm",width:200,height:200},{fileName:"md",width:280,height:280},{fileName:"lg",width:380,height:380},{fileName:"xl",width:600,height:600},{fileName:"xxl",width:800,height:800}],J={props:{no:{type:String,required:!0},showHasVariants:{type:Boolean,default:!1},file:{type:String,default:null},files:{type:Array,default:null},discountSticker:{type:Object,required:!1},labelEuBlomsten:{type:Boolean,default:!1},labelFoedevare:{type:Boolean,default:!1},labelIndeklima:{type:Boolean,default:!1},labelSvane:{type:Boolean,default:!1},labelSustainable:{type:Boolean,default:!1},labelDanishDesign:{type:Boolean,default:!1},farveVaelger:{type:Boolean,default:!1},showSlideshow:{type:Boolean,default:!1},showPricerunner:{type:Boolean,default:!1},border:{type:Boolean,default:!1},rounded:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},onCard:{type:Boolean,default:!1},showFavoriteButton:{type:Boolean,default:!1},isFavorite:{type:Boolean,default:!1},alt:{type:String,default:""},description:{type:String,default:""},customPrimaryImage:{type:String,default:null}
1,customBackgroundColor:{type:String,default:null}},data(){return{shouldShow:!1,debouncedUpdateImageSrc:null,ecolabel:z,fodevaregodkendt:O,indeklima:C,svane:N,sustainable:L,danishDesign:T}},components:{FavoriteButton:E,ImageSlideshow:G},computed:{images(){return this.files?this.files:this.file?[this.file]:[]}},watch:{file(){this.updateImageSrc()},no(){this.updateImageSrc()}},async mounted(){this.showSlideshow||(this.updateImageSrc(),this.debouncedUpdateImageSrc=I.debounce(()=>{this.updateImageSrc()},250),this.observer=new ResizeObserver(this.resizeObserver),this.observer.observe(this.$refs.image))},beforeUnmount(){this.observer&&this.observer.disconnect()},methods:{resizeObserver(s){for(const t of s)t.target===this.$refs.image&&this.debouncedUpdateImageSrc()},handleClick(s){s.target.tagName!="svg"&&s.target.tagName!="path"&&this.$emit("imageClicked")},getBestImageSize(){const t=this.$refs.image.clientWidth;let e=S[S.length-1];for(const m of S)if(t<=m.width){e=m;break}return e},updateImageSrc(){if(!this.$refs.image)return;const s=500,t=1e3,e="/ProductImages/",m=(u,l,n)=>{this.$refs.image.src=u,this.$refs.image.width=l,this.$refs.image.height=n,this.$refs.metaSrc.content=`${document.location.origin}${u}`,this.$refs.metaWidth.content=l,this.$refs.metaHeight.content=n};if(this.images.length===0&&!this.customPrimaryImage){this.$refs.image.src!==p&&(m(p,s,s),this.shouldShow||(this.shouldShow=!0));return}if(this.customPrimaryImage){this.$refs.image.src!==this.customPrimaryImage&&(m(this.customPrimaryImage,t,t),this.shouldShow||(this.shouldShow=!0));return}const i=this.getBestImageSize();let o;this.file?o=`${e}${this.no}/${this.file}/${i.fileName}.webp`:o=`${e}${this.no}/${this.images[0]}/${i.fileName}.webp`,this.$refs.image.src!==o&&(this.shouldShow||(this.shouldShow=!0),m(o,i.width,i.height))}}},K={itemprop:"image",itemscope:"",itemtype:"https://schema.org/ImageObject"},Q=["alt"],X={ref:"metaWidth",itemprop:"width",content:""},Y={ref:"metaHeight",itemprop:"height",content:""},Z={ref:"metaSrc",itemprop:"url",content:""},$=["content"],ee=["content"],te={key:0,class:"absolute top-1 right-1 sm:top-2 sm:right-2 pointer-events-none"},se={key:0,class:"text-white text-xxxs sm:text-xxs font-medium mt-2 leading-[0.2]"},ae=c("span",{class:"font-light"},"%",-1),oe={key:1,class:"absolute top-1 left-1 sm:top-3 sm:left-3"},re={key:2,class:"absolute flex flex-col gap-2 bottom-3 left-2 pointer-events-none"},ie={key:0,class:"bg-gray-700 h-8 w-8 rounded-full flex items-center justify-center shadow-md"},le={key:1,class:"text-xs px-2 py-1.5 bg-gray-700 rounded-md text-white leading-none"},ne={class:"absolute bottom-3 right-2 flex flex-col gap-2 pointer-events-none"},de=["src","alt","title"],ce=["src"];function ue(s,t,e,m,i,o){const u=w("ImageSlideshow"),l=w("FavoriteButton"),n=w("font-awesome-icon");return a(),r("div",{onClick:t[0]||(t[0]=(...h)=>o.handleClick&&o.handleClick(...h)),class:"relative text-center select-none aspect-square w-full font-poppins"},[c("div",K,[e.showSlideshow?(a(),x(u,{key:0,no:e.no,images:o.images,customPrimaryImage:e.customPrimaryImage,customBackgroundColor:e.customBackgroundColor,rounded:e.rounded,alt:e.alt},null,8,["no","images","customPrimaryImage","customBackgroundColor","rounded","alt"])):(a(),r("img",{key:1,ref:"image",class:f([!i.shouldShow&&"invisible",e.rounded&&"rounded-lg",e.border&&e.selected?"border-2 border-blue-300":e.border&&"border border-gray-200","mx-auto aspect-square w-full object-cover"]),alt:e.alt,style:B({backgroundColor:e.customBackgroundColor})},null,14,Q)),c("meta",X,null,512),c("meta",Y,null,512),c("meta",Z,null,512),e.description?(a(),r("meta",{key:2,itemprop:"description",content:e.description},null,8,$)):d("",!0),e.alt?(a(),r("meta",{key:3,itemprop:"caption",content:e.alt},null,8,ee)):d("",!0)]),e.discountSticker&&e.discountSticker.percent>0?(a(),r("div",te,[c("div",{class:f(["bg-[#D8AE60] flex flex-col items-center justify-center rounded-full",e.onCard?"h-9 w-9 sm:h-12 sm:w-12 xl:h-14 xl:w-14":"h-10 w-10 sm:h-14 sm:w-14 xl:h-14 xl:w-14"])},[e.discountSticker.isUpTo?(a(),r("p",se," OP TIL ")):d("",!0),c("p",{class:f(["text-white text-sm sm:text-lg md:text-xl font-medium",e.discountSticker.isUpTo?"mt-0":"mt-0.5"])},[F(j(e.discountSticker.percent),1),ae],2)],2)])):d("",!0),e.showFavoriteButton?(a(),r("div",oe,[_(l,{productNo:e.no},null,8,["productNo"])])):d("",!0),e.onCard&&(e.farveVaelger||e.showHasVariants)?(a(),r("div",re,[e.farveVaelger?(a(),r("div",ie,[_(n,{class:"text-white w-4 h-4",icon:"fa-solid fa-droplet"})])):d("",!0),e.showHasVariants?(a(),r("p",le,"Flere varianter")):d("",!0)])):d("",!0),c("div",ne,[(a(!0),r(b,null,y([{show:e.labelEuBlomsten,src:i.ecolabel,alt:"EU-Blomst, Ecolabel",large:!1},{show:e.labelFoedevare,src:i.fodevaregodkendt,alt:"Fødevaregodkendt",large:!1},{show:e.labelIndeklima,src:i.indeklima,alt:"Indeklimamærket",large:!1},{show:e.labelSvane,src:i.svane,alt:"Svanemærket",large:!1},{show:s.label,src:i.svane,alt:"Svanemærket",large:!1},{show:e.labelSustainable,src:i.sustainable,alt:"Bæredygtigt",large:!0},{show:e.labelDanishDesign,src:i.danishDesign,alt:"Dansk Design",large:!0}].filter(h=>h.show),h=>(a(),r("img",{class:f([h.large?e.onCard?"h-10 w-10 sm:h-14 sm:w-14":"h-14 w-14 sm:h-20 sm:w-20":"h-8 w-8","object-cover"]),key:h.src,src:h.src,alt:h.alt,title:h.alt},null,10,de))),128))]),e.showPricerunner?(a(),r("img",{key:3,class:"absolute",style:{bottom:"2%",right:"2%","max-width":"30%"},src:"https://www.pricerunner.dk/widget/cheapest/image/56500?sku="+e.no,alt:"Billigst på PriceRunner"},null,8,ce)):d("",!0)])}const he=k(J,[["render",ue]]),ve=Object.freeze(Object.defineProperty({__proto__:null,default:he},Symbol.toStringTag,{value:"Module"}));
1export{he as P,T as d,O as f,p as n,ve as p,L as s};

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.