PageSourceSearch

https://mozaweb.gr/public/assets/web/assets/notificationEvents-CL78VE8Q.js

js mozaweb.gr collected 2026-09-28 14:42:47 UTC 4,797 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`v2026.09.48`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`d58b530e-08d9-444d-b6dd-33a4656f38a6`,e._sentryDebugIdIdentifier=`sentry-dbid-d58b530e-08d9-444d-b6dd-33a4656f38a6`)}catch{}})();import{Ct as e,D as t,E as n,On as r,Yt as i,Zn as a,_ as o,b as s,et as c,g as l,k as u,mt as d,o as f,tr as p,v as m,vn as h,y as g}from"./runtime-core.esm-bundler-BLtZVJg1.js";import{w as _}from"./runtime-dom.esm-bundler-BOsDeEc6.js";import{t as v}from"./_plugin-vue_export-helper-CqBicvSt.js";import{t as y}from"./MozaIcon-BBZN_KUF.js";import{t as b}from"./TestSelectorUtil-DkLpuWnz.js";import{t as x}from"./RequestHelper-CLx-QOHg.js";import{r as S}from"./route-DjvDasSe.js";var C=function(e){return e.NOTIFICATION=`notification`,e.GLOBAL=`global`,e}({}),w=e=>Array.from({length:e},(e,t)=>({id:-(t+1),type:`notification`,icon:``,title:`placeholder`,description:`placeholder`,link:``,created:`placeholder`,createdDate:``,seen:!1})),T={class:`notif-body`},E={class:`notif-main`},D={class:`notif-title-row`},O=[`title`],k=[`innerHTML`],A=[`src`,`alt`,`title`],j=v(u({__name:`NotificationRow`,props:{notification:{},loading:{type:Boolean,default:!1}},emits:[`markRead`,`navigate`],setup(u,{emit:h}){let v=u,x=h,S=l(()=>v.notification.type===C.GLOBAL),w=l(()=>v.notification.icon.split(` `)[0].replace(`mwicon-`,``)),j=l(()=>v.notification.seen?``:v.notification.icon.replace(/^mwicon-\S+\s*/,``)),M=()=>{v.loading||x(`navigate`,v.notification)},N=e=>{v.loading||(e.preventDefault(),e.stopPropagation(),x(`markRead`,v.notification))};return(l,h)=>{let v=e(`tooltip`);return d(),s(`a`,c({href:`#`,class:[`notif`,{"is-seen":u.notification.seen,"is-loading":u.loading}]},r(b)(`notification-row`),{onClick:_(M,[`prevent`])}),[o(`span`,{class:a([`notif-icon`,{skeleton:u.loading}])},[u.loading?(d(),s(f,{key:0},[n(`ph`)],64)):(d(),m(y,{key:1,icon:w.value,class:a(j.value)},null,8,[`icon`,`class`]))],2),o(`div`,T,[o(`div`,E,[o(`div`,D,[o(`div`,{class:a([`notif-title`,{skeleton:u.loading}])},p(u.notification.title),3),S.value?g(``,!0):(d(),s(`div`,{key:0,class:a([`notif-date`,u.loading?`skeleton`:`muted`])},[t(y,{icon:`mm_record`,class:`notif-date-dot`}),o(`span`,{title:u.notification.createdDate},p(u.notification.created),9,O)],2))]),o(`div`,{class:a([`notif-desc`,{skeleton:u.loading}]),innerHTML:u.notification.description},null,10,k),S.value?g(``,!0):(d(),s(`div`,{key:0,class:a([`notif-date-mobile`,u.loading?`skeleton`:`muted`])},p(u.notification.created),3))]),S.value&&u.notification.hasImage?(d(),s(`img`,{key:0,class:`notif-image`,src:u.notification.imageLink,alt:u.notification.title,title:u.notification.title},null,8,A)):g(``,!0),o(`div`,c({class:[`notif-read`,{"is-hidden":u.notification.seen}]},r(b)(`notification-mark-read`),{onClick:N}),[i(t(y,{icon:`eye`,class:a([`notif-read-icon`,{muted:!u.loading}]),title:l.$lang(`notifications.set_seen`).value},null,8,[`class`,`title`]),[[v,{container:`body`}]])],16)])],16)}}}),[[`__scopeId`,`data-v-57d65afd`]]),M=1e3,N=()=>{alertMessage({messageBoxClass:MESSAGE_BOX_CLASS_LIST.DANGER,message:_lang(`general.error_message`)})},P=e=>{let t=[...e.pendingEntries.values()];return e.pendingEntries.clear(),t},F=e=>JSON.stringify({notifications:e.map(e=>({id:e.notification.id,isGlobal:e.notification.type===C.GLOBAL})),isListPage:e.some(e=>e.isListPage)}),I=async e=>{let t=P(e);if(!t.length)return;let n=e=>{t.forEach(t=>void t.resolvers.forEach(t=>void t(e)))},r=()=>{t.forEach(e=>{e.notification.seen=!1}),N(),n(null)},[i,a]=await x.patch(S(`notifications.markManyAsRead`),F(t));if(a||!(i!=null&&i.ok)){r();return}try{n(await i.json())}catch{r()}},L=(e,t,n={})=>t.seen?Promise.resolve(null):(t.seen=!0,new Promise(r=>{let i=e.pendingEntries.get(t.id);i?(i.resolvers.push(r),i.isListPage=i.isListPage||(n.isListPage??!1)):e.pendingEntries.set(t.id,{notification:t,isListPage:n.isListPage??!1,resolvers:[r]}),e.flushTimer&&clearTimeout(e.flushTimer),e.flushTimer=setTimeout(()=>{e.flushTimer=null,I(e)},M)})),R=e=>{e.flushTimer&&(clearTimeout(e.flushTimer),e.flushTimer=null);let t=P(e);t.length&&x.patch(S(`notifications.markManyAsRead`),F(t),{keepalive:!0})},z=async e=>{let[t,n]=await x.patch(S(`notifications.markFilteredAsRead`),JSON.stringify({categories:e}));if(n||!(t!=null&&t.ok))return N(),null;try{return await t.json()}catch{return N(),null}},B=()=>{let e={pendingEntries:new Map,flushTimer:null};return window.addEventListener(`pagehide`,()=>R(e)),{showErrorAlert:N,markRead:(t,n)=>L(e,t,n),markFilteredRead:z}},V=h(0),H=()=>{V.value++};export{C as a,j as i,V as n,w as o,B as r,H as t};
2//# sourceMappingURL=notificationEvents-CL78VE8Q.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.