(self.webpackChunkplex_web_client=self.webpackChunkplex_web_client||[]).push([[5364],{85441:(e,n,t)=>{const a=t(84780).c,s=t(20104);e.exports=s(a)},75364:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>I});var a=t(11504),s=t(2221),i=t(28796),c=t(52180),l=t(58036),o=t(59396),r=t(46788),u=t(65026),m=t(44060),d=t(40136),h=t(80184),p=t(19e3),f=t.n(p);const v=m.c.ItemView.extend({className:"announcement-list-item",template:f(),ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new h.c({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}}),g=d.c.extend({className:"list announcement-list",itemView:v});var E=t(29244),b=t.n(E);const w=m.c.Layout.extend({className:"container",template:b(),regions:{list:".announcements-container"},initialize:function(){const e=(0,c.WI)("appModel").get("user");this.collection=e.get("desktop").get("announcements")},onRender:function(){this.list.show(new g({collection:this.collection}))}});var y=t(71572),_=t(75372),x=t(53728),k=t(17484);const A=function(){const[e,n]=(0,a.useState)({isAnnouncementsPending:!0,announcementsError:!1});return(0,r.c)((()=>{(0,l.mw)((0,c.WI)("appModel")).get("announcements").fetch().then((()=>{n({isAnnouncementsPending:!1,announcementsError:!1})}),(()=>{n({isAnnouncementsPending:!1,announcementsError:!0})}))})),e.isAnnouncementsPending?a.createElement(x.c,null,a.createElement(_.c,null)):e.announcementsError?a.createElement(k.c,{title:(0,o.c)("Announcements are not available.")}):a.createElement(y.c,{className:u._,view:w,viewOptions:{}})};function I(){return a.createElement(i.c,null,a.createElement(s.c,null,a.createElement(A,null)))}},19e3:(e,n,t)=>{var a=t(13624);e.exports=(a.default||a).template((function(e,n,a,s,i){this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),i=i||{};var c,l,o="",r="function",u=this.escapeExpression,m=this;return o+='<div class="card card-announcement"> <div class="unread ',((c=a.if.call(n,n&&n.read,{hash:{},inverse:m.noop,fn:m.program(1,(function(e,n){return"hidden"}),i),data:i}))||0===c)&&(o+=c),o+='"></div> ',c=a.if.call(n,n&&n.url,{hash:{},inverse:m.program(5,(function(e,n){var t;return""+" <h4>"+u(typeof(t=e&&e.title)===r?t.apply(e):t)+'</h4> <img class="thumb"/> '}),i),fn:m.program(3,(function(e,n){var t;return""+' <h4><a href="'+u(typeof(t=e&&e.url)===r?t.apply(e):t)+'" target="_blank">'+u(typeof(t=e&&e.title)===r?t.apply(e):t)+'</a></h4> <a href="'+u(typeof(t=e&&e.url)===r?t.apply(e):t)+'" target="_blank"> <img class="thumb"/> </a> '}),i),data:i}),(c||0===c)&&(o+=c),o+=' <div class="date">'+u((l=t(85441),l&&(l.__esModule?l.default:l)).call(n,n&&n.notifyAt,{hash:{},data:i}))+'</div> <div class="description">',((c=typeof(c=n&&n.content)===r?c.apply(n):c)||0===c)&&(o+=c),o+"</div> </div> "}))},29244:(e,n,t)=>{var a=t(13624);e.exports=(a.default||a).template((function(e,n,a,s,i){var c;return this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),i=i||{},""+"<h2>"+(0,this.escapeExpression)((c=t(27412),c&&(c.__esModule?c.default:c)).call(n,"Announcements",{hash:{},data:i}))+'</h2> <div class="announcements-container"></div> '}))}}]);