1"use strict";(self.webpackChunkcikisi=self.webpackChunkcikisi||[]).push([[718],{98953:function(e,t,i){i.r(t),i.d(t,{SourceCategoriesModule:function(){return R}});var o=i(38583),r=i(56983),s=i(23901),a=i(3679),n=i(3780),c=i(12523),g=i(45435),l=i(43190),u=i(37716),d=i(39701),p=i(77524),h=i(14452),v=i(93342);function Z(e,t){if(1&e){const e=u.EpF();u.O4$(),u.TgZ(0,"svg",10),u.NdJ("click",function(t){u.CHM(e);const i=u.oxw();return i.onAddAsFavorite(i.category,t)}),u._UZ(1,"path",11),u.qZA()}}function _(e,t){if(1&e){const e=u.EpF();u.O4$(),u.TgZ(0,"svg",12),u.NdJ("click",function(t){u.CHM(e);const i=u.oxw();return i.onRemoveFromFavorite(i.category,t)}),u._UZ(1,"path",13),u.qZA()}}const m=function(){return{text:"Select",position:"top"}},y=function(){return{text:"Add to favourites",position:"top"}};let b=(()=>{class e{constructor(e,t,i){this.simpleSelectorService=e,this.authService=t,this.searchEngineService=i,this.selectItem=new u.vpe,this.addAsFavorite=new u.vpe,this.removeFromFavorite=new u.vpe,this.edit=new u.vpe}onSelectItem(e,t){this.selectItem.emit({category:e,event:t})}onAddAsFavorite(e,t){this.addAsFavorite.emit({category:e,event:t})}onRemoveFromFavorite(e,t){this.removeFromFavorite.emit({category:e,event:t})}onEditCategory(e,t){this.edit.emit({category:e,event:t})}onNavigate(e,t){t.stopPropagation(),this.searchEngineService.newSearch({sources_categories:{filtering:[{id:e.id,name:e.name}],blocking:[],operator:"OR"}})}ngOnInit(){this.simpleSelectorService.amISelected(this.category.id).pipe((0,v.b)(e=>this._selected=e)).subscribe()}}return e.\u0275fac=function(t){return new(t||e)(u.Y36(d.YC),u.Y36(d.$h),u.Y36(d.P2))},e.\u0275cmp=u.Xpm({type:e,selectors:[["categories-item"]],inputs:{category:"category"},outputs:{selectItem:"selectItem",addAsFavorite:"addAsFavorite",removeFromFavorite:"removeFromFavorite",edit:"edit"},decls:16,vars:12,consts:[[3,"tooltip","click"],[1,"checkbox"],["type","checkbox","name","",3,"checked","change"],[1,"checkbox__input"],[3,"tooltip"],["width","24","height","24","viewBox","0 0 16 16","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],["width","24","height","24","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click",4,"ngIf"],[1,"tag"],["width","220"],[1,"btn__open-item","btn","btn--small",3,"click"],["width","24","height","24","viewBox","0 0 16 16","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M14.6673 6.15992L9.87398 5.74659L8.00065 1.33325L6.12732 5.75325L1.33398 6.15992L4.97398 9.31325L3.88065 13.9999L8.00065 11.5133L12.1207 13.9999L11.034 9.31325L14.6673 6.15992ZM8.00065 10.2666L5.49398 11.7799L6.16065 8.92659L3.94732 7.00659L6.86732 6.75325L8.00065 4.06659L9.14065 6.75992L12.0607 7.01325L9.84732 8.93325L10.514 11.7866L8.00065 10.2666Z","fill","var(--text-color)"],["width","24","height","24","viewBox","0 0 16 16","fill","none","xmlns","http://www.w3.org/2000/svg",3,"click"],["d","M8.00065 11.5133L12.1207 13.9999L11.0273 9.31325L14.6673 6.15992L9.87398 5.75325L8.00065 1.33325L6.12732 5.75325L1.33398 6.15992L4.97398 9.31325L3.88065 13.9999L8.00065 11.5133Z","fill","var(--color--yellow)"]],template:function(e,t){1&e&&(u.TgZ(0,"td",0),u.NdJ("click",function(e){return e.stopPropagation()}),u.TgZ(1,"label",1),u.TgZ(2,"input",2),u.NdJ("change",function(e){return t.onSelectItem(t.category,e)}),u.qZA(),u._UZ(3,"span",3),u.qZA(),u.qZA(),u.TgZ(4,"td",4),u.YNc(5,Z,2,0,"svg",5),u.YNc(6,_,2,0,"svg",6),u.qZA(),u.TgZ(7,"td"),u.TgZ(8,"span",7),u._uU(9),u.qZA(),u.qZA(),u.TgZ(10,"td"),u._uU(11),u.ALo(12,"date"),u.qZA(),u.TgZ(13,"td",8),u.TgZ(14,"span",9),u.NdJ("click",function(e){return t.onNavigate(t.category,e)}),u._uU(15,"Open in Search Engine"),u.qZA(),u.qZA()),2&e&&(u.Q6J("tooltip",u.DdM(10,m)),u.xp6(2),u.Q6J("checked",t._selected),u.xp6(2),u.Q6J("tooltip",u.DdM(11,y)),u.xp6(1),u.Q6J("ngIf",!t.category.favorite),u.xp6(1),u.Q6J("ngIf",t.category.favorite),u.xp6(3),u.Oqu(t.category.name),u.xp6(2),u.Oqu(u.xi3(12,7,t.category.created_at,"HH:mm \u2014 dd/MM/yyyy")))},directives:[p.i,o.O5],pipes:[o.uU],styles:["[_nghost-%COMP%]{display:contents}.btn__open-item[_ngcontent-%COMP%]{opacity:0;visibility:hidden;margin:0}table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover .btn__open-item[_ngcontent-%COMP%], [_nghost-%COMP%]:hover .btn__open-item[_ngcontent-%COMP%]{opacity:1;visibility:visible}"]}),e})();var f=i(95015);function C(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"div",27),u.TgZ(1,"div",28,29),u.TgZ(3,"i",30),u._uU(4,"add"),u.qZA(),u.TgZ(5,"span"),u._uU(6,"Create a category"),u.qZA(),u.qZA(),u.TgZ(7,"div",31),u.TgZ(8,"form",32),u.NdJ("submit",function(){return u.CHM(e),u.oxw().createSourceCategory()}),u.TgZ(9,"div",33),u.TgZ(10,"div",34),u.TgZ(11,"span"),u._uU(12,"Create Category"),u.qZA(),u.qZA(),u.TgZ(13,"div",35),u._UZ(14,"input",36),u.TgZ(15,"label",37),u._UZ(16,"input",38),u._UZ(17,"span",39),u.TgZ(18,"span",40),u._uU(19,"Active"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(20,"div",41),u.TgZ(21,"button",42),u._uU(22,"Save"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&e){const e=u.MAs(2),t=u.oxw();u.xp6(7),u.Q6J("dropdownTrigger",e),u.xp6(1),u.Q6J("formGroup",t.registerSourceCategory),u.xp6(13),u.Q6J("disabled",!t.registerSourceCategory.val
1id&&t.canCreateCategories)}}const A=function(){return{text:"Select All",position:"top"}};function q(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"th",49),u.TgZ(1,"div"),u.TgZ(2,"label",37),u.TgZ(3,"input",50),u.NdJ("change",function(t){return u.CHM(e),u.oxw(2).selectAll(t)}),u.qZA(),u._UZ(4,"span",39),u.qZA(),u.qZA(),u.qZA()}if(2&e){const e=u.oxw(2);u.Q6J("tooltip",u.DdM(2,A)),u.xp6(3),u.Q6J("checked",null==e.listingWrapper?null:e.listingWrapper._allSelected)}}const T=function(){return{text:"Favourites",position:"top"}};function S(e,t){if(1&e&&(u.YNc(0,q,5,3,"th",43),u.ALo(1,"async"),u.TgZ(2,"th",44),u.TgZ(3,"div"),u.O4$(),u.TgZ(4,"svg",45),u._UZ(5,"path",46),u.qZA(),u.qZA(),u.qZA(),u.kcU(),u.TgZ(6,"th"),u.TgZ(7,"div"),u._uU(8,"Name"),u.qZA(),u.qZA(),u.TgZ(9,"th",47),u.TgZ(10,"div"),u._uU(11,"Created On"),u.qZA(),u.qZA(),u.TgZ(12,"th",48),u._UZ(13,"div"),u.qZA()),2&e){const e=u.oxw();u.Q6J("ngIf",1==u.lcZ(1,2,null==e.listingWrapper?null:e.listingWrapper.resultsFetchedSubject)),u.xp6(2),u.Q6J("tooltip",u.DdM(4,T))}}function x(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"categories-item",51),u.NdJ("selectItem",function(t){return u.CHM(e),u.oxw().selectItem(t)})("addAsFavorite",function(t){return u.CHM(e),u.oxw().addAsFavourite(t)})("removeFromFavorite",function(t){return u.CHM(e),u.oxw().removeFromFavorite(t)}),u.qZA()}2&e&&u.Q6J("category",t.$implicit)}const w=function(e){return{disabled:e}};function Q(e,t){if(1&e&&(u.TgZ(0,"option",61),u.TgZ(1,"span"),u._uU(2),u.qZA(),u.qZA()),2&e){const e=t.$implicit,i=u.oxw(2);u.Q6J("ngClass",u.VKq(3,w,i.sourceCategoryId==e.id))("value",e.id),u.xp6(2),u.Oqu(e.name)}}function k(e,t){1&e&&(u.TgZ(0,"span"),u._uU(1,"Delete"),u.qZA())}function U(e,t){1&e&&(u.TgZ(0,"span"),u._uU(1,"Merge"),u.qZA())}function J(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"div",52),u.TgZ(1,"div",53),u.NdJ("click",function(){return u.CHM(e),u.oxw().cancelDelete()}),u.qZA(),u.TgZ(2,"div",54),u.TgZ(3,"form",32),u.NdJ("submit",function(){return u.CHM(e),u.oxw().deleteSourceCategory()}),u.TgZ(4,"div",33),u.TgZ(5,"div",34),u.TgZ(6,"span"),u._uU(7,"Merge Source Category"),u.qZA(),u.qZA(),u.TgZ(8,"div",35),u.TgZ(9,"select",55),u.TgZ(10,"option",56),u._uU(11,"- none -"),u.qZA(),u.YNc(12,Q,3,5,"option",57),u.qZA(),u.qZA(),u.qZA(),u.TgZ(13,"div",41),u.TgZ(14,"button",58),u.YNc(15,k,2,0,"span",59),u.YNc(16,U,2,0,"span",59),u.qZA(),u.TgZ(17,"button",60),u.NdJ("click",function(){return u.CHM(e),u.oxw().cancelDelete()}),u._uU(18,"Cancel"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&e){const e=u.oxw();u.xp6(3),u.Q6J("formGroup",e.mergeSourceCategory),u.xp6(6),u.Q6J("IS",e.simpleSourceCategoriesQuery),u.xp6(3),u.Q6J("ngForOf",e.simpleSourceCategories),u.xp6(3),u.Q6J("ngIf",!e.mergeSourceCategory.value.merge_source_category_id),u.xp6(1),u.Q6J("ngIf",e.mergeSourceCategory.value.merge_source_category_id)}}function I(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"div",52),u.TgZ(1,"div",53),u.NdJ("click",function(){return u.CHM(e),u.oxw().cancelEditing()}),u.qZA(),u.TgZ(2,"div",54),u.TgZ(3,"form",32),u.NdJ("submit",function(){return u.CHM(e),u.oxw().updateSourceCategory()}),u.TgZ(4,"div",33),u.TgZ(5,"div",34),u.TgZ(6,"span"),u._uU(7,"Edit Category"),u.qZA(),u.qZA(),u.TgZ(8,"div",35),u._UZ(9,"input",62),u.qZA(),u.TgZ(10,"div",35),u.TgZ(11,"label",37),u._UZ(12,"input",38),u._UZ(13,"span",39),u.TgZ(14,"span",40),u._uU(15,"Active"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(16,"div",41),u.TgZ(17,"button",63),u._uU(18,"Update"),u.qZA(),u.TgZ(19,"button",64),u.NdJ("click",function(){return u.CHM(e),u.oxw().cancelEditing()}),u._uU(20,"Cancel"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&e){const e=u.oxw();u.xp6(3),u.Q6J("formGroup",e.sourceCategoryUpdate)}}const M=function(e){return{_active:e}},O=function(){return{text:"Export Categories (XLS)",position:"left"}};let N=(()=>{class e{constructor(e,t,i,o,r,s,c,l){this.sourceCategoryService=e,this.dialogService=t,this.route=i,this.queryParamsService=o,this.listingService=r,this.notificationService=s,this.tableService=c,this.authService=l,this.sourceCategoriesQuery=new n.cOn({tab:"all",getResultsFrom:e=>this.sourceCategoryService.getAll(e)}
1),this.simpleSourceCategoriesQuery=new n.cOn,this.sourceCategories=[],this.simpleSourceCategories=[],this._selectedAll=!1,this.tabSize={all:null,favorites:null},this.currentTab="all",this.registerSourceCategory=new a.cw({name:new a.NI("",[a.kI.required]),active:new a.NI(!0)}),this.sourceCategoryUpdate=new a.cw({name:new a.NI("",[a.kI.required]),active:new a.NI(!0)}),this.mergeSourceCategory=new a.cw({merge_source_category_id:new a.NI("")}),this._narrowedTable$=this.listingService.narrowTable$.pipe((0,g.h)(e=>null!=e))}search(){this.listingWrapper.updateQueryParams(!0)}changeTab(e){this.currentTab=e,this.query="",this.listingWrapper.updateParams([{key:"tab",value:e},{key:"q",value:this.query}]),this.listingWrapper.updateUrl(this.query)}ngOnInit(){this.getSimpleSourceCategories(),this.simpleSourceCategoriesQuery.callback=this.getSimpleSourceCategories.bind(this),this.getTabs(),this.listingService.activeItemPath("/source-categories"),this.editSourceCategory(),this.openDeleteDialog(),this.canCreateCategories=!this.authService.hasRole([2]),this.route.queryParamMap.pipe().subscribe(e=>{this.query=e.has("q")?e.get("q"):""})}ngOnDestroy(){this.sub_sourceCategories&&this.sub_sourceCategories.unsubscribe(),this.sub_simpleSourceCategories&&this.sub_simpleSourceCategories.unsubscribe(),this.edit_subscription&&this.edit_subscription.unsubscribe(),this.delete_subscription&&this.delete_subscription.unsubscribe(),this.listingService.reset()}selectAll(e){e.stopPropagation(),this.listingWrapper.selectAll(e.target.checked)}selectItem(e){this.listingWrapper.onSelect(e.category,e.event)}onNavigate(e){this.listingService.activeItemPath("/source-categories"),this.queryParamsService.navigate("/source-categories",e.id)}onActivate(e){this._showDetails=!0}onDeactivate(e){this._showDetails=!1}addAsFavourite(e){e.event.stopPropagation(),this.tableService.addFavorite({resource_type:"category",resource_ids:[e.category.id]}).subscribe(t=>{e.category.favorite=!0,this.getTabs(),this.notificationService.success("Added successfully to favorites")},e=>{this.notificationService.error(e)})}removeFromFavorite(e){e.event.stopPropagation(),this.tableService.removeFavorite({resource_type:"category",resource_ids:[e.category.id]}).subscribe(t=>{e.category.favorite=!1,this.getTabs(),this.notificationService.success("Deleted successfully from favorites")},e=>{this.notificationService.error(e)})}getTabs(){this.tableService.getTabs("category").subscribe(e=>{this.tabSize=Object.assign({},e)},e=>{console.log("Something went wrong!")})}getSourceCategories(){console.log("---QQQQ REQUESTING: ",this.sourceCategoriesQuery._loading),!this.sourceCategoriesQuery._loading&&!this.sourceCategoriesQuery._endOfResults&&(this.sourceCategoriesQuery.pagination.next(),console.log("---QQQQ page: ",this.sourceCategoriesQuery.pagination.page),this.sub_sourceCategories=this.sourceCategoryService.getAll(this.sourceCategoriesQuery.getQuery()).subscribe(e=>{e.length<this.sourceCategoriesQuery.pagination.per_page&&(this.sourceCategoriesQuery._endOfResults=!0),console.log(e),this.sourceCategories.push(...e),this.sourceCategoriesQuery.loaded()},e=>{this.sourceCategoriesQuery.loaded(),this.sourceCategoriesQuery._endOfResults=!0,this.notificationService.error("Something went wrong, please try again!")}))}getSimpleSourceCategories(){console.log("---QQQQ REQUESTING: ",this.simpleSourceCategoriesQuery._loading),!this.simpleSourceCategoriesQuery._loading&&!this.simpleSourceCategoriesQuery._endOfResults&&(this.simpleSourceCategoriesQuery.pagination.next(),console.log("---QQQQ page: ",this.simpleSourceCategoriesQuery.pagination.page),this.sub_simpleSourceCategories=this.sourceCategoryService.getAllSimple(this.simpleSourceCategoriesQuery.getQuery()).subscribe(e=>{e.length<this.simpleSourceCategoriesQuery.pagination.per_page&&(this.simpleSourceCategoriesQuery._endOfResults=!0),console.log(e),this.simpleSourceCategories.push(...e),this.simpleSourceCategoriesQuery.loaded()},e=>{this.simpleSourceCategoriesQuery.loaded(),this.simpleSourceCategoriesQuery._endOfResults=!0,this.notificationService.error("Something went wrong, please try again!")}))}createSourceCategory(){this.sourceCategoryService.register(this.registerSourceCategory.value).subscribe(e=>{this.listingWrapper.query.results.unshift(e),console.log(e),this.registerSourceCategory.controls.name.reset(),this.notificationService.success(`The source category "${e.name}" has been created!`)},e=>{this.notificationService.error("Unable to create this category!")})}editSourceCategory(){this.edit_subscription=this.listingService.edited$.pipe((0,g.h)(e=>!!e),(0,l.w)(e=>this.sourceCategoryService.getById(e.id))).subscribe(e=>{this.toEdit=e,this.toEdit&&this.sourceCategoryUpdate.patchValue({name:this.toEdit.name,active:this.toEdit.active})})}updateSourceCategory(){this.sourceCategoryService.update(this.toEdit.id,this.sourceCategoryUpdate.value).subscribe(e=>{let t=this.listingWrapper.find(this.toEdit.id);this.getIndex=this.listingWrapper.query.results.indexOf(t),this.listingWrapper.query.results[this.getIndex]=e,this.edited=!0,this.cancelEditing(),this.notificationService.success("Source Category "+e.name+" Updated Successfully")},e=>{this.cancelEditing(),this.notificationService.error("Unable to Updated")})}openDeleteDialog(){this.delete_subscription=this.listingService.removed$.pipe((0,g.h)(e=>!!e)).subscribe(({itemId:e})=>{this.toDelete=!0,this.sourceCategoryId=e})}cancelDelete(){this.toDelete=!1,this.mergeSourceCategory.patchValue({merge_source_category_id:""})}deleteSourceCategory(){this.sourceCategoryService.delete(this.sourceCategoryId,this.mergeSourceCategory.value.merge_source_category_id).subscribe(e=>{console.log(e);let t=this.listingWrapper.find(this.sourceCategoryId),i=this.listingWrapper.indexOf(t);this.listingWrapper.removeItem(i),this.notificationService.success(e.messages),this.queryParamsService.navigate("/source-categories"),this.toDelete=!1,this.mergeSourceCategory.patchValue({merge_source_category_id:""})},e=>{this.notificationService.error(e)})}cancelEditing(){this.toEdit=null,this.sourceCategoryUpdate.reset()}log(e){console.log(e)}exportCategories(){this.dialogService.confirm({title:"Export Categories Table?",message:"Categories table will be exported in xls format!",buttons:[{label:"Export",class:"btn",callback:()=>{this.sourceCategoryService.exportCategoriesTable().subscribe(e=>{window.open(e)},e=>{this.notificationService.error(e)})}}]})}}return e.\u0275fac=function(t){return new(t||e)(u.Y36(d.Zl),u.Y36(d.xA),u.Y36(r.gz),u.Y36(d.Ed),u.Y36(d.oI),u.Y36(d.gq),u.Y36(d.wm),u.Y36(d.$h))},e.\u0275cmp=u.Xpm({type:e,selectors:[["app-source-categories"]],viewQuery:function(e,t){if(1&e&&u.Gf(c.k,5),2&e){let e;u.iGM(e=u.CRH())&&(t.listingWrapper=e.first)}},decls:41,vars:23,consts:[[1,"flex-layout--vertical"],[1,"page__str
1ipe","flex-item--static"],[1,"page__stripe-left"],[1,"page-stripe__title"],[1,"table__tabs"],[1,"table__tab-item",3,"ngClass","click"],[1,"table__tab-name"],[1,"table__tab-counter"],["class","page__stripe-right",4,"ngIf"],[1,"page__search","flex-item--static"],[1,"page__search-left"],[1,"search__form"],[1,"search__input"],[1,"search__icon",3,"click"],[1,"material-icons"],["type","search","placeholder","Search Category",3,"ngModel","ngModelChange","keyup.enter"],[1,"page__search-right"],[1,"page__import-btn",3,"click"],[1,"material-icons",3,"tooltip"],[1,"flex-layout--horizontal",2,"height","calc(100% - 112px)",3,"ngClass"],[1,"flex-layout--vertical","_position-relative"],[3,"typeOfTemplate","pageType","query","searchQuery","getTabs","showDetails"],["tableHeaders",""],["tableRows",""],[1,"table__details","flex-item--static",3,"hidden"],[3,"deactivate","activate"],["class","_modal",4,"ngIf"],[1,"page__stripe-right"],[1,"btn","btn--small","page__create-btn"],["addCategoryTrigger",""],[1,"hide__desktop","material-icons"],[1,"create__source-category",3,"dropdownTrigger"],[3,"formGroup","submit"],[1,"form__group"],[1,"form__header"],[1,"form__option"],["type","text","formControlName","name","placeholder","Create Name"],[1,"checkbox"],["type","checkbox","formControlName","active"],[1,"checkbox__input"],[1,"checkbox__label"],[1,"form__group","form__buttons"],["type","submit",1,"btn",3,"disabled"],["style","width: 0;",3,"tooltip",4,"ngIf"],["width","56",3,"tooltip"],["width","24","height","24","viewBox","0 0 16 16","xmlns","http://www.w3.org/2000/svg"],["d","M14.6673 6.15992L9.87398 5.74659L8.00065 1.33325L6.12732 5.75325L1.33398 6.15992L4.97398 9.31325L3.88065 13.9999L8.00065 11.5133L12.1207 13.9999L11.034 9.31325L14.6673 6.15992ZM8.00065 10.2666L5.49398 11.7799L6.16065 8.92659L3.94732 7.00659L6.86732 6.75325L8.00065 4.06659L9.14065 6.75992L12.0607 7.01325L9.84732 8.93325L10.514 11.7866L8.00065 10.2666Z","fill","var(--text-color)"],[2,"width","220px"],[1,"td--actions"],[2,"width","0",3,"tooltip"],["type","checkbox",3,"checked","change"],[3,"category","selectItem","addAsFavorite","removeFromFavorite"],[1,"_modal"],[1,"_modalCurtain",3,"click"],[1,"_modalBox"],["formControlName","merge_source_category_id",3,"IS"],["value",""],[3,"ngClass","value",4,"ngFor","ngForOf"],["type","submit",1,"btn","btn--small"],[4,"ngIf"],["type","button",1,"btn","btn--cancel","btn--small",3,"click"],[3,"ngClass","value"],["type","text","formControlName","name","placeholder","Category Name"],["type","submit",1,"btn","btn-small"],["type","button",1,"btn","btn--cancel","btn-small",3,"click"]],template:function(e,t){1&e&&(u.TgZ(0,"div",0),u.TgZ(1,"section",1),u.TgZ(2,"div",2),u.TgZ(3,"h2",3),u._uU(4,"Categories"),u.qZA(),u.TgZ(5,"section",4),u.TgZ(6,"div",5),u.NdJ("click",function(){return t.changeTab("all")}),u.TgZ(7,"span",6),u._uU(8,"All Categories"),u.qZA(),u.TgZ(9,"span",7),u._uU(10),u.qZA(),u.qZA(),u.TgZ(11,"div",5),u.NdJ("click",function(){return t.changeTab("favorites")}),u.TgZ(12,"span",6),u._uU(13,"My Favourites"),u.qZA(),u.TgZ(14,"span",7),u._uU(15),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.YNc(16,C,23,3,"div",8),u.qZA(),u.TgZ(17,"section",9),u.TgZ(18,"div",10),u.TgZ(19,"div",11),u.TgZ(20,"div",12),u.TgZ(21,"div",13),u.NdJ("click",function(){return t.search()}),u.TgZ(22,"i",14),u._uU(23,"search"),u.qZA(),u.qZA(),u.TgZ(24,"input",15),u.NdJ("ngModelChange",function(e){return t.query=e})("keyup.enter",function(){return t.search()}),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(25,"div",16),u.TgZ(26,"a",17),u.NdJ("click",function(){return t.exportCategories()}),u.TgZ(27,"i",18),u._uU(28,"file_upload"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(29,"div",19),u.ALo(30,"async"),u.TgZ(31,"div",20),u.TgZ(32,"app-listing-wrapper",21),u.NdJ("showDetail
1s",function(e){return t.onNavigate(e)}),u.YNc(33,S,14,5,"ng-template",null,22,u.W1O),u.YNc(35,x,1,1,"ng-template",null,23,u.W1O),u.qZA(),u.qZA(),u.TgZ(37,"div",24),u.TgZ(38,"router-outlet",25),u.NdJ("deactivate",function(e){return t.onDeactivate(e)})("activate",function(e){return t.onActivate(e)}),u.qZA(),u.qZA(),u.qZA(),u.YNc(39,J,19,5,"div",26),u.YNc(40,I,21,1,"div",26),u.qZA()),2&e&&(u.xp6(6),u.Q6J("ngClass",u.VKq(18,M,"all"==t.currentTab)),u.xp6(4),u.Oqu(t.tabSize.all),u.xp6(1),u.Q6J("ngClass",u.VKq(20,M,"favorites"==t.currentTab)),u.xp6(4),u.Oqu(t.tabSize.favorites),u.xp6(1),u.Q6J("ngIf",t.canCreateCategories),u.xp6(8),u.Q6J("ngModel",t.query),u.xp6(3),u.Q6J("tooltip",u.DdM(22,O)),u.xp6(2),u.Q6J("ngClass",u.lcZ(30,16,t._narrowedTable$)?"table__details-active":""),u.xp6(3),u.Q6J("typeOfTemplate","table")("pageType","category")("query",t.sourceCategoriesQuery)("searchQuery",t.query)("getTabs",t.getTabs.bind(t)),u.xp6(5),u.Q6J("hidden",!t._showDetails),u.xp6(2),u.Q6J("ngIf",t.toDelete),u.xp6(1),u.Q6J("ngIf",t.toEdit))},directives:[o.mk,o.O5,a.Fj,a.JJ,a.On,p.i,c.k,r.lC,h.U,a._Y,a.JL,a.sg,a.u,a.Wl,b,a.EJ,f.R,a.YN,a.Kr,o.sg],pipes:[o.Ov],styles:[".page-content[_ngcontent-%COMP%]{position:unset}.create__source-category[_ngcontent-%COMP%]{position:absolute;right:24px;top:100%;width:600px;z-index:1}._modal[_ngcontent-%COMP%]{position:fixed;top:0;left:0;bottom:0;right:0;z-index:2}._modalCurtain[_ngcontent-%COMP%]{position:absolute;top:0;left:0;bottom:0;right:0;background-color:#0009}._modalBox[_ngcontent-%COMP%]{position:absolute;top:50%;left:calc(50% + 95px);width:50%;max-width:800px;background-color:var(--bg-boxes);border-radius:4px;box-shadow:0 3px 6px #0003;transform:translate(-50%,-50%)}.editedRow[_ngcontent-%COMP%]{animation-name:rowEdited;animation-duration:3s}.disabled[_ngcontent-%COMP%]{display:none!important}._modal[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{max-width:100%;height:40px;color:var(--text-color);background-color:var(--bg-boxes);border:1px solid var(--border-color)}@keyframes rowEdited{0%{background-color:#dadada66}to{background-color:#dadada66}}@media (min-width: 768px) and (max-width: 992px){.create__source-category[_ngcontent-%COMP%]{width:480px}}"]}),e})();var L=i(90739),F=i(25917),E=i(5304),P=i(79860);function Y(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"div"),u.TgZ(1,"span",15),u.NdJ("click",function(){u.CHM(e);const t=u.oxw().ngIf;return u.oxw().editCategory(t)}),u._uU(2,"Edit"),u.qZA(),u.TgZ(3,"span",16),u.NdJ("click",function(){u.CHM(e);const t=u.oxw().ngIf;return u.oxw().deleteCategory(t,!1)}),u._uU(4,"Delete"),u.qZA(),u.qZA()}}function D(e,t){if(1&e){const e=u.EpF();u.TgZ(0,"div",1),u.TgZ(1,"div",2),u.TgZ(2,"div",3),u.TgZ(3,"span"),u._uU(4),u.qZA(),u.TgZ(5,"button",4),u.NdJ("click",function(){return u.CHM(e),u.oxw().onCloseDetails()}),u._UZ(6,"i",5),u.qZA(),u.qZA(),u.TgZ(7,"div",6),u.TgZ(8,"div"),u.TgZ(9,"h1",7),u.TgZ(10,"span"),u._uU(11),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(12,"div",8),u.TgZ(13,"div",9),u.TgZ(14,"div"),u.TgZ(15,"div",10),u.TgZ(16,"div",11),u.TgZ(17,"span"),u._uU(18,"Active:"),u.qZA(),u.TgZ(19,"span"),u._uU(20),u.qZA(),u.qZA(),u.TgZ(21,"div",11),u.TgZ(22,"span"),u._uU(23,"Created at:"),u.qZA(),u.TgZ(24,"span"),u._uU(25),u.ALo(26,"date"),u.qZA(),u.qZA(),u.TgZ(27,"div",11),u.TgZ(28,"span"),u._uU(29,"Updated at:"),u.qZA(),u.TgZ(30,"span"),u._uU(31),u.ALo(32,"date"),u.qZA(),u.qZA(),u.qZA(),u.qZA(),u.TgZ(33,"div",12),u.TgZ(34,"div"),u.TgZ(35,"span",13),u.NdJ("click",function(t){const i=u.CHM(e).ngIf;return u.oxw().onNavigate(i,t)}),u._uU(36,"Open in Search Engine"),u.qZA(),u.qZA(),u.YNc(37,Y,5,0,"div",14),u.qZA(),u.qZA(),u.qZA(),u.qZA()}if(2&e){const e=t.ngIf,i=u.oxw();u.Q6J("loading",i._loading),u.xp6(4),u.hij("#",e.id,""),u.xp6(7),u.Oqu(e.name),u.xp6(9),u.Oqu(e.active),u.xp6(5),u.Oqu(u.xi3(26,7,e.created_at,"dd/MM/yyyy - HH:mm")),u.xp6(6),u.Oqu(u.xi3(32,10,e.updated_at,"dd/MM/yyyy - HH:mm")),u.xp6(6),u.Q6J("ngIf",i.canEditDeleteC
1ategories)}}const H=[{path:"",component:N,children:[{path:":id",component:(()=>{class e{constructor(e,t,i,o,r,s,a,n){this.notificationService=e,this.queryParamsService=t,this.listingService=i,this.sourceCategoryService=o,this.router=r,this.route=s,this.searchEngineService=a,this.authService=n,this.canEditDeleteCategories=!1,this.sourceCategory$=(0,L.aj)([this.route.paramMap,this.sourceCategoryService.updateSourceCategory]).pipe((0,l.w)(([e])=>{const t=parseInt(e.get("id"));return this.listingService.narrowTable(this.route.snapshot.data.details_available),this._loading=!0,this.sourceCategoryService.getById(t).pipe((0,v.b)(e=>this._loading=!1),(0,E.K)(e=>(this.notificationService.error("Unable to get Concept"),this.listingService.narrowTable(!1),this.router.navigateByUrl("/source-categories"),(0,F.of)(e))))})),this.canEditDeleteCategories=!this.authService.hasRole([2])}onCloseDetails(){this.queryParamsService.navigate("/source-categories"),this.listingService.narrowTable(!1)}editCategory(e){this.listingService.editItem(e)}deleteCategory(e,t){this.listingService.removeItem(e.id,t)}onNavigate(e,t){t.stopPropagation(),this.searchEngineService.newSearch({sources_categories:{filtering:[{id:e.id,name:e.name}],blocking:[],operator:"OR"}})}}return e.\u0275fac=function(t){return new(t||e)(u.Y36(d.gq),u.Y36(d.Ed),u.Y36(d.oI),u.Y36(d.Zl),u.Y36(r.F0),u.Y36(r.gz),u.Y36(d.P2),u.Y36(d.$h))},e.\u0275cmp=u.Xpm({type:e,selectors:[["app-source-categories-show"]],decls:2,vars:3,consts:[["class","table__details-inner",3,"loading",4,"ngIf"],[1,"table__details-inner",3,"loading"],[1,"table__details-header"],[1,"table__details-id"],["type","button",1,"table__details-close",3,"click"],[1,"las","la-arrow-right"],[1,"table__details-info"],[1,"table__details-title"],[1,"table__details-data"],[1,"flex-layout--horizontal",2,"gap","40px"],[1,"table__data-item"],[1,"table__data-info"],[1,"table__details-btns"],[1,"btn",3,"click"],[4,"ngIf"],[3,"click"],[1,"_delete",3,"click"]],template:function(e,t){1&e&&(u.YNc(0,D,38,13,"div",0),u.ALo(1,"async")),2&e&&u.Q6J("ngIf",u.lcZ(1,1,t.sourceCategory$))},directives:[o.O5,P.T],pipes:[o.Ov,o.uU],styles:[""]}),e})(),data:{details_available:!0}}]}];let W=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=u.oAB({type:e}),e.\u0275inj=u.cJS({imports:[[r.Bz.forChild(H)]]}),e})(),R=(()=>{class e{}return e.\u0275fac=function(t){return new(t||e)},e.\u0275mod=u.oAB({type:e}),e.\u0275inj=u.cJS({imports:[[o.ez,r.Bz,W,s.m]]}),e})()}}]);
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.