1import{D as e,M as t,at as n,h as r,v as i}from"./runtime-core.esm-bundler-JAEtUtsi.js";import{i as a}from"./runtime-dom.esm-bundler-Dgt0fgnz.js";import{a as o}from"./pinia-DcxBaW1K.js";import{t as s}from"./ada-CAWMzYsV.js";import{t as c}from"./AdaSlotMarker-CCdPm2PE.js";import{t as l}from"./EventBus-C2q00cr0.js";function u(u){let d=i(),f=d?.type.name??``,p=()=>d?.proxy?.$el,m=s(),{blockAds:h,isAsyncContentMode:g,dynamicAdSlotsAllocated:_}=o(m),{setAsyncContentRefresh:v,flushAdSlotMarker:y,flushActivatedAdSlotMarker:b}=m,x=n([]);function S(){f===`ParagraphTypeHtml`?T():f===`TeaserGroup`?E():f===`ParagraphTypeEpgSearch`&&g.value?O():(f===`ParagraphTypeVodSearch`&&g.value||f===`ParagraphTypeSearch`&&g.value)&&E(!0)}function C(e,t,n=!1){let i=document.createElement(`div`);i.style.display=`contents`;let o=r(c,{aboveParagraph:{index:f+`-`+t,type:f,nested:!0,hasAsyncContent:n,wordcount:e.innerText.split(` `).length},onRemove:()=>w(i)});return o.appContext=d?.appContext??null,a(o,i),x.value.push(i),i}function w(e){let t=x.value.indexOf(e);t>-1&&(x.value.splice(t,1),a(null,e),e.remove())}function T(){let e=[`H1`,`H2`,`H3`],t=p();t.querySelectorAll(`:scope > *`).forEach((n,r)=>{if(n.nextSibling&&!e.includes(n.tagName)){let e=C(n,r);t.insertBefore(e,n.nextSibling)}})}function E(e=!1){let t=[`bx-teaser-container--info`,`bx-teaser-container--recipe`,`bx-teaser-container--lexicon`,`bx-teaser-container--vod`];e&&t.push(`bx-teaser-container--one-third-width`),t.includes(u)&&k(`.bx-teaser-container:not(.bx-js-prevent-slot-marker):not(.bx-teaser-container--dialog) .bx-teaser-container__wrapper`,`.bx-teaser-container:not(.bx-js-prevent-slot-marker):not(.bx-teaser-container--dialog) .bx-teaser:nth-child(${D()}n of .bx-teaser:not(.bx-teaser--favorite))`,e)}function D(){let e=0,t=null,n=Array.from(p().querySelectorAll(`.bx-teaser:not(.bx-teaser--favorite)`));if(n.length>0)for(let r=0;r<n.length;r++){let i=n[r].getBoundingClientRect().top;if(!t||i===t)e++,t=i;else break}return e}function O(){k(`.bx-epg-search__broadcasts`,`.bx-epg-search__broadcasts .bx-epg-search__row`,!0)}function k(e,t,n=!1){let r=p(),i=r.querySelector(e);r.querySelectorAll(t).forEach((e,t)=>{if(e.nextSibling){let r=C(e,t,n);i.insertBefore(r,e.nextSibling)}})}function A(t=!1){_.value&&(v(!0),y(),b()),e(()=>{v(!1),t&&t(),l.$emit(`ad-loader:allocation`)})}return t(()=>{!h.value&&!g.value&&S()}),{injectMarkerAndAllocateAdSlotsInDynamicContent:A,injectMarkerToTeaserGroup:E,injectMarkerToEpgSearch:O}}export{u as t}; 2//# sourceMappingURL=use-ada-dynamic-slot-marker-B6fyoSj8.js.map
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.