1import{l as e}from"./DUWOugQK.js";import{t}from"./Dmyi4Jrn.js";import{r as n}from"./5a5a0cc7.js";var r=null;function i(){return{all:{total:0,unread_count:0},reply:{total:0,unread_count:0},like:{total:0,unread_count:0},follow:{total:0,unread_count:0},support:{total:0,unread_count:0},content_status:{total:0,unread_count:0}}}function a(){let a=n(),o=t(`interaction-center-summary`,()=>({summary:null,loading:!1,loadedAt:0})),s=e(()=>o.value.summary?.unread_count??0),c=e(()=>s.value>99?`99+`:String(s.value));function l(){o.value={summary:null,loading:!1,loadedAt:0}}async function u(e=!1){if(await a.initialize(),!a.isAuthenticated.value){l();return}if(!(!e&&Date.now()-o.value.loadedAt<3e4))return r||(o.value.loading=!0,r=a.request(`/user/interaction-center/summary`).then(e=>{o.value.summary=e,o.value.loadedAt=Date.now()}).catch(()=>void 0).finally(()=>{o.value.loading=!1,r=null}),r)}function d(e,t){let n=o.value.summary?.categories??i();for(let e of Object.keys(t))n[e]={...n[e],unread_count:Math.max(0,t[e])};n.all={...n.all,unread_count:Math.max(0,e)},o.value.summary={total:o.value.summary?.total??n.all.total,unread_count:Math.max(0,e),categories:n},o.value.loadedAt=Date.now()}return{summary:e(()=>o.value.summary),loading:e(()=>o.value.loading),unreadCount:s,unreadLabel:c,refresh:u,reset:l,applyUnreadSnapshot:d}}export{a as t};
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.