1"use strict";(self.webpackChunkdspace_angular=self.webpackChunkdspace_angular||[]).push([[372],{41744:(T,M,e)=>{e.d(M,{M:()=>u});var f=e(96354),R=e(89777),_=e(73664),m=e(91029);let u=(()=>{var p;class i{constructor(a,v){this.router=a,this.route=v,this.router.events.subscribe(()=>this.initPageParamsByRoute())}ngOnInit(){this.initPageParamsByRoute(),this.pages=this.route.routeConfig.children.map(a=>a.path).filter(a=>(0,R.hj)(a)),this.dsoRD$=this.route.data.pipe((0,f.T)(a=>a.dso))}getPageUrl(a){return this.router.url}initPageParamsByRoute(){this.currentPage=this.route.snapshot.firstChild.routeConfig.path,this.hideReturnButton=this.route.routeConfig.children.find(a=>a.path===this.currentPage).data.hideReturnButton}static#t=p=()=>(this.\u0275fac=function(v){return new(v||i)(_.rXU(m.Ix),_.rXU(m.nX))},this.\u0275cmp=_.VBU({type:i,selectors:[["ds-edit-comcol"]],decls:0,vars:0,template:function(v,I){},encapsulation:2}))}return p(),i})()},60185:(T,M,e)=>{e.d(M,{J:()=>V});var f=e(72200),R=e(38132),_=e(68018),m=e(84412),u=e(5964),p=e(96354),i=e(25558),C=e(56977),a=e(42589),v=e(43446),I=e(3601),D=e(2086),O=e(4093),r=e(64972),h=e(3116),E=e(89777),B=e(15202),$=e(9847),U=e(95038),y=e(50186),P=e(2615),t=e(73664),L=e(58003);function b(s,l){1&s&&t.nrm(0,"ds-loading")}function x(s,l){1&s&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"translate"),t.k0s()),2&s&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"comcol-role.edit.no-group")," "))}function S(s,l){if(1&s&&(t.j41(0,"div"),t.EFF(1),t.nI1(2,"async"),t.nI1(3,"translate"),t.k0s()),2&s){let c;const o=t.XpG(2);t.R7$(),t.SpI(" ",t.bMT(3,3,"comcol-role.edit."+(null==(c=t.bMT(2,1,o.comcolRole$))?null:c.name)+".anonymous-group")," ")}}function A(s,l){if(1&s&&(t.j41(0,"a",7),t.nI1(1,"async"),t.EFF(2),t.k0s()),2&s){const c=t.XpG().ngVar,o=t.XpG();t.Y8G("routerLink",t.bMT(1,2,o.editGroupLink$)),t.R7$(2),t.SpI(" ",o.dsoNameService.getName(c)," ")}}function W(s,l){if(1&s){const c=t.RV6();t.j41(0,"button",12),t.bIt("click",function(){P.eBV(c);const n=t.XpG(2);return P.Njj(n.create())}),t.nrm(1,"i",13),t.EFF(2),t.nI1(3,"translate"),t.k0s()}2&s&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"comcol-role.edit.create")," "))}function K(s,l){if(1&s){const c=t.RV6();t.j41(0,"button",14),t.bIt("click",function(){P.eBV(c);const n=t.XpG(2);return P.Njj(n.create())}),t.EFF(1),t.nI1(2,"translate"),t.k0s()}2&s&&(t.R7$(),t.SpI(" ",t.bMT(2,1,"comcol-role.edit.restrict")," "))}function j(s,l){if(1&s){const c=t.RV6();t.j41(0,"button",15),t.bIt("click",function(){P.eBV(c);const n=t.XpG().ngVar,d=t.XpG();return P.Njj(d.confirmDelete(d.dsoNameService.getName(n)))}),t.nrm(1,"i",16),t.EFF(2),t.nI1(3,"translate"),t.k0s()}2&s&&(t.R7$(2),t.SpI(" ",t.bMT(3,1,"comcol-role.edit.delete")," "))}function G(s,l){if(1&s&&(t.j41(0,"div",1)(1,"h2",2),t.EFF(2),t.nI1(3,"async"),t.k0s(),t.j41(4,"div",3)(5,"ds-alert",4),t.EFF(6),t.nI1(7,"async"),t.nI1(8,"translate"),t.k0s()(),t.j41(9,"div",5)(10,"div",6),t.nVh(11,b,1,0,"ds-loading"),t.nI1(12,"async"),t.nI1(13,"dsHasNoValue"),t.nVh(14,x,3,3,"div"),t.nI1(15,"async"),t.nVh(16,S,4,5,"div"),t.nI1(17,"async"),t.nVh(18,A,3,4,"a",7),t.nI1(19,"async"),t.k0s(),t.j41(20,"div",8),t.nVh(21,W,4,3,"button",9),t.nI1(22,"async"),t.nVh(23,K,3,3,"button",10),t.nI1(24,"async"),t.nVh(25,j,4,3,"button",11),t.nI1(26,"async"),t.k0s()()()),2&s){let c;const o=t.XpG();t.R7$(2),t.SpI(" ",t.bMT(3,10,o.roleName$)," "),t.R7$(3),t.Y8G("type","alert-info"),t.R7$(),t.JRh(t.bMT(8,14,"comcol-role.edit."+(null==(c=t.bMT(7,12,o.comcolRole$))?null:c.name)+".description")),t.R7$(5),t.vxM(t.bMT(13,18,t.bMT(12,16,o.groupRD$))?11:-1),t.R7$(3),t.vxM(t.bMT(15,20,o.hasNoGroup$)?14:-1),t.R7$(2),t.vxM(t.bMT(17,22,o.hasAnonymousGroup$)?16:-1),t.R7$(2),t.vxM(t.bMT(19,24,o.hasCustomGroup$)?18:-1),t.R7$(3),t.vxM(t.bMT(22,26,o.hasNoGroup$)?21:-1),t.R7$(2),t.vxM(t.bMT(24,28,o.hasAnonymousGroup$)?23:-1),t.R7$(2),t.vxM(t.bMT(26,30,o.hasCustomGroup$)?25:-1)}}let V=(()=>{var s;class l{constructor(o,n,d,g,X,F){this.requestService=o,this.groupService=n,this.notificationsService=d,this.translateService=g,this.dsoNameService=X,this.modalService=F,this.comcolRole$=new m.t(void 0)}get groupLink(){return this.comcolRole.href}set comcolRole(o){this.comcolRole$.next(o)}get comcolRole(){return this.comcolRole$.getValue()}create(){this.groupService.createComcolGroup(this.dso,this.comcolRole.name,this.groupLink).pipe((0,O.qD)()).subscribe(o=>{o.hasSucceeded?(this.groupService.clearGroupsRequests(),this.requestService.setStaleByHrefSubstring(this.comcolRole.href)):this.notificationsService.error(this.roleName$.pipe((0,i.n)(n=>
1this.translateService.get("comcol-role.edit.create.error.title",{role:n}))),`${o.statusCode} ${o.errorMessage}`)})}delete(){this.groupService.deleteComcolGroup(this.groupLink).pipe((0,O.qD)()).subscribe(o=>{o.hasSucceeded?(this.groupService.clearGroupsRequests(),this.requestService.setStaleByHrefSubstring(this.comcolRole.href)):this.notificationsService.error(this.roleName$.pipe((0,i.n)(n=>this.translateService.get("comcol-role.edit.delete.error.title",{role:n}))),o.errorMessage)})}ngOnInit(){this.groupRD$=this.comcolRole$.pipe((0,u.p)(o=>(0,E.a4)(o)),(0,i.n)(o=>this.groupService.findByHref(o.href)),(0,O.bD)()),this.group$=this.groupRD$.pipe((0,p.T)(o=>{if((0,E.a4)(o.payload))return o.payload})),this.editGroupLink$=this.group$.pipe((0,p.T)(o=>(0,E.a4)(o)?(0,a.xl)(o.id):void 0)),this.hasNoGroup$=this.group$.pipe((0,p.T)(o=>(0,E.Tn)(o))),this.hasAnonymousGroup$=this.group$.pipe((0,p.T)(o=>(0,E.a4)(o)&&"Anonymous"===o.name)),this.hasCustomGroup$=this.group$.pipe((0,p.T)(o=>(0,E.a4)(o)&&"Anonymous"!==o.name)),this.roleName$=this.translateService.get(`comcol-role.edit.${this.comcolRole.name}.name`)}confirmDelete(o){const n=this.modalService.open(h.M);n.componentInstance.name=o,n.componentInstance.headerLabel="comcol-role.edit.delete.modal.header",n.componentInstance.infoLabel="comcol-role.edit.delete.modal.info",n.componentInstance.cancelLabel="comcol-role.edit.delete.modal.cancel",n.componentInstance.confirmLabel="comcol-role.edit.delete.modal.confirm",n.componentInstance.brandColor="danger",n.componentInstance.confirmIcon="fas fa-trash";const d=n.componentInstance.response.pipe((0,C.Q)(n.closed)).subscribe(g=>{!0===g&&this.delete()});n.result.then().finally(()=>{n.close(),d&&!d.closed&&d.unsubscribe()})}static#t=s=()=>(this.\u0275fac=function(n){return new(n||l)(t.rXU(I.B),t.rXU(D.GroupDataService),t.rXU($.I),t.rXU(_.c$),t.rXU(v.f),t.rXU(L.Bq))},this.\u0275cmp=t.VBU({type:l,selectors:[["ds-comcol-role"]],inputs:{dso:"dso",comcolRole:"comcolRole"},decls:4,vars:8,consts:[["class","card-body d-flex flex-column",4,"ngVar"],[1,"card-body","d-flex","flex-column"],[1,"h4","w-100"],[1,"mt-2","mb-2"],[3,"type"],[1,"d-flex","flex-md-row","justify-content-between","flex-column"],[1,"w-100","d-flex","align-items-center"],[3,"routerLink"],[1,"flex-shrink-0"],[1,"btn","btn-primary","create"],[1,"btn","btn-primary","restrict"],[1,"btn","btn-danger","delete"],[1,"btn","btn-primary","create",3,"click"],["aria-hidden","true",1,"fas","fa-plus"],[1,"btn","btn-primary","restrict",3,"click"],[1,"btn","btn-danger","delete",3,"click"],["aria-hidden","true",1,"fas","fa-trash"]],template:function(n,d){if(1&n&&(t.j41(0,"div"),t.nI1(1,"async"),t.DNE(2,G,27,32,"div",0),t.nI1(3,"async"),t.k0s()),2&n){let g;t.HbH(t.VkB("card p-2 mb-3 mt-3 custom-alignment ",null==(g=t.bMT(1,4,d.comcolRole$))?null:g.name)),t.R7$(2),t.Y8G("ngVar",t.bMT(3,6,d.group$))}},dependencies:[r.C,R.Wk,B.v,_.h,y.r,f.Jj,U.n,_.D9],encapsulation:2}))}return s(),l})()},95038:(T,M,e)=>{e.d(M,{n:()=>_});var f=e(89777),R=e(73664);let _=(()=>{var m;class u{transform(i){return(0,f.Tn)(i)}static#t=m=()=>(this.\u0275fac=function(C){return new(C||u)},this.\u0275pipe=R.EJ8({name:"dsHasNoValue",type:u,pure:!0}))}return m(),u})()},99125:(T,M,e)=>{e.d(M,{W:()=>v});var f=e(96354),R=e(96697),_=e(54104),m=e(4093),u=e(89777),p=e(9847),i=e(73664),C=e(91029),a=e(68018);let v=(()=>{var I;class D{constructor(r,h,E,B,$){this.dsoDataService=r,this.router=h,this.route=E,this.notificationsService=B,this.translate=$}ngOnInit(){this.dsoRD$=this.route.parent.data.pipe((0,f.T)(r=>r.dso))}onSubmit(r){(0,u.Im)(r.operations)?this.router.navigate([this.frontendURL,r.dso.uuid]):this.dsoDataService.patch(r.dso,r.operations).pipe((0,m.qD)()).subscribe(h=>{h.hasSucceeded?(this.router.navigate([this.frontendURL,r.dso.uuid]),this.notificationsService.success(null,this.translate.get(`${this.type.value}.edit.notifications.success`))):this.notificationsService.error(null,this.translate.get(403===h.statusCode?`${this.type.value}.edit.notifications.unauthorized`:`${this.type.value}.edit.notifications.error`))})}navigateToHomePage(){this.dsoRD$.pipe((0,m.yd)(),(0,R.s)(1)).subscribe(r=>{this.router.navigate([this.frontendURL+r.payload.id])})}static#t=I=()=>(this.\u0275fac=function(h){return new(h||D)(i.rXU(_.x),i.rXU(C.Ix),i.rXU(C.nX),i.rXU(p.I),i.rXU(a.c$))},this.\u0275cmp=i.VBU({type:D,selectors:[["ds-comcol-metadata"]],decls:0,vars:0,template:function(h,E){},encapsulation:2}))}return I(),D})()}}]);
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.