1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f9415d12-8888-5555-b58d-91a694ca2c11")}catch(e){}}(); 3import{a as it}from"./chunk-XFAF5S7Z.js";import"./chunk-M4IILFJ3.js";import{a as Y,c as Z,d as tt,e as et}from"./chunk-SKTI4NAC.js";import"./chunk-VED26QIY.js";import"./chunk-UCBWKLJS.js";import"./chunk-XIEPXTT7.js";import{h as N}from"./chunk-CDLPTF5L.js";import"./chunk-JXYUH2JJ.js";import"./chunk-75MSKHQ5.js";import"./chunk-DBAVNV7D.js";import"./chunk-LZANT4A3.js";import"./chunk-2IL73E45.js";import"./chunk-VQTNL4J6.js";import"./chunk-NXGCLNSX.js";import{a as q,c as H,d as J,g as K,h as Q,j as W,m as X}from"./chunk-N37DZZN7.js";import"./chunk-OD6I7YAT.js";import"./chunk-6GTHYMO6.js";import"./chunk-LQWW6DAP.js";import"./chunk-QVMKUOA2.js";import"./chunk-DUEKGWVE.js";import{b as F,c as k}from"./chunk-SV4QHZ6R.js";import"./chunk-J7WPYGOY.js";import{k as B,l as E}from"./chunk-WZYMWVAN.js";import{b as O,d as P,e as z,f as R,g as j,h as G}from"./chunk-WO2N3BGC.js";import"./chunk-WHTYCSAG.js";import"./chunk-MIRAE4HP.js";import{a as y,b as V,f as $}from"./chunk-LKCBMZWZ.js";import"./chunk-VMBK3ESP.js";import"./chunk-VQM3N5YY.js";import"./chunk-U2S4Q5VS.js";import"./chunk-7B3DFEIE.js";import"./chunk-QFRXUKCK.js";import{$b as D,Bb as L,Ca as S,Ec as l,Fc as d,Gc as I,P as C,Wb as _,Yb as u,Zc as p,_c as m,ac as U,bc as v,cc as o,dc as n,eb as T,ec as w,jb as i,lc as M,ma as g,nc as h,pc as s,sa as f,ta as x,zc as A}from"./chunk-MPV5Q6GW.js";import"./chunk-THKSGHO2.js";var ot=(t,r)=>r.userId;function nt(t,r){if(t&1&&(o(0,"mat-list-item"),w(1,"img",6),o(2,"span",7),l(3),n()()),t&2){let e=r.$implicit;i(),v("src",e.avatar,T),i(2),d(e.name)}}function at(t,r){if(t&1&&(o(0,"h3",5),l(1),p(2,"transloco"),n(),D(3,nt,4,2,"mat-list-item",null,ot)),t&2){let e=s();i(),d(m(2,1,"personal_content.collection_coop.collection_owner")),i(2),U(e.data.owns)}}function lt(t,r){if(t&1){let e=M();o(0,"button",10),h("click",function(){f(e);let a=s(3);return x(a.onLeave())}),l(1),p(2,"transloco"),n()}t&2&&(i(),I(" ",m(2,1,"personal_content.collection_coop.leave")," "))}function rt(t,r){if(t&1){let e=M();o(0,"button",10),h("click",function(){f(e);let a=s().$implicit,b=s(2);return x(b.onRemoveUser(a))}),l(1),p(2,"transloco"),n()}t&2&&(i(),I(" ",m(2,1,"personal_content.collection_coop.remove_user")," "))}function ct(t,r){if(t&1){let e=M();o(0,"button",10),h("click",function(){f(e);let a=s().$implicit,b=s(2);return x(b.onPassOwnership(a))}),l(1),p(2,"transloco"),n()}t&2&&(i(),I(" ",m(2,1,"personal_content.collection_coop.pass_ownership")," "))}function st(t,r){if(t&1&&(o(0,"mat-list-item"),w(1,"img",6),o(2,"span",7),l(3),n(),o(4,"button",8)(5,"mat-icon"),l(6,"more_vert"),n()(),o(7,"mat-menu",null,0),_(9,lt,3,3,"button",9),_(10,rt,3,3,"button",9),_(11,ct,3,3,"button",9),n()()),t&2){let e=r.$implicit,c=A(8),a=s(2);i(),v("src",e.avatar,T),i(2),d(e.name),i(),v("matMenuTriggerFor",c),i(5),u(a.currentUserId()===e.userId?9:-1),i(),u(a.data.collection.relations.ownedByCurrentUser?10:-1),i(),u(a.data.collection.relations.ownedByCurrentUser?11:-1)}}function pt(t,r){if(t&1&&(o(0,"h3",5),l(1),p(2,"transloco"),n(),D(3,st,12,6,"mat-list-item",null,ot)),t&2){let e=s();i(),d(m(2,1,"personal_content.collection_coop.coworkers")),i(2),U(e.data.contributes)}}var Lt=(()=>{class t{constructor(){this.data=g(O),this.loading=S(!1),this.collectionApi=g(it),this.auth=g(N)}currentUserId(){return this.auth.getUserId()}onPassOwnership(e){this.loading.set(!0),this.collectionApi.collectionCoopPassOwnership(this.data.collection.id,e.userId).pipe(C(()=>{this.loading.set(!1)})).subscribe()}onLeave(){this.loading.set(!0),this.collectionApi.collectionCoopLeave(this.data.collection.id).pipe(C(()=>{this.loading.set(!1)})).subscribe()}onRemoveUser(e){this.loading.set(!0),this.collectionApi.collectionCoopTerminate(this.data.collection.id,e.userId).pipe(C(()=>{this.loading.set(!1)})).subscribe()}static{this.\u0275fac=function(c){return new(c||t)}}static{this.\u0275cmp=L({type:t,selectors:[["pc-collection-coop-users-dialog"]],decls:11,vars:8,consts:[["menu","matMenu"],["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-button","","mat-dialog-close","",1,"error-button"],["matSubheader",""],["alt","User avatar","matListItemAvatar","",3,"src"],["matListItemTitle",""],["mat-icon-button","","matListItemMeta","",3,"matMenuTriggerFor"],["mat-menu-item",""],["mat-menu-item","",3,"click"]],template:function(c,a){c&1&&(o(0,"h1",1),l(1),p(2,"transloco"),n(),o(3,"div",2)(4,"mat-list"),_(5,at,5,3),_(6,pt,5,3),n()(),o(7,"div",3)(8,"button",4),l(9),p(10,"transloco"),n()()),c&2&&(i(),d(m(2,4,"personal_content.collection_coop_users_dialog.title")),i(4),u(a.data.owns.length>0?5:-1),i(),u(a.data.contributes.length>0?6:-1),i(3),d(m(10,6,"ui.buttons.close")))},dependencies:[G,P,z,j,R,X,K,Q,J,W,q,H,$,V,y,k,F,et,Z,Y,tt,E,B],encapsulation:2})}}return t})();export{Lt as CollectionCoopUsersDialogComponent}; 4//# sourceMappingURL=chunk-NXFPGZFC.js.map 5 6//# debugId=f9415d12-8888-5555-b58d-91a694ca2c11
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.