PageSourceSearch

https://www.adventistlearningcommunity.com/231.118517653410a9c3.js

js adventistlearningcommunity.com collected 2026-09-28 09:35:13 UTC 66,131 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkalc_app=self.webpackChunkalc_app||[]).push([[231],{46231:(Je,R,r)=>{r.r(R),r.d(R,{ForumModule:()=>M});var c=r(36895),m=r(19132),d=r(15861),H=r(71764),t=r(94650),p=r(16482),Q=r(43943),u=r(62268),y=r(37299),h=r(96308),x=r(95439),Y=r(98739);class g{constructor(){}ngOnInit(){}}g.\u0275fac=function(n){return new(n||g)},g.\u0275cmp=t.Xpm({type:g,selectors:[["app-forum-breadcrumb-bar"]],ngContentSelectors:["*"],decls:2,vars:0,consts:[[1,"breadcrumb-bar"]],template:function(n,e){1&n&&(t.F$t(),t.TgZ(0,"div",0),t.Hsn(1),t.qZA())},styles:['.breadcrumb-bar[_ngcontent-%COMP%]{display:flex;align-items:center;background:#ffffff;border:1px solid #ccc;border-radius:4px;box-shadow:0 1px 2px #00000014;font-size:14px;overflow:hidden;margin-bottom:32px}.breadcrumb-bar[_ngcontent-%COMP%]    >*{line-height:20px;padding:12px 32px 12px 16px;text-decoration:none;position:relative}.ellipsize[_nghost-%COMP%]   .breadcrumb-bar[_ngcontent-%COMP%]    >*:last-child{max-width:120px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media (min-width: 992px){.ellipsize[_nghost-%COMP%]   .breadcrumb-bar[_ngcontent-%COMP%]    >*:last-child{max-width:250px}}.breadcrumb-bar[_ngcontent-%COMP%]    >*:not(:last-child):after{content:url(\'data:image/svg+xml; utf8, <svg width="22" height="46" viewBox="0 0 22 46" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 45.5167L20.5 23.0001L1 0.483398" stroke="rgb(204, 204, 204)"/></svg>\');position:absolute;width:22px;height:46px;right:-2px;top:-1px}.breadcrumb-bar[_ngcontent-%COMP%]    >*:last-child{font-weight:700}']});var w=r(91311);function X(o,n){1&o&&(t.TgZ(0,"tr")(1,"td",12),t._uU(2,"No forums to list"),t.qZA()())}function tt(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.lastComment.author.firstName," ",e.lastComment.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.lastComment.createdAt)," ")}}function et(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",21),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.lastMessage.author.firstName," ",e.lastMessage.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.lastMessage.createdAt)," ")}}function nt(o,n){if(1&o&&(t.TgZ(0,"tr")(1,"td")(2,"a",14),t._UZ(3,"app-alc-avatar",15),t.qZA()(),t.TgZ(4,"td")(5,"a",16),t._uU(6),t.qZA()(),t.TgZ(7,"td")(8,"div",17),t._uU(9),t.ALo(10,"number"),t.qZA(),t.TgZ(11,"div",17),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"div",17),t._uU(15),t.ALo(16,"number"),t.qZA()(),t.TgZ(17,"td"),t.YNc(18,tt,6,5,"ng-container",18),t.YNc(19,et,6,5,"ng-container",18),t.qZA(),t.TgZ(20,"td",19),t._UZ(21,"app-alc-button",20),t.qZA()()),2&o){const e=n.$implicit,a=t.oxw(2);t.xp6(2),t.MGl("routerLink","/forums/group/",e.id,""),t.xp6(1),t.Q6J("organization",a.formatGroupAvatar(e)),t.xp6(2),t.MGl("routerLink","/forums/group/",e.id,""),t.xp6(1),t.Oqu(e.title),t.xp6(3),t.hij("Members: ",t.xi3(10,10,e.publicMemberCount,"0.0"),""),t.xp6(3),t.hij("Posts: ",t.xi3(13,13,e.postCount,"0.0"),""),t.xp6(3),t.hij("Views: ",t.xi3(16,16,e.viewCount||0,"0.0"),""),t.xp6(3),t.Q6J("ngIf",e.lastComment&&e.isCommentMostRecent),t.xp6(1),t.Q6J("ngIf",e.lastMessage&&!e.isCommentMostRecent),t.xp6(2),t.MGl("link","/forums/group/",e.id,"")}}function ot(o,n){if(1&o&&(t.ynx(0),t.YNc(1,nt,22,19,"tr",13),t.BQk()),2&o){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.dataSource.data)}}function at(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-paginator",22),t.NdJ("page",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.onPageChanged(i))}),t.qZA()}if(2&o){const e=t.oxw();t.Q6J("hidePageSize",!0)("length",e.dataSource.total)("pageIndex",e.dataSource.page-1)("pageSize",e.dataSource.pageSize)}}class F{constructor(n,e){this.forumService=n,this.assetService=e,this.input={page:"1",sort:"forumGroup.title",sortDirection:"asc"}}ngOnInit(){this.updateGroups()}updateGroups(){var n=this;return(0,d.Z)(function*(){n.dataSource=yield n.forumService.searchForumGroups(n.input).then(e=>(e.data=e.data.map(a=>({...a,isCommentMostRecent:!!(a.lastComment&&H(a.lastComment.createdAt).diff(a.lastMessage?a.lastMessage.createdAt:0)>0)})),e))})()}formatGroupAvatar(n){return{name:n.title,photo:n.avatar?this.assetService.imageUrlForAsset(n.avatar,{h:"150",w:"150",c:"fill",g:"face"}):null}}sortData(n){this.input.sort=n.active,this.input.sortDirection=n.direction,this.input.page="1",this.updateGroups()}onPageChanged(n){const e=""+(n.pageIndex+1);this.input.page=e,this.updateGroups()}}F.\u0275fac=function(n){return new(n||F)(t.Y36(p._),t.Y36(Q.do))},F.\u0275cmp=t.Xpm({type:F,selectors:[["app-forum-group-list"]],decls:28,vars:6,consts:[["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],[1,"heading"],["matSort","",1,"table","table-gray","table--bg-white",3,"matSortDisableClear","matSortActive","matSortDirection","matSortChange"],["mat-sort-header","forumGroup.title"],["mat-sort-header","forumGroup.updatedAt","start","desc"],["noForumGroups",""],[4,"ngIf","ngIfElse"],[3,"hidePageSize","length","pageIndex","pageSize","page",4,"ngIf"],["colspan","5",1,"table-empty"],[4,"ngFor","ngForOf"],[3,"routerLink"],[1,"group__image",3,"organization"],[1,"group__title",3,"routerLink"],[1,"activity-line"],[4,"ngIf"],[1,"align-right"],["text","View Group",1,"orange",3,"link"],[1,"no-wrap"],[3,"hidePageSize","length","pageIndex","pageSize","page"]],template:function(n,e){if(1&n&&(t.TgZ(0,"app-base-template",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"app-forum-breadcrumb-bar")(6,"div"),t._uU(7,"Forums"),t.qZA(),t.TgZ(8,"div"),t._uU(9,"My Forums"),t.qZA()(),t.TgZ(10,"h1",5),t._uU(11,"My Forums"),t.qZA(),t.TgZ(12,"table",6),t.NdJ("matSortChange",function(i){return e.sortData(i)}),t.TgZ(13,"thead")(14,"tr"),t._UZ(15,"th"),t.TgZ(16,"th",7),t._uU(17,"Title"),t.qZA(),t.TgZ(18,"th"),t._uU(19,"Activity"),t.qZA(),t.TgZ(20,"th",8),t._uU(21,"Last Message"),t.qZA(),t._UZ(22,"th"),t.qZA()(),t.TgZ(23,"tbody"),t.YNc(24,X,3,0,"ng-template",null,9,t.W1O),t.YNc(26,ot,2,1,"ng-container",10),t.qZA()(),t.YNc(27,at,1,4,"mat-paginator",11),t.qZA()()()()()),2&n){const a=t.MAs(25);t.xp6(12),t.Q6J("matSortDisableClear",!0)("matSortActive",e.input.sort)("matSortDirection",e.input.sortDirection),t.xp6(14),t.Q6J("ngIf",e.dataSource&&e.dataSource.data&&e.dataSource.data.length)("ngIfElse",a),t.xp6(1),t.Q6J("ngIf",e.dataSource)}},dependencies:[c.sg,c.O5,u.W,y.x,h.YE,h.nU,x.k,m.yS,Y.NW,g,c.JJ,w.o],styles:[".heading[_ngcontent-%COMP%]{margin-bottom:32px}.table--bg-white[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#ffffff}.group__image[_ngcontent-%COMP%]{display:flex;height:60px;width:60px;border-radius:50%}.group__title[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;margin-bottom:0}.align-right[_ngcontent-%COMP%]{text-align:right}"]});var C=r(19330),l=r(65412),G=r(75773);class I{constructor(n,e,a){this.dialogRef=n,this._forumService=a,this.forum=e.forum}ngOnInit(){}cancelRequest(){this._forumService.cancelRequestToJoinForum(this.forum.id).then(()=>{this.dialogRef.close(!0)})}close(){this.dialogRef.close(!1)}}
1I.\u0275fac=function(n){return new(n||I)(t.Y36(l.so),t.Y36(l.WI),t.Y36(p._))},I.\u0275cmp=t.Xpm({type:I,selectors:[["app-cancel-join-request-dialog"]],decls:8,vars:0,consts:[[3,"click"],[1,"dialog"],[1,"dialog__title"],["text","Close",3,"click"],["text","Cancel Request",1,"orange",3,"click"]],template:function(n,e){1&n&&(t.TgZ(0,"app-alc-dialog-close",0),t.NdJ("click",function(){return e.close()}),t.qZA(),t.TgZ(1,"div",1)(2,"mat-dialog-content")(3,"h2",2),t._uU(4,"Are you sure you want to cancel your request?"),t.qZA()(),t.TgZ(5,"mat-dialog-actions")(6,"app-alc-button",3),t.NdJ("click",function(){return e.close()}),t.qZA(),t.TgZ(7,"app-alc-button",4),t.NdJ("click",function(){return e.cancelRequest()}),t.qZA()()())},dependencies:[u.W,G.S,l.xY,l.H8]});var it=r(11481);function st(o,n){1&o&&(t.ynx(0),t._uU(1,"s"),t.BQk())}function rt(o,n){if(1&o&&t._UZ(0,"div",12),2&o){const e=t.oxw();t.Udp("background-image",e.thumbnail)}}class q{constructor(n,e,a,i){this.dialogRef=n,this._forumService=i,this.forum=e.forum,this.forum&&(this.thumbnail=this.forum.avatar?a.bypassSecurityTrustStyle(`url('${this.forum.avatar.url}')`):void 0)}ngOnInit(){}confirm(){this._forumService.requestToJoinForum(this.forum.id).then(()=>{this.dialogRef.close(!0)})}close(){this.dialogRef.close(!1)}}q.\u0275fac=function(n){return new(n||q)(t.Y36(l.so),t.Y36(l.WI),t.Y36(it.H7),t.Y36(p._))},q.\u0275cmp=t.Xpm({type:q,selectors:[["app-join-forum-dialog"]],decls:20,vars:4,consts:[[3,"click"],[1,"dialog"],[1,"dialog__title"],[1,"dialog__description"],[1,"dialog__slat","slat"],[1,"slat__info"],[1,"slat__title"],[1,"slat__subtitle"],[4,"ngIf"],["class","slat__image",3,"backgroundImage",4,"ngIf"],["text","Close",3,"click"],["text","Confirm",1,"orange",3,"click"],[1,"slat__image"]],template:function(n,e){1&n&&(t.TgZ(0,"app-alc-dialog-close",0),t.NdJ("click",function(){return e.close()}),t.qZA(),t.TgZ(1,"div",1)(2,"mat-dialog-content")(3,"h2",2),t._uU(4,"You are about to request to join a forum."),t.qZA(),t.TgZ(5,"div",3)(6,"p"),t._uU(7," You will receive a notification when your request to join has been approved by the forum manager. "),t.qZA()(),t.TgZ(8,"div",4)(9,"div",5)(10,"div")(11,"div",6),t._uU(12),t.qZA(),t.TgZ(13,"div",7),t._uU(14),t.YNc(15,st,2,0,"ng-container",8),t.qZA()()(),t.YNc(16,rt,1,2,"div",9),t.qZA()(),t.TgZ(17,"mat-dialog-actions")(18,"app-alc-button",10),t.NdJ("click",function(){return e.close()}),t.qZA(),t.TgZ(19,"app-alc-button",11),t.NdJ("click",function(){return e.confirm()}),t.qZA()()()),2&n&&(t.xp6(12),t.Oqu(e.forum.title),t.xp6(2),t.hij("",e.forum.memberCount," Member"),t.xp6(1),t.Q6J("ngIf",1!=e.forum.memberCount),t.xp6(1),t.Q6J("ngIf",e.thumbnail))},dependencies:[c.O5,u.W,G.S,l.xY,l.H8],styles:[".dialog__slat[_ngcontent-%COMP%]{margin-bottom:16px}.slat__subtitle[_ngcontent-%COMP%]{margin-top:4px;font-size:.8625em}"]});var D=r(26342),S=r(97392);class v{constructor(){this.message="You do not have access to view this page."}ngOnInit(){}}function ct(o,n){if(1&o&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&o){const e=t.oxw();
1t.xp6(1),t.Oqu(e.group.title)}}v.\u0275fac=function(n){return new(n||v)},v.\u0275cmp=t.Xpm({type:v,selectors:[["app-no-access"]],inputs:{message:"message"},decls:6,vars:1,consts:[[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],[1,"content"],["type","error"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"app-alc-form-notification",4),t._uU(5),t.qZA()()()()()),2&n&&(t.xp6(5),t.Oqu(e.message))},dependencies:[D.F],styles:[".content[_ngcontent-%COMP%]{background-color:#fff;padding:16px}app-alc-form-notification[_ngcontent-%COMP%]{margin-bottom:0}"]});const mt=function(o){return["/manage","forums","group",o]};function lt(o,n){if(1&o&&(t.TgZ(0,"a",12)(1,"span",13),t._uU(2,"edit"),t.qZA(),t._uU(3," Edit "),t.qZA()),2&o){const e=t.oxw(2);t.Q6J("routerLink",t.VKq(1,mt,e.group.id))}}function _t(o,n){if(1&o&&(t.TgZ(0,"h1"),t._uU(1),t.YNc(2,lt,4,3,"a",11),t.qZA()),2&o){const e=t.oxw();t.xp6(1),t.hij(" ",e.group.title," "),t.xp6(1),t.Q6J("ngIf",e.canManageForumGroup)}}function pt(o,n){1&o&&(t.TgZ(0,"app-alc-form-notification",14)(1,"mat-icon"),t._uU(2,"check_circle"),t.qZA(),t._uU(3," Your request was successfully submitted."),t.qZA())}function ut(o,n){1&o&&(t.TgZ(0,"tr")(1,"td",20),t._uU(2,"No forums to list"),t.qZA()())}function gt(o,n){if(1&o&&(t.TgZ(0,"a",31),t._UZ(1,"app-alc-avatar",32),t.qZA()),2&o){const e=t.oxw().$implicit,a=t.oxw(3);t.MGl("routerLink","/forums/detail/",e.id,""),t.xp6(1),t.Q6J("organization",a.formatAvatar(e))}}function dt(o,n){if(1&o&&t._UZ(0,"app-alc-avatar",32),2&o){const e=t.oxw().$implicit,a=t.oxw(3);t.Q6J("organization",a.formatAvatar(e))}}function ft(o,n){if(1&o&&(t.TgZ(0,"a",33),t._uU(1),t.qZA()),2&o){const e=t.oxw().$implicit;t.MGl("routerLink","/forums/detail/",e.id,""),t.xp6(1),t.Oqu(e.title)}}function ht(o,n){if(1&o&&t._uU(0),2&o){const e=t.oxw().$implicit;t.hij(" ",e.title," ")}}function xt(o,n){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw(4);t.xp6(1),t.Oqu(t.xi3(2,1,e.group.publicMemberCount,"0.0"))}}function Ct(o,n){if(1&o&&(t.TgZ(0,"span"),t._uU(1),t.ALo(2,"number"),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,e.memberCount,"0.0"))}}function vt(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",34),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.lastComment.author.firstName," ",e.lastComment.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.lastComment.createdAt)," ")}}function bt(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",34),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.lastMessage.author.firstName," ",e.lastMessage.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.lastMessage.createdAt)," ")}}function Zt(o,n){if(1&o&&t._UZ(0,"app-alc-button",35),2&o){const e=t.oxw().$implicit;t.Q6J("link","/forums/detail/"+e.id)}}function Tt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"app-alc-button",36),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.openRequestToJoinDialog(i))}),t.qZA()}}function At(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"app-alc-button",37),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(3);return t.KtG(s.cancelRequestToJoinDialog(i))}),t.qZA()}}function Mt(o,n){if(1&o&&(t.TgZ(0,"tr")(1,"td"),t.YNc(2,gt,2,2,"a",22),t.YNc(3,dt,1,1,"ng-template",null,23,t.W1O),t.qZA(),t.TgZ(5,"td"),t.YNc(6,ft,2,2,"a",24),t.YNc(7,ht,1,1,"ng-template",null,25,t.W1O),t.qZA(),t.TgZ(9,"td")(10,"div",26),t._uU(11,"Members: "),t.YNc(12,xt,3,4,"span",6),t.YNc(13,Ct,3,4,"span",6),t.qZA(),t.TgZ(14,"div",26),t._uU(15),t.ALo(16,"number"),t.qZA(),t.TgZ(17,"div",26),t._uU(18),t.ALo(19,"number"),t.qZA()(),t.TgZ(20,"td"),t.YNc(21,vt,6,5,"ng-container",6),t.YNc(22,bt,6,5,"ng-container",6),t.qZA(),t.TgZ(23,"td",27),t.YNc(24,Zt,1,1,"app-alc-button",28),t.YNc(25,Tt,1,0,"app-alc-button",29),t.YNc(26,At,1,0,"app-alc-button",30),t.qZA()()),2&o){const e=n.$implicit,a=t.MAs(4),i=t.MAs(8);t.ekj("table--add-hover","open"==e.privacy||"approved"===e.myMemberStatus),t.xp6(2),t.Q6J("ngIf","o
1pen"==e.privacy||"approved"===e.myMemberStatus)("ngIfElse",a),t.xp6(4),t.Q6J("ngIf","open"==e.privacy||"approved"===e.myMemberStatus)("ngIfElse",i),t.xp6(6),t.Q6J("ngIf","open"===e.privacy),t.xp6(1),t.Q6J("ngIf","open"!==e.privacy),t.xp6(2),t.hij("Posts: ",t.xi3(16,15,e.postCount,"0.0"),""),t.xp6(3),t.hij("Views: ",t.xi3(19,18,e.viewCount||0,"0.0"),""),t.xp6(3),t.Q6J("ngIf",e.lastComment&&e.isCommentMostRecent),t.xp6(1),t.Q6J("ngIf",e.lastMessage&&!e.isCommentMostRecent),t.xp6(2),t.Q6J("ngIf","open"==e.privacy||"approved"===e.myMemberStatus),t.xp6(1),t.Q6J("ngIf","request"==e.privacy&&!e.myMemberStatus),t.xp6(1),t.Q6J("ngIf","request"==e.privacy&&"pending"===e.myMemberStatus)}}function yt(o,n){if(1&o&&(t.ynx(0),t.YNc(1,Mt,27,21,"tr",21),t.BQk()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.dataSource.data)}}function wt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"table",15),t.NdJ("matSortChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.sortData(i))}),t.TgZ(1,"thead")(2,"tr"),t._UZ(3,"th"),t.TgZ(4,"th",16),t._uU(5,"Title"),t.qZA(),t.TgZ(6,"th"),t._uU(7,"Activity"),t.qZA(),t.TgZ(8,"th",17),t._uU(9,"Last Message"),t.qZA(),t._UZ(10,"th"),t.qZA()(),t.TgZ(11,"tbody"),t.YNc(12,ut,3,0,"ng-template",null,18,t.W1O),t.YNc(14,yt,2,1,"ng-container",19),t.qZA()()}if(2&o){const e=t.MAs(13),a=t.oxw();t.Q6J("matSortDisableClear",!0)("matSortActive",a.input.sort)("matSortDirection",a.input.sortDirection),t.xp6(14),t.Q6J("ngIf",a.dataSource&&a.dataSource.data&&a.dataSource.data.length)("ngIfElse",e)}}function Ft(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-paginator",38),t.NdJ("page",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.onPageChanged(i))}),t.qZA()}if(2&o){const e=t.oxw();t.Q6J("hidePageSize",!0)("length",e.dataSource.total)("pageIndex",e.dataSource.page-1)("pageSize",e.dataSource.pageSize)}}function It(o,n){1&o&&t._UZ(0,"app-no-access",39)}class J{constructor(n,e,a,i){this._route=n,this.forumService=e,this.dialog=a,this.assetService=i,this.canManageForumGroup=!1,this.hasAccess=!0}ngOnInit(){var n=this;return(0,d.Z)(function*(){const e=n._route.snapshot.params.groupId;n.forumService.canManageForumGroup(e).then(a=>n.canManageForumGroup=a),n.group=yield n.forumService.getForumGroup(e).catch(a=>{401===a.status&&(n.hasAccess=!1)}),n.group&&(n.input={forumGroupId:n.group.id,page:"1",sort:"forum.title",sortDirection:"asc"},n.refresh())})()}formatAvatar(n){return{name:n.title,photo:n.avatar?this.assetService.imageUrlForAsset(n.avatar,{h:"150",w:"150",c:"fill",g:"face"}):null}}refresh(){var n=this;return(0,d.Z)(function*(){!n.group||(n.dataSource=yield n.forumService.searchForums(n.input).then(e=>(e.data=e.data.map(a=>({...a,isCommentMostRecent:!!(a.lastComment&&H(a.lastComment.createdAt).diff(a.lastMessage?a.lastMessage.createdAt:0)>0)})),e)))})()}sortData(n){this.input.sort=n.active,this.input.sortDirection=n.direction,this.input.page="1",this.refresh()}onPageChanged(n){const e=""+(n.pageIndex+1);this.input.page=e,this.refresh()}openRequestToJoinDialog(n){const e=C.C.defaultDialogConfig();e.data={forum:n},this.dialog.open(q,e).afterClosed().subscribe(i=>{i&&(this.requestToJoinSuccess=!0,this.refresh())})}cancelRequestToJoinDialog(n){const e=C.C.defaultDialogConfig();e.data={forum:n},this.dialog.open(I,e).afterClosed().subscribe(i=>{i&&(this.requestToJoinSuccess=!1,this.refresh())})}}function qt(o,n){if(1&o&&(t.ynx(0),t._uU(1),t.BQk()),2&o){const e=t.oxw();
1t.xp6(1),t.Oqu(e.forum.forumGroup.publicMemberCount)}}function St(o,n){if(1&o&&(t.ynx(0),t._uU(1),t.BQk()),2&o){const e=t.oxw();t.xp6(1),t.Oqu(e.forum.memberCount)}}function Jt(o,n){if(1&o&&t._UZ(0,"app-alc-button",9),2&o){const e=t.oxw();t.Q6J("link","/forums/detail/"+e.forum.id+"/create")}}function Ot(o,n){if(1&o&&t._UZ(0,"app-alc-button",10),2&o){const e=t.oxw();t.Q6J("link","/forums/detail/"+e.forum.id)}}J.\u0275fac=function(n){return new(n||J)(t.Y36(m.gz),t.Y36(p._),t.Y36(l.uw),t.Y36(Q.do))},J.\u0275cmp=t.Xpm({type:J,selectors:[["app-list"]],decls:16,vars:6,consts:[["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],["routerLink","/forums"],[4,"ngIf"],["type","success",4,"ngIf"],["class","table table-gray table--bg-white table-gray--no-hover","matSort","",3,"matSortDisableClear","matSortActive","matSortDirection","matSortChange",4,"ngIf"],[3,"hidePageSize","length","pageIndex","pageSize","page",4,"ngIf"],["message","You do not have access to view this forum group.",4,"ngIf"],["class","edit__link",3,"routerLink",4,"ngIf"],[1,"edit__link",3,"routerLink"],[1,"material-icons","notranslate"],["type","success"],["matSort","",1,"table","table-gray","table--bg-white","table-gray--no-hover",3,"matSortDisableClear","matSortActive","matSortDirection","matSortChange"],["mat-sort-header","forum.title"],["mat-sort-header","forum.updatedAt","start","desc"],["noForums",""],[4,"ngIf","ngIfElse"],["colspan","5",1,"table-empty"],[3,"table--add-hover",4,"ngFor","ngForOf"],[3,"routerLink",4,"ngIf","ngIfElse"],["simpleAvatar",""],["class","forum__title",3,"routerLink",4,"ngIf","ngIfElse"],["simpleTitle",""],[1,"activity-line"],[1,"align-right"],["text","View Forum","class","orange full-width",3,"link",4,"ngIf"],["text","Request to Join","class","outline-primary full-width",3,"buttonClick",4,"ngIf"],["text","Cancel Request","class","outline-primary full-width",3,"buttonClick",4,"ngIf"],[3,"routerLink"],[1,"forum__image",3,"organization"],[1,"forum__title",3,"routerLink"],[1,"no-wrap"],["text","View Forum",1,"orange","full-width",3,"link"],["text","Request to Join",1,"outline-primary","full-width",3,"buttonClick"],["text","Cancel Request",1,"outline-primary","full-width",3,"buttonClick"],[3,"hidePageSize","length","pageIndex","pageSize","page"],["message","You do not have access to view this forum group."]],template:function(n,e){1&n&&(t.TgZ(0,"app-base-template",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"app-forum-breadcrumb-bar")(6,"div"),t._uU(7," Forums "),t.qZA(),t.TgZ(8,"a",5),t._uU(9," My Forums "),t.qZA(),t.YNc(10,ct,2,1,"div",6),t.qZA(),t.YNc(11,_t,3,2,"h1",6),t.YNc(12,pt,4,0,"app-alc-form-notification",7),t.YNc(13,wt,15,5,"table",8),t.YNc(14,Ft,1,4,"mat-paginator",9),t.qZA()()(),t.YNc(15,It,1,0,"app-no-access",10),t.qZA()()),2&n&&(t.xp6(10),t.Q6J("ngIf",e.group),t.xp6(1),t.Q6J("ngIf",e.group),t.xp6(1),t.Q6J("ngIf",e.requestToJoinSuccess),t.xp6(1),t.Q6J("ngIf",e.group),t.xp6(1),t.Q6J("ngIf",e.dataSource),t.xp6(1),t.Q6J("ngIf",!e.hasAccess))},dependencies:[c.sg,c.O5,u.W,D.F,y.x,S.Hw,h.YE,h.nU,x.k,m.yS,Y.NW,g,v,c.JJ,w.o],styles:[".heading[_ngcontent-%COMP%]{margin-bottom:32px}h1[_ngcontent-%COMP%]{display:flex;align-items:baseline}.edit__link[_ngcontent-%COMP%]{display:flex;margin-left:16px;font-size:.6em;text-decoration:none}.edit__link[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:inherit;margin-right:4px}.table--bg-white[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#ffffff}.forum__image[_ngcontent-%COMP%]{display:flex;height:60px;width:60px;border-radius:50%}.forum__title[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;margin-bottom:0}.align-right[_ngcontent-%COMP%]{text-align:right}"]});class f{constructor(n){this.assetService=n,this.showCreateCTA=!1}ngOnInit(){this.avatar={name:this.forum.title,photo:this.forum.avatar?this.assetService.imageUrlForAsset(this.forum.avatar,{h:"150",w:"150",c:"fill",g:"face"}):null}}}function Ut(o,n){if(1&o&&(t.TgZ(0,"a",11),t._uU(1),t.qZA()),2&o){const e=t.oxw();t.MGl("routerLink","/forums/group/",e.forum.forumGroupId,""),t.xp6(1),t.hij(" ",e.forum.forumGroup.title," ")}}function Pt(o,n){if(1&o&&(t.TgZ(0,"div"),t._uU(1),t.qZA()),2&o){const e=t.oxw();
1t.xp6(1),t.Oqu(e.forum.title)}}f.\u0275fac=function(n){return new(n||f)(t.Y36(Q.do))},f.\u0275cmp=t.Xpm({type:f,selectors:[["app-forum-summary-card"]],inputs:{forum:"forum",showCreateCTA:"showCreateCTA"},decls:31,vars:13,consts:[[1,"card"],[1,"card__content","card__content--compressed"],[1,"avatar-lockup"],[1,"forum__image",3,"organization"],[1,"icon-list"],[4,"ngIf"],[3,"routerLink"],["text","Create New Post","class","orange full-width",3,"link",4,"ngIf"],["text","View All Posts","class","outline-primary full-width",3,"link",4,"ngIf"],["text","Create New Post",1,"orange","full-width",3,"link"],["text","View All Posts",1,"outline-primary","full-width",3,"link"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"app-alc-avatar",3),t.TgZ(4,"h3"),t._uU(5),t.qZA()(),t.TgZ(6,"p"),t._uU(7),t.qZA(),t._UZ(8,"hr"),t.TgZ(9,"div",4)(10,"div")(11,"mat-icon"),t._uU(12,"event"),t.qZA(),t.TgZ(13,"div"),t._uU(14),t.ALo(15,"date"),t.qZA()(),t.TgZ(16,"div")(17,"mat-icon"),t._uU(18,"people"),t.qZA(),t.TgZ(19,"div"),t.YNc(20,qt,2,1,"ng-container",5),t.YNc(21,St,2,1,"ng-container",5),t._uU(22," members "),t.qZA()(),t.TgZ(23,"div")(24,"mat-icon"),t._uU(25,"file_copy"),t.qZA(),t.TgZ(26,"div")(27,"a",6),t._uU(28),t.qZA()()()(),t.YNc(29,Jt,1,1,"app-alc-button",7),t.YNc(30,Ot,1,1,"app-alc-button",8),t.qZA()()),2&n&&(t.xp6(3),t.Q6J("organization",e.avatar),t.xp6(2),t.Oqu(e.forum.title),t.xp6(2),t.Oqu(e.forum.description),t.xp6(7),t.hij("Created ",t.xi3(15,10,e.forum.createdAt,"MMMM d, yyyy"),""),t.xp6(6),t.Q6J("ngIf","open"===e.forum.privacy),t.xp6(1),t.Q6J("ngIf","request"===e.forum.privacy),t.xp6(6),t.MGl("routerLink","/forums/detail/",e.forum.id,"/files"),t.xp6(1),t.hij("",e.forum.fileCount," files uploaded"),t.xp6(1),t.Q6J("ngIf",e.showCreateCTA),t.xp6(1),t.Q6J("ngIf",!e.showCreateCTA))},dependencies:[c.O5,u.W,y.x,S.Hw,m.yS,c.uU],styles:[".avatar-lockup[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:13px}.avatar-lockup[_ngcontent-%COMP%] > app-alc-avatar[_ngcontent-%COMP%]{height:60px;width:60px;min-width:60px;margin-right:19px}.avatar-lockup[_ngcontent-%COMP%]   h3[_ngcontent-%COMP%]{margin:0}.icon-list[_ngcontent-%COMP%]{margin:16px 0}.icon-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:8px}.icon-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{margin-right:16px}"]});const kt=function(o){return["/manage","forums",o]};function Nt(o,n){if(1&o&&(t.TgZ(0,"a",13)(1,"span",14),t._uU(2,"edit"),t.qZA(),t._uU(3," Edit "),t.qZA()),2&o){const e=t.oxw(2);t.Q6J("routerLink",t.VKq(1,kt,e.forum.id))}}function Qt(o,n){if(1&o&&(t.TgZ(0,"h1"),t._uU(1),t.YNc(2,Nt,4,3,"a",12),t.qZA()),2&o){const e=t.oxw();
1t.xp6(1),t.hij(" ",e.forum.title," "),t.xp6(1),t.Q6J("ngIf",e.canManageForum)}}function Yt(o,n){1&o&&(t.TgZ(0,"tr")(1,"td",25),t._uU(2,"No messages to list"),t.qZA()())}function Dt(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",30),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.lastComment.author.firstName," ",e.lastComment.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.lastComment.createdAt)," ")}}function Lt(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"span",30),t._uU(2),t.qZA(),t._UZ(3,"br"),t._uU(4),t.ALo(5,"timeAgo"),t.BQk()),2&o){const e=t.oxw().$implicit;t.xp6(2),t.AsE("",e.author.firstName," ",e.author.lastName,""),t.xp6(2),t.hij("",t.lcZ(5,3,e.createdAt)," ")}}function Gt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr",27),t.NdJ("click",function(){const s=t.CHM(e).$implicit,N=t.oxw(3);return t.KtG(N.viewMessage(s))}),t.TgZ(1,"td")(2,"a",28),t._uU(3),t.qZA(),t.TgZ(4,"div",29),t._uU(5),t.ALo(6,"timeAgo"),t.qZA()(),t.TgZ(7,"td"),t._uU(8),t.qZA(),t.TgZ(9,"td"),t.YNc(10,Dt,6,5,"ng-container",8),t.YNc(11,Lt,6,5,"ng-container",8),t.qZA()()}if(2&o){const e=n.$implicit,a=t.oxw(3);t.xp6(2),t.hYB("routerLink","/forums/detail/",a.forum.id,"/message/",e.id,""),t.xp6(1),t.Oqu(e.title),t.xp6(2),t.lnq("",e.author.firstName," ",e.author.lastName," \u2022 ",t.lcZ(6,9,e.createdAt),""),t.xp6(3),t.Oqu(e.commentCount||0),t.xp6(2),t.Q6J("ngIf",e.lastComment),t.xp6(1),t.Q6J("ngIf",!e.lastComment)}}function Et(o,n){if(1&o&&(t.ynx(0),t.YNc(1,Gt,12,11,"tr",26),t.BQk()),2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.dataSource.data)}}function zt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"mat-paginator",31),t.NdJ("page",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onPageChanged(i))}),t.qZA()}if(2&o){const e=t.oxw(2);t.Q6J("hidePageSize",!0)("length",e.dataSource.total)("pageIndex",e.dataSource.page-1)("pageSize",e.dataSource.pageSize)}}function Rt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",3)(1,"div",15)(2,"table",16),t.NdJ("matSortChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.sortData(i))}),t.TgZ(3,"thead")(4,"tr")(5,"th",17),t._uU(6,"Title"),t.qZA(),t.TgZ(7,"th",18),t._uU(8,"Comments"),t.qZA(),t.TgZ(9,"th",19),t._uU(10,"Last Comment"),t.qZA()()(),t.TgZ(11,"tbody"),t.YNc(12,Yt,3,0,"ng-template",null,20,t.W1O),t.YNc(14,Et,2,1,"ng-container",21),t.qZA()(),t.YNc(15,zt,1,4,"mat-paginator",22),t.qZA(),t.TgZ(16,"div",23),t._UZ(17,"app-forum-summary-card",24),t.qZA()()}if(2&o){const e=t.MAs(13),a=t.oxw();t.xp6(2),t.Q6J("matSortStart","desc")("matSortActive",a.input.sort)("matSortDirection",a.input.sortDirection),t.xp6(12),t.Q6J("ngIf",a.dataSource.data&&a.dataSource.data.length)("ngIfElse",e),t.xp6(1),t.Q6J("ngIf",a.dataSource),t.xp6(2),t.Q6J("forum",a.forum)("showCreateCTA",!0)}}function Ht(o,n){1&o&&t._UZ(0,"app-no-access",32)}class O{constructor(n,e,a){this.route=n,this.router=e,this.forumService=a,this.hasAccess=!0,this.canManageForum=!1,this.input={page:"1",sort:"message.createdAt",sortDirection:"desc"}}ngOnInit(){var n=this;return(0,d.Z)(function*(){const{forumId:e}=n.route.snapshot.params;try{yield Promise.all([n.forumService.getForum(e).then(a=>n.forum=a),n.forumService.getForumMessages(e,n.input).then(a=>n.dataSource=a),n.forumService.canManageForum(e).then(a=>n.canManageForum=a)])}catch(a){401===a.status&&(n.hasAccess=!1)}})()}refresh(){this.forumService.getForumMessages(this.forum.id,this.input).then(n=>this.dataSource=n)}viewMessage(n){this.router.navigate(["forums","detail",this.forum.id,"message",n.id])}sortData(n){n.direction||(n.active="message.createdAt",n.direction="desc"),this.input.sort=n.active,this.input.sortDirection=n.direction,this.input.page="1",this.refresh()}onPageChanged(n){const e=""+(n.pageIndex+1);this.input.page=e,this.refresh()}}O.\u0275fac=function(n){return new(n||O)(t.Y36(m.gz),t.Y36(m.F0),t.Y36(p._))},O.\u0275cmp=t.Xpm({type:O,selectors:[["app-forum-detail"]],decls:15,vars:5,consts:[["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],[1,"ellipsize"],["routerLink","/forums"],[3,"routerLink",4,"ngIf"],[4,"ngIf"],["class","grid__row",4,"ngIf"],["message","You do not have access to view this forum.",4,"ngIf"],[3,"routerLink"],["class","edit__link",3,"routerLink",4,"ngIf"],[1,"edit__link",3,"routerLink"],[1,"material-icons","notranslate"],[1,"grid__col","grid__col--8"],["matSort","",1,"table","table-gray","table--bg-white",3,"matSortStart","matSortActive","matSortDirection","matSortChange"],["mat-sort-header","message.title","start","asc"],["mat-sort-header","commentCount"],["mat-sort-header","message.updatedAt"],["noMessages",""],[4,"ngIf","ngIfElse"],[3,"hidePageSize","length","pageIndex","pageSize","page",4,"ngIf"],[1,"grid__col","grid__col--4"],[3,"forum","showCreateCTA"],["colspan","3",1,"table-empty"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"message__title",3,"routerLink"],[1,"subtitle"],[1,"no-wrap"],[3,"hidePageSize","length","pageIndex","pageSize","page"],["message","You do not have access to view this forum."]],template:function(n,e){1&n&&(t.TgZ(0,"app-base-template",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"app-forum-breadcrumb-bar",5)(6,"div"),t._uU(7," Forums "),t.qZA(),t.TgZ(8,"a",6),t._uU(9," My Forums "),t.qZA(),t.YNc(10,Ut,2,2,"a",7),t.YNc(11,Pt,2,1,"div",8),t.qZA(),t.YNc(12,Qt,3,2,"h1",8),t.qZA()(),t.YNc(13,Rt,18,8,"div",9),t.qZA(),t.YNc(14,Ht,1,0,"app-no-access",10),t.qZA()()),2&n&&(t.xp6(10),t.Q6J("ngIf",e.forum),t.xp6(1),t.Q6J("ngIf",e.forum),t.xp6(1),t.Q6J("ngIf",e.forum),t.xp6(1),t.Q6J("ngIf",e.forum&&e.dataSource&&e.dataSource.data),t.xp6(1),t.Q6J("ngIf",!e.hasAccess))},dependencies:[c.sg,c.O5,h.YE,h.nU,x.k,m.yS,Y.NW,g,f,v,w.o],styles:[".heading[_ngcontent-%COMP%]{margin-bottom:32px}h1[_ngcontent-%COMP%]{display:flex;align-items:baseline}.edit__link[_ngcontent-%COMP%]{display:flex;margin-left:16px;font-size:.6em;text-decoration:none}.edit__link[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:inherit;margin-right:4px}.table--bg-white[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   thead[_ngcontent-%COMP%], .table--bg-white[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{background:#ffffff}.message__title[_ngcontent-%COMP%]{font-size:1.2em;font-weight:700;margin-bottom:0}.subtitle[_ngcontent-%COMP%]{font-size:.9em;line-height:2em}.no-wrap[_ngcontent-%COMP%]{white-space:nowrap}"]});var _=r(24006),jt=r(46243);function Kt(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1,"You've chosen to flag this comment."),t.qZA())}function $t(o,n){1&o&&(t.TgZ(0,"p"),t._uU(1,"You've chosen to flag this post."),t.qZA())}function Bt(o,n){if(1&o){const e=t.EpF();t.ynx(0),t.YNc(1,Kt,2,0,"p",2),t.YNc(2,$t,2,0,"p",2),t._UZ(3,"app-alc-textarea",4),t.TgZ(4,"app-alc-button",5),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.report())}),t.qZA(),t.BQk()}if(2&o){const e=t.oxw();
1t.xp6(1),t.Q6J("ngIf","comment"===e.type),t.xp6(1),t.Q6J("ngIf","post"===e.type),t.xp6(1),t.Q6J("inputControl",e.form.controls.message),t.xp6(1),t.Q6J("disabled",e.submitting)}}function Wt(o,n){1&o&&(t.TgZ(0,"app-alc-form-notification",6),t._uU(1,"Thank you, your message has been sent."),t.qZA())}class b{constructor(n,e,a,i){this.dialogRef=n,this._forumService=e,this.success=!1,this.submitting=!1,this.type=a.type,this.commentId=a.commentId,this.forumPostId=a.forumPostId,this.title=a.title,this.form=i.group({message:["",_.kI.required]})}report(){if(this.form.invalid)return;this.submitting=!0;const n=this.form.value.message;"comment"===this.type?this._forumService.flagForumMessageComment(this.forumPostId,this.commentId,n).then(()=>{this.success=!0,setTimeout(()=>this.close(),2e3)}).catch(()=>this.submitting=!1):this._forumService.flagForumMessage(this.forumPostId,n).then(()=>{this.success=!0,setTimeout(()=>this.close(),2e3)}).catch(()=>this.submitting=!1)}close(){this.dialogRef.close()}}b.\u0275fac=function(n){return new(n||b)(t.Y36(l.so),t.Y36(p._),t.Y36(l.WI),t.Y36(_.QS))},b.\u0275cmp=t.Xpm({type:b,selectors:[["app-flag-dialog"]],decls:5,vars:2,consts:[[3,"click"],[1,"dialog"],[4,"ngIf"],["type","success",4,"ngIf"],["label","Leave a Comment","placeholder","Please tell us why you feel this is inappropriate",3,"inputControl"],["text","Flag",1,"orange","full-width",3,"disabled","click"],["type","success"]],template:function(n,e){1&n&&(t.TgZ(0,"app-alc-dialog-close",0),t.NdJ("click",function(){return e.close()}),t.qZA(),t.TgZ(1,"div",1)(2,"mat-dialog-content"),t.YNc(3,Bt,5,4,"ng-container",2),t.YNc(4,Wt,2,0,"app-alc-form-notification",3),t.qZA()()),2&n&&(t.xp6(3),t.Q6J("ngIf",!e.success),t.xp6(1),t.Q6J("ngIf",e.success))},dependencies:[c.O5,u.W,D.F,jt.l,G.S,l.xY]});var j=r(69002),Vt=r(26433),K=r(32176),$=r(55283),E=r(53050),z=r(60555),B=r(4859),L=r(28255),W=r(10266);class Z{}function Xt(o,n){if(1&o&&t._UZ(0,"app-forum-asset-row",15),2&o){const e=t.oxw().$implicit;t.Q6J("asset",e.asset)}}function te(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",16),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.reply(i))}),t.TgZ(1,"mat-icon"),t._uU(2,"chat_bubble_outline"),t.qZA(),t._uU(3," Reply "),t.qZA()}}function ee(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",17,18),t.NdJ("click",function(){t.CHM(e);const i=t.MAs(1);return t.KtG(i.toggle())}),t.TgZ(2,"mat-icon"),t._uU(3,"chat_bubble_outline"),t.qZA(),t._uU(4," Reply "),t.qZA()}2&o&&t.Q6J("matTooltip","This thread has reached the maximum number of replies. You can reply to the previous thread.")}function ne(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",19),t.NdJ("click",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.openDeleteCommentDialog(i))}),t._uU(1," Delete "),t.qZA()}}function oe(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",29)(1,"a",30),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(4);return t.KtG(i.toggleAttachment())}),t.TgZ(2,"i",31),t._uU(3,"close"),t.qZA()(),t._UZ(4,"app-alc-upload",32),t.qZA()}if(2&o){const e=t.oxw(4);t.xp6(4),t.Q6J("inputControl",e.form.controls.assetId)}}function ae(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"form",20),t.NdJ("ngSubmit",function(){t.CHM(e);const i=t.oxw().$implicit,s=t.oxw(2);return t.KtG(s.submitComment(i))}),t.TgZ(1,"div",21)(2,"div",22),t._UZ(3,"app-alc-avatar",4),t._uU(4),t.qZA(),t.TgZ(5,"mat-icon",23),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.closeReply())}),t._uU(6,"close"),t.qZA()(),t._UZ(7,"app-editor-field",24),t.YNc(8,oe,5,1,"div",25),t.TgZ(9,"div",26)(10,"app-alc-button",27),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.toggleAttachment())}),t.qZA(),t._UZ(11,"app-alc-button",28),t.qZA()()}if(2&o){const e=t.oxw().$implicit,a=t.oxw(2);t.ekj("reply__wraper--with-top-margin",!e.children||!e.children.length),t.Q6J("formGroup",a.form),t.xp6(3),t.Q6J("user",a.sessionUser),t.xp6(1),t.AsE(" Comment as ",a.sessionUser.firstName," ",a.sessionUser.lastName," "),t.xp6(3),t.Q6J("allowImages",!1)("inputControl",a.form.controls.comment),t.xp6(1),t.Q6J("ngIf",a.form.value.showingAttachment),t.xp6(2),t.Q6J("disabled",a.isSubmitting),t.xp6(1),t.Q6J("text",a.isSubmitting?"Submitting...":"Comment")("disabled",a.isSubmitting)}}function ie(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"app-message-comment-thread",33),t.NdJ("replyInitiated",function(i){t.CHM(e);const s=t.oxw(3);return t.KtG(s.onReplyInitiated(i))})("replyAdded",function(i){t.CHM(e);const s=t.oxw(3);return t.KtG(s.onReplyAdded(i))})("commentDeleted",function(i){t.CHM(e);const s=t.oxw(3);return t.KtG(s.onCommentDeleted(i))}),t.qZA()}if(2&o){const e=t.oxw().$implicit,a=t.oxw(2);t.Q6J("comments",e.children)("levelsDeep",a.levelsDeep+1)("replyId",a.replyId)}}function se(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",2)(1,"div",3),t._UZ(2,"app-alc-avatar",4),t._uU(3),t.ALo(4,"timeAgo"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"p",6),t.YNc(7,Xt,1,1,"app-forum-asset-row",7),t.TgZ(8,"div",8),t.YNc(9,te,4,0,"div",9),t.YNc(10,ee,5,1,"div",10),t.TgZ(11,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit,N=t.oxw(2);return t.KtG(N.openFlagCommentDialog(s))}),t._uU(12," Flag "),t.qZA(),t.YNc(13,ne,2,0,"div",12),t.qZA(),t.YNc(14,ae,12,12,"form",13),t.YNc(15,ie,1,3,"app-message-comment-thread",14),t.qZA()()}if(2&o){const e=n.$implicit,a=t.oxw(2);t.xp6(2),t.Q6J("user",e.author),t.xp6(1),t.lnq(" ",e.author.firstName," ",e.author.lastName," \xb7 ",t.lcZ(4,13,e.createdAt)," "),t.xp6(3),t.Q6J("innerHTML",e.content,t.oJD),t.xp6(1),t.Q6J("ngIf",e.asset),t.xp6(1),t.ekj("actions--with-padding",e.children&&e.children.length),t.xp6(1),t.Q6J("ngIf",a.levelsDeep<4),t.xp6(1),t.Q6J("ngIf",a.levelsDeep>=4),t.xp6(3),t.Q6J("ngIf",a.sessionUser&&a.sessionUser.roles&&a.sessionUser.roles.includes("admin")),t.xp6(1),t.Q6J("ngIf",a.replyId&&a.replyId===e.id),t.xp6(1),t.Q6J("ngIf",e.children)}}function re(o,n){if(1&o&&(t.ynx(0),t.YNc(1,se,16,15,"div",1),t.BQk()),2&o){const e=t.oxw();
1t.xp6(1),t.Q6J("ngForOf",e.comments)}}Z.\u0275fac=function(n){return new(n||Z)},Z.\u0275cmp=t.Xpm({type:Z,selectors:[["app-forum-asset-row"]],inputs:{asset:"asset"},decls:5,vars:3,consts:[[1,"card"],[1,"card__content","card__content--compressed","card__content--rule","asset-row"],["icon","cloud_download","target","_blank",1,"icon",3,"link","isLinkExternal"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div"),t._uU(3),t.qZA(),t._UZ(4,"app-alc-button",2),t.qZA()()),2&n&&(t.xp6(3),t.Oqu(e.asset.originalName),t.xp6(1),t.Q6J("link",e.asset.url)("isLinkExternal",!0))},dependencies:[u.W],styles:[".asset-row[_ngcontent-%COMP%]{display:flex;align-items:center;padding-top:16px;padding-bottom:16px;justify-content:space-between}.asset-row[_ngcontent-%COMP%]   app-alc-button[_ngcontent-%COMP%]{margin-right:16px}.asset-row[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{text-decoration:none}"]});class T{constructor(n,e,a,i){this._authService=n,this._forumService=e,this.dialog=i,this.levelsDeep=0,this.replyAdded=new t.vpe,this.replyInitiated=new t.vpe,this.commentDeleted=new t.vpe,this.isSubmitting=!1,this._authService.sessionUser().subscribe(s=>this.sessionUser=s),this.form=a.group({comment:["",[_.kI.required]],showingAttachment:[!1],assetId:[]})}ngOnInit(){}reply(n){this.replyId=n.id,this.replyInitiated.emit(this.replyId)}closeReply(){this.replyId=void 0}toggleAttachment(){this.form.patchValue({showingAttachment:!this.form.value.showingAttachment})}submitComment(n){if(!this.form.valid)return;this.isSubmitting=!0;const e=this.levelsDeep<4?n.id:n.messageCommentId;this._forumService.createForumMessageComment({forumPostId:n.messageId,forumPostCommentId:e,assetId:this.form.controls.assetId.value,content:this.form.controls.comment.value}).then(a=>{this.isSubmitting=!1,this.form.controls.comment.setValue(""),this.replyAdded.emit(a),this.closeReply()}).catch(()=>{this.isSubmitting=!1})}onReplyInitiated(n){this.replyId=n,this.replyInitiated.emit(this.replyId)}onReplyAdded(n){this.replyAdded.emit(n)}onCommentDeleted(n){this.commentDeleted.emit(n)}openFlagCommentDialog(n){const e=C.C.defaultDialogConfig();e.data={type:"comment",commentId:n.id,forumPostId:n.messageId},this.dialog.open(b,e)}openDeleteCommentDialog(n){var e=this;const a=C.C.defaultDialogConfig();var i;a.data={dialogTitle:"Are you sure you want to remove this comment?",title:"Any nested comments will also be removed.",submissionClosure:(i=(0,d.Z)(function*(){yield e._forumService.deleteForumMessageComment(n.id),e.onCommentDeleted(n)}),function(){return i.apply(this,arguments)})},this.dialog.open(j.V,a)}}T.\u0275fac=function(n){return new(n||T)(t.Y36(K.e),t.Y36(p._),t.Y36(_.QS),t.Y36(l.uw))},T.\u0275cmp=t.Xpm({type:T,selectors:[["app-message-comment-thread"]],inputs:{comments:"comments",replyId:"replyId",levelsDeep:"levelsDeep"},outputs:{replyAdded:"replyAdded",replyInitiated:"replyInitiated",commentDeleted:"commentDeleted"},decls:1,vars:1,consts:[[4,"ngIf"],["class","comment",4,"ngFor","ngForOf"],[1,"comment"],[1,"author"],[3,"user"],[1,"comment__body"],[1,"content",3,"innerHTML"],[3,"asset",4,"ngIf"],[1,"actions"],["class","reply",3,"click",4,"ngIf"],["class","reply reply__no-action","mat-icon-button","","matTooltipClass","tooltip tooltip--dark tooltip--large",3,"matTooltip","click",4,"ngIf"],[1,"flag",3,"click"],["class","delete",3,"click",4,"ngIf"],["class","reply__wrapper",3,"reply__wraper--with-top-margin","formGroup","ngSubmit",4,"ngIf"],[3,"comments","levelsDeep","replyId","replyInitiated","replyAdded","commentDeleted",4,"ngIf"],[3,"asset"],[1,"reply",3,"click"],["mat-icon-button","","matTooltipClass","tooltip tooltip--dark tooltip--large",1,"reply","reply__no-action",3,"matTooltip","click"],["tooltip","matTooltip"],[1,"delete",3,"click"],[1,"reply__wrapper",3,"formGroup","ngSubmit"],[1,"reply__header"],[1,"reply-as"],[1,"close__reply",3,"click"],["placeholder","Write your comment here",1,"height-medium",3,"allowImages","inputControl"],["class","reply__attachment",4,"ngIf"],[1,"reply__actions"],["text","Add Attachment",3,"disabled","buttonClick"],["type","submit",1,"orange",3,"text","disabled"],[1,"reply__attachment"],[1,"reply__attachment-close",3,"click"],[1,"material-icons","notranslate"],[3,"inputControl"],[3,"comments","levelsDeep","replyId","replyInitiated","replyAdded","commentDeleted"]],template:function(n,e){1&n&&t.YNc(0,re,2,1,"ng-container",0),2&n&&t.Q6J("ngIf",e.comments)},dependencies:[c.sg,c.O5,u.W,y.x,E.j,z.X,S.Hw,_._Y,_.JL,_.sg,W.gM,T,Z,w.o],styles:["app-alc-avatar[_ng
1content-%COMP%]{height:32px;width:32px;display:flex;margin-right:16px}.author[_ngcontent-%COMP%]{display:flex;margin-left:-16px}.comment__body[_ngcontent-%COMP%]{border-left:2px solid #ccc;padding:0 16px 0 32px;margin:8px 0}.actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:16px}.actions[_ngcontent-%COMP%]   .reply[_ngcontent-%COMP%]{display:flex;align-items:center}.actions[_ngcontent-%COMP%]   .reply[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:8px}.actions[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{cursor:pointer}.actions[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:hover{color:#999}.actions[_ngcontent-%COMP%]   .reply__no-action[_ngcontent-%COMP%]{color:#999;cursor:default}.actions--with-padding[_ngcontent-%COMP%]{padding-bottom:16px}.reply__wrapper[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;box-shadow:1px 1px 2px #0000001a;padding:16px;margin-bottom:16px}.reply__wraper--with-top-margin[_ngcontent-%COMP%]{margin-top:16px}.reply__header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;margin-bottom:16px}.reply-as[_ngcontent-%COMP%]{display:flex}.close__reply[_ngcontent-%COMP%]{cursor:pointer}.close__reply[_ngcontent-%COMP%]:hover{color:#999}.reply__actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.reply__attachment[_ngcontent-%COMP%]{position:relative}.reply__attachment-close[_ngcontent-%COMP%]{position:absolute;color:#000;top:8px;right:8px;cursor:pointer}"]});const ce=function(o){return["/manage","forums",o]};function me(o,n){if(1&o&&(t.TgZ(0,"a",25)(1,"span",26),t._uU(2,"edit"),t.qZA(),t._uU(3," Edit "),t.qZA()),2&o){const e=t.oxw(2);t.Q6J("routerLink",t.VKq(1,ce,e.forum.id))}}function le(o,n){1&o&&(t.TgZ(0,"app-alc-form-notification",27)(1,"span",26),t._uU(2,"check_circle"),t.qZA(),t._uU(3," Post successfully created. "),t.qZA())}function _e(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div")(1,"button",28)(2,"mat-icon"),t._uU(3,"more_horiz"),t.qZA()(),t.TgZ(4,"mat-menu",null,29)(6,"button",30),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.isEditting=!0)}),t._uU(7,"Edit"),t.qZA(),t.TgZ(8,"button",30),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.openDeleteDialog())}),t._uU(9,"Delete"),t.qZA()()()}if(2&o){const e=t.MAs(5);t.xp6(1),t.Q6J("matMenuTriggerFor",e)}}function pe(o,n){if(1&o&&t._UZ(0,"app-forum-asset-row",33),2&o){const e=t.oxw(3);t.Q6J("asset",e.message.assets[0])}}function ue(o,n){if(1&o&&(t.ynx(0),t.TgZ(1,"h2"),t._uU(2),t.qZA(),t._UZ(3,"p",31),t.YNc(4,pe,1,1,"app-forum-asset-row",32),t.BQk()),2&o){const e=t.oxw(2);t.xp6(2),t.Oqu(e.message.title),t.xp6(1),t.Q6J("innerHTML",e.message.content,t.oJD),t.xp6(1),t.Q6J("ngIf",e.message.assets.length)}}function ge(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",41)(1,"a",42),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.toggleUpdatePostAttachment())}),t.TgZ(2,"i",26),t._uU(3,"close"),t.qZA()(),t._UZ(4,"app-alc-upload",43),t.qZA()}if(2&o){const e=t.oxw(3);t.xp6(4),t.Q6J("inputControl",e.form.controls.assetId)("asset",e.message.assets&&e.message.assets[0])}}function de(o,n){if(1&o){const e=t.EpF();t.ynx(0),t._UZ(1,"app-alc-input",34)(2,"app-editor-field",35),t.YNc(3,ge,5,2,"div",36),t.TgZ(4,"div",37)(5,"div")(6,"app-alc-button",38),t.NdJ("buttonClick",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.updatePost(i))}),t.qZA(),t.TgZ(7,"app-alc-button",39),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.toggleUpdatePostAttachment())}),t.qZA()(),t.TgZ(8,"app-alc-button",40),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.isEditting=!1)}),t.qZA()(),t.BQk()}if(2&o){const e=t.oxw(2);t.xp6(1),t.Q6J("inputControl",e.form.controls.title),t.xp6(1),t.Q6J("allowImages",!1)("inputControl",e.form.controls.content),t.xp6(1),t.Q6J("ngIf",e.form.value.showingAttachment),t.xp6(3),t.Q6J("text",e.isSubmitting?"Submitting...":"Update Post")("disabled",e.isSubmitting),t.xp6(1),t.Q6J("disabled",e.isSubmitting),t.xp6(1),t.Q6J("disabled",e.isSubmitting)}}function fe(o,n){if(1&o&&(t.TgZ(0,"app-alc-form-notification",47)(1,"span",26),t._uU(2,"close"),t.qZA(),t._uU(3),t.qZA()),2&o){const e=t.oxw(3);t.xp6(3),t.hij(" ",e.submissionError," ")}}function he(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",41)(1,"a",42),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(3);return t.KtG(i.toggleAttachment())}),t.TgZ(2,"i",26),t._uU(3,"close"),t.qZA()(),t._UZ(4,"app-alc-upload",48),t.qZA()}if(2&o){const e=t.oxw(3);t.xp6(4),t.Q6J("inputControl",e.messageCommentGroup.controls.asset)}}function xe(o,n){if(1&o){const e=t.EpF();t.ynx(0),t.TgZ(1,"div"),t._uU(2),t.qZA(),t.YNc(3,fe,4,1,"app-alc-form-notification",44),t._UZ(4,"app-editor-field",45),t.YNc(5,he,5,1,"div",36),t.TgZ(6,"div",46)(7,"app-alc-button",38),t.NdJ("buttonClick",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.submitComment(i))}),t.qZA(),t.TgZ(8,"app-alc-button",39),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.toggleAttachment())}),t.qZA()(),t.BQk()}if(2&o){const e=t.oxw(2);t.xp6(2),t.AsE("Comment as ",e.user.firstName," ",e.user.lastName,""),t.xp6(1),t.Q6J("ngIf",e.submissionError),t.xp6(1),t.Q6J("allowImages",!1)("inputControl",e.messageCommentGroup.controls.comment),t.xp6(1),t.Q6J("ngIf",e.messageCommentGroup.value.showingAttachment),t.xp6(2),t.Q6J("text",e.isSubmitting?"Submitting...":"Comment")("disabled",e.isSubmitting),t.xp6(1),t.Q6J("disabled",e.isSubmitting||e.messageCommentGroup.value.showingAttachment)}}function Ce(o,n){if(1&o){const e=t.EpF();
1t.TgZ(0,"div",49)(1,"h3"),t._uU(2),t.qZA(),t.TgZ(3,"app-message-comment-thread",50),t.NdJ("replyAdded",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onReplyAdded(i))})("replyInitiated",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onReplyInitiated(i))})("commentDeleted",function(i){t.CHM(e);const s=t.oxw(2);return t.KtG(s.onCommentDeleted(i))}),t.qZA()()}if(2&o){const e=t.oxw(2);t.xp6(2),t.hij("Comments (",e.message.commentCount,")"),t.xp6(1),t.Q6J("comments",e.message.commentsThreaded)("replyId",e.replyId)}}function ve(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"app-base-template",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"app-forum-breadcrumb-bar",6)(6,"div"),t._uU(7," Forums "),t.qZA(),t.TgZ(8,"a",7),t._uU(9," My Forums "),t.qZA(),t.TgZ(10,"a",8),t._uU(11),t.qZA(),t.TgZ(12,"a",8),t._uU(13),t.qZA(),t.TgZ(14,"div"),t._uU(15),t.qZA()(),t.TgZ(16,"h1"),t._uU(17),t.YNc(18,me,4,3,"a",9),t.qZA(),t.YNc(19,le,4,0,"app-alc-form-notification",10),t.qZA()(),t.TgZ(20,"div",4)(21,"div",11)(22,"div",12)(23,"div",13)(24,"div",14),t._UZ(25,"app-alc-avatar",15),t.TgZ(26,"div")(27,"div",16)(28,"div"),t._uU(29),t.TgZ(30,"a",17),t._uU(31),t.qZA(),t._uU(32),t.ALo(33,"timeAgo"),t.qZA(),t.YNc(34,_e,10,1,"div",18),t.qZA(),t.YNc(35,ue,5,3,"ng-container",18),t.YNc(36,de,9,8,"ng-container",18),t.TgZ(37,"p",19)(38,"span",20)(39,"mat-icon"),t._uU(40,"chat_bubble_outline"),t.qZA(),t._uU(41),t.qZA(),t.TgZ(42,"a",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openFlagForumsPostDialog())}),t._uU(43,"Flag as inappropriate"),t.qZA()(),t.YNc(44,xe,9,9,"ng-container",18),t.qZA()()(),t.YNc(45,Ce,4,3,"div",22),t.qZA()(),t.TgZ(46,"div",23),t._UZ(47,"app-forum-summary-card",24),t.qZA()()()()()}if(2&o){const e=t.oxw();
1t.xp6(10),t.MGl("routerLink","/forums/group/",e.forum.forumGroupId,""),t.xp6(1),t.hij(" ",e.forum.forumGroup.title," "),t.xp6(1),t.MGl("routerLink","/forums/detail/",e.forum.id,""),t.xp6(1),t.hij(" ",e.forum.title," "),t.xp6(2),t.Oqu(e.message.title),t.xp6(2),t.hij(" ",e.forum.title," "),t.xp6(1),t.Q6J("ngIf",e.canManageForum),t.xp6(1),t.Q6J("ngIf",e.showSuccessfulPost),t.xp6(6),t.Q6J("user",e.messageAvatar),t.xp6(4),t.AsE(" Posted by ",e.message.author.firstName," ",e.message.author.lastName," in\xa0"),t.xp6(2),t.Oqu(e.forum.title),t.xp6(1),t.hij(" \xa0\u2022 ",t.lcZ(33,20,e.message.createdAt)," "),t.xp6(2),t.Q6J("ngIf",e.message.canEdit),t.xp6(1),t.Q6J("ngIf",!e.isEditting),t.xp6(1),t.Q6J("ngIf",e.isEditting),t.xp6(5),t.hij(" ",e.message.commentCount," comments "),t.xp6(3),t.Q6J("ngIf",!e.isEditting),t.xp6(1),t.Q6J("ngIf",e.message.commentCount>0),t.xp6(2),t.Q6J("forum",e.forum)}}class U{constructor(n,e,a,i,s,N){this._route=n,this.router=e,this.forumService=a,this.authService=i,this.dialog=N,this.canManageForum=!1,this.isEditting=!1,this.showSuccessfulPost=!1,this.isSubmitting=!1,this.submissionError="",this.form=s.group({title:["",_.kI.required],content:["",_.kI.required],showingAttachment:[!1],assetId:[]}),this.messageCommentGroup=s.group({comment:["",_.kI.required],showingAttachment:[!1],asset:[]}),this.messageCommentGroup.controls.comment.valueChanges.subscribe(Se=>{Se&&(this.submissionError="")})}ngOnInit(){var n=this;return(0,d.Z)(function*(){const{forumId:e}=n._route.snapshot.params;n.showSuccessfulPost=!!n._route.snapshot.queryParams.success,yield Promise.all([n.forumService.getForum(e).then(i=>n.forum=i),n.getMessage(),n.authService.getSessionUser().then(i=>n.user=i),n.forumService.canManageForum(e).then(i=>n.canManageForum=i)]);const a=n.message.author;n.messageAvatar={...a,photo:a.photo&&a.photo.url||null}})()}getMessage(){const{messageId:n}=this._route.snapshot.params;return this.forumService.getForumMessage(n).then(e=>{this.message=e;const a=this.message.assets&&this.message.assets.length&&this.message.assets[0].id;this.form.patchValue({title:this.message.title,content:this.message.content,assetId:a,showingAttachment:!!a})})}toggleAttachment(){this.messageCommentGroup.patchValue({showingAttachment:!this.messageCommentGroup.value.showingAttachment})}onCommentAdded(n){if(this.getMessage(),n.assetId){const{forumId:e}=this._route.snapshot.params;this.forumService.getForum(e).then(a=>this.forum=a)}}onCommentDeleted(n){this.getMessage()}onReplyAdded(n){this.replyId=void 0,this.onCommentAdded(n)}onReplyInitiated(n){this.replyId=n}submitComment(){this.messageCommentGroup.value.comment?(this.isSubmitting=!0,this.forumService.createForumMessageComment({forumPostId:this.message.id,assetId:this.messageCommentGroup.value.asset,content:(0,Vt.gi)(this.messageCommentGroup.value.comment)}).then(n=>{this.isSubmitting=this.showSuccessfulPost=!1,this.messageCommentGroup.reset(),this.onCommentAdded(n)}).catch(()=>{this.isSubmitting=!1})):this.submissionError="Please provide a comment."}toggleUpdatePostAttachment(){this.form.patchValue({showingAttachment:!this.form.value.showingAttachment})}updatePost(){if(!this.form.valid)return;this.isSubmitting=!0;const{showingAttachment:n,...e}=this.form.value;this.forumService.updateForumMessage(this.message.id,{forumId:this.forum.id,...e}).then(()=>{this.getMessage(),this.isEditting=!1,this.isSubmitting=!1}
1).catch(()=>{this.isSubmitting=!1})}openFlagForumsPostDialog(){const n=C.C.defaultDialogConfig();n.data={type:"post",forumPostId:this.message.id},this.dialog.open(b,n)}openDeleteDialog(){var n=this;const e=C.C.defaultDialogConfig(),a=this.message.author;var i;e.data={title:`Forum post by ${a.firstName} ${a.lastName}`,submissionClosure:(i=(0,d.Z)(function*(){yield n.forumService.deleteForumMessage(n.message.id),n.router.navigate(["forums","detail",n.forum.id])}),function(){return i.apply(this,arguments)})},this.dialog.open(j.V,e)}}function be(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",20)(1,"a",21),t.NdJ("click",function(){t.CHM(e);const i=t.oxw(2);return t.KtG(i.toggleAttachment())}),t.TgZ(2,"i",22),t._uU(3,"close"),t.qZA()(),t._UZ(4,"app-alc-upload",23),t.qZA()}if(2&o){const e=t.oxw(2);t.xp6(4),t.Q6J("inputControl",e.form.controls.assetId)}}function Ze(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"app-base-template",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"app-forum-breadcrumb-bar")(6,"div"),t._uU(7," Forums "),t.qZA(),t.TgZ(8,"a",6),t._uU(9," My Forums "),t.qZA(),t.TgZ(10,"a",7),t._uU(11),t.qZA(),t.TgZ(12,"div"),t._uU(13),t.qZA()(),t.TgZ(14,"h1"),t._uU(15),t.qZA()()(),t.TgZ(16,"div",4)(17,"div",8)(18,"div",9)(19,"div",10)(20,"h3"),t._uU(21,"Create new post"),t.qZA(),t._UZ(22,"app-alc-input",11)(23,"app-editor-field",12),t.YNc(24,be,5,1,"div",13),t.TgZ(25,"div",14)(26,"div")(27,"app-alc-button",15),t.NdJ("buttonClick",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.submitPost(i))}),t.qZA(),t.TgZ(28,"app-alc-button",16),t.NdJ("buttonClick",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.toggleAttachment())}),t.qZA()(),t._UZ(29,"app-alc-button",17),t.qZA()()()(),t.TgZ(30,"div",18),t._UZ(31,"app-forum-summary-card",19),t.qZA()()()()()}if(2&o){const e=t.oxw();
1t.xp6(10),t.MGl("routerLink","/forums/group/",e.forum.forumGroupId,""),t.xp6(1),t.hij(" ",e.forum.forumGroup.title," "),t.xp6(2),t.Oqu(e.forum.title),t.xp6(2),t.Oqu(e.forum.title),t.xp6(7),t.Q6J("inputControl",e.form.controls.title),t.xp6(1),t.Q6J("allowImages",!1)("inputControl",e.form.controls.content),t.xp6(1),t.Q6J("ngIf",e.form.value.showingAttachment),t.xp6(3),t.Q6J("text",e.isSubmitting?"Submitting...":"Post")("disabled",e.isSubmitting),t.xp6(1),t.Q6J("disabled",e.isSubmitting),t.xp6(1),t.Q6J("link","/forums/detail/"+e.forum.id)("disabled",e.isSubmitting),t.xp6(2),t.Q6J("forum",e.forum)}}U.\u0275fac=function(n){return new(n||U)(t.Y36(m.gz),t.Y36(m.F0),t.Y36(p._),t.Y36(K.e),t.Y36(_.QS),t.Y36(l.uw))},U.\u0275cmp=t.Xpm({type:U,selectors:[["app-forum-message"]],decls:1,vars:1,consts:[["activeNav","forums",4,"ngIf"],["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],[1,"ellipsize"],["routerLink","/forums"],[3,"routerLink"],["class","edit__link",3,"routerLink",4,"ngIf"],["type","success",4,"ngIf"],[1,"grid__col","grid__col--8"],[1,"card"],[1,"card__content"],[1,"message__columns"],[3,"user"],[1,"message__author"],["routerLink","../../",1,"link--undecorated"],[4,"ngIf"],[1,"message__info"],[1,"message__commentCount"],[1,"message__flag",3,"click"],["class","card__content message__comments",4,"ngIf"],[1,"grid__col","grid__col--4"],[3,"forum"],[1,"edit__link",3,"routerLink"],[1,"material-icons","notranslate"],["type","success"],["mat-icon-button","",1,"menu",3,"matMenuTriggerFor"],["menu","matMenu"],["mat-menu-item","",3,"click"],[1,"message__content",3,"innerHTML"],[3,"asset",4,"ngIf"],[3,"asset"],["placeholder","Post title",3,"inputControl"],["placeholder","Write the content of your post here.",1,"height-medium",3,"allowImages","inputControl"],["class","message__attachment",4,"ngIf"],[1,"actions"],[1,"orange",3,"text","disabled","buttonClick"],["text","Add Attachment",3,"disabled","buttonClick"],["text","Cancel",3,"disabled","buttonClick"],[1,"message__attachment"],[1,"message__attachment-close",3,"click"],[3,"inputControl","asset"],["type","error",4,"ngIf"],["placeholder","Write your comment here",1,"height-medium","comment-as-editor",3,"allowImages","inputControl"],[1,"message__actions"],["type","error"],[3,"inputControl"],[1,"card__content","message__comments"],[3,"comments","replyId","replyAdded","replyInitiated","commentDeleted"]],template:function(n,e){1&n&&t.YNc(0,ve,48,22,"app-base-template",0),2&n&&t.Q6J("ngIf",e.forum&&e.message&&e.user)},dependencies:[c.O5,u.W,$.A,D.F,y.x,E.j,z.X,S.Hw,B.lW,x.k,m.yS,L.VK,L.OP,L.p6,g,f,T,Z,w.o],styles:["app-alc-avatar[_ngcontent-%COMP%]{height:32px;width:32px}h1[_ngcontent-%COMP%]{display:flex;align-items:baseline}.edit__link[_ngcontent-%COMP%]{display:flex;margin-left:16px;font-size:.6em;text-decoration:none}.edit__link[_ngcontent-%COMP%]   .material-icons[_ngcontent-%COMP%]{font-size:inherit;margin-right:4px}.link--undecorated[_ngcontent-%COMP%]{text-decoration:none}.message__columns[_ngcontent-%COMP%]{display:flex}.message__columns[_ngcontent-%COMP%]   app-alc-avatar[_ngcontent-%COMP%]{flex:0 0 32px;margin-right:16px}.message__columns[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{flex:1}.comment-as-editor[_ngcontent-%COMP%]     .form-field{margin-top:16px}.menu[_ngcontent-%COMP%]{color:#999}.message__author[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:32px;line-height:32px}.message__content[_ngcontent-%COMP%]{margin-bottom:32px}.message__info[_ngcontent-%COMP%]{display:flex;align-items:center}.message__commentCount[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.message__commentCount[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:4px}.message__flag[_ngcontent-%COMP%]{display:inline-block;margin-left:32px;cursor:pointer}.message__actions[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}.message__actions[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{margin-left:8px}.message__attachment[_ngcontent-%COMP%]{position:relative}.message__attachment-close[_ngcontent-%COMP%]{position:absolute;color:#000;top:8px;right:8px;
1cursor:pointer}.message__comments[_ngcontent-%COMP%]{border-top:1px solid #ccc}.actions[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}.actions[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{flex:1 1 auto;display:flex;flex-direction:row-reverse}.actions[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child > *[_ngcontent-%COMP%]{margin-left:8px}"]});class P{constructor(n,e,a,i){this._route=n,this.forumService=e,this.router=a,this.isSubmitting=!1,this.form=i.group({title:["",_.kI.required],content:["",_.kI.required],showingAttachment:[!1],assetId:[]})}ngOnInit(){var n=this;return(0,d.Z)(function*(){const e=n._route.snapshot.params.forumId;n.forum=yield n.forumService.getForum(e)})()}toggleAttachment(){this.form.patchValue({showingAttachment:!this.form.value.showingAttachment})}submitPost(){if(!this.form.valid)return;this.isSubmitting=!0;const{showingAttachment:n,...e}=this.form.value;this.forumService.createForumMessage({forumId:this.forum.id,allowComments:!0,...e,status:"published"}).then(a=>this.router.navigate(["forums","detail",this.forum.id,"message",a.id],{queryParams:{success:!0}}))}}function Te(o,n){if(1&o&&t._UZ(0,"img",19),2&o){const e=t.oxw().$implicit,a=t.oxw(2);t.Q6J("src",a.urlForImage(e),t.LSH)}}function Ae(o,n){1&o&&(t.TgZ(0,"span",20),t._uU(1,"file_copy"),t.qZA())}function Me(o,n){if(1&o&&(t.TgZ(0,"a",15),t.YNc(1,Te,1,1,"img",16),t.YNc(2,Ae,2,0,"span",17),t.TgZ(3,"div",18),t._uU(4),t.qZA()()),2&o){const e=n.$implicit;t.Q6J("href",e.url,t.LSH),t.xp6(1),t.Q6J("ngIf",e.mimeType.includes("image/")),t.xp6(1),t.Q6J("ngIf",!e.mimeType.includes("image/")),t.xp6(2),t.Oqu(e.originalName)}}function ye(o,n){if(1&o&&(t.TgZ(0,"app-base-template",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"app-forum-breadcrumb-bar")(6,"div"),t._uU(7," Forums "),t.qZA(),t.TgZ(8,"a",6),t._uU(9," My Forums "),t.qZA(),t.TgZ(10,"a",7),t._uU(11),t.qZA(),t.TgZ(12,"a",7),t._uU(13),t.qZA(),t.TgZ(14,"div"),t._uU(15,"Uploaded files"),t.qZA()(),t.TgZ(16,"h1"),t._uU(17),t.qZA()()(),t.TgZ(18,"div",4)(19,"div",8)(20,"div",9)(21,"div",10),t._uU(22),t.qZA(),t.TgZ(23,"div",11),t.YNc(24,Me,5,4,"a",12),t.qZA()()(),t.TgZ(25,"div",13),t._UZ(26,"app-forum-summary-card",14),t.qZA()()()()()),2&o){const e=t.oxw();
1t.xp6(10),t.MGl("routerLink","/forums/group/",e.forum.forumGroupId,""),t.xp6(1),t.hij(" ",e.forum.forumGroup.title," "),t.xp6(1),t.MGl("routerLink","/forums/detail/",e.forum.id,""),t.xp6(1),t.hij(" ",e.forum.title," "),t.xp6(4),t.Oqu(e.forum.title),t.xp6(5),t.hij(" Uploaded files (",e.assets.length,") "),t.xp6(2),t.Q6J("ngForOf",e.assets),t.xp6(2),t.Q6J("forum",e.forum)}}P.\u0275fac=function(n){return new(n||P)(t.Y36(m.gz),t.Y36(p._),t.Y36(m.F0),t.Y36(_.QS))},P.\u0275cmp=t.Xpm({type:P,selectors:[["app-forum-message-create"]],decls:1,vars:1,consts:[["activeNav","forums",4,"ngIf"],["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],["routerLink","/forums"],[3,"routerLink"],[1,"grid__col","grid__col--8"],[1,"card"],[1,"card__content"],["placeholder","Post title",3,"inputControl"],["placeholder","Write the content of your post here.",1,"height-medium",3,"allowImages","inputControl"],["class","message__attachment",4,"ngIf"],[1,"actions"],[1,"orange",3,"text","disabled","buttonClick"],["text","Add Attachment",3,"disabled","buttonClick"],["text","Cancel",3,"link","disabled"],[1,"grid__col","grid__col--4"],[3,"forum"],[1,"message__attachment"],[1,"message__attachment-close",3,"click"],[1,"material-icons","notranslate"],[3,"inputControl"]],template:function(n,e){1&n&&t.YNc(0,Ze,32,14,"app-base-template",0),2&n&&t.Q6J("ngIf",e.forum)},dependencies:[c.O5,u.W,$.A,E.j,z.X,x.k,m.yS,g,f],styles:[".actions[_ngcontent-%COMP%]{display:flex;flex-direction:row-reverse}.actions[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child{flex:1 1 auto;display:flex;flex-direction:row-reverse}.actions[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:first-child > *[_ngcontent-%COMP%]{margin-left:8px}.message__attachment[_ngcontent-%COMP%]{position:relative}.message__attachment-close[_ngcontent-%COMP%]{position:absolute;color:#000;top:8px;right:8px;cursor:pointer}"]});class k{constructor(n,e,a){this.route=n,this.forumService=e,this.assetService=a}ngOnInit(){var n=this;return(0,d.Z)(function*(){const{forumId:e}=n.route.snapshot.params;n.forum=yield n.forumService.getForum(e),n.assets=yield n.forumService.getForumAssets(e)})()}urlForImage(n){return this.assetService.imageUrlForAsset(n,{c:"fit",h:"600",w:"600"})}}k.\u0275fac=function(n){return new(n||k)(t.Y36(m.gz),t.Y36(p._),t.Y36(Q.do))},k.\u0275cmp=t.Xpm({type:k,selectors:[["app-forum-asset-list"]],decls:1,vars:1,consts:[["activeNav","forums",4,"ngIf"],["activeNav","forums"],[1,"page__content"],[1,"grid"],[1,"grid__row"],[1,"grid__col","grid__col--12"],["routerLink","/forums"],[3,"routerLink"],[1,"grid__col","grid__col--8"],[1,"card"],[1,"card__header"],[1,"card__content","card__content--compressed","asset-list"],["class","asset","target","_blank",3,"href",4,"ngFor","ngForOf"],[1,"grid__col","grid__col--4"],[3,"forum"],["target","_blank",1,"asset",3,"href"],["class","asset__image",3,"src",4,"ngIf"],["class","material-icons asset__icon notranslate",4,"ngIf"],[1,"asset__name"],[1,"asset__image",3,"src"],[1,"material-icons","asset__icon","notranslate"]],template:function(n,e){1&n&&t.YNc(0,ye,27,8,"app-base-template",0),2&n&&t.Q6J("ngIf",e.forum&&e.assets)},dependencies:[c.sg,c.O5,x.k,m.yS,g,f],styles:['.asset-list[_ngcontent-%COMP%]{display:grid;grid-gap:20px;gap:20px;grid-template-columns:repeat(2,1fr)}.asset-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{aspect-ratio:1/1;min-width:0}@supports not (aspect-ratio: 1/1){.asset-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:before{float:left;padding-top:100%;content:""}.asset-list[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:after{display:block;content:"";clear:both}}@media (min-width: 768px){.asset-list[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media (min-width: 1200px){.asset-list[_ngcontent-%COMP%]{grid-template-columns:repeat(4,1fr)}}.asset[_ngcontent-%COMP%]{background:#f4f4f4;border:1px solid #ccc;border-radius:4px;box-shadow:1px 1px 2px #0000001a;padding:12px;display:flex;flex-direction:column;text-decoration:none}.asset__name[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:.8625em;color:#333}.asset__icon[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;justify-content:center;color:#aaa;font-size:48px}.asset__image[_ngcontent-%COMP%]{flex-grow:1;height:calc(100% - 42px);width:100%;-o-object-fit:contain;object-fit:contain}']});const we=[{path:"",component:F},{path:"group/:groupId",component:J},{path:"detail/:forumId",component:O},{path:"detail/:forumId/files",component:k},{path:"detail/:forumId/create",component:P},{path:"detail/:forumId/message/:messageId",component:U}];class A{}A.\u0275fac=function(n){return new(n||A)},A.\u0275mod=t.oAB({type:A}),A.\u0275inj=t.cJS({imports:[m.Bz.forChild(we),m.Bz]});var Fe=r(12303),Ie=r(52177),qe=r(5374);class M{}M.\u0275fac=function(n){return new(n||M)},M.\u0275mod=t.oAB({type:M}),M.\u0275inj=t.cJS({imports:[c.ez,qe.I,Ie.Z,l.Is,S.Ps,h.JX,B.ot,Fe.q,A,_.UX,W.AV,L.Tx,Y.TU]})}}]);

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.