1import D from"./Cz9rzEbo.js";import k from"./qNJmT7Jv.js";import{i as v,Z as y,a0 as B,a7 as F,a8 as h,a9 as A,d as I,y as N,m as j,J,a1 as R,aa as S,o as l,c as m,f as P,h as p,n as _,e as L,F as O,r as V}from"./DYb_uK4R.js";import{c as $}from"./B6EMD7wR.js";import{u as E}from"./DL3maaIb.js";import{a as G}from"./C7XTJCLv.js";import"./D5uXLkT1.js";import"./z6oNM3z_.js";import"./Dav8PaHX.js";function H(){const{apiClient:e,cacheableReads:s}=v();return{search:async(t,c)=>{const i=y(c?.withCmsAssociations?$:{},c?.criteria,{associations:c?.associations??{}});return(s?await e.invoke("readProductDetailGet get /product/{productId}",{headers:{"sw-include-seo-urls":!0},pathParams:{productId:t},query:{_criteria:B(i)}}):await e.invoke("readProductDetail post /product/{productId}",{headers:{"sw-include-seo-urls":!0},pathParams:{productId:t},body:i})).data}}}function M(e,s={}){const{currencyCode:n}=F(),t={"@context":"http://schema.org/","@type":"Product",name:h(e,"name"),description:h(e,"description").replace(/(<([^>]+)>)/gi,""),ean:e.ean,image:[e.cover?.media?.url],offers:{"@type":"AggregateOffer",offerCount:e?.stock??0,lowPrice:e.calculatedCheapestPrice?.unitPrice??0,highPrice:e.calculatedPrice?.unitPrice??0,priceCurrency:n.value}};return A(()=>({script:[{type:"application/ld+json",children:JSON.stringify(y(t,s))}]})),{}}const U={key:0,class:"container mx-auto bg-white flex flex-col p-6 md:p-0"},q={key:1,class:"container mx-auto bg-white flex flex-col"},Q=I({__name:"FrontendDetailPage",props:{navigationId:{}},async setup(e){let s,n;const t=e,{search:c}=H(),{buildDynamicBreadcrumbs:i,pushBreadcrumb:f}=N(),{apiClient:b}=v(),g=V([]),{data:d,error:C}=([s,n]=j(async()=>J(`cmsProduct${t.navigationId}`,async()=>{const a=await Promise.allSettled([c(t.navigationId,{withCmsAssociations:!0,associations:{openGraphMedia:{associations:{thumbnails:{}}},seoUrls:{}}}),b.invoke("readBreadcrumb get /breadcrumb/{id}",{pathParams:{id:t.navigationId}})]);for(const o of a)o.status==="rejected"&&(console.error("[FrontendDetailPage.vue]",o.reason.message),g.value.push(o.reason.message));return{productResponse:a[0].status==="fulfilled"?a[0].value:null,breadcrumbs:a[1].status==="fulfilled"?a[1].value:null}})),s=await s,n(),s),r=d.value?.productResponse;if(d.value?.breadcrumbs&&i(d.value.breadcrumbs.data),!r){const a=C.value?.message||g.value.join(", ");throw console.error("[FrontendDetailPage.vue]",a),R({statusCode:500,message:a})}M(r.product),f({name:S({product:r.product})??"",path:`/${r.product.seoUrls?.[0]?.seoPathInfo}`});const{product:u}=E(r.product,r.configurator);return G(u),(a,o)=>{const w=D,x=k;return l(),m(O,null,[P(w),p(u)?.cmsPage?(l(),m("div",U,[P(x,{content:p(u).cmsPage},null,8,["content"])])):_("",!0),p(u)?.cmsPage?_("",!0):(l(),m("div",q,[...o[0]||(o[0]=[L("span",null,"ð± cmsPage is missing.",-1)])]))],64)}}}),se=Object.assign(Q,{__name:"FrontendDetailPage"});export{se 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.