1"use strict";(self.webpackChunkVeryConnect=self.webpackChunkVeryConnect||[]).push([[7040],{89150:(K,M,n)=>{n.d(M,{y:()=>e});var e=(()=>{return(m=e||(e={})).DONE="done",m.PENDING_ACTION="pending_action",e;var m})()},77040:(K,M,n)=>{n.r(M),n.d(M,{MemberTaskListModule:()=>Dt});var e=n(72922),u=n(60611),m=n(43632),C=n(87638),p=n(662),I=n(10174),t=n(14026),v=n(52805),y=n(10067),A=n(48921),J=n(50725),Z=n(3811),D=n(89150),E=n(15859),L=n(70460),U=n(74174),N=n(97482),d=n(49389),f=n(85960),a=n(63712),l=n(88886),_=n(89969),s=n(19807),T=n(3999),B=n(8592),P=n(64177),W=n(10218),G=n(4678),F=n(62441),$=n(50339),Q=n(64683),R=n(17789),r=n(11336);const g=["content"];function x(i,O){if(1&i&&(t.TgZ(0,"span",9),t._UZ(1,"span",10),t.TgZ(2,"span"),t._uU(3),t.ALo(4,"date"),t.qZA(),t._UZ(5,"time",11)(6,"span",10),t.qZA()),2&i){const o=t.oxw();t.xp6(1),t.Q6J("translate","assigned_start")("tr-placeholders",o.assignedPlaceholders),t.xp6(2),t.Oqu(t.xi3(4,6,o.task.assigned_at,"fullDate")),t.xp6(2),t.Q6J("tgMomentAgo",o.task.assigned_at),t.xp6(1),t.Q6J("translate","assigned_end")("tr-placeholders",o.assignedPlaceholders)}}function S(i,O){if(1&i&&t._UZ(0,"span",12),2&i){const o=t.oxw();t.Q6J("translate","assignedNoAssigned")("tr-placeholders",o.assignedPlaceholders)}}function k(i,O){if(1&i){const o=t.EpF();t.TgZ(0,"a",13),t.NdJ("click",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.showMore=!h.showMore)}),t.qZA()}if(2&i){const o=t.oxw();t.Q6J("translate",o.showMore?"showLess":"showMore")}}(0,B.applyGlobalStyle)("task-search-item","tg-panel-heading h4 {width: 100%}");let X=(()=>{class i{constructor(){this.disabled=!1,this.alertSvc=(0,t.f3M)(s.c),this.cdr=(0,t.f3M)(t.sBO),this.mtRes=(0,t.f3M)(a.f),this.routing=(0,t.f3M)(u.Z)}ngOnChanges(o){if(o.task){this.isUserTask=Boolean(this.task.user),this.detailsSref=`management.${this.isUserTask?"user":"group"}.tasks`,this.detailsParams={taskId:this.task.id},this.isUserTask?this.detailsParams.userId=l.SP.extractId(this.task.user):this.detailsParams.groupId=l.SP.extractId(this.task.group);const c={};if(this.task.assigned_by){const H=l.SP.extractEntity(this.task.assigned_by);c.assignedName=H.fullName,c.assignedLink=this.routing.href("addressbook.profile",{userId:H.id})}const h=l.SP.extractEntity(this.task.admin);c.adminName=h.fullName,c.adminLink=this.routing.href("addressbook.profile",{userId:h.id}),this.assignedPlaceholders=c,this.name=this.isUserTask?l.SP.extractEntity(this.task.user).fullName:l.SP.extractEntity(this.task.group).name,this.calculateNeedsShowMore()}}ngAfterViewInit(){this.calculateNeedsShowMore()}toggleState(){const o=this.task.state===D.y.DONE?D.y.PENDING_ACTION:D.y.DONE;this.mtRes.updateState({state:o,taskId:this.task.id}).pipe((0,_.b)(c=>{this.task=c,this.cdr.markForCheck()})).subscribe({error:this.alertSvc.negotiate,next:()=>{this.alertSvc.alertSuccess({key:`markedAs_${o}`,ns:"member-task"}),this.disabled=o===D.y.DONE}})}calculateNeedsShowMore(){this.needsShowMore=this.contentElement?.nativeElement.scrollHeight>this.contentElement?.nativeElement.clientHeight&&!this.showMore}}return i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-task-search-item"]],viewQuery:function(o,c){if(1&o&&t.Gf(g,5),2&o){let h;t.iGM(h=t.CRH())&&(c.contentElement=h.first)}},inputs:{task:"task"},standalone:!0,features:[t.TTD,t.jDz],decls:19,vars:24,consts:[["class","i18n-segmented assigned-at",4,"ngIf","ngIfElse"],["noAssignedAt",""],[1,"state-button","btn","btn-xs",3,"ngClass","translate","click"],[1,"data"],[1,"data","pull-right"],[1,"content"],["content",""],["class","show-more-button",3,"translate","click",4,"ngIf"],[1,"pull-right",3,"uiSref","uiParams","translate"],[1,"i18n-segmented","assigned-at"],[3,"translate","tr-placeholders"],[1,"braced",3,"tgMomentAgo"],[1,"assigned-at",3,"translate","tr-placeholders"],[1,"show-more-button",3,"translate","click"]],template:function(o,c){if(1&o&&(t.TgZ(0,"tg-panel")(1,"tg-panel-heading"),t.YNc(2,x,7,9,"span",0),t.YNc(3,S,1,2,"ng-template",null,1,t.W1O),t.TgZ(5,"button",2),t.NdJ("click",function(){return c.toggleState()}),t.qZA()(),t.TgZ(6,"tg-panel-body")(7,"strong",3),t._uU(8),t.ALo(9,"tr"),t.qZA(),t.TgZ(10,"strong",4),t._uU(11),t.ALo(12,"tr"),t.ALo(13,"date"),t.qZA(),t.TgZ(14,"span",5,6),t._uU(16),t.qZA(),t.YNc(17,k,1,1,"a",7),t._UZ(18,"a",8),t.qZA()()),2&o){const h=t.MAs(4);t.ekj("disabled",c.disabled),t.xp6(2),t.Q6J("ngIf",c.task.assigned_at)("ngIfElse",h),t.xp6(3),t.Q6J("ngClass",c.disabled?"btn-default":"btn-primary")("translate","markAs_"+c.task.state),t.xp6(3),t.AsE("",t.lcZ(9,17,c.isUserTask?"user":"group"),": ",c.name,""),t.xp6(3),t.AsE("",t.lcZ(12,19,"due"),": ",t.xi3(13,21,c.task.due,"fullDate"),""),t.xp6(3),t.ekj("show-less",!c.showMore),t.xp6(2),t.Oqu(c.task.notes||""),t.xp6(1),t.Q6J("ngIf",c.needsShowMore),t.xp6(1),t.Q6J("uiSref",c.detailsSref)("uiParams",c.detailsParams)("translate","viewDetails")}},dependencies:[E.GlobalModule,P.mk,P.O5,W.P,G.jl,G.Av,G.Nk,F.h,$.k,e.UISref,e.AnchorUISref,P.uU,Q.H,T.b,R.U,r.N],styles:['.panel.panel-default.disabled[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .panel.panel-default.disabled[_ngcontent-%COMP%] span[_ngcontent-%COMP%], .panel.panel-default.disabled[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:#7
177}.data[_ngcontent-%COMP%]{display:inline-block}.content[_ngcontent-%COMP%]{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.show-less[_ngcontent-%COMP%]{-webkit-line-clamp:1}.show-more-button[_ngcontent-%COMP%]{cursor:pointer}.panel-heading[_ngcontent-%COMP%]{align-items:center;display:flex;position:relative}.state-button[_ngcontent-%COMP%]{position:absolute;right:1em}.assigned-at[_ngcontent-%COMP%]{display:inline-block;font-size:14px;font-weight:400;width:calc(100% - 20ch)}@media (min-width:991px){tg-panel-heading[_ngcontent-%COMP%]{justify-content:center;text-align:center}.assigned-at[_ngcontent-%COMP%]{width:calc(100% - 35ch)}}.i18n-segmented[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:empty{display:none}.i18n-segmented[_ngcontent-%COMP%] > [_ngcontent-%COMP%]:not(:empty):after{content:" "}.i18n-segmented[_ngcontent-%COMP%] > .braced[_ngcontent-%COMP%]:not(:empty):after{content:") "}'],changeDetection:0}),i})();var z=n(7670),q=n(10319),tt=n(84416),et=n(49363),nt=n(26477),at=n(35974),ot=n(4247),st=n(75342),rt=n(54074),lt=n(76473),it=n(69494),ct=n(99092),dt=n(84773),Y=n(3814),pt=n(80499),ut=n(61958),ht=n(93902),mt=n(38207);function gt(i,O){if(1&i){const o=t.EpF();t.TgZ(0,"div",10)(1,"div",11)(2,"div",12,13)(4,"label",14)(5,"tg-info-bubble"),t._uU(6),t.ALo(7,"tr"),t.qZA(),t.TgZ(8,"span"),t._uU(9),t.ALo(10,"tr"),t.qZA()(),t.TgZ(11,"tg-user-id-search",15),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()(),t.TgZ(12,"div",12,16)(14,"label",14)(15,"tg-info-bubble"),t._uU(16),t.ALo(17,"tr"),t.qZA(),t.TgZ(18,"span"),t._uU(19),t.ALo(20,"tr"),t.qZA()(),t.TgZ(21,"tg-user-id-search",15),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()(),t.TgZ(22,"div",12,17)(24,"label",14)(25,"tg-info-bubble"),t._uU(26),t.ALo(27,"tr"),t.qZA(),t.TgZ(28,"span"),t._uU(29),t.ALo(30,"tr"),t.qZA()(),t.TgZ(31,"tg-group-id-search",15),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()()(),t.TgZ(32,"div",11)(33,"div",12,18)(35,"label",14)(36,"span"),t._uU(37),t.ALo(38,"tr"),t.qZA()(),t.TgZ(39,"tg-date-range-search",19),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()(),t.TgZ(40,"div",12,20)(42,"label",14)(43,"span"),t._uU(44),t.ALo(45,"tr"),t.qZA()(),t.TgZ(46,"tg-date-range-search",19),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()(),t.TgZ(47,"div",12,21)(49,"label",14)(50,"span"),t._uU(51),t.ALo(52,"tr"),t.qZA()(),t.TgZ(53,"tg-date-range-search",19),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA()()(),t.TgZ(54,"div",11)(55,"div",12,22)(57,"label",14)(58,"tg-info-bubble"),t._uU(59),t.ALo(60,"tr"),t.qZA(),t.TgZ(61,"span"),t._uU(62),t.ALo(63,"tr"),t.qZA()(),t.TgZ(64,"div",23)(65,"tg-dropdown-select",24),t.NdJ("touched",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.onTouch())}),t.qZA(),t.TgZ(66,"button",25),t.NdJ("click.passive",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.ctrl.controls.state.reset())}),t.qZA()()()()()}if(2&i){const o=t.MAs(3),c=t.MAs(13),h=t.MAs(23),H=t.MAs(34),j=t.MAs(41),w=t.MAs(48),V=t.MAs(56),b=t.oxw();t.Q6J("@slideUpOnExit",void 0)("@slideDownOnEntry",void 0),t.xp6(2),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",o.id),t.xp6(2),t.Oqu(t.lcZ(7,60,"adminTT")),t.xp6(3),t.Oqu(t.lcZ(10,62,"admin")),t.xp6(2),t.Q6J("controlId",o.id)("emitIds",!0)("formControl",b.ctrl.controls.admin),t.xp6(1),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",c.id),t.xp6(2),t.Oqu(t.lcZ(17,64,"userTT")),t.xp6(3),t.Oqu(t.lcZ(20,66,"user")),t.xp6(2),t.Q6J("controlId",c.id)("emitIds",!0)("formControl",b.ctrl.controls.user),t.xp6(1),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",h.id),t.xp6(2),t.Oqu(t.lcZ(27,68,"groupTT")),t.xp6(3),t.Oqu(t.lcZ(30,70,"group")),t.xp6(2),t.Q6J("controlId",h.id)("emitIds",!0)("formControl",b.ctrl.controls.group),t.xp6(2),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",H.id),t.xp6(2),t.Oqu(t.lcZ(38,72,"createdAt")),t.xp6(2),t.Q6J("controlId",H.id)("formControl",b.ctrl.controls.createdAt)("startDate",!0)("endDate",!0),t.xp6(1),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",j.id),t.xp6(2),t.Oqu(t.lcZ(45,74,"dueDate")),t.xp6(2),t.Q6J("controlId",j.id)("formControl",b.ctrl.controls.due)("startDate",!0)("endDate",!0),t.xp6(1),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",w.id),t.xp6(2),t.Oqu(t.lcZ(52,76,"updatedDate")),t.xp6(2),t.Q6J("controlId",w.id)("formControl",b.ctrl.controls.updatedAt)("startDate",!0)("endDate",!0),t.xp6(2),t.Q6J("ngClass",b.tileClass)("autoId",!1),t.xp6(2),t.Q6J("for",V.id),t.xp6(2),t.Oqu(t.lcZ(60,78,"stateTT")),t.xp6(3),t.Oqu(t.lcZ(63,80,"state")),t.xp6(3),t.Q6J("controlId",V.id)("items",b.states)("multi",!0)("formControl",b.ctrl.controls.state),t.xp6(1),t.Q6J("disabled",b.disabled)}}let _t=(()=>{class i extends lt.S{constructor(){if(super(),this.advancedShown=!1,this.tileClass=["col-sm-6","col-md-4","col-xs-12"],!this.states){const o=(0,t.f3M)(rt.D);i.prototype.states=Object.values(D.y).map(c=>({label:o.translate(`state_${c}`,"member-task"),value:c}))}}toggleAdvancedShown(){this.advancedShown=!this.advancedShown}createCtrl(){return this.fb.group({admin:this.fb.control(null),content:this.fb.control(null),createdAt:this.fb.control(null),due:this.fb.control(null),group:this.fb.control(null),state:this.fb.control(null),updatedAt:this.fb.control(null),user:this.fb.control(null)})}}return i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-member-task-search"]],hostVars:2,hostBindings:function(o,c){2&o&&t.ekj("row",!0)},inputs:{advancedShown:"advancedShown"},standalone:!0,features:[t._Bn([{multi:!0,provide:v.JU,useExisting:(0,t.Gpc)(()=>i)}]),t.qOj,t.jDz],decls:12,vars:9,consts:[[3,"formGroup"],[1,"col-xs-12"],[1,"input-group","nav-justified"],[1,"form-control",3,"formControl","placeholder","blur.passive"],[1,"input-group-btn"],[1,"btn-default",3,"tg-clear-button","click.passive"],["type","button",1,"btn","btn-default",3,"disabled","click.passive"],[1,"hidden-sm","hidden-xs",3,"translate"],[3,"direction"],["class","well",4,"ngIf"],[1,"well"],[1,"row"],[1,"form-group",3,"ngClass","autoId"],["idAdmin","id"],[3,"for"],[3,"controlId","emitIds","formControl","touched"],["idUser","id"],["idGroup","id"],["idCreatedAt","id"],[1,"form-group",3,"controlId","formControl","startDate","endDate","touched"],["idDueDate","id"],["idUpdatedDate","id"],["idState","id"],[1,"flex-container"],[3,"controlId","items","multi","formControl","touched"],[1,"btn","btn-default",3,"tg-clear-button","disabled","click.passive"]],template:function(o,c){1&o&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"input",3),t.NdJ("blur.passive",function(){return c.onTouch()}),t.ALo(4,"tr"),t.qZA(),t.TgZ(5,"div",4)(6,"button",5),t.NdJ("click.passive",function(){return c.ctrl.controls.content.reset()}),t.qZA()(),t.TgZ(7,"div",4)(8,"button",6),t.NdJ("click.passive",function(){return c.toggleAdvancedShown()}),t._UZ(9,"span",7)(10,"tg-caret",8),t.qZA()()(),t.YNc(11,gt,67,82,"div",9),t.qZA()()),2&o&&(t.Q6J("formGroup",c.ctrl),t.xp6(3),t.Q6J("formControl",c.ctrl.controls.content)("placeholder",t.lcZ(4,7,"ph")),t.xp6(5),t.Q6J("disabled",!c.advancedShown&&c.disabled),t.xp6(1),t.Q6J("translate","advanced"),t.xp6(1),t.Q6J("direction",c.advancedShown?"up":"down"),t.xp6(1),t.Q6J("ngIf",c.advancedShown))},dependencies:[et.m,at.h,it.y,E.GlobalModule,P.mk,P.O5,ct.X,dt.s,W.P,Y.u0,Y.k6,F.h,pt._,ut.y,Q.H,ot.w,ht.u,v.Fj,v.JJ,v.JL,v.oH,v.sg,nt.d,v.UX,tt.K,st.X,mt.k],styles:["[_nghost-%COMP%]{display:block;margin-bottom:1em}.form-group[_ngcontent-%COMP%] .flex-container[_ngcontent-%COMP%]{display:flex;flex-direction:row;flex-wrap:nowrap}.form-group[_ngcontent-%COMP%] tg-dropdown-select[_ngcontent-%COMP%]{width:100%}"],data:{animation:[z.Y,q.b]},changeDetection:0}),i})();var ft=n(78798),vt=n(22009),Ct=n(65624),Tt=n(74647);function Mt(i,O){1&i&&(t.TgZ(0,"tg-loader-spinner-lg"),t._uU(1),t.ALo(2,"tr"),t.qZA()),2&i&&(t.xp6(1),t.Oqu(t.xi3(2,1,"loading","common")))}function It(i,O){1&i&&t._UZ(0,"tg-task-search-item",8),2&i&&t.Q6J("task",O.$implicit)}function Ot(i,O){1&i&&(t.TgZ(0,"div",9),t._UZ(1,"tg-loader-spinner-lg"),t.qZA())}function yt(i,O){if(1&i&&(t.TgZ(0,"div",10),t._UZ(1,"div",11),t.qZA()),2&i){const o=t.oxw(2);t.xp6(1),t.Q6J("translate",o.tasks.length?"noMoreTasks":"noTasks")}}
1function Et(i,O){if(1&i){const o=t.EpF();t.TgZ(0,"div",3),t.NdJ("scrolled",function(){t.CHM(o);const h=t.oxw();return t.KtG(h.scroller.scrolled())}),t.YNc(1,It,1,1,"tg-task-search-item",4),t.qZA(),t.TgZ(2,"div",5),t.YNc(3,Ot,2,0,"div",6),t.YNc(4,yt,2,1,"div",7),t.qZA()}if(2&i){const o=t.oxw();t.Q6J("immediateCheck",!0)("scrollWindow",!0)("infiniteScrollDistance",1)("infiniteScrollDisabled",o.busy||o.done),t.xp6(1),t.Q6J("ngForOf",o.tasks)("ngForTrackBy",o.TRACK_BY_ID),t.xp6(2),t.Q6J("ngIf",o.busy),t.xp6(1),t.Q6J("ngIf",o.done)}}const xt=[{abstract:!0,component:C.qU,name:"tasks",resolve:[m.w],url:"/tasks"},{component:(()=>{class i{constructor(){this.scroller=(0,t.f3M)(d.TgInfiniteScroller),this.TRACK_BY_ID=f.trackById,this.cdr=(0,t.f3M)(t.sBO),this.fb=(0,t.f3M)(v.qu),this.loggedInUser=(0,t.f3M)(U.Ej),this.mtRes=(0,t.f3M)(a.f)}ngOnDestroy(){this._sub.unsubscribe()}ngOnInit(){this.busy=this.done=!1,this.searchCtrl=this.fb.control({admin:this.loggedInUser.id,content:"",createdAt:"",due:"",group:"",state:D.y.PENDING_ACTION,updatedAt:"",user:""}),this.scroller.useCursor(!1).setCallable(o=>this.mtRes.query({params:{limit:25,...o}})),this.scroller.alertOnErrors(),this.scroller.mirrorDoneBusy(this.cdr,this,"busy","done"),this._sub=this.searchCtrl.valueChanges.pipe((0,y.b)(250),(0,A.O)(this.searchCtrl.value),(0,J.U)(o=>o||{}),(0,I.p)(),(0,Z.w)(o=>this.scroller.setParams(o).getData(25))).subscribe((0,p.e)(o=>{this.tasks=o,this.cdr.markForCheck()}))}}return i.\u0275fac=function(o){return new(o||i)},i.\u0275cmp=t.Xpm({type:i,selectors:[["tg-my-tasks-list"]],standalone:!0,features:[t._Bn([],[{provide:N.z,useValue:"member-task"},d.TgInfiniteScroller]),t.jDz],decls:4,vars:4,consts:[[3,"formControl","advancedShown"],[3,"ngIf","ngIfElse"],["dataLoadedTpl",""],["infiniteScroll","",3,"immediateCheck","scrollWindow","infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[3,"task",4,"ngFor","ngForOf","ngForTrackBy"],[1,"row"],["class","col-xs-12",4,"ngIf"],["class","col-xs-12 text-center",4,"ngIf"],[3,"task"],[1,"col-xs-12"],[1,"col-xs-12","text-center"],[1,"alert","alert-info",3,"translate"]],template:function(o,c){if(1&o&&(t._UZ(0,"tg-member-task-search",0),t.YNc(1,Mt,3,4,"ng-template",1),t.YNc(2,Et,5,8,"ng-template",null,2,t.W1O)),2&o){const h=t.MAs(3);t.Q6J("formControl",c.searchCtrl)("advancedShown",!0),t.xp6(1),t.Q6J("ngIf",!c.tasks)("ngIfElse",h)}},dependencies:[E.GlobalModule,P.sg,P.O5,W.P,ft.Z,vt.a,Q.H,v.UX,v.JJ,v.oH,_t,X,L.TgInfiniteScrollModule,Ct.N,Tt.Ry],styles:[".mb-3[_ngcontent-%COMP%]{margin-bottom:1rem}"],changeDetection:0}),i})(),name:"tasks.my",url:"/my"}];let Dt=(()=>{class i{}return i.\u0275fac=function(o){return new(o||i)},i.\u0275mod=t.oAB({type:i}),i.\u0275inj=t.cJS({imports:[e.UIRouterModule.forChild({config:u.Z.config(xt)})]}),i})()},49242:(K,M,n)=>{n.d(M,{s:()=>F});var e=n(64762),u=n(88990),m=n(662),C=n(5296),p=n(14026),I=n(52805),t=n(61029);var A=n(72335),J=n(25989),Z=n(9803),D=n(8194),E=n(25336),L=n(3811),U=n(50725),N=n(60407),d=n(48921),f=n(89969),a=n(35673),l=n(87563),_=n(42809),s=n(10066),T=n(83375),B=n(93327),P=n(58322),W=n(85960),G=n(70486);class F extends B.v{constructor(){super(),this.TRACK_BY_ID=W.trackById,this.emitIds=!1,this.multi=!0,this.selected$=new p.vpe,this.fb=(0,p.f3M)(I.QS)}get value(){return this._value$.value}set value(r){(function v(R,r,g){var x=(g="function"==typeof g?g:void 0)?g(R,r):void 0;return void 0===x?(0,t.Z)(R,r,void 0,g):!!x})(r,this.value,$)||this._value$.next(r)}ngOnDestroy(){this.selected$.complete(),this._value$&&(0,T.completeAll)(this._value$,this._writeValue$)}ngOnInit(){this._value$=new Z.X([]),this._writeValue$=new D.x,this.ctrlInp=this.fb.control(null),this.tokens=[],this._selectedIds=new Set,this._responseCache=new Map,this.typeahead$=new P.Z({debounceTime:200,getParams:()=>this.ctrlInp.value?.trim()??"",query:r=>this.fetch(r)}).pipe((0,L.w)(r=>this._value$.pipe((0,U.U)(()=>r.filter(this.filterTypeahead,this)))),(0,L.w)(r=>this.selected$.pipe((0,N.q)(1),(0,U.U)(()=>[]),(0,d.O)(r)))),this._writeValue$.pipe((0,U.U)(r=>r?Array.isArray(r)?r:[r]:[]),(0,L.w)(r=>{if(!r.length)return(0,E.of)([]);const g=r.filter(this.isResponse,this);if(g.length===r.length)return(0,E.of)(g);const x=r.filter(s.K);return x.length?this.fetchIdsWithCache(x).pipe((0,U.U)(S=>(0,A.Z)([...g,...S],"id"))):(0,E.of)(g)}),(0,C.H)("[AbstractIdSearch.writeValue$]")).subscribe((0,m.e)(r=>{if(r.length){this._selectedIds=new Set;for(const g of r)this._selectedIds.add(g.id)}else this._selectedIds.clear();this.value=r})),this._value$.pipe((0,f.b)(r=>{this.tokens=r,this.cdr.markForCheck()}),(0,a.T)(1)).subscribe(r=>{this._onChangeFn(this.emitIds?this.multi?r.map(Q):Q(r[0]):this.multi?r:r[0])})}rm(r){const g=r.id;this._selectedIds.delete(g);const x=this.value.findIndex(S=>S.id===g);if(-1!==x){const S=[...this.value];
1S.splice(x,1),this.value=S}this.onTouch()}selected(r){const g=r.item;this._selectedIds.has(g.id)||(this._selectedIds.add(g.id),this.value=[...this.value,g],this.selected$.emit(g)),this.ctrlInp.reset(),this.onTouch()}setDisabledState(r){r!==this.ctrlInp.disabled&&(r?this.ctrlInp.disable():this.ctrlInp.enable(),this.cdr.detectChanges())}writeValue(r){this._writeValue$.next(r)}filterTypeahead(r){return!this._selectedIds.has(r.id)}fetch(r){return r?this.doFetch(r).pipe((0,f.b)(g=>{for(const x of g)this._responseCache.set(x.id,x)}),(0,C.H)(`[${this.conf.logLabel}.fetch(${r})]`),(0,l.K)(()=>(this.fetch[u.y7]?.delete(r),(0,E.of)([]))),(0,_.d)(1)):(0,E.of)([])}fetchIdsWithCache(r){const g=[],x=r.filter(S=>{const k=this._responseCache.get(S);return!k||(g.push(k),!1)});return x.length?this.fetchIds(x).pipe((0,U.U)(S=>{if(S.length){for(const k of S)this._responseCache.set(k.id,k);g.push(...S)}return g})):(0,E.of)(g)}}function $(R,r){if(R&&r&&!Array.isArray(R)&&!Array.isArray(r))return R.id===r.id}function Q(R){return R.id}F.\u0275fac=function(r){return new(r||F)},F.\u0275dir=p.lG2({type:F,contentQueries:function(r,g,x){if(1&r&&p.Suo(x,G.h,5),2&r){let S;p.iGM(S=p.CRH())&&(g.itemTemplate=S.first)}},inputs:{emitIds:"emitIds",multi:"multi"},outputs:{selected$:"selected"},features:[p.qOj]}),(0,e.gn)([(0,u.qQ)(J.Z)],F.prototype,"fetch",null)},50031:(K,M,n)=>{n.d(M,{I:()=>C});var e=n(52805),u=n(36818),m=n(14026);let C=(()=>{class p{}return p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=m.oAB({type:p}),p.\u0275inj=m.cJS({imports:[e.UX,u.H3,e.UX,u.H3]}),p})()},70486:(K,M,n)=>{n.d(M,{h:()=>m});var e=n(49731),u=n(14026);let m=(()=>{class C extends e.TemplateContainer{}return C.\u0275fac=function(){let p;return function(t){return(p||(p=u.n5z(C)))(t||C)}}(),C.\u0275dir=u.lG2({type:C,selectors:[["","idSearchItem",""]],features:[u.qOj]}),C})()},69494:(K,M,n)=>{n.d(M,{y:()=>N});var e=n(14026),u=n(52805),m=n(87399),p=n(25497),I=n(92362),t=n(54074),v=n(64177),y=n(99092),A=n(4087),J=n(81117),Z=n(47946),D=n(16838);function E(l,_){if(1&l){const s=e.EpF();e.TgZ(0,"tg-clearable-input",2)(1,"tg-datepicker",3),e.NdJ("ngModelChange",function(B){e.CHM(s);const P=e.oxw(2);return e.KtG(P.onFieldChange("start",B))}),e.qZA()()}if(2&l){const s=e.oxw(2);e.Q6J("disabled",s.disabled),e.xp6(1),e.Q6J("controlId",s.controlId)("ngModel",s.start)("placeholder",s.placeholders.start)("timezone","UTC")("disabled",s.disabled)("ngModelOptions",s.MODEL_OPTS)}}function L(l,_){if(1&l){const s=e.EpF();e.TgZ(0,"tg-clearable-input",2)(1,"tg-datepicker",3),e.NdJ("ngModelChange",function(B){e.CHM(s);const P=e.oxw(2);return e.KtG(P.onFieldChange("end",B))}),e.qZA()()}if(2&l){const s=e.oxw(2);e.Q6J("disabled",s.disabled),e.xp6(1),e.Q6J("controlId",s.controlIdEnd)("ngModel",s.end)("placeholder",s.placeholders.end)("timezone","UTC")("disabled",s.disabled)("ngModelOptions",s.MODEL_OPTS)}}function U(l,_){if(1&l&&(e.YNc(0,E,2,7,"tg-clearable-input",1),e.YNc(1,L,2,7,"tg-clearable-input",1)),2&l){const s=e.oxw();e.Q6J("ngIf",s.startDate),e.xp6(1),e.Q6J("ngIf",s.endDate)}}let N=(()=>{class l extends I.k{constructor(s,T){super(),this.tr=s,this.controlIdConsumer=T,this.dateName="date",this.endDate=!1,this.show=!1,this.startDate=!1,this.useGenericPlaceholder=!0}ngOnChanges(s){const T="endDate"in s,B="startDate"in s;let P=!1;(T||B)&&(this.show=this.startDate||this.endDate,this.label=this.getLabel(),T&&!this.endDate&&this.end&&(P=!0,this.end=null),B&&!this.startDate&&this.start&&(P=!0,this.start=null)),(T||B||"useGenericPlaceholder"in s||"placeholderStartIn"in s||"placeholderEndIn"in s)&&(this.placeholders={end:this.placeholderEndIn||this.placeholderIn||this.getPlaceholder("_end"),start:this.placeholderStartIn||this.placeholderIn||this.getPlaceholder("_start")}),(B||"controlId"in s)&&(this.controlIdEnd=this.startDate?"":this.controlId),P&&this.onChange(this.toString()||null)}ngOnInit(){this.label||(this.label=this.getLabel()),this.value="",this.controlIdConsumer.markAsConsumed()}normaliseWriteValue(s){if("string"==typeof s){const T=function d(l){const _={date_range_end:null,date_range_start:null};if(l){const[s,T]=l.split("|");_.date_range_start=s?m.utc(s).toDate():null,_.date_range_end=T?m.utc(T).toDate():null}return _}(s);return this.start=T.date_range_start,this.end=T.date_range_end,s}return function a(l){if(!l)return!1;const{date_range_start:_,date_range_end:s}=l;return(null===_||_ instanceof Date)&&(null===s||s instanceof Date)}(s)?(this.start=s.date_range_start,this.end=s.date_range_end,this.toString()):(this.start=this.end=null,"")}onFieldChange(s,T){this[s]=T,this.onChange(this.toString()||null)}toString(){return this.start||this.end?`${f(this.start)}|${f(this.end)}`:""}getLabel(){return`label${this.getTypeOfField()}`}getPlaceholder(s){return this.tr.translate(!this.useGenericPlaceholder||this.startDate&&this.endDate?`placeholder${s}`:"placeholder","date-range-search")}getTypeOfField(){return this.startDate&&this.endDate?"":this.startDate?"_start":"_end"}}return l.\u0275fac=function(s){return new(s||l)(e.Y36(t.D),e.Y36(p.E))},l.\u0275cmp=e.Xpm({type:l,selectors:[["tg-date-range-search"]],hostVars:2,hostBindings:function(s,T){2&s&&e.ekj("tg-input-error-boundary",!0)},inputs:{controlId:"controlId",dateName:"dateName",endDate:"endDate",placeholderEndIn:["placeholderEnd","placeholderEndIn"],placeholderIn:["placeholder","placeholderIn"],placeholderStartIn:["placeholderStart","placeholderStartIn"],startDate:"startDate",useGenericPlaceholder:"useGenericPlaceholder"},features:[e._Bn([{multi:!0,provide:u.JU,useExisting:(0,e.Gpc)(()=>l)},p.E]),e.qOj,e.TTD],decls:1,vars:1,consts:[[3,"ngIf"],[3,"disabled",4,"ngIf"],[3,"disabled"],[3,"controlId","ngModel","placeholder","timezone","disabled","ngModelOptions","clearable-input-target","ngModelChange"]],template:function(s,T){1&s&&e.YNc(0,U,2,2,"ng-template",0),2&s&&e.Q6J("ngIf",T.show)},dependencies:[v.O5,y.X,u.JJ,u.On,A.W,J.e,Z.X,D.s],styles:["[_nghost-%COMP%]{display:block}tg-datepicker[_ngcontent-%COMP%]{width:100%}"],changeDetection:0}),l})();function f(l){return l?.toISOString()||""}},35974:(K,M,n)=>{n.d(M,{h:()=>y});var e=n(52805),u=n(15859),m=n(79903),C=n(80919),p=n(59718),t=(n(69494),n(14026));let y=(()=>{class A{}return A.\u0275fac=function(Z){return new(Z||A)},A.\u0275mod=t.oAB({type:A}),A.\u0275inj=t.cJS({imports:[u.GlobalModule,e.u5,m.g,C.D,p.f]}),A})()},93902:(K,M,n)=>{n.d(M,{u:()=>N});
1var e=n(14026),u=n(52805),m=n(97482),C=n(49242),p=n(75263),I=n(64177),t=n(61225),v=n(38674),y=n(4678),A=n(36818),J=n(64683);function Z(d,f){if(1&d&&e._uU(0),2&d){const a=f.item,l=e.oxw();e.Oqu(a[l.conf.typeaheadOptionField])}}function D(d,f){if(1&d){const a=e.EpF();e.TgZ(0,"input",3),e.NdJ("blur.passive",function(){e.CHM(a);const _=e.oxw();return e.KtG(_.onTouch())})("typeaheadOnSelect",function(_){e.CHM(a);const s=e.oxw();return e.KtG(s.selected(_))}),e.ALo(1,"tr"),e.qZA()}if(2&d){const a=e.oxw(),l=e.MAs(1);e.Q6J("tgConsumeControlId","id")("formControl",a.ctrlInp)("autocomplete","off")("typeahead",a.typeahead$)("typeaheadAsync",!0)("isAnimated",!1)("typeaheadMinLength",0)("typeaheadItemTemplate",(null==a.itemTemplate?null:a.itemTemplate.template)||l)("typeaheadOptionField",a.conf.typeaheadOptionField)("container","body")("typeaheadLatinize",!0)("placeholder",e.lcZ(1,12,a.conf.placeholder))}}const E=function(d){return{item:d}};function L(d,f){if(1&d){const a=e.EpF();e.TgZ(0,"div",6)(1,"div")(2,"div"),e.GkF(3,7),e.qZA(),e.TgZ(4,"div",8),e.NdJ("click.passive",function(){const s=e.CHM(a).$implicit,T=e.oxw(2);return e.KtG(T.rm(s))}),e._UZ(5,"i",9),e.ALo(6,"tr"),e.qZA()()()}if(2&d){const a=f.$implicit,l=e.oxw(2),_=e.MAs(1);e.xp6(3),e.Q6J("ngTemplateOutlet",(null==l.itemTemplate?null:l.itemTemplate.template)||_)("ngTemplateOutletContext",e.VKq(6,E,a)),e.xp6(2),e.uIk("aria-label",e.xi3(6,3,"remove","common"))}}function U(d,f){if(1&d&&(e.TgZ(0,"tg-panel")(1,"tg-panel-body")(2,"div",4),e.YNc(3,L,7,8,"div",5),e.qZA()()()),2&d){const a=e.oxw();e.xp6(3),e.Q6J("ngForOf",a.tokens)("ngForTrackBy",a.TRACK_BY_ID)}}let N=(()=>{class d extends C.s{constructor(a){super(),this.grRes=a,this.conf={logLabel:"GroupIdSearch",placeholder:"placeholder",typeaheadOptionField:"name"},this.showLock=!0}
1doFetch(a){return this.grRes.query({params:{name:a}})}fetchIds(a){return this.grRes.query({params:{id:a}})}isResponse(a){return this.grRes.isResponse(a)}}return d.\u0275fac=function(a){return new(a||d)(e.Y36(p.m))},d.\u0275cmp=e.Xpm({type:d,selectors:[["tg-group-id-search"]],inputs:{showLock:"showLock"},features:[e._Bn([{provide:m.z,useValue:"group-id-search"},{multi:!0,provide:u.JU,useExisting:(0,e.Gpc)(()=>d)}]),e.qOj],decls:4,vars:2,consts:[["defaultTpl",""],["class","form-control",3,"tgConsumeControlId","formControl","autocomplete","typeahead","typeaheadAsync","isAnimated","typeaheadMinLength","typeaheadItemTemplate","typeaheadOptionField","container","typeaheadLatinize","placeholder","blur.passive","typeaheadOnSelect",4,"ngIf"],[4,"ngIf"],[1,"form-control",3,"tgConsumeControlId","formControl","autocomplete","typeahead","typeaheadAsync","isAnimated","typeaheadMinLength","typeaheadItemTemplate","typeaheadOptionField","container","typeaheadLatinize","placeholder","blur.passive","typeaheadOnSelect"],[1,"item-containers"],["class","item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"item-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-muted","small",3,"click.passive"],["aria-hidden","false","role","button",1,"fa","fa-times"]],template:function(a,l){1&a&&(e.YNc(0,Z,1,1,"ng-template",null,0,e.W1O),e.YNc(2,D,2,14,"input",1),e.YNc(3,U,4,2,"tg-panel",2)),2&a&&(e.xp6(2),e.Q6J("ngIf",l.multi||!l.tokens.length),e.xp6(1),e.Q6J("ngIf",l.tokens.length))},dependencies:[I.sg,I.O5,I.tP,t.c,v.r,y.jl,y.Av,u.Fj,u.JJ,u.oH,A.Bp,J.H],styles:["[_nghost-%COMP%]{display:inline}.item-containers[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:wrap}.item-container[_ngcontent-%COMP%]{border-collapse:collapse;display:inline-table;margin:2px}.item-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-row}.item-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:1px solid #ccc;display:table-cell;padding:2px;vertical-align:middle}.text-muted.small[_ngcontent-%COMP%]{cursor:pointer}tg-panel-body[_ngcontent-%COMP%]{padding:2px}"],changeDetection:0}),d})()},4247:(K,M,n)=>{n.d(M,{w:()=>C});var e=n(15859),u=n(50031),m=n(14026);let C=(()=>{class p{}return p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=m.oAB({type:p}),p.\u0275inj=m.cJS({imports:[e.GlobalModule,u.I,u.I]}),p})()},38207:(K,M,n)=>{n.d(M,{k:()=>N});var e=n(14026),u=n(52805),m=n(97482),C=n(49242),p=n(47528),I=n(64177),t=n(61225),v=n(38674),y=n(4678),A=n(36818),J=n(64683);function Z(d,f){if(1&d&&e._uU(0),2&d){const a=f.item,l=e.oxw();e.Oqu(a[l.conf.typeaheadOptionField])}}function D(d,f){if(1&d){const a=e.EpF();e.TgZ(0,"input",3),e.NdJ("blur.passive",function(){e.CHM(a);const _=e.oxw();return e.KtG(_.onTouch())})("typeaheadOnSelect",function(_){e.CHM(a);const s=e.oxw();return e.KtG(s.selected(_))}),e.ALo(1,"tr"),e.qZA()}if(2&d){const a=e.oxw(),l=e.MAs(1);e.Q6J("tgConsumeControlId","id")("formControl",a.ctrlInp)("autocomplete","off")("typeahead",a.typeahead$)("typeaheadAsync",!0)("isAnimated",!1)("typeaheadMinLength",0)("typeaheadItemTemplate",(null==a.itemTemplate?null:a.itemTemplate.template)||l)("typeaheadOptionField",a.conf.typeaheadOptionField)("container","body")("typeaheadLatinize",!0)("placeholder",e.lcZ(1,12,a.conf.placeholder))}}const E=function(d){return{item:d}};function L(d,f){if(1&d){const a=e.EpF();e.TgZ(0,"div",6)(1,"div")(2,"div"),e.GkF(3,7),e.qZA(),e.TgZ(4,"div",8),e.NdJ("click.passive",function(){const s=e.CHM(a).$implicit,T=e.oxw(2);return e.KtG(T.rm(s))}),e._UZ(5,"i",9),e.ALo(6,"tr"),e.qZA()()()}if(2&d){const a=f.$implicit,l=e.oxw(2),_=e.MAs(1);e.xp6(3),e.Q6J("ngTemplateOutlet",(null==l.itemTemplate?null:l.itemTemplate.template)||_)("ngTemplateOutletContext",e.VKq(6,E,a)),e.xp6(2),e.uIk("aria-label",e.xi3(6,3,"remove","common"))}}function U(d,f){if(1&d&&(e.TgZ(0,"tg-panel")(1,"tg-panel-body")(2,"div",4),e.YNc(3,L,7,8,"div",5),e.qZA()()()),2&d){const a=e.oxw();e.xp6(3),e.Q6J("ngForOf",a.tokens)("ngForTrackBy",a.TRACK_BY_ID)}}let N=(()=>{class d extends C.s{constructor(a){super(),this.uRes=a,this.conf={logLabel:"UserIdSearch",placeholder:"byIdPlaceholder",typeaheadOptionField:"fullName"}}doFetch(a){return this.uRes.query({params:{name:a}})}fetchIds(a){return this.uRes.query({params:{ids:a}})}
1isResponse(a){return this.uRes.isResponse(a)}}return d.\u0275fac=function(a){return new(a||d)(e.Y36(p.q))},d.\u0275cmp=e.Xpm({type:d,selectors:[["tg-user-id-search"]],features:[e._Bn([{provide:m.z,useValue:"user-search"},{multi:!0,provide:u.JU,useExisting:(0,e.Gpc)(()=>d)}]),e.qOj],decls:4,vars:2,consts:[["defaultTpl",""],["class","form-control",3,"tgConsumeControlId","formControl","autocomplete","typeahead","typeaheadAsync","isAnimated","typeaheadMinLength","typeaheadItemTemplate","typeaheadOptionField","container","typeaheadLatinize","placeholder","blur.passive","typeaheadOnSelect",4,"ngIf"],[4,"ngIf"],[1,"form-control",3,"tgConsumeControlId","formControl","autocomplete","typeahead","typeaheadAsync","isAnimated","typeaheadMinLength","typeaheadItemTemplate","typeaheadOptionField","container","typeaheadLatinize","placeholder","blur.passive","typeaheadOnSelect"],[1,"item-containers"],["class","item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"item-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"text-muted","small",3,"click.passive"],["aria-hidden","false","role","button",1,"fa","fa-times"]],template:function(a,l){1&a&&(e.YNc(0,Z,1,1,"ng-template",null,0,e.W1O),e.YNc(2,D,2,14,"input",1),e.YNc(3,U,4,2,"tg-panel",2)),2&a&&(e.xp6(2),e.Q6J("ngIf",l.multi||!l.tokens.length),e.xp6(1),e.Q6J("ngIf",l.tokens.length))},dependencies:[I.sg,I.O5,I.tP,t.c,v.r,y.jl,y.Av,u.Fj,u.JJ,u.oH,A.Bp,J.H],styles:["[_nghost-%COMP%]{display:inline}.item-containers[_ngcontent-%COMP%]{display:flex;flex:1 1 auto;flex-direction:row;flex-wrap:wrap}.item-container[_ngcontent-%COMP%]{border-collapse:collapse;display:inline-table;margin:2px}.item-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:table-row}.item-container[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{border:1px solid #ccc;display:table-cell;padding:2px;vertical-align:middle}.text-muted.small[_ngcontent-%COMP%]{cursor:pointer}tg-panel-body[_ngcontent-%COMP%]{padding:2px}"],changeDetection:0}),d})()},75342:(K,M,n)=>{n.d(M,{X:()=>C});var e=n(15859),u=n(50031),m=n(14026);let C=(()=>{class p{}return p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=m.oAB({type:p}),p.\u0275inj=m.cJS({imports:[e.GlobalModule,u.I,u.I]}),p})()},58322:(K,M,n)=>{n.d(M,{Z:()=>I});var e=n(82668),m=n(98411),C=n(15449),p=n(3811);class I extends m.y{constructor(y){const{getParams:A,paramsEqual:J=t,query:Z,debounceTime:D}=y;let E,L,U=!1;super(function(d){const f=A();return U&&J(f,L)?(0,e.t)(d,E):(D?(0,C.H)(D).pipe((0,p.w)(()=>Z(f))):Z(f)).subscribe(function u(v,y){return{complete:v.complete.bind(v),error:v.error.bind(v),next:y}}(d,a=>{U=!0,E=a,L=f,d.next(a)}))})}}function t(v,y){return v===y}}}]);
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.