1import{d as I,h as _,g as k,n as x,k as g,t as w,j as d,F as B,m as T,i as m,u as R,l as $,_ as P,a9 as S,r as M,E as b,o as O,aA as D,aH as V,q as A,e as N,p as F,s as H,J as L,a3 as j}from"./BG7mKuTY.js";import{g as E}from"./BIHddBUe.js";const q={class:"bg-surface-secondary flex flex-col gap-5 px-5 py-7 lg:px-9 lg:py-11"},z={class:"font-article-medium"},J={class:"list-inside list-decimal"},U=["href","title","onClick"],Y={key:0,class:"mkt-placement-8"},G=I({__name:"ChapterSummaryDefault",props:{chapters:{}},setup(v){const{chapters:y}=v,l=t=>{const f=document.getElementById(t);if(f){const s=f.getBoundingClientRect().top+window.pageYOffset+-128;window.scrollTo({top:s,behavior:"smooth"})}};return(t,f)=>{var s,i,a;const n=P;return(s=t.chapters)!=null&&s.length?(m(),_("section",{key:0,class:x(["center-content",(i=t.data)!=null&&i.PaywallProtected?"paywall relative":""])},[g("div",q,[g("h3",z,w(("useTranslationStore"in t?t.useTranslationStore:d(R))().getTranslation("chapter.summary.content","Indhold")),1),g("ul",J,[(m(!0),_(B,null,T(t.chapters,e=>(m(),_("li",{key:e.title,class:"flex items-center gap-3 pb-5"},[$(n,{name:"arrow-alt",class:"h-4"}),g("a",{href:"#"+d(E)(e.title||""),class:"font-link flex items-center gap-3",title:e.title??"",onClick:S(r=>l(d(E)(e.title||"")),["prevent"])},w(e.title),9,U)]))),128))])]),(a=t.data)!=null&&a.PaywallProtected?(m(),_("div",Y)):k("",!0)],2)):k("",!0)}}}),K={key:0},Q={class:"border-tone-secondary bg-surface-primary border-b-[.5px]"},W={class:"m-auto flex w-fit"},X=["data-chapter-id"],Z={class:"p-4"},ee=I({__name:"ChapterSummaryScroll",props:{chapters:{}},setup(v){const{chapters:y}=v,l=M(null);let t=null;const f=e=>{const r=document.getElementById(e);if(r){const p=r.offsetTop-160;window.scrollTo({top:p,behavior:"smooth"})}},n=b(()=>y.filter(e=>e.title).map(e=>({title:e.title,id:E(e.title)}))),s=b(()=>l.value),i=e=>{l.value=e},a=()=>{t&&t.disconnect(),t=new IntersectionObserver(e=>{const r=e.filter(c=>c.isIntersecting);if(r.length>0){const o=r.sort((u,h)=>u.boundingClientRect.top-h.boundingClientRect.top)[0].target.id;i(o)}else{let c=null,p=1/0;if(n.value.forEach(({id:o})=>{const u=document.getElementById(o);if(u){const h=u.getBoundingClientRect();if(h.bottom<0){const C=Math.abs(h.bottom);C<p&&(p=C,c=o)}}}),c)i(c);else{let o=null;n.value.forEach(({id:u})=>{const h=document.getElementById(u);h&&!o&&h.getBoundingClientRect().top>window.innerHeight&&(o=u)}),o?i(o):!l.value&&n.value.length>0&&(l.value=n.value[0].id)}}},{rootMargin:"-10px 0px 0px 0px",threshold:[0,.1,.5,1],trackVisibility:!0,delay:500}),n.value.forEach(({id:e})=>{const r=document.getElementById(e);r&&(t==null||t.observe(r))}),n.value.length>0&&(l.value=n.value[0].id)};return O(()=>{D(()=>{a()})}),V(()=>{t&&t.disconnect()}),(e,r)=>{const c=F;return d(n).length?(m(),_("section",K,[g("div",Q,[g("div",W,[(m(!0),_(B,null,T(d(n),({title:p,id:o})=>(m(),_("div",{key:p,class:"relative","data-chapter-id":o},[$(c,{link:("useRoute"in e?e.useRoute:d(N))().path,class:x(["text-tertiary hover:text-primary whitespace-nowrap font-normal hover:font-normal",{"!text-primary before:border-t-medium before:border-brand-highlight before:absolute before:left-0 before:top-0 before:h-[1px] before:w-full before:bg-[red] before:content-['']":d(s)===o}]),title:p,onClick:S(u=>f(o),["prevent"])},{default:A(()=>[g("div",Z,w(p),1)]),_:2},1032,["link","class","title","onClick"])],8,X))),128))])])])):k("",!0)}}}),oe=I({__name:"ChaptersSummary",props:{data:{}},setup(v){const{data:y}=v,l={default:G,scroll:ee},t=b(()=>{var n,s,i;return(i=(s=(n=H())==null?void 0:n.content)==null?void 0:s.contents)==null?void 0:i.data.map(a=>a.type==="lead_paragraph"&&a.display_hint==="chapter"?a:null).filter(a=>!!a)}),f=b(()=>l[(y==null?void 0:y.display_hint)||"default"]);return(n,s)=>(m(),L(j(d(f)),{chapters:d(t)},null,8,["chapters"]))}});export{oe 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.