(self.webpackChunkworklenz=self.webpackChunkworklenz||[]).push([[422],{40844:(r1,S0,s)=>{"use strict";s.d(S0,{w:()=>c0});var M=s(15861),e=s(16976),c=s(42840),n=s(96814),J=s(24139),B=s(82669),g=s(81221),v=s(20824),N=s(9172),S=s(55695),E=s(96109),t=s(94489),v0=s(78645),a0=s(59773),I=s(73460),n0=s(60095),f0=s(62595),H=s(65879),j0=s(78027),Z0=s(34554),R0=s(55416),p1=s(86947),T0=s(975),D0=s(25335),A0=s(32333),Z=s(70855);function p0(b0,E0){if(1&b0&&(H.ynx(0),H.TgZ(1,"div",10),H._UZ(2,"nz-spin",11),H.qZA(),H.BQk()),2&b0){H.oxw(2);const B0=H.MAs(4);H.xp6(2),H.Q6J("nzIndicator",B0)}}function Q(b0,E0){if(1&b0){const B0=H.EpF();H.TgZ(0,"div",15),H.NdJ("click",function(z1){H.CHM(B0);const Q0=H.oxw().index,x0=H.oxw(2);return H.KtG(x0.toggleGroup(z1,Q0))}),H._UZ(1,"span",16),H._uU(2),H.qZA()}if(2&b0){const B0=H.oxw(),U0=B0.$implicit,z1=B0.index,Q0=H.oxw(2);H.Udp("background",U0.color_code),H.ekj("active",Q0.isExpanded[z1]),H.xp6(2),H.hij(" ",U0.name," ")}}function V(b0,E0){if(1&b0){const B0=H.EpF();H.TgZ(0,"li",23),H.NdJ("click",function(){H.CHM(B0);const z1=H.oxw().$implicit,Q0=H.oxw(2).$implicit,x0=H.oxw(2);return H.KtG(x0.convertToSubTask(Q0.id,z1.id))}),H.TgZ(1,"div",24)(2,"div",25)(3,"nz-tag",26),H._uU(4),H.qZA()(),H.TgZ(5,"div",27)(6,"span",28),H._uU(7),H.qZA()()()()}if(2&b0){const B0=H.oxw().$implicit;H.xp6(3),H.Q6J("nzTooltipTitle",B0.task_key),H.xp6(1),H.Oqu(B0.task_key),H.xp6(1),H.Q6J("nzTooltipTitle",B0.name),H.xp6(2),H.Oqu(B0.name)}}function r0(b0,E0){if(1&b0&&(H.ynx(0),H.YNc(1,V,8,4,"li",22),H.BQk()),2&b0){const B0=E0.$implicit,U0=H.oxw(4);H.xp6(1),H.Q6J("ngIf",!B0.parent_task_id&&(null==U0.selectedTask?null:U0.selectedTask.id)!==(null==B0?null:B0.id))}}function h0(b0,E0){if(1&b0&&(H.TgZ(0,"div",17,18),H._UZ(2,"div",19),H.TgZ(3,"ul",20),H.YNc(4,r0,2,1,"ng-container",21),H.ALo(5,"searchByName"),H.qZA()()),2&b0){const B0=H.oxw(),U0=B0.index,z1=B0.$implicit,Q0=H.oxw(2);H.ekj("show",Q0.isExpanded[U0]),H.xp6(2),H.Udp("background",z1.color_code),H.xp6(2),H.Q6J("ngForOf",H.xi3(5,5,z1.tasks,Q0.searchText))}}function O1(b0,E0){if(1&b0&&(H.TgZ(0,"div",12),H.YNc(1,Q,3,5,"div",13),H.YNc(2,h0,6,8,"div",14),H.qZA()),2&b0){const B0=E0.$implicit;H.xp6(1),H.Q6J("ngIf",B0.tasks.length),H.xp6(1),H.Q6J("ngIf",B0.tasks.length)}}function N0(b0,E0){if(1&b0){const B0=H.EpF();H.ynx(0),H.YNc(1,p0,3,1,"ng-container",4),H.TgZ(2,"div",5)(3,"div",6)(4,"input",7),H.NdJ("ngModelChange",function(z1){H.CHM(B0);const Q0=H.oxw();return H.KtG(Q0.searchText=z1)}),H.qZA()(),H.TgZ(5,"div",8),H.YNc(6,O1,3,2,"div",9),H.qZA()(),H.BQk()}if(2&b0){const B0=H.oxw();H.xp6(1),H.Q6J("ngIf",B0.converting),H.xp6(3),H.Q6J("ngModel",B0.searchText),H.xp6(2),H.Q6J("ngForOf",B0.groups)}}function H0(b0,E0){1&b0&&H._UZ(0,"div")}function e0(b0,E0){1&b0&&H._UZ(0,"span",29)}const X0=function(){return{top:"20px"}};let c0=(()=>{var b0;class E0{constructor(U0,z1,Q0,x0,n1,h1,M0,L0,o0,L){this.map=U0,this.api=z1,this.service=Q0,this.subTaskConvertService=x0,this.cdr=n1,this.socket=h1,this.ngZone=M0,this.renderer=L0,this.kanbanService=o0,this.auth=L,this.searchText=null,this.selectedTaskId=null,this.showConvertTasksModal=!1,this.loadingGroups=!1,this.converting=!1,this.groupIds=[],this.isExpanded=[],this.groups=[],this.destroy$=new v0.x,this.subTaskConvertService.onConvertingSubtask.pipe((0,a0.R)(this.destroy$)).subscribe(m=>{this.getTaskData(m)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getTaskData(U0){this.projectId=U0.projectId,this.selectedTask=U0.selectedTask,this.getGroups()}getGroups(){var U0=this;return(0,M.Z)(function*(){if(U0.projectId)try{U0.map.deselectAll(),U0.loadingGroups=!0;const z1=U0.getConf(),Q0=yield U0.api.getTaskListV2(z1);Q0.done&&(U0.groups=Q0.body,U0.groupIds=Q0.body.map(x0=>x0.id),yield U0.mapTasks(U0.service.groups),U0.showConvertTasksModal=!0),U0.cdr.detectChanges(),U0.loadingGroups=!1}catch{U0.loadingGroups=!1}})()}getConf(U0){const z1={id:this.projectId,group:this.service.getCurrentGroup().value,field:null,order:null,search:null,statuses:null,members:null,projects:null,isSubtasksInclude:!1};return U0&&(z1.parent_task=U0),z1}mapTasks(U0){for(const z1 of U0){this.map.registerGroup(z1);for(const Q0 of z1.tasks)Q0.start_date&&(Q0.start_date=new Date(Q0.start_date)),Q0.end_date&&(Q0.end_date=new Date(Q0.end_date))}setTimeout(()=>{this.isExpanded=this.groups.map(()=>!0)},50)}convertToSubTask(U0,z1){var Q0=this;return(0,M.Z)(function*(){const x0=Q0.selectedTask;if(!x0)return;const n1=Q0.service.getCurrentGroup();n1.value===Q0.service.GROUP_BY_STATUS_VALUE?Q0.handleStatusChange(U0,Q0.selectedTask?.id):n1.value===Q0.service.GROUP_BY_PRIORITY_VALUE&&Q0.handlePriorityChange(U0,Q0.selectedTask?.id);try{Q0.converting=!0;const h1=yield Q0.api.convertToSubTask(x0.id,x0.project_id,z1,n1.value,U0);h1.done&&(Q0.service.updateTaskGroup(h1.body,!1),n1.value===Q0.service.GROUP_BY_PHASE_VALUE&&Q0.service.emitRefresh()),Q0.reset()}catch{Q0.converting=!1}Q0.kanbanService.emitRefreshGroups(),Q0.cdr.detectChanges()})()}handleStatusChange(U0,z1){z1&&(this.socket.emit(t.C.TASK_STATUS_CHANGE.toString(),JSON.stringify({task_id:z1,status_id:U0,team_id:this.auth.getCurrentSession()?.team_id})),this.socket.emit(t.C.GET_TASK_PROGRESS.toString(),z1))}handlePriorityChange(U0,z1){this.socket.emit(t.C.TASK_PRIORITY_CHANGE.toString(),JSON.stringify({task_id:z1,priority_id:U0}))}closeModal(){this.showConvertTasksModal=!1}reset(){this.converting=!1,this.showConvertTasksModal=!1,this.loadingGroups=!1,this.groups=[],this.groupIds=[],this.searchText=null,this.selectedTaskId=null}toggleGroup(U0,z1){this.ngZone.runOutsideAngular(()=>{U0.target&&(this.isExpanded[z1]=!this.isExpanded[z1])})}}return(b0=E0).\u0275fac=function(U0){return new(U0||b0)(H.Y36(j0.g),H.Y36(Z0.c),H.Y36(R0.b),H.Y36(p1.p),H.Y36(H.sBO),H.Y36(T0.s),H.Y36(H.R0b),H.Y36(H.Qsj),H.Y36(D0.m),H.Y36(A0.e))},b0.\u0275cmp=H.Xpm({type:b0,selectors:[["worklenz-convert-to-subtask-modal"]],standalone:!0,features:[H.jDz],decls:5,vars:3,consts:[["nzTitle","Choose a parent task",3,"nzVisible","nzStyle","nzVisibleChange","nzOnCancel"],[4,"nzModalContent"],[4,"nzModalFooter"],["indicatorTemplate",""],[4,"ngIf"],[1,"modal-content"],[1,"search-task"],["nz-input","","placeholder","Search by task name",3,"ngModel","ngModelChange"],[1,"scrollable","mt-3"],["class","task-group",4,"ngFor","ngForOf"],[1,"spinner"],["nzSimple","",3,"nzIndicator"],[1,"task-group"],["nz-typography","","class","py-1 px-2 mb-0 ant-typography d-block btn",3,"active","background","click",4,"ngIf"],["class","mt-0 mb-3 panel",3,"show",4,"ngIf"],["nz-typography","",1,"py-1","px-2","mb-0","ant-typography","d-block","btn",3,"click"],["nz-icon","","nzType","right","nzTheme","outline",1,"accordion-icon"],[1,"mt-0","mb-3","panel"],["panel",""],[1,"panel-left-border"],["nz-menu","",1,"border-bottom"],[4,"ngFor","ngForOf"],["class","m-0 d-flex px-0 single-task-cont","nz-menu-item","",3,"click",4,"ngIf"],["nz-menu-item","",1,"m-0","d-flex","px-0","single-task-cont",3,"click"],[1,"d-flex","align-items-center","justify-content-center","hover-bg-change","px-2"],[1,"d-flex",2,"width","90px"],["nz-tooltip","",2,"width","auto","max-width","90px","overflow","hidden","text-overflow","ellipsis","font-size","12px",3,"nzTooltipTitle"],["nz-tooltip","",2,"width","340px","overflow","hidden","text-overflow","ellipsis",3,"nzTooltipTitle"],["nz-typography",""],["nz-icon","","nzType","loading"]],template:function(U0,z1){1&U0&&(H.TgZ(0,"nz-modal",0),H.NdJ("nzVisibleChange",function(x0){return z1.showConvertTasksModal=x0})("nzOnCancel",function(){return z1.closeModal()}),H.YNc(1,N0,7,3,"ng-container",1),H.YNc(2,H0,1,0,"div",2),H.qZA(),H.YNc(3,e0,1,0,"ng-template",null,3,H.W1O)),2&U0&&H.Q6J("nzVisible",z1.showConvertTasksModal)("nzStyle",H.DdM(2,X0))},dependencies:[e.Ph,c.sL,Z.w,n.O5,n.sg,J.H0,B.j,B.W,g.Qp,g.du,g.Uh,g.Hf,v.o7,v.Zp,N.g,S.X,S.j,E.cg,E.SY,I.ip,I.wO,I.r9,n0.u5,n0.Fj,n0.JJ,n0.On,f0.PV,f0.Ls],styles:['.scrollable[_ngcontent-%COMP%]{max-height:65vh;overflow-y:auto}label[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:flex}.hover-bg-change[_ngcontent-%COMP%]:hover{background-color:#f5f5f5}.spinner[_ngcontent-%COMP%]{position:absolute;z-index:9;inset:0;background:rgba(255,255,255,.3);display:flex;align-items:center;justify-content:center}.panel[_ngcontent-%COMP%]{position:relative;padding:0;background-color:#fff;max-height:0px;overflow:hidden;transition:max-height .1s ease-out;border-right:1px solid #f0f0f0}.panel.show[_ngcontent-%COMP%]{transition:max-height .1s ease-out;max-height:100%}.panel-left-border[_ngcontent-%COMP%]{position:absolute;content:"";top:0;bottom:0;width:3px;z-index:3;border-bottom-left-radius:4px}.btn[_ngcontent-%COMP%]{width:max-content;padding-left:16px!important;padding-right:32px!important;border-radius:4px;cursor:pointer}.btn.active[_ngcontent-%COMP%]{border-bottom-left-radius:0;border-bottom-right-radius:0}.btn[_ngcontent-%COMP%] .accordion-icon[_ngcontent-%COMP%]{transform:rotate(0)}.btn.active[_ngcontent-%COMP%] .accordion-icon[_ngcontent-%COMP%]{transform:rotate(90deg)}.single-task-cont[_ngcontent-%COMP%]{border-top:1px solid #f0f0f0;padding-top:3px;padding-bottom:3px;height:auto}.border-bottom[_ngcontent-%COMP%]{border-bottom:1px solid #f0f0f0;border-right:none!important}'],changeDetection:0}),E0})()},77835:(r1,S0,s)=>{"use strict";s.d(S0,{W:()=>H0});var M=s(15861),e=s(65879),c=s(60095),n=s(21406),J=s(59556),B=s(69649),g=s(9691),v=s(24139),N=s(43389),S=s(33640),E=s(3599),t=s(96109),v0=s(42840),a0=s(20824),I=s(96814),n0=s(86408),f0=s(27782),H=s(8083),j0=s(66987),Z0=s(46619),R0=s(90586),p1=s(25335),T0=s(32333),D0=s(18223),A0=s(55416),Z=s(10095),p0=s(70855),Q=s(41958);function V(e0,X0){if(1&e0&&(e.TgZ(0,"nz-option",12),e._UZ(1,"nz-badge",13),e.qZA()),2&e0){const c0=X0.$implicit;e.Q6J("nzLabel",c0.name||null)("nzValue",c0.id),e.xp6(1),e.Q6J("nzTooltipTitle",c0.description)("nzText",(null==c0?null:c0.name)||null)("nzTooltipPlacement","left")("nzColor",c0.color_code)}}function r0(e0,X0){if(1&e0&&(e.TgZ(0,"div",21),e._UZ(1,"nz-badge",22),e.qZA()),2&e0){const c0=X0.$implicit;e.xp6(1),e.Q6J("nzColor",c0.color_code)("nzText",c0.name)}}function h0(e0,X0){if(1&e0&&(e.TgZ(0,"div",18)(1,"div",19),e._uU(2),e.qZA(),e.YNc(3,r0,2,2,"div",20),e.qZA()),2&e0){const c0=X0.$implicit;e.xp6(1),e.Udp("background-color",c0.color_code+"69"),e.xp6(1),e.hij(" ",c0.name," "),e.xp6(1),e.Q6J("ngForOf",c0.statuses)}}function O1(e0,X0){if(1&e0&&(e.ynx(0),e._UZ(1,"nz-divider",14),e.TgZ(2,"div",15)(3,"span",16),e._uU(4,"Categorized Statuses"),e.qZA()(),e.YNc(5,h0,4,4,"div",17),e.BQk()),2&e0){const c0=e.oxw(2);e.xp6(5),e.Q6J("ngForOf",c0.categorisedStatus)}}function N0(e0,X0){if(1&e0){const c0=e.EpF();e.ynx(0),e.TgZ(1,"nz-skeleton",2)(2,"form",3),e.NdJ("submit",function(){e.CHM(c0);const E0=e.oxw();return e.KtG(E0.submit())}),e.TgZ(3,"nz-form-item")(4,"nz-form-label",4),e._uU(5,"Name"),e.qZA(),e.TgZ(6,"nz-form-control",5),e._UZ(7,"input",6),e.qZA()(),e.TgZ(8,"nz-form-item")(9,"nz-form-label",4),e._uU(10,"Category"),e.qZA(),e.TgZ(11,"nz-form-control",7)(12,"nz-select",8),e.YNc(13,V,2,6,"nz-option",9),e.qZA()()(),e.TgZ(14,"button",10),e._uU(15),e.qZA()(),e.YNc(16,O1,6,1,"ng-container",11),e.qZA(),e.BQk()}if(2&e0){const c0=e.oxw();e.xp6(1),e.Q6J("nzActive",!0)("nzLoading",c0.loading),e.xp6(1),e.Q6J("formGroup",c0.form)("nzLayout","vertical"),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","name"),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","category_id"),e.xp6(1),e.Q6J("ngForOf",c0.categories),e.xp6(2),e.Oqu(c0.action),e.xp6(1),e.Q6J("ngIf",c0.showStatusGroups)}}let H0=(()=>{var e0;class X0{constructor(b0,E0,B0,U0,z1,Q0,x0){this.api=b0,this.fb=E0,this.app=B0,this.kanbanService=U0,this.auth=z1,this.projectsService=Q0,this.tasklistService=x0,this.action="Create",this.show=!1,this.statusId=null,this.projectId=null,this.showStatusGroups=!1,this.onCreateOrUpdate=new e.vpe,this.onCancel=new e.vpe,this.loading=!0,this.loadingCategories=!1,this.colorCodes=n.lD,this.categories=[],this.taskStatus={},this.categorisedStatus=[],this.createForm()}init(){this.form.controls.project_id.setValue(this.projectId),this.getCategories(),this.statusId?this.getById(this.statusId):this.loading=!1}closeModal(){this.show=!1,this.form.reset(),this.action="Create",this.createForm(),this.onCancel.emit()}submit(){var b0=this;return(0,M.Z)(function*(){b0.taskStatus&&b0.taskStatus.id?yield b0.updateStatus():yield b0.addStatus()})()}getById(b0){var E0=this;return(0,M.Z)(function*(){try{E0.loading=!0;const B0=yield E0.api.getById(b0);B0.done&&(E0.taskStatus=B0.body,E0.form.patchValue(E0.taskStatus)),E0.loading=!1}catch(B0){(0,B.tu)(B0),E0.loading=!1}})()}getCategories(){var b0=this;return(0,M.Z)(function*(){try{b0.loadingCategories=!0;const E0=yield b0.api.getCategories();E0.done&&(b0.categories=E0.body,b0.form.controls.category_id.setValue(b0.categories[0].id),b0.categorisedStatus=b0.categories.map(B0=>({...B0,statuses:b0.tasklistService.groups.filter(U0=>U0.category_id===B0.id)}))),b0.loadingCategories=!1}catch(E0){b0.loadingCategories=!1,(0,B.tu)(E0)}})()}isProjectManager(){return!!this.projectsService.projectOwnerTeamMemberId&&this.auth.getCurrentSession()?.team_member_id===this.projectsService.projectOwnerTeamMemberId}addStatus(){var b0=this;return(0,M.Z)(function*(){if(b0.form.invalid)b0.app.displayErrorsOf(b0.form);else try{const E0=yield b0.api.create(b0.form.value,b0.projectId);E0.done&&(n0.s.track(f0.TU),E0.body.color_code=E0.body.color_code+"69",b0.kanbanService.emitOnCreateStatus(E0.body),b0.onCreateOrUpdate.emit(),b0.closeModal(),(0,J.mT)())}catch(E0){(0,B.tu)(E0)}})()}updateStatus(){var b0=this;return(0,M.Z)(function*(){if(b0.taskStatus&&b0.taskStatus.id){if(b0.form.invalid)return void b0.app.displayErrorsOf(b0.form);try{(yield b0.api.update(b0.taskStatus.id,b0.form.value,b0.projectId)).done&&(b0.closeModal(),(0,J.mT)())}catch(E0){(0,B.tu)(E0)}}})()}onVisibilityChange(b0){b0&&setTimeout(()=>this.init(),100)}createForm(){this.form=this.fb.group({name:[null,[c.kI.required]],category_id:[null,[c.kI.required]],project_id:[this.projectId]})}}return(e0=X0).\u0275fac=function(b0){return new(b0||e0)(e.Y36(Z0.w),e.Y36(c.qu),e.Y36(R0.z),e.Y36(p1.m),e.Y36(T0.e),e.Y36(D0.m),e.Y36(A0.b))},e0.\u0275cmp=e.Xpm({type:e0,selectors:[["worklenz-status-form"]],inputs:{action:"action",show:"show",statusId:"statusId",projectId:"projectId",showStatusGroups:"showStatusGroups"},outputs:{onCreateOrUpdate:"onCreateOrUpdate",onCancel:"onCancel"},standalone:!0,features:[e.jDz],decls:2,vars:3,consts:[["nzPlacement","right",3,"nzVisible","nzClosable","nzTitle","nzOnClose","nzVisibleChange"],[4,"nzDrawerContent"],[3,"nzActive","nzLoading"],["nz-form","",3,"formGroup","nzLayout","submit"],["nzRequired","",3,"nzSpan"],["nzErrorTip","Please enter a name!",3,"nzSpan"],["nz-input","","placeholder","Name",3,"formControlName"],[3,"nzSpan"],[3,"formControlName"],["nzCustomContent","",3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["nz-button","","nzBlock","","nzType","primary","type","submit"],[4,"ngIf"],["nzCustomContent","",3,"nzLabel","nzValue"],["nz-tooltip","",1,"w-100",3,"nzTooltipTitle","nzText","nzTooltipPlacement","nzColor"],[1,"mb-3","mt-3"],[1,"mt-3","mb-3"],["nz-typography","",1,"main-title"],["class","status-group",4,"ngFor","ngForOf"],[1,"status-group"],[1,"status-name-holder"],["class","mt-3 mb-3 ms-2",4,"ngFor","ngForOf"],[1,"mt-3","mb-3","ms-2"],[3,"nzColor","nzText"]],template:function(b0,E0){1&b0&&(e.TgZ(0,"nz-drawer",0),e.NdJ("nzOnClose",function(){return E0.closeModal()})("nzVisibleChange",function(U0){return E0.show=U0})("nzVisibleChange",function(U0){return E0.onVisibilityChange(U0)}),e.YNc(1,N0,17,13,"ng-container",1),e.qZA()),2&b0&&(e.MGl("nzTitle","",E0.action," Status"),e.Q6J("nzVisible",E0.show)("nzClosable",!0))},dependencies:[g.LV,g.Ip,g.Vq,v.H0,v.ng,N.BL,N.Vz,N.SQ,S.mS,S.x7,c.UX,c._Y,c.Fj,c.JJ,c.JL,c.sg,c.u,E.U5,Z.t3,Z.SK,E.Lr,E.Nx,E.iK,E.Fd,a0.o7,a0.Zp,t.cg,t.SY,v0.sL,v0.ix,p0.w,Q.dQ,I.sg,I.O5,H.ZJ,H.ZU,j0.S,j0.g],styles:[".status-name-holder[_ngcontent-%COMP%]{padding:6px 11px}.main-title[_ngcontent-%COMP%]{color:#000000d9;font-weight:500;font-size:16px;line-height:22px}"]}),X0})()},8660:(r1,S0,s)=>{"use strict";s.d(S0,{o:()=>N});var M=s(96814),e=s(62595),c=s(8083),n=s(65879);function J(S,E){1&S&&n._UZ(0,"span",7)}function B(S,E){1&S&&n._UZ(0,"span",8)}function g(S,E){1&S&&n._UZ(0,"span",9)}function v(S,E){if(1&S&&(n.TgZ(0,"div",1)(1,"span",2),n._uU(2),n.qZA(),n.ynx(3,3),n.YNc(4,J,1,0,"span",4),n.YNc(5,B,1,0,"span",5),n.YNc(6,g,1,0,"span",6),n.BQk(),n.qZA()),2&S){const t=n.oxw();n.xp6(2),n.Oqu(t.name),n.xp6(1),n.Q6J("ngSwitch",t.name),n.xp6(1),n.Q6J("ngSwitchCase","Low"),n.xp6(1),n.Q6J("ngSwitchCase","Medium"),n.xp6(1),n.Q6J("ngSwitchCase","High")}}let N=(()=>{var S;class E{}return(S=E).\u0275fac=function(v0){return new(v0||S)},S.\u0275cmp=n.Xpm({type:S,selectors:[["worklenz-task-priority-label"]],inputs:{name:"name"},standalone:!0,features:[n.jDz],decls:1,vars:1,consts:[["class","d-flex justify-content-between",4,"ngIf"],[1,"d-flex","justify-content-between"],["nz-typography","",1,"me-2"],[3,"ngSwitch"],["class","low-priority position-relative center-hr","nz-icon","","nzType","minus",4,"ngSwitchCase"],["class","medium-priority position-relative center-hr","nz-icon","","nzType","pause",4,"ngSwitchCase"],["class","high-priority position-relative center-hr","nz-icon","","nzType","double-left",4,"ngSwitchCase"],["nz-icon","","nzType","minus",1,"low-priority","position-relative","center-hr"],["nz-icon","","nzType","pause",1,"medium-priority","position-relative","center-hr"],["nz-icon","","nzType","double-left",1,"high-priority","position-relative","center-hr"]],template:function(v0,a0){1&v0&&n.YNc(0,v,7,5,"div",0),2&v0&&n.Q6J("ngIf",a0.name)},dependencies:[M.ez,M.O5,M.RF,M.n9,e.PV,e.Ls,c.ZJ,c.ZU],styles:[".low-priority[_ngcontent-%COMP%]{color:#52c41a}.medium-priority[_ngcontent-%COMP%]{color:#faad14;transform:rotate(90deg)}.high-priority[_ngcontent-%COMP%]{color:#f5222d;transform:rotate(90deg)}.center-hr[_ngcontent-%COMP%]{display:flex;align-items:center}"]}),E})()},55522:(r1,S0,s)=>{"use strict";s.d(S0,{x:()=>D0});var M=s(15861),e=s(65879),c=s(60095),n=s(69649),J=s(43389),B=s(3599),g=s(16976),v=s(20824),N=s(42840),S=s(96814),E=s(24139),t=s(82669),v0=s(78027),a0=s(82803),I=s(90586),n0=s(10095),f0=s(70855),H=s(41958);function j0(A0,Z){if(1&A0){const p0=e.EpF();e.TgZ(0,"li",10)(1,"ul",11)(2,"nz-list-item-action")(3,"a",12),e.NdJ("click",function(){const r0=e.CHM(p0).index,h0=e.oxw(3);return e.KtG(h0.removeTask(r0))}),e._uU(4,"Remove"),e.qZA()()(),e._uU(5),e.qZA()}if(2&A0){const p0=Z.$implicit;e.xp6(5),e.hij(" ",p0.name," ")}}function Z0(A0,Z){if(1&A0&&(e.TgZ(0,"ul",8),e.YNc(1,j0,6,1,"li",9),e.qZA()),2&A0){const p0=e.oxw(2);e.Q6J("nzDataSource",p0.tasks)("nzLoading",p0.loading),e.xp6(1),e.Q6J("ngForOf",p0.tasks)}}function R0(A0,Z){if(1&A0&&(e.TgZ(0,"form",3)(1,"nz-form-item")(2,"nz-form-label"),e._uU(3,"Template Name"),e.qZA(),e.TgZ(4,"nz-form-control",4),e._UZ(5,"input",5),e.qZA()(),e.TgZ(6,"span",6),e._uU(7),e.qZA(),e._UZ(8,"br"),e.YNc(9,Z0,2,3,"ul",7),e.qZA()),2&A0){const p0=e.oxw();e.Q6J("formGroup",p0.form),e.xp6(4),e.Q6J("nzErrorTip","Template name is required!"),e.xp6(1),e.Q6J("formControlName","name"),e.xp6(2),e.hij("Selected Tasks (",p0.tasks.length||0,")"),e.xp6(2),e.Q6J("ngIf",p0.tasks.length)}}function p1(A0,Z){if(1&A0){const p0=e.EpF();e.TgZ(0,"div",13)(1,"button",14),e.NdJ("click",function(){e.CHM(p0);const V=e.oxw();return e.KtG(V.closeDrawer())}),e._uU(2,"Cancel"),e.qZA(),e.TgZ(3,"button",15),e.NdJ("click",function(){e.CHM(p0);const V=e.oxw();return e.KtG(V.submit())}),e._uU(4,"Save"),e.qZA()()}}const T0=function(){return{overflow:"auto"}};let D0=(()=>{var A0;class Z{get title(){return this.selectedTemplateId?"Edit Task Template":"Create Task Template"}constructor(Q,V,r0,h0){this.fb=Q,this.map=V,this.service=r0,this.app=h0,this.drawerVisible=!1,this.selectedTemplateId="",this.onCancelClick=new e.vpe,this.onTaskRemove=new e.vpe,this.onCreateOrUpdate=new e.vpe,this.tasks=[],this.creating=!1,this.loading=!1,this.form=this.fb.group({name:[null,c.kI.required]})}ngOnChanges(Q){Q.selectedTemplateId?.currentValue&&this.getTemplateData()}closeDrawer(){this.onCancelClick.emit(!1)}removeTask(Q){this.tasks.length>1?this.tasks.splice(Q,1):this.tasks=[]}submit(){this.form.valid?this.selectedTemplateId?this.updateTemplate():this.saveTemplate():this.app.displayErrorsOf(this.form)}reset(){this.form.reset(),this.map.deselectAll(),this.closeDrawer(),this.onCreateOrUpdate.emit()}updateTemplate(){var Q=this;return(0,M.Z)(function*(){try{Q.creating=!0,(yield Q.service.updateTemplate(Q.selectedTemplateId,{name:Q.form.value.name||"",tasks:Q.tasks})).done&&Q.reset()}catch{Q.creating=!1}})()}saveTemplate(){var Q=this;return(0,M.Z)(function*(){try{Q.form.valid&&(Q.creating=!0,Q.form.value.name&&(yield Q.service.createTemplate({name:Q.form.value.name||"",tasks:Q.tasks})).done&&Q.reset())}catch(V){Q.creating=!1,(0,n.tu)(V)}})()}getTemplateData(){var Q=this;return(0,M.Z)(function*(){try{Q.loading=!0;const V=yield Q.service.getById(Q.selectedTemplateId);V.done&&(Q.form.setValue({name:V.body.name}),Q.tasks=V.body.tasks||[],Q.loading=!1)}catch(V){Q.loading=!1,(0,n.tu)(V)}})()}onVisibilityChange(Q){Q&&(this.tasks=this.map.getSelectedTasks())}}return(A0=Z).\u0275fac=function(Q){return new(Q||A0)(e.Y36(c.qu),e.Y36(v0.g),e.Y36(a0.e),e.Y36(I.z))},A0.\u0275cmp=e.Xpm({type:A0,selectors:[["worklenz-task-template-drawer"]],inputs:{drawerVisible:"drawerVisible",selectedTemplateId:"selectedTemplateId"},outputs:{onCancelClick:"onCancelClick",onTaskRemove:"onTaskRemove",onCreateOrUpdate:"onCreateOrUpdate"},standalone:!0,features:[e.TTD,e.jDz],decls:4,vars:6,consts:[[3,"nzBodyStyle","nzWidth","nzVisible","nzTitle","nzFooter","nzOnClose","nzVisibleChange"],["nz-form","",3,"formGroup",4,"nzDrawerContent"],["footerTpl",""],["nz-form","",3,"formGroup"],[3,"nzErrorTip"],["nz-input","","placeholder","Template Name",3,"formControlName"],["nz-typography","",1,"fw-bold"],["nz-list","","nzBordered","","class","mt-4","nzNoResult","No tasks selected!",3,"nzDataSource","nzLoading",4,"ngIf"],["nz-list","","nzBordered","","nzNoResult","No tasks selected!",1,"mt-4",3,"nzDataSource","nzLoading"],["nz-list-item","",4,"ngFor","ngForOf"],["nz-list-item",""],["nz-list-item-actions",""],[3,"click"],[2,"float","right"],["nz-button","",2,"margin-right","8px",3,"click"],["nz-button","","nzType","primary",3,"click"]],template:function(Q,V){if(1&Q&&(e.TgZ(0,"nz-drawer",0),e.NdJ("nzOnClose",function(){return V.closeDrawer()})("nzVisibleChange",function(h0){return V.onVisibilityChange(h0)}),e.YNc(1,R0,10,5,"form",1),e.YNc(2,p1,5,0,"ng-template",null,2,e.W1O),e.qZA()),2&Q){const r0=e.MAs(3);e.Q6J("nzBodyStyle",e.DdM(5,T0))("nzWidth",650)("nzVisible",V.drawerVisible)("nzTitle",V.title)("nzFooter",r0)}},dependencies:[J.BL,J.Vz,J.SQ,B.U5,n0.t3,n0.SK,B.Lr,B.Nx,B.iK,B.Fd,g.Ph,g.n_,g.AA,g.nk,g.KC,c.UX,c._Y,c.Fj,c.JJ,c.JL,c.sg,c.u,v.o7,v.Zp,N.sL,N.ix,f0.w,H.dQ,S.O5,S.sg,E.H0,t.j]}),Z})()},29232:(r1,S0,s)=>{"use strict";s.d(S0,{D:()=>j0});var M=s(65879),e=s(96814),c=s(62595),n=s(42840),J=s(8083),B=s(94489),g=s(78645),v=s(32181),N=s(59773),S=s(975),E=s(64532),t=s(63481),v0=s(74764),a0=s(32333),I=s(70855),n0=s(41958);function f0(Z0,R0){1&Z0&&M._UZ(0,"span",5),2&Z0&&M.Q6J("nzType","caret-right")("nzTheme","outline")}function H(Z0,R0){1&Z0&&(M.TgZ(0,"span",6),M.O4$(),M.TgZ(1,"svg",7),M._UZ(2,"path",8),M.qZA()())}let j0=(()=>{var Z0;class R0{constructor(T0,D0,A0,Z,p0,Q){this.cdr=T0,this.socket=D0,this.utils=A0,this.service=Z,this.viewService=p0,this.auth=Q,this.DEFAULT_TIME_LEFT=this.buildTimeString(0,0,0),this.onStart=new M.vpe,this.onStop=new M.vpe,this.changeListTime=new M.vpe,this.changeListTimeToDefault=new M.vpe,this.timerStartTime=null,this.started=!1,this.startTime=0,this.timeString=this.DEFAULT_TIME_LEFT,this.timer=null,this.destroy$=new g.x,this.service.onStart.pipe((0,v.h)(V=>V.task_id===this.taskId),(0,N.R)(this.destroy$)).subscribe(V=>{this.startTimer(V.start_time),this.cdr.markForCheck()}),this.service.onStop.pipe((0,v.h)(V=>V.task_id===this.taskId),(0,N.R)(this.destroy$)).subscribe(V=>{this.stopTimer(),this.cdr.markForCheck()})}ngOnInit(){this.startTime=0,this.timer=null,this.timerStartTime&&this.startTimer(this.timerStartTime||Date.now())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}quickAssignMember(T0){const D0=this.viewService.model.task;if(!D0)return;const A0={team_member_id:T0.team_member_id,project_id:this.projectId,task_id:D0.id,reporter_id:T0?.id,mode:0,parent_task:D0.parent_task_id};this.socket.emit(B.C.QUICK_ASSIGNEES_UPDATE.toString(),JSON.stringify(A0)),this.socket.once(B.C.QUICK_ASSIGNEES_UPDATE.toString(),Z=>{T0.team_member_id&&(this.viewService.emitTimeLogAssignMember(Z),this.viewService.emitSingleMemberChange(T0.team_member_id))}),this.cdr.markForCheck()}toggleTimer(T0){this.started?(this.socket.once(B.C.TASK_TIMER_STOP.toString(),()=>{const D0=this.auth.getCurrentSession();if(D0){const A0=this.viewService.model.task?.assignees;A0?A0.includes(D0?.team_member_id)||this.quickAssignMember(D0):this.service.emitListTimerStop(this.taskId)}this.onStop?.emit()}),this.stopTimer()):(this.socket.once(B.C.TASK_TIMER_START.toString(),()=>{this.onStart?.emit()}),this.startTimer(this.timerStartTime||Date.now())),T0.stopPropagation()}buildTimeString(T0,D0,A0){return this.utils.buildTimeString(T0,D0,A0)}startTimer(T0){this.viewService.model.task&&(this.viewService.model.task.timer_start_time=T0),!this.started&&(this.started=!0,this.startTime=T0,this.timerStartTime||this.socket.emit(B.C.TASK_TIMER_START.toString(),JSON.stringify({task_id:this.taskId})),this.timerTick(),this.changeListTime.emit(T0),this.timer=setInterval(()=>{this.timerTick()},1e3))}stopTimer(){"number"==typeof this.timer&&clearInterval(this.timer),this.socket.emit(B.C.TASK_TIMER_STOP.toString(),JSON.stringify({task_id:this.taskId})),this.started=!1,this.timer=null,this.viewService.model.task&&(this.viewService.model.task.timer_start_time=0),this.changeListTimeToDefault.emit(0),this.startTime=0,this.timerStartTime=null,this.timeString=this.DEFAULT_TIME_LEFT}timerTick(){const D0=~~((Date.now()-this.startTime)/1e3);this.timeString=this.buildTimeString(~~(D0/3600),~~(D0%3600/60),D0%60),this.cdr.detectChanges()}}return(Z0=R0).\u0275fac=function(T0){return new(T0||Z0)(M.Y36(M.sBO),M.Y36(S.s),M.Y36(E.F),M.Y36(t.d),M.Y36(v0.f),M.Y36(a0.e))},Z0.\u0275cmp=M.Xpm({type:Z0,selectors:[["worklenz-task-timer"]],inputs:{taskId:"taskId",projectId:"projectId",timerStartTime:"timerStartTime"},outputs:{onStart:"onStart",onStop:"onStop",changeListTime:"changeListTime",changeListTimeToDefault:"changeListTimeToDefault"},standalone:!0,features:[M.jDz],decls:7,vars:6,consts:[["nz-typography","","nzEllipsis","",1,"d-flex","align-items-center","justify-content-center"],["nz-button","",1,"me-2",3,"nzType","nzSize","nzShape","click"],["nz-icon","",3,"nzType","nzTheme",4,"ngIf","ngIfElse"],[2,"font-weight","500"],["stopIcon",""],["nz-icon","",3,"nzType","nzTheme"],[1,"nz-icon","icon-stop"],["viewBox","0 0 1024 1024","width","1em","height","1em","fill","currentColor"],["d","M864 64H160C107 64 64 107 64 160v704c0 53 43 96 96 96h704c53 0 96-43 96-96V160c0-53-43-96-96-96z"]],template:function(T0,D0){if(1&T0&&(M.TgZ(0,"small",0)(1,"button",1),M.NdJ("click",function(Z){return D0.toggleTimer(Z)}),M.YNc(2,f0,1,2,"span",2),M.qZA(),M.TgZ(3,"span",3),M._uU(4),M.qZA()(),M.YNc(5,H,3,0,"ng-template",null,4,M.W1O)),2&T0){const A0=M.MAs(6);M.xp6(1),M.Q6J("nzType","primary")("nzSize","small")("nzShape","circle"),M.xp6(1),M.Q6J("ngIf",!D0.started)("ngIfElse",A0),M.xp6(2),M.Oqu(D0.timeString)}},dependencies:[e.ez,e.O5,c.PV,c.Ls,n.sL,n.ix,I.w,n0.dQ,J.ZJ,J.ZU],styles:["button[_ngcontent-%COMP%]{min-width:16px!important;width:16px!important;height:16px!important;line-height:14px;padding-left:1px}.icon-stop[_ngcontent-%COMP%]{font-size:8px;position:relative;inset:-1px 0 0}"],changeDetection:0}),R0})()},63481:(r1,S0,s)=>{"use strict";s.d(S0,{d:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this._startSbj$=new M.x,this._stopSbj$=new M.x,this._submitOrUpdateSbj$=new M.x,this._listTimerStopSbj$=new M.x}get onStart(){return this._startSbj$.asObservable()}get onStop(){return this._stopSbj$.asObservable()}get onSubmitOrUpdate(){return this._submitOrUpdateSbj$.asObservable()}get onListTimerStop(){return this._listTimerStopSbj$.asObservable()}emitStart(g,v=0){this._startSbj$.next({task_id:g,start_time:v})}emitStop(g){this._stopSbj$.next({task_id:g,start_time:0})}emitSubmitOrUpdate(){this._submitOrUpdateSbj$.next()}emitListTimerStop(g){this._listTimerStopSbj$.next(g)}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},44159:(r1,S0,s)=>{"use strict";s.d(S0,{E:()=>oo});var M=s(15861),e=s(65879),c=s(35420),n=s(69649),J=s(21406),B=s(32181),g=s(30812),v=s(94489),N=s(71993),S=s(34554),E=s(55416),t=s(78027),v0=s(8725),a0=s(975),I=s(25335),n0=s(74764),f0=s(96814),H=s(43389),j0=s(24139),Z0=s(79382),R0=s(73460),p1=s(62787),T0=s(96109),D0=s(62595),A0=s(42840),Z=s(70855),p0=s(41958),Q=s(64532),V=s(10095),r0=s(3599),h0=s(55695),O1=s(90565),N0=s(8083),H0=s(32333),e0=s(18223),X0=s(84676),c0=s(60095),b0=s(20824),E0=s(99183),B0=s(96928),U0=s(62612),z1=s(9172),Q0=s(2919);const x0=["memberSearchInput"],n1=function(){return[]};function h1(u,U){if(1&u&&e._UZ(0,"worklenz-avatars",10),2&u){const b=e.oxw(2);e.Q6J("names",b.service.model.task.names||e.DdM(1,n1))}}function M0(u,U){1&u&&(e.TgZ(0,"small",22),e._uU(1,"(Pending Invitation)"),e.qZA())}function L0(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"li",16),e.NdJ("nzCheckedChange",function(z){const s0=e.CHM(b).$implicit,r=e.oxw(3);return e.KtG(r.handleMemberChange(s0,z))})("nzCheckedChange",function(z){const s0=e.CHM(b).$implicit;return e.KtG(s0.selected=z)}),e.TgZ(1,"div",17),e._UZ(2,"nz-avatar",18),e.ALo(3,"firstCharUpper"),e.TgZ(4,"div",19)(5,"span",20),e._uU(6),e.qZA(),e.TgZ(7,"small",6),e._uU(8),e.YNc(9,M0,2,0,"small",21),e.qZA()()()()}if(2&u){const b=U.$implicit;e.Q6J("nzChecked",b.selected)("nzDisabled",b.is_pending&&!b.selected)("ngClass",b.is_pending&&!b.selected?"disable":""),e.xp6(2),e.Udp("background-color",b.avatar_url?"#ececec":b.color_code),e.Q6J("nzSize",32)("nzSrc",b.avatar_url)("nzText",e.lcZ(3,13,b.name))("nzTooltipPlacement","top")("nzTooltipTitle",b.name),e.xp6(4),e.Oqu(b.name),e.xp6(2),e.hij(" ",b.email," "),e.xp6(1),e.Q6J("ngIf",b.is_pending)}}function o0(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"ul",11)(1,"li",12)(2,"input",13,14),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.searchText=z)}),e.qZA()(),e.YNc(4,L0,10,15,"li",15),e.ALo(5,"searchByName"),e.qZA()}if(2&u){const b=e.oxw(2);e.xp6(2),e.Q6J("ngModel",b.searchText),e.xp6(2),e.Q6J("ngForOf",e.xi3(5,3,b.list.members||e.DdM(6,n1),b.searchText))("ngForTrackBy",b.trackById)}}function L(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-label"),e._uU(2,"Assignees"),e.qZA(),e.TgZ(3,"nz-form-control",2)(4,"div",3),e.NdJ("nzVisibleChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handleMembersVisibleChange(z))}),e.TgZ(5,"div",4),e.YNc(6,h1,1,2,"worklenz-avatars",5),e.TgZ(7,"span",6),e._UZ(8,"nz-avatar",7),e.qZA()(),e.TgZ(9,"nz-dropdown-menu",null,8),e.YNc(11,o0,6,7,"ul",9),e.qZA()()()()}if(2&u){const b=e.MAs(10),p=e.oxw();e.xp6(4),e.Q6J("nzClickHide",!1)("nzDropdownMenu",b)("nzTrigger","click"),e.xp6(2),e.Q6J("ngIf",null==p.service.model.task.names?null:p.service.model.task.names.length),e.xp6(2),e.Q6J("nzSize",28)("nzIcon","plus"),e.xp6(3),e.Q6J("ngIf",null==p.service.model.team_members?null:p.service.model.team_members.length)}}let m=(()=>{var u;class U{constructor(p,z,C,s0,r,x,O,i,o){this.auth=p,this.projectsService=z,this.socket=C,this.ngZone=s0,this.cdr=r,this.service=x,this.list=O,this.projectScheduleService=i,this.utils=o,this.searchText=null,this.handleResponse=q=>{if(this.service.model.task)try{q&&(this.service.model.task.assignees=(q.assignees||[]).map(w=>w.team_member_id),this.service.model.task.names=q.names||[],this.service.emitRefresh(q.id),this.service.emitAssigneesChange(),this.list.isSubtasksIncluded&&this.list.emitRefreshSubtasksIncluded(),this.sortMembersBySelection(this.list.members),this.cdr.markForCheck())}catch{}},this.service.onTimeLogAssignMember.pipe((0,N.sL)()).subscribe(q=>{this.handleResponse(q)})}ngOnInit(){this.socket.on(v.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(v.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleResponse)}handleMembersVisibleChange(p){if(!this.service.model.task)return;const z=[...this.list.members];if(p){const C=this.service.model.task.assignees;for(const s0 of z)s0.id&&(s0.selected=C.includes(s0.id));this.focusMemberSearchInput()}else{this.searchText=null;for(const C of z)C.selected=!1}this.list.members=z,this.sortMembersBySelection(this.list.members),this.cdr.markForCheck()}focusMemberSearchInput(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.memberSearchInput?.nativeElement?.focus()},100)})}handleMemberChange(p,z){const C=this.service.model.task;if(!C)return;const s0=this.auth.getCurrentSession(),r={team_member_id:p.id,project_id:this.projectsService.id,task_id:C.id,reporter_id:s0?.id,mode:z?0:1,parent_task:C.parent_task_id};this.socket.emit(v.C.QUICK_ASSIGNEES_UPDATE.toString(),JSON.stringify(r)),p.id&&this.service.emitSingleMemberChange(p.id)}trackById(p,z){return z.id}sortMembersBySelection(p){this.utils.sortBySelection(p),this.utils.sortByPending(p)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(H0.e),e.Y36(e0.m),e.Y36(a0.s),e.Y36(e.R0b),e.Y36(e.sBO),e.Y36(n0.f),e.Y36(E.b),e.Y36(X0.Z),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-assignees"]],viewQuery:function(p,z){if(1&p&&e.Gf(x0,5),2&p){let C;e.iGM(C=e.CRH())&&(z.memberSearchInput=C.first)}},decls:1,vars:1,consts:[["class","w-100 mb-2","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-2"],[1,"control-hover"],["nz-dropdown","",1,"task-form-assignee",3,"nzClickHide","nzDropdownMenu","nzTrigger","nzVisibleChange"],[1,"d-flex","h-100","align-items-center"],["class","d-flex cursor-pointer",3,"names",4,"ngIf"],["nz-typography","","nzType","secondary"],[1,"avatar-dashed","ms-1","bg-white",3,"nzSize","nzIcon"],["membersDropdown","nzDropdownMenu"],["class","members-dropdown pt-0","nz-menu","",4,"ngIf"],[1,"d-flex","cursor-pointer",3,"names"],["nz-menu","",1,"members-dropdown","pt-0"],[1,"px-3","py-2","position-sticky","top-0","bg-white","z-top"],["nz-input","","placeholder","Search by name","type","text",1,"border-default-color","dropdown-search-input",3,"ngModel","ngModelChange"],["memberSearchInput",""],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzChecked","nzDisabled","ngClass","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzDisabled","ngClass","nzCheckedChange"],[1,"d-flex","align-items-center","justify-content-center","user-select-none"],["nz-tooltip","",1,"mt-auto","mb-auto","me-2",3,"nzSize","nzSrc","nzText","nzTooltipPlacement","nzTooltipTitle"],[2,"line-height","15px"],["nz-typography","",1,"d-block","mem-name"],["nz-typography","","nzType","danger",4,"ngIf"],["nz-typography","","nzType","danger"]],template:function(p,z){1&p&&e.YNc(0,L,12,7,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.mk,f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.Fj,c0.JJ,c0.On,b0.Zp,R0.wO,R0.r9,p1.cm,p1.RR,E0.o,B0.Dz,N0.ZU,U0.Ie,T0.SY,Z.w,z1.g,Q0.I],styles:['.disable[_ngcontent-%COMP%]{position:relative}.disable[_ngcontent-%COMP%]:after{position:absolute;content:"";background:rgba(231,231,231,.4117647059);inset:0;width:100%}.z-top[_ngcontent-%COMP%]{z-index:9}'],changeDetection:0}),U})();var d=s(16676),K=s.n(d),g0=s(52682),e1=s(76643);const u1=["std_Section"];function L1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",11,12)(2,"span",8),e._uU(3),e.ALo(4,"dateFormatter"),e.qZA(),e.TgZ(5,"nz-date-picker",13),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw(3);return e.KtG(C.service.model.task.start_date=z)})("ngModelChange",function(z){e.CHM(b);const C=e.oxw(3);return e.KtG(C.handleStartDateChange(z))})("keydown.enter",function(){e.CHM(b);const z=e.oxw(3);return e.KtG(z.handleStartDateChange(z.service.model.task.start_date))}),e.qZA(),e.TgZ(6,"span",14),e._uU(7," - "),e.qZA()()}if(2&u){const b=e.oxw(3);e.xp6(3),e.Oqu(e.lcZ(4,5,b.service.model.task.start_date)),e.xp6(2),e.Q6J("ngModel",b.service.model.task.start_date)("nzDisabledDate",b.utils.checkForMaxDate(b.service.model.task.end_date))("nzPlaceHolder","Start date"),e.uIk("id",b.utils.isTestServer()?"task-start-date":null)}}function k1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",5),e.YNc(1,L1,8,7,"div",6),e.TgZ(2,"div",7)(3,"span",8),e._uU(4),e.ALo(5,"dateFormatter"),e.qZA(),e.TgZ(6,"nz-date-picker",9),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.service.model.task.end_date=z)})("ngModelChange",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.handleEndDateChange(z))})("keydown.enter",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.handleEndDateChange(z.service.model.task.end_date))}),e.qZA()(),e.TgZ(7,"button",10),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.showStartDate())}),e._uU(8),e.qZA()()}if(2&u){const b=e.oxw(2);e.xp6(1),e.Q6J("ngIf",b.showStartDateSection),e.xp6(2),e.ekj("past-date",b.checkForPastDate(b.service.model.task.end_date))("soon-date",b.checkForSoonDate(b.service.model.task.end_date)),e.xp6(1),e.Oqu(e.lcZ(5,12,b.service.model.task.end_date)),e.xp6(2),e.Q6J("ngModel",b.service.model.task.end_date)("nzDisabledDate",b.utils.checkForMinDate(b.service.model.task.start_date))("nzPlaceHolder","End date"),e.uIk("id",b.utils.isTestServer()?"task-end-date":null),e.xp6(1),e.Q6J("ngClass",b.showStartDateSection?"text-danger":""),e.xp6(1),e.Oqu(b.currentDateToggleBtnText)}}function W0(u,U){if(1&u&&(e.TgZ(0,"nz-form-item",1)(1,"nz-form-label",2),e._uU(2,"Due Date"),e.qZA(),e.TgZ(3,"nz-form-control",3),e.YNc(4,k1,9,14,"div",4),e.qZA()()),2&u){const b=e.oxw();e.xp6(1),e.Q6J("nzSm",6)("nzXs",24),e.xp6(3),e.Q6J("ngIf",b.service.model.task)}}let I0=(()=>{var u;class U{constructor(p,z,C,s0){this.socket=p,this.service=z,this.utils=C,this.auth=s0,this.START_DATE_SET_TEXT="Show start date",this.START_DATE_RESET_TEXT="Hide start date",this.currentDateToggleBtnText=this.START_DATE_SET_TEXT,this.showStartDateSection=!1}handleStartDateChange(p){const z=this.service.model.task;z?.id&&(this.socket.once(v.C.TASK_START_DATE_CHANGE.toString(),C=>{C?.id&&this.service.emitRefresh(C.id)}),this.socket.emit(v.C.TASK_START_DATE_CHANGE.toString(),JSON.stringify({task_id:z.id,start_date:p||null,parent_task:z.parent_task_id,time_zone:this.auth.getCurrentSession()?.timezone_name?this.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone})))}handleEndDateChange(p){const z=this.service.model.task;z?.id&&(this.socket.once(v.C.TASK_END_DATE_CHANGE.toString(),C=>{C?.id&&this.service.emitRefresh(C.id),this.service.emitEndDateChange()}),this.socket.emit(v.C.TASK_END_DATE_CHANGE.toString(),JSON.stringify({task_id:z.id,end_date:p||null,parent_task:z.parent_task_id,time_zone:this.auth.getCurrentSession()?.timezone_name?this.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone})))}showStartDate(){this.showStartDateSection?(this.showStartDateSection=!1,this.currentDateToggleBtnText=this.START_DATE_SET_TEXT):(this.showStartDateSection=!0,this.currentDateToggleBtnText=this.START_DATE_RESET_TEXT)}checkForPastDate(p){return K()(p).format("YYYY-MM-DD"){var u;class U{constructor(p,z,C){this.socket=p,this.service=z,this.utils=C}handleTimeEstimationChange(){const p=this.service.model.task;p?.id&&this.socket.emit(v.C.TASK_TIME_ESTIMATION_CHANGE.toString(),JSON.stringify({task_id:p.id,total_hours:p.total_hours||0,total_minutes:p.total_minutes||0,parent_task:p.parent_task_id}))}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(a0.s),e.Y36(n0.f),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-estimation"]],decls:1,vars:1,consts:[["class","w-100 mb-0","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-0"],[1,"d-inline-flex",2,"position","relative","top","-12px"],[1,"me-3"],["nz-typography","","nzType","secondary",1,"d-block"],[3,"ngModel","nzFormatter","nzMin","nzPlaceHolder","nzStep","ngModelChange","nzBlur"],[3,"ngModel","nzFormatter","nzMax","nzMin","nzPlaceHolder","nzStep","ngModelChange","nzBlur"]],template:function(p,z){1&p&&e.YNc(0,X,13,11,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.JJ,c0.On,N0.ZU,q0._V],changeDetection:0}),U})();var F0=s(5882),l1=s(9691),$1=s(8660);function se(u,U){if(1&u&&(e.TgZ(0,"nz-option",6),e._UZ(1,"worklenz-task-priority-label",7),e.qZA()),2&u){const b=U.$implicit;e.Q6J("nzLabel",b.name)("nzValue",b.id),e.xp6(1),e.Q6J("name",b.name)}}function ae(u,U){if(1&u&&(e.TgZ(0,"div",8),e._UZ(1,"worklenz-task-priority-label",7),e.qZA()),2&u){const b=U.$implicit;e.xp6(1),e.Q6J("name",b.nzLabel)}}function be(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-label"),e._uU(2,"Priority"),e.qZA(),e.TgZ(3,"nz-form-control",2)(4,"nz-select",3),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.service.model.task.priority_id=z)})("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handlePriorityChange(z))}),e.YNc(5,se,2,3,"nz-option",4),e.qZA(),e.YNc(6,ae,2,1,"ng-template",null,5,e.W1O),e.qZA()()}if(2&u){const b=e.MAs(7),p=e.oxw();e.xp6(4),e.Q6J("nzCustomTemplate",b)("nzDropdownMatchSelectWidth",!1)("nzShowArrow",!0)("ngModel",p.service.model.task.priority_id)("nzPlaceHolder","Select priority"),e.xp6(1),e.Q6J("ngForOf",p.service.model.priorities)}}let _e=(()=>{var u;class U{constructor(p,z,C,s0,r){this.socket=p,this.service=z,this.list=C,this.cdr=s0,this.roadmapService=r,this.handleResponse=x=>{x&&x.id&&(this.roadmapService.getCurrentGroup().value===this.roadmapService.GROUP_BY_PRIORITY_VALUE&&this.roadmapService.onGroupChange(x.id,x.priority_id),this.cdr.markForCheck())}}ngOnInit(){this.socket.on(v.C.TASK_PRIORITY_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(v.C.TASK_PRIORITY_CHANGE.toString(),this.handleResponse)}handlePriorityChange(p){const z=this.service.model.task;!z||!z.id||(this.socket.emit(v.C.TASK_PRIORITY_CHANGE.toString(),JSON.stringify({task_id:z.id,priority_id:p,parent_task:z.parent_task_id})),this.service.emitRefresh(z.id),this.list.getCurrentGroup().value===this.list.GROUP_BY_PRIORITY_VALUE&&this.list.isSubtasksIncluded&&this.list.emitRefreshSubtasksIncluded(),this.cdr.detectChanges())}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(a0.s),e.Y36(n0.f),e.Y36(E.b),e.Y36(e.sBO),e.Y36(F0.s))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-priority"]],decls:1,vars:1,consts:[["class","w-100 mb-2","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-2"],["nzErrorTip","Priority is required!"],[1,"w-auto",3,"nzCustomTemplate","nzDropdownMatchSelectWidth","nzShowArrow","ngModel","nzPlaceHolder","ngModelChange"],["nzCustomContent","",3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["taskPriorityTemplate",""],["nzCustomContent","",3,"nzLabel","nzValue"],[3,"name"],[1,"ant-select-selection-item-content","d-flex","align-items-center"]],template:function(p,z){1&p&&e.YNc(0,be,8,6,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.JJ,c0.On,l1.Ip,l1.Vq,$1.o],changeDetection:0}),U})();var Be=s(33640);const le=["labelSearchInput"];function he(u,U){if(1&u&&(e.TgZ(0,"nz-tag",17),e._uU(1),e.qZA()),2&u){const b=U.$implicit;e.Q6J("nzColor",b.color_code+"69"),e.xp6(1),e.Oqu(b.name)}}function qe(u,U){if(1&u&&(e.ynx(0),e.YNc(1,he,2,2,"nz-tag",13),e.TgZ(2,"nz-tag",14)(3,"span",15),e._UZ(4,"span",16),e.qZA()(),e.BQk()),2&u){const b=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",b.service.model.task.labels)("ngForTrackBy",b.trackById)}}function ce(u,U){1&u&&(e.TgZ(0,"nz-tag",18)(1,"span",15),e._UZ(2,"span",16),e.qZA()())}function we(u,U){1&u&&(e.TgZ(0,"span",15),e._uU(1," Hit enter to create! "),e.qZA())}function fe(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"li",19),e.NdJ("nzCheckedChange",function(){const C=e.CHM(b).$implicit,s0=e.oxw(2);return e.KtG(s0.handleLabelChange(C))})("nzCheckedChange",function(z){const s0=e.CHM(b).$implicit;return e.KtG(s0.selected=z)}),e._UZ(1,"nz-badge",20),e.qZA()}if(2&u){const b=U.$implicit;e.Q6J("nzChecked",b.selected),e.xp6(1),e.Q6J("nzColor",b.color_code)("nzText",(null==b?null:b.name)||null)}}function de(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-label"),e._uU(2,"Labels"),e.qZA(),e.TgZ(3,"nz-form-control",2)(4,"span",3),e.NdJ("nzVisibleChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handleLabelsVisibleChange(z))}),e.YNc(5,qe,5,2,"ng-container",4),e.YNc(6,ce,3,0,"nz-tag",5),e.TgZ(7,"nz-dropdown-menu",null,6)(9,"ul",7)(10,"li",8)(11,"input",9,10),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.labelsSearchText=z)})("keydown.enter",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.createLabel())}),e.qZA(),e.YNc(13,we,2,0,"span",11),e.qZA(),e.YNc(14,fe,2,3,"li",12),e.qZA()()()()()}if(2&u){const b=e.MAs(8),p=e.oxw();e.xp6(4),e.Q6J("nzClickHide",!1)("nzDropdownMenu",b)("nzTrigger","click"),e.xp6(1),e.Q6J("ngIf",null==p.service.model.task.labels?null:p.service.model.task.labels.length),e.xp6(1),e.Q6J("ngIf",!(null!=p.service.model.task.labels&&p.service.model.task.labels.length)),e.xp6(5),e.Q6J("ngModel",p.labelsSearchText),e.xp6(2),e.Q6J("ngIf",!p.hasFilteredLabel),e.xp6(1),e.Q6J("ngForOf",p.filteredLabels)("ngForTrackBy",p.trackById)}}let Te=(()=>{var u;class U{get hasFilteredLabel(){return!!this.filteredLabels.length}get filteredLabels(){return this.searchPipe.transform(this.taskListService.labels,this.labelsSearchText)}constructor(p,z,C,s0,r,x,O,i,o){this.socket=p,this.fb=z,this.ref=C,this.auth=s0,this.ngZone=r,this.service=x,this.taskListService=O,this.searchPipe=i,this.utils=o,this.labelsSearchText=null,this.handleLabelsChange=q=>{this.service.model.task&&(this.service.model.task.labels=q.all_labels,this.sortBySelected(this.service.model.task.labels),this.ref.detectChanges(),this.service.emitRefresh(q.id))}}ngOnInit(){this.socket.on(v.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.on(v.C.CREATE_LABEL.toString(),this.handleLabelsChange)}ngOnDestroy(){this.socket.removeListener(v.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.removeListener(v.C.CREATE_LABEL.toString(),this.handleLabelsChange)}sortBySelected(p){this.utils.sortBySelection(p)}handleLabelsVisibleChange(p){if(!this.service.model.task)return;const z=this.taskListService.labels?.length?[...this.taskListService.labels]:[];if(p){const C=this.service.model.task.labels?.map(s0=>s0.id)||[];for(const s0 of z)s0.selected=C.includes(s0.id);this.focusLabelsSearchInput()}else for(const C of z)C.selected=!1;this.taskListService.labels=z,this.sortBySelected(z),this.ref.detectChanges()}focusLabelsSearchInput(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.labelSearchInput?.nativeElement?.focus()},100)})}trackById(p,z){return z.id}handleLabelChange(p){const z=this.service.model.task;!z||!z?.id||(this.socket.emit(v.C.TASK_LABELS_CHANGE.toString(),JSON.stringify({task_id:z.id,label_id:p.id,parent_task:z.parent_task_id})),this.service.model.task?.labels&&this.sortBySelected(this.service.model.task?.labels),this.ref.detectChanges())}createLabel(){const p=this.service.model.task;if(!p||!p.id||this.hasFilteredLabel||!this.labelsSearchText)return;const z=this.auth.getCurrentSession();this.socket.emit(v.C.CREATE_LABEL.toString(),JSON.stringify({task_id:p?.id,label:this.labelsSearchText,team_id:z?.team_id,parent_task:p?.parent_task_id})),this.labelsSearchText=null,this.ref.detectChanges()}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(a0.s),e.Y36(c0.qu),e.Y36(e.sBO),e.Y36(H0.e),e.Y36(e.R0b),e.Y36(n0.f),e.Y36(E.b),e.Y36(z1.g),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-labels"]],viewQuery:function(p,z){if(1&p&&e.Gf(le,5),2&p){let C;e.iGM(C=e.CRH())&&(z.labelSearchInput=C.first)}},decls:1,vars:1,consts:[["class","mb-0","nz-row","",4,"ngIf"],["nz-row","",1,"mb-0"],[1,"task-view-right-max-col"],["nz-dropdown","",3,"nzClickHide","nzDropdownMenu","nzTrigger","nzVisibleChange"],[4,"ngIf"],["class","text-dark avatar-dashed empty-label task-list-label",4,"ngIf"],["labelsDropdown","nzDropdownMenu"],["nz-menu","",1,"members-dropdown"],[1,"px-3","py-2"],["nz-input","","placeholder","Search or create","type","text",1,"border-default-color","dropdown-search-input",3,"ngModel","ngModelChange","keydown.enter"],["labelSearchInput",""],["nz-typography","","nzType","secondary",4,"ngIf"],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzChecked","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["class","text-dark task-list-label task-view-label mt-1 cursor-pointer",3,"nzColor",4,"ngFor","ngForOf","ngForTrackBy"],[1,"text-dark","avatar-dashed","empty-label","task-list-label","mt-1","task-form-pointer-elem",2,"margin-top","4px"],["nz-typography","","nzType","secondary"],["nz-icon","","nzTheme","outline","nzType","plus"],[1,"text-dark","task-list-label","task-view-label","mt-1","cursor-pointer",3,"nzColor"],[1,"text-dark","avatar-dashed","empty-label","task-list-label"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzCheckedChange"],[3,"nzColor","nzText"]],template:function(p,z){1&p&&e.YNc(0,de,15,9,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.Fj,c0.JJ,c0.On,b0.Zp,h0.j,R0.wO,R0.r9,p1.cm,p1.RR,N0.ZU,U0.Ie,D0.Ls,Be.x7,Z.w],styles:[".task-view-right-max-col[_ngcontent-%COMP%]{max-width:510px}"],changeDetection:0}),U})();var Ge=s(42753);const ve=["descriptionInput"],t0=["descriptionEditor"];function f(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",7),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.toggleEdit(!0))}),e.qZA()}if(2&u){const b=e.oxw(2);e.ekj("empty",!b.isEditing&&b.isEmpty()),e.Q6J("innerHTML",b.service.model.task.description,e.oJD)}}function y(u,U){1&u&&(e.TgZ(0,"span",8),e._uU(1,"Add a more detailed description..."),e.qZA())}function W(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-control",2),e.YNc(2,f,1,3,"div",3),e.YNc(3,y,2,0,"span",4),e.TgZ(4,"editor",5,6),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.service.model.task.description=z)})("onBlur",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.onDescriptionInputBlur())}),e.qZA()()()}if(2&u){const b=e.oxw();e.ekj("editing",b.isEditing),e.xp6(2),e.Q6J("ngIf",!b.isEditing),e.xp6(1),e.Q6J("ngIf",!b.isEditing&&b.isEmpty()),e.xp6(1),e.ekj("editing",b.isEditing),e.Q6J("init",b.CONFIG)("ngModel",b.service.model.task.description)}}let k=(()=>{var u;class U{constructor(p,z,C){this.cdr=p,this.socket=z,this.service=C,this.CONFIG={base_url:"/tinymce",suffix:".min",plugins:"lists link code wordcount",toolbar:"blocks bold italic underline strikethrough | checklist numlist bullist link | alignleft aligncenter alignright alignjustify",menubar:!1,content_css:"/assets/css/prebuilt-editor.css",statusbar:!0,branding:!1,height:this.service.model.task?.description?.length?"300":"200"},this.isEditing=!1,this.saving=!1,this.isSaveButtonActive=!1,this.handleResponse=s0=>{s0&&(this.service.model.task&&this.service.model.task.description!=s0.description&&(this.service.model.task.description=s0.description),setTimeout(()=>this.cdr.detectChanges()))}}ngOnInit(){this.socket.on(v.C.TASK_DESCRIPTION_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(v.C.TASK_DESCRIPTION_CHANGE.toString(),this.handleResponse)}isEmpty(){return!this.service.model.task?.description?.length}onDescriptionInputBlur(){this.toggleEdit(!1),this.handleDescriptionChange()}toggleEdit(p=!1){this.isEditing=p,p&&setTimeout(()=>{tinymce.get(this.descriptionEditor.id)?.focus()}),this.cdr.detectChanges()}handleDescriptionChange(){const p=this.service.model.task;p?.id&&(this.socket.emit(v.C.TASK_DESCRIPTION_CHANGE.toString(),JSON.stringify({task_id:p.id,description:this.service.model.task?.description||null,parent_task:p.parent_task_id})),this.cdr.detectChanges())}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(e.sBO),e.Y36(a0.s),e.Y36(n0.f))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-description"]],viewQuery:function(p,z){if(1&p&&(e.Gf(ve,5),e.Gf(t0,5)),2&p){let C;e.iGM(C=e.CRH())&&(z.descriptionInput=C.first),e.iGM(C=e.CRH())&&(z.descriptionEditor=C.first)}},decls:1,vars:1,consts:[["class","w-100 task-description-editor","nz-row","",3,"editing",4,"ngIf"],["nz-row","",1,"w-100","task-description-editor"],[1,"description-hover","position-relative"],["class","description-editor-preview",3,"empty","innerHTML","click",4,"ngIf"],["class","ps-1 description-editor-placeholder","nz-typography","","nzType","secondary",4,"ngIf"],[1,"description-editor",3,"init","ngModel","ngModelChange","onBlur"],["descriptionEditor",""],[1,"description-editor-preview",3,"innerHTML","click"],["nz-typography","","nzType","secondary",1,"ps-1","description-editor-placeholder"]],template:function(p,z){1&p&&e.YNc(0,W,6,8,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.O5,V.t3,V.SK,r0.Nx,r0.Fd,c0.JJ,c0.On,N0.ZU,Ge.PG],styles:["[_nghost-%COMP%]{display:block;max-width:640px}.description-editor-placeholder[_ngcontent-%COMP%]{pointer-events:none;-webkit-user-select:none;user-select:none;position:absolute;inset:0;display:flex;align-items:center}.description-editor-preview[_ngcontent-%COMP%]{position:relative;min-height:32px}.description-editor-preview.empty[_ngcontent-%COMP%]{display:flex;align-items:center;padding:10px}.task-description-editor[_ngcontent-%COMP%]{padding-left:12px;padding-right:12px;padding-bottom:12px;margin-left:-12px;margin-right:-12px;margin-bottom:-12px}"],changeDetection:0}),U})();var Y=s(59556),d0=s(78645),C0=s(59773),$0=s(38365),a1=s(92574),q1=s(19035),x1=s(82962),B1=s(13740),j1=s(48128),Me=s(29402);const Re=["subTaskInput"];function P1(u,U){1&u&&(e.TgZ(0,"span")(1,"button",18)(2,"span",19),e._UZ(3,"span",20),e.qZA()()()),2&u&&(e.xp6(1),e.Q6J("nzTooltipTitle","No members assigned to this task")("nzSize","small")("nzType","dashed")("nzShape","circle"),e.xp6(1),e.Q6J("nzType","secondary"))}function Xe(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",21),e.NdJ("nzOnConfirm",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw(2);return e.KtG(C.deleteTask(z.id,z))}),e._UZ(1,"span",22),e.qZA()}2&u&&(e.Q6J("nzOkText","Yes")("nzPopconfirmTitle","Are you sure?")("nzSize","small")("nzTooltipPlacement","top")("nzTooltipTitle","Delete")("nzType","default"),e.xp6(1),e.Q6J("nzType","delete"))}function Ce(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw(2);return e.KtG(C.editTask(z))}),e._UZ(1,"span",24),e.qZA()}2&u&&e.Q6J("nzTooltipPlacement","top")("nzTooltipTitle","Edit")("nzType","default")}const G1=function(){return[]};function Ee(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"tr",9)(1,"td",10),e.NdJ("click",function(){const C=e.CHM(b).$implicit,s0=e.oxw(2);return e.KtG(s0.editTask(C))}),e._uU(2),e.qZA(),e.TgZ(3,"td",10),e.NdJ("click",function(){const C=e.CHM(b).$implicit,s0=e.oxw(2);return e.KtG(s0.editTask(C))}),e.TgZ(4,"nz-tag",11),e._uU(5),e.qZA()(),e.TgZ(6,"td",12),e.NdJ("click",function(){const C=e.CHM(b).$implicit,s0=e.oxw(2);return e.KtG(s0.editTask(C))}),e.TgZ(7,"nz-tag",11),e._uU(8),e.qZA()(),e.TgZ(9,"td",12),e.NdJ("click",function(){const C=e.CHM(b).$implicit,s0=e.oxw(2);return e.KtG(s0.editTask(C))}),e.YNc(10,P1,4,5,"span",8),e._UZ(11,"worklenz-avatars",13),e.qZA(),e.TgZ(12,"td",14)(13,"div",15)(14,"nz-space"),e.YNc(15,Xe,2,7,"button",16),e.YNc(16,Ce,2,3,"button",17),e.qZA()()()()}if(2&u){const b=U.$implicit;e.xp6(1),e.ekj("text-decoration-line-through",b.is_complete||b.completed_at),e.xp6(1),e.hij("",b.name," "),e.xp6(2),e.Q6J("nzColor",b.priority_color),e.xp6(1),e.Oqu(b.priority_name),e.xp6(2),e.Q6J("nzColor",b.status_color),e.xp6(1),e.hij(" ",b.status_name," "),e.xp6(2),e.Q6J("ngIf",!(null!=b.names&&b.names.length)),e.xp6(1),e.Q6J("names",b.names||e.DdM(9,G1))}}function je(u,U){if(1&u&&(e.ynx(0),e.TgZ(1,"tr",25)(2,"td",26),e._UZ(3,"worklenz-task-list-add-task-input",27,28),e.qZA()(),e.BQk()),2&u){const b=e.oxw(2);e.xp6(3),e.Q6J("projectId",b.service.model.task.project_id)("groupId",b.groupId)("label","Add sub-task")("parentTask",b.service.model.task.id||null)("subTaskInput",!0)}}function Qe(u,U){if(1&u&&(e.TgZ(0,"nz-skeleton",2)(1,"nz-card",3),e._UZ(2,"nz-progress",4),e.TgZ(3,"nz-table",5,6)(5,"tbody"),e.YNc(6,Ee,17,10,"tr",7),e.YNc(7,je,5,5,"ng-container",8),e.qZA()()()()),2&u){const b=e.MAs(4),p=e.oxw(),z=e.MAs(2);e.Q6J("nzActive",!0)("nzLoading",p.loading),e.xp6(2),e.Q6J("nzPercent",p.getSubTasksProgress()),e.xp6(1),e.Q6J("nzSize","small")("nzData",p.tasks)("nzShowPagination",!1)("nzFrontPagination",!1)("nzNoResult",z),e.xp6(3),e.Q6J("ngForOf",b.data)("ngForTrackBy",p.trackBy),e.xp6(1),e.Q6J("ngIf",p.service.model.task&&p.service.model.task.project_id)}}function st(u,U){1&u&&e._UZ(0,"span")}let lt=(()=>{var u;class U{get taskId(){return this.service.model.task?.id||null}constructor(p,z,C,s0,r,x,O,i,o){this.api=p,this.tasksApi=z,this.ref=C,this.socket=s0,this.list=r,this.map=x,this.service=O,this.kanbanService=i,this.roadmapService=o,this.taskName=null,this.projectId=null,this.onCreateOrUpdate=new e.vpe,this.groupId=null,this.loading=!1,this.deleting=!1,this.tasks=[],this.destroy$=new d0.x,this.handleNewTaskReceive=q=>{if(!q)return;const w=[...this.tasks];w.push(q),this.tasks=w;const y0=this.service.model.task;if(y0&&(y0.complete_ratio=Number(q.complete_ratio)||0,y0.sub_tasks_count=Number(y0.sub_tasks_count)||0,y0.sub_tasks_count+=1,this.service.model.task&&(this.service.model.task.sub_tasks_count=Number(this.service.model.task.sub_tasks_count)||0,this.service.model.task.sub_tasks_count+=1),this.service.model.task=y0,y0.id)){const J0=this.map.getGroupId(y0.id);J0&&this.list.addTask(q,J0)}this.subTaskInput?.reset(!1),this.ref.detectChanges()},this.handleStatusChangeResponse=q=>{this.service.model.task&&q&&(this.service.model.task.complete_ratio=q.complete_ratio,this.ref.detectChanges())},this.service.onRefreshSubTasks().pipe((0,C0.R)(this.destroy$)).subscribe(()=>{this.get()})}ngOnInit(){this.taskId&&(this.groupId=this.map.getGroupId(this.taskId)),this.get(),this.socket.on(v.C.QUICK_TASK.toString(),this.handleNewTaskReceive),this.socket.on(v.C.TASK_STATUS_CHANGE.toString(),this.handleStatusChangeResponse)}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete(),this.socket.removeListener(v.C.QUICK_TASK.toString(),this.handleNewTaskReceive),this.socket.removeListener(v.C.TASK_STATUS_CHANGE.toString(),this.handleStatusChangeResponse),this.tasks=[]}getColor(p){return J.Lj[p?.charAt(0).toUpperCase()||"A"]}get(){var p=this;return(0,M.Z)(function*(){if(p.taskId){try{p.loading=!0,p.ref.detectChanges();const z=yield p.api.get(p.taskId);z.done&&(p.tasks=z.body),p.loading=!1}catch(z){(0,n.tu)(z),p.loading=!1}p.ref.detectChanges()}})()}deleteTask(p,z){var C=this;return(0,M.Z)(function*(){if(p)try{if(C.deleting=!0,(yield C.tasksApi.delete(p)).done){const r={parent_task_id:z.parent_task_id};C.service.model.task&&(C.service.model.task.sub_tasks_count=Math.max((C.service.model.task?.sub_tasks_count||0)-1,0)),C.list.deleteTask(p),C.list.emitRefresh(),C.kanbanService.emitDeleteSubTask(r),C.roadmapService.deleteSubtaskFromView(p),C.socket.emit(v.C.GET_TASK_PROGRESS.toString(),z.parent_task_id),(0,Y.Xk)(),yield C.get()}C.deleting=!1}catch(s0){C.deleting=!1,(0,n.tu)(s0)}})()}editTask(p){p?.id&&this.service.emitSubTaskSelect(p)}onTaskCreateOrUpdate(){this.get(),this.onCreateOrUpdate.emit()}trackBy(p,z){return z?.id}getSubTasksProgress(){const p=this.service.model.task?.complete_ratio||0;return p==1/0?0:p}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36($0.s),e.Y36(S.c),e.Y36(e.sBO),e.Y36(a0.s),e.Y36(E.b),e.Y36(t.g),e.Y36(n0.f),e.Y36(I.m),e.Y36(F0.s))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-sub-tasks"]],viewQuery:function(p,z){if(1&p&&e.Gf(Re,5),2&p){let C;e.iGM(C=e.CRH())&&(z.subTaskInput=C.first)}},inputs:{taskName:"taskName",projectId:"projectId"},outputs:{onCreateOrUpdate:"onCreateOrUpdate"},decls:3,vars:1,consts:[[3,"nzActive","nzLoading",4,"ngIf"],["subTasksEmptyTemplate",""],[3,"nzActive","nzLoading"],[1,"body-padding-0","border-0"],[1,"sub-tasks-progress",3,"nzPercent"],[1,"custom-table","thead-height-0",3,"nzSize","nzData","nzShowPagination","nzFrontPagination","nzNoResult"],["table",""],["class","actions-row",4,"ngFor","ngForOf","ngForTrackBy"],[4,"ngIf"],[1,"actions-row"],["nz-typography","",1,"cursor-pointer",3,"click"],[1,"text-dark","task-list-label",3,"nzColor"],[1,"cursor-pointer",3,"click"],[3,"names"],["nzAlign","center",1,"actions-col","py-0"],[1,"actions"],["nz-button","","nz-popconfirm","","nz-tooltip","",3,"nzOkText","nzPopconfirmTitle","nzSize","nzTooltipPlacement","nzTooltipTitle","nzType","nzOnConfirm",4,"nzSpaceItem"],["nz-button","","nz-tooltip","","nzSize","small",3,"nzTooltipPlacement","nzTooltipTitle","nzType","click",4,"nzSpaceItem"],["nz-tooltip","","nz-button","",3,"nzTooltipTitle","nzSize","nzType","nzShape"],["nz-typography","",3,"nzType"],["nz-icon","","nzType","user","nzTheme","outline"],["nz-button","","nz-popconfirm","","nz-tooltip","",3,"nzOkText","nzPopconfirmTitle","nzSize","nzTooltipPlacement","nzTooltipTitle","nzType","nzOnConfirm"],["nz-icon","",3,"nzType"],["nz-button","","nz-tooltip","","nzSize","small",3,"nzTooltipPlacement","nzTooltipTitle","nzType","click"],["nz-icon","","nzType","edit"],[1,"cursor-pointer","sub-task-background-color"],["colspan","5",1,"p-1","ps-3"],[3,"projectId","groupId","label","parentTask","subTaskInput"],["subTaskInput",""]],template:function(p,z){1&p&&(e.YNc(0,Qe,8,11,"nz-skeleton",0),e.YNc(1,st,1,0,"ng-template",null,1,e.W1O)),2&p&&e.Q6J("ngIf",z.taskId)},dependencies:[f0.sg,f0.O5,j0.ng,h0.j,E0.o,N0.ZU,T0.SY,D0.Ls,A0.ix,Z.w,p0.dQ,a1.NU,a1.$1,q1.JW,x1.bd,B1.N8,B1.Uo,B1.p0,B1.$Z,B1.UX,j1.M,Me.J],styles:[".sub-tasks-progress[_ngcontent-%COMP%]{position:relative;top:-10px}"],changeDetection:0}),U})();var Ve=s(44568),Ze=s(26857),Q1=s(10708),me=s(69862);let re=(()=>{var u;class U extends Ze.P{constructor(p){super(),this.http=p}create(p){return this._post(this.http,`${this.API_BASE_URL}/task-comments`,p)}getByTaskId(p){return this._get(this.http,`${this.API_BASE_URL}/task-comments/${p}`)}update(p,z){return this._put(this.http,`${this.API_BASE_URL}/task-comments/${p}`,z)}deleteAttachment(p,z){return(0,Q1.n)(this.http.delete(`${this.API_BASE_URL}/task-comments/attachment/${p}/${z}`))}download(p,z){return this._get(this.http,`${this.API_BASE_URL}/task-comments/download?id=${p}&file=${z}`)}delete(p,z){return(0,Q1.n)(this.http.delete(`${this.API_BASE_URL}/task-comments/${p}/${z}`))}updateReaction(p,z){return this._put(this.http,`${this.API_BASE_URL}/task-comments/reaction/${p}${(0,n.UK)(z)}`)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.LFG(me.eN))},u.\u0275prov=e.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),U})();var ct=s(69234),Pe=s(81221),Mt=s(82669);function dt(u,U){if(1&u&&(e.TgZ(0,"small")(1,"p",20),e._uU(2),e.qZA(),e.TgZ(3,"p",20),e._uU(4),e.qZA(),e.TgZ(5,"p",20),e._uU(6),e.ALo(7,"date"),e.qZA()()),2&u){const b=e.oxw(2);e.xp6(2),e.Oqu(b.attachment.name),e.xp6(2),e.Oqu(b.attachment.size),e.xp6(2),e.Oqu(e.xi3(7,3,b.attachment.created_at,"medium"))}}function zt(u,U){1&u&&e._UZ(0,"span",21)}function Ue(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",5)(1,"div",6),e.YNc(2,dt,8,6,"ng-template",null,7,e.W1O),e.TgZ(4,"div",8),e._UZ(5,"img",9),e.TgZ(6,"div",10)(7,"a",11),e.YNc(8,zt,1,0,"span",12),e.qZA()()(),e.TgZ(9,"span",13)(10,"button",14),e.NdJ("click",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.previewFile(z.attachment.url,z.attachment.id,z.attachment.name))}),e._UZ(11,"span",15),e.qZA(),e.TgZ(12,"button",16),e.NdJ("click",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.download(z.attachment.id,z.attachment.name))}),e._UZ(13,"span",17),e.qZA(),e.TgZ(14,"button",18),e.NdJ("nzOnConfirm",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.delete(z.attachment.id))}),e._UZ(15,"span",19),e.qZA()()()()}if(2&u){const b=e.MAs(3),p=e.oxw();e.xp6(1),e.Q6J("nzTooltipTitle",b)("nzTooltipPlacement","bottom"),e.xp6(4),e.Q6J("src","/assets/images/files/"+p.getFileIcon(p.attachment.type),e.LSH),e.xp6(1),e.Udp("background-image",p.isImageFile()?"url("+p.attachment.url+")":""),e.xp6(1),e.Q6J("href",p.attachment.url,e.LSH),e.xp6(1),e.Q6J("ngIf",!p.isImageFile()),e.xp6(4),e.Q6J("nzLoading",p.downloading),e.xp6(2),e.Q6J("nzOkText","Yes")("nzPopconfirmTitle","Are you sure?")("nzLoading",p.deleting)}}function u0(u,U){1&u&&e._UZ(0,"span",26)}function o1(u,U){if(1&u&&(e.ynx(0),e._UZ(1,"nz-spin",27)(2,"img",28),e.BQk()),2&u){e.oxw();const b=e.MAs(4),p=e.oxw();e.xp6(1),e.Q6J("nzIndicator",b),e.xp6(1),e.Q6J("src",p.currentFileUrl,e.LSH)}}function _0(u,U){if(1&u&&(e.ynx(0),e._UZ(1,"nz-spin",27),e.TgZ(2,"video",29),e._UZ(3,"source",30),e.qZA(),e.BQk()),2&u){e.oxw();const b=e.MAs(4),p=e.oxw();e.xp6(1),e.Q6J("nzIndicator",b),e.xp6(2),e.Q6J("src",p.currentFileUrl,e.LSH)}}function G(u,U){if(1&u&&(e.ynx(0),e._UZ(1,"nz-spin",27),e.TgZ(2,"audio",29),e._UZ(3,"source",31),e.qZA(),e.BQk()),2&u){e.oxw();const b=e.MAs(4),p=e.oxw();e.xp6(1),e.Q6J("nzIndicator",b),e.xp6(2),e.Q6J("src",p.currentFileUrl,e.LSH)}}function k0(u,U){if(1&u&&e._UZ(0,"ngx-doc-viewer",33),2&u){const b=e.oxw(3);e.Q6J("url",b.currentFileUrl)}}function t1(u,U){if(1&u&&(e.ynx(0),e._UZ(1,"nz-spin",27),e.YNc(2,k0,1,1,"ngx-doc-viewer",32),e.BQk()),2&u){e.oxw();const b=e.MAs(4),p=e.oxw();e.xp6(1),e.Q6J("nzIndicator",b),e.xp6(1),e.Q6J("ngIf",p.currentFileUrl)}}function w1(u,U){1&u&&(e.ynx(0),e.TgZ(1,"p"),e._uU(2,"The preview for this file type is not available."),e.qZA(),e.BQk())}function v1(u,U){if(1&u&&(e.ynx(0),e.TgZ(1,"div",22)(2,"div",23),e.YNc(3,u0,1,0,"ng-template",null,24,e.W1O),e.qZA(),e.YNc(5,o1,3,2,"ng-container",25),e.YNc(6,_0,4,2,"ng-container",25),e.YNc(7,G,4,2,"ng-container",25),e.YNc(8,t1,3,2,"ng-container",25),e.YNc(9,w1,3,0,"ng-container",25),e.qZA(),e.BQk()),2&u){const b=e.oxw();e.xp6(5),e.Q6J("ngIf","image"===b.currentFileType),e.xp6(1),e.Q6J("ngIf","video"===b.currentFileType),e.xp6(1),e.Q6J("ngIf","audio"===b.currentFileType),e.xp6(1),e.Q6J("ngIf","document"===b.currentFileType),e.xp6(1),e.Q6J("ngIf","unknown"===b.currentFileType)}}function ne(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",35),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.download(z.previewdFileId,z.previewdFileName))}),e._UZ(1,"span",17),e._uU(2," Download "),e.qZA()}if(2&u){const b=e.oxw(2);e.Q6J("nzLoading",b.downloading)}}function Le(u,U){if(1&u&&(e.TgZ(0,"div"),e.YNc(1,ne,3,1,"button",34),e.qZA()),2&u){const b=e.oxw();e.xp6(1),e.Q6J("ngIf",b.previewdFileId&&b.previewdFileName)}}function Ke(u,U){if(1&u&&(e.TgZ(0,"span",36),e._uU(1),e.qZA()),2&u){const b=e.oxw();e.xp6(1),e.Oqu(null==b.attachment?null:b.attachment.name)}}let ke=(()=>{var u;class U{constructor(p,z,C,s0){this.api=p,this.commentsApi=z,this.ngZone=C,this.cdr=s0,this.attachment=null,this.onDelete=new e.vpe,this.isCommentAttachment=!1,this.deleting=!1,this.isVisible=!1,this.currentFileUrl=null,this.currentFileType=null,this.previewWidth=768,this.downloading=!1,this.previewdFileId=null,this.previewdFileName=null}download(p,z){var C=this;return(0,M.Z)(function*(){if(p&&z){try{C.downloading=!0;const s0=C.isCommentAttachment?yield C.commentsApi.download(p,z):yield C.api.download(p,z);s0&&s0.done&&C.ngZone.runOutsideAngular(()=>{const r=document.createElement("a");r.href=s0.body,r.download=z,r.click(),r.remove()})}catch(s0){(0,n.tu)(s0),C.downloading=!1}C.downloading=!1,C.cdr.markForCheck()}})()}isImageFile(){const z=this.attachment?.type;return!!z&&["jpeg","jpg","bmp","gif","webp","png","ico"].includes(z)}getFileIcon(p){return(0,n.LP)(p)}open(p){p&&(this.isVisible=!0,this.cdr.markForCheck())}delete(p){p&&(this.deleting=!0,this.onDelete.emit(p),this.cdr.markForCheck())}handleCancel(){this.isVisible=!1,this.previewdFileId=null,this.previewdFileName=null,this.cdr.markForCheck()}previewFile(p,z,C){if(!p||!z||!C)return;this.previewdFileId=z,this.previewdFileName=C;const s0=p.split(".").pop()?.toLowerCase();s0&&(this.isVisible=!0,this.isImage(s0)?this.currentFileType="image":this.isVideo(s0)?this.currentFileType="video":this.isAudio(s0)?(this.previewWidth=600,this.currentFileType="audio"):this.isDoc(s0)?this.currentFileType="document":(this.previewWidth=600,this.currentFileType="unknown"),this.currentFileUrl=p,this.cdr.markForCheck())}isImage(p){return["jpg","jpeg","png","gif","webp","bmp","ico"].includes(p)}isVideo(p){return["mp4","webm","ogg"].includes(p)}isAudio(p){return["mp3","wav","ogg"].includes(p)}isDoc(p){return this.previewWidth=1024,["ppt","pptx","doc","docx","xls","xlsx","pdf"].includes(p)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(Ve.J),e.Y36(re),e.Y36(e.R0b),e.Y36(e.sBO))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-attachments-thumb"]],inputs:{attachment:"attachment",isCommentAttachment:"isCommentAttachment"},outputs:{onDelete:"onDelete"},decls:6,vars:4,consts:[["class","ant-upload-list-picture-card-container",4,"ngIf"],["nzCentered","",1,"attachment-preview-modal",3,"nzVisible","nzTitle","nzWidth","nzVisibleChange","nzOnCancel"],[4,"nzModalContent"],[4,"nzModalFooter"],["title",""],[1,"ant-upload-list-picture-card-container"],["nz-tooltip","",1,"ant-upload-list-item","ant-upload-list-item-done","ant-upload-list-item-list-type-picture-card","ng-trigger","ng-trigger-itemState",3,"nzTooltipTitle","nzTooltipPlacement"],["tooltipTitleContent",""],[1,"ant-upload-list-item-info"],["alt","",1,"file-icon",3,"src"],[1,"ant-upload-span"],["target","_blank","rel","noopener noreferrer",1,"ant-upload-list-item-thumbnail",3,"href"],["nz-icon","","nzType","file-unknown","nzTheme","outline","style","font-size: 34px;margin-top: 23px;color: #cccccc;",4,"ngIf"],[1,"ant-upload-list-item-actions"],["nz-button","","nzType","text","nzSize","small","type","button","title","Preview file",3,"click"],["nz-icon","","nzType","eye","nzTheme","outline"],["nz-button","","nzType","text","nzSize","small","type","button","title","Download file",1,"ant-upload-list-item-card-actions-btn",3,"nzLoading","click"],["nz-icon","","nzType","download","nzTheme","outline"],["type","button","nz-button","","nztype","text","nzSize","small","nz-popconfirm","","title","Remove file",1,"ant-btn","ant-upload-list-item-card-actions-btn","ant-btn-text","ant-btn-sm","ant-btn-icon-only",3,"nzOkText","nzPopconfirmTitle","nzLoading","nzOnConfirm"],["nz-icon","","nzType","delete","nzTheme","outline"],[1,"mb-0"],["nz-icon","","nzType","file-unknown","nzTheme","outline",2,"font-size","34px","margin-top","23px","color","#cccccc"],[1,"preview-container","text-center","position-relative"],[1,"loader"],["indicatorTemplate",""],[4,"ngIf"],["nz-icon","","nzType","loading",2,"font-size","24px"],["nzSimple","",3,"nzIndicator"],[1,"img-fluid","position-relative",3,"src"],["controls","",1,"position-relative"],["type","video/mp4",3,"src"],["type","audio/mpeg",3,"src"],["viewer","google","class","w-100 position-relative",3,"url",4,"ngIf"],["viewer","google",1,"w-100","position-relative",3,"url"],["nz-button","","nzType","default",3,"nzLoading","click",4,"ngIf"],["nz-button","","nzType","default",3,"nzLoading","click"],["nz-typography",""]],template:function(p,z){if(1&p&&(e.YNc(0,Ue,16,11,"div",0),e.TgZ(1,"nz-modal",1),e.NdJ("nzVisibleChange",function(s0){return z.isVisible=s0})("nzOnCancel",function(){return z.handleCancel()}),e.YNc(2,v1,10,5,"ng-container",2),e.YNc(3,Le,2,1,"div",3),e.qZA(),e.YNc(4,Ke,2,1,"ng-template",null,4,e.W1O)),2&p){const C=e.MAs(5);e.Q6J("ngIf",z.attachment),e.xp6(1),e.Q6J("nzVisible",z.isVisible)("nzTitle",C)("nzWidth",z.previewWidth)}},dependencies:[f0.O5,N0.ZU,T0.SY,D0.Ls,A0.ix,Z.w,p0.dQ,q1.JW,ct.zr,Pe.du,Pe.Uh,Pe.Hf,Mt.W,f0.uU],styles:[".file-icon[_ngcontent-%COMP%]{width:30px;position:absolute;z-index:1;background:#fff;top:-7px;left:-7px;border-radius:4px;padding:3px 0;border:1px solid #d9d9d9}ngx-doc-viewer[_ngcontent-%COMP%]{width:100%;height:80vh}.preview-container[_ngcontent-%COMP%]{max-width:1024px}video[_ngcontent-%COMP%]{max-width:100%}nz-spin[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;z-index:0}.ant-upload-span[_ngcontent-%COMP%]{min-height:86px;max-width:86px;background-size:cover;background-repeat:no-repeat;background-position:center}"],changeDetection:0}),U})();function De(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"worklenz-task-view-attachments-thumb",13),e.NdJ("onDelete",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.delete(z))}),e.qZA()}2&u&&e.Q6J("attachment",U.$implicit)}function At(u,U){1&u&&e._UZ(0,"span",14)}function ut(u,U){1&u&&e._UZ(0,"span",15)}function _t(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-control",2)(2,"div",3,4),e.NdJ("drop",function(z){e.CHM(b);const C=e.MAs(8),s0=e.MAs(3),r=e.oxw();return e.KtG(r.onDrop(z,C,s0))})("dragover",function(z){e.CHM(b);const C=e.MAs(3),s0=e.oxw();return e.KtG(s0.onDragOver(z,C))}),e.YNc(4,De,1,1,"worklenz-task-view-attachments-thumb",5),e.TgZ(5,"div",6)(6,"div",7),e.NdJ("click",function(){e.CHM(b);const z=e.MAs(8);return e.KtG(z.click())}),e.TgZ(7,"input",8,9),e.NdJ("change",function(){e.CHM(b);const z=e.MAs(8),C=e.oxw();return e.KtG(C.uploadFile(z))}),e.qZA(),e.TgZ(9,"div"),e.YNc(10,At,1,0,"span",10),e.YNc(11,ut,1,0,"span",11),e.TgZ(12,"div",12),e._uU(13),e.qZA()()()()()()()}if(2&u){const b=e.oxw();e.xp6(1),e.Q6J("nzSpan",null),e.xp6(3),e.Q6J("ngForOf",b.fileList),e.xp6(6),e.Q6J("ngIf",!b.uploading),e.xp6(1),e.Q6J("ngIf",b.uploading),e.xp6(2),e.Oqu(b.uploading?"Uploading":"Choose or drop file to upload")}}let ht=(()=>{var u;class U{get taskId(){return this.service.model.task?.id}get projectId(){return this.service.model.task?.project_id}constructor(p,z,C){this.api=p,this.service=z,this.cdr=C,this.fileList=[],this.onFileRemoved=new e.vpe,this.onFileUploaded=new e.vpe,this.uploadingChange=new e.vpe,this.uploading=!1,this.loading=!1}ngOnInit(){this.get()}ngOnDestroy(){this.fileList=[]}get(){var p=this;return(0,M.Z)(function*(){if(p.taskId)try{const z=yield p.api.getTaskAttachment(p.taskId);z.done&&(p.fileList=z.body,p.service.model.task&&(p.service.model.task.attachments_count=p.fileList.length),p.cdr.detectChanges())}catch(z){(0,n.tu)(z)}})()}delete(p){var z=this;return(0,M.Z)(function*(){if(p){z.onFileRemoved.emit(p);try{if((yield z.api.deleteTaskAttachment(p)).done)if(z.taskId)yield z.get(),z.service.emitAttachmentsChange(z.taskId,z.service.model.task?.attachments_count||0);else{const s0=z.fileList.findIndex(r=>r.id===p);z.fileList.splice(s0,1),z.cdr.detectChanges()}}catch(C){(0,n.tu)(C)}}})()}uploadFile(p){var z=this;return(0,M.Z)(function*(){const C=Array.from(p.files||[]);if(C.length&&z.projectId){z.uploading=!0,z.uploadingChange.emit(!0);try{for(const s0 of C){const x={file:yield(0,n.y3)(s0),file_name:s0.name,task_id:z.taskId,project_id:z.projectId,size:s0.size},O=yield z.api.createTaskAttachment(x);O.done&&O.body&&(z.onFileUploaded.emit(O.body.id),z.taskId?(yield z.get(),z.service.emitAttachmentsChange(z.taskId,z.service.model.task?.attachments_count||0)):z.fileList.push(O.body))}}catch(s0){(0,n.tu)(s0)}finally{z.uploading=!1,z.uploadingChange.emit(!1);const s0=new DataTransfer;p.files=s0.files,z.cdr.detectChanges()}}})()}onPasteListener(p){}onDrop(p,z,C){var s0=this;return(0,M.Z)(function*(){p.preventDefault(),z.files=p.dataTransfer.files,yield s0.uploadFile(z),s0.focusButton(!1,C)})()}onDragOver(p,z){p.stopPropagation(),p.preventDefault(),this.focusButton(!0,z)}focusButton(p,z){p?z.classList.add("focused"):z.classList.remove("focused")}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(Ve.J),e.Y36(n0.f),e.Y36(e.sBO))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-attachments"]],hostBindings:function(p,z){1&p&&e.NdJ("paste",function(s0){return z.onPasteListener(s0)},!1,e.evT)},outputs:{onFileRemoved:"onFileRemoved",onFileUploaded:"onFileUploaded",uploadingChange:"uploadingChange"},decls:1,vars:1,consts:[["class","w-100 mb-0","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-0"],[3,"nzSpan"],[1,"ant-upload-list","ant-upload-list-picture-card",3,"drop","dragover"],["uploadBtn",""],[3,"attachment","onDelete",4,"ngFor","ngForOf"],[1,"ant-upload","ant-upload-select","ant-upload-select-picture-card"],["tabindex","0","role","button",1,"ant-upload",3,"click"],["type","file","multiple","",2,"display","none",3,"change"],["fileInput",""],["nz-icon","","nzType","plus","nzTheme","outline",4,"ngIf"],["nz-icon","","nzType","loading","nzTheme","outline",4,"ngIf"],[2,"margin-top","8px","font-size","11px","margin-left","auto","margin-right","auto","padding-left","8px","padding-right","8px"],[3,"attachment","onDelete"],["nz-icon","","nzType","plus","nzTheme","outline"],["nz-icon","","nzType","loading","nzTheme","outline"]],template:function(p,z){1&p&&e.YNc(0,_t,14,5,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.projectId)},dependencies:[f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.Fd,D0.Ls,Z.w,ke],styles:[".ant-upload-list[_ngcontent-%COMP%]{border:1px dashed transparent;transition:.15s all;padding-top:8px;padding-left:8px}.focused[_ngcontent-%COMP%]{border-color:#1890ff;background-color:#fafafa}"],changeDetection:0}),U})();var et=s(61320),tt=s(90586),at=s(45538),$=s(36513);function j(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",9),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.cancel())}),e._uU(1,"Discard"),e.qZA()}}function m0(u,U){if(1&u&&(e.TgZ(0,"button",10),e._uU(1,"Update"),e.qZA()),2&u){const b=e.oxw(2);e.Q6J("disabled",!b.isValid())}}function O0(u,U){1&u&&(e.TgZ(0,"div",6)(1,"nz-space"),e.YNc(2,j,2,0,"button",7),e.YNc(3,m0,2,1,"button",8),e.qZA()())}const w0=function(u,U){return{minRows:u,maxRows:U}};let V0=(()=>{var u;class U{get taskId(){return this.service.model.task?.id}constructor(p,z,C,s0,r,x,O,i){this.fb=p,this.app=z,this.teamMembersApi=C,this.commentsApi=s0,this.cdr=r,this.service=x,this.utils=O,this.auth=i,this.focusChange=new e.vpe,this.commentData={},this.updatedChange=new e.vpe,this.commentsInputFocused=!0,this.loadingMembers=!1,this.creatingComment=!1,this.teamMembers=[],this.search=null,this.mentions=[],this.valueWith=o=>o.name,this.form=this.fb.group({content:[null,[c0.kI.required,c0.kI.maxLength(2e3)]]})}get rows(){return this.commentsInputFocused?4:1}ngOnInit(){this.getTeamMembers(),this.commentData&&this.form.patchValue({content:this.commentData.rawContent})}ngAfterViewInit(){setTimeout(()=>{this.cdr.detectChanges()},10)}ngOnDestroy(){this.teamMembers=[],this.search=null,this.mentions=[]}getTeamMembers(){var p=this;return(0,M.Z)(function*(){try{p.loadingMembers=!0;const z=yield p.teamMembersApi.get(1,100,null,null,p.search);z.done&&z.body.data&&(p.teamMembers=z.body.data.filter(C=>!C.pending_invitation)),p.loadingMembers=!1}catch(z){p.loadingMembers=!1,(0,n.tu)(z)}p.cdr.markForCheck()})()}update(){var p=this;return(0,M.Z)(function*(){if(p.taskId&&p.form.value.content&&p.commentData.id){try{p.creatingComment=!0;const z={comment_id:p.commentData.id,task_id:p.taskId,content:p.form.value.content,mentions:[...new Set(p.mentions||[])]};(yield p.commentsApi.update(p.commentData.id,z)).done&&(p.form.reset(),p.service.emitCommentsChange(p.taskId,1),(0,Y.MK)()),p.creatingComment=!1}catch(z){(0,n.tu)(z),p.creatingComment=!1}p.cdr.markForCheck()}})()}submit(){this.form.valid?this.update():this.app.displayErrorsOf(this.form)}cancel(){this.setFocus(!1),this.form.reset(),this.updatedChange.emit(this.commentData)}onSearchChange({value:p}){this.search=p,this.getTeamMembers()}onSelect(p){!p||!p.id||!p.name||this.mentions.some(z=>z.team_member_id===p.id)||this.mentions.push({team_member_id:p.id,name:p.name})}trackById(p,z){return z.id}setFocus(p,z){this.commentsInputFocused=p,this.focusChange?.emit(p),z?.focus()}isValid(){return this.form.valid}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(c0.qu),e.Y36(tt.z),e.Y36(at.B),e.Y36(re),e.Y36(e.sBO),e.Y36(n0.f),e.Y36(Q.F),e.Y36(H0.e))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-comment-edit"]],inputs:{commentData:"commentData"},outputs:{focusChange:"focusChange",updatedChange:"updatedChange"},decls:6,vars:14,consts:[["nz-form","",3,"formGroup","submit"],[3,"nzSuggestions","nzValueWith","nzLoading","nzNotFoundContent","nzOnSearchChange","nzOnSelect","click"],[3,"nzMaxCharacterCount"],["nz-input","","placeholder","Add a comment...","nzMentionTrigger","",1,"border-0",3,"rows","nzAutosize","formControlName","maxlength"],["input",""],["class","mt-3 justify-content-end d-flex",4,"ngIf"],[1,"mt-3","justify-content-end","d-flex"],["type","button","nz-button","","nzType","default",3,"click",4,"nzSpaceItem"],["type","submit","nz-button","","nzType","primary",3,"disabled",4,"nzSpaceItem"],["type","button","nz-button","","nzType","default",3,"click"],["type","submit","nz-button","","nzType","primary",3,"disabled"]],template:function(p,z){if(1&p){const C=e.EpF();e.TgZ(0,"form",0),e.NdJ("submit",function(){return z.submit()}),e.TgZ(1,"nz-mention",1),e.NdJ("nzOnSearchChange",function(r){return z.onSearchChange(r)})("nzOnSelect",function(r){return z.onSelect(r)})("click",function(){e.CHM(C);const r=e.MAs(4);return e.KtG(z.setFocus(!0,r))}),e.TgZ(2,"nz-textarea-count",2),e._UZ(3,"textarea",3,4),e.qZA()(),e.YNc(5,O0,4,0,"div",5),e.qZA()}2&p&&(e.Q6J("formGroup",z.form),e.xp6(1),e.Q6J("nzSuggestions",z.teamMembers)("nzValueWith",z.valueWith)("nzLoading",z.loadingMembers)("nzNotFoundContent","No members found!"),e.xp6(1),e.Q6J("nzMaxCharacterCount",5e3),e.xp6(1),e.Q6J("rows",z.rows)("nzAutosize",e.WLB(11,w0,z.rows,z.rows))("formControlName","content")("maxlength",2e3),e.xp6(2),e.Q6J("ngIf",z.commentsInputFocused))},dependencies:[f0.O5,r0.Lr,c0._Y,c0.Fj,c0.JJ,c0.JL,c0.nD,b0.w,b0.Zp,b0.rh,c0.sg,c0.u,A0.ix,Z.w,p0.dQ,a1.NU,a1.$1,$.YW,$.jO],styles:["nz-mention[_ngcontent-%COMP%]{cursor:text}"]}),U})();var M1=s(34302);const A1=["commentsView"];function T1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"worklenz-task-view-attachments-thumb",14),e.NdJ("onDelete",function(z){e.CHM(b);const C=e.oxw(5);return e.KtG(C.deleteAttachment(z))}),e.qZA()}2&u&&e.Q6J("attachment",U.$implicit)("isCommentAttachment",!0)}function S1(u,U){if(1&u&&(e.TgZ(0,"nz-comment-content"),e._UZ(1,"p",11),e.TgZ(2,"div",12),e.YNc(3,T1,1,2,"worklenz-task-view-attachments-thumb",13),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("innerHTML",b.content,e.oJD),e.xp6(2),e.Q6J("ngForOf",b.attachments)}}function R1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"worklenz-task-view-comment-edit",16),e.NdJ("updatedChange",function(z){e.CHM(b);const C=e.oxw(5);return e.KtG(C.commentUpdated(z))}),e.qZA()}if(2&u){const b=e.oxw(2).$implicit;e.Q6J("commentData",b)}}function W1(u,U){if(1&u&&(e.TgZ(0,"nz-comment-content"),e.YNc(1,R1,1,1,"worklenz-task-view-comment-edit",15),e.qZA()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",b.edit)}}function I1(u,U){if(1&u&&(e.TgZ(0,"div"),e._uU(1),e.qZA()),2&u){const b=U.$implicit;e.xp6(1),e.Oqu(b)}}function D1(u,U){if(1&u&&e.YNc(0,I1,2,1,"div",17),2&u){const b=e.oxw().$implicit;e.Q6J("ngForOf",null==b.reactions||null==b.reactions.likes?null:b.reactions.likes.liked_members)}}function xe(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-comment-action")(1,"span",18),e.NdJ("nzOnConfirm",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw(3);return e.KtG(C.deleteComment(z.id))}),e._uU(2," Delete "),e.qZA()()}2&u&&(e.xp6(1),e.Q6J("nzPopconfirmTitle","Are you sure?"))}function ze(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-comment",6),e.ALo(1,"fromNow"),e._UZ(2,"nz-avatar",7),e.ALo(3,"firstCharUpper"),e.YNc(4,S1,4,2,"nz-comment-content",4),e.YNc(5,W1,2,1,"nz-comment-content",4),e.TgZ(6,"nz-comment-action")(7,"span",8),e.NdJ("click",function(){const C=e.CHM(b).$implicit,s0=e.oxw(3);return e.KtG(s0.likeComment(C))}),e.qZA(),e.TgZ(8,"span",9),e._uU(9),e.qZA(),e.YNc(10,D1,1,1,"ng-template",null,10,e.W1O),e.qZA(),e.YNc(12,xe,3,1,"nz-comment-action",4),e.qZA()}if(2&u){const b=U.$implicit,p=e.MAs(11),z=e.oxw(3);e.Q6J("nzAuthor",b.member_name)("nzDatetime",e.lcZ(1,13,b.created_at)),e.xp6(2),e.Udp("background-color",z.utils.getColor(b.member_name)),e.Q6J("nzSrc",b.avatar_url)("nzText",e.lcZ(3,15,b.member_name)),e.xp6(2),e.Q6J("ngIf",!b.edit),e.xp6(1),e.Q6J("ngIf",b.edit),e.xp6(2),e.Q6J("nzTooltipTitle",null!=b&&null!=b.reactions&&null!=b.reactions.likes&&b.reactions.likes.count?p:null)("nzTheme",z.alreadyLiked(b)?"twotone":"outline"),e.xp6(1),e.Q6J("nzTooltipTitle",null!=b&&null!=b.reactions&&null!=b.reactions.likes&&b.reactions.likes.count?p:null),e.xp6(1),e.hij(" ",null==b||null==b.reactions||null==b.reactions.likes?null:b.reactions.likes.count," "),e.xp6(3),e.Q6J("ngIf",z.canDelete(b.user_id))}}function nt(u,U){if(1&u&&(e.ynx(0),e.YNc(1,ze,13,17,"nz-comment",5),e.BQk()),2&u){const b=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",b.comments)("ngForTrackBy",b.trackById)}}function Ie(u,U){if(1&u&&(e.TgZ(0,"div",1,2)(2,"nz-skeleton",3),e.YNc(3,nt,2,2,"ng-container",4),e.qZA()()),2&u){const b=e.oxw();e.xp6(2),e.Q6J("nzLoading",b.loading),e.xp6(1),e.Q6J("ngIf",b.comments.length)}}let oe=(()=>{var u;class U{get taskId(){return this.service.model.task?.id}constructor(p,z,C,s0,r){this.commentsApi=p,this.service=z,this.cdr=C,this.auth=s0,this.utils=r,this.loading=!0,this.comments=[],this.JSON=JSON}ngOnInit(){this.get()}ngOnDestroy(){this.comments=[]}refreshComments(){var p=this;return(0,M.Z)(function*(){yield p.get(!1),p.scrollIntoView()})()}canDelete(p){return!!p&&p===this.auth.getCurrentSession()?.id}alreadyLiked(p){const z=this.auth.getCurrentSession()?.team_member_id;return!!z&&!!p.reactions?.likes?.liked_member_ids?.includes(z)}get(p=!0){var z=this;return(0,M.Z)(function*(){if(z.taskId){try{p&&(z.loading=!0);const C=yield z.commentsApi.getByTaskId(z.taskId);C.done&&(z.comments=C.body),z.loading=!1}catch(C){(0,n.tu)(C),z.loading=!1}setTimeout(()=>{z.cdr.markForCheck()},200)}})()}trackById(p,z){return z.id}deleteComment(p){var z=this;return(0,M.Z)(function*(){if(z.taskId&&p)try{(yield z.commentsApi.delete(p,z.taskId)).done&&(yield z.get(!1),z.service.emitCommentsChange(z.taskId,z.comments.length),z.cdr.detectChanges())}catch(C){(0,n.tu)(C)}})()}scrollIntoView(){this.commentsView?.nativeElement.scrollIntoView()}likeComment(p){var z=this;return(0,M.Z)(function*(){if(p.id&&z.taskId)try{(yield z.commentsApi.updateReaction(p.id,{reaction_type:"like",task_id:z.taskId})).done&&(z.get(!1),z.cdr.detectChanges())}catch(C){(0,n.tu)(C)}})()}editComment(p){p.edit=!0,this.cdr.detectChanges()}commentUpdated(p){p.edit=!1,this.cdr.detectChanges()}deleteAttachment(p){var z=this;return(0,M.Z)(function*(){if(p&&z.taskId)try{(yield z.commentsApi.deleteAttachment(p,z.taskId)).done&&(z.get(!1),z.cdr.detectChanges())}catch(C){(0,n.tu)(C)}})()}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(re),e.Y36(n0.f),e.Y36(e.sBO),e.Y36(H0.e),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-comments"]],viewQuery:function(p,z){if(1&p&&e.Gf(A1,5),2&p){let C;e.iGM(C=e.CRH())&&(z.commentsView=C.first)}},hostBindings:function(p,z){1&p&&e.NdJ("worklenz.task_comments.create",function(){return z.refreshComments()},!1,e.evT)},decls:1,vars:1,consts:[["class","task-view-comments",4,"ngIf"],[1,"task-view-comments"],["commentsView",""],[3,"nzLoading"],[4,"ngIf"],[3,"nzAuthor","nzDatetime",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzAuthor","nzDatetime"],["nz-comment-avatar","",3,"nzSrc","nzText"],["nz-tooltip","","nz-icon","","nzType","like",3,"nzTooltipTitle","nzTheme","click"],["nz-tooltip","",1,"count","like",3,"nzTooltipTitle"],["reactorList",""],[3,"innerHTML"],[1,"ant-upload-list","ant-upload-list-picture-card"],[3,"attachment","isCommentAttachment","onDelete",4,"ngFor","ngForOf"],[3,"attachment","isCommentAttachment","onDelete"],[3,"commentData","updatedChange",4,"ngIf"],[3,"commentData","updatedChange"],[4,"ngFor","ngForOf"],["nz-popconfirm","",3,"nzPopconfirmTitle","nzOnConfirm"]],template:function(p,z){1&p&&e.YNc(0,Ie,4,2,"div",0),2&p&&e.Q6J("ngIf",z.taskId)},dependencies:[f0.sg,f0.O5,j0.ng,B0.Dz,T0.SY,D0.Ls,Z.w,et.WE,et.DA,et.Y4,et.Ql,q1.JW,ke,V0,M1.d,Q0.I],styles:["nz-skeleton[_ngcontent-%COMP%]{margin-top:-16px}nz-comment-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{-webkit-user-select:text;user-select:text}.mentions[_ngcontent-%COMP%]{background:#f7f7f7;font-weight:500;border-radius:4px}.ant-upload-list[_ngcontent-%COMP%]{border:1px dashed transparent;transition:.15s all;padding-top:8px;padding-left:8px}.focused[_ngcontent-%COMP%]{border-color:#1890ff;background-color:#fafafa}"],changeDetection:0}),U})();var y1=s(16976);function J1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-list-item")(1,"span",10),e._uU(2),e.TgZ(3,"span",14),e._uU(4),e.qZA()(),e.TgZ(5,"ul",15)(6,"nz-list-item-action")(7,"button",16),e.NdJ("nzOnConfirm",function(){const C=e.CHM(b).index,s0=e.oxw(2);return e.KtG(s0.removeFile(C))}),e._UZ(8,"span",17),e.qZA()()()()}if(2&u){const b=U.$implicit,p=e.oxw(2);e.xp6(2),e.hij("",b.file_name," "),e.xp6(1),e.Q6J("nzType","secondary"),e.xp6(1),e.hij("(",p.humanFileSize(b.size),")"),e.xp6(3),e.Q6J("nzSize","small")("nzPopconfirmTitle","Are you sure?")}}function Fe(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-list-item",18),e.NdJ("click",function(){e.CHM(b),e.oxw(2);const z=e.MAs(7);return e.KtG(z.click())}),e.TgZ(1,"button",19),e._UZ(2,"span",20),e._uU(3,"\xa0 Add more files "),e.qZA()()}2&u&&(e.xp6(1),e.Q6J("nzType","link"))}function Ae(u,U){if(1&u&&(e.TgZ(0,"div",9)(1,"h5",10),e._uU(2),e.qZA(),e.TgZ(3,"nz-list",11),e.YNc(4,J1,9,5,"nz-list-item",12),e.YNc(5,Fe,4,1,"nz-list-item",13),e.qZA(),e._UZ(6,"span"),e.qZA()),2&u){const b=e.oxw();e.xp6(2),e.hij("Selected Files (Up to 25MB, Maximum of ",b.MAXIMUM_FILE_COUNT,")"),e.xp6(1),e.Q6J("nzSize","small"),e.xp6(1),e.Q6J("ngForOf",b.selectedFiles),e.xp6(1),e.Q6J("ngIf",b.selectedFiles.length<=b.MAXIMUM_FILE_COUNT)}}function X1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",25),e.NdJ("click",function(){e.CHM(b),e.oxw(2);const z=e.MAs(7);return e.KtG(z.click())}),e._UZ(1,"span",26),e.qZA()}2&u&&e.Q6J("nzTooltipTitle","Attach files")}function H1(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.cancel())}),e._uU(1,"Cancel"),e.qZA()}}function ee(u,U){if(1&u&&(e.TgZ(0,"button",28),e._uU(1," Comment "),e.qZA()),2&u){const b=e.oxw(2);e.Q6J("disabled",!b.isValid())("nzLoading",b.creatingComment)}}function te(u,U){1&u&&(e.TgZ(0,"div",21)(1,"nz-space"),e.YNc(2,X1,2,1,"button",22),e.qZA(),e.TgZ(3,"nz-space"),e.YNc(4,H1,2,0,"button",23),e.YNc(5,ee,2,2,"button",24),e.qZA()())}const C1=function(u,U){return{minRows:u,maxRows:U}};let ue=(()=>{var u;class U{get taskId(){return this.service.model.task?.id}get projectId(){return this.service.model.task?.project_id}constructor(p,z,C,s0,r,x,O,i){this.fb=p,this.app=z,this.teamMembersApi=C,this.commentsApi=s0,this.cdr=r,this.service=x,this.utils=O,this.auth=i,this.focusChange=new e.vpe,this.commentsInputFocused=!1,this.loadingMembers=!1,this.creatingComment=!1,this.teamMembers=[],this.search=null,this.mentions=[],this.attachmentComment=!1,this.selectedFiles=[],this.MAXIMUM_FILE_COUNT=5,this.MAXIMUM_CHARACTER_COUNT=5e3,this.valueWith=o=>o.name,this.humanFileSize=n.gB,this.form=this.fb.group({content:[null,[this.contentRequiredIfNoFiles(),c0.kI.maxLength(this.MAXIMUM_CHARACTER_COUNT)]]})}get rows(){return this.commentsInputFocused?4:1}ngOnInit(){this.getTeamMembers()}ngAfterViewInit(){setTimeout(()=>{this.cdr.detectChanges()},10)}ngOnDestroy(){this.teamMembers=[],this.search=null,this.mentions=[]}contentRequiredIfNoFiles(){return p=>0!==this.selectedFiles.length||p.value?null:{required:!0}}updateValidators(){const p=this.form.get("content");p&&p.updateValueAndValidity()}getTeamMembers(){var p=this;return(0,M.Z)(function*(){try{p.loadingMembers=!0;const z=yield p.teamMembersApi.get(1,100,null,null,p.search);z.done&&z.body.data&&(p.teamMembers=z.body.data.filter(C=>!C.pending_invitation)),p.loadingMembers=!1}catch(z){p.loadingMembers=!1,(0,n.tu)(z)}p.cdr.markForCheck()})()}create(){var p=this;return(0,M.Z)(function*(){if(p.taskId){try{p.creatingComment=!0;const z={task_id:p.taskId,content:p.form.value.content||"",mentions:[...new Set(p.mentions||[])],attachments:p.selectedFiles};(yield p.commentsApi.create(z)).done&&(p.form.reset(),p.selectedFiles=[],p.attachmentComment=!1,p.updateValidators(),p.service.emitCommentsChange(p.taskId,1),(0,Y.MK)()),p.creatingComment=!1}catch(z){(0,n.tu)(z),p.creatingComment=!1}p.cdr.markForCheck()}})()}submit(){this.form.valid?this.create():this.app.displayErrorsOf(this.form)}cancel(){this.setFocus(!1),this.form.reset(),this.selectedFiles=[],this.attachmentComment=!1,this.updateValidators()}onSearchChange({value:p}){this.search=p,this.getTeamMembers()}onSelect(p){!p||!p.id||!p.name||this.mentions.some(z=>z.team_member_id===p.id)||this.mentions.push({team_member_id:p.id,name:p.name})}trackById(p,z){return z.id}setFocus(p,z){this.commentsInputFocused=p,this.focusChange?.emit(p),z?.focus()}isValid(){return this.attachmentComment?!(0===this.selectedFiles.length||this.selectedFiles.length>this.MAXIMUM_FILE_COUNT):this.form.valid}getSelectedFiles(p){var z=this;return(0,M.Z)(function*(){const C=Array.from(p.files||[]);if(C.length&&z.taskId&&z.projectId)try{z.attachmentComment=!0;for(const s0 of C){const x={file:yield(0,n.y3)(s0),file_name:s0.name,task_id:z.taskId,project_id:z.projectId,size:s0.size};z.selectedFiles.push(x),z.updateValidators()}z.cdr.markForCheck()}catch(s0){(0,n.tu)(s0)}})()}removeFile(p){this.selectedFiles.splice(p,1),0===this.selectedFiles.length&&(this.attachmentComment=!1)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(c0.qu),e.Y36(tt.z),e.Y36(at.B),e.Y36(re),e.Y36(e.sBO),e.Y36(n0.f),e.Y36(Q.F),e.Y36(H0.e))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-comments-input"]],outputs:{focusChange:"focusChange"},decls:9,vars:15,consts:[["nz-form","",3,"formGroup","submit"],[3,"nzSuggestions","nzValueWith","nzLoading","nzNotFoundContent","nzOnSearchChange","nzOnSelect","click"],[3,"nzMaxCharacterCount"],["nz-input","","placeholder","Add a comment...","nzMentionTrigger","",1,"border-0",3,"rows","nzAutosize","formControlName","maxlength"],["input",""],["class","mt-2",4,"ngIf"],["type","file","multiple","",2,"display","none",3,"change"],["attachFiles",""],["class","mt-3 justify-content-between d-flex",4,"ngIf"],[1,"mt-2"],["nz-typography",""],["nzBordered","",3,"nzSize"],[4,"ngFor","ngForOf"],["class","justify-content-center cursor-pointer",3,"click",4,"ngIf"],["nz-typography","",3,"nzType"],["nz-list-item-actions",""],["nz-button","","nz-popconfirm","",3,"nzSize","nzPopconfirmTitle","nzOnConfirm"],["nz-icon","","nzType","delete","nzTheme","outline"],[1,"justify-content-center","cursor-pointer",3,"click"],["nz-button","","nzBlock","","type","button",3,"nzType"],["nz-icon","","nzType","plus","nzTheme","outline"],[1,"mt-3","justify-content-between","d-flex"],["nz-button","","nz-tooltip","","type","button",3,"nzTooltipTitle","click",4,"nzSpaceItem"],["type","button","nz-button","","nzType","default",3,"click",4,"nzSpaceItem"],["type","submit","nz-button","","nzType","primary",3,"disabled","nzLoading",4,"nzSpaceItem"],["nz-button","","nz-tooltip","","type","button",3,"nzTooltipTitle","click"],["nz-icon","","nzType","paper-clip","nzTheme","outline"],["type","button","nz-button","","nzType","default",3,"click"],["type","submit","nz-button","","nzType","primary",3,"disabled","nzLoading"]],template:function(p,z){if(1&p){const C=e.EpF();e.TgZ(0,"form",0),e.NdJ("submit",function(){return z.submit()}),e.TgZ(1,"nz-mention",1),e.NdJ("nzOnSearchChange",function(r){return z.onSearchChange(r)})("nzOnSelect",function(r){return z.onSelect(r)})("click",function(){e.CHM(C);const r=e.MAs(4);return e.KtG(z.setFocus(!0,r))}),e.TgZ(2,"nz-textarea-count",2),e._UZ(3,"textarea",3,4),e.qZA()(),e.YNc(5,Ae,7,4,"div",5),e.TgZ(6,"input",6,7),e.NdJ("change",function(){e.CHM(C);const r=e.MAs(7);return e.KtG(z.getSelectedFiles(r))}),e.qZA(),e.YNc(8,te,6,0,"div",8),e.qZA()}2&p&&(e.Q6J("formGroup",z.form),e.xp6(1),e.Q6J("nzSuggestions",z.teamMembers)("nzValueWith",z.valueWith)("nzLoading",z.loadingMembers)("nzNotFoundContent","No members found!"),e.xp6(1),e.Q6J("nzMaxCharacterCount",z.MAXIMUM_CHARACTER_COUNT),e.xp6(1),e.Q6J("rows",z.rows)("nzAutosize",e.WLB(12,C1,z.rows,z.rows))("formControlName","content")("maxlength",z.MAXIMUM_CHARACTER_COUNT),e.xp6(2),e.Q6J("ngIf",z.attachmentComment),e.xp6(3),e.Q6J("ngIf",z.commentsInputFocused))},dependencies:[f0.sg,f0.O5,r0.Lr,c0._Y,c0.Fj,c0.JJ,c0.JL,c0.nD,b0.w,b0.Zp,b0.rh,N0.ZU,T0.SY,D0.Ls,c0.sg,c0.u,A0.ix,Z.w,p0.dQ,a1.NU,a1.$1,$.YW,$.jO,q1.JW,y1.n_,y1.AA,y1.nk,y1.KC],styles:["textarea[_ngcontent-%COMP%]:focus{outline:none;box-shadow:none}nz-mention[_ngcontent-%COMP%]{cursor:text}"],changeDetection:0}),U})();const ie=["searchInput"];function ge(u,U){if(1&u&&e._UZ(0,"worklenz-avatars",11),2&u){const b=e.oxw(2);e.Q6J("names",b.subscribers)}}function Ne(u,U){if(1&u&&(e.ynx(0),e.YNc(1,ge,1,1,"worklenz-avatars",8),e.TgZ(2,"span",9),e._UZ(3,"nz-avatar",10),e.qZA(),e.BQk()),2&u){const b=e.oxw();e.xp6(1),e.Q6J("ngIf",b.subscribers.length),e.xp6(2),e.Q6J("nzSize",28)("nzIcon","plus")}}function $e(u,U){1&u&&e._UZ(0,"nz-skeleton-element",12),2&u&&e.Q6J("nzActive",!0)("nzSize","default")}function Nt(u,U){1&u&&(e.TgZ(0,"small",24),e._uU(1,"(Pending Invitation)"),e.qZA())}function Xt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"li",18),e.NdJ("nzCheckedChange",function(z){const s0=e.CHM(b).$implicit,r=e.oxw(2);return e.KtG(r.handleMemberChange(s0,z))})("nzCheckedChange",function(z){const s0=e.CHM(b).$implicit;return e.KtG(s0.selected=z)}),e.TgZ(1,"div",19),e._UZ(2,"nz-avatar",20),e.ALo(3,"firstCharUpper"),e.TgZ(4,"div",21)(5,"span",22),e._uU(6),e.qZA(),e.TgZ(7,"small",9),e._uU(8),e.YNc(9,Nt,2,0,"small",23),e.qZA()()()()}if(2&u){const b=U.$implicit;e.Q6J("nzChecked",b.selected)("nzDisabled",b.is_pending&&!b.selected)("ngClass",b.is_pending&&!b.selected?"disable":""),e.xp6(2),e.Udp("background-color",b.avatar_url?"#ececec":b.color_code),e.Q6J("nzSize",32)("nzSrc",b.avatar_url)("nzText",e.lcZ(3,13,b.name))("nzTooltipPlacement","top")("nzTooltipTitle",b.name),e.xp6(4),e.Oqu(b.name),e.xp6(2),e.hij(" ",b.email," "),e.xp6(1),e.Q6J("ngIf",b.is_pending)}}function Wt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"ul",13)(1,"li",14)(2,"input",15,16),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.searchText=z)}),e.qZA()(),e.YNc(4,Xt,10,15,"li",17),e.ALo(5,"searchByName"),e.qZA()}if(2&u){const b=e.oxw();e.xp6(2),e.Q6J("ngModel",b.searchText),e.xp6(2),e.Q6J("ngForOf",e.xi3(5,3,b.members,b.searchText))("ngForTrackBy",b.trackById)}}let St=(()=>{var u;class U{get loading(){return this.loadingSubscribers||this.loadingMembers}constructor(p,z,C,s0,r,x,O,i){this.auth=p,this.membersApi=z,this.api=C,this.socket=s0,this.ngZone=r,this.cdr=x,this.service=O,this.utils=i,this.searchText=null,this.subscribers=[],this.members=[],this.loadingSubscribers=!1,this.loadingMembers=!1,this.handleResponse=o=>{if(!o)return;this.subscribers=o;const q=this.service.model.task;q?.id&&this.service.emitOnTaskSubscriberChange(q.id,o.length),this.sortMembersBySelection(this.members),this.cdr.markForCheck()}}ngOnInit(){var p=this;return(0,M.Z)(function*(){yield p.getSubscribers(),yield p.getMembers(),p.markSubscribers(),p.cdr.markForCheck(),p.socket.on(v.C.TASK_SUBSCRIBERS_CHANGE.toString(),p.handleResponse)})()}ngOnDestroy(){this.socket.removeListener(v.C.TASK_SUBSCRIBERS_CHANGE.toString(),this.handleResponse)}getMembers(){var p=this;return(0,M.Z)(function*(){try{p.loadingMembers=!0;const z=yield p.membersApi.getAll();z.done&&(p.members=z.body),p.loadingMembers=!1}catch{p.loadingMembers=!1}})()}getSubscribers(){var p=this;return(0,M.Z)(function*(){const z=p.service.model.task?.id;if(z)try{p.loadingSubscribers=!0;const C=yield p.api.getTaskSubscribers(z);C.done&&(p.subscribers=C.body),p.loadingSubscribers=!1}catch{p.loadingSubscribers=!1}})()}markSubscribers(){const p=this.subscribers.map(z=>z.team_member_id);for(const z of this.members)z.selected=p.includes(z.id)}trackById(p,z){return z.id}focusInput(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.searchInput?.nativeElement?.focus()},100)})}handleMembersVisibleChange(p){this.service.model.task&&(p?(this.focusInput(),this.sortMembersBySelection(this.members)):this.searchText=null)}handleMemberChange(p,z){const C=this.service.model.task;if(!C)return;const s0={team_member_id:p.id,task_id:C.id,user_id:p.user_id,mode:z?0:1};this.socket.emit(v.C.TASK_SUBSCRIBERS_CHANGE.toString(),s0)}sortMembersBySelection(p){this.utils.sortBySelection(p),this.utils.sortByPending(p)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(H0.e),e.Y36(at.B),e.Y36(S.c),e.Y36(a0.s),e.Y36(e.R0b),e.Y36(e.sBO),e.Y36(n0.f),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-notify-to-user"]],viewQuery:function(p,z){if(1&p&&e.Gf(ie,5),2&p){let C;e.iGM(C=e.CRH())&&(z.searchInput=C.first)}},decls:11,vars:6,consts:[["nz-row","",1,"w-100","mt-2"],[1,"control-hover"],["nz-dropdown","",1,"task-form-assignee",3,"nzClickHide","nzDropdownMenu","nzTrigger","nzVisibleChange"],[1,"d-flex","h-100","align-items-center"],[4,"ngIf"],["nzType","input","style","width:200px",3,"nzActive","nzSize",4,"ngIf"],["membersDropdown","nzDropdownMenu"],["class","members-dropdown pt-0","nz-menu","",4,"ngIf"],["class","d-flex cursor-pointer",3,"names",4,"ngIf"],["nz-typography","","nzType","secondary"],[1,"avatar-dashed","ms-1","bg-white",3,"nzSize","nzIcon"],[1,"d-flex","cursor-pointer",3,"names"],["nzType","input",2,"width","200px",3,"nzActive","nzSize"],["nz-menu","",1,"members-dropdown","pt-0"],[1,"px-3","py-2","position-sticky","top-0","bg-white","z-top"],["nz-input","","placeholder","Search by name","type","text",1,"border-default-color","dropdown-search-input",3,"ngModel","ngModelChange"],["searchInput",""],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzChecked","nzDisabled","ngClass","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzDisabled","ngClass","nzCheckedChange"],[1,"d-flex","align-items-center","justify-content-center","user-select-none"],["nz-tooltip","",1,"mt-auto","mb-auto","me-2",3,"nzSize","nzSrc","nzText","nzTooltipPlacement","nzTooltipTitle"],[2,"line-height","15px"],["nz-typography","",1,"d-block"],["nz-typography","","nzType","danger",4,"ngIf"],["nz-typography","","nzType","danger"]],template:function(p,z){if(1&p&&(e.TgZ(0,"nz-form-item",0)(1,"nz-form-label"),e._uU(2,"When done, notify"),e.qZA(),e.TgZ(3,"nz-form-control",1)(4,"div",2),e.NdJ("nzVisibleChange",function(s0){return z.handleMembersVisibleChange(s0)}),e.TgZ(5,"div",3),e.YNc(6,Ne,4,3,"ng-container",4),e.YNc(7,$e,1,2,"nz-skeleton-element",5),e.qZA(),e.TgZ(8,"nz-dropdown-menu",null,6),e.YNc(10,Wt,6,6,"ul",7),e.qZA()()()()),2&p){const C=e.MAs(9);e.xp6(4),e.Q6J("nzClickHide",!1)("nzDropdownMenu",C)("nzTrigger","click"),e.xp6(2),e.Q6J("ngIf",!z.loading),e.xp6(1),e.Q6J("ngIf",z.loading),e.xp6(3),e.Q6J("ngIf",z.members.length)}},dependencies:[f0.mk,f0.sg,f0.O5,j0.Xw,j0.yg,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.Fj,c0.JJ,c0.On,b0.Zp,R0.wO,R0.r9,p1.cm,p1.RR,E0.o,B0.Dz,N0.ZU,U0.Ie,T0.SY,Z.w,z1.g,Q0.I],styles:['.disable[_ngcontent-%COMP%]{position:relative}.disable[_ngcontent-%COMP%]:after{position:absolute;content:"";background:rgba(231,231,231,.4117647059);inset:0;width:100%}.z-top[_ngcontent-%COMP%]{z-index:9}'],changeDetection:0}),U})();function Tt(u,U){if(1&u&&(e.TgZ(0,"nz-option",5),e._uU(1),e.qZA()),2&u){const b=U.$implicit;e.Q6J("nzLabel",b.name)("nzValue",b.id),e.xp6(1),e.hij(" ",b.name," ")}}function vt(u,U){if(1&u&&(e.TgZ(0,"div",6),e._uU(1),e.qZA()),2&u){const b=U.$implicit;e.xp6(1),e.Oqu(b.nzLabel)}}function Rt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-label"),e._uU(2,"Phase"),e.qZA(),e.TgZ(3,"nz-form-control")(4,"nz-select",2),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.task.phase_id=z)})("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handleChange(z,C.task.id))}),e.YNc(5,Tt,2,3,"nz-option",3),e.qZA(),e.YNc(6,vt,2,1,"ng-template",null,4,e.W1O),e.qZA()()}if(2&u){const b=e.MAs(7),p=e.oxw();e.xp6(4),e.Q6J("nzCustomTemplate",b)("nzDropdownMatchSelectWidth",!1)("nzShowArrow",!0)("ngModel",p.task.phase_id)("nzPlaceHolder","Select phase")("nzAllowClear",!0),e.xp6(1),e.Q6J("ngForOf",p.phases)}}let yt=(()=>{var u;class U{get task(){return this.service.model.task}get phases(){return this.service.model.phases??[]}constructor(p,z,C,s0,r){this.socket=p,this.service=z,this.list=C,this.roadmapService=s0,this.cdr=r}handleChange(p,z){z&&(this.socket.emit(v.C.TASK_PHASE_CHANGE.toString(),{task_id:z,phase_id:p,parent_task:this.service.model.task?.parent_task_id||null}),this.socket.once(v.C.TASK_PHASE_CHANGE.toString(),()=>{this.service.emitPhaseChange(),this.list.getCurrentGroup().value===this.list.GROUP_BY_PHASE_VALUE&&this.list.isSubtasksIncluded&&this.list.emitRefreshSubtasksIncluded(),this.roadmapService.getCurrentGroup().value===this.roadmapService.GROUP_BY_PHASE_VALUE&&this.roadmapService.onGroupChange(z,p),this.cdr.markForCheck()}))}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(a0.s),e.Y36(n0.f),e.Y36(E.b),e.Y36(F0.s),e.Y36(e.sBO))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-phase"]],decls:1,vars:1,consts:[["class","w-100 mb-2","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-2"],[1,"w-auto",3,"nzCustomTemplate","nzDropdownMatchSelectWidth","nzShowArrow","ngModel","nzPlaceHolder","nzAllowClear","ngModelChange"],["nzCustomContent","",3,"nzLabel","nzValue",4,"ngFor","ngForOf"],["taskPriorityTemplate",""],["nzCustomContent","",3,"nzLabel","nzValue"],[1,"ant-select-selection-item-content","d-flex","align-items-center"]],template:function(p,z){1&p&&e.YNc(0,Rt,8,7,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.task)},dependencies:[f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.JJ,c0.On,l1.Ip,l1.Vq],changeDetection:0}),U})();var Ct=s(96494);function Zt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"nz-form-item",1)(1,"nz-form-label"),e._uU(2,"Billable"),e.qZA(),e.TgZ(3,"nz-form-control")(4,"nz-switch",2),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handleChange(z))}),e.qZA()()()}if(2&u){const b=e.oxw();e.xp6(4),e.Q6J("ngModel",b.task.billable)}}let bt=(()=>{var u;class U{get task(){return this.service.model.task}constructor(p,z,C){this.cdr=p,this.socket=z,this.service=C}handleChange(p){this.task?.id&&this.socket.emit(v.C.TASK_BILLABLE_CHANGE.toString(),{task_id:this.task.id,billable:p})}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(e.sBO),e.Y36(a0.s),e.Y36(n0.f))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-billable-toggle"]],decls:1,vars:1,consts:[["class","w-100 mb-2","nz-row","",4,"ngIf"],["nz-row","",1,"w-100","mb-2"],[3,"ngModel","ngModelChange"]],template:function(p,z){1&p&&e.YNc(0,Zt,5,1,"nz-form-item",0),2&p&&e.Q6J("ngIf",z.task)},dependencies:[f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,c0.JJ,c0.On,Ct.i],changeDetection:0}),U})();var Se=function(u){return u.BLOCKED_BY="blocked_by",u}(Se||{});let on=(()=>{var u;class U extends Ze.P{constructor(p){super(),this.http=p,this.root=`${this.API_BASE_URL}/task-dependencies`}create(p){return this._post(this.http,`${this.root}`,p)}getTaskDependencies(p){return this._get(this.http,`${this.root}/${p}`)}deleteDependency(p){return this._delete(this.http,`${this.root}/${p}`)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.LFG(me.eN))},u.\u0275prov=e.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),U})();const Ut=["searchInput"];function Bt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",13),e.NdJ("nzOnConfirm",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw();return e.KtG(C.removeDependency(z.id))}),e._UZ(1,"span",14),e.qZA()}2&u&&(e.Q6J("nzOkText","Yes")("nzPopconfirmTitle","Are you sure?")("nzSize","small")("nzTooltipPlacement","top")("nzTooltipTitle","Delete")("nzType","default"),e.xp6(1),e.Q6J("nzType","delete"))}function pn(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"tr",6)(1,"td",7),e._uU(2),e.TgZ(3,"nz-tag"),e._uU(4),e.qZA()(),e.TgZ(5,"td",8)(6,"nz-select",9),e.NdJ("ngModelChange",function(z){const s0=e.CHM(b).$implicit;return e.KtG(s0.dependency_type=z)}),e._UZ(7,"nz-option",10),e.qZA()(),e.TgZ(8,"td")(9,"div",11)(10,"nz-space"),e.YNc(11,Bt,2,7,"button",12),e.qZA()()()()}if(2&u){const b=U.$implicit,p=e.oxw();e.xp6(2),e.hij(" ",b.task_name," "),e.xp6(2),e.Oqu(b.task_key),e.xp6(2),e.Q6J("ngModel",b.dependency_type)("nzSize","small"),e.xp6(1),e.Q6J("nzValue",p.dependencyTypes.BLOCKED_BY)}}function qt(u,U){}function _(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",23),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.isVisible=!1)}),e._UZ(1,"span",14),e.qZA()}2&u&&(e.Q6J("nzSize","small"),e.xp6(1),e.Q6J("nzType","delete"))}function F(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",15)(1,"div",16)(2,"nz-select",17,18),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.selectedValue=z)})("ngModelChange",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.optionSelected())})("nzOnSearch",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.onSearch(z))}),e.qZA()(),e.TgZ(4,"div",19)(5,"nz-select",20),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.selectedDependencyType=z)}),e._UZ(6,"nz-option",10),e.qZA()(),e.TgZ(7,"div",21)(8,"nz-space"),e.YNc(9,_,2,2,"button",22),e.qZA()()()}if(2&u){const b=e.oxw();e.Q6J("nzGutter",16),e.xp6(2),e.Q6J("nzSize","small")("ngModel",b.selectedValue)("nzSuffixIcon","search")("nzAllowClear",!0)("nzLoading",b.loading)("nzOptions",b.options),e.xp6(3),e.Q6J("ngModel",b.selectedDependencyType)("nzSize","small"),e.xp6(1),e.Q6J("nzValue",b.dependencyTypes.BLOCKED_BY)}}function A(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"a",24),e.NdJ("click",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.showDependencyInput())}),e._uU(1," + Add new dependency\n"),e.qZA()}}let a=(()=>{var u;class U{get taskId(){return this.service.model.task?.id}get projectId(){return this.service.model.task?.project_id}constructor(p,z,C,s0,r){this.tasksApiService=p,this.apiService=z,this.fb=C,this.service=s0,this.cdr=r,this.searchValue="",this.searching=!1,this.loadingDeps=!1,this.tasks=[],this.total=0,this.isVisible=!1,this.dependencies=[],this.dependencyTypes=Se,this.selectedValue=null,this.selectedDependencyType=this.dependencyTypes.BLOCKED_BY,this.options=[],this.loading=!1,this.form=this.fb.group({name:[]})}ngOnInit(){this.getTaskDependencies()}getTaskDependencies(){var p=this;return(0,M.Z)(function*(){if(p.taskId)try{const z=yield p.apiService.getTaskDependencies(p.taskId);z.done&&(p.dependencies=z.body||[],p.cdr.markForCheck())}catch(z){(0,n.tu)(z)}})()}getTasks(){var p=this;return(0,M.Z)(function*(){if(p.taskId&&p.projectId)try{const z=yield p.tasksApiService.searchTasks(p.taskId,p.projectId,p.searchValue);z.done&&(p.options=z.body||[],p.cdr.markForCheck())}catch(z){(0,n.tu)(z)}})()}search(){var p=this;return(0,M.Z)(function*(){p.searching=!0,yield p.getTasks(),p.searching=!1})()}removeDependency(p){var z=this;return(0,M.Z)(function*(){if(p)try{z.loadingDeps=!0,(yield z.apiService.deleteDependency(p)).done&&(z.getTaskDependencies(),z.loadingDeps=!1)}catch(C){(0,n.tu)(C),z.loadingDeps=!1}})()}showDependencyInput(){this.isVisible=!0,setTimeout(()=>{this.searchInput.focus()},500)}editTask(p){p?.id&&this.service.emitSubTaskSelect(p)}onSearch(p){var z=this;return(0,M.Z)(function*(){z.searchValue=p,p?(z.loading=!0,yield z.getTasks(),z.loading=!1):(z.options=[],z.loading=!1)})()}optionSelected(){var p=this;return(0,M.Z)(function*(){if(p.selectedValue)try{p.loadingDeps=!0;const z={dependency_type:p.dependencyTypes.BLOCKED_BY,task_id:p.taskId,related_task_id:p.selectedValue};(yield p.apiService.create(z)).done&&(p.isVisible=!1,p.tasks=[],p.selectedValue="",p.getTaskDependencies(),p.loadingDeps=!1)}catch(z){p.loadingDeps=!1,(0,n.tu)(z)}})()}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(S.c),e.Y36(on),e.Y36(c0.qu),e.Y36(n0.f),e.Y36(e.sBO))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-dependencies"]],viewQuery:function(p,z){if(1&p&&e.Gf(Ut,5),2&p){let C;e.iGM(C=e.CRH())&&(z.searchInput=C.first)}},decls:9,vars:8,consts:[[1,"custom-table","thead-height-0","w-100",3,"nzData","nzShowPagination","nzPaginationType","nzSize","nzNoResult"],["depTable",""],["class","actions-row",4,"ngFor","ngForOf"],["noData",""],["nz-row","","class","mt-2",3,"nzGutter",4,"ngIf"],["nz-button","","nzType","link",3,"click",4,"ngIf"],[1,"actions-row"],["nz-typography",""],[1,"px-1"],[3,"ngModel","nzSize","ngModelChange"],["nzLabel","Blocked by",3,"nzValue"],[1,"actions"],["nz-button","","nz-popconfirm","","nz-tooltip","",3,"nzOkText","nzPopconfirmTitle","nzSize","nzTooltipPlacement","nzTooltipTitle","nzType","nzOnConfirm",4,"nzSpaceItem"],["nz-button","","nz-popconfirm","","nz-tooltip","",3,"nzOkText","nzPopconfirmTitle","nzSize","nzTooltipPlacement","nzTooltipTitle","nzType","nzOnConfirm"],["nz-icon","",3,"nzType"],["nz-row","",1,"mt-2",3,"nzGutter"],["nz-col","","nzSpan","14"],["nzShowSearch","","nzServerSearch","","nzNotFoundContent","Enter task name to search","nzAutoFocus","","nzPlaceHolder","Search task name",1,"w-100",3,"nzSize","ngModel","nzSuffixIcon","nzAllowClear","nzLoading","nzOptions","ngModelChange","nzOnSearch"],["searchInput",""],["nz-col","","nzSpan","6"],[1,"w-100",3,"ngModel","nzSize","ngModelChange"],["nz-col","","nzSpan","4"],["nz-button","",3,"nzSize","click",4,"nzSpaceItem"],["nz-button","",3,"nzSize","click"],["nz-button","","nzType","link",3,"click"]],template:function(p,z){if(1&p&&(e.TgZ(0,"div")(1,"nz-table",0,1)(3,"tbody"),e.YNc(4,pn,12,5,"tr",2),e.qZA()(),e.YNc(5,qt,0,0,"ng-template",null,3,e.W1O),e.qZA(),e.YNc(7,F,10,10,"div",4),e.YNc(8,A,2,0,"a",5)),2&p){const C=e.MAs(2),s0=e.MAs(6);e.xp6(1),e.Q6J("nzData",z.dependencies)("nzShowPagination",!1)("nzPaginationType","small")("nzSize","small")("nzNoResult",s0),e.xp6(3),e.Q6J("ngForOf",C.data),e.xp6(3),e.Q6J("ngIf",z.isVisible),e.xp6(1),e.Q6J("ngIf",z.dependencies.length||!z.isVisible)}},dependencies:[f0.sg,f0.O5,V.t3,V.SK,c0.JJ,c0.On,l1.Ip,l1.Vq,h0.j,N0.ZU,T0.SY,D0.Ls,A0.ix,Z.w,p0.dQ,a1.NU,a1.$1,q1.JW,B1.N8,B1.Uo,B1.p0,B1.$Z],changeDetection:0}),U})();const h=["commentsView"];function P(u,U){if(1&u&&(e.TgZ(0,"nz-form-item",9)(1,"nz-form-label"),e._uU(2,"Task Key"),e.qZA(),e.TgZ(3,"nz-form-control",10)(4,"nz-tag"),e._uU(5),e.qZA()()()),2&u){const b=e.oxw();e.xp6(5),e.Oqu(b.service.model.task.task_key)}}function K0(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",12)(1,"span"),e._uU(2,"Sub-Tasks"),e.qZA(),e.TgZ(3,"button",13),e.NdJ("click",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.refreshSubTasks(z))}),e._UZ(4,"span",14),e.qZA()()}2&u&&(e.xp6(3),e.Q6J("nzSize","small")("nzShape","circle")("nzTooltipTitle","Refresh"),e.xp6(1),e.Q6J("nzType","reload")("nzTheme","outline"))}function s1(u,U){if(1&u&&(e.TgZ(0,"nz-collapse-panel",1),e._UZ(1,"worklenz-task-view-sub-tasks"),e.YNc(2,K0,5,5,"ng-template",null,11,e.W1O),e.qZA()),2&u){const b=e.MAs(3);e.Q6J("nzHeader",b)("nzActive",!0)}}function f1(u,U){1&u&&(e.TgZ(0,"div",12)(1,"span"),e._uU(2,"Dependencies"),e.qZA()())}function E1(u,U){if(1&u&&(e.TgZ(0,"span",17)(1,"small",18),e.ALo(2,"date"),e._uU(3),e.ALo(4,"fromNow"),e.qZA()()),2&u){const b=e.oxw(2);e.xp6(1),e.Q6J("nzTooltipPlacement","right")("nzTooltipTitle",e.xi3(2,4,null==b.service.model.task?null:b.service.model.task.created_at,"medium")),e.xp6(2),e.AsE(" Created ",e.lcZ(4,7,null==b.service.model.task?null:b.service.model.task.created_at)," by ",null==b.service.model.task?null:b.service.model.task.reporter," ")}}function Oe(u,U){if(1&u&&(e.TgZ(0,"span",17)(1,"small",18),e.ALo(2,"date"),e._uU(3),e.ALo(4,"fromNow"),e.qZA()()),2&u){const b=e.oxw(2);e.xp6(1),e.Q6J("nzTooltipPlacement","right")("nzTooltipTitle",e.xi3(2,3,null==b.service.model.task?null:b.service.model.task.updated_at,"medium")),e.xp6(2),e.hij(" Updated ",e.lcZ(4,6,null==b.service.model.task?null:b.service.model.task.updated_at)," ")}}function V1(u,U){if(1&u&&(e.ynx(0),e.TgZ(1,"div",15),e.YNc(2,E1,5,9,"span",16),e.YNc(3,Oe,5,8,"span",16),e.qZA(),e.BQk()),2&u){const b=e.oxw();e.xp6(2),e.Q6J("ngIf",null==b.service.model.task?null:b.service.model.task.created_at),e.xp6(1),e.Q6J("ngIf",null==b.service.model.task?null:b.service.model.task.updated_at)}}let K1=(()=>{var u;class U{constructor(p,z,C){this.route=p,this.utils=z,this.service=C,this.commentsInputFocused=!1}isEditTask(){return!!this.service.model.task?.id}isTaskAvailable(){return!!this.service.model.task}getAttachmentsHeader(){return`Attachments (${this.service.model.task?.attachments_count||0})`}isSubTask(){return!!this.service.model.task?.is_sub_task}onCommentsInputFocus(p){this.commentsInputFocused=p,setTimeout(()=>{this.commentsView.scrollIntoView()},100)}refreshSubTasks(p){p.stopPropagation(),this.service.emitSubTasksRefresh()}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(c.gz),e.Y36(Q.F),e.Y36(n0.f))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-info"]],viewQuery:function(p,z){if(1&p&&e.Gf(h,5),2&p){let C;e.iGM(C=e.CRH())&&(z.commentsView=C.first)}},outputs:{commentsInputFocused:"commentsInputFocused"},decls:26,vars:17,consts:[["nzGhost",""],[3,"nzHeader","nzActive"],["class","w-100 mb-2","nz-row","",4,"ngIf"],[3,"nzHeader","nzActive",4,"ngIf"],["dependenciesHeader",""],["commentsView",""],[1,"d-block","pt-4","px-4","comments-block"],[1,"d-block","pb-1",3,"focusChange"],[4,"ngIf"],["nz-row","",1,"w-100","mb-2"],[2,"user-select","text"],["subTasksHeader",""],[1,"d-flex","align-items-center","justify-content-between","w-100","mb-2"],["nz-button","","nz-tooltip","",3,"nzSize","nzShape","nzTooltipTitle","click"],["nz-icon","",3,"nzType","nzTheme"],[1,"d-flex","justify-content-between","align-items-center","pb-1"],["class","mb-0","nz-typography","","nzType","secondary",4,"ngIf"],["nz-typography","","nzType","secondary",1,"mb-0"],["nz-tooltip","",3,"nzTooltipPlacement","nzTooltipTitle"]],template:function(p,z){if(1&p&&(e.TgZ(0,"nz-collapse",0)(1,"nz-collapse-panel",1),e.YNc(2,P,6,1,"nz-form-item",2),e._UZ(3,"worklenz-task-view-phase")(4,"worklenz-task-view-assignees")(5,"worklenz-task-view-due-date")(6,"worklenz-task-view-estimation")(7,"worklenz-task-view-priority")(8,"worklenz-task-view-labels")(9,"worklenz-task-view-billable-toggle")(10,"worklenz-task-view-notify-to-user"),e.qZA(),e.TgZ(11,"nz-collapse-panel",1),e._UZ(12,"worklenz-task-view-description"),e.qZA(),e.YNc(13,s1,4,2,"nz-collapse-panel",3),e.TgZ(14,"nz-collapse-panel",1),e._UZ(15,"worklenz-task-view-dependencies"),e.YNc(16,f1,3,0,"ng-template",null,4,e.W1O),e.qZA(),e.TgZ(18,"nz-collapse-panel",1),e._UZ(19,"worklenz-task-view-attachments"),e.qZA(),e.TgZ(20,"nz-collapse-panel",1),e._UZ(21,"worklenz-task-view-comments",null,5),e.qZA()(),e.TgZ(23,"div",6)(24,"worklenz-task-view-comments-input",7),e.NdJ("focusChange",function(s0){return z.onCommentsInputFocus(s0)}),e.qZA(),e.YNc(25,V1,4,2,"ng-container",8),e.qZA()),2&p){const C=e.MAs(17);e.xp6(1),e.Q6J("nzHeader","Details")("nzActive",!0),e.xp6(1),e.Q6J("ngIf",z.service.model.task),e.xp6(9),e.Q6J("nzHeader","Description")("nzActive",!0),e.xp6(2),e.Q6J("ngIf",!z.isSubTask()),e.xp6(1),e.Q6J("nzHeader",C)("nzActive",!0),e.xp6(4),e.Q6J("nzHeader",z.getAttachmentsHeader())("nzActive",!0),e.xp6(2),e.Udp("padding-bottom",z.commentsInputFocused?110:null,"px"),e.ekj("pb-3",!z.commentsInputFocused),e.Q6J("nzHeader","Comments")("nzActive",!0),e.xp6(5),e.Q6J("ngIf",z.isEditTask()&&z.isTaskAvailable())}},dependencies:[f0.O5,V.t3,V.SK,r0.Nx,r0.iK,r0.Fd,h0.j,O1.Zv,O1.yH,N0.ZU,T0.SY,D0.Ls,A0.ix,Z.w,p0.dQ,m,I0,z0,_e,Te,k,lt,ht,oe,ue,St,yt,bt,a,f0.uU,M1.d],styles:["nz-collapse-panel[_ngcontent-%COMP%]{margin-bottom:10px}.comments-block[_ngcontent-%COMP%]{position:absolute;bottom:0;left:24px;right:24px;z-index:1;background:#FAFAFA;margin-left:-1.5rem;margin-right:-1.5rem;border-top:1px solid rgba(0,0,0,.06)}nz-collapse[_ngcontent-%COMP%]{margin-bottom:90px}"],changeDetection:0}),U})();var Y1=s(76271);const Je=["input"];function We(u,U){if(1&u){const b=e.EpF();e.ynx(0),e.TgZ(1,"p",11),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return z.showTaskNameInput=!0,e.KtG(z.focusInput())}),e._uU(2),e.qZA(),e.BQk()}if(2&u){const b=e.oxw(2);e.xp6(2),e.Oqu(b.service.model.task.name)}}function He(u,U){if(1&u&&(e.TgZ(0,"small",15),e._uU(1),e.qZA()),2&u){const b=e.oxw(3);e.ekj("warn",((null==b.service.model.task.name?null:b.service.model.task.name.length)||0)>=b.MAX_LEN),e.xp6(1),e.AsE(" ",(null==b.service.model.task.name?null:b.service.model.task.name.length)||0," / ",b.MAX_LEN," ")}}function Ft(u,U){if(1&u){const b=e.EpF();e.ynx(0),e.TgZ(1,"input",12,13),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw(2);return e.KtG(C.service.model.task.name=z)})("focus",function(){e.CHM(b);const z=e.MAs(2),C=e.oxw(2);return e.KtG(C.addFocusCls(z))})("blur",function(){e.CHM(b);const z=e.MAs(2),C=e.oxw(2);return C.handleNameChange(C.service.model.task),C.removeFocusCls(z),e.KtG(C.showTaskNameInput=!1)})("keyup.enter",function(){e.CHM(b);const z=e.MAs(2);return e.KtG(z.blur())}),e.qZA(),e.YNc(3,He,2,4,"small",14),e.BQk()}if(2&u){const b=e.MAs(2),p=e.oxw(2);e.xp6(1),e.ekj("error",((null==p.service.model.task.name?null:p.service.model.task.name.length)||0)>p.MAX_LEN),e.Q6J("ngModel",p.service.model.task.name)("nzBorderless",!0)("maxlength",p.MAX_LEN),e.xp6(2),e.Q6J("ngIf",p.hasCls(b))}}function $t(u,U){if(1&u&&(e._UZ(0,"nz-option",16),e.ALo(1,"safeString")),2&u){const b=U.$implicit;e.Q6J("nzValue",b.id)("nzLabel",e.lcZ(1,2,b.name))}}function sn(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",1)(1,"div",2)(2,"nz-form-item",3)(3,"nz-form-control",4),e.YNc(4,We,3,1,"ng-container",5),e.YNc(5,Ft,4,6,"ng-container",5),e.qZA()()(),e.TgZ(6,"div",6)(7,"nz-form-item",7)(8,"nz-form-control",8)(9,"nz-select",9),e.NdJ("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.service.model.task.status_id=z)})("ngModelChange",function(z){e.CHM(b);const C=e.oxw();return e.KtG(C.handleStatusChange(z,C.service.model.task))}),e.YNc(10,$t,2,4,"nz-option",10),e.qZA()()()()()}if(2&u){const b=e.oxw();e.Q6J("nzGutter",8),e.xp6(1),e.Q6J("nzSpan",19),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("ngIf",!b.showTaskNameInput),e.xp6(1),e.Q6J("ngIf",b.showTaskNameInput),e.xp6(1),e.Q6J("nzSpan",5),e.xp6(2),e.Q6J("nzErrorTip","Status is required!"),e.xp6(1),e.Udp("background-color",b.service.model.task.status_color),e.Q6J("nzDropdownMatchSelectWidth",!1)("ngModel",b.service.model.task.status_id)("nzPlaceHolder","Select status"),e.xp6(1),e.Q6J("ngForOf",b.service.model.statuses)}}let Jt=(()=>{var u;class U{constructor(p,z,C,s0,r,x,O,i,o){this.cdr=p,this.socket=z,this.ngZone=C,this.renderer=s0,this.service=r,this.list=x,this.roadmapService=O,this.auth=i,this.app=o,this.MAX_LEN=250,this.INPUT_FOCUSED_CLS="input-focused",this.showTaskNameInput=!1,this.handleNameChangeResponse=q=>{!q||!this.service.model||(this.service.model.task&&this.service.model.task.name!=q.name&&(this.service.model.task.name=q.name,this.cdr.detectChanges()),this.service.emitRefresh(q.id))},this.handleStatusChangeResponse=q=>{this.service.model?.task&&!q.completed_deps&&(this.service.model.task.status_color=q.color_code,this.service.model.task.status_id=q.status_id,this.service.emitStatusChange(),this.cdr.markForCheck(),this.app.notify("Incomplete Dependencies!",J.mU,!1)),this.service.model?.task&&q.color_code&&q.completed_deps&&(this.service.model.task.status_color=q.color_code,this.service.emitRefresh(q.id),this.service.emitStatusChange(),this.list.getCurrentGroup().value===this.list.GROUP_BY_STATUS_VALUE&&this.list.isSubtasksIncluded&&this.list.emitRefreshSubtasksIncluded(),this.list.getCurrentGroup().value===this.list.GROUP_BY_STATUS_VALUE&&this.list.isSubtasksIncluded&&this.list.emitRefreshSubtasksIncluded(),this.roadmapService.getCurrentGroup().value===this.roadmapService.GROUP_BY_STATUS_VALUE&&this.roadmapService.onGroupChange(q.id,q.status_id),this.cdr.markForCheck())}}ngOnInit(){this.socket.on(v.C.TASK_NAME_CHANGE.toString(),this.handleNameChangeResponse),this.socket.on(v.C.TASK_STATUS_CHANGE.toString(),this.handleStatusChangeResponse),this.autoFocusNameForNewTasks()}ngOnDestroy(){this.socket.removeListener(v.C.TASK_NAME_CHANGE.toString(),this.handleNameChangeResponse),this.socket.removeListener(v.C.TASK_STATUS_CHANGE.toString(),this.handleStatusChangeResponse)}handleNameChange(p){p&&this.socket.emit(v.C.TASK_NAME_CHANGE.toString(),JSON.stringify({task_id:p.id,name:p.name,parent_task:p.parent_task_id}))}handleStatusChange(p,z){this.socket.emit(v.C.TASK_STATUS_CHANGE.toString(),JSON.stringify({task_id:z.id,status_id:p,parent_task:z.parent_task_id,team_id:this.auth.getCurrentSession()?.team_id})),this.socket.emit(v.C.GET_TASK_PROGRESS.toString(),z.id),this.cdr.detectChanges()}autoFocusNameForNewTasks(){this.service.model.task?.name===J.qu&&this.ngZone.runOutsideAngular(()=>{this.showTaskNameInput=!0,setTimeout(()=>{this.input?.nativeElement.focus(),this.input?.nativeElement.select()},100)})}addFocusCls(p){this.renderer.addClass(p,this.INPUT_FOCUSED_CLS)}focusInput(){setTimeout(()=>{this.input.nativeElement.focus()},50)}removeFocusCls(p){this.renderer.removeClass(p,this.INPUT_FOCUSED_CLS)}hasCls(p){return p.classList.contains(this.INPUT_FOCUSED_CLS)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(e.sBO),e.Y36(a0.s),e.Y36(e.R0b),e.Y36(e.Qsj),e.Y36(n0.f),e.Y36(E.b),e.Y36(F0.s),e.Y36(H0.e),e.Y36(tt.z))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-name"]],viewQuery:function(p,z){if(1&p&&e.Gf(Je,5),2&p){let C;e.iGM(C=e.CRH())&&(z.input=C.first)}},decls:1,vars:1,consts:[["nz-row","",3,"nzGutter",4,"ngIf"],["nz-row","",3,"nzGutter"],["nz-col","",3,"nzSpan"],[1,"mb-0","pe-2"],[3,"nzSpan"],[4,"ngIf"],["nz-col","",1,"pe-0",3,"nzSpan"],[1,"mb-0"],[1,"text-right","mt-1",3,"nzErrorTip"],[1,"w-auto","rounded-pill","custom-status-pill","custom-select",3,"nzDropdownMatchSelectWidth","ngModel","nzPlaceHolder","ngModelChange"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["nz-typography","",1,"mb-0","name-text",3,"click"],["nz-input","","placeholder","Type your task",1,"task-name-input",3,"ngModel","nzBorderless","maxlength","ngModelChange","focus","blur","keyup.enter"],["input",""],["class","length-alert","nz-typography","","nzType","secondary",3,"warn",4,"ngIf"],["nz-typography","","nzType","secondary",1,"length-alert"],[3,"nzValue","nzLabel"]],template:function(p,z){1&p&&e.YNc(0,sn,11,13,"div",0),2&p&&e.Q6J("ngIf",z.service.model.task)},dependencies:[f0.sg,f0.O5,V.t3,V.SK,r0.Nx,r0.Fd,c0.Fj,c0.JJ,c0.nD,c0.On,b0.Zp,l1.Ip,l1.Vq,N0.ZU,Y1.m],styles:[".task-name-input[_ngcontent-%COMP%], .name-text[_ngcontent-%COMP%]{font-size:16px;font-weight:500;transition:none;border:1px solid transparent;padding-left:7px;padding-right:7px}.task-name-input[_ngcontent-%COMP%]:hover, .task-name-input[_ngcontent-%COMP%]:focus, .name-text[_ngcontent-%COMP%]:hover, .name-text[_ngcontent-%COMP%]:focus{cursor:text;border:1px solid #d9d9d9;border-radius:4px}.task-name-input[_ngcontent-%COMP%]:focus, .name-text[_ngcontent-%COMP%]:focus{border:1px solid #1890ff}.name-text[_ngcontent-%COMP%]{padding-top:4px;padding-bottom:4px}.length-alert[_ngcontent-%COMP%]{position:absolute;right:0;bottom:-15px}.length-alert.warn[_ngcontent-%COMP%]{color:red}.error[_ngcontent-%COMP%]{border:1px solid red!important}.custom-status-pill[_ngcontent-%COMP%]{max-width:120px;min-width:100px;text-align:center}.custom-status-pill[_ngcontent-%COMP%] nz-select-top-control[_ngcontent-%COMP%]{padding-left:6px;padding-right:6px}.custom-status-pill[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{max-width:120px}"],changeDetection:0}),U})();var Ln=s(61855),wt=s(69930),Lt=s.n(wt),Et=s(59866),kn=s(63481),xn=s(66987),rt=s(28538),Nn=s(29232),cn=s(60047);const Sn=["hoursInput"],ft=["startInput"];function Ht(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"worklenz-task-timer",13),e.NdJ("onStart",function(){e.CHM(b);const z=e.oxw();return z.updateTaskList(),e.KtG(z.emitStart(z.taskId))})("onStop",function(){e.CHM(b);const z=e.oxw();return z.updateTaskList(),e.KtG(z.emitStop(z.taskId))}),e.qZA()}if(2&u){const b=e.oxw();e.Q6J("taskId",b.taskId)("projectId",b.projectId?b.projectId:"")("timerStartTime",b.timerStartTime)}}function Yt(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",14)(1,"div",15),e._UZ(2,"img",16),e.qZA(),e.TgZ(3,"span",17),e._uU(4,"No time logs found in the task."),e.qZA(),e.TgZ(5,"div",18)(6,"button",19),e.NdJ("click",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.setTodayAsDefault())}),e._UZ(7,"span",20),e._uU(8,"Add Timelog "),e.qZA()()()}}function yn(u,U){if(1&u&&(e._UZ(0,"nz-avatar",32),e.ALo(1,"firstCharUpper")),2&u){const b=e.oxw().$implicit;e.Udp("background-color",b.avatar_color),e.Q6J("nzSize",26)("nzText",e.lcZ(1,4,b.user_name))}}function Mn(u,U){if(1&u&&(e.TgZ(0,"span",33),e._uU(1),e.ALo(2,"date"),e.ALo(3,"date"),e.qZA()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.AsE(" ",e.xi3(2,2,b.start_time,"MMM d, y, h:mm a")," - ",e.xi3(3,5,b.end_time,"MMM d, y, h:mm a")," ")}}function Bn(u,U){if(1&u&&(e.TgZ(0,"span",33),e._uU(1),e.ALo(2,"date"),e.ALo(3,"date"),e.qZA()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.AsE(" ",e.xi3(2,2,b.start_time,"MMM d, y, h:mm a")," - ",e.xi3(3,5,b.end_time,"MMM d, y, h:mm a")," ")}}function Gt(u,U){if(1&u&&(e.TgZ(0,"div",34)(1,"span",35),e._uU(2),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(2),e.Oqu(b.description)}}function wn(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",36)(1,"ul",37)(2,"nz-list-item-action")(3,"button",38),e.NdJ("click",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw(2);return e.KtG(C.editRecord(z))}),e._uU(4,"Edit "),e.qZA()(),e.TgZ(5,"nz-list-item-action")(6,"button",39),e.NdJ("nzOnConfirm",function(){e.CHM(b);const z=e.oxw().$implicit,C=e.oxw(2);return e.KtG(C.delete(z.id))}),e._uU(7,"Delete "),e.qZA()()()()}if(2&u){const b=e.oxw(3);e.xp6(3),e.Q6J("disabled",!!b.editId)("nzSize","small")("nzType","link"),e.xp6(3),e.Q6J("disabled",!!b.editId)("nzPopconfirmTitle","Are you sure?")("nzSize","small")("nzType","link")}}function En(u,U){if(1&u&&(e.TgZ(0,"nz-list-item")(1,"nz-list-item-meta",23)(2,"nz-list-item-meta-avatar",24),e.YNc(3,yn,2,6,"nz-avatar",25),e.qZA(),e.TgZ(4,"nz-list-item-meta-title")(5,"span",26)(6,"strong"),e._uU(7),e.qZA(),e._uU(8," logged "),e.TgZ(9,"strong"),e._uU(10),e.qZA(),e._uU(11),e.ALo(12,"fromNow"),e.qZA()(),e.TgZ(13,"nz-list-item-meta-description"),e.ynx(14,27),e.YNc(15,Mn,4,8,"ng-template",28),e.YNc(16,Bn,4,8,"ng-template",28),e.BQk(),e.qZA()(),e.YNc(17,Gt,3,1,"div",29),e.YNc(18,wn,8,7,"div",30),e._UZ(19,"nz-list-item-extra",31),e.qZA()),2&u){const b=U.$implicit,p=e.oxw(2);e.ekj("highlight",b.id===p.editId),e.xp6(2),e.Q6J("nzSrc",b.avatar_url),e.xp6(1),e.Q6J("ngIf",!b.avatar_url),e.xp6(4),e.Oqu(b.user_name),e.xp6(3),e.Oqu(b.time_spent_text),e.xp6(1),e.AsE(" ",b.logged_by_timer?"via Timer":""," about ",e.lcZ(12,13,b.created_at)," "),e.xp6(3),e.Q6J("ngSwitch",!!b.logged_by_timer),e.xp6(1),e.Q6J("ngSwitchCase",!0),e.xp6(1),e.Q6J("ngSwitchCase",!1),e.xp6(1),e.Q6J("ngIf",b.description),e.xp6(1),e.Q6J("ngIf",p.canDelete(b.user_id))}}function Pn(u,U){if(1&u&&(e.TgZ(0,"nz-list",21),e.YNc(1,En,20,15,"nz-list-item",22),e.qZA()),2&u){const b=e.oxw();e.Udp("margin-bottom",b.showForm?227:93,"px"),e.Q6J("nzItemLayout","vertical")("nzSize","small"),e.xp6(1),e.Q6J("ngForOf",b.timeLogs)}}function Dn(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",42),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.setTodayAsDefault())}),e._UZ(1,"span",20),e._uU(2," Add Timelog "),e.qZA()}}function zn(u,U){if(1&u&&(e.TgZ(0,"nz-form-item",40),e.YNc(1,Dn,3,0,"button",41),e.qZA()),2&u){const b=e.oxw();e.xp6(1),e.Q6J("ngIf",b.timeLogs.length)}}function In(u,U){if(1&u&&(e.TgZ(0,"span",56),e._uU(1),e.qZA()),2&u){const b=e.oxw(2);e.xp6(1),e.hij(" ",b.errorText,"")}}function an(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",57),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.setFormVisibility(!1))}),e._uU(1," Cancel "),e.qZA()}2&u&&e.Q6J("nzType","default")}function Xn(u,U){if(1&u&&(e.TgZ(0,"button",58),e._UZ(1,"span",59),e._uU(2),e.qZA()),2&u){const b=e.oxw(2);e.Q6J("disabled",!b.isValid())("nzLoading",b.loading),e.xp6(1),e.Q6J("nzTheme","outline"),e.xp6(1),e.hij(" ",b.editId?"Update":"Log time"," ")}}function Zn(u,U){if(1&u&&(e.ynx(0),e.TgZ(1,"div",43)(2,"div",44)(3,"nz-form-item",40)(4,"nz-form-label",45),e._uU(5,"Date"),e.qZA(),e.TgZ(6,"nz-form-control",45),e._UZ(7,"nz-date-picker",46),e.qZA()()(),e.TgZ(8,"div",44)(9,"nz-form-item",40)(10,"nz-form-label",45),e._uU(11,"Start time"),e.qZA(),e.TgZ(12,"nz-form-control",45),e._UZ(13,"nz-time-picker",47,48),e.qZA()()(),e.TgZ(15,"div",44)(16,"nz-form-item",40)(17,"nz-form-label",45),e._uU(18,"End time"),e.qZA(),e.TgZ(19,"nz-form-control",45),e._UZ(20,"nz-time-picker",47),e.qZA()()(),e.ynx(21),e.YNc(22,In,2,1,"span",49),e.BQk(),e.qZA(),e.TgZ(23,"div",50)(24,"div",44)(25,"nz-form-item",40)(26,"nz-form-label",45),e._uU(27,"Work description"),e.qZA(),e.TgZ(28,"nz-form-control",51),e._UZ(29,"textarea",52),e.qZA()()(),e.TgZ(30,"div",53)(31,"nz-space"),e.YNc(32,an,2,1,"button",54),e.YNc(33,Xn,3,4,"button",55),e.qZA()()(),e.BQk()),2&u){const b=e.oxw();e.xp6(1),e.Q6J("nzGutter",24),e.xp6(1),e.Q6J("nzSpan",6),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","date")("nzDisabledDate",b.disabledDate),e.xp6(1),e.Q6J("nzSpan",6),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","start")("nzFormat","HH:mm")("nzMinuteStep",1)("nzDisabledHours",b.disabledStartHours)("nzDisabledMinutes",b.disabledStartMinutes),e.xp6(2),e.Q6J("nzSpan",6),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","end")("nzFormat","HH:mm")("nzMinuteStep",1)("nzDisabledHours",b.disabledEndHours)("nzDisabledMinutes",b.disabledEndMinutes),e.xp6(2),e.Q6J("ngIf",b.errorDatePair),e.xp6(1),e.Q6J("nzGutter",24),e.xp6(1),e.Q6J("nzSpan",24),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(2),e.Q6J("nzSpan",null),e.xp6(1),e.Q6J("formControlName","description"),e.uIk("id",b.utils.isTestServer()?"description":null),e.xp6(1),e.Q6J("nzSpan",24)}}let bn=(()=>{var u;class U{compareDates(){if(this.form.value.start&&this.form.value.end){const p=K()({year:2e3,month:1,day:1,hour:new Date(this.form.value.start).getHours(),minute:new Date(this.form.value.start).getMinutes(),second:0}),z=K()({year:2e3,month:1,day:1,hour:new Date(this.form.value.end).getHours(),minute:new Date(this.form.value.end).getMinutes(),second:0});return p.isAfter(z,"minute")?(this.errorText="Start time cannot be larger than End time.",this.errorDatePair=!0,this.cdr.markForCheck(),!0):!this.form.value.date&&(this.errorText="Select date first.",this.errorDatePair=!0,this.cdr.markForCheck(),!0)}return!0}get totalLogged(){const p=K().duration(this._totalLogged,"seconds");return this.formatDuration(p)}constructor(p,z,C,s0,r,x,O,i,o,q){this.fb=p,this.api=z,this.app=C,this.cdr=s0,this.service=r,this.auth=x,this.socket=O,this.ngZone=i,this.timerService=o,this.utils=q,this.taskId=null,this.timerStartTime=null,this.projectId=null,this.max=1e3,this.min=0,this.loading=!1,this.loadingLogs=!1,this.showForm=!1,this.exporting=!1,this.errorDatePair=!1,this.errorText="",this.editId=null,this.timeLogs=[],this._totalLogged=0,this.disabledStartHours=()=>{if(this.form.value.end){const y0=[];for(let J0=new Date(this.form.value.end).getHours()+1;J0<=24;J0++)y0.push(J0);return y0}return[]},this.disabledStartMinutes=w=>{if(this.form.value.end){const J0=[];if(w===new Date(this.form.value.end).getHours())for(let d1=new Date(this.form.value.end).getMinutes();d1<=60;d1++)J0.push(d1);return J0}return[]},this.disabledEndHours=()=>{if(this.form.value.start){const w=new Date(this.form.value.start).getHours()-1,y0=[];for(let J0=0;J0<=w;J0++)y0.push(J0);return y0}return[]},this.disabledEndMinutes=w=>{if(this.form.value.start){const J0=[];if(w===new Date(this.form.value.start).getHours()){const m1=new Date(this.form.value.start).getMinutes();for(let d1=0;d1<=m1;d1++)J0.push(d1)}return J0}return[]},this.disabledDate=w=>(0,Ln.Z)(w,new Date)>0,this.handleResponse=w=>{w?.id===this.taskId&&this.get()},this.form=this.fb.group({description:[],date:[],start:[null],end:[null]})}ngOnInit(){this.get(),this.socket.on(v.C.TASK_TIMER_STOP.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(v.C.TASK_TIMER_STOP.toString(),this.handleResponse),this.editId=null,this.timeLogs=[]}quickAssignMember(p){const z=this.service.model.task;if(!z)return;const C={team_member_id:p.team_member_id,project_id:this.projectId,task_id:z.id,reporter_id:p?.id,mode:0,parent_task:z.parent_task_id};this.socket.emit(v.C.QUICK_ASSIGNEES_UPDATE.toString(),JSON.stringify(C)),this.socket.once(v.C.QUICK_ASSIGNEES_UPDATE.toString(),s0=>{p.team_member_id&&(this.service.emitTimeLogAssignMember(s0),this.service.emitSingleMemberChange(p.team_member_id))}),this.cdr.markForCheck()}submit(){var p=this;return(0,M.Z)(function*(){if(p.form.valid){if(!p.taskId||p.compareDates())return;try{p.loading=!0;const z=p.auth.getCurrentSession(),C=p.service.model.task?.assignees;z&&!C.includes(z?.team_member_id)&&p.quickAssignMember(z);const s0=yield p.createReqBody();if(!s0)return;(p.editId?yield p.api.update(p.editId,p.mapToRequest(),s0):yield p.api.create(p.mapToRequest(),s0)).done&&(p.setFormVisibility(!1),yield p.get(),p.timerService.emitSubmitOrUpdate()),p.loading=!1}catch(z){(0,n.tu)(z),p.loading=!1}}else p.app.displayErrorsOf(p.form);p.cdr.detectChanges()})()}get(){var p=this;return(0,M.Z)(function*(){if(p.taskId){try{p._totalLogged=0,p.loadingLogs=!0;const z=yield p.api.getByTask(p.taskId,p.auth.getCurrentSession()?.timezone_name?p.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone);z.done&&(p.buildText(z),p.timeLogs=z.body),p.loadingLogs=!1}catch{p.loadingLogs=!1}p.cdr.detectChanges()}})()}formatDuration(p){let C="";if(0===p.asMilliseconds())return"0h 0m";const s0=~~p.asHours(),r=p.minutes(),x=p.seconds();return C=0===s0&&x>0?`${r}m ${x}s`:s0>0&&0===x?`${s0}h ${r}m`:s0>0&&x>0?`${s0}h ${r}m ${x}s`:`${s0}h ${r}m`,C}buildText(p){this._totalLogged=0;for(const z of p.body){const C=K().duration(z.time_spent,"seconds");z.time_spent_text=this.formatDuration(C),this._totalLogged+=parseFloat((z.time_spent||0).toString())}}delete(p){var z=this;return(0,M.Z)(function*(){if(p&&z.taskId)try{(yield z.api.delete(p,z.taskId)).done&&z.get()}catch{}})()}mapToRequest(){return{id:this.taskId||void 0,project_id:this.projectId,start_time:this.form.value.start||null,end_time:this.form.value.end||null,description:this.form.value.description,created_at:this.form.value.date||null}}createReqBody(){var p=this;return(0,M.Z)(function*(){const z=p.mapToRequest();if(!z.start_time||!z.end_time||!z.created_at)return;const C=new Date(z.created_at),s0=K()(z.start_time),r=K()(z.end_time),x=K()({year:C.getFullYear(),month:C.getMonth(),day:C.getDate(),hour:s0.hours(),minute:s0.minutes(),second:0}),O=K()({year:C.getFullYear(),month:C.getMonth(),day:C.getDate(),hour:r.hours(),minute:r.minutes(),second:0}),i=x.diff(O,"seconds");return{id:p.taskId||void 0,project_id:p.projectId,formatted_start:x,seconds_spent:Math.floor(Math.abs(i)),description:z.description}})()}setFormVisibility(p){this.showForm=p,p?this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.startInput.focus()})}):(this.form.reset(),this.editId=null,this.errorText="",this.errorDatePair=!1)}canDelete(p){return this.auth.getCurrentSession()?.id===p}isValid(){return this.form.value.start&&this.form.value.end}editRecord(p){var z=this;return(0,M.Z)(function*(){p.id&&(z.editId=p.id,z.form.setValue({start:p.start_time,end:p.end_time,description:p.description,date:p.created_at}),z.setFormVisibility(!0))})()}exportExcel(){var p=this;return(0,M.Z)(function*(){if(p.taskId&&!p.exporting){try{p.exporting=!0,p.api.exportExcel(p.taskId),p.exporting=!1}catch{p.exporting=!1}p.cdr.detectChanges()}})()}updateTaskList(){(0,Y.Xk)()}emitStart(p){this.timerService.emitStart(p,Date.now())}emitStop(p){this.timerService.emitStop(p)}setTodayAsDefault(){this.form.setValue({date:Lt().tz(new Date,`${this.auth.getCurrentSession()?.timezone_name?this.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone}`).format("YYYY-MM-DD"),description:null,start:null,end:null}),this.setFormVisibility(!0)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(c0.qu),e.Y36(Et.L),e.Y36(tt.z),e.Y36(e.sBO),e.Y36(n0.f),e.Y36(H0.e),e.Y36(a0.s),e.Y36(e.R0b),e.Y36(kn.d),e.Y36(Q.F))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-time-log"]],viewQuery:function(p,z){if(1&p&&(e.Gf(Sn,5),e.Gf(ft,5)),2&p){let C;e.iGM(C=e.CRH())&&(z.hoursInput=C.first),e.iGM(C=e.CRH())&&(z.startInput=C.first)}},inputs:{taskId:"taskId",parentTaskId:"parentTaskId",timerStartTime:"timerStartTime",projectId:"projectId"},decls:16,vars:13,consts:[[3,"nzActive","nzLoading"],["nz-typography","",1,"mb-0","fw-normal","d-flex","align-items-center","justify-content-between",2,"user-select","text",3,"nzType"],[1,"d-flex","align-items-center"],["class","task-view-timer",3,"taskId","projectId","timerStartTime","onStart","onStop",4,"ngIf"],["nz-button","","nzType","default","nzSize","small",1,"ms-1",3,"nzLoading","click"],["nz-icon","","nzType","download","nzTheme","outline"],[1,"mt-2"],["class","pt-4 pb-5 text-center",4,"ngIf"],[3,"nzItemLayout","nzSize","margin-bottom",4,"ngIf"],[3,"nzOffsetBottom"],["nz-form","",1,"log-form",3,"formGroup","nzLayout","submit"],["class","mb-1",4,"ngIf"],[4,"ngIf"],[1,"task-view-timer",3,"taskId","projectId","timerStartTime","onStart","onStop"],[1,"pt-4","pb-5","text-center"],[1,"no-data-img-holder","mx-auto","mb-3"],["src","/assets/images/empty-box.webp","alt","",1,"img-fluid"],["nz-typography","",1,"no-data-text"],[1,"d-block","mt-2"],["nz-button","","nzType","primary",3,"click"],["nz-icon","","nzType","plus","nzTheme","outline"],[3,"nzItemLayout","nzSize"],[3,"highlight",4,"ngFor","ngForOf"],[1,"m-0"],[3,"nzSrc"],["class","mt-2",3,"nzSize","nzText","background-color",4,"ngIf"],["nz-typography","",1,"item-meta-title",2,"font-weight","normal"],[3,"ngSwitch"],[3,"ngSwitchCase"],["class","description-container",4,"ngIf"],["class","d-flex align-items-center justify-content-end",4,"ngIf"],[1,"d-none"],[1,"mt-2",3,"nzSize","nzText"],["nz-typography","",1,"item-meta-description"],[1,"description-container"],["nz-typography",""],[1,"d-flex","align-items-center","justify-content-end"],["nz-list-item-actions","",1,"m-0"],["nz-button","",1,"px-0",3,"disabled","nzSize","nzType","click"],["nz-popconfirm","","nz-button","",1,"px-0",3,"disabled","nzPopconfirmTitle","nzSize","nzType","nzOnConfirm"],[1,"mb-1"],["nz-button","","nzType","primary","class","ms-1",3,"click",4,"ngIf"],["nz-button","","nzType","primary",1,"ms-1",3,"click"],["nz-row","",1,"mb-3","position-relative",3,"nzGutter"],["nz-col","",3,"nzSpan"],[3,"nzSpan"],[1,"w-100",3,"formControlName","nzDisabledDate"],[1,"w-100",3,"formControlName","nzFormat","nzMinuteStep","nzDisabledHours","nzDisabledMinutes"],["startInput",""],["nz-typography","","nzType","danger","class","error-text mt-1",4,"ngIf"],["nz-row","",3,"nzGutter"],["nzErrorTip","Please enter a description!",3,"nzSpan"],["autofocus","","nz-input","","placeholder","Add a description",3,"formControlName"],["nz-col","",1,"align-self-center",3,"nzSpan"],["class","mt-2","nz-button","","nzBlock","","type","button",3,"nzType","click",4,"nzSpaceItem"],["class","mt-2","nz-button","","nzBlock","","nzType","primary","type","submit",3,"disabled","nzLoading",4,"nzSpaceItem"],["nz-typography","","nzType","danger",1,"error-text","mt-1"],["nz-button","","nzBlock","","type","button",1,"mt-2",3,"nzType","click"],["nz-button","","nzBlock","","nzType","primary","type","submit",1,"mt-2",3,"disabled","nzLoading"],["nz-icon","","nzType","field-time",3,"nzTheme"]],template:function(p,z){1&p&&(e.TgZ(0,"nz-skeleton",0)(1,"div",1)(2,"span"),e._uU(3),e.qZA(),e.TgZ(4,"div",2),e.YNc(5,Ht,1,3,"worklenz-task-timer",3),e.TgZ(6,"button",4),e.NdJ("click",function(){return z.exportExcel()}),e._UZ(7,"span",5),e._uU(8," Export to Excel "),e.qZA()()(),e._UZ(9,"nz-divider",6),e.YNc(10,Yt,9,0,"div",7),e.YNc(11,Pn,2,5,"nz-list",8),e.qZA(),e.TgZ(12,"nz-affix",9)(13,"form",10),e.NdJ("submit",function(){return z.submit()}),e.YNc(14,zn,2,1,"nz-form-item",11),e.YNc(15,Zn,34,30,"ng-container",12),e.qZA()()),2&p&&(e.Q6J("nzActive",!0)("nzLoading",z.loadingLogs),e.xp6(1),e.Q6J("nzType","secondary"),e.xp6(2),e.hij("Total Logged: ",z.totalLogged,""),e.xp6(2),e.Q6J("ngIf",z.taskId),e.xp6(1),e.Q6J("nzLoading",z.exporting),e.xp6(4),e.Q6J("ngIf",!z.timeLogs.length&&!z.loadingLogs),e.xp6(1),e.Q6J("ngIf",z.timeLogs.length),e.xp6(1),e.Q6J("nzOffsetBottom",0),e.xp6(1),e.Q6J("formGroup",z.form)("nzLayout","vertical"),e.xp6(1),e.Q6J("ngIf",!z.showForm),e.xp6(1),e.Q6J("ngIf",z.showForm))},dependencies:[f0.sg,f0.O5,f0.RF,f0.n9,j0.ng,V.t3,V.SK,r0.Lr,r0.Nx,r0.iK,r0.Fd,c0._Y,c0.Fj,c0.JJ,c0.JL,b0.Zp,B0.Dz,N0.ZU,g0.uw,D0.Ls,xn.g,c0.sg,c0.u,A0.ix,Z.w,p0.dQ,a1.NU,a1.$1,rt.$,q1.JW,y1.n_,y1.AA,y1.yi,y1.IO,y1.Pb,y1.Vk,y1.nk,y1.KC,y1.yw,Nn.D,cn.m4,f0.uU,M1.d,Q0.I],styles:["nz-list-item-meta-title[_ngcontent-%COMP%], nz-list-item-meta-description[_ngcontent-%COMP%], .log-description[_ngcontent-%COMP%]{-webkit-user-select:text;user-select:text}nz-list-item[_ngcontent-%COMP%]{border-radius:4px}nz-list-item[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{transition:none!important}nz-list-item[_ngcontent-%COMP%] [nz-list-item-actions][_ngcontent-%COMP%]{visibility:hidden}nz-list-item[_ngcontent-%COMP%]:hover{background:#fafafa}nz-list-item[_ngcontent-%COMP%]:hover [nz-list-item-actions][_ngcontent-%COMP%]{visibility:visible}.log-form[_ngcontent-%COMP%]{background:#FAFAFA;margin-left:-1.5rem;margin-right:-1.5rem;padding:1rem 1.5rem;border-top:1px solid rgba(0,0,0,.06)}nz-affix[_ngcontent-%COMP%]{position:absolute;bottom:0;left:24px;right:24px;z-index:1}.highlight[_ngcontent-%COMP%]{border-bottom:1px solid #1890ff!important;border:1px solid #1890ff}.no-data-img-holder[_ngcontent-%COMP%]{width:100px}.item-meta-title[_ngcontent-%COMP%]{font-size:15px!important}.item-meta-description[_ngcontent-%COMP%]{color:#00000073;font-size:13px!important}.description-container[_ngcontent-%COMP%]{margin-left:42px;margin-top:4px}.error-text[_ngcontent-%COMP%]{position:absolute;bottom:-16px;font-size:13px;margin-left:12px;animation-name:slideDown;animation-duration:.125s}"],changeDetection:0}),U})();var rn=function(u){return u.NAME="name",u.STATUS="status",u.ASSIGNEES="assignee",u.END_DATE="end_date",u.START_DATE="start_date",u.PRIORITY="priority",u.PHASE="phase",u.ESTIMATION="estimation",u.LABEL="label",u.DESCRIPTION="description",u.ATTACHMENT="attachment",u.COMMENT="comment",u.ARCHIVE="archive",u}(rn||{});let Un=(()=>{var u;class U extends Ze.P{constructor(p){super(),this.http=p,this.root=`${this.API_BASE_URL}/activity-logs`}getActivityLogs(p){return this._get(this.http,`${this.root}/${p}`)}}return(u=U).\u0275fac=function(p){return new(p||u)(e.LFG(me.eN))},u.\u0275prov=e.Yz7({token:u,factory:u.\u0275fac,providedIn:"root"}),U})();var On=s(43498);function Fn(u,U){if(1&u&&(e.TgZ(0,"div"),e._UZ(1,"nz-avatar",12),e.TgZ(2,"span",13),e._uU(3),e.qZA(),e._uU(4,"\xa0 "),e._UZ(5,"span",14),e._uU(6,"\xa0\xa0 "),e.TgZ(7,"nz-tag",15),e._uU(8),e.qZA()()),2&u){const b=e.oxw().$implicit;let p;e.xp6(1),e.Udp("background-color",null!=b.assigned_user&&b.assigned_user.avatar_url?"#ececec":null==b.assigned_user?null:b.assigned_user.color_code),e.Q6J("nzSize","small")("nzText",null==b.assigned_user||null==b.assigned_user.name||null==(p=b.assigned_user.name.charAt(0))?null:p.toUpperCase())("nzSrc",null==b.assigned_user?null:b.assigned_user.avatar_url),e.xp6(1),e.Q6J("nzType","secondary"),e.xp6(1),e.Oqu(null==b.assigned_user?null:b.assigned_user.name),e.xp6(4),e.Q6J("nzColor","default"),e.xp6(1),e.Oqu(null==b.log_type?null:b.log_type.toUpperCase())}}function ln(u,U){if(1&u&&(e.TgZ(0,"div")(1,"nz-tag",15),e._uU(2),e.qZA(),e._UZ(3,"span",14),e._uU(4,"\xa0\xa0 "),e.TgZ(5,"nz-tag",15),e._uU(6),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("nzColor",null==b.label_data?null:b.label_data.color_code),e.xp6(1),e.Oqu(null==b.label_data?null:b.label_data.name),e.xp6(3),e.Q6J("nzColor","default"),e.xp6(1),e.Oqu("create"===b.log_type?"ADD":"REMOVE")}}function $n(u,U){if(1&u&&(e.TgZ(0,"nz-tag",15),e._uU(1),e.qZA()),2&u){const b=e.oxw(2).$implicit;e.Q6J("nzColor",b.previous_status.color_code?b.previous_status.color_code:""),e.xp6(1),e.Oqu(b.previous_status.name?b.previous_status.name:"None")}}function dn(u,U){if(1&u&&(e.TgZ(0,"div"),e.YNc(1,$n,2,2,"nz-tag",16),e._UZ(2,"span",14),e._uU(3,"\xa0\xa0 "),e.TgZ(4,"nz-tag",15),e._uU(5),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("ngIf",b.previous_status),e.xp6(3),e.Q6J("nzColor",null==b.next_status?null:b.next_status.color_code),e.xp6(1),e.Oqu(null==b.next_status?null:b.next_status.name)}}function Pt(u,U){if(1&u&&(e.TgZ(0,"div")(1,"nz-tag",15),e._uU(2),e.qZA(),e._UZ(3,"span",14),e._uU(4,"\xa0\xa0 "),e.TgZ(5,"nz-tag",15),e._uU(6),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("nzColor",null==b.previous_priority?null:b.previous_priority.color_code),e.xp6(1),e.Oqu(null==b.previous_priority?null:b.previous_priority.name),e.xp6(3),e.Q6J("nzColor",null==b.next_priority?null:b.next_priority.color_code),e.xp6(1),e.Oqu(null==b.next_priority?null:b.next_priority.name)}}function Jn(u,U){if(1&u&&(e.TgZ(0,"div")(1,"nz-tag",15),e._uU(2),e.qZA(),e._UZ(3,"span",14),e._uU(4,"\xa0\xa0 "),e.TgZ(5,"nz-tag",15),e._uU(6),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("nzColor",b.previous_phase?b.previous_phase.color_code:""),e.xp6(1),e.Oqu(b.previous_phase&&b.previous_phase.name?b.previous_phase.name:"Unmapped"),e.xp6(3),e.Q6J("nzColor",b.next_phase?b.next_phase.color_code:""),e.xp6(1),e.Oqu(b.next_phase&&b.next_phase.name?b.next_phase.name:"Unmapped")}}function Hn(u,U){1&u&&e._UZ(0,"div")}function Yn(u,U){if(1&u&&(e.TgZ(0,"div")(1,"nz-tag",15),e._uU(2),e.qZA(),e._uU(3,"\xa0 "),e._UZ(4,"span",14),e._uU(5,"\xa0\xa0 "),e.TgZ(6,"nz-tag",15),e._uU(7),e.qZA()()),2&u){const b=e.oxw().$implicit;e.xp6(1),e.Q6J("nzColor","default"),e.xp6(1),e.Oqu(b.previous||"None"),e.xp6(4),e.Q6J("nzColor","default"),e.xp6(1),e.Oqu(b.current||"None")}}function Gn(u,U){if(1&u&&(e.TgZ(0,"nz-timeline-item")(1,"div",8)(2,"div",4),e._UZ(3,"nz-avatar",5),e.qZA(),e.TgZ(4,"div",6)(5,"strong"),e._uU(6),e.qZA(),e._uU(7),e.TgZ(8,"strong"),e._uU(9),e.qZA(),e._uU(10,". \xa0 "),e.TgZ(11,"span",7),e.ALo(12,"date"),e._uU(13),e.ALo(14,"fromNow"),e.qZA(),e.TgZ(15,"div",9),e.YNc(16,Fn,9,9,"div",10),e.YNc(17,ln,7,4,"div",10),e.YNc(18,dn,6,3,"div",10),e.YNc(19,Pt,7,4,"div",10),e.YNc(20,Jn,7,4,"div",10),e.YNc(21,Hn,1,0,"div",10),e.YNc(22,Yn,8,4,"div",11),e.qZA()()()()),2&u){const b=U.$implicit,p=e.oxw();let z,C;e.xp6(3),e.Udp("background-color",null!=b.done_by&&b.done_by.avatar_url?"#ececec":null==b.done_by?null:b.done_by.color_code),e.Q6J("nzText",null==b.done_by||null==b.done_by.name||null==(z=b.done_by.name.charAt(0))?null:z.toUpperCase())("nzSrc",null==b.done_by?null:b.done_by.avatar_url),e.xp6(3),e.Oqu(null==b.done_by?null:b.done_by.name),e.xp6(1),e.hij(" ",b.log_text," "),e.xp6(2),e.Oqu(b.attribute_type),e.xp6(2),e.Q6J("nzType","secondary")("nzTooltipTitle",e.xi3(12,17,b.created_at,"medium")),e.xp6(2),e.hij(" ",null!==(C=e.lcZ(14,20,b.created_at))&&void 0!==C?C:""," "),e.xp6(2),e.Q6J("ngSwitch",b.attribute_type),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.ASSIGNEES),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.LABEL),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.STATUS),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.PRIORITY),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.PHASE),e.xp6(1),e.Q6J("ngSwitchCase",p.activityLogTypes.DESCRIPTION)}}let jn=(()=>{var u;class U{constructor(p,z,C){this.api=p,this.cdr=z,this.socket=C,this.taskId=null,this.loading=!1,this.logs={},this.activityLogTypes=rn,this.socket.on(v.C.TASK_STATUS_CHANGE.toString(),()=>{this.getActivityLogs()}),this.socket.on(v.C.TASK_NAME_CHANGE.toString(),()=>{this.getActivityLogs()})}ngOnInit(){this.getActivityLogs()}ngOnDestroy(){this.socket.removeListener(v.C.TASK_STATUS_CHANGE.toString(),()=>{this.getActivityLogs()}),this.socket.removeListener(v.C.TASK_NAME_CHANGE.toString(),()=>{this.getActivityLogs()})}getActivityLogs(){var p=this;return(0,M.Z)(function*(){if(p.taskId){try{p.loading=!0;const z=yield p.api.getActivityLogs(p.taskId);z.done&&(p.logs=z.body),p.loading=!1}catch(z){p.loading=!1,(0,n.tu)(z)}p.cdr.markForCheck()}})()}getColor(p){return J.Lj[p?.charAt(0).toUpperCase()||"A"]}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(Un),e.Y36(e.sBO),e.Y36(a0.s))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view-activity-log"]],inputs:{taskId:"taskId"},decls:16,vars:15,consts:[[1,"p-4"],[3,"nzLoading"],[4,"ngFor","ngForOf"],["nz-row","",1,"align-items-center"],["nz-col","","nzFlex","40px"],[3,"nzText","nzSrc"],["nz-col","","nzFlex","auto"],["nz-typography","","nz-tooltip","",3,"nzType","nzTooltipTitle"],["nz-row",""],[1,"mt-3",3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"me-2",3,"nzSize","nzText","nzSrc"],["nz-typography","",3,"nzType"],["nz-icon","","nzType","arrow-right","nzTheme","outline"],[3,"nzColor"],[3,"nzColor",4,"ngIf"]],template:function(p,z){if(1&p&&(e.TgZ(0,"div",0)(1,"nz-skeleton",1)(2,"nz-timeline"),e.YNc(3,Gn,23,22,"nz-timeline-item",2),e.TgZ(4,"nz-timeline-item")(5,"div",3)(6,"div",4),e._UZ(7,"nz-avatar",5),e.qZA(),e.TgZ(8,"div",6)(9,"strong"),e._uU(10),e.qZA(),e._uU(11," created the task. \xa0 "),e.TgZ(12,"span",7),e.ALo(13,"date"),e._uU(14),e.ALo(15,"fromNow"),e.qZA()()()()()()()),2&p){let C,s0;e.xp6(1),e.Q6J("nzLoading",z.loading),e.xp6(2),e.Q6J("ngForOf",z.logs.logs),e.xp6(4),e.Udp("background-color",z.logs.avatar_url?"#ececec":z.logs.color_code),e.Q6J("nzText",null==z.logs.name||null==(C=z.logs.name.charAt(0))?null:C.toUpperCase())("nzSrc",z.logs.avatar_url),e.xp6(3),e.Oqu(z.logs.name),e.xp6(2),e.Q6J("nzType","secondary")("nzTooltipTitle",e.xi3(13,10,z.logs.created_at,"medium")),e.xp6(2),e.hij(" ",null!==(s0=e.lcZ(15,13,z.logs.created_at))&&void 0!==s0?s0:""," ")}},dependencies:[f0.sg,f0.O5,f0.RF,f0.n9,f0.ED,j0.ng,V.t3,V.SK,h0.j,B0.Dz,N0.ZU,T0.SY,D0.Ls,Z.w,On.Zv,On.PD,f0.uU,M1.d],changeDetection:0}),U})();function Qn(u,U){1&u&&e._UZ(0,"worklenz-task-view-info",11)}function kt(u,U){if(1&u&&e._UZ(0,"worklenz-task-view-time-log",12),2&u){const b=e.oxw(3);e.Q6J("projectId",b.projectId)("timerStartTime",b.task.timer_start_time||null)("taskId",b.taskId)("parentTaskId",b.task.parent_task_id)}}function Vn(u,U){if(1&u&&e._UZ(0,"worklenz-task-view-activity-log",13),2&u){const b=e.oxw(3);e.Q6J("taskId",b.taskId)}}function An(u,U){1&u&&(e.ynx(0),e.TgZ(1,"nz-tabset",8)(2,"nz-tab",9),e.YNc(3,Qn,1,0,"ng-template",10),e.qZA(),e.TgZ(4,"nz-tab",9),e.YNc(5,kt,1,4,"ng-template",10),e.qZA(),e.TgZ(6,"nz-tab",9),e.YNc(7,Vn,1,1,"ng-template",10),e.qZA()(),e.BQk()),2&u&&(e.xp6(1),e.Q6J("nzAnimated",!1)("nzType","card"),e.xp6(1),e.Q6J("nzTitle","Info"),e.xp6(2),e.Q6J("nzTitle","Time Log"),e.xp6(2),e.Q6J("nzTitle","Activity Log"))}function Kn(u,U){if(1&u&&(e.ynx(0),e.TgZ(1,"nz-skeleton",6),e.YNc(2,An,8,5,"ng-container",7),e.qZA(),e.BQk()),2&u){const b=e.oxw();e.xp6(1),e.ekj("p-4",b.loading),e.Q6J("nzActive",!0)("nzLoading",b.loading),e.xp6(1),e.Q6J("ngIf",b.task)}}function eo(u,U){1&u&&e._UZ(0,"span",16),2&u&&e.Q6J("nzType","close")("nzTheme","outline")}function to(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"div",17),e.NdJ("click",function(){e.CHM(b);const z=e.oxw(2);return e.KtG(z.onBackClick())}),e._UZ(1,"span",16),e._uU(2," Back "),e.qZA()}2&u&&(e.Q6J("nzTooltipTitle","Back to parent task"),e.xp6(1),e.Q6J("nzType","left")("nzTheme","outline"))}function un(u,U){1&u&&(e.YNc(0,eo,1,2,"span",14),e.YNc(1,to,3,3,"div",15)),2&u&&(e.Q6J("ngSwitchCase",!1),e.xp6(1),e.Q6J("ngSwitchCase",!0))}function _n(u,U){if(1&u){const b=e.EpF();e.TgZ(0,"button",18),e._UZ(1,"span",16),e.qZA(),e.TgZ(2,"nz-dropdown-menu",null,19)(4,"ul",20)(5,"li",21),e.NdJ("click",function(){e.CHM(b);const z=e.oxw();return e.KtG(z.deleteTask())}),e._uU(6,"Delete task"),e.qZA()()()}if(2&u){const b=e.MAs(3);e.Q6J("nzType","text")("nzDropdownMenu",b)("nzTrigger","click"),e.xp6(1),e.Q6J("nzType","ellipsis")("nzTheme","outline")}}function no(u,U){1&u&&e._UZ(0,"worklenz-task-view-name")}function jt(u,U){if(1&u&&e.YNc(0,no,1,0,"worklenz-task-view-name",7),2&u){const b=e.oxw();e.Q6J("ngIf",b.task)}}let oo=(()=>{var u;class U{get show(){return this._show}set show(p){p!==this._show&&(this._show=p)}get task(){return this.service.model.task}constructor(p,z,C,s0,r,x,O,i,o,q,w,y0){this.api=p,this.router=z,this.route=C,this.cdr=s0,this.list=r,this.map=x,this.labelsApi=O,this.renderer=i,this.socket=o,this.kanbanService=q,this.ngZone=w,this.service=y0,this._show=!1,this.showChange=new e.vpe,this.taskId=null,this.taskIdChange=new e.vpe,this.projectId=null,this.selfResetTaskId=!0,this.taskDeleted=new e.vpe,this.loading=!0,this.DRAWER_CLOSE_TIME=100,this.BODY_STYLE={padding:0,overflowX:"hidden",overflowY:"auto"},this.onUrlChange=null,this.onUrlChanged=()=>{setTimeout(()=>{this.handleCancel()},this.DRAWER_CLOSE_TIME)},this.onUrlChange=this.router.events.pipe((0,B.h)(J0=>J0 instanceof c.OD)),this.service.onSelectSubTask.pipe((0,N.sL)()).subscribe(J0=>{J0&&this.handleTaskSelectFromView(J0)}),this.service.onOpenTask.pipe((0,N.sL)()).subscribe(J0=>{this.openTask(J0)}),this.service.onTimeLogAssignMember.pipe((0,N.sL)()).subscribe(J0=>{this.get()})}ngOnDestroy(){this.onUrlChange=null}init(){this.get(),this.getLabels()}handleTaskSelectFromView(p){var z=this;return(0,M.Z)(function*(){z.handleCancel(),p&&(yield(0,n.nn)(),z.taskId=p.id,z.projectId=p.project_id,z.show=!0,z.showChange.emit(!0),z.cdr.detectChanges())})()}onVisibilityChange(p){this.updateQueryParams(p),p?(setTimeout(()=>this.init(),this.DRAWER_CLOSE_TIME),this.hideDocumentOverflow(),this.subscribeToUrlChange(p)):(this.deleteUntitledTask(),this.service.resetModel(),this.resetDocumentOverflow())}hideDocumentOverflow(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.renderer.setStyle(document.documentElement,"overflow","hidden")})})}resetDocumentOverflow(){this.renderer.removeStyle(document.documentElement,"overflow")}subscribeToUrlChange(p){this.onUrlChange&&this.onUrlChange.pipe((0,g.o)(()=>!p,!1)).subscribe(this.onUrlChanged)}deleteUntitledTask(){this.service.model.task?.name===J.qu&&this.deleteTask()}loadParentTaskIfAvailable(p){p?.is_sub_task&&p.parent_task_id&&this.service.emitTaskSelect(p.parent_task_id)}handleCancel(){this._show&&(this._show=!1,this.showChange.emit(this._show),this.selfResetTaskId&&(this.taskId=null,this.taskIdChange.emit(null)),this.removeTaskQueryParam())}getLabels(){var p=this;return(0,M.Z)(function*(){try{const z=yield p.labelsApi.get();z.done&&(p.list.labels=z.body)}catch{}})()}get(){var p=this;return(0,M.Z)(function*(){try{p.loading=!0;const z=yield p.api.getFormViewModel(p.taskId,p.projectId);z.done&&p.handleResponse(z.body),p.loading=!1}catch{p.loading=!1}p.cdr.detectChanges()})()}handleResponse(p){this.service.setModel(p),this.list.members=p.team_members}removeParamFromUrl(p,z){if(!p.has(z))return;const C={};p.keys.filter(s0=>s0!=z).forEach(s0=>C[s0]=p.get(s0)),this.router.navigate([],{queryParams:C,replaceUrl:!0,relativeTo:this.route})}updateQueryParams(p){this.taskId&&(p?this.router.navigate([],{relativeTo:this.route,queryParams:{task:this.taskId},queryParamsHandling:"merge"}):this.removeTaskQueryParam())}isSubTask(){return!!this.service.model.task?.is_sub_task}deleteTask(){var p=this;return(0,M.Z)(function*(){const z=p.service.model.task;if(z?.id)try{if((yield p.api.delete(z.id)).done){if(z.is_sub_task)p.list.removeSubtask(z.id),p.kanbanService.emitDeleteSubTask({parent_task_id:z.parent_task_id}),p.socket.emit(v.C.GET_TASK_PROGRESS.toString(),z.parent_task_id);else if(p.map._subTasksMap.has(z.id)){const r=p.map._subTasksMap.get(z.id);if(r)for(const x of r)p.map.selectTask(x),x.id&&p.list.removeSubtask(x?.id)}if(p.service.model.task&&(p.service.model.task.sub_tasks_count=Math.max((p.service.model.task?.sub_tasks_count||0)-1,0)),z.sub_tasks){if(p.map._subTasksMap.has(z.id)){const r=p.map._subTasksMap.get(z.id);if(r)for(const x of r)p.map.selectTask(x)}}else p.map.selectTask(z);p.list.deleteTask(z.id),p.list.emitRefresh(),p.service.emitDelete({id:z.id,parent_task_id:z.parent_task_id,project_id:p.projectId}),p.service.emitRefresh(z.id),p.kanbanService.emitDeleteTask(z),p.taskDeleted.emit({taskId:z.id}),z.is_sub_task?p.loadParentTaskIfAvailable(z):p.handleCancel()}}catch(C){(0,n.tu)(C)}})()}onBackClick(){const p=this.service.model?.task;p&&(p.is_sub_task&&this.loadParentTaskIfAvailable(p),this.service.emitOnViewBackFrom(p))}removeTaskQueryParam(){this.removeParamFromUrl(this.route.snapshot.queryParamMap,"task")}openTask(p){this.taskId=p.task_id,this.taskIdChange.emit(this.taskId),this.projectId=p.project_id,this.show=!0,this.showChange.emit(!0),this.cdr.markForCheck()}}return(u=U).\u0275fac=function(p){return new(p||u)(e.Y36(S.c),e.Y36(c.F0),e.Y36(c.gz),e.Y36(e.sBO),e.Y36(E.b),e.Y36(t.g),e.Y36(v0.u),e.Y36(e.Qsj),e.Y36(a0.s),e.Y36(I.m),e.Y36(e.R0b),e.Y36(n0.f))},u.\u0275cmp=e.Xpm({type:u,selectors:[["worklenz-task-view"]],inputs:{show:"show",taskId:"taskId",projectId:"projectId",selfResetTaskId:"selfResetTaskId"},outputs:{showChange:"showChange",taskIdChange:"taskIdChange",taskDeleted:"taskDeleted"},decls:8,vars:8,consts:[[3,"nzVisible","nzSize","nzExtra","nzBodyStyle","nzCloseIcon","nzTitle","nzWrapClassName","nzOnClose","nzVisibleChange"],[4,"nzDrawerContent"],[3,"ngSwitch"],["iconTemplate",""],["taskActions",""],["titleTemplate",""],[3,"nzActive","nzLoading"],[4,"ngIf"],[1,"task-drawer-tabset","pb-4",3,"nzAnimated","nzType"],[3,"nzTitle"],["nz-tab",""],[1,"d-block","px-4"],[1,"d-block","px-4",3,"projectId","timerStartTime","taskId","parentTaskId"],[3,"taskId"],["nz-icon","",3,"nzType","nzTheme",4,"ngSwitchCase"],["nz-tooltip","",3,"nzTooltipTitle","click",4,"ngSwitchCase"],["nz-icon","",3,"nzType","nzTheme"],["nz-tooltip","",3,"nzTooltipTitle","click"],["nz-button","","nz-dropdown","",2,"top","-6px",3,"nzType","nzDropdownMenu","nzTrigger"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable",""],["nz-menu-item","","nzDanger","",3,"click"]],template:function(p,z){if(1&p&&(e.TgZ(0,"nz-drawer",0),e.NdJ("nzOnClose",function(){return z.handleCancel()})("nzVisibleChange",function(s0){return z.onVisibilityChange(s0)})("nzVisibleChange",function(s0){return z.show=s0}),e.YNc(1,Kn,3,5,"ng-container",1),e.qZA(),e.YNc(2,un,2,2,"ng-template",2,3,e.W1O),e.YNc(4,_n,7,5,"ng-template",null,4,e.W1O),e.YNc(6,jt,1,1,"ng-template",null,5,e.W1O)),2&p){const C=e.MAs(3),s0=e.MAs(5),r=e.MAs(7);e.Q6J("nzVisible",z.show)("nzSize","large")("nzExtra",s0)("nzBodyStyle",z.BODY_STYLE)("nzCloseIcon",C)("nzTitle",r)("nzWrapClassName","task-form-drawer-opened task-view"),e.xp6(2),e.Q6J("ngSwitch",z.isSubTask())}},dependencies:[f0.O5,f0.RF,f0.n9,H.Vz,H.SQ,j0.ng,Z0.xH,Z0.xw,Z0.cj,R0.wO,R0.r9,p1.cm,p1.RR,p1.wA,T0.SY,D0.Ls,A0.ix,Z.w,p0.dQ,K1,Jt,bn,jn],changeDetection:0}),U})()},88229:(r1,S0,s)=>{"use strict";s.d(S0,{z:()=>Ue});var M=s(96814),e=s(43389),c=s(24139),n=s(3599),J=s(60095),B=s(20824),g=s(9691),v=s(79382),N=s(55695),S=s(90565),E=s(62787),t=s(99183),v0=s(96928),a0=s(8083),I=s(62612),n0=s(9172),f0=s(96109),H=s(52682),j0=s(68373),Z0=s(62595),R0=s(33640),p1=s(66987),T0=s(8660),D0=s(42840),A0=s(61320),Z=s(92574),p0=s(36513),Q=s(28538),V=s(331),r0=s(19035),h0=s(82962),O1=s(13740),N0=s(48128),H0=s(42753),e0=s(16976),X0=s(60804),c0=s(29232),b0=s(29402),E0=s(69234),B0=s(81221),U0=s(82669),z1=s(43498),Q0=s(60047),x0=s(96494),n1=s(57417),h1=s(95717),M0=s(15861),L0=s(94489),o0=s(69649),L=function(u0){return u0.Daily="daily",u0.Weekly="weekly",u0.Monthly="monthly",u0.EveryXDays="every_x_days",u0.EveryXWeeks="every_x_weeks",u0.EveryXMonths="every_x_months",u0}(L||{}),m=s(57907),d=s(65879),K=s(975),g0=s(74764),e1=s(26857),u1=s(69862);let L1=(()=>{var u0;class o1 extends e1.P{constructor(G){super(),this.http=G,this.root=`${this.API_BASE_URL}/task-recurring`}getTaskRecurringData(G){return this._get(this.http,`${this.root}/${G}`)}updateTaskRecurringData(G,k0){return this._put(this.http,`${this.root}/${G}`,k0)}}return(u0=o1).\u0275fac=function(G){return new(G||u0)(d.LFG(u1.eN))},u0.\u0275prov=d.Yz7({token:u0,factory:u0.\u0275fac,providedIn:"root"}),o1})();var k1=s(10095),W0=s(70855),I0=s(41958);const q0=function(){return{width:"510px"}};function X(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"button",5),d.NdJ("nzPopoverVisibleChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.showConfig=k0)})("nzPopoverVisibleChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.configVisibleChange(k0))}),d._uU(1),d._UZ(2,"span",6),d.qZA()}if(2&u0){const _0=d.oxw(2),G=d.MAs(3);d.Q6J("nzType","link")("nzPopoverOverlayStyle",d.DdM(7,q0))("nzPopoverVisible",_0.showConfig)("nzLoading",_0.loadingData)("nzPopoverContent",G),d.xp6(1),d.hij(" ",_0.repeatOption.label," "),d.xp6(1),d.Q6J("nzType","setting")}}function z0(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-form-item",2)(1,"nz-form-label"),d._uU(2,"Recurring"),d.qZA(),d.TgZ(3,"nz-form-control")(4,"nz-switch",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw();return d.KtG(t1.recurring=k0)})("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw();return d.KtG(t1.handleChange(k0))}),d.qZA(),d._uU(5," \xa0 "),d.YNc(6,X,3,8,"button",4),d.qZA()()}if(2&u0){const _0=d.oxw();d.xp6(4),d.Q6J("ngModel",_0.recurring),d.xp6(2),d.Q6J("ngIf",_0.recurring)}}function F0(u0,o1){if(1&u0&&d._UZ(0,"nz-option",14),2&u0){const _0=o1.$implicit;d.Q6J("nzValue",_0)("nzLabel",_0.label)}}function l1(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-col",16)(1,"label",17),d.NdJ("ngModelChange",function(k0){const w1=d.CHM(_0).$implicit;return d.KtG(w1.checked=k0)}),d._uU(2),d.qZA()()}if(2&u0){const _0=o1.$implicit;d.xp6(1),d.Q6J("ngModel",_0.checked),d.xp6(1),d.hij(" ",_0.label," ")}}function $1(u0,o1){if(1&u0&&(d.TgZ(0,"nz-form-item",8)(1,"nz-form-label"),d._uU(2,"Select Days of the Week"),d.qZA(),d.TgZ(3,"nz-form-control")(4,"nz-row"),d.YNc(5,l1,3,2,"nz-col",15),d.qZA()()()),2&u0){const _0=d.oxw(2);d.xp6(5),d.Q6J("ngForOf",_0.daysOfWeek)}}function se(u0,o1){if(1&u0&&d._UZ(0,"nz-option",14),2&u0){const _0=o1.$implicit;d.Q6J("nzValue",_0)("nzLabel",_0.toString())}}function ae(u0,o1){if(1&u0){const _0=d.EpF();d.ynx(0),d.TgZ(1,"nz-form-item",8)(2,"nz-form-label"),d._uU(3,"Date of the month"),d.qZA(),d.TgZ(4,"nz-form-control")(5,"nz-select",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(3);return d.KtG(t1.selectedMonthlyDate=k0)}),d.YNc(6,se,1,2,"nz-option",9),d.qZA()()(),d.BQk()}if(2&u0){const _0=d.oxw(3);d.xp6(5),d.Q6J("ngModel",_0.selectedMonthlyDate),d.xp6(1),d.Q6J("ngForOf",_0.monthlyDateOptions)}}function be(u0,o1){if(1&u0&&d._UZ(0,"nz-option",14),2&u0){const _0=o1.$implicit;d.Q6J("nzValue",_0.value)("nzLabel",_0.label)}}function _e(u0,o1){if(1&u0&&d._UZ(0,"nz-option",14),2&u0){const _0=o1.$implicit;d.Q6J("nzValue",_0.value)("nzLabel",_0.label)}}function Be(u0,o1){if(1&u0){const _0=d.EpF();d.ynx(0),d.TgZ(1,"nz-form-item",8)(2,"nz-form-label"),d._uU(3,"Week of the month"),d.qZA(),d.TgZ(4,"nz-form-control")(5,"nz-select",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(3);return d.KtG(t1.selectedMonthlyWeek=k0)}),d.YNc(6,be,1,2,"nz-option",9),d.qZA()()(),d.TgZ(7,"nz-form-item",8)(8,"nz-form-label"),d._uU(9,"Day of the week"),d.qZA(),d.TgZ(10,"nz-form-control")(11,"nz-select",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(3);return d.KtG(t1.selectedMonthlyDay=k0)}),d.YNc(12,_e,1,2,"nz-option",9),d.qZA()()(),d.BQk()}if(2&u0){const _0=d.oxw(3);d.xp6(5),d.Q6J("ngModel",_0.selectedMonthlyWeek),d.xp6(1),d.Q6J("ngForOf",_0.weekOptions),d.xp6(5),d.Q6J("ngModel",_0.selectedMonthlyDay),d.xp6(1),d.Q6J("ngForOf",_0.dayOptions)}}function le(u0,o1){if(1&u0){const _0=d.EpF();d.ynx(0),d.TgZ(1,"nz-form-item",8)(2,"nz-form-label"),d._uU(3,"Monthly repeat type"),d.qZA(),d.TgZ(4,"nz-form-control")(5,"nz-radio-group",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.monthlyOption=k0)}),d.TgZ(6,"label",18),d._uU(7,"On a specific date"),d.qZA(),d.TgZ(8,"label",19),d._uU(9,"On a specific day"),d.qZA()()()(),d.YNc(10,ae,7,2,"ng-container",11),d.YNc(11,Be,13,4,"ng-container",11),d.BQk()}if(2&u0){const _0=d.oxw(2);d.xp6(5),d.Q6J("ngModel",_0.monthlyOption),d.xp6(5),d.Q6J("ngIf","date"===_0.monthlyOption),d.xp6(1),d.Q6J("ngIf","day"===_0.monthlyOption)}}function he(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-form-item")(1,"nz-form-label"),d._uU(2,"Interval (days)"),d.qZA(),d.TgZ(3,"nz-form-control")(4,"nz-input-number",20),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.intervalDays=k0)}),d.qZA()()()}if(2&u0){const _0=d.oxw(2);d.xp6(4),d.Q6J("ngModel",_0.intervalDays)("nzMin",1)}}function qe(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-form-item")(1,"nz-form-label"),d._uU(2,"Interval (weeks)"),d.qZA(),d.TgZ(3,"nz-form-control")(4,"nz-input-number",20),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.intervalWeeks=k0)}),d.qZA()()()}if(2&u0){const _0=d.oxw(2);d.xp6(4),d.Q6J("ngModel",_0.intervalWeeks)("nzMin",1)}}function ce(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-form-item")(1,"nz-form-label"),d._uU(2,"Interval (months)"),d.qZA(),d.TgZ(3,"nz-form-control")(4,"nz-input-number",20),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw(2);return d.KtG(t1.intervalMonths=k0)}),d.qZA()()()}if(2&u0){const _0=d.oxw(2);d.xp6(4),d.Q6J("ngModel",_0.intervalMonths)("nzMin",1)}}function we(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"nz-skeleton",7)(1,"nz-form-item",8)(2,"nz-form-label"),d._uU(3,"Repeats"),d.qZA(),d.TgZ(4,"nz-form-control")(5,"nz-select",3),d.NdJ("ngModelChange",function(k0){d.CHM(_0);const t1=d.oxw();return d.KtG(t1.repeatOption=k0)}),d.YNc(6,F0,1,2,"nz-option",9),d.qZA()()(),d.YNc(7,$1,6,1,"nz-form-item",10),d.YNc(8,le,12,3,"ng-container",11),d.YNc(9,he,5,2,"nz-form-item",11),d.YNc(10,qe,5,2,"nz-form-item",11),d.YNc(11,ce,5,2,"nz-form-item",11),d.TgZ(12,"nz-form-item",12)(13,"nz-form-control")(14,"button",13),d.NdJ("click",function(){d.CHM(_0);const k0=d.oxw();return d.KtG(k0.updateScheduleData())}),d._uU(15," Save Changes "),d.qZA()()()()}if(2&u0){const _0=d.oxw();d.Q6J("nzLoading",_0.loadingData),d.xp6(5),d.Q6J("ngModel",_0.repeatOption),d.xp6(1),d.Q6J("ngForOf",_0.repeatOptions),d.xp6(1),d.Q6J("ngIf",_0.repeatOption.value===_0.ITaskRecurring.Weekly),d.xp6(1),d.Q6J("ngIf",_0.isMonthlySelected()),d.xp6(1),d.Q6J("ngIf",_0.repeatOption.value===_0.ITaskRecurring.EveryXDays),d.xp6(1),d.Q6J("ngIf",_0.repeatOption.value===_0.ITaskRecurring.EveryXWeeks),d.xp6(1),d.Q6J("ngIf",_0.repeatOption.value===_0.ITaskRecurring.EveryXMonths),d.xp6(3),d.Q6J("nzType","primary")("nzSize","small")("nzLoading",_0.updatingData)}}let fe=(()=>{var u0;class o1{get task(){return this.service.model.task}constructor(G,k0,t1,w1){this.cdr=G,this.socket=k0,this.service=t1,this.api=w1,this.recurring=!1,this.showConfig=!1,this.loadingData=!1,this.updatingData=!1,this.repeatOption={},this.monthlyOption="date",this.repeatOptions=[{value:L.Daily,label:"Daily"},{value:L.Weekly,label:"Weekly"},{value:L.Monthly,label:"Monthly"},{value:L.EveryXDays,label:"Every X days"},{value:L.EveryXWeeks,label:"Every X weeks"},{value:L.EveryXMonths,label:"Every X months"}],this.daysOfWeek=[{label:"Sunday",value:0,checked:!1},{label:"Monday",value:1,checked:!1},{label:"Tuesday",value:2,checked:!1},{label:"Wednesday",value:3,checked:!1},{label:"Thursday",value:4,checked:!1},{label:"Friday",value:5,checked:!1},{label:"Saturday",value:6,checked:!1}],this.weekOptions=[{label:"First",value:1},{label:"Second",value:2},{label:"Third",value:3},{label:"Fourth",value:4},{label:"Last",value:5}],this.dayOptions=[{label:"Sunday",value:0},{label:"Monday",value:1},{label:"Tuesday",value:2},{label:"Wednesday",value:3},{label:"Thursday",value:4},{label:"Friday",value:5},{label:"Saturday",value:6}],this.monthlyDateOptions=Array.from({length:28},(v1,ne)=>ne+1),this.selectedMonthlyDate=1,this.selectedMonthlyWeek=1,this.selectedMonthlyDay=1,this.intervalDays=1,this.intervalWeeks=1,this.intervalMonths=1,this.scheduleData={},this.handleResponse=v1=>{if(this.service.model.task&&v1.task_id)try{v1&&(this.service.model.task.schedule_id=v1.id,this.cdr.markForCheck())}catch(ne){(0,o0.tu)(ne)}},this.ITaskRecurring=L}ngOnInit(){this.recurring=!!this.task?.schedule_id,this.recurring&&this.getScheduleData(),this.socket.on(L0.C.TASK_RECURRING_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(L0.C.TASK_RECURRING_CHANGE.toString(),this.handleResponse)}updateDaysOfWeek(){this.daysOfWeek=this.daysOfWeek.map(G=>({...G,checked:this.scheduleData.days_of_week?.includes(G.value)??!1}))}getScheduleData(){var G=this;return(0,M0.Z)(function*(){if(G.task?.schedule_id)try{G.loadingData=!0;const k0=yield G.api.getTaskRecurringData(G.task?.schedule_id);if(k0.done){if(G.scheduleData=k0.body,G.scheduleData){const t1=G.repeatOptions.find(w1=>w1.value==G.scheduleData.schedule_type);t1&&(console.log(G.scheduleData.day_of_month),G.repeatOption=t1,G.selectedMonthlyDate=G.scheduleData.date_of_month||1,G.selectedMonthlyDay=G.scheduleData.day_of_month||0,G.selectedMonthlyWeek=G.scheduleData.week_of_month||0,G.intervalDays=G.scheduleData.interval_days||1,G.intervalWeeks=G.scheduleData.interval_weeks||1,G.intervalMonths=G.scheduleData.interval_months||1,G.monthlyOption=G.selectedMonthlyDate?"date":"day",G.updateDaysOfWeek(),G.cdr.markForCheck())}else G.repeatOption=G.repeatOptions[0];G.loadingData=!1}}catch(k0){G.loadingData=!1,(0,o0.tu)(k0)}})()}handleChange(G){this.task?.id&&(this.socket.emit(L0.C.TASK_RECURRING_CHANGE.toString(),{task_id:this.task.id,schedule_id:this.task.schedule_id}),this.socket.once(L0.C.TASK_RECURRING_CHANGE.toString(),k0=>{const t1=this.repeatOptions.find(w1=>w1.value==k0.schedule_type);t1&&(this.repeatOption=t1),this.service.emitTaskRecurringChange(k0),this.showConfig=!0,this.cdr.markForCheck()}))}showRecurringConfig(){this.showConfig=!0}configVisibleChange(G){}updateScheduleData(){var G=this;return(0,M0.Z)(function*(){if(G.task?.id&&G.task.schedule_id)try{G.updatingData=!0;const k0=G.getUpdateBody();(yield G.api.updateTaskRecurringData(G.task?.schedule_id,k0)).done&&(G.updatingData=!1,G.showConfig=!1)}catch(k0){(0,o0.tu)(k0)}finally{G.updatingData=!1,G.cdr.markForCheck()}})()}getUpdateBody(){if(!this.task?.id||!this.task.schedule_id)return;const G={id:this.task.id,schedule_type:this.repeatOption.value};switch(this.repeatOption.value){case L.Weekly:G.days_of_week=this.getSelectedDays();break;case L.Monthly:"date"===this.monthlyOption?(G.date_of_month=this.selectedMonthlyDate,this.selectedMonthlyDay=null,this.selectedMonthlyWeek=null):(G.week_of_month=this.selectedMonthlyWeek,G.day_of_month=this.selectedMonthlyDay,this.selectedMonthlyDate=null);break;case L.EveryXDays:G.interval_days=this.intervalDays;break;case L.EveryXWeeks:G.interval_weeks=this.intervalWeeks;break;case L.EveryXMonths:G.interval_months=this.intervalMonths}return G}isMonthlySelected(){return this.repeatOption?.value===L.Monthly}getSelectedDays(){return this.daysOfWeek.filter(G=>G.checked).map(G=>G.value)}monthlyOptionChanged(){this.selectedMonthlyDate=null,this.selectedMonthlyDay=null,this.selectedMonthlyWeek=null}}return(u0=o1).\u0275fac=function(G){return new(G||u0)(d.Y36(d.sBO),d.Y36(K.s),d.Y36(g0.f),d.Y36(L1))},u0.\u0275cmp=d.Xpm({type:u0,selectors:[["worklenz-task-view-recurring-config"]],standalone:!0,features:[d.jDz],decls:4,vars:1,consts:[["class","w-100 mb-2 align-form-item","nz-row","",4,"ngIf"],["contentTemplate",""],["nz-row","",1,"w-100","mb-2","align-form-item"],[3,"ngModel","ngModelChange"],["nz-button","","nz-popover","","nzPopoverTitle","Recurring task configuration","nzPopoverTrigger","click",3,"nzType","nzPopoverOverlayStyle","nzPopoverVisible","nzLoading","nzPopoverContent","nzPopoverVisibleChange",4,"ngIf"],["nz-button","","nz-popover","","nzPopoverTitle","Recurring task configuration","nzPopoverTrigger","click",3,"nzType","nzPopoverOverlayStyle","nzPopoverVisible","nzLoading","nzPopoverContent","nzPopoverVisibleChange"],["nz-icon","",3,"nzType"],[3,"nzLoading"],[1,"align-form-item"],[3,"nzValue","nzLabel",4,"ngFor","ngForOf"],["class","align-form-item",4,"ngIf"],[4,"ngIf"],[1,"mb-0","text-end"],["nz-button","",3,"nzType","nzSize","nzLoading","click"],[3,"nzValue","nzLabel"],["nzSpan","8",4,"ngFor","ngForOf"],["nzSpan","8"],["nz-checkbox","",3,"ngModel","ngModelChange"],["nz-radio-button","","nzValue","date"],["nz-radio-button","","nzValue","day"],[3,"ngModel","nzMin","ngModelChange"]],template:function(G,k0){1&G&&(d.YNc(0,z0,7,2,"nz-form-item",0),d.TgZ(1,"div"),d.YNc(2,we,16,11,"ng-template",null,1,d.W1O),d.qZA()),2&G&&d.Q6J("ngIf",k0.task)},dependencies:[M.ez,M.sg,M.O5,n.U5,k1.t3,k1.SK,n.Nx,n.iK,n.Fd,g.LV,g.Ip,g.Vq,I.Wr,I.Ie,Q0.wY,D0.sL,D0.ix,W0.w,I0.dQ,J.UX,J.JJ,x0.m,x0.i,J.u5,J.On,Z0.PV,Z0.Ls,n1.$6,n1.lU,j0.Zf,j0._V,B.o7,m.aF,m.Of,m.Bq,m.Dg,c.H0,c.ng],styles:["nz-form-item[_ngcontent-%COMP%]{margin-bottom:16px}nz-checkbox-group[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"]}),o1})();var de=s(78645),Te=s(92438),Ge=s(32181),ve=s(48180),t0=s(59773),f=s(40874),y=s(27754),W=s(69594),k=s(68484),Y=s(36028),d0=s(64194),C0=s(99087),$0=s(6593),a1=s(26236),q1=s(49388),x1=s(6192);const B1=["imgRef"],j1=["imagePreviewWrapper"];function Me(u0,o1){if(1&u0){const _0=d.EpF();d.TgZ(0,"li",10),d.NdJ("click",function(){const t1=d.CHM(_0).$implicit;return d.KtG(t1.onClick())}),d._UZ(1,"span",11),d.qZA()}if(2&u0){const _0=o1.$implicit,G=d.oxw();d.ekj("ant-image-preview-operations-operation-disabled",G.zoomOutDisabled&&"zoomOut"===_0.type),d.xp6(1),d.Q6J("nzType",_0.icon)}}function Re(u0,o1){if(1&u0&&d._UZ(0,"img",13,14),2&u0){const _0=d.oxw().$implicit,G=d.oxw();d.Udp("width",_0.width)("height",_0.height)("transform",G.previewImageTransform),d.uIk("src",G.sanitizerResourceUrl(_0.src),d.LSH)("srcset",_0.srcset)("alt",_0.alt)}}function P1(u0,o1){if(1&u0&&(d.ynx(0),d.YNc(1,Re,2,9,"img",12),d.BQk()),2&u0){const _0=o1.index,G=d.oxw();d.xp6(1),d.Q6J("ngIf",G.index===_0)}}function Xe(u0,o1){if(1&u0){const _0=d.EpF();d.ynx(0),d.TgZ(1,"div",15),d.NdJ("click",function(k0){d.CHM(_0);const t1=d.oxw();return d.KtG(t1.onSwitchLeft(k0))}),d._UZ(2,"span",16),d.qZA(),d.TgZ(3,"div",17),d.NdJ("click",function(k0){d.CHM(_0);const t1=d.oxw();return d.KtG(t1.onSwitchRight(k0))}),d._UZ(4,"span",18),d.qZA(),d.BQk()}if(2&u0){const _0=d.oxw();d.xp6(1),d.ekj("ant-image-preview-switch-left-disabled",_0.index<=0),d.xp6(2),d.ekj("ant-image-preview-switch-right-disabled",_0.index>=_0.images.length-1)}}class Qe{constructor(){this.nzKeyboard=!0,this.nzNoAnimation=!1,this.nzMaskClosable=!0,this.nzCloseOnNavigation=!0}}class st{constructor(o1,_0,G){this.previewInstance=o1,this.config=_0,this.overlayRef=G,this.destroy$=new de.x,G.keydownEvents().pipe((0,Ge.h)(k0=>this.config.nzKeyboard&&(k0.keyCode===Y.hY||k0.keyCode===Y.oh||k0.keyCode===Y.SV)&&!(0,Y.Vb)(k0))).subscribe(k0=>{k0.preventDefault(),k0.keyCode===Y.hY&&this.close(),k0.keyCode===Y.oh&&this.prev(),k0.keyCode===Y.SV&&this.next()}),G.detachments().subscribe(()=>{this.overlayRef.dispose()}),o1.containerClick.pipe((0,ve.q)(1),(0,t0.R)(this.destroy$)).subscribe(()=>{this.close()}),o1.closeClick.pipe((0,ve.q)(1),(0,t0.R)(this.destroy$)).subscribe(()=>{this.close()}),o1.animationStateChanged.pipe((0,Ge.h)(k0=>"done"===k0.phaseName&&"leave"===k0.toState),(0,ve.q)(1)).subscribe(()=>{this.dispose()})}switchTo(o1){this.previewInstance.switchTo(o1)}next(){this.previewInstance.next()}prev(){this.previewInstance.prev()}close(){this.previewInstance.startLeaveAnimation()}dispose(){this.destroy$.next(),this.overlayRef.dispose()}}function Q1(u0,o1,_0){const G=u0+o1,k0=(o1-_0)/2;let t1=null;return o1>_0?(u0>0&&(t1=k0),u0<0&&G<_0&&(t1=-k0)):(u0<0||G>_0)&&(t1=u0<0?k0:-k0),t1}const me={x:0,y:0};let re=(()=>{var u0;class o1{get animationDisabled(){return this.config.nzNoAnimation??!1}get maskClosable(){const G=this.nzConfigService.getConfigForComponent("image")||{};return this.config.nzMaskClosable??G.nzMaskClosable??!0}constructor(G,k0,t1,w1,v1,ne,Le,Ke){this.ngZone=G,this.host=k0,this.cdr=t1,this.nzConfigService=w1,this.config=v1,this.overlayRef=ne,this.destroy$=Le,this.sanitizer=Ke,this.images=[],this.index=0,this.isDragging=!1,this.visible=!0,this.animationState="enter",this.animationStateChanged=new d.vpe,this.previewImageTransform="",this.previewImageWrapperTransform="",this.operations=[{icon:"close",onClick:()=>{this.onClose()},type:"close"},{icon:"zoom-in",onClick:()=>{this.onZoomIn()},type:"zoomIn"},{icon:"zoom-out",onClick:()=>{this.onZoomOut()},type:"zoomOut"},{icon:"rotate-right",onClick:()=>{this.onRotateRight()},type:"rotateRight"},{icon:"rotate-left",onClick:()=>{this.onRotateLeft()},type:"rotateLeft"}],this.zoomOutDisabled=!1,this.position={...me},this.containerClick=new d.vpe,this.closeClick=new d.vpe,this.zoom=this.config.nzZoom??1,this.rotate=this.config.nzRotate??0,this.updateZoomOutDisabled(),this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform()}ngOnInit(){this.ngZone.runOutsideAngular(()=>{(0,Te.R)(this.host.nativeElement,"click").pipe((0,t0.R)(this.destroy$)).subscribe(G=>{G.target===G.currentTarget&&this.maskClosable&&this.containerClick.observers.length&&this.ngZone.run(()=>this.containerClick.emit())}),(0,Te.R)(this.imagePreviewWrapper.nativeElement,"mousedown").pipe((0,t0.R)(this.destroy$)).subscribe(()=>{this.isDragging=!0})})}setImages(G){this.images=G,this.cdr.markForCheck()}switchTo(G){this.index=G,this.cdr.markForCheck()}next(){this.index0&&(this.reset(),this.index--,this.updatePreviewImageTransform(),this.updatePreviewImageWrapperTransform(),this.updateZoomOutDisabled(),this.cdr.markForCheck())}markForCheck(){this.cdr.markForCheck()}onClose(){this.closeClick.emit()}onZoomIn(){this.zoom+=1,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position={...me}}onZoomOut(){this.zoom>1&&(this.zoom-=1,this.updatePreviewImageTransform(),this.updateZoomOutDisabled(),this.position={...me})}onRotateRight(){this.rotate+=90,this.updatePreviewImageTransform()}onRotateLeft(){this.rotate-=90,this.updatePreviewImageTransform()}onSwitchLeft(G){G.preventDefault(),G.stopPropagation(),this.prev()}onSwitchRight(G){G.preventDefault(),G.stopPropagation(),this.next()}onAnimationStart(G){"enter"===G.toState?this.setEnterAnimationClass():"leave"===G.toState&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(G)}onAnimationDone(G){"enter"===G.toState?this.setEnterAnimationClass():"leave"===G.toState&&this.setLeaveAnimationClass(),this.animationStateChanged.emit(G)}startLeaveAnimation(){this.animationState="leave",this.cdr.markForCheck()}onDragReleased(){this.isDragging=!1;const G=this.imageRef.nativeElement.offsetWidth*this.zoom,k0=this.imageRef.nativeElement.offsetHeight*this.zoom,{left:t1,top:w1}=function Ve(u0){const o1=u0.getBoundingClientRect(),_0=document.documentElement;return{left:o1.left+(window.pageXOffset||_0.scrollLeft)-(_0.clientLeft||document.body.clientLeft||0),top:o1.top+(window.pageYOffset||_0.scrollTop)-(_0.clientTop||document.body.clientTop||0)}}(this.imageRef.nativeElement),{width:v1,height:ne}=function Ze(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}(),Le=this.rotate%180!=0,ke=function lt(u0){let o1={};return u0.width<=u0.clientWidth&&u0.height<=u0.clientHeight&&(o1={x:0,y:0}),(u0.width>u0.clientWidth||u0.height>u0.clientHeight)&&(o1={x:Q1(u0.left,u0.width,u0.clientWidth),y:Q1(u0.top,u0.height,u0.clientHeight)}),o1}({width:Le?k0:G,height:Le?G:k0,left:t1,top:w1,clientWidth:v1,clientHeight:ne});((0,y.DX)(ke.x)||(0,y.DX)(ke.y))&&(this.position={...this.position,...ke})}sanitizerResourceUrl(G){return this.sanitizer.bypassSecurityTrustResourceUrl(G)}updatePreviewImageTransform(){this.previewImageTransform=`scale3d(${this.zoom}, ${this.zoom}, 1) rotate(${this.rotate}deg)`}updatePreviewImageWrapperTransform(){this.previewImageWrapperTransform=`translate3d(${this.position.x}px, ${this.position.y}px, 0)`}updateZoomOutDisabled(){this.zoomOutDisabled=this.zoom<=1}setEnterAnimationClass(){if(this.animationDisabled)return;const G=this.overlayRef.backdropElement;G&&(G.classList.add("ant-fade-enter"),G.classList.add("ant-fade-enter-active"))}setLeaveAnimationClass(){if(this.animationDisabled)return;const G=this.overlayRef.backdropElement;G&&(G.classList.add("ant-fade-leave"),G.classList.add("ant-fade-leave-active"))}reset(){this.zoom=1,this.rotate=0,this.position={...me}}}return(u0=o1).\u0275fac=function(G){return new(G||u0)(d.Y36(d.R0b),d.Y36(d.SBq),d.Y36(d.sBO),d.Y36(f.jY),d.Y36(Qe),d.Y36(W.Iu),d.Y36(C0.kn),d.Y36($0.H7))},u0.\u0275cmp=d.Xpm({type:u0,selectors:[["nz-image-preview"]],viewQuery:function(G,k0){if(1&G&&(d.Gf(B1,5),d.Gf(j1,7)),2&G){let t1;d.iGM(t1=d.CRH())&&(k0.imageRef=t1.first),d.iGM(t1=d.CRH())&&(k0.imagePreviewWrapper=t1.first)}},hostAttrs:["tabindex","-1","role","document",1,"ant-image-preview-wrap"],hostVars:6,hostBindings:function(G,k0){1&G&&d.WFA("@fadeMotion.start",function(w1){return k0.onAnimationStart(w1)})("@fadeMotion.done",function(w1){return k0.onAnimationDone(w1)}),2&G&&(d.d8E("@.disabled",k0.config.nzNoAnimation)("@fadeMotion",k0.animationState),d.Udp("z-index",k0.config.nzZIndex),d.ekj("ant-image-preview-moving",k0.isDragging))},exportAs:["nzImagePreview"],features:[d._Bn([C0.kn])],decls:11,vars:6,consts:[[1,"ant-image-preview"],["tabindex","0","aria-hidden","true",2,"width","0","height","0","overflow","hidden","outline","none"],[1,"ant-image-preview-content"],[1,"ant-image-preview-body"],[1,"ant-image-preview-operations"],["class","ant-image-preview-operations-operation",3,"ant-image-preview-operations-operation-disabled","click",4,"ngFor","ngForOf"],["cdkDrag","",1,"ant-image-preview-img-wrapper",3,"cdkDragFreeDragPosition","cdkDragReleased"],["imagePreviewWrapper",""],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"ant-image-preview-operations-operation",3,"click"],["nz-icon","","nzTheme","outline",1,"ant-image-preview-operations-icon",3,"nzType"],["cdkDragHandle","","class","ant-image-preview-img",3,"width","height","transform",4,"ngIf"],["cdkDragHandle","",1,"ant-image-preview-img"],["imgRef",""],[1,"ant-image-preview-switch-left",3,"click"],["nz-icon","","nzType","left","nzTheme","outline"],[1,"ant-image-preview-switch-right",3,"click"],["nz-icon","","nzType","right","nzTheme","outline"]],template:function(G,k0){1&G&&(d.TgZ(0,"div",0),d._UZ(1,"div",1),d.TgZ(2,"div",2)(3,"div",3)(4,"ul",4),d.YNc(5,Me,2,3,"li",5),d.qZA(),d.TgZ(6,"div",6,7),d.NdJ("cdkDragReleased",function(){return k0.onDragReleased()}),d.YNc(8,P1,2,1,"ng-container",8),d.qZA(),d.YNc(9,Xe,5,4,"ng-container",9),d.qZA()(),d._UZ(10,"div",1),d.qZA()),2&G&&(d.xp6(5),d.Q6J("ngForOf",k0.operations),d.xp6(1),d.Udp("transform",k0.previewImageWrapperTransform),d.Q6J("cdkDragFreeDragPosition",k0.position),d.xp6(2),d.Q6J("ngForOf",k0.images),d.xp6(1),d.Q6J("ngIf",k0.images.length>1))},dependencies:[a1.Zt,a1.Bh,M.sg,M.O5,Z0.Ls],encapsulation:2,data:{animation:[d0.MC]},changeDetection:0}),o1})(),ct=(()=>{var u0;class o1{constructor(G,k0,t1,w1){this.overlay=G,this.injector=k0,this.nzConfigService=t1,this.directionality=w1}preview(G,k0){return this.display(G,k0)}display(G,k0){const t1={...new Qe,...k0??{}},w1=this.createOverlay(t1),v1=this.attachPreviewComponent(w1,t1);v1.setImages(G);const ne=new st(v1,t1,w1);return v1.previewRef=ne,ne}attachPreviewComponent(G,k0){const t1=d.zs3.create({parent:this.injector,providers:[{provide:W.Iu,useValue:G},{provide:Qe,useValue:k0}]}),w1=new k.C5(re,null,t1);return G.attach(w1).instance}createOverlay(G){const k0=this.nzConfigService.getConfigForComponent("image")||{},t1=new W.X_({hasBackdrop:!0,scrollStrategy:this.overlay.scrollStrategies.block(),positionStrategy:this.overlay.position().global(),disposeOnNavigation:G.nzCloseOnNavigation??k0.nzCloseOnNavigation??!0,backdropClass:"ant-image-preview-mask",direction:G.nzDirection||k0.nzDirection||this.directionality.value});return this.overlay.create(t1)}}return(u0=o1).\u0275fac=function(G){return new(G||u0)(d.LFG(W.aV),d.LFG(d.zs3),d.LFG(f.jY),d.LFG(q1.Is,8))},u0.\u0275prov=d.Yz7({token:u0,factory:u0.\u0275fac}),o1})(),zt=(()=>{var u0;class o1{}return(u0=o1).\u0275fac=function(G){return new(G||u0)},u0.\u0275mod=d.oAB({type:u0}),u0.\u0275inj=d.cJS({providers:[ct],imports:[q1.vT,W.U8,k.eL,a1._t,M.ez,Z0.PV,x1.YS]}),o1})(),Ue=(()=>{var u0;class o1{}return(u0=o1).\u0275fac=function(G){return new(G||u0)},u0.\u0275mod=d.oAB({type:u0}),u0.\u0275inj=d.cJS({providers:[n0.g,{provide:H0.f8,useValue:"tinymce/tinymce.min.js"}],imports:[M.ez,e.BL,c.H0,n.U5,J.u5,B.o7,g.LV,v.we,N.X,S.cD,E.b1,t.o,v0.Rt,a0.ZJ,I.Wr,f0.cg,H.Hb,j0.Zf,Z0.PV,R0.mS,p1.S,J.UX,T0.o,D0.sL,A0.YM,Z.zf,p0.Gl,Q.j,V.g,r0._p,h0.vh,O1.HQ,N0.W,H0.Z_,e0.Ph,X0.Xo,c0.D,b0.J,E0.cX,B0.Qp,U0.j,z1.FT,Q0.wY,x0.m,n1.$6,h1.ic,fe,zt]}),o1})()},74764:(r1,S0,s)=>{"use strict";s.d(S0,{f:()=>n});var M=s(78645),e=s(97328),c=s(65879);let n=(()=>{var J;class B{constructor(){this._selectTaskSbj$=new M.x,this._selectSubTaskSbj$=new M.x,this._refreshSbj$=new M.x,this._deleteSbj$=new M.x,this._subTasksRefreshSbj$=new e.t,this._commentsChangeSbj$=new M.x,this._attachmentsChangeSbj$=new M.x,this._taskSubscriberChangeSbj$=new M.x,this._phaseChangeSbj$=new M.x,this._statusChangeSbj$=new M.x,this._endDateChangeSbj$=new M.x,this._assigneesChangeSbj$=new M.x,this._viewBackFromSbj$=new M.x,this._openTask$=new e.t,this._singleMemberChangeSbj$=new M.x,this._timeLogMemberAssignSbj$=new M.x,this._taskRecurringChangeSbj$=new M.x,this._model={}}get model(){return this._model}get onSelectTask(){return this._selectTaskSbj$.asObservable()}get onSelectSubTask(){return this._selectSubTaskSbj$.asObservable()}get onRefresh(){return this._refreshSbj$.asObservable()}get onDelete(){return this._deleteSbj$.asObservable()}get onTaskSubscriberChange$(){return this._taskSubscriberChangeSbj$.asObservable()}get onCommentsChange(){return this._commentsChangeSbj$.asObservable()}get onAttachmentsChange(){return this._attachmentsChangeSbj$.asObservable()}get onPhaseChange(){return this._phaseChangeSbj$.asObservable()}get onStatusChange(){return this._statusChangeSbj$.asObservable()}get onEndDateChange(){return this._endDateChangeSbj$.asObservable()}get onAssigneesChange(){return this._assigneesChangeSbj$.asObservable()}get onViewBackFrom(){return this._viewBackFromSbj$.asObservable()}get onOpenTask(){return this._openTask$.asObservable()}get onSingleMemberChange(){return this._singleMemberChangeSbj$.asObservable()}get onTimeLogAssignMember(){return this._timeLogMemberAssignSbj$.asObservable()}onRefreshSubTasks(){return this._subTasksRefreshSbj$.asObservable()}get onRecurringChange(){return this._taskRecurringChangeSbj$.asObservable()}emitTaskSelect(v){this._selectTaskSbj$.next(v)}emitSubTaskSelect(v){this._selectSubTaskSbj$.next(v)}emitRefresh(v){this._refreshSbj$.next(v)}emitSubTasksRefresh(){this._subTasksRefreshSbj$.next()}emitCommentsChange(v,N){this._commentsChangeSbj$.next({task:v,count:N})}emitAttachmentsChange(v,N){this._attachmentsChangeSbj$.next({task:v,count:N})}emitDelete({id:v,parent_task_id:N,project_id:S}){this._deleteSbj$.next({id:v,parent_task_id:N,project_id:S})}emitOnTaskSubscriberChange(v,N){this._taskSubscriberChangeSbj$.next({taskId:v,subscribers:N})}emitPhaseChange(){this._phaseChangeSbj$.next()}emitStatusChange(){this._statusChangeSbj$.next()}emitEndDateChange(){this._endDateChangeSbj$.next()}emitAssigneesChange(){this._statusChangeSbj$.next()}emitOnViewBackFrom(v){this._viewBackFromSbj$.next(v)}emitOpenTask(v){this._openTask$.next(v)}emitSingleMemberChange(v){this._singleMemberChangeSbj$.next(v)}emitTimeLogAssignMember(v){this._timeLogMemberAssignSbj$.next(v)}emitTaskRecurringChange(v){this._taskRecurringChangeSbj$.next(v)}setModel(v){this._model={...v}}resetModel(){this._model={}}}return(J=B).\u0275fac=function(v){return new(v||J)},J.\u0275prov=c.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),B})()},48522:(r1,S0,s)=>{"use strict";s.d(S0,{a:()=>E});var M=s(96814),e=s(96109),c=s(8083),n=s(65879);let J=(()=>{var t;class v0{transform(I){return`${I}%`}}return(t=v0).\u0275fac=function(I){return new(I||t)},t.\u0275pipe=n.Yjl({name:"withPercentageMark",type:t,pure:!0,standalone:!0}),v0})();function B(t,v0){if(1&t&&(n.TgZ(0,"div",8),n.ALo(1,"withPercentageMark"),n.TgZ(2,"small",9),n._uU(3),n.ALo(4,"withPercentageMark"),n.qZA()()),2&t){const a0=n.oxw(2);n.Udp("width",n.lcZ(1,3,a0.done)),n.xp6(3),n.Oqu(n.lcZ(4,5,a0.done))}}function g(t,v0){if(1&t&&(n.TgZ(0,"div",10),n.ALo(1,"withPercentageMark"),n.TgZ(2,"small",9),n._uU(3),n.ALo(4,"withPercentageMark"),n.qZA()()),2&t){const a0=n.oxw(2);n.Udp("width",n.lcZ(1,3,a0.doing)),n.xp6(3),n.Oqu(n.lcZ(4,5,a0.doing))}}function v(t,v0){if(1&t&&(n.TgZ(0,"div",11),n.ALo(1,"withPercentageMark"),n.TgZ(2,"small",9),n._uU(3),n.ALo(4,"withPercentageMark"),n.qZA()()),2&t){const a0=n.oxw(2);n.Udp("width",n.lcZ(1,3,a0.todo)),n.xp6(3),n.Oqu(n.lcZ(4,5,a0.todo))}}function N(t,v0){if(1&t&&(n.TgZ(0,"div",12)(1,"div"),n._uU(2),n.ALo(3,"withPercentageMark"),n.qZA(),n.TgZ(4,"div"),n._uU(5),n.ALo(6,"withPercentageMark"),n.qZA(),n.TgZ(7,"div"),n._uU(8),n.ALo(9,"withPercentageMark"),n.qZA()()),2&t){const a0=n.oxw(2);n.xp6(2),n.hij("Done: ",n.lcZ(3,3,a0.done),""),n.xp6(3),n.hij("Doing: ",n.lcZ(6,5,a0.doing),""),n.xp6(3),n.hij("Todo: ",n.lcZ(9,7,a0.todo),"")}}function S(t,v0){if(1&t&&(n.ynx(0),n.TgZ(1,"div",1)(2,"div",2)(3,"div",3),n.YNc(4,B,5,7,"div",4),n.YNc(5,g,5,7,"div",5),n.YNc(6,v,5,7,"div",6),n.qZA()()(),n.YNc(7,N,10,9,"ng-template",null,7,n.W1O),n.BQk()),2&t){const a0=n.MAs(8),I=n.oxw();n.xp6(2),n.Q6J("nzTooltipTitle",a0),n.xp6(2),n.Q6J("ngIf",I.done),n.xp6(1),n.Q6J("ngIf",I.doing),n.xp6(1),n.Q6J("ngIf",I.todo)}}let E=(()=>{var t;class v0{constructor(){this.todo=0,this.doing=0,this.done=0}set todoProgress(I){this.todo=I??0}set doingProgress(I){this.doing=I??0}set doneProgress(I){this.done=I??0}canDisplay(){return this.todo||this.doing||this.done}}return(t=v0).\u0275fac=function(I){return new(I||t)},t.\u0275cmp=n.Xpm({type:t,selectors:[["worklenz-tasks-progress-bar"]],inputs:{todoProgress:"todoProgress",doingProgress:"doingProgress",doneProgress:"doneProgress"},standalone:!0,features:[n.jDz],decls:1,vars:1,consts:[[4,"ngIf"],[1,"progress-container-td"],["nz-tooltip","",1,"progress-container",3,"nzTooltipTitle"],[1,"d-flex"],["class","position-relative done",3,"width",4,"ngIf"],["class","position-relative doing",3,"width",4,"ngIf"],["class","position-relative todo",3,"width",4,"ngIf"],["titleTemplate",""],[1,"position-relative","done"],["nz-typography",""],[1,"position-relative","doing"],[1,"position-relative","todo"],[1,"text-white"]],template:function(I,n0){1&I&&n.YNc(0,S,9,4,"ng-container",0),2&I&&n.Q6J("ngIf",n0.canDisplay())},dependencies:[M.ez,M.O5,e.cg,e.SY,c.ZJ,c.ZU,J],styles:[".progress-container-td[_ngcontent-%COMP%]{width:180px;border-radius:4px;overflow:hidden;height:16px}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%]{width:100%;background-color:#ededed;position:relative}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] small[_ngcontent-%COMP%]{position:absolute;font-size:10px;line-height:16px;inset:0;margin:auto;min-width:20px;z-index:8;word-wrap:normal;font-weight:600;color:#000000d9}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .todo[_ngcontent-%COMP%], .progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .doing[_ngcontent-%COMP%], .progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .done[_ngcontent-%COMP%]{position:relative;text-align:center;height:16px}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .done[_ngcontent-%COMP%]{background-color:#9ad7b3}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .doing[_ngcontent-%COMP%]{background-color:#bee6ce}.progress-container-td[_ngcontent-%COMP%] .progress-container[_ngcontent-%COMP%] .todo[_ngcontent-%COMP%]{background-color:#e3f4ea}"],changeDetection:0}),v0})()},25335:(r1,S0,s)=>{"use strict";s.d(S0,{m:()=>J});var M=s(78645),e=s(97328),c=s(65879),n=s(975);let J=(()=>{var B;class g{constructor(N){this.socket=N,this._selectTaskSbj$=new M.x,this._selectSubTaskSbj$=new M.x,this._refreshSbj$=new M.x,this._deleteSbj$=new M.x,this._subTasksRefreshSbj$=new e.t,this._commentsChangeSbj$=new M.x,this._attachmentsChangeSbj$=new M.x,this.taskAddOrDeleteSbj$=new M.x,this.onCreateStatus$=new M.x,this.onCreateSubTask$=new M.x,this.onDeleteTask$=new M.x,this.onDeleteSubTaskSbj$=new M.x,this.onAssignMembersSbj$=new M.x,this.refreshGroupsSbj$=new M.x,this.groups=[],this._model={}}get model(){return this._model}get onCreateStatus(){return this.onCreateStatus$.asObservable()}get onCreateSubTask(){return this.onCreateSubTask$.asObservable()}get onDeleteSubTask(){return this.onDeleteSubTaskSbj$.asObservable()}get onDeleteTask(){return this.onDeleteTask$.asObservable()}get onAssignMembers(){return this.onAssignMembersSbj$.asObservable()}emitOnCreateStatus(N){this.onCreateStatus$.next(N)}emitOnCreateSubTask(N){this.onCreateSubTask$.next(N)}emitDeleteTask(N){this.onDeleteTask$.next(N)}emitDeleteSubTask(N){this.onDeleteSubTaskSbj$.next(N)}emitRefresh(N){this._refreshSbj$.next(N)}emitDelete({id:N,parent_task_id:S,project_id:E}){this._deleteSbj$.next({id:N,parent_task_id:S,project_id:E})}emitOnAssignMembers(N){this.onAssignMembersSbj$.next(N)}emitRefreshGroups(){this.refreshGroupsSbj$.next()}resetModel(){this._model={}}}return(B=g).\u0275fac=function(N){return new(N||B)(c.LFG(n.s))},B.\u0275prov=c.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),g})()},98698:(r1,S0,s)=>{"use strict";s.d(S0,{L:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this._selectSbj$=new M.x,this._deselectSbj$=new M.x,this._deselectAllSbj$=new M.x,this._groupTaskMap=new Map,this._taskGroupIdsMap=new Map,this._selectedTasksMap=new Map,this._allTasksMap=new Map,this._subTasksMap=new Map,this._selectedCount=0}get tasks(){return this._allTasksMap}get onSelect$(){return this._selectSbj$.asObservable()}get onDeselect$(){return this._deselectSbj$.asObservable()}get onDeselectAll$(){return this._deselectAllSbj$.asObservable()}reset(){this._groupTaskMap.clear(),this._taskGroupIdsMap.clear(),this._selectedTasksMap.clear(),this._allTasksMap.clear(),this._subTasksMap.clear(),this._selectedCount=0}registerGroup(g){for(const v of g.tasks)this.add(g.id,v)}add(g,v){v.id&&(this.updateGroupTaskMap(g,v.id),this._taskGroupIdsMap.set(v.id,g),this._allTasksMap.set(v.id,v),v.parent_task_id&&this.updateSubtasksMap(v.parent_task_id,v))}addGroupTask(g,v){v.id&&this._taskGroupIdsMap.set(v.id,g)}has(g){return this._allTasksMap.has(g)}remove(g){g.id&&(this.deselectTask(g),this._taskGroupIdsMap.get(g.id),this._allTasksMap.delete(g.id))}updateGroupTaskMap(g,v,N){const S=this._groupTaskMap.get(g);S?("boolean"==typeof N?S[v]=N:delete S[v],this._groupTaskMap.set(g,S)):this._groupTaskMap.set(g,{[v]:N||!1})}updateSubtasksMap(g,v,N){const S=this._subTasksMap.get(g)||[];S.some(t=>t.id===v.id)||(S.push(v),this._subTasksMap.set(g,S))}selectTask(g){this._selectedTasksMap.get(g.id)||(this._selectedTasksMap.set(g.id,g),this._selectedCount++,this.updateGroupTaskMap(this._taskGroupIdsMap.get(g.id),g.id,!0),this._selectSbj$.next(g))}deselectTask(g){this._selectedTasksMap.has(g.id)&&(this._selectedTasksMap.delete(g.id),this._selectedCount--,this.updateGroupTaskMap(this._taskGroupIdsMap.get(g.id),g.id,!1),this._deselectSbj$.next(g))}deselectLocalGroups(){for(const[g,v]of this._groupTaskMap)for(const N in v)this.updateGroupTaskMap(g,N,!1)}deselectAll(){this._selectedTasksMap.size&&(this.deselectLocalGroups(),this._selectedTasksMap.clear(),this._selectedCount=0,this._deselectAllSbj$.next())}isAllSelected(g){const v=this._groupTaskMap.get(g);if(v){for(const N in v)if(!v[N])return!1;return!0}return!1}isAllDeselected(g){const v=this._groupTaskMap.get(g);if(v)for(const N in v)if(v[N])return!1;return!0}getSelectedCount(){return this._selectedCount}getGroupId(g){return this._taskGroupIdsMap.get(g)}getSelectedTasks(){const g=[];for(const[,v]of this._selectedTasksMap.entries())g.push(v);return g}getSelectedTaskIds(){const g=[];for(const[v]of this._selectedTasksMap.entries())g.push(v);return g}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},5882:(r1,S0,s)=>{"use strict";s.d(S0,{s:()=>E});var M=s(78645),e=s(65619),c=s(94489),n=s(16676),J=s.n(n),B=s(86408),g=s(27782),v=s(65879),N=s(975),S=s(98698);let E=(()=>{var t;class v0{get _currentGroup(){const I=localStorage.getItem("worklenz.roadmap.group_by");if(I){const n0=this.GROUP_BY_OPTIONS.find(f0=>f0.value===I);if(n0)return n0}return this.GROUP_BY_OPTIONS[0]}set _currentGroup(I){localStorage.setItem("worklenz.roadmap.group_by",I.value)}set priorities(I){this._priorities=I,this.prioritiesSbj$.next()}get priorities(){return this._priorities}set phases(I){this._phases=I,this.phasesSbj$.next()}get phases(){return this._phases}get onGroupChange$(){return this.groupChangeSbj$.asObservable()}set statuses(I){this._statuses=I,this.statusesSbj$.next()}get statuses(){return this._statuses}get onReCreateChart(){return this.reCreateChartSbj$.asObservable()}get onResizeEnd(){return this.resizeEndSbj$.asObservable()}get onShowIndicators(){return this.showIndicatorsSbj$.asObservable()}get onRemoveIndicators(){return this.removeIndicatorsSbj$.asObservable()}constructor(I,n0){this.socket=I,this.map=n0,this.statusesSbj$=new M.x,this.prioritiesSbj$=new M.x,this.taskAddOrDeleteSbj$=new e.X(null),this.refreshSbj$=new M.x,this.groupChangeSbj$=new M.x,this.phasesSbj$=new M.x,this.updateGroupProgressSbj$=new M.x,this.refreshSubtasksIncludedSbj$=new M.x,this.reCreateChartSbj$=new M.x,this.resizeEndSbj$=new M.x,this.subTaskAddSbj$=new M.x,this.subTaskDeleteSbj$=new M.x,this.showIndicatorsSbj$=new M.x,this.removeIndicatorsSbj$=new M.x,this.HIGHLIGHT_COL_CLS="highlight-col",this.GROUP_BY_STATUS_VALUE="status",this.GROUP_BY_PRIORITY_VALUE="priority",this.GROUP_BY_PHASE_VALUE="phase",this.GROUP_BY_OPTIONS=[{label:"Status",value:this.GROUP_BY_STATUS_VALUE},{label:"Priority",value:this.GROUP_BY_PRIORITY_VALUE},{label:"Phase",value:this.GROUP_BY_PHASE_VALUE}],this.groups=[],this._projectId=null,this._statuses=[],this._priorities=[],this._phases=[],this.isSubtasksIncluded=!1,this.offset=0,this.width=0,this.top=0,this.left=0,this.opacity=0,this.transition=.15,this.highlighterLeft=0,this.highlighterWidth=0,this.chartStartDate=null}setProjectId(I){this._projectId=I}getProjectId(){return this._projectId}get onSubtaskAdd(){return this.subTaskAddSbj$.asObservable()}get onSubtaskDelete(){return this.subTaskDeleteSbj$.asObservable()}setCurrentGroup(I){this._currentGroup=I}getCurrentGroup(){return this._currentGroup}emitRefresh(){this.refreshSbj$.next()}emitTaskAddOrDelete(I,n0){this.taskAddOrDeleteSbj$.next({taskId:I,isSubTask:n0})}emitUpdateGroupProgress(I){this.updateGroupProgressSbj$.next({taskId:I})}emitRefreshSubtasksIncluded(){this.refreshSubtasksIncludedSbj$.next()}emitReCreateChart(I){this.reCreateChartSbj$.next(I)}emitResizeEnd(I){this.resizeEndSbj$.next(I)}emitSubTaskAdd(I){this.subTaskAddSbj$.next(I)}emitSubTaskDelete(I){this.subTaskDeleteSbj$.next(I)}emitShowIndicators(I){this.showIndicatorsSbj$.next(I)}emitRemoveIndicators(I){this.removeIndicatorsSbj$.next(I)}getGroupIdByGroupedColumn(I){const n0=this.getCurrentGroup().value;return n0===this.GROUP_BY_STATUS_VALUE?I.status:n0===this.GROUP_BY_PRIORITY_VALUE?I.priority:n0===this.GROUP_BY_PHASE_VALUE?I.phase_id:null}updateTaskGroup(I,n0=!0){if(!I.id)return;const f0=this.getGroupIdByGroupedColumn(I);f0&&(this.deleteTask(I.id),this.addTask(I,f0,n0),this.emitUpdateGroupProgress(I.id))}toggleGroupExpansion(I){if(!I)return;const n0=this.groups.find(f0=>f0.id===I);n0&&(n0.is_expanded=!n0.is_expanded,this.groups.forEach(f0=>{f0!==n0&&(f0.is_expanded=!1)}))}handleTaskDragFinish(I){if(I.task_id){if(this.map.tasks.has(I.task_id)){const n0=this.map.tasks.get(I.task_id);if(!n0)return;n0.width=I.task_width,n0.offset_from=I.task_offset,n0.start_date=I.start_date,n0.end_date=I.end_date}this.transition=.15,B.s.track(g.vP),B.s.track(g.nE)}}handleStartDateChange(I,n0,f0){if(I.id){if(I.start_date){const H=J()(I.start_date).format("YYYY-MM-DD"),j0=J()(H);if(j0.isBefore(n0)||j0.isSameOrAfter(f0))return this.emitReCreateChart(!0)}if(this.map.tasks.has(I.id)){const H=this.map.tasks.get(I.id);if(!H)return;this.emitResizeEnd({task:H,taskStartDate:I.start_date,taskEndDate:I.end_date,chartStartDate:n0})}B.s.track(g.nE)}}handleEndDateChange(I,n0,f0){if(I.id){if(I.end_date){const H=J()(I.end_date).format("YYYY-MM-DD");if(J()(H).isSameOrAfter(f0))return this.emitReCreateChart(!0)}if(this.map.tasks.has(I.id)){const H=this.map.tasks.get(I.id);if(!H)return;this.emitResizeEnd({task:H,taskStartDate:I.start_date,taskEndDate:I.end_date,chartStartDate:n0})}B.s.track(g.nE)}}onGroupChange(I,n0){if(!I||!n0)return;const f0=this.map.tasks.get(I);!f0||!f0.id||f0.parent_task_id||(this.deleteTask(f0.id),this.addTask(f0,n0,!0))}deleteSubtaskFromView(I){const n0=this.map.tasks.get(I);n0&&(this.map.selectTask(n0),this.deleteTask(I))}deleteTask(I,n0=null){const f0=this.map.getGroupId(I);if(!f0||!I)return;const H=this.groups.find(Z0=>Z0.id===f0);if(!H)return;const j0=this.map.getSelectedTasks().find(Z0=>Z0.id===I);if(j0?.is_sub_task){const Z0=H.tasks.find(R0=>R0.id===j0.parent_task_id);if(Z0){const R0=Z0.sub_tasks?.findIndex(p1=>p1.id===j0.id);typeof R0<"u"&&-1!==R0&&(Z0.sub_tasks_count||(Z0.sub_tasks_count=0),Z0.sub_tasks_count=Math.max(+Z0.sub_tasks_count-1,0),Z0.sub_tasks?.splice(R0,1),this.emitTaskAddOrDelete(Z0.id,!0),this.emitSubTaskDelete(Z0.id))}this.socket.emit(c.C.GET_TASK_PROGRESS.toString(),Z0?.id),this.map.remove(j0)}else{const Z0=n0??H.tasks.findIndex(R0=>R0.id===I);-1!==Z0&&(this.map.remove(H.tasks[Z0]),H.tasks.splice(Z0,1),this.emitTaskAddOrDelete(I,!1))}this.map.deselectAll()}addSubtaskFromView(I){if(!I.parent_task_id)return;const n0=this.map.getGroupId(I.parent_task_id);n0&&(I.width=35,I.offset_from=this.offset,this.addTask(I,n0,!0))}addTask(I,n0,f0=!1){const H=this.groups.find(j0=>j0.id===n0);if(H&&I.id){if(I.parent_task_id){const j0=H.tasks.find(Z0=>Z0.id===I.parent_task_id);j0&&(j0.sub_tasks_count||(j0.sub_tasks_count=0),j0.sub_tasks_count=+j0.sub_tasks_count+1,j0.sub_tasks?.push(I),this.socket.emit(c.C.GET_TASK_PROGRESS.toString(),j0?.id),this.emitSubTaskAdd(I.parent_task_id))}else f0?H.tasks.unshift(I):H.tasks.push(I);this.map.add(n0,I),this.emitTaskAddOrDelete(I.parent_task_id,!!I.parent_task_id)}}reset(){this._statuses=[],this._priorities=[],this._projectId=null,this.groups=[],this.isSubtasksIncluded=!1}}return(t=v0).\u0275fac=function(I){return new(I||t)(v.LFG(N.s),v.LFG(S.L))},t.\u0275prov=v.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),v0})()},78027:(r1,S0,s)=>{"use strict";s.d(S0,{g:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this._selectSbj$=new M.x,this._deselectSbj$=new M.x,this._deselectAllSbj$=new M.x,this._groupTaskMap=new Map,this._taskGroupIdsMap=new Map,this._selectedTasksMap=new Map,this._allTasksMap=new Map,this._subTasksMap=new Map,this._selectedCount=0}get tasks(){return this._allTasksMap}get onSelect$(){return this._selectSbj$.asObservable()}get onDeselect$(){return this._deselectSbj$.asObservable()}get onDeselectAll$(){return this._deselectAllSbj$.asObservable()}reset(){this._groupTaskMap.clear(),this._taskGroupIdsMap.clear(),this._selectedTasksMap.clear(),this._allTasksMap.clear(),this._subTasksMap.clear(),this._selectedCount=0}registerGroup(g){for(const v of g.tasks)this.add(g.id,v)}add(g,v){v.id&&(this.updateGroupTaskMap(g,v.id),this._taskGroupIdsMap.set(v.id,g),this._allTasksMap.set(v.id,v),v.parent_task_id&&this.updateSubtasksMap(v.parent_task_id,v))}addGroupTask(g,v){v.id&&this._taskGroupIdsMap.set(v.id,g)}has(g){return this._allTasksMap.has(g)}remove(g){g.id&&(this.deselectTask(g),this._taskGroupIdsMap.get(g.id),this._allTasksMap.delete(g.id))}updateGroupTaskMap(g,v,N){const S=this._groupTaskMap.get(g);S?("boolean"==typeof N?S[v]=N:delete S[v],this._groupTaskMap.set(g,S)):this._groupTaskMap.set(g,{[v]:N||!1})}updateSubtasksMap(g,v,N){const S=this._subTasksMap.get(g)||[];S.some(t=>t.id===v.id)||(S.push(v),this._subTasksMap.set(g,S))}selectTask(g){this._selectedTasksMap.get(g.id)||(this._selectedTasksMap.set(g.id,g),this._selectedCount++,this.updateGroupTaskMap(this._taskGroupIdsMap.get(g.id),g.id,!0),this._selectSbj$.next(g))}deselectTask(g){this._selectedTasksMap.has(g.id)&&(this._selectedTasksMap.delete(g.id),this._selectedCount--,this.updateGroupTaskMap(this._taskGroupIdsMap.get(g.id),g.id,!1),this._deselectSbj$.next(g))}deselectLocalGroups(){for(const[g,v]of this._groupTaskMap)for(const N in v)this.updateGroupTaskMap(g,N,!1)}deselectAll(){this._selectedTasksMap.size&&(this.deselectLocalGroups(),this._selectedTasksMap.clear(),this._selectedCount=0,this._deselectAllSbj$.next())}isAllSelected(g){const v=this._groupTaskMap.get(g);if(v){for(const N in v)if(!v[N])return!1;return!0}return!1}isAllDeselected(g){const v=this._groupTaskMap.get(g);if(v)for(const N in v)if(v[N])return!1;return!0}getSelectedCount(){return this._selectedCount}getGroupId(g){return this._taskGroupIdsMap.get(g)}getSelectedTasks(){const g=[];for(const[,v]of this._selectedTasksMap.entries())g.push(v);return g}getSelectedTaskIds(){const g=[];for(const[v]of this._selectedTasksMap.entries())g.push(v);return g}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},29402:(r1,S0,s)=>{"use strict";s.d(S0,{J:()=>p1});var M=s(15861),e=s(65879),c=s(60095),n=s(94489),J=s(69649),B=s(86408),g=s(27782),v=s(62595),N=s(96814),S=s(20824),E=s(21406),t=s(975),v0=s(32333),a0=s(55416),I=s(78027),n0=s(25335),f0=s(5882),H=s(84676);const j0=["taskInput"];function Z0(T0,D0){if(1&T0){const A0=e.EpF();e.TgZ(0,"form",3)(1,"input",4,5),e.NdJ("blur",function(){e.CHM(A0);const p0=e.oxw();return e.KtG(p0.onInputBlur())})("keyup.enter",function(){e.CHM(A0);const p0=e.oxw();return e.KtG(p0.addInstantTask())}),e.qZA()()}if(2&T0){const A0=e.oxw();e.Q6J("formGroup",A0.form),e.xp6(1),e.Q6J("nzBorderless",!0)("formControlName","name")("readOnly",A0.creating)}}function R0(T0,D0){if(1&T0){const A0=e.EpF();e.TgZ(0,"div",6),e.NdJ("click",function(){e.CHM(A0);const p0=e.oxw();return e.KtG(p0.focusTaskInput())}),e._UZ(1,"span",7),e.TgZ(2,"span"),e._uU(3),e.qZA()()}if(2&T0){const A0=e.oxw();e.uIk("id",A0.id),e.xp6(1),e.Q6J("nzType",A0.creating?"loading":"plus")("nzTheme","outline"),e.xp6(2),e.hij(" ",A0.label,"")}}let p1=(()=>{var T0;class D0{constructor(Z,p0,Q,V,r0,h0,O1,N0,H0,e0){this.socket=Z,this.auth=p0,this.fb=Q,this.service=V,this.ngZone=r0,this.cdr=h0,this.map=O1,this.kanbanService=N0,this.roadMapService=H0,this.scheduleService=e0,this.subTaskInput=!1,this.projectId=null,this.parentTask=null,this.groupId=null,this.label="Add Task",this.focusChange=new e.vpe,this.taskInputVisible=!1,this.creating=!1,this.id=(0,J.q$)(4),this._session=null,this.form=this.fb.group({name:[null,[c.kI.required,c.kI.pattern(/^(\s+\S+\s*)*(?!\s).*$/)]]}),this._session=this.auth.getCurrentSession()}focusTaskInput(){this.taskInputVisible=!0,this.focusChange.emit(this.taskInputVisible),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.taskInput?.nativeElement.focus(),this.taskInput?.nativeElement.select()},100)})}addTaskInputBlur(){this.taskInputVisible=!1,this.focusChange.emit(this.taskInputVisible)}onInputBlur(){var Z=this;return(0,M.Z)(function*(){Z.isValidInput()?yield Z.addInstantTask():Z.addTaskInputBlur()})()}createRequest(){if(!this.projectId||!this._session)return null;const Z=this._session,p0={name:this.form.value.name,project_id:this.projectId,reporter_id:Z.id,team_id:Z.team_id},Q=this.service.getCurrentGroup();return Q.value===this.service.GROUP_BY_STATUS_VALUE?p0.status_id=this.groupId||void 0:Q.value===this.service.GROUP_BY_PRIORITY_VALUE?p0.priority_id=this.groupId||void 0:Q.value===this.service.GROUP_BY_PHASE_VALUE&&(p0.phase_id=this.groupId||void 0),this.parentTask&&(p0.parent_task_id=this.parentTask),p0}isValidInput(){return this.form.valid&&this.form.value.name.trim().length}addInstantTask(){var Z=this;return(0,M.Z)(function*(){if(!Z.creating&&Z.projectId&&Z._session&&Z.isValidInput()){try{const p0=Z.createRequest();if(!p0)return;Z.creating=!0,Z.socket.emit(n.C.QUICK_TASK.toString(),JSON.stringify(p0)),Z.socket.once(n.C.QUICK_TASK.toString(),Q=>{Z.creating=!1,Q.parent_task_id&&(Z.service.emitUpdateGroupProgress(Q.id),Z.kanbanService.emitOnCreateSubTask(Q),Z.roadMapService.addSubtaskFromView(Q)),Z.onNewTaskReceived(Q)})}catch{Z.creating=!1}Z.cdr.markForCheck()}})()}reset(Z=!0){this.creating=!1,this.form.controls.name.setValue(null),this.taskInputVisible=!0,this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.taskInput?.nativeElement.focus(),Z&&window.scrollTo(0,document.body.scrollHeight)},E.GR)}),this.cdr.markForCheck()}onNewTaskReceived(Z){if(this.groupId&&Z.id){if(this.map.has(Z.id))return;this.service.addTask(Z,this.groupId),B.s.track(Z.parent_task_id?g.c3:g.yS),this.reset(!1)}}}return(T0=D0).\u0275fac=function(Z){return new(Z||T0)(e.Y36(t.s),e.Y36(v0.e),e.Y36(c.qu),e.Y36(a0.b),e.Y36(e.R0b),e.Y36(e.sBO),e.Y36(I.g),e.Y36(n0.m),e.Y36(f0.s),e.Y36(H.Z))},T0.\u0275cmp=e.Xpm({type:T0,selectors:[["worklenz-task-list-add-task-input"]],viewQuery:function(Z,p0){if(1&Z&&e.Gf(j0,5),2&Z){let Q;e.iGM(Q=e.CRH())&&(p0.taskInput=Q.first)}},inputs:{subTaskInput:"subTaskInput",projectId:"projectId",parentTask:"parentTask",groupId:"groupId",label:"label"},outputs:{focusChange:"focusChange"},standalone:!0,features:[e.jDz],decls:3,vars:3,consts:[[3,"ngSwitch"],[3,"formGroup",4,"ngSwitchCase"],["class","editable-row d-block w-25 task-name",3,"click",4,"ngSwitchCase"],[3,"formGroup"],["nz-input","","type","text","tabindex","1","placeholder","Type your task and hit enter",3,"nzBorderless","formControlName","readOnly","blur","keyup.enter"],["taskInput",""],[1,"editable-row","d-block","w-25","task-name",3,"click"],["nz-icon","",1,"input-icon",3,"nzType","nzTheme"]],template:function(Z,p0){1&Z&&(e.ynx(0,0),e.YNc(1,Z0,3,4,"form",1),e.YNc(2,R0,4,4,"div",2),e.BQk()),2&Z&&(e.Q6J("ngSwitch",p0.taskInputVisible),e.xp6(1),e.Q6J("ngSwitchCase",!0),e.xp6(1),e.Q6J("ngSwitchCase",!1))},dependencies:[v.PV,v.Ls,c.UX,c._Y,c.Fj,c.JJ,c.JL,c.sg,c.u,S.o7,S.Zp,N.RF,N.n9],styles:[".input-icon[_ngcontent-%COMP%]{font-size:11px}.task-name[_ngcontent-%COMP%]{border:1px solid transparent}.task-name[_ngcontent-%COMP%]:hover{cursor:text;background:#fff;border:1px solid #bfbfbf;border-radius:4px}"],changeDetection:0}),D0})()},86947:(r1,S0,s)=>{"use strict";s.d(S0,{p:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this.convertSbj$=new M.x}get onConvertingSubtask(){return this.convertSbj$.asObservable()}emitConvertingToSubTask(g){this.convertSbj$.next(g)}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},91607:(r1,S0,s)=>{"use strict";s.d(S0,{g:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,...g){return B.sub_tasks_count?"#191919":"rgba(0, 0, 0, 0.45)"}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"subTasksArrowColor",type:c,pure:!0}),n})()},55736:(r1,S0,s)=>{"use strict";s.d(S0,{U:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,...g){return B?"down":"right"}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"subTasksArrowIcon",type:c,pure:!0}),n})()},66432:(r1,S0,s)=>{"use strict";s.d(S0,{z:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,g=0){return B?B.length>g?`${B.slice(0,g)}...`:B:""}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"truncateIfLong",type:c,pure:!0}),n})()},75729:(r1,S0,s)=>{"use strict";s.d(S0,{z:()=>c});var M=s(65879),e=s(64532);let c=(()=>{var n;class J{constructor(g){this.utils=g}transform(g,...v){return this.utils.checkForMaxDate(g)}}return(n=J).\u0275fac=function(g){return new(g||n)(M.Y36(e.F,16))},n.\u0275pipe=M.Yjl({name:"validateMaxDate",type:n,pure:!0}),J})()},47053:(r1,S0,s)=>{"use strict";s.d(S0,{v:()=>c});var M=s(65879),e=s(64532);let c=(()=>{var n;class J{constructor(g){this.utils=g}transform(g,...v){return this.utils.checkForMinDate(g)}}return(n=J).\u0275fac=function(g){return new(g||n)(M.Y36(e.F,16))},n.\u0275pipe=M.Yjl({name:"validateMinDate",type:n,pure:!0}),J})()},8180:(r1,S0,s)=>{"use strict";s.d(S0,{m:()=>s0});var M=s(15861),e=s(26236),c=s(86408),n=s(27782),J=s(63019),B=s(32181),g=s(94489),v=s(69649),N=s(71993),S=s(67838),E=s(21406),t=s(65879),v0=s(35420),a0=s(34554),I=s(45538),n0=s(8725),f0=s(46619),H=s(85236),j0=s(22858),Z0=s(78027),R0=s(975),p1=s(82803),T0=s(74764),D0=s(25335),A0=s(48327),Z=s(55416),p0=s(64532),Q=s(45019),V=s(32333),r0=s(90586),h0=s(96814),O1=s(42840),N0=s(70855),H0=s(62595),e0=s(62612),X0=s(8083),c0=s(24139),b0=s(49278),E0=s(44159),B0=s(55522),U0=s(29402),z1=s(77835),Q0=s(18223),x0=s(60095),n1=s(10095),h1=s(3599),M0=s(41958),L0=s(73460),o0=s(62787),L=s(33640),m=s(20824),d=s(96928),K=s(96109),g0=s(92574),e1=s(66987),u1=s(44889),L1=s(9172),k1=s(2919),W0=s(76271);function I0(r,x){1&r&&(t.TgZ(0,"button",37),t._uU(1," Search "),t.qZA()),2&r&&t.Q6J("nzSize","small")("nzType","primary")}function q0(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",38),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.reset())}),t._uU(1," Reset "),t.qZA()}2&r&&t.Q6J("nzSize","small")}function X(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",39)(1,"label",40),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onSortFilterChange())}),t._uU(2),t.qZA(),t.TgZ(3,"button",41),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw();return t.KtG(w.onSortOrderChange(q))}),t._UZ(4,"span",42),t.qZA()()}if(2&r){const O=x.$implicit,i=t.oxw();t.xp6(1),t.Q6J("nzChecked",O.selected),t.xp6(1),t.Oqu(O.label),t.xp6(1),t.Q6J("nzType","default")("nzSize","small"),t.xp6(1),t.Q6J("nzType",i.sortOrderCls(O))("nzTheme","outline")}}function z0(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",43),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onPriorityFilterChange())}),t.TgZ(1,"div",44),t._UZ(2,"nz-badge",45),t.ALo(3,"safeString"),t.TgZ(4,"span",46),t._uU(5),t.qZA()()()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.selected),t.xp6(2),t.Q6J("nzColor",t.lcZ(3,4,O.color_code))("nzSize","small"),t.xp6(3),t.Oqu(O.name)}}function F0(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",43),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onLabelsFilterChange())}),t.TgZ(1,"div",47),t._UZ(2,"nz-badge",48),t.ALo(3,"safeString"),t.qZA()()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.selected),t.xp6(2),t.Q6J("nzColor",t.lcZ(3,3,O.color_code))("nzText",O.name)}}function l1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",43),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onMembersFilterChange())}),t.TgZ(1,"div",47),t._UZ(2,"nz-avatar",49),t.ALo(3,"firstCharUpper"),t.ALo(4,"safeString"),t.TgZ(5,"div",50)(6,"span",46),t._uU(7),t.qZA(),t.TgZ(8,"small",51),t._uU(9),t.qZA()()()()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.selected),t.xp6(2),t.Udp("background-color",O.avatar_url?"#ececec":O.color_code),t.Q6J("nzSize",28)("nzText",t.lcZ(3,11,O.name))("nzSrc",O.avatar_url)("nzTooltipTitle",t.lcZ(4,13,O.name))("nzTooltipPlacement","top"),t.xp6(5),t.Oqu(O.name),t.xp6(1),t.Q6J("nzType","secondary"),t.xp6(1),t.Oqu(O.email)}}function $1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",52),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw();return t.KtG(w.changeGroup(q))}),t.TgZ(1,"span",53),t._uU(2),t.qZA()()}if(2&r){const O=x.$implicit,i=t.oxw();t.Q6J("nzSelected",O.value===i.selectedGroup.value),t.xp6(2),t.Oqu(O.label)}}function se(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",54),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.phaseSettingsClick())}),t._UZ(1,"span",42),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("nzType","link")("nzTooltipTitle",O.phaseLabel+" settings"),t.xp6(1),t.Q6J("nzType","setting")("nzTheme","outline")}}function ae(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",54),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.statusSettingsClick())}),t._UZ(1,"span",42),t.qZA()}2&r&&(t.Q6J("nzType","link")("nzTooltipTitle","Status settings"),t.xp6(1),t.Q6J("nzType","setting")("nzTheme","outline"))}let be=(()=>{var r;class x{get selectedGroup(){return this.service.getCurrentGroup()}get phaseLabel(){return this.phaseService.label}constructor(i,o,q,w,y0,J0,m1,d1,N1,c1){this.cdr=i,this.ngZone=o,this.tasksApi=q,this.socket=w,this.labelsApi=y0,this.utils=J0,this.phaseService=m1,this.projectsService=d1,this.service=N1,this.auth=c1,this.onGroupBy=new t.vpe,this.onFilterSortBy=new t.vpe,this.onFilterByPriority=new t.vpe,this.onFilterByLabel=new t.vpe,this.onFilterByMember=new t.vpe,this.onFilterSearch=new t.vpe,this.onPhaseSettingsClick=new t.vpe,this.onStatusSettingsClick=new t.vpe,this.ASCEND="ascend",this.DESCEND="descend",this.COUNTS_LABELS_STYLE={backgroundColor:"#1890ff",color:"#fff"},this.priorities=[],this.labels=[],this.members=[],this.memberSearchText=null,this.labelsSearchText=null,this.taskSearch=null,this.sortFiltersActive=!1,this.prioritiesFiltersActive=!1,this.labelsFiltersActive=!1,this.membersFiltersActive=!1,this.loadingAssignees=!1,this.sortedColumnsCount=0,this.selectedPrioritiesCount=0,this.selectedLabelsCount=0,this.selectedMembersCount=0,this.statuses=[],this.sortableColumns=[{label:"Task",key:"name",sort_order:this.ASCEND},{label:"Status",key:"status",sort_order:this.ASCEND},{label:"Priority",key:"priority",sort_order:this.ASCEND},{label:"Start Date",key:"start_date",sort_order:this.ASCEND},{label:"End Date",key:"end_date",sort_order:this.ASCEND},{label:"Completed Date",key:"completed_at",sort_order:this.ASCEND},{label:"Created Data",key:"created_at",sort_order:this.ASCEND},{label:"Last Updated",key:"updated_at",sort_order:this.ASCEND}],this.handleAssigneeResponse=()=>{this.getMembers()},this.handleLabelsChange=()=>{this.getLabels()},this.service.onPrioritiesChange$.pipe((0,N.sL)()).subscribe(()=>{this.priorities=(0,v.I8)(this.service.priorities),this.cdr.markForCheck()}),this.phaseService.onLabelChange.pipe((0,N.sL)()).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.getMembers(),this.getLabels(),this.socket.on(g.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleAssigneeResponse),this.socket.on(g.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.on(g.C.CREATE_LABEL.toString(),this.handleLabelsChange)}ngOnDestroy(){this.socket.removeListener(g.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleAssigneeResponse),this.socket.removeListener(g.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.removeListener(g.C.CREATE_LABEL.toString(),this.handleLabelsChange)}changeGroup(i){this.service.setCurrentGroup(i),this.onGroupBy.emit(i)}isGroupByPhase(){return this.selectedGroup.value===this.service.GROUP_BY_PHASE_VALUE}isGroupByStatus(){return this.selectedGroup.value===this.service.GROUP_BY_STATUS_VALUE}isProjectManager(){return!!this.projectsService.projectOwnerTeamMemberId&&this.auth.getCurrentSession()?.team_member_id===this.projectsService.projectOwnerTeamMemberId}sortOrderCls(i){return i.sort_order===this.ASCEND?"sort-ascending":"sort-descending"}trackById(i,o){return o.id}toIdsMap(i){return i.map(o=>o.id).join("+")}getMembers(){var i=this;return(0,M.Z)(function*(){if(i.projectId){i.loadingAssignees=!0;try{const o=yield i.tasksApi.getTasksAssignees(i.projectId);o.done&&(i.members=o.body),i.loadingAssignees=!1}catch{i.loadingAssignees=!1}i.cdr.markForCheck()}})()}getLabels(){var i=this;return(0,M.Z)(function*(){if(i.projectId)try{const o=yield i.labelsApi.getByProject(i.projectId);o.done&&(i.labels=o.body)}catch{}})()}onSortOrderChange(i){i.sort_order=i.sort_order===this.ASCEND?this.DESCEND:this.ASCEND,i.selected&&this.onSortFilterChange()}onSortFilterChange(){const i=this.sortableColumns.filter(q=>q.selected);this.sortFiltersActive=!!i.length,this.sortedColumnsCount=i.length;const o=i.map(q=>`${q.key} ${q.sort_order}`).join(",");this.onFilterSortBy.emit(o)}onPriorityFilterChange(){const i=this.priorities.filter(o=>o.selected);this.prioritiesFiltersActive=!!i.length,this.selectedPrioritiesCount=i.length,this.onFilterByPriority.emit(this.toIdsMap(i))}onLabelsFilterChange(){const i=this.labels.filter(o=>o.selected);this.labelsFiltersActive=!!i.length,this.selectedLabelsCount=i.length,this.onFilterByLabel.emit(this.toIdsMap(i)),this.utils.sortBySelection(this.labels)}onMembersFilterChange(){const i=this.members.filter(o=>o.selected);this.membersFiltersActive=!!i.length,this.selectedMembersCount=i.length,this.onFilterByMember.emit(this.selectedMembersCount>0?{selection:this.toIdsMap(i),is_subtasks_included:!0}:{selection:this.toIdsMap(i),is_subtasks_included:!1}),this.utils.sortBySelection(this.members)}search(){this.taskSearch&&(this.onFilterSearch.emit(encodeURIComponent(this.taskSearch)),document.body.click(),c.s.track(n.Df))}reset(){this.taskSearch&&(this.taskSearch=null,this.onFilterSearch.emit(this.taskSearch),this.ngZone.runOutsideAngular(()=>{document.body.click()}))}onSearchDropdownVisibleChange(i){i&&this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{document.querySelector("#task-search-input")?.focus()},E.GR)})}phaseSettingsClick(){this.onPhaseSettingsClick?.emit()}statusSettingsClick(){this.onStatusSettingsClick?.emit()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(a0.c),t.Y36(R0.s),t.Y36(n0.u),t.Y36(p0.F),t.Y36(A0.u),t.Y36(Q0.m),t.Y36(Z.b),t.Y36(V.e))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-filters"]],inputs:{projectId:"projectId"},outputs:{onGroupBy:"onGroupBy",onFilterSortBy:"onFilterSortBy",onFilterByPriority:"onFilterByPriority",onFilterByLabel:"onFilterByLabel",onFilterByMember:"onFilterByMember",onFilterSearch:"onFilterSearch",onPhaseSettingsClick:"onPhaseSettingsClick",onStatusSettingsClick:"onStatusSettingsClick"},decls:65,vars:74,consts:[["nz-form","",3,"nzLayout"],["nz-row","",3,"nzAlign","nzJustify"],["nz-col",""],["nz-button","","nz-dropdown","",1,"me-2",3,"nzDropdownMenu","nzTrigger","nzVisibleChange"],["nz-icon","","nzType","search","nzTheme","outline"],["taskSearchDropdown","nzDropdownMenu"],[1,"bg-white","shadow","rounded-4","p-2",3,"submit"],["type","text","nz-input","","name","search","id","task-search-input","placeholder","Search by name",3,"ngModel","ngModelChange"],[1,"mt-2"],["nz-button","","type","submit",3,"nzSize","nzType",4,"nzSpaceItem"],["nz-button","","type","button",3,"nzSize","click",4,"nzSpaceItem"],["nz-button","","nz-dropdown","",1,"me-2","button-mobile",3,"nzTrigger","nzDropdownMenu","nzClickHide"],["nz-icon","",1,"lg-only",3,"nzType","nzTheme"],["nzStandalone","",1,"ms-1","me-2",3,"nzCount","nzStyle","nzSize"],["nz-icon","",3,"nzType"],["sortMenu",""],["nz-menu",""],["class","d-flex justify-content-between","nz-menu-item","",4,"ngFor","ngForOf","ngForTrackBy"],["nz-button","","nz-dropdown","",1,"me-2","button-mobile",3,"nzTrigger","nzClickHide","nzDropdownMenu"],["nz-icon","","nzType","caret-down"],["priorityMenu",""],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzChecked","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-button","","nz-dropdown","",1,"me-2","drop-down-btn","active","button-mobile",3,"nzTrigger","nzClickHide","nzDropdownMenu"],["labelsMenu",""],["nz-menu","",2,"max-height","250px","overflow","hidden","overflow-y","auto"],[1,"px-3","py-2"],["type","text","name","label","placeholder","Search by name","nz-input","",3,"ngModel","ngModelChange"],["membersMenu",""],["nz-menu","",1,"members-menu"],["type","text","name","member","placeholder","Search by name","nz-input","",3,"ngModel","ngModelChange"],[1,"mob-p-0",3,"nzType"],[1,"ms-1"],["nz-button","","nz-dropdown","",1,"ms-1","button-mobile",3,"nzTrigger","nzDropdownMenu","nzClickHide"],["nz-tooltip","",3,"nzTooltipTitle"],["groupByMenu",""],["class","m-0","nz-menu-item","",3,"nzSelected","click",4,"ngFor","ngForOf","ngForTrackBy"],["nz-button","","class","ps-1 button-mobile","nz-tooltip","",3,"nzType","nzTooltipTitle","click",4,"ngIf"],["nz-button","","type","submit",3,"nzSize","nzType"],["nz-button","","type","button",3,"nzSize","click"],["nz-menu-item","",1,"d-flex","justify-content-between"],["nz-checkbox","",3,"nzChecked","nzCheckedChange"],["nz-button","",3,"nzType","nzSize","click"],["nz-icon","",3,"nzType","nzTheme"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzCheckedChange"],[1,"d-flex","align-items-center"],["nzStandalone","",1,"ms-1",3,"nzColor","nzSize"],["nz-typography","",1,"d-block"],[1,"d-flex","align-items-center","justify-content-center","user-select-none"],[3,"nzColor","nzText"],["nz-tooltip","",1,"mt-auto","mb-auto","me-2",3,"nzSize","nzText","nzSrc","nzTooltipTitle","nzTooltipPlacement"],[2,"line-height","15px"],["nz-typography","",3,"nzType"],["nz-menu-item","",1,"m-0",3,"nzSelected","click"],["nz-typography",""],["nz-button","","nz-tooltip","",1,"ps-1","button-mobile",3,"nzType","nzTooltipTitle","click"]],template:function(i,o){if(1&i&&(t.TgZ(0,"form",0)(1,"div",1)(2,"div",2)(3,"button",3),t.NdJ("nzVisibleChange",function(w){return o.onSearchDropdownVisibleChange(w)}),t._UZ(4,"span",4),t.qZA(),t.TgZ(5,"nz-dropdown-menu",null,5)(7,"form",6),t.NdJ("submit",function(){return o.search()}),t.TgZ(8,"input",7),t.NdJ("ngModelChange",function(w){return o.taskSearch=w}),t.qZA(),t.TgZ(9,"nz-space",8),t.YNc(10,I0,2,2,"button",9),t.YNc(11,q0,2,1,"button",10),t.qZA()()(),t.TgZ(12,"button",11),t._UZ(13,"span",12),t._uU(14," Sort "),t._UZ(15,"nz-badge",13)(16,"span",14),t.qZA(),t.TgZ(17,"nz-dropdown-menu",null,15)(19,"ul",16),t.YNc(20,X,5,6,"li",17),t.qZA()(),t.TgZ(21,"button",18),t._uU(22," Priority "),t._UZ(23,"nz-badge",13)(24,"span",19),t.qZA(),t.TgZ(25,"nz-dropdown-menu",null,20)(27,"ul",16),t.YNc(28,z0,6,6,"li",21),t.qZA()(),t.TgZ(29,"button",22),t._uU(30," Labels "),t._UZ(31,"nz-badge",13)(32,"span",14),t.qZA(),t.TgZ(33,"nz-dropdown-menu",null,23)(35,"ul",24)(36,"li",25)(37,"input",26),t.NdJ("ngModelChange",function(w){return o.labelsSearchText=w}),t.qZA()(),t.YNc(38,F0,4,5,"li",21),t.ALo(39,"searchByName"),t.qZA()(),t.TgZ(40,"button",22),t._uU(41," Members "),t._UZ(42,"nz-badge",13)(43,"span",19),t.qZA(),t.TgZ(44,"nz-dropdown-menu",null,27)(46,"ul",28)(47,"li",25)(48,"input",29),t.NdJ("ngModelChange",function(w){return o.memberSearchText=w}),t.qZA()(),t.YNc(49,l1,10,15,"li",21),t.ALo(50,"searchByName"),t.qZA()(),t._UZ(51,"nz-divider",30),t.TgZ(52,"label",31),t._uU(53,"Group by: "),t.qZA(),t.TgZ(54,"button",32)(55,"span",33),t._uU(56),t.ALo(57,"ellipsis"),t.qZA(),t._UZ(58,"span",14),t.qZA(),t.TgZ(59,"nz-dropdown-menu",null,34)(61,"ul",16),t.YNc(62,$1,3,2,"li",35),t.qZA()(),t.YNc(63,se,2,4,"button",36),t.YNc(64,ae,2,4,"button",36),t.qZA()()()),2&i){const q=t.MAs(6),w=t.MAs(18),y0=t.MAs(26),J0=t.MAs(34),m1=t.MAs(45),d1=t.MAs(60);t.Q6J("nzLayout","vertical"),t.xp6(1),t.Q6J("nzAlign","bottom")("nzJustify","space-between"),t.xp6(2),t.ekj("filter-active",!!o.taskSearch),t.Q6J("nzDropdownMenu",q)("nzTrigger","click"),t.xp6(5),t.Q6J("ngModel",o.taskSearch),t.xp6(4),t.ekj("filter-active",o.sortFiltersActive),t.Q6J("nzTrigger","click")("nzDropdownMenu",w)("nzClickHide",!1),t.xp6(1),t.Q6J("nzType","sort-ascending")("nzTheme","outline"),t.xp6(2),t.Q6J("nzCount",o.sortedColumnsCount)("nzStyle",o.COUNTS_LABELS_STYLE)("nzSize","small"),t.xp6(1),t.Q6J("nzType","caret-down"),t.xp6(4),t.Q6J("ngForOf",o.sortableColumns)("ngForTrackBy",o.trackById),t.xp6(1),t.ekj("filter-active",o.prioritiesFiltersActive),t.Q6J("nzTrigger","click")("nzClickHide",!1)("nzDropdownMenu",y0),t.xp6(2),t.Q6J("nzCount",o.selectedPrioritiesCount)("nzStyle",o.COUNTS_LABELS_STYLE)("nzSize","small"),t.xp6(5),t.Q6J("ngForOf",o.priorities)("ngForTrackBy",o.trackById),t.xp6(1),t.ekj("filter-active",o.labelsFiltersActive),t.Q6J("nzTrigger","click")("nzClickHide",!1)("nzDropdownMenu",J0),t.xp6(2),t.Q6J("nzCount",o.selectedLabelsCount)("nzStyle",o.COUNTS_LABELS_STYLE)("nzSize","small"),t.xp6(1),t.Q6J("nzType","caret-down"),t.xp6(5),t.Q6J("ngModel",o.labelsSearchText),t.xp6(1),t.Q6J("ngForOf",t.xi3(39,65,o.labels,o.labelsSearchText))("ngForTrackBy",o.trackById),t.xp6(2),t.ekj("filter-active",o.membersFiltersActive),t.Q6J("nzTrigger","click")("nzClickHide",!1)("nzDropdownMenu",m1),t.xp6(2),t.Q6J("nzCount",o.selectedMembersCount)("nzStyle",o.COUNTS_LABELS_STYLE)("nzSize","small"),t.xp6(6),t.Q6J("ngModel",o.memberSearchText),t.xp6(1),t.Q6J("ngForOf",t.xi3(50,68,o.members,o.memberSearchText))("ngForTrackBy",o.trackById),t.xp6(2),t.Q6J("nzType","vertical"),t.xp6(3),t.Q6J("nzTrigger","click")("nzDropdownMenu",d1)("nzClickHide",!0),t.xp6(1),t.Q6J("nzTooltipTitle",o.selectedGroup.label),t.xp6(1),t.hij(" ",t.xi3(57,71,o.selectedGroup.label,15)," "),t.xp6(2),t.Q6J("nzType","caret-down"),t.xp6(4),t.Q6J("ngForOf",o.service.GROUP_BY_OPTIONS)("ngForTrackBy",o.trackById),t.xp6(1),t.Q6J("ngIf",o.isGroupByPhase()&&(o.auth.isOwnerOrAdmin()||o.isProjectManager())),t.xp6(1),t.Q6J("ngIf",o.isGroupByStatus()&&(o.auth.isOwnerOrAdmin()||o.isProjectManager()))}},dependencies:[h0.sg,h0.O5,x0._Y,x0.Fj,x0.JJ,x0.JL,x0.On,x0.F,n1.t3,n1.SK,h1.Lr,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,o0.cm,o0.RR,o0.wA,H0.Ls,e0.Ie,X0.ZU,L.x7,m.Zp,d.Dz,K.SY,g0.NU,g0.$1,e1.g,u1.p,L1.g,k1.I,W0.m],styles:[".members-menu[_ngcontent-%COMP%]{max-height:250px;overflow:hidden;overflow-y:auto}.filter-active[_ngcontent-%COMP%]{background:#E6F7FF;border:1px solid #1890FF}.lg-only[_ngcontent-%COMP%]{display:inline-block}@media (max-width: 1200px){.mob-p-0[_ngcontent-%COMP%]{display:none}.button-mobile[_ngcontent-%COMP%]{padding-left:7px;padding-right:7px}.lg-only[_ngcontent-%COMP%]{display:none}}"],changeDetection:0}),x})();function _e(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",6),t._uU(2,"Key"),t.qZA(),t.BQk())}function Be(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",7),t._uU(2,"Description"),t.qZA(),t.BQk())}function le(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",8),t._uU(2,"Progress"),t.qZA(),t.BQk())}function he(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",9),t._uU(2,"Members"),t.qZA(),t.BQk())}function qe(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",10),t._uU(2,"Labels"),t.qZA(),t.BQk())}function ce(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",14),t.NdJ("click",function(){t.CHM(O);const o=t.oxw(2);return t.KtG(o.onPhaseSettingsClick())}),t._UZ(1,"span",15),t.qZA()}2&r&&(t.Q6J("nzShape","circle")("nzSize","small")("nzType","text"),t.xp6(1),t.Q6J("nzType","setting")("nzTheme","outline"))}function we(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",11)(2,"span",12),t._uU(3),t.ALo(4,"ellipsis"),t.qZA(),t.YNc(5,ce,2,5,"button",13),t.qZA(),t.BQk()),2&r){const O=t.oxw();t.xp6(2),t.Q6J("nzTooltipTitle",O.phaseLabel),t.xp6(1),t.Oqu(t.xi3(4,3,O.phaseLabel,10)),t.xp6(2),t.Q6J("ngIf",O.auth.isOwnerOrAdmin()||O.isProjectManager())}}function fe(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",16),t._uU(2,"Status"),t.qZA(),t.BQk())}function de(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",17),t._uU(2,"Priority"),t.qZA(),t.BQk())}function Te(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",18),t._uU(2,"Time Tracking"),t.qZA(),t.BQk())}function Ge(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",19),t._uU(2,"Estimation"),t.qZA(),t.BQk())}function ve(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",20),t._uU(2,"Start Date"),t.qZA(),t.BQk())}function t0(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",21),t._uU(2,"Due Date"),t.qZA(),t.BQk())}function f(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",22),t._uU(2,"Completed Date"),t.qZA(),t.BQk())}function y(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",23),t._uU(2,"Created Date"),t.qZA(),t.BQk())}function W(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",24),t._uU(2,"Last Updated"),t.qZA(),t.BQk())}function k(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",24),t._uU(2,"Reporter"),t.qZA(),t.BQk())}let Y=(()=>{var r;class x{get phaseLabel(){return this.phasesService.label}constructor(i,o,q,w,y0,J0){this.service=i,this.map=o,this.cdr=q,this.phasesService=w,this.auth=y0,this.projectsService=J0,this.headerCls="flex-table header",this.selectChange=new t.vpe,this.phaseSettingsClick=new t.vpe,this.checked=!1,this.indeterminate=!1,this.keyActive=!1,this.descriptionActive=!1,this.progressActive=!1,this.assigneesActive=!1,this.labelsActive=!1,this.statusActive=!1,this.priorityActive=!1,this.timeTrackingActive=!1,this.estimationActive=!1,this.startDateActive=!1,this.dueDateActive=!1,this.completedDateActive=!1,this.createdDateActive=!1,this.lastUpdatedActive=!1,this.reporterActive=!1,this.phaseActive=!1,this.service.onColumnsChange$.pipe((0,N.sL)()).subscribe(()=>{this.cdr.markForCheck(),this.updateState()}),this.map.onDeselectAll$.pipe((0,N.sL)()).subscribe(()=>{this.checked=!1,this.indeterminate=!1,this.cdr.markForCheck()}),this.phasesService.onLabelChange.pipe((0,N.sL)()).subscribe(m1=>{this.cdr.markForCheck()}),(0,J.T)(this.map.onSelect$,this.map.onDeselect$).pipe((0,N.sL)()).subscribe(()=>{this.map.isAllDeselected(this.groupId)?(this.checked=!1,this.indeterminate=!1):this.map.isAllSelected(this.groupId)?(this.checked=!0,this.indeterminate=!1):this.indeterminate=!0,this.cdr.markForCheck()})}ngOnInit(){this.updateState()}isProjectManager(){return!!this.projectsService.projectOwnerTeamMemberId&&this.auth.getCurrentSession()?.team_member_id===this.projectsService.projectOwnerTeamMemberId}updateState(){this.keyActive=this.active(this.service.COLUMN_KEYS.KEY),this.descriptionActive=this.active(this.service.COLUMN_KEYS.DESCRIPTION),this.progressActive=this.active(this.service.COLUMN_KEYS.PROGRESS),this.assigneesActive=this.active(this.service.COLUMN_KEYS.ASSIGNEES),this.labelsActive=this.active(this.service.COLUMN_KEYS.LABELS),this.statusActive=this.active(this.service.COLUMN_KEYS.STATUS),this.priorityActive=this.active(this.service.COLUMN_KEYS.PRIORITY),this.timeTrackingActive=this.active(this.service.COLUMN_KEYS.TIME_TRACKING),this.estimationActive=this.active(this.service.COLUMN_KEYS.ESTIMATION),this.startDateActive=this.active(this.service.COLUMN_KEYS.START_DATE),this.dueDateActive=this.active(this.service.COLUMN_KEYS.DUE_DATE),this.completedDateActive=this.active(this.service.COLUMN_KEYS.COMPLETED_DATE),this.createdDateActive=this.active(this.service.COLUMN_KEYS.CREATED_DATE),this.lastUpdatedActive=this.active(this.service.COLUMN_KEYS.LAST_UPDATED),this.reporterActive=this.active(this.service.COLUMN_KEYS.REPORTER),this.phaseActive=this.active(this.service.COLUMN_KEYS.PHASE)}active(i){return this.service.canActive(i)}onAllChecked(i){this.selectChange?.emit(i)}onPhaseSettingsClick(){this.phaseSettingsClick.emit()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(Z0.g),t.Y36(t.sBO),t.Y36(A0.u),t.Y36(V.e),t.Y36(Q0.m))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-header"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.headerCls)},inputs:{groupId:"groupId"},outputs:{selectChange:"selectChange",phaseSettingsClick:"phaseSettingsClick"},decls:22,vars:18,consts:[[1,"flex-row","task-drag-handler"],[1,"flex-row","task-check"],["nz-checkbox","",3,"nzChecked","nzIndeterminate","nzCheckedChange"],[4,"ngIf"],[1,"flex-row","task-arrow"],[1,"flex-row","task-name"],[1,"flex-row","task-key","text-center"],[1,"flex-row","task-description"],[1,"flex-row","task-progress","text-center"],[1,"flex-row","task-members"],[1,"flex-row","task-labels"],[1,"flex-row","task-phase","d-flex","justify-content-between","align-items-center"],["nz-tooltip","",3,"nzTooltipTitle"],["nz-button","",3,"nzShape","nzSize","nzType","click",4,"ngIf"],["nz-button","",3,"nzShape","nzSize","nzType","click"],["nz-icon","",3,"nzType","nzTheme"],[1,"flex-row","task-status"],[1,"flex-row","task-priority"],[1,"flex-row","task-time-tracking","justify-content-center"],[1,"flex-row","task-estimation","justify-content-center"],[1,"flex-row","task-start-date"],[1,"flex-row","task-due-date"],[1,"flex-row","task-completed-date"],[1,"flex-row","task-created-date"],[1,"flex-row","task-update-date"]],template:function(i,o){1&i&&(t._UZ(0,"div",0),t.TgZ(1,"div",1)(2,"span",2),t.NdJ("nzCheckedChange",function(w){return o.checked=w})("nzCheckedChange",function(w){return o.onAllChecked(w)}),t.qZA()(),t.YNc(3,_e,3,0,"ng-container",3),t._UZ(4,"div",4),t.TgZ(5,"div",5),t._uU(6,"Task"),t.qZA(),t.YNc(7,Be,3,0,"ng-container",3),t.YNc(8,le,3,0,"ng-container",3),t.YNc(9,he,3,0,"ng-container",3),t.YNc(10,qe,3,0,"ng-container",3),t.YNc(11,we,6,6,"ng-container",3),t.YNc(12,fe,3,0,"ng-container",3),t.YNc(13,de,3,0,"ng-container",3),t.YNc(14,Te,3,0,"ng-container",3),t.YNc(15,Ge,3,0,"ng-container",3),t.YNc(16,ve,3,0,"ng-container",3),t.YNc(17,t0,3,0,"ng-container",3),t.YNc(18,f,3,0,"ng-container",3),t.YNc(19,y,3,0,"ng-container",3),t.YNc(20,W,3,0,"ng-container",3),t.YNc(21,k,3,0,"ng-container",3)),2&i&&(t.xp6(2),t.Q6J("nzChecked",o.checked)("nzIndeterminate",o.indeterminate),t.xp6(1),t.Q6J("ngIf",o.keyActive),t.xp6(4),t.Q6J("ngIf",o.descriptionActive),t.xp6(1),t.Q6J("ngIf",o.progressActive),t.xp6(1),t.Q6J("ngIf",o.assigneesActive),t.xp6(1),t.Q6J("ngIf",o.labelsActive),t.xp6(1),t.Q6J("ngIf",o.phaseActive),t.xp6(1),t.Q6J("ngIf",o.statusActive),t.xp6(1),t.Q6J("ngIf",o.priorityActive),t.xp6(1),t.Q6J("ngIf",o.timeTrackingActive),t.xp6(1),t.Q6J("ngIf",o.estimationActive),t.xp6(1),t.Q6J("ngIf",o.startDateActive),t.xp6(1),t.Q6J("ngIf",o.dueDateActive),t.xp6(1),t.Q6J("ngIf",o.completedDateActive),t.xp6(1),t.Q6J("ngIf",o.createdDateActive),t.xp6(1),t.Q6J("ngIf",o.lastUpdatedActive),t.xp6(1),t.Q6J("ngIf",o.reporterActive))},dependencies:[h0.O5,O1.ix,N0.w,M0.dQ,H0.Ls,e0.Ie,K.SY,u1.p],styles:[".flex-row[_ngcontent-%COMP%]{padding:4px 11px;background-color:#fafafa;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;display:flex;align-items:center;flex-direction:row}.task-drag-handler[_ngcontent-%COMP%]{padding:0 0 0 4px!important;width:24px;border-bottom:1px solid #f0f0f0;border-right:none!important;position:sticky;left:0;z-index:1}.task-check[_ngcontent-%COMP%]{text-align:center;padding:8px 6px 8px 0!important;position:sticky;left:24px;z-index:1}.task-key[_ngcontent-%COMP%]{width:85px}.task-arrow[_ngcontent-%COMP%]{width:24px;padding:0!important;display:flex;align-items:center;position:sticky;border-right:0;left:47px;z-index:1}.task-name[_ngcontent-%COMP%]{width:450px;min-width:450px;position:sticky;left:71px;z-index:1}.task-name[_ngcontent-%COMP%] nz-filter-trigger[_ngcontent-%COMP%]{margin-left:auto}.task-name.left-0[_ngcontent-%COMP%]{left:47px}.task-description[_ngcontent-%COMP%]{width:225px}.task-progress[_ngcontent-%COMP%]{width:80px}.task-members[_ngcontent-%COMP%]{width:160px}.task-labels[_ngcontent-%COMP%]{width:220px}.task-status[_ngcontent-%COMP%]{width:120px}.task-phase[_ngcontent-%COMP%]{width:150px}.task-priority[_ngcontent-%COMP%], .task-time-tracking[_ngcontent-%COMP%], .task-estimation[_ngcontent-%COMP%]{width:120px}.task-start-date[_ngcontent-%COMP%], .task-due-date[_ngcontent-%COMP%], .task-completed-date[_ngcontent-%COMP%], .task-created-date[_ngcontent-%COMP%], .task-update-date[_ngcontent-%COMP%]{width:150px}"],changeDetection:0}),x})();function d0(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",5),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit,y0=t.oxw();return t.KtG(y0.onColumnsToggle(o,w))}),t._uU(1),t.qZA()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.pinned),t.xp6(1),t.Oqu(O.name)}}let C0=(()=>{var r;class x{constructor(i,o,q,w){this.service=i,this.api=o,this.cdr=q,this.phasesService=w,this.loading=!1,this.phasesService.onLabelChange.pipe((0,N.sL)()).subscribe(()=>{this.getColumns()})}ngOnInit(){this.getColumns()}getColumns(){var i=this;return(0,M.Z)(function*(){if(i.projectId){try{i.loading=!0;const o=yield i.api.getListCols(i.projectId);o.done&&(i.service.columns=[...o.body]),i.loading=!1}catch{i.loading=!1}i.cdr.detectChanges()}})()}onColumnsToggle(i,o){var q=this;return(0,M.Z)(function*(){if(q.projectId)try{o.pinned=i,q.service.emitColsChange(),q.api.toggleListCols(q.projectId,o),c.s.track(n.OR)}catch{}})()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(a0.c),t.Y36(t.sBO),t.Y36(A0.u))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-columns-toggle"]],inputs:{projectId:"projectId"},decls:7,vars:8,consts:[["nz-button","","nz-dropdown","",1,"columns-toggle",3,"nzType","nzTrigger","nzLoading","nzClickHide","nzDropdownMenu"],["nz-icon","",3,"nzType","nzTheme"],["columnsDropdown","nzDropdownMenu"],["nz-menu","","nzSelectable","",1,"menu"],["nz-menu-item","","nz-checkbox","","class","m-0",3,"nzChecked","nzCheckedChange",4,"ngFor","ngForOf"],["nz-menu-item","","nz-checkbox","",1,"m-0",3,"nzChecked","nzCheckedChange"]],template:function(i,o){if(1&i&&(t.TgZ(0,"button",0),t._UZ(1,"span",1),t._uU(2," Show fields\n"),t.qZA(),t.TgZ(3,"nz-dropdown-menu",null,2)(5,"ul",3),t.YNc(6,d0,2,2,"li",4),t.qZA()()),2&i){const q=t.MAs(4);t.Q6J("nzType","default")("nzTrigger","click")("nzLoading",o.loading)("nzClickHide",!1)("nzDropdownMenu",q),t.xp6(1),t.Q6J("nzType","more")("nzTheme","outline"),t.xp6(5),t.Q6J("ngForOf",o.service.columns)}},dependencies:[h0.sg,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,o0.cm,o0.RR,o0.wA,H0.Ls,e0.Ie],styles:[".menu[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto}"],changeDetection:0}),x})();var $0=s(55695),a1=s(48128);function q1(r,x){if(1&r&&t._UZ(0,"nz-progress",2),2&r){const O=t.oxw();t.Q6J("nzPercent",O.percent)("nzType","circle")("nzWidth",O.width)("nzStrokeWidth",O.strokeWidth)("nzTooltipTitle",O.tooltipTitle)}}let x1=(()=>{var r;class x{get percent(){return this.task.complete_ratio||0}get width(){return(this.task.complete_ratio||0)>=100?16:26}get strokeWidth(){return(this.task.complete_ratio||0)>=100?9:7}get tooltipTitle(){return(this.task.completed_count||0)+"/"+(this.task.total_tasks_count||0)}constructor(i,o){this.socket=i,this.cdr=o,this.task={},this.cls="flex-row task-progress text-align-center",this.handleResponse=q=>{q&&(q.parent_task===this.task.id||q.id===this.task.id)&&(this.task.complete_ratio=+q.complete_ratio,this.task.total_tasks_count=q.total_tasks_count,this.task.completed_count=q.completed_count,this.cdr.markForCheck())}}ngOnInit(){this.socket.on(g.C.GET_TASK_PROGRESS.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.GET_TASK_PROGRESS.toString(),this.handleResponse)}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(R0.s),t.Y36(t.sBO))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-progress"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:2,vars:1,consts:[[1,"d-flex","justify-content-center","mx-auto"],["nz-tooltip","",3,"nzPercent","nzType","nzWidth","nzStrokeWidth","nzTooltipTitle",4,"ngIf"],["nz-tooltip","",3,"nzPercent","nzType","nzWidth","nzStrokeWidth","nzTooltipTitle"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0),t.YNc(1,q1,1,5,"nz-progress",1),t.qZA()),2&i&&(t.xp6(1),t.Q6J("ngIf",!o.task.is_sub_task))},dependencies:[h0.O5,K.SY,a1.M],changeDetection:0}),x})();var B1=s(63481),j1=s(99183),Me=s(27476);const Re=["memberSearchInput"];function P1(r,x){if(1&r&&(t._UZ(0,"worklenz-avatars",10),t.ALo(1,"wlSafeArray")),2&r){const O=t.oxw();t.Q6J("names",t.lcZ(1,1,O.task.names))}}function Xe(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",11)(1,"input",12,13),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.searchText=o)})("keydown.enter",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.selectLastValue(o))}),t.qZA()()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngModel",O.searchText)}}function Ce(r,x){1&r&&(t.TgZ(0,"small",23),t._uU(1,"(Pending Invitation)"),t.qZA())}function G1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",16),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(o){const w=t.CHM(O).$implicit,y0=t.oxw(2);return t.KtG(y0.handleMemberChange(w,o))}),t.TgZ(1,"div",17),t._UZ(2,"nz-avatar",18),t.ALo(3,"firstCharUpper"),t.TgZ(4,"div",19)(5,"span",20),t._uU(6),t.qZA(),t.TgZ(7,"small",21),t._uU(8),t.YNc(9,Ce,2,0,"small",22),t.qZA()()()()}if(2&r){const O=x.$implicit;t.Q6J("nzDisabled",O.is_pending&&!O.selected)("nzChecked",O.selected)("ngClass",O.is_pending&&!O.selected?"disable":""),t.xp6(2),t.Udp("background-color",O.avatar_url?"#ececec":O.color_code),t.Q6J("nzSize",28)("nzText",t.lcZ(3,14,O.name))("nzTooltipTitle",O.name)("nzSrc",O.avatar_url)("nzTooltipPlacement","top"),t.xp6(4),t.Oqu(O.name),t.xp6(1),t.Q6J("nzType","secondary"),t.xp6(1),t.hij(" ",O.email," "),t.xp6(1),t.Q6J("ngIf",O.is_pending)}}function Ee(r,x){if(1&r&&(t.TgZ(0,"ul",14),t.YNc(1,G1,10,16,"li",15),t.ALo(2,"searchByName"),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngForOf",t.xi3(2,2,O.members,O.searchText))("ngForTrackBy",O.trackById)}}function je(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onInviteClick())}),t._UZ(1,"span",25),t._uU(2," Invite a new member by email "),t.qZA()}}function Qe(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",26)(1,"button",27),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.closeDropdown())}),t._uU(2,"OK"),t.qZA()()}if(2&r){const O=t.oxw();t.ekj("justify-content-between",O.isOwnerOrAdmin)("justify-content-end",!O.isOwnerOrAdmin)}}let st=(()=>{var r;class x{get avatarClass(){return this.task.assignees?.length?"add-button avatar-dashed ms-1 bg-white":"avatar-dashed bg-white"}constructor(i,o,q,w,y0,J0,m1,d1){this.service=i,this.cdr=o,this.socket=q,this.auth=w,this.utils=y0,this.ngZone=J0,this.kanbanService=m1,this.timerService=d1,this.task={},this.cls="flex-row task-members",this.searchText=null,this.members=[],this.session=null,this.show=!1,this.isOwnerOrAdmin=!1,this.handleResponse=N1=>{try{N1&&N1.id===this.task.id&&(this.task.assignees=N1.assignees||[],this.task.names=N1.names||[],this.cdr.markForCheck())}catch{}},this.service.onMembersChange$.pipe((0,N.sL)()).subscribe(()=>{this.cdr.markForCheck(),this.updateMembers()}),this.timerService.onListTimerStop.pipe((0,N.sL)()).subscribe(N1=>{this.task.id===N1&&this.handleMemberAssignByTimer(N1)}),this.service.onAssignMe$.pipe((0,B.h)(N1=>N1.id===this.task.id),(0,N.sL)()).subscribe(N1=>{this.handleResponse(N1)})}ngOnInit(){this.session=this.auth.getCurrentSession(),this.isOwnerOrAdmin=this.auth.isOwnerOrAdmin(),this.updateMembers(),this.socket.on(g.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleResponse)}ngOnDestroy(){this.members=[],this.socket.removeListener(g.C.QUICK_ASSIGNEES_UPDATE.toString(),this.handleResponse)}updateMembers(){this.members=this.service.members}sortMembersBySelection(i){this.utils.sortBySelection(i),this.utils.sortByPending(i)}trackById(i,o){return o.id}handleVisibleChange(i,o){if(this.show=i,i?o.classList.add(this.service.HIGHLIGHT_COL_CLS):o.classList.remove(this.service.HIGHLIGHT_COL_CLS),i){const q=this.task.assignees?.map(w=>w.team_member_id)||[];for(const w of this.members)w.selected=q.includes(w.id);this.focusMemberSearchInput()}else{this.searchText=null;for(const q of this.members)q.selected=!1}this.sortMembersBySelection(this.members)}focusMemberSearchInput(){setTimeout(()=>{this.memberSearchInput?.nativeElement?.focus()},100)}handleMemberChange(i,o){if(!this.session)return;const q={team_member_id:i.id,project_id:this.service.getProjectId(),task_id:this.task.id,reporter_id:this.session.id,mode:o?0:1,parent_task:this.task.parent_task_id};this.socket.emit(g.C.QUICK_ASSIGNEES_UPDATE.toString(),JSON.stringify(q)),this.sortMembersBySelection(this.members)}handleMemberAssignByTimer(i){if(!this.session)return;const o={team_member_id:this.session.team_member_id,project_id:this.service.getProjectId(),task_id:i,reporter_id:this.session.id,mode:0,parent_task:this.task.parent_task_id};this.socket.emit(g.C.QUICK_ASSIGNEES_UPDATE.toString(),JSON.stringify(o)),this.sortMembersBySelection(this.members),this.cdr.markForCheck()}closeDropdown(){this.ngZone.runOutsideAngular(()=>{document.body.click()})}onInviteClick(){document.body.click(),this.service.emitInviteMembers()}transform(i,o){return o?i.filter(q=>q.name.toLowerCase().includes(o.toLowerCase())):i}selectLastValue(i){if(i.target.value){const o=this.members.filter(q=>q.name&&q.name.toLowerCase().includes(i.target.value.toLowerCase()));1==o.length&&(this.handleMemberChange(o[0],!o[0].selected),o[0].selected=!o[0].selected)}}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(t.sBO),t.Y36(R0.s),t.Y36(V.e),t.Y36(p0.F),t.Y36(t.R0b),t.Y36(D0.m),t.Y36(B1.d))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-members"]],viewQuery:function(i,o){if(1&i&&t.Gf(Re,5),2&i){let q;t.iGM(q=t.CRH())&&(o.memberSearchInput=q.first)}},hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:11,vars:13,consts:[["nz-dropdown","",1,"editable","w-100","h-100","d-flex","align-items-center","px-2",3,"nzDropdownMenu","nzOverlayClassName","nzClickHide","nzTrigger","nzVisibleChange"],["tr",""],[1,"d-flex"],["class","d-flex",3,"names",4,"ngIf"],[3,"nzSize","nzIcon"],["membersDropdown","nzDropdownMenu"],["class","bg-white px-3 py-2 border-bottom",4,"ngIf"],["class","members-dropdown","style","box-shadow: none;min-width:300px;","nz-menu","",4,"ngIf"],["nz-button","","nzType","link","class","border-top bg-white w-100",3,"click",4,"ngIf"],["class","bg-white text-end align-items-center p-2 border-top",3,"justify-content-between","justify-content-end",4,"ngIf"],[1,"d-flex",3,"names"],[1,"bg-white","px-3","py-2","border-bottom"],["type","text","placeholder","Search by name","nz-input","",3,"ngModel","ngModelChange","keydown.enter"],["memberSearchInput",""],["nz-menu","",1,"members-dropdown",2,"box-shadow","none","min-width","300px"],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzDisabled","nzChecked","ngClass","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzDisabled","nzChecked","ngClass","nzCheckedChange"],[1,"d-flex","align-items-center","justify-content-center","user-select-none"],["nz-tooltip","",1,"mt-auto","mb-auto","me-2",3,"nzSize","nzText","nzTooltipTitle","nzSrc","nzTooltipPlacement"],[2,"line-height","15px"],["nz-typography","",1,"d-block"],["nz-typography","",3,"nzType"],["nz-typography","","nzType","danger",4,"ngIf"],["nz-typography","","nzType","danger"],["nz-button","","nzType","link",1,"border-top","bg-white","w-100",3,"click"],["nz-icon","","nzType","usergroup-add","nzTheme","outline"],[1,"bg-white","text-end","align-items-center","p-2","border-top"],["nz-button","","nzType","primary","nzSize","small",3,"click"]],template:function(i,o){if(1&i){const q=t.EpF();t.TgZ(0,"div",0,1),t.NdJ("nzVisibleChange",function(y0){t.CHM(q);const J0=t.MAs(1);return t.KtG(o.handleVisibleChange(y0,J0))}),t.TgZ(2,"div",2),t.YNc(3,P1,2,3,"worklenz-avatars",3),t._UZ(4,"nz-avatar",4),t.qZA()(),t.TgZ(5,"nz-dropdown-menu",null,5),t.YNc(7,Xe,3,1,"div",6),t.YNc(8,Ee,3,5,"ul",7),t.YNc(9,je,3,0,"button",8),t.YNc(10,Qe,3,4,"div",9),t.qZA()}if(2&i){const q=t.MAs(6);t.Q6J("nzDropdownMenu",q)("nzOverlayClassName","custom-shadow")("nzClickHide",!1)("nzTrigger","click"),t.xp6(3),t.Q6J("ngIf",null==o.task.names?null:o.task.names.length),t.xp6(1),t.Tol(o.avatarClass),t.Q6J("nzSize",28)("nzIcon","plus"),t.xp6(3),t.Q6J("ngIf",o.show),t.xp6(1),t.Q6J("ngIf",o.show&&o.members.length),t.xp6(1),t.Q6J("ngIf",o.isOwnerOrAdmin&&o.show),t.xp6(1),t.Q6J("ngIf",o.show)}},dependencies:[h0.mk,h0.sg,h0.O5,x0.Fj,x0.JJ,x0.On,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,o0.cm,o0.RR,H0.Ls,e0.Ie,X0.ZU,m.Zp,d.Dz,K.SY,j1.o,L1.g,k1.I,Me.g],styles:['.disable[_ngcontent-%COMP%]{position:relative}.disable[_ngcontent-%COMP%]:after{position:absolute;content:"";background:rgba(231,231,231,.4117647059);inset:0;width:100%}.z-top[_ngcontent-%COMP%]{z-index:9}'],changeDetection:0}),x})();var lt=s(86211);let Ve=(()=>{var r;class x{transform(i,...o){return!(!i.end||!i.names)}}return(r=x).\u0275fac=function(i){return new(i||r)},r.\u0275pipe=t.Yjl({name:"endNameCheck",type:r,pure:!0}),x})(),Ze=(()=>{var r;class x{transform(i,o){return i&&i.length>o?i:""}}return(r=x).\u0275fac=function(i){return new(i||r)},r.\u0275pipe=t.Yjl({name:"ellipsisTooltipTitle",type:r,pure:!0}),x})();const Q1=["labelsSearchInput"];function me(r,x){if(1&r&&(t.TgZ(0,"nz-tag",14),t.ALo(1,"withAlpha"),t.ALo(2,"safeString"),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"ellipsis"),t.qZA()()),2&r){const O=t.oxw().$implicit;t.Q6J("nzColor",t.lcZ(1,3,O.color_code))("nzTooltipTitle",t.lcZ(2,5,O.names)),t.xp6(4),t.Oqu(t.xi3(5,7,O.name,10))}}function re(r,x){if(1&r&&(t.TgZ(0,"nz-tag",15),t.ALo(1,"ellipsisTooltipTitle"),t.ALo(2,"withAlpha"),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"ellipsis"),t.qZA()()),2&r){const O=t.oxw().$implicit;t.Q6J("nzTooltipTitle",t.xi3(1,3,O.name,5))("nzColor",t.lcZ(2,6,O.color_code)),t.xp6(4),t.Oqu(t.xi3(5,8,O.name,10))}}function ct(r,x){if(1&r&&(t.ynx(0)(1,11),t.ALo(2,"endNameCheck"),t.YNc(3,me,6,10,"nz-tag",12),t.YNc(4,re,6,11,"nz-tag",13),t.BQk()()),2&r){const O=x.$implicit;t.xp6(1),t.Q6J("ngSwitch",t.lcZ(2,3,O)),t.xp6(2),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1)}}function Pe(r,x){1&r&&(t.TgZ(0,"span",20),t._uU(1," Hit enter to create! "),t.qZA())}function Mt(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",16)(1,"input",17,18),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.searchText=o)})("keydown.enter",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.createLabel())}),t.qZA(),t.YNc(3,Pe,2,0,"span",19),t.qZA()}if(2&r){const O=t.oxw();t.ekj("border-bottom",O.hasFilteredLabel),t.xp6(1),t.Q6J("ngModel",O.searchText),t.xp6(2),t.Q6J("ngIf",!O.hasFilteredLabel)}}function dt(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",23),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)})("nzCheckedChange",function(){const q=t.CHM(O).$implicit,w=t.oxw(2);return t.KtG(w.handleLabelChange(q))}),t._UZ(1,"nz-badge",24),t.qZA()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.selected),t.xp6(1),t.Q6J("nzColor",O.color_code)("nzText",(null==O?null:O.name)||null)}}function zt(r,x){if(1&r&&(t.TgZ(0,"ul",21),t.YNc(1,dt,2,3,"li",22),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngForOf",O.filteredLabels)("ngForTrackBy",O.trackById)}}let Ue=(()=>{var r;class x{get hasFilteredLabel(){return!!this.filteredLabels.length}get filteredLabels(){return this.searchPipe.transform(this.labels,this.searchText)}constructor(i,o,q,w,y0,J0,m1,d1){this.cdr=i,this.searchPipe=o,this.auth=q,this.socket=w,this.utils=y0,this.ngZone=J0,this.kanbanService=m1,this.service=d1,this.task={},this.cls="flex-row task-labels",this.alpha=E.Yj,this.searchText=null,this.labels=[],this.show=!1,this.handleLabelsChange=N1=>{if(N1&&N1.id===this.task.id){if(this.task.labels=N1.labels,this.task.all_labels=N1.all_labels,N1.new_label)if(N1.is_new){const c1=[...this.service.labels];c1.push(N1.new_label),this.service.labels=[...c1]}else{const c1=this.labels.find(ot=>ot.id===N1.new_label.id);c1&&(c1.selected=!0)}this.kanbanService.emitRefreshGroups(),this.cdr.markForCheck()}},this.service.onLabelsChange$.pipe((0,N.sL)()).subscribe(()=>{this.updateLabels(),this.cdr.markForCheck()})}ngOnInit(){this.updateLabels(),this.socket.on(g.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.on(g.C.CREATE_LABEL.toString(),this.handleLabelsChange)}ngOnDestroy(){this.labels=[],this.socket.removeListener(g.C.TASK_LABELS_CHANGE.toString(),this.handleLabelsChange),this.socket.removeListener(g.C.CREATE_LABEL.toString(),this.handleLabelsChange)}updateLabels(){this.labels=this.service.labels}trackById(i,o){return o.id}sortBySelected(i){this.utils.sortBySelection(i)}handleLabelsVisibleChange(i,o){if(this.show=i,i?o.classList.add(this.service.HIGHLIGHT_COL_CLS):o.classList.remove(this.service.HIGHLIGHT_COL_CLS),i){const q=this.task.all_labels?.map(w=>w.id)??[];for(const w of this.labels)w.selected=q.includes(w.id);this.focusLabelsSearchInput()}else{this.searchText=null;for(const q of this.labels)q.selected=!1}this.sortBySelected(this.labels)}focusLabelsSearchInput(){this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.labelsSearchInput?.nativeElement?.focus()},100)})}handleLabelChange(i){this.socket.emit(g.C.TASK_LABELS_CHANGE.toString(),JSON.stringify({task_id:this.task.id,label_id:i.id,parent_task:this.task.parent_task_id})),this.sortBySelected(this.labels)}createLabel(){if(this.hasFilteredLabel||!this.searchText)return;const i=this.auth.getCurrentSession();this.socket.emit(g.C.CREATE_LABEL.toString(),JSON.stringify({task_id:this.task.id,label:this.searchText.trim(),team_id:i?.team_id,parent_task:this.task.parent_task_id})),this.searchText=null,this.cdr.detectChanges()}closeDropdown(){this.ngZone.runOutsideAngular(()=>{document.body.click()})}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(t.sBO),t.Y36(L1.g),t.Y36(V.e),t.Y36(R0.s),t.Y36(p0.F),t.Y36(t.R0b),t.Y36(D0.m),t.Y36(Z.b))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-labels"]],viewQuery:function(i,o){if(1&i&&t.Gf(Q1,5),2&i){let q;t.iGM(q=t.CRH())&&(o.labelsSearchInput=q.first)}},hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:13,vars:11,consts:[["nz-dropdown","",1,"editable","w-100","h-100","d-flex","align-items-center","ps-2","pe-0","label-tag-container",3,"nzOverlayClassName","nzTrigger","nzClickHide","nzDropdownMenu","nzVisibleChange"],["element",""],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"text-dark","avatar-dashed","empty-label","task-list-label"],["nz-typography","",3,"nzType"],["nz-icon","",3,"nzType","nzTheme"],["labelsDropdown","nzDropdownMenu"],["class","bg-white px-3 py-2",3,"border-bottom",4,"ngIf"],["style","box-shadow: none;","class","dropdown-ul","nz-menu","",4,"ngIf"],[1,"bg-white","d-flex","justify-content-end","p-2","border-top"],["nz-button","","nzType","primary","nzSize","small",3,"click"],[3,"ngSwitch"],["nz-tooltip","","class","text-dark task-list-label",3,"nzColor","nzTooltipTitle",4,"ngSwitchCase"],["class","text-dark task-list-label","nz-tooltip","",3,"nzTooltipTitle","nzColor",4,"ngSwitchCase"],["nz-tooltip","",1,"text-dark","task-list-label",3,"nzColor","nzTooltipTitle"],["nz-tooltip","",1,"text-dark","task-list-label",3,"nzTooltipTitle","nzColor"],[1,"bg-white","px-3","py-2"],["type","text","placeholder","Search or create","nz-input","",3,"ngModel","ngModelChange","keydown.enter"],["labelsSearchInput",""],["nz-typography","","nzType","secondary",4,"ngIf"],["nz-typography","","nzType","secondary"],["nz-menu","",1,"dropdown-ul",2,"box-shadow","none"],["nz-checkbox","","nz-menu-item","","class","m-0",3,"nzChecked","nzCheckedChange",4,"ngFor","ngForOf","ngForTrackBy"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzCheckedChange"],[3,"nzColor","nzText"]],template:function(i,o){if(1&i){const q=t.EpF();t.TgZ(0,"div",0,1),t.NdJ("nzVisibleChange",function(y0){t.CHM(q);const J0=t.MAs(1);return t.KtG(o.handleLabelsVisibleChange(y0,J0))}),t.YNc(2,ct,5,5,"ng-container",2),t.TgZ(3,"nz-tag",3)(4,"span",4),t._UZ(5,"span",5),t.qZA()()(),t.TgZ(6,"nz-dropdown-menu",null,6),t.YNc(8,Mt,4,4,"div",7),t.YNc(9,zt,2,2,"ul",8),t.TgZ(10,"div",9)(11,"button",10),t.NdJ("click",function(){return o.closeDropdown()}),t._uU(12,"OK"),t.qZA()()()}if(2&i){const q=t.MAs(7);t.Q6J("nzOverlayClassName","custom-shadow")("nzTrigger","click")("nzClickHide",!1)("nzDropdownMenu",q),t.xp6(2),t.Q6J("ngForOf",o.task.labels)("ngForTrackBy",o.trackById),t.xp6(2),t.Q6J("nzType","secondary"),t.xp6(1),t.Q6J("nzType","plus")("nzTheme","outline"),t.xp6(3),t.Q6J("ngIf",o.show),t.xp6(1),t.Q6J("ngIf",o.show)}},dependencies:[h0.sg,h0.O5,h0.RF,h0.n9,x0.Fj,x0.JJ,x0.On,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,o0.cm,o0.RR,H0.Ls,e0.Ie,X0.ZU,L.x7,m.Zp,K.SY,$0.j,u1.p,lt.M,W0.m,Ve,Ze],styles:[".dropdown-ul[_ngcontent-%COMP%]{max-height:250px;overflow:hidden;overflow-y:auto}.label-tag-container[_ngcontent-%COMP%]{max-width:220px;overflow:hidden;flex-wrap:wrap;padding-top:8px;padding-bottom:8px;padding-right:0}nz-tag[_ngcontent-%COMP%]{display:block;overflow:hidden;white-space:break-spaces;margin-left:3px;margin-right:3px;line-height:16px;padding-left:3px;padding-right:3px}.empty-label[_ngcontent-%COMP%]{padding:2px 8px 3px}.empty-label[_ngcontent-%COMP%] .ant-typography[_ngcontent-%COMP%]{display:flex}"],changeDetection:0}),x})();var u0=s(9691);function o1(r,x){if(1&r&&(t.TgZ(0,"nz-option",3),t.ALo(1,"safeString"),t._UZ(2,"nz-badge",4),t.ALo(3,"safeString"),t.qZA()),2&r){const O=x.$implicit;t.Q6J("nzValue",O.id)("nzLabel",t.lcZ(1,4,O.name)),t.xp6(2),t.Q6J("nzColor",t.lcZ(3,6,O.color_code))("nzText",(null==O?null:O.name)||null)}}let _0=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1,d1,N1){this.service=i,this.socket=o,this.cdr=q,this.ngZone=w,this.element=y0,this.renderer=J0,this.kanbanService=m1,this.auth=d1,this.app=N1,this.task={},this.cls="flex-row task-status",this.statuses=[],this.loading=!1,this.handleResponse=c1=>{this.task&&0==c1.completed_deps&&(this.task.status_color=c1.color_code,this.task.status=c1.status_id,this.cdr.markForCheck(),this.app.notify("Incomplete Dependencies!",E.mU,!1)),c1&&c1.id===this.task.id&&1==c1.completed_deps&&(this.task.status_color=c1.color_code,this.task.complete_ratio=+c1.complete_ratio||0,this.task.status=c1.status_id,this.task.status_category=c1.statusCategory,this.isGroupByStatus()&&(this.task.is_sub_task||this.service.updateTaskGroup(this.task,!1),this.service.isSubtasksIncluded&&this.service.emitRefreshSubtasksIncluded()),this.service.emitUpdateGroupProgress(this.task.id),this.kanbanService.emitRefreshGroups(),this.cdr.markForCheck())},this.service.onStatusesChange$.pipe((0,N.sL)()).subscribe(()=>{this.updateStatuses(),this.cdr.markForCheck()}),this.service.onGroupChange$.pipe((0,B.h)(c1=>c1.taskId===this.task.id),(0,B.h)(()=>this.isGroupByStatus()),(0,N.sL)()).subscribe(c1=>{this.task.status=c1.groupId,this.task.status_color=c1.color,this.getTaskProgress(c1.taskId),this.cdr.markForCheck()})}ngOnInit(){this.updateStatuses(),this.socket.on(g.C.TASK_STATUS_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.TASK_STATUS_CHANGE.toString(),this.handleResponse)}getTaskProgress(i){this.socket.emit(g.C.GET_TASK_PROGRESS.toString(),i)}isGroupByStatus(){return this.service.getCurrentGroup().value===this.service.GROUP_BY_STATUS_VALUE}trackById(i,o){return o.id}handleStatusChange(i,o){o&&(this.socket.emit(g.C.TASK_STATUS_CHANGE.toString(),JSON.stringify({task_id:o,status_id:i,parent_task:this.task.parent_task_id,team_id:this.auth.getCurrentSession()?.team_id})),this.getTaskProgress(o))}updateStatuses(){this.statuses=this.service.statuses}toggleHighlightCls(i,o){this.ngZone.runOutsideAngular(()=>{i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)})}handleOpen(i){this.toggleHighlightCls(i,this.element.nativeElement)}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(R0.s),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(t.SBq),t.Y36(t.Qsj),t.Y36(D0.m),t.Y36(V.e),t.Y36(r0.z))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-status"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:3,vars:8,consts:[[1,"py-0"],[1,"rounded-pill","custom-select",3,"ngModel","nzLoading","nzDropdownMatchSelectWidth","nzSize","ngModelChange","nzOpenChange"],["nzCustomContent","",3,"nzValue","nzLabel",4,"ngFor","ngForOf","ngForTrackBy"],["nzCustomContent","",3,"nzValue","nzLabel"],[3,"nzColor","nzText"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"nz-select",1),t.NdJ("ngModelChange",function(w){return o.task.status=w})("ngModelChange",function(w){return o.handleStatusChange(w,o.task.id)})("nzOpenChange",function(w){return o.handleOpen(w)}),t.YNc(2,o1,4,8,"nz-option",2),t.qZA()()),2&i&&(t.xp6(1),t.Udp("background-color",o.task.status_color),t.Q6J("ngModel",o.task.status)("nzLoading",o.loading)("nzDropdownMatchSelectWidth",!1)("nzSize","small"),t.xp6(1),t.Q6J("ngForOf",o.statuses)("ngForTrackBy",o.trackById))},dependencies:[h0.sg,x0.JJ,x0.On,L.x7,u0.Ip,u0.Vq,W0.m],styles:["nz-select[_ngcontent-%COMP%]{max-width:96px;width:100%;text-overflow:ellipsis}"],changeDetection:0}),x})();var G=s(8660);function k0(r,x){if(1&r&&(t.TgZ(0,"nz-option",3),t._UZ(1,"worklenz-task-priority-label",4),t.qZA()),2&r){const O=x.$implicit;t.Q6J("nzValue",O.id)("nzLabel",O.name)("nzCustomContent",!0),t.xp6(1),t.Q6J("name",O.name)}}let t1=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1){this.service=i,this.socket=o,this.cdr=q,this.ngZone=w,this.element=y0,this.renderer=J0,this.kanbanService=m1,this.task={},this.cls="flex-row task-priority",this.priorities=[],this.loading=!1,this.handleResponse=d1=>{d1&&d1.id===this.task.id&&(this.task.priority_color=d1.color_code,this.task.priority=d1.priority_id,this.isGroupByPriority()&&(this.task.is_sub_task||this.service.updateTaskGroup(this.task,!1),this.service.isSubtasksIncluded&&this.service.emitRefreshSubtasksIncluded()),this.kanbanService.emitRefreshGroups(),this.cdr.markForCheck())},this.service.onPrioritiesChange$.pipe((0,N.sL)()).subscribe(()=>{this.updatePriorities(),this.cdr.markForCheck()}),this.service.onGroupChange$.pipe((0,B.h)(d1=>d1.taskId===this.task.id),(0,B.h)(()=>this.isGroupByPriority()),(0,N.sL)()).subscribe(d1=>{this.task.priority=d1.groupId,this.task.priority_color=d1.color,this.cdr.markForCheck()})}ngOnInit(){this.updatePriorities(),this.socket.on(g.C.TASK_PRIORITY_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.priorities=[],this.socket.removeListener(g.C.TASK_PRIORITY_CHANGE.toString(),this.handleResponse)}isGroupByPriority(){return this.service.getCurrentGroup().value===this.service.GROUP_BY_PRIORITY_VALUE}trackById(i,o){return o.id}handlePriorityChange(i,o){this.socket.emit(g.C.TASK_PRIORITY_CHANGE.toString(),JSON.stringify({task_id:o.id,priority_id:i,parent_task:this.task.parent_task_id}))}updatePriorities(){this.priorities=this.service.priorities}toggleHighlightCls(i,o){this.ngZone.runOutsideAngular(()=>{i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)})}handleOpen(i){this.toggleHighlightCls(i,this.element.nativeElement)}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(R0.s),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(t.SBq),t.Y36(t.Qsj),t.Y36(D0.m))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-priority"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:3,vars:8,consts:[[1,"py-0"],[1,"rounded-pill","custom-select",3,"ngModel","nzLoading","nzDropdownMatchSelectWidth","nzSize","ngModelChange","nzOpenChange"],[3,"nzValue","nzLabel","nzCustomContent",4,"ngFor","ngForOf","ngForTrackBy"],[3,"nzValue","nzLabel","nzCustomContent"],[3,"name"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"nz-select",1),t.NdJ("ngModelChange",function(w){return o.task.priority=w})("ngModelChange",function(w){return o.handlePriorityChange(w,o.task)})("nzOpenChange",function(w){return o.handleOpen(w)}),t.YNc(2,k0,2,4,"nz-option",2),t.qZA()()),2&i&&(t.xp6(1),t.Udp("background",o.task.priority_color),t.Q6J("ngModel",o.task.priority)("nzLoading",o.loading)("nzDropdownMatchSelectWidth",!1)("nzSize","small"),t.xp6(1),t.Q6J("ngForOf",o.priorities)("ngForTrackBy",o.trackById))},dependencies:[h0.sg,x0.JJ,x0.On,u0.Ip,u0.Vq,G.o],styles:["nz-select[_ngcontent-%COMP%]{max-width:96px;width:100%;text-overflow:ellipsis}"],changeDetection:0}),x})();var w1=s(16676),v1=s.n(w1),ne=s(59866),Le=s(29232),Ke=s(57417),ke=s(60804),De=s(16976),At=s(34302);function ut(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"worklenz-task-timer",3),t.NdJ("changeListTime",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.task.timer_start_time=o)})("changeListTimeToDefault",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.task.timer_start_time=0)}),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("taskId",O.task.id)("projectId",O.task.project_id?O.task.project_id:"")("timerStartTime",O.task.timer_start_time||null)}}function _t(r,x){1&r&&t._UZ(0,"nz-empty")}function ht(r,x){if(1&r&&(t._UZ(0,"nz-avatar",15),t.ALo(1,"firstCharUpper")),2&r){const O=t.oxw().$implicit;t.Udp("background-color",O.avatar_color),t.Q6J("nzSize",28)("nzText",t.lcZ(1,4,O.user_name))}}function et(r,x){if(1&r&&(t._uU(0),t.ALo(1,"date"),t.ALo(2,"date")),2&r){const O=t.oxw().$implicit,i=t.oxw(3);t.AsE(" ",t.xi3(1,2,O.start_time,i.dateFormat)," - ",t.xi3(2,5,O.end_time,i.dateFormat)," ")}}function tt(r,x){if(1&r&&(t._uU(0),t.ALo(1,"date")),2&r){const O=t.oxw().$implicit,i=t.oxw(3);t.hij(" ",t.xi3(1,1,O.start_time,i.dateFormat)," ")}}function at(r,x){if(1&r&&(t.TgZ(0,"nz-list-item")(1,"nz-list-item-meta",9)(2,"nz-list-item-meta-avatar",10),t.YNc(3,ht,2,6,"nz-avatar",11),t.qZA(),t.TgZ(4,"nz-list-item-meta-title")(5,"span",12)(6,"strong"),t._uU(7),t.qZA(),t._uU(8," logged "),t.TgZ(9,"strong"),t._uU(10),t.qZA(),t._uU(11),t.ALo(12,"fromNow"),t.qZA()(),t.TgZ(13,"nz-list-item-meta-description"),t.ynx(14,13),t.YNc(15,et,3,8,"ng-template",14),t.YNc(16,tt,2,4,"ng-template",14),t.BQk(),t.qZA()()()),2&r){const O=x.$implicit;t.xp6(2),t.Q6J("nzSrc",O.avatar_url),t.xp6(1),t.Q6J("ngIf",!O.avatar_url),t.xp6(4),t.Oqu(O.user_name),t.xp6(3),t.Oqu(O.time_spent_text),t.xp6(1),t.AsE(" ",O.logged_by_timer?"via Timer":""," about ",t.lcZ(12,9,O.created_at)," "),t.xp6(3),t.Q6J("ngSwitch",!!O.logged_by_timer),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1)}}function $(r,x){if(1&r&&(t.TgZ(0,"nz-list",7),t.ynx(1),t.YNc(2,at,17,11,"nz-list-item",8),t.BQk(),t.qZA()),2&r){const O=t.oxw(2);t.Q6J("nzSize","small"),t.xp6(2),t.Q6J("ngForOf",O.timeLogs)}}function j(r,x){if(1&r&&(t.YNc(0,_t,1,0,"nz-empty",4),t.TgZ(1,"nz-skeleton",5),t.YNc(2,$,3,2,"nz-list",6),t.qZA()),2&r){const O=t.oxw();t.Q6J("ngIf",!O.timeLogs.length&&!O.loading),t.xp6(1),t.Q6J("nzLoading",O.loading)("nzActive",!0),t.xp6(1),t.Q6J("ngIf",O.timeLogs.length)}}const m0=function(){return{width:"450px"}};let O0=(()=>{var r;class x{constructor(i,o,q){this.api=i,this.cdr=o,this.auth=q,this.task={},this.cls="flex-row task-time-tracking justify-content-center",this.timeLogs=[],this.loading=!1,this.dateFormat="MMM d, y, h:mm:ss a"}format(i,o){const q="h[h] m[m] "+(o?"s[s]":"");return v1().utc(i.asMilliseconds()).format(i.hours()>0?q:"m[m] s[s]")}buildText(i){for(const o of i){const q=v1().duration(o.time_spent,"seconds");o.time_spent_text=this.format(q,o.logged_by_timer||!1)}}handleVisibleChange(i,o){var q=this;return(0,M.Z)(function*(){try{if(!o.id)return;if(i){q.loading=!0;const w=yield q.api.getByTask(o.id,q.auth.getCurrentSession()?.timezone_name?q.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone);if(w.done){const y0=w.body;q.buildText(y0),q.timeLogs=y0}}else q.timeLogs=[];q.loading=!1}catch{q.loading=!1}q.cdr.detectChanges()})()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(ne.L),t.Y36(t.sBO),t.Y36(V.e))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-timer"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:4,vars:7,consts:[["nz-popover","",1,"py-0",3,"nzPopoverTitle","nzPopoverTrigger","nzPopoverOverlayStyle","nzPopoverPlacement","nzPopoverContent","nzPopoverVisibleChange"],[3,"taskId","projectId","timerStartTime","changeListTime","changeListTimeToDefault",4,"ngIf"],["contentTemplate",""],[3,"taskId","projectId","timerStartTime","changeListTime","changeListTimeToDefault"],[4,"ngIf"],[3,"nzLoading","nzActive"],[3,"nzSize",4,"ngIf"],[3,"nzSize"],[4,"ngFor","ngForOf"],[1,"m-0"],[3,"nzSrc"],[3,"nzSize","nzText","background-color",4,"ngIf"],["nz-typography","",2,"font-weight","normal"],[3,"ngSwitch"],[3,"ngSwitchCase"],[3,"nzSize","nzText"]],template:function(i,o){if(1&i&&(t.TgZ(0,"div",0),t.NdJ("nzPopoverVisibleChange",function(w){return o.handleVisibleChange(w,o.task)}),t.YNc(1,ut,1,3,"worklenz-task-timer",1),t.YNc(2,j,3,4,"ng-template",null,2,t.W1O),t.qZA()),2&i){const q=t.MAs(3);t.Q6J("nzPopoverTitle","Time Tracking Log")("nzPopoverTrigger","click")("nzPopoverOverlayStyle",t.DdM(6,m0))("nzPopoverPlacement","bottomRight")("nzPopoverContent",q),t.xp6(1),t.Q6J("ngIf",o.task.id)}},dependencies:[h0.sg,h0.O5,h0.RF,h0.n9,X0.ZU,d.Dz,c0.ng,Le.D,Ke.lU,ke.p9,De.n_,De.AA,De.yi,De.IO,De.Pb,De.Vk,h0.uU,At.d,k1.I],changeDetection:0}),x})();var w0=s(52682),V0=s(76643),M1=s(75729);let A1=(()=>{var r;class x{constructor(i,o,q,w,y0,J0){this.socket=i,this.cdr=o,this.ngZone=q,this.service=w,this.renderer=y0,this.auth=J0,this.task={},this.cls="flex-row task-due-date",this.handleResponse=m1=>{m1.id===this.task.id&&this.task.start_date!==m1.start_date&&(this.task.start_date=m1.start_date,this.cdr.markForCheck())}}ngOnInit(){this.socket.on(g.C.TASK_START_DATE_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.TASK_START_DATE_CHANGE.toString(),this.handleResponse)}toggleHighlightCls(i,o){this.ngZone.runOutsideAngular(()=>{i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)})}handleStartDateChange(i,o){this.socket.emit(g.C.TASK_START_DATE_CHANGE.toString(),JSON.stringify({task_id:o.id,start_date:(0,v.A6)(i)||null,parent_task:o.parent_task_id,time_zone:this.auth.getCurrentSession()?.timezone_name?this.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone}))}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(R0.s),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(Z.b),t.Y36(t.Qsj),t.Y36(V.e))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-start-date"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:7,vars:10,consts:[[1,"editable","h-100","d-flex","w-100"],["elementStartDate",""],["nz-typography","",1,"date-text","w-100"],[1,"border-0","bg-transparent","w-100","task-list-date-picker",3,"ngModel","nzFormat","nzSuffixIcon","nzPlaceHolder","nzDisabledDate","ngModelChange","nzOnOpenChange"]],template:function(i,o){if(1&i){const q=t.EpF();t.TgZ(0,"div",0,1)(2,"span",2),t._uU(3),t.ALo(4,"dateFormatter"),t.qZA(),t.TgZ(5,"nz-date-picker",3),t.NdJ("ngModelChange",function(y0){return o.task.start_date=y0})("ngModelChange",function(y0){return o.handleStartDateChange(y0,o.task)})("nzOnOpenChange",function(y0){t.CHM(q);const J0=t.MAs(1);return t.KtG(o.toggleHighlightCls(y0,J0))}),t.ALo(6,"validateMaxDate"),t.qZA()()}2&i&&(t.xp6(3),t.Oqu(t.lcZ(4,6,o.task.start_date)),t.xp6(2),t.Q6J("ngModel",o.task.start_date)("nzFormat","MMM dd,yyyy")("nzSuffixIcon","")("nzPlaceHolder","Set a start date")("nzDisabledDate",t.lcZ(6,8,o.task.end_date)))},dependencies:[x0.JJ,x0.On,X0.ZU,w0.uw,V0.l,M1.z],styles:["nz-date-picker[_ngcontent-%COMP%]{max-width:150px;border-color:transparent!important;inset:0}nz-date-picker[_ngcontent-%COMP%]:hover{border-color:#d9d9d9!important}.editable[_ngcontent-%COMP%]{position:relative}.date-text[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:15px}"],changeDetection:0}),x})();var T1=s(47053);let S1=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1){this.socket=i,this.cdr=o,this.ngZone=q,this.service=w,this.renderer=y0,this.kanbanService=J0,this.auth=m1,this.task={},this.cls="flex-row task-due-date",this.handleResponse=d1=>{d1.id===this.task.id&&this.task.end_date!==d1.end_date&&(this.task.end_date=d1.end_date,this.kanbanService.emitRefreshGroups(),this.cdr.markForCheck())}}ngOnInit(){this.socket.on(g.C.TASK_END_DATE_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.TASK_END_DATE_CHANGE.toString(),this.handleResponse)}handleEndDateChange(i,o){this.socket.emit(g.C.TASK_END_DATE_CHANGE.toString(),JSON.stringify({task_id:o.id,end_date:(0,v.A6)(i)||null,parent_task:o.parent_task_id,time_zone:this.auth.getCurrentSession()?.timezone_name?this.auth.getCurrentSession()?.timezone_name:Intl.DateTimeFormat().resolvedOptions().timeZone}))}toggleHighlightCls(i,o){this.ngZone.runOutsideAngular(()=>{i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)})}checkForPastDate(i){return v1()(i).format("YYYY-MM-DD"){var r;class x{constructor(i,o){this.cdr=i,this.socket=o,this.task={},this.cls="flex-row task-description",this.handleResponse=q=>{this.task.id===q?.id&&(this.task.description=q.description,this.cdr.markForCheck())}}ngOnInit(){this.socket.on(g.C.TASK_DESCRIPTION_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.TASK_DESCRIPTION_CHANGE.toString(),this.handleResponse)}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(t.sBO),t.Y36(R0.s))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-description"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:2,vars:5,consts:[[3,"innerHTML"]],template:function(i,o){1&i&&(t._UZ(0,"span",0),t.ALo(1,"nzEllipsis")),2&i&&t.Q6J("innerHTML",t.Dn7(1,1,o.task.description,50,"..."),t.oJD)},dependencies:[R1.N7],changeDetection:0}),x})();var I1=s(66432);function D1(r,x){if(1&r&&(t.TgZ(0,"nz-option",3),t.ALo(1,"truncateIfLong"),t._UZ(2,"nz-badge",4),t.ALo(3,"safeString"),t.qZA()),2&r){const O=x.$implicit;t.Q6J("nzValue",O.id)("nzLabel",t.xi3(1,4,O.name,12)),t.xp6(2),t.Q6J("nzColor",t.lcZ(3,7,O.color_code))("nzText",(null==O?null:O.name)||null)}}let xe=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1){this.service=i,this.socket=o,this.cdr=q,this.ngZone=w,this.element=y0,this.renderer=J0,this.kanbanService=m1,this.task={},this.cls="flex-row task-phase",this.PHASE_COLOR="#a9a9a9"+E.Yj,this.PLACEHOLDER_COLOR="rgba(0, 0, 0, 0.85) !important",this.phases=[],this.loading=!1,this.handleResponse=d1=>{d1&&d1.task_id===this.task.id&&(this.task.phase_color=d1.color_code||void 0,this.task.phase_id=d1.id,this.isGroupByPhase()&&(this.task.is_sub_task||this.service.updateTaskGroup(this.task,!1),this.service.isSubtasksIncluded&&this.service.emitRefreshSubtasksIncluded()),this.kanbanService.emitRefreshGroups(),this.cdr.markForCheck())},this.service.onPhaseChange$.pipe((0,N.sL)()).subscribe(()=>{this.updatePhases(),this.cdr.markForCheck()}),this.service.onGroupChange$.pipe((0,B.h)(d1=>d1.taskId===this.task.id),(0,B.h)(()=>this.isGroupByPhase()),(0,N.sL)()).subscribe(d1=>{"Unmapped"===d1.groupId&&(d1.color=""),this.task.phase_id=d1.groupId,this.task.phase_color=d1.color.slice(0,-2),this.cdr.markForCheck()})}ngOnInit(){this.updatePhases(),this.socket.on(g.C.TASK_PHASE_CHANGE.toString(),this.handleResponse)}ngOnDestroy(){this.socket.removeListener(g.C.TASK_PHASE_CHANGE.toString(),this.handleResponse)}isGroupByPhase(){return this.service.getCurrentGroup().value===this.service.GROUP_BY_PHASE_VALUE}trackById(i,o){return o.id}handleChange(i,o){o&&this.socket.emit(g.C.TASK_PHASE_CHANGE.toString(),{task_id:o,phase_id:i,parent_task:this.task.parent_task_id})}updatePhases(){this.phases=this.service.phases}toggleHighlightCls(i,o){this.ngZone.runOutsideAngular(()=>{i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)})}handleOpen(i){this.toggleHighlightCls(i,this.element.nativeElement)}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(Z.b),t.Y36(R0.s),t.Y36(t.sBO),t.Y36(t.R0b),t.Y36(t.SBq),t.Y36(t.Qsj),t.Y36(D0.m))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-phase"]],hostVars:2,hostBindings:function(i,o){2&i&&t.Tol(o.cls)},inputs:{task:"task"},decls:3,vars:9,consts:[[1,"py-0"],["nzAllowClear","",1,"rounded-pill","custom-select",3,"ngModel","nzLoading","nzDropdownMatchSelectWidth","nzSize","nzPlaceHolder","ngModelChange","nzOpenChange"],["nzCustomContent","",3,"nzValue","nzLabel",4,"ngFor","ngForOf","ngForTrackBy"],["nzCustomContent","",3,"nzValue","nzLabel"],[3,"nzColor","nzText"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"nz-select",1),t.NdJ("ngModelChange",function(w){return o.task.phase_id=w})("ngModelChange",function(w){return o.handleChange(w,o.task.id)})("nzOpenChange",function(w){return o.handleOpen(w)}),t.YNc(2,D1,4,9,"nz-option",2),t.qZA()()),2&i&&(t.xp6(1),t.Udp("background-color",o.task.phase_color+"69"),t.Q6J("ngModel",o.task.phase_id)("nzLoading",o.loading)("nzDropdownMatchSelectWidth",!1)("nzSize","small")("nzPlaceHolder","Select"),t.xp6(1),t.Q6J("ngForOf",o.phases)("ngForTrackBy",o.trackById))},dependencies:[h0.sg,x0.JJ,x0.On,L.x7,u0.Ip,u0.Vq,W0.m,I1.z],changeDetection:0}),x})();var ze=s(91607),nt=s(55736);function Ie(r,x){1&r&&t._UZ(0,"div",18)}function oe(r,x){1&r&&(t.TgZ(0,"div",19),t._UZ(1,"span",16),t.qZA()),2&r&&(t.xp6(1),t.Q6J("nzType","holder")("nzTheme","outline"))}function y1(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",20)(2,"nz-tag",21),t.ALo(3,"safeString"),t._uU(4),t.ALo(5,"ellipsis"),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(2),t.Q6J("nzTooltipTitle",t.lcZ(3,2,O.task.task_key)),t.xp6(2),t.hij(" ",t.xi3(5,4,O.task.task_key,10)," ")}}function J1(r,x){if(1&r&&(t._UZ(0,"span",28),t.ALo(1,"subTasksArrowIcon")),2&r){const O=t.oxw(3);t.Q6J("nzType",t.lcZ(1,2,O.task.show_sub_tasks))("nzTheme","outline")}}function Fe(r,x){1&r&&t._UZ(0,"span",29),2&r&&t.Q6J("nzType","loading")}function Ae(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",24),t.NdJ("click",function(o){t.CHM(O);const q=t.oxw(2);return o.stopPropagation(),t.KtG(q.openSubTasks())}),t.ynx(1),t.TgZ(2,"span",25),t.ALo(3,"subTasksArrowColor"),t.YNc(4,J1,2,4,"span",26),t.YNc(5,Fe,1,1,"span",27),t.qZA(),t.BQk(),t.qZA()}if(2&r){const O=t.oxw(2);t.xp6(2),t.Udp("color",t.lcZ(3,6,O.task)),t.ekj("hidden-arrow",!O.Number(O.task.sub_tasks_count)&&!O.task.show_sub_tasks),t.xp6(2),t.Q6J("ngIf",!O.task.sub_tasks_loading),t.xp6(1),t.Q6J("ngIf",O.task.sub_tasks_loading)}}function X1(r,x){if(1&r&&(t.TgZ(0,"div",22),t.YNc(1,Ae,6,8,"div",23),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngIf",!O.task.is_sub_task)}}function H1(r,x){1&r&&(t.TgZ(0,"small",40),t._UZ(1,"span",16),t.qZA()),2&r&&(t.Q6J("nzType","secondary"),t.xp6(1),t.Q6J("nzType","double-right")("nzTheme","outline"))}function ee(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",38),t.NdJ("click",function(o){t.CHM(O);const q=t.oxw(2),w=t.MAs(11);return t.KtG(q.onTaskNameClick(o,w,q.task))}),t.ALo(1,"safeString"),t.YNc(2,H1,2,3,"small",39),t._uU(3),t.qZA()}if(2&r){const O=t.oxw(2);t.ekj("text-decoration-line-through",O.task.is_complete||O.task.completed_at),t.Q6J("nzTooltipMouseEnterDelay",.5)("nzTooltipTitle",t.lcZ(1,6,O.task.name)),t.xp6(2),t.Q6J("ngIf",O.task.is_sub_task),t.xp6(1),t.hij(" ",O.task.name," \xa0 ")}}function te(r,x){1&r&&(t.TgZ(0,"span",41),t._UZ(1,"span",42),t.qZA())}function C1(r,x){1&r&&(t.TgZ(0,"span",41),t._UZ(1,"span",43),t.qZA())}function ue(r,x){1&r&&(t.TgZ(0,"span",41),t._UZ(1,"span",44),t.qZA())}function ie(r,x){1&r&&(t.TgZ(0,"span",45),t._UZ(1,"span",46),t.qZA()),2&r&&t.Q6J("nzTooltipTitle","This is a recurring task")("nzTooltipMouseEnterDelay",1)}function ge(r,x){1&r&&(t.TgZ(0,"span",47),t._UZ(1,"span",48),t.qZA())}function Ne(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"nz-tag",49),t.NdJ("click",function(o){t.CHM(O);const q=t.oxw(2);return o.stopPropagation(),t.KtG(q.openSubTasks())}),t.TgZ(1,"span",50),t._uU(2),t._UZ(3,"span",51),t.qZA()()}if(2&r){const O=t.oxw(2);t.Q6J("nzColor","default"),t.xp6(2),t.hij(" ",O.task.sub_tasks_count," "),t.xp6(1),t.Q6J("nzType","double-right")("nzTheme","outline")}}function $e(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",30),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.openTask(o.task))}),t.TgZ(1,"div",31)(2,"div"),t.YNc(3,ee,4,8,"div",32),t.qZA(),t.TgZ(4,"div",33),t.YNc(5,te,2,0,"span",34),t.YNc(6,C1,2,0,"span",34),t.YNc(7,ue,2,0,"span",34),t.YNc(8,ie,2,2,"span",35),t.YNc(9,ge,2,0,"span",36),t.YNc(10,Ne,4,4,"nz-tag",37),t.qZA()()()}if(2&r){const O=t.oxw();t.xp6(3),t.Q6J("ngIf",O.editId!==O.task.id),t.xp6(2),t.Q6J("ngIf",O.task.comments_count),t.xp6(1),t.Q6J("ngIf",O.task.has_subscribers),t.xp6(1),t.Q6J("ngIf",O.task.attachments_count),t.xp6(1),t.Q6J("ngIf",O.task.has_dependencies),t.xp6(1),t.Q6J("ngIf",O.task.schedule_id),t.xp6(1),t.Q6J("ngIf",!O.task.is_sub_task&&!O.service.isSubtasksIncluded)}}function Nt(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"input",52),t.NdJ("focus",function(){t.CHM(O);const o=t.oxw(),q=t.MAs(8),w=t.MAs(11);return o.selectCol(q),t.KtG(o.selectCol(w))})("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.task.name=o)})("blur",function(){t.CHM(O);const o=t.oxw(),q=t.MAs(8),w=t.MAs(11);return o.handleNameChange(o.task),o.deselectCol(q),t.KtG(o.deselectCol(w))})("keydown.enter",function(){t.CHM(O);const o=t.oxw(),q=t.MAs(8),w=t.MAs(11);return o.handleNameChange(o.task),o.deselectCol(q),t.KtG(o.deselectCol(w))}),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("ngModel",O.task.name)("nzBorderless",!0)}}function Xt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-description",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Wt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-progress",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function St(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-members",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Tt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-labels",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function vt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-phase",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Rt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-status",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function yt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-priority",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Ct(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-timer",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Zt(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",54)(2,"div",55),t._uU(3),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(3),t.hij(" ",O.task.total_time_string," ")}}function bt(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-start-date",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function Se(r,x){if(1&r&&(t.ynx(0),t._UZ(1,"worklenz-task-list-end-date",53),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function on(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",56)(2,"div",57),t._uU(3),t.ALo(4,"fromNow"),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(3),t.hij(" ",t.lcZ(4,1,O.task.completed_at)||"-"," ")}}function Ut(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",58)(2,"div",57),t._uU(3),t.ALo(4,"fromNow"),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(3),t.hij(" ",t.lcZ(4,1,O.task.created_at)||"-"," ")}}function Bt(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",59)(2,"div",57),t._uU(3),t.ALo(4,"fromNow"),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(3),t.hij(" ",t.lcZ(4,1,O.task.updated_at)||"-"," ")}}function pn(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div",59)(2,"div",57),t._uU(3),t.qZA()(),t.BQk()),2&r){const O=t.oxw();t.xp6(3),t.hij(" ",O.task.reporter," ")}}function qt(r,x){if(1&r&&(t.TgZ(0,"div",60),t._UZ(1,"worklenz-task-list-status",53),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function _(r,x){if(1&r&&(t.TgZ(0,"div",60),t._UZ(1,"worklenz-task-list-priority",53),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}function F(r,x){if(1&r&&(t.TgZ(0,"div",60),t._UZ(1,"worklenz-task-list-phase",53),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("task",O.task)}}let A=(()=>{var r;class x{get id(){return this.task.id}constructor(i,o,q,w,y0,J0,m1,d1,N1){this.element=i,this.renderer=o,this.service=q,this.cdr=w,this.socket=y0,this.map=J0,this.ngZone=m1,this.view=d1,this.utils=N1,this.cls="position-relative task-row",this.onShowSubTasks=new t.vpe,this.onOpenTask=new t.vpe,this.highlight="highlight-col",this.Number=Number,this.editId=null,this.selected=!1,this.keyActive=!1,this.descriptionActive=!1,this.progressActive=!1,this.assigneesActive=!1,this.labelsActive=!1,this.phaseActive=!1,this.statusActive=!1,this.priorityActive=!1,this.timeTrackingActive=!1,this.estimationActive=!1,this.startDateActive=!1,this.dueDateActive=!1,this.completedDateActive=!1,this.createdDateActive=!1,this.lastUpdatedActive=!1,this.reporterActive=!1,this.handleNameChangeResponse=c1=>{c1&&this.id===c1.id&&this.task&&this.task.name!=c1.name&&(this.task.name=c1.name,this.markForCheck())},this.handleEstimationChangeResponse=c1=>{c1.id===this.id&&(this.task.total_time_string=c1.total_time_string,this.cdr.markForCheck())},this.subscriberChange=(c1,ot)=>{c1&&this.id===c1&&(this.task.has_subscribers=!(0==ot||ot<0),this.cdr.markForCheck())},this.handleCompletedAt=c1=>{c1.id&&this.id===c1.id&&(this.task.completed_at=c1.completed_at)},this.service.onColumnsChange$.pipe((0,N.sL)()).subscribe(()=>{this.markForCheck(),this.updateState()}),(0,J.T)(this.map.onSelect$.pipe((0,B.h)(c1=>c1.id===this.id),(0,B.h)(()=>!this.selected)),this.map.onDeselect$.pipe((0,B.h)(c1=>c1.id===this.id),(0,B.h)(()=>this.selected)),this.map.onDeselectAll$.pipe((0,B.h)(()=>this.selected))).pipe((0,N.sL)()).subscribe(c1=>{this.selected=!this.selected,this.toggleSelection(),this.markForCheck()}),this.view.onCommentsChange.pipe((0,B.h)(c1=>c1.task===this.task.id),(0,N.sL)()).subscribe(c1=>{this.task.comments_count=c1.count,this.cdr.markForCheck()}),this.view.onAttachmentsChange.pipe((0,B.h)(c1=>c1.task===this.task.id),(0,N.sL)()).subscribe(c1=>{this.task.attachments_count=c1.count,this.cdr.markForCheck()}),this.view.onTaskSubscriberChange$.pipe((0,N.sL)()).subscribe(c1=>{this.subscriberChange(c1.taskId,c1.subscribers)}),this.view.onRecurringChange.pipe((0,B.h)(c1=>c1.task_id===this.task.id),(0,N.sL)()).subscribe(c1=>{this.task.schedule_id=c1.id,this.cdr.markForCheck()})}toggleSelection(){this.ngZone.runOutsideAngular(()=>{const i="selected",o=this.element.nativeElement;this.selected?this.renderer.addClass(o,i):this.renderer.removeClass(o,i)})}ngOnInit(){this.updateState(),this.registerSocketEvents(),this.socket.on(g.C.TASK_STATUS_CHANGE.toString(),this.handleCompletedAt)}ngOnDestroy(){this.unregisterSocketEvents(),this.socket.removeListener(g.C.TASK_STATUS_CHANGE.toString(),this.handleCompletedAt)}updateState(){this.keyActive=this.active(this.service.COLUMN_KEYS.KEY),this.descriptionActive=this.active(this.service.COLUMN_KEYS.DESCRIPTION),this.progressActive=this.active(this.service.COLUMN_KEYS.PROGRESS),this.assigneesActive=this.active(this.service.COLUMN_KEYS.ASSIGNEES),this.labelsActive=this.active(this.service.COLUMN_KEYS.LABELS),this.statusActive=this.active(this.service.COLUMN_KEYS.STATUS),this.priorityActive=this.active(this.service.COLUMN_KEYS.PRIORITY),this.timeTrackingActive=this.active(this.service.COLUMN_KEYS.TIME_TRACKING),this.estimationActive=this.active(this.service.COLUMN_KEYS.ESTIMATION),this.startDateActive=this.active(this.service.COLUMN_KEYS.START_DATE),this.dueDateActive=this.active(this.service.COLUMN_KEYS.DUE_DATE),this.completedDateActive=this.active(this.service.COLUMN_KEYS.COMPLETED_DATE),this.createdDateActive=this.active(this.service.COLUMN_KEYS.CREATED_DATE),this.lastUpdatedActive=this.active(this.service.COLUMN_KEYS.LAST_UPDATED),this.reporterActive=this.active(this.service.COLUMN_KEYS.REPORTER),this.phaseActive=this.active(this.service.COLUMN_KEYS.PHASE)}registerSocketEvents(){this.socket.on(g.C.TASK_NAME_CHANGE.toString(),this.handleNameChangeResponse),this.socket.on(g.C.TASK_TIME_ESTIMATION_CHANGE.toString(),this.handleEstimationChangeResponse)}unregisterSocketEvents(){this.socket.removeListener(g.C.TASK_NAME_CHANGE.toString(),this.handleNameChangeResponse),this.socket.removeListener(g.C.TASK_TIME_ESTIMATION_CHANGE.toString(),this.handleEstimationChangeResponse)}active(i){return this.service.canActive(i)}onContextMenu(i){this.service.emitOnContextMenu(i,this.task)}focus(i){setTimeout(()=>{i.querySelector("input")?.focus()})}onCheckChange(i){i?this.map.selectTask(this.task):this.map.deselectTask(this.task),this.toggleSelection()}openSubTasks(){this.onShowSubTasks?.emit(this.task),c.s.track(n.r5)}openTask(i){this.onOpenTask?.emit(i),c.s.track(n.r5)}selectCol(i){i.classList.contains(this.highlight)||i.classList.add(this.highlight)}deselectCol(i){i.classList.remove(this.highlight),this.editId=null}handleNameChange(i){i&&(this.socket.emit(g.C.TASK_NAME_CHANGE.toString(),JSON.stringify({task_id:i.id,name:i.name,parent_task:this.task.parent_task_id})),this.editId=null)}onTaskNameClick(i,o,q){i.stopPropagation(),this.focus(o),this.editId=q.id||null}markForCheck(){this.cdr.markForCheck()}detectChanges(){this.cdr.detectChanges()}onDragStart(){this.map.deselectAll(),this.detectChanges()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(t.SBq),t.Y36(t.Qsj),t.Y36(Z.b),t.Y36(t.sBO),t.Y36(R0.s),t.Y36(Z0.g),t.Y36(t.R0b),t.Y36(T0.f),t.Y36(p0.F))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-row"]],hostVars:2,hostBindings:function(i,o){1&i&&t.NdJ("contextmenu",function(w){return o.onContextMenu(w)}),2&i&&t.Tol(o.cls)},inputs:{task:"task"},outputs:{onShowSubTasks:"onShowSubTasks",onOpenTask:"onOpenTask"},decls:36,vars:35,consts:[["cdkDrag","",1,"flex-table","rows",3,"ngClass","cdkDragData","cdkDragLockAxis","cdkDragBoundary","cdkDragStarted"],["class","task-placeholder",4,"cdkDragPlaceholder"],["cdkDragHandle","",1,"flex-row","task-drag-handler",3,"cdkDragHandleDisabled"],["class","drag-handle",4,"ngIf"],[1,"flex-row","task-check"],["nz-checkbox","",1,"p-0",3,"nzChecked","nzCheckedChange"],[4,"ngIf"],[1,"flex-row","task-arrow"],["tr0",""],["class","p-0 border-end-0",4,"ngIf"],[1,"flex-row","task-name"],["tr1",""],[1,"inner-task-name-container"],["class","editable-cell pointer-text ps-1 w-100",3,"click",4,"ngIf"],["nz-input","","class","ps-1 name-input","style","min-width: 365px; max-width: 365px;",3,"ngModel","nzBorderless","focus","ngModelChange","blur","keydown.enter",4,"ngIf"],["nz-tooltip","","nz-button","",1,"plus-icon","px-1",3,"nzTooltipTitle","nzTooltipPlacement","nzTooltipMouseEnterDelay","nzType","click"],["nz-icon","",3,"nzType","nzTheme"],["class","d-none visibility-hidden opacity-0",4,"ngIf"],[1,"task-placeholder"],[1,"drag-handle"],[1,"flex-row","task-key"],["nz-tooltip","",1,"m-0",3,"nzTooltipTitle"],[1,"p-0","border-end-0"],["class","d-flex align-items-center justify-content-center sub-tasks-arrow dropdown-highlight",3,"click",4,"ngIf"],[1,"d-flex","align-items-center","justify-content-center","sub-tasks-arrow","dropdown-highlight",3,"click"],[1,"align-items-center","align-self-center","cursor-pointer","d-flex","sub-arrow"],["style","font-size: 12px","nz-icon","",3,"nzType","nzTheme",4,"ngIf"],["nz-icon","",3,"nzType",4,"ngIf"],["nz-icon","",2,"font-size","12px",3,"nzType","nzTheme"],["nz-icon","",3,"nzType"],[1,"editable-cell","pointer-text","ps-1","w-100",3,"click"],[1,"d-flex","w-100"],["nz-tooltip","","class","task-name-text",3,"nzTooltipMouseEnterDelay","nzTooltipTitle","text-decoration-line-through","click",4,"ngIf"],[1,"inner-icon-cont"],["nz-typography","","nzType","secondary",4,"ngIf"],["nz-typography","","nzType","secondary","nz-tooltip","",3,"nzTooltipTitle","nzTooltipMouseEnterDelay",4,"ngIf"],["nz-typography","","nzType","secondary","nz-tooltip","",4,"ngIf"],["class","me-1 px-1 double-arrow",3,"nzColor","click",4,"ngIf"],["nz-tooltip","",1,"task-name-text",3,"nzTooltipMouseEnterDelay","nzTooltipTitle","click"],["nz-typography","",3,"nzType",4,"ngIf"],["nz-typography","",3,"nzType"],["nz-typography","","nzType","secondary"],["nz-icon","","nzType","comment","nzTheme","outline"],["nz-icon","","nzType","eye","nzTheme","outline"],["nz-icon","","nzType","paper-clip","nzTheme","outline"],["nz-typography","","nzType","secondary","nz-tooltip","",3,"nzTooltipTitle","nzTooltipMouseEnterDelay"],["nz-icon","","nzType","minus-circle","nzTheme","outline"],["nz-typography","","nzType","secondary","nz-tooltip",""],["nz-icon","","nzType","retweet","nzTheme","outline"],[1,"me-1","px-1","double-arrow",3,"nzColor","click"],[2,"color","#6d6e6f"],["nz-icon","",2,"font-size","10px",3,"nzType","nzTheme"],["nz-input","",1,"ps-1","name-input",2,"min-width","365px","max-width","365px",3,"ngModel","nzBorderless","focus","ngModelChange","blur","keydown.enter"],[3,"task"],[1,"flex-row","task-estimation","justify-content-center"],[1,"task-due-label","py-0"],[1,"flex-row","task-completed-date"],[1,"py-0"],[1,"flex-row","task-created-date"],[1,"flex-row","task-update-date"],[1,"d-none","visibility-hidden","opacity-0"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0),t.NdJ("cdkDragStarted",function(){return o.onDragStart()}),t.YNc(1,Ie,1,0,"div",1),t.TgZ(2,"div",2),t.YNc(3,oe,2,2,"div",3),t.qZA(),t.TgZ(4,"div",4)(5,"span",5),t.NdJ("nzCheckedChange",function(w){return o.selected=w})("nzCheckedChange",function(w){return o.onCheckChange(w)}),t.qZA()(),t.YNc(6,y1,6,7,"ng-container",6),t.TgZ(7,"div",7,8),t.YNc(9,X1,2,1,"div",9),t.qZA(),t.TgZ(10,"div",10,11)(12,"div",12),t.YNc(13,$e,11,7,"div",13),t.YNc(14,Nt,1,2,"input",14),t.TgZ(15,"button",15),t.NdJ("click",function(){return o.openTask(o.task)}),t._UZ(16,"span",16),t._uU(17," Open "),t.qZA()()(),t.YNc(18,Xt,2,1,"ng-container",6),t.YNc(19,Wt,2,1,"ng-container",6),t.YNc(20,St,2,1,"ng-container",6),t.YNc(21,Tt,2,1,"ng-container",6),t.YNc(22,vt,2,1,"ng-container",6),t.YNc(23,Rt,2,1,"ng-container",6),t.YNc(24,yt,2,1,"ng-container",6),t.YNc(25,Ct,2,1,"ng-container",6),t.YNc(26,Zt,4,1,"ng-container",6),t.YNc(27,bt,2,1,"ng-container",6),t.YNc(28,Se,2,1,"ng-container",6),t.YNc(29,on,5,3,"ng-container",6),t.YNc(30,Ut,5,3,"ng-container",6),t.YNc(31,Bt,5,3,"ng-container",6),t.YNc(32,pn,4,1,"ng-container",6),t.YNc(33,qt,2,1,"div",17),t.YNc(34,_,2,1,"div",17),t.YNc(35,F,2,1,"div",17),t.qZA()),2&i&&(t.Q6J("ngClass",o.task.is_sub_task?"subtask":"main-task")("cdkDragData",o.task)("cdkDragLockAxis","y")("cdkDragBoundary",".tasks-wrapper"),t.xp6(2),t.Q6J("cdkDragHandleDisabled",!!o.task.parent_task_id),t.xp6(1),t.Q6J("ngIf",!o.task.parent_task_id),t.xp6(2),t.Q6J("nzChecked",o.selected),t.xp6(1),t.Q6J("ngIf",o.keyActive),t.xp6(3),t.Q6J("ngIf",!o.service.isSubtasksIncluded),t.xp6(4),t.Q6J("ngIf",o.editId!==o.task.id),t.xp6(1),t.Q6J("ngIf",o.editId===o.task.id),t.xp6(1),t.Q6J("nzTooltipTitle","Click open task form")("nzTooltipPlacement","top")("nzTooltipMouseEnterDelay",2)("nzType","text"),t.xp6(1),t.Q6J("nzType","expand-alt")("nzTheme","outline"),t.xp6(2),t.Q6J("ngIf",o.descriptionActive),t.xp6(1),t.Q6J("ngIf",o.progressActive),t.xp6(1),t.Q6J("ngIf",o.assigneesActive),t.xp6(1),t.Q6J("ngIf",o.labelsActive),t.xp6(1),t.Q6J("ngIf",o.phaseActive),t.xp6(1),t.Q6J("ngIf",o.statusActive),t.xp6(1),t.Q6J("ngIf",o.priorityActive),t.xp6(1),t.Q6J("ngIf",o.timeTrackingActive),t.xp6(1),t.Q6J("ngIf",o.estimationActive),t.xp6(1),t.Q6J("ngIf",o.startDateActive),t.xp6(1),t.Q6J("ngIf",o.dueDateActive),t.xp6(1),t.Q6J("ngIf",o.completedDateActive),t.xp6(1),t.Q6J("ngIf",o.createdDateActive),t.xp6(1),t.Q6J("ngIf",o.lastUpdatedActive),t.xp6(1),t.Q6J("ngIf",o.reporterActive),t.xp6(1),t.Q6J("ngIf",!o.statusActive),t.xp6(1),t.Q6J("ngIf",!o.priorityActive),t.xp6(1),t.Q6J("ngIf",!o.phaseActive))},dependencies:[h0.mk,h0.O5,x0.Fj,x0.JJ,x0.On,O1.ix,N0.w,M0.dQ,H0.Ls,e0.Ie,X0.ZU,m.Zp,K.SY,e.Zt,e.Bh,$0.j,e.Hk,x1,st,Ue,_0,t1,O0,A1,S1,W1,xe,u1.p,At.d,W0.m,ze.g,nt.U],styles:["[_nghost-%COMP%]{position:relative;display:table-row;vertical-align:inherit;border-color:inherit;-webkit-user-select:none;user-select:none}[_nghost-%COMP%]:hover .plus-icon[_ngcontent-%COMP%]{display:block}[_nghost-%COMP%]:hover td[_ngcontent-%COMP%]{background:#ecf0f3}[_nghost-%COMP%]:hover .hidden-arrow[_ngcontent-%COMP%]{display:flex!important}.hidden-arrow[_ngcontent-%COMP%]{display:none!important}.dropdown-highlight[_ngcontent-%COMP%]:hover{background-color:#d0eefa54;border:#5587f5 1px solid;border-radius:3px}.plus-icon[_ngcontent-%COMP%]{display:none;position:absolute;right:0;z-index:1;top:0;bottom:0;height:100%}.expanded[_ngcontent-%COMP%]{transform:rotate(-90deg)}.sub-tasks-arrow[_ngcontent-%COMP%]{position:relative;cursor:pointer;left:3px;width:16px;padding:2px;border:1px solid transparent;z-index:1}.sub-tasks-arrow[_ngcontent-%COMP%] .sub-arrow[_ngcontent-%COMP%]{width:10px;height:10px;color:#191919;margin-left:-2px}.task-name-text[_ngcontent-%COMP%]{border:1px solid transparent;padding-left:2px;border-radius:4px}.task-name-text[_ngcontent-%COMP%]:hover{border:1px solid #d9d9d9}.task-name[_ngcontent-%COMP%]{border:1px solid transparent}.task-name[_ngcontent-%COMP%]:hover{cursor:text;background:#fff;border-radius:4px}.highlight-col[_ngcontent-%COMP%]{border:1px solid #1890ff!important}.highlight-col[_ngcontent-%COMP%] nz-date-picker[_ngcontent-%COMP%]{box-shadow:none}.editable[_ngcontent-%COMP%] .add-button[_ngcontent-%COMP%]{visibility:hidden}.editable[_ngcontent-%COMP%]:hover .add-button[_ngcontent-%COMP%]{visibility:visible}.ant-popover[_ngcontent-%COMP%]{width:500px}.flex-table[_ngcontent-%COMP%]{display:flex}.rows[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{padding:3px 12px;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;background:white;display:flex;align-items:center;max-height:50px;border-radius:0}.rows[_ngcontent-%COMP%]:hover .flex-row[_ngcontent-%COMP%]{background:#f8f7f9}.subtask[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{background:#fcfcfc}.task-check[_ngcontent-%COMP%]{text-align:center;padding:8px 6px 8px 0!important;border-left:none;position:sticky;left:24px;z-index:1}.task-arrow[_ngcontent-%COMP%]{width:24px;min-width:24px;padding:8px 11px 8px 2px!important;border-right:none!important;position:sticky;left:47px;z-index:1}.task-arrow.highlight-col[_ngcontent-%COMP%]{border-top:1px solid #188fff!important;border-left:1px solid #188fff!important;border-bottom:1px solid #188fff!important}.task-name[_ngcontent-%COMP%]{width:450px;min-width:450px;position:sticky;left:71px;z-index:1;border-radius:0;padding-right:65px!important}.task-name.highlight-col[_ngcontent-%COMP%]{border-top:1px solid #188fff!important;border-right:1px solid #188fff!important;border-bottom:1px solid #188fff!important;border-left:none!important}.task-name.left-0[_ngcontent-%COMP%]{left:47px}.task-key[_ngcontent-%COMP%]{width:85px;min-width:85px;padding-left:4px!important;padding-right:4px!important;justify-content:center}.task-key[_ngcontent-%COMP%] nz-tag[_ngcontent-%COMP%]{padding-left:4px;padding-right:4px;max-width:80px;text-overflow:ellipsis;overflow:hidden}.task-description[_ngcontent-%COMP%]{width:225px;min-width:225px;overflow:hidden;display:grid!important}.task-progress[_ngcontent-%COMP%]{width:80px;min-width:80px}.task-labels[_ngcontent-%COMP%]{padding:0!important}.task-labels[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]{padding:6px 11px;align-items:center;display:flex}.task-members[_ngcontent-%COMP%]{padding:0!important}.task-members[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]{padding:6px 11px;align-items:center;display:flex}.task-members[_ngcontent-%COMP%]{width:160px;min-width:160px}.task-labels[_ngcontent-%COMP%]{width:220px;min-width:220px}.task-status[_ngcontent-%COMP%]{width:120px;min-width:120px}.task-phase[_ngcontent-%COMP%]{width:150px;min-width:150px}.task-priority[_ngcontent-%COMP%], .task-time-tracking[_ngcontent-%COMP%], .task-estimation[_ngcontent-%COMP%]{width:120px;min-width:120px}.task-start-date[_ngcontent-%COMP%], .task-due-date[_ngcontent-%COMP%], .task-completed-date[_ngcontent-%COMP%], .task-created-date[_ngcontent-%COMP%], .task-update-date[_ngcontent-%COMP%]{width:150px;min-width:150px}.task-due-date[_ngcontent-%COMP%]{padding:0!important}.task-due-date[_ngcontent-%COMP%] .editable[_ngcontent-%COMP%]{align-items:center;display:flex}.task-drag-handler[_ngcontent-%COMP%]{padding:0 0 0 4px!important;width:24px;min-width:24px;border-right:none!important;position:sticky;left:0;z-index:1;background-color:#fff}.drag-handle[_ngcontent-%COMP%]{cursor:grab;opacity:.8}.drag-handle[_ngcontent-%COMP%]:hover span[_ngcontent-%COMP%]{color:#1890ff}.drag-handle[_ngcontent-%COMP%]:active{cursor:grabbing}.task-name-text[_ngcontent-%COMP%]{width:100%;-webkit-line-clamp:1;display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.inner-icon-cont[_ngcontent-%COMP%]{width:max-content;display:flex;justify-content:flex-end;align-items:center;column-gap:4px}.name-input[_ngcontent-%COMP%]{padding:5px 12px;border-left:1px solid transparent}.double-arrow[_ngcontent-%COMP%]{line-height:16px;border:none;cursor:pointer}.task-placeholder[_ngcontent-%COMP%]{width:100%;height:42px;border:1px dashed #d9d9d9;background:#fafafa}.v-line[_ngcontent-%COMP%]{background-color:#188fff!important;position:absolute;inset:0 -5px 0 0;width:1px;margin:auto}"],changeDetection:0}),x})();var a=s(78645),h=s(59773),P=s(19035);const K0=["labelsSelect"];function s1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",34),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw();return t.KtG(w.changeStatus(q.id))}),t._UZ(1,"nz-badge",35),t.ALo(2,"safeString"),t.qZA()}if(2&r){const O=x.$implicit;t.xp6(1),t.Q6J("nzColor",t.lcZ(2,2,O.color_code))("nzText",(null==O?null:O.name)||null)}}function f1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",34),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw();return t.KtG(w.changePriority(q.id))}),t._UZ(1,"nz-badge",35),t.ALo(2,"safeString"),t.qZA()}if(2&r){const O=x.$implicit;t.xp6(1),t.Q6J("nzColor",t.lcZ(2,2,O.color_code))("nzText",(null==O?null:O.name)||null)}}function E1(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",34),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw();return t.KtG(w.changePhase(q.id))}),t._UZ(1,"nz-badge",35),t.ALo(2,"safeString"),t.qZA()}if(2&r){const O=x.$implicit;t.xp6(1),t.Q6J("nzColor",t.lcZ(2,2,O.color_code))("nzText",(null==O?null:O.name)||null)}}function Oe(r,x){if(1&r&&t._UZ(0,"span",4),2&r){const O=t.oxw();t.Q6J("nzType",O.changingStatus?"loading":"retweet")}}function V1(r,x){1&r&&(t.TgZ(0,"span"),t._uU(1,"Change label"),t.qZA())}function K1(r,x){1&r&&(t.TgZ(0,"div")(1,"p",38),t._uU(2,"No labels available!"),t.qZA(),t.TgZ(3,"small"),t._uU(4,"Labels can be created while updating or creating tasks."),t.qZA()())}function Y1(r,x){if(1&r&&(t.ynx(0,36),t.YNc(1,V1,2,0,"span",37),t.YNc(2,K1,5,0,"div",37),t.BQk()),2&r){const O=t.oxw();t.Q6J("ngSwitch",!!O.service.labels.length),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1)}}function Je(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",41),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)}),t._UZ(1,"nz-badge",35),t.ALo(2,"safeString"),t.qZA()}if(2&r){const O=x.$implicit;t.Q6J("nzChecked",O.selected),t.xp6(1),t.Q6J("nzColor",t.lcZ(2,3,O.color_code))("nzText",(null==O?null:O.name)||null)}}function We(r,x){if(1&r&&(t.TgZ(0,"ul",39),t.YNc(1,Je,3,5,"li",40),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngForOf",O.service.labels)}}function He(r,x){1&r&&(t.TgZ(0,"small",42),t._uU(1,"Hit enter to create!"),t.qZA())}function Ft(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",26),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.bulkAssignLabel())}),t.TgZ(1,"button",27),t._uU(2," Apply "),t.qZA()()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("nzLoading",O.assigningLabel)}}function $t(r,x){1&r&&(t.ynx(0),t.TgZ(1,"span"),t._uU(2,"Assign members"),t.qZA(),t.BQk())}function sn(r,x){1&r&&(t.TgZ(0,"small",51),t._uU(1,"(Pending Invitation)"),t.qZA())}function Jt(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",44),t.NdJ("nzCheckedChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.selected=o)}),t.TgZ(1,"div",45),t._UZ(2,"nz-avatar",46),t.ALo(3,"firstCharUpper"),t.TgZ(4,"div",47)(5,"span",48),t._uU(6),t.qZA(),t.TgZ(7,"small",49),t._uU(8),t.YNc(9,sn,2,0,"small",50),t.qZA()()()()}if(2&r){const O=x.$implicit;t.Q6J("nzDisabled",O.is_pending&&!O.selected)("ngClass",O.is_pending&&!O.selected?"disable":"")("nzChecked",O.selected),t.xp6(2),t.Udp("background-color",O.avatar_url?"#ececec":O.color_code),t.Q6J("nzSize",26)("nzText",t.lcZ(3,14,O.name))("nzTooltipTitle",O.name)("nzSrc",O.avatar_url)("nzTooltipPlacement","top"),t.xp6(4),t.Oqu(O.name),t.xp6(1),t.Q6J("nzType","secondary"),t.xp6(1),t.hij(" ",O.email," "),t.xp6(1),t.Q6J("ngIf",O.is_pending)}}function Ln(r,x){if(1&r&&(t.TgZ(0,"ul",39),t.YNc(1,Jt,10,16,"li",43),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngForOf",O.service.members)}}function wt(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",22),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.bulkArchive())}),t._UZ(1,"span",52),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("nzTooltipTitle",O.filteredAsArchived?"Unarchive":"Archive")("nzLoading",O.archivingTasks)}}function Lt(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"button",53),t._UZ(2,"span",4),t.qZA(),t.TgZ(3,"nz-dropdown-menu",null,54)(5,"ul",39)(6,"li",55)(7,"span",56),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.taskTemplateClicked.emit(!0))}),t._uU(8,"Create Task Template"),t.qZA()()()(),t.BQk()}if(2&r){const O=t.MAs(4);t.xp6(1),t.Q6J("nzTooltipTitle","More options")("nzTrigger","click")("nzClickHide",!0)("nzDropdownMenu",O),t.xp6(1),t.Q6J("nzType","more")}}let Et=(()=>{var r;class x{get deleteConfirmationMessage(){return"All "+this.selectedCount+" tasks will be deleted and cannot be undone."}get newLabel(){return this.newLabelForm.valid}get label(){return`${this.selectedCount} ${this.selectedCount<2?"task":"tasks"} selected`}constructor(i,o,q,w,y0,J0){var m1=this;this.api=i,this.fb=o,this.auth=q,this.map=w,this.service=y0,this.app=J0,this.statuses=[],this.priorities=[],this.phases=[],this.selectedStatus=null,this.filteredAsArchived=!1,this.bulkUpdateSuccess=new t.vpe,this.labelsUpdate=new t.vpe,this.taskTemplateClicked=new t.vpe,this.changingStatus=!1,this.changingPriority=!1,this.changingPhase=!1,this.changingLabels=!1,this.deletingTasks=!1,this.archivingTasks=!1,this.assigningTasks=!1,this.assigningLabel=!1,this.assigningMembers=!1,this.labelsDropdownVisible=!1,this.groupChangeVisible=!1,this.membersDropdownVisible=!1,this.projectId=null,this.selectedCount=0,this.isOpen=!1,this.destroy$=new a.x,this.projectId=this.service.getProjectId(),this.newLabelForm=this.fb.group({label:[null,x0.kI.required]}),this.service.onStatusesChange$.pipe((0,h.R)(this.destroy$)).subscribe(()=>{}),(0,J.T)(this.map.onSelect$,this.map.onDeselect$,this.map.onDeselectAll$).pipe((0,h.R)(this.destroy$)).subscribe(function(){var d1=(0,M.Z)(function*(N1){yield m1.getGroups();const c1=m1.map.getSelectedCount();m1.isOpen=c1>0,m1.selectedCount=c1});return function(N1){return d1.apply(this,arguments)}}())}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}getGroups(){var i=this;return(0,M.Z)(function*(){i.statuses=i.service.statuses,i.priorities=i.service.priorities,i.phases=i.service.phases})()}changeStatus(i){var o=this;return(0,M.Z)(function*(){if(i)try{o.changingStatus=!0;const q=yield o.api.bulkChangeStatus({tasks:o.map.getSelectedTaskIds(),status_id:i},o.projectId);q.done&&(c.s.track(n.gi),o.bulkUpdateSuccess.emit(),q.body.failed_tasks.length&&o.app.notify("Incomplete Dependencies!",`Some tasks were not updated. ${E.mU}`,!1)),o.changingStatus=!1}catch{o.changingStatus=!1}})()}changePriority(i){var o=this;return(0,M.Z)(function*(){if(i)try{o.changingPriority=!0,(yield o.api.bulkChangePriority({tasks:o.map.getSelectedTaskIds(),priority_id:i},o.projectId)).done&&(c.s.track(n.cZ),o.bulkUpdateSuccess.emit()),o.changingPriority=!1}catch{o.changingPriority=!1}})()}changePhase(i){var o=this;return(0,M.Z)(function*(){if(i)try{o.changingPriority=!0,(yield o.api.bulkChangePhase({tasks:o.map.getSelectedTaskIds(),phase_id:i},o.projectId)).done&&(c.s.track(n.Sl),o.bulkUpdateSuccess.emit()),o.changingPriority=!1}catch{o.changingPriority=!1}})()}bulkDelete(){var i=this;return(0,M.Z)(function*(){try{i.deletingTasks=!0,(yield i.api.bulkDelete({tasks:i.map.getSelectedTaskIds()},i.projectId)).done&&(c.s.track(n.XH),i.bulkUpdateSuccess.emit()),i.deletingTasks=!1}catch{i.deletingTasks=!1}})()}bulkArchive(){var i=this;return(0,M.Z)(function*(){try{if(i.isSelectionHasSubTasks())return;i.archivingTasks=!0,(yield i.api.bulkArchive({tasks:i.map.getSelectedTaskIds(),project_id:i.projectId},i.filteredAsArchived)).done&&(c.s.track(n.db),i.bulkUpdateSuccess.emit()),i.archivingTasks=!1}catch{i.archivingTasks=!1}})()}bulkAssignMe(){var i=this;return(0,M.Z)(function*(){if(i.projectId)try{i.assigningTasks=!0,(yield i.api.bulkAssignMe({tasks:i.map.getSelectedTaskIds(),project_id:i.projectId})).done&&(c.s.track(n.IR),i.bulkUpdateSuccess.emit()),i.assigningTasks=!1}catch{i.assigningTasks=!1}})()}bulkAssignLabel(){var i=this;return(0,M.Z)(function*(){try{i.assigningLabel=!0,(yield i.api.bulkAssignLabel({tasks:i.map.getSelectedTaskIds(),text:i.newLabelForm.value.label||null,labels:i.service.labels.filter(q=>q.selected)},i.projectId)).done&&(c.s.track(n.rT),i.bulkUpdateSuccess?.emit(),i.labelsUpdate?.emit(),i.resetLabels()),i.assigningLabel=!1}catch{i.assigningLabel=!1}})()}bulkAssignMembers(){var i=this;return(0,M.Z)(function*(){try{i.assigningMembers=!0,(yield i.api.bulkAssignMembers({tasks:i.map.getSelectedTaskIds(),project_id:i.projectId,members:i.service.members.filter(q=>q.selected)})).done&&(c.s.track(n.jK),i.bulkUpdateSuccess?.emit(),i.resetMembers()),i.assigningMembers=!1}catch(o){i.assigningMembers=!1,(0,v.tu)(o)}})()}isSelectionHasSubTasks(){return 0}close(){this.map.deselectAll()}deselectAll(){this.labelsDropdownVisible=!1,this.service.labels.forEach(i=>i.selected=!1)}deselectAllMembers(){this.membersDropdownVisible=!1,this.service.members.forEach(i=>i.selected=!1)}resetLabels(){this.deselectAll(),this.newLabelForm.controls.label.setValue(null)}resetMembers(){this.deselectAllMembers()}handleLabelsDropdown(i){i||this.resetLabels()}handleMembersDropdown(i){i||this.resetMembers()}createLabel(){this.newLabelForm.valid&&this.bulkAssignLabel()}isOwnerOrAdmin(){return this.auth.getCurrentSession()?.owner||this.auth.getCurrentSession()?.is_admin}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(a0.c),t.Y36(x0.qu),t.Y36(V.e),t.Y36(Z0.g),t.Y36(Z.b),t.Y36(r0.z))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-bulk-actions"]],viewQuery:function(i,o){if(1&i&&t.Gf(K0,5),2&i){let q;t.iGM(q=t.CRH())&&(o.labelsSelect=q.first)}},inputs:{selectedStatus:"selectedStatus",filteredAsArchived:"filteredAsArchived"},outputs:{bulkUpdateSuccess:"bulkUpdateSuccess",labelsUpdate:"labelsUpdate",taskTemplateClicked:"taskTemplateClicked"},decls:53,vars:41,consts:[[1,"bulk-actions"],[1,"bulk-actions-inner","align-items-center","d-flex","justify-content-between","w-100"],[1,"d-flex","align-items-center","position-relative","justify-content-center"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","","nz-dropdown","",3,"nzTooltipTitle","nzTrigger","nzClickHide","nzVisible","nzDropdownMenu","nzVisibleChange"],["nz-icon","","nzTheme","outline",3,"nzType"],["groupDropdown","nzDropdownMenu"],["nz-menu","",2,"max-height","250px","overflow","hidden","overflow-y","auto","min-width","110px"],["nz-submenu","","nzTitle","Status"],[2,"max-height","250px","overflow","hidden","overflow-y","auto"],["nz-menu-item","","style","min-height: 32px;",3,"click",4,"ngFor","ngForOf"],["nz-submenu","","nzTitle","Priority"],["nz-submenu","","nzTitle","Phase"],["custom",""],["labelsTooltipTitle",""],["labelsDropdown","nzDropdownMenu"],["style","max-height: 250px;overflow: hidden;overflow-y: auto;","nz-menu","",4,"ngIf"],["nz-menu",""],["nz-menu-item","",1,"m-0",3,"submit"],["nz-form","",1,"w-100",3,"formGroup"],["type","text","nz-input","","nzSize","small","placeholder","+ Create label",3,"formControlName"],["nz-typography","","nzType","secondary",4,"ngIf"],["class","m-0","nz-menu-item","",3,"click",4,"ngIf"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","",3,"nzTooltipTitle","nzLoading","click"],["nz-icon","","nzType","user-add","nzTheme","outline"],["membersTooltipTitle",""],["membersDropdown","nzDropdownMenu"],["nz-menu-item","",1,"m-0",3,"click"],["nz-button","","nzType","primary","nzShape","round","nzBlock","","nzSize","small",3,"nzLoading"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","",3,"nzTooltipTitle","nzLoading","click",4,"ngIf"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","","nz-popconfirm","",3,"nzTooltipTitle","nzLoading","nzPopconfirmShowArrow","nzPopconfirmBackdrop","nzPopconfirmTitle","nzOnConfirm"],["nz-icon","","nzType","delete","nzTheme","outline"],[4,"ngIf"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","",3,"nzTooltipTitle","click"],["nz-icon","","nzType","close-circle","nzTheme","outline"],["nz-menu-item","",2,"min-height","32px",3,"click"],[3,"nzColor","nzText"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"mb-0"],["nz-menu","",2,"max-height","250px","overflow","hidden","overflow-y","auto"],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzChecked","nzCheckedChange",4,"ngFor","ngForOf"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzChecked","nzCheckedChange"],["nz-typography","","nzType","secondary"],["class","m-0","nz-checkbox","","nz-menu-item","",3,"nzDisabled","ngClass","nzChecked","nzCheckedChange",4,"ngFor","ngForOf"],["nz-checkbox","","nz-menu-item","",1,"m-0",3,"nzDisabled","ngClass","nzChecked","nzCheckedChange"],[1,"d-flex","align-items-center","justify-content-center","user-select-none"],["nz-tooltip","",1,"mt-auto","mb-auto","me-2",3,"nzSize","nzText","nzTooltipTitle","nzSrc","nzTooltipPlacement"],[2,"line-height","15px"],["nz-typography","",1,"d-block"],["nz-typography","",3,"nzType"],["nz-typography","","nzType","danger",4,"ngIf"],["nz-typography","","nzType","danger"],["nz-icon","","nzType","inbox","nzTheme","outline"],["nz-button","","nzShape","circle","nzType","text","nz-tooltip","","nz-dropdown","",3,"nzTooltipTitle","nzTrigger","nzClickHide","nzDropdownMenu"],["moreOptionsDropdown","nzDropdownMenu"],["nz-menu-item","",1,"m-0"],[3,"click"]],template:function(i,o){if(1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div"),t._uU(3),t.qZA(),t.TgZ(4,"div",2)(5,"button",3),t.NdJ("nzVisibleChange",function(w){return o.groupChangeVisible=w}),t._UZ(6,"span",4),t.qZA(),t.TgZ(7,"nz-dropdown-menu",null,5)(9,"ul",6)(10,"li",7)(11,"ul",8),t.YNc(12,s1,3,4,"li",9),t.qZA()(),t.TgZ(13,"li",10)(14,"ul",8),t.YNc(15,f1,3,4,"li",9),t.qZA()(),t.TgZ(16,"li",11)(17,"ul",8),t.YNc(18,E1,3,4,"li",9),t.qZA()()()(),t.YNc(19,Oe,1,1,"ng-template",null,12,t.W1O),t.TgZ(21,"button",3),t.NdJ("nzVisibleChange",function(w){return o.labelsDropdownVisible=w})("nzVisibleChange",function(w){return o.handleLabelsDropdown(w)}),t._UZ(22,"span",4),t.qZA(),t.YNc(23,Y1,3,3,"ng-template",null,13,t.W1O),t.TgZ(25,"nz-dropdown-menu",null,14),t.YNc(27,We,2,1,"ul",15),t.TgZ(28,"ul",16)(29,"li",17),t.NdJ("submit",function(){return o.createLabel()}),t.TgZ(30,"form",18),t._UZ(31,"input",19),t.YNc(32,He,2,0,"small",20),t.qZA()(),t.YNc(33,Ft,3,1,"li",21),t.qZA()(),t.TgZ(34,"button",22),t.NdJ("click",function(){return o.bulkAssignMe()}),t._UZ(35,"span",23),t.qZA(),t.TgZ(36,"button",3),t.NdJ("nzVisibleChange",function(w){return o.membersDropdownVisible=w})("nzVisibleChange",function(w){return o.handleMembersDropdown(w)}),t._UZ(37,"span",4),t.qZA(),t.YNc(38,$t,3,0,"ng-template",null,24,t.W1O),t.TgZ(40,"nz-dropdown-menu",null,25),t.YNc(42,Ln,2,1,"ul",15),t.TgZ(43,"ul",16)(44,"li",26),t.NdJ("click",function(){return o.bulkAssignMembers()}),t.TgZ(45,"button",27),t._uU(46," Apply "),t.qZA()()()(),t.YNc(47,wt,2,2,"button",28),t.TgZ(48,"button",29),t.NdJ("nzOnConfirm",function(){return o.bulkDelete()}),t._UZ(49,"span",30),t.qZA()(),t.YNc(50,Lt,9,5,"ng-container",31),t.TgZ(51,"button",32),t.NdJ("click",function(){return o.close()}),t._UZ(52,"span",33),t.qZA()()()),2&i){const q=t.MAs(8),w=t.MAs(24),y0=t.MAs(26),J0=t.MAs(39),m1=t.MAs(41);t.ekj("open",o.isOpen),t.xp6(3),t.Oqu(o.label),t.xp6(2),t.Q6J("nzTooltipTitle","Change Status / Priority / Phase")("nzTrigger","click")("nzClickHide",!0)("nzVisible",o.groupChangeVisible)("nzDropdownMenu",q),t.xp6(1),t.Q6J("nzType",o.changingStatus||o.changingPriority||o.changingPhase?"loading":"retweet"),t.xp6(6),t.Q6J("ngForOf",o.statuses),t.xp6(3),t.Q6J("ngForOf",o.priorities),t.xp6(3),t.Q6J("ngForOf",o.phases),t.xp6(3),t.Q6J("nzTooltipTitle",w)("nzTrigger","click")("nzClickHide",!1)("nzVisible",o.labelsDropdownVisible)("nzDropdownMenu",y0),t.xp6(1),t.Q6J("nzType",o.assigningLabel?"loading":"tags"),t.xp6(5),t.Q6J("ngIf",o.service.labels.length&&!o.newLabel),t.xp6(3),t.Q6J("formGroup",o.newLabelForm),t.xp6(1),t.Q6J("formControlName","label"),t.xp6(1),t.Q6J("ngIf",o.newLabel),t.xp6(1),t.Q6J("ngIf",o.service.labels.length&&!o.newLabel),t.xp6(1),t.Q6J("nzTooltipTitle","Assign to me")("nzLoading",o.assigningTasks),t.xp6(2),t.Q6J("nzTooltipTitle",J0)("nzTrigger","click")("nzClickHide",!1)("nzVisible",o.membersDropdownVisible)("nzDropdownMenu",m1),t.xp6(1),t.Q6J("nzType",o.assigningLabel?"loading":"usergroup-add"),t.xp6(5),t.Q6J("ngIf",o.service.members.length),t.xp6(3),t.Q6J("nzLoading",o.assigningMembers),t.xp6(2),t.Q6J("ngIf",!o.isSelectionHasSubTasks()),t.xp6(1),t.Q6J("nzTooltipTitle","Delete")("nzLoading",o.deletingTasks)("nzPopconfirmShowArrow",!0)("nzPopconfirmBackdrop",!0)("nzPopconfirmTitle",o.deleteConfirmationMessage),t.xp6(2),t.Q6J("ngIf",o.isOwnerOrAdmin()),t.xp6(1),t.Q6J("nzTooltipTitle","Deselect all")}},dependencies:[h0.mk,h0.sg,h0.O5,h0.RF,h0.n9,x0._Y,x0.Fj,x0.JJ,x0.JL,h1.Lr,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,L0.rY,o0.cm,o0.RR,o0.wA,H0.Ls,e0.Ie,X0.ZU,L.x7,m.Zp,d.Dz,K.SY,x0.sg,x0.u,P.JW,k1.I,W0.m],styles:['.bulk-actions[_ngcontent-%COMP%]{position:fixed;z-index:2;background:#252628;bottom:30px;left:0;right:0;min-width:420px;width:auto;max-width:450px;margin:auto;height:50px;display:flex;align-items:center;border-radius:25px;padding:0 25px;box-shadow:0 0 0 1px #edeae9,0 5px 20px #6d6e6f14;transform:translateY(200%);transition:.2s ease-in}.bulk-actions[_ngcontent-%COMP%] .bulk-actions-inner[_ngcontent-%COMP%], .bulk-actions[_ngcontent-%COMP%] .bulk-actions-inner[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .bulk-actions[_ngcontent-%COMP%] .bulk-actions-inner[_ngcontent-%COMP%] nz-select[_ngcontent-%COMP%]{color:#fff}.bulk-actions[_ngcontent-%COMP%] [nz-icon][_ngcontent-%COMP%]{font-size:16px}.bulk-actions.open[_ngcontent-%COMP%]{transform:translateY(20%)}.bulk-actions[_ngcontent-%COMP%] .bulk-actions-input-container[_ngcontent-%COMP%]{position:absolute;top:-40px;width:100%;left:0;right:0}.disable[_ngcontent-%COMP%]{position:relative}.disable[_ngcontent-%COMP%]:after{position:absolute;content:"";background:rgba(231,231,231,.4117647059);inset:0;width:100%}.li-custom[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{min-height:32px!important;height:32px!important;padding:5px 12px}']}),x})();var kn=s(86947),xn=s(40844);const rt=["contextMenuDropdown"];function Nn(r,x){if(1&r&&t._uU(0),2&r){const O=t.oxw().$implicit;t.hij(" ",(null==O?null:O.name)||null," ")}}function cn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",11),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw(2);return t.KtG(w.changeGroup(q.id))}),t._UZ(1,"nz-badge",12),t.ALo(2,"safeString"),t.YNc(3,Nn,1,1,"ng-template",null,13,t.W1O),t.qZA()}if(2&r){const O=x.$implicit,i=t.MAs(4);t.xp6(1),t.Q6J("nzColor",t.lcZ(2,2,O.color_code))("nzText",i)}}function Sn(r,x){if(1&r&&(t.TgZ(0,"li",9)(1,"ul"),t.YNc(2,cn,5,4,"li",10),t.qZA()()),2&r){const O=t.oxw(),i=t.MAs(15);t.Q6J("nzTitle",i),t.xp6(2),t.Q6J("ngForOf",O.groups)}}function ft(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",2),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.archive())}),t._UZ(1,"span",3),t._uU(2),t.qZA()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("nzType",O.archiving?"loading":"inbox")("nzTheme","outline"),t.xp6(1),t.hij(" ",O.archived?" Unarchived":" Archive"," ")}}function Ht(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",2),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.convertToTask())}),t._UZ(1,"span",3),t._uU(2," Convert to a Task "),t.qZA()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("nzType",O.converting?"loading":"retweet")("nzTheme","outline")}}function Yt(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"li",2),t.NdJ("click",function(){t.CHM(O);const o=t.oxw(2);return t.KtG(o.showTasksModal())}),t._UZ(2,"span",15),t._uU(3," Convert to Sub task "),t.qZA(),t.BQk()}}function yn(r,x){if(1&r&&(t.ynx(0),t.YNc(1,Yt,4,0,"ng-container",14),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngIf",0===(null==O.selectedTask?null:O.selectedTask.sub_tasks_count))}}function Mn(r,x){1&r&&(t._UZ(0,"span",16),t._uU(1," Move to\n"))}let Bn=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1,d1,N1,c1){this.contextMenuService=i,this.service=o,this.map=q,this.api=w,this.socket=y0,this.cdr=J0,this.subTaskConvertService=m1,this.kanbanService=d1,this.auth=N1,this.app=c1,this.archived=!1,this.projectId=null,this.groups=[],this.deleting=!1,this.archiving=!1,this.converting=!1,this.assigning=!1,this.hasSubTasks=!1,this.selectedTask=null,this.destroy$=new a.x,this.service.onContextMenu$.pipe((0,h.R)(this.destroy$)).subscribe(ot=>{this.onContextMenu(ot)})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}onContextMenu(i){this.selectedTask=i.task,this.map.deselectAll(),this.map.selectTask(i.task),this.hasSubTasks=this.isSelectionHasSubTasks(),this.cdr.detectChanges(),this.contextMenuService.create(i.event,this.contextMenuDropdown)}assignMe(){var i=this;return(0,M.Z)(function*(){if(i.assigning)return;const o=i.service.getProjectId();if(o){try{i.assigning=!0;const q={tasks:i.map.getSelectedTaskIds(),project_id:o},w=yield i.api.bulkAssignMe(q);w.done&&(c.s.track(n.cj),i.service.emitOnAssignMe(w.body),i.map.deselectAll()),i.assigning=!1}catch{i.assigning=!1}i.kanbanService.emitRefreshGroups(),i.cdr.detectChanges()}})()}isSelectionHasSubTasks(){return this.map.getSelectedTasks().some(i=>i.is_sub_task)}changeGroup(i){if(!this.selectedTask)return;const o=this.service.getCurrentGroup();o.value===this.service.GROUP_BY_STATUS_VALUE?this.handleStatusChange(i,this.selectedTask.id):o.value===this.service.GROUP_BY_PRIORITY_VALUE?this.handlePriorityChange(i,this.selectedTask.id):o.value===this.service.GROUP_BY_PHASE_VALUE&&this.handlePhaseChange(i,this.selectedTask.id)}handleStatusChange(i,o){o&&(this.socket.emit(g.C.TASK_STATUS_CHANGE.toString(),JSON.stringify({task_id:o,status_id:i,team_id:this.auth.getCurrentSession()?.team_id})),this.socket.emit(g.C.GET_TASK_PROGRESS.toString(),o),this.kanbanService.emitRefreshGroups())}handlePriorityChange(i,o){o&&(this.socket.emit(g.C.TASK_PRIORITY_CHANGE.toString(),JSON.stringify({task_id:o,priority_id:i})),this.kanbanService.emitRefreshGroups())}handlePhaseChange(i,o){o&&(this.socket.emit(g.C.TASK_PHASE_CHANGE.toString(),{task_id:o,phase_id:i}),this.kanbanService.emitRefreshGroups())}convertToTask(){var i=this;return(0,M.Z)(function*(){const o=i.selectedTask;if(o)try{i.converting=!0;const q=yield i.api.convertToTask(o.id,o.project_id);q.done&&(i.service.updateTaskGroup(q.body,!1),i.service.getCurrentGroup().value===i.service.GROUP_BY_PHASE_VALUE&&i.service.emitRefresh()),i.converting=!1}catch{i.converting=!1}})()}archive(){var i=this;return(0,M.Z)(function*(){if(!i.archiving&&!i.hasSubTasks){try{i.archiving=!0;const o={tasks:i.map.getSelectedTaskIds(),project_id:i.projectId},q=yield i.api.bulkArchive(o,i.archived);if(q.done){c.s.track(n.Vs);for(const w of q.body)i.service.deleteTask(w)}i.archiving=!1}catch{i.archiving=!1}i.kanbanService.emitRefreshGroups(),i.cdr.detectChanges()}})()}delete(){var i=this;return(0,M.Z)(function*(){if(!i.deleting){try{i.deleting=!0;const o=i.map.getSelectedTaskIds(),q=yield i.api.bulkDelete({tasks:o},i.projectId);if(q.done){c.s.track(n.Ig);for(const w of q.body.deleted_tasks)i.service.deleteTask(w)}i.deleting=!1}catch{i.deleting=!1}i.kanbanService.emitRefreshGroups()}})()}showTasksModal(){if(this.selectedTask){if(this.selectedTask.has_dependencies)return void this.app.notify("Conversion Blocked!","Tasks with dependencies cannot be converted to sub-tasks.",!1);this.subTaskConvertService.emitConvertingToSubTask({selectedTask:this.selectedTask,projectId:this.projectId})}}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(o0.Iw),t.Y36(Z.b),t.Y36(Z0.g),t.Y36(a0.c),t.Y36(R0.s),t.Y36(t.sBO),t.Y36(kn.p),t.Y36(D0.m),t.Y36(V.e),t.Y36(r0.z))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-context-menu"]],viewQuery:function(i,o){if(1&i&&t.Gf(rt,5),2&i){let q;t.iGM(q=t.CRH())&&(o.contextMenuDropdown=q.first)}},inputs:{archived:"archived",projectId:"projectId",groups:"groups"},decls:17,vars:9,consts:[["contextMenuDropdown","nzDropdownMenu"],["nz-menu",""],["nz-menu-item","",3,"click"],["nz-icon","",1,"me-2",3,"nzType","nzTheme"],[3,"ngSwitch"],["nz-submenu","",3,"nzTitle",4,"ngSwitchCase"],["nz-menu-item","",3,"click",4,"ngSwitchCase"],[4,"ngSwitchCase"],["titleTemplate",""],["nz-submenu","",3,"nzTitle"],["class","m-0","nz-menu-item","",3,"click",4,"ngFor","ngForOf"],["nz-menu-item","",1,"m-0",3,"click"],[3,"nzColor","nzText"],["textTmpl",""],[4,"ngIf"],["nz-icon","","nzType","double-right","nzTheme","outline",1,"me-2"],["nz-icon","","nzType","retweet","nzTheme","outline",1,"me-2"]],template:function(i,o){1&i&&(t.TgZ(0,"nz-dropdown-menu",null,0)(2,"ul",1)(3,"li",2),t.NdJ("click",function(){return o.assignMe()}),t._UZ(4,"span",3),t._uU(5," Assign to me "),t.qZA(),t.ynx(6,4),t.YNc(7,Sn,3,2,"li",5),t.YNc(8,ft,3,3,"li",6),t.YNc(9,Ht,3,2,"li",6),t.YNc(10,yn,2,1,"ng-container",7),t.BQk(),t.TgZ(11,"li",2),t.NdJ("click",function(){return o.delete()}),t._UZ(12,"span",3),t._uU(13," Delete "),t.qZA()()(),t.YNc(14,Mn,2,0,"ng-template",null,8,t.W1O),t._UZ(16,"worklenz-convert-to-subtask-modal")),2&i&&(t.xp6(4),t.Q6J("nzType",o.assigning?"loading":"user-add")("nzTheme","outline"),t.xp6(2),t.Q6J("ngSwitch",o.hasSubTasks),t.xp6(1),t.Q6J("ngSwitchCase",!1),t.xp6(1),t.Q6J("ngSwitchCase",!1),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1),t.xp6(2),t.Q6J("nzType",o.deleting?"loading":"delete")("nzTheme","outline"))},dependencies:[h0.sg,h0.O5,h0.RF,h0.n9,N0.w,L0.wO,L0.r9,L0.rY,o0.RR,H0.Ls,L.x7,xn.w,W0.m],changeDetection:0}),x})();var Gt=s(48522);function wn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div")(1,"nz-date-picker",1),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.group.start_date=o)})("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleStartDateChange(o))}),t.ALo(2,"validateMaxDate"),t.qZA()()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngModel",O.group.start_date)("nzFormat","MMM dd,yyyy")("nzSuffixIcon","")("nzPlaceHolder","Set start date")("nzDisabledDate",t.lcZ(2,5,O.group.end_date))}}function En(r,x){1&r&&(t.TgZ(0,"div"),t._uU(1,"-"),t.qZA())}function Pn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div")(1,"nz-date-picker",1),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.group.end_date=o)})("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleEndDateChange(o))}),t.ALo(2,"validateMinDate"),t.qZA()()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("ngModel",O.group.end_date)("nzFormat","MMM dd,yyyy")("nzSuffixIcon","")("nzPlaceHolder","Set end date")("nzDisabledDate",t.lcZ(2,5,O.group.start_date))}}let Dn=(()=>{var r;class x{constructor(i,o){this.socket=i,this.cdr=o,this.handleStartDateChangeResponse=q=>{q.phase_id===this.group.id&&this.group.start_date!==q.start_date&&(this.group.start_date=q.start_date,this.cdr.markForCheck())},this.handleEndDateChangeResponse=q=>{q.phase_id===this.group.id&&this.group.end_date!==q.end_date&&(this.group.end_date=q.end_date,this.cdr.markForCheck())}}ngOnInit(){this.socket.on(g.C.PHASE_START_DATE_CHANGE.toString(),this.handleStartDateChangeResponse),this.socket.on(g.C.PHASE_END_DATE_CHANGE.toString(),this.handleEndDateChangeResponse)}ngOnDestroy(){this.socket.removeListener(g.C.PHASE_START_DATE_CHANGE.toString(),this.handleStartDateChangeResponse),this.socket.removeListener(g.C.PHASE_END_DATE_CHANGE.toString(),this.handleEndDateChangeResponse)}handleStartDateChange(i){this.socket.emit(g.C.PHASE_START_DATE_CHANGE.toString(),JSON.stringify({phase_id:this.group.id,start_date:i||null}))}handleEndDateChange(i){this.socket.emit(g.C.PHASE_END_DATE_CHANGE.toString(),JSON.stringify({phase_id:this.group.id,end_date:i||null}))}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(R0.s),t.Y36(t.sBO))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-phase-duration"]],inputs:{group:"group"},decls:4,vars:0,consts:[[4,"nzSpaceItem"],["nzBorderless","",3,"ngModel","nzFormat","nzSuffixIcon","nzPlaceHolder","nzDisabledDate","ngModelChange"]],template:function(i,o){1&i&&(t.TgZ(0,"nz-space"),t.YNc(1,wn,3,7,"div",0),t.YNc(2,En,2,0,"div",0),t.YNc(3,Pn,3,7,"div",0),t.qZA())},dependencies:[x0.JJ,x0.On,g0.NU,g0.$1,w0.uw,T1.v,M1.z],styles:["nz-date-picker[_ngcontent-%COMP%]{max-width:125px;max-height:26px}"],changeDetection:0}),x})();function zn(r,x){1&r&&t._UZ(0,"span",14),2&r&&t.Q6J("nzType","loading")("nzTheme","outline")}function In(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"input",12),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.group.name=o)})("keydown.enter",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onBlurEditColumn(o.group))})("blur",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onBlurEditColumn(o.group))}),t.qZA(),t.YNc(2,zn,1,2,"span",13),t.BQk()}if(2&r){const O=t.oxw();t.xp6(1),t.ekj("bg-and-grey",!O.isEditColProgress),t.Q6J("id","group-name-"+O.group.id)("disabled",O.isEditColProgress)("ngModel",O.group.name),t.xp6(1),t.Q6J("ngIf",O.isEditColProgress)}}function an(r,x){if(1&r&&(t.ynx(0),t._uU(1),t.BQk()),2&r){const O=t.oxw();t.xp6(1),t.AsE(" ",O.group.name," (",O.group.tasks.length,") ")}}function Xn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"button",15),t.NdJ("nzVisibleChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.showMenu=o)}),t._UZ(1,"span",16),t.qZA()}if(2&r){t.oxw();const O=t.MAs(11);t.Q6J("nzType","text")("nzTrigger","click")("nzDropdownMenu",O),t.xp6(1),t.Q6J("nzType","ellipsis")("nzTheme","outline")}}function Zn(r,x){if(1&r&&(t.TgZ(0,"div",17),t._UZ(1,"worklenz-task-list-phase-duration",18),t.qZA()),2&r){const O=t.oxw();t.xp6(1),t.Q6J("group",O.group)}}function bn(r,x){if(1&r&&t._UZ(0,"worklenz-tasks-progress-bar",19),2&r){const O=t.oxw();t.Q6J("todoProgress",O.group.todo_progress)("doingProgress",O.group.doing_progress)("doneProgress",O.group.done_progress)}}function rn(r,x){if(1&r&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&r){const O=t.oxw().$implicit,i=t.oxw(3);t.Udp("font-weight",O.id===i.group.category_id?"bold":null),t.xp6(1),t.hij(" ",(null==O?null:O.name)||null," ")}}function Un(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",26),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw(3);return t.KtG(w.changeStatusCategory(w.group,q.id))}),t.ALo(1,"safeString"),t._UZ(2,"nz-badge",27),t.ALo(3,"safeString"),t.YNc(4,rn,2,3,"ng-template",null,28,t.W1O),t.qZA()}if(2&r){const O=x.$implicit,i=t.MAs(5);t.Q6J("nzTooltipTitle",t.lcZ(1,4,O.description))("nzTooltipPlacement","right"),t.xp6(2),t.Q6J("nzColor",t.lcZ(3,6,O.color_code))("nzText",i)}}function On(r,x){if(1&r&&(t.TgZ(0,"li",24)(1,"ul"),t.YNc(2,Un,6,8,"li",25),t.qZA()()),2&r){const O=t.oxw(2),i=t.MAs(14);t.Q6J("nzTitle",i),t.xp6(2),t.Q6J("ngForOf",O.categories)}}function Fn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"ul",20)(1,"li",21),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.editGroupName())}),t._UZ(2,"span",22),t._uU(3," Rename "),t.qZA(),t.YNc(4,On,3,2,"li",23),t.qZA()}if(2&r){const O=t.oxw();t.xp6(4),t.Q6J("ngIf",O.isGroupByStatus)}}function ln(r,x){1&r&&(t._UZ(0,"span",29),t._uU(1," Change category\n"))}let $n=(()=>{var r;class x{constructor(i,o,q,w,y0,J0,m1){this.cdr=i,this.auth=o,this.statusApi=q,this.list=w,this.ngZone=y0,this.phaseApi=J0,this.projectsService=m1,this.projectId=null,this.categories=[],this.toggle=new t.vpe,this.edit=!1,this.isEditColProgress=!1,this.showMenu=!1,this.isGroupByStatus=!1,this.isGroupByPhases=!1,this.isAdmin=!1,this.handleGroupProgressChange=()=>{const d1=this.group;if(!d1)return;const N1=d1.tasks.filter(xt=>xt.status_category?.is_todo).length,c1=d1.tasks.filter(xt=>xt.status_category?.is_doing).length,ot=d1.tasks.filter(xt=>xt.status_category?.is_done).length,Qt=d1.tasks.length;d1.todo_progress=(0,v.HS)(N1,Qt),d1.doing_progress=(0,v.HS)(c1,Qt),d1.done_progress=(0,v.HS)(ot,Qt),this.cdr.markForCheck()},(0,J.T)(this.list.onGroupProgressChangeDone$,this.list.onGroupChange$,this.list.onTaskAddOrDelete$).pipe((0,N.sL)()).subscribe(()=>{this.handleGroupProgressChange()})}ngOnInit(){this.isGroupByStatus=this.list.getCurrentGroup().value===this.list.GROUP_BY_STATUS_VALUE,this.isGroupByPhases=this.list.getCurrentGroup().value===this.list.GROUP_BY_PHASE_VALUE;const i=this.auth.getCurrentSession();i&&(this.isAdmin=!(!i.owner&&!i.is_admin))}canDisplayActions(){const i=this.list.getCurrentGroup().value;return i!==this.list.GROUP_BY_PRIORITY_VALUE&&(this.isAdmin||this.isGroupByStatus||i===this.list.GROUP_BY_PHASE_VALUE)&&this.group.name!==E.k9}isProgressBarAvailable(){return!this.isGroupByStatus}analyticsTrackSettingsClick(i){c.s.track(n.hL,{setting:i})}changeStatusCategory(i,o){var q=this;return(0,M.Z)(function*(){o&&(q.analyticsTrackSettingsClick("Change category"),i.category_id=o,yield q.onBlurEditColumn(i),q.list.emitRefresh())})()}editGroupName(){this.analyticsTrackSettingsClick("Rename"),this.edit=!0,this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{const o=document.querySelector(`#group-name-${this.group.id}`);o&&(o.focus(),o.select())})})}onToggleClick(i){this.edit||this.toggle.emit(i)}onBlurEditColumn(i){var o=this;return(0,M.Z)(function*(){if(o.projectId&&!o.isEditColProgress){try{o.isEditColProgress=!0;const q=o.list.getCurrentGroup().value;q===o.list.GROUP_BY_STATUS_VALUE?yield o.update(i):q===o.list.GROUP_BY_PHASE_VALUE&&(yield o.updatePhase(i)),o.isEditColProgress=!1,o.edit=!1}catch(q){(0,v.tu)(q),o.isEditColProgress=!1}o.cdr.markForCheck()}})()}updateName(i){var o=this;return(0,M.Z)(function*(){if(o.projectId&&!o.isEditColProgress){try{o.isEditColProgress=!0;const q=o.list.getCurrentGroup().value;q===o.list.GROUP_BY_STATUS_VALUE?yield o.updateGroupName(i):q===o.list.GROUP_BY_PHASE_VALUE&&(yield o.updatePhase(i)),o.isEditColProgress=!1,o.edit=!1}catch(q){(0,v.tu)(q),o.isEditColProgress=!1}o.cdr.markForCheck()}})()}updateGroupName(i){var o=this;return(0,M.Z)(function*(){if(i?.id&&o.projectId){try{const q={name:i.name,project_id:o.projectId,category_id:i.category_id},w=yield o.statusApi.updateName(i.id,q,o.projectId);if(w.done){const y0=o.list.groups,J0=y0.find(m1=>m1.id===w.body.id);J0&&(o.group.name=J0.name=w.body.name||"",o.group.color_code=J0.color_code=w.body.color_code||""),o.list.groups=y0}}catch{}o.cdr.markForCheck()}})()}updatePhase(i){var o=this;return(0,M.Z)(function*(){if(i?.id&&o.projectId&&(o.isAdmin||o.isProjectManager())){try{const q={id:i.id,name:i.name},w=yield o.phaseApi.update(o.projectId,q);if(w.done){const y0=o.list.phases,J0=y0.find(m1=>m1.id===w.body.id);J0&&(o.group.name=J0.name=w.body.name),o.list.phases=y0}}catch{}o.cdr.markForCheck()}})()}isProjectManager(){return!!this.projectsService.projectOwnerTeamMemberId&&this.auth.getCurrentSession()?.team_member_id===this.projectsService.projectOwnerTeamMemberId}update(i){var o=this;return(0,M.Z)(function*(){if(!o.isAdmin&&!o.isProjectManager())return;const q={name:i.name,project_id:o.projectId,category_id:i.category_id},w=yield o.statusApi.update(i.id,q,o.projectId);w.done&&null!=w.body.color_code&&(i.color_code=w.body.color_code+E.Yj)})()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(t.sBO),t.Y36(V.e),t.Y36(f0.w),t.Y36(Z.b),t.Y36(t.R0b),t.Y36(j0.f),t.Y36(Q0.m))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-group-settings"]],inputs:{group:"group",projectId:"projectId",categories:"categories"},outputs:{toggle:"toggle"},decls:15,vars:13,consts:[[1,"d-flex","justify-content-between","align-items-center","position-relative"],[1,"d-flex","align-items-center"],["nz-button","",1,"collapse","btn","border-0",3,"click"],["nz-icon","",1,"collapse-icon",3,"nzType","nzTheme"],[3,"ngSwitch"],[4,"ngSwitchCase"],["nz-button","","class","p-0","nz-dropdown","",3,"nzType","nzTrigger","nzDropdownMenu","nzVisibleChange",4,"ngIf"],["class","d-flex align-items-center me-2 ms-auto",4,"ngIf"],[3,"todoProgress","doingProgress","doneProgress",4,"ngIf"],["menu","nzDropdownMenu"],["nz-menu","",4,"ngIf"],["titleTemplate",""],["nz-input","",1,"p-0",3,"id","disabled","ngModel","ngModelChange","keydown.enter","blur"],["nz-icon","","class","ms-2",3,"nzType","nzTheme",4,"ngIf"],["nz-icon","",1,"ms-2",3,"nzType","nzTheme"],["nz-button","","nz-dropdown","",1,"p-0",3,"nzType","nzTrigger","nzDropdownMenu","nzVisibleChange"],["nz-icon","",3,"nzType","nzTheme"],[1,"d-flex","align-items-center","me-2","ms-auto"],[3,"group"],[3,"todoProgress","doingProgress","doneProgress"],["nz-menu",""],["nz-menu-item","",3,"click"],["nz-icon","","nzType","edit","nzTheme","outline",1,"me-2"],["nz-submenu","",3,"nzTitle",4,"ngIf"],["nz-submenu","",3,"nzTitle"],["class","m-0","nz-tooltip","","nz-menu-item","",3,"nzTooltipTitle","nzTooltipPlacement","click",4,"ngFor","ngForOf"],["nz-tooltip","","nz-menu-item","",1,"m-0",3,"nzTooltipTitle","nzTooltipPlacement","click"],[3,"nzColor","nzText"],["textTmpl",""],["nz-icon","","nzType","retweet","nzTheme","outline",1,"me-2"]],template:function(i,o){1&i&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(w){return o.onToggleClick(w)}),t._UZ(3,"span",3),t.ynx(4,4),t.YNc(5,In,3,6,"ng-container",5),t.YNc(6,an,2,2,"ng-container",5),t.BQk(),t.qZA(),t.YNc(7,Xn,2,5,"button",6),t.qZA(),t.YNc(8,Zn,2,1,"div",7),t.YNc(9,bn,1,3,"worklenz-tasks-progress-bar",8),t.qZA(),t.TgZ(10,"nz-dropdown-menu",null,9),t.YNc(12,Fn,5,1,"ul",10),t.qZA(),t.YNc(13,ln,2,0,"ng-template",null,11,t.W1O)),2&i&&(t.xp6(2),t.Udp("background-color",o.group.color_code),t.ekj("active",o.group.tasks.length),t.xp6(1),t.Q6J("nzType","right")("nzTheme","outline"),t.xp6(1),t.Q6J("ngSwitch",o.edit),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1),t.xp6(1),t.Q6J("ngIf",o.canDisplayActions()),t.xp6(1),t.Q6J("ngIf",o.isGroupByPhases&&"Unmapped"!==o.group.name),t.xp6(1),t.Q6J("ngIf",o.isProgressBarAvailable()),t.xp6(3),t.Q6J("ngIf",o.showMenu))},dependencies:[h0.sg,h0.O5,h0.RF,h0.n9,x0.Fj,x0.JJ,x0.On,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,L0.rY,o0.cm,o0.RR,o0.wA,H0.Ls,L.x7,m.Zp,K.SY,Gt.a,Dn,W0.m],styles:[".collapse[_ngcontent-%COMP%]{color:hwb(0 0% 100%/.85);font-weight:500;padding:6px 13px 6px 12px;min-width:120px;width:auto;border:none;text-align:left;outline:none;border-top-right-radius:4px;border-top-left-radius:4px;-webkit-user-select:none;user-select:none;z-index:8;font-size:14px;height:30px;display:flex;align-items:center}.collapse.btn[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%]{transition:transform .1s;transform:rotate(0)}.collapse.btn.active[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%]{transition:transform .1s;transform:rotate(90deg)}.collapse.active[_ngcontent-%COMP%]{border-bottom-left-radius:0;border-bottom-right-radius:0}.collapse[_ngcontent-%COMP%]:after{color:#777;font-weight:700;float:left;margin-left:5px}.task-drag-handler[_ngcontent-%COMP%]{position:absolute;left:-20px;top:1px;bottom:0;display:flex;align-items:center;height:27px;cursor:grab}.task-drag-handler[_ngcontent-%COMP%]:active{cursor:grabbing}"],changeDetection:0}),x})();var dn=s(43389);const Pt=["input"];function Jn(r,x){1&r&&(t.ynx(0),t.TgZ(1,"div",16),t._UZ(2,"span",17),t.qZA(),t.BQk()),2&r&&(t.xp6(2),t.Q6J("nzType","loading"))}function Hn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"li",30),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw().$implicit,y0=t.oxw(2);return t.KtG(y0.setColorCode(w,q))}),t.TgZ(1,"nz-tag",31),t._uU(2,"\xa0 "),t.qZA()()}if(2&r){const O=x.$implicit;t.xp6(1),t.Q6J("nzColor",O+"69")}}function Yn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"nz-form-item",6)(1,"div",18)(2,"div",19)(3,"div",20),t._UZ(4,"span",12),t.qZA(),t.TgZ(5,"nz-form-control")(6,"div",21)(7,"input",22,23),t.NdJ("ngModelChange",function(o){const w=t.CHM(O).$implicit;return t.KtG(w.name=o)})("focus",function(){const q=t.CHM(O).$implicit,w=t.MAs(8),y0=t.oxw(2);return w.select(),t.KtG(y0.setNameCache(q.id,q.name))})("blur",function(){const q=t.CHM(O).$implicit,w=t.oxw(2);return t.KtG(w.updateOption(q))})("keyup.enter",function(){t.CHM(O);const o=t.MAs(8);return t.KtG(o.blur())}),t.qZA(),t.TgZ(9,"nz-tag",24),t._uU(10,"\xa0 "),t.qZA(),t.TgZ(11,"nz-dropdown-menu",null,25)(13,"ul",26),t.YNc(14,Hn,3,1,"li",27),t.qZA()()()(),t.TgZ(15,"nz-form-label",28)(16,"button",29),t.NdJ("click",function(){const q=t.CHM(O).$implicit,w=t.oxw(2);return t.KtG(w.removeOption(q.id))}),t._UZ(17,"span",12),t.qZA()()()()()}if(2&r){const O=x.$implicit,i=x.index,o=t.MAs(12),q=t.oxw(2);t.xp6(1),t.Q6J("cdkDragData",O)("cdkDragLockAxis","y"),t.xp6(3),t.Q6J("nzType","holder")("nzTheme","outline"),t.xp6(3),t.Q6J("name","opt"+i)("ngModel",O.name)("minLength",2)("maxLength",30)("disabled",q.deleting[O.id]),t.xp6(2),t.Q6J("nzColor",O.color_code)("nzDropdownMenu",o)("nzTrigger","click")("nzTooltipTitle","Change phase color"),t.xp6(5),t.Q6J("ngForOf",q.COLOR_CODES),t.xp6(1),t.Q6J("nzNoColon",!0),t.xp6(1),t.Q6J("nzShape","circle")("nzType","text")("nzLoading",q.deleting[O.id]),t.xp6(1),t.Q6J("nzType","close-circle")("nzTheme","outline")}}function Gn(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"nz-skeleton",2)(2,"form",3)(3,"nz-form-item")(4,"nz-form-label",4),t._uU(5,"Phase Label:"),t.qZA(),t.TgZ(6,"nz-form-control")(7,"input",5),t.NdJ("ngModelChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.phaseLabel=o)})("focus",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.oldLabel=o.phaseLabel)})("blur",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.updateLabel(o.phaseLabel))}),t.qZA()()()(),t._UZ(8,"nz-divider",6),t.TgZ(9,"form",7)(10,"div",8)(11,"div",9)(12,"nz-form-label"),t._uU(13," Phase Options "),t.qZA()(),t.TgZ(14,"div",10)(15,"button",11),t.NdJ("click",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.addNewOption())}),t._UZ(16,"span",12),t._uU(17," Add Option "),t.qZA()()(),t.TgZ(18,"div",13),t.NdJ("cdkDropListDropped",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.drop(o))}),t.YNc(19,Jn,3,1,"ng-container",14),t.YNc(20,Yn,18,20,"nz-form-item",15),t.qZA()()(),t.BQk()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("nzActive",!0)("nzLoading",O.loading),t.xp6(1),t.Q6J("nzLayout","vertical"),t.xp6(2),t.Q6J("nzFor","label"),t.xp6(3),t.Q6J("ngModel",O.phaseLabel),t.xp6(8),t.Q6J("nzType","primary")("nzLoading",O.creating),t.xp6(1),t.Q6J("nzType","plus")("nzTheme","outline"),t.xp6(2),t.Q6J("cdkDropListData",O.list.phases),t.xp6(1),t.Q6J("ngIf",O.sorting),t.xp6(1),t.Q6J("ngForOf",O.list.phases)}}let jn=(()=>{var r;class x{get options(){return this.list.phases}constructor(i,o,q,w,y0,J0){this.api=i,this.cdr=o,this.list=q,this.service=w,this.projectsService=y0,this.auth=J0,this.projectId=null,this.show=!1,this.showChange=new t.vpe,this.getGroups=new t.vpe,this.loading=!1,this.creating=!1,this.updatingLabel=!1,this.sorting=!1,this.updating={},this.deleting={},this.updateCache={},this.COLOR_CODES=E.zW,this.oldLabel=null,this.phaseLabel=null,this.phasesList=[]}close(){this.show=!1,this.showChange.emit(!1)}addNewOption(){this.create()}onVisibleChange(i){i&&(this.get(!0),this.phaseLabel=this.service.label)}removeOption(i){i&&this.delete(i)}updateOption(i){var o=this;return(0,M.Z)(function*(){yield o.update(i),delete o.updateCache[i.id]})()}setNameCache(i,o){this.updateCache[i]=o}isProjectManager(){return!!this.projectsService.projectOwnerTeamMemberId&&this.auth.getCurrentSession()?.team_member_id===this.projectsService.projectOwnerTeamMemberId}create(){var i=this;return(0,M.Z)(function*(){if(i.projectId&&!i.creating){try{i.creating=!0,(yield i.api.create(i.projectId,i.isProjectManager())).done&&(yield i.get(!1),i.service.emitOptionsChange(),i.focusNewElement()),i.creating=!1}catch{i.creating=!1}i.cdr.markForCheck()}})()}focusNewElement(){setTimeout(()=>{this.inputs?.first.nativeElement.focus()},150)}get(i){var o=this;return(0,M.Z)(function*(){if(o.projectId){try{o.loading=i;const q=yield o.api.get(o.projectId);q.done&&(o.list.phases=q.body,o.phasesList=q.body),o.loading=!1}catch{o.loading=!1}o.cdr.markForCheck()}})()}updateLabel(i){var o=this;return(0,M.Z)(function*(){if(o.projectId){if(!i?.trim())return void(o.phaseLabel=o.oldLabel);try{o.updatingLabel=!0,(yield o.api.updateLabel(o.projectId,i?.trim(),o.isProjectManager())).done&&o.service.updateLabel(i?.trim()),o.updatingLabel=!1}catch{o.updatingLabel=!1}o.cdr.markForCheck()}})()}updateColor(i){var o=this;return(0,M.Z)(function*(){if(i?.id&&o.projectId){try{o.updating[i.id]=!0,(yield o.api.updateColor(o.projectId,i)).done&&o.service.emitOptionsChange(),o.updating[i.id]=!1}catch{i.name=o.updateCache[i.id],o.updating[i.id]=!1}o.cdr.markForCheck()}})()}update(i){var o=this;return(0,M.Z)(function*(){if(i?.id&&o.projectId&&!o.updating[i.id]&&o.updateCache[i.id]!==i.name){try{o.updating[i.id]=!0,(yield o.api.update(o.projectId,i,o.isProjectManager())).done&&(yield o.get(!1),o.service.emitOptionsChange()),o.updating[i.id]=!1}catch{i.name=o.updateCache[i.id],o.updating[i.id]=!1}o.cdr.markForCheck()}})()}delete(i){var o=this;return(0,M.Z)(function*(){if(i&&o.projectId&&!o.deleting[i]){try{if(o.deleting[i]=!0,(yield o.api.delete(i,o.projectId,o.isProjectManager())).done){const w=o.list.phases.findIndex(y0=>y0.id===i);w>-1&&(o.list.phases.splice(w,1),o.service.emitOptionsChange())}o.deleting[i]=!1}catch{o.deleting[i]=!1}o.cdr.markForCheck()}})()}setColorCode(i,o){var q=this;return(0,M.Z)(function*(){i.color_code=o+"69",yield q.updateColor(i)})()}drop(i){var o=this;return(0,M.Z)(function*(){i.previousIndex!==i.currentIndex&&((0,e.bA)(o.list.phases,i.previousIndex,i.currentIndex),o.list.phases=(0,v.I8)(o.list.phases),o.cdr.markForCheck(),yield o.updateSortOrder(i.previousIndex,i.currentIndex,o.list.phases))})()}updateSortOrder(i,o,q){var w=this;return(0,M.Z)(function*(){if(w.projectId&&q.length&&0!==q.length)try{w.sorting=!0;const y0={from_index:i,to_index:o,phases:q,project_id:w.projectId};(yield w.api.updateSortOrder(y0,w.projectId)).done&&(w.getGroups.emit(),yield w.get(!1),w.sorting=!1,w.cdr.markForCheck())}catch(y0){(0,v.tu)(y0),w.sorting=!1,w.cdr.markForCheck()}})()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(j0.f),t.Y36(t.sBO),t.Y36(Z.b),t.Y36(A0.u),t.Y36(Q0.m),t.Y36(V.e))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-phase-settings-drawer"]],viewQuery:function(i,o){if(1&i&&t.Gf(Pt,5),2&i){let q;t.iGM(q=t.CRH())&&(o.inputs=q)}},inputs:{projectId:"projectId",show:"show"},outputs:{showChange:"showChange",getGroups:"getGroups"},decls:2,vars:4,consts:[[3,"nzClosable","nzVisible","nzPlacement","nzTitle","nzOnClose","nzVisibleChange"],[4,"nzDrawerContent"],[3,"nzActive","nzLoading"],["nz-form","",3,"nzLayout"],[3,"nzFor"],["nz-input","","id","label","placeholder","Enter a name for label","name","label","required","",3,"ngModel","ngModelChange","focus","blur"],[1,"mb-3"],["nz-form",""],[1,"d-flex","mb-3"],[1,"d-block"],[1,"d-block","ms-auto"],["type","button","nz-button","","nzBlock","",3,"nzType","nzLoading","click"],["nz-icon","",3,"nzType","nzTheme"],["cdkDropList","",1,"drag-list",3,"cdkDropListData","cdkDropListDropped"],[4,"ngIf"],["class","mb-3",4,"ngFor","ngForOf"],[1,"loading-section"],["nz-icon","",3,"nzType"],["cdkDragBoundary",".drag-list","cdkDrag","",1,"drag-box",3,"cdkDragData","cdkDragLockAxis"],[1,"d-flex","align-items-center","justify-content-between","w-100"],["cdkDragHandle","",1,"drag-handle"],[1,"d-flex","align-items-center"],["nz-input","",3,"name","ngModel","minLength","maxLength","disabled","ngModelChange","focus","blur","keyup.enter"],["input",""],["nz-dropdown","","nz-tooltip","",1,"ms-2","rounded-circle","cursor-pointer",2,"width","20px","height","20px",3,"nzColor","nzDropdownMenu","nzTrigger","nzTooltipTitle"],["menu","nzDropdownMenu"],["nz-menu","","nzSelectable","",2,"max-height","200px","overflow","hidden","overflow-y","auto"],["nz-menu-item","",3,"click",4,"ngFor","ngForOf"],[2,"max-width","32px",3,"nzNoColon"],["type","button","nz-button","",3,"nzShape","nzType","nzLoading","click"],["nz-menu-item","",3,"click"],[1,"me-1","w-100","rounded-pill",2,"height","16px !important","width","16px !important",3,"nzColor"]],template:function(i,o){1&i&&(t.TgZ(0,"nz-drawer",0),t.NdJ("nzOnClose",function(){return o.close()})("nzVisibleChange",function(w){return o.onVisibleChange(w)}),t.YNc(1,Gn,21,12,"ng-container",1),t.qZA()),2&i&&t.Q6J("nzClosable",!0)("nzVisible",o.show)("nzPlacement","right")("nzTitle","Configure Phases")},dependencies:[h0.sg,h0.O5,x0._Y,x0.Fj,x0.JJ,x0.JL,x0.Q7,x0.On,x0.F,n1.t3,n1.SK,h1.Lr,h1.Nx,h1.iK,h1.Fd,O1.ix,N0.w,M0.dQ,L0.wO,L0.r9,o0.cm,o0.RR,H0.Ls,m.Zp,K.SY,c0.ng,e.Wj,e.Zt,e.Bh,$0.j,e1.g,dn.Vz,dn.SQ],styles:[".drag-handle[_ngcontent-%COMP%]{cursor:grab;opacity:.8;margin-right:4px;height:100%;display:flex;align-items:center}.drag-list[_ngcontent-%COMP%]{position:relative}.loading-section[_ngcontent-%COMP%]{position:absolute;background:rgba(255,255,255,.65);width:100%;height:100%;align-items:center;display:flex;z-index:9;justify-content:center}.drag-list[_ngcontent-%COMP%]{display:block;overflow:hidden}.drag-box[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.cdk-drag-preview[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:4px;box-shadow:0 5px 5px -3px #fff,0 8px 10px 1px #eeeeee96,0 3px 14px 2px #fff;z-index:999999!important;background-color:#fff!important;min-height:40px!important;display:flex!important;align-items:center!important;padding-left:4px}.cdk-drag-placeholder[_ngcontent-%COMP%]{opacity:1}.cdk-drag-animating[_ngcontent-%COMP%]{transition:transform .15s cubic-bezier(0,0,.2,1)}.drag-drag[_ngcontent-%COMP%]:last-child{border:none}.drag-list.cdk-drop-list-dragging[_ngcontent-%COMP%] .drag-drag[_ngcontent-%COMP%]:not(.cdk-drag-placeholder){transition:transform .15s cubic-bezier(0,0,.2,1)}"],changeDetection:0}),x})();const Qn=["row"],kt=["scrollPanel"];function Vn(r,x){1&r&&(t.TgZ(0,"div",18),t._UZ(1,"span",19),t._uU(2," Show archived "),t.qZA()),2&r&&(t.xp6(1),t.Q6J("nzType","loading"))}function An(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"label",20),t.NdJ("nzCheckedChange",function(o){t.CHM(O);const q=t.oxw(2);return t.KtG(q.showArchived=o)})("nzCheckedChange",function(){t.CHM(O);const o=t.oxw(2);return t.KtG(o.onArchiveChange())}),t._uU(1,"Show archived"),t.qZA()}if(2&r){const O=t.oxw(2);t.Q6J("nzChecked",O.showArchived)}}function Kn(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",11)(1,"worklenz-task-list-filters",12),t.NdJ("onGroupBy",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.onGroupByChange(o))})("onFilterByMember",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleFilterByMember(o))})("onFilterByLabel",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleFilterByLabel(o))})("onFilterByPriority",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleFilterByPriority(o))})("onFilterSortBy",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleFilterSortBy(o))})("onFilterSearch",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.handleFilterSearch(o))})("onPhaseSettingsClick",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.openAddColumnDrawer())})("onStatusSettingsClick",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.openStatusSettingsDrawer())}),t.qZA(),t.TgZ(2,"div",13),t._UZ(3,"worklenz-task-list-columns-toggle",14),t.ynx(4,15),t.YNc(5,Vn,3,1,"div",16),t.YNc(6,An,2,1,"label",17),t.BQk(),t.qZA()()}if(2&r){const O=t.oxw();t.xp6(1),t.Q6J("projectId",O.projectId),t.xp6(2),t.Q6J("projectId",O.projectId),t.xp6(1),t.Q6J("ngSwitch",O.loadingArchived),t.xp6(1),t.Q6J("ngSwitchCase",!0),t.xp6(1),t.Q6J("ngSwitchCase",!1)}}function eo(r,x){1&r&&(t.ynx(0),t._uU(1," There are no status groups to show in this project. "),t._UZ(2,"br"),t._uU(3," Please go to the "),t.TgZ(4,"b"),t._uU(5,'"Board"'),t.qZA(),t._uU(6," section to create status groups as you desire. "),t.BQk())}function to(r,x){if(1&r){const O=t.EpF();t.ynx(0),t._uU(1," There are no phases to show in this project. "),t._UZ(2,"br"),t._uU(3," You can "),t.TgZ(4,"button",26),t.NdJ("click",function(){t.CHM(O);const o=t.oxw(2);return t.KtG(o.openAddColumnDrawer())}),t.TgZ(5,"b")(6,"u"),t._uU(7,"Create"),t.qZA()()(),t._uU(8," Phases as you desire. "),t.BQk()}}function un(r,x){if(1&r&&(t.TgZ(0,"div",21)(1,"div",22),t._UZ(2,"img",23),t.qZA(),t.TgZ(3,"span",24),t.YNc(4,eo,7,0,"ng-container",25),t.YNc(5,to,9,0,"ng-container",25),t.qZA()()),2&r){const O=t.oxw();t.xp6(3),t.Q6J("ngSwitch",O.isGroupByPhase()),t.xp6(1),t.Q6J("ngSwitchCase",!1),t.xp6(1),t.Q6J("ngSwitchCase",!0)}}function _n(r,x){1&r&&(t.TgZ(0,"div",41),t._uU(1," No tasks available "),t.qZA())}function no(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"worklenz-task-list-row",46),t.NdJ("onOpenTask",function(o){t.CHM(O);const q=t.oxw(4);return t.KtG(q.openTask(o))}),t.qZA()}2&r&&t.Q6J("task",x.$implicit)}function jt(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"div",47,48)(3,"div",49),t._uU(4," \xa0 "),t.qZA(),t.TgZ(5,"div",50)(6,"worklenz-task-list-add-task-input",51,52),t.NdJ("focusChange",function(o){t.CHM(O);const q=t.MAs(2),w=t.MAs(7),y0=t.oxw(4);return t.KtG(y0.quickTaskFocusChange(o,q,w))}),t.qZA()()(),t.BQk()}if(2&r){const O=t.oxw(2).$implicit,i=t.oxw().$implicit,o=t.oxw();t.xp6(6),t.Q6J("projectId",o.projectId)("label","Add sub-task")("parentTask",O.id)("groupId",i.id)("subTaskInput",!0)}}function oo(r,x){if(1&r&&(t.ynx(0),t.TgZ(1,"div"),t.YNc(2,no,1,1,"worklenz-task-list-row",45),t.YNc(3,jt,8,5,"ng-container",44),t.qZA(),t.BQk()),2&r){const O=t.oxw().$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("ngForOf",O.sub_tasks)("ngForTrackBy",i.trackById),t.xp6(1),t.Q6J("ngIf",!i.showArchived&&i.projectId&&O.id&&O.show_sub_tasks)}}function u(r,x){if(1&r){const O=t.EpF();t.ynx(0),t.TgZ(1,"worklenz-task-list-row",42,43),t.NdJ("onShowSubTasks",function(o){t.CHM(O);const q=t.MAs(2),w=t.oxw().$implicit,y0=t.oxw();return t.KtG(y0.displaySubTasks(o,q,w.id))})("onOpenTask",function(o){t.CHM(O);const q=t.oxw(2);return t.KtG(q.openTask(o))}),t.qZA(),t.YNc(3,oo,4,3,"ng-container",44),t.BQk()}if(2&r){const O=x.$implicit,i=t.oxw(2);t.xp6(1),t.ekj("selected",(null==i.selectedTask?null:i.selectedTask.id)===O.id),t.Q6J("task",O),t.xp6(2),t.Q6J("ngIf",O.sub_tasks&&O.show_sub_tasks)}}function U(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"worklenz-task-list-add-task-input",56),t.NdJ("focusChange",function(o){t.CHM(O),t.oxw();const q=t.MAs(1),w=t.oxw(2);return t.KtG(w.handleFocusChange(o,q))}),t.qZA()}if(2&r){const O=t.oxw(2).$implicit,i=t.oxw();t.Q6J("projectId",i.projectId)("groupId",O.id)}}function b(r,x){if(1&r&&(t.TgZ(0,"div",53,54),t.YNc(2,U,1,2,"worklenz-task-list-add-task-input",55),t.qZA()),2&r){const O=t.oxw(2);t.xp6(2),t.Q6J("ngIf",O.projectId)}}function p(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"div",27)(1,"div",28)(2,"worklenz-task-list-group-settings",29),t.NdJ("toggle",function(o){t.CHM(O);const q=t.MAs(4),w=t.oxw();return t.KtG(w.toggleGroup(o,q))}),t.qZA(),t.TgZ(3,"div",30,31),t._UZ(5,"span",32),t.TgZ(6,"div",33)(7,"div",34,35),t.NdJ("cdkDropListDropped",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.onDrop(o))})("scroll",function(){t.CHM(O);const o=t.MAs(8),q=t.oxw();return t.KtG(q.onScroll(o))}),t.TgZ(9,"div",36)(10,"worklenz-task-list-header",37),t.NdJ("selectChange",function(o){const w=t.CHM(O).$implicit,y0=t.oxw();return t.KtG(y0.selectTasksInGroup(o,w))})("phaseSettingsClick",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.openAddColumnDrawer())}),t.qZA(),t.YNc(11,_n,2,0,"div",38),t.YNc(12,u,4,4,"ng-container",39),t.qZA()(),t.YNc(13,b,3,1,"div",40),t.qZA()()()()}if(2&r){const O=x.$implicit,i=t.oxw();t.xp6(2),t.Q6J("group",O)("projectId",i.projectId)("categories",i.categories),t.xp6(1),t.Udp("max-height",O.tasks.length?void 0:0),t.xp6(2),t.Udp("background",O.color_code),t.xp6(2),t.Q6J("id",O.id)("cdkDropListConnectedTo",i.groupIds)("cdkDropListData",O),t.xp6(3),t.Q6J("groupId",O.id),t.xp6(1),t.Q6J("ngIf",!O.tasks.length),t.xp6(1),t.Q6J("ngForOf",O.tasks)("ngForTrackBy",i.trackById),t.xp6(1),t.Q6J("ngIf",!i.showArchived)}}function z(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"worklenz-task-list-phase-settings-drawer",57),t.NdJ("showChange",function(o){t.CHM(O);const q=t.oxw();return t.KtG(q.displayPhaseModal=o)})("getGroups",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.refreshWithoutLoad())}),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("projectId",O.projectId)("show",O.displayPhaseModal)}}function C(r,x){if(1&r){const O=t.EpF();t.TgZ(0,"worklenz-status-form",58),t.NdJ("onCancel",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.showStatusModal=!1)})("onCreateOrUpdate",function(){t.CHM(O);const o=t.oxw();return t.KtG(o.onStatusCreateOrUpdate())}),t.qZA()}if(2&r){const O=t.oxw();t.Q6J("show",O.showStatusModal)("showStatusGroups",!1)("statusId",null)("projectId",O.projectId)}}let s0=(()=>{var r;class x{get loading(){return this.loadingColumns||this.loadingGroups||this.loadingFiltering||this.groupChanging}get defaultStatus(){return this.service.statuses.length?this.service.statuses[0].id:null}get groups(){return this.service.groups}constructor(i,o,q,w,y0,J0,m1,d1,N1,c1,ot,Qt,xt,So,Vt,yo,Bo,wo,Eo,lo,io){this.route=i,this.api=o,this.cdr=q,this.tmApi=w,this.labelsApi=y0,this.statusesApi=J0,this.prioritiesApi=m1,this.phasesApi=d1,this.ngZone=N1,this.map=c1,this.socket=ot,this.renderer=Qt,this.taskTemplates=xt,this.view=So,this.kanbanService=Vt,this.phaseService=yo,this.service=Bo,this.utils=wo,this.projectFormService=Eo,this.auth=lo,this.app=io,this.projectId=null,this.sortField=null,this.sortOrder=null,this.searchValue=null,this.statusesFilterString=null,this.membersFilterString=null,this.projectsFilterString=null,this.labelsFilterString=null,this.priorityFilterString=null,this.scrollBy=0,this.showArchived=!1,this.selected=!1,this.loadingGroups=!1,this.loadingMembers=!1,this.loadingColumns=!1,this.loadingLabels=!1,this.loadingStatuses=!1,this.loadingPriorities=!1,this.loadingPhases=!1,this.loadingCategories=!1,this.showTaskModal=!1,this.showTaskTemplatesDrawer=!1,this.loadingArchived=!1,this.loadingFiltering=!1,this.groupChanging=!1,this.displayPhaseModal=!1,this.checked=!1,this.indeterminate=!1,this.showStatusModal=!1,this.isScrolled=!1,this.taskId=null,this.selectedTask=null,this.groupIds=[],this.categories=[],this.scrolling=!1,this.handleSortOrderResponse=mt=>{for(const Ot of mt){const po=Ot.id;if(po){const hn=this.map.tasks.get(po);hn&&(hn.sort_order=Ot.sort_order,hn.completed_at=Ot.completed_at,this.map.tasks.set(po,hn))}}},this.projectId=this.route.snapshot.paramMap.get("id"),this.taskId=this.route.snapshot.queryParamMap.get("task"),this.route.queryParams.subscribe(mt=>{const Ot=mt.group;if(Ot)switch(Ot){case"status":default:this.service.setCurrentGroup(this.service.GROUP_BY_OPTIONS[0]);break;case"priority":this.service.setCurrentGroup(this.service.GROUP_BY_OPTIONS[1]);break;case"phase":this.service.setCurrentGroup(this.service.GROUP_BY_OPTIONS[2])}}),this.service.setProjectId(this.projectId),this.service.onTaskAddOrDelete$.pipe((0,N.sL)()).subscribe(mt=>{mt&&this.handleNewTaskReceive(mt)}),this.taskTemplates.onTemplateImport.pipe((0,N.sL)()).subscribe(()=>{this.getGroups(!0)}),this.service.onRefresh$.pipe((0,N.sL)()).subscribe(()=>{this.getGroups(!1)}),this.service.onRefreshSubtasksIncluded.pipe((0,N.sL)()).subscribe(()=>{this.getGroups(!1)}),this.view.onSelectTask.pipe((0,N.sL)()).subscribe(mt=>{const Ot=this.map.tasks.get(mt);Ot&&this.handleTaskSelectFromView(Ot)}),(0,J.T)(this.phaseService.onPhaseOptionsChange,this.view.onPhaseChange).pipe((0,B.h)(()=>this.service.getCurrentGroup().value===this.service.GROUP_BY_PHASE_VALUE),(0,N.sL)()).subscribe(()=>{this.getGroups(!1)}),this.projectFormService.onMemberAssignOrRemoveReProject.pipe((0,N.sL)()).subscribe(()=>{this.cdr.markForCheck(),this.getTeamMembers()})}ngOnInit(){this.service.isSubtasksIncluded=!1,S.JD.all([this.getGroups(!0),this.getColumns(),this.getTeamMembers(),this.getLabels(),this.getStatuses(),this.getPriorities(),this.getCategories(),this.getPhases()]),this.socket.on(g.C.TASK_SORT_ORDER_CHANGE.toString(),this.handleSortOrderResponse),c.s.track(n.RO),this.taskId&&this.projectId&&this.openTask({id:this.taskId,project_id:this.projectId})}ngOnDestroy(){this.ngZone.runOutsideAngular(()=>{this.service.reset(),this.service.groups=[],this.map.reset()}),this.socket.removeListener(g.C.TASK_SORT_ORDER_CHANGE.toString(),this.handleSortOrderResponse)}isGroupByPhase(){return this.service.getCurrentGroup().value===this.service.GROUP_BY_PHASE_VALUE}getConf(i){const o={id:this.projectId,field:this.sortField,order:this.sortOrder,search:this.searchValue,statuses:this.statusesFilterString,members:this.membersFilterString,projects:this.projectsFilterString,priorities:this.priorityFilterString,labels:this.labelsFilterString,archived:this.showArchived,group:this.service.getCurrentGroup().value,isSubtasksInclude:!1};return i&&(o.parent_task=i),o}displaySubTasks(i,o,q){var w=this;return(0,M.Z)(function*(){if(i.id||!i.sub_tasks_loading){if(!i.show_sub_tasks&&0===i.sub_tasks_count)return i.show_sub_tasks=!0,void(i.sub_tasks=[]);if(i.sub_tasks_loading=!0,i.show_sub_tasks=!i.show_sub_tasks,i.show_sub_tasks){i.sub_tasks=yield w.getSubTasks(i);for(const y0 of i.sub_tasks)w.map.add(q,y0)}else{for(const y0 of i.sub_tasks||[])w.map.deselectTask(y0);i.sub_tasks=[]}i.sub_tasks_loading=!1,o.detectChanges(),w.cdr.markForCheck()}})()}toggleGroup(i,o){this.ngZone.runOutsideAngular(()=>{const q=i.target;q&&(q.closest(".btn")?.classList.toggle("active"),this.renderer.setStyle(o,"max-height","0px"===o.style.maxHeight?o.scrollHeight+8+"px":"0px"))})}trackById(i,o){return o.id}checkTaskDependencyStatus(i,o){var q=this;return(0,M.Z)(function*(){if(!i||!o)return!1;const w=yield q.api.getTaskDependencyStatus(i,o);return!!w.done&&w.body.can_continue})()}onDrop(i){var o=this;return(0,M.Z)(function*(){const q=i.previousIndex,w=i.currentIndex,y0=i.previousContainer.data,J0=i.container.data;0==y0.tasks.length&&o.ngZone.runOutsideAngular(()=>{document.getElementById(`${i.previousContainer.id}`)?.closest("div")?.parentNode?.parentNode?.parentNode?.querySelector("button.collapse.active")?.classList.remove("active")});const m1=i.item.data,d1=J0.tasks[w]?.sort_order,N1=yield o.checkTaskDependencyStatus(m1?.id,J0.id);N1||o.app.notify("Incomplete Dependencies!",E.mU,!1),N1&&(o.socket.emit(g.C.TASK_SORT_ORDER_CHANGE.toString(),{project_id:o.service.getProjectId(),from_index:y0.tasks[q].sort_order,to_index:d1||J0.tasks[J0.tasks.length-1]?.sort_order||-1,to_last_index:!d1,from_group:y0.id,to_group:J0.id,group_by:o.service.getCurrentGroup().value,task:m1,team_id:o.auth.getCurrentSession()?.team_id}),o.socket.once(g.C.TASK_SORT_ORDER_CHANGE.toString(),()=>{o.socket.emit(g.C.GET_TASK_PROGRESS.toString(),m1.id)}),y0.id===J0.id?(0,e.bA)(i.container.data.tasks,q,w):((0,e.EA)(i.previousContainer.data.tasks,i.container.data.tasks,i.previousIndex,i.currentIndex),o.map.remove(m1),o.map.add(J0.id,m1),o.service.emitGroupChange(J0.id,m1.id,J0.color_code)),o.kanbanService.emitRefreshGroups(),c.s.track(n.b$))})()}openTask(i){this.selectedTask=i,this.showTaskModal=!0,this.cdr.markForCheck()}bulkUpdateSuccess(){var i=this;return(0,M.Z)(function*(){yield i.getGroups(!0)})()}onStatusCreateOrUpdate(){var i=this;return(0,M.Z)(function*(){yield i.getStatuses(),yield i.getGroups(!1)})()}toggleTaskTemplateDrawer(i){this.showTaskTemplatesDrawer=!0}onTaskTemplateCreate(){this.showTaskTemplatesDrawer=!1,this.map.deselectAll()}taskTemplateCancel(i){this.showTaskTemplatesDrawer=i}selectTasksInGroup(i,o){for(const q of o.tasks)i?this.map.selectTask(q):this.map.deselectTask(q)}mapTasks(i){for(const o of i){this.map.registerGroup(o);for(const q of o.tasks)q.start_date&&(q.start_date=new Date(q.start_date)),q.end_date&&(q.end_date=new Date(q.end_date))}}toggleFocusCls(i,o){i?this.renderer.addClass(o,this.service.HIGHLIGHT_COL_CLS):this.renderer.removeClass(o,this.service.HIGHLIGHT_COL_CLS)}onShowChange(i){i||(this.selectedTask=null)}handleNewTaskReceive(i){if(i.isSubTask){const o=this.rows.find(q=>q.id===i.taskId);o&&o.detectChanges()}this.cdr.markForCheck()}closeTask(){this.showTaskModal=!1,this.selectedTask=null,this.cdr.detectChanges()}handleTaskSelectFromView(i){var o=this;return(0,M.Z)(function*(){o.closeTask(),i&&(yield(0,v.nn)(),o.openTask(i))})()}handleFocusChange(i,o){this.ngZone.runOutsideAngular(()=>{this.toggleFocusCls(i,o)})}quickTaskFocusChange(i,o,q){this.ngZone.runOutsideAngular(()=>{this.toggleFocusCls(i,o)})}onGroupByChange(i){var o=this;return(0,M.Z)(function*(){o.service.setCurrentGroup(i),o.groupChanging=!0,yield o.getGroups(!0),setTimeout(()=>{o.groupChanging=!1,o.cdr.markForCheck()},100)})()}onArchiveChange(){var i=this;return(0,M.Z)(function*(){i.loadingGroups=!0,i.loadingArchived=!0,i.service.groups=[],i.showArchived&&c.s.track(n.Qk),yield i.getGroups(!0),i.loadingArchived=!1,i.cdr.markForCheck()})()}handleFilterByMember(i){var o=this;return(0,M.Z)(function*(){o.loadingFiltering=!0,o.membersFilterString=i.selection,o.service.isSubtasksIncluded=!!i.is_subtasks_included,yield o.getGroups(!0),o.loadingFiltering=!1,o.cdr.markForCheck()})()}handleFilterByLabel(i){var o=this;return(0,M.Z)(function*(){o.loadingFiltering=!0,o.labelsFilterString=i,yield o.getGroups(!0),o.loadingFiltering=!1,o.cdr.markForCheck()})()}handleFilterByPriority(i){var o=this;return(0,M.Z)(function*(){o.loadingFiltering=!0,o.priorityFilterString=i,yield o.getGroups(!0),o.loadingFiltering=!1,o.cdr.markForCheck()})()}handleFilterSortBy(i){var o=this;return(0,M.Z)(function*(){o.loadingFiltering=!0,o.sortField=i,yield o.getGroups(!0),o.loadingFiltering=!1,o.cdr.markForCheck()})()}handleFilterSearch(i){var o=this;return(0,M.Z)(function*(){o.loadingFiltering=!0,o.searchValue=i,yield o.getGroups(!0),o.loadingFiltering=!1,o.cdr.markForCheck()})()}getGroups(i=!0){var o=this;return(0,M.Z)(function*(){if(o.projectId){try{o.map.deselectAll(),o.loadingGroups=i;const q=o.getConf();q.isSubtasksInclude=o.service.isSubtasksIncluded;const w=yield o.api.getTaskListV2(q);if(w.done){const y0=(0,v.I8)(w.body);o.groupIds=y0.map(J0=>J0.id),o.mapTasks(y0),o.service.groups=y0}o.loadingGroups=!1}catch{o.loadingGroups=!1}o.cdr.markForCheck()}})()}getSubTasks(i){var o=this;return(0,M.Z)(function*(){let q=[];if(i?.id)try{const w=o.getConf(i.id),y0=yield o.api.getTaskListV2(w);y0.done&&(q=y0.body)}catch{}return q})()}getColumns(){var i=this;return(0,M.Z)(function*(){if(i.projectId)try{i.loadingColumns=!0;const o=yield i.api.getListCols(i.projectId);o.done&&(i.service.columns=o.body),i.loadingColumns=!1}catch{i.loadingColumns=!1}})()}getTeamMembers(){var i=this;return(0,M.Z)(function*(){try{i.loadingMembers=!0;const o=yield i.tmApi.getAll(i.projectId);o.done&&(i.service.members=o.body),i.loadingMembers=!1}catch{i.loadingMembers=!1}})()}getLabels(){var i=this;return(0,M.Z)(function*(){try{i.loadingLabels=!0;const o=yield i.labelsApi.get(i.projectId);o.done&&(i.service.labels=o.body),i.loadingLabels=!1}catch{i.loadingLabels=!1}})()}getStatuses(){var i=this;return(0,M.Z)(function*(){if(i.projectId)try{i.loadingStatuses=!0;const o=yield i.statusesApi.get(i.projectId);o.done&&(i.service.statuses=o.body),i.loadingStatuses=!1}catch{i.loadingStatuses=!1}})()}getPriorities(){var i=this;return(0,M.Z)(function*(){try{i.loadingPriorities=!0;const o=yield i.prioritiesApi.get();o.done&&(i.service.priorities=o.body),i.loadingPriorities=!1}catch{i.loadingPriorities=!1}})()}getCategories(){var i=this;return(0,M.Z)(function*(){try{i.loadingCategories=!0;const o=yield i.statusesApi.getCategories();o.done&&(i.categories=o.body),i.loadingCategories=!1}catch{i.loadingCategories=!1}})()}getPhases(){var i=this;return(0,M.Z)(function*(){if(i.projectId)try{i.loadingPhases=!0;const o=yield i.phasesApi.get(i.projectId);o.done&&(i.service.phases=o.body),i.loadingPhases=!1}catch{i.loadingPhases=!1}})()}onScroll(i){this.ngZone.runOutsideAngular(()=>{const o="scrolling-panel";this.scrollBy=i.scrollLeft,this.scrollBy>0?i.classList.add(o):i.classList.remove(o)})}debounce(i,o){let q;return(...w)=>{clearTimeout(q),q=setTimeout(()=>i.apply(this,w),o)}}openAddColumnDrawer(){this.displayPhaseModal=!0}openStatusSettingsDrawer(){this.showStatusModal=!0}refreshWithoutLoad(){var i=this;return(0,M.Z)(function*(){yield i.getGroups(!1)})()}}return(r=x).\u0275fac=function(i){return new(i||r)(t.Y36(v0.gz),t.Y36(a0.c),t.Y36(t.sBO),t.Y36(I.B),t.Y36(n0.u),t.Y36(f0.w),t.Y36(H.s),t.Y36(j0.f),t.Y36(t.R0b),t.Y36(Z0.g),t.Y36(R0.s),t.Y36(t.Qsj),t.Y36(p1.e),t.Y36(T0.f),t.Y36(D0.m),t.Y36(A0.u),t.Y36(Z.b),t.Y36(p0.F),t.Y36(Q.s),t.Y36(V.e),t.Y36(r0.z))},r.\u0275cmp=t.Xpm({type:r,selectors:[["worklenz-task-list-table"]],viewQuery:function(i,o){if(1&i&&(t.Gf(Qn,5),t.Gf(kt,5)),2&i){let q;t.iGM(q=t.CRH())&&(o.rows=q),t.iGM(q=t.CRH())&&(o.scrollPanels=q)}},hostBindings:function(i,o){1&i&&t.NdJ("scroll",function(w){return o.onScroll(w.target)})},decls:11,vars:18,consts:[["class","align-items-center d-flex justify-content-between mb-3",4,"ngIf"],[3,"nzActive","nzLoading"],["class","pt-5 pb-5",4,"ngIf"],["cdkDropListGroup","",1,"tasks-wrapper"],["class","mb-3",4,"rxFor","rxForOf","rxForTrackBy"],[3,"show","selfResetTaskId","projectId","taskId","showChange"],[3,"selectedStatus","filteredAsArchived","bulkUpdateSuccess","labelsUpdate","taskTemplateClicked"],[3,"drawerVisible","onCreateOrUpdate","onCancelClick"],[3,"archived","projectId","groups"],[3,"projectId","show","showChange","getGroups",4,"ngIf"],["action","Create",3,"show","showStatusGroups","statusId","projectId","onCancel","onCreateOrUpdate",4,"ngIf"],[1,"align-items-center","d-flex","justify-content-between","mb-3"],[3,"projectId","onGroupBy","onFilterByMember","onFilterByLabel","onFilterByPriority","onFilterSortBy","onFilterSearch","onPhaseSettingsClick","onStatusSettingsClick"],[1,"d-flex","align-items-center","flex-row-reverse"],[3,"projectId"],[3,"ngSwitch"],["class","me-2",4,"ngSwitchCase"],["nz-checkbox","","class","me-2",3,"nzChecked","nzCheckedChange",4,"ngSwitchCase"],[1,"me-2"],["nz-icon","",3,"nzType"],["nz-checkbox","",1,"me-2",3,"nzChecked","nzCheckedChange"],[1,"pt-5","pb-5"],[1,"no-data-img-holder","mx-auto","mb-4"],["src","/assets/images/empty-box.webp","alt","",1,"img-fluid"],["nz-typography","",1,"mx-auto","d-block","text-center","no-data-text",2,"width","max-content",3,"ngSwitch"],[4,"ngSwitchCase"],["nz-button","","nzType","link",1,"p-0",3,"click"],[1,"mb-3"],[1,"container","px-0"],[3,"group","projectId","categories","toggle"],[1,"panel","position-relative"],["panel",""],[1,"panel-left-border"],[1,"tasks-table","position-relative"],["cdkDropList","",1,"container","px-0","table-container","table-1",3,"id","cdkDropListConnectedTo","cdkDropListData","cdkDropListDropped","scroll"],["scrollPanel",""],[1,"border-right"],[3,"groupId","selectChange","phaseSettingsClick"],["class","tasks-empty-placeholder d-flex align-items-center mb-0 ps-3","nz-typography","","nzType","secondary",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","new-task-input",4,"ngIf"],["nz-typography","","nzType","secondary",1,"tasks-empty-placeholder","d-flex","align-items-center","mb-0","ps-3"],[3,"task","onShowSubTasks","onOpenTask"],["row",""],[4,"ngIf"],[3,"task","onOpenTask",4,"ngFor","ngForOf","ngForTrackBy"],[3,"task","onOpenTask"],[1,"d-flex","inner-subtask-create","cursor-pointer","sub-task-background-color"],["td",""],[1,"new-subtask-divider"],[1,"w-100"],[3,"projectId","label","parentTask","groupId","subTaskInput","focusChange"],["subTaskInput",""],[1,"new-task-input"],["td1",""],[3,"projectId","groupId","focusChange",4,"ngIf"],[3,"projectId","groupId","focusChange"],[3,"projectId","show","showChange","getGroups"],["action","Create",3,"show","showStatusGroups","statusId","projectId","onCancel","onCreateOrUpdate"]],template:function(i,o){1&i&&(t.YNc(0,Kn,7,5,"div",0),t.TgZ(1,"nz-skeleton",1),t.YNc(2,un,6,3,"div",2),t.TgZ(3,"div",3),t.YNc(4,p,14,15,"div",4),t.qZA()(),t.TgZ(5,"worklenz-task-view",5),t.NdJ("showChange",function(w){return o.showTaskModal=w})("showChange",function(w){return o.onShowChange(w)}),t.qZA(),t.TgZ(6,"worklenz-task-list-bulk-actions",6),t.NdJ("bulkUpdateSuccess",function(){return o.bulkUpdateSuccess()})("labelsUpdate",function(){return o.getLabels()})("taskTemplateClicked",function(w){return o.toggleTaskTemplateDrawer(w)}),t.qZA(),t.TgZ(7,"worklenz-task-template-drawer",7),t.NdJ("onCreateOrUpdate",function(){return o.onTaskTemplateCreate()})("onCancelClick",function(w){return o.taskTemplateCancel(w)}),t.qZA(),t._UZ(8,"worklenz-task-list-context-menu",8),t.YNc(9,z,1,2,"worklenz-task-list-phase-settings-drawer",9),t.YNc(10,C,1,4,"worklenz-status-form",10)),2&i&&(t.Q6J("ngIf",o.projectId),t.xp6(1),t.Q6J("nzActive",!0)("nzLoading",o.loading),t.xp6(1),t.Q6J("ngIf",!o.groups.length),t.xp6(2),t.Q6J("rxForOf",o.groups)("rxForTrackBy",o.trackById),t.xp6(1),t.Q6J("show",o.showTaskModal)("selfResetTaskId",!1)("projectId",(null==o.selectedTask?null:o.selectedTask.project_id)||null)("taskId",(null==o.selectedTask?null:o.selectedTask.id)||null),t.xp6(1),t.Q6J("selectedStatus",o.defaultStatus)("filteredAsArchived",o.showArchived),t.xp6(1),t.Q6J("drawerVisible",o.showTaskTemplatesDrawer),t.xp6(1),t.Q6J("archived",o.showArchived)("projectId",o.projectId)("groups",o.groups),t.xp6(1),t.Q6J("ngIf",o.projectId),t.xp6(1),t.Q6J("ngIf",o.projectId))},dependencies:[h0.sg,h0.O5,h0.RF,h0.n9,O1.ix,N0.w,H0.Ls,e0.Ie,X0.ZU,e.Fd,c0.ng,e.Wj,b0._,E0.E,B0.x,U0.J,z1.W,be,Y,C0,A,Et,Bn,$n,jn],styles:['.task-status-color[_ngcontent-%COMP%]{border-width:1.4px;border-style:solid;border-radius:4px;width:1px}.task-name-color[_ngcontent-%COMP%]{height:20px;margin:auto;border-color:#a9a9a9;background-color:#a9a9a9;position:absolute;top:0;bottom:0;left:0;border-width:1.2px}.editable-cell[_ngcontent-%COMP%]{white-space:nowrap;max-width:255px;overflow:hidden;text-overflow:ellipsis}nz-date-picker[_ngcontent-%COMP%]{background:transparent}.expanded[_ngcontent-%COMP%]{transform:rotate(-90deg)}.dropdown-highlight[_ngcontent-%COMP%]{padding:1px}.highlight-col[_ngcontent-%COMP%]{border:1px solid #1890ff!important}.dropdown-highlight[_ngcontent-%COMP%]:hover{background-color:#d0eefa54;border:#5587f5 1px solid;border-radius:3px}.pointer-text[_ngcontent-%COMP%]{cursor:text}.plus-icon[_ngcontent-%COMP%]{display:none;position:absolute;right:0;z-index:9;background-color:#e2e7ea}tr[_ngcontent-%COMP%]:hover .plus-icon[_ngcontent-%COMP%]{display:block}.selected[_ngcontent-%COMP%], .selected[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%], .selected[_ngcontent-%COMP%] .task-drag-handler[_ngcontent-%COMP%]{background:rgba(24,144,255,.0784313725)!important}.sub-task-background-color[_ngcontent-%COMP%]{background-color:#f5f5f58a}.drop-down-btn[_ngcontent-%COMP%] .anticon-caret-down[_ngcontent-%COMP%]{color:#000000a6}div[_ngcontent-%COMP%]{box-sizing:border-box}.flex-table[_ngcontent-%COMP%]{display:flex;width:max-content}.table-container[_ngcontent-%COMP%]{overflow:auto;display:flex}.tasks-table[_ngcontent-%COMP%]{width:max-content;margin-left:3px;border-right:1px solid #f0f0f0}.column-trigger[_ngcontent-%COMP%]{background-color:#f4f5f7;height:40px;width:40px;justify-content:center;display:flex;align-items:center}.header[_ngcontent-%COMP%]{margin-bottom:0;position:sticky;top:0;background-color:#fff;z-index:2}.header[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{padding:4px 11px;background-color:#fafafa;border-top:1px solid #f0f0f0;border-bottom:1px solid #f0f0f0;border-right:1px solid #f0f0f0;display:flex;align-items:center;flex-direction:row}.br-right[_ngcontent-%COMP%]{border-right:1px solid #f0f0f0}.task-check[_ngcontent-%COMP%]{text-align:center;padding:8px 6px 8px 0!important;position:sticky;left:24px;z-index:1}.task-key[_ngcontent-%COMP%]{width:85px}.task-arrow[_ngcontent-%COMP%]{width:24px;padding:0!important;display:flex;align-items:center;border:none!important;position:sticky;left:47px;z-index:1}.task-name[_ngcontent-%COMP%]{width:450px;min-width:450px;position:sticky;left:71px;z-index:1;background-color:#fff}.task-name[_ngcontent-%COMP%] nz-filter-trigger[_ngcontent-%COMP%]{margin-left:auto}.task-description[_ngcontent-%COMP%]{width:225px}.task-progress[_ngcontent-%COMP%]{width:80px}.task-members[_ngcontent-%COMP%]{width:160px}.task-labels[_ngcontent-%COMP%]{width:210px}.task-status[_ngcontent-%COMP%], .task-priority[_ngcontent-%COMP%], .task-time-tracking[_ngcontent-%COMP%], .task-estimation[_ngcontent-%COMP%]{width:120px}.task-start-date[_ngcontent-%COMP%], .task-due-date[_ngcontent-%COMP%], .task-completed-date[_ngcontent-%COMP%], .task-created-date[_ngcontent-%COMP%], .task-update-date[_ngcontent-%COMP%]{width:150px}.task-drag-handler[_ngcontent-%COMP%]{padding:0 0 0 4px!important;width:24px;border-bottom:1px solid #f0f0f0;border-right:none!important;position:sticky;left:0}.inner-subtask-create[_ngcontent-%COMP%]{height:42px;display:flex;align-items:center;max-width:1316px;overflow:hidden;background-color:#fafafa;position:sticky;left:0;border-bottom:1px solid #eaeaea;border-top:1px solid #eaeaea}@media (max-width: 1400px){.inner-subtask-create[_ngcontent-%COMP%]{max-width:1136px}}@media (max-width: 1200px){.inner-subtask-create[_ngcontent-%COMP%]{max-width:956px}}.inner-subtask-create.highlight-col[_ngcontent-%COMP%]{background-color:#fff}.new-subtask-divider[_ngcontent-%COMP%]{width:50px}.new-subtask-divider.divider-large[_ngcontent-%COMP%]{width:135px}worklenz-quick-task[_ngcontent-%COMP%]{display:block}.overflow-x-auto[_ngcontent-%COMP%]{overflow-x:auto;overflow-y:hidden}.panel[_ngcontent-%COMP%]{padding:0;background-color:#fff;max-height:calc(100% + 8px);overflow:hidden;transition:max-height .1s ease-out;border-right:1px solid #f0f0f0}.panel-left-border[_ngcontent-%COMP%]{position:absolute;content:"";top:0;bottom:0;width:3px;z-index:3;border-bottom-left-radius:4px}.collapse.btn[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%]{transition:transform .1s;transform:rotate(0)}.collapse.btn.active[_ngcontent-%COMP%] .collapse-icon[_ngcontent-%COMP%]{transition:transform .1s;transform:rotate(90deg)}.drop-down-btn[_ngcontent-%COMP%]{padding:4px 11px}.drop-down-btn[_ngcontent-%COMP%] .anticon-caret-down[_ngcontent-%COMP%]{color:#d9d9d9}.status-color[_ngcontent-%COMP%]{width:11px;height:11px;border-radius:2px;margin-right:7px}.drop-down-btn[_ngcontent-%COMP%] nz-badge[_ngcontent-%COMP%]{margin-top:-2px}.drop-down-btn.active[_ngcontent-%COMP%]{color:#1890ff;border-color:#1890ff;background-color:#e6f7ff}.drop-down-btn.active[_ngcontent-%COMP%] .drop-down-btn[_ngcontent-%COMP%] .anticon-caret-down[_ngcontent-%COMP%]{color:#1890ff}.ant-badge-count-sm[_ngcontent-%COMP%]{font-size:11px}.tab-name-edit[_ngcontent-%COMP%]{overflow:hidden}.tab-name-edit[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{margin-right:0;font-size:14px}.tab-name-edit[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{margin-right:0}.new-task-input[_ngcontent-%COMP%]{padding-left:4px;padding-top:4px;padding-bottom:4px;border-bottom:1px solid #f0f0f0;border-top:1px solid #f0f0f0;max-width:1316px;overflow-x:auto}@media (max-width: 1400px){.new-task-input[_ngcontent-%COMP%]{max-width:1136px}}@media (max-width: 1200px){.new-task-input[_ngcontent-%COMP%]{max-width:956px}}.tasks-empty-placeholder[_ngcontent-%COMP%]{width:100%;height:42px;background:#fafafa}.no-data-img-holder[_ngcontent-%COMP%]{width:100px;margin-top:42px}.add-field-button[_ngcontent-%COMP%]{position:absolute;top:46px;right:0}'],changeDetection:0}),x})()},29666:(r1,S0,s)=>{"use strict";s.d(S0,{V:()=>x0});var M=s(55522),e=s(88229),c=s(70532),n=s(96814),J=s(60095),B=s(9172),g=s(96928),v=s(33640),N=s(42840),S=s(62612),E=s(52682),t=s(62787),v0=s(60804),a0=s(3599),I=s(62595),n0=s(20824),f0=s(16976),H=s(19035),j0=s(57417),Z0=s(48128),R0=s(9691),p1=s(24139),T0=s(92574),D0=s(82669),A0=s(13740),Z=s(55695),p0=s(96109),Q=s(8083),V=s(99183),r0=s(8660),h0=s(29232),O1=s(35420),N0=s(8180),H0=s(65879);const e0=[{path:"",component:N0.m}];let X0=(()=>{var n1;class h1{}return(n1=h1).\u0275fac=function(L0){return new(L0||n1)},n1.\u0275mod=H0.oAB({type:n1}),n1.\u0275inj=H0.cJS({imports:[O1.Bz.forChild(e0),O1.Bz]}),h1})();var c0=s(29402),b0=s(6192),E0=s(66987),B0=s(40844),U0=s(43389),z1=s(48522),Q0=s(77835);let x0=(()=>{var n1;class h1{}return(n1=h1).\u0275fac=function(L0){return new(L0||n1)},n1.\u0275mod=H0.oAB({type:n1}),n1.\u0275inj=H0.cJS({providers:[B.g],imports:[n.ez,X0,J.u5,a0.U5,N.sL,t.b1,I.PV,S.Wr,Q.ZJ,v.mS,n0.o7,g.Rt,p0.cg,p1.H0,A0.HQ,T0.zf,Z.X,Z0.W,V.o,J.UX,R0.LV,r0.o,h0.D,j0.$6,v0.Xo,f0.Ph,E.Hb,c.Cl,e.z,M.x,H._p,D0.j,b0.YS,c0.J,E0.S,B0.w,U0.BL,z1.a,Q0.W]}),h1})()},55416:(r1,S0,s)=>{"use strict";s.d(S0,{b:()=>g});var M=s(78645),e=s(65619),c=s(94489),n=s(65879),J=s(975),B=s(78027);let g=(()=>{var v;class N{get _currentGroup(){const E=localStorage.getItem("worklenz.tasklist.group_by");if(E){const t=this.GROUP_BY_OPTIONS.find(v0=>v0.value===E);if(t)return t}return this.GROUP_BY_OPTIONS[0]}set _currentGroup(E){localStorage.setItem("worklenz.tasklist.group_by",E.value)}set columns(E){this._cols=E,this.emitColsChange()}get columns(){return this._cols}set members(E){this._members=E,this.membersSbj$.next()}get members(){return this._members}set labels(E){this._labels=E,this.labelsSbj$.next()}get labels(){return this._labels}set priorities(E){this._priorities=E,this.prioritiesSbj$.next()}get priorities(){return this._priorities}set phases(E){this._phases=E,this.phasesSbj$.next()}get phases(){return this._phases}get onColumnsChange$(){return this.colsSbj$.asObservable()}get onMembersChange$(){return this.membersSbj$.asObservable()}get onLabelsChange$(){return this.labelsSbj$.asObservable()}get onStatusesChange$(){return this.statusesSbj$.asObservable()}get onPrioritiesChange$(){return this.prioritiesSbj$.asObservable()}get onContextMenu$(){return this.contextMenuSbj$.asObservable()}get onAssignMe$(){return this.assignMeSbj$.asObservable()}get onTaskAddOrDelete$(){return this.taskAddOrDeleteSbj$.asObservable()}get onGroupChange$(){return this.groupChangeSbj$.asObservable()}get onRefresh$(){return this.refreshSbj$.asObservable()}get onInviteClick$(){return this.inviteMemberSbj$.asObservable()}get onPhaseChange$(){return this.phasesSbj$.asObservable()}get onGroupProgressChangeDone$(){return this.updateGroupProgressSbj$.asObservable()}set statuses(E){this._statuses=E,this.statusesSbj$.next()}get statuses(){return this._statuses}get onRefreshSubtasksIncluded(){return this.refreshSubtasksIncludedSbj$.asObservable()}constructor(E,t){this.socket=E,this.map=t,this.colsSbj$=new M.x,this.membersSbj$=new M.x,this.labelsSbj$=new M.x,this.statusesSbj$=new M.x,this.prioritiesSbj$=new M.x,this.contextMenuSbj$=new M.x,this.assignMeSbj$=new M.x,this.taskAddOrDeleteSbj$=new e.X(null),this.refreshSbj$=new M.x,this.groupChangeSbj$=new M.x,this.inviteMemberSbj$=new M.x,this.phasesSbj$=new M.x,this.updateGroupProgressSbj$=new M.x,this.refreshSubtasksIncludedSbj$=new M.x,this.HIGHLIGHT_COL_CLS="highlight-col",this.COLUMN_KEYS={KEY:"KEY",NAME:"NAME",DESCRIPTION:"DESCRIPTION",PROGRESS:"PROGRESS",ASSIGNEES:"ASSIGNEES",LABELS:"LABELS",STATUS:"STATUS",PRIORITY:"PRIORITY",TIME_TRACKING:"TIME_TRACKING",ESTIMATION:"ESTIMATION",START_DATE:"START_DATE",DUE_DATE:"DUE_DATE",COMPLETED_DATE:"COMPLETED_DATE",CREATED_DATE:"CREATED_DATE",LAST_UPDATED:"LAST_UPDATED",REPORTER:"REPORTER",PHASE:"PHASE"},this.GROUP_BY_STATUS_VALUE="status",this.GROUP_BY_PRIORITY_VALUE="priority",this.GROUP_BY_PHASE_VALUE="phase",this.GROUP_BY_OPTIONS=[{label:"Status",value:this.GROUP_BY_STATUS_VALUE},{label:"Priority",value:this.GROUP_BY_PRIORITY_VALUE},{label:"Phase",value:this.GROUP_BY_PHASE_VALUE}],this.groups=[],this._projectId=null,this._cols=[],this._members=[],this._labels=[],this._statuses=[],this._priorities=[],this._phases=[],this.isSubtasksIncluded=!1}canActive(E){return!!this.columns.find(t=>t.key===E)?.pinned}setProjectId(E){this._projectId=E}getProjectId(){return this._projectId}setCurrentGroup(E){this._currentGroup=E}getCurrentGroup(){return this._currentGroup}emitColsChange(){this.colsSbj$.next()}emitOnContextMenu(E,t){this.contextMenuSbj$.next({event:E,task:t})}emitOnAssignMe(E){this.assignMeSbj$.next(E)}emitRefresh(){this.refreshSbj$.next()}emitGroupChange(E,t,v0){this.groupChangeSbj$.next({groupId:E,taskId:t,color:v0})}emitInviteMembers(){this.inviteMemberSbj$.next()}emitTaskAddOrDelete(E,t){this.taskAddOrDeleteSbj$.next({taskId:E,isSubTask:t})}emitUpdateGroupProgress(E){this.updateGroupProgressSbj$.next({taskId:E})}emitRefreshSubtasksIncluded(){this.refreshSubtasksIncludedSbj$.next()}getGroupIdByGroupedColumn(E){const t=this.getCurrentGroup().value;return t===this.GROUP_BY_STATUS_VALUE?E.status:t===this.GROUP_BY_PRIORITY_VALUE?E.priority:t===this.GROUP_BY_PHASE_VALUE?E.phase_id:null}updateTaskGroup(E,t=!0){if(!E.id)return;const v0=this.getGroupIdByGroupedColumn(E);v0&&(this.deleteTask(E.id),this.addTask(E,v0,t),this.emitUpdateGroupProgress(E.id))}deleteTask(E,t=null){const v0=this.map.getGroupId(E);if(!v0||!E)return;const a0=this.groups.find(n0=>n0.id===v0);if(!a0)return;const I=this.map.getSelectedTasks().find(n0=>n0.id===E);if(I?.is_sub_task){const n0=a0.tasks.find(f0=>f0.id===I.parent_task_id);if(n0){const f0=n0.sub_tasks?.findIndex(H=>H.id===I.id);typeof f0<"u"&&-1!==f0&&(n0.sub_tasks_count||(n0.sub_tasks_count=0),n0.sub_tasks_count=Math.max(+n0.sub_tasks_count-1,0),n0.sub_tasks?.splice(f0,1),this.emitTaskAddOrDelete(n0.id,!0))}this.socket.emit(c.C.GET_TASK_PROGRESS.toString(),n0?.id),this.map.remove(I)}else{const n0=t??a0.tasks.findIndex(f0=>f0.id===E);-1!==n0&&(this.map.remove(a0.tasks[n0]),a0.tasks.splice(n0,1),this.emitTaskAddOrDelete(E,!1))}this.map.deselectAll()}removeSubtask(E,t=null){const v0=this.map.getGroupId(E);if(!v0||!E)return;const a0=this.groups.find(n0=>n0.id===v0);if(!a0)return;const I=t??a0.tasks.findIndex(n0=>n0.id===E);-1!==I&&(this.map.remove(a0.tasks[I]),a0.tasks.splice(I,1)),this.map.deselectAll()}addTask(E,t,v0=!1){const a0=this.groups.find(I=>I.id===t);if(a0&&E.id){if(E.parent_task_id){const I=a0.tasks.find(n0=>n0.id===E.parent_task_id);I&&(I.sub_tasks_count||(I.sub_tasks_count=0),I.sub_tasks_count=+I.sub_tasks_count+1,I.sub_tasks?.push(E),this.socket.emit(c.C.GET_TASK_PROGRESS.toString(),I?.id))}else v0?a0.tasks.unshift(E):a0.tasks.push(E);this.map.add(t,E),this.emitTaskAddOrDelete(E.parent_task_id,!!E.parent_task_id)}}reset(){this._cols=[],this._members=[],this._labels=[],this._statuses=[],this._priorities=[],this._projectId=null,this.groups=[],this.isSubtasksIncluded=!1}}return(v=N).\u0275fac=function(E){return new(E||v)(n.LFG(J.s),n.LFG(B.g))},v.\u0275prov=n.Yz7({token:v,factory:v.\u0275fac,providedIn:"root"}),N})()},18223:(r1,S0,s)=>{"use strict";s.d(S0,{m:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this.id=null,this.projectOwnerTeamMemberId=null,this.newTaskCreatedSbj$=new M.x}get onNewTaskCreated(){return this.newTaskCreatedSbj$.asObservable()}emitNewTaskCreated(g){this.newTaskCreatedSbj$.next(g)}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},84676:(r1,S0,s)=>{"use strict";s.d(S0,{Z:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this.width=0,this.top=0,this.left=0,this.opacity=0,this.transition=.15,this.innerLoading=!1,this.highlighterLeft=0,this.highlighterWidth=0,this.projects=[],this.contextMenuSbj$=new M.x,this.projectRefresh$Sbj=new M.x,this.scheduleRefresh$Sbj=new M.x,this.scheduleProjectRefresh$Sbj=new M.x,this.resetAllocator$Sbj=new M.x,this.projectToggle$Sbj=new M.x,this.reload$Sbj=new M.x}get onProjectIndicatorChange(){return this.projectRefresh$Sbj.asObservable()}get onMemberIndicatorChange(){return this.scheduleRefresh$Sbj.asObservable()}get onMemberProjectIndicatorChange(){return this.scheduleProjectRefresh$Sbj.asObservable()}get onResetAllocator(){return this.resetAllocator$Sbj.asObservable()}get onContextMenu$(){return this.contextMenuSbj$.asObservable()}get onProjectToggle$(){return this.projectToggle$Sbj.asObservable()}get onReload(){return this.reload$Sbj.asObservable()}emitProjectToggle(g){this.projectToggle$Sbj.next(g)}emitOnContextMenu(g,v,N,S){this.contextMenuSbj$.next({event:g,projectId:v,teamMemberId:N,ids:S})}emitProjectIndicatorChange(g,v,N){this.projectRefresh$Sbj.next({projectId:g,indicatorOffset:v,indicatorWidth:N})}emitMemberIndicatorChange(g,v){this.scheduleRefresh$Sbj.next({projectId:g,teamMemberId:v})}emitMemberProjectIndicatorChange(g,v,N){this.scheduleProjectRefresh$Sbj.next({projectId:g,teamMemberId:v,isProjectRefresh:N})}emitResetAllocator(){this.resetAllocator$Sbj.next()}emitReload(){this.reload$Sbj.next()}toggleProject(g){const v=this.projects.find(N=>N.id===g);v&&(v.is_expanded=!v.is_expanded,this.emitProjectToggle(g))}updateMemberAllocation(g,v,N){const S=this.projects.find(t=>t.id===g);if(!S)return;N.project_allocation.indicator_offset=N.project_allocation.indicator_offset?N.project_allocation.indicator_offset:0,N.project_allocation.indicator_width=N.project_allocation.indicator_width?N.project_allocation.indicator_width:0,this.emitProjectIndicatorChange(g,N.project_allocation.indicator_offset,N.project_allocation.indicator_width);const E=S.members.find(t=>t.team_member_id===v);E&&(E.allocations=N.member_allocations,this.emitResetAllocator())}updateProjectAllocation(g,v){this.projects.find(S=>S.id===g)&&(v.project_allocation.indicator_offset=v.project_allocation.indicator_offset?v.project_allocation.indicator_offset:0,v.project_allocation.indicator_width=v.project_allocation.indicator_width?v.project_allocation.indicator_width:0,this.emitProjectIndicatorChange(g,v.project_allocation.indicator_offset,v.project_allocation.indicator_width),this.emitResetAllocator())}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},76643:(r1,S0,s)=>{"use strict";s.d(S0,{l:()=>n});var M=s(16676),e=s.n(M),c=s(65879);let n=(()=>{var J;class B{constructor(){this.currentDate=e()(),this.currentYear=e()().year()}transform(v){if(v){const N=this.currentDate,S=(E,t)=>e()(v).isSame(E,t);return e()(v).year()==this.currentYear?e()(v).isSame(N.clone(),"day")?"Today":S(N.clone().subtract(1,"day"),"day")?"Yesterday":S(N.clone().add(1,"day"),"day")?"Tomorrow":e()(v).format("MMM DD").toString():e()(v).format("MMM DD, YYYY").toString()}return null}}return(J=B).\u0275fac=function(v){return new(v||J)},J.\u0275pipe=c.Yjl({name:"dateFormatter",type:J,pure:!0,standalone:!0}),B})()},44889:(r1,S0,s)=>{"use strict";s.d(S0,{p:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,g){return B?g&&B.length>g?B.substring(0,g).concat("..."):B:null}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"ellipsis",type:c,pure:!0,standalone:!0}),n})()},76271:(r1,S0,s)=>{"use strict";s.d(S0,{m:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B){const g=String(B);return"null"===g||"undefined"===g||"NaN"===g?"":g}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"safeString",type:c,pure:!0,standalone:!0}),n})()},9172:(r1,S0,s)=>{"use strict";s.d(S0,{g:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,g){return g?B.filter(v=>v.name?.toLowerCase().includes(g.toLowerCase())):B}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"searchByName",type:c,pure:!0,standalone:!0}),n})()},86211:(r1,S0,s)=>{"use strict";s.d(S0,{M:()=>c});var M=s(21406),e=s(65879);let c=(()=>{var n;class J{transform(g,...v){return g?g+M.Yj:""}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275pipe=e.Yjl({name:"withAlpha",type:n,pure:!0,standalone:!0}),J})()},27476:(r1,S0,s)=>{"use strict";s.d(S0,{g:()=>e});var M=s(65879);let e=(()=>{var c;class n{transform(B,...g){return Array.isArray(B)?B:[]}}return(c=n).\u0275fac=function(B){return new(B||c)},c.\u0275pipe=M.Yjl({name:"wlSafeArray",type:c,pure:!0,standalone:!0}),n})()},44568:(r1,S0,s)=>{"use strict";s.d(S0,{J:()=>B});var M=s(26857),e=s(10708),c=s(69649),n=s(65879),J=s(69862);let B=(()=>{var g;class v extends M.P{constructor(S){super(),this.http=S}createTaskAttachment(S){return this._post(this.http,`${this.API_BASE_URL}/attachments/tasks`,S)}createAvatarAttachment(S){return this._post(this.http,`${this.API_BASE_URL}/attachments/avatar`,S)}getTaskAttachment(S){return this._get(this.http,`${this.API_BASE_URL}/attachments/tasks/${S}`)}getProjectAttachment(S,E,t){return this._get(this.http,`${this.API_BASE_URL}/attachments/project/${S}${(0,c.UK)({index:E,size:t})}`)}deleteTaskAttachment(S){return(0,e.n)(this.http.delete(`${this.API_BASE_URL}/attachments/tasks/${S}`))}download(S,E){return this._get(this.http,`${this.API_BASE_URL}/attachments/download?id=${S}&file=${E}`)}}return(g=v).\u0275fac=function(S){return new(S||g)(n.LFG(J.eN))},g.\u0275prov=n.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"}),v})()},38365:(r1,S0,s)=>{"use strict";s.d(S0,{s:()=>n});var M=s(26857),e=s(65879),c=s(69862);let n=(()=>{var J;class B extends M.P{constructor(v){super(),this.http=v,this.root=`${this.API_BASE_URL}/sub-tasks`}get(v){return this._get(this.http,`${this.root}/${v}`)}getSubTasksForRoadMap(v,N){return this._post(this.http,`${this.root}/roadmap/${v}`,N)}getNames(v){return this._get(this.http,`${this.root}/names/${v}`)}update(v,N){return this._put(this.http,`${this.root}/${N}`,v)}}return(J=B).\u0275fac=function(v){return new(v||J)(e.LFG(c.eN))},J.\u0275prov=e.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),B})()},8725:(r1,S0,s)=>{"use strict";s.d(S0,{u:()=>J});var M=s(26857),e=s(69649),c=s(65879),n=s(69862);let J=(()=>{var B;class g extends M.P{constructor(N){super(),this.http=N,this.root=`${this.API_BASE_URL}/labels`}get(N=null){const S=(0,e.UK)({project:N});return this._get(this.http,`${this.root}${S}`)}getByTask(N){return this._get(this.http,`${this.root}/tasks/${N}`)}getByProject(N){return this._get(this.http,`${this.root}/project/${N}`)}updateColor(N,S){return this._put(this.http,`${this.root}/tasks/${N}`,{color:S})}deleteById(N){return this._delete(this.http,`${this.root}/team/${N}`)}}return(B=g).\u0275fac=function(N){return new(N||B)(c.LFG(n.eN))},B.\u0275prov=c.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),g})()},22858:(r1,S0,s)=>{"use strict";s.d(S0,{f:()=>J});var M=s(26857),e=s(69649),c=s(65879),n=s(69862);let J=(()=>{var B;class g extends M.P{constructor(N){super(),this.http=N,this.root=`${this.API_BASE_URL}/task-phases`}create(N,S=!1){const E=(0,e.UK)({id:N,current_project_id:N});return this._post(this.http,`${this.root}${E}`,{})}get(N){const S=(0,e.UK)({id:N});return this._get(this.http,`${this.root}${S}`)}getById(N,S){const E=(0,e.UK)({id:S});return this._get(this.http,`${this.root}/${N}${E}`)}updateLabel(N,S,E=!1){const t=(0,e.UK)({current_project_id:N});return this._put(this.http,`${this.root}/label/${N}${t}`,{name:S})}update(N,S,E=!1){const t=(0,e.UK)({id:N,current_project_id:N});return this._put(this.http,`${this.root}/${S.id}${t}`,S)}updateColor(N,S){const E=(0,e.UK)({id:N,current_project_id:N});return this._put(this.http,`${this.root}/change-color/${S.id}${E}`,S)}updateSortOrder(N,S){const E=(0,e.UK)({current_project_id:S});return this._put(this.http,`${this.root}/update-sort-order${E}`,N)}delete(N,S,E=!1){const t=(0,e.UK)({id:S,current_project_id:S});return this._delete(this.http,`${this.root}/${N}${t}`)}}return(B=g).\u0275fac=function(N){return new(N||B)(c.LFG(n.eN))},B.\u0275prov=c.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),g})()},85236:(r1,S0,s)=>{"use strict";s.d(S0,{s:()=>n});var M=s(26857),e=s(65879),c=s(69862);let n=(()=>{var J;class B extends M.P{constructor(v){super(),this.http=v,this.root=`${this.API_BASE_URL}/task-priorities`}get(){return this._get(this.http,this.root)}getById(v){return this._get(this.http,`${this.root}/${v}`)}}return(J=B).\u0275fac=function(v){return new(v||J)(e.LFG(c.eN))},J.\u0275prov=e.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),B})()},46619:(r1,S0,s)=>{"use strict";s.d(S0,{w:()=>J});var M=s(26857),e=s(69649),c=s(65879),n=s(69862);let J=(()=>{var B;class g extends M.P{constructor(N){super(),this.http=N,this.root=`${this.API_BASE_URL}/statuses`}create(N,S){const E=(0,e.UK)({current_project_id:S});return this._post(this.http,`${this.root}${E}`,N)}get(N){return this._get(this.http,`${this.root}?project=${N}`)}getById(N){return this._get(this.http,`${this.root}/${N}`)}getCategories(){return this._get(this.http,`${this.root}/categories`)}update(N,S,E){const t=(0,e.UK)({current_project_id:E});return this._put(this.http,`${this.root}/${N}${t}`,S)}updateName(N,S,E){const t=(0,e.UK)({current_project_id:E});return this._put(this.http,`${this.root}/name/${N}${t}`,S)}updateStatus(N,S,E){const t=(0,e.UK)({current_project_id:E});return this._put(this.http,`${this.root}/order${t}`,S)}delete(N,S,E){return this._delete(this.http,`${this.root}/${N}?project=${S}¤t_project_id=${S}&replace=${E||null}`)}}return(B=g).\u0275fac=function(N){return new(N||B)(c.LFG(n.eN))},B.\u0275prov=c.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),g})()},82803:(r1,S0,s)=>{"use strict";s.d(S0,{e:()=>J});var M=s(26857),e=s(78645),c=s(65879),n=s(69862);let J=(()=>{var B;class g extends M.P{get onTemplateImport(){return this.importSbj$.asObservable()}constructor(N){super(),this.http=N,this.importSbj$=new e.x,this.root=`${this.API_BASE_URL}/task-templates`}get(){return this._get(this.http,this.root)}getById(N){return this._get(this.http,`${this.root}/${N}`)}createTemplate(N){return this._post(this.http,`${this.root}`,N)}updateTemplate(N,S){return this._put(this.http,`${this.root}/${N}`,S)}delete(N){return this._delete(this.http,`${this.root}/${N}`)}import(N,S){return this._post(this.http,`${this.root}/import/${N}`,S)}emitOnImport(){this.importSbj$.next()}}return(B=g).\u0275fac=function(N){return new(N||B)(c.LFG(n.eN))},B.\u0275prov=c.Yz7({token:B,factory:B.\u0275fac,providedIn:"root"}),g})()},34554:(r1,S0,s)=>{"use strict";s.d(S0,{c:()=>B});var M=s(69649),e=s(10708),c=s(26857),n=s(65879),J=s(69862);let B=(()=>{var g;class v extends c.P{constructor(S){super(),this.http=S,this.root=`${this.API_BASE_URL}/tasks`}getTasksByTeam(){return this._get(this.http,`${this.root}/team`)}getTasksByProject(S){return this._get(this.http,`${this.root}/project/${S}`)}getListCols(S){return this._get(this.http,`${this.root}/list/columns/${S}`)}getListColsTest(S){return this._get(this.http,`${this.root}/list/columns/${S}`)}toggleListCols(S,E){return this._put(this.http,`${this.root}/list/columns/${S}`,E)}getTaskList(S){const E=(0,M.UK)(S);return this._get(this.http,`${this.root}/list/${S.id}${E}`)}getTaskListV2(S){const E=(0,M.UK)(S);return this._get(this.http,`${this.root}/list/v2/${S.id}${E}`)}getTaskListV2Test(S){const E=(0,M.UK)(S);return this._get(this.http,`${this.root}/list/v2-test/${S.id}${E}`)}getTasksAssignees(S){return this._get(this.http,`${this.root}/assignees/${S}`)}getGanttTasksByProject(S){return this._get(this.http,`${this.root}/roadmap?project_id=${S}`)}getTasksBetweenRange(S,E,t){return this._get(this.http,`${this.root}/range?project_id=${S}&start_date=${E}&end_date=${t}`)}getTasksByStatus(S,E){return this._get(this.http,`${this.root}/kanban/${S}?status=${encodeURIComponent(E)}`)}updateTaskStatus(S,E,t){return this._put(this.http,`${this.root}/status/${E}/${S}`,t)}create(S){return this._post(this.http,this.root,S)}createHomeTask(S){return this._post(this.http,`${this.root}/home-task`,S)}update(S,E,t=!1){return this._put(this.http,`${this.root}/${E}${t?"?inline=true":""}`,S)}delete(S){return(0,e.n)(this.http.delete(`${this.root}/${S}`))}getFormViewModel(S,E){const t=[];S&&t.push(`task_id=${S}`),E&&t.push(`project_id=${E}`);const v0=t.length?`?${t.join("&")}`:"";return this._get(this.http,`${this.root}/info${v0}`)}updateDuration(S,E){return this._put(this.http,`${this.root}/duration/${E}`,S)}createQuickTask(S){return this._post(this.http,`${this.root}/quick-task`,S)}bulkChangeStatus(S,E){return this._put(this.http,`${this.root}/bulk/status?project=${E}`,S)}bulkChangePriority(S,E){return this._put(this.http,`${this.root}/bulk/priority?project=${E}`,S)}bulkChangePhase(S,E){return this._put(this.http,`${this.root}/bulk/phase?project=${E}`,S)}bulkDelete(S,E){return this._put(this.http,`${this.root}/bulk/delete?project=${E}`,S)}bulkArchive(S,E=!1){return this._put(this.http,`${this.root}/bulk/archive?type=${E?"unarchive":"archive"}&project=${S.project_id}`,S)}bulkAssignMe(S){return this._put(this.http,`${this.root}/bulk/assign-me?project=${S.project_id}`,S)}bulkAssignLabel(S,E){return this._put(this.http,`${this.root}/bulk/label?project=${E}`,S)}bulkAssignMembers(S){return this._put(this.http,`${this.root}/bulk/members?project=${S.project_id}`,S)}convertToTask(S,E){return this._post(this.http,`${this.root}/convert`,{id:S,project_id:E})}convertToSubTask(S,E,t,v0,a0){return this._post(this.http,`${this.root}/convert-to-subtask`,{id:S,project_id:E,parent_task_id:t,group_by:v0,to_group_id:a0})}getNewKanbanTask(S){return this._get(this.http,`${this.root}/get-new-kanban-task/${S}`)}getTaskSubscribers(S){return this._get(this.http,`${this.root}/subscribers/${S}`)}searchTasks(S,E,t){const v0=(0,M.UK)({taskId:S,projectId:E,searchQuery:t});return this._get(this.http,`${this.root}/search${v0}`)}getTaskDependencyStatus(S,E){const t=(0,M.UK)({taskId:S,statusId:E});return this._get(this.http,`${this.root}/dependency-status${t}`)}}return(g=v).\u0275fac=function(S){return new(S||g)(n.LFG(J.eN))},g.\u0275prov=n.Yz7({token:g,factory:g.\u0275fac,providedIn:"root"}),v})()},59866:(r1,S0,s)=>{"use strict";s.d(S0,{L:()=>n});var M=s(26857),e=s(65879),c=s(69862);let n=(()=>{var J;class B extends M.P{constructor(v){super(),this.http=v,this.root=`${this.API_BASE_URL}/task-time-log`}create(v,N){return this._post(this.http,this.root,N)}getByTask(v,N){return this._get(this.http,`${this.root}/task/${v}`)}exportExcel(v){window.location.href=`${this.root}/export/${v}`}update(v,N,S){return this._put(this.http,`${this.root}/${v}`,S)}delete(v,N){return this._delete(this.http,`${this.root}/${v}?task=${N}`)}}return(J=B).\u0275fac=function(v){return new(v||J)(e.LFG(c.eN))},J.\u0275prov=e.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),B})()},45019:(r1,S0,s)=>{"use strict";s.d(S0,{s:()=>c});var M=s(78645),e=s(65879);let c=(()=>{var n;class J{constructor(){this._updateSbj$=new M.x,this._onProjectMemberChangeSbj$=new M.x}get onProjectUpdate(){return this._updateSbj$.asObservable()}get onMemberAssignOrRemoveReProject(){return this._onProjectMemberChangeSbj$.asObservable()}emitProjectUpdate(){this._updateSbj$.next()}emitMemberAssignOrRemoveReProject(){this._onProjectMemberChangeSbj$.next()}}return(n=J).\u0275fac=function(g){return new(g||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac,providedIn:"root"}),J})()},48327:(r1,S0,s)=>{"use strict";s.d(S0,{u:()=>n});var M=s(78645),e=s(65879),c=s(55416);let n=(()=>{var J;class B{get label(){return this._label||this.DEFAULT_LABEL}set label(v){this._label=v||this.DEFAULT_LABEL}get onLabelChange(){return this._labelChangeSbj$.asObservable()}get onPhaseOptionsChange(){return this._phaseOptionsChangeSbj$.asObservable()}constructor(v){this.list=v,this._labelChangeSbj$=new M.x,this._phaseOptionsChangeSbj$=new M.x,this.DEFAULT_LABEL="Phase",this._label=null}updateLabel(v){const N=this.list.GROUP_BY_OPTIONS.find(S=>S.value===this.list.GROUP_BY_PHASE_VALUE);N&&(this.label=v,N.label=this.label,this._labelChangeSbj$.next(this.label))}emitOptionsChange(){this._phaseOptionsChangeSbj$.next()}}return(J=B).\u0275fac=function(v){return new(v||J)(e.LFG(c.b))},J.\u0275prov=e.Yz7({token:J,factory:J.\u0275fac,providedIn:"root"}),B})()},69930:(r1,S0,s)=>{(r1.exports=s(78094)).tz.load(s(91128))},78094:function(r1,S0,s){var M,e,c;!function(n,J){"use strict";r1.exports?r1.exports=J(s(16676)):(e=[s(16676)],void 0!==(c="function"==typeof(M=J)?M.apply(S0,e):M)&&(r1.exports=c))}(0,function(n){"use strict";void 0===n.version&&n.default&&(n=n.default);var E,B={},g={},v={},N={},S={};(!n||"string"!=typeof n.version)&&x0("Moment Timezone requires Moment.js. See https://momentjs.com/timezone/docs/#/use-it/browser/");var t=n.version.split("."),v0=+t[0],a0=+t[1];function I(m){return m>96?m-87:m>64?m-29:m-48}function n0(m){var d=0,K=m.split("."),g0=K[0],e1=K[1]||"",u1=1,k1=0,W0=1;for(45===m.charCodeAt(0)&&(d=1,W0=-1);d= 2.6.0. You are using Moment.js "+n.version+". See momentjs.com"),R0.prototype={_set:function(m){this.name=m.name,this.abbrs=m.abbrs,this.untils=m.untils,this.offsets=m.offsets,this.population=m.population},_index:function(m){var g0,d=+m,K=this.untils;for(g0=0;g0k1&&n1.moveInvalidForward&&(u1=k1),d3){var d=N[O1(m)];if(d)return d;x0("Moment Timezone found "+m+" from the Intl api, but did not have that data loaded.")}}catch{}var L1,k1,W0,K=function Z(){var g0,e1,u1,m=(new Date).getFullYear()-2,d=new T0(new Date(m,0,1)),K=[d];for(u1=1;u1<48;u1++)(e1=new T0(new Date(m,u1,1))).offset!==d.offset&&(g0=A0(d,e1),K.push(g0),K.push(new T0(new Date(g0.at+6e4)))),d=e1;for(u1=0;u1<4;u1++)K.push(new T0(new Date(m+u1,0,1))),K.push(new T0(new Date(m+u1,6,1)));return K}(),g0=K.length,e1=function V(m){var e1,u1,L1,d=m.length,K={},g0=[];for(e1=0;e10?u1[0].zone.name:void 0}()),E},n1.names=function e0(){var m,d=[];for(m in N)N.hasOwnProperty(m)&&(B[m]||B[g[m]])&&N[m]&&d.push(N[m]);return d.sort()},n1.Zone=R0,n1.unpack=Z0,n1.unpackBase60=n0,n1.needsOffset=Q0,n1.moveInvalidForward=!0,n1.moveAmbiguousForward=!1,n1.countries=function X0(){return Object.keys(v)},n1.zonesForCountry=function B0(m,d){if(!(m=function E0(m){return m=m.toUpperCase(),v[m]||null}(m)))return null;var K=m.zones.sort();return d?K.map(function(g0){return{name:g0,offset:H0(g0).utcOffset(new Date)}}):K};var h1=n.fn;function M0(m){return function(){return this._z?this._z.abbr(this):m.call(this)}}function L0(m){return function(){return this._z=null,m.apply(this,arguments)}}n.tz=n1,n.defaultZone=null,n.updateOffset=function(m,d){var g0,K=n.defaultZone;if(void 0===m._z&&(K&&Q0(m)&&!m._isUTC&&(m._d=n.utc(m._a)._d,m.utc().add(K.parse(m),"minutes")),m._z=K),m._z)if(g0=m._z.utcOffset(m),Math.abs(g0)<16&&(g0/=60),void 0!==m.utcOffset){var e1=m._z;m.utcOffset(-g0,d),m._z=e1}else m.zone(g0,d)},h1.tz=function(m,d){if(m){if("string"!=typeof m)throw new Error("Time zone name must be a string, got "+m+" ["+typeof m+"]");return this._z=H0(m),this._z?n.updateOffset(this,d):x0("Moment Timezone has no data for "+m+". See http://momentjs.com/timezone/docs/#/data-loading/."),this}if(this._z)return this._z.name},h1.zoneName=M0(h1.zoneName),h1.zoneAbbr=M0(h1.zoneAbbr),h1.utc=L0(h1.utc),h1.local=L0(h1.local),h1.utcOffset=function o0(m){return function(){return arguments.length>0&&(this._z=null),m.apply(this,arguments)}}(h1.utcOffset),n.tz.setDefault=function(m){return(v0<2||2===v0&&a0<9)&&x0("Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js "+n.version+"."),n.defaultZone=m?H0(m):null,n};var L=n.momentProperties;return"[object Array]"===Object.prototype.toString.call(L)?(L.push("_z"),L.push("_a")):L&&(L._z=null),n})},26236:(r1,S0,s)=>{"use strict";s.d(S0,{Zt:()=>ce,Bh:()=>se,Hk:()=>be,Wj:()=>Te,Fd:()=>fe,_t:()=>ve,bA:()=>o0,EA:()=>L});var M=s(65879),e=s(96814),c=s(70532),n=s(62831),J=s(42495),B=s(4300),g=s(78645),v=s(47394),N=s(16321),S=s(74825),t=s(80927),v0=s(65592),a0=s(63019),I=s(59773),n0=s(37398),f0=s(48180),H=s(27921),j0=s(99397),Z0=s(94664),R0=s(49388);function p1(t0,f,y){for(let W in f)if(f.hasOwnProperty(W)){const k=f[W];k?t0.setProperty(W,k,y?.has(W)?"important":""):t0.removeProperty(W)}return t0}function T0(t0,f){const y=f?"":"none";p1(t0.style,{"touch-action":f?"":"none","-webkit-user-drag":f?"":"none","-webkit-tap-highlight-color":f?"":"transparent","user-select":y,"-ms-user-select":y,"-webkit-user-select":y,"-moz-user-select":y})}function D0(t0,f,y){p1(t0.style,{position:f?"":"fixed",top:f?"":"0",opacity:f?"":"0",left:f?"":"-999em"},y)}function A0(t0,f){return f&&"none"!=f?t0+" "+f:t0}function Z(t0){const f=t0.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(t0)*f}function Q(t0,f){return t0.getPropertyValue(f).split(",").map(W=>W.trim())}function V(t0){const f=t0.getBoundingClientRect();return{top:f.top,right:f.right,bottom:f.bottom,left:f.left,width:f.width,height:f.height,x:f.x,y:f.y}}function r0(t0,f,y){const{top:W,bottom:k,left:Y,right:d0}=t0;return y>=W&&y<=k&&f>=Y&&f<=d0}function h0(t0,f,y){t0.top+=f,t0.bottom=t0.top+t0.height,t0.left+=y,t0.right=t0.left+t0.width}function O1(t0,f,y,W){const{top:k,right:Y,bottom:d0,left:C0,width:$0,height:a1}=t0,q1=$0*f,x1=a1*f;return W>k-x1&&WC0-q1&&y{this.positions.set(y,{scrollPosition:{top:y.scrollTop,left:y.scrollLeft},clientRect:V(y)})})}handleScroll(f){const y=(0,n.sA)(f),W=this.positions.get(y);if(!W)return null;const k=W.scrollPosition;let Y,d0;if(y===this._document){const a1=this.getViewportScrollPosition();Y=a1.top,d0=a1.left}else Y=y.scrollTop,d0=y.scrollLeft;const C0=k.top-Y,$0=k.left-d0;return this.positions.forEach((a1,q1)=>{a1.clientRect&&y!==q1&&y.contains(q1)&&h0(a1.clientRect,C0,$0)}),k.top=Y,k.left=d0,{top:C0,left:$0}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}}function H0(t0){const f=t0.cloneNode(!0),y=f.querySelectorAll("[id]"),W=t0.nodeName.toLowerCase();f.removeAttribute("id");for(let k=0;kT0(W,y)))}constructor(f,y,W,k,Y,d0){this._config=y,this._document=W,this._ngZone=k,this._viewportRuler=Y,this._dragDropRegistry=d0,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=!1,this._moveEvents=new g.x,this._pointerMoveSubscription=v.w0.EMPTY,this._pointerUpSubscription=v.w0.EMPTY,this._scrollSubscription=v.w0.EMPTY,this._resizeSubscription=v.w0.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new g.x,this.started=new g.x,this.released=new g.x,this.ended=new g.x,this.entered=new g.x,this.exited=new g.x,this.dropped=new g.x,this.moved=this._moveEvents,this._pointerDown=C0=>{if(this.beforeStarted.next(),this._handles.length){const $0=this._getTargetHandle(C0);$0&&!this._disabledHandles.has($0)&&!this.disabled&&this._initializeDragSequence($0,C0)}else this.disabled||this._initializeDragSequence(this._rootElement,C0)},this._pointerMove=C0=>{const $0=this._getPointerPositionOnPage(C0);if(!this._hasStartedDragging){if(Math.abs($0.x-this._pickupPositionOnPage.x)+Math.abs($0.y-this._pickupPositionOnPage.y)>=this._config.dragStartThreshold){const j1=Date.now()>=this._dragStartTime+this._getDragStartDelay(C0),Me=this._dropContainer;if(!j1)return void this._endDragSequence(C0);(!Me||!Me.isDragging()&&!Me.isReceiving())&&(C0.preventDefault(),this._hasStartedDragging=!0,this._ngZone.run(()=>this._startDragSequence(C0)))}return}C0.preventDefault();const a1=this._getConstrainedPointerPosition($0);if(this._hasMoved=!0,this._lastKnownPointerPosition=$0,this._updatePointerDirectionDelta(a1),this._dropContainer)this._updateActiveDropContainer(a1,$0);else{const q1=this.constrainPosition?this._initialClientRect:this._pickupPositionOnPage,x1=this._activeTransform;x1.x=a1.x-q1.x+this._passiveTransform.x,x1.y=a1.y-q1.y+this._passiveTransform.y,this._applyRootElementTransform(x1.x,x1.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:a1,event:C0,distance:this._getDragDistance(a1),delta:this._pointerDirectionDelta})})},this._pointerUp=C0=>{this._endDragSequence(C0)},this._nativeDragStart=C0=>{if(this._handles.length){const $0=this._getTargetHandle(C0);$0&&!this._disabledHandles.has($0)&&!this.disabled&&C0.preventDefault()}else this.disabled||C0.preventDefault()},this.withRootElement(f).withParent(y.parentDragRef||null),this._parentPositions=new N0(W),d0.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(f){this._handles=f.map(W=>(0,J.fI)(W)),this._handles.forEach(W=>T0(W,this.disabled)),this._toggleNativeDragInteractions();const y=new Set;return this._disabledHandles.forEach(W=>{this._handles.indexOf(W)>-1&&y.add(W)}),this._disabledHandles=y,this}withPreviewTemplate(f){return this._previewTemplate=f,this}withPlaceholderTemplate(f){return this._placeholderTemplate=f,this}withRootElement(f){const y=(0,J.fI)(f);return y!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{y.addEventListener("mousedown",this._pointerDown,B0),y.addEventListener("touchstart",this._pointerDown,E0),y.addEventListener("dragstart",this._nativeDragStart,B0)}),this._initialTransform=void 0,this._rootElement=y),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(f){return this._boundaryElement=f?(0,J.fI)(f):null,this._resizeSubscription.unsubscribe(),f&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(f){return this._parentDragRef=f,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeSubscriptions(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(f){!this._disabledHandles.has(f)&&this._handles.indexOf(f)>-1&&(this._disabledHandles.add(f),T0(f,!0))}enableHandle(f){this._disabledHandles.has(f)&&(this._disabledHandles.delete(f),T0(f,this.disabled))}withDirection(f){return this._direction=f,this}_withDropContainer(f){this._dropContainer=f}getFreeDragPosition(){const f=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:f.x,y:f.y}}setFreeDragPosition(f){return this._activeTransform={x:0,y:0},this._passiveTransform.x=f.x,this._passiveTransform.y=f.y,this._dropContainer||this._applyRootElementTransform(f.x,f.y),this}withPreviewContainer(f){return this._previewContainer=f,this}_sortFromLastPointerPosition(){const f=this._lastKnownPointerPosition;f&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(f),f)}_removeSubscriptions(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe()}_destroyPreview(){this._preview?.remove(),this._previewRef?.destroy(),this._preview=this._previewRef=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(f){if(this._dragDropRegistry.isDragging(this)&&(this._removeSubscriptions(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),this._hasStartedDragging))if(this.released.next({source:this,event:f}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(f),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;const y=this._getPointerPositionOnPage(f);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(y),dropPoint:y,event:f})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(f){h1(f)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();const y=this._dropContainer;if(y){const W=this._rootElement,k=W.parentNode,Y=this._placeholder=this._createPlaceholderElement(),d0=this._anchor=this._anchor||this._document.createComment(""),C0=this._getShadowRoot();k.insertBefore(d0,W),this._initialTransform=W.style.transform||"",this._preview=this._createPreviewElement(),D0(W,!1,z1),this._document.body.appendChild(k.replaceChild(Y,W)),this._getPreviewInsertionPoint(k,C0).appendChild(this._preview),this.started.next({source:this,event:f}),y.start(),this._initialContainer=y,this._initialIndex=y.getItemIndex(this)}else this.started.next({source:this,event:f}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(y?y.getScrollableParents():[])}_initializeDragSequence(f,y){this._parentDragRef&&y.stopPropagation();const W=this.isDragging(),k=h1(y),Y=!k&&0!==y.button,d0=this._rootElement,C0=(0,n.sA)(y),$0=!k&&this._lastTouchEventTime&&this._lastTouchEventTime+800>Date.now(),a1=k?(0,B.yG)(y):(0,B.X6)(y);if(C0&&C0.draggable&&"mousedown"===y.type&&y.preventDefault(),W||Y||$0||a1)return;if(this._handles.length){const B1=d0.style;this._rootElementTapHighlight=B1.webkitTapHighlightColor||"",B1.webkitTapHighlightColor="transparent"}this._hasStartedDragging=this._hasMoved=!1,this._removeSubscriptions(),this._initialClientRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(B1=>this._updateOnScroll(B1)),this._boundaryElement&&(this._boundaryRect=V(this._boundaryElement));const q1=this._previewTemplate;this._pickupPositionInElement=q1&&q1.template&&!q1.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialClientRect,f,y);const x1=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(y);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:x1.x,y:x1.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,y)}_cleanupDragArtifacts(f){D0(this._rootElement,!0,z1),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialClientRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{const y=this._dropContainer,W=y.getItemIndex(this),k=this._getPointerPositionOnPage(f),Y=this._getDragDistance(k),d0=y._isOverContainer(k.x,k.y);this.ended.next({source:this,distance:Y,dropPoint:k,event:f}),this.dropped.next({item:this,currentIndex:W,previousIndex:this._initialIndex,container:y,previousContainer:this._initialContainer,isPointerOverContainer:d0,distance:Y,dropPoint:k,event:f}),y.drop(this,W,this._initialIndex,this._initialContainer,d0,Y,k,f),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:f,y},{x:W,y:k}){let Y=this._initialContainer._getSiblingContainerFromPosition(this,f,y);!Y&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(f,y)&&(Y=this._initialContainer),Y&&Y!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=Y,this._dropContainer.enter(this,f,y,Y===this._initialContainer&&Y.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:Y,currentIndex:Y.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(W,k),this._dropContainer._sortItem(this,f,y,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(f,y):this._applyPreviewTransform(f-this._pickupPositionInElement.x,y-this._pickupPositionInElement.y))}_createPreviewElement(){const f=this._previewTemplate,y=this.previewClass,W=f?f.template:null;let k;if(W&&f){const Y=f.matchSize?this._initialClientRect:null,d0=f.viewContainer.createEmbeddedView(W,f.context);d0.detectChanges(),k=M0(d0,this._document),this._previewRef=d0,f.matchSize?L0(k,Y):k.style.transform=x0(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else k=H0(this._rootElement),L0(k,this._initialClientRect),this._initialTransform&&(k.style.transform=this._initialTransform);return p1(k.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":`${this._config.zIndex||1e3}`},z1),T0(k,!1),k.classList.add("cdk-drag-preview"),k.setAttribute("dir",this._direction),y&&(Array.isArray(y)?y.forEach(Y=>k.classList.add(Y)):k.classList.add(y)),k}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();const f=this._placeholder.getBoundingClientRect();this._preview.classList.add("cdk-drag-animating"),this._applyPreviewTransform(f.left,f.top);const y=function p0(t0){const f=getComputedStyle(t0),y=Q(f,"transition-property"),W=y.find(C0=>"transform"===C0||"all"===C0);if(!W)return 0;const k=y.indexOf(W),Y=Q(f,"transition-duration"),d0=Q(f,"transition-delay");return Z(Y[k])+Z(d0[k])}(this._preview);return 0===y?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(W=>{const k=d0=>{(!d0||(0,n.sA)(d0)===this._preview&&"transform"===d0.propertyName)&&(this._preview?.removeEventListener("transitionend",k),W(),clearTimeout(Y))},Y=setTimeout(k,1.5*y);this._preview.addEventListener("transitionend",k)}))}_createPlaceholderElement(){const f=this._placeholderTemplate,y=f?f.template:null;let W;return y?(this._placeholderRef=f.viewContainer.createEmbeddedView(y,f.context),this._placeholderRef.detectChanges(),W=M0(this._placeholderRef,this._document)):W=H0(this._rootElement),W.style.pointerEvents="none",W.classList.add("cdk-drag-placeholder"),W}_getPointerPositionInElement(f,y,W){const k=y===this._rootElement?null:y,Y=k?k.getBoundingClientRect():f,d0=h1(W)?W.targetTouches[0]:W,C0=this._getViewportScrollPosition();return{x:Y.left-f.left+(d0.pageX-Y.left-C0.left),y:Y.top-f.top+(d0.pageY-Y.top-C0.top)}}_getPointerPositionOnPage(f){const y=this._getViewportScrollPosition(),W=h1(f)?f.touches[0]||f.changedTouches[0]||{pageX:0,pageY:0}:f,k=W.pageX-y.left,Y=W.pageY-y.top;if(this._ownerSVGElement){const d0=this._ownerSVGElement.getScreenCTM();if(d0){const C0=this._ownerSVGElement.createSVGPoint();return C0.x=k,C0.y=Y,C0.matrixTransform(d0.inverse())}}return{x:k,y:Y}}_getConstrainedPointerPosition(f){const y=this._dropContainer?this._dropContainer.lockAxis:null;let{x:W,y:k}=this.constrainPosition?this.constrainPosition(f,this,this._initialClientRect,this._pickupPositionInElement):f;if("x"===this.lockAxis||"x"===y?k=this._pickupPositionOnPage.y:("y"===this.lockAxis||"y"===y)&&(W=this._pickupPositionOnPage.x),this._boundaryRect){const{x:Y,y:d0}=this._pickupPositionInElement,C0=this._boundaryRect,{width:$0,height:a1}=this._getPreviewRect(),q1=C0.top+d0,x1=C0.bottom-(a1-d0);W=n1(W,C0.left+Y,C0.right-($0-Y)),k=n1(k,q1,x1)}return{x:W,y:k}}_updatePointerDirectionDelta(f){const{x:y,y:W}=f,k=this._pointerDirectionDelta,Y=this._pointerPositionAtLastDirectionChange,d0=Math.abs(y-Y.x),C0=Math.abs(W-Y.y);return d0>this._config.pointerDirectionChangeThreshold&&(k.x=y>Y.x?1:-1,Y.x=y),C0>this._config.pointerDirectionChangeThreshold&&(k.y=W>Y.y?1:-1,Y.y=W),k}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;const f=this._handles.length>0||!this.isDragging();f!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=f,T0(this._rootElement,f))}_removeRootElementListeners(f){f.removeEventListener("mousedown",this._pointerDown,B0),f.removeEventListener("touchstart",this._pointerDown,E0),f.removeEventListener("dragstart",this._nativeDragStart,B0)}_applyRootElementTransform(f,y){const W=x0(f,y),k=this._rootElement.style;null==this._initialTransform&&(this._initialTransform=k.transform&&"none"!=k.transform?k.transform:""),k.transform=A0(W,this._initialTransform)}_applyPreviewTransform(f,y){const W=this._previewTemplate?.template?void 0:this._initialTransform,k=x0(f,y);this._preview.style.transform=A0(k,W)}_getDragDistance(f){const y=this._pickupPositionOnPage;return y?{x:f.x-y.x,y:f.y-y.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:f,y}=this._passiveTransform;if(0===f&&0===y||this.isDragging()||!this._boundaryElement)return;const W=this._rootElement.getBoundingClientRect(),k=this._boundaryElement.getBoundingClientRect();if(0===k.width&&0===k.height||0===W.width&&0===W.height)return;const Y=k.left-W.left,d0=W.right-k.right,C0=k.top-W.top,$0=W.bottom-k.bottom;k.width>W.width?(Y>0&&(f+=Y),d0>0&&(f-=d0)):f=0,k.height>W.height?(C0>0&&(y+=C0),$0>0&&(y-=$0)):y=0,(f!==this._passiveTransform.x||y!==this._passiveTransform.y)&&this.setFreeDragPosition({y,x:f})}_getDragStartDelay(f){const y=this.dragStartDelay;return"number"==typeof y?y:h1(f)?y.touch:y?y.mouse:0}_updateOnScroll(f){const y=this._parentPositions.handleScroll(f);if(y){const W=(0,n.sA)(f);this._boundaryRect&&W!==this._boundaryElement&&W.contains(this._boundaryElement)&&h0(this._boundaryRect,y.top,y.left),this._pickupPositionOnPage.x+=y.left,this._pickupPositionOnPage.y+=y.top,this._dropContainer||(this._activeTransform.x-=y.left,this._activeTransform.y-=y.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return void 0===this._cachedShadowRoot&&(this._cachedShadowRoot=(0,n.kV)(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(f,y){const W=this._previewContainer||"global";if("parent"===W)return f;if("global"===W){const k=this._document;return y||k.fullscreenElement||k.webkitFullscreenElement||k.mozFullScreenElement||k.msFullscreenElement||k.body}return(0,J.fI)(W)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialClientRect),this._previewRect}_getTargetHandle(f){return this._handles.find(y=>f.target&&(f.target===y||y.contains(f.target)))}}function x0(t0,f){return`translate3d(${Math.round(t0)}px, ${Math.round(f)}px, 0)`}function n1(t0,f,y){return Math.max(f,Math.min(y,t0))}function h1(t0){return"t"===t0.type[0]}function M0(t0,f){const y=t0.rootNodes;if(1===y.length&&y[0].nodeType===f.ELEMENT_NODE)return y[0];const W=f.createElement("div");return y.forEach(k=>W.appendChild(k)),W}function L0(t0,f){t0.style.width=`${f.width}px`,t0.style.height=`${f.height}px`,t0.style.transform=x0(f.left,f.top)}function o0(t0,f,y){const W=d(f,t0.length-1),k=d(y,t0.length-1);if(W===k)return;const Y=t0[W],d0=k0)return null;const C0="horizontal"===this.orientation,$0=Y.findIndex(P1=>P1.drag===f),a1=Y[d0],x1=a1.clientRect,B1=$0>d0?1:-1,j1=this._getItemOffsetPx(Y[$0].clientRect,x1,B1),Me=this._getSiblingOffsetPx($0,Y,B1),Re=Y.slice();return o0(Y,$0,d0),Y.forEach((P1,Xe)=>{if(Re[Xe]===P1)return;const Ce=P1.drag===f,G1=Ce?j1:Me,Ee=Ce?f.getPlaceholderElement():P1.drag.getRootElement();P1.offset+=G1,C0?(Ee.style.transform=A0(`translate3d(${Math.round(P1.offset)}px, 0, 0)`,P1.initialTransform),h0(P1.clientRect,0,G1)):(Ee.style.transform=A0(`translate3d(0, ${Math.round(P1.offset)}px, 0)`,P1.initialTransform),h0(P1.clientRect,G1,0))}),this._previousSwap.overlaps=r0(x1,y,W),this._previousSwap.drag=a1.drag,this._previousSwap.delta=C0?k.x:k.y,{previousIndex:$0,currentIndex:d0}}enter(f,y,W,k){const Y=null==k||k<0?this._getItemIndexFromPointerPosition(f,y,W):k,d0=this._activeDraggables,C0=d0.indexOf(f),$0=f.getPlaceholderElement();let a1=d0[Y];if(a1===f&&(a1=d0[Y+1]),!a1&&(null==Y||-1===Y||Y-1&&d0.splice(C0,1),a1&&!this._dragDropRegistry.isDragging(a1)){const q1=a1.getRootElement();q1.parentElement.insertBefore($0,q1),d0.splice(Y,0,f)}else(0,J.fI)(this._element).appendChild($0),d0.push(f);$0.style.transform="",this._cacheItemPositions()}withItems(f){this._activeDraggables=f.slice(),this._cacheItemPositions()}withSortPredicate(f){this._sortPredicate=f}reset(){this._activeDraggables.forEach(f=>{const y=f.getRootElement();if(y){const W=this._itemPositions.find(k=>k.drag===f)?.initialTransform;y.style.transform=W||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(f){return("horizontal"===this.orientation&&"rtl"===this.direction?this._itemPositions.slice().reverse():this._itemPositions).findIndex(W=>W.drag===f)}updateOnScroll(f,y){this._itemPositions.forEach(({clientRect:W})=>{h0(W,f,y)}),this._itemPositions.forEach(({drag:W})=>{this._dragDropRegistry.isDragging(W)&&W._sortFromLastPointerPosition()})}_cacheItemPositions(){const f="horizontal"===this.orientation;this._itemPositions=this._activeDraggables.map(y=>{const W=y.getVisibleElement();return{drag:y,offset:0,initialTransform:W.style.transform||"",clientRect:V(W)}}).sort((y,W)=>f?y.clientRect.left-W.clientRect.left:y.clientRect.top-W.clientRect.top)}_getItemOffsetPx(f,y,W){const k="horizontal"===this.orientation;let Y=k?y.left-f.left:y.top-f.top;return-1===W&&(Y+=k?y.width-f.width:y.height-f.height),Y}_getSiblingOffsetPx(f,y,W){const k="horizontal"===this.orientation,Y=y[f].clientRect,d0=y[f+-1*W];let C0=Y[k?"width":"height"]*W;if(d0){const $0=k?"left":"top",a1=k?"right":"bottom";-1===W?C0-=d0.clientRect[$0]-Y[a1]:C0+=Y[$0]-d0.clientRect[a1]}return C0}_shouldEnterAsFirstChild(f,y){if(!this._activeDraggables.length)return!1;const W=this._itemPositions,k="horizontal"===this.orientation;if(W[0].drag!==this._activeDraggables[0]){const d0=W[W.length-1].clientRect;return k?f>=d0.right:y>=d0.bottom}{const d0=W[0].clientRect;return k?f<=d0.left:y<=d0.top}}_getItemIndexFromPointerPosition(f,y,W,k){const Y="horizontal"===this.orientation,d0=this._itemPositions.findIndex(({drag:C0,clientRect:$0})=>C0!==f&&((!k||C0!==this._previousSwap.drag||!this._previousSwap.overlaps||(Y?k.x:k.y)!==this._previousSwap.delta)&&(Y?y>=Math.floor($0.left)&&y=Math.floor($0.top)&&W!0,this.sortPredicate=()=>!0,this.beforeStarted=new g.x,this.entered=new g.x,this.exited=new g.x,this.dropped=new g.x,this.sorted=new g.x,this.receivingStarted=new g.x,this.receivingStopped=new g.x,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=v.w0.EMPTY,this._verticalScrollDirection=0,this._horizontalScrollDirection=0,this._stopScrollTimers=new g.x,this._cachedShadowRoot=null,this._startScrollInterval=()=>{this._stopScrolling(),function E(t0=0,f=N.z){return t0<0&&(t0=0),(0,S.H)(t0,t0,f)}(0,t.Z).pipe((0,I.R)(this._stopScrollTimers)).subscribe(()=>{const d0=this._scrollNode,C0=this.autoScrollStep;1===this._verticalScrollDirection?d0.scrollBy(0,-C0):2===this._verticalScrollDirection&&d0.scrollBy(0,C0),1===this._horizontalScrollDirection?d0.scrollBy(-C0,0):2===this._horizontalScrollDirection&&d0.scrollBy(C0,0)})},this.element=(0,J.fI)(f),this._document=W,this.withScrollableParents([this.element]),y.registerDropContainer(this),this._parentPositions=new N0(W),this._sortStrategy=new K(this.element,y),this._sortStrategy.withSortPredicate((d0,C0)=>this.sortPredicate(d0,C0,this))}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(f,y,W,k){this._draggingStarted(),null==k&&this.sortingDisabled&&(k=this._draggables.indexOf(f)),this._sortStrategy.enter(f,y,W,k),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:f,container:this,currentIndex:this.getItemIndex(f)})}exit(f){this._reset(),this.exited.next({item:f,container:this})}drop(f,y,W,k,Y,d0,C0,$0={}){this._reset(),this.dropped.next({item:f,currentIndex:y,previousIndex:W,container:this,previousContainer:k,isPointerOverContainer:Y,distance:d0,dropPoint:C0,event:$0})}withItems(f){const y=this._draggables;return this._draggables=f,f.forEach(W=>W._withDropContainer(this)),this.isDragging()&&(y.filter(k=>k.isDragging()).every(k=>-1===f.indexOf(k))?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(f){return this._sortStrategy.direction=f,this}connectedTo(f){return this._siblings=f.slice(),this}withOrientation(f){return this._sortStrategy.orientation=f,this}withScrollableParents(f){const y=(0,J.fI)(this.element);return this._scrollableElements=-1===f.indexOf(y)?[y,...f]:f.slice(),this}getScrollableParents(){return this._scrollableElements}getItemIndex(f){return this._isDragging?this._sortStrategy.getItemIndex(f):this._draggables.indexOf(f)}isReceiving(){return this._activeSiblings.size>0}_sortItem(f,y,W,k){if(this.sortingDisabled||!this._clientRect||!O1(this._clientRect,.05,y,W))return;const Y=this._sortStrategy.sort(f,y,W,k);Y&&this.sorted.next({previousIndex:Y.previousIndex,currentIndex:Y.currentIndex,container:this,item:f})}_startScrollingIfNecessary(f,y){if(this.autoScrollDisabled)return;let W,k=0,Y=0;if(this._parentPositions.positions.forEach((d0,C0)=>{C0===this._document||!d0.clientRect||W||O1(d0.clientRect,.05,f,y)&&([k,Y]=function W0(t0,f,y,W){const k=L1(f,W),Y=k1(f,y);let d0=0,C0=0;if(k){const $0=t0.scrollTop;1===k?$0>0&&(d0=1):t0.scrollHeight-$0>t0.clientHeight&&(d0=2)}if(Y){const $0=t0.scrollLeft;1===Y?$0>0&&(C0=1):t0.scrollWidth-$0>t0.clientWidth&&(C0=2)}return[d0,C0]}(C0,d0.clientRect,f,y),(k||Y)&&(W=C0))}),!k&&!Y){const{width:d0,height:C0}=this._viewportRuler.getViewportSize(),$0={width:d0,height:C0,top:0,right:d0,bottom:C0,left:0};k=L1($0,y),Y=k1($0,f),W=window}W&&(k!==this._verticalScrollDirection||Y!==this._horizontalScrollDirection||W!==this._scrollNode)&&(this._verticalScrollDirection=k,this._horizontalScrollDirection=Y,this._scrollNode=W,(k||Y)&&W?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){const f=(0,J.fI)(this.element).style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=f.msScrollSnapType||f.scrollSnapType||"",f.scrollSnapType=f.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){const f=(0,J.fI)(this.element);this._parentPositions.cache(this._scrollableElements),this._clientRect=this._parentPositions.positions.get(f).clientRect}_reset(){this._isDragging=!1;const f=(0,J.fI)(this.element).style;f.scrollSnapType=f.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(y=>y._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(f,y){return null!=this._clientRect&&r0(this._clientRect,f,y)}_getSiblingContainerFromPosition(f,y,W){return this._siblings.find(k=>k._canReceive(f,y,W))}_canReceive(f,y,W){if(!this._clientRect||!r0(this._clientRect,y,W)||!this.enterPredicate(f,this))return!1;const k=this._getShadowRoot().elementFromPoint(y,W);if(!k)return!1;const Y=(0,J.fI)(this.element);return k===Y||Y.contains(k)}_startReceiving(f,y){const W=this._activeSiblings;!W.has(f)&&y.every(k=>this.enterPredicate(k,this)||this._draggables.indexOf(k)>-1)&&(W.add(f),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:f,receiver:this,items:y}))}_stopReceiving(f){this._activeSiblings.delete(f),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:f,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(f=>{if(this.isDragging()){const y=this._parentPositions.handleScroll(f);y&&this._sortStrategy.updateOnScroll(y.top,y.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){const f=(0,n.kV)((0,J.fI)(this.element));this._cachedShadowRoot=f||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){const f=this._sortStrategy.getActiveItemsSnapshot().filter(y=>y.isDragging());this._siblings.forEach(y=>y._startReceiving(this,f))}}function L1(t0,f){const{top:y,bottom:W,height:k}=t0,Y=.05*k;return f>=y-Y&&f<=y+Y?1:f>=W-Y&&f<=W+Y?2:0}function k1(t0,f){const{left:y,right:W,width:k}=t0,Y=.05*k;return f>=y-Y&&f<=y+Y?1:f>=W-Y&&f<=W+Y?2:0}const I0=(0,n.i$)({passive:!1,capture:!0});let q0=(()=>{var t0;class f{constructor(W,k){this._ngZone=W,this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=[],this._globalListeners=new Map,this._draggingPredicate=Y=>Y.isDragging(),this.pointerMove=new g.x,this.pointerUp=new g.x,this.scroll=new g.x,this._preventDefaultWhileDragging=Y=>{this._activeDragInstances.length>0&&Y.preventDefault()},this._persistentTouchmoveListener=Y=>{this._activeDragInstances.length>0&&(this._activeDragInstances.some(this._draggingPredicate)&&Y.preventDefault(),this.pointerMove.next(Y))},this._document=k}registerDropContainer(W){this._dropInstances.has(W)||this._dropInstances.add(W)}registerDragItem(W){this._dragInstances.add(W),1===this._dragInstances.size&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,I0)})}removeDropContainer(W){this._dropInstances.delete(W)}removeDragItem(W){this._dragInstances.delete(W),this.stopDragging(W),0===this._dragInstances.size&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,I0)}startDragging(W,k){if(!(this._activeDragInstances.indexOf(W)>-1)&&(this._activeDragInstances.push(W),1===this._activeDragInstances.length)){const Y=k.type.startsWith("touch");this._globalListeners.set(Y?"touchend":"mouseup",{handler:d0=>this.pointerUp.next(d0),options:!0}).set("scroll",{handler:d0=>this.scroll.next(d0),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:I0}),Y||this._globalListeners.set("mousemove",{handler:d0=>this.pointerMove.next(d0),options:I0}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((d0,C0)=>{this._document.addEventListener(C0,d0.handler,d0.options)})})}}stopDragging(W){const k=this._activeDragInstances.indexOf(W);k>-1&&(this._activeDragInstances.splice(k,1),0===this._activeDragInstances.length&&this._clearGlobalListeners())}isDragging(W){return this._activeDragInstances.indexOf(W)>-1}scrolled(W){const k=[this.scroll];return W&&W!==this._document&&k.push(new v0.y(Y=>this._ngZone.runOutsideAngular(()=>{const C0=$0=>{this._activeDragInstances.length&&Y.next($0)};return W.addEventListener("scroll",C0,!0),()=>{W.removeEventListener("scroll",C0,!0)}}))),(0,a0.T)(...k)}ngOnDestroy(){this._dragInstances.forEach(W=>this.removeDragItem(W)),this._dropInstances.forEach(W=>this.removeDropContainer(W)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((W,k)=>{this._document.removeEventListener(k,W.handler,W.options)}),this._globalListeners.clear()}}return(t0=f).\u0275fac=function(W){return new(W||t0)(M.LFG(M.R0b),M.LFG(e.K0))},t0.\u0275prov=M.Yz7({token:t0,factory:t0.\u0275fac,providedIn:"root"}),f})();const X={dragStartThreshold:5,pointerDirectionChangeThreshold:5};let z0=(()=>{var t0;class f{constructor(W,k,Y,d0){this._document=W,this._ngZone=k,this._viewportRuler=Y,this._dragDropRegistry=d0}createDrag(W,k=X){return new Q0(W,k,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(W){return new u1(W,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}}return(t0=f).\u0275fac=function(W){return new(W||t0)(M.LFG(e.K0),M.LFG(M.R0b),M.LFG(c.rL),M.LFG(q0))},t0.\u0275prov=M.Yz7({token:t0,factory:t0.\u0275fac,providedIn:"root"}),f})();const F0=new M.OlP("CDK_DRAG_PARENT"),$1=new M.OlP("CdkDragHandle");let se=(()=>{var t0;class f{get disabled(){return this._disabled}set disabled(W){this._disabled=(0,J.Ig)(W),this._stateChanges.next(this)}constructor(W,k){this.element=W,this._stateChanges=new g.x,this._disabled=!1,this._parentDrag=k}ngOnDestroy(){this._stateChanges.complete()}}return(t0=f).\u0275fac=function(W){return new(W||t0)(M.Y36(M.SBq),M.Y36(F0,12))},t0.\u0275dir=M.lG2({type:t0,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:["cdkDragHandleDisabled","disabled"]},standalone:!0,features:[M._Bn([{provide:$1,useExisting:t0}])]}),f})();const ae=new M.OlP("CdkDragPlaceholder");let be=(()=>{var t0;class f{constructor(W){this.templateRef=W}}return(t0=f).\u0275fac=function(W){return new(W||t0)(M.Y36(M.Rgc))},t0.\u0275dir=M.lG2({type:t0,selectors:[["ng-template","cdkDragPlaceholder",""]],inputs:{data:"data"},standalone:!0,features:[M._Bn([{provide:ae,useExisting:t0}])]}),f})();const _e=new M.OlP("CdkDragPreview"),le=new M.OlP("CDK_DRAG_CONFIG"),qe=new M.OlP("CdkDropList");let ce=(()=>{var t0;class f{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(W){this._disabled=(0,J.Ig)(W),this._dragRef.disabled=this._disabled}constructor(W,k,Y,d0,C0,$0,a1,q1,x1,B1,j1){this.element=W,this.dropContainer=k,this._ngZone=d0,this._viewContainerRef=C0,this._dir=a1,this._changeDetectorRef=x1,this._selfHandle=B1,this._parentDrag=j1,this._destroyed=new g.x,this.started=new M.vpe,this.released=new M.vpe,this.ended=new M.vpe,this.entered=new M.vpe,this.exited=new M.vpe,this.dropped=new M.vpe,this.moved=new v0.y(Me=>{const Re=this._dragRef.moved.pipe((0,n0.U)(P1=>({source:this,pointerPosition:P1.pointerPosition,event:P1.event,delta:P1.delta,distance:P1.distance}))).subscribe(Me);return()=>{Re.unsubscribe()}}),this._dragRef=q1.createDrag(W,{dragStartThreshold:$0&&null!=$0.dragStartThreshold?$0.dragStartThreshold:5,pointerDirectionChangeThreshold:$0&&null!=$0.pointerDirectionChangeThreshold?$0.pointerDirectionChangeThreshold:5,zIndex:$0?.zIndex}),this._dragRef.data=this,f._dragInstances.push(this),$0&&this._assignDefaults($0),k&&(this._dragRef._withDropContainer(k._dropListRef),k.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(W){this._dragRef.setFreeDragPosition(W)}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe((0,f0.q)(1),(0,I.R)(this._destroyed)).subscribe(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)})})}ngOnChanges(W){const k=W.rootElementSelector,Y=W.freeDragPosition;k&&!k.firstChange&&this._updateRootElement(),Y&&!Y.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);const W=f._dragInstances.indexOf(this);W>-1&&f._dragInstances.splice(W,1),this._ngZone.runOutsideAngular(()=>{this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_updateRootElement(){const W=this.element.nativeElement;let k=W;this.rootElementSelector&&(k=void 0!==W.closest?W.closest(this.rootElementSelector):W.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(k||W)}_getBoundaryElement(){const W=this.boundaryElement;return W?"string"==typeof W?this.element.nativeElement.closest(W):(0,J.fI)(W):null}_syncInputs(W){W.beforeStarted.subscribe(()=>{if(!W.isDragging()){const k=this._dir,Y=this.dragStartDelay,d0=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,C0=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;W.disabled=this.disabled,W.lockAxis=this.lockAxis,W.dragStartDelay="object"==typeof Y&&Y?Y:(0,J.su)(Y),W.constrainPosition=this.constrainPosition,W.previewClass=this.previewClass,W.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(d0).withPreviewTemplate(C0).withPreviewContainer(this.previewContainer||"global"),k&&W.withDirection(k.value)}}),W.beforeStarted.pipe((0,f0.q)(1)).subscribe(()=>{if(this._parentDrag)return void W.withParent(this._parentDrag._dragRef);let k=this.element.nativeElement.parentElement;for(;k;){if(k.classList.contains("cdk-drag")){W.withParent(f._dragInstances.find(Y=>Y.element.nativeElement===k)?._dragRef||null);break}k=k.parentElement}})}_handleEvents(W){W.started.subscribe(k=>{this.started.emit({source:this,event:k.event}),this._changeDetectorRef.markForCheck()}),W.released.subscribe(k=>{this.released.emit({source:this,event:k.event})}),W.ended.subscribe(k=>{this.ended.emit({source:this,distance:k.distance,dropPoint:k.dropPoint,event:k.event}),this._changeDetectorRef.markForCheck()}),W.entered.subscribe(k=>{this.entered.emit({container:k.container.data,item:this,currentIndex:k.currentIndex})}),W.exited.subscribe(k=>{this.exited.emit({container:k.container.data,item:this})}),W.dropped.subscribe(k=>{this.dropped.emit({previousIndex:k.previousIndex,currentIndex:k.currentIndex,previousContainer:k.previousContainer.data,container:k.container.data,isPointerOverContainer:k.isPointerOverContainer,item:this,distance:k.distance,dropPoint:k.dropPoint,event:k.event})})}_assignDefaults(W){const{lockAxis:k,dragStartDelay:Y,constrainPosition:d0,previewClass:C0,boundaryElement:$0,draggingDisabled:a1,rootElementSelector:q1,previewContainer:x1}=W;this.disabled=a1??!1,this.dragStartDelay=Y||0,k&&(this.lockAxis=k),d0&&(this.constrainPosition=d0),C0&&(this.previewClass=C0),$0&&(this.boundaryElement=$0),q1&&(this.rootElementSelector=q1),x1&&(this.previewContainer=x1)}_setupHandlesListener(){this._handles.changes.pipe((0,H.O)(this._handles),(0,j0.b)(W=>{const k=W.filter(Y=>Y._parentDrag===this).map(Y=>Y.element);this._selfHandle&&this.rootElementSelector&&k.push(this.element),this._dragRef.withHandles(k)}),(0,Z0.w)(W=>(0,a0.T)(...W.map(k=>k._stateChanges.pipe((0,H.O)(k))))),(0,I.R)(this._destroyed)).subscribe(W=>{const k=this._dragRef,Y=W.element.nativeElement;W.disabled?k.disableHandle(Y):k.enableHandle(Y)})}}return(t0=f)._dragInstances=[],t0.\u0275fac=function(W){return new(W||t0)(M.Y36(M.SBq),M.Y36(qe,12),M.Y36(e.K0),M.Y36(M.R0b),M.Y36(M.s_b),M.Y36(le,8),M.Y36(R0.Is,8),M.Y36(z0),M.Y36(M.sBO),M.Y36($1,10),M.Y36(F0,12))},t0.\u0275dir=M.lG2({type:t0,selectors:[["","cdkDrag",""]],contentQueries:function(W,k,Y){if(1&W&&(M.Suo(Y,_e,5),M.Suo(Y,ae,5),M.Suo(Y,$1,5)),2&W){let d0;M.iGM(d0=M.CRH())&&(k._previewTemplate=d0.first),M.iGM(d0=M.CRH())&&(k._placeholderTemplate=d0.first),M.iGM(d0=M.CRH())&&(k._handles=d0)}},hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(W,k){2&W&&M.ekj("cdk-drag-disabled",k.disabled)("cdk-drag-dragging",k._dragRef.isDragging())},inputs:{data:["cdkDragData","data"],lockAxis:["cdkDragLockAxis","lockAxis"],rootElementSelector:["cdkDragRootElement","rootElementSelector"],boundaryElement:["cdkDragBoundary","boundaryElement"],dragStartDelay:["cdkDragStartDelay","dragStartDelay"],freeDragPosition:["cdkDragFreeDragPosition","freeDragPosition"],disabled:["cdkDragDisabled","disabled"],constrainPosition:["cdkDragConstrainPosition","constrainPosition"],previewClass:["cdkDragPreviewClass","previewClass"],previewContainer:["cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[M._Bn([{provide:F0,useExisting:t0}]),M.TTD]}),f})();const we=new M.OlP("CdkDropListGroup");let fe=(()=>{var t0;class f{constructor(){this._items=new Set,this._disabled=!1}get disabled(){return this._disabled}set disabled(W){this._disabled=(0,J.Ig)(W)}ngOnDestroy(){this._items.clear()}}return(t0=f).\u0275fac=function(W){return new(W||t0)},t0.\u0275dir=M.lG2({type:t0,selectors:[["","cdkDropListGroup",""]],inputs:{disabled:["cdkDropListGroupDisabled","disabled"]},exportAs:["cdkDropListGroup"],standalone:!0,features:[M._Bn([{provide:we,useExisting:t0}])]}),f})(),de=0,Te=(()=>{var t0;class f{get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(W){this._dropListRef.disabled=this._disabled=(0,J.Ig)(W)}constructor(W,k,Y,d0,C0,$0,a1){this.element=W,this._changeDetectorRef=Y,this._scrollDispatcher=d0,this._dir=C0,this._group=$0,this._destroyed=new g.x,this.connectedTo=[],this.id="cdk-drop-list-"+de++,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new M.vpe,this.entered=new M.vpe,this.exited=new M.vpe,this.sorted=new M.vpe,this._unsortedItems=new Set,this._dropListRef=k.createDropList(W),this._dropListRef.data=this,a1&&this._assignDefaults(a1),this._dropListRef.enterPredicate=(q1,x1)=>this.enterPredicate(q1.data,x1.data),this._dropListRef.sortPredicate=(q1,x1,B1)=>this.sortPredicate(q1,x1.data,B1.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),f._dropLists.push(this),$0&&$0._items.add(this)}addItem(W){this._unsortedItems.add(W),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(W){this._unsortedItems.delete(W),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((W,k)=>W._dragRef.getVisibleElement().compareDocumentPosition(k._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){const W=f._dropLists.indexOf(this);W>-1&&f._dropLists.splice(W,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(W){this._dir&&this._dir.change.pipe((0,H.O)(this._dir.value),(0,I.R)(this._destroyed)).subscribe(k=>W.withDirection(k)),W.beforeStarted.subscribe(()=>{const k=(0,J.Eq)(this.connectedTo).map(Y=>"string"==typeof Y?f._dropLists.find(C0=>C0.id===Y):Y);if(this._group&&this._group._items.forEach(Y=>{-1===k.indexOf(Y)&&k.push(Y)}),!this._scrollableParentsResolved){const Y=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(d0=>d0.getElementRef().nativeElement);this._dropListRef.withScrollableParents(Y),this._scrollableParentsResolved=!0}W.disabled=this.disabled,W.lockAxis=this.lockAxis,W.sortingDisabled=(0,J.Ig)(this.sortingDisabled),W.autoScrollDisabled=(0,J.Ig)(this.autoScrollDisabled),W.autoScrollStep=(0,J.su)(this.autoScrollStep,2),W.connectedTo(k.filter(Y=>Y&&Y!==this).map(Y=>Y._dropListRef)).withOrientation(this.orientation)})}_handleEvents(W){W.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),W.entered.subscribe(k=>{this.entered.emit({container:this,item:k.item.data,currentIndex:k.currentIndex})}),W.exited.subscribe(k=>{this.exited.emit({container:this,item:k.item.data}),this._changeDetectorRef.markForCheck()}),W.sorted.subscribe(k=>{this.sorted.emit({previousIndex:k.previousIndex,currentIndex:k.currentIndex,container:this,item:k.item.data})}),W.dropped.subscribe(k=>{this.dropped.emit({previousIndex:k.previousIndex,currentIndex:k.currentIndex,previousContainer:k.previousContainer.data,container:k.container.data,item:k.item.data,isPointerOverContainer:k.isPointerOverContainer,distance:k.distance,dropPoint:k.dropPoint,event:k.event}),this._changeDetectorRef.markForCheck()}),(0,a0.T)(W.receivingStarted,W.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(W){const{lockAxis:k,draggingDisabled:Y,sortingDisabled:d0,listAutoScrollDisabled:C0,listOrientation:$0}=W;this.disabled=Y??!1,this.sortingDisabled=d0??!1,this.autoScrollDisabled=C0??!1,this.orientation=$0||"vertical",k&&(this.lockAxis=k)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(W=>W._dragRef))}}return(t0=f)._dropLists=[],t0.\u0275fac=function(W){return new(W||t0)(M.Y36(M.SBq),M.Y36(z0),M.Y36(M.sBO),M.Y36(c.mF),M.Y36(R0.Is,8),M.Y36(we,12),M.Y36(le,8))},t0.\u0275dir=M.lG2({type:t0,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(W,k){2&W&&(M.uIk("id",k.id),M.ekj("cdk-drop-list-disabled",k.disabled)("cdk-drop-list-dragging",k._dropListRef.isDragging())("cdk-drop-list-receiving",k._dropListRef.isReceiving()))},inputs:{connectedTo:["cdkDropListConnectedTo","connectedTo"],data:["cdkDropListData","data"],orientation:["cdkDropListOrientation","orientation"],id:"id",lockAxis:["cdkDropListLockAxis","lockAxis"],disabled:["cdkDropListDisabled","disabled"],sortingDisabled:["cdkDropListSortingDisabled","sortingDisabled"],enterPredicate:["cdkDropListEnterPredicate","enterPredicate"],sortPredicate:["cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:["cdkDropListAutoScrollDisabled","autoScrollDisabled"],autoScrollStep:["cdkDropListAutoScrollStep","autoScrollStep"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],standalone:!0,features:[M._Bn([{provide:we,useValue:void 0},{provide:qe,useExisting:t0}])]}),f})(),ve=(()=>{var t0;class f{}return(t0=f).\u0275fac=function(W){return new(W||t0)},t0.\u0275mod=M.oAB({type:t0}),t0.\u0275inj=M.cJS({providers:[z0],imports:[c.ZD]}),f})()},1428:(r1,S0,s)=>{"use strict";s.d(S0,{ro:()=>c});var M=s(65879),e=s(7715);function c(S,E){return"string"==typeof S&&(E=S,S=M.dqk),S["__zone_symbol__"+String(E)]||S[E]}const B=c("Promise").resolve();(0,e.D)(B)},67838:(r1,S0,s)=>{"use strict";s.d(S0,{JD:()=>c});const c=(0,s(1428).ro)("Promise")},49278:(r1,S0,s)=>{"use strict";s.d(S0,{_:()=>at});var M=s(4942),e=s(65879),c=s(2664),n=s(22096),J=s(78645),B=s(37398),g=s(94664),v=s(42737);function N(){return(0,g.w)(v.y)}var S=s(93997);function E($){return(0,c.b)($)?$:(0,n.of)($)}function t(){return $=>(0,B.U)(E)($)}function a0($){return $=$||N(),j=>j.pipe(t(),(0,S.x)(),$,(0,S.x)())}var n0=s(65592),f0=s(58504),H=s(65619),j0=s(92438),Z0=s(97328),R0=s(32181),p1=s(21441),T0=s(99397),D0=s(26306),A0=s(48180),Z=s(67081),p0=s(59773),Q=s(27921),V=s(63020);function r0($,j){const m0=$.length;$.push(j),function N0($,j,m0){let O0=m0;for(;;){const w0=O0-1>>>1,V0=$[w0];if(!(void 0!==V0&&e0(V0,j)>0))return;$[w0]=j,$[O0]=V0,O0=w0}}($,j,m0)}function h0($){const j=$[0];return void 0===j?null:j}function O1($){const j=$[0];if(void 0!==j){const m0=$.pop();return m0!==j&&($[0]=m0,function H0($,j,m0){let O0=m0;const w0=$.length;for(;O0$.now()}else{const $=Date,j=$.now();X0=()=>$.now()-j}const x0=[],n1=[];let h1=1,L0=null,o0=3,L=!1,m=!1,d=!1;const K=e.dqk.setTimeout,g0=e.dqk.clearTimeout,e1=e.dqk.setImmediate,u1=e.dqk.MessageChannel,k1=(typeof e.dqk.navigator<"u"&&void 0!==e.dqk.navigator.scheduling&&void 0!==e.dqk.navigator.scheduling.isInputPending&&e.dqk.navigator.scheduling.isInputPending.bind(e.dqk.navigator.scheduling),{run:$=>$()});function W0($){let j=h0(n1);for(;null!==j;){if(null===j.callback)O1(n1);else{if(!(j.startTime<=$))return;O1(n1),j.sortIndex=j.expirationTime,r0(x0,j)}j=h0(n1)}}function I0($){if(d=!1,W0($),!m)if(null!==h0(x0))m=!0,y(q0);else{const j=h0(n1);null!==j&&W(I0,j.startTime-$)}}function q0($,j){m=!1,d&&(d=!1,k()),L=!0;const m0=o0;try{return X($,j)}finally{L0=null,o0=m0,L=!1}}function X($,j,m0){let O0=j;m0?L0=m0:(W0(O0),L0=h0(x0));let w0=!1;const V0=()=>L0&&L0.expirationTime>O0&&(!$||function Te(){return!(!fe&&X0()-de{for(;null!==L0&&!w0&&!V0();){const A1=L0.callback;if("function"==typeof A1){L0.callback=null,o0=L0.priorityLevel;const S1=A1(L0.expirationTime<=O0);O0=X0(),"function"==typeof S1?L0.callback=S1:L0===h0(x0)&&O1(x0),W0(O0)}else O1(x0);L0=h0(x0),w0=null!=L0?.ngZone&&L0.ngZone!==M1}})}if(L0=L0??h0(x0),O0=X0(),w0||L0&&!V0())return X($,O0,L0);if(null!==L0)return!0;{const M1=h0(n1);return null!==M1&&W(I0,M1.startTime-O0),!1}}let le=!1,he=null,qe=-1,ce=16,fe=!1,de=-1;const t0=()=>{if(null!==he){const $=X0();de=$;const j=!0;let m0=!0;try{m0=he(j,$)}finally{m0?f():(le=!1,he=null)}}else le=!1;fe=!1};let f;if("function"==typeof e1)f=()=>{e1(t0)};else if(typeof u1<"u"){const $=new u1,j=$.port2;$.port1.onmessage=t0,f=()=>{j.postMessage(null)}}else f=()=>{K(t0,0)};function y($){he=$,le||(le=!0,f())}function W($,j){qe=K(()=>{$(X0())},j)}function k(){g0(qe),qe=-1}var d0=s(47394);const C0=function x1(){return{remove:function $(O0){const w0=q1.getProps(O0).numCoalescingSubscribers-1;q1.setProps(O0,{numCoalescingSubscribers:w0>=0?w0:0})},add:function j(O0){const w0=q1.getProps(O0).numCoalescingSubscribers+1;q1.setProps(O0,{numCoalescingSubscribers:w0})},isCoalescing:function m0(O0){return q1.getProps(O0).numCoalescingSubscribers>0}}}(),q1=function a1($){const j=new WeakMap;return{getProps:m0,setProps:function O0(w0,V0){const M1=m0(w0);return Object.entries(V0).forEach(([A1,T1])=>{M1[A1]=T1}),j.set(w0,M1),M1}};function m0(w0){const V0=$(w0),M1=j.get(w0);let A1;return void 0!==M1?A1=M1:(A1={},Object.entries(V0).forEach(([T1,S1])=>{A1[T1]=function $0($,j){return null!=$[j]}(w0,T1)?w0[T1]:S1}),j.set(w0,A1)),A1}}($=>({numCoalescingSubscribers:0}));var j1=s(1428);function G1($,j){const m0=j.scope||{};return O0=>O0.pipe((0,R0.h)(()=>!C0.isCoalescing(m0)),(0,g.w)(w0=>new n0.y(V0=>{C0.add(m0);const M1=function $1($,j,m0){const O0=X0();let w0,V0;if("object"==typeof m0&&null!==m0){const T1=m0.delay;w0="number"==typeof T1&&T1>0?O0+T1:O0}else w0=O0;switch($){case 1:V0=-1;break;case 2:V0=250;break;case 5:V0=1073741823;break;case 4:V0=1e4;break;default:V0=5e3}const M1=w0+V0,A1={id:h1++,callback:j,priorityLevel:$,startTime:w0,expirationTime:M1,sortIndex:-1,ngZone:m0?.ngZone||null};return w0>O0?(A1.sortIndex=w0,r0(n1,A1),null===h0(x0)&&A1===h0(n1)&&(d?k():d=!0,W(I0,w0-O0))):(A1.sortIndex=M1,r0(x0,A1),!m&&!L&&(m=!0,y(q0))),A1}(j.priority,()=>{$(),C0.remove(m0),V0.next(w0)},{delay:j.delay,ngZone:j.ngZone});return()=>{C0.remove(m0),function _e($){$.callback=null}(M1)}}).pipe((0,p1.h)(w0))))}!function ve($){$<0||$>125||(ce=$>0?Math.floor(1e3/$):5,ce=Math.max(5,ce-6))}(60);const Ee={immediate:{name:"immediate",work:$=>$.detectChanges(),behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(G1($,{ngZone:m0,priority:1,scope:j}))},userBlocking:{name:"userBlocking",work:$=>$.detectChanges(),behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(G1($,{ngZone:m0,priority:2,scope:j}))},normal:{name:"normal",work:$=>$.detectChanges(),behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(G1($,{ngZone:m0,priority:3,scope:j}))},low:{name:"low",work:$=>$.detectChanges(),behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(G1($,{ngZone:m0,priority:4,scope:j}))},idle:{name:"idle",work:$=>$.detectChanges(),behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(G1($,{ngZone:m0,priority:5,scope:j}))}},Ve={native:{name:"native",work:$=>$.markForCheck(),behavior:({work:$,ngZone:j})=>m0=>m0.pipe((0,T0.b)(()=>j&&!e.R0b.isInAngularZone()?j.run(()=>$()):$()))},noop:{name:"noop",work:()=>{},behavior:()=>$=>$},local:{name:"local",work:($,j,m0)=>{$.detectChanges()},behavior:({work:$,scope:j,ngZone:m0})=>O0=>O0.pipe(function B1($,j){const m0=j||{};return O0=>new n0.y(V0=>{const M1=new d0.w0;return M1.add(O0.subscribe(function w0(V0,M1){let A1,T1;const S1=()=>{A1&&(C0.remove(m0),C0.isCoalescing(m0)||V0.next(T1))};return{complete:()=>{S1(),V0.complete()},error:R1=>V0.error(R1),next:R1=>{T1=R1,A1||(C0.add(m0),A1=$.subscribe({error:W1=>V0.error(W1),next:()=>{S1(),A1?.unsubscribe(),A1=void 0},complete:()=>{S1(),A1=void 0}}),M1.add(new d0.w0(()=>{S1(),A1?.unsubscribe(),A1=void 0})))}}}(V0,M1))),M1})}(new n0.y($=>{const j=(0,j1.ro)("requestAnimationFrame")(()=>{$.next(0),$.complete()});return()=>{(0,j1.ro)("cancelAnimationFrame")(j)}}),j),(0,T0.b)(()=>m0?m0.run(()=>$()):$()))}},Ze=new e.OlP("rxa-render-strategies-config"),Q1={primaryStrategy:"normal",customStrategies:{...Ve,...Ee},patchZone:!0,parent:!0};function re($,j,m0,O0={}){return new n0.y(w0=>{w0.next($)}).pipe(j.behavior({work:()=>m0($,j.work,O0),scope:O0.scope||{},ngZone:O0.ngZone}),(0,D0.K)(w0=>(0,f0._)(()=>[w0,$])),(0,B.U)(()=>$),(0,A0.q)(1))}let ct=(()=>{var $;class j{get config(){return this._cfg}get strategies(){return this._strategies$.getValue()}get strategyNames(){return Object.values(this.strategies).map(O0=>O0.name)}get primaryStrategy(){return this._primaryStrategy$.getValue().name}set primaryStrategy(O0){this._primaryStrategy$.next(this.strategies[O0])}constructor(O0){(0,M.Z)(this,"_strategies$",new H.X(void 0)),(0,M.Z)(this,"_primaryStrategy$",new H.X(void 0)),(0,M.Z)(this,"_cfg",void 0),(0,M.Z)(this,"primaryStrategy$",this._primaryStrategy$.asObservable()),(0,M.Z)(this,"strategies$",this._strategies$.asObservable()),(0,M.Z)(this,"strategyNames$",this.strategies$.pipe((0,B.U)(w0=>Object.values(w0).map(V0=>V0.name)),(0,Z.d)({bufferSize:1,refCount:!0}))),this._cfg=function me($){const j=$||{customStrategies:{}};return{...Q1,...j,customStrategies:{...j.customStrategies,...Q1.customStrategies}}}(O0),this._strategies$.next(this._cfg.customStrategies),this.primaryStrategy=this.config.primaryStrategy}scheduleWith(O0,w0){const V0=this.strategies[w0?.strategy||this.primaryStrategy],M1=w0?.scope||{},A1=Pe(O0,w0?.patchZone),T1=w0?.patchZone||void 0;return S1=>S1.pipe((0,g.w)(R1=>re(R1,V0,W1=>{A1(W1)},{scope:M1,ngZone:T1})))}schedule(O0,w0){const V0=this.strategies[w0?.strategy||this.primaryStrategy],M1=w0?.scope||{},A1=Pe(O0,w0?.patchZone);let S1;return re(null,V0,()=>{S1=A1()},{scope:M1,ngZone:w0?.patchZone||void 0}).pipe((0,B.U)(()=>S1))}scheduleCD(O0,w0){const V0=this.strategies[w0?.strategy||this.primaryStrategy],M1=w0?.scope||O0,A1=w0?.abortCtrl||new AbortController,T1=w0?.patchZone||void 0,S1=Pe(()=>{V0.work(O0,M1),w0?.afterCD&&w0.afterCD()},w0.patchZone);return re(null,V0,()=>{S1()},{scope:M1,ngZone:T1}).pipe((0,p0.R)((0,j0.R)(A1.signal,"abort"))).subscribe(),A1}}return $=j,(0,M.Z)(j,"\u0275fac",function(O0){return new(O0||$)(e.LFG(Ze,8))}),(0,M.Z)(j,"\u0275prov",e.Yz7({token:$,factory:$.\u0275fac,providedIn:"root"})),j})();function Pe($,j){let m0=$;return j&&(m0=O0=>j.run(()=>$(O0))),m0}function dt($,j){return m0=>m0.pipe((0,B.U)(O0=>O0&&Object.keys($).includes(O0)?$[O0]:$[j]))}var zt=s(35211),Ue=s(52572),u0=s(17538);function o1(...$){const j=$.length;if(0===j)throw new Error("list of properties cannot be empty.");return(0,B.U)(m0=>{let O0=m0;for(let w0=0;w0{const D1=R1.item;null==R1.previousIndex?(O0.push(function T1(R1,W1){return[0,[R1,null===W1?void 0:W1]]}(D1,null===I1?void 0:I1)),m0.add(D1),w0=!0):null==I1?(O0.push(function S1(R1,W1){return[1,[R1,null===W1?void 0:W1]]}(D1,null===W1?void 0:W1)),w0=!0):null!==W1&&(O0.push(function V0(R1,W1,I1){return[2,[R1,W1,I1]]}(D1,I1,W1)),m0.add(D1),w0=!0)}),$.forEachIdentityChange(R1=>{const W1=R1.item;m0.has(W1)||(O0.push(function M1(R1,W1){return[3,[R1,W1]]}(W1,R1.currentIndex)),m0.add(W1))}),j.forEach((R1,W1)=>{m0.has(R1)||O0.push(function A1(R1,W1){return[4,[R1,W1]]}(R1,W1))}),[O0,w0]}function At($){const{templateSettings:j,renderSettings:m0,trackBy:O0,iterableDiffers:w0}=$,{defaultStrategyName:V0,strategies:M1,cdRef:A1,patchZone:T1,parent:S1}=m0,R1=function v1($){const j=$?m0=>$.handleError(m0):console.error;return{handleError:m0=>{!function w1($){return null!=$&&Array.isArray($)&&2===$.length&&$[0]instanceof Error}(m0)?j(m0):(j(m0[0]),console.error("additionalErrorContext",m0[1]))}}}(m0.errorHandler),W1=T1||void 0,I1=function Mt($,j){const m0=function I($,j){const m0=$?$():new J.x;return j=j||N(),{next(w0){m0.next(w0)},values$:m0.pipe(a0(j))}}(()=>new Z0.t(1),N());return{strategy$:m0.values$.pipe((0,Q.O)($),dt(j,$),(0,V.B)()),next(O0){m0.next(O0)}}}(V0,M1);let D1;const ze=function ke($){const{viewContainerRef:j,initialTemplateRef:m0,createViewContext:O0,updateViewContext:w0}=$;return{updateUnchangedContext:function V0(R1,W1,I1){const D1=j.get(W1);w0(R1,D1,{count:I1,index:W1}),D1.detectChanges()},insertView:function S1(R1,W1,I1){!function _0($,j,m0,O0=0){const w0=$.createEmbeddedView(j,m0,O0);return w0.detectChanges(),w0}(j,m0,O0(R1,{count:I1,index:W1}),W1)},moveView:function M1(R1,W1,I1,D1){const xe=j.get(R1),ze=j.move(xe,I1);w0(W1,ze,{count:D1,index:I1}),ze.detectChanges()},removeView:function T1(R1){return j.remove(R1)},getListChanges:De,updateView:function A1(R1,W1,I1){const D1=j.get(W1);w0(R1,D1,{count:I1,index:W1}),D1.detectChanges()}}}({...j,initialTemplateRef:j.templateRef}),nt=j.viewContainerRef;let oe,Ie=!1,y1=!1;return{nextStrategy(X1){I1.next(X1)},render:X1=>X1.pipe(function Fe(){return X1=>(0,Ue.a)([X1,I1.strategy$.pipe((0,S.x)())]).pipe((0,B.U)(([H1,ee])=>{const te=function xe(X1){return D1||(X1?D1=w0.find(X1).create(O0):null)}(H1);let C1;if(te){if(y1){const ue=[];for(let ie=0,ge=nt.length;ie{if(!H1)return(0,n.of)([]);const C1=ee||[],ue=Array.isArray(C1)?C1:Array.from(ee),ie=ze.getListChanges(H1,ue);oe=ie[0];const ge=ie[1],Ne=function Ae(X1,H1,ee){return X1.length>0?X1.map(te=>{const C1=te[1];return re(te[0],H1,ue=>{switch(ue){case 0:ze.insertView(C1[0],C1[1],ee);break;case 2:ze.moveView(C1[2],C1[0],C1[1],ee);break;case 1:ze.removeView(C1[1]);break;case 3:ze.updateView(C1[0],C1[1],ee);break;case 4:ze.updateUnchangedContext(C1[0],C1[1],ee)}},{ngZone:W1})}):[(0,n.of)(null)]}(oe,te,ue.length);return y1=!0,Ie=ge&&S1,(0,Ue.a)(Ne.length>0?Ne:[(0,n.of)(null)]).pipe((0,T0.b)(()=>y1=!1),function k0($,j,m0,O0){return w0=>w0.pipe((0,g.w)(V0=>m0()?(0,zt.z)((0,n.of)(V0),re($,j,(A1,T1,S1)=>{T1($,S1.scope)},{scope:$.context||$,ngZone:O0}).pipe((0,u0.l)())):(0,n.of)(V0)))}(A1,te,()=>Ie,W1),J1(),(0,B.U)(()=>ee))}),J1())}())};function J1(){return X1=>X1.pipe((0,D0.K)(H1=>(y1=!1,R1.handleError(H1),(0,n.of)(null))))}}const ut=({index:j})=>0===j,_t=({count:$,index:j})=>j===$-1,ht=({index:j})=>j%2==0;class et{set $implicit(j){this._$implicit=j,this._item.next(j)}get $implicit(){return this._$implicit}get $complete(){return this._$complete}get $error(){return this._$error}get $suspense(){return this._$suspense}get index(){return this._context$.getValue().index}get count(){return this._context$.getValue().count}get first(){return ut(this._context$.getValue())}get last(){return _t(this._context$.getValue())}get even(){return ht(this._context$.getValue())}get odd(){return!this.even}get index$(){return this._context$.pipe(o1("index"),(0,S.x)())}get count$(){return this._context$.pipe(o1("count"),(0,S.x)())}get first$(){return this._context$.pipe((0,B.U)(ut),(0,S.x)())}get last$(){return this._context$.pipe((0,B.U)(_t),(0,S.x)())}get even$(){return this._context$.pipe((0,B.U)(ht),(0,S.x)())}get odd$(){return this.even$.pipe((0,B.U)(j=>!j))}constructor(j,m0){(0,M.Z)(this,"_item",new Z0.t(1)),(0,M.Z)(this,"item$",this._item.asObservable()),(0,M.Z)(this,"_$implicit",void 0),(0,M.Z)(this,"_$complete",void 0),(0,M.Z)(this,"_$error",void 0),(0,M.Z)(this,"_$suspense",void 0),(0,M.Z)(this,"_context$",new H.X({index:-1,count:-1})),(0,M.Z)(this,"select",O0=>this.item$.pipe(o1(...O0))),this.$implicit=j,m0&&this.updateContext(m0)}updateContext(j){this._context$.next({...this._context$.getValue(),...j})}}class tt extends et{constructor(j,m0,O0){super(j,O0),(0,M.Z)(this,"rxForOf",void 0),this.rxForOf=m0}}let at=(()=>{var $;class j{constructor(){(0,M.Z)(this,"iterableDiffers",(0,e.f3M)(e.ZZ4)),(0,M.Z)(this,"cdRef",(0,e.f3M)(e.sBO)),(0,M.Z)(this,"ngZone",(0,e.f3M)(e.R0b)),(0,M.Z)(this,"templateRef",(0,e.f3M)(e.Rgc)),(0,M.Z)(this,"viewContainerRef",(0,e.f3M)(e.s_b)),(0,M.Z)(this,"strategyProvider",(0,e.f3M)(ct)),(0,M.Z)(this,"errorHandler",(0,e.f3M)(e.qLn)),(0,M.Z)(this,"staticValue",void 0),(0,M.Z)(this,"renderStatic",!1),(0,M.Z)(this,"_template",void 0),(0,M.Z)(this,"renderParent",this.strategyProvider.config.parent),(0,M.Z)(this,"patchZone",this.strategyProvider.config.patchZone),(0,M.Z)(this,"strategyInput$",new Z0.t(1)),(0,M.Z)(this,"observables$",new Z0.t(1)),(0,M.Z)(this,"_renderCallback",void 0),(0,M.Z)(this,"values$",this.observables$.pipe(t(),N(),(0,Z.d)({refCount:!0,bufferSize:1}))),(0,M.Z)(this,"values",null),(0,M.Z)(this,"strategy$",this.strategyInput$.pipe(a0())),(0,M.Z)(this,"listManager",void 0),(0,M.Z)(this,"_subscription",new d0.w0),(0,M.Z)(this,"_trackBy",void 0),(0,M.Z)(this,"_distinctBy",(O0,w0)=>O0===w0)}set rxForOf(O0){(0,c.b)(O0)?(this.staticValue=void 0,this.renderStatic=!1,this.observables$.next(O0)):(this.staticValue=O0,this.renderStatic=!0)}set rxForTemplate(O0){this._template=O0}set rxForStrategy(O0){this.strategyInput$.next(O0)}set trackBy(O0){this._trackBy=null==O0?null:"function"!=typeof O0?(w0,V0)=>V0[O0]:O0}set renderCallback(O0){this._renderCallback=O0}get template(){return this._template||this.templateRef}ngOnInit(){this._subscription.add(this.values$.subscribe(O0=>this.values=O0)),this.listManager=At({iterableDiffers:this.iterableDiffers,renderSettings:{cdRef:this.cdRef,strategies:this.strategyProvider.strategies,defaultStrategyName:this.strategyProvider.primaryStrategy,parent:!!this.renderParent,patchZone:!!this.patchZone&&this.ngZone,errorHandler:this.errorHandler},templateSettings:{viewContainerRef:this.viewContainerRef,templateRef:this.template,createViewContext:this.createViewContext.bind(this),updateViewContext:this.updateViewContext.bind(this)},trackBy:this._trackBy}),this.listManager.nextStrategy(this.strategy$),this._subscription.add(this.listManager.render(this.values$).subscribe(O0=>this._renderCallback?.next(O0)))}createViewContext(O0,w0){return new tt(O0,this.values,w0)}updateViewContext(O0,w0,V0){w0.context.updateContext(V0),w0.context.rxForOf=this.values,w0.context.$implicit=O0}ngDoCheck(){this.renderStatic&&this.observables$.next(this.staticValue)}ngOnDestroy(){this._subscription.unsubscribe(),this.viewContainerRef.clear()}static ngTemplateContextGuard(O0,w0){return!0}}return $=j,(0,M.Z)(j,"\u0275fac",function(O0){return new(O0||$)}),(0,M.Z)(j,"\u0275dir",e.lG2({type:$,selectors:[["","rxFor","","rxForOf",""]],inputs:{rxForOf:"rxForOf",rxForTemplate:"rxForTemplate",rxForStrategy:"rxForStrategy",renderParent:["rxForParent","renderParent"],patchZone:["rxForPatchZone","patchZone"],trackBy:["rxForTrackBy","trackBy"],renderCallback:["rxForRenderCallback","renderCallback"]},standalone:!0})),j})()},42753:(r1,S0,s)=>{"use strict";s.d(S0,{PG:()=>h0,Z_:()=>O1,f8:()=>V});var M=s(65879),e=s(96814),c=s(60095),n=s(92438),J=s(74911),B=s(78645),g=s(59773),v=s(48180),N=s(21441),S=s(67081);function E(N0,H0){}const t=()=>{const N0=typeof window<"u"?window:void 0;return N0&&N0.tinymce?N0.tinymce:null};let v0=(()=>{class N0{constructor(){this.onBeforePaste=new M.vpe,this.onBlur=new M.vpe,this.onClick=new M.vpe,this.onContextMenu=new M.vpe,this.onCopy=new M.vpe,this.onCut=new M.vpe,this.onDblclick=new M.vpe,this.onDrag=new M.vpe,this.onDragDrop=new M.vpe,this.onDragEnd=new M.vpe,this.onDragGesture=new M.vpe,this.onDragOver=new M.vpe,this.onDrop=new M.vpe,this.onFocus=new M.vpe,this.onFocusIn=new M.vpe,this.onFocusOut=new M.vpe,this.onKeyDown=new M.vpe,this.onKeyPress=new M.vpe,this.onKeyUp=new M.vpe,this.onMouseDown=new M.vpe,this.onMouseEnter=new M.vpe,this.onMouseLeave=new M.vpe,this.onMouseMove=new M.vpe,this.onMouseOut=new M.vpe,this.onMouseOver=new M.vpe,this.onMouseUp=new M.vpe,this.onPaste=new M.vpe,this.onSelectionChange=new M.vpe,this.onActivate=new M.vpe,this.onAddUndo=new M.vpe,this.onBeforeAddUndo=new M.vpe,this.onBeforeExecCommand=new M.vpe,this.onBeforeGetContent=new M.vpe,this.onBeforeRenderUI=new M.vpe,this.onBeforeSetContent=new M.vpe,this.onChange=new M.vpe,this.onClearUndos=new M.vpe,this.onDeactivate=new M.vpe,this.onDirty=new M.vpe,this.onExecCommand=new M.vpe,this.onGetContent=new M.vpe,this.onHide=new M.vpe,this.onInit=new M.vpe,this.onInitNgModel=new M.vpe,this.onLoadContent=new M.vpe,this.onNodeChange=new M.vpe,this.onPostProcess=new M.vpe,this.onPostRender=new M.vpe,this.onPreInit=new M.vpe,this.onPreProcess=new M.vpe,this.onProgressState=new M.vpe,this.onRedo=new M.vpe,this.onRemove=new M.vpe,this.onReset=new M.vpe,this.onResizeEditor=new M.vpe,this.onSaveContent=new M.vpe,this.onSetAttrib=new M.vpe,this.onObjectResizeStart=new M.vpe,this.onObjectResized=new M.vpe,this.onObjectSelected=new M.vpe,this.onSetContent=new M.vpe,this.onShow=new M.vpe,this.onSubmit=new M.vpe,this.onUndo=new M.vpe,this.onVisualAid=new M.vpe}}return N0.\u0275fac=function(e0){return new(e0||N0)},N0.\u0275dir=M.lG2({type:N0,outputs:{onBeforePaste:"onBeforePaste",onBlur:"onBlur",onClick:"onClick",onContextMenu:"onContextMenu",onCopy:"onCopy",onCut:"onCut",onDblclick:"onDblclick",onDrag:"onDrag",onDragDrop:"onDragDrop",onDragEnd:"onDragEnd",onDragGesture:"onDragGesture",onDragOver:"onDragOver",onDrop:"onDrop",onFocus:"onFocus",onFocusIn:"onFocusIn",onFocusOut:"onFocusOut",onKeyDown:"onKeyDown",onKeyPress:"onKeyPress",onKeyUp:"onKeyUp",onMouseDown:"onMouseDown",onMouseEnter:"onMouseEnter",onMouseLeave:"onMouseLeave",onMouseMove:"onMouseMove",onMouseOut:"onMouseOut",onMouseOver:"onMouseOver",onMouseUp:"onMouseUp",onPaste:"onPaste",onSelectionChange:"onSelectionChange",onActivate:"onActivate",onAddUndo:"onAddUndo",onBeforeAddUndo:"onBeforeAddUndo",onBeforeExecCommand:"onBeforeExecCommand",onBeforeGetContent:"onBeforeGetContent",onBeforeRenderUI:"onBeforeRenderUI",onBeforeSetContent:"onBeforeSetContent",onChange:"onChange",onClearUndos:"onClearUndos",onDeactivate:"onDeactivate",onDirty:"onDirty",onExecCommand:"onExecCommand",onGetContent:"onGetContent",onHide:"onHide",onInit:"onInit",onInitNgModel:"onInitNgModel",onLoadContent:"onLoadContent",onNodeChange:"onNodeChange",onPostProcess:"onPostProcess",onPostRender:"onPostRender",onPreInit:"onPreInit",onPreProcess:"onPreProcess",onProgressState:"onProgressState",onRedo:"onRedo",onRemove:"onRemove",onReset:"onReset",onResizeEditor:"onResizeEditor",onSaveContent:"onSaveContent",onSetAttrib:"onSetAttrib",onObjectResizeStart:"onObjectResizeStart",onObjectResized:"onObjectResized",onObjectSelected:"onObjectSelected",onSetContent:"onSetContent",onShow:"onShow",onSubmit:"onSubmit",onUndo:"onUndo",onVisualAid:"onVisualAid"}}),N0})();const a0=["onActivate","onAddUndo","onBeforeAddUndo","onBeforeExecCommand","onBeforeGetContent","onBeforeRenderUI","onBeforeSetContent","onBeforePaste","onBlur","onChange","onClearUndos","onClick","onContextMenu","onCopy","onCut","onDblclick","onDeactivate","onDirty","onDrag","onDragDrop","onDragEnd","onDragGesture","onDragOver","onDrop","onExecCommand","onFocus","onFocusIn","onFocusOut","onGetContent","onHide","onInit","onKeyDown","onKeyPress","onKeyUp","onLoadContent","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onNodeChange","onObjectResizeStart","onObjectResized","onObjectSelected","onPaste","onPostProcess","onPostRender","onPreProcess","onProgressState","onRedo","onRemove","onReset","onResizeEditor","onSaveContent","onSelectionChange","onSetAttrib","onSetContent","onShow","onSubmit","onUndo","onVisualAid"],I=(N0,H0,e0)=>(0,n.R)(N0,H0).pipe((0,g.R)(e0)),H=(N0,H0)=>"string"==typeof N0?N0.split(",").map(e0=>e0.trim()):Array.isArray(N0)?N0:H0;let j0=0;const R0=N0=>typeof N0<"u"&&"textarea"===N0.tagName.toLowerCase(),p1=N0=>typeof N0>"u"||""===N0?[]:Array.isArray(N0)?N0:N0.split(" "),T0=(N0,H0)=>p1(N0).concat(p1(H0)),D0=()=>{},A0=N0=>null==N0,Q=(()=>{let N0={script$:null};return{load:(X0,c0)=>N0.script$||(N0.script$=(0,J.P)(()=>{const b0=X0.createElement("script");return b0.referrerPolicy="origin",b0.type="application/javascript",b0.src=c0,X0.head.appendChild(b0),(0,n.R)(b0,"load").pipe((0,v.q)(1),(0,N.h)(void 0))}).pipe((0,S.d)({bufferSize:1,refCount:!0}))),reinitialize:()=>{N0={script$:null}}}})(),V=new M.OlP("TINYMCE_SCRIPT_SRC"),r0={provide:c.JU,useExisting:(0,M.Gpc)(()=>h0),multi:!0};let h0=(()=>{class N0 extends v0{constructor(e0,X0,c0,b0){super(),this.platformId=c0,this.tinymceScriptSrc=b0,this.cloudChannel="6",this.apiKey="no-api-key",this.id="",this.modelEvents="change input undo redo",this.onTouchedCallback=D0,this.destroy$=new B.x,this.initialise=()=>{const E0={...this.init,selector:void 0,target:this._element,inline:this.inline,readonly:this.disabled,plugins:T0(this.init&&this.init.plugins,this.plugins),toolbar:this.toolbar||this.init&&this.init.toolbar,setup:B0=>{this._editor=B0,I(B0,"init",this.destroy$).subscribe(()=>{this.initEditor(B0)}),((N0,H0,e0)=>{(N0=>{const H0=H(N0.ignoreEvents,[]);return H(N0.allowedEvents,a0).filter(X0=>a0.includes(X0)&&!H0.includes(X0))})(N0).forEach(c0=>{const b0=N0[c0];I(H0,c0.substring(2),e0).subscribe(E0=>{b0.observers.length>0&&N0.ngZone.run(()=>b0.emit({event:E0,editor:H0}))})})})(this,B0,this.destroy$),this.init&&"function"==typeof this.init.setup&&this.init.setup(B0)}};R0(this._element)&&(this._element.style.visibility=""),this.ngZone.runOutsideAngular(()=>{t().init(E0)})},this._elementRef=e0,this.ngZone=X0}set disabled(e0){this._disabled=e0,this._editor&&this._editor.initialized&&("function"==typeof this._editor.mode?.set?this._editor.mode.set(e0?"readonly":"design"):this._editor.setMode(e0?"readonly":"design"))}get disabled(){return this._disabled}get editor(){return this._editor}writeValue(e0){this._editor&&this._editor.initialized?this._editor.setContent(A0(e0)?"":e0):this.initialValue=null===e0?void 0:e0}registerOnChange(e0){this.onChangeCallback=e0}registerOnTouched(e0){this.onTouchedCallback=e0}setDisabledState(e0){this.disabled=e0}ngAfterViewInit(){(0,e.NF)(this.platformId)&&(this.id=this.id||(N0=>{const e0=(new Date).getTime(),X0=Math.floor(1e9*Math.random());return j0++,"tiny-angular_"+X0+j0+String(e0)})(),this.inline=void 0!==this.inline?!1!==this.inline:!!this.init?.inline,this.createElement(),null!==t()?this.initialise():this._element&&this._element.ownerDocument&&Q.load(this._element.ownerDocument,this.getScriptSrc()).pipe((0,g.R)(this.destroy$)).subscribe(this.initialise))}ngOnDestroy(){this.destroy$.next(),null!==t()&&t().remove(this._editor)}createElement(){this._element=document.createElement(this.inline?"string"==typeof this.tagName?this.tagName:"div":"textarea"),this._element&&(document.getElementById(this.id)&&console.warn(`TinyMCE-Angular: an element with id [${this.id}] already exists. Editors with duplicate Id will not be able to mount`),this._element.id=this.id,R0(this._element)&&(this._element.style.visibility="hidden"),this._elementRef.nativeElement.appendChild(this._element))}getScriptSrc(){return A0(this.tinymceScriptSrc)?`https://cdn.tiny.cloud/1/${this.apiKey}/tinymce/${this.cloudChannel}/tinymce.min.js`:this.tinymceScriptSrc}initEditor(e0){I(e0,"blur",this.destroy$).subscribe(()=>{this.ngZone.run(()=>this.onTouchedCallback())}),I(e0,this.modelEvents,this.destroy$).subscribe(()=>{this.ngZone.run(()=>this.emitOnChange(e0))}),"string"==typeof this.initialValue&&this.ngZone.run(()=>{e0.setContent(this.initialValue),e0.getContent()!==this.initialValue&&this.emitOnChange(e0),void 0!==this.onInitNgModel&&this.onInitNgModel.emit(e0)})}emitOnChange(e0){this.onChangeCallback&&this.onChangeCallback(e0.getContent({format:this.outputFormat}))}}return N0.\u0275fac=function(e0){return new(e0||N0)(M.Y36(M.SBq),M.Y36(M.R0b),M.Y36(M.Lbi),M.Y36(V,8))},N0.\u0275cmp=M.Xpm({type:N0,selectors:[["editor"]],inputs:{cloudChannel:"cloudChannel",apiKey:"apiKey",init:"init",id:"id",initialValue:"initialValue",outputFormat:"outputFormat",inline:"inline",tagName:"tagName",plugins:"plugins",toolbar:"toolbar",modelEvents:"modelEvents",allowedEvents:"allowedEvents",ignoreEvents:"ignoreEvents",disabled:"disabled"},standalone:!0,features:[M._Bn([r0]),M.qOj,M.jDz],decls:1,vars:0,template:function(e0,X0){1&e0&&M.YNc(0,E,0,0,"ng-template")},dependencies:[e.ez,c.u5],styles:["[_nghost-%COMP%]{display:block}"]}),N0})(),O1=(()=>{class N0{}return N0.\u0275fac=function(e0){return new(e0||N0)},N0.\u0275mod=M.oAB({type:N0}),N0.\u0275inj=M.cJS({imports:[h0]}),N0})()},90565:(r1,S0,s)=>{"use strict";s.d(S0,{Zv:()=>A0,cD:()=>Z,yH:()=>T0});var M=s(97582),e=s(65879),c=s(92438),n=s(59773),J=s(32181),B=s(64194),g=s(40874),v=s(99087),N=s(27754),S=s(49388),E=s(331),t=s(96814),v0=s(62595),a0=s(8324);const I=["*"],n0=["collapseHeader"];function f0(p0,Q){if(1&p0&&(e.ynx(0),e._UZ(1,"span",7),e.BQk()),2&p0){const V=Q.$implicit,r0=e.oxw(2);e.xp6(1),e.Q6J("nzType",V||"right")("nzRotate",r0.nzActive?90:0)}}function H(p0,Q){if(1&p0&&(e.TgZ(0,"div"),e.YNc(1,f0,2,2,"ng-container",3),e.qZA()),2&p0){const V=e.oxw();e.xp6(1),e.Q6J("nzStringTemplateOutlet",V.nzExpandedIcon)}}function j0(p0,Q){if(1&p0&&(e.ynx(0),e._uU(1),e.BQk()),2&p0){const V=e.oxw();e.xp6(1),e.Oqu(V.nzHeader)}}function Z0(p0,Q){if(1&p0&&(e.ynx(0),e._uU(1),e.BQk()),2&p0){const V=e.oxw(2);e.xp6(1),e.Oqu(V.nzExtra)}}function R0(p0,Q){if(1&p0&&(e.TgZ(0,"div",8),e.YNc(1,Z0,2,1,"ng-container",3),e.qZA()),2&p0){const V=e.oxw();e.xp6(1),e.Q6J("nzStringTemplateOutlet",V.nzExtra)}}const p1="collapse";let T0=(()=>{var p0;class Q{constructor(r0,h0,O1,N0){this.nzConfigService=r0,this.cdr=h0,this.directionality=O1,this.destroy$=N0,this._nzModuleName=p1,this.nzAccordion=!1,this.nzBordered=!0,this.nzGhost=!1,this.nzExpandIconPosition="left",this.dir="ltr",this.listOfNzCollapsePanelComponent=[],this.nzConfigService.getConfigChangeEventForComponent(p1).pipe((0,n.R)(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.directionality.change?.pipe((0,n.R)(this.destroy$)).subscribe(r0=>{this.dir=r0,this.cdr.detectChanges()}),this.dir=this.directionality.value}addPanel(r0){this.listOfNzCollapsePanelComponent.push(r0)}removePanel(r0){this.listOfNzCollapsePanelComponent.splice(this.listOfNzCollapsePanelComponent.indexOf(r0),1)}click(r0){this.nzAccordion&&!r0.nzActive&&this.listOfNzCollapsePanelComponent.filter(h0=>h0!==r0).forEach(h0=>{h0.nzActive&&(h0.nzActive=!1,h0.nzActiveChange.emit(h0.nzActive),h0.markForCheck())}),r0.nzActive=!r0.nzActive,r0.nzActiveChange.emit(r0.nzActive)}}return(p0=Q).\u0275fac=function(r0){return new(r0||p0)(e.Y36(g.jY),e.Y36(e.sBO),e.Y36(S.Is,8),e.Y36(v.kn))},p0.\u0275cmp=e.Xpm({type:p0,selectors:[["nz-collapse"]],hostAttrs:[1,"ant-collapse"],hostVars:10,hostBindings:function(r0,h0){2&r0&&e.ekj("ant-collapse-icon-position-left","left"===h0.nzExpandIconPosition)("ant-collapse-icon-position-right","right"===h0.nzExpandIconPosition)("ant-collapse-ghost",h0.nzGhost)("ant-collapse-borderless",!h0.nzBordered)("ant-collapse-rtl","rtl"===h0.dir)},inputs:{nzAccordion:"nzAccordion",nzBordered:"nzBordered",nzGhost:"nzGhost",nzExpandIconPosition:"nzExpandIconPosition"},exportAs:["nzCollapse"],features:[e._Bn([v.kn])],ngContentSelectors:I,decls:1,vars:0,template:function(r0,h0){1&r0&&(e.F$t(),e.Hsn(0))},encapsulation:2,changeDetection:0}),(0,M.gn)([(0,g.oS)(),(0,N.yF)()],Q.prototype,"nzAccordion",void 0),(0,M.gn)([(0,g.oS)(),(0,N.yF)()],Q.prototype,"nzBordered",void 0),(0,M.gn)([(0,g.oS)(),(0,N.yF)()],Q.prototype,"nzGhost",void 0),Q})();const D0="collapsePanel";let A0=(()=>{var p0;class Q{markForCheck(){this.cdr.markForCheck()}constructor(r0,h0,O1,N0,H0,e0){this.nzConfigService=r0,this.ngZone=h0,this.cdr=O1,this.destroy$=N0,this.nzCollapseComponent=H0,this.noAnimation=e0,this._nzModuleName=D0,this.nzActive=!1,this.nzDisabled=!1,this.nzShowArrow=!0,this.nzActiveChange=new e.vpe,this.nzConfigService.getConfigChangeEventForComponent(D0).pipe((0,n.R)(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()})}ngOnInit(){this.nzCollapseComponent.addPanel(this),this.ngZone.runOutsideAngular(()=>(0,c.R)(this.collapseHeader.nativeElement,"click").pipe((0,J.h)(()=>!this.nzDisabled),(0,n.R)(this.destroy$)).subscribe(()=>{this.ngZone.run(()=>{this.nzCollapseComponent.click(this),this.cdr.markForCheck()})}))}ngOnDestroy(){this.nzCollapseComponent.removePanel(this)}}return(p0=Q).\u0275fac=function(r0){return new(r0||p0)(e.Y36(g.jY),e.Y36(e.R0b),e.Y36(e.sBO),e.Y36(v.kn),e.Y36(T0,1),e.Y36(E.P,8))},p0.\u0275cmp=e.Xpm({type:p0,selectors:[["nz-collapse-panel"]],viewQuery:function(r0,h0){if(1&r0&&e.Gf(n0,7),2&r0){let O1;e.iGM(O1=e.CRH())&&(h0.collapseHeader=O1.first)}},hostAttrs:[1,"ant-collapse-item"],hostVars:6,hostBindings:function(r0,h0){2&r0&&e.ekj("ant-collapse-no-arrow",!h0.nzShowArrow)("ant-collapse-item-active",h0.nzActive)("ant-collapse-item-disabled",h0.nzDisabled)},inputs:{nzActive:"nzActive",nzDisabled:"nzDisabled",nzShowArrow:"nzShowArrow",nzExtra:"nzExtra",nzHeader:"nzHeader",nzExpandedIcon:"nzExpandedIcon"},outputs:{nzActiveChange:"nzActiveChange"},exportAs:["nzCollapsePanel"],features:[e._Bn([v.kn])],ngContentSelectors:I,decls:8,vars:8,consts:[["role","button",1,"ant-collapse-header"],["collapseHeader",""],[4,"ngIf"],[4,"nzStringTemplateOutlet"],["class","ant-collapse-extra",4,"ngIf"],[1,"ant-collapse-content"],[1,"ant-collapse-content-box"],["nz-icon","",1,"ant-collapse-arrow",3,"nzType","nzRotate"],[1,"ant-collapse-extra"]],template:function(r0,h0){1&r0&&(e.F$t(),e.TgZ(0,"div",0,1),e.YNc(2,H,2,1,"div",2),e.YNc(3,j0,2,1,"ng-container",3),e.YNc(4,R0,2,1,"div",4),e.qZA(),e.TgZ(5,"div",5)(6,"div",6),e.Hsn(7),e.qZA()()),2&r0&&(e.uIk("aria-expanded",h0.nzActive),e.xp6(2),e.Q6J("ngIf",h0.nzShowArrow),e.xp6(1),e.Q6J("nzStringTemplateOutlet",h0.nzHeader),e.xp6(1),e.Q6J("ngIf",h0.nzExtra),e.xp6(1),e.ekj("ant-collapse-content-active",h0.nzActive),e.Q6J("@.disabled",!(null==h0.noAnimation||!h0.noAnimation.nzNoAnimation))("@collapseMotion",h0.nzActive?"expanded":"hidden"))},dependencies:[t.O5,v0.Ls,a0.f],encapsulation:2,data:{animation:[B.J_]},changeDetection:0}),(0,M.gn)([(0,N.yF)()],Q.prototype,"nzActive",void 0),(0,M.gn)([(0,N.yF)()],Q.prototype,"nzDisabled",void 0),(0,M.gn)([(0,g.oS)(),(0,N.yF)()],Q.prototype,"nzShowArrow",void 0),Q})(),Z=(()=>{var p0;class Q{}return(p0=Q).\u0275fac=function(r0){return new(r0||p0)},p0.\u0275mod=e.oAB({type:p0}),p0.\u0275inj=e.cJS({imports:[S.vT,t.ez,v0.PV,a0.T,E.g]}),Q})()},61320:(r1,S0,s)=>{"use strict";s.d(S0,{DA:()=>j0,Ql:()=>p1,WE:()=>T0,Y4:()=>Z0,YM:()=>A0});var M=s(49388),e=s(96814),c=s(65879),n=s(8324),J=s(68484),B=s(78645),g=s(59773);function v(Z,p0){1&Z&&c.Hsn(0)}const N=["*"];function S(Z,p0){if(1&Z&&(c.ynx(0),c._uU(1),c.BQk()),2&Z){const Q=c.oxw(2);c.xp6(1),c.Oqu(Q.nzAuthor)}}function E(Z,p0){if(1&Z&&(c.TgZ(0,"span",8),c.YNc(1,S,2,1,"ng-container",9),c.qZA()),2&Z){const Q=c.oxw();c.xp6(1),c.Q6J("nzStringTemplateOutlet",Q.nzAuthor)}}function t(Z,p0){if(1&Z&&(c.ynx(0),c._uU(1),c.BQk()),2&Z){const Q=c.oxw(2);c.xp6(1),c.Oqu(Q.nzDatetime)}}function v0(Z,p0){if(1&Z&&(c.TgZ(0,"span",10),c.YNc(1,t,2,1,"ng-container",9),c.qZA()),2&Z){const Q=c.oxw();c.xp6(1),c.Q6J("nzStringTemplateOutlet",Q.nzDatetime)}}function a0(Z,p0){}function I(Z,p0){if(1&Z&&(c.TgZ(0,"li")(1,"span"),c.YNc(2,a0,0,0,"ng-template",13),c.qZA()()),2&Z){const Q=p0.$implicit;c.xp6(2),c.Q6J("nzCommentActionHost",Q.content)}}function n0(Z,p0){if(1&Z&&(c.TgZ(0,"ul",11),c.YNc(1,I,3,1,"li",12),c.qZA()),2&Z){const Q=c.oxw();c.xp6(1),c.Q6J("ngForOf",Q.actions)}}const f0=[[["nz-avatar","nz-comment-avatar",""]],[["nz-comment-content"]],"*"],H=["nz-avatar[nz-comment-avatar]","nz-comment-content","*"];let j0=(()=>{var Z;class p0{}return(Z=p0).\u0275fac=function(V){return new(V||Z)},Z.\u0275dir=c.lG2({type:Z,selectors:[["nz-avatar","nz-comment-avatar",""]],exportAs:["nzCommentAvatar"]}),p0})(),Z0=(()=>{var Z;class p0{}return(Z=p0).\u0275fac=function(V){return new(V||Z)},Z.\u0275dir=c.lG2({type:Z,selectors:[["nz-comment-content"],["","nz-comment-content",""]],hostAttrs:[1,"ant-comment-content-detail"],exportAs:["nzCommentContent"]}),p0})(),R0=(()=>{var Z;class p0 extends J.Pl{constructor(V,r0){super(V,r0)}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}ngAfterViewInit(){this.attach(this.nzCommentActionHost)}}return(Z=p0).\u0275fac=function(V){return new(V||Z)(c.Y36(c._Vd),c.Y36(c.s_b))},Z.\u0275dir=c.lG2({type:Z,selectors:[["","nzCommentActionHost",""]],inputs:{nzCommentActionHost:"nzCommentActionHost"},exportAs:["nzCommentActionHost"],features:[c.qOj]}),p0})(),p1=(()=>{var Z;class p0{get content(){return this.contentPortal}constructor(V){this.viewContainerRef=V,this.contentPortal=null}ngOnInit(){this.contentPortal=new J.UE(this.implicitContent,this.viewContainerRef)}}return(Z=p0).\u0275fac=function(V){return new(V||Z)(c.Y36(c.s_b))},Z.\u0275cmp=c.Xpm({type:Z,selectors:[["nz-comment-action"]],viewQuery:function(V,r0){if(1&V&&c.Gf(c.Rgc,7),2&V){let h0;c.iGM(h0=c.CRH())&&(r0.implicitContent=h0.first)}},exportAs:["nzCommentAction"],ngContentSelectors:N,decls:1,vars:0,template:function(V,r0){1&V&&(c.F$t(),c.YNc(0,v,1,0,"ng-template"))},encapsulation:2,changeDetection:0}),p0})(),T0=(()=>{var Z;class p0{constructor(V,r0){this.cdr=V,this.directionality=r0,this.dir="ltr",this.destroy$=new B.x}ngOnInit(){this.directionality.change?.pipe((0,g.R)(this.destroy$)).subscribe(V=>{this.dir=V,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}}return(Z=p0).\u0275fac=function(V){return new(V||Z)(c.Y36(c.sBO),c.Y36(M.Is,8))},Z.\u0275cmp=c.Xpm({type:Z,selectors:[["nz-comment"]],contentQueries:function(V,r0,h0){if(1&V&&c.Suo(h0,p1,4),2&V){let O1;c.iGM(O1=c.CRH())&&(r0.actions=O1)}},hostVars:4,hostBindings:function(V,r0){2&V&&c.ekj("ant-comment",!0)("ant-comment-rtl","rtl"===r0.dir)},inputs:{nzAuthor:"nzAuthor",nzDatetime:"nzDatetime"},exportAs:["nzComment"],ngContentSelectors:H,decls:11,vars:3,consts:[[1,"ant-comment-inner"],[1,"ant-comment-avatar"],[1,"ant-comment-content"],[1,"ant-comment-content-author"],["class","ant-comment-content-author-name",4,"ngIf"],["class","ant-comment-content-author-time",4,"ngIf"],["class","ant-comment-actions",4,"ngIf"],[1,"ant-comment-nested"],[1,"ant-comment-content-author-name"],[4,"nzStringTemplateOutlet"],[1,"ant-comment-content-author-time"],[1,"ant-comment-actions"],[4,"ngFor","ngForOf"],[3,"nzCommentActionHost"]],template:function(V,r0){1&V&&(c.F$t(f0),c.TgZ(0,"div",0)(1,"div",1),c.Hsn(2),c.qZA(),c.TgZ(3,"div",2)(4,"div",3),c.YNc(5,E,2,1,"span",4),c.YNc(6,v0,2,1,"span",5),c.qZA(),c.Hsn(7,1),c.YNc(8,n0,2,1,"ul",6),c.qZA()(),c.TgZ(9,"div",7),c.Hsn(10,2),c.qZA()),2&V&&(c.xp6(5),c.Q6J("ngIf",r0.nzAuthor),c.xp6(1),c.Q6J("ngIf",r0.nzDatetime),c.xp6(2),c.Q6J("ngIf",null==r0.actions?null:r0.actions.length))},dependencies:[e.sg,e.O5,n.f,R0],encapsulation:2,changeDetection:0}),p0})(),A0=(()=>{var Z;class p0{}return(Z=p0).\u0275fac=function(V){return new(V||Z)},Z.\u0275mod=c.oAB({type:Z}),Z.\u0275inj=c.cJS({imports:[M.vT,e.ez,n.T]}),p0})()},52682:(r1,S0,s)=>{"use strict";s.d(S0,{Ah:()=>St,Hb:()=>qt,rT:()=>Se,te:()=>ge,uw:()=>bt,wS:()=>Ut});var M=s(49388),e=s(69594),c=s(96814),n=s(65879),J=s(60095),B=s(42840),g=s(50883),v=s(331),N=s(8324),S=s(85448),E=s(62595),t=s(60047),v0=s(56523),a0=s(27754),I=s(64345),n0=s(70855),f0=s(41958),H=s(97582),j0=s(36028),Z0=s(97328),R0=s(78645),p1=s(63019),T0=s(92438),D0=s(22096),A0=s(59773),Z=s(93997),p0=s(42460),Q=s(37398),V=s(64194),r0=s(40874),h0=s(99087),O1=s(28802),N0=s(62831);function H0(_,F){1&_&&n.GkF(0)}function e0(_,F){if(1&_&&(n.ynx(0),n.YNc(1,H0,1,0,"ng-container",4),n.BQk()),2&_){const A=n.oxw(2);n.xp6(1),n.Q6J("ngTemplateOutlet",A.extraFooter)}}function X0(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",5),n.BQk()),2&_){const A=n.oxw(2);n.xp6(1),n.Q6J("innerHTML",A.extraFooter,n.oJD)}}function c0(_,F){if(1&_&&(n.TgZ(0,"div"),n.ynx(1,2),n.YNc(2,e0,2,1,"ng-container",3),n.YNc(3,X0,2,1,"ng-container",3),n.BQk(),n.qZA()),2&_){const A=n.oxw();n.Gre("",A.prefixCls,"-footer-extra"),n.xp6(1),n.Q6J("ngSwitch",!0),n.xp6(1),n.Q6J("ngSwitchCase",A.isTemplateRef(A.extraFooter)),n.xp6(1),n.Q6J("ngSwitchCase",A.isNonEmptyString(A.extraFooter))}}function b0(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"a",6),n.NdJ("click",function(){n.CHM(A);const h=n.oxw();return n.KtG(h.isTodayDisabled?null:h.onClickToday())}),n._uU(1),n.qZA()}if(2&_){const A=n.oxw();n.MT6("",A.prefixCls,"-today-btn ",A.isTodayDisabled?A.prefixCls+"-today-btn-disabled":"",""),n.s9C("title",A.todayTitle),n.xp6(1),n.hij(" ",A.locale.today," ")}}function E0(_,F){1&_&&n.GkF(0)}function B0(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"li")(1,"a",7),n.NdJ("click",function(){n.CHM(A);const h=n.oxw(2);return n.KtG(h.isTodayDisabled?null:h.onClickToday())}),n._uU(2),n.qZA()()}if(2&_){const A=n.oxw(2);n.Gre("",A.prefixCls,"-now"),n.xp6(1),n.Gre("",A.prefixCls,"-now-btn"),n.xp6(1),n.hij(" ",A.locale.now," ")}}function U0(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"li")(1,"button",8),n.NdJ("click",function(){n.CHM(A);const h=n.oxw(2);return n.KtG(h.okDisabled?null:h.clickOk.emit())}),n._uU(2),n.qZA()()}if(2&_){const A=n.oxw(2);n.Gre("",A.prefixCls,"-ok"),n.xp6(1),n.Q6J("disabled",A.okDisabled),n.xp6(1),n.hij(" ",A.locale.ok," ")}}function z1(_,F){if(1&_&&(n.TgZ(0,"ul"),n.YNc(1,E0,1,0,"ng-container",4),n.YNc(2,B0,3,7,"li",0),n.YNc(3,U0,3,5,"li",0),n.qZA()),2&_){const A=n.oxw();n.Gre("",A.prefixCls,"-ranges"),n.xp6(1),n.Q6J("ngTemplateOutlet",A.rangeQuickSelector),n.xp6(1),n.Q6J("ngIf",A.showNow),n.xp6(1),n.Q6J("ngIf",A.hasTimePicker)}}function Q0(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"button",6),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onClick())}),n._uU(2),n.qZA(),n.BQk()}if(2&_){const A=F.$implicit;n.xp6(1),n.Tol(A.className),n.s9C("title",A.title||null),n.xp6(1),n.hij(" ",A.label," ")}}function x0(_,F){1&_&&n._UZ(0,"th",6)}function n1(_,F){if(1&_&&(n.TgZ(0,"th",7),n._uU(1),n.qZA()),2&_){const A=F.$implicit;n.s9C("title",A.title),n.xp6(1),n.hij(" ",A.content," ")}}function h1(_,F){if(1&_&&(n.TgZ(0,"thead")(1,"tr",3),n.YNc(2,x0,1,0,"th",4),n.YNc(3,n1,2,2,"th",5),n.qZA()()),2&_){const A=n.oxw();n.xp6(2),n.Q6J("ngIf",A.showWeek),n.xp6(1),n.Q6J("ngForOf",A.headRow)}}function M0(_,F){if(1&_&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&_){const A=n.oxw().$implicit,a=n.oxw();n.Gre("",a.prefixCls,"-cell-week"),n.xp6(1),n.hij(" ",A.weekNum," ")}}function L0(_,F){1&_&&n.GkF(0)}const o0=function(_){return{$implicit:_}};function L(_,F){if(1&_&&(n.ynx(0),n.YNc(1,L0,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function m(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",17),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("innerHTML",A.cellRender,n.oJD)}}function d(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n._uU(2),n.qZA(),n.BQk()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.xp6(1),n.Gre("",a.prefixCls,"-cell-inner"),n.uIk("aria-selected",A.isSelected)("aria-disabled",A.isDisabled),n.xp6(1),n.hij(" ",A.content," ")}}function K(_,F){if(1&_&&(n.ynx(0)(1,13),n.YNc(2,L,2,4,"ng-container",14),n.YNc(3,m,2,1,"ng-container",14),n.YNc(4,d,3,6,"ng-container",15),n.BQk()()),2&_){const A=n.oxw().$implicit,a=n.oxw(2);n.xp6(1),n.Q6J("ngSwitch",!0),n.xp6(1),n.Q6J("ngSwitchCase",a.isTemplateRef(A.cellRender)),n.xp6(1),n.Q6J("ngSwitchCase",a.isNonEmptyString(A.cellRender))}}function g0(_,F){1&_&&n.GkF(0)}function e1(_,F){if(1&_&&(n.ynx(0),n.YNc(1,g0,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.fullCellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function u1(_,F){1&_&&n.GkF(0)}function L1(_,F){if(1&_&&(n.TgZ(0,"div"),n._uU(1),n.qZA(),n.TgZ(2,"div"),n.YNc(3,u1,1,0,"ng-container",16),n.qZA()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.Gre("",a.prefixCls,"-date-value"),n.xp6(1),n.Oqu(A.content),n.xp6(1),n.Gre("",a.prefixCls,"-date-content"),n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(9,o0,A.value))}}function k1(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n.YNc(2,e1,2,4,"ng-container",18),n.YNc(3,L1,4,11,"ng-template",null,19,n.W1O),n.qZA(),n.BQk()),2&_){const A=n.MAs(4),a=n.oxw().$implicit,h=n.oxw(2);n.xp6(1),n.Gre("",h.prefixCls,"-date ant-picker-cell-inner"),n.ekj("ant-picker-calendar-date-today",a.isToday),n.xp6(1),n.Q6J("ngIf",a.fullCellRender)("ngIfElse",A)}}function W0(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"td",12),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.isDisabled?null:P.onClick())})("mouseenter",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onMouseEnter())}),n.ynx(1,13),n.YNc(2,K,5,3,"ng-container",14),n.YNc(3,k1,5,7,"ng-container",14),n.BQk(),n.qZA()}if(2&_){const A=F.$implicit,a=n.oxw(2);n.s9C("title",A.title),n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngSwitch",a.prefixCls),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker"),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker-calendar")}}function I0(_,F){if(1&_&&(n.TgZ(0,"tr",8),n.YNc(1,M0,2,4,"td",9),n.YNc(2,W0,4,5,"td",10),n.qZA()),2&_){const A=F.$implicit,a=n.oxw();n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngIf",A.weekNum),n.xp6(1),n.Q6J("ngForOf",A.dateCells)("ngForTrackBy",a.trackByBodyColumn)}}function q0(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"button",6),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onClick())}),n._uU(2),n.qZA(),n.BQk()}if(2&_){const A=F.$implicit;n.xp6(1),n.Tol(A.className),n.s9C("title",A.title||null),n.xp6(1),n.hij(" ",A.label," ")}}function X(_,F){1&_&&n._UZ(0,"th",6)}function z0(_,F){if(1&_&&(n.TgZ(0,"th",7),n._uU(1),n.qZA()),2&_){const A=F.$implicit;n.s9C("title",A.title),n.xp6(1),n.hij(" ",A.content," ")}}function F0(_,F){if(1&_&&(n.TgZ(0,"thead")(1,"tr",3),n.YNc(2,X,1,0,"th",4),n.YNc(3,z0,2,2,"th",5),n.qZA()()),2&_){const A=n.oxw();n.xp6(2),n.Q6J("ngIf",A.showWeek),n.xp6(1),n.Q6J("ngForOf",A.headRow)}}function l1(_,F){if(1&_&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&_){const A=n.oxw().$implicit,a=n.oxw();n.Gre("",a.prefixCls,"-cell-week"),n.xp6(1),n.hij(" ",A.weekNum," ")}}function $1(_,F){1&_&&n.GkF(0)}function se(_,F){if(1&_&&(n.ynx(0),n.YNc(1,$1,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function ae(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",17),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("innerHTML",A.cellRender,n.oJD)}}function be(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n._uU(2),n.qZA(),n.BQk()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.xp6(1),n.Gre("",a.prefixCls,"-cell-inner"),n.uIk("aria-selected",A.isSelected)("aria-disabled",A.isDisabled),n.xp6(1),n.hij(" ",A.content," ")}}function _e(_,F){if(1&_&&(n.ynx(0)(1,13),n.YNc(2,se,2,4,"ng-container",14),n.YNc(3,ae,2,1,"ng-container",14),n.YNc(4,be,3,6,"ng-container",15),n.BQk()()),2&_){const A=n.oxw().$implicit,a=n.oxw(2);n.xp6(1),n.Q6J("ngSwitch",!0),n.xp6(1),n.Q6J("ngSwitchCase",a.isTemplateRef(A.cellRender)),n.xp6(1),n.Q6J("ngSwitchCase",a.isNonEmptyString(A.cellRender))}}function Be(_,F){1&_&&n.GkF(0)}function le(_,F){if(1&_&&(n.ynx(0),n.YNc(1,Be,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.fullCellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function he(_,F){1&_&&n.GkF(0)}function qe(_,F){if(1&_&&(n.TgZ(0,"div"),n._uU(1),n.qZA(),n.TgZ(2,"div"),n.YNc(3,he,1,0,"ng-container",16),n.qZA()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.Gre("",a.prefixCls,"-date-value"),n.xp6(1),n.Oqu(A.content),n.xp6(1),n.Gre("",a.prefixCls,"-date-content"),n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(9,o0,A.value))}}function ce(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n.YNc(2,le,2,4,"ng-container",18),n.YNc(3,qe,4,11,"ng-template",null,19,n.W1O),n.qZA(),n.BQk()),2&_){const A=n.MAs(4),a=n.oxw().$implicit,h=n.oxw(2);n.xp6(1),n.Gre("",h.prefixCls,"-date ant-picker-cell-inner"),n.ekj("ant-picker-calendar-date-today",a.isToday),n.xp6(1),n.Q6J("ngIf",a.fullCellRender)("ngIfElse",A)}}function we(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"td",12),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.isDisabled?null:P.onClick())})("mouseenter",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onMouseEnter())}),n.ynx(1,13),n.YNc(2,_e,5,3,"ng-container",14),n.YNc(3,ce,5,7,"ng-container",14),n.BQk(),n.qZA()}if(2&_){const A=F.$implicit,a=n.oxw(2);n.s9C("title",A.title),n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngSwitch",a.prefixCls),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker"),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker-calendar")}}function fe(_,F){if(1&_&&(n.TgZ(0,"tr",8),n.YNc(1,l1,2,4,"td",9),n.YNc(2,we,4,5,"td",10),n.qZA()),2&_){const A=F.$implicit,a=n.oxw();n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngIf",A.weekNum),n.xp6(1),n.Q6J("ngForOf",A.dateCells)("ngForTrackBy",a.trackByBodyColumn)}}function de(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"button",6),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onClick())}),n._uU(2),n.qZA(),n.BQk()}if(2&_){const A=F.$implicit;n.xp6(1),n.Tol(A.className),n.s9C("title",A.title||null),n.xp6(1),n.hij(" ",A.label," ")}}function Te(_,F){1&_&&n._UZ(0,"th",6)}function Ge(_,F){if(1&_&&(n.TgZ(0,"th",7),n._uU(1),n.qZA()),2&_){const A=F.$implicit;n.s9C("title",A.title),n.xp6(1),n.hij(" ",A.content," ")}}function ve(_,F){if(1&_&&(n.TgZ(0,"thead")(1,"tr",3),n.YNc(2,Te,1,0,"th",4),n.YNc(3,Ge,2,2,"th",5),n.qZA()()),2&_){const A=n.oxw();n.xp6(2),n.Q6J("ngIf",A.showWeek),n.xp6(1),n.Q6J("ngForOf",A.headRow)}}function t0(_,F){if(1&_&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&_){const A=n.oxw().$implicit,a=n.oxw();n.Gre("",a.prefixCls,"-cell-week"),n.xp6(1),n.hij(" ",A.weekNum," ")}}function f(_,F){1&_&&n.GkF(0)}function y(_,F){if(1&_&&(n.ynx(0),n.YNc(1,f,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function W(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",17),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("innerHTML",A.cellRender,n.oJD)}}function k(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n._uU(2),n.qZA(),n.BQk()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.xp6(1),n.Gre("",a.prefixCls,"-cell-inner"),n.uIk("aria-selected",A.isSelected)("aria-disabled",A.isDisabled),n.xp6(1),n.hij(" ",A.content," ")}}function Y(_,F){if(1&_&&(n.ynx(0)(1,13),n.YNc(2,y,2,4,"ng-container",14),n.YNc(3,W,2,1,"ng-container",14),n.YNc(4,k,3,6,"ng-container",15),n.BQk()()),2&_){const A=n.oxw().$implicit,a=n.oxw(2);n.xp6(1),n.Q6J("ngSwitch",!0),n.xp6(1),n.Q6J("ngSwitchCase",a.isTemplateRef(A.cellRender)),n.xp6(1),n.Q6J("ngSwitchCase",a.isNonEmptyString(A.cellRender))}}function d0(_,F){1&_&&n.GkF(0)}function C0(_,F){if(1&_&&(n.ynx(0),n.YNc(1,d0,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.fullCellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function $0(_,F){1&_&&n.GkF(0)}function a1(_,F){if(1&_&&(n.TgZ(0,"div"),n._uU(1),n.qZA(),n.TgZ(2,"div"),n.YNc(3,$0,1,0,"ng-container",16),n.qZA()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.Gre("",a.prefixCls,"-date-value"),n.xp6(1),n.Oqu(A.content),n.xp6(1),n.Gre("",a.prefixCls,"-date-content"),n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(9,o0,A.value))}}function q1(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n.YNc(2,C0,2,4,"ng-container",18),n.YNc(3,a1,4,11,"ng-template",null,19,n.W1O),n.qZA(),n.BQk()),2&_){const A=n.MAs(4),a=n.oxw().$implicit,h=n.oxw(2);n.xp6(1),n.Gre("",h.prefixCls,"-date ant-picker-cell-inner"),n.ekj("ant-picker-calendar-date-today",a.isToday),n.xp6(1),n.Q6J("ngIf",a.fullCellRender)("ngIfElse",A)}}function x1(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"td",12),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.isDisabled?null:P.onClick())})("mouseenter",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onMouseEnter())}),n.ynx(1,13),n.YNc(2,Y,5,3,"ng-container",14),n.YNc(3,q1,5,7,"ng-container",14),n.BQk(),n.qZA()}if(2&_){const A=F.$implicit,a=n.oxw(2);n.s9C("title",A.title),n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngSwitch",a.prefixCls),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker"),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker-calendar")}}function B1(_,F){if(1&_&&(n.TgZ(0,"tr",8),n.YNc(1,t0,2,4,"td",9),n.YNc(2,x1,4,5,"td",10),n.qZA()),2&_){const A=F.$implicit,a=n.oxw();n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngIf",A.weekNum),n.xp6(1),n.Q6J("ngForOf",A.dateCells)("ngForTrackBy",a.trackByBodyColumn)}}function j1(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"button",6),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onClick())}),n._uU(2),n.qZA(),n.BQk()}if(2&_){const A=F.$implicit;n.xp6(1),n.Tol(A.className),n.s9C("title",A.title||null),n.xp6(1),n.hij(" ",A.label," ")}}function Me(_,F){1&_&&n._UZ(0,"th",6)}function Re(_,F){if(1&_&&(n.TgZ(0,"th",7),n._uU(1),n.qZA()),2&_){const A=F.$implicit;n.s9C("title",A.title),n.xp6(1),n.hij(" ",A.content," ")}}function P1(_,F){if(1&_&&(n.TgZ(0,"thead")(1,"tr",3),n.YNc(2,Me,1,0,"th",4),n.YNc(3,Re,2,2,"th",5),n.qZA()()),2&_){const A=n.oxw();n.xp6(2),n.Q6J("ngIf",A.showWeek),n.xp6(1),n.Q6J("ngForOf",A.headRow)}}function Xe(_,F){if(1&_&&(n.TgZ(0,"td",11),n._uU(1),n.qZA()),2&_){const A=n.oxw().$implicit,a=n.oxw();n.Gre("",a.prefixCls,"-cell-week"),n.xp6(1),n.hij(" ",A.weekNum," ")}}function Ce(_,F){1&_&&n.GkF(0)}function G1(_,F){if(1&_&&(n.ynx(0),n.YNc(1,Ce,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function Ee(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",17),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("innerHTML",A.cellRender,n.oJD)}}function je(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n._uU(2),n.qZA(),n.BQk()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.xp6(1),n.Gre("",a.prefixCls,"-cell-inner"),n.uIk("aria-selected",A.isSelected)("aria-disabled",A.isDisabled),n.xp6(1),n.hij(" ",A.content," ")}}function Qe(_,F){if(1&_&&(n.ynx(0)(1,13),n.YNc(2,G1,2,4,"ng-container",14),n.YNc(3,Ee,2,1,"ng-container",14),n.YNc(4,je,3,6,"ng-container",15),n.BQk()()),2&_){const A=n.oxw().$implicit,a=n.oxw(2);n.xp6(1),n.Q6J("ngSwitch",!0),n.xp6(1),n.Q6J("ngSwitchCase",a.isTemplateRef(A.cellRender)),n.xp6(1),n.Q6J("ngSwitchCase",a.isNonEmptyString(A.cellRender))}}function st(_,F){1&_&&n.GkF(0)}function lt(_,F){if(1&_&&(n.ynx(0),n.YNc(1,st,1,0,"ng-container",16),n.BQk()),2&_){const A=n.oxw(2).$implicit;n.xp6(1),n.Q6J("ngTemplateOutlet",A.fullCellRender)("ngTemplateOutletContext",n.VKq(2,o0,A.value))}}function Ve(_,F){1&_&&n.GkF(0)}function Ze(_,F){if(1&_&&(n.TgZ(0,"div"),n._uU(1),n.qZA(),n.TgZ(2,"div"),n.YNc(3,Ve,1,0,"ng-container",16),n.qZA()),2&_){const A=n.oxw(2).$implicit,a=n.oxw(2);n.Gre("",a.prefixCls,"-date-value"),n.xp6(1),n.Oqu(A.content),n.xp6(1),n.Gre("",a.prefixCls,"-date-content"),n.xp6(1),n.Q6J("ngTemplateOutlet",A.cellRender)("ngTemplateOutletContext",n.VKq(9,o0,A.value))}}function Q1(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n.YNc(2,lt,2,4,"ng-container",18),n.YNc(3,Ze,4,11,"ng-template",null,19,n.W1O),n.qZA(),n.BQk()),2&_){const A=n.MAs(4),a=n.oxw().$implicit,h=n.oxw(2);n.xp6(1),n.Gre("",h.prefixCls,"-date ant-picker-cell-inner"),n.ekj("ant-picker-calendar-date-today",a.isToday),n.xp6(1),n.Q6J("ngIf",a.fullCellRender)("ngIfElse",A)}}function me(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"td",12),n.NdJ("click",function(){const P=n.CHM(A).$implicit;return n.KtG(P.isDisabled?null:P.onClick())})("mouseenter",function(){const P=n.CHM(A).$implicit;return n.KtG(P.onMouseEnter())}),n.ynx(1,13),n.YNc(2,Qe,5,3,"ng-container",14),n.YNc(3,Q1,5,7,"ng-container",14),n.BQk(),n.qZA()}if(2&_){const A=F.$implicit,a=n.oxw(2);n.s9C("title",A.title),n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngSwitch",a.prefixCls),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker"),n.xp6(1),n.Q6J("ngSwitchCase","ant-picker-calendar")}}function re(_,F){if(1&_&&(n.TgZ(0,"tr",8),n.YNc(1,Xe,2,4,"td",9),n.YNc(2,me,4,5,"td",10),n.qZA()),2&_){const A=F.$implicit,a=n.oxw();n.Q6J("ngClass",A.classMap),n.xp6(1),n.Q6J("ngIf",A.weekNum),n.xp6(1),n.Q6J("ngForOf",A.dateCells)("ngForTrackBy",a.trackByBodyColumn)}}function ct(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"decade-header",4),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.activeDate=h)})("panelModeChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.panelModeChange.emit(h))})("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.headerChange.emit(h))}),n.qZA(),n.TgZ(2,"div")(3,"decade-table",5),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onChooseDecade(h))}),n.qZA()(),n.BQk()}if(2&_){const A=n.oxw();n.xp6(1),n.Q6J("value",A.activeDate)("locale",A.locale)("showSuperPreBtn",A.enablePrevNext("prev","decade"))("showSuperNextBtn",A.enablePrevNext("next","decade"))("showNextBtn",!1)("showPreBtn",!1),n.xp6(1),n.Gre("",A.prefixCls,"-body"),n.xp6(1),n.Q6J("activeDate",A.activeDate)("value",A.value)("locale",A.locale)("disabledDate",A.disabledDate)}}function Pe(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"year-header",4),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.activeDate=h)})("panelModeChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.panelModeChange.emit(h))})("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.headerChange.emit(h))}),n.qZA(),n.TgZ(2,"div")(3,"year-table",6),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onChooseYear(h))})("cellHover",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.cellHover.emit(h))}),n.qZA()(),n.BQk()}if(2&_){const A=n.oxw();n.xp6(1),n.Q6J("value",A.activeDate)("locale",A.locale)("showSuperPreBtn",A.enablePrevNext("prev","year"))("showSuperNextBtn",A.enablePrevNext("next","year"))("showNextBtn",!1)("showPreBtn",!1),n.xp6(1),n.Gre("",A.prefixCls,"-body"),n.xp6(1),n.Q6J("activeDate",A.activeDate)("value",A.value)("locale",A.locale)("disabledDate",A.disabledDate)("selectedValue",A.selectedValue)("hoverValue",A.hoverValue)}}function Mt(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"month-header",4),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.activeDate=h)})("panelModeChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.panelModeChange.emit(h))})("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.headerChange.emit(h))}),n.qZA(),n.TgZ(2,"div")(3,"month-table",7),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onChooseMonth(h))})("cellHover",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.cellHover.emit(h))}),n.qZA()(),n.BQk()}if(2&_){const A=n.oxw();n.xp6(1),n.Q6J("value",A.activeDate)("locale",A.locale)("showSuperPreBtn",A.enablePrevNext("prev","month"))("showSuperNextBtn",A.enablePrevNext("next","month"))("showNextBtn",!1)("showPreBtn",!1),n.xp6(1),n.Gre("",A.prefixCls,"-body"),n.xp6(1),n.Q6J("value",A.value)("activeDate",A.activeDate)("locale",A.locale)("disabledDate",A.disabledDate)("selectedValue",A.selectedValue)("hoverValue",A.hoverValue)}}function dt(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"date-header",8),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.activeDate=h)})("panelModeChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.panelModeChange.emit(h))})("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.headerChange.emit(h))}),n.qZA(),n.TgZ(2,"div")(3,"date-table",9),n.NdJ("valueChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onSelectDate(h))})("cellHover",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.cellHover.emit(h))}),n.qZA()(),n.BQk()}if(2&_){const A=n.oxw();n.xp6(1),n.Q6J("value",A.activeDate)("locale",A.locale)("showSuperPreBtn",A.enablePrevNext("prev","week"===A.panelMode?"week":"date"))("showSuperNextBtn",A.enablePrevNext("next","week"===A.panelMode?"week":"date"))("showPreBtn",A.enablePrevNext("prev","week"===A.panelMode?"week":"date"))("showNextBtn",A.enablePrevNext("next","week"===A.panelMode?"week":"date")),n.xp6(1),n.Gre("",A.prefixCls,"-body"),n.xp6(1),n.Q6J("locale",A.locale)("showWeek",A.showWeek)("value",A.value)("activeDate",A.activeDate)("disabledDate",A.disabledDate)("cellRender",A.dateRender)("selectedValue",A.selectedValue)("hoverValue",A.hoverValue)("canSelectWeek","week"===A.panelMode)}}function zt(_,F){if(1&_){const A=n.EpF();n.ynx(0),n.TgZ(1,"nz-time-picker-panel",10),n.NdJ("ngModelChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onSelectTime(h))}),n.qZA(),n.BQk()}if(2&_){const A=n.oxw();n.xp6(1),n.Q6J("nzInDatePicker",!0)("ngModel",null==A.value?null:A.value.nativeDate)("format",A.timeOptions.nzFormat)("nzHourStep",A.timeOptions.nzHourStep)("nzMinuteStep",A.timeOptions.nzMinuteStep)("nzSecondStep",A.timeOptions.nzSecondStep)("nzDisabledHours",A.timeOptions.nzDisabledHours)("nzDisabledMinutes",A.timeOptions.nzDisabledMinutes)("nzDisabledSeconds",A.timeOptions.nzDisabledSeconds)("nzHideDisabledOptions",!!A.timeOptions.nzHideDisabledOptions)("nzDefaultOpenValue",A.timeOptions.nzDefaultOpenValue)("nzUse12Hours",!!A.timeOptions.nzUse12Hours)("nzAddOn",A.timeOptions.nzAddOn)}}function Ue(_,F){1&_&&n.GkF(0)}const u0=function(_){return{partType:_}};function o1(_,F){if(1&_&&(n.ynx(0),n.YNc(1,Ue,1,0,"ng-container",7),n.BQk()),2&_){const A=n.oxw(2),a=n.MAs(4);n.xp6(1),n.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",n.VKq(2,u0,A.datePickerService.activeInput))}}function _0(_,F){1&_&&n.GkF(0)}function G(_,F){1&_&&n.GkF(0)}const k0=function(){return{partType:"left"}},t1=function(){return{partType:"right"}};function w1(_,F){if(1&_&&(n.YNc(0,_0,1,0,"ng-container",7),n.YNc(1,G,1,0,"ng-container",7)),2&_){n.oxw(2);const A=n.MAs(4);n.Q6J("ngTemplateOutlet",A)("ngTemplateOutletContext",n.DdM(4,k0)),n.xp6(1),n.Q6J("ngTemplateOutlet",A)("ngTemplateOutletContext",n.DdM(5,t1))}}function v1(_,F){1&_&&n.GkF(0)}function ne(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n._UZ(2,"div"),n.TgZ(3,"div")(4,"div"),n.YNc(5,o1,2,4,"ng-container",0),n.YNc(6,w1,2,6,"ng-template",null,5,n.W1O),n.qZA(),n.YNc(8,v1,1,0,"ng-container",6),n.qZA()(),n.BQk()),2&_){const A=n.MAs(7),a=n.oxw(),h=n.MAs(6);n.xp6(1),n.MT6("",a.prefixCls,"-range-wrapper ",a.prefixCls,"-date-range-wrapper"),n.xp6(1),n.Akn(a.arrowPosition),n.Gre("",a.prefixCls,"-range-arrow"),n.xp6(1),n.MT6("",a.prefixCls,"-panel-container ",a.showWeek?a.prefixCls+"-week-number":"",""),n.xp6(1),n.Gre("",a.prefixCls,"-panels"),n.xp6(1),n.Q6J("ngIf",a.hasTimePicker)("ngIfElse",A),n.xp6(3),n.Q6J("ngTemplateOutlet",h)}}function Le(_,F){1&_&&n.GkF(0)}function Ke(_,F){1&_&&n.GkF(0)}function ke(_,F){if(1&_&&(n.TgZ(0,"div")(1,"div",8),n.YNc(2,Le,1,0,"ng-container",6),n.YNc(3,Ke,1,0,"ng-container",6),n.qZA()()),2&_){const A=n.oxw(),a=n.MAs(4),h=n.MAs(6);n.DjV("",A.prefixCls,"-panel-container ",A.showWeek?A.prefixCls+"-week-number":""," ",A.hasTimePicker?A.prefixCls+"-time":""," ",A.isRange?A.prefixCls+"-range":"",""),n.xp6(1),n.Gre("",A.prefixCls,"-panel"),n.ekj("ant-picker-panel-rtl","rtl"===A.dir),n.xp6(1),n.Q6J("ngTemplateOutlet",a),n.xp6(1),n.Q6J("ngTemplateOutlet",h)}}function De(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"div")(1,"inner-popup",9),n.NdJ("panelModeChange",function(h){const K0=n.CHM(A).partType,s1=n.oxw();return n.KtG(s1.onPanelModeChange(h,K0))})("cellHover",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onCellHover(h))})("selectDate",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.changeValueFromSelect(h,!P.showTime))})("selectTime",function(h){const K0=n.CHM(A).partType,s1=n.oxw();return n.KtG(s1.onSelectTime(h,K0))})("headerChange",function(h){const K0=n.CHM(A).partType,s1=n.oxw();return n.KtG(s1.onActiveDateChange(h,K0))}),n.qZA()()}if(2&_){const A=F.partType,a=n.oxw();n.Gre("",a.prefixCls,"-panel"),n.ekj("ant-picker-panel-rtl","rtl"===a.dir),n.xp6(1),n.Q6J("showWeek",a.showWeek)("endPanelMode",a.getPanelMode(a.endPanelMode,A))("partType",A)("locale",a.locale)("showTimePicker",a.hasTimePicker)("timeOptions",a.getTimeOptions(A))("panelMode",a.getPanelMode(a.panelMode,A))("activeDate",a.getActiveDate(A))("value",a.getValue(A))("disabledDate",a.disabledDate)("dateRender",a.dateRender)("selectedValue",null==a.datePickerService?null:a.datePickerService.value)("hoverValue",a.hoverValue)}}function At(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"calendar-footer",11),n.NdJ("clickOk",function(){n.CHM(A);const h=n.oxw(2);return n.KtG(h.onClickOk())})("clickToday",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onClickToday(h))}),n.qZA()}if(2&_){const A=n.oxw(2),a=n.MAs(8);n.Q6J("locale",A.locale)("isRange",A.isRange)("showToday",A.showToday)("showNow",A.showNow)("hasTimePicker",A.hasTimePicker)("okDisabled",!A.isAllowed(null==A.datePickerService?null:A.datePickerService.value))("extraFooter",A.extraFooter)("rangeQuickSelector",A.ranges?a:null)}}function ut(_,F){if(1&_&&n.YNc(0,At,1,8,"calendar-footer",10),2&_){const A=n.oxw();n.Q6J("ngIf",A.hasFooter)}}function _t(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"li",13),n.NdJ("click",function(){const P=n.CHM(A).$implicit,K0=n.oxw(2);return n.KtG(K0.onClickPresetRange(K0.ranges[P]))})("mouseenter",function(){const P=n.CHM(A).$implicit,K0=n.oxw(2);return n.KtG(K0.onHoverPresetRange(K0.ranges[P]))})("mouseleave",function(){n.CHM(A);const h=n.oxw(2);return n.KtG(h.onPresetRangeMouseLeave())}),n.TgZ(1,"span",14),n._uU(2),n.qZA()()}if(2&_){const A=F.$implicit,a=n.oxw(2);n.Gre("",a.prefixCls,"-preset"),n.xp6(2),n.Oqu(A)}}function ht(_,F){if(1&_&&n.YNc(0,_t,3,4,"li",12),2&_){const A=n.oxw();n.Q6J("ngForOf",A.getObjectKeys(A.ranges))}}const et=["separatorElement"],tt=["pickerInput"],at=["rangePickerInput"];function $(_,F){1&_&&n.GkF(0)}function j(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"div")(1,"input",7,8),n.NdJ("ngModelChange",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.inputValue=h)})("focus",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onFocus(h))})("focusout",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onFocusout(h))})("ngModelChange",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onInputChange(h))})("keyup.enter",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onKeyupEnter(h))}),n.qZA(),n.YNc(3,$,1,0,"ng-container",9),n.qZA()}if(2&_){const A=n.oxw(2),a=n.MAs(4);n.Gre("",A.prefixCls,"-input"),n.xp6(1),n.ekj("ant-input-disabled",A.nzDisabled),n.s9C("placeholder",A.getPlaceholder()),n.Q6J("disabled",A.nzDisabled)("readOnly",A.nzInputReadOnly)("ngModel",A.inputValue)("size",A.inputSize),n.uIk("id",A.nzId),n.xp6(2),n.Q6J("ngTemplateOutlet",a)}}function m0(_,F){1&_&&n.GkF(0)}function O0(_,F){if(1&_&&(n.ynx(0),n._uU(1),n.BQk()),2&_){const A=n.oxw(4);n.xp6(1),n.Oqu(A.nzSeparator)}}function w0(_,F){1&_&&n._UZ(0,"span",14)}function V0(_,F){if(1&_&&(n.ynx(0),n.YNc(1,O0,2,1,"ng-container",0),n.YNc(2,w0,1,0,"ng-template",null,13,n.W1O),n.BQk()),2&_){const A=n.MAs(3),a=n.oxw(3);n.xp6(1),n.Q6J("ngIf",a.nzSeparator)("ngIfElse",A)}}function M1(_,F){1&_&&n.GkF(0)}function A1(_,F){1&_&&n.GkF(0)}function T1(_,F){if(1&_&&(n.ynx(0),n.TgZ(1,"div"),n.YNc(2,m0,1,0,"ng-container",10),n.qZA(),n.TgZ(3,"div",null,11)(5,"span"),n.YNc(6,V0,4,2,"ng-container",12),n.qZA()(),n.TgZ(7,"div"),n.YNc(8,M1,1,0,"ng-container",10),n.qZA(),n.YNc(9,A1,1,0,"ng-container",9),n.BQk()),2&_){const A=n.oxw(2),a=n.MAs(2),h=n.MAs(4);n.xp6(1),n.Gre("",A.prefixCls,"-input"),n.xp6(1),n.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",n.DdM(18,k0)),n.xp6(1),n.Gre("",A.prefixCls,"-range-separator"),n.xp6(2),n.Gre("",A.prefixCls,"-separator"),n.xp6(1),n.Q6J("nzStringTemplateOutlet",A.nzSeparator),n.xp6(1),n.Gre("",A.prefixCls,"-input"),n.xp6(1),n.Q6J("ngTemplateOutlet",a)("ngTemplateOutletContext",n.DdM(19,t1)),n.xp6(1),n.Q6J("ngTemplateOutlet",h)}}function S1(_,F){if(1&_&&(n.ynx(0),n.YNc(1,j,4,12,"div",5),n.YNc(2,T1,10,20,"ng-container",6),n.BQk()),2&_){const A=n.oxw();n.xp6(1),n.Q6J("ngIf",!A.isRange),n.xp6(1),n.Q6J("ngIf",A.isRange)}}function R1(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"input",15,16),n.NdJ("click",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onClickInputBox(h))})("focusout",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onFocusout(h))})("focus",function(h){const K0=n.CHM(A).partType,s1=n.oxw();return n.KtG(s1.onFocus(h,K0))})("keyup.enter",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onKeyupEnter(h))})("ngModelChange",function(h){const K0=n.CHM(A).partType,s1=n.oxw();return n.KtG(s1.inputValue[s1.datePickerService.getActiveIndex(K0)]=h)})("ngModelChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onInputChange(h))}),n.qZA()}if(2&_){const A=F.partType,a=n.oxw();n.s9C("placeholder",a.getPlaceholder(A)),n.Q6J("disabled",a.nzDisabled)("readOnly",a.nzInputReadOnly)("size",a.inputSize)("ngModel",a.inputValue[a.datePickerService.getActiveIndex(A)]),n.uIk("id",a.nzId)}}function W1(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"span",20),n.NdJ("click",function(h){n.CHM(A);const P=n.oxw(2);return n.KtG(P.onClickClear(h))}),n._UZ(1,"span",21),n.qZA()}if(2&_){const A=n.oxw(2);n.Gre("",A.prefixCls,"-clear")}}function I1(_,F){if(1&_&&(n.ynx(0),n._UZ(1,"span",22),n.BQk()),2&_){const A=F.$implicit;n.xp6(1),n.Q6J("nzType",A)}}function D1(_,F){if(1&_&&n._UZ(0,"nz-form-item-feedback-icon",23),2&_){const A=n.oxw(2);n.Q6J("status",A.status)}}function xe(_,F){if(1&_&&(n._UZ(0,"div",17),n.YNc(1,W1,2,3,"span",18),n.TgZ(2,"span"),n.YNc(3,I1,2,1,"ng-container",12),n.YNc(4,D1,1,1,"nz-form-item-feedback-icon",19),n.qZA()),2&_){const A=n.oxw();n.Gre("",A.prefixCls,"-active-bar"),n.Q6J("ngStyle",A.activeBarStyle),n.xp6(1),n.Q6J("ngIf",A.showClear()),n.xp6(1),n.Gre("",A.prefixCls,"-suffix"),n.xp6(1),n.Q6J("nzStringTemplateOutlet",A.nzSuffixIcon),n.xp6(1),n.Q6J("ngIf",A.hasFeedback&&!!A.status)}}function ze(_,F){if(1&_){const A=n.EpF();n.TgZ(0,"div",17)(1,"date-range-popup",24),n.NdJ("panelModeChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onPanelModeChange(h))})("calendarChange",function(h){n.CHM(A);const P=n.oxw();return n.KtG(P.onCalendarChange(h))})("resultOk",function(){n.CHM(A);const h=n.oxw();return n.KtG(h.onResultOk())}),n.qZA()()}if(2&_){const A=n.oxw();n.MT6("",A.prefixCls,"-dropdown ",A.nzDropdownClassName,""),n.ekj("ant-picker-dropdown-rtl","rtl"===A.dir)("ant-picker-dropdown-placement-bottomLeft","bottom"===A.currentPositionY&&"start"===A.currentPositionX)("ant-picker-dropdown-placement-topLeft","top"===A.currentPositionY&&"start"===A.currentPositionX)("ant-picker-dropdown-placement-bottomRight","bottom"===A.currentPositionY&&"end"===A.currentPositionX)("ant-picker-dropdown-placement-topRight","top"===A.currentPositionY&&"end"===A.currentPositionX)("ant-picker-dropdown-range",A.isRange)("ant-picker-active-left","left"===A.datePickerService.activeInput)("ant-picker-active-right","right"===A.datePickerService.activeInput),n.Q6J("ngStyle",A.nzPopupStyle),n.xp6(1),n.Q6J("isRange",A.isRange)("inline",A.nzInline)("defaultPickerValue",A.nzDefaultPickerValue)("showWeek",A.nzShowWeekNumber||"week"===A.nzMode)("panelMode",A.panelMode)("locale",null==A.nzLocale?null:A.nzLocale.lang)("showToday","date"===A.nzMode&&A.nzShowToday&&!A.isRange&&!A.nzShowTime)("showNow","date"===A.nzMode&&A.nzShowNow&&!A.isRange&&!!A.nzShowTime)("showTime",A.nzShowTime)("dateRender",A.nzDateRender)("disabledDate",A.nzDisabledDate)("disabledTime",A.nzDisabledTime)("extraFooter",A.extraFooter)("ranges",A.nzRanges)("dir",A.dir)}}function nt(_,F){1&_&&n.GkF(0)}function Ie(_,F){if(1&_&&(n.TgZ(0,"div",25),n.YNc(1,nt,1,0,"ng-container",9),n.qZA()),2&_){const A=n.oxw(),a=n.MAs(6);n.Q6J("nzNoAnimation",!(null==A.noAnimation||!A.noAnimation.nzNoAnimation))("@slideMotion","enter"),n.xp6(1),n.Q6J("ngTemplateOutlet",a)}}const oe="ant-picker",y1={nzDisabledHours:()=>[],nzDisabledMinutes:()=>[],nzDisabledSeconds:()=>[]};function J1(_,F){let A=F?F(_&&_.nativeDate):{};return A={...y1,...A},A}function X1(_,F,A){return!(!_||F&&F(_.nativeDate)||A&&!function Ae(_,F){return function Fe(_,F){let A=!1;if(_){const a=_.getHours(),h=_.getMinutes(),P=_.getSeconds();A=-1!==F.nzDisabledHours().indexOf(a)||-1!==F.nzDisabledMinutes(a).indexOf(h)||-1!==F.nzDisabledSeconds(a,h).indexOf(P)}return!A}(_,J1(_,F))}(_,A))}function H1(_){return _&&_.replace(/Y/g,"y").replace(/D/g,"d")}let ee=(()=>{var _;class F{constructor(a){this.dateHelper=a,this.showToday=!1,this.showNow=!1,this.hasTimePicker=!1,this.isRange=!1,this.okDisabled=!1,this.rangeQuickSelector=null,this.clickOk=new n.vpe,this.clickToday=new n.vpe,this.prefixCls=oe,this.isTemplateRef=a0.de,this.isNonEmptyString=a0.HH,this.isTodayDisabled=!1,this.todayTitle=""}ngOnChanges(a){const h=new Date;if(a.disabledDate&&(this.isTodayDisabled=!(!this.disabledDate||!this.disabledDate(h))),a.locale){const P=H1(this.locale.dateFormat);this.todayTitle=this.dateHelper.format(h,P)}}onClickToday(){const a=new v0.Yp;this.clickToday.emit(a.clone())}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["calendar-footer"]],inputs:{locale:"locale",showToday:"showToday",showNow:"showNow",hasTimePicker:"hasTimePicker",isRange:"isRange",okDisabled:"okDisabled",disabledDate:"disabledDate",extraFooter:"extraFooter",rangeQuickSelector:"rangeQuickSelector"},outputs:{clickOk:"clickOk",clickToday:"clickToday"},exportAs:["calendarFooter"],features:[n.TTD],decls:4,vars:6,consts:[[3,"class",4,"ngIf"],["role","button",3,"class","title","click",4,"ngIf"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],[3,"innerHTML"],["role","button",3,"title","click"],[3,"click"],["nz-button","","type","button","nzType","primary","nzSize","small",3,"disabled","click"]],template:function(a,h){1&a&&(n.TgZ(0,"div"),n.YNc(1,c0,4,6,"div",0),n.YNc(2,b0,2,6,"a",1),n.YNc(3,z1,4,6,"ul",0),n.qZA()),2&a&&(n.Gre("",h.prefixCls,"-footer"),n.xp6(1),n.Q6J("ngIf",h.extraFooter),n.xp6(1),n.Q6J("ngIf",h.showToday),n.xp6(1),n.Q6J("ngIf",h.hasTimePicker||h.rangeQuickSelector))},dependencies:[c.O5,c.tP,c.RF,c.n9,B.ix,n0.w,f0.dQ],encapsulation:2,changeDetection:0}),F})(),te=(()=>{var _;class F{constructor(){this.activeInput="left",this.arrowLeft=0,this.isRange=!1,this.valueChange$=new Z0.t(1),this.emitValue$=new R0.x,this.inputPartChange$=new R0.x}initValue(a=!1){a&&(this.initialValue=this.isRange?[]:null),this.setValue(this.initialValue)}hasValue(a=this.value){return Array.isArray(a)?!!a[0]||!!a[1]:!!a}makeValue(a){return this.isRange?a?a.map(h=>new v0.Yp(h)):[]:a?new v0.Yp(a):null}setActiveDate(a,h=!1,P="month"){this.activeDate=this.isRange?(0,v0._p)(a,h,{date:"month",month:"year",year:"decade"}[P],this.activeInput):(0,v0.ky)(a)}setValue(a){this.value=a,this.valueChange$.next(this.value)}getActiveIndex(a=this.activeInput){return{left:0,right:1}[a]}ngOnDestroy(){this.valueChange$.complete(),this.emitValue$.complete(),this.inputPartChange$.complete()}}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275prov=n.Yz7({token:_,factory:_.\u0275fac}),F})(),C1=(()=>{var _;class F{constructor(){this.prefixCls="ant-picker-header",this.selectors=[],this.showSuperPreBtn=!0,this.showSuperNextBtn=!0,this.showPreBtn=!0,this.showNextBtn=!0,this.panelModeChange=new n.vpe,this.valueChange=new n.vpe}superPreviousTitle(){return this.locale.previousYear}previousTitle(){return this.locale.previousMonth}superNextTitle(){return this.locale.nextYear}nextTitle(){return this.locale.nextMonth}superPrevious(){this.changeValue(this.value.addYears(-1))}superNext(){this.changeValue(this.value.addYears(1))}previous(){this.changeValue(this.value.addMonths(-1))}next(){this.changeValue(this.value.addMonths(1))}changeValue(a){this.value!==a&&(this.value=a,this.valueChange.emit(this.value),this.render())}changeMode(a){this.panelModeChange.emit(a)}render(){this.value&&(this.selectors=this.getSelectors())}ngOnInit(){this.value||(this.value=new v0.Yp),this.selectors=this.getSelectors()}ngOnChanges(a){(a.value||a.locale)&&this.render()}}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275dir=n.lG2({type:_,inputs:{value:"value",locale:"locale",showSuperPreBtn:"showSuperPreBtn",showSuperNextBtn:"showSuperNextBtn",showPreBtn:"showPreBtn",showNextBtn:"showNextBtn"},outputs:{panelModeChange:"panelModeChange",valueChange:"valueChange"},features:[n.TTD]}),F})(),ue=(()=>{var _;class F extends C1{constructor(a){super(),this.dateHelper=a}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,H1(this.locale.yearFormat))},{className:`${this.prefixCls}-month-btn`,title:this.locale.monthSelect,onClick:()=>this.changeMode("month"),label:this.dateHelper.format(this.value.nativeDate,this.locale.monthFormat||"MMM")}]}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["date-header"]],exportAs:["dateHeader"],features:[n.qOj],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(a,h){1&a&&(n.TgZ(0,"div")(1,"button",0),n.NdJ("click",function(){return h.superPrevious()}),n._UZ(2,"span",1),n.qZA(),n.TgZ(3,"button",0),n.NdJ("click",function(){return h.previous()}),n._UZ(4,"span",2),n.qZA(),n.TgZ(5,"div"),n.YNc(6,Q0,3,5,"ng-container",3),n.qZA(),n.TgZ(7,"button",0),n.NdJ("click",function(){return h.next()}),n._UZ(8,"span",4),n.qZA(),n.TgZ(9,"button",0),n.NdJ("click",function(){return h.superNext()}),n._UZ(10,"span",5),n.qZA()()),2&a&&(n.Tol(h.prefixCls),n.xp6(1),n.Gre("",h.prefixCls,"-super-prev-btn"),n.Udp("visibility",h.showSuperPreBtn?"visible":"hidden"),n.s9C("title",h.superPreviousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-prev-btn"),n.Udp("visibility",h.showPreBtn?"visible":"hidden"),n.s9C("title",h.previousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-view"),n.xp6(1),n.Q6J("ngForOf",h.selectors),n.xp6(1),n.Gre("",h.prefixCls,"-next-btn"),n.Udp("visibility",h.showNextBtn?"visible":"hidden"),n.s9C("title",h.nextTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-super-next-btn"),n.Udp("visibility",h.showSuperNextBtn?"visible":"hidden"),n.s9C("title",h.superNextTitle()))},dependencies:[c.sg],encapsulation:2,changeDetection:0}),F})(),ie=(()=>{var _;class F{constructor(){this.isTemplateRef=a0.de,this.isNonEmptyString=a0.HH,this.headRow=[],this.bodyRows=[],this.MAX_ROW=6,this.MAX_COL=7,this.prefixCls="ant-picker",this.activeDate=new v0.Yp,this.showWeek=!1,this.selectedValue=[],this.hoverValue=[],this.canSelectWeek=!1,this.valueChange=new n.vpe,this.cellHover=new n.vpe}render(){this.activeDate&&(this.headRow=this.makeHeadRow(),this.bodyRows=this.makeBodyRows())}trackByBodyRow(a,h){return h.trackByIndex}trackByBodyColumn(a,h){return h.trackByIndex}hasRangeValue(){return this.selectedValue?.length>0||this.hoverValue?.length>0}getClassMap(a){return{"ant-picker-cell":!0,"ant-picker-cell-in-view":!0,"ant-picker-cell-selected":a.isSelected,"ant-picker-cell-disabled":a.isDisabled,"ant-picker-cell-in-range":!!a.isInSelectedRange,"ant-picker-cell-range-start":!!a.isSelectedStart,"ant-picker-cell-range-end":!!a.isSelectedEnd,"ant-picker-cell-range-start-single":!!a.isStartSingle,"ant-picker-cell-range-end-single":!!a.isEndSingle,"ant-picker-cell-range-hover":!!a.isInHoverRange,"ant-picker-cell-range-hover-start":!!a.isHoverStart,"ant-picker-cell-range-hover-end":!!a.isHoverEnd,"ant-picker-cell-range-hover-edge-start":!!a.isFirstCellInPanel,"ant-picker-cell-range-hover-edge-end":!!a.isLastCellInPanel,"ant-picker-cell-range-start-near-hover":!!a.isRangeStartNearHover,"ant-picker-cell-range-end-near-hover":!!a.isRangeEndNearHover}}ngOnInit(){this.render()}ngOnChanges(a){a.activeDate&&!a.activeDate.currentValue&&(this.activeDate=new v0.Yp),(a.disabledDate||a.locale||a.showWeek||a.selectWeek||this.isDateRealChange(a.activeDate)||this.isDateRealChange(a.value)||this.isDateRealChange(a.selectedValue)||this.isDateRealChange(a.hoverValue))&&this.render()}isDateRealChange(a){if(a){const h=a.previousValue,P=a.currentValue;return Array.isArray(P)?!Array.isArray(h)||P.length!==h.length||P.some((K0,s1)=>{const f1=h[s1];return f1 instanceof v0.Yp?f1.isSameDay(K0):f1!==K0}):!this.isSameDate(h,P)}return!1}isSameDate(a,h){return!a&&!h||a&&h&&h.isSameDay(a)}}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275dir=n.lG2({type:_,inputs:{prefixCls:"prefixCls",value:"value",locale:"locale",activeDate:"activeDate",showWeek:"showWeek",selectedValue:"selectedValue",hoverValue:"hoverValue",disabledDate:"disabledDate",cellRender:"cellRender",fullCellRender:"fullCellRender",canSelectWeek:"canSelectWeek"},outputs:{valueChange:"valueChange",cellHover:"cellHover"},features:[n.TTD]}),F})(),ge=(()=>{var _;class F extends ie{constructor(a,h){super(),this.i18n=a,this.dateHelper=h}changeValueFromInside(a){this.activeDate=this.activeDate.setYear(a.getYear()).setMonth(a.getMonth()).setDate(a.getDate()),this.valueChange.emit(this.activeDate),this.activeDate.isSameMonth(this.value)||this.render()}makeHeadRow(){const a=[],h=this.activeDate.calendarStart({weekStartsOn:this.dateHelper.getFirstDayOfWeek()});for(let P=0;Pthis.changeValueFromInside(E1),onMouseEnter:()=>this.cellHover.emit(E1)};this.addCellProperty(Y1,E1),this.showWeek&&!s1.weekNum&&(s1.weekNum=this.dateHelper.getISOWeek(E1.nativeDate)),E1.isSameDay(this.value)&&(s1.isActive=E1.isSameDay(this.value)),s1.dateCells.push(Y1)}s1.classMap={"ant-picker-week-panel-row":this.canSelectWeek,"ant-picker-week-panel-row-selected":this.canSelectWeek&&s1.isActive},a.push(s1)}return a}addCellProperty(a,h){if(this.hasRangeValue()&&!this.canSelectWeek){const[P,K0]=this.hoverValue,[s1,f1]=this.selectedValue;s1?.isSameDay(h)&&(a.isSelectedStart=!0,a.isSelected=!0),f1?.isSameDay(h)&&(a.isSelectedEnd=!0,a.isSelected=!0),P&&K0&&(a.isHoverStart=P.isSameDay(h),a.isHoverEnd=K0.isSameDay(h),a.isLastCellInPanel=h.isLastDayOfMonth(),a.isFirstCellInPanel=h.isFirstDayOfMonth(),a.isInHoverRange=P.isBeforeDay(h)&&h.isBeforeDay(K0)),a.isStartSingle=s1&&!f1,a.isEndSingle=!s1&&f1,a.isInSelectedRange=s1?.isBeforeDay(h)&&h.isBeforeDay(f1),a.isRangeStartNearHover=s1&&a.isInHoverRange,a.isRangeEndNearHover=f1&&a.isInHoverRange}a.isToday=h.isToday(),a.isSelected=h.isSameDay(this.value),a.isDisabled=!!this.disabledDate?.(h.nativeDate),a.classMap=this.getClassMap(a)}getClassMap(a){const h=new v0.Yp(a.value);return{...super.getClassMap(a),"ant-picker-cell-today":!!a.isToday,"ant-picker-cell-in-view":h.isSameMonth(this.activeDate)}}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.wi),n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["date-table"]],inputs:{locale:"locale"},exportAs:["dateTable"],features:[n.qOj],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(a,h){1&a&&(n.TgZ(0,"table",0),n.YNc(1,h1,4,2,"thead",1),n.TgZ(2,"tbody"),n.YNc(3,I0,3,4,"tr",2),n.qZA()()),2&a&&(n.xp6(1),n.Q6J("ngIf",h.headRow&&h.headRow.length>0),n.xp6(2),n.Q6J("ngForOf",h.bodyRows)("ngForTrackBy",h.trackByBodyRow))},dependencies:[c.mk,c.sg,c.O5,c.tP,c.RF,c.n9,c.ED],encapsulation:2,changeDetection:0}),F})(),Ne=(()=>{var _;class F extends C1{previous(){}next(){}get startYear(){return 100*parseInt(""+this.value.getYear()/100,10)}get endYear(){return this.startYear+99}superPrevious(){this.changeValue(this.value.addYears(-100))}superNext(){this.changeValue(this.value.addYears(100))}getSelectors(){return[{className:`${this.prefixCls}-decade-btn`,title:"",onClick:()=>{},label:`${this.startYear}-${this.endYear}`}]}}return(_=F).\u0275fac=function(){let A;return function(h){return(A||(A=n.n5z(_)))(h||_)}}(),_.\u0275cmp=n.Xpm({type:_,selectors:[["decade-header"]],exportAs:["decadeHeader"],features:[n.qOj],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(a,h){1&a&&(n.TgZ(0,"div")(1,"button",0),n.NdJ("click",function(){return h.superPrevious()}),n._UZ(2,"span",1),n.qZA(),n.TgZ(3,"button",0),n.NdJ("click",function(){return h.previous()}),n._UZ(4,"span",2),n.qZA(),n.TgZ(5,"div"),n.YNc(6,q0,3,5,"ng-container",3),n.qZA(),n.TgZ(7,"button",0),n.NdJ("click",function(){return h.next()}),n._UZ(8,"span",4),n.qZA(),n.TgZ(9,"button",0),n.NdJ("click",function(){return h.superNext()}),n._UZ(10,"span",5),n.qZA()()),2&a&&(n.Tol(h.prefixCls),n.xp6(1),n.Gre("",h.prefixCls,"-super-prev-btn"),n.Udp("visibility",h.showSuperPreBtn?"visible":"hidden"),n.s9C("title",h.superPreviousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-prev-btn"),n.Udp("visibility",h.showPreBtn?"visible":"hidden"),n.s9C("title",h.previousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-view"),n.xp6(1),n.Q6J("ngForOf",h.selectors),n.xp6(1),n.Gre("",h.prefixCls,"-next-btn"),n.Udp("visibility",h.showNextBtn?"visible":"hidden"),n.s9C("title",h.nextTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-super-next-btn"),n.Udp("visibility",h.showSuperNextBtn?"visible":"hidden"),n.s9C("title",h.superNextTitle()))},dependencies:[c.sg],encapsulation:2,changeDetection:0}),F})(),Xt=(()=>{var _;class F extends ie{get startYear(){return 100*parseInt(""+this.activeDate.getYear()/100,10)}get endYear(){return this.startYear+99}makeHeadRow(){return[]}makeBodyRows(){const a=[],h=this.value&&this.value.getYear(),P=this.startYear,K0=this.endYear,s1=P-10;let f1=0;for(let E1=0;E1<4;E1++){const Oe={dateCells:[],trackByIndex:E1};for(let V1=0;V1<3;V1++){const K1=s1+10*f1,Y1=s1+10*f1+9,Je=`${K1}-${Y1}`,We={trackByIndex:V1,value:this.activeDate.setYear(K1).nativeDate,content:Je,title:Je,isDisabled:!1,isSelected:h>=K1&&h<=Y1,isLowerThanStart:Y1K0,classMap:{},onClick(){},onMouseEnter(){}};We.classMap=this.getClassMap(We),We.onClick=()=>this.chooseDecade(K1),f1++,Oe.dateCells.push(We)}a.push(Oe)}return a}getClassMap(a){return{[`${this.prefixCls}-cell`]:!0,[`${this.prefixCls}-cell-in-view`]:!a.isBiggerThanEnd&&!a.isLowerThanStart,[`${this.prefixCls}-cell-selected`]:a.isSelected,[`${this.prefixCls}-cell-disabled`]:a.isDisabled}}chooseDecade(a){this.value=this.activeDate.setYear(a),this.valueChange.emit(this.value)}}return(_=F).\u0275fac=function(){let A;return function(h){return(A||(A=n.n5z(_)))(h||_)}}(),_.\u0275cmp=n.Xpm({type:_,selectors:[["decade-table"]],exportAs:["decadeTable"],features:[n.qOj],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(a,h){1&a&&(n.TgZ(0,"table",0),n.YNc(1,F0,4,2,"thead",1),n.TgZ(2,"tbody"),n.YNc(3,fe,3,4,"tr",2),n.qZA()()),2&a&&(n.xp6(1),n.Q6J("ngIf",h.headRow&&h.headRow.length>0),n.xp6(2),n.Q6J("ngForOf",h.bodyRows)("ngForTrackBy",h.trackByBodyRow))},dependencies:[c.mk,c.sg,c.O5,c.tP,c.RF,c.n9,c.ED],encapsulation:2,changeDetection:0}),F})(),Wt=(()=>{var _;class F extends C1{constructor(a){super(),this.dateHelper=a}getSelectors(){return[{className:`${this.prefixCls}-month-btn`,title:this.locale.yearSelect,onClick:()=>this.changeMode("year"),label:this.dateHelper.format(this.value.nativeDate,H1(this.locale.yearFormat))}]}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["month-header"]],exportAs:["monthHeader"],features:[n.qOj],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(a,h){1&a&&(n.TgZ(0,"div")(1,"button",0),n.NdJ("click",function(){return h.superPrevious()}),n._UZ(2,"span",1),n.qZA(),n.TgZ(3,"button",0),n.NdJ("click",function(){return h.previous()}),n._UZ(4,"span",2),n.qZA(),n.TgZ(5,"div"),n.YNc(6,de,3,5,"ng-container",3),n.qZA(),n.TgZ(7,"button",0),n.NdJ("click",function(){return h.next()}),n._UZ(8,"span",4),n.qZA(),n.TgZ(9,"button",0),n.NdJ("click",function(){return h.superNext()}),n._UZ(10,"span",5),n.qZA()()),2&a&&(n.Tol(h.prefixCls),n.xp6(1),n.Gre("",h.prefixCls,"-super-prev-btn"),n.Udp("visibility",h.showSuperPreBtn?"visible":"hidden"),n.s9C("title",h.superPreviousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-prev-btn"),n.Udp("visibility",h.showPreBtn?"visible":"hidden"),n.s9C("title",h.previousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-view"),n.xp6(1),n.Q6J("ngForOf",h.selectors),n.xp6(1),n.Gre("",h.prefixCls,"-next-btn"),n.Udp("visibility",h.showNextBtn?"visible":"hidden"),n.s9C("title",h.nextTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-super-next-btn"),n.Udp("visibility",h.showSuperNextBtn?"visible":"hidden"),n.s9C("title",h.superNextTitle()))},dependencies:[c.sg],encapsulation:2,changeDetection:0}),F})(),St=(()=>{var _;class F extends ie{constructor(a){super(),this.dateHelper=a,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){const a=[];let h=0;for(let P=0;Pthis.chooseMonth(V1.value.getMonth()),onMouseEnter:()=>this.cellHover.emit(f1)};this.addCellProperty(V1,f1),K0.dateCells.push(V1),h++}a.push(K0)}return a}isDisabledMonth(a){if(!this.disabledDate)return!1;for(let P=a.setDate(1);P.getMonth()===a.getMonth();P=P.addDays(1))if(!this.disabledDate(P.nativeDate))return!1;return!0}addCellProperty(a,h){if(this.hasRangeValue()){const[P,K0]=this.hoverValue,[s1,f1]=this.selectedValue;s1?.isSameMonth(h)&&(a.isSelectedStart=!0,a.isSelected=!0),f1?.isSameMonth(h)&&(a.isSelectedEnd=!0,a.isSelected=!0),P&&K0&&(a.isHoverStart=P.isSameMonth(h),a.isHoverEnd=K0.isSameMonth(h),a.isLastCellInPanel=11===h.getMonth(),a.isFirstCellInPanel=0===h.getMonth(),a.isInHoverRange=P.isBeforeMonth(h)&&h.isBeforeMonth(K0)),a.isStartSingle=s1&&!f1,a.isEndSingle=!s1&&f1,a.isInSelectedRange=s1?.isBeforeMonth(h)&&h?.isBeforeMonth(f1),a.isRangeStartNearHover=s1&&a.isInHoverRange,a.isRangeEndNearHover=f1&&a.isInHoverRange}else h.isSameMonth(this.value)&&(a.isSelected=!0);a.classMap=this.getClassMap(a)}chooseMonth(a){this.value=this.activeDate.setMonth(a),this.valueChange.emit(this.value)}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["month-table"]],exportAs:["monthTable"],features:[n.qOj],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(a,h){1&a&&(n.TgZ(0,"table",0),n.YNc(1,ve,4,2,"thead",1),n.TgZ(2,"tbody"),n.YNc(3,B1,3,4,"tr",2),n.qZA()()),2&a&&(n.xp6(1),n.Q6J("ngIf",h.headRow&&h.headRow.length>0),n.xp6(2),n.Q6J("ngForOf",h.bodyRows)("ngForTrackBy",h.trackByBodyRow))},dependencies:[c.mk,c.sg,c.O5,c.tP,c.RF,c.n9,c.ED],encapsulation:2,changeDetection:0}),F})(),Tt=(()=>{var _;class F extends C1{get startYear(){return 10*parseInt(""+this.value.getYear()/10,10)}get endYear(){return this.startYear+9}superPrevious(){this.changeValue(this.value.addYears(-10))}superNext(){this.changeValue(this.value.addYears(10))}getSelectors(){return[{className:`${this.prefixCls}-year-btn`,title:"",onClick:()=>this.changeMode("decade"),label:`${this.startYear}-${this.endYear}`}]}}return(_=F).\u0275fac=function(){let A;return function(h){return(A||(A=n.n5z(_)))(h||_)}}(),_.\u0275cmp=n.Xpm({type:_,selectors:[["year-header"]],exportAs:["yearHeader"],features:[n.qOj],decls:11,vars:31,consts:[["role","button","type","button","tabindex","-1",3,"title","click"],[1,"ant-picker-super-prev-icon"],[1,"ant-picker-prev-icon"],[4,"ngFor","ngForOf"],[1,"ant-picker-next-icon"],[1,"ant-picker-super-next-icon"],["role","button","type","button",3,"title","click"]],template:function(a,h){1&a&&(n.TgZ(0,"div")(1,"button",0),n.NdJ("click",function(){return h.superPrevious()}),n._UZ(2,"span",1),n.qZA(),n.TgZ(3,"button",0),n.NdJ("click",function(){return h.previous()}),n._UZ(4,"span",2),n.qZA(),n.TgZ(5,"div"),n.YNc(6,j1,3,5,"ng-container",3),n.qZA(),n.TgZ(7,"button",0),n.NdJ("click",function(){return h.next()}),n._UZ(8,"span",4),n.qZA(),n.TgZ(9,"button",0),n.NdJ("click",function(){return h.superNext()}),n._UZ(10,"span",5),n.qZA()()),2&a&&(n.Tol(h.prefixCls),n.xp6(1),n.Gre("",h.prefixCls,"-super-prev-btn"),n.Udp("visibility",h.showSuperPreBtn?"visible":"hidden"),n.s9C("title",h.superPreviousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-prev-btn"),n.Udp("visibility",h.showPreBtn?"visible":"hidden"),n.s9C("title",h.previousTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-view"),n.xp6(1),n.Q6J("ngForOf",h.selectors),n.xp6(1),n.Gre("",h.prefixCls,"-next-btn"),n.Udp("visibility",h.showNextBtn?"visible":"hidden"),n.s9C("title",h.nextTitle()),n.xp6(2),n.Gre("",h.prefixCls,"-super-next-btn"),n.Udp("visibility",h.showSuperNextBtn?"visible":"hidden"),n.s9C("title",h.superNextTitle()))},dependencies:[c.sg],encapsulation:2,changeDetection:0}),F})(),vt=(()=>{var _;class F extends ie{constructor(a){super(),this.dateHelper=a,this.MAX_ROW=4,this.MAX_COL=3}makeHeadRow(){return[]}makeBodyRows(){const a=this.activeDate&&this.activeDate.getYear(),h=10*parseInt(""+a/10,10),P=h+9,K0=h-1,s1=[];let f1=0;for(let E1=0;E1=h&&K1<=P,isSelected:K1===(this.value&&this.value.getYear()),content:Je,title:Je,classMap:{},isLastCellInPanel:Y1.getYear()===P,isFirstCellInPanel:Y1.getYear()===h,cellRender:(0,a0.rw)(this.cellRender,Y1),fullCellRender:(0,a0.rw)(this.fullCellRender,Y1),onClick:()=>this.chooseYear(He.value.getFullYear()),onMouseEnter:()=>this.cellHover.emit(Y1)};this.addCellProperty(He,Y1),Oe.dateCells.push(He),f1++}s1.push(Oe)}return s1}getClassMap(a){return{...super.getClassMap(a),"ant-picker-cell-in-view":!!a.isSameDecade}}isDisabledYear(a){if(!this.disabledDate)return!1;for(let P=a.setMonth(0).setDate(1);P.getYear()===a.getYear();P=P.addDays(1))if(!this.disabledDate(P.nativeDate))return!1;return!0}addCellProperty(a,h){if(this.hasRangeValue()){const[P,K0]=this.hoverValue,[s1,f1]=this.selectedValue;s1?.isSameYear(h)&&(a.isSelectedStart=!0,a.isSelected=!0),f1?.isSameYear(h)&&(a.isSelectedEnd=!0,a.isSelected=!0),P&&K0&&(a.isHoverStart=P.isSameYear(h),a.isHoverEnd=K0.isSameYear(h),a.isInHoverRange=P.isBeforeYear(h)&&h.isBeforeYear(K0)),a.isStartSingle=s1&&!f1,a.isEndSingle=!s1&&f1,a.isInSelectedRange=s1?.isBeforeYear(h)&&h?.isBeforeYear(f1),a.isRangeStartNearHover=s1&&a.isInHoverRange,a.isRangeEndNearHover=f1&&a.isInHoverRange}else h.isSameYear(this.value)&&(a.isSelected=!0);a.classMap=this.getClassMap(a)}chooseYear(a){this.value=this.activeDate.setYear(a),this.valueChange.emit(this.value),this.render()}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(I.mx))},_.\u0275cmp=n.Xpm({type:_,selectors:[["year-table"]],exportAs:["yearTable"],features:[n.qOj],decls:4,vars:3,consts:[["cellspacing","0","role","grid",1,"ant-picker-content"],[4,"ngIf"],["role","row",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],["role","row"],["role","columnheader",4,"ngIf"],["role","columnheader",3,"title",4,"ngFor","ngForOf"],["role","columnheader"],["role","columnheader",3,"title"],["role","row",3,"ngClass"],["role","gridcell",3,"class",4,"ngIf"],["role","gridcell",3,"title","ngClass","click","mouseenter",4,"ngFor","ngForOf","ngForTrackBy"],["role","gridcell"],["role","gridcell",3,"title","ngClass","click","mouseenter"],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],["defaultCell",""]],template:function(a,h){1&a&&(n.TgZ(0,"table",0),n.YNc(1,P1,4,2,"thead",1),n.TgZ(2,"tbody"),n.YNc(3,re,3,4,"tr",2),n.qZA()()),2&a&&(n.xp6(1),n.Q6J("ngIf",h.headRow&&h.headRow.length>0),n.xp6(2),n.Q6J("ngForOf",h.bodyRows)("ngForTrackBy",h.trackByBodyRow))},dependencies:[c.mk,c.sg,c.O5,c.tP,c.RF,c.n9,c.ED],encapsulation:2,changeDetection:0}),F})(),Rt=(()=>{var _;class F{constructor(){this.panelModeChange=new n.vpe,this.headerChange=new n.vpe,this.selectDate=new n.vpe,this.selectTime=new n.vpe,this.cellHover=new n.vpe,this.prefixCls=oe}enablePrevNext(a,h){return!(!this.showTimePicker&&h===this.endPanelMode&&("left"===this.partType&&"next"===a||"right"===this.partType&&"prev"===a))}onSelectTime(a){this.selectTime.emit(new v0.Yp(a))}onSelectDate(a){const h=a instanceof v0.Yp?a:new v0.Yp(a),P=this.timeOptions&&this.timeOptions.nzDefaultOpenValue;!this.value&&P&&h.setHms(P.getHours(),P.getMinutes(),P.getSeconds()),this.selectDate.emit(h)}onChooseMonth(a){this.activeDate=this.activeDate.setMonth(a.getMonth()),"month"===this.endPanelMode?(this.value=a,this.selectDate.emit(a)):(this.headerChange.emit(a),this.panelModeChange.emit(this.endPanelMode))}onChooseYear(a){this.activeDate=this.activeDate.setYear(a.getYear()),"year"===this.endPanelMode?(this.value=a,this.selectDate.emit(a)):(this.headerChange.emit(a),this.panelModeChange.emit(this.endPanelMode))}onChooseDecade(a){this.activeDate=this.activeDate.setYear(a.getYear()),"decade"===this.endPanelMode?(this.value=a,this.selectDate.emit(a)):(this.headerChange.emit(a),this.panelModeChange.emit("year"))}ngOnChanges(a){a.activeDate&&!a.activeDate.currentValue&&(this.activeDate=new v0.Yp),a.panelMode&&"time"===a.panelMode.currentValue&&(this.panelMode="date")}}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275cmp=n.Xpm({type:_,selectors:[["inner-popup"]],inputs:{activeDate:"activeDate",endPanelMode:"endPanelMode",panelMode:"panelMode",showWeek:"showWeek",locale:"locale",showTimePicker:"showTimePicker",timeOptions:"timeOptions",disabledDate:"disabledDate",dateRender:"dateRender",selectedValue:"selectedValue",hoverValue:"hoverValue",value:"value",partType:"partType"},outputs:{panelModeChange:"panelModeChange",headerChange:"headerChange",selectDate:"selectDate",selectTime:"selectTime",cellHover:"cellHover"},exportAs:["innerPopup"],features:[n.TTD],decls:8,vars:11,consts:[[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[4,"ngIf"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showNextBtn","showPreBtn","valueChange","panelModeChange"],[3,"activeDate","value","locale","disabledDate","valueChange"],[3,"activeDate","value","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","activeDate","locale","disabledDate","selectedValue","hoverValue","valueChange","cellHover"],[3,"value","locale","showSuperPreBtn","showSuperNextBtn","showPreBtn","showNextBtn","valueChange","panelModeChange"],[3,"locale","showWeek","value","activeDate","disabledDate","cellRender","selectedValue","hoverValue","canSelectWeek","valueChange","cellHover"],[3,"nzInDatePicker","ngModel","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzHideDisabledOptions","nzDefaultOpenValue","nzUse12Hours","nzAddOn","ngModelChange"]],template:function(a,h){1&a&&(n.TgZ(0,"div")(1,"div"),n.ynx(2,0),n.YNc(3,ct,4,13,"ng-container",1),n.YNc(4,Pe,4,15,"ng-container",1),n.YNc(5,Mt,4,15,"ng-container",1),n.YNc(6,dt,4,18,"ng-container",2),n.BQk(),n.qZA(),n.YNc(7,zt,2,13,"ng-container",3),n.qZA()),2&a&&(n.ekj("ant-picker-datetime-panel",h.showTimePicker),n.xp6(1),n.MT6("",h.prefixCls,"-",h.panelMode,"-panel"),n.xp6(1),n.Q6J("ngSwitch",h.panelMode),n.xp6(1),n.Q6J("ngSwitchCase","decade"),n.xp6(1),n.Q6J("ngSwitchCase","year"),n.xp6(1),n.Q6J("ngSwitchCase","month"),n.xp6(2),n.Q6J("ngIf",h.showTimePicker&&h.timeOptions))},dependencies:[c.O5,c.RF,c.n9,c.ED,J.JJ,J.On,ue,ge,Ne,Xt,Wt,St,Tt,vt,t.Iv],encapsulation:2,changeDetection:0}),F})(),yt=(()=>{var _;class F{get hasTimePicker(){return!!this.showTime}get hasFooter(){return this.showToday||this.hasTimePicker||!!this.extraFooter||!!this.ranges}get arrowPosition(){return"rtl"===this.dir?{right:`${this.datePickerService?.arrowLeft}px`}:{left:`${this.datePickerService?.arrowLeft}px`}}constructor(a,h,P,K0){this.datePickerService=a,this.cdr=h,this.ngZone=P,this.host=K0,this.inline=!1,this.dir="ltr",this.panelModeChange=new n.vpe,this.calendarChange=new n.vpe,this.resultOk=new n.vpe,this.prefixCls=oe,this.endPanelMode="date",this.timeOptions=null,this.hoverValue=[],this.checkedPartArr=[!1,!1],this.destroy$=new R0.x,this.disabledStartTime=s1=>this.disabledTime&&this.disabledTime(s1,"start"),this.disabledEndTime=s1=>this.disabledTime&&this.disabledTime(s1,"end")}ngOnInit(){(0,p1.T)(this.datePickerService.valueChange$,this.datePickerService.inputPartChange$).pipe((0,A0.R)(this.destroy$)).subscribe(()=>{this.updateActiveDate(),this.cdr.markForCheck()}),this.ngZone.runOutsideAngular(()=>{(0,T0.R)(this.host.nativeElement,"mousedown").pipe((0,A0.R)(this.destroy$)).subscribe(a=>a.preventDefault())})}ngOnChanges(a){(a.showTime||a.disabledTime)&&this.showTime&&this.buildTimeOptions(),a.panelMode&&(this.endPanelMode=this.panelMode),a.defaultPickerValue&&this.updateActiveDate()}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}updateActiveDate(){const a=this.datePickerService.hasValue()?this.datePickerService.value:this.datePickerService.makeValue(this.defaultPickerValue);this.datePickerService.setActiveDate(a,this.hasTimePicker,this.getPanelMode(this.endPanelMode))}onClickOk(){this.changeValueFromSelect(this.isRange?this.datePickerService.value[{left:0,right:1}[this.datePickerService.activeInput]]:this.datePickerService.value),this.resultOk.emit()}onClickToday(a){this.changeValueFromSelect(a,!this.showTime)}onCellHover(a){if(!this.isRange)return;const P=this.datePickerService.value[{left:1,right:0}[this.datePickerService.activeInput]];P&&(this.hoverValue=P.isBeforeDay(a)?[P,a]:[a,P])}onPanelModeChange(a,h){this.panelMode=this.isRange?0===this.datePickerService.getActiveIndex(h)?[a,this.panelMode[1]]:[this.panelMode[0],a]:a,this.panelModeChange.emit(this.panelMode)}onActiveDateChange(a,h){if(this.isRange){const P=[];P[this.datePickerService.getActiveIndex(h)]=a,this.datePickerService.setActiveDate(P,this.hasTimePicker,this.getPanelMode(this.endPanelMode,h))}else this.datePickerService.setActiveDate(a)}onSelectTime(a,h){if(this.isRange){const P=(0,v0.ky)(this.datePickerService.value),K0=this.datePickerService.getActiveIndex(h);P[K0]=this.overrideHms(a,P[K0]),this.datePickerService.setValue(P)}else{const P=this.overrideHms(a,this.datePickerService.value);this.datePickerService.setValue(P)}this.datePickerService.inputPartChange$.next(null),this.buildTimeOptions()}changeValueFromSelect(a,h=!0){if(this.isRange){const P=(0,v0.ky)(this.datePickerService.value),K0=this.datePickerService.activeInput;let s1=K0;P[this.datePickerService.getActiveIndex(K0)]=a,this.checkedPartArr[this.datePickerService.getActiveIndex(K0)]=!0,this.hoverValue=P,h?this.inline?(s1=this.reversedPart(K0),"right"===s1&&(P[this.datePickerService.getActiveIndex(s1)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(s1)]=!1),this.datePickerService.setValue(P),this.calendarChange.emit(P),this.isBothAllowed(P)&&this.checkedPartArr[0]&&this.checkedPartArr[1]&&(this.clearHoverValue(),this.datePickerService.emitValue$.next())):((0,v0.Et)(P)&&(s1=this.reversedPart(K0),P[this.datePickerService.getActiveIndex(s1)]=null,this.checkedPartArr[this.datePickerService.getActiveIndex(s1)]=!1),this.datePickerService.setValue(P),this.isBothAllowed(P)&&this.checkedPartArr[0]&&this.checkedPartArr[1]?(this.calendarChange.emit(P),this.clearHoverValue(),this.datePickerService.emitValue$.next()):this.isAllowed(P)&&(s1=this.reversedPart(K0),this.calendarChange.emit([a.clone()]))):this.datePickerService.setValue(P),this.datePickerService.inputPartChange$.next(s1)}else this.datePickerService.setValue(a),this.datePickerService.inputPartChange$.next(null),h&&this.isAllowed(a)&&this.datePickerService.emitValue$.next();this.buildTimeOptions()}reversedPart(a){return"left"===a?"right":"left"}getPanelMode(a,h){return this.isRange?a[this.datePickerService.getActiveIndex(h)]:a}getValue(a){return this.isRange?(this.datePickerService.value||[])[this.datePickerService.getActiveIndex(a)]:this.datePickerService.value}getActiveDate(a){return this.isRange?this.datePickerService.activeDate[this.datePickerService.getActiveIndex(a)]:this.datePickerService.activeDate}isOneAllowed(a){const h=this.datePickerService.getActiveIndex();return X1(a[h],this.disabledDate,[this.disabledStartTime,this.disabledEndTime][h])}isBothAllowed(a){return X1(a[0],this.disabledDate,this.disabledStartTime)&&X1(a[1],this.disabledDate,this.disabledEndTime)}isAllowed(a,h=!1){return this.isRange?h?this.isBothAllowed(a):this.isOneAllowed(a):X1(a,this.disabledDate,this.disabledTime)}getTimeOptions(a){return this.showTime&&this.timeOptions?this.timeOptions instanceof Array?this.timeOptions[this.datePickerService.getActiveIndex(a)]:this.timeOptions:null}onClickPresetRange(a){const h="function"==typeof a?a():a;h&&(this.datePickerService.setValue([new v0.Yp(h[0]),new v0.Yp(h[1])]),this.datePickerService.emitValue$.next())}onPresetRangeMouseLeave(){this.clearHoverValue()}onHoverPresetRange(a){"function"!=typeof a&&(this.hoverValue=[new v0.Yp(a[0]),new v0.Yp(a[1])])}getObjectKeys(a){return a?Object.keys(a):[]}show(a){return!(this.showTime&&this.isRange&&this.datePickerService.activeInput!==a)}clearHoverValue(){this.hoverValue=[]}buildTimeOptions(){if(this.showTime){const a="object"==typeof this.showTime?this.showTime:{};if(this.isRange){const h=this.datePickerService.value;this.timeOptions=[this.overrideTimeOptions(a,h[0],"start"),this.overrideTimeOptions(a,h[1],"end")]}else this.timeOptions=this.overrideTimeOptions(a,this.datePickerService.value)}else this.timeOptions=null}overrideTimeOptions(a,h,P){let K0;return K0=P?"start"===P?this.disabledStartTime:this.disabledEndTime:this.disabledTime,{...a,...J1(h,K0)}}overrideHms(a,h){return a=a||new v0.Yp,(h=h||new v0.Yp).setHms(a.getHours(),a.getMinutes(),a.getSeconds())}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(te),n.Y36(n.sBO),n.Y36(n.R0b),n.Y36(n.SBq))},_.\u0275cmp=n.Xpm({type:_,selectors:[["date-range-popup"]],inputs:{isRange:"isRange",inline:"inline",showWeek:"showWeek",locale:"locale",disabledDate:"disabledDate",disabledTime:"disabledTime",showToday:"showToday",showNow:"showNow",showTime:"showTime",extraFooter:"extraFooter",ranges:"ranges",dateRender:"dateRender",panelMode:"panelMode",defaultPickerValue:"defaultPickerValue",dir:"dir"},outputs:{panelModeChange:"panelModeChange",calendarChange:"calendarChange",resultOk:"resultOk"},exportAs:["dateRangePopup"],features:[n.TTD],decls:9,vars:2,consts:[[4,"ngIf","ngIfElse"],["singlePanel",""],["tplInnerPopup",""],["tplFooter",""],["tplRangeQuickSelector",""],["noTimePicker",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["tabindex","-1"],[3,"showWeek","endPanelMode","partType","locale","showTimePicker","timeOptions","panelMode","activeDate","value","disabledDate","dateRender","selectedValue","hoverValue","panelModeChange","cellHover","selectDate","selectTime","headerChange"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday",4,"ngIf"],[3,"locale","isRange","showToday","showNow","hasTimePicker","okDisabled","extraFooter","rangeQuickSelector","clickOk","clickToday"],[3,"class","click","mouseenter","mouseleave",4,"ngFor","ngForOf"],[3,"click","mouseenter","mouseleave"],[1,"ant-tag","ant-tag-blue"]],template:function(a,h){if(1&a&&(n.YNc(0,ne,9,19,"ng-container",0),n.YNc(1,ke,4,13,"ng-template",null,1,n.W1O),n.YNc(3,De,2,18,"ng-template",null,2,n.W1O),n.YNc(5,ut,1,1,"ng-template",null,3,n.W1O),n.YNc(7,ht,1,1,"ng-template",null,4,n.W1O)),2&a){const P=n.MAs(2);n.Q6J("ngIf",h.isRange)("ngIfElse",P)}},dependencies:[c.sg,c.O5,c.tP,ee,Rt],encapsulation:2,changeDetection:0}),F})();const Ct={position:"relative"};let bt=(()=>{var _;class F{get nzShowTime(){return this.showTime}set nzShowTime(a){this.showTime="object"==typeof a?a:(0,a0.sw)(a)}get realOpenState(){return this.isOpenHandledByUser()?!!this.nzOpen:this.overlayOpen}ngAfterViewInit(){this.nzAutoFocus&&this.focus(),this.isRange&&this.platform.isBrowser&&this.nzResizeObserver.observe(this.elementRef).pipe((0,A0.R)(this.destroy$)).subscribe(()=>{this.updateInputWidthAndArrowLeft()}),this.datePickerService.inputPartChange$.pipe((0,A0.R)(this.destroy$)).subscribe(a=>{a&&(this.datePickerService.activeInput=a),this.focus(),this.updateInputWidthAndArrowLeft()}),this.platform.isBrowser&&this.ngZone.runOutsideAngular(()=>(0,T0.R)(this.elementRef.nativeElement,"mousedown").pipe((0,A0.R)(this.destroy$)).subscribe(a=>{"input"!==a.target.tagName.toLowerCase()&&a.preventDefault()}))}updateInputWidthAndArrowLeft(){this.inputWidth=this.rangePickerInputs?.first?.nativeElement.offsetWidth||0;const a={position:"absolute",width:`${this.inputWidth}px`};this.datePickerService.arrowLeft="left"===this.datePickerService.activeInput?0:this.inputWidth+this.separatorElement?.nativeElement.offsetWidth||0,this.activeBarStyle="rtl"===this.dir?{...a,right:`${this.datePickerService.arrowLeft}px`}:{...a,left:`${this.datePickerService.arrowLeft}px`},this.cdr.markForCheck()}getInput(a){if(!this.nzInline)return this.isRange?"left"===a?this.rangePickerInputs?.first.nativeElement:this.rangePickerInputs?.last.nativeElement:this.pickerInput.nativeElement}focus(){const a=this.getInput(this.datePickerService.activeInput);this.document.activeElement!==a&&a?.focus()}onFocus(a,h){a.preventDefault(),h&&this.datePickerService.inputPartChange$.next(h),this.renderClass(!0)}onFocusout(a){a.preventDefault(),this.onTouchedFn(),this.elementRef.nativeElement.contains(a.relatedTarget)||this.checkAndClose(),this.renderClass(!1)}open(){this.nzInline||!this.realOpenState&&!this.nzDisabled&&(this.updateInputWidthAndArrowLeft(),this.overlayOpen=!0,this.nzOnOpenChange.emit(!0),this.focus(),this.cdr.markForCheck())}close(){this.nzInline||this.realOpenState&&(this.overlayOpen=!1,this.nzOnOpenChange.emit(!1))}showClear(){return!this.nzDisabled&&!this.isEmptyValue(this.datePickerService.value)&&this.nzAllowClear}checkAndClose(){if(this.realOpenState)if(this.panel.isAllowed(this.datePickerService.value,!0)){if(Array.isArray(this.datePickerService.value)&&(0,v0.Et)(this.datePickerService.value)){const a=this.datePickerService.getActiveIndex();return void this.panel.changeValueFromSelect(this.datePickerService.value[a],!0)}this.updateInputValue(),this.datePickerService.emitValue$.next()}else this.datePickerService.setValue(this.datePickerService.initialValue),this.close()}onClickInputBox(a){a.stopPropagation(),this.focus(),this.isOpenHandledByUser()||this.open()}onOverlayKeydown(a){a.keyCode===j0.hY&&this.datePickerService.initValue()}onPositionChange(a){this.currentPositionX=a.connectionPair.originX,this.currentPositionY=a.connectionPair.originY,this.cdr.detectChanges()}onClickClear(a){a.preventDefault(),a.stopPropagation(),this.datePickerService.initValue(!0),this.datePickerService.emitValue$.next()}updateInputValue(){const a=this.datePickerService.value;this.inputValue=this.isRange?a?a.map(h=>this.formatValue(h)):["",""]:this.formatValue(a),this.cdr.markForCheck()}formatValue(a){return this.dateHelper.format(a&&a.nativeDate,this.nzFormat)}onInputChange(a,h=!1){if(!this.platform.TRIDENT&&this.document.activeElement===this.getInput(this.datePickerService.activeInput)&&!this.realOpenState)return void this.open();const P=this.checkValidDate(a);P&&this.realOpenState&&this.panel.changeValueFromSelect(P,h)}onKeyupEnter(a){this.onInputChange(a.target.value,!0)}checkValidDate(a){const h=new v0.Yp(this.dateHelper.parseDate(a,this.nzFormat));return h.isValid()&&a===this.dateHelper.format(h.nativeDate,this.nzFormat)?h:null}getPlaceholder(a){return this.isRange?this.nzPlaceHolder[this.datePickerService.getActiveIndex(a)]:this.nzPlaceHolder}isEmptyValue(a){return null===a||(this.isRange?!a||!Array.isArray(a)||a.every(h=>!h):!a)}isOpenHandledByUser(){return void 0!==this.nzOpen}constructor(a,h,P,K0,s1,f1,E1,Oe,V1,K1,Y1,Je,We,He,Ft,$t){this.nzConfigService=a,this.datePickerService=h,this.i18n=P,this.cdr=K0,this.renderer=s1,this.ngZone=f1,this.elementRef=E1,this.dateHelper=Oe,this.nzResizeObserver=V1,this.platform=K1,this.destroy$=Y1,this.directionality=We,this.noAnimation=He,this.nzFormStatusService=Ft,this.nzFormNoStatusService=$t,this._nzModuleName="datePicker",this.isRange=!1,this.dir="ltr",this.statusCls={},this.status="",this.hasFeedback=!1,this.panelMode="date",this.isCustomPlaceHolder=!1,this.isCustomFormat=!1,this.showTime=!1,this.isNzDisableFirstChange=!0,this.nzAllowClear=!0,this.nzAutoFocus=!1,this.nzDisabled=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1,this.nzInline=!1,this.nzPlaceHolder="",this.nzPopupStyle=Ct,this.nzSize="default",this.nzStatus="",this.nzShowToday=!0,this.nzMode="date",this.nzShowNow=!0,this.nzDefaultPickerValue=null,this.nzSeparator=void 0,this.nzSuffixIcon="calendar",this.nzBackdrop=!1,this.nzId=null,this.nzPlacement="bottomLeft",this.nzShowWeekNumber=!1,this.nzOnPanelChange=new n.vpe,this.nzOnCalendarChange=new n.vpe,this.nzOnOk=new n.vpe,this.nzOnOpenChange=new n.vpe,this.inputSize=12,this.prefixCls=oe,this.activeBarStyle={},this.overlayOpen=!1,this.overlayPositions=[...S.bw],this.currentPositionX="start",this.currentPositionY="bottom",this.onChangeFn=()=>{},this.onTouchedFn=()=>{},this.document=Je,this.origin=new e.xu(this.elementRef)}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe((0,Z.x)((a,h)=>a.status===h.status&&a.hasFeedback===h.hasFeedback),(0,p0.M)(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:(0,D0.of)(!1)),(0,Q.U)(([{status:a,hasFeedback:h},P])=>({status:P?"":a,hasFeedback:h})),(0,A0.R)(this.destroy$)).subscribe(({status:a,hasFeedback:h})=>{this.setStatusStyles(a,h)}),this.nzLocale||this.i18n.localeChange.pipe((0,A0.R)(this.destroy$)).subscribe(()=>this.setLocale()),this.datePickerService.isRange=this.isRange,this.datePickerService.initValue(!0),this.datePickerService.emitValue$.pipe((0,A0.R)(this.destroy$)).subscribe(()=>{const a=this.showTime?"second":"day",h=this.datePickerService.value,P=this.datePickerService.initialValue;if(!this.isRange&&h?.isSame(P?.nativeDate,a))return this.onTouchedFn(),this.close();if(this.isRange){const[K0,s1]=P,[f1,E1]=h;if(K0?.isSame(f1?.nativeDate,a)&&s1?.isSame(E1?.nativeDate,a))return this.onTouchedFn(),this.close()}if(this.datePickerService.initialValue=(0,v0.ky)(h),this.isRange){const K0=h;this.onChangeFn(K0.length?[K0[0]?.nativeDate??null,K0[1]?.nativeDate??null]:[])}else this.onChangeFn(h?h.nativeDate:null);this.onTouchedFn(),this.close()}),this.directionality.change?.pipe((0,A0.R)(this.destroy$)).subscribe(a=>{this.dir=a,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.inputValue=this.isRange?["",""]:"",this.setModeAndFormat(),this.datePickerService.valueChange$.pipe((0,A0.R)(this.destroy$)).subscribe(()=>{this.updateInputValue()})}ngOnChanges(a){const{nzStatus:h,nzPlacement:P}=a;a.nzPopupStyle&&(this.nzPopupStyle=this.nzPopupStyle?{...this.nzPopupStyle,...Ct}:Ct),a.nzPlaceHolder?.currentValue&&(this.isCustomPlaceHolder=!0),a.nzFormat?.currentValue&&(this.isCustomFormat=!0),a.nzLocale&&this.setDefaultPlaceHolder(),a.nzRenderExtraFooter&&(this.extraFooter=(0,a0.rw)(this.nzRenderExtraFooter)),a.nzMode&&(this.setDefaultPlaceHolder(),this.setModeAndFormat()),h&&this.setStatusStyles(this.nzStatus,this.hasFeedback),P&&this.setPlacement(this.nzPlacement)}setModeAndFormat(){const a={year:"yyyy",month:"yyyy-MM",week:"YYYY-ww",date:this.nzShowTime?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd"};this.nzMode||(this.nzMode="date"),this.panelMode=this.isRange?[this.nzMode,this.nzMode]:this.nzMode,this.isCustomFormat||(this.nzFormat=a[this.nzMode]),this.inputSize=Math.max(10,this.nzFormat.length)+2,this.updateInputValue()}onOpenChange(a){this.nzOnOpenChange.emit(a)}writeValue(a){this.setValue(a),this.cdr.markForCheck()}registerOnChange(a){this.onChangeFn=a}registerOnTouched(a){this.onTouchedFn=a}setDisabledState(a){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||a,this.cdr.markForCheck(),this.isNzDisableFirstChange=!1}setLocale(){this.nzLocale=this.i18n.getLocaleData("DatePicker",{}),this.setDefaultPlaceHolder(),this.cdr.markForCheck()}setDefaultPlaceHolder(){if(!this.isCustomPlaceHolder&&this.nzLocale){const a={year:this.getPropertyOfLocale("yearPlaceholder"),month:this.getPropertyOfLocale("monthPlaceholder"),week:this.getPropertyOfLocale("weekPlaceholder"),date:this.getPropertyOfLocale("placeholder")},h={year:this.getPropertyOfLocale("rangeYearPlaceholder"),month:this.getPropertyOfLocale("rangeMonthPlaceholder"),week:this.getPropertyOfLocale("rangeWeekPlaceholder"),date:this.getPropertyOfLocale("rangePlaceholder")};this.nzPlaceHolder=this.isRange?h[this.nzMode]:a[this.nzMode]}}getPropertyOfLocale(a){return this.nzLocale.lang[a]||this.i18n.getLocaleData(`DatePicker.lang.${a}`)}setValue(a){const h=this.datePickerService.makeValue(a);this.datePickerService.setValue(h),this.datePickerService.initialValue=(0,v0.ky)(h),this.cdr.detectChanges()}renderClass(a){a?this.renderer.addClass(this.elementRef.nativeElement,"ant-picker-focused"):this.renderer.removeClass(this.elementRef.nativeElement,"ant-picker-focused")}onPanelModeChange(a){this.nzOnPanelChange.emit(a)}onCalendarChange(a){if(this.isRange&&Array.isArray(a)){const h=a.filter(P=>P instanceof v0.Yp).map(P=>P.nativeDate);this.nzOnCalendarChange.emit(h)}}onResultOk(){if(this.isRange){const a=this.datePickerService.value;this.nzOnOk.emit(a.length?[a[0]?.nativeDate||null,a[1]?.nativeDate||null]:[])}else this.nzOnOk.emit(this.datePickerService.value?this.datePickerService.value.nativeDate:null)}setStatusStyles(a,h){this.status=a,this.hasFeedback=h,this.cdr.markForCheck(),this.statusCls=(0,a0.Zu)(this.prefixCls,a,h),Object.keys(this.statusCls).forEach(P=>{this.statusCls[P]?this.renderer.addClass(this.elementRef.nativeElement,P):this.renderer.removeClass(this.elementRef.nativeElement,P)})}setPlacement(a){const h=S.dz[a];this.overlayPositions=[h,...S.bw],this.currentPositionX=h.originX,this.currentPositionY=h.originY}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(r0.jY),n.Y36(te),n.Y36(I.wi),n.Y36(n.sBO),n.Y36(n.Qsj),n.Y36(n.R0b),n.Y36(n.SBq),n.Y36(I.mx),n.Y36(O1.D3),n.Y36(N0.t4),n.Y36(h0.kn),n.Y36(c.K0),n.Y36(M.Is,8),n.Y36(v.P,9),n.Y36(g.kH,8),n.Y36(g.yW,8))},_.\u0275cmp=n.Xpm({type:_,selectors:[["nz-date-picker"],["nz-week-picker"],["nz-month-picker"],["nz-year-picker"],["nz-range-picker"]],viewQuery:function(a,h){if(1&a&&(n.Gf(e.pI,5),n.Gf(yt,5),n.Gf(et,5),n.Gf(tt,5),n.Gf(at,5)),2&a){let P;n.iGM(P=n.CRH())&&(h.cdkConnectedOverlay=P.first),n.iGM(P=n.CRH())&&(h.panel=P.first),n.iGM(P=n.CRH())&&(h.separatorElement=P.first),n.iGM(P=n.CRH())&&(h.pickerInput=P.first),n.iGM(P=n.CRH())&&(h.rangePickerInputs=P)}},hostVars:16,hostBindings:function(a,h){1&a&&n.NdJ("click",function(K0){return h.onClickInputBox(K0)}),2&a&&n.ekj("ant-picker",!0)("ant-picker-range",h.isRange)("ant-picker-large","large"===h.nzSize)("ant-picker-small","small"===h.nzSize)("ant-picker-disabled",h.nzDisabled)("ant-picker-rtl","rtl"===h.dir)("ant-picker-borderless",h.nzBorderless)("ant-picker-inline",h.nzInline)},inputs:{nzAllowClear:"nzAllowClear",nzAutoFocus:"nzAutoFocus",nzDisabled:"nzDisabled",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly",nzInline:"nzInline",nzOpen:"nzOpen",nzDisabledDate:"nzDisabledDate",nzLocale:"nzLocale",nzPlaceHolder:"nzPlaceHolder",nzPopupStyle:"nzPopupStyle",nzDropdownClassName:"nzDropdownClassName",nzSize:"nzSize",nzStatus:"nzStatus",nzFormat:"nzFormat",nzDateRender:"nzDateRender",nzDisabledTime:"nzDisabledTime",nzRenderExtraFooter:"nzRenderExtraFooter",nzShowToday:"nzShowToday",nzMode:"nzMode",nzShowNow:"nzShowNow",nzRanges:"nzRanges",nzDefaultPickerValue:"nzDefaultPickerValue",nzSeparator:"nzSeparator",nzSuffixIcon:"nzSuffixIcon",nzBackdrop:"nzBackdrop",nzId:"nzId",nzPlacement:"nzPlacement",nzShowWeekNumber:"nzShowWeekNumber",nzShowTime:"nzShowTime"},outputs:{nzOnPanelChange:"nzOnPanelChange",nzOnCalendarChange:"nzOnCalendarChange",nzOnOk:"nzOnOk",nzOnOpenChange:"nzOnOpenChange"},exportAs:["nzDatePicker"],features:[n._Bn([h0.kn,te,{provide:J.JU,multi:!0,useExisting:(0,n.Gpc)(()=>_)}]),n.TTD],decls:8,vars:7,consts:[[4,"ngIf","ngIfElse"],["tplRangeInput",""],["tplRightRest",""],["inlineMode",""],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayTransformOriginOn","positionChange","detach","overlayKeydown"],[3,"class",4,"ngIf"],[4,"ngIf"],["autocomplete","off",3,"disabled","readOnly","ngModel","placeholder","size","ngModelChange","focus","focusout","keyup.enter"],["pickerInput",""],[4,"ngTemplateOutlet"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["separatorElement",""],[4,"nzStringTemplateOutlet"],["defaultSeparator",""],["nz-icon","","nzType","swap-right","nzTheme","outline"],["autocomplete","off",3,"disabled","readOnly","size","ngModel","placeholder","click","focusout","focus","keyup.enter","ngModelChange"],["rangePickerInput",""],[3,"ngStyle"],[3,"class","click",4,"ngIf"],[3,"status",4,"ngIf"],[3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],["nz-icon","",3,"nzType"],[3,"status"],[3,"isRange","inline","defaultPickerValue","showWeek","panelMode","locale","showToday","showNow","showTime","dateRender","disabledDate","disabledTime","extraFooter","ranges","dir","panelModeChange","calendarChange","resultOk"],[1,"ant-picker-wrapper",2,"position","relative",3,"nzNoAnimation"]],template:function(a,h){if(1&a&&(n.YNc(0,S1,3,2,"ng-container",0),n.YNc(1,R1,2,6,"ng-template",null,1,n.W1O),n.YNc(3,xe,5,10,"ng-template",null,2,n.W1O),n.YNc(5,ze,2,36,"ng-template",null,3,n.W1O),n.YNc(7,Ie,2,3,"ng-template",4),n.NdJ("positionChange",function(K0){return h.onPositionChange(K0)})("detach",function(){return h.close()})("overlayKeydown",function(K0){return h.onOverlayKeydown(K0)})),2&a){const P=n.MAs(6);n.Q6J("ngIf",!h.nzInline)("ngIfElse",P),n.xp6(7),n.Q6J("cdkConnectedOverlayHasBackdrop",h.nzBackdrop)("cdkConnectedOverlayOrigin",h.origin)("cdkConnectedOverlayOpen",h.realOpenState)("cdkConnectedOverlayPositions",h.overlayPositions)("cdkConnectedOverlayTransformOriginOn",".ant-picker-wrapper")}},dependencies:[M.Lv,c.O5,c.tP,c.PC,J.Fj,J.JJ,J.On,e.pI,E.Ls,S.hQ,v.P,g.w_,N.f,n0.w,yt],encapsulation:2,data:{animation:[V.mF]},changeDetection:0}),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzAllowClear",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzAutoFocus",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzDisabled",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzBorderless",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzInputReadOnly",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzInline",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzOpen",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzShowToday",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzShowNow",void 0),(0,H.gn)([(0,r0.oS)()],F.prototype,"nzSeparator",void 0),(0,H.gn)([(0,r0.oS)()],F.prototype,"nzSuffixIcon",void 0),(0,H.gn)([(0,r0.oS)()],F.prototype,"nzBackdrop",void 0),(0,H.gn)([(0,a0.yF)()],F.prototype,"nzShowWeekNumber",void 0),F})(),Se=(()=>{var _;class F{}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275mod=n.oAB({type:_}),_.\u0275inj=n.cJS({imports:[c.ez,J.u5,I.YI,t.wY,N.T]}),F})(),Ut=(()=>{var _;class F{constructor(a){this.datePicker=a,this.datePicker.isRange=!0}}return(_=F).\u0275fac=function(a){return new(a||_)(n.Y36(bt,9))},_.\u0275dir=n.lG2({type:_,selectors:[["nz-range-picker"]],exportAs:["nzRangePicker"]}),F})(),qt=(()=>{var _;class F{}return(_=F).\u0275fac=function(a){return new(a||_)},_.\u0275mod=n.oAB({type:_}),_.\u0275inj=n.cJS({imports:[M.vT,c.ez,J.u5,e.U8,Se,E.PV,S.e4,v.g,g.mJ,N.T,t.wY,B.sL,Se]}),F})()},68373:(r1,S0,s)=>{"use strict";s.d(S0,{Zf:()=>h1,_V:()=>z1});var M=s(97582),e=s(36028),c=s(65879),n=s(60095),J=s(78645),B=s(92438),g=s(63019),v=s(93997),N=s(59773),S=s(99087),E=s(27754),t=s(4300),v0=s(49388),a0=s(50883),I=s(96814),n0=s(62595),f0=s(8324);const H=["upHandler"],j0=["downHandler"],Z0=["inputElement"];function R0(M0,L0){if(1&M0&&c._UZ(0,"nz-form-item-feedback-icon",11),2&M0){const o0=c.oxw();c.Q6J("status",o0.status)}}let z1=(()=>{var M0;class L0{onModelChange(L){this.parsedValue=this.nzParser(L),this.inputElement.nativeElement.value=`${this.parsedValue}`;const m=this.getCurrentValidValue(this.parsedValue);this.setValue(m)}getCurrentValidValue(L){let m=L;return m=""===m?"":this.isNotCompleteNumber(m)?this.value:`${this.getValidValue(m)}`,this.toNumber(m)}isNotCompleteNumber(L){return isNaN(L)||""===L||null===L||!(!L||L.toString().indexOf(".")!==L.toString().length-1)}getValidValue(L){let m=parseFloat(L);return isNaN(m)?L:(mthis.nzMax&&(m=this.nzMax),m)}toNumber(L){if(this.isNotCompleteNumber(L))return L;const m=String(L);if(m.indexOf(".")>=0&&(0,E.DX)(this.nzPrecision)){if("function"==typeof this.nzPrecisionMode)return this.nzPrecisionMode(L,this.nzPrecision);if("cut"===this.nzPrecisionMode){const d=m.split(".");return d[1]=d[1].slice(0,this.nzPrecision),Number(d.join("."))}return Number(Number(L).toFixed(this.nzPrecision))}return Number(L)}getRatio(L){let m=1;return L.metaKey||L.ctrlKey?m=.1:L.shiftKey&&(m=10),m}down(L,m){this.isFocused||this.focus(),this.step("down",L,m)}up(L,m){this.isFocused||this.focus(),this.step("up",L,m)}getPrecision(L){const m=L.toString();if(m.indexOf("e-")>=0)return parseInt(m.slice(m.indexOf("e-")+2),10);let d=0;return m.indexOf(".")>=0&&(d=m.length-m.indexOf(".")-1),d}getMaxPrecision(L,m){if((0,E.DX)(this.nzPrecision))return this.nzPrecision;const d=this.getPrecision(m),K=this.getPrecision(this.nzStep),g0=this.getPrecision(L);return L?Math.max(g0,d+K):d+K}getPrecisionFactor(L,m){const d=this.getMaxPrecision(L,m);return Math.pow(10,d)}upStep(L,m){const d=this.getPrecisionFactor(L,m),K=Math.abs(this.getMaxPrecision(L,m));let g0;return g0="number"==typeof L?((d*L+d*this.nzStep*m)/d).toFixed(K):this.nzMin===-1/0?this.nzStep:this.nzMin,this.toNumber(g0)}downStep(L,m){const d=this.getPrecisionFactor(L,m),K=Math.abs(this.getMaxPrecision(L,m));let g0;return g0="number"==typeof L?((d*L-d*this.nzStep*m)/d).toFixed(K):this.nzMin===-1/0?-this.nzStep:this.nzMin,this.toNumber(g0)}step(L,m,d=1){if(this.stop(),m.preventDefault(),this.nzDisabled)return;const K=this.getCurrentValidValue(this.parsedValue)||0;let g0=0;"up"===L?g0=this.upStep(K,d):"down"===L&&(g0=this.downStep(K,d));const e1=g0>this.nzMax||g0this.nzMax?g0=this.nzMax:g0{this[L](m,d)},300))}stop(){this.autoStepTimer&&clearTimeout(this.autoStepTimer)}setValue(L){if(`${this.value}`!=`${L}`&&this.onChange(L),this.value=L,this.parsedValue=L,this.disabledUp=this.disabledDown=!1,L||0===L){const m=Number(L);m>=this.nzMax&&(this.disabledUp=!0),m<=this.nzMin&&(this.disabledDown=!0)}}updateDisplayValue(L){const m=(0,E.DX)(this.nzFormatter(L))?this.nzFormatter(L):"";this.displayValue=m,this.inputElement.nativeElement.value=`${m}`}writeValue(L){this.value=L,this.setValue(L),this.updateDisplayValue(L),this.cdr.markForCheck()}registerOnChange(L){this.onChange=L}registerOnTouched(L){this.onTouched=L}setDisabledState(L){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||L,this.isNzDisableFirstChange=!1,this.disabled$.next(this.nzDisabled),this.cdr.markForCheck()}focus(){this.focusMonitor.focusVia(this.inputElement,"keyboard")}blur(){this.inputElement.nativeElement.blur()}constructor(L,m,d,K,g0,e1,u1,L1,k1){this.ngZone=L,this.elementRef=m,this.cdr=d,this.focusMonitor=K,this.renderer=g0,this.directionality=e1,this.destroy$=u1,this.nzFormStatusService=L1,this.nzFormNoStatusService=k1,this.isNzDisableFirstChange=!0,this.isFocused=!1,this.disabled$=new J.x,this.disabledUp=!1,this.disabledDown=!1,this.dir="ltr",this.prefixCls="ant-input-number",this.status="",this.statusCls={},this.hasFeedback=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzBlur=new c.vpe,this.nzFocus=new c.vpe,this.nzSize="default",this.nzMin=-1/0,this.nzMax=1/0,this.nzParser=W0=>W0.trim().replace(/\u3002/g,".").replace(/[^\w\.-]+/g,""),this.nzPrecisionMode="toFixed",this.nzPlaceHolder="",this.nzStatus="",this.nzStep=1,this.nzInputMode="decimal",this.nzId=null,this.nzDisabled=!1,this.nzReadOnly=!1,this.nzAutoFocus=!1,this.nzBorderless=!1,this.nzFormatter=W0=>W0}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe((0,v.x)((L,m)=>L.status===m.status&&L.hasFeedback===m.hasFeedback),(0,N.R)(this.destroy$)).subscribe(({status:L,hasFeedback:m})=>{this.setStatusStyles(L,m)}),this.focusMonitor.monitor(this.elementRef,!0).pipe((0,N.R)(this.destroy$)).subscribe(L=>{L?(this.isFocused=!0,this.nzFocus.emit()):(this.isFocused=!1,this.updateDisplayValue(this.value),this.nzBlur.emit(),Promise.resolve().then(()=>this.onTouched()))}),this.dir=this.directionality.value,this.directionality.change.pipe((0,N.R)(this.destroy$)).subscribe(L=>{this.dir=L}),this.setupHandlersListeners(),this.ngZone.runOutsideAngular(()=>{(0,B.R)(this.inputElement.nativeElement,"keyup").pipe((0,N.R)(this.destroy$)).subscribe(()=>this.stop()),(0,B.R)(this.inputElement.nativeElement,"keydown").pipe((0,N.R)(this.destroy$)).subscribe(L=>{const{keyCode:m}=L;m!==e.LH&&m!==e.JH&&m!==e.K5||this.ngZone.run(()=>{if(m===e.LH){const d=this.getRatio(L);this.up(L,d),this.stop()}else if(m===e.JH){const d=this.getRatio(L);this.down(L,d),this.stop()}else this.updateDisplayValue(this.value);this.cdr.markForCheck()})})})}ngOnChanges(L){const{nzStatus:m,nzDisabled:d}=L;if(L.nzFormatter&&!L.nzFormatter.isFirstChange()){const K=this.getCurrentValidValue(this.parsedValue);this.setValue(K),this.updateDisplayValue(K)}d&&this.disabled$.next(this.nzDisabled),m&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngAfterViewInit(){this.nzAutoFocus&&this.focus()}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.elementRef)}setupHandlersListeners(){this.ngZone.runOutsideAngular(()=>{(0,g.T)((0,B.R)(this.upHandler.nativeElement,"mouseup"),(0,B.R)(this.upHandler.nativeElement,"mouseleave"),(0,B.R)(this.downHandler.nativeElement,"mouseup"),(0,B.R)(this.downHandler.nativeElement,"mouseleave")).pipe((0,N.R)(this.destroy$)).subscribe(()=>this.stop())})}setStatusStyles(L,m){this.status=L,this.hasFeedback=m,this.cdr.markForCheck(),this.statusCls=(0,E.Zu)(this.prefixCls,L,m),Object.keys(this.statusCls).forEach(d=>{this.statusCls[d]?this.renderer.addClass(this.elementRef.nativeElement,d):this.renderer.removeClass(this.elementRef.nativeElement,d)})}}return(M0=L0).\u0275fac=function(L){return new(L||M0)(c.Y36(c.R0b),c.Y36(c.SBq),c.Y36(c.sBO),c.Y36(t.tE),c.Y36(c.Qsj),c.Y36(v0.Is,8),c.Y36(S.kn),c.Y36(a0.kH,8),c.Y36(a0.yW,8))},M0.\u0275cmp=c.Xpm({type:M0,selectors:[["nz-input-number"]],viewQuery:function(L,m){if(1&L&&(c.Gf(H,7),c.Gf(j0,7),c.Gf(Z0,7)),2&L){let d;c.iGM(d=c.CRH())&&(m.upHandler=d.first),c.iGM(d=c.CRH())&&(m.downHandler=d.first),c.iGM(d=c.CRH())&&(m.inputElement=d.first)}},hostAttrs:[1,"ant-input-number"],hostVars:16,hostBindings:function(L,m){2&L&&c.ekj("ant-input-number-in-form-item",!!m.nzFormStatusService)("ant-input-number-focused",m.isFocused)("ant-input-number-lg","large"===m.nzSize)("ant-input-number-sm","small"===m.nzSize)("ant-input-number-disabled",m.nzDisabled)("ant-input-number-readonly",m.nzReadOnly)("ant-input-number-rtl","rtl"===m.dir)("ant-input-number-borderless",m.nzBorderless)},inputs:{nzSize:"nzSize",nzMin:"nzMin",nzMax:"nzMax",nzParser:"nzParser",nzPrecision:"nzPrecision",nzPrecisionMode:"nzPrecisionMode",nzPlaceHolder:"nzPlaceHolder",nzStatus:"nzStatus",nzStep:"nzStep",nzInputMode:"nzInputMode",nzId:"nzId",nzDisabled:"nzDisabled",nzReadOnly:"nzReadOnly",nzAutoFocus:"nzAutoFocus",nzBorderless:"nzBorderless",nzFormatter:"nzFormatter"},outputs:{nzBlur:"nzBlur",nzFocus:"nzFocus"},exportAs:["nzInputNumber"],features:[c._Bn([{provide:n.JU,useExisting:(0,c.Gpc)(()=>M0),multi:!0},S.kn]),c.TTD],decls:11,vars:15,consts:[[1,"ant-input-number-handler-wrap"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-up",3,"mousedown"],["upHandler",""],["nz-icon","","nzType","up",1,"ant-input-number-handler-up-inner"],["unselectable","unselectable",1,"ant-input-number-handler","ant-input-number-handler-down",3,"mousedown"],["downHandler",""],["nz-icon","","nzType","down",1,"ant-input-number-handler-down-inner"],[1,"ant-input-number-input-wrap"],["autocomplete","off",1,"ant-input-number-input",3,"disabled","placeholder","readOnly","ngModel","ngModelChange"],["inputElement",""],["class","ant-input-number-suffix",3,"status",4,"ngIf"],[1,"ant-input-number-suffix",3,"status"]],template:function(L,m){1&L&&(c.TgZ(0,"div",0)(1,"span",1,2),c.NdJ("mousedown",function(K){return m.up(K)}),c._UZ(3,"span",3),c.qZA(),c.TgZ(4,"span",4,5),c.NdJ("mousedown",function(K){return m.down(K)}),c._UZ(6,"span",6),c.qZA()(),c.TgZ(7,"div",7)(8,"input",8,9),c.NdJ("ngModelChange",function(K){return m.onModelChange(K)}),c.qZA()(),c.YNc(10,R0,1,1,"nz-form-item-feedback-icon",10)),2&L&&(c.xp6(1),c.ekj("ant-input-number-handler-up-disabled",m.disabledUp),c.xp6(3),c.ekj("ant-input-number-handler-down-disabled",m.disabledDown),c.xp6(4),c.Q6J("disabled",m.nzDisabled)("placeholder",m.nzPlaceHolder)("readOnly",m.nzReadOnly)("ngModel",m.displayValue),c.uIk("id",m.nzId)("autofocus",m.nzAutoFocus?"autofocus":null)("min",m.nzMin)("max",m.nzMax)("step",m.nzStep)("inputmode",m.nzInputMode),c.xp6(2),c.Q6J("ngIf",m.hasFeedback&&!!m.status&&!m.nzFormNoStatusService))},dependencies:[I.O5,n.Fj,n.JJ,n.On,n0.Ls,a0.w_],encapsulation:2,changeDetection:0}),(0,M.gn)([(0,E.yF)()],L0.prototype,"nzDisabled",void 0),(0,M.gn)([(0,E.yF)()],L0.prototype,"nzReadOnly",void 0),(0,M.gn)([(0,E.yF)()],L0.prototype,"nzAutoFocus",void 0),(0,M.gn)([(0,E.yF)()],L0.prototype,"nzBorderless",void 0),L0})(),h1=(()=>{var M0;class L0{}return(M0=L0).\u0275fac=function(L){return new(L||M0)},M0.\u0275mod=c.oAB({type:M0}),M0.\u0275inj=c.cJS({imports:[v0.vT,I.ez,n.u5,f0.T,n0.PV,a0.mJ]}),L0})()},36513:(r1,S0,s)=>{"use strict";s.d(S0,{Gl:()=>h1,YW:()=>x0,jO:()=>Q0});var M=s(49388),e=s(69594),c=s(96814),n=s(65879),J=s(60095),B=s(50883),g=s(60804),v=s(62595),N=s(78645),S=s(92438),E=s(22096),t=s(65592),v0=s(63019),a0=s(47394),I=s(59773),n0=s(93997),f0=s(42460),H=s(37398),j0=s(27921),Z0=s(94664),R0=s(99087),p1=s(97582),T0=s(36028),D0=s(68484),A0=s(85448),Z=s(27754);const p0=["items"];function Q(M0,L0){1&M0&&n.GkF(0)}const V=function(M0){return{$implicit:M0}};function r0(M0,L0){if(1&M0&&(n.ynx(0),n.YNc(1,Q,1,0,"ng-container",10),n.BQk()),2&M0){const o0=n.oxw().$implicit,L=n.oxw(2);n.xp6(1),n.Q6J("ngTemplateOutlet",L.suggestionTemplate)("ngTemplateOutletContext",n.VKq(2,V,o0))}}function h0(M0,L0){if(1&M0&&n._uU(0),2&M0){const o0=n.oxw().$implicit,L=n.oxw(2);n.Oqu(L.nzValueWith(o0))}}function O1(M0,L0){if(1&M0){const o0=n.EpF();n.TgZ(0,"li",6,7),n.NdJ("click",function(){const d=n.CHM(o0).$implicit,K=n.oxw(2);return n.KtG(K.selectSuggestion(d))}),n.YNc(2,r0,2,4,"ng-container",8),n.YNc(3,h0,1,1,"ng-template",null,9,n.W1O),n.qZA()}if(2&M0){const o0=L0.index,L=n.MAs(4),m=n.oxw(2);n.ekj("ant-mentions-dropdown-menu-item-active",o0===m.activeIndex)("ant-mentions-dropdown-menu-item-selected",o0===m.activeIndex),n.xp6(2),n.Q6J("ngIf",m.suggestionTemplate)("ngIfElse",L)}}function N0(M0,L0){1&M0&&(n.TgZ(0,"span"),n._UZ(1,"span",13),n.qZA())}function H0(M0,L0){if(1&M0&&(n.TgZ(0,"span"),n._UZ(1,"nz-embed-empty",14),n.qZA()),2&M0){const o0=n.oxw(3);n.xp6(1),n.Q6J("specificContent",o0.nzNotFoundContent)}}function e0(M0,L0){if(1&M0&&(n.TgZ(0,"li",11),n.YNc(1,N0,2,0,"span",12),n.YNc(2,H0,2,1,"span",12),n.qZA()),2&M0){const o0=n.oxw(2);n.xp6(1),n.Q6J("ngIf",o0.nzLoading),n.xp6(1),n.Q6J("ngIf",!o0.nzLoading)}}function X0(M0,L0){if(1&M0&&(n.TgZ(0,"div",2)(1,"ul",3),n.YNc(2,O1,5,6,"li",4),n.YNc(3,e0,3,2,"li",5),n.qZA()()),2&M0){const o0=n.oxw();n.xp6(2),n.Q6J("ngForOf",o0.filteredSuggestions),n.xp6(1),n.Q6J("ngIf",0===o0.filteredSuggestions.length)}}function c0(M0,L0){if(1&M0&&n._UZ(0,"nz-form-item-feedback-icon",15),2&M0){const o0=n.oxw();n.Q6J("status",o0.status)}}const b0=["*"];let E0=(()=>{var M0;class L0{}return(M0=L0).\u0275fac=function(L){return new(L||M0)},M0.\u0275dir=n.lG2({type:M0,selectors:[["","nzMentionSuggestion",""]],exportAs:["nzMentionSuggestion"]}),L0})();let U0=(()=>{var M0;class L0{constructor(){this.triggerChange$=new N.x}triggerChanged(){return this.triggerChange$.asObservable()}registerTrigger(L){this.trigger!==L&&(this.trigger=L,this.triggerChange$.next(L))}ngOnDestroy(){this.triggerChange$.complete()}}return(M0=L0).\u0275fac=function(L){return new(L||M0)},M0.\u0275prov=n.Yz7({token:M0,factory:M0.\u0275fac}),L0})();const z1={provide:J.JU,useExisting:(0,n.Gpc)(()=>Q0),multi:!0};let Q0=(()=>{var M0;class L0{constructor(L,m,d,K,g0){this.el=L,this.ngZone=m,this.ref=d,this.destroy$=K,this.nzMentionService=g0,this.onChange=()=>{},this.onTouched=()=>{},this.onFocusin=new n.vpe,this.onBlur=new n.vpe,this.onInput=new n.vpe,this.onKeydown=new n.vpe,this.onClick=new n.vpe}completeEvents(){this.onFocusin.complete(),this.onBlur.complete(),this.onInput.complete(),this.onKeydown.complete(),this.onClick.complete()}focus(L=null){this.el.nativeElement.focus(),this.el.nativeElement.setSelectionRange(L,L)}insertMention(L){const m=this.el.nativeElement.value,d=`${L.mention} `,K=[m.slice(0,L.startPos+1),d,m.slice(L.endPos,m.length)].join("");this.el.nativeElement.value=K,this.focus(L.startPos+d.length+1),this.onChange(K),this.value=K}writeValue(L){this.value=L,this.el.nativeElement.value="string"==typeof L?L:""}registerOnChange(L){this.onChange=L}registerOnTouched(L){this.onTouched=L}ngAfterViewInit(){this.nzMentionService.registerTrigger(this),this.setupEventListener("blur",this.onBlur),this.setupEventListener("focusin",this.onFocusin),this.setupEventListener("input",this.onInput,!0),this.setupEventListener("click",this.onClick,!0),this.setupEventListener("keydown",this.onKeydown,!0)}ngOnDestroy(){this.completeEvents()}setupEventListener(L,m,d=!1){this.ngZone.runOutsideAngular(()=>{(0,S.R)(this.el.nativeElement,L).pipe((0,I.R)(this.destroy$)).subscribe(K=>{m.observers.length&&this.ngZone.run(()=>{m.emit(d?K:void 0),this.ref.markForCheck()})})})}}return(M0=L0).\u0275fac=function(L){return new(L||M0)(n.Y36(n.SBq),n.Y36(n.R0b),n.Y36(n.sBO),n.Y36(R0.kn),n.Y36(U0))},M0.\u0275dir=n.lG2({type:M0,selectors:[["input","nzMentionTrigger",""],["textarea","nzMentionTrigger",""]],hostAttrs:["autocomplete","off"],outputs:{onFocusin:"onFocusin",onBlur:"onBlur",onInput:"onInput",onKeydown:"onKeydown",onClick:"onClick"},exportAs:["nzMentionTrigger"],features:[n._Bn([R0.kn,z1])]}),L0})(),x0=(()=>{var M0;class L0{set suggestionChild(L){L&&(this.suggestionTemplate=L)}get triggerNativeElement(){return this.trigger.el.nativeElement}get focusItemElement(){const L=this.items?.toArray();return L&&L[this.activeIndex]?L[this.activeIndex].nativeElement:null}constructor(L,m,d,K,g0,e1,u1,L1,k1,W0,I0,q0){this.ngZone=L,this.ngDocument=m,this.directionality=d,this.cdr=K,this.overlay=g0,this.viewContainerRef=e1,this.elementRef=u1,this.renderer=L1,this.nzMentionService=k1,this.destroy$=W0,this.nzFormStatusService=I0,this.nzFormNoStatusService=q0,this.nzValueWith=X=>X,this.nzPrefix="@",this.nzLoading=!1,this.nzNotFoundContent="\u65e0\u5339\u914d\u7ed3\u679c\uff0c\u8f7b\u6572\u7a7a\u683c\u5b8c\u6210\u8f93\u5165",this.nzPlacement="bottom",this.nzSuggestions=[],this.nzStatus="",this.nzOnSelect=new n.vpe,this.nzOnSearchChange=new n.vpe,this.isOpen=!1,this.filteredSuggestions=[],this.suggestionTemplate=null,this.activeIndex=-1,this.dir="ltr",this.prefixCls="ant-mentions",this.statusCls={},this.status="",this.hasFeedback=!1,this.previousValue=null,this.cursorMention=null,this.overlayRef=null}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe((0,n0.x)((L,m)=>L.status===m.status&&L.hasFeedback===m.hasFeedback),(0,f0.M)(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:(0,E.of)(!1)),(0,H.U)(([{status:L,hasFeedback:m},d])=>({status:d?"":L,hasFeedback:m})),(0,I.R)(this.destroy$)).subscribe(({status:L,hasFeedback:m})=>{this.setStatusStyles(L,m)}),this.nzMentionService.triggerChanged().subscribe(L=>{this.trigger=L,this.bindTriggerEvents(),this.closeDropdown(),this.overlayRef=null}),this.dir=this.directionality.value,this.directionality.change?.pipe((0,I.R)(this.destroy$)).subscribe(L=>{this.dir=L})}ngOnChanges(L){const{nzSuggestions:m,nzStatus:d}=L;m&&this.isOpen&&(this.previousValue=null,this.activeIndex=-1,this.resetDropdown(!1)),d&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}ngAfterViewInit(){this.items.changes.pipe((0,j0.O)(this.items),(0,Z0.w)(()=>{const L=this.items.toArray();return new t.y(m=>this.ngZone.runOutsideAngular(()=>(0,v0.T)(...L.map(d=>(0,S.R)(d.nativeElement,"mousedown"))).subscribe(m)))})).subscribe(L=>{L.preventDefault()})}ngOnDestroy(){this.closeDropdown()}closeDropdown(){this.overlayRef&&this.overlayRef.hasAttached()&&(this.overlayRef.detach(),this.overlayOutsideClickSubscription.unsubscribe(),this.isOpen=!1,this.cdr.markForCheck())}openDropdown(){this.attachOverlay(),this.isOpen=!0,this.cdr.markForCheck()}getMentions(){return this.trigger?(0,Z.qR)(this.trigger.value,this.nzPrefix):[]}selectSuggestion(L){const m=this.nzValueWith(L);this.trigger.insertMention({mention:m,startPos:this.cursorMentionStart,endPos:this.cursorMentionEnd}),this.nzOnSelect.emit(L),this.closeDropdown(),this.activeIndex=-1}handleInput(L){const m=L.target;this.trigger.onChange(m.value),this.trigger.value=m.value,this.resetDropdown()}handleKeydown(L){const m=L.keyCode;if(this.isOpen&&m===T0.K5&&-1!==this.activeIndex&&this.filteredSuggestions.length)this.selectSuggestion(this.filteredSuggestions[this.activeIndex]),L.preventDefault();else if(m===T0.oh||m===T0.SV)this.resetDropdown(),L.stopPropagation();else{if(this.isOpen&&(m===T0.Mf||m===T0.hY))return void this.closeDropdown();this.isOpen&&m===T0.LH&&(this.setPreviousItemActive(),L.preventDefault(),L.stopPropagation()),this.isOpen&&m===T0.JH&&(this.setNextItemActive(),L.preventDefault(),L.stopPropagation())}}handleClick(){this.resetDropdown()}bindTriggerEvents(){this.trigger.onInput.subscribe(L=>this.handleInput(L)),this.trigger.onKeydown.subscribe(L=>this.handleKeydown(L)),this.trigger.onClick.subscribe(()=>this.handleClick())}suggestionsFilter(L,m){const d=L.substring(1);if(this.previousValue===L&&L!==this.cursorMention[0])return;this.previousValue=L,m&&this.nzOnSearchChange.emit({value:this.cursorMention.substring(1),prefix:this.cursorMention[0]});const K=d.toLowerCase();this.filteredSuggestions=this.nzSuggestions.filter(g0=>this.nzValueWith(g0).toLowerCase().includes(K))}resetDropdown(L=!0){if(this.resetCursorMention(),"string"!=typeof this.cursorMention||!this.canOpen())return void this.closeDropdown();this.suggestionsFilter(this.cursorMention,L);const m=this.filteredSuggestions.indexOf(this.cursorMention.substring(1));this.activeIndex=m>=0?m:0,this.openDropdown()}setNextItemActive(){this.activeIndex=this.activeIndex+1<=this.filteredSuggestions.length-1?this.activeIndex+1:0,this.cdr.markForCheck(),this.scrollToFocusItem()}setPreviousItemActive(){this.activeIndex=this.activeIndex-1<0?this.filteredSuggestions.length-1:this.activeIndex-1,this.cdr.markForCheck(),this.scrollToFocusItem()}scrollToFocusItem(){this.focusItemElement&&this.focusItemElement.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}canOpen(){const L=this.triggerNativeElement;return!L.readOnly&&!L.disabled}resetCursorMention(){const L=this.triggerNativeElement.value.replace(/[\r\n]/g," ")||"",m=this.triggerNativeElement.selectionStart,d="string"==typeof this.nzPrefix?[this.nzPrefix]:this.nzPrefix;let K=d.length;for(;K>=0;){const g0=L.lastIndexOf(d[K],m),e1=L.indexOf(" ",m)>-1?L.indexOf(" ",m):L.length,u1=L.substring(g0,e1);if(!(g0>0&&" "!==L[g0-1]||g0<0||u1.includes(d[K],1)||u1.includes(" ")))return this.cursorMention=u1,this.cursorMentionStart=g0,void(this.cursorMentionEnd=e1);this.cursorMention=null,this.cursorMentionStart=-1,this.cursorMentionEnd=-1,K--}}updatePositions(){const L=(0,Z.Ly)(this.triggerNativeElement,this.cursorMentionStart),m=L.top-this.triggerNativeElement.getBoundingClientRect().height-this.triggerNativeElement.scrollTop+("bottom"===this.nzPlacement?L.height-6:-6);this.positionStrategy.withDefaultOffsetX(L.left-this.triggerNativeElement.scrollLeft).withDefaultOffsetY(m),"bottom"===this.nzPlacement&&this.positionStrategy.withPositions([...A0.fG]),"top"===this.nzPlacement&&this.positionStrategy.withPositions([...A0.A7]),this.positionStrategy.apply()}subscribeOverlayOutsideClick(){const L=d=>{const K=d.target;return this.isOpen&&K!==this.trigger.el.nativeElement&&!this.overlayRef?.overlayElement.contains(K)},m=new a0.w0;return m.add(this.overlayRef.outsidePointerEvents().subscribe(d=>L(d)&&this.closeDropdown())),m.add(this.ngZone.runOutsideAngular(()=>(0,S.R)(this.ngDocument,"touchend").subscribe(d=>L(d)&&this.ngZone.run(()=>this.closeDropdown())))),m}attachOverlay(){this.overlayRef||(this.portal=new D0.UE(this.suggestionsTemp,this.viewContainerRef),this.overlayRef=this.overlay.create(this.getOverlayConfig())),this.overlayRef&&!this.overlayRef.hasAttached()&&(this.overlayRef.attach(this.portal),this.overlayOutsideClickSubscription=this.subscribeOverlayOutsideClick()),this.updatePositions()}getOverlayConfig(){return new e.X_({positionStrategy:this.getOverlayPosition(),scrollStrategy:this.overlay.scrollStrategies.reposition(),disposeOnNavigation:!0})}getOverlayPosition(){const L=[new e.tR({originX:"start",originY:"bottom"},{overlayX:"start",overlayY:"top"}),new e.tR({originX:"start",originY:"top"},{overlayX:"start",overlayY:"bottom"})];return this.positionStrategy=this.overlay.position().flexibleConnectedTo(this.trigger.el).withPositions(L).withFlexibleDimensions(!1).withPush(!1),this.positionStrategy}setStatusStyles(L,m){this.status=L,this.hasFeedback=m,this.cdr.markForCheck(),this.statusCls=(0,Z.Zu)(this.prefixCls,L,m),Object.keys(this.statusCls).forEach(d=>{this.statusCls[d]?this.renderer.addClass(this.elementRef.nativeElement,d):this.renderer.removeClass(this.elementRef.nativeElement,d)})}}return(M0=L0).\u0275fac=function(L){return new(L||M0)(n.Y36(n.R0b),n.Y36(c.K0,8),n.Y36(M.Is,8),n.Y36(n.sBO),n.Y36(e.aV),n.Y36(n.s_b),n.Y36(n.SBq),n.Y36(n.Qsj),n.Y36(U0),n.Y36(R0.kn),n.Y36(B.kH,8),n.Y36(B.yW,8))},M0.\u0275cmp=n.Xpm({type:M0,selectors:[["nz-mention"]],contentQueries:function(L,m,d){if(1&L&&n.Suo(d,E0,5,n.Rgc),2&L){let K;n.iGM(K=n.CRH())&&(m.suggestionChild=K.first)}},viewQuery:function(L,m){if(1&L&&(n.Gf(n.Rgc,5),n.Gf(p0,5,n.SBq)),2&L){let d;n.iGM(d=n.CRH())&&(m.suggestionsTemp=d.first),n.iGM(d=n.CRH())&&(m.items=d)}},hostAttrs:[1,"ant-mentions"],hostVars:2,hostBindings:function(L,m){2&L&&n.ekj("ant-mentions-rtl","rtl"===m.dir)},inputs:{nzValueWith:"nzValueWith",nzPrefix:"nzPrefix",nzLoading:"nzLoading",nzNotFoundContent:"nzNotFoundContent",nzPlacement:"nzPlacement",nzSuggestions:"nzSuggestions",nzStatus:"nzStatus"},outputs:{nzOnSelect:"nzOnSelect",nzOnSearchChange:"nzOnSearchChange"},exportAs:["nzMention"],features:[n._Bn([U0,R0.kn]),n.TTD],ngContentSelectors:b0,decls:4,vars:1,consts:[["suggestions",""],["class","ant-mentions-suffix",3,"status",4,"ngIf"],[1,"ant-mentions-dropdown"],["role","menu","tabindex","0",1,"ant-mentions-dropdown-menu"],["class","ant-mentions-dropdown-menu-item","role","menuitem","tabindex","-1",3,"ant-mentions-dropdown-menu-item-active","ant-mentions-dropdown-menu-item-selected","click",4,"ngFor","ngForOf"],["class","ant-mentions-dropdown-menu-item ant-mentions-dropdown-menu-item-disabled",4,"ngIf"],["role","menuitem","tabindex","-1",1,"ant-mentions-dropdown-menu-item",3,"click"],["items",""],[4,"ngIf","ngIfElse"],["defaultSuggestion",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ant-mentions-dropdown-menu-item","ant-mentions-dropdown-menu-item-disabled"],[4,"ngIf"],["nz-icon","","nzType","loading"],["nzComponentName","select",3,"specificContent"],[1,"ant-mentions-suffix",3,"status"]],template:function(L,m){1&L&&(n.F$t(),n.Hsn(0),n.YNc(1,X0,4,2,"ng-template",null,0,n.W1O),n.YNc(3,c0,1,1,"nz-form-item-feedback-icon",1)),2&L&&(n.xp6(3),n.Q6J("ngIf",m.hasFeedback&&!!m.status))},dependencies:[c.sg,c.O5,c.tP,v.Ls,g.gB,B.w_],encapsulation:2,changeDetection:0}),(0,p1.gn)([(0,Z.yF)()],L0.prototype,"nzLoading",void 0),L0})(),h1=(()=>{var M0;class L0{}return(M0=L0).\u0275fac=function(L){return new(L||M0)},M0.\u0275mod=n.oAB({type:M0}),M0.\u0275inj=n.cJS({imports:[M.vT,c.ez,J.u5,e.U8,v.PV,g.Xo,B.mJ]}),L0})()},57417:(r1,S0,s)=>{"use strict";s.d(S0,{$6:()=>Z0,lU:()=>H});var M=s(97582),e=s(65879),c=s(64194),n=s(40874),J=s(27754),B=s(96109),g=s(331),v=s(49388),N=s(96814),S=s(69594),E=s(8324),t=s(85448);function v0(R0,p1){if(1&R0&&(e.ynx(0),e._uU(1),e.BQk()),2&R0){const T0=e.oxw(3);e.xp6(1),e.Oqu(T0.nzTitle)}}function a0(R0,p1){if(1&R0&&(e.TgZ(0,"div",10),e.YNc(1,v0,2,1,"ng-container",9),e.qZA()),2&R0){const T0=e.oxw(2);e.xp6(1),e.Q6J("nzStringTemplateOutlet",T0.nzTitle)}}function I(R0,p1){if(1&R0&&(e.ynx(0),e._uU(1),e.BQk()),2&R0){const T0=e.oxw(2);e.xp6(1),e.Oqu(T0.nzContent)}}function n0(R0,p1){if(1&R0&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div",4),e._UZ(3,"span",5),e.qZA(),e.TgZ(4,"div",6)(5,"div"),e.YNc(6,a0,2,1,"div",7),e.TgZ(7,"div",8),e.YNc(8,I,2,1,"ng-container",9),e.qZA()()()()()),2&R0){const T0=e.oxw();e.ekj("ant-popover-rtl","rtl"===T0.dir),e.Q6J("ngClass",T0._classMap)("ngStyle",T0.nzOverlayStyle)("@.disabled",!(null==T0.noAnimation||!T0.noAnimation.nzNoAnimation))("nzNoAnimation",null==T0.noAnimation?null:T0.noAnimation.nzNoAnimation)("@zoomBigMotion","active"),e.xp6(6),e.Q6J("ngIf",T0.nzTitle),e.xp6(2),e.Q6J("nzStringTemplateOutlet",T0.nzContent)}}let H=(()=>{var R0;class p1 extends B.Mg{getProxyPropertyMap(){return{nzPopoverBackdrop:["nzBackdrop",()=>this.nzPopoverBackdrop],...super.getProxyPropertyMap()}}constructor(D0,A0,Z,p0,Q,V){super(D0,A0,Z,p0,Q,V),this._nzModuleName="popover",this.trigger="hover",this.placement="top",this.nzPopoverBackdrop=!1,this.visibleChange=new e.vpe,this.componentRef=this.hostView.createComponent(j0)}}return(R0=p1).\u0275fac=function(D0){return new(D0||R0)(e.Y36(e.SBq),e.Y36(e.s_b),e.Y36(e._Vd),e.Y36(e.Qsj),e.Y36(g.P,9),e.Y36(n.jY))},R0.\u0275dir=e.lG2({type:R0,selectors:[["","nz-popover",""]],hostVars:2,hostBindings:function(D0,A0){2&D0&&e.ekj("ant-popover-open",A0.visible)},inputs:{arrowPointAtCenter:["nzPopoverArrowPointAtCenter","arrowPointAtCenter"],title:["nzPopoverTitle","title"],content:["nzPopoverContent","content"],directiveTitle:["nz-popover","directiveTitle"],trigger:["nzPopoverTrigger","trigger"],placement:["nzPopoverPlacement","placement"],origin:["nzPopoverOrigin","origin"],visible:["nzPopoverVisible","visible"],mouseEnterDelay:["nzPopoverMouseEnterDelay","mouseEnterDelay"],mouseLeaveDelay:["nzPopoverMouseLeaveDelay","mouseLeaveDelay"],overlayClassName:["nzPopoverOverlayClassName","overlayClassName"],overlayStyle:["nzPopoverOverlayStyle","overlayStyle"],nzPopoverBackdrop:"nzPopoverBackdrop"},outputs:{visibleChange:"nzPopoverVisibleChange"},exportAs:["nzPopover"],features:[e.qOj]}),(0,M.gn)([(0,J.yF)()],p1.prototype,"arrowPointAtCenter",void 0),(0,M.gn)([(0,n.oS)()],p1.prototype,"nzPopoverBackdrop",void 0),p1})(),j0=(()=>{var R0;class p1 extends B.XK{constructor(D0,A0,Z){super(D0,A0,Z),this._prefix="ant-popover"}get hasBackdrop(){return"click"===this.nzTrigger&&this.nzBackdrop}isEmpty(){return(0,B.pu)(this.nzTitle)&&(0,B.pu)(this.nzContent)}}return(R0=p1).\u0275fac=function(D0){return new(D0||R0)(e.Y36(e.sBO),e.Y36(v.Is,8),e.Y36(g.P,9))},R0.\u0275cmp=e.Xpm({type:R0,selectors:[["nz-popover"]],exportAs:["nzPopoverComponent"],features:[e.qOj],decls:2,vars:6,consts:[["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayOrigin","cdkConnectedOverlayPositions","cdkConnectedOverlayOpen","cdkConnectedOverlayPush","nzArrowPointAtCenter","overlayOutsideClick","detach","positionChange"],["overlay","cdkConnectedOverlay"],[1,"ant-popover",3,"ngClass","ngStyle","nzNoAnimation"],[1,"ant-popover-content"],[1,"ant-popover-arrow"],[1,"ant-popover-arrow-content"],["role","tooltip",1,"ant-popover-inner"],["class","ant-popover-title",4,"ngIf"],[1,"ant-popover-inner-content"],[4,"nzStringTemplateOutlet"],[1,"ant-popover-title"]],template:function(D0,A0){1&D0&&(e.YNc(0,n0,9,9,"ng-template",0,1,e.W1O),e.NdJ("overlayOutsideClick",function(p0){return A0.onClickOutside(p0)})("detach",function(){return A0.hide()})("positionChange",function(p0){return A0.onPositionChange(p0)})),2&D0&&e.Q6J("cdkConnectedOverlayHasBackdrop",A0.hasBackdrop)("cdkConnectedOverlayOrigin",A0.origin)("cdkConnectedOverlayPositions",A0._positions)("cdkConnectedOverlayOpen",A0._visible)("cdkConnectedOverlayPush",!0)("nzArrowPointAtCenter",A0.nzArrowPointAtCenter)},dependencies:[N.mk,N.O5,N.PC,S.pI,E.f,t.hQ,g.P],encapsulation:2,data:{animation:[c.$C]},changeDetection:0}),p1})(),Z0=(()=>{var R0;class p1{}return(R0=p1).\u0275fac=function(D0){return new(D0||R0)},R0.\u0275mod=e.oAB({type:R0}),R0.\u0275inj=e.cJS({imports:[v.vT,N.ez,S.U8,E.T,t.e4,g.g,B.cg]}),p1})()},96494:(r1,S0,s)=>{"use strict";s.d(S0,{i:()=>T0,m:()=>D0});var M=s(97582),e=s(36028),c=s(65879),n=s(60095),J=s(78645),B=s(92438),g=s(59773),v=s(40874),N=s(27754),S=s(4300),E=s(49388),t=s(96814),v0=s(41958),a0=s(62595),I=s(8324);const n0=["switchElement"];function f0(A0,Z){1&A0&&c._UZ(0,"span",8)}function H(A0,Z){if(1&A0&&(c.ynx(0),c._uU(1),c.BQk()),2&A0){const p0=c.oxw(2);c.xp6(1),c.Oqu(p0.nzCheckedChildren)}}function j0(A0,Z){if(1&A0&&(c.ynx(0),c.YNc(1,H,2,1,"ng-container",9),c.BQk()),2&A0){const p0=c.oxw();c.xp6(1),c.Q6J("nzStringTemplateOutlet",p0.nzCheckedChildren)}}function Z0(A0,Z){if(1&A0&&(c.ynx(0),c._uU(1),c.BQk()),2&A0){const p0=c.oxw(2);c.xp6(1),c.Oqu(p0.nzUnCheckedChildren)}}function R0(A0,Z){if(1&A0&&c.YNc(0,Z0,2,1,"ng-container",9),2&A0){const p0=c.oxw();c.Q6J("nzStringTemplateOutlet",p0.nzUnCheckedChildren)}}let T0=(()=>{var A0;class Z{updateValue(Q){this.isChecked!==Q&&(this.isChecked=Q,this.onChange(this.isChecked))}focus(){this.focusMonitor.focusVia(this.switchElement.nativeElement,"keyboard")}blur(){this.switchElement.nativeElement.blur()}constructor(Q,V,r0,h0,O1,N0){this.nzConfigService=Q,this.host=V,this.ngZone=r0,this.cdr=h0,this.focusMonitor=O1,this.directionality=N0,this._nzModuleName="switch",this.isChecked=!1,this.onChange=()=>{},this.onTouched=()=>{},this.nzLoading=!1,this.nzDisabled=!1,this.nzControl=!1,this.nzCheckedChildren=null,this.nzUnCheckedChildren=null,this.nzSize="default",this.nzId=null,this.dir="ltr",this.destroy$=new J.x,this.isNzDisableFirstChange=!0}ngOnInit(){this.directionality.change.pipe((0,g.R)(this.destroy$)).subscribe(Q=>{this.dir=Q,this.cdr.detectChanges()}),this.dir=this.directionality.value,this.ngZone.runOutsideAngular(()=>{(0,B.R)(this.host.nativeElement,"click").pipe((0,g.R)(this.destroy$)).subscribe(Q=>{Q.preventDefault(),!(this.nzControl||this.nzDisabled||this.nzLoading)&&this.ngZone.run(()=>{this.updateValue(!this.isChecked),this.cdr.markForCheck()})}),(0,B.R)(this.switchElement.nativeElement,"keydown").pipe((0,g.R)(this.destroy$)).subscribe(Q=>{if(this.nzControl||this.nzDisabled||this.nzLoading)return;const{keyCode:V}=Q;V!==e.oh&&V!==e.SV&&V!==e.L_&&V!==e.K5||(Q.preventDefault(),this.ngZone.run(()=>{V===e.oh?this.updateValue(!1):V===e.SV?this.updateValue(!0):(V===e.L_||V===e.K5)&&this.updateValue(!this.isChecked),this.cdr.markForCheck()}))})})}ngAfterViewInit(){this.focusMonitor.monitor(this.switchElement.nativeElement,!0).pipe((0,g.R)(this.destroy$)).subscribe(Q=>{Q||Promise.resolve().then(()=>this.onTouched())})}ngOnDestroy(){this.focusMonitor.stopMonitoring(this.switchElement.nativeElement),this.destroy$.next(),this.destroy$.complete()}writeValue(Q){this.isChecked=Q,this.cdr.markForCheck()}registerOnChange(Q){this.onChange=Q}registerOnTouched(Q){this.onTouched=Q}setDisabledState(Q){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||Q,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}}return(A0=Z).\u0275fac=function(Q){return new(Q||A0)(c.Y36(v.jY),c.Y36(c.SBq),c.Y36(c.R0b),c.Y36(c.sBO),c.Y36(S.tE),c.Y36(E.Is,8))},A0.\u0275cmp=c.Xpm({type:A0,selectors:[["nz-switch"]],viewQuery:function(Q,V){if(1&Q&&c.Gf(n0,7),2&Q){let r0;c.iGM(r0=c.CRH())&&(V.switchElement=r0.first)}},inputs:{nzLoading:"nzLoading",nzDisabled:"nzDisabled",nzControl:"nzControl",nzCheckedChildren:"nzCheckedChildren",nzUnCheckedChildren:"nzUnCheckedChildren",nzSize:"nzSize",nzId:"nzId"},exportAs:["nzSwitch"],features:[c._Bn([{provide:n.JU,useExisting:(0,c.Gpc)(()=>A0),multi:!0}])],decls:9,vars:16,consts:[["nz-wave","","type","button",1,"ant-switch",3,"disabled","nzWaveExtraNode"],["switchElement",""],[1,"ant-switch-handle"],["nz-icon","","nzType","loading","class","ant-switch-loading-icon",4,"ngIf"],[1,"ant-switch-inner"],[4,"ngIf","ngIfElse"],["uncheckTemplate",""],[1,"ant-click-animating-node"],["nz-icon","","nzType","loading",1,"ant-switch-loading-icon"],[4,"nzStringTemplateOutlet"]],template:function(Q,V){if(1&Q&&(c.TgZ(0,"button",0,1)(2,"span",2),c.YNc(3,f0,1,0,"span",3),c.qZA(),c.TgZ(4,"span",4),c.YNc(5,j0,2,1,"ng-container",5),c.YNc(6,R0,1,1,"ng-template",null,6,c.W1O),c.qZA(),c._UZ(8,"div",7),c.qZA()),2&Q){const r0=c.MAs(7);c.ekj("ant-switch-checked",V.isChecked)("ant-switch-loading",V.nzLoading)("ant-switch-disabled",V.nzDisabled)("ant-switch-small","small"===V.nzSize)("ant-switch-rtl","rtl"===V.dir),c.Q6J("disabled",V.nzDisabled)("nzWaveExtraNode",!0),c.uIk("id",V.nzId),c.xp6(3),c.Q6J("ngIf",V.nzLoading),c.xp6(2),c.Q6J("ngIf",V.isChecked)("ngIfElse",r0)}},dependencies:[t.O5,v0.dQ,a0.Ls,I.f],encapsulation:2,changeDetection:0}),(0,M.gn)([(0,N.yF)()],Z.prototype,"nzLoading",void 0),(0,M.gn)([(0,N.yF)()],Z.prototype,"nzDisabled",void 0),(0,M.gn)([(0,N.yF)()],Z.prototype,"nzControl",void 0),(0,M.gn)([(0,v.oS)()],Z.prototype,"nzSize",void 0),Z})(),D0=(()=>{var A0;class Z{}return(A0=Z).\u0275fac=function(Q){return new(Q||A0)},A0.\u0275mod=c.oAB({type:A0}),A0.\u0275inj=c.cJS({imports:[E.vT,t.ez,v0.vG,a0.PV,I.T]}),Z})()},60047:(r1,S0,s)=>{"use strict";s.d(S0,{Iv:()=>e1,m4:()=>L1,wY:()=>k1});var M=s(97582),e=s(69594),c=s(65879),n=s(60095),J=s(78645),B=s(92438),g=s(22096),v=s(59773),N=s(93997),S=s(42460),E=s(37398),t=s(34338),v0=s(64194),a0=s(40874),I=s(1608),n0=s(27754),f0=s(64345),H=s(62831),j0=s(49388),Z0=s(50883),R0=s(96814),p1=s(62595),T0=s(85448),D0=s(8324),A0=s(70855),Z=s(56879),p0=s(42840),Q=s(41958);const V=["hourListElement"],r0=["minuteListElement"],h0=["secondListElement"],O1=["use12HoursListElement"];function N0(W0,I0){if(1&W0&&(c.TgZ(0,"div",4)(1,"div",5),c._uU(2),c.qZA()()),2&W0){const q0=c.oxw();c.xp6(2),c.Oqu(q0.dateHelper.format(null==q0.time?null:q0.time.value,q0.format)||"\xa0")}}function H0(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"li",10),c.NdJ("click",function(){c.CHM(q0);const z0=c.oxw().$implicit,F0=c.oxw(2);return c.KtG(F0.selectHour(z0))}),c.TgZ(1,"div",11),c._uU(2),c.ALo(3,"number"),c.qZA()()}if(2&W0){const q0=c.oxw().$implicit,X=c.oxw(2);c.ekj("ant-picker-time-panel-cell-selected",X.isSelectedHour(q0))("ant-picker-time-panel-cell-disabled",q0.disabled),c.xp6(2),c.Oqu(c.xi3(3,5,q0.index,"2.0-0"))}}function e0(W0,I0){if(1&W0&&(c.ynx(0),c.YNc(1,H0,4,8,"li",9),c.BQk()),2&W0){const q0=I0.$implicit,X=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!(X.nzHideDisabledOptions&&q0.disabled))}}function X0(W0,I0){if(1&W0&&(c.TgZ(0,"ul",6,7),c.YNc(2,e0,2,1,"ng-container",8),c.qZA()),2&W0){const q0=c.oxw();c.xp6(2),c.Q6J("ngForOf",q0.hourRange)("ngForTrackBy",q0.trackByFn)}}function c0(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"li",10),c.NdJ("click",function(){c.CHM(q0);const z0=c.oxw().$implicit,F0=c.oxw(2);return c.KtG(F0.selectMinute(z0))}),c.TgZ(1,"div",11),c._uU(2),c.ALo(3,"number"),c.qZA()()}if(2&W0){const q0=c.oxw().$implicit,X=c.oxw(2);c.ekj("ant-picker-time-panel-cell-selected",X.isSelectedMinute(q0))("ant-picker-time-panel-cell-disabled",q0.disabled),c.xp6(2),c.Oqu(c.xi3(3,5,q0.index,"2.0-0"))}}function b0(W0,I0){if(1&W0&&(c.ynx(0),c.YNc(1,c0,4,8,"li",9),c.BQk()),2&W0){const q0=I0.$implicit,X=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!(X.nzHideDisabledOptions&&q0.disabled))}}function E0(W0,I0){if(1&W0&&(c.TgZ(0,"ul",6,12),c.YNc(2,b0,2,1,"ng-container",8),c.qZA()),2&W0){const q0=c.oxw();c.xp6(2),c.Q6J("ngForOf",q0.minuteRange)("ngForTrackBy",q0.trackByFn)}}function B0(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"li",10),c.NdJ("click",function(){c.CHM(q0);const z0=c.oxw().$implicit,F0=c.oxw(2);return c.KtG(F0.selectSecond(z0))}),c.TgZ(1,"div",11),c._uU(2),c.ALo(3,"number"),c.qZA()()}if(2&W0){const q0=c.oxw().$implicit,X=c.oxw(2);c.ekj("ant-picker-time-panel-cell-selected",X.isSelectedSecond(q0))("ant-picker-time-panel-cell-disabled",q0.disabled),c.xp6(2),c.Oqu(c.xi3(3,5,q0.index,"2.0-0"))}}function U0(W0,I0){if(1&W0&&(c.ynx(0),c.YNc(1,B0,4,8,"li",9),c.BQk()),2&W0){const q0=I0.$implicit,X=c.oxw(2);c.xp6(1),c.Q6J("ngIf",!(X.nzHideDisabledOptions&&q0.disabled))}}function z1(W0,I0){if(1&W0&&(c.TgZ(0,"ul",6,13),c.YNc(2,U0,2,1,"ng-container",8),c.qZA()),2&W0){const q0=c.oxw();c.xp6(2),c.Q6J("ngForOf",q0.secondRange)("ngForTrackBy",q0.trackByFn)}}function Q0(W0,I0){if(1&W0){const q0=c.EpF();c.ynx(0),c.TgZ(1,"li",10),c.NdJ("click",function(){const F0=c.CHM(q0).$implicit,l1=c.oxw(2);return c.KtG(l1.select12Hours(F0))}),c.TgZ(2,"div",11),c._uU(3),c.qZA()(),c.BQk()}if(2&W0){const q0=I0.$implicit,X=c.oxw(2);c.xp6(1),c.ekj("ant-picker-time-panel-cell-selected",X.isSelected12Hours(q0)),c.xp6(2),c.Oqu(q0.value)}}function x0(W0,I0){if(1&W0&&(c.TgZ(0,"ul",6,14),c.YNc(2,Q0,4,3,"ng-container",15),c.qZA()),2&W0){const q0=c.oxw();c.xp6(2),c.Q6J("ngForOf",q0.use12HoursRange)}}function n1(W0,I0){}function h1(W0,I0){if(1&W0&&(c.TgZ(0,"div",23),c.YNc(1,n1,0,0,"ng-template",24),c.qZA()),2&W0){const q0=c.oxw(2);c.xp6(1),c.Q6J("ngTemplateOutlet",q0.nzAddOn)}}function M0(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"div",16),c.YNc(1,h1,2,1,"div",17),c.TgZ(2,"ul",18)(3,"li",19)(4,"a",20),c.NdJ("click",function(){c.CHM(q0);const z0=c.oxw();return c.KtG(z0.onClickNow())}),c._uU(5),c.ALo(6,"nzI18n"),c.qZA()(),c.TgZ(7,"li",21)(8,"button",22),c.NdJ("click",function(){c.CHM(q0);const z0=c.oxw();return c.KtG(z0.onClickOk())}),c._uU(9),c.ALo(10,"nzI18n"),c.qZA()()()()}if(2&W0){const q0=c.oxw();c.xp6(1),c.Q6J("ngIf",q0.nzAddOn),c.xp6(4),c.hij(" ",q0.nzNowText||c.lcZ(6,3,"Calendar.lang.now")," "),c.xp6(4),c.hij(" ",q0.nzOkText||c.lcZ(10,5,"Calendar.lang.ok")," ")}}const L0=["inputElement"];function o0(W0,I0){if(1&W0&&(c.ynx(0),c._UZ(1,"span",8),c.BQk()),2&W0){const q0=I0.$implicit;c.xp6(1),c.Q6J("nzType",q0)}}function L(W0,I0){if(1&W0&&c._UZ(0,"nz-form-item-feedback-icon",9),2&W0){const q0=c.oxw();c.Q6J("status",q0.status)}}function m(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"span",10),c.NdJ("click",function(z0){c.CHM(q0);const F0=c.oxw();return c.KtG(F0.onClickClearBtn(z0))}),c._UZ(1,"span",11),c.qZA()}if(2&W0){const q0=c.oxw();c.xp6(1),c.uIk("aria-label",q0.nzClearText)("title",q0.nzClearText)}}function d(W0,I0){if(1&W0){const q0=c.EpF();c.TgZ(0,"div",12)(1,"div",13)(2,"div",14)(3,"nz-time-picker-panel",15),c.NdJ("ngModelChange",function(z0){c.CHM(q0);const F0=c.oxw();return c.KtG(F0.value=z0)})("ngModelChange",function(z0){c.CHM(q0);const F0=c.oxw();return c.KtG(F0.onPanelValueChange(z0))})("closePanel",function(){c.CHM(q0);const z0=c.oxw();return c.KtG(z0.closePanel())}),c.ALo(4,"async"),c.qZA()()()()}if(2&W0){const q0=c.oxw();c.Q6J("@slideMotion","enter"),c.xp6(3),c.Q6J("ngClass",q0.nzPopupClassName)("format",q0.nzFormat)("nzHourStep",q0.nzHourStep)("nzMinuteStep",q0.nzMinuteStep)("nzSecondStep",q0.nzSecondStep)("nzDisabledHours",q0.nzDisabledHours)("nzDisabledMinutes",q0.nzDisabledMinutes)("nzDisabledSeconds",q0.nzDisabledSeconds)("nzPlaceHolder",q0.nzPlaceHolder||c.lcZ(4,19,q0.i18nPlaceHolder$))("nzHideDisabledOptions",q0.nzHideDisabledOptions)("nzUse12Hours",q0.nzUse12Hours)("nzDefaultOpenValue",q0.nzDefaultOpenValue)("nzAddOn",q0.nzAddOn)("nzClearText",q0.nzClearText)("nzNowText",q0.nzNowText)("nzOkText",q0.nzOkText)("nzAllowEmpty",q0.nzAllowEmpty)("ngModel",q0.value)}}class K{setMinutes(I0,q0){return q0||(this.initValue(),this.value.setMinutes(I0),this.update()),this}setHours(I0,q0){return q0||(this.initValue(),this.value.setHours(this._use12Hours?"PM"===this.selected12Hours&&12!==I0?I0+12:"AM"===this.selected12Hours&&12===I0?0:I0:I0),this.update()),this}setSeconds(I0,q0){return q0||(this.initValue(),this.value.setSeconds(I0),this.update()),this}setUse12Hours(I0){return this._use12Hours=I0,this}get changes(){return this._changes.asObservable()}setValue(I0,q0){return(0,n0.DX)(q0)&&(this._use12Hours=q0),I0!==this.value&&(this._value=I0,(0,n0.DX)(this.value)?this._use12Hours&&(0,n0.DX)(this.hours)&&(this.selected12Hours=this.hours>=12?"PM":"AM"):this._clear()),this}initValue(){(0,n0.kK)(this.value)&&this.setValue(new Date,this._use12Hours)}clear(){this._clear(),this.update()}get isEmpty(){return!((0,n0.DX)(this.hours)||(0,n0.DX)(this.minutes)||(0,n0.DX)(this.seconds))}_clear(){this._value=void 0,this.selected12Hours=void 0}update(){this.isEmpty?this._value=void 0:((0,n0.DX)(this.hours)&&this.value.setHours(this.hours),(0,n0.DX)(this.minutes)&&this.value.setMinutes(this.minutes),(0,n0.DX)(this.seconds)&&this.value.setSeconds(this.seconds),this._use12Hours&&("PM"===this.selected12Hours&&this.hours<12&&this.value.setHours(this.hours+12),"AM"===this.selected12Hours&&this.hours>=12&&this.value.setHours(this.hours-12))),this.changed()}changed(){this._changes.next(this.value)}get viewHours(){return this._use12Hours&&(0,n0.DX)(this.hours)?this.calculateViewHour(this.hours):this.hours}setSelected12Hours(I0){I0.toUpperCase()!==this.selected12Hours&&(this.selected12Hours=I0.toUpperCase(),this.update())}get value(){return this._value||this._defaultOpenValue}get hours(){return this.value?.getHours()}get minutes(){return this.value?.getMinutes()}get seconds(){return this.value?.getSeconds()}setDefaultOpenValue(I0){return this._defaultOpenValue=I0,this}constructor(){this.selected12Hours=void 0,this._use12Hours=!1,this._changes=new J.x}calculateViewHour(I0){const q0=this.selected12Hours;return"PM"===q0&&I0>12?I0-12:"AM"===q0&&0===I0?12:I0}}function g0(W0,I0=1,q0=0){return new Array(Math.ceil(W0/I0)).fill(0).map((X,z0)=>(z0+q0)*I0)}let e1=(()=>{var W0;class I0{set nzAllowEmpty(X){(0,n0.DX)(X)&&(this._allowEmpty=X)}get nzAllowEmpty(){return this._allowEmpty}set nzDisabledHours(X){this._disabledHours=X,this._disabledHours&&this.buildHours()}get nzDisabledHours(){return this._disabledHours}set nzDisabledMinutes(X){(0,n0.DX)(X)&&(this._disabledMinutes=X,this.buildMinutes())}get nzDisabledMinutes(){return this._disabledMinutes}set nzDisabledSeconds(X){(0,n0.DX)(X)&&(this._disabledSeconds=X,this.buildSeconds())}get nzDisabledSeconds(){return this._disabledSeconds}set format(X){if((0,n0.DX)(X)){this._format=X,this.enabledColumns=0;const z0=new Set(X);this.hourEnabled=z0.has("H")||z0.has("h"),this.minuteEnabled=z0.has("m"),this.secondEnabled=z0.has("s"),this.hourEnabled&&this.enabledColumns++,this.minuteEnabled&&this.enabledColumns++,this.secondEnabled&&this.enabledColumns++,this.nzUse12Hours&&this.build12Hours()}}get format(){return this._format}set nzHourStep(X){(0,n0.DX)(X)&&(this._nzHourStep=X,this.buildHours())}get nzHourStep(){return this._nzHourStep}set nzMinuteStep(X){(0,n0.DX)(X)&&(this._nzMinuteStep=X,this.buildMinutes())}get nzMinuteStep(){return this._nzMinuteStep}set nzSecondStep(X){(0,n0.DX)(X)&&(this._nzSecondStep=X,this.buildSeconds())}get nzSecondStep(){return this._nzSecondStep}trackByFn(X){return X}buildHours(){let X=24,z0=this.nzDisabledHours?.(),F0=0;if(this.nzUse12Hours&&(X=12,z0&&(z0="PM"===this.time.selected12Hours?z0.filter(l1=>l1>=12).map(l1=>l1>12?l1-12:l1):z0.filter(l1=>l1<12||24===l1).map(l1=>24===l1||0===l1?12:l1)),F0=1),this.hourRange=g0(X,this.nzHourStep,F0).map(l1=>({index:l1,disabled:!!z0&&-1!==z0.indexOf(l1)})),this.nzUse12Hours&&12===this.hourRange[this.hourRange.length-1].index){const l1=[...this.hourRange];l1.unshift(l1[l1.length-1]),l1.splice(l1.length-1,1),this.hourRange=l1}}buildMinutes(){this.minuteRange=g0(60,this.nzMinuteStep).map(X=>({index:X,disabled:!!this.nzDisabledMinutes&&-1!==this.nzDisabledMinutes(this.time.hours).indexOf(X)}))}buildSeconds(){this.secondRange=g0(60,this.nzSecondStep).map(X=>({index:X,disabled:!!this.nzDisabledSeconds&&-1!==this.nzDisabledSeconds(this.time.hours,this.time.minutes).indexOf(X)}))}build12Hours(){const X=this._format.includes("A");this.use12HoursRange=[{index:0,value:X?"AM":"am"},{index:1,value:X?"PM":"pm"}]}buildTimes(){this.buildHours(),this.buildMinutes(),this.buildSeconds(),this.build12Hours()}scrollToTime(X=0){this.hourEnabled&&this.hourListElement&&this.scrollToSelected(this.hourListElement.nativeElement,this.time.viewHours,X,"hour"),this.minuteEnabled&&this.minuteListElement&&this.scrollToSelected(this.minuteListElement.nativeElement,this.time.minutes,X,"minute"),this.secondEnabled&&this.secondListElement&&this.scrollToSelected(this.secondListElement.nativeElement,this.time.seconds,X,"second"),this.nzUse12Hours&&this.use12HoursListElement&&this.scrollToSelected(this.use12HoursListElement.nativeElement,"AM"===this.time.selected12Hours?0:1,X,"12-hour")}selectHour(X){this.time.setHours(X.index,X.disabled),this._disabledMinutes&&this.buildMinutes(),(this._disabledSeconds||this._disabledMinutes)&&this.buildSeconds()}selectMinute(X){this.time.setMinutes(X.index,X.disabled),this._disabledSeconds&&this.buildSeconds()}selectSecond(X){this.time.setSeconds(X.index,X.disabled)}select12Hours(X){this.time.setSelected12Hours(X.value),this._disabledHours&&this.buildHours(),this._disabledMinutes&&this.buildMinutes(),this._disabledSeconds&&this.buildSeconds()}scrollToSelected(X,z0,F0=0,l1){if(!X)return;const $1=this.translateIndex(z0,l1);this.scrollTo(X,(X.children[$1]||X.children[0]).offsetTop,F0)}translateIndex(X,z0){return"hour"===z0?this.calcIndex(this.nzDisabledHours?.(),this.hourRange.map(F0=>F0.index).indexOf(X)):"minute"===z0?this.calcIndex(this.nzDisabledMinutes?.(this.time.hours),this.minuteRange.map(F0=>F0.index).indexOf(X)):"second"===z0?this.calcIndex(this.nzDisabledSeconds?.(this.time.hours,this.time.minutes),this.secondRange.map(F0=>F0.index).indexOf(X)):this.calcIndex([],this.use12HoursRange.map(F0=>F0.index).indexOf(X))}scrollTo(X,z0,F0){if(F0<=0)return void(X.scrollTop=z0);const $1=(z0-X.scrollTop)/F0*10;this.ngZone.runOutsideAngular(()=>{(0,Z.e)(()=>{X.scrollTop=X.scrollTop+$1,X.scrollTop!==z0&&this.scrollTo(X,z0,F0-10)})})}calcIndex(X,z0){return X?.length&&this.nzHideDisabledOptions?z0-X.reduce((F0,l1)=>F0+(l1-1||(this.nzDisabledMinutes?.(z0).indexOf(F0)??-1)>-1||(this.nzDisabledSeconds?.(z0,F0).indexOf(l1)??-1)>-1}onClickNow(){const X=new Date;this.timeDisabled(X)||(this.time.setValue(X),this.changed(),this.closePanel.emit())}onClickOk(){this.time.setValue(this.time.value,this.nzUse12Hours),this.changed(),this.closePanel.emit()}isSelectedHour(X){return X.index===this.time.viewHours}isSelectedMinute(X){return X.index===this.time.minutes}isSelectedSecond(X){return X.index===this.time.seconds}isSelected12Hours(X){return X.value.toUpperCase()===this.time.selected12Hours}constructor(X,z0,F0,l1){this.ngZone=X,this.cdr=z0,this.dateHelper=F0,this.elementRef=l1,this._nzHourStep=1,this._nzMinuteStep=1,this._nzSecondStep=1,this.unsubscribe$=new J.x,this._format="HH:mm:ss",this._disabledHours=()=>[],this._disabledMinutes=()=>[],this._disabledSeconds=()=>[],this._allowEmpty=!0,this.time=new K,this.hourEnabled=!0,this.minuteEnabled=!0,this.secondEnabled=!0,this.firstScrolled=!1,this.enabledColumns=3,this.nzInDatePicker=!1,this.nzHideDisabledOptions=!1,this.nzUse12Hours=!1,this.closePanel=new c.vpe}ngOnInit(){this.time.changes.pipe((0,v.R)(this.unsubscribe$)).subscribe(()=>{this.changed(),this.touched(),this.scrollToTime(120)}),this.buildTimes(),this.ngZone.runOutsideAngular(()=>{setTimeout(()=>{this.scrollToTime(),this.firstScrolled=!0}),(0,B.R)(this.elementRef.nativeElement,"mousedown").pipe((0,v.R)(this.unsubscribe$)).subscribe(X=>{X.preventDefault()})})}ngOnDestroy(){this.unsubscribe$.next(),this.unsubscribe$.complete()}ngOnChanges(X){const{nzUse12Hours:z0,nzDefaultOpenValue:F0}=X;!z0?.previousValue&&z0?.currentValue&&(this.build12Hours(),this.enabledColumns++),F0?.currentValue&&this.time.setDefaultOpenValue(this.nzDefaultOpenValue||new Date)}writeValue(X){this.time.setValue(X,this.nzUse12Hours),this.buildTimes(),X&&this.firstScrolled&&this.scrollToTime(120),this.cdr.markForCheck()}registerOnChange(X){this.onChange=X}registerOnTouched(X){this.onTouch=X}}return(W0=I0).\u0275fac=function(X){return new(X||W0)(c.Y36(c.R0b),c.Y36(c.sBO),c.Y36(f0.mx),c.Y36(c.SBq))},W0.\u0275cmp=c.Xpm({type:W0,selectors:[["nz-time-picker-panel"]],viewQuery:function(X,z0){if(1&X&&(c.Gf(V,5),c.Gf(r0,5),c.Gf(h0,5),c.Gf(O1,5)),2&X){let F0;c.iGM(F0=c.CRH())&&(z0.hourListElement=F0.first),c.iGM(F0=c.CRH())&&(z0.minuteListElement=F0.first),c.iGM(F0=c.CRH())&&(z0.secondListElement=F0.first),c.iGM(F0=c.CRH())&&(z0.use12HoursListElement=F0.first)}},hostAttrs:[1,"ant-picker-time-panel"],hostVars:12,hostBindings:function(X,z0){2&X&&c.ekj("ant-picker-time-panel-column-0",0===z0.enabledColumns&&!z0.nzInDatePicker)("ant-picker-time-panel-column-1",1===z0.enabledColumns&&!z0.nzInDatePicker)("ant-picker-time-panel-column-2",2===z0.enabledColumns&&!z0.nzInDatePicker)("ant-picker-time-panel-column-3",3===z0.enabledColumns&&!z0.nzInDatePicker)("ant-picker-time-panel-narrow",z0.enabledColumns<3)("ant-picker-time-panel-placement-bottomLeft",!z0.nzInDatePicker)},inputs:{nzInDatePicker:"nzInDatePicker",nzAddOn:"nzAddOn",nzHideDisabledOptions:"nzHideDisabledOptions",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPlaceHolder:"nzPlaceHolder",nzUse12Hours:"nzUse12Hours",nzDefaultOpenValue:"nzDefaultOpenValue",nzAllowEmpty:"nzAllowEmpty",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",format:"format",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep"},outputs:{closePanel:"closePanel"},exportAs:["nzTimePickerPanel"],features:[c._Bn([{provide:n.JU,useExisting:W0,multi:!0}]),c.TTD],decls:7,vars:6,consts:[["class","ant-picker-header",4,"ngIf"],[1,"ant-picker-content"],["class","ant-picker-time-panel-column","style","position: relative;",4,"ngIf"],["class","ant-picker-footer",4,"ngIf"],[1,"ant-picker-header"],[1,"ant-picker-header-view"],[1,"ant-picker-time-panel-column",2,"position","relative"],["hourListElement",""],[4,"ngFor","ngForOf","ngForTrackBy"],["class","ant-picker-time-panel-cell",3,"ant-picker-time-panel-cell-selected","ant-picker-time-panel-cell-disabled","click",4,"ngIf"],[1,"ant-picker-time-panel-cell",3,"click"],[1,"ant-picker-time-panel-cell-inner"],["minuteListElement",""],["secondListElement",""],["use12HoursListElement",""],[4,"ngFor","ngForOf"],[1,"ant-picker-footer"],["class","ant-picker-footer-extra",4,"ngIf"],[1,"ant-picker-ranges"],[1,"ant-picker-now"],[3,"click"],[1,"ant-picker-ok"],["nz-button","","type","button","nzSize","small","nzType","primary",3,"click"],[1,"ant-picker-footer-extra"],[3,"ngTemplateOutlet"]],template:function(X,z0){1&X&&(c.YNc(0,N0,3,1,"div",0),c.TgZ(1,"div",1),c.YNc(2,X0,3,2,"ul",2),c.YNc(3,E0,3,2,"ul",2),c.YNc(4,z1,3,2,"ul",2),c.YNc(5,x0,3,1,"ul",2),c.qZA(),c.YNc(6,M0,11,7,"div",3)),2&X&&(c.Q6J("ngIf",z0.nzInDatePicker),c.xp6(2),c.Q6J("ngIf",z0.hourEnabled),c.xp6(1),c.Q6J("ngIf",z0.minuteEnabled),c.xp6(1),c.Q6J("ngIf",z0.secondEnabled),c.xp6(1),c.Q6J("ngIf",z0.nzUse12Hours),c.xp6(1),c.Q6J("ngIf",!z0.nzInDatePicker))},dependencies:[R0.sg,R0.O5,R0.tP,p0.ix,A0.w,Q.dQ,R0.JJ,f0.o9],encapsulation:2,changeDetection:0}),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzUse12Hours",void 0),I0})(),L1=(()=>{var W0;class I0{emitValue(X){this.setValue(X,!0),this._onChange&&this._onChange(this.value),this._onTouched&&this._onTouched()}setValue(X,z0=!1){z0&&(this.preValue=(0,t.Z)(X)?new Date(X):null),this.value=(0,t.Z)(X)?new Date(X):null,this.inputValue=this.dateHelper.format(X,this.nzFormat),this.cdr.markForCheck()}open(){this.nzDisabled||this.nzOpen||(this.focus(),this.nzOpen=!0,this.nzOpenChange.emit(this.nzOpen))}close(){this.nzOpen=!1,this.cdr.markForCheck(),this.nzOpenChange.emit(this.nzOpen)}updateAutoFocus(){this.isInit&&!this.nzDisabled&&(this.nzAutoFocus?this.renderer.setAttribute(this.inputRef.nativeElement,"autofocus","autofocus"):this.renderer.removeAttribute(this.inputRef.nativeElement,"autofocus"))}onClickClearBtn(X){X.stopPropagation(),this.emitValue(null)}onClickOutside(X){this.element.nativeElement.contains(X.target)||this.setCurrentValueAndClose()}onFocus(X){this.focused=X,X||(this.checkTimeValid(this.value)?this.setCurrentValueAndClose():(this.setValue(this.preValue),this.close()))}focus(){this.inputRef.nativeElement&&this.inputRef.nativeElement.focus()}blur(){this.inputRef.nativeElement&&this.inputRef.nativeElement.blur()}onKeyupEsc(){this.setValue(this.preValue)}onKeyupEnter(){this.nzOpen&&(0,t.Z)(this.value)?this.setCurrentValueAndClose():this.nzOpen||this.open()}onInputChange(X){!this.platform.TRIDENT&&document.activeElement===this.inputRef.nativeElement&&(this.open(),this.parseTimeString(X))}onPanelValueChange(X){this.setValue(X),this.focus()}closePanel(){this.inputRef.nativeElement.blur()}setCurrentValueAndClose(){this.emitValue(this.value),this.close()}constructor(X,z0,F0,l1,$1,se,ae,be,_e,Be){this.nzConfigService=X,this.i18n=z0,this.element=F0,this.renderer=l1,this.cdr=$1,this.dateHelper=se,this.platform=ae,this.directionality=be,this.nzFormStatusService=_e,this.nzFormNoStatusService=Be,this._nzModuleName="timePicker",this.destroy$=new J.x,this.isNzDisableFirstChange=!0,this.isInit=!1,this.focused=!1,this.inputValue="",this.value=null,this.preValue=null,this.i18nPlaceHolder$=(0,g.of)(void 0),this.overlayPositions=[{offsetY:3,originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{offsetY:-3,originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{offsetY:3,originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{offsetY:-3,originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"}],this.dir="ltr",this.prefixCls="ant-picker",this.statusCls={},this.status="",this.hasFeedback=!1,this.nzId=null,this.nzSize=null,this.nzStatus="",this.nzHourStep=1,this.nzMinuteStep=1,this.nzSecondStep=1,this.nzClearText="clear",this.nzNowText="",this.nzOkText="",this.nzPopupClassName="",this.nzPlaceHolder="",this.nzFormat="HH:mm:ss",this.nzOpen=!1,this.nzUse12Hours=!1,this.nzSuffixIcon="clock-circle",this.nzOpenChange=new c.vpe,this.nzHideDisabledOptions=!1,this.nzAllowEmpty=!0,this.nzDisabled=!1,this.nzAutoFocus=!1,this.nzBackdrop=!1,this.nzBorderless=!1,this.nzInputReadOnly=!1}ngOnInit(){this.nzFormStatusService?.formStatusChanges.pipe((0,N.x)((X,z0)=>X.status===z0.status&&X.hasFeedback===z0.hasFeedback),(0,S.M)(this.nzFormNoStatusService?this.nzFormNoStatusService.noFormStatus:(0,g.of)(!1)),(0,E.U)(([{status:X,hasFeedback:z0},F0])=>({status:F0?"":X,hasFeedback:z0})),(0,v.R)(this.destroy$)).subscribe(({status:X,hasFeedback:z0})=>{this.setStatusStyles(X,z0)}),this.inputSize=Math.max(8,this.nzFormat.length)+2,this.origin=new e.xu(this.element),this.i18nPlaceHolder$=this.i18n.localeChange.pipe((0,E.U)(X=>X.TimePicker.placeholder)),this.dir=this.directionality.value,this.directionality.change?.pipe((0,v.R)(this.destroy$)).subscribe(X=>{this.dir=X})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}ngOnChanges(X){const{nzUse12Hours:z0,nzFormat:F0,nzDisabled:l1,nzAutoFocus:$1,nzStatus:se}=X;if(z0&&!z0.previousValue&&z0.currentValue&&!F0&&(this.nzFormat="h:mm:ss a"),l1){const be=this.inputRef.nativeElement;l1.currentValue?this.renderer.setAttribute(be,"disabled",""):this.renderer.removeAttribute(be,"disabled")}$1&&this.updateAutoFocus(),se&&this.setStatusStyles(this.nzStatus,this.hasFeedback)}parseTimeString(X){const z0=this.dateHelper.parseTime(X,this.nzFormat)||null;(0,t.Z)(z0)&&(this.value=z0,this.cdr.markForCheck())}ngAfterViewInit(){this.isInit=!0,this.updateAutoFocus()}writeValue(X){let z0;X instanceof Date?z0=X:(0,n0.kK)(X)?z0=null:((0,I.ZK)('Non-Date type is not recommended for time-picker, use "Date" type.'),z0=new Date(X)),this.setValue(z0,!0)}registerOnChange(X){this._onChange=X}registerOnTouched(X){this._onTouched=X}setDisabledState(X){this.nzDisabled=this.isNzDisableFirstChange&&this.nzDisabled||X,this.isNzDisableFirstChange=!1,this.cdr.markForCheck()}checkTimeValid(X){if(!X)return!0;const z0=this.nzDisabledHours?.(),F0=this.nzDisabledMinutes?.(X.getHours()),l1=this.nzDisabledSeconds?.(X.getHours(),X.getMinutes());return!(z0?.includes(X.getHours())||F0?.includes(X.getMinutes())||l1?.includes(X.getSeconds()))}setStatusStyles(X,z0){this.status=X,this.hasFeedback=z0,this.cdr.markForCheck(),this.statusCls=(0,n0.Zu)(this.prefixCls,X,z0),Object.keys(this.statusCls).forEach(F0=>{this.statusCls[F0]?this.renderer.addClass(this.element.nativeElement,F0):this.renderer.removeClass(this.element.nativeElement,F0)})}}return(W0=I0).\u0275fac=function(X){return new(X||W0)(c.Y36(a0.jY),c.Y36(f0.wi),c.Y36(c.SBq),c.Y36(c.Qsj),c.Y36(c.sBO),c.Y36(f0.mx),c.Y36(H.t4),c.Y36(j0.Is,8),c.Y36(Z0.kH,8),c.Y36(Z0.yW,8))},W0.\u0275cmp=c.Xpm({type:W0,selectors:[["nz-time-picker"]],viewQuery:function(X,z0){if(1&X&&c.Gf(L0,7),2&X){let F0;c.iGM(F0=c.CRH())&&(z0.inputRef=F0.first)}},hostAttrs:[1,"ant-picker"],hostVars:12,hostBindings:function(X,z0){1&X&&c.NdJ("click",function(){return z0.open()}),2&X&&c.ekj("ant-picker-large","large"===z0.nzSize)("ant-picker-small","small"===z0.nzSize)("ant-picker-disabled",z0.nzDisabled)("ant-picker-focused",z0.focused)("ant-picker-rtl","rtl"===z0.dir)("ant-picker-borderless",z0.nzBorderless)},inputs:{nzId:"nzId",nzSize:"nzSize",nzStatus:"nzStatus",nzHourStep:"nzHourStep",nzMinuteStep:"nzMinuteStep",nzSecondStep:"nzSecondStep",nzClearText:"nzClearText",nzNowText:"nzNowText",nzOkText:"nzOkText",nzPopupClassName:"nzPopupClassName",nzPlaceHolder:"nzPlaceHolder",nzAddOn:"nzAddOn",nzDefaultOpenValue:"nzDefaultOpenValue",nzDisabledHours:"nzDisabledHours",nzDisabledMinutes:"nzDisabledMinutes",nzDisabledSeconds:"nzDisabledSeconds",nzFormat:"nzFormat",nzOpen:"nzOpen",nzUse12Hours:"nzUse12Hours",nzSuffixIcon:"nzSuffixIcon",nzHideDisabledOptions:"nzHideDisabledOptions",nzAllowEmpty:"nzAllowEmpty",nzDisabled:"nzDisabled",nzAutoFocus:"nzAutoFocus",nzBackdrop:"nzBackdrop",nzBorderless:"nzBorderless",nzInputReadOnly:"nzInputReadOnly"},outputs:{nzOpenChange:"nzOpenChange"},exportAs:["nzTimePicker"],features:[c._Bn([{provide:n.JU,useExisting:W0,multi:!0}]),c.TTD],decls:9,vars:16,consts:[[1,"ant-picker-input"],["type","text","autocomplete","off",3,"size","placeholder","ngModel","disabled","readOnly","ngModelChange","focus","blur","keyup.enter","keyup.escape"],["inputElement",""],[1,"ant-picker-suffix"],[4,"nzStringTemplateOutlet"],[3,"status",4,"ngIf"],["class","ant-picker-clear",3,"click",4,"ngIf"],["cdkConnectedOverlay","","nzConnectedOverlay","",3,"cdkConnectedOverlayHasBackdrop","cdkConnectedOverlayPositions","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayTransformOriginOn","detach","overlayOutsideClick"],["nz-icon","",3,"nzType"],[3,"status"],[1,"ant-picker-clear",3,"click"],["nz-icon","","nzType","close-circle","nzTheme","fill"],[1,"ant-picker-dropdown",2,"position","relative"],[1,"ant-picker-panel-container"],["tabindex","-1",1,"ant-picker-panel"],[3,"ngClass","format","nzHourStep","nzMinuteStep","nzSecondStep","nzDisabledHours","nzDisabledMinutes","nzDisabledSeconds","nzPlaceHolder","nzHideDisabledOptions","nzUse12Hours","nzDefaultOpenValue","nzAddOn","nzClearText","nzNowText","nzOkText","nzAllowEmpty","ngModel","ngModelChange","closePanel"]],template:function(X,z0){1&X&&(c.TgZ(0,"div",0)(1,"input",1,2),c.NdJ("ngModelChange",function(l1){return z0.inputValue=l1})("focus",function(){return z0.onFocus(!0)})("blur",function(){return z0.onFocus(!1)})("keyup.enter",function(){return z0.onKeyupEnter()})("keyup.escape",function(){return z0.onKeyupEsc()})("ngModelChange",function(l1){return z0.onInputChange(l1)}),c.ALo(3,"async"),c.qZA(),c.TgZ(4,"span",3),c.YNc(5,o0,2,1,"ng-container",4),c.YNc(6,L,1,1,"nz-form-item-feedback-icon",5),c.qZA(),c.YNc(7,m,2,2,"span",6),c.qZA(),c.YNc(8,d,5,21,"ng-template",7),c.NdJ("detach",function(){return z0.close()})("overlayOutsideClick",function(l1){return z0.onClickOutside(l1)})),2&X&&(c.xp6(1),c.Q6J("size",z0.inputSize)("placeholder",z0.nzPlaceHolder||c.lcZ(3,14,z0.i18nPlaceHolder$))("ngModel",z0.inputValue)("disabled",z0.nzDisabled)("readOnly",z0.nzInputReadOnly),c.uIk("id",z0.nzId),c.xp6(4),c.Q6J("nzStringTemplateOutlet",z0.nzSuffixIcon),c.xp6(1),c.Q6J("ngIf",z0.hasFeedback&&!!z0.status),c.xp6(1),c.Q6J("ngIf",z0.nzAllowEmpty&&!z0.nzDisabled&&z0.value),c.xp6(1),c.Q6J("cdkConnectedOverlayHasBackdrop",z0.nzBackdrop)("cdkConnectedOverlayPositions",z0.overlayPositions)("cdkConnectedOverlayOrigin",z0.origin)("cdkConnectedOverlayOpen",z0.nzOpen)("cdkConnectedOverlayTransformOriginOn",".ant-picker-dropdown"))},dependencies:[R0.mk,R0.O5,n.Fj,n.JJ,n.On,e.pI,p1.Ls,T0.hQ,D0.f,A0.w,Z0.w_,e1,R0.Ov],encapsulation:2,data:{animation:[v0.mF]},changeDetection:0}),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzHourStep",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzMinuteStep",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzSecondStep",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzClearText",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzNowText",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzOkText",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzPopupClassName",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzFormat",void 0),(0,M.gn)([(0,a0.oS)(),(0,n0.yF)()],I0.prototype,"nzUse12Hours",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzSuffixIcon",void 0),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzHideDisabledOptions",void 0),(0,M.gn)([(0,a0.oS)(),(0,n0.yF)()],I0.prototype,"nzAllowEmpty",void 0),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzDisabled",void 0),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzAutoFocus",void 0),(0,M.gn)([(0,a0.oS)()],I0.prototype,"nzBackdrop",void 0),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzBorderless",void 0),(0,M.gn)([(0,n0.yF)()],I0.prototype,"nzInputReadOnly",void 0),I0})(),k1=(()=>{var W0;class I0{}return(W0=I0).\u0275fac=function(X){return new(X||W0)},W0.\u0275mod=c.oAB({type:W0}),W0.\u0275inj=c.cJS({imports:[j0.vT,R0.ez,n.u5,f0.YI,e.U8,p1.PV,T0.e4,D0.T,p0.sL,Z0.mJ]}),I0})()},43498:(r1,S0,s)=>{"use strict";s.d(S0,{FT:()=>H0,PD:()=>h0,Zv:()=>r0});var M=s(65879),e=s(97328),c=s(78645),n=s(96814),J=s(8324),B=s(59773),g=s(49388),v=s(62595),N=s(62831);const S=["template"];function E(e0,X0){if(1&e0&&(M.ynx(0),M._uU(1),M.BQk()),2&e0){const c0=M.oxw(3);M.xp6(1),M.Oqu(c0.nzLabel)}}function t(e0,X0){if(1&e0&&(M.TgZ(0,"div",7),M.YNc(1,E,2,1,"ng-container",5),M.qZA()),2&e0){const c0=M.oxw(2);M.xp6(1),M.Q6J("nzStringTemplateOutlet",c0.nzLabel)}}function v0(e0,X0){if(1&e0&&(M.ynx(0),M._uU(1),M.BQk()),2&e0){const c0=M.oxw(2);M.xp6(1),M.Oqu(c0.nzDot)}}function a0(e0,X0){if(1&e0&&(M.TgZ(0,"li",1),M.YNc(1,t,2,1,"div",2),M._UZ(2,"div",3),M.TgZ(3,"div",4),M.YNc(4,v0,2,1,"ng-container",5),M.qZA(),M.TgZ(5,"div",6),M.Hsn(6),M.qZA()()),2&e0){const c0=M.oxw();M.ekj("ant-timeline-item-right","right"===(c0.nzPosition||c0.position))("ant-timeline-item-left","left"===(c0.nzPosition||c0.position))("ant-timeline-item-last",c0.isLast),M.xp6(1),M.Q6J("ngIf",c0.nzLabel),M.xp6(2),M.Udp("border-color",c0.borderColor),M.ekj("ant-timeline-item-head-red","red"===c0.nzColor)("ant-timeline-item-head-blue","blue"===c0.nzColor)("ant-timeline-item-head-green","green"===c0.nzColor)("ant-timeline-item-head-gray","gray"===c0.nzColor)("ant-timeline-item-head-custom",!!c0.nzDot),M.xp6(1),M.Q6J("nzStringTemplateOutlet",c0.nzDot)}}const I=["*"];function n0(e0,X0){if(1&e0&&M.GkF(0,4),2&e0){M.oxw();const c0=M.MAs(5);M.Q6J("ngTemplateOutlet",c0)}}function f0(e0,X0){}function H(e0,X0){if(1&e0&&(M.ynx(0),M.YNc(1,f0,0,0,"ng-template",4),M.BQk()),2&e0){const c0=X0.$implicit;M.xp6(1),M.Q6J("ngTemplateOutlet",c0.template)}}function j0(e0,X0){if(1&e0&&M.GkF(0,4),2&e0){M.oxw();const c0=M.MAs(5);M.Q6J("ngTemplateOutlet",c0)}}function Z0(e0,X0){1&e0&&M._UZ(0,"span",12)}function R0(e0,X0){if(1&e0&&(M.ynx(0),M._uU(1),M.YNc(2,Z0,1,0,"span",11),M.BQk()),2&e0){const c0=M.oxw(3);M.xp6(1),M.hij(" ",c0.nzPendingDot," "),M.xp6(1),M.Q6J("ngIf",!c0.nzPendingDot)}}function p1(e0,X0){if(1&e0&&(M.ynx(0),M._uU(1),M.BQk()),2&e0){const c0=M.oxw(3);M.xp6(1),M.hij(" ",c0.isPendingBoolean?"":c0.nzPending," ")}}function T0(e0,X0){if(1&e0&&(M.TgZ(0,"li",6),M._UZ(1,"div",7),M.TgZ(2,"div",8),M.YNc(3,R0,3,2,"ng-container",9),M.qZA(),M.TgZ(4,"div",10),M.YNc(5,p1,2,1,"ng-container",9),M.qZA()()),2&e0){const c0=M.oxw(2);M.xp6(3),M.Q6J("nzStringTemplateOutlet",c0.nzPendingDot),M.xp6(2),M.Q6J("nzStringTemplateOutlet",c0.nzPending)}}function D0(e0,X0){if(1&e0&&M.YNc(0,T0,6,2,"li",5),2&e0){const c0=M.oxw();M.Q6J("ngIf",c0.nzPending)}}const p0=["red","blue","green","grey","gray"];let Q=(()=>{var e0;class X0{constructor(){this.check$=new e.t(1)}markForCheck(){this.check$.next()}}return(e0=X0).\u0275fac=function(b0){return new(b0||e0)},e0.\u0275prov=M.Yz7({token:e0,factory:e0.\u0275fac}),X0})(),r0=(()=>{var e0;class X0{constructor(b0,E0){this.cdr=b0,this.timelineService=E0,this.nzColor="blue",this.isLast=!1,this.borderColor=null}ngOnChanges(b0){this.timelineService.markForCheck(),b0.nzColor&&this.updateCustomColor()}detectChanges(){this.cdr.detectChanges()}updateCustomColor(){this.borderColor=function V(e0){return-1!==p0.findIndex(X0=>X0===e0)}(this.nzColor)?null:this.nzColor}}return(e0=X0).\u0275fac=function(b0){return new(b0||e0)(M.Y36(M.sBO),M.Y36(Q))},e0.\u0275cmp=M.Xpm({type:e0,selectors:[["nz-timeline-item"],["","nz-timeline-item",""]],viewQuery:function(b0,E0){if(1&b0&&M.Gf(S,5),2&b0){let B0;M.iGM(B0=M.CRH())&&(E0.template=B0.first)}},inputs:{nzPosition:"nzPosition",nzColor:"nzColor",nzDot:"nzDot",nzLabel:"nzLabel"},exportAs:["nzTimelineItem"],features:[M.TTD],ngContentSelectors:I,decls:2,vars:0,consts:[["template",""],[1,"ant-timeline-item"],["class","ant-timeline-item-label",4,"ngIf"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"],[1,"ant-timeline-item-label"]],template:function(b0,E0){1&b0&&(M.F$t(),M.YNc(0,a0,7,20,"ng-template",null,0,M.W1O))},dependencies:[n.O5,J.f],encapsulation:2,changeDetection:0}),X0})(),h0=(()=>{var e0;class X0{constructor(b0,E0,B0){this.cdr=b0,this.timelineService=E0,this.directionality=B0,this.nzMode="left",this.nzReverse=!1,this.isPendingBoolean=!1,this.timelineItems=[],this.dir="ltr",this.hasLabelItem=!1,this.destroy$=new c.x}ngOnChanges(b0){const{nzMode:E0,nzReverse:B0,nzPending:U0}=b0;(O1(E0)||O1(B0))&&this.updateChildren(),U0&&(this.isPendingBoolean=!0===U0.currentValue)}ngOnInit(){this.timelineService.check$.pipe((0,B.R)(this.destroy$)).subscribe(()=>{this.cdr.markForCheck()}),this.directionality.change?.pipe((0,B.R)(this.destroy$)).subscribe(b0=>{this.dir=b0,this.cdr.detectChanges()}),this.dir=this.directionality.value}ngAfterContentInit(){this.updateChildren(),this.listOfItems.changes.pipe((0,B.R)(this.destroy$)).subscribe(()=>{this.updateChildren()})}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete()}updateChildren(){if(this.listOfItems&&this.listOfItems.length){const b0=this.listOfItems.length;let E0=!1;this.listOfItems.forEach((B0,U0)=>{B0.isLast=this.nzReverse?0===U0:U0===b0-1,B0.position=function N0(e0,X0){return"custom"===X0?void 0:"left"===X0?"left":"right"===X0?"right":"alternate"===X0&&e0%2==0?"left":"right"}(U0,this.nzMode),!E0&&B0.nzLabel&&(E0=!0),B0.detectChanges()}),this.timelineItems=this.nzReverse?this.listOfItems.toArray().reverse():this.listOfItems.toArray(),this.hasLabelItem=E0}else this.timelineItems=[],this.hasLabelItem=!1;this.cdr.markForCheck()}}return(e0=X0).\u0275fac=function(b0){return new(b0||e0)(M.Y36(M.sBO),M.Y36(Q),M.Y36(g.Is,8))},e0.\u0275cmp=M.Xpm({type:e0,selectors:[["nz-timeline"]],contentQueries:function(b0,E0,B0){if(1&b0&&M.Suo(B0,r0,4),2&b0){let U0;M.iGM(U0=M.CRH())&&(E0.listOfItems=U0)}},inputs:{nzMode:"nzMode",nzPending:"nzPending",nzPendingDot:"nzPendingDot",nzReverse:"nzReverse"},exportAs:["nzTimeline"],features:[M._Bn([Q]),M.TTD],ngContentSelectors:I,decls:7,vars:15,consts:[[1,"ant-timeline"],[3,"ngTemplateOutlet",4,"ngIf"],[4,"ngFor","ngForOf"],["pendingTemplate",""],[3,"ngTemplateOutlet"],["class","ant-timeline-item ant-timeline-item-pending",4,"ngIf"],[1,"ant-timeline-item","ant-timeline-item-pending"],[1,"ant-timeline-item-tail"],[1,"ant-timeline-item-head","ant-timeline-item-head-custom","ant-timeline-item-head-blue"],[4,"nzStringTemplateOutlet"],[1,"ant-timeline-item-content"],["nz-icon","","nzType","loading",4,"ngIf"],["nz-icon","","nzType","loading"]],template:function(b0,E0){1&b0&&(M.F$t(),M.TgZ(0,"ul",0),M.YNc(1,n0,1,1,"ng-container",1),M.YNc(2,H,2,1,"ng-container",2),M.YNc(3,j0,1,1,"ng-container",1),M.qZA(),M.YNc(4,D0,1,1,"ng-template",null,3,M.W1O),M.Hsn(6)),2&b0&&(M.ekj("ant-timeline-label",E0.hasLabelItem)("ant-timeline-right",!E0.hasLabelItem&&"right"===E0.nzMode)("ant-timeline-alternate","alternate"===E0.nzMode||"custom"===E0.nzMode)("ant-timeline-pending",!!E0.nzPending)("ant-timeline-reverse",E0.nzReverse)("ant-timeline-rtl","rtl"===E0.dir),M.xp6(1),M.Q6J("ngIf",E0.nzReverse),M.xp6(1),M.Q6J("ngForOf",E0.timelineItems),M.xp6(1),M.Q6J("ngIf",!E0.nzReverse))},dependencies:[n.sg,n.O5,n.tP,v.Ls,J.f],encapsulation:2,changeDetection:0}),X0})();function O1(e0){return!(!e0||e0.previousValue===e0.currentValue&&!e0.isFirstChange())}let H0=(()=>{var e0;class X0{}return(e0=X0).\u0275fac=function(b0){return new(b0||e0)},e0.\u0275mod=M.oAB({type:e0}),e0.\u0275inj=M.cJS({imports:[g.vT,n.ez,N.ud,v.PV,J.T]}),X0})()},69234:(r1,S0,s)=>{"use strict";s.d(S0,{zr:()=>Yb,cX:()=>Gb});var M=s(15861),e=s(65879),c=s(6593),n=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},J=function(l){return l&&l.Math==Math&&l},B=J("object"==typeof globalThis&&globalThis)||J("object"==typeof window&&window)||J("object"==typeof self&&self)||J("object"==typeof n&&n)||function(){return this}()||Function("return this")(),g={},v=function(l){try{return!!l()}catch{return!0}},S=!v(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}),t=!v(function(){var l=function(){}.bind();return"function"!=typeof l||l.hasOwnProperty("prototype")}),a0=Function.prototype.call,I=t?a0.bind(a0):function(){return a0.apply(a0,arguments)},n0={},f0={}.propertyIsEnumerable,H=Object.getOwnPropertyDescriptor,j0=H&&!f0.call({1:2},1);n0.f=j0?function(T){var R=H(this,T);return!!R&&R.enumerable}:f0;var q0,X,Z0=function(l,T){return{enumerable:!(1&l),configurable:!(2&l),writable:!(4&l),value:T}},R0=t,p1=Function.prototype,D0=p1.call,A0=R0&&p1.bind.bind(D0,D0),Z=R0?function(l){return l&&A0(l)}:function(l){return l&&function(){return D0.apply(l,arguments)}},p0=Z,Q=p0({}.toString),V=p0("".slice),r0=function(l){return V(Q(l),8,-1)},N0=v,H0=r0,e0=B.Object,X0=Z("".split),c0=N0(function(){return!e0("z").propertyIsEnumerable(0)})?function(l){return"String"==H0(l)?X0(l,""):e0(l)}:e0,E0=B.TypeError,B0=function(l){if(null==l)throw E0("Can't call method on "+l);return l},U0=c0,z1=B0,Q0=function(l){return U0(z1(l))},x0=function(l){return"function"==typeof l},n1=x0,h1=function(l){return"object"==typeof l?null!==l:n1(l)},M0=B,L0=x0,L=function(l,T){return arguments.length<2?function(l){return L0(l)?l:void 0}(M0[l]):M0[l]&&M0[l][T]},d=Z({}.isPrototypeOf),g0=L("navigator","userAgent")||"",u1=g0,L1=B.process,k1=B.Deno,W0=L1&&L1.versions||k1&&k1.version,I0=W0&&W0.v8;I0&&(X=(q0=I0.split("."))[0]>0&&q0[0]<4?1:+(q0[0]+q0[1])),!X&&u1&&(!(q0=u1.match(/Edge\/(\d+)/))||q0[1]>=74)&&(q0=u1.match(/Chrome\/(\d+)/))&&(X=+q0[1]);var z0=X,F0=z0,$1=!!Object.getOwnPropertySymbols&&!v(function(){var l=Symbol();return!String(l)||!(Object(l)instanceof Symbol)||!Symbol.sham&&F0&&F0<41}),ae=$1&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,_e=L,Be=x0,le=d,qe=B.Object,ce=ae?function(l){return"symbol"==typeof l}:function(l){var T=_e("Symbol");return Be(T)&&le(T.prototype,qe(l))},fe=B.String,de=function(l){try{return fe(l)}catch{return"Object"}},Ge=x0,ve=de,t0=B.TypeError,f=function(l){if(Ge(l))return l;throw t0(ve(l)+" is not a function")},y=f,W=function(l,T){var R=l[T];return null==R?void 0:y(R)},Y=I,d0=x0,C0=h1,$0=B.TypeError,q1={exports:{}},x1=B,B1=Object.defineProperty,j1=function(l,T){try{B1(x1,l,{value:T,configurable:!0,writable:!0})}catch{x1[l]=T}return T},P1="__core-js_shared__",Ce=B[P1]||j1(P1,{}),G1=Ce;(q1.exports=function(l,T){return G1[l]||(G1[l]=void 0!==T?T:{})})("versions",[]).push({version:"3.22.2",mode:"global",copyright:"\xa9 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE",source:"https://github.com/zloirock/core-js"});var je=B0,Qe=B.Object,st=function(l){return Qe(je(l))},Ve=st,Ze=Z({}.hasOwnProperty),Q1=Object.hasOwn||function(T,R){return Ze(Ve(T),R)},me=Z,re=0,ct=Math.random(),Pe=me(1..toString),Mt=function(l){return"Symbol("+(void 0===l?"":l)+")_"+Pe(++re+ct,36)},dt=B,Ue=Q1,u0=Mt,o1=$1,_0=ae,G=(0,q1.exports)("wks"),k0=dt.Symbol,t1=k0&&k0.for,w1=_0?k0:k0&&k0.withoutSetter||u0,v1=function(l){if(!Ue(G,l)||!o1&&"string"!=typeof G[l]){var T="Symbol."+l;G[l]=o1&&Ue(k0,l)?k0[l]:_0&&t1?t1(T):w1(T)}return G[l]},Le=I,Ke=h1,ke=ce,De=W,_t=B.TypeError,ht=v1("toPrimitive"),tt=function(l,T){if(!Ke(l)||ke(l))return l;var D,R=De(l,ht);if(R){if(void 0===T&&(T="default"),D=Le(R,l,T),!Ke(D)||ke(D))return D;throw _t("Can't convert object to primitive value")}return void 0===T&&(T="number"),function(l,T){var R,D;if("string"===T&&d0(R=l.toString)&&!C0(D=Y(R,l))||d0(R=l.valueOf)&&!C0(D=Y(R,l))||"string"!==T&&d0(R=l.toString)&&!C0(D=Y(R,l)))return D;throw $0("Can't convert object to primitive value")}(l,T)},at=ce,$=function(l){var T=tt(l,"string");return at(T)?T:T+""},m0=h1,O0=B.document,w0=m0(O0)&&m0(O0.createElement),V0=function(l){return w0?O0.createElement(l):{}},T1=V0,S1=!S&&!v(function(){return 7!=Object.defineProperty(T1("div"),"a",{get:function(){return 7}}).a}),W1=I,I1=n0,D1=Z0,xe=Q0,ze=$,nt=Q1,Ie=S1,oe=Object.getOwnPropertyDescriptor;g.f=S?oe:function(T,R){if(T=xe(T),R=ze(R),Ie)try{return oe(T,R)}catch{}if(nt(T,R))return D1(!W1(I1.f,T,R),T[R])};var y1={},Ae=S&&v(function(){return 42!=Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),H1=h1,ee=B.String,te=B.TypeError,C1=function(l){if(H1(l))return l;throw te(ee(l)+" is not an object")},ge=S1,$e=C1,Nt=$,Xt=B.TypeError,Wt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,Tt="enumerable",vt="configurable",Rt="writable";y1.f=S?Ae?function(T,R,D){if($e(T),R=Nt(R),$e(D),"function"==typeof T&&"prototype"===R&&"value"in D&&Rt in D&&!D[Rt]){var l0=St(T,R);l0&&l0[Rt]&&(T[R]=D.value,D={configurable:vt in D?D[vt]:l0[vt],enumerable:Tt in D?D[Tt]:l0[Tt],writable:!1})}return Wt(T,R,D)}:Wt:function(T,R,D){if($e(T),R=Nt(R),$e(D),ge)try{return Wt(T,R,D)}catch{}if("get"in D||"set"in D)throw Xt("Accessors not supported");return"value"in D&&(T[R]=D.value),T};var Ct=y1,Zt=Z0,bt=S?function(l,T,R){return Ct.f(l,T,Zt(1,R))}:function(l,T,R){return l[T]=R,l},Se={exports:{}},Ut=x0,Bt=Ce,pn=Z(Function.toString);Ut(Bt.inspectSource)||(Bt.inspectSource=function(l){return pn(l)});var wt,Lt,Et,qt=Bt.inspectSource,A=qt,a=B.WeakMap,h=x0(a)&&/native code/.test(A(a)),K0=Mt,s1=(0,q1.exports)("keys"),f1=function(l){return s1[l]||(s1[l]=K0(l))},E1={},K1=Z,Y1=h1,Je=bt,We=Q1,Ft=f1,$t=E1,sn="Object already initialized",Jt=B.TypeError;if(h||Ce.state){var rt=Ce.state||(Ce.state=new(0,B.WeakMap)),Nn=K1(rt.get),cn=K1(rt.has),Sn=K1(rt.set);wt=function(l,T){if(cn(rt,l))throw new Jt(sn);return T.facade=l,Sn(rt,l,T),T},Lt=function(l){return Nn(rt,l)||{}},Et=function(l){return cn(rt,l)}}else{var ft=Ft("state");$t[ft]=!0,wt=function(l,T){if(We(l,ft))throw new Jt(sn);return T.facade=l,Je(l,ft,T),T},Lt=function(l){return We(l,ft)?l[ft]:{}},Et=function(l){return We(l,ft)}}var Ht={set:wt,get:Lt,has:Et,enforce:function(l){return Et(l)?Lt(l):wt(l,{})},getterFor:function(l){return function(T){var R;if(!Y1(T)||(R=Lt(T)).type!==l)throw Jt("Incompatible receiver, "+l+" required");return R}}},Yt=S,Mn=Function.prototype,Bn=Yt&&Object.getOwnPropertyDescriptor,Gt=Q1(Mn,"name"),En=Gt&&(!Yt||Yt&&Bn(Mn,"name").configurable),Dn=B,zn=x0,In=Q1,an=bt,Xn=j1,Zn=qt,rn=En,Un=Ht.get,On=Ht.enforce,Fn=String(String).split("String");(Se.exports=function(l,T,R,D){var g1,l0=!!D&&!!D.unsafe,P0=!!D&&!!D.enumerable,G0=!!D&&!!D.noTargetGet,Y0=D&&void 0!==D.name?D.name:T;zn(R)&&("Symbol("===String(Y0).slice(0,7)&&(Y0="["+String(Y0).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!In(R,"name")||rn&&R.name!==Y0)&&an(R,"name",Y0),(g1=On(R)).source||(g1.source=Fn.join("string"==typeof Y0?Y0:""))),l!==Dn?(l0?!G0&&l[T]&&(P0=!0):delete l[T],P0?l[T]=R:an(l,T,R)):P0?l[T]=R:Xn(T,R)})(Function.prototype,"toString",function(){return zn(this)&&Un(this).source||Zn(this)});var ln={},$n=Math.ceil,dn=Math.floor,Pt=function(l){var T=+l;return T!=T||0===T?0:(T>0?dn:$n)(T)},Jn=Pt,Hn=Math.max,Yn=Math.min,jn=Pt,Qn=Math.min,kt=function(l){return l>0?Qn(jn(l),9007199254740991):0},Vn=kt,An=function(l){return Vn(l.length)},Kn=Q0,to=An,un=function(l){return function(T,R,D){var Y0,l0=Kn(T),P0=to(l0),G0=function(l,T){var R=Jn(l);return R<0?Hn(R+T,0):Yn(R,T)}(D,P0);if(l&&R!=R){for(;P0>G0;)if((Y0=l0[G0++])!=Y0)return!0}else for(;P0>G0;G0++)if((l||G0 in l0)&&l0[G0]===R)return l||G0||0;return!l&&-1}},_n={includes:un(!0),indexOf:un(!1)},jt=Q1,oo=Q0,u=_n.indexOf,U=E1,b=Z([].push),p=function(l,T){var P0,R=oo(l),D=0,l0=[];for(P0 in R)!jt(U,P0)&&jt(R,P0)&&b(l0,P0);for(;T.length>D;)jt(R,P0=T[D++])&&(~u(l0,P0)||b(l0,P0));return l0},z=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],C=p,r=z.concat("length","prototype");ln.f=Object.getOwnPropertyNames||function(T){return C(T,r)};var x={};x.f=Object.getOwnPropertySymbols;var O=L,o=ln,q=x,w=C1,y0=Z([].concat),J0=O("Reflect","ownKeys")||function(T){var R=o.f(w(T)),D=q.f;return D?y0(R,D(T)):R},m1=Q1,d1=J0,N1=g,c1=y1,Qt=v,xt=x0,So=/#|\.prototype\./,Vt=function(l,T){var R=Bo[yo(l)];return R==Eo||R!=wo&&(xt(T)?Qt(T):!!T)},yo=Vt.normalize=function(l){return String(l).replace(So,".").toLowerCase()},Bo=Vt.data={},wo=Vt.NATIVE="N",Eo=Vt.POLYFILL="P",lo=Vt,io=B,mt=g.f,Ot=bt,po=Se.exports,hn=j1,yp=function(l,T,R){for(var D=d1(T),l0=c1.f,P0=N1.f,G0=0;G0=51&&/native code/.test(l))return!1;var R=new bo(function(P0){P0(1)}),D=function(P0){P0(function(){},function(){})};return(R.constructor={})[Tc]=D,!(t2=R.then(function(){})instanceof D)||!T&&Wc&&!di}),ro={CONSTRUCTOR:vc,REJECTION_EVENT:di,SUBCLASSING:t2},fn={},Ai=f,Rc=function(l){var T,R;this.promise=new l(function(D,l0){if(void 0!==T||void 0!==R)throw TypeError("Bad Promise constructor");T=D,R=l0}),this.resolve=Ai(T),this.reject=Ai(R)};fn.f=function(l){return new Rc(l)};var To,Ri,Ci,Cc=gt,qo=Po,Dt=B,mn=I,Lc=Se.exports,ui=Hp,Sc=f,fo=x0,yc=h1,wc=function(l,T){var D,R=F2(l).constructor;return void 0===R||null==(D=F2(R)[ys])?T:function(l){if(Cs(l))return l;throw ks(Ls(l)+" is not a constructor")}(D)},_i=pi.set,n2=Oc,Pc=e2,Dc=Ac,hi=Ht,mo=ho,qi=fn,go="Promise",fi=ro.CONSTRUCTOR,Ic=ro.REJECTION_EVENT,Xc=ro.SUBCLASSING,p2=hi.getterFor(go),Zc=hi.set,gn=mo&&mo.prototype,nn=mo,Wo=gn,mi=Dt.TypeError,s2=Dt.document,c2=Dt.process,M2=qi.f,Uc=M2,Fc=!!(s2&&s2.createEvent&&Dt.dispatchEvent),gi="unhandledrejection",Li=function(l){var T;return!(!yc(l)||!fo(T=l.then))&&T},ki=function(l,T){var g1,_1,b1,R=T.value,D=1==T.state,l0=D?l.ok:l.fail,P0=l.resolve,G0=l.reject,Y0=l.domain;try{l0?(D||(2===T.rejection&&Gc(T),T.rejection=1),!0===l0?g1=R:(Y0&&Y0.enter(),g1=l0(R),Y0&&(Y0.exit(),b1=!0)),g1===l.promise?G0(mi("Promise-chain cycle")):(_1=Li(g1))?mn(_1,g1,P0,G0):P0(g1)):G0(R)}catch(Z1){Y0&&!b1&&Y0.exit(),G0(Z1)}},xi=function(l,T){l.notified||(l.notified=!0,n2(function(){for(var D,R=l.reactions;D=R.get();)ki(D,l);l.notified=!1,T&&!l.rejection&&Yc(l)}))},Ni=function(l,T,R){var D,l0;Fc?((D=s2.createEvent("Event")).promise=T,D.reason=R,D.initEvent(l,!1,!0),Dt.dispatchEvent(D)):D={promise:T,reason:R},!Ic&&(l0=Dt["on"+l])?l0(D):l===gi&&function(l,T){var R=lc.console;R&&R.error&&(1==arguments.length?R.error(l):R.error(l,T))}("Unhandled promise rejection",R)},Yc=function(l){mn(_i,Dt,function(){var l0,T=l.facade,R=l.value;if(Si(l)&&(l0=Pc(function(){qo?c2.emit("unhandledRejection",R,T):Ni(gi,T,R)}),l.rejection=qo||Si(l)?2:1,l0.error))throw l0.value})},Si=function(l){return 1!==l.rejection&&!l.parent},Gc=function(l){mn(_i,Dt,function(){var T=l.facade;qo?c2.emit("rejectionHandled",T):Ni("rejectionhandled",T,l.value)})},Wn=function(l,T,R){return function(D){l(T,D,R)}},Tn=function(l,T,R){l.done||(l.done=!0,R&&(l=R),l.value=T,l.state=2,xi(l,!0))},a2=function(l,T,R){if(!l.done){l.done=!0,R&&(l=R);try{if(l.facade===T)throw mi("Promise can't be resolved itself");var D=Li(T);D?n2(function(){var l0={done:!1};try{mn(D,T,Wn(a2,l0,l),Wn(Tn,l0,l))}catch(P0){Tn(l0,P0,l)}}):(l.value=T,l.state=1,xi(l,!1))}catch(l0){Tn({done:!1},l0,l)}}};if(fi&&(nn=function(T){(function(l,T){if(is(T,l))return l;throw ps("Incorrect invocation")})(this,Wo),Sc(T),mn(To,this);var R=p2(this);try{T(Wn(a2,R),Wn(Tn,R))}catch(D){Tn(R,D)}},(To=function(T){Zc(this,{type:go,done:!1,notified:!1,parent:!1,reactions:new Dc,rejection:!1,state:0,value:void 0})}).prototype=function(l,T,R){for(var D in T)Pp(l,D,T[D],R);return l}(Wo=nn.prototype,{then:function(T,R){var D=p2(this),l0=M2(wc(this,nn));return D.parent=!0,l0.ok=!fo(T)||T,l0.fail=fo(R)&&R,l0.domain=qo?c2.domain:void 0,0==D.state?D.reactions.add(l0):n2(function(){ki(l0,D)}),l0.promise}}),Ri=function(){var l=new To,T=p2(l);this.promise=l,this.resolve=Wn(a2,T),this.reject=Wn(Tn,T)},qi.f=M2=function(l){return l===nn||void 0===l?new Ri(l):Uc(l)},fo(mo)&&gn!==Object.prototype)){Ci=gn.then,Xc||Lc(gn,"then",function(T,R){var D=this;return new nn(function(l0,P0){mn(Ci,D,l0,P0)}).then(T,R)},{unsafe:!0});try{delete gn.constructor}catch{}ui&&ui(gn,Wo)}Cc({global:!0,wrap:!0,forced:fi},{Promise:nn}),function(l,T,R){l&&!R&&(l=l.prototype),l&&!Gp(l,E2)&&Yp(l,E2,{configurable:!0,value:T})}(nn,go,!1),function(l){var T=Vp(l);ts&&T&&!T[P2]&&(0,Kp.f)(T,P2,{configurable:!0,get:function(){return this}})}(go);var yi={},Qc=yi,Vc=v1("iterator"),Kc=Array.prototype,tM=Do,Bi=W,nM=yi,iM=v1("iterator"),wi=function(l){if(null!=l)return Bi(l,iM)||Bi(l,"@@iterator")||nM[tM(l)]},sM=I,cM=f,MM=C1,zM=de,aM=wi,bM=B.TypeError,OM=I,Ei=C1,lM=W,uM=Xo,_M=I,hM=C1,qM=de,mM=An,Pi=d,WM=wi,Di=function(l,T,R){var D,l0;Ei(l);try{if(!(D=lM(l,"return"))){if("throw"===T)throw R;return R}D=OM(D,l)}catch(P0){l0=!0,D=P0}if("throw"===T)throw R;if(l0)throw D;return Ei(D),R},TM=B.TypeError,vo=function(l,T){this.stopped=l,this.result=T},Ii=vo.prototype,Xi=function(l,T,R){var g1,_1,b1,Z1,U1,F1,it,l0=!(!R||!R.AS_ENTRIES),P0=!(!R||!R.IS_ITERATOR),G0=!(!R||!R.INTERRUPTED),Y0=uM(T,R&&R.that),ye=function(pe){return g1&&Di(g1,"normal",pe),new vo(!0,pe)},pt=function(pe){return l0?(hM(pe),G0?Y0(pe[0],pe[1],ye):Y0(pe[0],pe[1])):G0?Y0(pe,ye):Y0(pe)};if(P0)g1=l;else{if(!(_1=WM(l)))throw TM(qM(l)+" is not iterable");if(function(l){return void 0!==l&&(Qc.Array===l||Kc[Vc]===l)}(_1)){for(b1=0,Z1=mM(l);Z1>b1;b1++)if((U1=pt(l[b1]))&&Pi(Ii,U1))return U1;return new vo(!1)}g1=function(l,T){var R=arguments.length<2?aM(l):T;if(cM(R))return MM(sM(R,l));throw bM(zM(l)+" is not iterable")}(l,_1)}for(F1=g1.next;!(it=_M(F1,g1)).done;){try{U1=pt(it.value)}catch(pe){Di(g1,"throw",pe)}if("object"==typeof U1&&U1&&Pi(Ii,U1))return U1}return new vo(!1)},Zi=v1("iterator"),Ui=!1;try{var RM=0,Fi={next:function(){return{done:!!RM++}},return:function(){Ui=!0}};Fi[Zi]=function(){return this},Array.from(Fi,function(){throw 2})}catch{}var LM=ho,$i=ro.CONSTRUCTOR||!function(l,T){if(!T&&!Ui)return!1;var R=!1;try{var D={};D[Zi]=function(){return{next:function(){return{done:R=!0}}}},l(D)}catch{}return R}(function(l){LM.all(l).then(void 0,function(){})}),SM=I,yM=f,BM=fn,wM=e2,EM=Xi;gt({target:"Promise",stat:!0,forced:$i},{all:function(T){var R=this,D=BM.f(R),l0=D.resolve,P0=D.reject,G0=wM(function(){var Y0=yM(R.resolve),g1=[],_1=0,b1=1;EM(T,function(Z1){var U1=_1++,F1=!1;b1++,SM(Y0,R,Z1).then(function(it){F1||(F1=!0,g1[U1]=it,--b1||l0(g1))},P0)}),--b1||l0(g1)});return G0.error&&P0(G0.value),D.promise}});var b2=ho,XM=L,ZM=x0,UM=Se.exports,Ji=b2&&b2.prototype;if(gt({target:"Promise",proto:!0,forced:ro.CONSTRUCTOR,real:!0},{catch:function(l){return this.then(void 0,l)}}),ZM(b2)){var Hi=XM("Promise").prototype.catch;Ji.catch!==Hi&&UM(Ji,"catch",Hi,{unsafe:!0})}var $M=I,JM=f,HM=fn,YM=e2,GM=Xi;gt({target:"Promise",stat:!0,forced:$i},{race:function(T){var R=this,D=HM.f(R),l0=D.reject,P0=YM(function(){var G0=JM(R.resolve);GM(T,function(Y0){$M(G0,R,Y0).then(D.resolve,l0)})});return P0.error&&l0(P0.value),D.promise}});var VM=I,KM=fn;gt({target:"Promise",stat:!0,forced:ro.CONSTRUCTOR},{reject:function(T){var R=KM.f(this);return VM(R.reject,void 0,T),R.promise}});var tz=C1,nz=h1,oz=fn,pz=gt,cz=ro.CONSTRUCTOR;L("Promise"),pz({target:"Promise",stat:!0,forced:cz},{resolve:function(T){return function(l,T){if(tz(l),nz(T)&&T.constructor===l)return T;var R=oz.f(l);return(0,R.resolve)(T),R.promise}(this,T)}});var az=Do,bz=B.String,vn=function(l){if("Symbol"===az(l))throw TypeError("Cannot convert a Symbol value to a string");return bz(l)},rz=C1,r2=v,O2=B.RegExp,l2=r2(function(){var l=O2("a","y");return l.lastIndex=2,null!=l.exec("abcd")}),dz=l2||r2(function(){return!O2("a","y").sticky}),Az=l2||r2(function(){var l=O2("^r","gy");return l.lastIndex=2,null!=l.exec("str")}),uz={BROKEN_CARET:Az,MISSED_STICKY:dz,UNSUPPORTED_Y:l2},Yi={},_z=p,hz=z,qz=Object.keys||function(T){return _z(T,hz)},gz=y1,Wz=C1,Tz=Q0,vz=qz;Yi.f=S&&!Ae?Object.defineProperties:function(T,R){Wz(T);for(var Y0,D=Tz(R),l0=vz(R),P0=l0.length,G0=0;P0>G0;)gz.f(T,Y0=l0[G0++],D[Y0]);return T};var Ro,Rz=C1,Cz=Yi,Gi=z,Lz=E1,kz=j2,xz=V0,d2="prototype",Vi=f1("IE_PROTO"),u2=function(){},Ki=function(l){return"