(self.webpackChunkplex_web_client=self.webpackChunkplex_web_client||[]).push([[3332],{71654:(e,n,t)=>{const a=t(4429).A,s=t(70261);e.exports=s(a)},3332:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>M});var a=t(96540),s=t(96621),i=t(57347),l=t(3467),o=t(36202),r=t(46772),c=t(86213),u=t(84160),m=t(59632),d=t(53185),h=t(23176),p=t(21586),f=t.n(p);const v=m.A.ItemView.extend({className:"announcement-list-item",template:f(),ui:{thumb:".thumb",unread:".unread"},initialize:function(){this.image=new h.A({url:this.model.get("imageUrl")})},onRender:function(){this.image.setElement(this.ui.thumb),this.model.markAsRead()},onClose:function(){this.image.close()}}),g=d.A.extend({className:"list announcement-list",itemView:v});var A=t(51835),E=t.n(A);const b=m.A.Layout.extend({className:"container",template:E(),regions:{list:".announcements-container"},initialize:function(){const e=(0,l.hd)("appModel").get("user");this.collection=e.get("desktop").get("announcements")},onRender:function(){this.list.show(new g({collection:this.collection}))}});var y=t(6236),w=t(69182),x=t(75732),_=t(65293);const k=function(){const[e,n]=(0,a.useState)({isAnnouncementsPending:!0,announcementsError:!1});return(0,c.A)(()=>{(0,o.f4)((0,l.hd)("appModel")).get("announcements").fetch().then(()=>{n({isAnnouncementsPending:!1,announcementsError:!1})},()=>{n({isAnnouncementsPending:!1,announcementsError:!0})})}),e.isAnnouncementsPending?a.createElement(x.A,null,a.createElement(w.A,null)):e.announcementsError?a.createElement(_.A,{title:(0,r.A)("Announcements are not available.")}):a.createElement(y.A,{className:u.c,view:b,viewOptions:{}})};function M(){return a.createElement(i.A,null,a.createElement(s.A,null,a.createElement(k,null)))}},21586:(e,n,t)=>{var a=t(93633);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 l,o,r="",c="function",u=this.escapeExpression,m=this;return r+='<div class="card card-announcement"> <div class="unread ',((l=a.if.call(n,n&&n.read,{hash:{},inverse:m.noop,fn:m.program(1,function(e,n){return"hidden"},i),data:i}))||0===l)&&(r+=l),r+='"></div> ',l=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)===c?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)===c?t.apply(e):t)+'" target="_blank">'+u(typeof(t=e&&e.title)===c?t.apply(e):t)+'</a></h4> <a href="'+u(typeof(t=e&&e.url)===c?t.apply(e):t)+'" target="_blank"> <img class="thumb"/> </a> '},i),data:i}),(l||0===l)&&(r+=l),r+=' <div class="date">'+u((o=t(71654),o&&(o.__esModule?o.default:o)).call(n,n&&n.notifyAt,{hash:{},data:i}))+'</div> <div class="description">',((l=typeof(l=n&&n.content)===c?l.apply(n):l)||0===l)&&(r+=l),r+"</div> </div> "})},51835:(e,n,t)=>{var a=t(93633);e.exports=(a.default||a).template(function(e,n,a,s,i){var l;return this.compilerInfo=[4,">= 1.0.0"],a=this.merge(a,e.helpers),i=i||{},""+"<h2>"+(0,this.escapeExpression)((l=t(46353),l&&(l.__esModule?l.default:l)).call(n,"Announcements",{hash:{},data:i}))+'</h2> <div class="announcements-container"></div> '})}}]);