1import{d as w,r as p,av as E,o as x,A as T,as as L,e as q,R as B,c as A,p as b,a as y,j as O,g as R,q as $}from"./wGaC-Zcn.js";import{u as F}from"./8Btfm6zX.js";import{u as I}from"./DElT1bP8.js";import{u as j}from"./B-8IwvwF.js";const D=["innerHTML"],P=".ms-productCategory",C=".ms-pwBtn[data-product]",H=w({__name:"Produkte",props:{html:{}},setup(g){const n=g,e=p(),m=E(),l=p(null),o=p(null),a=p(null);function i(t,u){m&&console.log(`[products-tracking] ${t}`,u)}function v(){!e.value||l.value||(l.value=new MutationObserver(t=>{i("Produkte-DOM wurde verändert",{mutationCount:t.length,htmlLength:e.value?.innerHTML?.length??0,cardCount:e.value?.querySelectorAll(P).length??0}),d()}),l.value.observe(e.value,{childList:!0,subtree:!0}))}function d(){a.value!==null&&cancelAnimationFrame(a.value),a.value=requestAnimationFrame(()=>{a.value=null,S()})}function S(){const t=Array.from(e.value?.querySelectorAll(P)??[]),u=t.map(r=>r.querySelector(C)).filter(r=>r!==null),c=u.length,s=t.every(r=>r.querySelector(C)),h=u.map(r=>{const M=r.getAttribute("data-product")??"";return`${r.getAttribute("data-position")??""}:${M}`});if(t.length===0||!s){i("Produkte noch nicht vollständig trackbar",{cardCount:t.length,ctaCount:c,productsAreTrackable:s});return}const k=h.join("|");o.value!==k&&(o.value=k,i("Produkte vollständig gerendert",{cardCount:t.length,ctaCount:c,productSignatures:h}),document.body.dispatchEvent(new CustomEvent("avo-products-rendered",{detail:{cardCount:t.length,ctaCount:c,products:h}})))}function f(){o.value=null,d()}async function _(){await B(),Array.from(document.querySelectorAll(".u-products script")).forEac
1h((t,u)=>{const c=t;if(c.dataset.handled)return;c.dataset.handled="true";const s=document.createElement("script");s.type="text/javascript",s.classList.add("u-products-script-"+u),s.textContent=c.textContent,document.body.appendChild(s)})}return x(async()=>{v(),document.addEventListener("trackingInitialized",f),d(),await _(),T(()=>n.html,async()=>{o.value=null,await _(),d()})}),L(()=>{a.value!==null&&cancelAnimationFrame(a.value),document.removeEventListener("trackingInitialized",f),l.value?.disconnect(),l.value=null}),(t,u)=>(A(),q("div",{ref_key:"products",ref:e,class:"u-products",innerHTML:t.html},null,8,D))}}),z=Object.assign(H,{__name:"MoleculesProdukte"}),Q=w({__name:"index",async setup(g){let n,e;F();const{data:m}=([n,e]=b(()=>$("/api/page/produkte",{method:"POST"},"$t1acwewDIo")),n=await n,e(),n),o=y()==="lr"?"Plus":`${y().toUpperCase()}-Produkte`;return I(o),[n,e]=b(()=>j([{label:o}])),await n,e(),(a,i)=>{const v=z;return A(),O(v,{html:R(m)?.data},null,8,["html"])}}});export{Q 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.