PageSourceSearch

https://www.color4care.no/_nuxt/CiGsV5gR.js

js color4care.no collected 2026-10-04 20:56:57 UTC 1,948 bytes, 1 lines download raw bytes

1import{d as C,j as N,k as w,H as z,m as B,p as P,q as T,x as D,c as i,f as o,b as g,n as r,g as u,t as A,F,r as I,h as R,l as h,af as E,z as L,o as l}from"#entry";import{C as U}from"./Bn44Lv7O.js";import{_ as V}from"./1DYICmpl.js";import{u as W}from"./CeMEcFCK.js";const $={class:"type-xs-medium mb-12"},S=C({__name:"RelatedProducts",props:{blok:{},placement:{},lazyload:{type:Boolean,default:!1},design:{default:"list"}},async setup(e){let d,m;const{$toNumber:y}=N(),{apiPost:p}=w(),a=e,{desktopWidth:v}=W(a);let n=[];a.blok.products&&a.blok.products.forEach(t=>{t.product.product?.partNo&&n.push(t.product.product.partNo)}),a.blok.productIds&&(n=a.blok.productIds.split(","));const s=h([]),k=L(()=>({type:a.blok.type,productIds:n,limit:y(a.blok.limit)}));if(!a.lazyload){const t=([d,m]=z(()=>p("/products/clerk/recommendations",k.value)),d=await d,m(),d);t&&t.length&&(s.value=t)}const b=async()=>{const t=await p("/products/clerk/recommendations",k.value);return t&&t.length?s.value=t:s.value=[],!0};B(()=>{a.lazyload&&P(()=>{b()})});const c=h(0);return T(()=>a.blok,async()=>{await b(),c.value=c.value+1}),(t,j)=>{const x=E("editable");return D((l(),i("div",{class:r(["RelatedProducts",o(v)("full")])},[e.design==="list"&&o(s).length?(l(),g(U,{key:o(c),headline:e.blok.headline,text:e.blok.text,products:o(s),placement:e.placement,"desktop-columns":e.blok.desktopColumns??null},null,8,["headline","text","products","placement","desktop-columns"])):(e.design==="pdpUpsell"||e.design==="addedToCart")&&o(s).length?(l(),i("div",{key:1,class:r({"mb-32":e.design==="pdpUpsell","type-xs mb-24 border-t border-light":e.design==="addedToCart"})},[u("div",{class:r(e.design==="addedToCart"?"p-24":"")},[u("div",$,A(e.blok.headline),1),u("div",null,[(l(!0),i(F,null,I(o(s),f=>(l(),g(V,{key:f.partNo,item:f,"image-background":e.design==="addedToCart"},null,8,["item","image-background"]))),128))])],2)],2)):R("",!0)],2)),[[x,e.blok]])}}});export{S 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.