PageSourceSearch

https://hou.la/chunk-6KA5QKPN.js

js hou.la collected 2026-09-25 03:32:17 UTC 15,950 bytes, 2 lines download raw bytes

1import{a as he,b as Ne,c as P}from"./chunk-XUDPDYHU.js";import"./chunk-VYULK3Y3.js";import{b as Ce}from"./chunk-XSIE453C.js";import{a as _e}from"./chunk-I2BF4VFZ.js";import{a as me,b as fe}from"./chunk-IXD6ECVB.js";import"./chunk-EONF3GVN.js";import"./chunk-ZV7NG4F4.js";import"./chunk-DJ5AJG3T.js";import"./chunk-6EF6RNOO.js";import"./chunk-T3DWPM4S.js";import"./chunk-K6QYQNRN.js";import{a as ye}from"./chunk-QIOURN4K.js";import{a as pe,b as de}from"./chunk-KYVCMV2E.js";import"./chunk-HWZZ5RQT.js";import"./chunk-ZNR7QNVV.js";import"./chunk-WF4KZOYP.js";import{a as ve}from"./chunk-7EBRP4XA.js";import{b as ge}from"./chunk-M6YDMVQ7.js";import{a as ue}from"./chunk-OTMVSU27.js";import{b as ce}from"./chunk-VRHU7RMY.js";import{a as Z}from"./chunk-EB6TJ75L.js";import"./chunk-QI7CEGT6.js";import"./chunk-6ND7557V.js";import{D as ne,b as ee,g as te,l as ie}from"./chunk-FOJCKIWO.js";import"./chunk-6DXFCF2C.js";import{a as ae}from"./chunk-NBMUSEX4.js";import{a as oe,b as re}from"./chunk-3AIY57KH.js";import"./chunk-AB6CKZTE.js";import"./chunk-K5O3OQFW.js";import"./chunk-2DRXLVRR.js";import{b as le,e as se}from"./chunk-RQJZECR4.js";import"./chunk-G3G5OK6Q.js";import"./chunk-AERMLNF3.js";import"./chunk-QHMYZ6SM.js";import"./chunk-PJPLTBJX.js";import"./chunk-DLIVM562.js";import"./chunk-CV2ZWZQE.js";import"./chunk-H4HD3LNW.js";import"./chunk-AQEWHUN5.js";import{d as Q,e as J}from"./chunk-YQZAETCE.js";import{o as $,r as z,x as X}from"./chunk-EO42E46J.js";import"./chunk-3QVSKJ3X.js";import{I as K,c as Y,p as j,r as q,s as H}from"./chunk-ERUCNOOT.js";import{$b as h,Cc as O,Dc as M,Ec as S,Fa as F,Fc as G,Gc as E,Hc as U,Jb as s,Kb as x,Kc as W,Lb as L,Mb as T,Qb as I,Qc as m,Rc as f,V as A,Vb as l,Wb as a,Xb as y,da as v,db as o,f as R,fc as C,gc as c,jc as D,la as u,ma as _,sa as V,sb as k,tc as d,uc as b,vc as g,wc as B,yb as N}from"./chunk-DBE7WQEG.js";import{g as w}from"./chunk-W7GRJBO5.js";var xe=()=>({"min-width":"180px"}),Te=i=>({"opacity-50":i}),Ie=(i,t,e,n)=>({"border-bottom":i,"rounded-top":t,unread:e,clickable:n}),be=()=>[10,20,50];function Oe(i,t){i&1&&(l(0,"div",6)(1,"b"),d(2),m(3,"translate"),a(),y(4,"br"),d(5),m(6,"translate"),a()),i&2&&(o(2),b(f(3,2,"MANAGER.NOTIFICATIONS.YOUR_NOTIFICATIONS")),o(3),g(" ",f(6,4,"MANAGER.NOTIFICATIONS.EMPTY_STATE_DESC"),`
2`))}function Me(i,t){if(i&1){let e=h();l(0,"button",19),C("click",function(){u(e);let r=c(2);return _(r.onResetFilters())}),y(1,"i",20),d(2),m(3,"translate"),a()}i&2&&(o(2),g(" ",f(3,1,"COMMON.RESET_FILTERS")," "))}function Se(i,t){if(i&1){let e=h();l(0,"button",21),C("click",function(){u(e);let r=c(2);return _(r.markAllAsRead())}),y(1,"i",22),d(2),m(3,"translate"),a()}if(i&2){let e=c(2);s("disabled",e.loading),o(2),g("",f(3,2,"MANAGER.NOTIFICATIONS.MARK_ALL_READ")," ")}}function Ee(i,t){if(i&1){let e=h();l(0,"div",7)(1,"div",8)(2,"span",9),y(3,"i",10),d(4),m(5,"translate"),a()(),l(6,"div",11)(7,"div",12)(8,"input",13),S("ngModelChange",function(r){u(e);let p=c();return M(p.unreadOnly,r)||(p.unreadOnly=r),_(r)}),C("change",function(){u(e);let r=c();return _(r.onFilterChange())}),a(),l(9,"label",14),d(10),m(11,"translate"),a()(),l(12,"p-select",15),m(13,"translate"),S("ngModelChange",function(r){u(e);let p=c();return M(p.selectedType,r)||(p.selectedType=r),_(r)}),C("onChange",function(){u(e);let r=c();return _(r.onFilterChange())}),a(),l(14,"span",16),d(15),a(),N(16,Me,4,3,"button",17)(17,Se,4,4,"button",18),a()()}if(i&2){let e=c();o(4),g(" ",f(5,12,"MANAGER.NOTIFICATIONS.TITLE")," "),o(4),O("ngModel",e.unreadOnly),o(2),b(f(11,
214,"MANAGER.NOTIFICATIONS.UNREAD_ONLY")),o(2),T(E(18,xe)),s("options",e.typeOptions),O("ngModel",e.selectedType),s("placeholder",f(13,16,"MANAGER.NOTIFICATIONS.ALL_TYPES")),o(3),B(" ",e.total," notification",e.total>1?"s":""," "),o(),I(e.filters&&e.filters.activeCount()>0?16:-1),o(),s("ngIf",e.getUnreadCount()>0)}}function Pe(i,t){if(i&1){let e=h();l(0,"div",23),d(1),m(2,"translate"),l(3,"a",24),C("click",function(){u(e);let r=c();return r.unreadOnly=!1,r.selectedType=null,_(r.onFilterChange())}),d(4),m(5,"translate"),a()()}i&2&&(o(),g(" ",f(2,2,"MANAGER.NOTIFICATIONS.NO_FILTER_MATCH")," "),o(3),g(" ",f(5,4,"MANAGER.NOTIFICATIONS.RESET_FILTERS")," "))}function Re(i,t){if(i&1&&(l(0,"span",45),d(1),m(2,"translate"),a()),i&2){let e=c().$implicit,n=c(2);x("background-color",n.getPriorityColor(e.priority)),o(),g(" ",f(2,3,"MANAGER.NOTIFICATIONS.NEW")," ")}}function Ae(i,t){if(i&1&&(l(0,"div",46),d(1),a()),i&2){let e=c().$implicit;o(),g(" ",e.message," ")}}function Ve(i,t){if(i&1&&(l(0,"span",47),y(1,"i",48),d(2),m(3,"translate"),a()),i&2){let e=c().$implicit;o(2),g(" ",e.actionLabel||f(3,1,"MANAGER.NOTIFICATIONS.VIEW_DETAILS")," ")}}function Fe(i,t){if(i&1){let e=h();l(0,"div",27),C("click",function(){let r=u(e).$implicit,p=c(2);return _(p.onNotificationClick(r))}),l(1,"div",28)(2,"div",29),y(3,"i",30),a()(),l(4,"div",31)(5,"div",32)(6,"span",33),d(7),a(),N(8,Re,3,5,"span",34),a(),N(9,Ae,2,1,"div",35),l(10,"div",36)(11,"span",8),y(12,"i",37),d(13),a(),l(14,"span",38),m(15,"translate"),y(16,"i",39),d(17),a(),N(18,Ve,4,3,"span",40),a()(),l(19,"div",41)(20,"div",42)(21,"button",43),m(22,"translate"),C("click",function(r){let p=u(e).$implicit;return c(2).confirmDelete(r,p),_(r.stopPropagation())}),y(23,"i",44),a()()()()}if(i&2){let e=t.$implicit,n=t.last,r=t.first,p=c(2);s("ngClass",W(22,Ie,!n,r,!e.isRead,e.actionUrl)),o(2),x("background-color",p.getPriorityColor(e.priority)+"20")("color",p.getPriorityColor(e.priority)),o(),s("ngClass",p.getNotificationIcon(e.type)),o(3),L("fw-bold",!e.isRead),o(),g(" ",e.title," "),o(),s("ngIf",!e.isRead),o(),s("ngIf",e.message),o(4),g(" ",p.getRelativeTime(e.createdAt)," "),o(),s("pTooltip",f(15,18,"MANAGER.NOTIFICATIONS.PRIORITY")+": "+p.getPriorityLabel(e.priority)),o(2),x("color",p.getPriorityColor(e.priority)),o(),g(" ",p.getPriorityLabel(e.priority)," "),o(),s("ngIf",e.actionUrl),o(3),s("pTooltip",f(22,20,"MANAGER.NOTIFICATIONS.DELETE"))}}function ke(i,t){if(i&1&&(l(0,"div",25),N(1,Fe,24,27,"div",26),a()),i&2){let e=c();s("ngClass",U(2,Te,e.loading)),o(),s("ngForOf",e.notifications)}}function Le(i,t){if(i&1){let e=h();l(0,"p-paginator",49),m(1,"translate"),C("onPageChange",function(r){u(e);let p=c();return _(p.onPageChange(r))}),a()}if(i&2){let e=c();D("currentPageReportTemplate",f(1,6,"MANAGER.NOTIFICATIONS.PAGINATION")),s("rows",e.limit)("totalRecords",e.total)("first",e.offset)("rowsPerPageOptions",E(8,be))("showCurrentPageReport",!0)}}function De(i,t){if(i&1){let e=h();l(0,"app-widget-api-error",50),C("retry",function(){u(e);let r=c();return _(r.loadNotifications())}),a()}}var we=class i{notifications=[];loading=!0;error=null;total=0;limit=20;offset=0;unreadOnly=!1;selectedType=null;typeOptions=[{label:"Tous les types",value:null},{label:"Lien mort",value:"dead_link"},{label:"Lien expir\xE9",value:"link_expired"},{label:"Lien expire bient\xF4t",value:"link_expiring_soon"},{label:"Rapport hebdomadaire",value:"weekly_report"},{label:"Rapport mensuel",value:"monthly_report"},{label:"Objectif atteint",value:"milestone_reached"},{label:"S\xE9curit\xE9 du compte",value:"account_security"},{label:"Abonnement",value:"subscription_expiring"},{label:"Mise \xE0 jour syst\xE8me",value:"system_update"},{label:"Nouveaut\xE9",value:"feature_announcement"}];destroy$=new R;isBrowser=Y(v(F));notificationService=v(he);toastService=v(Z);confirmService=v(ye);router=v(z);route=v($);qf=v(_e);destroyRef=v(V);dateFormat=v(ve);filters;ngOnInit(){this.filters=this.qf.init(this.route,[{key:"unread",default:""},{key:"type",default:""},{key:"page",default:1,type:"number"},{key:"limit",default:20,type:"number"}],()=>this.onFiltersChanged(),this.destroyRef),this.syncFromFilters(),this.loadNotifications(),this.isBrowser&&this.notificationService.newNotification.pipe(A(this.destroy$)).subscribe(t=>{this.offset===0&&!this.selectedType&&!this.unreadOnly&&(this.notifications.unshift(t),this.total++)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}loadNotifications(){return w(this,null,function*(){this.loading=!0,this.error=null;try{let t=yield this.notificationService.getNotifications({unreadOnly:this.unreadOnly,type:this.selectedType||void 0,limit:this.limit,offset:this.offset});this.notifications=t.notifications,this.total=t.total}catch(t){this.error=t?.error?.message||"Erreur lors du chargement des notifications",this.toastService.add({severity:"error",summary:"Erreur",detail:this.error??void 0,life:5e3})}finally{this.loading=!1}})}onPageChange(t){let e=Math.floor(t.first/t.rows)+1;this.filters.set({page:e,limit:t.rows}),this.syncFromFilters(),this.loadNotifications()}onFilterChange(){this.filters.set({unread:this.unreadOnly?"true":"",type:this.selectedType||"",page:1}),this.syncFromFilters(),this.loadNotifications()}syncFromFilters(){let t=this.filters.values();this.unreadOnly=t.unread==="true",this.selectedType=t.type||null;let e=t.page;this.limit=t.limit,this.offset=(e-1)*this.limit}onFiltersChanged(){this.syncFromFilters(),this.loadNotifications()}onResetFilters(){this.filters.reset()}onNotificationClick(t){return w(this,null,function*(){t.isRead||(yield this.notificationService.markAsRead(t.id),t.isRead=!0),t.actionUrl&&this.router.navigateByUrl(t.actionUrl)})}markAllAsRead(){return w(this,null,function*(){try{yield this.notificationService.markAllAsRead(),this.notifications.forEach(t=>t.isRead=!0),this.toastService.add({severity:"success",summary:"Succ\xE8s",detail
2:"Toutes les notifications ont \xE9t\xE9 marqu\xE9es comme lues",life:3e3})}catch{this.toastService.add({severity:"error",summary:"Erreur",detail:"Impossible de marquer les notifications comme lues",life:5e3})}})}confirmDelete(t,e){return w(this,null,function*(){(yield this.confirmService.confirm({message:"Voulez-vous supprimer cette notification ?",header:"Supprimer",severity:"danger",acceptLabel:"Supprimer",rejectLabel:"Annuler"}))&&(yield this.deleteNotification(e))})}deleteNotification(t){return w(this,null,function*(){try{yield this.notificationService.delete(t.id),this.notifications=this.notifications.filter(e=>e.id!==t.id),this.total--,this.toastService.add({severity:"success",summary:"Succ\xE8s",detail:"Notification supprim\xE9e",life:3e3})}catch{this.toastService.add({severity:"error",summary:"Erreur",detail:"Impossible de supprimer la notification",life:5e3})}})}getNotificationIcon(t){return Ne[t]||"pi-bell"}getPriorityColor(t){return P[t]||P.normal}getPriorityLabel(t){return{low:"Faible",normal:"Normal",high:"\xC9lev\xE9e",urgent:"Urgent"}[t]||"Normal"}getRelativeTime(t){return this.dateFormat.getRelativeTime(t)}formatDate(t){return this.dateFormat.formatDateFull(t)}getUnreadCount(){return this.notifications.filter(t=>!t.isRead).length}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=k({type:i,selectors:[["app-view-manager-notifications"]],features:[G([])],decls:7,vars:9,consts:[["class","alert alert-primary",4,"ngIf"],["class","d-flex justify-content-between align-items-center mb-2",4,"ngIf"],["class","alert alert-secondary",4,"ngIf"],["class","border rounded container-items container-fluid bg-white position-relative",3,"ngClass",4,"ngIf"],["styleClass","mt-3",3,"rows","totalRecords","first","rowsPerPageOptions","showCurrentPageReport","currentPageReportTemplate","onPageChange",4,"ngIf"],[1,"d-block","mt-5",3,"loading"],[1,"alert","alert-primary"],[1,"d-flex","justify-content-between","align-items-center","mb-2"],[1,"d-flex","align-items-center"],[1,"text-light","fs-6"],[1,"pi","pi-bell","me-2"],[1,"d-flex","align-items-center","gap-3"],[1,"form-check","form-switch","mb-0"],["type","checkbox","role","switch","id","unreadOnly",1,"form-check-input",3,"ngModelChange","change","ngModel"],["for","unreadOnly",1,"form-check-label","text-light","small"],["optionLabel","label","optionValue","value","size","small",3,"ngModelChange","onChange","options","ngModel","placeholder"],[1,"text-nowrap","fs-6","fw-normal","text-light"],["type","button",1,"btn","btn-sm","btn-outline-secondary","d-flex","align-items-center","gap-1"],["type","button","class","btn btn-sm btn-outline-primary",3,"disabled","click",4,"ngIf"],["type","button",1,"btn","btn-sm","btn-outline-secondary","d-flex","align-items-center","gap-1",3,"click"],[1,"pi","pi-filter-slash"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"pi","pi-check-square","me-1"],[1,"alert","alert-secondary"],[1,"c-pointer","text-decoration-none","text-primary","fw-bold",3,"click"],[1,"border","rounded","container-items","container-fluid","bg-white","position-relative",3,"ngClass"],["class","row p-3 notification-row",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"row","p-3","notification-row",3,"click","ngClass"],[1,"col-auto","d-flex","align-items-start","pt-1"],[1,"notification-icon-wrapper"],[1,"pi",3,"ngClass"],[1,"col","d-flex","flex-column"],[1,"d-flex","align-items-center","gap-2","mb-1"],[1,"text-dark","fs-6","fw-semibold"],["class","badge rounded-pill",3,"background-color",4,"ngIf"],["class","text-light fs-6 mb-2 notification-message",4,"ngIf"],[1,"d-flex","flex-wrap","align-items-center","gap-3","text-light","small"],[1,"pi","pi-clock","me-1"],[1,"d-flex","align-items-center",3,"pTooltip"],[1,"pi","pi-flag","me-1"],["class","d-flex align-items-center text-primary",4,"ngIf"],[1,"col-auto","d-flex","align-items-center","justify-content-end"],["role","group",1,"btn-group"],["tooltipPosition","left",1,"btn","btn-sm","text-danger","p-1",3,"click","pTooltip"],[1,"pi","pi-trash","fs-6"],[1,"badge","rounded-pill"],[1,"text-light","fs-6","mb-2","notification-message"],[1,"d-flex","align-items-center","text-primary"],[1,"pi","pi-external-link","me-1"],["styleClass","mt-3",3,"onPageChange","rows","totalRecords","first","rowsPerPageOptions","showCurrentPageReport","currentPageReportTemplate"],[3,"retry"]],template:function(e,n){e&1&&(N(0,Oe,7,6,"div",0)(1,Ee,18,19,"div",1)(2,Pe,6,6,"div",2)(3,ke,2,4,"div",3)(4,Le,2,9,"p-paginator",4)(5,De,1,0,"app-widget-api-error"),y(6,"app-widget-loading",5)),e&2&&(s("ngIf",!n.loading&&!n.error&&n.notifications.length===0&&!n.unreadOnly&&!n.selectedType),o(),s("ngIf",n.notifications.length>0||n.unreadOnly||n.selectedType),o(),s("ngIf",!n.loading&&!n.error&&n.notifications.length===0&&(n.unreadOnly||n.selectedType)),o(),s("ngIf",n.notifications.length>0),o(),s("ngIf",n.total>n.limit),o(),I(!n.loading&&n.error?5:-1),o(),T("dark"),s("loading",n.loading))},dependencies:[K,j,q,H,X,ne,ee,te,ie,se,re,oe,le,ge,ce,Ce,de,pe,fe,me,J,Q,ae,ue],styles:[".container-items[_ngcontent-%COMP%]   .notification-row[_ngcontent-%COMP%]{transition:background-color .15s;cursor:default}.container-items[_ngcontent-%COMP%]   .notification-row[_ngcontent-%COMP%]:hover{background-color:#00000005}.container-items[_ngcontent-%COMP%]   .notification-row.clickable[_ngcontent-%COMP%]{cursor:pointer}.container-items[_ngcontent-%COMP%]   .notification-row.clickable[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container-items[_ngcontent-%COMP%]   .notification-row.unread[_ngcontent-%COMP%]{background-color:#3b82f60d}.container-items[_ngcontent-%COMP%]   .notification-row.unread[_ngcontent-%COMP%]:hover{background-color:#3b82f614}.notification-icon-wrapper[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:1.1rem}.notification-message[_ngcontent-%COMP%]{line-height:1.4;max-width:600px}[_nghost-%COMP%]     .p-confirmpopup:before, [_nghost-%COMP%]     .p-confirmpopup:after{display:none!important}[_nghost-%COMP%]     .p-paginator{background:transparent;border:none;padding:0}[_nghost-%COMP%]     .p-paginator .p-paginator-current{color:var(--text-color-secondary)}@keyframes _ngcontent-%COMP%_fadeInSlide{0%{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}.notification-row[_ngcontent-%COMP%]:first-child.unread{animation:_ngcontent-%COMP%_fadeInSlide .3s ease-out}"]})};export{we as ViewManagerNotificationsComponent};

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.