PageSourceSearch

https://www.gacacouncil.org/en/chunk-22RR4VHV.js

js gacacouncil.org collected 2026-10-04 17:59:05 UTC 33,722 bytes, 2 lines download raw bytes

1import{b as bt,c as gt,d as xt,f as Mt,g as vt,h as Et}from"./chunk-MQ774EUV.js";import{b as wt,c as yt,d as St,e as Tt,f as It,g as Rt,h as kt,i as Pt,j as Nt,k as Ut,m as Ft}from"./chunk-JJ34GR4J.js";import{a as At}from"./chunk-ARC56PBP.js";import{a as ft}from"./chunk-H3FVH65J.js";import{a as _t,c as ut,d as ht,e as Ct}from"./chunk-5KMSWIXJ.js";import{c as lt,f as mt,g as st,k as dt}from"./chunk-FWUTYCZQ.js";import{a as ct}from"./chunk-BXTCJGXX.js";import{b as at,d as rt}from"./chunk-CHZLVAUG.js";import{a as ot}from"./chunk-NHXO4MD7.js";import{a as pt}from"./chunk-BJ7I5SOF.js";import{a as ze,c as Le,d as Be,g as Ge,h as He,m as G}from"./chunk-WATQXADU.js";import{d as fe,g as be}from"./chunk-MHGUBVXK.js";import{a as Ve,b as $e}from"./chunk-LJ6K3IYK.js";import{a as tt}from"./chunk-UTYLAOFD.js";import{a as nt,b as it}from"./chunk-LY2L7L3N.js";import{A as et,m as qe,o as We,t as Ye}from"./chunk-C53UORQN.js";import{o as k,x as Ee}from"./chunk-YBSG77R6.js";import{b as Oe}from"./chunk-JMVK4GP4.js";import{i as xe}from"./chunk-DXTONCKZ.js";import{b as $,c as z}from"./chunk-HRCH7YTL.js";import{a as Me,c as ve}from"./chunk-V2N2YMJZ.js";import{d as Ue}from"./chunk-3WKYSXKM.js";import{d as Qe,e as Ze}from"./chunk-QHZU4PST.js";import{b as je,c as Xe,i as Je,j as Ke}from"./chunk-HFX225X2.js";import{a as De}from"./chunk-CJEIUXWH.js";import{D as ke,E as Pe,I as Ne,c as we,f as P,i as ye,j as Se,k as X,n as x,q as Te,x as Ie,y as Re}from"./chunk-3QAVFP5S.js";import{b as Fe,c as Ae}from"./chunk-LS74OHRZ.js";import{i as L,j as ge,l as B}from"./chunk-NKUORADV.js";import{i as ue}from"./chunk-224PXFJJ.js";import{i as he,p as Ce}from"./chunk-2K5EWLY6.js";import{$ as j,C as Z,Cd as de,Da as ie,Ec as _,Fb as A,G as ee,Gc as d,Gd as ce,Hd as pe,J as Y,Ja as U,Lb as w,N as te,Nd as _e,Qc as re,Sc as le,Vc as l,Wc as g,Xc as D,Zb as oe,_b as ae,b as q,ca as T,dc as u,fc as h,fd as me,ic as I,jc as R,jd as se,k as W,kc as p,la as ne,lc as a,mc as o,n as y,nc as c,pb as m,qa as b,rc as v,rd as O,sc as E,sd as V,t as Q,vc as M,xa as C,ya as f}from"./chunk-QXK5WLZZ.js";import{e as qt}from"./chunk-MH5V57HS.js";var Ot=qt(()=>{});function Dt(t){let i="";return e=>e.value?(i||(i=e.value),i===e.value?y(null):Z(500).pipe(T(()=>t.get("/api/account/handleInUse",{params:new he({encoder:new pt,fromObject:{handle:e.value}})}).pipe(T(n=>n?y({handleInUse:!0}):y(null)))))):y(null)}function H(t){let i=new Error(t);return i.source="ulid",i}var J="0123456789ABCDEFGHJKMNPQRSTVWXYZ",F=J.length,Vt=Math.pow(2,48)-1,Wt=10,Yt=16;function jt(t){let i=Math.floor(t()*F);return i===F&&(i=F-1),J.charAt(i)}function Xt(t,i){if(isNaN(t))throw new Error(t+" must be a number");if(t>Vt)throw H("cannot encode time greater than "+Vt);if(t<0)throw H("time must be positive");if(Number.isInteger(Number(t))===!1)throw H("time must be an integer");let e,n="";for(;i>0;i--)e=t%F,n=J.charAt(e)+n,t=(t-e)/F;return n}function Jt(t,i){let e="";for(;t>0;t--)e=jt(i)+e;return e}function Kt(t=!1,i){i||(i=typeof window<"u"?window:null);let e=i&&(i.crypto||i.msCrypto);if(e)return()=>{let n=new Uint8Array(1);return e.getRandomValues(n),n[0]/255};try{let n=Ot();return()=>n.randomBytes(1).readUInt8()/255}catch{}if(t){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return()=>Math.random()}throw H("secure crypto unusable, insecure Math.random not allowed")}function Qt(t){return t||(t=Kt()),function(e){return isNaN(e)&&(e=Date.now()),Xt(e,Wt)+Jt(Yt,t)}}var $t=Qt();function nn(t,i){if(t&1){let e=M();a(0,"mat-list-item")(1,"span",0),c(2,"ih-image",1),o(),a(3,"span",2)(4,"span"),l(5),o(),l(6," - "),c(7,"ih-time-ago",3),o(),a(8,"span"),l(9),o(),a(10,"span",4)(11,"button",5),_("click",function(){C(e);let r=d();return f(r.deleteClicked.emit())}),c(12,"mat-icon",6),o()()()}if(t&2){let e=i;m(2),p("imageInfo",e.createdBy.image),m(3),g(e.createdBy.fullName),m(2),p("value",e.createdAt),m(2),g(e.text)}}var Lt=(()=>{class t{note=pe();deleteClicked=ce();constructor(){}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=A({type:t,selectors:[["ih-admin-note"]],inputs:{note:[1,"note"]},outputs:{deleteClicked:"deleteClicked"},decls:1,vars:1,consts:[["matListItemAvatar",""],[1,"member-img",3,"imageInfo"],["matListItemTitle",""],[3,"value"],["matListItemMeta",""],["mat-icon-button","","type","button",1,"delete-btn",3,"click"],["svgIcon","close"]],template:function(n,r){if(n&1&&u(0,nn,13,4,"mat-list-item"),n&2){let s;h((s=r.note())?0:-1,s)}},dependencies:[B,L,z,$,G,He,Be,ze,Le,tt,At],styles:["[_nghost-%COMP%]{--mat-list-list-item-label-text-size: 12px;--mat-list-list-item-label-text-weight: 500;--mat-list-list-item-label-text-tracking: normal;--mat-list-list-item-label-text-color: rgba(0, 0, 0, .54);--mat-list-list-item-hover-label-text-color: rgba(0, 0, 0, .54);--mat-list-list-item-supporting-text-color: rgba(0, 0, 0, .87)}[_nghost-%COMP%]     .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines{padding-bottom:16px;height:auto;border-radius:var(--mat-sys-corner-medium)}[_nghost-%COMP%]     .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines:hover{background-color:#00000005}[_nghost-%COMP%]     .mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{white-space:normal}.member-img[_ngcontent-%COMP%]{border-radius:50%;overflow:hidden}.delete-btn[_ngcontent-%COMP%]{margin-top:16px}"]})}return t})();var Bt=(()=>{class t{lazyDialog=b(Oe);
1async open(e){let n=await import("./member-add-channel-dialog.component-TWQD3EAB.js").then(s=>s.MemberAddChannelDialogComponent);return(await this.lazyDialog.getDialogService()).open(n,{id:"memberAddChannel",data:e,closeOnNavigation:!0,panelClass:["member-add-channel-dialog","basic-dialog"],maxWidth:void 0})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=ne({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var on=()=>[],an=(t,i)=>i.userRoleId,rn=(t,i)=>i.campaignTagGroupId,ln=(t,i)=>i.noteId,mn=(t,i)=>i.campaignTagId,sn=(t,i)=>i.channelId,dn=(t,i)=>i.channelRoleId;function cn(t,i){if(t&1){let e=M();a(0,"button",18),_("click",function(){C(e);let r=d();return f(r.suspendUser())}),c(1,"mat-icon",19),a(2,"span"),l(3,"Suspend"),o()()}if(t&2){let e=d();p("disabled",e.saving())}}function pn(t,i){if(t&1){let e=M();a(0,"button",18),_("click",function(){C(e);let r=d();return f(r.suspendUser())}),c(1,"mat-icon",20),a(2,"span"),l(3,"Activate"),o()()}if(t&2){let e=d();p("disabled",e.saving())}}function _n(t,i){t&1&&(a(0,"div",14),c(1,"mat-spinner"),o())}function un(t,i){t&1&&(a(0,"mat-error"),l(1," Please enter the member's name "),o())}function hn(t,i){if(t&1&&(a(0,"mat-option",35),l(1),o()),t&2){let e=i.$implicit;p("value",e),m(),D(" ",e.name," ")}}function Cn(t,i){t&1&&(a(0,"div",36)(1,"span",44),l(2," Member hub role "),o(),a(3,"div",45),l(4,"Owner"),o()())}function fn(t,i){if(t&1){let e=M();a(0,"ih-admin-note",47),_("deleteClicked",function(){let r=C(e).$implicit,s=d(3);return f(s.deleteNote(r))}),o()}if(t&2){let e=i.$implicit;p("note",e)}}function bn(t,i){if(t&1&&(a(0,"mat-list"),I(1,fn,1,1,"ih-admin-note",46,ln),o()),t&2){let e=d(2);m(),R(e.addUserForm.value.adminNotes)}}function gn(t,i){t&1&&(a(0,"ih-info-panel",40),l(1,"This member does not have any notes"),o()),t&2&&p("dismissable",!1)}function xn(t,i){t&1&&(a(0,"mat-error"),l(1," Please enter a note "),o())}function Mn(t,i){t&1&&(a(0,"mat-error"),l(1," Note must be less than 500 characters "),o())}function vn(t,i){if(t&1){let e=M();a(0,"form",41)(1,"span",48),l(2,"Add a new note"),o(),a(3,"mat-form-field",24),c(4,"textarea",49),u(5,xn,2,0,"mat-error"),u(6,Mn,2,0,"mat-error"),o(),a(7,"div",50)(8,"button",51),_("click",function(){C(e);let r=d(2);return f(r.cancelAddNote())}),l(9,"Cancel"),o(),a(10,"button",52),_("click",function(){C(e);let r=d(2);return f(r.addNote())}),l(11,"Add"),o()()()}if(t&2){let e=d(2);p("formGroup",e.newNoteForm),m(5),h(e.newNoteForm.hasError("required")?5:-1),m(),h(e.newNoteForm.hasError("maxlength")?6:-1)}}function En(t,i){if(t&1){let e=M();a(0,"div",42)(1,"button",52),_("click",function(){C(e);let r=d(2);return f(r.showAddNote())}),l(2,"Add note"),o()()}}function wn(t,i){if(t&1){let e=M();a(0,"mat-chip-row",61),_("removed",function(){let r=C(e).$implicit,s=d().$implicit,S=d(2);return f(S.removeTag(s,r))}),l(1),c(2,"mat-icon",62),o()}if(t&2){let e=i.$implicit;m(),D(" ",e.name," ")}}function yn(t,i){if(t&1){let e=M();a(0,"div",43)(1,"div",53),_("click",function(){let r=C(e).$implicit,s=d(2);return f(s.editTagGroup(r))})("keydown.enter",function(){let r=C(e).$implicit,s=d(2);return f(s.editTagGroup(r))}),c(2,"mat-icon",54),a(3,"div",55),l(4),o(),c(5,"span",56),a(6,"button",57),c(7,"mat-icon",58),o()(),c(8,"mat-divider",59),a(9,"mat-chip-set"),I(10,wn,3,1,"mat-chip-row",60,mn),o()()}if(t&2){let e=i.$implicit;m(2),p("svgIcon",e.icon),m(2),g(e.name),m(5),ae("aria-label",e.name),m(),R(e.tags)}}function Sn(t,i){if(t&1&&(a(0,"span",74),l(1),o()),t&2){let e=d().$implicit;m(),g(e.channelRole.name)}}function Tn(t,i){if(t&1&&(a(0,"mat-option",35),l(1),o()),t&2){let e=i.$implicit;p("value",e),m(),D(" ",e.name)}}function In(t,i){if(t&1){let e=M();a(0,"mat-form-field",75)(1,"mat-label"),l(2,"Channel role"),o(),a(3,"mat-select",76),_("selectionChange",function(r){C(e);let s=d(2).$implicit,S=d(3);return f(S.updateMemberRole(s,r))}),I(4,Tn,2,2,"mat-option",35,dn),o()()}if(t&2){let e=d(),n=d().$implicit,r=d(3);m(3),p("compareWith",r.compareChannelRole)("value",n.channelRole)("disabled",e.length<2),m(),R(e)}}function Rn(t,i){if(t&1&&u(0,In,6,3,"mat-form-field",75),t&2){let e=d().$implicit;h(e.channelRole?0:-1)}}function kn(t,i){if(t&1){let e=M();a(0,"mat-expansion-panel",69),_("opened",function(){let r=C(e).$implicit,s=d(3);return f(s.getChannelRoles(r))}),a(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"div",70),c(4,"ih-ch
1annel-icon",71),a(5,"div",72)(6,"span",73),l(7),o(),u(8,Sn,2,1,"span",74),o()()()(),u(9,Rn,1,1),O(10,"async"),a(11,"mat-action-row")(12,"button",51),_("click",function(){let r=C(e).$implicit,s=d(3);return f(s.removeChannel(r))}),l(13," Remove from channel "),o()()()}if(t&2){let e,n=i.$implicit,r=d(3);p("disabled",!n.channelRole),m(4),p("channel",n),m(3),g(n.name),m(),h(n.channelRole?8:-1),m(),h((e=V(10,5,r.channelRole$))?9:-1,e)}}function Pn(t,i){if(t&1){let e=M();a(0,"div")(1,"div",63)(2,"div",64)(3,"h3",65)(4,"span",66),l(5,"CHANNELS"),o(),a(6,"button",67),_("click",function(){C(e);let r=d(2);return f(r.addChannels())}),c(7,"mat-icon",58),o()(),a(8,"mat-accordion"),I(9,kn,14,7,"mat-expansion-panel",68,sn),o()()()()}if(t&2){let e=d(2);m(9),R(e.myChannels())}}function Nn(t,i){t&1&&(a(0,"th",86),l(1,"Amount"),o())}function Un(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.amount)}}function Fn(t,i){t&1&&(a(0,"th",86),l(1,"Description"),o())}function An(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.description)}}function Dn(t,i){t&1&&(a(0,"th",86),l(1,"Created"),o())}function On(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.createdAt)}}function Vn(t,i){t&1&&c(0,"tr",88)}function $n(t,i){t&1&&c(0,"tr",89)}function zn(t,i){if(t&1&&(a(0,"table",77),v(1,79),w(2,Nn,2,0,"th",80)(3,Un,2,1,"td",81),E(),v(4,82),w(5,Fn,2,0,"th",80)(6,An,2,1,"td",81),E(),v(7,83),w(8,Dn,2,0,"th",80)(9,On,2,1,"td",81),E(),w(10,Vn,1,0,"tr",84)(11,$n,1,0,"tr",85),o()),t&2){let e=d(2),n=d(2);p("dataSource",e.payments),m(10),p("matHeaderRowDef",n.displayedPaymentColumns),m(),p("matRowDefColumns",n.displayedPaymentColumns)}}function Ln(t,i){t&1&&(a(0,"ih-info-panel",78),l(1,"This member does not have any payments"),o()),t&2&&p("dismissable",!1)}function Bn(t,i){if(t&1&&(a(0,"div"),u(1,zn,12,3,"table",77)(2,Ln,2,1,"ih-info-panel",78),o()),t&2){let e=d();m(),h(e.payments.length>0?1:2)}}function Gn(t,i){t&1&&(a(0,"th",86),l(1,"Description"),o())}function Hn(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.description)}}function qn(t,i){t&1&&(a(0,"th",86),l(1,"Amount"),o())}function Wn(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.amount)}}function Yn(t,i){t&1&&(a(0,"th",86),l(1,"Total"),o())}function jn(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.total)}}function Xn(t,i){t&1&&(a(0,"th",86),l(1,"Status"),o())}function Jn(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.status)}}function Kn(t,i){t&1&&(a(0,"th",86),l(1,"Created"),o())}function Qn(t,i){if(t&1&&(a(0,"td",87),l(1),o()),t&2){let e=i.$implicit;m(),g(e.createdAt)}}function Zn(t,i){t&1&&c(0,"tr",88)}function ei(t,i){t&1&&c(0,"tr",89)}function ti(t,i){if(t&1&&(a(0,"table",77),v(1,82),w(2,Gn,2,0,"th",80)(3,Hn,2,1,"td",81),E(),v(4,79),w(5,qn,2,0,"th",80)(6,Wn,2,1,"td",81),E(),v(7,90),w(8,Yn,2,0,"th",80)(9,jn,2,1,"td",81),E(),v(10,91),w(11,Xn,2,0,"th",80)(12,Jn,2,1,"td",81),E(),v(13,83),w(14,Kn,2,0,"th",80)(15,Qn,2,1,"td",81),E(),w(16,Zn,1,0,"tr",84)(17,ei,1,0,"tr",85),o()),t&2){let e=d(2),n=d(2);p("dataSource",e.subscriptions),m(16),p("matHeaderRowDef",n.displayedSubscriptionColumns),m(),p("matRowDefColumns",n.displayedSubscriptionColumns)}}function ni(t,i){t&1&&(a(0,"ih-info-panel",78),l(1,"This member does not have any subscriptions"),o()),t&2&&p("dismissable",!1)}function ii(t,i){if(t&1&&(a(0,"div"),u(1,ti,18,3,"table",77)(2,ni,2,1,"ih-info-panel",78),o()),t&2){let e=d();m(),h(e.subscriptions.length>0?1:2)}}function oi(t,i){if(t&1&&(u(0,Bn,3,1,"div"),u(1,ii,3,1,"div")),t&2){let e=d(2);h(e.selectedTab()===e.MemberEditorTabs.Payments?0:-1),m(),h(e.selectedTab()===e.MemberEditorTabs.Subscriptions?1:-1)}}function ai(t,i){if(t&1){let e=M();a(0,"form",21),_("ngSubmit",function(){C(e);let r=d();return f(r.save())}),a(1,"div",22)(2,"div",23)(3,"mat-form-field",24)(4,"mat-label"),l(5,"Full name"),o(),c(6,"input",25),u(7,un,2,0,"mat-error"),o()(),a(8,"div",26)(9,"mat-form-field",24)(10,"mat-label"),l(11,"Email"),o(),c(12,"input",27),o()(),a(13,"div",28)(14,"mat-form-field",24)(15,"mat-label"),l(16,"Username"),o(),c(17,"input",29),o()(),a(18,"div",30)(19,"mat-form-field",24)(20,"mat-label"),l(21,"Phone number"),o(),c(22,"input",31),o()(),a(23,"div",32)(24,"mat-form-field",33)(25,"mat-label"),l(26,"Member hub role"),o(),a(27,"mat-select",34),I(28,hn,2,2,"mat-option",35,an),O(30,"async"),o()(),u(31,Cn,5,0,"div",36),o(),a(32,"div",37)(33,"span",38),l(34,"Notes"),o(),a(35,"div",39),u(36,bn,3,0,"mat-list")(37,gn,2,1,"ih-info-panel",40),o(),u(38,vn,12,3,"form",41)(39,En,3,0,"div",42),o(),I(40,yn,12,3,"div",43,rn),o()(),u(42,Pn,11,0,"div"),u(43,oi,2,2),O(44,"async")}if(t&2){let e,n=d();p("formGroup",n.addUserForm),m(7),h(n.addUserForm.get("fullName").hasError("required")?7:-1),m(17),p("hidden",(n.addUserForm.value.userRole==null?null:n.addUserForm.value.userRole.userRoleId)===0),m(3),oe("aria-label",me("Select a role for ",n.addUserForm.value.fullName)),p("compareWith",n.compareRole),m(),R(V(30,11,n.userRoles$)),m(3),h((n.addUserForm.value.userRole==null?null:n.addUserForm.value.userRole.userRoleId)===0?31:-1),m(5),h((n.addUserForm.value.adminNotes??se(15,on)).length>0?36:37),m(2),h(n.addNoteVisible()?38:39),m(2),R(n.addUserForm.value.userTags),m(2),h(n.selectedTab()===n.MemberEditorTabs.Channels?42:-1),m(),h((e=V(44,13,n.member$))?43:-1,e)}}var K=(function(t){return t.Profile="profile",t.Channels="channels",t.Payments="payments",t.Subscriptions="subscriptions",t})(K||{}),bo=(()=>{class t{hostClass=!0;http=b(Ce);options=b(Ae);mdDialogRef=b(Fe);security=b(We);auth=b(Ye);confirmDialog=b(et);addChannelDialog=b(Bt);lazySnackbar=b(qe);selectTagDialog=b(ct);router=b(xe);logger=Ue("MemberEditorComponent");cd=b(_e);originalUserRoleId=null;addUserForm=new X({campaignUserId:new x(void 0),fullName:new x("",P.required),email:new x("",P.required),handle:new x("",[],Dt(this.http)),phone:new x(""),userRole:new x(null,P.required),channels:new x([]),userTags:new x([]),suspended:new x(!1),payments:new x([]),subscriptions:new x([]),adminNotes:new x([])});newNoteForm=new X({text:new x("",[P.required,P.maxLength(500)])});addNoteVisible=U(!1);selectChannelUserRole=new x("",P.required);channelRole$;canSave=this.security.can(k.UsersInviteEdit);saving=U(!1);userRoles;originalEmail;canEditEmail;loading=U(!0);canViewSuspend=this.security.can(k.UserSuspend);currentUser$=this.auth.currentUser$;userRoles$=this.http.get("/api/userrole/compact");member$=this.options.campaignUserId?this.http.get("/api/members/"+this.options.campaignUserId).pipe(j(1)):y(null);canManagePermissions$=this.currentUser$.pipe(T(e=>y(this.security.can(k.ManagePermissions)&&!e.isCustomRole)));channelsSignal=ve(this.addUserForm.controls.channels.valueChanges,{initialValue:this.addUserForm.controls.channels.value});myChannels=de(()=>[...this.channelsSignal()??[]].sort((e,n)=>e.name.localeCompare(n.name)));
1MemberEditorTabs=K;selectedTab=U(K.Profile);displayedPaymentColumns=["amount","description","created"];displayedSubscriptionColumns=["description","amount","total","status","created"];destroyRef=b(ie);constructor(){this.addUserForm.controls.email.disable(),this.addUserForm.controls.phone.disable(),this.currentUser$=this.auth.currentUser$,this.userRoles$=this.http.get("/api/userrole/compact"),this.member$=this.options.campaignUserId?this.http.get("/api/members/"+this.options.campaignUserId):y(null),this.canManagePermissions$=this.currentUser$.pipe(T(e=>y(this.security.can(k.ManagePermissions)&&!e.isCustomRole)))}ngOnInit(){this.loading.set(!0),this.member$.pipe(te(1)).subscribe(e=>{let n={campaignUserId:e.campaignUserId,fullName:e.fullName,suspended:e.suspended,email:e.email,handle:e.handle,phone:e.phone,adminNotes:e.adminNotes,userRole:{userRoleId:e.userRole.userRoleId,isDefault:e.userRole.isDefault,name:e.userRole.name,immutable:e.userRole.immutable},channels:e.channels,userTags:e.userTags,payments:e.payments,subscriptions:e.subscriptions};this.addUserForm.setValue(n),this.originalUserRoleId=e.userRole.userRoleId,this.loading.set(!1)})}updateMemberRole(e,n){let r=e.channelRole,s=n.value;e.channelRole=s,this.saving.set(!0),this.http.put(`/api/channels/${e.channelId}/members/${this.options.campaignUserId}/channelRole`,s).subscribe(()=>{this.saving.set(!1),this.lazySnackbar.open("Channel role has been updated")},()=>{e.channelRole=r,this.cd.markForCheck(),this.saving.set(!1),this.lazySnackbar.open("Unable to update channel role")})}getChannelRoles(e){e.channelRole&&(this.channelRole$=this.http.get(`/api/channels/${e.channelId}/roles`).pipe(Q(n=>n.filter(r=>r.channelRoleId!==Ee.Owner)),j(1)))}async editTagGroup(e){(await this.selectTagDialog.open({group:e})).afterClosed().subscribe(n=>{if(n){this.lazySnackbar.open("Updating your tag groups");let r=e.tags;e.tags=n,this.cd.markForCheck(),this.http.put("/api/account/tags",n).subscribe(q,()=>{e.tags===n&&(e.tags=r,this.cd.markForCheck()),this.lazySnackbar.open("Unable to update tags")})}})}removeTag(e,n){let r=e.tags,s=e.tags.filter(S=>S!==n);e.tags=s,this.cd.markForCheck(),this.http.delete(`/api/account/tags/${n.campaignTagId}`).subscribe(q,()=>{e.tags===s&&(e.tags=r,this.cd.markForCheck()),this.lazySnackbar.open("Unable to remove tag. Please try again")})}cancel(){this.mdDialogRef.close()}submit(){this.mdDialogRef.close(this.options.campaignUserId)}async suspendUser(){this.addUserForm.controls.suspended.value?(await this.confirmDialog.open({title:"Are you sure?",message:"Are you sure you want to activate this member?",confirmText:"ACTIVATE MEMBER"})).afterClosed().subscribe(n=>{n&&this.setSuspend()}):(await this.confirmDialog.open({title:"Are you sure?",message:"Are you sure you want to suspend this member?",confirmText:"SUSPEND MEMBER"})).afterClosed().subscribe(n=>{n&&this.setSuspend()})}showAddNote(){this.addNoteVisible.set(!0),this.newNoteForm.reset(),requestAnimationFrame(()=>{let e=document.querySelector(".basic-dialog-content");e&&e.scrollTo({top:e.scrollHeight,behavior:"smooth"})})}async deleteNote(e){(await this.confirmDialog.open({title:"Are you sure?",message:"Are you sure you want to delete this note?",confirmText:"DELETE NOTE"})).afterClosed().subscribe(r=>{r&&(this.addUserForm.controls.adminNotes.setValue((this.addUserForm.controls.adminNotes.value??[]).filter(s=>s.noteId!==e.noteId)),this.cd.markForCheck())})}cancelAddNote(){this.addNoteVisible.set(!1)}addNote(){if(this.newNoteForm.valid){let e=this.addUserForm.controls.adminNotes.value??[];e.push({noteId:$t(),text:this.newNoteForm.value.text.trim(),createdAt:new Date,createdBy:this.auth.getUserAsPerson()}),this.addUserForm.controls.adminNotes.setValue(e),this.newNoteForm.reset(),this.addNoteVisible.set(!1)}}compareRole(e,n){return e&&n?e.userRoleId===n.userRoleId&&e.immutable===n.immutable:e===n}compareChannelRole(e,n){return e&&n?e.channelRoleId===n.channelRoleId&&e.immutable===n.immutable:e===n}setSuspend(){let e=this.addUserForm.controls.campaignUserId.value;this.saving.set(!0),this.http.put("/api/members/"+e+"/suspend",{}).subscribe(n=>{this.addUserForm.controls.suspended.setValue(n),this.saving.set(!1),this.addUserForm.controls.suspended.value?this.lazySnackbar.open("This user has been suspended, logged out and will no longer be able to login"):this.lazySnackbar.open("You've restored this user"),this.mdDialogRef.close({campaignUserId:e,suspended:n})},()=>{this.saving.set(!1),this.lazySnackbar.open("Something went wrong","TRY AGAIN").then(n=>n.onAction().subscribe(()=>this.setSuspend()))})}async addChannels(){let e=(this.addUserForm.controls.channels.value??[]).map(r=>r.channelId);(await this.addChannelDialog.open({campaignUserId:this.options.campaignUserId,existingChannelIds:e})).afterClosed().pipe(ee(r=>!!r?.length),T(()=>this.http.get("/api/members/"+this.options.campaignUserId).pipe(Y(()=>
1(this.lazySnackbar.open("Unable to refresh channels"),W)))),Me(this.destroyRef)).subscribe(r=>{this.addUserForm.controls.channels.setValue(r.channels)})}removeChannel(e){this.addUserForm.controls.channels.setValue(this.addUserForm.controls.channels.value.filter(n=>n!==e))}forgotPassword(){this.saving.set(!0),this.http.post("/api/members/"+this.options.campaignUserId+"/forgotPassword",this.addUserForm.controls.email.value).subscribe(()=>{this.saving.set(!1),this.lazySnackbar.open(`Sent forgot password email to ${this.addUserForm.controls.email.value}`)},()=>{this.saving.set(!1),this.lazySnackbar.open("Unable to send forgot password","TRY AGAIN").then(e=>e.onAction().subscribe(()=>this.forgotPassword()))})}save(){if(this.addUserForm.valid){this.saving.set(!0);let e=this.addUserForm.getRawValue();if(e.channels=e.channels?.filter(n=>n.channelId!==0)??[],!this.options.campaignUserId)this.http.post("/api/members",e).subscribe(()=>{this.saving.set(!1),this.lazySnackbar.open("Invitation sent to "+this.addUserForm.controls.email.value),this.mdDialogRef.close(!0)},()=>{this.saving.set(!1),this.lazySnackbar.open("Unable to save your settings","TRY AGAIN").then(n=>n.onAction().subscribe(()=>this.save()))});else{let n=e.userRole?.userRoleId,r=this.originalUserRoleId;this.http.put("/api/members/"+this.options.campaignUserId,e).subscribe(()=>{this.saving.set(!1),this.lazySnackbar.open("Member updated"),this.mdDialogRef.close({campaignUserId:this.options.campaignUserId,fullName:this.addUserForm.value.fullName}),r!=null&&n!=null&&n!==r&&this.warnIfThirdPartyAppAccessLost(r,n)},()=>{this.saving.set(!1),this.lazySnackbar.open("Unable to save your changes","TRY AGAIN").then(s=>s.onAction().subscribe(()=>this.save()))})}}}warnIfThirdPartyAppAccessLost(e,n){this.http.get("/api/roles/all").pi
1pe(Y(r=>(this.logger.warn("Unable to load roles to check third-party app access impact",{error:r}),this.lazySnackbar.open("Couldn't check this role change's impact on third-party app access. Review manually."),W))).subscribe(r=>{let s=r.find(N=>N.campaignUserRoleId===e),S=r.find(N=>N.campaignUserRoleId===n),Gt=s?.permissions?.[k.ManageThirdPartyAppAccess]===!0,Ht=S?.permissions?.[k.ManageThirdPartyAppAccess]===!0;!Gt||Ht||this.lazySnackbar.open("This member's existing third-party and AI-assistant connections are not automatically narrowed by this role change.","REVIEW CONNECTIONS").then(N=>N.onAction().subscribe(()=>this.router.navigate(["/admin/thirdPartyAppAccess"])))})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=A({type:t,selectors:[["ih-member-editor"]],hostVars:2,hostBindings:function(n,r){n&2&&le("ih-member-editor",r.hostClass)},decls:34,vars:6,consts:[["memberMenu","matMenu"],[3,"scrollable"],["ih-header",""],["mat-icon-button","",1,"member-editor-menu-button",3,"matMenuTriggerFor"],["svgIcon","dots-vertical"],["xPosition","before"],["mat-menu-item","",3,"click"],["svgIcon","account-edit"],["svgIcon","pound-box"],["svgIcon","cash-multiple"],["svgIcon","cash-sync"],["svgIcon","lock-reset"],["mat-menu-item","",3,"disabled"],["ih-content",""],[1,"fx-layout-row","fx-layout-align-center"],["ih-footer",""],["mat-button","",1,"member-editor-close-btn",3,"click"],["mat-flat-button","","color","accent",1,"member-editor-save-btn",3,"click"],["mat-menu-item","",3,"click","disabled"],["svgIcon","account-cancel"],["svgIcon","account-plus"],["novalidate","","id","addUserForm","method","POST",3,"ngSubmit","formGroup"],[1,"member-editor-fields"],[1,"member-editor-firstname"],["appearance","outline",1,"member-editor-form-field"],["matInput","","type","text","formControlName","fullName"],[1,"member-editor-email"],["matInput","","name","email","type","email","placeholder","Email","required","","formControlName","email","maxlength","255"],[1,"member-editor-username"],["matInput","","name","username","type","text","placeholder","Username","formControlName","handle","maxlength","255"],[1,"member-editor-phone"],["matInput","","name","phone","type","tel","placeholder","555-123-4567","formControlName","phone","maxlength","16"],[1,"member-editor-user-hub-role"],["appearance","outline",1,"member-editor-form-field",3,"hidden"],["formControlName","userRole",3,"compareWith","aria-label"],[3,"value"],[1,"owner-container"],[1,"member-editor-admin-notes"],[1,"notes-label"],[1,"notes-list-container"],[1,"no-notes-panel",3,"dismissable"],[3,"formGroup"],[1,"button-row","fx-layout-row","fx-layout-align-end-center"],[1,"button-row","mat-block","dark-font-label-focus","tags-container"],[1,"owner-label"],[1,"owner-text"],[3,"note"],[3,"deleteClicked","note"],[1,"new-note-label"],["matInput","","name","adminNotes","type","text","placeholder","Type any notes here...","formControlName","text","maxlength","500"],[1,"action-row","fx-layout-row","fx-layout-align-end-center","fx-gap-8"],["mat-stroked-button","","color","warn",3,"click"],["mat-stroked-button","","color","primary",3,"click"],["tabindex","0","role","button",1,"fx-layout-row","fx-layout-align-start-center","tag-group-title-button","form-field-label",3,"click","keydown.enter"],[3,"svgIcon"],[1,"fx-layout-row","fx-layout-align-start-center","tag-group-title"],[1,"fx-flex"],["mat-icon-button","",1,"tag-group-button"],["svgIcon","plus"],[1,"tag-group-divider"],["readonly","true",1,"mat-chip-wrapper-nobox"],["readonly","true",1,"mat-chip-wrapper-nobox",3,"removed"],["matChipRemove","","svgIcon","close-circle"],[1,"member-editor-channels"],[1,"member-editor-channels-list-channels-container"],[1,"member-editor-channels-list-channels-title"],[1,"member-editor-channels-list-channels-title-text"],["mat-icon-button","","aria-label","Add channels",1,"member-editor-channels-add-button",3,"click"],[3,"disabled"],[3,"opened","disabled"],[1,"fx-layout-row","fx-layout-align-start-center","fx-flex"],[1,"channel-icon",3,"channel"],[1,"fx-layout-column","fx-flex"],[1,"channel-name"],[1,"channel-user-role-name"],["appearance","fill"],[3,"selectionChange","compareWith","value","disabled"],["mat-table","",3,"dataSource"],[3,"dismissable"],["matColumnDef","amount"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","created"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-row",""],["mat-row",""],["matColumnDef","total"],["matColumnDef","status"]],template:function(n,r){if(n&1&&(a(0,"ih-basic-dialog",1),v(1,2),a(2,"span"),l(3,"Edit member"),o(),a(4,"button",3),c(5,"mat-icon",4),o(),a(6,"mat-menu",5,0)(8,"button",6),_("click",function(){return r.selectedTab.set(r.MemberEditorTabs.Profile)}),c(9,"mat-icon",7),l(10," Profile "),o(),a(11,"button",6),_("click",function(){return r.selectedTab.set(r.MemberEditorTabs.Channels)}),c(12,"mat-icon",8),l(13," Channels "),o(),a(14,"button",6),_("click",function(){return r.selectedTab.set(r.MemberEditorTabs.Payments)}),c(15,"mat-icon",9),l(16," Payments "),o(),a(17,"button",6),_("click",function(){return r.selectedTab.set(r.MemberEditorTabs.Subscriptions)}),c(18,"mat-icon",10),l(19," Subscriptions "),o(),a(20,"button",6),_("click",function(){return r.forgotPassword()}),c(21,"mat-icon",11),a(22,"span"),l(23,"Send forgot password"),o()(),u(24,cn,4,1,"button",12),u(25,pn,4,1,"button",12),o(),E(),v(26,13),u(27,_n,2,0,"div",14),u(28,ai,45,16),E(),v(29,15),a(30,"button",16),_("click",function(){return r.cancel()}),l(31,"Close"),o(),a(32,"button",17),_("click",function(){return r.s
1ave()}),l(33,"Save"),o(),E(),o()),n&2){let s=re(7);p("scrollable",!0),m(4),p("matMenuTriggerFor",s),m(20),h(r.addUserForm.controls.suspended.value?-1:24),m(),h(r.addUserForm.controls.suspended.value?25:-1),m(2),h(r.loading()?27:-1),m(),h(r.loading()?-1:28)}},dependencies:[B,ge,L,dt,lt,mt,st,$e,Ve,Et,vt,bt,gt,xt,Mt,Ke,Je,je,Xe,z,$,Ze,Qe,G,Ge,Ct,ut,_t,ht,be,fe,it,nt,rt,at,Ft,wt,St,kt,Tt,yt,Pt,It,Rt,Nt,Ut,Ne,Te,we,ye,Se,ke,Pe,Re,Ie,De,ot,ft,Lt,ue],styles:["ih-basic-dialog[_ngcontent-%COMP%]     .basic-dialog-content{padding:6px 24px 16px}ih-basic-dialog[_ngcontent-%COMP%]     .basic-dialog-footer{border-top:1px solid rgba(0,0,0,.12)}.member-editor-form-field[_ngcontent-%COMP%], .member-editor-user-hub-role[_ngcontent-%COMP%]{width:100%}.member-editor-firstname[_ngcontent-%COMP%], .member-editor-lastname[_ngcontent-%COMP%], .member-editor-email[_ngcontent-%COMP%], .member-editor-phone[_ngcontent-%COMP%]{width:100%;margin-bottom:16px}.notes-label[_ngcontent-%COMP%]{display:block;font-weight:500;margin-bottom:8px}.new-note-label[_ngcontent-%COMP%]{font-size:14px;font-weight:500;margin-bottom:4px}.notes-list-container[_ngcontent-%COMP%]{padding-bottom:16px}.member-editor-channels[_ngcontent-%COMP%]{margin-top:16px;border:1px solid rgba(0,0,0,.38);border-radius:4px}.member-editor-channels[_ngcontent-%COMP%]   .tags-container[_ngcontent-%COMP%]{margin-bottom:16px}.member-editor-channels[_ngcontent-%COMP%]   .tag-group-title[_ngcontent-%COMP%]{margin-left:16px}.member-editor-channels[_ngcontent-%COMP%]   .tag-group-divider[_ngcontent-%COMP%]{margin:0 0 4px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels[_ngcontent-%COMP%]{padding-bottom:16px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels[_ngcontent-%COMP%]   mat-expansion-panel-header[_ngcontent-%COMP%]{height:56px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-list-channels-container[_ngcontent-%COMP%]{background-color:var(--ih-app-background-color-content);border-radius:4px;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f;color:var(--ih-app-background-color-content-contrast);margin:8px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-list-channels-title[_ngcontent-%COMP%]{align-items:center;background-color:#d3d3d3!important;border-radius:4px 4px 0 0;color:#000;display:flex;font-size:14px;font-weight:500;margin-top:unset;padding:8px 4px 8px 16px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-list-channels-title-text[_ngcontent-%COMP%]{box-sizing:border-box;flex:1 1 0%}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-title[_ngcontent-%COMP%]{margin:0;padding:8px 16px;background-color:#d3d3d3;font-weight:700;border-radius:3px 3px 0 0}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-list-item[_ngcontent-%COMP%]{height:56px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channel-list-item-info[_ngcontent-%COMP%]{padding:0 16px;height:56px}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channel-list-item-icon[_ngcontent-%COMP%]{margin-right:8px}.member-editor-channels[_ngcontent-%COMP%]   .channel-icon[_ngcontent-%COMP%]{margin-right:16px}.member-editor-channels[_ngcontent-%COMP%]   .channel-name[_ngcontent-%COMP%]{font-size:14px;font-weight:500;max-width:calc(100vw - 140px)}.member-editor-channels[_ngcontent-%COMP%]   .channel-user-role-name[_ngcontent-%COMP%]{color:#777;font-size:14px;max-width:calc(100vw - 140px)}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channel-list-item[_ngcontent-%COMP%]:last-of-type   .member-editor-channel-list-divider[_ngcontent-%COMP%]{display:none}.member-editor-channels[_ngcontent-%COMP%]   .member-editor-channels-add-button[_ngcontent-%COMP%]{margin-left:auto}.owner-container[_ngcontent-%COMP%]{border:1px solid rgba(0,0,0,.06);border-radius:5px;color:#00000061;padding:16px 8px 16px 10px;position:relative}.owner-container[_ngcontent-%COMP%]   .owner-label[_ngcontent-%COMP%]{background:#fff;display:block;font-size:16px;font-weight:400;left:-10px;padding:0 4px 0 10px;position:absolute;top:-12px;transform:scale(.75)}.owner-container[_ngcontent-%COMP%]   .mat-table[_ngcontent-%COMP%]{width:100%}.owner-container[_ngcontent-%COMP%]   .ih-info-panel[_ngcontent-%COMP%]{margin:16px}"],changeDetection:0})}return t})();export{Lt as a,Bt as b,bo as c};
2/**i18n:c9e569e2ecdb3e0de183c72d8315eadfdcb9da9e09d5ac2d9fef9056c1853e21*/

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.