text: (window.webpackJsonp=window.webpackJsonp||[]).push([[22],{"sO/H":function(t,e,a){"use strict";a.r(e),a.d(e,"HcManageModule",(function(){return Ce}));var n=a("ofXK"),i=a("3Pt+"),o=a("tyNb"),r=a("0IaG"),c=a("fXoL"),s=a("Rd8u"),l=a("bTqV"),b=a("NFeN");let d=(()=>{class t{constructor(t,e){this.dialogRef=t,this.data=e,this.model={}}close(){this.dialogRef.close()}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(r.h),c.Ob(r.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["article-settings-modal"]],decls:28,vars:1,consts:[[1,"modal-header"],["mat-dialog-title","","trans",""],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"formGroup","ngSubmit"],[1,"many-inputs"],[1,"input-container"],["for","article-slug","trans",""],["type","text","id","article-slug","formControlName","slug"],["for","article-description","trans",""],["name","article-description","id","article-description","rows","7","formControlName","description"],["trans",""],["for","article-position","trans",""],["type","number","id","article-position","name","article-position","formControlName","position","min","0"],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent","trans","",1,"submit-button"]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"h2",1),c.Kc(2,"Article Settings"),c.Tb(),c.Ub(3,"button",2),c.bc("click",(function(){return e.close()})),c.Pb(4,"mat-icon",3),c.Tb(),c.Tb(),c.Ub(5,"form",4),c.bc("ngSubmit",(function(){return e.close()})),c.Ub(6,"mat-dialog-content",5),c.Ub(7,"div",6),c.Ub(8,"label",7),c.Kc(9,"Slug"),c.Tb(),c.Pb(10,"input",8),c.Tb(),c.Ub(11,"div",6),c.Ub(12,"label",9),c.Kc(13,"Description"),c.Tb(),c.Pb(14,"textarea",10),c.Ub(15,"p",11),c.Kc(16,"This will appear when searching the help center. Excerpt from article will be used otherwise."),c.Tb(),c.Tb(),c.Ub(17,"div",6),c.Ub(18,"label",12),c.Kc(19,"Position"),c.Tb(),c.Pb(20,"input",13),c.Ub(21,"p",11),c.Kc(22,"Order for article on help center homepage. Lower position will be first."),c.Tb(),c.Tb(),c.Tb(),c.Ub(23,"mat-dialog-actions"),c.Ub(24,"button",14),c.bc("click",(function(){return e.close()})),c.Kc(25,"Cancel"),c.Tb(),c.Ub(26,"button",15),c.Kc(27,"Confirm"),c.Tb(),c.Tb(),c.Tb()),2&t&&(c.Bb(5),c.nc("formGroup",e.data.form))},directives:[r.i,s.a,l.b,b.a,i.v,i.m,r.f,i.d,i.u,i.k,i.A,r.c],encapsulation:2}),t})();function g(t,e){if(!t||!e)return!1;e=e.toLowerCase(),Array.isArray(t)||(t=[t]);for(let a=0;a<t.length;a++)if(t[a].toLowerCase().indexOf(e)>-1)return!0;return!1}class u{filter(t=null,e){if(!t)return e.slice();const a=[];for(let n=0;n<e.length;n++){const i=Object.assign({},e[n]);g(e[n].name,t)?a.push(i):(i.children=i.children.filter(e=>g(e.name,t)),i.children.length&&a.push(i))}return a}}var p=a("YdAL"),h=a("vkgz"),m=a("w1tV"),f=a("Kj3r"),v=a("/uUt"),y=a("Ndfy"),x=a("ahrr"),C=a("Qu3c"),T=a("bSwM"),k=a("zW5C");function w(t,e){if(1&t){const t=c.Vb();c.Ub(0,"div",15),c.Ub(1,"mat-checkbox",13),c.bc("change",(function(){c.zc(t);const a=e.$implicit,n=c.fc().$implicit;return c.fc().toggle(a,n.id)})),c.Kc(2),c.Tb(),c.Tb()}if(2&t){const t=e.$implicit,a=e.index,n=c.fc().index,i=c.fc();c.Bb(1),c.nc("id",n+""+a)("checked",i.categoryIsSelected(t.id)),c.Bb(1),c.Lc(t.name)}}function U(t,e){if(1&t){const t=c.Vb();c.Sb(0),c.Ub(1,"div",12),c.Ub(2,"mat-checkbox",13),c.bc("change",(function(){c.zc(t);const a=e.$implicit;return c.fc().toggle(a)})),c.Kc(3),c.Tb(),c.Tb(),c.Ic(4,w,3,3,"div",14),c.Rb()}if(2&t){const t=e.$implicit,a=e.index,n=c.fc();c.Bb(2),c.nc("id",a)("checked",n.categoryIsSelected(t.id)||n.childIsSelected(t)),c.Bb(1),c.Lc(t.name),c.Bb(1),c.nc("ngForOf",t.children)}}function _(t,e){1&t&&(c.Ub(0,"div",16),c.Kc(1,"No Results Found."),c.Tb())}const O=["*"];let I=(()=>{class t{constructor(t,e){this.api=t,this.storage=e,this.searchControl=new i.i,this.selectedCategories=[],this.filteredCategories=[],this.allCategories=[]}ngOnInit(){this.bindSearchQuery(),this.allCategories.length||this.refresh()}writeValue(t=[]){this.selectedCategories=t.length?t:this.storage.get("selectedCategories",[])}registerOnChange(t){this.propagateChange=t}registerOnTouched(){}refresh(){const t=this.api.getCategories().pipe(Object(h.a)(t=>{this.filteredCategories=t.categories,this.allCategories=t.categories}),Object(m.a)());return t.subscribe(),t}categoryIsSelected(t){return this.selectedCategories.indexOf(t)>-1}childIsSelected(t){if(!t.children.length)return!1;for(let e=0;e<t.children.length;e++)if(this.categoryIsSelected(t.children[e].id))return!0}toggle(t,e){const a=this.selectedCategories.indexOf(t.id);a>-1?this.selectedCategories.splice(a,1):this.selectedCategories.push(t.id),e&&!this.categoryIsSelected(e)&&this.selectedCategories.push(e),this.deselectChildren(t),this.storage.set("selectedCategories",this.selectedCategories),this.propagateChange(this.selectedCategories)}deselectAll(){this.selectedCategories=[],this.storage.set("selectedCategories",[]),this.propagateChange(this.selectedCategories)}deselectChildren(t){t.children&&t.children.forEach(t=>{const e=this.selectedCategories.indexOf(t.id);e>-1&&this.selectedCategories.splice(e,1)})}bindSearchQuery(){this.searchControl.valueChanges.pipe(Object(f.a)(400),Object(v.a)()).subscribe(t=>{this.filteredCategories=(new u).filter(t,this.allCategories),this.scrollbar.update()})}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(y.a),c.Ob(x.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["categories-manager"]],viewQuery:function(t,e){var a;1&t&&c.Gc(p.a,!0),2&t&&c.vc(a=c.cc())&&(e.scrollbar=a.first)},features:[c.Ab([{provide:i.s,useExisting:t,multi:!0}])],ngContentSelectors:O,decls:15,vars:6,consts:[[1,"panel"],[1,"panel-header"],["trans",""],["mat-icon-button","",1,"clear-all-button",3,"matTooltip","click"],["svgIcon","clear-all"],[1,"panel-body"],[1,"input-container"],["type","text","id","categories-manager-search","placeholder","Search...","trans-placeholder","",3,"formControl"],["svgIcon","search"],[1,"categories"],[4,"ngFor","ngForOf"],["class","no-results","trans","",4,"ngIf"],[1,"category","parent-category"],[3,"id","checked","change"],["class","category child-category",4,"ngFor","ngForOf"],[1,"category","child-category"],["trans","",1,"no-results"]],template:function(t,e){1&t&&(c.mc(),c.Ub(0,"div",0),c.Ub(1,"div",1),c.Ub(2,"span",2),c.Kc(3,"Categories"),c.Tb(),c.Ub(4,"button",3),c.bc("click",(function(){return e.deselectAll()})),c.gc(5,"trans"),c.Pb(6,"mat-icon",4),c.Tb(),c.Tb(),c.Ub(7,"div",5),c.Ub(8,"div",6),c.Pb(9,"input",7),c.Pb(10,"mat-icon",8),c.Tb(),c.Ub(11,"section",9),c.Ic(12,U,5,4,"ng-container",10),c.Ic(13,_,2,0,"div",11),c.Tb(),c.lc(14),c.Tb(),c.Tb()),2&t&&(c.Bb(4),c.nc("matTooltip",c.hc(5,4,"Clear All")),c.Bb(5),c.nc("formControl",e.searchControl),c.Bb(3),c.nc("ngForOf",e.filteredCategories),c.Bb(1),c.nc("ngIf",!e.filteredCategories.length&&e.searchControl.value))},directives:[s.a,l.b,C.a,b.a,i.d,i.u,i.j,n.s,n.t,T.a],pipes:[k.a],styles:["categories-manager{display:block}categories-manager .input-container{margin-bottom:10px;position:relative}categories-manager .input-container input{padding-left:33px}categories-manager .input-container .mat-icon{position:absolute;top:12px;left:7px;color:var(--be-secondary-text)}categories-manager .categories{max-height:250px;overflow:auto;padding:10px;border:1px solid var(--be-divider-default)}categories-manager .categories .category{margin-bottom:8px;overflow:hidden;text-overflow:ellipsis}categories-manager .categories .child-category{margin-left:20px}categories-manager .categories .parent-category label{font-weight:500}categories-manager .categories .no-results{font-style:italic;font-size:1.3rem}"],encapsulation:2}),t})();var B=a("J0Ic");let P=(()=>{class t{constructor(t,e){this.dialogRef=t,this.data=e,this.hydrate()}close(){this.dialogRef.close()}hydrate(){this.article=this.data.article}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(r.h),c.Ob(r.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["article-modal"]],decls:4,vars:1,consts:[["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],[3,"article"]],template:function(t,e){1&t&&(c.Ub(0,"mat-dialog-content"),c.Ub(1,"button",0),c.bc("click",(function(){return e.close()})),c.Pb(2,"mat-icon",1),c.Tb(),c.Pb(3,"article",2),c.Tb()),2&t&&(c.Bb(3),c.nc("article",e.article))},directives:[r.f,l.b,b.a,B.a],styles:[".article-modal-container{width:80%;height:calc(100% - 50px)}.article-modal-container .mat-dialog-container,.article-modal-container .mat-dialog-content{height:100%;max-height:100%}.article-modal-container .close-button{position:absolute;top:0;right:20px}"],encapsulation:2}),t})();var M=a("Lm4C"),L=a("QeDF"),A=a("h586"),D=a("IuoX"),K=a("i2dy"),F=a("1jcm");function V(t,e){1&t&&(c.Ub(0,"span",26),c.Kc(1,"Update Category"),c.Tb())}function S(t,e){1&t&&(c.Ub(0,"span",26),c.Kc(1,"New Category"),c.Tb())}function z(t,e){if(1&t&&(c.Ub(0,"div",29),c.Kc(1),c.Tb()),2&t){const t=c.fc();c.Bb(1),c.Lc(t.errors.name)}}function G(t,e){if(1&t&&(c.Ub(0,"div",30),c.Kc(1),c.Tb()),2&t){const t=c.fc();c.Bb(1),c.Lc(t.errors.image)}}function j(t,e){if(1&t&&(c.Ub(0,"option",31),c.Kc(1),c.Tb()),2&t){const t=e.$implicit;c.nc("value",t.id),c.Bb(1),c.Lc(t.name)}}function N(t,e){if(1&t&&(c.Ub(0,"div",32),c.Kc(1),c.Tb()),2&t){const t=c.fc();c.Bb(1),c.Lc(t.errors.parent_id)}}function R(t,e){if(1&t&&(c.Ub(0,"div",33),c.Kc(1),c.Tb()),2&t){const t=c.fc();c.Bb(1),c.Lc(t.errors.description)}}function E(t,e){1&t&&(c.Ub(0,"span",26),c.Kc(1,"Update"),c.Tb())}function Q(t,e){1&t&&(c.Ub(0,"span",26),c.Kc(1,"Create"),c.Tb())}let $=(()=>{class t{constructor(t,e,a,n,i,o){this.dialogRef=t,this.data=e,this.api=a,this.imageValidator=n,this.uploadQueue=i,this.toast=o,this.categories=[],this.model={},this.updating=!1,this.errors={},this.hydrate()}close(t){this.dialogRef.close(t)}confirm(){this.api.createOrUpdateCategory(this.getPayload()).subscribe(t=>{this.toast.open(this.model.id?"Updated category.":"Created category."),this.close(t)},t=>this.errors=t.errors)}hydrate(){this.fetchCategories(this.data.category),this.data.category&&(this.updating=!0,this.model=this.data.category),this.data.parentId&&(this.model.parent_id=this.data.parentId)}getPayload(){return{id:this.model.id,name:this.model.name,image:this.model.image,description:this.model.description,parent_id:this.model.parent_id||null,hidden:this.model.hidden}}fetchCategories(t){this.api.getCategories().subscribe(e=>{this.categories=e.categories.filter(e=>!t||t.id!==e.id)})}openInsertImageDialog(){const t={uri:"uploads/images",httpParams:{diskPrefix:"category"},validator:this.imageValidator};Object(M.a)({types:[L.a.image],multiple:!1}).then(e=>{e&&this.uploadQueue.start(e,t).subscribe(t=>{this.model.image=t.fileEntry.url})})}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(r.h),c.Ob(r.a),c.Ob(y.a),c.Ob(D.a),c.Ob(A.a),c.Ob(K.b))},t.\u0275cmp=c.Ib({type:t,selectors:[["category-modal"]],features:[c.Ab([A.a])],decls:46,vars:18,consts:[[1,"modal-header"],["mat-dialog-title",""],["trans","",4,"ngIf"],["type","button","mat-icon-button","","tabindex","-1",1,"close-button",3,"click"],["svgIcon","close"],["ngNativeValidate","",3,"ngSubmit"],[1,"many-inputs"],[1,"input-container"],["for","name","trans",""],["type","text","id","name","name","name",3,"ngModel","ngModelChange"],["class","error name-error",4,"ngIf"],["for","image","trans",""],[1,"input-with-action","action-left"],["mat-flat-button","","color","accent","type","button",1,"addon",3,"matTooltip","click"],["svgIcon","file-upload"],["type","text","id","image","name","image",3,"ngModel","ngModelChange"],["class","error image-error",4,"ngIf"],["type","text","id","parent_id","name","parent_id",3,"ngModel","ngModelChange"],["trans","",3,"ngValue"],[3,"value",4,"ngFor","ngForOf"],["class","error parent-error",4,"ngIf"],["for","description","trans",""],["type","text","id","description","name","description","rows","4",3,"ngModel","ngModelChange"],["class","error description-error",4,"ngIf"],[1,"setting-toggle-container"],["name","hidden","id","hidden","trans","",3,"ngModel","ngModelChange"],["trans",""],["type","button","mat-button","","trans","",1,"cancel-button",3,"click"],["type","submit","mat-raised-button","","color","accent",1,"submit-button"],[1,"error","name-error"],[1,"error","image-error"],[3,"value"],[1,"error","parent-error"],[1,"error","description-error"]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"h2",1),c.Ic(2,V,2,0,"span",2),c.Ic(3,S,2,0,"span",2),c.Tb(),c.Ub(4,"button",3),c.bc("click",(function(){return e.close()})),c.Pb(5,"mat-icon",4),c.Tb(),c.Tb(),c.Ub(6,"form",5),c.bc("ngSubmit",(function(){return e.confirm()})),c.Ub(7,"mat-dialog-content",6),c.Ub(8,"div",7),c.Ub(9,"label",8),c.Kc(10,"Name"),c.Tb(),c.Ub(11,"input",9),c.bc("ngModelChange",(function(t){return e.model.name=t})),c.Tb(),c.Ic(12,z,2,1,"div",10),c.Tb(),c.Ub(13,"div",7),c.Ub(14,"label",11),c.Kc(15,"Image"),c.Tb(),c.Ub(16,"div",12),c.Ub(17,"button",13),c.bc("click",(function(){return e.openInsertImageDialog()})),c.gc(18,"trans"),c.Pb(19,"mat-icon",14),c.Tb(),c.Ub(20,"input",15),c.bc("ngModelChange",(function(t){return e.model.image=t})),c.Tb(),c.Tb(),c.Ic(21,G,2,1,"div",16),c.Tb(),c.Ub(22,"div",7),c.Ub(23,"label",8),c.Kc(24,"Parent Category"),c.Tb(),c.Ub(25,"select",17),c.bc("ngModelChange",(function(t){return e.model.parent_id=t})),c.Ub(26,"option",18),c.Kc(27,"No Parent Category"),c.Tb(),c.Ic(28,j,2,2,"option",19),c.Tb(),c.Ic(29,N,2,1,"div",20),c.Tb(),c.Ub(30,"div",7),c.Ub(31,"label",21),c.Kc(32,"Description"),c.Tb(),c.Ub(33,"textarea",22),c.bc("ngModelChange",(function(t){return e.model.description=t})),c.Tb(),c.Ic(34,R,2,1,"div",23),c.Tb(),c.Ub(35,"div",24),c.Ub(36,"mat-slide-toggle",25),c.bc("ngModelChange",(function(t){return e.model.hidden=t})),c.Kc(37,"Hidden"),c.Tb(),c.Ub(38,"p",26),c.Kc(39,"Whether this category should be displayed in help center."),c.Tb(),c.Tb(),c.Tb(),c.Ub(40,"mat-dialog-actions"),c.Ub(41,"button",27),c.bc("click",(function(){return e.close()})),c.Kc(42,"Cancel"),c.Tb(),c.Ub(43,"button",28),c.Ic(44,E,2,0,"span",2),c.Ic(45,Q,2,0,"span",2),c.Tb(),c.Tb(),c.Tb()),2&t&&(c.Bb(2),c.nc("ngIf",e.updating),c.Bb(1),c.nc("ngIf",!e.updating),c.Bb(8),c.nc("ngModel",e.model.name),c.Bb(1),c.nc("ngIf",e.errors.name),c.Bb(5),c.nc("matTooltip",c.hc(18,16,"Upload image")),c.Bb(3),c.nc("ngModel",e.model.image),c.Bb(1),c.nc("ngIf",e.errors.image),c.Bb(4),c.nc("ngModel",e.model.parent_id),c.Bb(1),c.nc("ngValue",null),c.Bb(2),c.nc("ngForOf",e.categories),c.Bb(1),c.nc("ngIf",e.errors.parent_id),c.Bb(4),c.nc("ngModel",e.model.description),c.Bb(1),c.nc("ngIf",e.errors.description),c.Bb(2),c.nc("ngModel",e.model.hidden),c.Bb(8),c.nc("ngIf",e.updating),c.Bb(1),c.nc("ngIf",!e.updating))},directives:[r.i,n.t,l.b,b.a,i.v,i.w,r.f,s.a,i.d,i.u,i.x,C.a,i.G,i.z,i.J,n.s,F.a,r.c],pipes:[k.a],encapsulation:2}),t})();var H=a("KKQg"),J=a("WAq7"),X=a("QGXG"),Y=a("KHvZ"),Z=a("rG4v"),q=a("3FDK"),W=a("FBzJ"),tt=a("83jf");function et(t,e){1&t&&(c.Ub(0,"span",31),c.Kc(1,"Create Article"),c.Tb())}function at(t,e){1&t&&(c.Ub(0,"span",32),c.Kc(1,"Update Article"),c.Tb())}function nt(t,e){if(1&t){const t=c.Vb();c.Ub(0,"reply-attachment-list",34),c.bc("detached",(function(e){return c.zc(t),c.fc(2).removeAttachment(e)})),c.Tb()}if(2&t){const t=c.fc(2);c.nc("attachments",t.attachments)}}function it(t,e){if(1&t&&(c.Ub(0,"div",23),c.Ub(1,"div",24),c.Kc(2,"Attachments"),c.Tb(),c.Ub(3,"div",25),c.Ic(4,nt,1,1,"reply-attachment-list",33),c.Tb(),c.Tb()),2&t){const t=c.fc();c.Bb(4),c.nc("ngIf",t.attachments.length)}}const ot=function(){return{exact:!0}};let rt=(()=>{class t{constructor(t,e,a,n,i,o,r){this.modal=t,this.helpCenter=e,this.toast=a,this.route=n,this.router=i,this.uploadQueue=o,this.fb=r,this.updating=!1,this.attachments=[],this.form=this.fb.group({title:[""],body:[""],slug:[""],description:[""],position:[0],draft:[1],categories:[[]],tags:[[]]})}ngOnInit(){this.route.data.subscribe(t=>{if(t.article){const e=t.article;e.categories=e.categories.map(t=>t.id),e.tags=e.tags.map(t=>t.name),this.form.patchValue(e),this.textEditor.setContents(e.body),this.attachments=e.uploads||[]}})}saveOrUpdateArticle(){this.updating=!0,(this.route.snapshot.data.article?this.helpCenter.updateArticle(this.route.snapshot.data.article.id,this.getPayload()):this.helpCenter.createArticle(this.getPayload())).subscribe(()=>{this.toast.open("Article "+(this.route.snapshot.data.article?"updated.":"created.")),this.router.navigateByUrl("help-center/manage/articles")},t=>{const e=t.errors[Object.keys(t.errors)[0]];this.toast.open(e),this.updating=!1})}openPreviewModal(){this.modal.open(P,{article:this.getPayload(!1)},{panelClass:"article-modal-container"})}openArticleSettingsModal(){this.modal.show(d,{form:this.form})}getPayload(t=!0){const e=this.form.value;return e.body=this.textEditor.getContents(),t&&(e.uploads=this.attachments.map(t=>t.id)),e.slug=Object(J.a)(e.slug),e}openNewCategoryModal(){this.modal.show($).afterClosed().subscribe(t=>{t&&this.categoriesManager.refresh().subscribe(()=>{this.categoriesManager.toggle(t)})})}uploadFiles(t){this.uploadQueue.start(t).subscribe(t=>{this.attachments=[...this.attachments,t.fileEntry]})}removeAttachment(t){for(let e=0;e<this.attachments.length;e++)this.attachments[e].id===t.id&&this.attachments.splice(e,1)}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(X.a),c.Ob(Y.a),c.Ob(K.b),c.Ob(o.a),c.Ob(o.f),c.Ob(A.a),c.Ob(i.h))},t.\u0275cmp=c.Ib({type:t,selectors:[["new-article"]],viewQuery:function(t,e){var a;1&t&&(c.Gc(H.a,!0),c.Gc(I,!0)),2&t&&(c.vc(a=c.cc())&&(e.textEditor=a.first),c.vc(a=c.cc())&&(e.categoriesManager=a.first))},features:[c.Ab([A.a])],decls:42,vars:18,consts:[[1,"action-bar"],[1,"nav"],["routerLinkActive","router-link-active","trans","",1,"nav-item",3,"routerLink","routerLinkActiveOptions"],["routerLinkActive","router-link-active","trans","",1,"nav-item",3,"routerLink"],[1,"actions"],[1,"no-style","action","article-settings-action",3,"click"],["svgIcon","settings"],["id","submit",1,"no-style","publish-article-button","new-item-button",3,"click"],["class","create-article-submit","trans","",4,"ngIf"],["class","update-article-submit","trans","",4,"ngIf"],[1,"container",3,"formGroup"],[1,"middle-column"],[1,"input-container","title"],["type","text","formControlName","title","placeholder","Title","trans-placeholder","",1,"article-title-input"],["formControlName","draft",1,"article-status-input"],["trans","",3,"value"],[1,"text-editor-container"],["inlineUploadPrefix","article_images","minHeight","auto",1,"text-editor",3,"showAdvancedControls","onFileUpload"],["editorEl",""],["customScrollbar","lite",1,"right-column"],["formControlName","categories",1,"categories-panel"],[1,"new-category-button"],["mat-flat-button","","color","accent","trans","",3,"click"],[1,"panel"],["trans","",1,"panel-header"],[1,"panel-body"],["formControlName","tags"],["class","panel",4,"ngIf"],[1,"preview-article-button",3,"matTooltip","click"],["svgIcon","remove-red-eye",1,"size-20"],[1,"overlay",3,"isVisible"],["trans","",1,"create-article-submit"],["trans","",1,"update-article-submit"],[3,"attachments","detached",4,"ngIf"],[3,"attachments","detached"]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"div",1),c.Ub(2,"a",2),c.Kc(3,"Home"),c.Tb(),c.Ub(4,"a",3),c.Kc(5,"Categories"),c.Tb(),c.Ub(6,"a",2),c.Kc(7,"Articles"),c.Tb(),c.Tb(),c.Ub(8,"div",4),c.Ub(9,"button",5),c.bc("click",(function(){return e.openArticleSettingsModal()})),c.Pb(10,"mat-icon",6),c.Tb(),c.Ub(11,"button",7),c.bc("click",(function(){return e.saveOrUpdateArticle()})),c.Ic(12,et,2,0,"span",8),c.Ic(13,at,2,0,"span",9),c.Tb(),c.Tb(),c.Tb(),c.Ub(14,"div",10),c.Ub(15,"section",11),c.Ub(16,"div",12),c.Pb(17,"input",13),c.Ub(18,"select",14),c.Ub(19,"option",15),c.Kc(20,"Published"),c.Tb(),c.Ub(21,"option",15),c.Kc(22,"Draft"),c.Tb(),c.Tb(),c.Tb(),c.Ub(23,"div",16),c.Pb(24,"upload-progress-bar"),c.Ub(25,"text-editor",17,18),c.bc("onFileUpload",(function(t){return e.uploadFiles(t)})),c.Tb(),c.Tb(),c.Tb(),c.Ub(27,"aside",19),c.Ub(28,"categories-manager",20),c.Ub(29,"div",21),c.Ub(30,"button",22),c.bc("click",(function(){return e.openNewCategoryModal()})),c.Kc(31,"+ Add New Category"),c.Tb(),c.Tb(),c.Tb(),c.Ub(32,"div",23),c.Ub(33,"div",24),c.Kc(34,"Tags"),c.Tb(),c.Ub(35,"div",25),c.Pb(36,"tags-manager",26),c.Tb(),c.Tb(),c.Ic(37,it,5,1,"div",27),c.Tb(),c.Ub(38,"button",28),c.bc("click",(function(){return e.openPreviewModal()})),c.gc(39,"trans"),c.Pb(40,"mat-icon",29),c.Tb(),c.Pb(41,"loading-indicator",30),c.Tb()),2&t&&(c.Bb(2),c.nc("routerLink","/help-center")("routerLinkActiveOptions",c.rc(16,ot)),c.Bb(2),c.nc("routerLink","/help-center/manage/categories"),c.Bb(2),c.nc("routerLink","/help-center/manage/articles")("routerLinkActiveOptions",c.rc(17,ot)),c.Bb(6),c.nc("ngIf",!e.route.snapshot.data.article),c.Bb(1),c.nc("ngIf",e.route.snapshot.data.article),c.Bb(1),c.nc("formGroup",e.form),c.Bb(5),c.nc("value",0),c.Bb(2),c.nc("value",1),c.Bb(4),c.nc("showAdvancedControls",!0),c.Bb(12),c.nc("ngIf",null==e.attachments?null:e.attachments.length),c.Bb(1),c.nc("matTooltip",c.hc(39,14,"Preview Article")),c.Bb(3),c.nc("isVisible",e.updating))},directives:[o.i,o.h,s.a,b.a,n.t,i.v,i.m,i.d,i.u,i.k,i.G,i.z,i.J,Z.a,H.a,p.a,I,l.b,q.a,C.a,W.a,tt.a],pipes:[k.a],styles:["new-article{display:block;overflow:hidden;background-color:var(--be-background-alternative)}new-article .action-bar .action{color:var(--be-secondary-text)}new-article .text-editor-container{height:calc(100% - 50px)}new-article .container{display:flex;max-width:1300px;margin:20px auto;height:calc(100vh - 165px)}new-article .container .middle-column{flex:1 1 auto;height:100%;margin-right:20px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);background-color:var(--be-background);border:1px solid #d3d3d3;border-bottom-color:#c4c4c4;border-radius:4px;overflow:hidden}new-article .container .middle-column .title{display:flex}new-article .container .middle-column .title .article-status-input,new-article .container .middle-column .title .article-title-input{border:none;height:50px}new-article .container .middle-column .title .article-title-input{flex:1 1 auto;font-size:2rem;padding:10px 25px}new-article .container .middle-column .title .article-status-input{flex:0 0 130px;border-left:1px solid var(--be-divider-default)}new-article .container .middle-column text-editor{max-height:none;border-left:none;border-right:none;border-bottom:none}new-article .container .middle-column text-editor .editor-footer,new-article .container .middle-column text-editor .editor-header{background-color:#fff}new-article .container .right-column{width:302px;flex:0 0 302px;overflow:auto;padding:0 2px;height:100%}new-article .container .right-column .panel{box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);background-color:var(--be-background);border:1px solid #d3d3d3;border-bottom-color:#c4c4c4;border-radius:4px}new-article .container .right-column .new-category-button{margin:15px 0 5px}new-article .container .preview-article-button{width:50px;height:50px;display:flex;justify-content:center;align-items:center;border-radius:50%;box-shadow:0 3px 3px -2px rgba(0,0,0,.2),0 3px 4px 0 rgba(0,0,0,.14),0 1px 8px 0 rgba(0,0,0,.12);background-color:var(--be-accent-default);color:var(--be-accent-contrast);position:absolute;right:20px;bottom:20px;border:none;outline:none;cursor:pointer}new-article reply-attachment-list{display:block}new-article reply-attachment-list .attachments-list-item{width:100%}"],encapsulation:2}),t})();var ct=a("EY2u"),st=a("LRne"),lt=a("lJxs"),bt=a("JIr8"),dt=a("5+tZ");let gt=(()=>{class t{constructor(t,e,a){this.helpCenter=t,this.categories=e,this.router=a}resolve(t){return this.helpCenter.getArticle(t.params.article_id).pipe(Object(lt.a)(t=>t.article)).pipe(Object(bt.a)(()=>(this.router.navigateByUrl("/help-center/manage/articles"),ct.a)),Object(dt.a)(t=>Object(st.a)(t)))}}return t.\u0275fac=function(e){return new(e||t)(c.Yb(Y.a),c.Yb(y.a),c.Yb(o.f))},t.\u0275prov=c.Kb({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var ut=a("2hX1"),pt=a("rpAg"),ht=a("kmQS"),mt=a("bmro"),ft=a("8LU1"),vt=a("0EQZ"),yt=a("FKr1"),xt=a("u47x");const Ct=["button"],Tt=["*"],kt=new c.r("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),wt={provide:i.s,useExisting:Object(c.V)(()=>Ot),multi:!0};let Ut=0;class _t{constructor(t,e){this.source=t,this.value=e}}let Ot=(()=>{class t{constructor(t,e){this._changeDetector=t,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+Ut++,this.valueChange=new c.n,this.change=new c.n,this.appearance=e&&e.appearance?e.appearance:"standard"}get name(){return this._name}set name(t){this._name=t,this._buttonToggles&&this._buttonToggles.forEach(t=>{t.name=this._name,t._markForCheck()})}get vertical(){return this._vertical}set vertical(t){this._vertical=Object(ft.c)(t)}get value(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t.map(t=>t.value):t[0]?t[0].value:void 0}set value(t){this._setSelectionByValue(t),this.valueChange.emit(this.value)}get selected(){const t=this._selectionModel?this._selectionModel.selected:[];return this.multiple?t:t[0]||null}get multiple(){return this._multiple}set multiple(t){this._multiple=Object(ft.c)(t)}get disabled(){return this._disabled}set disabled(t){this._disabled=Object(ft.c)(t),this._buttonToggles&&this._buttonToggles.forEach(t=>t._markForCheck())}ngOnInit(){this._selectionModel=new vt.b(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(t=>t.checked))}writeValue(t){this.value=t,this._changeDetector.markForCheck()}registerOnChange(t){this._controlValueAccessorChangeFn=t}registerOnTouched(t){this._onTouched=t}setDisabledState(t){this.disabled=t}_emitChangeEvent(){const t=this.selected,e=Array.isArray(t)?t[t.length-1]:t,a=new _t(e,this.value);this._controlValueAccessorChangeFn(a.value),this.change.emit(a)}_syncButtonToggle(t,e,a=!1,n=!1){this.multiple||!this.selected||t.checked||(this.selected.checked=!1),this._selectionModel?e?this._selectionModel.select(t):this._selectionModel.deselect(t):n=!0,n?Promise.resolve().then(()=>this._updateModelValue(a)):this._updateModelValue(a)}_isSelected(t){return this._selectionModel&&this._selectionModel.isSelected(t)}_isPrechecked(t){return void 0!==this._rawValue&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(e=>null!=t.value&&e===t.value):t.value===this._rawValue)}_setSelectionByValue(t){if(this._rawValue=t,this._buttonToggles)if(this.multiple&&t){if(!Array.isArray(t))throw Error("Value must be an array in multiple-selection mode.");this._clearSelection(),t.forEach(t=>this._selectValue(t))}else this._clearSelection(),this._selectValue(t)}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(t=>t.checked=!1)}_selectValue(t){const e=this._buttonToggles.find(e=>null!=e.value&&e.value===t);e&&(e.checked=!0,this._selectionModel.select(e))}_updateModelValue(t){t&&this._emitChangeEvent(),this.valueChange.emit(this.value)}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(c.h),c.Ob(kt,8))},t.\u0275dir=c.Jb({type:t,selectors:[["mat-button-toggle-group"]],contentQueries:function(t,e,a){var n;1&t&&c.Hb(a,Pt,!0),2&t&&c.vc(n=c.cc())&&(e._buttonToggles=n)},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(t,e){2&t&&(c.Cb("aria-disabled",e.disabled),c.Fb("mat-button-toggle-vertical",e.vertical)("mat-button-toggle-group-appearance-standard","standard"===e.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[c.Ab([wt])]}),t})();class It{}const Bt=Object(yt.w)(It);let Pt=(()=>{class t extends Bt{constructor(t,e,a,n,i,o){super(),this._changeDetectorRef=e,this._elementRef=a,this._focusMonitor=n,this._isSingleSelector=!1,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new c.n;const r=Number(i);this.tabIndex=r||0===r?r:null,this.buttonToggleGroup=t,this.appearance=o&&o.appearance?o.appearance:"standard"}get buttonId(){return this.id+"-button"}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(t){this._appearance=t}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(t){const e=Object(ft.c)(t);e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(t){this._disabled=Object(ft.c)(t)}ngOnInit(){const t=this.buttonToggleGroup;this._isSingleSelector=t&&!t.multiple,this.id=this.id||"mat-button-toggle-"+Ut++,this._isSingleSelector&&(this.name=t.name),t&&(t._isPrechecked(this)?this.checked=!0:t._isSelected(this)!==this._checked&&t._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){const t=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),t&&t._isSelected(this)&&t._syncButtonToggle(this,!1,!1,!0)}focus(t){this._buttonElement.nativeElement.focus(t)}_onButtonClick(){const t=!!this._isSingleSelector||!this._checked;t!==this._checked&&(this._checked=t,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new _t(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(Ot,8),c.Ob(c.h),c.Ob(c.l),c.Ob(xt.h),c.Zb("tabindex"),c.Ob(kt,8))},t.\u0275cmp=c.Ib({type:t,selectors:[["mat-button-toggle"]],viewQuery:function(t,e){var a;1&t&&c.Rc(Ct,!0),2&t&&c.vc(a=c.cc())&&(e._buttonElement=a.first)},hostAttrs:[1,"mat-button-toggle"],hostVars:11,hostBindings:function(t,e){1&t&&c.bc("focus",(function(){return e.focus()})),2&t&&(c.Cb("tabindex",-1)("id",e.id)("name",null),c.Fb("mat-button-toggle-standalone",!e.buttonToggleGroup)("mat-button-toggle-checked",e.checked)("mat-button-toggle-disabled",e.disabled)("mat-button-toggle-appearance-standard","standard"===e.appearance))},inputs:{disableRipple:"disableRipple",ariaLabelledby:["aria-labelledby","ariaLabelledby"],tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled",id:"id",name:"name",ariaLabel:["aria-label","ariaLabel"],value:"value"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[c.yb],ngContentSelectors:Tt,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,e){if(1&t&&(c.mc(),c.Ub(0,"button",0,1),c.bc("click",(function(){return e._onButtonClick()})),c.Ub(2,"div",2),c.lc(3),c.Tb(),c.Tb(),c.Pb(4,"div",3),c.Pb(5,"div",4)),2&t){const t=c.wc(1);c.nc("id",e.buttonId)("disabled",e.disabled||null),c.Cb("tabindex",e.disabled?-1:e.tabIndex)("aria-pressed",e.checked)("name",e.name||null)("aria-label",e.ariaLabel)("aria-labelledby",e.ariaLabelledby),c.Bb(5),c.nc("matRippleTrigger",t)("matRippleDisabled",e.disableRipple||e.disabled)}},directives:[yt.q],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:transparent}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.cdk-high-contrast-active .mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:.5}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}.cdk-high-contrast-active .mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.5}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{border-radius:inherit;pointer-events:none;opacity:0;top:0;left:0;right:0;bottom:0;position:absolute}.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}\n"],encapsulation:2,changeDetection:0}),t})(),Mt=(()=>{class t{}return t.\u0275mod=c.Mb({type:t}),t.\u0275inj=c.Lb({factory:function(e){return new(e||t)},imports:[[yt.g,yt.r],yt.g]}),t})();var Lt=a("rcZy"),At=a("A5z7"),Dt=a("CH4Q");function Kt(t,e){if(1&t&&(c.Ub(0,"option",31),c.Kc(1),c.gc(2,"trans"),c.Tb()),2&t){const t=e.$implicit;c.nc("value",t.value),c.Bb(1),c.Lc(c.hc(2,2,t.key))}}function Ft(t,e){if(1&t&&(c.Ub(0,"span",49),c.Kc(1),c.Tb()),2&t){const t=c.fc(2).$implicit;c.Bb(1),c.Mc("",t.categories[0].parent.name," > ")}}function Vt(t,e){if(1&t&&(c.Ub(0,"div",46),c.Ic(1,Ft,2,1,"span",47),c.Ub(2,"span",48),c.Kc(3),c.Tb(),c.Tb()),2&t){const t=c.fc().$implicit;c.Bb(1),c.nc("ngIf",null==t.categories[0]?null:t.categories[0].parent),c.Bb(2),c.Lc(t.categories[0].name)}}function St(t,e){if(1&t){const t=c.Vb();c.Ub(0,"mat-chip",50),c.bc("click",(function(a){c.zc(t);const n=e.$implicit;return c.fc(3).toggleTagFilter(n),a.stopPropagation()})),c.Kc(1),c.Tb()}if(2&t){const t=e.$implicit;c.Bb(1),c.Lc(t.display_name)}}function zt(t,e){if(1&t){const t=c.Vb();c.Ub(0,"div",38),c.bc("click",(function(){c.zc(t);const a=e.$implicit;return c.fc(2).goToUpdateArticle(a.id)})),c.Ub(1,"button",39),c.bc("click",(function(a){c.zc(t);const n=e.$implicit;return c.fc(2).maybeDeleteArticle(n),a.stopPropagation()})),c.gc(2,"trans"),c.Pb(3,"mat-icon",40),c.Tb(),c.Ic(4,Vt,4,2,"div",41),c.Ub(5,"div",42),c.Kc(6),c.Tb(),c.Ub(7,"div",43),c.Kc(8),c.Tb(),c.Ub(9,"mat-chip-list",44),c.Ic(10,St,2,1,"mat-chip",45),c.Tb(),c.Tb()}if(2&t){const t=e.$implicit;c.Fb("draft",t.draft),c.Bb(1),c.nc("matTooltip",c.hc(2,7,"Delete Article")),c.Bb(3),c.nc("ngIf",t.categories.length),c.Bb(2),c.Lc(t.title),c.Bb(2),c.Lc(t.body),c.Bb(2),c.nc("ngForOf",t.tags)}}function Gt(t,e){1&t&&(c.Ub(0,"no-results-message"),c.Ub(1,"span",51),c.Kc(2,"Could not find any articles."),c.Tb(),c.Ub(3,"span",52),c.Kc(4,"Try to make article files less specific."),c.Tb(),c.Tb())}function jt(t,e){if(1&t&&(c.Ub(0,"div",32,33),c.Ub(2,"div",34),c.Ub(3,"div"),c.Ic(4,zt,11,9,"div",35),c.Tb(),c.Ic(5,Gt,5,0,"no-results-message",36),c.gc(6,"async"),c.Tb(),c.Pb(7,"loading-indicator",37),c.gc(8,"async"),c.Pb(9,"datatable-footer"),c.Tb()),2&t){const t=e.ngIf,a=c.fc();c.Bb(3),c.Fb("grid-flex-wrapper","grid"===a.selectedLayout),c.Bb(1),c.nc("ngForOf",t),c.Bb(1),c.nc("ngIf",c.hc(6,5,a.datatable.paginator.noResults$)),c.Bb(2),c.nc("isVisible",c.hc(8,7,a.datatable.paginator.loading$))}}const Nt=function(){return{exact:!0}};let Rt=(()=>{class t{constructor(t,e,a,n){this.helpCenter=t,this.router=e,this.datatable=a,this.settings=n,this.selectedLayout="grid",this.articleOrderOptions=pt.a,this.form=new i.l({categories:new i.i(""),tags:new i.i([]),draft:new i.i(null),order:new i.i(this.settings.get("articles.default_order"))})}ngOnInit(){this.datatable.init({uri:"help-center/articles"}),this.form.valueChanges.subscribe(t=>{this.datatable.filters$.next(t)})}goToUpdateArticle(t){this.router.navigate(["/help-center/manage/","articles",t,"edit"])}maybeDeleteArticle(t){this.datatable.confirmResourceDeletion("article").subscribe(()=>{this.helpCenter.deleteArticles([t.id]).subscribe(()=>this.datatable.reset())})}setLayout(t){this.selectedLayout=t}isLayoutActive(t){return this.selectedLayout===t}toggleTagFilter(t){const e=this.form.get("tags").value,a=e.indexOf(t.name);a>-1?e.splice(a,1):e.push(t.name),this.form.get("tags").setValue(e)}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(Y.a),c.Ob(o.f),c.Ob(ut.a),c.Ob(ht.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["articles-list"]],features:[c.Ab([ut.a])],decls:46,vars:20,consts:[[1,"action-bar"],[1,"nav"],["routerLinkActive","router-link-active","trans","",1,"nav-item","home-nav-item",3,"routerLink","routerLinkActiveOptions"],["routerLinkActive","router-link-active","trans","",1,"nav-item","categories-nav-item",3,"routerLink"],["routerLinkActive","router-link-active","trans","",1,"nav-item","articles-nav-item",3,"routerLink"],[1,"actions"],[1,"search-bar","input-container"],["placeholder","Search"],[1,"action-bar-action","change-layout-action"],[1,"no-style","grid-layout-button",3,"click"],["svgIcon","view-comfy"],[1,"no-style","list-layout-button",3,"click"],["svgIcon","view-list"],[1,"action-bar-action",3,"formGroup"],["name","order","id","order","formControlName","order"],[3,"value",4,"ngFor","ngForOf"],["routerLink","new",1,"new-article-button","new-item-button"],["svgIcon","add"],["trans",""],[1,"content"],[1,"article-list-filters"],[1,"filters-list",3,"formGroup"],["formControlName","categories",1,"article-categories-filter"],[1,"panel","tags-filter"],["trans","",1,"panel-header"],[1,"panel-body"],["formControlName","tags"],[1,"panel","article-type-filter"],["formControlName","draft"],["trans","",3,"value"],["class","articles-list-container",4,"ngIf"],[3,"value"],[1,"articles-list-container"],["scrollContainer",""],[1,"articles-list"],["class","articles-list-item",3,"draft","click",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"overlay",3,"isVisible"],[1,"articles-list-item",3,"click"],[1,"no-style","delete-article-button",3,"matTooltip","click"],["svgIcon","delete",1,"size-20"],["class","article-categories",4,"ngIf"],[1,"article-title"],[1,"article-body"],[1,"article-tags"],["color","standard",3,"click",4,"ngFor","ngForOf"],[1,"article-categories"],["class","parent-category",4,"ngIf"],[1,"category"],[1,"parent-category"],["color","standard",3,"click"],["primary-text","","trans",""],["secondary-text","","trans",""]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"div",1),c.Ub(2,"a",2),c.Kc(3,"Home"),c.Tb(),c.Ub(4,"a",3),c.Kc(5,"Categories"),c.Tb(),c.Ub(6,"a",4),c.Kc(7,"Articles"),c.Tb(),c.Tb(),c.Ub(8,"div",5),c.Ub(9,"div",6),c.Pb(10,"datatable-header-search-input",7),c.Tb(),c.Ub(11,"div",8),c.Ub(12,"button",9),c.bc("click",(function(){return e.setLayout("grid")})),c.Pb(13,"mat-icon",10),c.Tb(),c.Ub(14,"button",11),c.bc("click",(function(){return e.setLayout("list")})),c.Pb(15,"mat-icon",12),c.Tb(),c.Tb(),c.Ub(16,"div",13),c.Ub(17,"select",14),c.Ic(18,Kt,3,4,"option",15),c.gc(19,"keyvalue"),c.Tb(),c.Tb(),c.Ub(20,"a",16),c.Pb(21,"mat-icon",17),c.Ub(22,"span",18),c.Kc(23,"Create New Article"),c.Tb(),c.Tb(),c.Tb(),c.Tb(),c.Ub(24,"div",19),c.Ub(25,"div",20),c.Ub(26,"div",21),c.Pb(27,"categories-manager",22),c.Ub(28,"div",23),c.Ub(29,"div",24),c.Kc(30,"Tags"),c.Tb(),c.Ub(31,"div",25),c.Pb(32,"tags-manager",26),c.Tb(),c.Tb(),c.Ub(33,"div",27),c.Ub(34,"div",24),c.Kc(35,"Article Status"),c.Tb(),c.Ub(36,"div",25),c.Ub(37,"mat-button-toggle-group",28),c.Ub(38,"mat-button-toggle",29),c.Kc(39,"All"),c.Tb(),c.Ub(40,"mat-button-toggle",29),c.Kc(41,"Published"),c.Tb(),c.Ub(42,"mat-button-toggle",29),c.Kc(43,"Draft"),c.Tb(),c.Tb(),c.Tb(),c.Tb(),c.Tb(),c.Tb(),c.Ic(44,jt,10,9,"div",30),c.gc(45,"async"),c.Tb()),2&t&&(c.Bb(2),c.nc("routerLink","/help-center")("routerLinkActiveOptions",c.rc(19,Nt)),c.Bb(2),c.nc("routerLink","/help-center/manage/categories"),c.Bb(2),c.nc("routerLink","/help-center/manage/articles"),c.Bb(6),c.Fb("active",e.isLayoutActive("grid")),c.Bb(2),c.Fb("active",e.isLayoutActive("list")),c.Bb(2),c.nc("formGroup",e.form),c.Bb(2),c.nc("ngForOf",c.hc(19,15,e.articleOrderOptions)),c.Bb(8),c.nc("formGroup",e.form),c.Bb(12),c.nc("value",null),c.Bb(2),c.nc("value",0),c.Bb(2),c.nc("value",1),c.Bb(2),c.nc("ngIf",c.hc(45,17,e.datatable.data$)))},directives:[o.i,o.h,s.a,mt.a,b.a,i.v,i.m,i.G,i.u,i.k,n.s,I,q.a,Ot,Pt,n.t,i.z,i.J,W.a,Lt.a,C.a,At.d,At.a,Dt.a],pipes:[n.l,n.b,k.a],styles:["[_nghost-%COMP%]{display:block;max-height:calc(100vh - 70px);overflow:hidden;background-color:var(--be-background-alternative)}.content[_ngcontent-%COMP%]{display:flex}.article-list-filters[_ngcontent-%COMP%]{display:block;height:calc(100vh - 125px);overflow:auto;flex:0 0 302px;min-width:0;background-color:var(--be-background);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);position:relative;z-index:1}.article-list-filters[_ngcontent-%COMP%]     .mat-button-toggle{flex:1 1 auto}.article-list-filters[_ngcontent-%COMP%]   .filters-list[_ngcontent-%COMP%]{padding:15px}.article-list-filters[_ngcontent-%COMP%]   mat-button-toggle-group[_ngcontent-%COMP%]{width:100%}no-results-message[_ngcontent-%COMP%]{margin-top:50px}.articles-list-container[_ngcontent-%COMP%]{flex:1 1 auto;height:calc(100vh - 120px);overflow:auto}datatable-footer[_ngcontent-%COMP%]{border-top:1px solid var(--be-divider-default);overflow:hidden;background-color:var(--be-background)}.articles-list[_ngcontent-%COMP%]{padding:10px;min-height:calc(100% - 57px)}.articles-list-item[_ngcontent-%COMP%]{background-color:var(--be-background);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);padding:15px;border-radius:4px;color:var(--be-secondary-text);cursor:pointer;margin-bottom:10px;transition:background-color .2s ease-in-out;position:relative}.articles-list-item[_ngcontent-%COMP%]:hover{background-color:var(--be-accent-emphasis)}.delete-article-button[_ngcontent-%COMP%]{position:absolute;bottom:5px;right:5px;color:var(--be-secondary-text)}.article-categories[_ngcontent-%COMP%]{font-size:1.3rem;font-style:italic;margin-bottom:15px}.article-title[_ngcontent-%COMP%]{font-weight:500;font-size:1.9rem}.article-body[_ngcontent-%COMP%]{font-size:1.4rem;word-wrap:break-word}.article-tags[_ngcontent-%COMP%]{margin-top:15px}.grid-flex-wrapper[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap}.grid-flex-wrapper[_ngcontent-%COMP%]   .articles-list-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:calc(25% - 10px);margin:5px}@media screen and (max-width:1280px){.grid-flex-wrapper[_ngcontent-%COMP%]   .articles-list-item[_ngcontent-%COMP%]{width:calc(33.33% - 10px)}}@media screen and (max-width:1024px){.grid-flex-wrapper[_ngcontent-%COMP%]   .articles-list-item[_ngcontent-%COMP%]{width:calc(50% - 10px)}}@media screen and (max-width:768px){.grid-flex-wrapper[_ngcontent-%COMP%]   .articles-list-item[_ngcontent-%COMP%]{width:100%}}.grid-flex-wrapper[_ngcontent-%COMP%]   .article-title[_ngcontent-%COMP%]{margin-bottom:10px;font-size:2rem}.grid-flex-wrapper[_ngcontent-%COMP%]   .article-body[_ngcontent-%COMP%]{font-size:1.6rem;flex:1 1 auto}.action-bar-action[_ngcontent-%COMP%]{display:flex;border-right:1px solid var(--be-divider-default);padding:0 20px;height:100%;width:auto}.action-bar-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:var(--be-secondary-text)}.action-bar-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:26px;height:26px}.action-bar-action[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:first-of-type{margin-right:5px}.action-bar-action[_ngcontent-%COMP%]   button.active[_ngcontent-%COMP%]{color:var(--be-accent-default)}.action-bar-action[_ngcontent-%COMP%]     select{height:100%;border:none;outline:none}"]}),t})();var Et=a("twBr"),Qt=a("N2vX");let $t=(()=>{class t{constructor(t,e){this.settings=t,this.currentUser=e}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(ht.a),c.Ob(Et.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["help-center-manage"]],decls:3,vars:0,consts:[["menuPosition","agent-mailbox"],[1,"body"]],template:function(t,e){1&t&&(c.Pb(0,"material-navbar",0),c.Ub(1,"div",1),c.Pb(2,"router-outlet"),c.Tb())},directives:[Qt.a,o.k],styles:["help-center-manage .navbar{box-shadow:none}help-center-manage .navbar .logo{margin-right:50px}help-center-manage .body{height:calc(100vh - 70px)}help-center-manage .action-bar{background-color:var(--be-background);height:55px;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);display:flex;justify-content:center;position:relative;z-index:2}help-center-manage .action-bar .nav{flex:1 1 auto;display:flex;align-items:center}help-center-manage .action-bar .nav .nav-item{display:inline-block;color:var(--be-secondary-text);font-size:1.6rem;margin-left:25px;border-bottom:2px solid transparent;height:100%;line-height:55px}help-center-manage .action-bar .nav .nav-item.router-link-active{border-color:var(--be-accent-default)}help-center-manage .action-bar .actions{flex:1 1 auto;display:flex;justify-content:flex-end;align-items:center;margin-right:30px}help-center-manage .action-bar .actions .input-container{flex:0 0 300px;height:100%;position:relative}help-center-manage .action-bar .actions .input-container .mat-icon{position:absolute;top:16px;left:10px;color:var(--be-secondary-text)}help-center-manage .action-bar .actions .input-container input{font-size:1.7rem;padding-left:40px;border-top:none;border-bottom:none;height:100%;border-radius:0}help-center-manage .action-bar .actions .action{width:auto}help-center-manage .action-bar .actions .new-item-button{background-color:var(--be-accent-default);color:var(--be-accent-contrast);border-radius:50px;padding:1px 20px;border:none;line-height:30px;vertical-align:middle;white-space:nowrap;margin-left:30px}help-center-manage .action-bar .actions .new-item-button .mat-icon{transition:transform .2s ease-in-out;vertical-align:middle}help-center-manage .action-bar .actions .new-item-button:hover mat-icon{transform:rotate(180deg)}help-center-manage .panel{margin-bottom:15px;background-color:var(--be-background);border:1px solid var(--be-divider-default);border-radius:3px}help-center-manage .panel .panel-header{display:flex;align-items:center;padding:0 10px;background-color:var(--be-background-alternative);border-bottom:1px solid var(--be-divider-default);min-height:41px}help-center-manage .panel .panel-header button{margin-left:auto}help-center-manage .panel .panel-body{overflow:auto;padding:10px}help-center-manage .panel .panel-body .filter-button{min-width:75px;padding:0 5px}help-center-manage .panel .panel-body .filter-button:not(:last-of-type){margin-right:4px}help-center-manage .panel .panel-body .filter-button.active{background-color:var(--be-accent-default);color:var(--be-accent-contrast)}"],encapsulation:2}),t})();var Ht=a("5+WD"),Jt=a("/RwR");function Xt(t,e){1&t&&c.Pb(0,"mat-icon",16)}function Yt(t,e){1&t&&(c.Ub(0,"span",17),c.Kc(1,"No Articles"),c.Tb())}function Zt(t,e){if(1&t&&(c.Ub(0,"span",21),c.Kc(1),c.Ub(2,"span",22),c.Kc(3,"Articles"),c.Tb(),c.Tb()),2&t){const t=c.fc(2);c.Bb(1),c.Mc("",t.category.articles_count," ")}}function qt(t,e){1&t&&(c.Ub(0,"span",23),c.Kc(1,"1 Article"),c.Tb())}function Wt(t,e){if(1&t&&(c.Ub(0,"span",18),c.Ic(1,Zt,4,1,"span",19),c.Ic(2,qt,2,0,"span",20),c.Tb()),2&t){const t=c.fc();c.Bb(1),c.nc("ngIf",t.category.articles_count>1),c.Bb(1),c.nc("ngIf",1==t.category.articles_count)}}function te(t,e){if(1&t){const t=c.Vb();c.Ub(0,"button",24),c.bc("click",(function(){return c.zc(t),c.fc().openCreateChildCategoryModal()})),c.gc(1,"trans"),c.Pb(2,"mat-icon",25),c.Tb()}2&t&&c.nc("matTooltip",c.hc(1,1,"Create Child Category"))}function ee(t,e){if(1&t){const t=c.Vb();c.Ub(0,"button",26),c.bc("click",(function(){c.zc(t);const e=c.fc();return e.maybeDetachCategory(e.category.id)})),c.gc(1,"trans"),c.Pb(2,"mat-icon",27),c.Tb()}2&t&&c.nc("matTooltip",c.hc(1,1,"Detach Category"))}let ae=(()=>{class t{constructor(t,e,a,n){this.modal=t,this.api=e,this.router=a,this.storage=n,this.onChange=new c.n}openCreateChildCategoryModal(){this.modal.show($,{parentId:this.category.id}).afterClosed().subscribe(()=>this.onChange.emit())}openUpdateCategoryModal(t){this.modal.show($,{category:t}).afterClosed().subscribe(()=>this.onChange.emit())}maybeDeleteCategory(t){this.modal.show(Jt.a,{title:"Delete Category",body:"Are you sure you want to delete this category?",bodyBold:"Children of this category will not be deleted.",ok:"Delete"}).afterClosed().subscribe(e=>{e&&this.api.deleteCategory(t).subscribe(()=>this.onChange.emit())})}maybeDetachCategory(t){this.modal.show(Jt.a,{title:"Detach Category",body:"Are you sure you want to detach this category from its parent?",ok:"Detach"}).afterClosed().subscribe(e=>{e&&this.api.detachCategory(t).subscribe(()=>this.onChange.emit())})}navigateToArticlesList(t){const e=[t.id];t.parent_id&&e.push(t.parent_id),this.storage.set("selectedCategories",e),this.router.navigate(["/help-center/manage/articles"])}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(X.a),c.Ob(y.a),c.Ob(o.f),c.Ob(x.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["category-list-item"]],inputs:{category:"category"},outputs:{onChange:"onChange"},decls:19,vars:12,consts:[[1,"category-name-container"],["cdkDragHandle","",1,"no-style","drag-handle"],["svgIcon","drag-handle"],[1,"category-name",3,"click"],["svgIcon","visibility-off","class","hidden-icon","color","warn",4,"ngIf"],[1,"info"],[1,"articles-count"],["class","no-articles","trans","",4,"ngIf"],["class","has-articles",4,"ngIf"],[1,"actions"],["mat-icon-button","",1,"update-category-button",3,"matTooltip","click"],["svgIcon","settings",1,"size-20"],["mat-icon-button","","class","new-child-category-button",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","","class","detach-category-button",3,"matTooltip","click",4,"ngIf"],["mat-icon-button","",1,"delete-category-button",3,"matTooltip","click"],["svgIcon","delete-forever",1,"size-20"],["svgIcon","visibility-off","color","warn",1,"hidden-icon"],["trans","",1,"no-articles"],[1,"has-articles"],["class","plural",4,"ngIf"],["class","singular","trans","",4,"ngIf"],[1,"plural"],["trans",""],["trans","",1,"singular"],["mat-icon-button","",1,"new-child-category-button",3,"matTooltip","click"],["svgIcon","create-new-folder",1,"size-20"],["mat-icon-button","",1,"detach-category-button",3,"matTooltip","click"],["svgIcon","delete",1,"size-20"]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"button",1),c.Pb(2,"mat-icon",2),c.Tb(),c.Ub(3,"span",3),c.bc("click",(function(){return e.navigateToArticlesList(e.category)})),c.Kc(4),c.Tb(),c.Ic(5,Xt,1,0,"mat-icon",4),c.Tb(),c.Ub(6,"div",5),c.Ub(7,"div",6),c.Ic(8,Yt,2,0,"span",7),c.Ic(9,Wt,3,2,"span",8),c.Tb(),c.Tb(),c.Ub(10,"div",9),c.Ub(11,"button",10),c.bc("click",(function(){return e.openUpdateCategoryModal(e.category)})),c.gc(12,"trans"),c.Pb(13,"mat-icon",11),c.Tb(),c.Ic(14,te,3,3,"button",12),c.Ic(15,ee,3,3,"button",13),c.Ub(16,"button",14),c.bc("click",(function(){return e.maybeDeleteCategory(e.category.id)})),c.gc(17,"trans"),c.Pb(18,"mat-icon",15),c.Tb(),c.Tb()),2&t&&(c.Bb(4),c.Lc(e.category.name),c.Bb(1),c.nc("ngIf",e.category.hidden),c.Bb(3),c.nc("ngIf",!e.category.articles_count),c.Bb(1),c.nc("ngIf",e.category.articles_count),c.Bb(2),c.nc("matTooltip",c.hc(12,8,"Update Category")),c.Bb(3),c.nc("ngIf",!e.category.parent_id),c.Bb(1),c.nc("ngIf",e.category.parent_id),c.Bb(1),c.nc("matTooltip",c.hc(17,10,"Delete Category")))},directives:[Ht.b,b.a,n.t,l.b,C.a,s.a],pipes:[k.a],styles:["category-list-item{display:flex;vertical-align:middle;justify-content:center}category-list-item .category-name-container{flex:1 1 auto;display:flex;justify-content:flex-start;align-items:center}category-list-item .category-name-container .category-name,category-list-item .category-name-container .drag-handle{vertical-align:middle}category-list-item .category-name-container .category-name:hover{text-decoration:underline;cursor:pointer}category-list-item .drag-handle{color:var(--be-secondary-text);margin-right:8px;cursor:move}category-list-item .info{flex:0 0 150px;display:flex;align-items:center;color:var(--be-secondary-text)}category-list-item .actions{flex:0 0 150px;text-align:right}category-list-item .actions button{color:var(--be-secondary-text)}category-list-item .hidden-icon{margin-left:5px;vertical-align:middle}"],encapsulation:2,changeDetection:0}),t})();function ne(t,e){if(1&t){const t=c.Vb();c.Ub(0,"category-list-item",22),c.bc("onChange",(function(){return c.zc(t),c.fc(3).updateCategories()})),c.Tb()}if(2&t){const t=e.$implicit;c.nc("cdkDragData",t)("category",t),c.Cb("data-id",t.id)}}function ie(t,e){if(1&t){const t=c.Vb();c.Ub(0,"div",20),c.bc("cdkDropListDropped",(function(e){c.zc(t);const a=c.fc().$implicit;return c.fc().reorderCategories(e,a)})),c.Ic(1,ne,1,3,"category-list-item",21),c.Tb()}if(2&t){const t=c.fc().$implicit,e=c.fc();c.Fb("hidden",!e.categoryChildrenVisible),c.nc("cdkDropListDisabled",e.shouldDisableReorder()),c.Bb(1),c.nc("ngForOf",t.children)}}function oe(t,e){if(1&t){const t=c.Vb();c.Ub(0,"div",17),c.Ub(1,"category-list-item",18),c.bc("onChange",(function(){return c.zc(t),c.fc().updateCategories()})),c.Tb(),c.Ic(2,ie,2,4,"div",19),c.Tb()}if(2&t){const t=e.$implicit;c.Bb(1),c.nc("cdkDragData",t)("category",t),c.Cb("data-id",t.id),c.Bb(1),c.nc("ngIf",t.children.length)}}const re=function(){return{exact:!0}};let ce=(()=>{class t{constructor(t,e){this.api=t,this.modal=e,this.searchQuery=new i.i,this.allCategories=[],this.filteredCategories=[],this.categoryChildrenVisible=!0}ngOnInit(){this.updateCategories(),this.bindSearchQuery()}showNewCategoryModal(){this.modal.show($).afterClosed().subscribe(t=>{t&&this.updateCategories()})}updateCategories(){this.api.getCategories().subscribe(t=>{this.filteredCategories=t.categories,this.allCategories=t.categories,this.filterCategories(this.searchQuery.value)})}bindSearchQuery(){this.searchQuery.valueChanges.pipe(Object(f.a)(400),Object(v.a)()).subscribe(t=>this.filterCategories(t))}filterCategories(t){this.filteredCategories=(new u).filter(t,this.allCategories)}reorderCategories(t,e){const a=e?e.children:this.filteredCategories;Object(Ht.e)(a,t.previousIndex,t.currentIndex);const n=a.map(t=>t.id);this.api.reorderCategories(n,e?e.id:null).subscribe()}toggleCategoryChildren(){this.categoryChildrenVisible=!this.categoryChildrenVisible}shouldDisableReorder(){return this.searchQuery.value}}return t.\u0275fac=function(e){return new(e||t)(c.Ob(y.a),c.Ob(X.a))},t.\u0275cmp=c.Ib({type:t,selectors:[["categories-list"]],decls:23,vars:13,consts:[[1,"action-bar"],[1,"nav"],["routerLinkActive","router-link-active","trans","",1,"nav-item",3,"routerLink","routerLinkActiveOptions"],["routerLinkActive","router-link-active","trans","",1,"nav-item",3,"routerLink"],[1,"actions"],[1,"action"],["mat-icon-button","",1,"toggle-children-btn",3,"matTooltip","click"],["svgIcon","unfold-more"],[1,"search-bar","input-container"],["type","text","placeholder","Search","trans-placeholder","",1,"categories-search-input",3,"formControl"],["svgIcon","search"],[1,"new-category-button","new-item-button",3,"click"],["svgIcon","add"],["trans",""],[1,"container"],["cdkDropList","",1,"categories-list",3,"cdkDropListDisabled","cdkDropListDropped"],["class","category-container",4,"ngFor","ngForOf"],[1,"category-container"],["cdkDrag","",1,"category-list-item","parent-category",3,"cdkDragData","category","onChange"],["class","category-children","cdkDropList","",3,"hidden","cdkDropListDisabled","cdkDropListDropped",4,"ngIf"],["cdkDropList","",1,"category-children",3,"cdkDropListDisabled","cdkDropListDropped"],["cdkDrag","","class","category-list-item child-category",3,"cdkDragData","category","onChange",4,"ngFor","ngForOf"],["cdkDrag","",1,"category-list-item","child-category",3,"cdkDragData","category","onChange"]],template:function(t,e){1&t&&(c.Ub(0,"div",0),c.Ub(1,"div",1),c.Ub(2,"a",2),c.Kc(3,"Home"),c.Tb(),c.Ub(4,"a",3),c.Kc(5,"Categories"),c.Tb(),c.Ub(6,"a",3),c.Kc(7,"Articles"),c.Tb(),c.Tb(),c.Ub(8,"div",4),c.Ub(9,"div",5),c.Ub(10,"button",6),c.bc("click",(function(){return e.toggleCategoryChildren()})),c.gc(11,"trans"),c.Pb(12,"mat-icon",7),c.Tb(),c.Tb(),c.Ub(13,"div",8),c.Pb(14,"input",9),c.Pb(15,"mat-icon",10),c.Tb(),c.Ub(16,"button",11),c.bc("click",(function(){return e.showNewCategoryModal()})),c.Pb(17,"mat-icon",12),c.Ub(18,"span",13),c.Kc(19,"New Category"),c.Tb(),c.Tb(),c.Tb(),c.Tb(),c.Ub(20,"div",14),c.Ub(21,"section",15),c.bc("cdkDropListDropped",(function(t){return e.reorderCategories(t)})),c.Ic(22,oe,3,4,"div",16),c.Tb(),c.Tb()),2&t&&(c.Bb(2),c.nc("routerLink","/help-center")("routerLinkActiveOptions",c.rc(12,re)),c.Bb(2),c.nc("routerLink","/help-center/manage/categories"),c.Bb(2),c.nc("routerLink","/help-center/manage/articles"),c.Bb(4),c.Fb("active",e.categoryChildrenVisible),c.nc("matTooltip",c.hc(11,10,"Toggle child categories")),c.Bb(4),c.nc("formControl",e.searchQuery),c.Bb(7),c.nc("cdkDropListDisabled",e.shouldDisableReorder()),c.Bb(1),c.nc("ngForOf",e.filteredCategories))},directives:[o.i,o.h,s.a,l.b,C.a,b.a,i.d,i.u,i.j,Ht.c,n.s,ae,Ht.a,n.t],pipes:[k.a],styles:["categories-list{display:block;background-color:var(--be-background-alternative)}categories-list .container{min-height:calc(100vh - 125px);margin:0 auto;padding-top:35px}categories-list category-list-item{background-color:var(--be-background);padding:15px;box-shadow:0 2px 1px -1px rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 1px 3px 0 rgba(0,0,0,.12);font-size:1.6rem;margin-bottom:10px;transition:background-color .2s ease-in-out;border-radius:4px}categories-list category-list-item:hover{background-color:var(--be-accent-emphasis)}categories-list .category-children{margin-left:20px}categories-list .toggle-children-btn{color:var(--be-secondary-text);margin-right:10px}categories-list .toggle-children-btn.active{color:var(--be-accent-default)}categories-list .cdk-drop-list-disabled .drag-handle{color:rgba(0,0,0,.26);cursor:not-allowed}categories-list .cdk-drag-placeholder{opacity:0}categories-list .cdk-drag-animating,categories-list .cdk-drop-list-dragging .cdk-drag:not(.cdk-drag-placeholder){transition:transform .25s cubic-bezier(0,0,.2,1)}"],encapsulation:2}),t})();var se=a("0QyJ");const le=o.j.forChild([{path:"",component:$t,canActivate:[se.a],children:[{path:"",redirectTo:"articles"},{path:"articles",component:Rt,data:{permissions:["categories.view","tags.view","articles.view","articles.create"]}},{path:"categories",component:ce,data:{permissions:["categories.view","categories.create"]}},{path:"articles/new",component:rt,data:{permissions:["articles.create"]}},{path:"articles/:article_id/edit",component:rt,resolve:{article:gt},data:{permissions:["articles.update"]}}]}]);var be=a("xqw2"),de=a("YHvm"),ge=a("gFpt"),ue=a("6rvT"),pe=a("Iysn"),he=a("X3pI"),me=a("hD7E"),fe=a("JZOH"),ve=a("GSRO"),ye=a("1ImS"),xe=a("09gM");let Ce=(()=>{class t{}return t.\u0275mod=c.Mb({type:t}),t.\u0275inj=c.Lb({factory:function(e){return new(e||t)},imports:[[n.c,i.o,i.E,o.j,de.a,be.a,ge.a,ue.a,pe.a,he.a,me.a,fe.a,xe.a,ve.a,le,ye.a,r.g,F.b,Ht.d,l.c,b.b,C.b,T.b,Mt,At.g]]}),t})()}}]);