1import C from"./fiEbmycu.js";import{_ as P}from"./CraRslYF.js";import{d as w,r as o,o as B,c as p,j as d,H as x,w as _,g as r,k as I,M as T,Q as U,i as f,f as $,S as y,ah as S,a as V,K as W,v as M}from"./2wZnQC37.js";import{a as O}from"./D0VJpc1U.js";import{_ as D}from"./wtnVEmQg.js";import{u as L}from"./Bu76IdAq.js";import"./eNRcJCw9.js";import"./Be1JWI0M.js";import"./DP3SJs_D.js";import"./BCt8rGR-.js";import"./piuiv6gC.js";import"./CrFgYiQN.js";import"./BhVQHxBq.js";import"./jZ8yHuX0.js";const j=w({__name:"UserBookmarksWidget",props:{maxBookmarks:{default:0},wrapperId:{default:""}},setup(v){const k=o(!0),n=o([]),u=o(-1),c=o(!1),i=v;async function m(){c.value=!0,u.value++;let e=(await l(u.value,"unread"))?.articles||[];i.maxBookmarks>0&&(e=e.slice(0,i.maxBookmarks)),n.value.push(...e.map(t=>({...t,bookmarkVisible:!0}))),k.value=k.value&&n.value.length<=0,c.value=!1}async function l(a,e){return!["read","unread"].includes(e)||!y()?[]:await $fetch(`/api/user/bookmarked-articles/${a}-${e}`)}return B(()=>{m()}),(a,e)=>{const t=C,s=P,g=x;return p(),d(g,null,{fallback:_(()=>[$("div",null,[f(s,{class:"mt-10"})])]),default:_(()=>[r(n).length>0?(p(),d(t,{key:0,teasers:("addTeaserTrackingData"in a?a.addTeaserTrackingData:r(O))(r(n),!1),layout:"10",wrapperId:a.wrapperId},null,8,["teasers","wrapperId"])):I("",!0),T(f(s,null,null,512),[[U,r(c)]])]),_:1})}}}),N=Object.assign(j,{__name:"UserBookmarksWidget"}),b="ndiBookmarkWidget",h="Aus Ihrer Merkliste",E=w({__name:"BookmarkWidget",setup(v){const n=S().getContent,u=V(),c=o(0),i=o([]),m=o([]),l=o([]);l.value.service=L(u,"service"),m.value=[{label:"Zur "+l.value.service?.items[1]?.label,url:l.value.service?.items[1]?.url}];const a=W(()=>{const e=n?.find(t=>t.component==="watchlist");if(e)return{...e,content:{...e.content,title:h}}});return B(async()=>{if(!y())return[];let t=(await $fetch(`/api/user/bookmarked-articles/${c.value}-unread`))?.articles||[];i.value.push(...t.map(s=>({...s,bookmarkVisible:!0})))}),(e,t)=>{const s=N,g=D,A=x;return p(),d(A,null,{default:_(()=>[r(i).length>0?(p(),d(g,M({key:0,title:h,sectionLinks:r(m),toggleVisibility:!0},r(a).content,{wrapperIdValue:b}),{default:_(()=>[f(s,{maxBookmarks:3,wrapperId:b})]),_:1},16,["sectionLinks"])):I("",!0)]),_:1})}}}),ae=Object.assign(E,{__name:"BookmarkWidget"});export{ae 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.