1import{b as te}from"./chunk-PD5H3FWJ.js";import{a as ee}from"./chunk-SNR7E7QC.js";import{a as X}from"./chunk-SWTNFWGP.js";import{a as A}from"./chunk-FTSRW67A.js";import"./chunk-6LAZXM7D.js";import{a as Z}from"./chunk-CKFXJ4M6.js";import{a as $}from"./chunk-RT3CAFKL.js";import{a as J}from"./chunk-VO6FFMQ2.js";import"./chunk-X73BQY4W.js";import{a as Q}from"./chunk-VRY2PTRO.js";import"./chunk-WDOKTICK.js";import"./chunk-W4BNGQYG.js";import{e as K}from"./chunk-CJRMVZKU.js";import"./chunk-MS6LDHGK.js";import{c as T,f as N,i as k,s as L,t as D}from"./chunk-Z4UR2IU6.js";import{E as H,F as j,G,N as q,T as I,e as Y,f as U,g as W,m as B,p as S}from"./chunk-C3SWPGF7.js";import{$b as i,Bb as b,Cc as v,Dc as P,Ec as M,Hb as C,Pb as p,Qc as y,Sc as O,Wb as h,Yb as F,Zb as z,_b as a,ac as s,ec as u,ib as R,jb as V,jc as _,kc as c,oa as d,ob as r,wa as f,wc as l,xa as g,xc as x}from"./chunk-7RSPASZG.js";import"./chunk-TSRGIXR5.js";var se=(n,o)=>o.id;function le(n,o){if(n&1){let e=u();a(0,"div",8)(1,"textarea",10),M("ngModelChange",function(m){f(e);let w=c();return P(w.replyText,m)||(w.replyText=m),g(m)}),i(),a(2,"div",11)(3,"button",12),_("click",function(){f(e);let m=c();return g(m.submitReply(m.comment==null?null:m.comment.id))}),s(4,"i",13),l(5," Post Reply "),i(),a(6,"button",14),_("click",function(){f(e);let m=c();return g(m.cancelReply())}),s(7,"i",15),l(8," Cancel "),i()()()}if(n&2){let e=c();r(),v("ngModel",e.replyText)}}function pe(n,o){if(n&1&&s(0,"app-pom-comment",16),n&2){let e=o.$implicit,t=c(2);p("comment",e)("depth",t.depth+1)("isLogged",t.isLogged)("isCommentAllowed",t.isCommentAllowed)("newsId",t.newsId)}}function ce(n,o){if(n&1&&(a(0,"div",9),F(1,pe,1,5,"app-pom-comment",16,se),i()),n&2){let e=c();r(),z(e.comment.replies)}}var E=class n{newsService=d(A);newsId;comment;depth=0;isLogged=!1;isCommentAllowed=!1;activeReplyId=null;replyText="";toggleReplyForm(o){this.activeReplyId=this.activeReplyId===o?null:o,this.replyText=""}cancelReply(){this.activeReplyId=null,this.replyText=""}submitReply(o){this.replyText.trim()&&this.newsService.addReply(this.newsId,o,this.replyText).then(e=>{this.comment.replies=this.comment.replies||[],this.comment.replies.push(e),this.cancelReply()})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-pom-comment"]],inputs:{newsId:"newsId",comment:"comment",depth:"depth",isLogged:"isLogged",isCommentAllowed:"isCommentAllowed"},decls:15,vars:9,consts:[[1,"comment-card",3,"ngClass"],[1,"comment-header"],[1,"author"],[1,"date"],[1,"comment-body"],[1,"comment-actions"],[1,"reply-btn",3,"click"],[1,"fas","fa-reply"],[1,"inline-reply-form"],[1,"replies"],["rows","3","placeholder","Write your reply...",3,"ngModelChange","ngModel"],[1,"form-actions"],[3,"click"],[1,"fas","fa-paper-plane"],[1,"cancel",3,"click"],[1,"fas","fa-times"],[3,"comment","depth","isLogged","isCommentAllowed","newsId"]],template:function(e,t){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),l(3),i(),a(4,"span",3),l(5),y(6,"date"),i()(),a(7,"div",4),l(8),i(),a(9,"div",5)(10,"button",6),_("click",function(){return t.toggleReplyForm(t.comment.id)}),s(11,"i",7),l(12," Reply "),i()(),C(13,le,9,1,"div",8)(14,ce,3,0,"div",9),i()),e&2&&(p("ngClass","depth-"+t.depth),r(3),x(t.comment.publicUser.displayName),r(2),x(O(6,6,t.comment.dateCreated,"medium")),r(3),x(t.comment.commentText),r(5),h(t.isCommentAllowed&&t.isLogged&&t.activeReplyId===t.comment.id?13:-1),r(),h(t.comment.replies!=null&&t.comment.replies.length?14:-1))},dependencies:[n,S,Y,B,L,T,N,k,D,I],styles:["[_ngcontent-%COMP%]:root{--main-primary: #FF8E9E;--main-primary-dark: #4a0f18;--main-primary-light: #ffd1d7}.comment-card[_ngcontent-%COMP%]{border:1px solid #f0c2c8;border-radius:8px;padding:14px 18px;margin-bottom:12px;box-shadow:0 2px 6px #00000014;transition:transform .2s ease,box-shadow .2s ease;animation:_ngcontent-%COMP%_slideUp .4s ease both}.comment-card[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 6px 14px #0000001f}.depth-0[_ngcontent-%COMP%]{border-left:4px solid var(--main-primary);background:#fff}.depth-1[_ngcontent-%COMP%]{border-left:4px solid var(--main-primary-dark);background:#fff5f6}.depth-2[_ngcontent-%COMP%]{border-left:4px solid #d46b7a;background:#fff0f2}.depth-3[_ngcontent-%COMP%]{border-left:4px solid #b94b5c;background:#fce9eb}.depth-4[_ngcontent-%COMP%]{border-left:4px solid #8a2433;background:#f9e6e8}.depth-5[_ngcontent-%COMP%]{border-left:4px solid #661a24;background:#f7dfe2}.comment-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.92em;color:#5a6b7b;margin-bottom:8px}.comment-header[_ngcontent-%COMP%] .author[_ngcontent-%COMP%]{font-weight:700;color:var(--main-primary)}.comment-header[_ngcontent-%COMP%] .date[_ngcontent-%COMP%]{font-weight:500;color:#7a8a99}.comment-body[_ngcontent-%COMP%]{font-size:1.02em;color:#2f3b45;line-height:1.55}.comment-actions[_ngcontent-%COMP%]{margin-top:10px}.reply-btn[_ngcontent-%COMP%]{background:transparent;border:1px solid #f0c2c8;color:var(--main-primary);padding:6px 10px;border-radius:8px;font-weight:600;cursor:pointer;transition:transform .16s ease,box-shadow .16s ease,background .16s ease}.reply-btn[_ngcontent-%COMP%]:hover{background:var(--main-primary-light);box-shadow:0 4px 10px #ff8e9e26;transform:translateY(-1px)}.replies[_ngcontent-%COMP%]{margin-left:28px;border-left:2px solid #f0c2c8;padding-left:16px;margin-top:14px;margin-bottom:18px;padding-bottom:12px;background:#fffdfd;border-radius:6px;animation:_ngcontent-%COMP%_fadeIn .42s ease both}.replies[_ngcontent-%COMP%] .comment-card[_ngcontent-%COMP%]{margin-bottom:14px}.inline-reply-form[_ngcontent-%COMP%]{margin-top:10px;animation:_ngcontent-%COMP%_fadeInScale .3s ease both}.inline-reply-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;padding:10px;border-radius:6px;border:1px solid #f0c2c8;font-size:.95em;margin-bottom:8px;transition:border-color .18s ease,box-shadow .18s ease}.inline-reply-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border-color:var(--main-primary);box-shadow:0 0 0 3px #ff8e9e40;outline:none}.form-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:0 0 auto;min-width:110px;padding:10px 16px;border-radius:6px;font-size:.95em;font-weight:700;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(.cancel){background:linear-gradient(135deg,var(--main-primary-dark),#8a2433);color:#fff;border:1px solid #4a0f18;text-shadow:0 1px 2px rgba(0,0,0,.7)}.form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(.cancel):hover{transform:translateY(-2px);box-shadow:0 6px 14px #b23a4a80;filter:brightness(1.08)}.form-actions[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]{background:#f9f9f9;color:#666;border:1px solid #e0e0e0}.form-actions[_ngcontent-%COMP%] .cancel[_ngcontent-%COMP%]:hover{background:#ffeef1;color:#444}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_slideUp{0%{opacity:0;transform:translateY(18px)}to{opacity:1;transform:translateY(0)}}@keyframes _ngcontent-%COMP%_fadeInScale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@media (prefers-reduced-motion: reduce){.comment-card[_ngcontent-%COMP%], .replies[_ngcontent-%COMP%], .inline-reply-form[_ngcontent-%COMP%]{animation:none!important;transition:none!important}}"]})};function de(n,o){if(n&1){let e=u();a(0,"span",22),_("click",function(){f(e);let m=c(2);return g(m.logout())}),l(1,"Logout "),s(2,"i",23),i()}}function fe(n,o){if(n&1){let e=u();a(0,"div",24)(1,"h4",25),s(2,"i",26),l(3," Add a comment to this news"),i(),a(4,"textarea",27),M("ngModelChange",function(m){f(e);let w=c(2);return P(w.topLevelText,m)||(w.topLevelText=m),g(m)}),i(),a(5,"div",28)(6,"button",29),_("click",function(){f(e);let m=c(2);return g(m.submitTopLevel())}),s(7,"i",30),l(8," Post Comment "),i()()()}if(n&2){let e=c(2);r(4),v("ngModel",e.topLevelText)}}function ge(n,o){if(n&1&&s(0,"app-pom-comment",31),n&2){let e=o.$implicit,t=c(2);p("comment",e)("depth",0)("isLogged",t.isLogged)("isCommentAllowed",t.isCommentAllowed)("newsId",t.newsId)}}function _e(n,o){n&1&&(a(0,"div",32),l(1," Comments to this article are closed "),i())}function xe(n,o){n&1&&(a(0,"div",32),l(1," Login to your account to comment on this article "),i(),s(2,"app-sign-in"))}function Ce(n,o){if(n&1){let e=u();a(0,"section",3)(1,"div",4)(2,"div",5)(3,"div",6)(4,"div",7)(5,"div",8)(6,"div",9)(7,"div",10),l(8),i(),a(9,"img",11),y(10,"imageThumb"),_("contextmenu",function(m){return f(e),g(m.preventDefault())}),i(),a(11,"div",12),l(12),i(),s(13,"div",13),i(),a(14,"div",14)(15,"h3",15),s(16,"i",16),l(17," Comments "),C(18,de,3,0,"span",17),i(),C(19,fe,9,1,"div",18)(20,ge,1,5,"app-pom-comment",19)(21,_e,2,0,"div",20)(22,xe,3,0),i()()()(),a(23,"div",21),s(24,"app-pom-news-sidebar"),i()()()()}if(n&2){let e=c();r(8),x(e.title),r(),p("src",O(10,9,e.news.imageUrl,!1),V),r(3),x(e.news.imageCaption),r(),p("innerHTML",e.safeContent,R),r(5),p("ngIf",e.isLogged),r(),p("ngIf",e.isCommentAllowed&&e.isLogged),r(),p("ngForOf",e.comments),r(),p("ngIf",!e.isCommentAllowed),r(),h(e.isCommentAllowed&&!e.isLogged?22:-1)}}function ue(n,o){n&1&&s(0,"app-pom-not-found-template",33)}var ne=class n{newsService=d(A);route=d(q);spinnerService=d(J);sanitizer=d(G);authService=d(X);meta=d(H);metaTitle=d(j);comments=[];news;newsId;title="";IS_LOADING=!1;safeContent;isLogged=!1;isCommentAllowed=!1;topLevelText="";ngOnInit(){this.spinnerService.visibility.subscribe(o=>{this.IS_LOADING=o}),this.route.params.subscribe(o=>{this.newsId=o.id,this.loadData()})}loadData(){this.newsId&&this.newsService.getById(this.newsId).then(o=>{this.news=o,this.title=this.news.newsTitle,this.comments=o.pomNewsComments,this.safeContent=this.sanitizer.bypassSecurityTrustHtml(this.news.newsContent),this.isLogged=this.authService.isLogged(),this.isCommentAllowed=o.commentStatus===1,this.metaTitle.setTitle(this.title),this.meta.updateTag({name:"description",content:this.news.newsContent}),this.meta.updateTag({property:"og:title",content:this.title})})}submitTopLevel(){this.topLevelText.trim()&&this.newsService.addComment(this.news.id,this.topLevelText).then(o=>{this.comments.push(o),this.topLevelText=""})}logout(){this.authService.logout()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["app-parliament-news-detail"]],decls:3,vars:4,consts:[[3,"title","news"],["class","sidebar-page-container pb-5",4,"ngIf"],["titlePrefix","News ",4,"ngIf"],[1,"sidebar-page-container","pb-5"],[1,"auto-container"],[1,"row","clearfix"],[1,"col-lg-8","col-md-12","col-sm-12","content-side"],[1,"blog-details-content"],[1,"inner-box"],[1,"flag-panel"],[1,"news-title"],["alt","Parliament Session",1,"news-image",3,"contextmenu","src"],[1,"image-caption"],[1,"news-content",3,"innerHTML"],[1,"comments-section"],[1,"comments-title"],[1,"fas","fa-comments"],["class","pull-right cursor-pointer","ngbTooltip","Logout",3,"click",4,"ngIf"],["class","top-level-form",4,"ngIf"],[3,"comment","depth","isLogged","isCommentAllowed","
1newsId",4,"ngFor","ngForOf"],["class","alert alert-info","role","alert",4,"ngIf"],[1,"col-lg-4","col-md-12","col-sm-12","sidebar-side"],["ngbTooltip","Logout",1,"pull-right","cursor-pointer",3,"click"],[1,"fas","fa-sign-out-alt"],[1,"top-level-form"],[1,"form-title"],[1,"fas","fa-edit"],["rows","4","placeholder","Share your thoughts...",3,"ngModelChange","ngModel"],[1,"form-actions"],[3,"click"],[1,"fas","fa-paper-plane"],[3,"comment","depth","isLogged","isCommentAllowed","newsId"],["role","alert",1,"alert","alert-info"],["titlePrefix","News "]],template:function(e,t){e&1&&(s(0,"app-page-title",0),C(1,Ce,25,12,"section",1)(2,ue,1,0,"app-pom-not-found-template",2)),e&2&&(p("title",t.title)("news",t.news),r(),p("ngIf",t.news),r(),p("ngIf",!t.news&&!t.IS_LOADING))},dependencies:[S,U,W,L,T,N,k,D,I,Q,K,$,te,Z,ee,E],styles:["[_ngcontent-%COMP%]:root{--main-primary: #FF8E9E;--main-primary-dark: #4a0f18;--main-primary-light: #ffd1d7}.news-title[_ngcontent-%COMP%]{font-family:Book Antiqua,Avenir Medium,serif;font-size:28px;font-weight:700;border-bottom:3px solid red;margin-bottom:15px;color:#222}.news-image[_ngcontent-%COMP%]{display:block;max-width:100%;margin:0 auto;border-radius:4px}.image-caption[_ngcontent-%COMP%]{font-size:14px;font-style:italic;color:#555;text-align:center;margin-top:5px}.news-content[_ngcontent-%COMP%]{font-size:17px;line-height:1.6;color:#333;margin-top:20px}.news-content[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-left:20px;list-style-type:disc}.comments-section[_ngcontent-%COMP%]{margin-top:30px;padding:20px;background:snow;border-radius:12px;border:1px solid #f0d7da;box-shadow:0 6px 18px #0000000f;animation:fadeIn .6s ease both}.comments-title[_ngcontent-%COMP%]{font-size:1.6em;font-weight:800;margin-bottom:18px;color:var(--main-primary)}.top-level-form[_ngcontent-%COMP%]{margin-bottom:18px;padding:14px 16px;border:1px dashed var(--main-primary-light);border-radius:10px;background:#fff0f3;animation:fadeInScale .3s ease both}.top-level-form[_ngcontent-%COMP%] .form-title[_ngcontent-%COMP%]{font-size:1.08em;margin-bottom:10px;color:#3a4a59;font-weight:700}.top-level-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{width:100%;padding:12px;border-radius:8px;border:1px solid #f0c2c8;font-size:1em;margin-bottom:8px;transition:border-color .18s ease,box-shadow .18s ease}.top-level-form[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]:focus{border-color:var(--main-primary);box-shadow:0 0 0 4px #ff8e9e40;outline:none}.top-level-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}.top-level-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{flex:0 0 auto;min-width:110px;padding:10px 16px;border-radius:6px;font-size:.95em;font-weight:700;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.top-level-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background:linear-gradient(135deg,var(--main-primary-dark),#8a2433);color:#fff;border:1px solid #4a0f18;text-shadow:0 1px 2px rgba(0,0,0,.7)}.top-level-form[_ngcontent-%COMP%] .form-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 6px 14px #b23a4a80;filter:brightness(1.08)}"]})};export{ne as ParliamentNewsDetailComponent};
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.